@base-framework/base 3.7.22 → 3.7.24

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.
@@ -9,6 +9,13 @@
9
9
  */
10
10
  export class Data extends BasicData {
11
11
  attributes: any;
12
+ /**
13
+ * Cached callbacks avoid allocating a new arrow function on every
14
+ * _publish / _deleteAttr call. Committer and event are read from
15
+ * instance properties set just before invoking Publisher.publish.
16
+ */
17
+ _publishCb: (path: any, obj: any) => void;
18
+ _deleteCb: (path: any, obj: any) => void;
12
19
  /**
13
20
  * This will set the attribute value.
14
21
  *
@@ -101,6 +108,8 @@ export class Data extends BasicData {
101
108
  * @returns {object} this
102
109
  */
103
110
  refresh(attr: string): object;
111
+ _pubCommitter: any;
112
+ _pubEvent: string;
104
113
  /**
105
114
  * This will publish an update on an attribute.
106
115
  *
@@ -125,5 +134,6 @@ export class Data extends BasicData {
125
134
  * @returns {void}
126
135
  */
127
136
  revert(): void;
137
+ _delCommitter: any;
128
138
  }
129
139
  import { BasicData } from '../basic-data.js';
@@ -106,13 +106,12 @@ export class DataPubSub {
106
106
  * In batching mode, updates are queued and flushed in a microtask.
107
107
  * Data operations remain synchronous; only DOM updates are batched.
108
108
  *
109
- * @overload
110
109
  * @param {string} msg
111
- * @param {string} value
110
+ * @param {*} value
112
111
  * @param {object} [committer]
113
112
  * @returns {void}
114
113
  */
115
- publish(msg: string, value: string, committer?: object): void;
114
+ publish(msg: string, value: any, committer?: object): void;
116
115
  /**
117
116
  * Schedule a flush in a microtask.
118
117
  * Ensures only one flush is scheduled at a time.
@@ -169,8 +168,9 @@ export class DataPubSub {
169
168
  * updates or break the flush cycle.
170
169
  *
171
170
  * @param {string} msg
172
- * @param {...any} args
171
+ * @param {*} value
172
+ * @param {object} [committer]
173
173
  * @returns {void}
174
174
  */
175
- publishImmediate(msg: string, ...args: any[]): void;
175
+ publishImmediate(msg: string, value: any, committer?: object): void;
176
176
  }
@@ -1,6 +1,5 @@
1
1
  export namespace Directives {
2
- let keys: Array<any>;
3
- let items: object;
2
+ let items: Map<string, Function>;
4
3
  /**
5
4
  * This will add a directive.
6
5
  *
@@ -13,13 +12,7 @@ export namespace Directives {
13
12
  * This will get a directive.
14
13
  *
15
14
  * @param {string} name
16
- * @returns {object|null}
15
+ * @returns {function|null}
17
16
  */
18
- function get(name: string): object | null;
19
- /**
20
- * This will get all directive names.
21
- *
22
- * @returns {Array<any>}
23
- */
24
- function all(): Array<any>;
17
+ function get(name: string): Function | null;
25
18
  }
@@ -1 +1 @@
1
- export function AttributeDirective(attr: string, directive: object): object;
1
+ export function AttributeDirective(attr: object, directive: Function): object;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/base",
3
- "version": "3.7.22",
3
+ "version": "3.7.24",
4
4
  "description": "This is a javascript framework.",
5
5
  "main": "./dist/base.js",
6
6
  "type": "module",