entropic-bond 1.53.17 → 1.53.19
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/lib/entropic-bond.js +25 -24
- package/lib/entropic-bond.js.map +1 -1
- package/lib/entropic-bond.umd.cjs +2 -2
- package/lib/entropic-bond.umd.cjs.map +1 -1
- package/lib/store/data-source.d.ts +2 -1
- package/lib/store/json-data-source.d.ts +2 -2
- package/lib/store/model.d.ts +2 -2
- package/package.json +3 -3
|
@@ -60,6 +60,7 @@ export interface DocumentChangeListenerHandler {
|
|
|
60
60
|
nativeHandler: unknown;
|
|
61
61
|
collectionPath: string;
|
|
62
62
|
}
|
|
63
|
+
export type CollectionChangeListener<T extends Persistent | DocumentObject> = (changes: DocumentChange<T>[]) => void;
|
|
63
64
|
type CachedPropsUpdateCallback = (doc: Persistent, prop: PersistentProperty) => void;
|
|
64
65
|
export interface CachedPropsUpdaterConfig {
|
|
65
66
|
onUpdate?: CachedPropsUpdateCallback;
|
|
@@ -148,7 +149,7 @@ export declare abstract class DataSource {
|
|
|
148
149
|
* @see QueryObject
|
|
149
150
|
*/
|
|
150
151
|
abstract count(queryObject: QueryObject<DocumentObject>, collectionName: string): Promise<number>;
|
|
151
|
-
abstract onCollectionChange(query: QueryObject<DocumentObject>, collectionName: string, listener:
|
|
152
|
+
abstract onCollectionChange(query: QueryObject<DocumentObject>, collectionName: string, listener: CollectionChangeListener<DocumentObject>): Unsubscriber;
|
|
152
153
|
abstract onDocumentChange(documentPath: string, documentId: string, listener: DocumentChangeListener<DocumentObject>): Unsubscriber;
|
|
153
154
|
/**
|
|
154
155
|
* Utility method to convert a query object to a property path query object
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Unsubscriber } from '../observable/observable';
|
|
2
2
|
import { Collections, Persistent, PersistentObject } from '../persistent/persistent';
|
|
3
|
-
import { DataSource, DocumentChangeListener, DocumentChangeListenerHandler, DocumentObject, QueryObject } from './data-source';
|
|
3
|
+
import { CollectionChangeListener, DataSource, DocumentChangeListener, DocumentChangeListenerHandler, DocumentObject, QueryObject } from './data-source';
|
|
4
4
|
export interface JsonRawData {
|
|
5
5
|
[collection: string]: {
|
|
6
6
|
[documentId: string]: PersistentObject<Persistent>;
|
|
@@ -41,7 +41,7 @@ export declare class JsonDataSource extends DataSource {
|
|
|
41
41
|
delete(id: string, collectionName: string): Promise<void>;
|
|
42
42
|
next(limit?: number): Promise<DocumentObject[]>;
|
|
43
43
|
count(queryObject: QueryObject<DocumentObject>, collectionName: string): Promise<number>;
|
|
44
|
-
onCollectionChange(query: QueryObject<DocumentObject>, collectionName: string, listener:
|
|
44
|
+
onCollectionChange(query: QueryObject<DocumentObject>, collectionName: string, listener: CollectionChangeListener<DocumentObject>): Unsubscriber;
|
|
45
45
|
onDocumentChange(collectionName: string, documentId: string, listener: DocumentChangeListener<DocumentObject>): Unsubscriber;
|
|
46
46
|
/**
|
|
47
47
|
* @returns the raw data store data as a JSON object
|
package/lib/store/model.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Unsubscriber } from '../observable/observable';
|
|
2
2
|
import { Persistent } from '../persistent/persistent';
|
|
3
3
|
import { ClassPropNames, PropPath, PropPathType } from '../types/utility-types';
|
|
4
|
-
import { DataSource, QueryOperator, QueryObject, QueryOrder, DocumentChangeListener } from './data-source';
|
|
4
|
+
import { DataSource, QueryOperator, QueryObject, QueryOrder, DocumentChangeListener, CollectionChangeListener } from './data-source';
|
|
5
5
|
/**
|
|
6
6
|
* Provides abstraction to the database access. You should gain access to a Model
|
|
7
7
|
* object through the Store.getModel method instead of its constructor.
|
|
@@ -62,7 +62,7 @@ export declare class Model<T extends Persistent> {
|
|
|
62
62
|
*/
|
|
63
63
|
next<U extends T>(limit?: number): Promise<U[]>;
|
|
64
64
|
onDocumentChange(documentId: string, listener: DocumentChangeListener<T>): Unsubscriber;
|
|
65
|
-
onCollectionChange(query: Query<T>, listener:
|
|
65
|
+
onCollectionChange(query: Query<T>, listener: CollectionChangeListener<T>): Unsubscriber;
|
|
66
66
|
private toPersistentChangeObject;
|
|
67
67
|
private mapToInstance;
|
|
68
68
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "entropic-bond",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.53.
|
|
4
|
+
"version": "1.53.19",
|
|
5
5
|
"description": "Tidy up your messy components",
|
|
6
6
|
"main": "./lib/entropic-bond.umd.cjs",
|
|
7
7
|
"module": "./lib/entropic-bond.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@semantic-release/changelog": "^6.0.3",
|
|
60
60
|
"@semantic-release/git": "^10.0.1",
|
|
61
61
|
"@type-challenges/utils": "^0.1.1",
|
|
62
|
-
"@types/node": "^25.0.
|
|
62
|
+
"@types/node": "^25.0.3",
|
|
63
63
|
"@types/uuid": "^10.0.0",
|
|
64
64
|
"git-branch-is": "^4.0.0",
|
|
65
65
|
"husky": "^9.1.7",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
69
69
|
"typescript": "^5.9.3",
|
|
70
70
|
"vite-plugin-dts": "^4.5.4",
|
|
71
|
-
"vitest": "^4.0.
|
|
71
|
+
"vitest": "^4.0.16"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"uuid": "^13.0.0"
|