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

vscroll

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscroll - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

13

dist/esm2015/processes/adapter/remove.js

@@ -35,11 +35,8 @@ import { BaseAdapterProcessFactory, AdapterProcess, ProcessStatus } from '../misc/index';

const { predicate, indexes, increase } = options;
let result = [];
if (predicate) {
result = Remove.runPredicateOverBuffer(scroller, predicate, !!increase);
if (!predicate && !indexes) {
return [];
}
if (indexes) {
const indexPredicate = ({ $index }) => indexes.indexOf($index) >= 0;
result = Remove.runPredicateOverBuffer(scroller, indexPredicate, !!increase);
}
return result;
const newPredicate = item => (predicate && predicate(item)) ||
(!!indexes && indexes.includes(item.$index));
return Remove.runPredicateOverBuffer(scroller, newPredicate, !!increase);
}

@@ -46,0 +43,0 @@ static runPredicateOverBuffer(scroller, predicate, increase) {

@@ -32,3 +32,3 @@ import { BaseProcessFactory, CommonProcess, ProcessStatus } from './misc/index';

render.sizeBefore = viewport.getScrollableSize();
if (fetch.items.map(item => Render.processElement(scroller, item)).some(x => !x)) {
if (!fetch.items.every(item => Render.processElement(scroller, item))) {
return false;

@@ -35,0 +35,0 @@ }

export default {
name: 'vscroll',
version: '1.2.0'
version: '1.2.1'
};
//# sourceMappingURL=version.js.map

@@ -41,14 +41,10 @@ import { __extends } from "tslib";

var predicate = options.predicate, indexes = options.indexes, increase = options.increase;
var result = [];
if (predicate) {
result = Remove.runPredicateOverBuffer(scroller, predicate, !!increase);
if (!predicate && !indexes) {
return [];
}
if (indexes) {
var indexPredicate = function (_a) {
var $index = _a.$index;
return indexes.indexOf($index) >= 0;
};
result = Remove.runPredicateOverBuffer(scroller, indexPredicate, !!increase);
}
return result;
var newPredicate = function (item) {
return (predicate && predicate(item)) ||
(!!indexes && indexes.includes(item.$index));
};
return Remove.runPredicateOverBuffer(scroller, newPredicate, !!increase);
};

@@ -55,0 +51,0 @@ Remove.runPredicateOverBuffer = function (scroller, predicate, increase) {

@@ -37,3 +37,5 @@ import { __extends } from "tslib";

render.sizeBefore = viewport.getScrollableSize();
if (fetch.items.map(function (item) { return Render.processElement(scroller, item); }).some(function (x) { return !x; })) {
if (!fetch.items.every(function (item) {
return Render.processElement(scroller, item);
})) {
return false;

@@ -40,0 +42,0 @@ }

export default {
name: 'vscroll',
version: '1.2.0'
version: '1.2.1'
};
//# sourceMappingURL=version.js.map
{
"name": "vscroll",
"version": "1.2.0",
"version": "1.2.1",
"description": "Virtual scroll engine",

@@ -5,0 +5,0 @@ "main": "dist/bundles/vscroll.umd.js",

@@ -194,3 +194,3 @@ [![build status](https://github.com/dhilt/vscroll/actions/workflows/build.yml/badge.svg)](https://github.com/dhilt/vscroll/actions/workflows/build.yml)

Adapter API becomes available as `Datasource.adapter` property after the Datasource is instantiated via operator "new". In terms of "vscroll" you need to get a Datasource class by calling `makeDatasource` method, then you can instantiate it. `makeDatasource` accepts 1 argument, which is an Adapter custom configuration. Currently this config can only be used to redefine the just mentioned Adapter reactive props. Here's an example of how simple Reactive props can be overridden with RxJs Subject and BehaviorSubject entities: [ui-scroll.datasource.ts](https://github.com/dhilt/ngx-ui-scroll/blob/v2.0.0-rc.10/src/ui-scroll.datasource.ts).
Adapter API becomes available as `Datasource.adapter` property after the Datasource is instantiated via operator "new". In terms of "vscroll" you need to get a Datasource class by calling `makeDatasource` method, then you can instantiate it. `makeDatasource` accepts 1 argument, which is an Adapter custom configuration. Currently this config can only be used to redefine the just mentioned Adapter reactive props. Here's an example of how simple Reactive props can be overridden with RxJs Subject and BehaviorSubject entities: [ui-scroll.datasource.ts](https://github.com/dhilt/ngx-ui-scroll/blob/v2.2.0/src/ui-scroll.datasource.ts).

@@ -197,0 +197,0 @@ An important note is that the Adapter getting ready breaks onto 2 parts: instantiation (which is synchronous with the Datasource instantiation) and initialization (which occurs during the Workflow instantiating). Adapter gets all necessary props and methods during the first phase, but this starts work only when the second phase is done. Practically this means

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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