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

@lightningjs/ui

Package Overview
Dependencies
Maintainers
5
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.0.8 to 1.0.9

9

docs/CollectionWrapper/Carousel.md

@@ -202,7 +202,6 @@ # Carousel

this.tag('MyCarousel').scroll = {
jump: 3, //after three cells
start: 0.1 //stop scrolling at first item in set, default is 0.0,
previous: 0.2//scroll here if not first item, default is start or 0.0,
next: 0.7 //scroll here if not last item, default is end or 1.0,
end: 0.9 //stop scrolling here if at last item in set, default is 1.0
after: 3, //start scrolling after 3 items
jump: 3, //after three items jump three Items
forward: 0.9, //unless last item: scroll forward if item bounds are after 90% of the List, or if value is above 1; scroll after f.e. 900 pixels
backward: 0.1, //unless first item: scroll backward if item bounds are before 10% of the List, or if value is above 1; scroll before f.e. 50 pixels
}

@@ -209,0 +208,0 @@

@@ -230,7 +230,6 @@ # Grid

this.tag('MyGrid').scroll = {
jump: 3, //after three cells
start: 0.1 //stop scrolling at first item in set, default is 0.0,
previous: 0.2//scroll here if not first item, default is start or 0.0,
next: 0.7 //scroll here if not last item, default is end or 1.0,
end: 0.9 //stop scrolling here if at last item in set, default is 1.0
after: 3, //start scrolling after 3 items
jump: 3, //after three items jump three Items
forward: 0.9, //unless last item: scroll forward if item bounds are after 90% of the List, or if value is above 1; scroll after f.e. 900 pixels
backward: 0.1, //unless first item: scroll backward if item bounds are before 10% of the List, or if value is above 1; scroll before f.e. 50 pixels
}

@@ -237,0 +236,0 @@

@@ -202,7 +202,6 @@ # Collection Wrapper

this.tag('MyList').scroll = {
jump: 3, //after three Items
start: 0.1 //stop scrolling at first Item in set, default is 0.0,
previous: 0.2//scroll here if not first Item, default is start or 0.0,
next: 0.7 //scroll here if not last Item, default is end or 1.0,
end: 0.9 //stop scrolling here if at last Item in set, default is 1.0
after: 3, //start scrolling after 3 items
jump: 3, //after three items jump three Items
forward: 0.9, //unless last item: scroll forward if item bounds are after 90% of the List, or if value is above 1; scroll after f.e. 900 pixels
backward: 0.1, //unless first item: scroll backward if item bounds are before 10% of the List, or if value is above 1; scroll before f.e. 50 pixels
}

@@ -470,7 +469,6 @@ ```

this.tag('MyGrid').scroll = {
jump: 3, //after three cells
start: 0.1 //stop scrolling at first item in set, default is 0.0,
previous: 0.2//scroll here if not first item, default is start or 0.0,
next: 0.7 //scroll here if not last item, default is end or 1.0,
end: 0.9 //stop scrolling here if at last item in set, default is 1.0
after: 3, //start scrolling after 3 items
jump: 3, //after three items jump three Items
forward: 0.9, //unless last item: scroll forward if item bounds are after 90% of the List, or if value is above 1; scroll after f.e. 900 pixels
backward: 0.1, //unless first item: scroll backward if item bounds are before 10% of the List, or if value is above 1; scroll before f.e. 50 pixels
}

@@ -477,0 +475,0 @@

@@ -208,7 +208,6 @@ # List

this.tag('MyList').scroll = {
jump: 3, //after three cells
start: 0.1 //stop scrolling at first item in set, default is 0.0,
previous: 0.2//scroll here if not first item, default is start or 0.0,
next: 0.7 //scroll here if not last item, default is end or 1.0,
end: 0.9 //stop scrolling here if at last item in set, default is 1.0
after: 3, //start scrolling after 3 items
jump: 3, //after three items jump three Items
forward: 0.9, //unless last item: scroll forward if item bounds are after 90% of the List, or if value is above 1; scroll after f.e. 900 pixels
backward: 0.1, //unless first item: scroll backward if item bounds are before 10% of the List, or if value is above 1; scroll before f.e. 50 pixels
}

@@ -215,0 +214,0 @@

@@ -0,3 +1,22 @@

/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2021 Metrological
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {default as List} from './src/List.js';
export {default as Carousel} from './src/Carousel.js';
export {default as Grid} from './src/Grid.js';
{
"name": "@lightningjs/ui",
"version": "1.0.8",
"version": "1.0.9",
"description": "Standard UI components for Lightning",

@@ -13,9 +13,9 @@ "scripts": {

"type": "git",
"url": "git+https://github.com/Metrological/lightning-ui.git"
"url": "git+https://github.com/rdkcentral/Lightning-ui"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/Metrological/lightning-ui/issues"
"url": "https://github.com/rdkcentral/lightning-ui/issues"
},
"homepage": "https://github.com/Metrological/lightning-ui#readme"
"homepage": "https://github.com/rdkcentral/lightning-ui#readme"
}

@@ -5,7 +5,11 @@ # Lightning-UI

[CollectionWrapper](docs/CollectionWrapper/index.md)
[List](docs/CollectionWrapper/List.md)
[Carousel](docs/CollectionWrapper/Carousel.md)
[Grid](docs/CollectionWrapper/Grid.md)
* [CollectionWrapper](docs/CollectionWrapper/index.md)
* [List](docs/CollectionWrapper/List.md)
* [Carousel](docs/CollectionWrapper/Carousel.md)
* [Grid](docs/CollectionWrapper/Grid.md)
# Examples
In the following repository you can find code examples on how to use the components
[Ui-component-examples](https://github.com/mlapps/ui-component-examples)

@@ -0,1 +1,20 @@

/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2021 Metrological
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CollectionWrapper, ItemWrapper} from "./helpers";

@@ -2,0 +21,0 @@

@@ -0,1 +1,20 @@

/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2021 Metrological
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CollectionWrapper, ItemWrapper, limitWithinRange } from "./helpers";

@@ -200,11 +219,6 @@

if(overCross && targetCrossIndex > -1 && targetCrossIndex <= this._lines[targetMainIndex].length) {
const targetExists = this._lines[targetMainIndex][targetCrossIndex] !== undefined;
if(!targetExists && targetCrossIndex > 0 && targetCrossIndex === this._lines[targetMainIndex].length && (this._lines[targetMainIndex - 1] && targetCrossIndex < this._lines[targetMainIndex - 1].length)) {
targetMainIndex -= 1;
if(this._lines[targetMainIndex][targetCrossIndex] !== undefined) {
targetIndex = this._lines[targetMainIndex][targetCrossIndex];
this._previous = undefined;
}
else if (!targetExists) {
targetCrossIndex = this._crossIndex;
}
targetIndex = this._lines[targetMainIndex][targetCrossIndex];
this._previous = undefined;
}

@@ -229,9 +243,18 @@ else if (!overCross && targetMainIndex < this._lines.length && targetMainIndex > -1){

});
let t = m.reduce((acc, val, index, arr) => val > arr[acc] ? index : acc, 0);
if(t === 0 && targetCrossIndex !== 0) {
t = targetLine.length - 1;
let acc = -1;
let t = -1;
for(let i = 0; i < m.length; i++) {
if(m[i] === -1 && acc > -1) {
break;
}
if(m[i] > acc) {
acc = m[i];
t = i;
}
}
this._previous = this._index;
targetCrossIndex = t;
targetIndex = targetLine[t];
if(t > -1) {
targetCrossIndex = t;
targetIndex = targetLine[t];
}
}

@@ -238,0 +261,0 @@ this._previous = {mainIndex: this._mainIndex, crossIndex: this._crossIndex, realIndex: this._index};

@@ -0,1 +1,19 @@

/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2021 Metrological
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

@@ -279,3 +297,3 @@ import Lightning from '@lightningjs/core';

if(!isNaN(scroll) && this._scrollTransition) {
if(this.active && !isNaN(scroll) && this._scrollTransition) {
if(this._scrollTransition.isRunning()) {

@@ -282,0 +300,0 @@ this._scrollTransition.reset(scroll, 0.05);

@@ -0,1 +1,20 @@

/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2021 Metrological
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {default as CollectionWrapper} from './CollectionWrapper.js';

@@ -2,0 +21,0 @@ export {default as ItemWrapper} from './ItemWrapper.js';

@@ -0,1 +1,20 @@

/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2021 Metrological
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Lightning from "@lightningjs/core";

@@ -2,0 +21,0 @@

@@ -0,1 +1,20 @@

/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2021 Metrological
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CollectionWrapper, ItemWrapper } from './helpers';

@@ -2,0 +21,0 @@

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