@base-framework/base 3.7.52 → 3.7.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.js +1 -1
- package/dist/base.js.map +3 -3
- package/dist/types/main/base.d.ts +2 -2
- package/dist/types/modules/component/cloak.d.ts +6 -0
- package/dist/types/modules/component/unit.d.ts +6 -3
- package/dist/types/modules/data/types/basic-data.d.ts +22 -21
- package/dist/types/modules/data/types/deep-data/deep-data.d.ts +10 -10
- package/dist/types/modules/data-binder/connection-tracker/connections/two-way-connection.d.ts +4 -4
- package/dist/types/modules/data-binder/data-binder.d.ts +12 -12
- package/dist/types/modules/data-binder/sources/element-source.d.ts +5 -5
- package/dist/types/modules/router/history/browser-history.d.ts +10 -4
- package/dist/types/modules/router/history/hash-history.d.ts +10 -4
- package/dist/types/modules/router/router.d.ts +11 -10
- package/dist/types/modules/router/routes/route.d.ts +1 -1
- package/dist/types/modules/state/state.d.ts +4 -4
- package/package.json +1 -1
|
@@ -24,9 +24,9 @@ declare class Base {
|
|
|
24
24
|
* this will augement the base framework with new functionality.
|
|
25
25
|
*
|
|
26
26
|
* @param {object} methods The new methods to add.
|
|
27
|
-
* @returns {
|
|
27
|
+
* @returns {this}
|
|
28
28
|
*/
|
|
29
|
-
augment(methods: object):
|
|
29
|
+
augment(methods: object): this;
|
|
30
30
|
/**
|
|
31
31
|
* This will override a method function with a new function.
|
|
32
32
|
*
|
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
* @type {typeof Component}
|
|
9
9
|
*/
|
|
10
10
|
export class CloakComponent extends Component {
|
|
11
|
+
/**
|
|
12
|
+
* This will get the child scope instance of the component.
|
|
13
|
+
*
|
|
14
|
+
* @returns {object}
|
|
15
|
+
*/
|
|
16
|
+
getChildScope(): object;
|
|
11
17
|
}
|
|
12
18
|
export function Cloak(props: any): typeof Component;
|
|
13
19
|
import { Component } from "./component.js";
|
|
@@ -65,6 +65,10 @@ export class Unit {
|
|
|
65
65
|
* @type {?string} _classId
|
|
66
66
|
*/
|
|
67
67
|
_classId: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* @type {string} id
|
|
70
|
+
*/
|
|
71
|
+
id: string;
|
|
68
72
|
/**
|
|
69
73
|
* @type {Array<any>} cached
|
|
70
74
|
*/
|
|
@@ -91,7 +95,6 @@ export class Unit {
|
|
|
91
95
|
* @returns {void}
|
|
92
96
|
*/
|
|
93
97
|
protected init(): void;
|
|
94
|
-
id: string;
|
|
95
98
|
/**
|
|
96
99
|
* This will declare the component props.
|
|
97
100
|
*
|
|
@@ -125,9 +128,9 @@ export class Unit {
|
|
|
125
128
|
* If the component is transparent, children see through
|
|
126
129
|
* to the parent scope instead.
|
|
127
130
|
*
|
|
128
|
-
* @returns {
|
|
131
|
+
* @returns {this}
|
|
129
132
|
*/
|
|
130
|
-
getChildScope():
|
|
133
|
+
getChildScope(): this;
|
|
131
134
|
/**
|
|
132
135
|
* This will get the parent context.
|
|
133
136
|
*
|
|
@@ -58,6 +58,7 @@ export class BasicData {
|
|
|
58
58
|
*/
|
|
59
59
|
dataTypeId: string;
|
|
60
60
|
eventSub: DataPubSub;
|
|
61
|
+
_proxy: ProxyConstructor;
|
|
61
62
|
/**
|
|
62
63
|
* Marks this data source so the persist/resume system
|
|
63
64
|
* keeps persisted values instead of overwriting them
|
|
@@ -66,9 +67,9 @@ export class BasicData {
|
|
|
66
67
|
* Use this when accumulated state (filters, selections,
|
|
67
68
|
* loaded content) should survive across route navigations.
|
|
68
69
|
*
|
|
69
|
-
* @returns {
|
|
70
|
+
* @returns {this}
|
|
70
71
|
*/
|
|
71
|
-
retainState():
|
|
72
|
+
retainState(): this;
|
|
72
73
|
/**
|
|
73
74
|
* This will setup the data object.
|
|
74
75
|
*
|
|
@@ -176,7 +177,7 @@ export class BasicData {
|
|
|
176
177
|
*
|
|
177
178
|
* @overload
|
|
178
179
|
* @param {object} data
|
|
179
|
-
* @returns {
|
|
180
|
+
* @returns {this}
|
|
180
181
|
*/
|
|
181
182
|
set(key: string, value: any, committer?: object): any;
|
|
182
183
|
/**
|
|
@@ -189,9 +190,9 @@ export class BasicData {
|
|
|
189
190
|
*
|
|
190
191
|
* @overload
|
|
191
192
|
* @param {object} data
|
|
192
|
-
* @returns {
|
|
193
|
+
* @returns {this}
|
|
193
194
|
*/
|
|
194
|
-
set(data: object):
|
|
195
|
+
set(data: object): this;
|
|
195
196
|
/**
|
|
196
197
|
* This will get the model data.
|
|
197
198
|
*
|
|
@@ -213,55 +214,55 @@ export class BasicData {
|
|
|
213
214
|
* This will toggle a bool attribute.
|
|
214
215
|
*
|
|
215
216
|
* @param {string} attr
|
|
216
|
-
* @returns {
|
|
217
|
+
* @returns {this}
|
|
217
218
|
*/
|
|
218
|
-
toggle(attr: string):
|
|
219
|
+
toggle(attr: string): this;
|
|
219
220
|
/**
|
|
220
221
|
* This will increment an attribute.
|
|
221
222
|
*
|
|
222
223
|
* @param {string} attr
|
|
223
224
|
* @param {number|null} value
|
|
224
|
-
* @returns {
|
|
225
|
+
* @returns {this}
|
|
225
226
|
*/
|
|
226
|
-
increment(attr: string, value?: number | null):
|
|
227
|
+
increment(attr: string, value?: number | null): this;
|
|
227
228
|
/**
|
|
228
229
|
* This will decrement an attribute.
|
|
229
230
|
*
|
|
230
231
|
* @param {string} attr
|
|
231
232
|
* @param {number|null} value
|
|
232
|
-
* @returns {
|
|
233
|
+
* @returns {this}
|
|
233
234
|
*/
|
|
234
|
-
decrement(attr: string, value?: number | null):
|
|
235
|
+
decrement(attr: string, value?: number | null): this;
|
|
235
236
|
/**
|
|
236
237
|
* This will concat an attribute.
|
|
237
238
|
*
|
|
238
239
|
* @param {string} attr
|
|
239
|
-
* @returns {
|
|
240
|
+
* @returns {this}
|
|
240
241
|
*/
|
|
241
|
-
concat(attr: string, value: any):
|
|
242
|
+
concat(attr: string, value: any): this;
|
|
242
243
|
/**
|
|
243
244
|
* This will set the key value if it is null.
|
|
244
245
|
*
|
|
245
246
|
* @param {string} key
|
|
246
247
|
* @param {*} value
|
|
247
|
-
* @returns {
|
|
248
|
+
* @returns {this}
|
|
248
249
|
*/
|
|
249
|
-
ifNull(key: string, value: any):
|
|
250
|
+
ifNull(key: string, value: any): this;
|
|
250
251
|
/**
|
|
251
252
|
* This will set the data local storage key.
|
|
252
253
|
*
|
|
253
254
|
* @param {string} key
|
|
254
|
-
* @returns {
|
|
255
|
+
* @returns {this}
|
|
255
256
|
*/
|
|
256
|
-
setKey(key: string):
|
|
257
|
+
setKey(key: string): this;
|
|
257
258
|
key: string;
|
|
258
259
|
/**
|
|
259
260
|
* This will restore the data from local storage.
|
|
260
261
|
*
|
|
261
262
|
* @param {*} defaultValue
|
|
262
|
-
* @returns {
|
|
263
|
+
* @returns {this}
|
|
263
264
|
*/
|
|
264
|
-
resume(defaultValue: any):
|
|
265
|
+
resume(defaultValue: any): this;
|
|
265
266
|
/**
|
|
266
267
|
* This will store the data to the local stoage under
|
|
267
268
|
* the storage key.
|
|
@@ -273,9 +274,9 @@ export class BasicData {
|
|
|
273
274
|
* This will delete a property value or the model data.
|
|
274
275
|
*
|
|
275
276
|
* @param {object|string|null} [attrName]
|
|
276
|
-
* @returns {
|
|
277
|
+
* @returns {this}
|
|
277
278
|
*/
|
|
278
|
-
delete(attrName?: object | string | null):
|
|
279
|
+
delete(attrName?: object | string | null): this;
|
|
279
280
|
/**
|
|
280
281
|
* This will get the value of an attribute.
|
|
281
282
|
*
|
|
@@ -44,33 +44,33 @@ export class Data extends BasicData {
|
|
|
44
44
|
*
|
|
45
45
|
* @param {string} attr
|
|
46
46
|
* @param {number} index
|
|
47
|
-
* @returns {
|
|
47
|
+
* @returns {this}
|
|
48
48
|
*/
|
|
49
|
-
splice(attr: string, index: number):
|
|
49
|
+
splice(attr: string, index: number): this;
|
|
50
50
|
/**
|
|
51
51
|
* This will add a value to an array and set the result.
|
|
52
52
|
*
|
|
53
53
|
* @param {string} attr
|
|
54
54
|
* @param {*} value
|
|
55
|
-
* @returns {
|
|
55
|
+
* @returns {this}
|
|
56
56
|
*/
|
|
57
|
-
push(attr: string, value: any):
|
|
57
|
+
push(attr: string, value: any): this;
|
|
58
58
|
/**
|
|
59
59
|
* This will concatenate values to an array and set the result.
|
|
60
60
|
*
|
|
61
61
|
* @param {string} attr
|
|
62
62
|
* @param {Array<any>} values
|
|
63
|
-
* @returns {
|
|
63
|
+
* @returns {this}
|
|
64
64
|
*/
|
|
65
|
-
concat(attr: string, values: Array<any>):
|
|
65
|
+
concat(attr: string, values: Array<any>): this;
|
|
66
66
|
/**
|
|
67
67
|
* This will add a value to an array and set the result.
|
|
68
68
|
*
|
|
69
69
|
* @param {string} attr
|
|
70
70
|
* @param {*} value
|
|
71
|
-
* @returns {
|
|
71
|
+
* @returns {this}
|
|
72
72
|
*/
|
|
73
|
-
unshift(attr: string, value: any):
|
|
73
|
+
unshift(attr: string, value: any): this;
|
|
74
74
|
/**
|
|
75
75
|
* This will add a value to an array and set the result.
|
|
76
76
|
*
|
|
@@ -98,9 +98,9 @@ export class Data extends BasicData {
|
|
|
98
98
|
* This will refresh the value.
|
|
99
99
|
*
|
|
100
100
|
* @param {string} attr
|
|
101
|
-
* @returns {
|
|
101
|
+
* @returns {this}
|
|
102
102
|
*/
|
|
103
|
-
refresh(attr: string):
|
|
103
|
+
refresh(attr: string): this;
|
|
104
104
|
_pubCommitter: any;
|
|
105
105
|
_pubEvent: string;
|
|
106
106
|
_publishCb: (path: any, obj: any) => void;
|
package/dist/types/modules/data-binder/connection-tracker/connections/two-way-connection.d.ts
CHANGED
|
@@ -47,15 +47,15 @@ export class TwoWayConnection extends Connection {
|
|
|
47
47
|
* This will unsubscribe from a source.
|
|
48
48
|
*
|
|
49
49
|
* @param {object} source
|
|
50
|
-
* @returns {
|
|
50
|
+
* @returns {this}
|
|
51
51
|
*/
|
|
52
|
-
unsubscribeSource(source: object):
|
|
52
|
+
unsubscribeSource(source: object): this;
|
|
53
53
|
/**
|
|
54
54
|
* This will be used to unsubscribe.
|
|
55
55
|
*
|
|
56
56
|
* @override
|
|
57
|
-
* @returns {
|
|
57
|
+
* @returns {this}
|
|
58
58
|
*/
|
|
59
|
-
override unsubscribe():
|
|
59
|
+
override unsubscribe(): this;
|
|
60
60
|
}
|
|
61
61
|
import { Connection } from './connection.js';
|
|
@@ -48,9 +48,9 @@ export class DataBinder {
|
|
|
48
48
|
* @param {object} data
|
|
49
49
|
* @param {string} prop
|
|
50
50
|
* @param {string|function} filter
|
|
51
|
-
* @returns {
|
|
51
|
+
* @returns {this} an instance of the databinder.
|
|
52
52
|
*/
|
|
53
|
-
bind(element: object, data: object, prop: string, filter: string | Function):
|
|
53
|
+
bind(element: object, data: object, prop: string, filter: string | Function): this;
|
|
54
54
|
/**
|
|
55
55
|
* This will bind an element to a data property.
|
|
56
56
|
*
|
|
@@ -71,9 +71,9 @@ export class DataBinder {
|
|
|
71
71
|
* @param {string} id
|
|
72
72
|
* @param {string} attr
|
|
73
73
|
* @param {object} connection
|
|
74
|
-
* @returns {
|
|
74
|
+
* @returns {this}
|
|
75
75
|
*/
|
|
76
|
-
protected addConnection(id: string, attr: string, connection: object):
|
|
76
|
+
protected addConnection(id: string, attr: string, connection: object): this;
|
|
77
77
|
/**
|
|
78
78
|
* This will set the bind id.
|
|
79
79
|
*
|
|
@@ -94,9 +94,9 @@ export class DataBinder {
|
|
|
94
94
|
* This will unbind the element.
|
|
95
95
|
*
|
|
96
96
|
* @param {object} element
|
|
97
|
-
* @returns {
|
|
97
|
+
* @returns {this} an instance of the data binder.
|
|
98
98
|
*/
|
|
99
|
-
unbind(element: object):
|
|
99
|
+
unbind(element: object): this;
|
|
100
100
|
/**
|
|
101
101
|
* This will setup a watcher for an element.
|
|
102
102
|
*
|
|
@@ -104,27 +104,27 @@ export class DataBinder {
|
|
|
104
104
|
* @param {object} data
|
|
105
105
|
* @param {string} prop
|
|
106
106
|
* @param {function} callBack
|
|
107
|
-
* @returns {
|
|
107
|
+
* @returns {this}
|
|
108
108
|
*/
|
|
109
|
-
watch(element: object, data: object, prop: string, callBack: Function):
|
|
109
|
+
watch(element: object, data: object, prop: string, callBack: Function): this;
|
|
110
110
|
/**
|
|
111
111
|
* This will remove a watcher from an element.
|
|
112
112
|
*
|
|
113
113
|
* @param {object} element
|
|
114
114
|
* @param {object} data
|
|
115
115
|
* @param {string} prop
|
|
116
|
-
* @returns {
|
|
116
|
+
* @returns {this}
|
|
117
117
|
*/
|
|
118
|
-
unwatch(element: object, data: object, prop: string):
|
|
118
|
+
unwatch(element: object, data: object, prop: string): this;
|
|
119
119
|
/**
|
|
120
120
|
* This will publish to the pub sub.
|
|
121
121
|
*
|
|
122
122
|
* @param {string} msg
|
|
123
123
|
* @param {*} value
|
|
124
124
|
* @param {object} committer
|
|
125
|
-
* @returns {
|
|
125
|
+
* @returns {this} an instance of the data binder.
|
|
126
126
|
*/
|
|
127
|
-
publish(msg: string, value: any, committer: object):
|
|
127
|
+
publish(msg: string, value: any, committer: object): this;
|
|
128
128
|
/**
|
|
129
129
|
* This will check if an element is bound.
|
|
130
130
|
*
|
|
@@ -37,7 +37,7 @@ export class ElementSource extends TwoWaySource {
|
|
|
37
37
|
* @private
|
|
38
38
|
* @param {object} element
|
|
39
39
|
* @param {string} attr
|
|
40
|
-
* @returns {
|
|
40
|
+
* @returns {this}
|
|
41
41
|
*/
|
|
42
42
|
private addSetMethod;
|
|
43
43
|
setValue: ((element: object, attr: string, value: any) => void) | ((element: object, attr: string, value: any) => void) | ((element: object, attr: string, value: any) => void) | ((element: object, attr: string, value: any) => void);
|
|
@@ -62,9 +62,9 @@ export class ElementSource extends TwoWaySource {
|
|
|
62
62
|
* This will set a value on an element.
|
|
63
63
|
*
|
|
64
64
|
* @param {*} value
|
|
65
|
-
* @returns {
|
|
65
|
+
* @returns {this}
|
|
66
66
|
*/
|
|
67
|
-
set(value: any):
|
|
67
|
+
set(value: any): this;
|
|
68
68
|
/**
|
|
69
69
|
* This will get the value from an element.
|
|
70
70
|
*
|
|
@@ -77,8 +77,8 @@ export class ElementSource extends TwoWaySource {
|
|
|
77
77
|
* @overload
|
|
78
78
|
* @param {*} value
|
|
79
79
|
* @param {object} committer
|
|
80
|
-
* @returns {
|
|
80
|
+
* @returns {this}
|
|
81
81
|
*/
|
|
82
|
-
callBack(value: any, committer: object):
|
|
82
|
+
callBack(value: any, committer: object): this;
|
|
83
83
|
}
|
|
84
84
|
import { TwoWaySource } from './two-way-source.js';
|
|
@@ -6,13 +6,19 @@
|
|
|
6
6
|
* @class
|
|
7
7
|
*/
|
|
8
8
|
export class BrowserHistory extends History {
|
|
9
|
+
/**
|
|
10
|
+
* This will add the events.
|
|
11
|
+
*
|
|
12
|
+
* @returns {this} a reference to the object.
|
|
13
|
+
*/
|
|
14
|
+
addEvent(): this;
|
|
9
15
|
pageShowCallBack: any;
|
|
10
16
|
/**
|
|
11
17
|
* This will remove the events.
|
|
12
18
|
*
|
|
13
|
-
* @returns {
|
|
19
|
+
* @returns {this} a reference to the object.
|
|
14
20
|
*/
|
|
15
|
-
removeEvent():
|
|
21
|
+
removeEvent(): this;
|
|
16
22
|
/**
|
|
17
23
|
* Handles the pageshow event for bfcache restoration.
|
|
18
24
|
*
|
|
@@ -40,8 +46,8 @@ export class BrowserHistory extends History {
|
|
|
40
46
|
* @param {string} uri
|
|
41
47
|
* @param {object|null} data
|
|
42
48
|
* @param {boolean} replace
|
|
43
|
-
* @returns {
|
|
49
|
+
* @returns {this} a reference to the object.
|
|
44
50
|
*/
|
|
45
|
-
addState(uri: string, data: object | null, replace?: boolean):
|
|
51
|
+
addState(uri: string, data: object | null, replace?: boolean): this;
|
|
46
52
|
}
|
|
47
53
|
import { History } from "./history.js";
|
|
@@ -6,12 +6,18 @@
|
|
|
6
6
|
* @class
|
|
7
7
|
*/
|
|
8
8
|
export class HashHistory extends History {
|
|
9
|
+
/**
|
|
10
|
+
* This will add the events.
|
|
11
|
+
*
|
|
12
|
+
* @returns {this} a reference to the object.
|
|
13
|
+
*/
|
|
14
|
+
addEvent(): this;
|
|
9
15
|
/**
|
|
10
16
|
* This will remove the events.
|
|
11
17
|
*
|
|
12
|
-
* @returns {
|
|
18
|
+
* @returns {this} a reference to the object.
|
|
13
19
|
*/
|
|
14
|
-
removeEvent():
|
|
20
|
+
removeEvent(): this;
|
|
15
21
|
/**
|
|
16
22
|
* This will check to activate the router.
|
|
17
23
|
*
|
|
@@ -24,8 +30,8 @@ export class HashHistory extends History {
|
|
|
24
30
|
* @param {string} uri
|
|
25
31
|
* @param {object} data
|
|
26
32
|
* @param {boolean} replace
|
|
27
|
-
* @returns {
|
|
33
|
+
* @returns {this} a reference to the object.
|
|
28
34
|
*/
|
|
29
|
-
addState(uri: string, data: object, replace: boolean):
|
|
35
|
+
addState(uri: string, data: object, replace: boolean): this;
|
|
30
36
|
}
|
|
31
37
|
import { History } from "./history.js";
|
|
@@ -150,17 +150,17 @@ export class Router {
|
|
|
150
150
|
* This will remove a route by uri.
|
|
151
151
|
*
|
|
152
152
|
* @param {string} uri
|
|
153
|
-
* @returns {
|
|
153
|
+
* @returns {this} a reference to the router object.
|
|
154
154
|
*/
|
|
155
|
-
remove(uri: string):
|
|
155
|
+
remove(uri: string): this;
|
|
156
156
|
/**
|
|
157
157
|
* This will setup the router.
|
|
158
158
|
*
|
|
159
159
|
* @param {string} [baseURI]
|
|
160
160
|
* @param {string} [title]
|
|
161
|
-
* @returns {
|
|
161
|
+
* @returns {this} a reference to the router object.
|
|
162
162
|
*/
|
|
163
|
-
setup(baseURI?: string, title?: string):
|
|
163
|
+
setup(baseURI?: string, title?: string): this;
|
|
164
164
|
/**
|
|
165
165
|
* Update the base tag href to the base URI for correct relative URL resolution.
|
|
166
166
|
*
|
|
@@ -185,24 +185,24 @@ export class Router {
|
|
|
185
185
|
/**
|
|
186
186
|
* This will reset the router.
|
|
187
187
|
*
|
|
188
|
-
* @returns {
|
|
188
|
+
* @returns {this} a reference to the router object.
|
|
189
189
|
*/
|
|
190
|
-
reset():
|
|
190
|
+
reset(): this;
|
|
191
191
|
/**
|
|
192
192
|
* This will check the active routes.
|
|
193
193
|
*
|
|
194
|
-
* @returns {
|
|
194
|
+
* @returns {this} a reference to the router object.
|
|
195
195
|
*/
|
|
196
|
-
activate():
|
|
196
|
+
activate(): this;
|
|
197
197
|
/**
|
|
198
198
|
* This will navigate the router.
|
|
199
199
|
*
|
|
200
200
|
* @param {string} uri
|
|
201
201
|
* @param {object|null} [data]
|
|
202
202
|
* @param {boolean} [replace]
|
|
203
|
-
* @returns {
|
|
203
|
+
* @returns {this} a reference to the router object.
|
|
204
204
|
*/
|
|
205
|
-
navigate(uri: string, data?: object | null, replace?: boolean):
|
|
205
|
+
navigate(uri: string, data?: object | null, replace?: boolean): this;
|
|
206
206
|
/**
|
|
207
207
|
* This will update the data path.
|
|
208
208
|
* @protected
|
|
@@ -213,6 +213,7 @@ export class Router {
|
|
|
213
213
|
*
|
|
214
214
|
* @protected
|
|
215
215
|
* @param {object} route
|
|
216
|
+
* @returns {this} a reference to the router object.
|
|
216
217
|
*/
|
|
217
218
|
protected updateTitle(route: object): this;
|
|
218
219
|
/**
|
|
@@ -13,9 +13,9 @@ export class State extends SimpleData {
|
|
|
13
13
|
*
|
|
14
14
|
* @param {string} action
|
|
15
15
|
* @param {*} state
|
|
16
|
-
* @returns {
|
|
16
|
+
* @returns {this}
|
|
17
17
|
*/
|
|
18
|
-
addAction(action: string, state: any):
|
|
18
|
+
addAction(action: string, state: any): this;
|
|
19
19
|
/**
|
|
20
20
|
* This will get the state of an action.
|
|
21
21
|
*
|
|
@@ -30,8 +30,8 @@ export class State extends SimpleData {
|
|
|
30
30
|
*
|
|
31
31
|
* @param {string} action
|
|
32
32
|
* @param {string} [token]
|
|
33
|
-
* @returns {
|
|
33
|
+
* @returns {this}
|
|
34
34
|
*/
|
|
35
|
-
removeAction(action: string, token?: string):
|
|
35
|
+
removeAction(action: string, token?: string): this;
|
|
36
36
|
}
|
|
37
37
|
import { SimpleData } from '../data/data.js';
|