New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@politie/ngx-list-service

Package Overview
Dependencies
Maintainers
9
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@politie/ngx-list-service - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

8

bundles/politie-ngx-list-service.umd.js

@@ -326,2 +326,3 @@ (function (global, factory) {

this.originalList$ = new rxjs.Subject();
this.destroy$ = new rxjs.Subject();
this.config = {

@@ -343,2 +344,5 @@ sort: { key: null, order: 'asc' },

}
ListService.prototype.ngOnDestroy = function () {
this.destroy$.next(true);
};
/**

@@ -362,3 +366,3 @@ * Creates a List instance and generate a list of data, filtered and sorted.

if (rxjs.isObservable(this.config.list)) {
this.config.list.subscribe(function (r) { return _this.update(r); });
this.config.list.pipe(operators.takeUntil(this.destroy$)).subscribe(function (r) { return _this.update(r); });
}

@@ -509,3 +513,3 @@ else {

};
})).subscribe(this.resultSubject$);
})).pipe(operators.takeUntil(this.destroy$)).subscribe(this.resultSubject$);
};

@@ -512,0 +516,0 @@ /**

import { BehaviorSubject, combineLatest, isObservable, ReplaySubject, Subject } from 'rxjs';
import { filter, map, skip, withLatestFrom } from 'rxjs/operators';
import { filter, map, skip, takeUntil, withLatestFrom } from 'rxjs/operators';
import { Injectable } from '@angular/core';

@@ -11,2 +11,3 @@ export class ListService {

this.originalList$ = new Subject();
this.destroy$ = new Subject();
this.config = {

@@ -28,2 +29,5 @@ sort: { key: null, order: 'asc' },

}
ngOnDestroy() {
this.destroy$.next(true);
}
/**

@@ -46,3 +50,3 @@ * Creates a List instance and generate a list of data, filtered and sorted.

if (isObservable(this.config.list)) {
this.config.list.subscribe(r => this.update(r));
this.config.list.pipe(takeUntil(this.destroy$)).subscribe(r => this.update(r));
}

@@ -188,3 +192,3 @@ else {

};
})).subscribe(this.resultSubject$);
})).pipe(takeUntil(this.destroy$)).subscribe(this.resultSubject$);
}

@@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AgICAgLyoqXG4gICAgICAgICAqIFJldHVybiB0aGUgcGF5bG9hZCB0byB0aGUgdmlldywgd2l0aCB0aGUgbGlzdCwgc29ydGluZyBhbmQgcGFnaW5hdGlvbiBvcHRpb25zXG4gICAgICAgICAqL1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHBhZ2UsXG4gICAgICAgICAgc29ydGluZyxcbiAgICAgICAgICBwYWdpbmF0aW9uOiB7XG4gICAgICAgICAgICBsaXN0U2l6ZTogbGlzdC5sZW5ndGgsXG4gICAgICAgICAgICBwYWdlOiB7XG4gICAgICAgICAgICAgIGN1cnJlbnQ6IGluZGV4ICsgMSxcbiAgICAgICAgICAgICAgc2l6ZTogcGFnZS5sZW5ndGgsXG4gICAgICAgICAgICAgIHRvdGFsOiBNYXRoLm1heCh0b3RhbFBhZ2VzLCAxKVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHBhZ2VzOiBBcnJheS5mcm9tKHtsZW5ndGg6IE1hdGgubWF4KHRvdGFsUGFnZXMsIDEpfSwgKF8sIGkpID0+IGkgKyAxKSxcbiAgICAgICAgICAgIGRpc2FibGVkOiB7XG4gICAgICAgICAgICAgIHByZXY6IChpbmRleCA9PT0gMCksXG4gICAgICAgICAgICAgIG5leHQ6IChpbmRleCA9PT0gTWF0aC5tYXgodG90YWxQYWdlcyAtIDEsIDApKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgIH0pXG4gICAgKS5zdWJzY3JpYmUodGhpcy5yZXN1bHRTdWJqZWN0JCk7XG4gIH1cblxuICAvKipcbiAgICogR28gdG8gYSBzcGVjaWZpYyBwYWdlIGluIHRoZSBzZXRcbiAgICogVGhpcyB3aWxsIGJlIHRyYW5zZm9ybWVkIHRvIGEgemVybyBiYXNlZCBpbmRleFxuICAgKlxuICAgKiBAcGFyYW0gcGFnZSB0aGUgcGFnZSBudW1iZXIgdG8gZ28gdG9cbiAgICovXG4gIGdvVG9QYWdlKH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5kIHBhZ2luYXRpb24gb3B0aW9uc1xuICAgICAgICAgKi9cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBwYWdlLFxuICAgICAgICAgIHNvcnRpbmcsXG4gICAgICAgICAgcGFnaW5hdGlvbjoge1xuICAgICAgICAgICAgbGlzdFNpemU6IGxpc3QubGVuZ3RoLFxuICAgICAgICAgICAgcGFnZToge1xuICAgICAgICAgICAgICBjdXJyZW50OiBpbmRleCArIDEsXG4gICAgICAgICAgICAgIHNpemU6IHBhZ2UubGVuZ3RoLFxuICAgICAgICAgICAgICB0b3RhbDogTWF0aC5tYXgodG90YWxQYWdlcywgMSlcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBwYWdlczogQXJyYXkuZnJvbSh7bGVuZ3RoOiBNYXRoLm1heCh0b3RhbFBhZ2VzLCAxKX0sIChfLCBpKSA9PiBpICsgMSksXG4gICAgICAgICAgICBkaXNhYmxlZDoge1xuICAgICAgICAgICAgICBwcmV2OiAoaW5kZXggPT09IDApLFxuICAgICAgICAgICAgICBuZXh0OiAoaW5kZXggPT09IE1hdGgubWF4KHRvdGFsUGFnZXMgLSAxLCAwKSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICB9KVxuICAgICkucGlwZShcbiAgICAgIHRha2VVbnRpbCh0aGlzLmRlc3Ryb3kkKVxuICAgICkuc3Vic2NyaWJlKHRoaXMucmVzdWx0U3ViamVjdCQpO1xuICB9XG5cbiAgLyoqXG4gICAqIEdvIHRvIGEgc3BlY2lmaWMgcGFnZSBpbiB0aGUgc2V0XG4gICAqIFRoaXMgd2lsbCBiZSB0cmFuc2Zvcm1lZCB0byBhIHplcm8gYmFzZWQgaW5kZXhcbiAgICpcbiAgICogQHBhcmFtIHBhZ2UgdGhlIHBhZ2UgbnVtYmVyIHRvIGdvIHRvXG4gICAqL1xuICBnb1RvUGFnZShwYWdlOiBudW1iZXIpIHtcbiAgICB0aGlzLmN1cnJlbnRJbmRleCQubmV4dChwYWdlIC0gMSk7XG4gIH1cblxuICAvKipcbiAgICogR28gdG8gdGhlIG5leHQgcGFnZVxuICAgKi9cbiAgbmV4dFBhZ2UoKSB7XG4gICAgdGhpcy5jdXJyZW50SW5kZXgkLm5leHQodGhpcy5jdXJyZW50SW5kZXgkLmdldFZhbHVlKCkgKyAxKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBHbyB0byB0aGUgcHJldmlvdXMgcGFnZVxuICAgKi9cbiAgcHJldlBhZ2UoKSB7XG4gICAgdGhpcy5jdXJyZW50SW5kZXgkLm5leHQodGhpcy5jdXJyZW50SW5kZXgkLmdldFZhbHVlKCkgLSAxKTtcbiAgfVxufVxuIl19
import { BehaviorSubject, ReplaySubject, Subject, isObservable, combineLatest } from 'rxjs';
import { map, filter, skip, withLatestFrom } from 'rxjs/operators';
import { takeUntil, map, filter, skip, withLatestFrom } from 'rxjs/operators';
import { Injectable } from '@angular/core';

@@ -12,2 +12,3 @@

this.originalList$ = new Subject();
this.destroy$ = new Subject();
this.config = {

@@ -29,2 +30,5 @@ sort: { key: null, order: 'asc' },

}
ngOnDestroy() {
this.destroy$.next(true);
}
/**

@@ -47,3 +51,3 @@ * Creates a List instance and generate a list of data, filtered and sorted.

if (isObservable(this.config.list)) {
this.config.list.subscribe(r => this.update(r));
this.config.list.pipe(takeUntil(this.destroy$)).subscribe(r => this.update(r));
}

@@ -189,3 +193,3 @@ else {

};
})).subscribe(this.resultSubject$);
})).pipe(takeUntil(this.destroy$)).subscribe(this.resultSubject$);
}

@@ -192,0 +196,0 @@ /**

import { Observable } from 'rxjs';
import { OnDestroy } from '@angular/core';
import { ListPayload, ListResult } from '../models/list.model';
export declare class ListService<T> {
export declare class ListService<T> implements OnDestroy {
result$: Observable<ListResult<T>>;

@@ -12,4 +13,6 @@ private filterFunction$;

private sortedList$;
private destroy$;
private config;
constructor();
ngOnDestroy(): void;
/**

@@ -16,0 +19,0 @@ * Creates a List instance and generate a list of data, filtered and sorted.

{
"name": "@politie/ngx-list-service",
"license": "Apache-2.0",
"version": "1.1.0",
"version": "1.1.1",
"peerDependencies": {

@@ -6,0 +6,0 @@ "@angular/common": ">11.0.0",

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

{"__symbolic":"module","version":4,"metadata":{"ListSorting":{"__symbolic":"interface"},"ListPagination":{"__symbolic":"interface"},"ListResult":{"__symbolic":"interface"},"ListPayload":{"__symbolic":"interface"},"ListService":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"create":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"filter":[{"__symbolic":"method"}],"sort":[{"__symbolic":"method"}],"createFilteredList$":[{"__symbolic":"method"}],"createSortedList$":[{"__symbolic":"method"}],"createList$":[{"__symbolic":"method"}],"goToPage":[{"__symbolic":"method"}],"nextPage":[{"__symbolic":"method"}],"prevPage":[{"__symbolic":"method"}]}}},"origins":{"ListSorting":"./lib/models/list.model","ListPagination":"./lib/models/list.model","ListResult":"./lib/models/list.model","ListPayload":"./lib/models/list.model","ListService":"./lib/service/list.service"},"importAs":"@politie/ngx-list-service"}
{"__symbolic":"module","version":4,"metadata":{"ListSorting":{"__symbolic":"interface"},"ListPagination":{"__symbolic":"interface"},"ListResult":{"__symbolic":"interface"},"ListPayload":{"__symbolic":"interface"},"ListService":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"ngOnDestroy":[{"__symbolic":"method"}],"create":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"filter":[{"__symbolic":"method"}],"sort":[{"__symbolic":"method"}],"createFilteredList$":[{"__symbolic":"method"}],"createSortedList$":[{"__symbolic":"method"}],"createList$":[{"__symbolic":"method"}],"goToPage":[{"__symbolic":"method"}],"nextPage":[{"__symbolic":"method"}],"prevPage":[{"__symbolic":"method"}]}}},"origins":{"ListSorting":"./lib/models/list.model","ListPagination":"./lib/models/list.model","ListResult":"./lib/models/list.model","ListPayload":"./lib/models/list.model","ListService":"./lib/service/list.service"},"importAs":"@politie/ngx-list-service"}

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