react-rx 1.0.1 → 2.0.0

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.
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="TypeScriptCompiler">
4
- <option name="showAllErrors" value="true" />
4
+ <option name="nodeInterpreterTextField" value="node" />
5
5
  </component>
6
6
  </project>
@@ -1,6 +1,7 @@
1
1
  <component name="InspectionProjectProfileManager">
2
2
  <profile version="1.0">
3
3
  <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
4
5
  <inspection_tool class="TypescriptExplicitMemberType" enabled="false" level="INFORMATION" enabled_by_default="false" />
5
6
  </profile>
6
7
  </component>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="MarkdownSettings">
4
+ <enabledExtensions>
5
+ <entry key="MermaidLanguageExtension" value="false" />
6
+ <entry key="PlantUMLLanguageExtension" value="false" />
7
+ </enabledExtensions>
8
+ </component>
9
+ </project>
package/.idea/misc.xml CHANGED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="JavaScriptSettings">
4
- <option name="languageLevel" value="ES6" />
5
- </component>
6
- </project>
@@ -8,6 +8,6 @@ var getDisplayName = function (Component) {
8
8
  return (Component && (Component.displayName || Component.name)) || 'Unknown';
9
9
  };
10
10
  var wrapDisplayName = function (BaseComponent, wrapperName) {
11
- return wrapperName + "(" + getDisplayName(BaseComponent) + ")";
11
+ return "".concat(wrapperName, "(").concat(getDisplayName(BaseComponent), ")");
12
12
  };
13
13
  exports.wrapDisplayName = wrapDisplayName;
@@ -5,27 +5,19 @@ var rxjs_1 = require("rxjs");
5
5
  var react_1 = require("react");
6
6
  var useIsomorphicEffect_1 = require("./useIsomorphicEffect");
7
7
  function useAsObservable(value, operator) {
8
- var isInitial = (0, react_1.useRef)(true);
9
- var subjectRef = (0, react_1.useRef)(new rxjs_1.BehaviorSubject(value));
10
- var observableRef = (0, react_1.useRef)();
11
- if (!observableRef.current) {
12
- var observable = subjectRef.current.asObservable();
13
- observableRef.current = operator ? observable.pipe(operator) : observable;
14
- }
8
+ var _a = (0, react_1.useMemo)(function () {
9
+ var subject = new rxjs_1.BehaviorSubject(value);
10
+ var observable = subject.asObservable();
11
+ return [operator ? observable.pipe(operator) : observable, subject];
12
+ }, []), observable = _a[0], subject = _a[1];
15
13
  (0, useIsomorphicEffect_1.useIsomorphicEffect)(function () {
16
- if (isInitial.current) {
17
- isInitial.current = false;
18
- }
19
- else {
20
- // emit only on update
21
- subjectRef.current.next(value);
22
- }
14
+ subject.next(value);
23
15
  }, [value]);
24
- (0, useIsomorphicEffect_1.useIsomorphicEffect)(function () {
16
+ (0, react_1.useEffect)(function () {
25
17
  return function () {
26
- return subjectRef.current.complete();
18
+ subject.complete();
27
19
  };
28
20
  }, []);
29
- return observableRef.current;
21
+ return observable;
30
22
  }
31
23
  exports.useAsObservable = useAsObservable;
@@ -1,42 +1,37 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useMemoObservable = exports.useObservable = void 0;
4
+ var rxjs_1 = require("rxjs");
4
5
  var react_1 = require("react");
5
- var useIsomorphicEffect_1 = require("./useIsomorphicEffect");
6
+ var useAsObservable_1 = require("./useAsObservable");
7
+ var operators_1 = require("rxjs/operators");
8
+ var shim_1 = require("use-sync-external-store/shim");
6
9
  function getValue(value) {
7
10
  return typeof value === 'function' ? value() : value;
8
11
  }
9
- function useObservable(observable, initialValue) {
10
- var subscription = (0, react_1.useRef)();
11
- var isInitial = (0, react_1.useRef)(true);
12
- var _a = (0, react_1.useState)(function () {
13
- var isSync = true;
14
- var syncVal = getValue(initialValue);
15
- subscription.current = observable.subscribe(function (nextVal) {
16
- if (isSync) {
17
- syncVal = nextVal;
18
- }
19
- else {
20
- setState(nextVal);
21
- }
22
- });
23
- isSync = false;
24
- return syncVal;
25
- }), value = _a[0], setState = _a[1];
26
- (0, useIsomorphicEffect_1.useIsomorphicEffect)(function () {
27
- // when the observable changes after initial (possibly sync render)
28
- if (!isInitial.current) {
29
- subscription.current = observable.subscribe(function (nextVal) { return setState(nextVal); });
30
- }
31
- isInitial.current = false;
32
- return function () {
33
- if (subscription.current) {
34
- subscription.current.unsubscribe();
35
- subscription.current = undefined;
36
- }
12
+ function useObservableSubscription(observable) {
13
+ var store = (0, react_1.useMemo)(function () {
14
+ var currentValue;
15
+ return {
16
+ // Note: this works because the given observable always emits a value synchronously by concat-ing the given initialValue
17
+ getCurrentValue: function () { return currentValue; },
18
+ subscribe: function (callback) {
19
+ var subscription = observable.subscribe(function (value) {
20
+ currentValue = value;
21
+ callback(value);
22
+ });
23
+ return function () {
24
+ subscription.unsubscribe();
25
+ };
26
+ },
37
27
  };
38
28
  }, [observable]);
39
- return value;
29
+ return (0, shim_1.useSyncExternalStore)(store.subscribe, store.getCurrentValue);
30
+ }
31
+ function useObservable(observable, initialValue) {
32
+ return useObservableSubscription((0, useAsObservable_1.useAsObservable)(observable, (0, rxjs_1.pipe)((0, operators_1.distinctUntilChanged)(), (0, operators_1.switchMap)(function (observable) {
33
+ return (0, rxjs_1.merge)((0, rxjs_1.defer)(function () { return (0, rxjs_1.of)(getValue(initialValue)); }), observable);
34
+ }))));
40
35
  }
41
36
  exports.useObservable = useObservable;
42
37
  function useMemoObservable(observableOrFactory, deps, initialValue) {
@@ -12,7 +12,11 @@ var __assign = (this && this.__assign) || function () {
12
12
  };
13
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
14
  if (k2 === undefined) k2 = k;
15
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
16
20
  }) : (function(o, m, k, k2) {
17
21
  if (k2 === undefined) k2 = k;
18
22
  o[k2] = m[k];
@@ -1,27 +1,19 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
- import { useRef } from 'react';
2
+ import { useEffect, useMemo } from 'react';
3
3
  import { useIsomorphicEffect } from './useIsomorphicEffect';
4
4
  export function useAsObservable(value, operator) {
5
- const isInitial = useRef(true);
6
- const subjectRef = useRef(new BehaviorSubject(value));
7
- const observableRef = useRef();
8
- if (!observableRef.current) {
9
- const observable = subjectRef.current.asObservable();
10
- observableRef.current = operator ? observable.pipe(operator) : observable;
11
- }
5
+ const [observable, subject] = useMemo(() => {
6
+ const subject = new BehaviorSubject(value);
7
+ const observable = subject.asObservable();
8
+ return [operator ? observable.pipe(operator) : observable, subject];
9
+ }, []);
12
10
  useIsomorphicEffect(() => {
13
- if (isInitial.current) {
14
- isInitial.current = false;
15
- }
16
- else {
17
- // emit only on update
18
- subjectRef.current.next(value);
19
- }
11
+ subject.next(value);
20
12
  }, [value]);
21
- useIsomorphicEffect(() => {
13
+ useEffect(() => {
22
14
  return () => {
23
- return subjectRef.current.complete();
15
+ subject.complete();
24
16
  };
25
17
  }, []);
26
- return observableRef.current;
18
+ return observable;
27
19
  }
@@ -1,39 +1,32 @@
1
- import { useMemo, useRef, useState } from 'react';
2
- import { useIsomorphicEffect } from './useIsomorphicEffect';
1
+ import { defer, merge, of, pipe } from 'rxjs';
2
+ import { useMemo } from 'react';
3
+ import { useAsObservable } from './useAsObservable';
4
+ import { distinctUntilChanged, switchMap } from 'rxjs/operators';
5
+ import { useSyncExternalStore } from 'use-sync-external-store/shim';
3
6
  function getValue(value) {
4
7
  return typeof value === 'function' ? value() : value;
5
8
  }
6
- export function useObservable(observable, initialValue) {
7
- const subscription = useRef();
8
- const isInitial = useRef(true);
9
- const [value, setState] = useState(() => {
10
- let isSync = true;
11
- let syncVal = getValue(initialValue);
12
- subscription.current = observable.subscribe(nextVal => {
13
- if (isSync) {
14
- syncVal = nextVal;
15
- }
16
- else {
17
- setState(nextVal);
18
- }
19
- });
20
- isSync = false;
21
- return syncVal;
22
- });
23
- useIsomorphicEffect(() => {
24
- // when the observable changes after initial (possibly sync render)
25
- if (!isInitial.current) {
26
- subscription.current = observable.subscribe(nextVal => setState(nextVal));
27
- }
28
- isInitial.current = false;
29
- return () => {
30
- if (subscription.current) {
31
- subscription.current.unsubscribe();
32
- subscription.current = undefined;
33
- }
9
+ function useObservableSubscription(observable) {
10
+ const store = useMemo(() => {
11
+ let currentValue;
12
+ return {
13
+ // Note: this works because the given observable always emits a value synchronously by concat-ing the given initialValue
14
+ getCurrentValue: () => currentValue,
15
+ subscribe: (callback) => {
16
+ const subscription = observable.subscribe(value => {
17
+ currentValue = value;
18
+ callback(value);
19
+ });
20
+ return () => {
21
+ subscription.unsubscribe();
22
+ };
23
+ },
34
24
  };
35
25
  }, [observable]);
36
- return value;
26
+ return useSyncExternalStore(store.subscribe, store.getCurrentValue);
27
+ }
28
+ export function useObservable(observable, initialValue) {
29
+ return useObservableSubscription(useAsObservable(observable, pipe(distinctUntilChanged(), switchMap(observable => merge(defer(() => of(getValue(initialValue))), observable)))));
37
30
  }
38
31
  export function useMemoObservable(observableOrFactory, deps, initialValue) {
39
32
  return useObservable(useMemo(() => getValue(observableOrFactory), deps), initialValue);
@@ -5,5 +5,5 @@ var getDisplayName = function (Component) {
5
5
  return (Component && (Component.displayName || Component.name)) || 'Unknown';
6
6
  };
7
7
  export var wrapDisplayName = function (BaseComponent, wrapperName) {
8
- return wrapperName + "(" + getDisplayName(BaseComponent) + ")";
8
+ return "".concat(wrapperName, "(").concat(getDisplayName(BaseComponent), ")");
9
9
  };
@@ -1,27 +1,19 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
- import { useRef } from 'react';
2
+ import { useEffect, useMemo } from 'react';
3
3
  import { useIsomorphicEffect } from './useIsomorphicEffect';
4
4
  export function useAsObservable(value, operator) {
5
- var isInitial = useRef(true);
6
- var subjectRef = useRef(new BehaviorSubject(value));
7
- var observableRef = useRef();
8
- if (!observableRef.current) {
9
- var observable = subjectRef.current.asObservable();
10
- observableRef.current = operator ? observable.pipe(operator) : observable;
11
- }
5
+ var _a = useMemo(function () {
6
+ var subject = new BehaviorSubject(value);
7
+ var observable = subject.asObservable();
8
+ return [operator ? observable.pipe(operator) : observable, subject];
9
+ }, []), observable = _a[0], subject = _a[1];
12
10
  useIsomorphicEffect(function () {
13
- if (isInitial.current) {
14
- isInitial.current = false;
15
- }
16
- else {
17
- // emit only on update
18
- subjectRef.current.next(value);
19
- }
11
+ subject.next(value);
20
12
  }, [value]);
21
- useIsomorphicEffect(function () {
13
+ useEffect(function () {
22
14
  return function () {
23
- return subjectRef.current.complete();
15
+ subject.complete();
24
16
  };
25
17
  }, []);
26
- return observableRef.current;
18
+ return observable;
27
19
  }
@@ -1,39 +1,34 @@
1
- import { useMemo, useRef, useState } from 'react';
2
- import { useIsomorphicEffect } from './useIsomorphicEffect';
1
+ import { defer, merge, of, pipe } from 'rxjs';
2
+ import { useMemo } from 'react';
3
+ import { useAsObservable } from './useAsObservable';
4
+ import { distinctUntilChanged, switchMap } from 'rxjs/operators';
5
+ import { useSyncExternalStore } from 'use-sync-external-store/shim';
3
6
  function getValue(value) {
4
7
  return typeof value === 'function' ? value() : value;
5
8
  }
6
- export function useObservable(observable, initialValue) {
7
- var subscription = useRef();
8
- var isInitial = useRef(true);
9
- var _a = useState(function () {
10
- var isSync = true;
11
- var syncVal = getValue(initialValue);
12
- subscription.current = observable.subscribe(function (nextVal) {
13
- if (isSync) {
14
- syncVal = nextVal;
15
- }
16
- else {
17
- setState(nextVal);
18
- }
19
- });
20
- isSync = false;
21
- return syncVal;
22
- }), value = _a[0], setState = _a[1];
23
- useIsomorphicEffect(function () {
24
- // when the observable changes after initial (possibly sync render)
25
- if (!isInitial.current) {
26
- subscription.current = observable.subscribe(function (nextVal) { return setState(nextVal); });
27
- }
28
- isInitial.current = false;
29
- return function () {
30
- if (subscription.current) {
31
- subscription.current.unsubscribe();
32
- subscription.current = undefined;
33
- }
9
+ function useObservableSubscription(observable) {
10
+ var store = useMemo(function () {
11
+ var currentValue;
12
+ return {
13
+ // Note: this works because the given observable always emits a value synchronously by concat-ing the given initialValue
14
+ getCurrentValue: function () { return currentValue; },
15
+ subscribe: function (callback) {
16
+ var subscription = observable.subscribe(function (value) {
17
+ currentValue = value;
18
+ callback(value);
19
+ });
20
+ return function () {
21
+ subscription.unsubscribe();
22
+ };
23
+ },
34
24
  };
35
25
  }, [observable]);
36
- return value;
26
+ return useSyncExternalStore(store.subscribe, store.getCurrentValue);
27
+ }
28
+ export function useObservable(observable, initialValue) {
29
+ return useObservableSubscription(useAsObservable(observable, pipe(distinctUntilChanged(), switchMap(function (observable) {
30
+ return merge(defer(function () { return of(getValue(initialValue)); }), observable);
31
+ }))));
37
32
  }
38
33
  export function useMemoObservable(observableOrFactory, deps, initialValue) {
39
34
  return useObservable(useMemo(function () { return getValue(observableOrFactory); }, deps), initialValue);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-rx",
3
- "version": "1.0.1",
3
+ "version": "2.0.0",
4
4
  "description": "React + RxJS = <3",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "observable-callback": "^1.0.1"
26
26
  },
27
27
  "peerDependencies": {
28
- "react": "^16.8 || ^17",
28
+ "react": "^16.8 || ^17 || ^18",
29
29
  "rxjs": "^6.5 || ^7"
30
30
  },
31
31
  "devDependencies": {
@@ -35,6 +35,7 @@
35
35
  "@types/jest": "^26.0.20",
36
36
  "@types/react": "^17.0.2",
37
37
  "@types/react-dom": "^17.0.1",
38
+ "@types/use-sync-external-store": "^0.0.3",
38
39
  "@typescript-eslint/eslint-plugin": "^4.15.2",
39
40
  "@typescript-eslint/parser": "^4.15.2",
40
41
  "eslint": "^7.21.0",
@@ -48,6 +49,7 @@
48
49
  "react": "^17.0.1",
49
50
  "react-dom": "^17.0.1",
50
51
  "react-test-renderer": "^17.0.1",
52
+ "use-sync-external-store": "^1.2.0",
51
53
  "rimraf": "^3.0.2",
52
54
  "rxjs": "^6.5.5",
53
55
  "ts-jest": "^26.5.2",
@@ -1,5 +1,5 @@
1
- import {BehaviorSubject, Observable, Subject} from 'rxjs'
2
- import {useRef} from 'react'
1
+ import {BehaviorSubject, Observable} from 'rxjs'
2
+ import {useEffect, useMemo} from 'react'
3
3
  import {useIsomorphicEffect} from './useIsomorphicEffect'
4
4
 
5
5
  /**
@@ -17,27 +17,22 @@ export function useAsObservable<T, K = T>(
17
17
  value: T,
18
18
  operator?: (input: Observable<T>) => Observable<K>,
19
19
  ): Observable<T | K> {
20
- const isInitial = useRef(true)
21
- const subjectRef = useRef<Subject<T>>(new BehaviorSubject(value))
22
- const observableRef = useRef<Observable<T | K>>()
23
- if (!observableRef.current) {
24
- const observable = subjectRef.current.asObservable()
25
- observableRef.current = operator ? observable.pipe(operator) : observable
26
- }
20
+ const [observable, subject] = useMemo(() => {
21
+ const subject = new BehaviorSubject(value)
22
+
23
+ const observable = subject.asObservable()
24
+ return [operator ? observable.pipe(operator) : observable, subject]
25
+ }, [])
27
26
 
28
27
  useIsomorphicEffect(() => {
29
- if (isInitial.current) {
30
- isInitial.current = false
31
- } else {
32
- // emit only on update
33
- subjectRef.current.next(value)
34
- }
28
+ subject.next(value)
35
29
  }, [value])
36
- useIsomorphicEffect(() => {
30
+
31
+ useEffect(() => {
37
32
  return () => {
38
- return subjectRef.current.complete()
33
+ subject.complete()
39
34
  }
40
35
  }, [])
41
36
 
42
- return observableRef.current
37
+ return observable
43
38
  }
@@ -1,46 +1,51 @@
1
- import {Observable, Subscription} from 'rxjs'
2
- import {DependencyList, useMemo, useRef, useState} from 'react'
3
- import {useIsomorphicEffect} from './useIsomorphicEffect'
1
+ import {defer, merge, Observable, of, pipe} from 'rxjs'
2
+ import {DependencyList, useMemo} from 'react'
3
+ import {useAsObservable} from './useAsObservable'
4
+ import {distinctUntilChanged, switchMap} from 'rxjs/operators'
5
+ import {useSyncExternalStore} from 'use-sync-external-store/shim'
4
6
 
5
7
  function getValue<T>(value: T): T extends () => infer U ? U : T {
6
8
  return typeof value === 'function' ? value() : value
7
9
  }
8
10
 
11
+ function useObservableSubscription<T>(observable: Observable<T>): T {
12
+ const store = useMemo(() => {
13
+ let currentValue: T
14
+ return {
15
+ // Note: this works because the given observable always emits a value synchronously by concat-ing the given initialValue
16
+ getCurrentValue: () => currentValue,
17
+ subscribe: (callback: (value: T) => void) => {
18
+ const subscription = observable.subscribe(value => {
19
+ currentValue = value
20
+ callback(value)
21
+ })
22
+ return () => {
23
+ subscription.unsubscribe()
24
+ }
25
+ },
26
+ }
27
+ }, [observable])
28
+ return useSyncExternalStore(store.subscribe, store.getCurrentValue)
29
+ }
30
+
9
31
  export function useObservable<T>(observable: Observable<T>): T | undefined
10
32
  export function useObservable<T>(observable: Observable<T>, initialValue: T): T
11
33
  export function useObservable<T>(observable: Observable<T>, initialValue: () => T): T
12
34
  export function useObservable<T>(observable: Observable<T>, initialValue?: T | (() => T)) {
13
- const subscription = useRef<Subscription>()
14
- const isInitial = useRef(true)
15
- const [value, setState] = useState(() => {
16
- let isSync = true
17
- let syncVal = getValue(initialValue)
18
- subscription.current = observable.subscribe(nextVal => {
19
- if (isSync) {
20
- syncVal = nextVal
21
- } else {
22
- setState(nextVal)
23
- }
24
- })
25
- isSync = false
26
- return syncVal
27
- })
28
-
29
- useIsomorphicEffect(() => {
30
- // when the observable changes after initial (possibly sync render)
31
- if (!isInitial.current) {
32
- subscription.current = observable.subscribe(nextVal => setState(nextVal))
33
- }
34
- isInitial.current = false
35
- return () => {
36
- if (subscription.current) {
37
- subscription.current.unsubscribe()
38
- subscription.current = undefined
39
- }
40
- }
41
- }, [observable])
42
-
43
- return value
35
+ return useObservableSubscription(
36
+ useAsObservable(
37
+ observable,
38
+ pipe(
39
+ distinctUntilChanged(),
40
+ switchMap(observable =>
41
+ merge(
42
+ defer(() => of(getValue(initialValue))),
43
+ observable,
44
+ ),
45
+ ),
46
+ ),
47
+ ),
48
+ )
44
49
  }
45
50
 
46
51
  export function useMemoObservable<T>(
@@ -1,226 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ChangeListManager">
4
- <list default="true" id="9f1530e5-3e67-4ff9-b8bc-a40f03478761" name="Default Changelist" comment="">
5
- <change beforePath="$PROJECT_DIR$/../react-repl/src/Editor.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/../react-repl/src/Editor.tsx" afterDir="false" />
6
- <change beforePath="$PROJECT_DIR$/../react-repl/src/ShowError.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/../react-repl/src/ShowError.tsx" afterDir="false" />
7
- <change beforePath="$PROJECT_DIR$/../react-repl/src/transformers/babel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../react-repl/src/transformers/babel.ts" afterDir="false" />
8
- <change beforePath="$PROJECT_DIR$/../react-rx.dev/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/../react-rx.dev/package-lock.json" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/../react-rx.dev/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../react-rx.dev/package.json" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/../react-rx.dev/src/pages/Index/ReactRxReadme.md" beforeDir="false" afterPath="$PROJECT_DIR$/../react-rx.dev/src/pages/Index/ReactRxReadme.md" afterDir="false" />
11
- </list>
12
- <option name="SHOW_DIALOG" value="false" />
13
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
14
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
15
- <option name="LAST_RESOLUTION" value="IGNORE" />
16
- </component>
17
- <component name="ChangesViewManager">
18
- <option name="groupingKeys">
19
- <option value="directory" />
20
- </option>
21
- </component>
22
- <component name="Git.Settings">
23
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
24
- <option name="ROOT_SYNC" value="DONT_SYNC" />
25
- </component>
26
- <component name="GitSEFilterConfiguration">
27
- <file-type-list>
28
- <filtered-out-file-type name="LOCAL_BRANCH" />
29
- <filtered-out-file-type name="REMOTE_BRANCH" />
30
- <filtered-out-file-type name="TAG" />
31
- <filtered-out-file-type name="COMMIT_BY_MESSAGE" />
32
- </file-type-list>
33
- </component>
34
- <component name="MacroExpansionManager">
35
- <option name="directoryName" value="iy052u10" />
36
- </component>
37
- <component name="ProjectId" id="1PI8FtTkoa1tFBP8398nQ82nYf0" />
38
- <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
39
- <component name="ProjectViewState">
40
- <option name="autoscrollToSource" value="true" />
41
- <option name="hideEmptyMiddlePackages" value="true" />
42
- <option name="showLibraryContents" value="true" />
43
- </component>
44
- <component name="PropertiesComponent">
45
- <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
46
- <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
47
- <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
48
- <property name="com.intellij.ide.scratch.LRUPopupBuilder$1/New Scratch File" value="JavaScript" />
49
- <property name="full.screen.before.presentation.mode" value="true" />
50
- <property name="last.edited.regexp" value="jsx{1,2}" />
51
- <property name="last_opened_file_path" value="$PROJECT_DIR$/src" />
52
- <property name="node.js.detected.package.eslint" value="true" />
53
- <property name="node.js.detected.package.standard" value="true" />
54
- <property name="node.js.detected.package.tslint" value="true" />
55
- <property name="node.js.path.for.package.eslint" value="project" />
56
- <property name="node.js.path.for.package.standard" value="project" />
57
- <property name="node.js.path.for.package.tslint" value="project" />
58
- <property name="node.js.selected.package.eslint" value="(autodetect)" />
59
- <property name="node.js.selected.package.standard" value="" />
60
- <property name="node.js.selected.package.tslint" value="$PROJECT_DIR$/node_modules/tslint" />
61
- <property name="nodejs.jest.jest_package" value="$PROJECT_DIR$/node_modules/jest" />
62
- <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
63
- <property name="nodejs_npm_path_reset_for_default_project" value="true" />
64
- <property name="nodejs_package_manager_path" value="npm" />
65
- <property name="prettierjs.PrettierConfiguration.Package" value="$PROJECT_DIR$/node_modules/prettier" />
66
- <property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
67
- <property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
68
- <property name="vue.rearranger.settings.migration" value="true" />
69
- </component>
70
- <component name="RecentsManager">
71
- <key name="CopyFile.RECENT_KEYS">
72
- <recent name="$PROJECT_DIR$/src" />
73
- <recent name="$PROJECT_DIR$/test-concurrent-mode" />
74
- <recent name="$PROJECT_DIR$/website/src/examples" />
75
- <recent name="$PROJECT_DIR$/src/__tests__" />
76
- <recent name="$PROJECT_DIR$/../react-rx.dev" />
77
- </key>
78
- <key name="MoveFile.RECENT_KEYS">
79
- <recent name="$PROJECT_DIR$/website/src/examples" />
80
- <recent name="$PROJECT_DIR$/src" />
81
- <recent name="$PROJECT_DIR$/../react-rx.dev/src" />
82
- <recent name="$PROJECT_DIR$/../react-rx.dev/webpack" />
83
- <recent name="$PROJECT_DIR$/../react-rx.dev/webpack-configs" />
84
- </key>
85
- </component>
86
- <component name="RunManager" selected="Jest.it calls the setup function once, at mount">
87
- <configuration name="All Tests" type="JavaScriptTestRunnerJest" nameIsGenerated="true">
88
- <node-interpreter value="project" />
89
- <node-options value="" />
90
- <jest-package value="$PROJECT_DIR$/node_modules/jest" />
91
- <working-dir value="$PROJECT_DIR$" />
92
- <envs />
93
- <scope-kind value="ALL" />
94
- <method v="2" />
95
- </configuration>
96
- <configuration name="asObservable.test.tsx" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
97
- <node-interpreter value="project" />
98
- <node-options value="" />
99
- <jest-package value="$PROJECT_DIR$/node_modules/jest" />
100
- <working-dir value="$PROJECT_DIR$" />
101
- <envs />
102
- <scope-kind value="TEST_FILE" />
103
- <test-file value="$PROJECT_DIR$/src/__tests__/asObservable.test.tsx" />
104
- <method v="2" />
105
- </configuration>
106
- <configuration name="it calls the setup function once, at mount" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
107
- <node-interpreter value="project" />
108
- <node-options value="" />
109
- <jest-package value="$PROJECT_DIR$/node_modules/jest" />
110
- <working-dir value="$PROJECT_DIR$" />
111
- <envs />
112
- <scope-kind value="TEST" />
113
- <test-file value="$PROJECT_DIR$/src/__tests__/reactiveComponent.test.tsx" />
114
- <test-names>
115
- <test-name value="it calls the setup function once, at mount" />
116
- </test-names>
117
- <method v="2" />
118
- </configuration>
119
- <configuration name="the returned observable should *not* receive a new value when component is rendered with an unchanged value" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
120
- <node-interpreter value="project" />
121
- <node-options value="" />
122
- <jest-package value="$PROJECT_DIR$/node_modules/jest" />
123
- <working-dir value="$PROJECT_DIR$" />
124
- <envs />
125
- <scope-kind value="TEST" />
126
- <test-file value="$PROJECT_DIR$/src/__tests__/asObservable.test.tsx" />
127
- <test-names>
128
- <test-name value="the returned observable should *not* receive a new value when component is rendered with an unchanged value" />
129
- </test-names>
130
- <method v="2" />
131
- </configuration>
132
- <configuration name="the returned observable should receive a new value when component is rendered with a new value" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
133
- <node-interpreter value="project" />
134
- <node-options value="" />
135
- <jest-package value="$PROJECT_DIR$/node_modules/jest" />
136
- <working-dir value="$PROJECT_DIR$" />
137
- <envs />
138
- <scope-kind value="TEST" />
139
- <test-file value="$PROJECT_DIR$/src/__tests__/asObservable.test.tsx" />
140
- <test-names>
141
- <test-name value="the returned observable should receive a new value when component is rendered with a new value" />
142
- </test-names>
143
- <method v="2" />
144
- </configuration>
145
- <configuration name="useAsObservable.test.tsx" type="JavaScriptTestRunnerJest" temporary="true" nameIsGenerated="true">
146
- <node-interpreter value="project" />
147
- <node-options value="" />
148
- <jest-package value="$PROJECT_DIR$/node_modules/jest" />
149
- <working-dir value="$PROJECT_DIR$" />
150
- <envs />
151
- <scope-kind value="TEST_FILE" />
152
- <test-file value="$PROJECT_DIR$/src/__tests__/useAsObservable.test.tsx" />
153
- <method v="2" />
154
- </configuration>
155
- <configuration name="useObservable.test.tsx" type="JavaScriptTestRunnerJest" nameIsGenerated="true">
156
- <node-interpreter value="project" />
157
- <node-options value="" />
158
- <jest-package value="$PROJECT_DIR$/node_modules/jest" />
159
- <working-dir value="$PROJECT_DIR$" />
160
- <envs />
161
- <scope-kind value="TEST_FILE" />
162
- <test-file value="$PROJECT_DIR$/src/__tests__/useObservable.test.tsx" />
163
- <method v="2" />
164
- </configuration>
165
- <list>
166
- <item itemvalue="Jest.All Tests" />
167
- <item itemvalue="Jest.useObservable.test.tsx" />
168
- <item itemvalue="Jest.asObservable.test.tsx" />
169
- <item itemvalue="Jest.it calls the setup function once, at mount" />
170
- <item itemvalue="Jest.the returned observable should *not* receive a new value when component is rendered with an unchanged value" />
171
- <item itemvalue="Jest.the returned observable should receive a new value when component is rendered with a new value" />
172
- <item itemvalue="Jest.useAsObservable.test.tsx" />
173
- </list>
174
- <recent_temporary>
175
- <list>
176
- <item itemvalue="Jest.it calls the setup function once, at mount" />
177
- <item itemvalue="Jest.useAsObservable.test.tsx" />
178
- <item itemvalue="Jest.asObservable.test.tsx" />
179
- <item itemvalue="Jest.the returned observable should receive a new value when component is rendered with a new value" />
180
- <item itemvalue="Jest.the returned observable should *not* receive a new value when component is rendered with an unchanged value" />
181
- </list>
182
- </recent_temporary>
183
- </component>
184
- <component name="RustProjectSettings">
185
- <option name="toolchainHomeDirectory" value="$USER_HOME$/.cargo/bin" />
186
- <option name="version" value="2" />
187
- </component>
188
- <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
189
- <component name="TaskManager">
190
- <task active="true" id="Default" summary="Default task">
191
- <changelist id="9f1530e5-3e67-4ff9-b8bc-a40f03478761" name="Default Changelist" comment="" />
192
- <created>1610996869139</created>
193
- <option name="number" value="Default" />
194
- <option name="presentableId" value="Default" />
195
- <updated>1610996869139</updated>
196
- </task>
197
- <servers />
198
- </component>
199
- <component name="TypeScriptGeneratedFilesManager">
200
- <option name="version" value="3" />
201
- </component>
202
- <component name="Vcs.Log.Tabs.Properties">
203
- <option name="TAB_STATES">
204
- <map>
205
- <entry key="MAIN">
206
- <value>
207
- <State />
208
- </value>
209
- </entry>
210
- </map>
211
- </option>
212
- <option name="oldMeFiltersMigrated" value="true" />
213
- </component>
214
- <component name="VcsManagerConfiguration">
215
- <ignored-roots>
216
- <path value="$PROJECT_DIR$/../../_/parcel-plugin-mdx" />
217
- <path value="$PROJECT_DIR$/test-concurrent-mode" />
218
- <path value="$PROJECT_DIR$/test-concurrent-mode2" />
219
- <path value="$PROJECT_DIR$/website" />
220
- </ignored-roots>
221
- </component>
222
- <component name="com.intellij.coverage.CoverageDataManagerImpl">
223
- <SUITE FILE_PATH="coverage/react_rx$toObservable_test_tsx.info" NAME="toObservable.test.tsx Coverage Results" MODIFIED="1585859575939" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="JestJavaScriptTestRunnerCoverage" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
224
- <SUITE FILE_PATH="coverage/react_rx$All_Tests.info" NAME="All Tests Coverage Results" MODIFIED="1585859619310" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="JestJavaScriptTestRunnerCoverage" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
225
- </component>
226
- </project>