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

ngx-data-loader

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-data-loader - npm Package Compare versions

Comparing version 2.1.4 to 2.2.1

20

lib/ngx-data-loader.component.d.ts

@@ -16,4 +16,11 @@ import { EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';

*/
getDataFn: () => Observable<T> | Promise<T>;
getDataFn: (args?: any) => Observable<T> | Promise<T>;
/**
* Arguments to pass to `getDataFn`. Changes to this property will trigger a reload.
*
* @example
* getDataFn = () => this.http.get('https://example.com/api/data')
*/
getDataFnArgs?: any;
/**
* Data to be rendered on init. When set, `getDataFn` will not be invoked on init.

@@ -24,2 +31,7 @@ * The loading state will be set to `loaded`.

/**
* Number of milliseconds to debounce reloads.
* @defaultValue `0` |
*/
debounceTime: number;
/**
* Number of times to retry loading the data.

@@ -69,3 +81,4 @@ * @defaultValue `0` |

loadingState$: Observable<LoadingState<T>>;
private loadSource;
private loadTriggerSource;
private loadTrigger$;
private cancelSource;

@@ -99,4 +112,5 @@ private initialState;

private getInitialState;
private getLoadTrigger;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxDataLoaderComponent<any>, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxDataLoaderComponent<any>, "ngx-data-loader", never, { "getDataFn": "getDataFn"; "initialData": "initialData"; "retries": "retries"; "retryDelay": "retryDelay"; "showStaleData": "showStaleData"; "skeletonDelay": "skeletonDelay"; "timeout": "timeout"; }, { "dataLoaded": "dataLoaded"; "error": "error"; "loadAttemptFinished": "loadAttemptFinished"; "loadAttemptStarted": "loadAttemptStarted"; "loadingStateChange": "loadingStateChange"; }, ["dataTemplate", "errorTemplate", "skeletonTemplate"], never, false>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxDataLoaderComponent<any>, "ngx-data-loader", never, { "getDataFn": "getDataFn"; "getDataFnArgs": "getDataFnArgs"; "initialData": "initialData"; "debounceTime": "debounceTime"; "retries": "retries"; "retryDelay": "retryDelay"; "showStaleData": "showStaleData"; "skeletonDelay": "skeletonDelay"; "timeout": "timeout"; }, { "dataLoaded": "dataLoaded"; "error": "error"; "loadAttemptFinished": "loadAttemptFinished"; "loadAttemptStarted": "loadAttemptStarted"; "loadingStateChange": "loadingStateChange"; }, ["dataTemplate", "errorTemplate", "skeletonTemplate"], never, false>;
}

2

package.json
{
"name": "ngx-data-loader",
"version": "2.1.4",
"version": "2.2.1",
"peerDependencies": {

@@ -5,0 +5,0 @@ "@angular/common": "^14.1.0",

@@ -15,3 +15,3 @@ # NgxDataLoader

The `NgxDataLoaderComponent` lets you load any kind of async data without having to waste time on common stuff like error handling, cancel/reload strategies and template display logic.
The `NgxDataLoaderComponent` lets you load any kind of async data without having to spend much time on common stuff like error handling, cancel/reload strategies and template display logic.

@@ -103,3 +103,5 @@ You only need to provide a `getDataFn` that returns an `Observable` of the data. You can optionally provide an `ng-template` for each of the loading states.

| `@Input()`<br />`getDataFn!: () => Observable<T>` | Function that returns an `Observable` of the data to be loaded. Called on init and on reload. |
| `@Input()`<br />`getDataFnArgs?: any` | Arguments to pass to `getDataFn`. Changes to this property will trigger a reload. |
| `@Input()`<br />`initialData?: T` | Data to be rendered on init. When set, `getDataFn` will not be invoked on init. The loading state will be set to `loaded`. |
| `@Input()`<br />`debounceTime: number` | Number of milliseconds to debounce reloads. |
| `@Input()`<br />`retries: number` | Number of times to retry loading the data. Default: `0` |

@@ -106,0 +108,0 @@ | `@Input()`<br />`retryDelay: number` | Delay in milliseconds between retries. Default: `1000` |

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