react-obsidian 0.0.44 → 0.0.46
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/src/graph/registry/GraphRegistry.js +1 -1
- package/dist/src/graph/registry/GraphRegistry.js.map +1 -1
- package/dist/src/observable/MediatorObservable.d.ts +2 -10
- package/dist/src/observable/MediatorObservable.d.ts.map +1 -1
- package/dist/src/observable/MediatorObservable.js +3 -33
- package/dist/src/observable/MediatorObservable.js.map +1 -1
- package/package.json +9 -8
- package/src/graph/registry/GraphRegistry.ts +2 -2
- package/src/observable/MediatorObservable.ts +3 -49
|
@@ -63,7 +63,7 @@ class GraphRegistry {
|
|
|
63
63
|
}
|
|
64
64
|
clear(graph) {
|
|
65
65
|
const Graph = this.instanceToConstructor.get(graph);
|
|
66
|
-
if (this.isSingleton(Graph))
|
|
66
|
+
if (!Graph || this.isSingleton(Graph))
|
|
67
67
|
return;
|
|
68
68
|
this.instanceToConstructor.delete(graph);
|
|
69
69
|
this.constructorToInstance.get(Graph).delete(graph);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphRegistry.js","sourceRoot":"","sources":["../../../../src/graph/registry/GraphRegistry.ts"],"names":[],"mappings":";;;;;;AAGA,kFAA0D;AAE1D,MAAa,aAAa;IAA1B;QACmB,0BAAqB,GAAG,IAAI,GAAG,EAAoC,CAAC;QACpE,0BAAqB,GAAG,IAAI,GAAG,EAA+B,CAAC;QAC/D,mBAAc,GAAG,IAAI,GAAG,EAAiB,CAAC;QAC1C,qBAAgB,GAAG,IAAI,GAAG,EAAmD,CAAC;QAC9E,qBAAgB,GAAG,IAAI,8BAAoB,EAAE,CAAC;IA2EjE,CAAC;IAzEC,QAAQ,CAAC,WAAiC,EAAE,YAAoC,EAAE;QAChF,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,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AAY;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;YAAE,OAAO;QAC9C,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACrD,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,kBAAkB,CAAC,UAA6B;QAC9C,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IAED,qBAAqB;QACnB,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;IAChC,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAC;QACnC,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAC;QACnC,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;CACF;AAhFD,sCAgFC;AAED,kBAAe,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { Observable } from './Observable';
|
|
2
|
-
import { OnNext
|
|
3
|
-
export declare class MediatorObservable<T>
|
|
4
|
-
private subscribers;
|
|
5
|
-
private currentValue;
|
|
6
|
-
private sources;
|
|
7
|
-
constructor(initialValue?: T);
|
|
2
|
+
import { OnNext } from './types';
|
|
3
|
+
export declare class MediatorObservable<T> extends Observable<T> {
|
|
8
4
|
addSource<S>(source: Observable<S>, onNext: OnNext<S>): MediatorObservable<T>;
|
|
9
|
-
get value(): T;
|
|
10
|
-
set value(value: T);
|
|
11
|
-
subscribe(onNext: OnNext<T>): Unsubscribe;
|
|
12
|
-
private subscribeToAllSources;
|
|
13
5
|
}
|
|
14
6
|
//# sourceMappingURL=MediatorObservable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediatorObservable.d.ts","sourceRoot":"","sources":["../../../src/observable/MediatorObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"MediatorObservable.d.ts","sourceRoot":"","sources":["../../../src/observable/MediatorObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,qBAAa,kBAAkB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IACtD,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC;CAI9E"}
|
|
@@ -1,42 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MediatorObservable = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
this.subscribers = new Set();
|
|
7
|
-
this.sources = [];
|
|
8
|
-
this.currentValue = initialValue;
|
|
9
|
-
}
|
|
4
|
+
const Observable_1 = require("./Observable");
|
|
5
|
+
class MediatorObservable extends Observable_1.Observable {
|
|
10
6
|
addSource(source, onNext) {
|
|
11
|
-
|
|
7
|
+
source.subscribe(onNext);
|
|
12
8
|
return this;
|
|
13
9
|
}
|
|
14
|
-
get value() {
|
|
15
|
-
return this.currentValue;
|
|
16
|
-
}
|
|
17
|
-
set value(value) {
|
|
18
|
-
this.currentValue = value;
|
|
19
|
-
this.subscribers.forEach((subscriber) => subscriber(value));
|
|
20
|
-
}
|
|
21
|
-
subscribe(onNext) {
|
|
22
|
-
if (this.subscribers.has(onNext)) {
|
|
23
|
-
throw new Error('Subscriber already subscribed');
|
|
24
|
-
}
|
|
25
|
-
this.subscribers.add(onNext);
|
|
26
|
-
this.subscribeToAllSources();
|
|
27
|
-
return () => {
|
|
28
|
-
this.subscribers.delete(onNext);
|
|
29
|
-
this.sources.forEach(({ unsubscribe }) => unsubscribe === null || unsubscribe === void 0 ? void 0 : unsubscribe());
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
subscribeToAllSources() {
|
|
33
|
-
this.sources.forEach(({ source, onNext }, index) => {
|
|
34
|
-
const unsubscribe = source.subscribe((value) => {
|
|
35
|
-
onNext(value);
|
|
36
|
-
});
|
|
37
|
-
this.sources[index].unsubscribe = unsubscribe;
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
10
|
}
|
|
41
11
|
exports.MediatorObservable = MediatorObservable;
|
|
42
12
|
//# sourceMappingURL=MediatorObservable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediatorObservable.js","sourceRoot":"","sources":["../../../src/observable/MediatorObservable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"MediatorObservable.js","sourceRoot":"","sources":["../../../src/observable/MediatorObservable.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAG1C,MAAa,kBAAsB,SAAQ,uBAAa;IACtD,SAAS,CAAI,MAAqB,EAAE,MAAiB;QACnD,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AALD,gDAKC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-obsidian",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"description": "Dependency injection framework for React and React Native applications",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepack": "npm run lint && tsc --project tsconfig.prod.json",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"@babel/preset-typescript": "7.18.x",
|
|
28
28
|
"@babel/types": "7.20.x",
|
|
29
29
|
"@johanblumenberg/ts-mockito": "1.x.x",
|
|
30
|
-
"@testing-library/react": "
|
|
30
|
+
"@testing-library/react": "14.x.x",
|
|
31
31
|
"@testing-library/react-hooks": "^7.0.2",
|
|
32
32
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
33
|
-
"@types/jest": "
|
|
33
|
+
"@types/jest": "29.5.x",
|
|
34
34
|
"@types/lodash": "^4.14.176",
|
|
35
|
-
"@types/react": "
|
|
36
|
-
"@types/react-dom": "
|
|
35
|
+
"@types/react": "18.2.x",
|
|
36
|
+
"@types/react-dom": "18.2.x",
|
|
37
37
|
"@types/react-test-renderer": "17.0.1",
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^5.3.0",
|
|
39
39
|
"@typescript-eslint/parser": "^5.3.0",
|
|
@@ -46,10 +46,11 @@
|
|
|
46
46
|
"eslint-plugin-react": "^7.26.1",
|
|
47
47
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
48
48
|
"eslint-plugin-unused-imports": "2.x.x",
|
|
49
|
-
"jest": "
|
|
49
|
+
"jest": "29.5.x",
|
|
50
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
50
51
|
"lodash": "^4.17.21",
|
|
51
|
-
"react": "
|
|
52
|
-
"react-dom": "
|
|
52
|
+
"react": "18.2.x",
|
|
53
|
+
"react-dom": "18.2.x",
|
|
53
54
|
"setimmediate": "^1.0.5",
|
|
54
55
|
"typescript": "^4.5.4"
|
|
55
56
|
},
|
|
@@ -63,8 +63,8 @@ export class GraphRegistry {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
clear(graph: Graph) {
|
|
66
|
-
const Graph = this.instanceToConstructor.get(graph)
|
|
67
|
-
if (this.isSingleton(Graph)) return;
|
|
66
|
+
const Graph = this.instanceToConstructor.get(graph);
|
|
67
|
+
if (!Graph || this.isSingleton(Graph)) return;
|
|
68
68
|
this.instanceToConstructor.delete(graph);
|
|
69
69
|
this.constructorToInstance.get(Graph)!.delete(graph);
|
|
70
70
|
this.nameToInstance.delete(graph.name);
|
|
@@ -1,55 +1,9 @@
|
|
|
1
1
|
import { Observable } from './Observable';
|
|
2
|
-
import { OnNext
|
|
3
|
-
|
|
4
|
-
type Source<T> = {
|
|
5
|
-
source: Observable<T>;
|
|
6
|
-
onNext: OnNext<T>;
|
|
7
|
-
unsubscribe?: Unsubscribe;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export class MediatorObservable<T> implements IObservable<T> {
|
|
11
|
-
private subscribers: Set<OnNext<T>> = new Set();
|
|
12
|
-
private currentValue!: T;
|
|
13
|
-
private sources: Source<any>[] = [];
|
|
14
|
-
|
|
15
|
-
constructor(initialValue?: T) {
|
|
16
|
-
this.currentValue = initialValue as T;
|
|
17
|
-
}
|
|
2
|
+
import { OnNext } from './types';
|
|
18
3
|
|
|
4
|
+
export class MediatorObservable<T> extends Observable<T> {
|
|
19
5
|
addSource<S>(source: Observable<S>, onNext: OnNext<S>): MediatorObservable<T> {
|
|
20
|
-
|
|
6
|
+
source.subscribe(onNext);
|
|
21
7
|
return this;
|
|
22
8
|
}
|
|
23
|
-
|
|
24
|
-
public get value(): T {
|
|
25
|
-
return this.currentValue;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
public set value(value: T) {
|
|
29
|
-
this.currentValue = value;
|
|
30
|
-
this.subscribers.forEach((subscriber) => subscriber(value));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
subscribe(onNext: OnNext<T>): Unsubscribe {
|
|
34
|
-
if (this.subscribers.has(onNext)) {
|
|
35
|
-
throw new Error('Subscriber already subscribed');
|
|
36
|
-
}
|
|
37
|
-
this.subscribers.add(onNext);
|
|
38
|
-
|
|
39
|
-
this.subscribeToAllSources();
|
|
40
|
-
|
|
41
|
-
return () => {
|
|
42
|
-
this.subscribers.delete(onNext);
|
|
43
|
-
this.sources.forEach(({ unsubscribe }) => unsubscribe?.());
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
private subscribeToAllSources() {
|
|
48
|
-
this.sources.forEach(({ source, onNext }, index) => {
|
|
49
|
-
const unsubscribe = source.subscribe((value) => {
|
|
50
|
-
onNext(value);
|
|
51
|
-
});
|
|
52
|
-
this.sources[index].unsubscribe = unsubscribe;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
9
|
}
|