@trackunit/react-core-hooks 0.2.9 → 0.2.10
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/index.js +46 -66
- package/package.json +6 -6
- /package/{assetSorting → src/assetSorting}/AssetSortingProvider.d.ts +0 -0
- /package/{developerSettings → src/developerSettings}/DeveloperSettingsProvider.d.ts +0 -0
- /package/{environment → src/environment}/EnvironmentContextProvider.d.ts +0 -0
- /package/{global-selection → src/global-selection}/GlobalSelectionProvider.d.ts +0 -0
- /package/{index.d.ts → src/index.d.ts} +0 -0
- /package/{runtimes → src/runtimes}/navigation/index.d.ts +0 -0
- /package/{runtimes → src/runtimes}/navigation/useDeeplink.d.ts +0 -0
- /package/{runtimes → src/runtimes}/navigation/useURLSynchronization.d.ts +0 -0
- /package/{runtimes → src/runtimes}/useAssetRuntime.d.ts +0 -0
- /package/{runtimes → src/runtimes}/useCustomFieldRuntime.d.ts +0 -0
- /package/{runtimes → src/runtimes}/useRestRuntime.d.ts +0 -0
- /package/{subscription → src/subscription}/UserSubscriptionProvider.d.ts +0 -0
- /package/{test → src/test}/config/jest.setup.d.ts +0 -0
- /package/{toast → src/toast}/ToastProvider.d.ts +0 -0
- /package/{token → src/token}/TokenProvider.d.ts +0 -0
- /package/{user → src/user}/CurrentUserProvider.d.ts +0 -0
package/index.js
CHANGED
|
@@ -88,37 +88,27 @@ var FunctionPrototype$1 = Function.prototype;
|
|
|
88
88
|
var call$8 = FunctionPrototype$1.call;
|
|
89
89
|
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$8, call$8);
|
|
90
90
|
|
|
91
|
-
var
|
|
92
|
-
return
|
|
91
|
+
var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
92
|
+
return function () {
|
|
93
93
|
return call$8.apply(fn, arguments);
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
var
|
|
97
|
+
var uncurryThis$c = functionUncurryThis;
|
|
98
98
|
|
|
99
|
-
var toString$4 =
|
|
100
|
-
var stringSlice$1 =
|
|
99
|
+
var toString$4 = uncurryThis$c({}.toString);
|
|
100
|
+
var stringSlice$1 = uncurryThis$c(''.slice);
|
|
101
101
|
|
|
102
102
|
var classofRaw$2 = function (it) {
|
|
103
103
|
return stringSlice$1(toString$4(it), 8, -1);
|
|
104
104
|
};
|
|
105
105
|
|
|
106
|
-
var
|
|
107
|
-
var uncurryThisRaw = functionUncurryThisRaw;
|
|
108
|
-
|
|
109
|
-
var functionUncurryThis = function (fn) {
|
|
110
|
-
// Nashorn bug:
|
|
111
|
-
// https://github.com/zloirock/core-js/issues/1128
|
|
112
|
-
// https://github.com/zloirock/core-js/issues/1130
|
|
113
|
-
if (classofRaw$1(fn) === 'Function') return uncurryThisRaw(fn);
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
var uncurryThis$a = functionUncurryThis;
|
|
106
|
+
var uncurryThis$b = functionUncurryThis;
|
|
117
107
|
var fails$c = fails$f;
|
|
118
108
|
var classof$3 = classofRaw$2;
|
|
119
109
|
|
|
120
110
|
var $Object$4 = Object;
|
|
121
|
-
var split = uncurryThis$
|
|
111
|
+
var split = uncurryThis$b(''.split);
|
|
122
112
|
|
|
123
113
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
124
114
|
var indexedObject = fails$c(function () {
|
|
@@ -198,9 +188,9 @@ var getBuiltIn$4 = function (namespace, method) {
|
|
|
198
188
|
return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
|
|
199
189
|
};
|
|
200
190
|
|
|
201
|
-
var uncurryThis$
|
|
191
|
+
var uncurryThis$a = functionUncurryThis;
|
|
202
192
|
|
|
203
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
193
|
+
var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
|
|
204
194
|
|
|
205
195
|
var getBuiltIn$3 = getBuiltIn$4;
|
|
206
196
|
|
|
@@ -346,10 +336,10 @@ var store$2 = sharedStore;
|
|
|
346
336
|
(shared$4.exports = function (key, value) {
|
|
347
337
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
348
338
|
})('versions', []).push({
|
|
349
|
-
version: '3.
|
|
339
|
+
version: '3.26.1',
|
|
350
340
|
mode: 'global',
|
|
351
341
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
352
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
342
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
|
|
353
343
|
source: 'https://github.com/zloirock/core-js'
|
|
354
344
|
});
|
|
355
345
|
|
|
@@ -363,10 +353,10 @@ var toObject$3 = function (argument) {
|
|
|
363
353
|
return $Object$2(requireObjectCoercible$1(argument));
|
|
364
354
|
};
|
|
365
355
|
|
|
366
|
-
var uncurryThis$
|
|
356
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
367
357
|
var toObject$2 = toObject$3;
|
|
368
358
|
|
|
369
|
-
var hasOwnProperty = uncurryThis$
|
|
359
|
+
var hasOwnProperty = uncurryThis$9({}.hasOwnProperty);
|
|
370
360
|
|
|
371
361
|
// `HasOwnProperty` abstract operation
|
|
372
362
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
@@ -375,11 +365,11 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
|
375
365
|
return hasOwnProperty(toObject$2(it), key);
|
|
376
366
|
};
|
|
377
367
|
|
|
378
|
-
var uncurryThis$
|
|
368
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
379
369
|
|
|
380
370
|
var id = 0;
|
|
381
371
|
var postfix = Math.random();
|
|
382
|
-
var toString$3 = uncurryThis$
|
|
372
|
+
var toString$3 = uncurryThis$8(1.0.toString);
|
|
383
373
|
|
|
384
374
|
var uid$2 = function (key) {
|
|
385
375
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
@@ -593,11 +583,11 @@ var functionName = {
|
|
|
593
583
|
CONFIGURABLE: CONFIGURABLE
|
|
594
584
|
};
|
|
595
585
|
|
|
596
|
-
var uncurryThis$
|
|
586
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
597
587
|
var isCallable$a = isCallable$g;
|
|
598
588
|
var store$1 = sharedStore;
|
|
599
589
|
|
|
600
|
-
var functionToString = uncurryThis$
|
|
590
|
+
var functionToString = uncurryThis$7(Function.toString);
|
|
601
591
|
|
|
602
592
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
603
593
|
if (!isCallable$a(store$1.inspectSource)) {
|
|
@@ -862,13 +852,13 @@ var arrayIncludes = {
|
|
|
862
852
|
indexOf: createMethod(false)
|
|
863
853
|
};
|
|
864
854
|
|
|
865
|
-
var uncurryThis$
|
|
855
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
866
856
|
var hasOwn$3 = hasOwnProperty_1;
|
|
867
857
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
868
858
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
869
859
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
870
860
|
|
|
871
|
-
var push = uncurryThis$
|
|
861
|
+
var push = uncurryThis$6([].push);
|
|
872
862
|
|
|
873
863
|
var objectKeysInternal = function (object, names) {
|
|
874
864
|
var O = toIndexedObject$2(object);
|
|
@@ -912,12 +902,12 @@ var objectGetOwnPropertySymbols = {};
|
|
|
912
902
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
913
903
|
|
|
914
904
|
var getBuiltIn$1 = getBuiltIn$4;
|
|
915
|
-
var uncurryThis$
|
|
905
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
916
906
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
917
907
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
918
908
|
var anObject$6 = anObject$8;
|
|
919
909
|
|
|
920
|
-
var concat$1 = uncurryThis$
|
|
910
|
+
var concat$1 = uncurryThis$5([].concat);
|
|
921
911
|
|
|
922
912
|
// all object keys, includes non-enumerable and symbols
|
|
923
913
|
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
@@ -1032,7 +1022,7 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
1032
1022
|
};
|
|
1033
1023
|
|
|
1034
1024
|
var DESCRIPTORS$2 = descriptors;
|
|
1035
|
-
var uncurryThis$
|
|
1025
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
1036
1026
|
var call$4 = functionCall;
|
|
1037
1027
|
var fails$6 = fails$f;
|
|
1038
1028
|
var objectKeys$1 = objectKeys$2;
|
|
@@ -1045,7 +1035,7 @@ var IndexedObject = indexedObject;
|
|
|
1045
1035
|
var $assign = Object.assign;
|
|
1046
1036
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1047
1037
|
var defineProperty$3 = Object.defineProperty;
|
|
1048
|
-
var concat = uncurryThis$
|
|
1038
|
+
var concat = uncurryThis$4([].concat);
|
|
1049
1039
|
|
|
1050
1040
|
// `Object.assign` method
|
|
1051
1041
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
@@ -1102,11 +1092,9 @@ const AssetSortingContext = /*#__PURE__*/createContext(null);
|
|
|
1102
1092
|
const AssetSortingProvider = props => jsx(AssetSortingContext.Provider, Object.assign({}, props));
|
|
1103
1093
|
const useAssetSorting = () => {
|
|
1104
1094
|
const context = useContext(AssetSortingContext);
|
|
1105
|
-
|
|
1106
1095
|
if (!context) {
|
|
1107
1096
|
throw new Error("useAssetSorting must be used within a AssetSortingProvider");
|
|
1108
1097
|
}
|
|
1109
|
-
|
|
1110
1098
|
return context;
|
|
1111
1099
|
};
|
|
1112
1100
|
|
|
@@ -1363,7 +1351,7 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
1363
1351
|
|
|
1364
1352
|
/* eslint-disable no-proto -- safe */
|
|
1365
1353
|
|
|
1366
|
-
var uncurryThis$
|
|
1354
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
1367
1355
|
var anObject$3 = anObject$8;
|
|
1368
1356
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1369
1357
|
|
|
@@ -1377,7 +1365,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1377
1365
|
var setter;
|
|
1378
1366
|
try {
|
|
1379
1367
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1380
|
-
setter = uncurryThis$
|
|
1368
|
+
setter = uncurryThis$3(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1381
1369
|
setter(test, []);
|
|
1382
1370
|
CORRECT_SETTER = test instanceof Array;
|
|
1383
1371
|
} catch (error) { /* empty */ }
|
|
@@ -1642,11 +1630,9 @@ const DeveloperSettingsContext = /*#__PURE__*/React.createContext({
|
|
|
1642
1630
|
});
|
|
1643
1631
|
const useDeveloperSettings = () => {
|
|
1644
1632
|
const context = React.useContext(DeveloperSettingsContext);
|
|
1645
|
-
|
|
1646
1633
|
if (!context) {
|
|
1647
1634
|
throw new Error("useDeveloperSettingsContext must be used within DeveloperSettingsProvider");
|
|
1648
1635
|
}
|
|
1649
|
-
|
|
1650
1636
|
return context;
|
|
1651
1637
|
};
|
|
1652
1638
|
const DeveloperSettingsProvider = ({
|
|
@@ -1680,22 +1666,18 @@ const EnvironmentContextProvider = props => {
|
|
|
1680
1666
|
};
|
|
1681
1667
|
const useEnvironment = () => {
|
|
1682
1668
|
const context = useContext(EnvironmentContext);
|
|
1683
|
-
|
|
1684
1669
|
if (!context) {
|
|
1685
1670
|
throw new Error("useEnvironment must be used within an EnvironmentContext");
|
|
1686
1671
|
}
|
|
1687
|
-
|
|
1688
1672
|
return context;
|
|
1689
1673
|
};
|
|
1690
1674
|
|
|
1691
1675
|
const GlobalSelectionContext = /*#__PURE__*/React.createContext(null);
|
|
1692
1676
|
const useGlobalSelection = () => {
|
|
1693
1677
|
const context = React.useContext(GlobalSelectionContext);
|
|
1694
|
-
|
|
1695
1678
|
if (!context) {
|
|
1696
1679
|
throw new Error("useGlobalSelection must be used within the GlobalSelectionContext");
|
|
1697
1680
|
}
|
|
1698
|
-
|
|
1699
1681
|
return context;
|
|
1700
1682
|
};
|
|
1701
1683
|
const GlobalSelectionProvider = props => jsx(GlobalSelectionContext.Provider, Object.assign({}, props));
|
|
@@ -1711,14 +1693,14 @@ var toStringTagSupport = String(test) === '[object z]';
|
|
|
1711
1693
|
|
|
1712
1694
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1713
1695
|
var isCallable$1 = isCallable$g;
|
|
1714
|
-
var classofRaw = classofRaw$2;
|
|
1696
|
+
var classofRaw$1 = classofRaw$2;
|
|
1715
1697
|
var wellKnownSymbol$1 = wellKnownSymbol$9;
|
|
1716
1698
|
|
|
1717
1699
|
var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
|
|
1718
1700
|
var $Object = Object;
|
|
1719
1701
|
|
|
1720
1702
|
// ES3 wrong here
|
|
1721
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
1703
|
+
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
|
|
1722
1704
|
|
|
1723
1705
|
// fallback for IE11 Script Access Denied error
|
|
1724
1706
|
var tryGet = function (it, key) {
|
|
@@ -1728,15 +1710,15 @@ var tryGet = function (it, key) {
|
|
|
1728
1710
|
};
|
|
1729
1711
|
|
|
1730
1712
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1731
|
-
var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1713
|
+
var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
1732
1714
|
var O, tag, result;
|
|
1733
1715
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1734
1716
|
// @@toStringTag case
|
|
1735
1717
|
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
1736
1718
|
// builtinTag case
|
|
1737
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1719
|
+
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1738
1720
|
// ES3 arguments fallback
|
|
1739
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
|
|
1721
|
+
: (result = classofRaw$1(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
|
|
1740
1722
|
};
|
|
1741
1723
|
|
|
1742
1724
|
var classof$1 = classof$2;
|
|
@@ -1823,7 +1805,7 @@ var regexpUnsupportedNcg = fails$1(function () {
|
|
|
1823
1805
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1824
1806
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1825
1807
|
var call$2 = functionCall;
|
|
1826
|
-
var uncurryThis$
|
|
1808
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
1827
1809
|
var toString$1 = toString$2;
|
|
1828
1810
|
var regexpFlags = regexpFlags$1;
|
|
1829
1811
|
var stickyHelpers = regexpStickyHelpers;
|
|
@@ -1836,10 +1818,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
|
1836
1818
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1837
1819
|
var nativeExec = RegExp.prototype.exec;
|
|
1838
1820
|
var patchedExec = nativeExec;
|
|
1839
|
-
var charAt = uncurryThis$
|
|
1840
|
-
var indexOf = uncurryThis$
|
|
1841
|
-
var replace = uncurryThis$
|
|
1842
|
-
var stringSlice = uncurryThis$
|
|
1821
|
+
var charAt = uncurryThis$2(''.charAt);
|
|
1822
|
+
var indexOf = uncurryThis$2(''.indexOf);
|
|
1823
|
+
var replace = uncurryThis$2(''.replace);
|
|
1824
|
+
var stringSlice = uncurryThis$2(''.slice);
|
|
1843
1825
|
|
|
1844
1826
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1845
1827
|
var re1 = /a/;
|
|
@@ -1946,9 +1928,19 @@ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
|
1946
1928
|
exec: exec
|
|
1947
1929
|
});
|
|
1948
1930
|
|
|
1931
|
+
var classofRaw = classofRaw$2;
|
|
1932
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
1933
|
+
|
|
1934
|
+
var functionUncurryThisClause = function (fn) {
|
|
1935
|
+
// Nashorn bug:
|
|
1936
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
1937
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
1938
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$1(fn);
|
|
1939
|
+
};
|
|
1940
|
+
|
|
1949
1941
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
1950
1942
|
|
|
1951
|
-
var uncurryThis =
|
|
1943
|
+
var uncurryThis = functionUncurryThisClause;
|
|
1952
1944
|
var defineBuiltIn = defineBuiltIn$4;
|
|
1953
1945
|
var regexpExec$1 = regexpExec$2;
|
|
1954
1946
|
var fails = fails$f;
|
|
@@ -2091,7 +2083,6 @@ fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCal
|
|
|
2091
2083
|
* A react hook for notifying host about location change
|
|
2092
2084
|
*
|
|
2093
2085
|
*/
|
|
2094
|
-
|
|
2095
2086
|
const useURLSynchronization = () => {
|
|
2096
2087
|
const location = useLocation();
|
|
2097
2088
|
React__default.useEffect(() => {
|
|
@@ -2110,7 +2101,6 @@ const useURLSynchronization = () => {
|
|
|
2110
2101
|
*
|
|
2111
2102
|
* @returns {UseAssetRuntime} assetRuntime
|
|
2112
2103
|
*/
|
|
2113
|
-
|
|
2114
2104
|
const useAssetRuntime = () => {
|
|
2115
2105
|
return AssetRuntime;
|
|
2116
2106
|
};
|
|
@@ -2120,7 +2110,6 @@ const useAssetRuntime = () => {
|
|
|
2120
2110
|
*
|
|
2121
2111
|
* @returns {UseCustomFieldRuntime} CustomFieldRuntime
|
|
2122
2112
|
*/
|
|
2123
|
-
|
|
2124
2113
|
const useCustomFieldRuntime = () => {
|
|
2125
2114
|
return CustomFieldRuntime;
|
|
2126
2115
|
};
|
|
@@ -2130,7 +2119,6 @@ const useCustomFieldRuntime = () => {
|
|
|
2130
2119
|
*
|
|
2131
2120
|
* @returns {UseRestRuntime} a RestRuntime
|
|
2132
2121
|
*/
|
|
2133
|
-
|
|
2134
2122
|
const useRestRuntime = () => {
|
|
2135
2123
|
return RestRuntime;
|
|
2136
2124
|
};
|
|
@@ -2141,11 +2129,9 @@ const UserSubscriptionProvider = props => {
|
|
|
2141
2129
|
};
|
|
2142
2130
|
const useUserSubscription = () => {
|
|
2143
2131
|
const context = React.useContext(UserSubscriptionContext);
|
|
2144
|
-
|
|
2145
2132
|
if (!context) {
|
|
2146
2133
|
throw new Error("Cannot use useUserSubscription outside UserSubscriptionProvider");
|
|
2147
2134
|
}
|
|
2148
|
-
|
|
2149
2135
|
return context;
|
|
2150
2136
|
};
|
|
2151
2137
|
|
|
@@ -2153,22 +2139,18 @@ const ToastContext = /*#__PURE__*/React.createContext(null);
|
|
|
2153
2139
|
const ToastProvider = props => jsx(ToastContext.Provider, Object.assign({}, props));
|
|
2154
2140
|
const useToast = () => {
|
|
2155
2141
|
const toastContext = React.useContext(ToastContext);
|
|
2156
|
-
|
|
2157
2142
|
if (!toastContext) {
|
|
2158
2143
|
throw new Error("useToast must be used within the ToastProvider");
|
|
2159
2144
|
}
|
|
2160
|
-
|
|
2161
2145
|
return toastContext;
|
|
2162
2146
|
};
|
|
2163
2147
|
|
|
2164
2148
|
const TokenContext = /*#__PURE__*/React.createContext(null);
|
|
2165
2149
|
const useToken = () => {
|
|
2166
2150
|
const context = React.useContext(TokenContext);
|
|
2167
|
-
|
|
2168
2151
|
if (!context) {
|
|
2169
2152
|
throw new Error("useToken must be used within the TokenContext");
|
|
2170
2153
|
}
|
|
2171
|
-
|
|
2172
2154
|
return context;
|
|
2173
2155
|
};
|
|
2174
2156
|
const TokenProvider = props => {
|
|
@@ -2181,11 +2163,9 @@ const CurrentUserProvider = props => {
|
|
|
2181
2163
|
};
|
|
2182
2164
|
const useCurrentUser = () => {
|
|
2183
2165
|
const context = React.useContext(CurrentUserContext);
|
|
2184
|
-
|
|
2185
2166
|
if (!context) {
|
|
2186
2167
|
throw new Error("useCurrentUser must be used within the CurrentUserProvider");
|
|
2187
2168
|
}
|
|
2188
|
-
|
|
2189
2169
|
return context;
|
|
2190
2170
|
};
|
|
2191
2171
|
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-hooks",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"module": "./index.js",
|
|
7
7
|
"main": "./index.js",
|
|
8
8
|
"type": "module",
|
|
9
|
-
"types": "./index.d.ts",
|
|
9
|
+
"types": "./src/index.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@trackunit/react-core-contexts-api": "0.2.
|
|
11
|
+
"@trackunit/react-core-contexts-api": "0.2.4",
|
|
12
12
|
"react": "17.0.2",
|
|
13
|
-
"launchdarkly-react-client-sdk": "
|
|
14
|
-
"@trackunit/iris-app-runtime-core": "0.3.
|
|
15
|
-
"react-router-dom": "6.4.
|
|
13
|
+
"launchdarkly-react-client-sdk": "2.29.3",
|
|
14
|
+
"@trackunit/iris-app-runtime-core": "0.3.2",
|
|
15
|
+
"react-router-dom": "6.4.3"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {}
|
|
18
18
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|