@tramvai/state 2.37.0 → 2.37.3
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/connect/connectAdvanced.d.ts +3 -0
- package/lib/connect/index.d.ts +6 -0
- package/lib/index.es.js +9 -1
- package/lib/index.js +9 -1
- package/package.json +3 -3
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ConsumerContext } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated
|
|
5
|
+
*/
|
|
3
6
|
export declare function connectAdvanced(selectorFactory: (context: ConsumerContext, options: any) => any, { getDisplayName, methodName, stores, shouldHandleStateChanges, forwardRef, schedule, pure, ...connectOptions }?: {
|
|
4
7
|
getDisplayName?: ((name: string) => string) | undefined;
|
|
5
8
|
methodName?: string | undefined;
|
package/lib/connect/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { finalPropsSelectorFactory as defaultSelectorFactory } from './selectorF
|
|
|
3
3
|
import type { ConsumerContext } from './types';
|
|
4
4
|
import type { StoreClass } from '../typings';
|
|
5
5
|
import type { MapContextToProps, MapStateToProps, MergeProps } from './toProps/types';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated
|
|
8
|
+
*/
|
|
6
9
|
export declare function createConnect({ connectHOC, mapStateToPropsFactories, mapContextToPropsFactories, mergePropsFactories, selectorFactory, schedule, }?: {
|
|
7
10
|
connectHOC?: typeof connectAdvanced | undefined;
|
|
8
11
|
mapStateToPropsFactories?: typeof import("./toProps/mapStateToProps").whenMapStateToPropsIsFunction[] | undefined;
|
|
@@ -20,6 +23,9 @@ export declare function createConnect({ connectHOC, mapStateToPropsFactories, ma
|
|
|
20
23
|
areStatePropsEqual?: ((test1: any, test2: any) => boolean) | undefined;
|
|
21
24
|
areMergedPropsEqual?: ((test1: any, test2: any) => boolean) | undefined;
|
|
22
25
|
}) => <T extends import("react").ComponentType<{}>>(WrappedComponent: T) => T;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated
|
|
28
|
+
*/
|
|
23
29
|
declare const connect: (stores: (StoreClass | string | {
|
|
24
30
|
store: StoreClass | string;
|
|
25
31
|
optional: boolean;
|
package/lib/index.es.js
CHANGED
|
@@ -774,6 +774,9 @@ const stringifyComponent = (Comp) => {
|
|
|
774
774
|
return String(Comp);
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
|
+
/**
|
|
778
|
+
* @deprecated
|
|
779
|
+
*/
|
|
777
780
|
function connectAdvanced(
|
|
778
781
|
/*
|
|
779
782
|
selectorFactory is a func that is responsible for returning the selector function used to
|
|
@@ -1189,6 +1192,9 @@ function match(arg, factories, name) {
|
|
|
1189
1192
|
}
|
|
1190
1193
|
// createConnect with default args builds the 'official' connect behavior. Calling it with
|
|
1191
1194
|
// different options opens up some testing and extensibility scenarios
|
|
1195
|
+
/**
|
|
1196
|
+
* @deprecated
|
|
1197
|
+
*/
|
|
1192
1198
|
function createConnect({ connectHOC = connectAdvanced, mapStateToPropsFactories: mapStateToPropsFactories$1 = mapStateToPropsFactories, mapContextToPropsFactories: mapContextToPropsFactories$1 = mapContextToPropsFactories, mergePropsFactories: mergePropsFactories$1 = mergePropsFactories, selectorFactory = finalPropsSelectorFactory, schedule = scheduling(), } = {}) {
|
|
1193
1199
|
return (stores, mapStateToProps, mapContextToProps, mergeProps, { pure = true, areStatesEqual = strictEqual, areOwnPropsEqual = shallowEqual, areStatePropsEqual = shallowEqual, areMergedPropsEqual = shallowEqual, ...extraOptions } = {}
|
|
1194
1200
|
// eslint-disable-next-line max-params
|
|
@@ -1226,7 +1232,9 @@ function createConnect({ connectHOC = connectAdvanced, mapStateToPropsFactories:
|
|
|
1226
1232
|
});
|
|
1227
1233
|
};
|
|
1228
1234
|
}
|
|
1229
|
-
|
|
1235
|
+
/**
|
|
1236
|
+
* @deprecated
|
|
1237
|
+
*/
|
|
1230
1238
|
const connect = /* @__PURE__ */ createConnect();
|
|
1231
1239
|
const { Consumer } = ConnectContext;
|
|
1232
1240
|
|
package/lib/index.js
CHANGED
|
@@ -796,6 +796,9 @@ const stringifyComponent = (Comp) => {
|
|
|
796
796
|
return String(Comp);
|
|
797
797
|
}
|
|
798
798
|
};
|
|
799
|
+
/**
|
|
800
|
+
* @deprecated
|
|
801
|
+
*/
|
|
799
802
|
function connectAdvanced(
|
|
800
803
|
/*
|
|
801
804
|
selectorFactory is a func that is responsible for returning the selector function used to
|
|
@@ -1211,6 +1214,9 @@ function match(arg, factories, name) {
|
|
|
1211
1214
|
}
|
|
1212
1215
|
// createConnect with default args builds the 'official' connect behavior. Calling it with
|
|
1213
1216
|
// different options opens up some testing and extensibility scenarios
|
|
1217
|
+
/**
|
|
1218
|
+
* @deprecated
|
|
1219
|
+
*/
|
|
1214
1220
|
function createConnect({ connectHOC = connectAdvanced, mapStateToPropsFactories: mapStateToPropsFactories$1 = mapStateToPropsFactories, mapContextToPropsFactories: mapContextToPropsFactories$1 = mapContextToPropsFactories, mergePropsFactories: mergePropsFactories$1 = mergePropsFactories, selectorFactory = finalPropsSelectorFactory, schedule = scheduling(), } = {}) {
|
|
1215
1221
|
return (stores, mapStateToProps, mapContextToProps, mergeProps, { pure = true, areStatesEqual = strictEqual__default["default"], areOwnPropsEqual = shallowEqual__default["default"], areStatePropsEqual = shallowEqual__default["default"], areMergedPropsEqual = shallowEqual__default["default"], ...extraOptions } = {}
|
|
1216
1222
|
// eslint-disable-next-line max-params
|
|
@@ -1248,7 +1254,9 @@ function createConnect({ connectHOC = connectAdvanced, mapStateToPropsFactories:
|
|
|
1248
1254
|
});
|
|
1249
1255
|
};
|
|
1250
1256
|
}
|
|
1251
|
-
|
|
1257
|
+
/**
|
|
1258
|
+
* @deprecated
|
|
1259
|
+
*/
|
|
1252
1260
|
const connect = /* @__PURE__ */ createConnect();
|
|
1253
1261
|
const { Consumer } = ConnectContext;
|
|
1254
1262
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/state",
|
|
3
|
-
"version": "2.37.
|
|
3
|
+
"version": "2.37.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@tinkoff/react-hooks": "0.1.4",
|
|
22
22
|
"@tinkoff/utils": "^2.1.2",
|
|
23
|
-
"@tramvai/types-actions-state-context": "2.37.
|
|
23
|
+
"@tramvai/types-actions-state-context": "2.37.3",
|
|
24
24
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
25
25
|
"invariant": "^2.2.4",
|
|
26
26
|
"react-is": ">=17",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@reatom/core": "^1.1.5",
|
|
38
|
-
"@tramvai/core": "2.37.
|
|
38
|
+
"@tramvai/core": "2.37.3",
|
|
39
39
|
"@types/invariant": "^2.2.31",
|
|
40
40
|
"@types/react-is": "^17.0.0",
|
|
41
41
|
"@types/use-sync-external-store": "^0.0.3",
|