@base-framework/base 3.0.262 → 3.0.264

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.
@@ -6,40 +6,40 @@ export namespace EventMethods {
6
6
  * @param {string} event The event name.
7
7
  * @param {object} obj
8
8
  * @param {function} fn
9
- * @param {boolean} [capture]
9
+ * @param {boolean|object} [capture]
10
10
  * @returns {object}
11
11
  */
12
- export function addListener(event: string, obj: object, fn: Function, capture?: boolean): object;
12
+ export function addListener(event: string, obj: object, fn: Function, capture?: boolean | object): object;
13
13
  /**
14
14
  * This will add an event to an object.
15
15
  *
16
- * @param {string} event The event name.
16
+ * @param {string|array} event The event name.
17
17
  * @param {object} obj
18
18
  * @param {function} fn
19
- * @param {boolean} [capture]
19
+ * @param {boolean|object} [capture]
20
20
  * @returns {object}
21
21
  */
22
- export function on(event: string, obj: object, fn: Function, capture?: boolean): object;
22
+ export function on(event: string | any[], obj: object, fn: Function, capture?: boolean | object): object;
23
23
  /**
24
24
  * This will remove an event from an object.
25
25
  *
26
- * @param {string} event The event name.
26
+ * @param {string|array} event The event name.
27
27
  * @param {object} obj
28
28
  * @param {function} fn
29
- * @param {boolean} [capture]
29
+ * @param {boolean|object} [capture]
30
30
  * @returns {object}
31
31
  */
32
- export function off(event: string, obj: object, fn: Function, capture?: boolean): object;
32
+ export function off(event: string | any[], obj: object, fn: Function, capture?: boolean | object): object;
33
33
  /**
34
34
  * This will remove an event from an object.
35
35
  *
36
36
  * @param {string} event The event name.
37
37
  * @param {object} obj
38
38
  * @param {function} fn
39
- * @param {boolean} [capture]
39
+ * @param {boolean|object} [capture]
40
40
  * @returns {object}
41
41
  */
42
- export function removeListener(event: string, obj: object, fn: Function, capture?: boolean): object;
42
+ export function removeListener(event: string, obj: object, fn: Function, capture?: boolean | object): object;
43
43
  /**
44
44
  * This will create a custom event.
45
45
  *
@@ -93,19 +93,19 @@ export namespace EventMethods {
93
93
  * @param {function} callBackFn
94
94
  * @param {object} [obj]
95
95
  * @param {boolean} [cancelDefault]
96
- * @param {boolean} [capture]
96
+ * @param {boolean|object} [capture]
97
97
  * @returns {object} base object.
98
98
  */
99
- export function onMouseWheel(callBackFn: Function, obj?: object, cancelDefault?: boolean, capture?: boolean): object;
99
+ export function onMouseWheel(callBackFn: Function, obj?: object, cancelDefault?: boolean, capture?: boolean | object): object;
100
100
  /**
101
101
  * This will remove a mouse event
102
102
  *
103
103
  * @param {function} callBackFn
104
104
  * @param {object} [obj]
105
- * @param {boolean} [capture]
105
+ * @param {boolean|object} [capture]
106
106
  * @returns {object} base object.
107
107
  */
108
- export function offMouseWheel(callBackFn: Function, obj?: object, capture?: boolean): object;
108
+ export function offMouseWheel(callBackFn: Function, obj?: object, capture?: boolean | object): object;
109
109
  /**
110
110
  * This will prevent default on an event.
111
111
  *
@@ -12,32 +12,32 @@ export namespace Events {
12
12
  * @param {string} event The event name.
13
13
  * @param {object} obj
14
14
  * @param {function} fn
15
- * @param {boolean} [capture]
15
+ * @param {boolean|object} [capture]
16
16
  * @param {boolean} [swapped]
17
17
  * @param {function} [originalFn]
18
18
  * @returns {object}
19
19
  */
20
- function create(event: string, obj: object, fn: Function, capture?: boolean, swapped?: boolean, originalFn?: Function): object;
20
+ function create(event: string, obj: object, fn: Function, capture?: boolean | object, swapped?: boolean, originalFn?: Function): object;
21
21
  /**
22
22
  * This will add an event to an object.
23
23
  *
24
24
  * @param {string|array} event The event name.
25
25
  * @param {object} obj
26
26
  * @param {function} fn
27
- * @param {boolean} [capture]
27
+ * @param {boolean|object} [capture]
28
28
  * @returns {object} The events object.
29
29
  */
30
- function on(event: string | any[], obj: object, fn: Function, capture?: boolean): object;
30
+ function on(event: string | any[], obj: object, fn: Function, capture?: boolean | object): object;
31
31
  /**
32
32
  * This will remove an event from an object.
33
33
  *
34
34
  * @param {string|array} event The event name.
35
35
  * @param {object} obj
36
36
  * @param {function} fn
37
- * @param {boolean} [capture]
37
+ * @param {boolean|object} [capture]
38
38
  * @returns {object} The events object.
39
39
  */
40
- function off(event: string | any[], obj: object, fn: Function, capture?: boolean): object;
40
+ function off(event: string | any[], obj: object, fn: Function, capture?: boolean | object): object;
41
41
  /**
42
42
  * This will add an event to an object.
43
43
  *
@@ -47,108 +47,9 @@ export namespace Events {
47
47
  * @param {object|boolean} [capture]
48
48
  * @param {boolean} [swapped]
49
49
  * @param {function} [originalFn]
50
+ * @returns {object} The events object.
50
51
  */
51
- function add(event: string, obj: object, fn: Function, capture?: object | boolean, swapped?: boolean, originalFn?: Function): {
52
- /**
53
- * This will get the events on an element.
54
- *
55
- * @param {object} obj
56
- * @returns {array}
57
- */
58
- getEvents(obj: object): any[];
59
- /**
60
- * This will create an object to use with the dataTracker.
61
- *
62
- * @param {string} event The event name.
63
- * @param {object} obj
64
- * @param {function} fn
65
- * @param {boolean} [capture]
66
- * @param {boolean} [swapped]
67
- * @param {function} [originalFn]
68
- * @returns {object}
69
- */
70
- create(event: string, obj: object, fn: Function, capture?: boolean, swapped?: boolean, originalFn?: Function): object;
71
- /**
72
- * This will add an event to an object.
73
- *
74
- * @param {string|array} event The event name.
75
- * @param {object} obj
76
- * @param {function} fn
77
- * @param {boolean} [capture]
78
- * @returns {object} The events object.
79
- */
80
- on(event: string | any[], obj: object, fn: Function, capture?: boolean): object;
81
- /**
82
- * This will remove an event from an object.
83
- *
84
- * @param {string|array} event The event name.
85
- * @param {object} obj
86
- * @param {function} fn
87
- * @param {boolean} [capture]
88
- * @returns {object} The events object.
89
- */
90
- off(event: string | any[], obj: object, fn: Function, capture?: boolean): object;
91
- add(event: string, obj: object, fn: Function, capture?: object | boolean, swapped?: boolean, originalFn?: Function): /*elided*/ any;
92
- /**
93
- * This will remove an event from an object.
94
- *
95
- * @param {string} event The event name.
96
- * @param {object} obj
97
- * @param {function} fn
98
- * @param {object|boolean} [capture]
99
- * @returns {object} a reference to the event object.
100
- */
101
- remove(event: string, obj: object, fn: Function, capture?: object | boolean): object;
102
- /**
103
- * This will remove an event listener.
104
- * @param {object} listener
105
- * @returns {object} a reference to the event object.
106
- */
107
- removeEvent(listener: object): object;
108
- /**
109
- * This will search for an event.
110
- *
111
- * @protected
112
- * @param {string} event The event name.
113
- * @param {object} obj
114
- * @param {function} fn
115
- * @param {boolean} [capture]
116
- * @returns {object|boolean}
117
- */
118
- getEvent(event: string, obj: object, fn: Function, capture?: boolean): object | boolean;
119
- /**
120
- * This will search for an event from the object events.
121
- *
122
- * @param {object} eventObj
123
- * @param {array} events
124
- * @returns {object|boolean}
125
- */
126
- search(eventObj: object, events: any[]): object | boolean;
127
- /**
128
- * This will remove all events on an object.
129
- *
130
- * @param {object} obj
131
- * @returns {object} a reference to the events object.
132
- */
133
- removeEvents(obj: object): object;
134
- /**
135
- * @member {array} swap The swappable events.
136
- */
137
- swap: string[];
138
- /**
139
- * This will a event type to the swappable array.
140
- *
141
- * @param {string} type
142
- */
143
- addSwapped(type: string): void;
144
- /**
145
- * This will check if an event is swappable.
146
- *
147
- * @param {string} event
148
- * @returns {boolean}
149
- */
150
- isSwappable(event: string): boolean;
151
- };
52
+ function add(event: string, obj: object, fn: Function, capture?: object | boolean, swapped?: boolean, originalFn?: Function): object;
152
53
  /**
153
54
  * This will remove an event from an object.
154
55
  *
@@ -172,10 +73,10 @@ export namespace Events {
172
73
  * @param {string} event The event name.
173
74
  * @param {object} obj
174
75
  * @param {function} fn
175
- * @param {boolean} [capture]
76
+ * @param {boolean|object} [capture]
176
77
  * @returns {object|boolean}
177
78
  */
178
- function getEvent(event: string, obj: object, fn: Function, capture?: boolean): object | boolean;
79
+ function getEvent(event: string, obj: object, fn: Function, capture?: boolean | object): object | boolean;
179
80
  /**
180
81
  * This will search for an event from the object events.
181
82
  *
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * @overload
5
5
  * @param {string} url
6
- * @param {string} params
7
- * @param {function} callBackFn
8
- * @param {string} responseType
6
+ * @param {string} [params]
7
+ * @param {function} [callBackFn]
8
+ * @param {string} [responseType]
9
9
  * @param {string} [method=POST]
10
10
  * @param {boolean} [async]
11
11
  *
@@ -23,15 +23,15 @@
23
23
  *
24
24
  * @returns {object} xhr object.
25
25
  */
26
- export function Ajax(url: string, params: string, callBackFn: Function, responseType: string, method?: string, async?: boolean): any;
26
+ export function Ajax(url: string, params?: string, callBackFn?: Function, responseType?: string, method?: string, async?: boolean): any;
27
27
  /**
28
28
  * This will make an xhr (ajax) request.
29
29
  *
30
30
  * @overload
31
31
  * @param {string} url
32
- * @param {string} params
33
- * @param {function} callBackFn
34
- * @param {string} responseType
32
+ * @param {string} [params]
33
+ * @param {function} [callBackFn]
34
+ * @param {string} [responseType]
35
35
  * @param {string} [method=POST]
36
36
  * @param {boolean} [async]
37
37
  *
@@ -1,6 +1,2 @@
1
- export function Jot(layout: object | Function, extend?: Function): ComponentConstructor | null;
2
- /**
3
- * A class constructor that, when instantiated, yields a Component (or subclass).
4
- */
5
- export type ComponentConstructor = new (...args: any[]) => Component;
1
+ export function Jot(layout: object | Function, extend?: typeof Component): typeof Component | null;
6
2
  import { Component } from './component.js';
@@ -8,4 +8,4 @@
8
8
  * @param {object} props
9
9
  * @returns {Constructor}
10
10
  */
11
- export const ImportWrapper: import("../component/jot.js").ComponentConstructor;
11
+ export const ImportWrapper: typeof import("../component/component.js").Component;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/base",
3
- "version": "3.0.262",
3
+ "version": "3.0.264",
4
4
  "description": "This is a javascript framework.",
5
5
  "main": "./dist/base.js",
6
6
  "type": "module",