-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcuba-data-loading-behavior.d.ts
More file actions
52 lines (45 loc) · 1.17 KB
/
cuba-data-loading-behavior.d.ts
File metadata and controls
52 lines (45 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* cuba-data-loading-behavior.html
*/
/**
* In order to use this behavior:
* 1. _load method should be overridden. It must return jqXHR promise.
* 2. Call _optionsChanged method on meaningful properties changes/initialization i.e:
*
* `observers: ['_optionsChanged(serviceName, method, handleAs, auto)']`
*/
interface CubaDataLoadingBehavior {
/**
* If true - automatically loads data.
*/
auto: object|null|undefined;
/**
* Loaded data
*/
readonly data: any;
/**
* Amount of time (in milliseconds) to send a request after property change (to prevent frequent requests).
*/
debounceDuration: number|null|undefined;
/**
* Indicates whether last request is pending.
*/
readonly loading: boolean|null|undefined;
/**
* Loads data.
* Returns Promise.
*/
load(abortable?: any): any;
_optionsChanged(): void;
_handleAbortable(abortable: any): any;
/**
* This method has to be overridden to contain real loading logic.
*/
_load(): void;
}