@trackunit/react-core-contexts 0.4.5 → 0.4.11
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 +50 -77
- package/package.json +11 -11
- /package/{ManagerApolloProvider.d.ts → src/ManagerApolloProvider.d.ts} +0 -0
- /package/{TrackunitDataProviders.d.ts → src/TrackunitDataProviders.d.ts} +0 -0
- /package/{TrackunitProviders.d.ts → src/TrackunitProviders.d.ts} +0 -0
- /package/{TrackunitRouter.d.ts → src/TrackunitRouter.d.ts} +0 -0
- /package/{UserSubscriptionProvider.d.ts → src/UserSubscriptionProvider.d.ts} +0 -0
- /package/{assetSorting → src/assetSorting}/TileAssetSortingProvider.d.ts +0 -0
- /package/{developerSettings → src/developerSettings}/IrisAppDeveloperSettingsContext.d.ts +0 -0
- /package/{environment → src/environment}/TileEnvironmentProvider.d.ts +0 -0
- /package/{global-selection → src/global-selection}/TileGlobalSelectionProvider.d.ts +0 -0
- /package/{index.d.ts → src/index.d.ts} +0 -0
- /package/{test → src/test}/config/jest.setup.d.ts +0 -0
- /package/{toast → src/toast}/ToastProviderApp.d.ts +0 -0
- /package/{token → src/token}/TileTokenProvider.d.ts +0 -0
- /package/{useSubscribeToHostChanges.d.ts → src/useSubscribeToHostChanges.d.ts} +0 -0
- /package/{user → src/user}/TileCurrentUserProvider.d.ts +0 -0
package/index.js
CHANGED
|
@@ -95,37 +95,27 @@ var FunctionPrototype$2 = Function.prototype;
|
|
|
95
95
|
var call$9 = FunctionPrototype$2.call;
|
|
96
96
|
var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$9, call$9);
|
|
97
97
|
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
|
|
99
|
+
return function () {
|
|
100
100
|
return call$9.apply(fn, arguments);
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
var
|
|
104
|
+
var uncurryThis$g = functionUncurryThis;
|
|
105
105
|
|
|
106
|
-
var toString$6 =
|
|
107
|
-
var stringSlice$4 =
|
|
106
|
+
var toString$6 = uncurryThis$g({}.toString);
|
|
107
|
+
var stringSlice$4 = uncurryThis$g(''.slice);
|
|
108
108
|
|
|
109
109
|
var classofRaw$2 = function (it) {
|
|
110
110
|
return stringSlice$4(toString$6(it), 8, -1);
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
var
|
|
114
|
-
var uncurryThisRaw = functionUncurryThisRaw;
|
|
115
|
-
|
|
116
|
-
var functionUncurryThis = function (fn) {
|
|
117
|
-
// Nashorn bug:
|
|
118
|
-
// https://github.com/zloirock/core-js/issues/1128
|
|
119
|
-
// https://github.com/zloirock/core-js/issues/1130
|
|
120
|
-
if (classofRaw$1(fn) === 'Function') return uncurryThisRaw(fn);
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
var uncurryThis$e = functionUncurryThis;
|
|
113
|
+
var uncurryThis$f = functionUncurryThis;
|
|
124
114
|
var fails$e = fails$h;
|
|
125
115
|
var classof$4 = classofRaw$2;
|
|
126
116
|
|
|
127
117
|
var $Object$4 = Object;
|
|
128
|
-
var split = uncurryThis$
|
|
118
|
+
var split = uncurryThis$f(''.split);
|
|
129
119
|
|
|
130
120
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
131
121
|
var indexedObject = fails$e(function () {
|
|
@@ -205,9 +195,9 @@ var getBuiltIn$4 = function (namespace, method) {
|
|
|
205
195
|
return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
|
|
206
196
|
};
|
|
207
197
|
|
|
208
|
-
var uncurryThis$
|
|
198
|
+
var uncurryThis$e = functionUncurryThis;
|
|
209
199
|
|
|
210
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
200
|
+
var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
|
|
211
201
|
|
|
212
202
|
var getBuiltIn$3 = getBuiltIn$4;
|
|
213
203
|
|
|
@@ -353,10 +343,10 @@ var store$2 = sharedStore;
|
|
|
353
343
|
(shared$4.exports = function (key, value) {
|
|
354
344
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
355
345
|
})('versions', []).push({
|
|
356
|
-
version: '3.
|
|
346
|
+
version: '3.26.1',
|
|
357
347
|
mode: 'global',
|
|
358
348
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
359
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
349
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
|
|
360
350
|
source: 'https://github.com/zloirock/core-js'
|
|
361
351
|
});
|
|
362
352
|
|
|
@@ -370,10 +360,10 @@ var toObject$4 = function (argument) {
|
|
|
370
360
|
return $Object$2(requireObjectCoercible$3(argument));
|
|
371
361
|
};
|
|
372
362
|
|
|
373
|
-
var uncurryThis$
|
|
363
|
+
var uncurryThis$d = functionUncurryThis;
|
|
374
364
|
var toObject$3 = toObject$4;
|
|
375
365
|
|
|
376
|
-
var hasOwnProperty = uncurryThis$
|
|
366
|
+
var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
|
|
377
367
|
|
|
378
368
|
// `HasOwnProperty` abstract operation
|
|
379
369
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
@@ -382,11 +372,11 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
|
382
372
|
return hasOwnProperty(toObject$3(it), key);
|
|
383
373
|
};
|
|
384
374
|
|
|
385
|
-
var uncurryThis$
|
|
375
|
+
var uncurryThis$c = functionUncurryThis;
|
|
386
376
|
|
|
387
377
|
var id = 0;
|
|
388
378
|
var postfix = Math.random();
|
|
389
|
-
var toString$5 = uncurryThis$
|
|
379
|
+
var toString$5 = uncurryThis$c(1.0.toString);
|
|
390
380
|
|
|
391
381
|
var uid$2 = function (key) {
|
|
392
382
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
|
|
@@ -600,11 +590,11 @@ var functionName = {
|
|
|
600
590
|
CONFIGURABLE: CONFIGURABLE
|
|
601
591
|
};
|
|
602
592
|
|
|
603
|
-
var uncurryThis$
|
|
593
|
+
var uncurryThis$b = functionUncurryThis;
|
|
604
594
|
var isCallable$b = isCallable$h;
|
|
605
595
|
var store$1 = sharedStore;
|
|
606
596
|
|
|
607
|
-
var functionToString = uncurryThis$
|
|
597
|
+
var functionToString = uncurryThis$b(Function.toString);
|
|
608
598
|
|
|
609
599
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
610
600
|
if (!isCallable$b(store$1.inspectSource)) {
|
|
@@ -869,13 +859,13 @@ var arrayIncludes = {
|
|
|
869
859
|
indexOf: createMethod$1(false)
|
|
870
860
|
};
|
|
871
861
|
|
|
872
|
-
var uncurryThis$
|
|
862
|
+
var uncurryThis$a = functionUncurryThis;
|
|
873
863
|
var hasOwn$3 = hasOwnProperty_1;
|
|
874
864
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
875
865
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
876
866
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
877
867
|
|
|
878
|
-
var push$1 = uncurryThis$
|
|
868
|
+
var push$1 = uncurryThis$a([].push);
|
|
879
869
|
|
|
880
870
|
var objectKeysInternal = function (object, names) {
|
|
881
871
|
var O = toIndexedObject$2(object);
|
|
@@ -919,12 +909,12 @@ var objectGetOwnPropertySymbols = {};
|
|
|
919
909
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
920
910
|
|
|
921
911
|
var getBuiltIn$1 = getBuiltIn$4;
|
|
922
|
-
var uncurryThis$
|
|
912
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
923
913
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
924
914
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
925
915
|
var anObject$6 = anObject$8;
|
|
926
916
|
|
|
927
|
-
var concat$2 = uncurryThis$
|
|
917
|
+
var concat$2 = uncurryThis$9([].concat);
|
|
928
918
|
|
|
929
919
|
// all object keys, includes non-enumerable and symbols
|
|
930
920
|
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
@@ -1039,7 +1029,7 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
1039
1029
|
};
|
|
1040
1030
|
|
|
1041
1031
|
var DESCRIPTORS$2 = descriptors;
|
|
1042
|
-
var uncurryThis$
|
|
1032
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1043
1033
|
var call$5 = functionCall;
|
|
1044
1034
|
var fails$8 = fails$h;
|
|
1045
1035
|
var objectKeys$1 = objectKeys$2;
|
|
@@ -1052,7 +1042,7 @@ var IndexedObject = indexedObject;
|
|
|
1052
1042
|
var $assign = Object.assign;
|
|
1053
1043
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1054
1044
|
var defineProperty$3 = Object.defineProperty;
|
|
1055
|
-
var concat$1 = uncurryThis$
|
|
1045
|
+
var concat$1 = uncurryThis$8([].concat);
|
|
1056
1046
|
|
|
1057
1047
|
// `Object.assign` method
|
|
1058
1048
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
@@ -1293,14 +1283,14 @@ var toStringTagSupport = String(test) === '[object z]';
|
|
|
1293
1283
|
|
|
1294
1284
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1295
1285
|
var isCallable$6 = isCallable$h;
|
|
1296
|
-
var classofRaw = classofRaw$2;
|
|
1286
|
+
var classofRaw$1 = classofRaw$2;
|
|
1297
1287
|
var wellKnownSymbol$7 = wellKnownSymbol$c;
|
|
1298
1288
|
|
|
1299
1289
|
var TO_STRING_TAG$2 = wellKnownSymbol$7('toStringTag');
|
|
1300
1290
|
var $Object$1 = Object;
|
|
1301
1291
|
|
|
1302
1292
|
// ES3 wrong here
|
|
1303
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
1293
|
+
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
|
|
1304
1294
|
|
|
1305
1295
|
// fallback for IE11 Script Access Denied error
|
|
1306
1296
|
var tryGet = function (it, key) {
|
|
@@ -1310,15 +1300,15 @@ var tryGet = function (it, key) {
|
|
|
1310
1300
|
};
|
|
1311
1301
|
|
|
1312
1302
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1313
|
-
var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1303
|
+
var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
1314
1304
|
var O, tag, result;
|
|
1315
1305
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1316
1306
|
// @@toStringTag case
|
|
1317
1307
|
: typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$2)) == 'string' ? tag
|
|
1318
1308
|
// builtinTag case
|
|
1319
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1309
|
+
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1320
1310
|
// ES3 arguments fallback
|
|
1321
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
|
|
1311
|
+
: (result = classofRaw$1(O)) == 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
|
|
1322
1312
|
};
|
|
1323
1313
|
|
|
1324
1314
|
var classof$1 = classof$2;
|
|
@@ -1347,13 +1337,13 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
1347
1337
|
};
|
|
1348
1338
|
|
|
1349
1339
|
var $$2 = _export;
|
|
1350
|
-
var uncurryThis$
|
|
1340
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1351
1341
|
var notARegExp = notARegexp;
|
|
1352
1342
|
var requireObjectCoercible$2 = requireObjectCoercible$5;
|
|
1353
1343
|
var toString$3 = toString$4;
|
|
1354
1344
|
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
1355
1345
|
|
|
1356
|
-
var stringIndexOf$1 = uncurryThis$
|
|
1346
|
+
var stringIndexOf$1 = uncurryThis$7(''.indexOf);
|
|
1357
1347
|
|
|
1358
1348
|
// `String.prototype.includes` method
|
|
1359
1349
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
@@ -1442,7 +1432,7 @@ var regexpUnsupportedNcg = fails$4(function () {
|
|
|
1442
1432
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1443
1433
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1444
1434
|
var call$4 = functionCall;
|
|
1445
|
-
var uncurryThis$
|
|
1435
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1446
1436
|
var toString$2 = toString$4;
|
|
1447
1437
|
var regexpFlags = regexpFlags$1;
|
|
1448
1438
|
var stickyHelpers = regexpStickyHelpers;
|
|
@@ -1455,10 +1445,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
|
1455
1445
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1456
1446
|
var nativeExec = RegExp.prototype.exec;
|
|
1457
1447
|
var patchedExec = nativeExec;
|
|
1458
|
-
var charAt$3 = uncurryThis$
|
|
1459
|
-
var indexOf = uncurryThis$
|
|
1460
|
-
var replace$1 = uncurryThis$
|
|
1461
|
-
var stringSlice$3 = uncurryThis$
|
|
1448
|
+
var charAt$3 = uncurryThis$6(''.charAt);
|
|
1449
|
+
var indexOf = uncurryThis$6(''.indexOf);
|
|
1450
|
+
var replace$1 = uncurryThis$6(''.replace);
|
|
1451
|
+
var stringSlice$3 = uncurryThis$6(''.slice);
|
|
1462
1452
|
|
|
1463
1453
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1464
1454
|
var re1 = /a/;
|
|
@@ -1576,9 +1566,19 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND
|
|
|
1576
1566
|
return call$3.apply(apply$1, arguments);
|
|
1577
1567
|
});
|
|
1578
1568
|
|
|
1569
|
+
var classofRaw = classofRaw$2;
|
|
1570
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
1571
|
+
|
|
1572
|
+
var functionUncurryThisClause = function (fn) {
|
|
1573
|
+
// Nashorn bug:
|
|
1574
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
1575
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
1576
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$5(fn);
|
|
1577
|
+
};
|
|
1578
|
+
|
|
1579
1579
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
1580
1580
|
|
|
1581
|
-
var uncurryThis$4 =
|
|
1581
|
+
var uncurryThis$4 = functionUncurryThisClause;
|
|
1582
1582
|
var defineBuiltIn$2 = defineBuiltIn$4;
|
|
1583
1583
|
var regexpExec$1 = regexpExec$2;
|
|
1584
1584
|
var fails$3 = fails$h;
|
|
@@ -1965,15 +1965,12 @@ const ManagerApolloProvider = ({
|
|
|
1965
1965
|
}));
|
|
1966
1966
|
const errorLink = onError(errorResponse => {
|
|
1967
1967
|
var _a, _b;
|
|
1968
|
-
|
|
1969
1968
|
const traceIds = []; // Used to hold id's for use in Sentry
|
|
1970
|
-
|
|
1971
1969
|
if (errorResponse.graphQLErrors) {
|
|
1972
1970
|
// eslint-disable-next-line no-console
|
|
1973
1971
|
console.error("Error Fetching Data", errorResponse.graphQLErrors);
|
|
1974
1972
|
(_a = errorResponse.graphQLErrors) === null || _a === void 0 ? void 0 : _a.forEach(error => {
|
|
1975
1973
|
var _a, _b;
|
|
1976
|
-
|
|
1977
1974
|
if (error === null || error === void 0 ? void 0 : error.extensions) {
|
|
1978
1975
|
error.extensions.traceId = (_b = (_a = errorResponse.response) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.traceId;
|
|
1979
1976
|
traceIds.push(error.extensions.traceId);
|
|
@@ -1984,12 +1981,10 @@ const ManagerApolloProvider = ({
|
|
|
1984
1981
|
* it contains extra details like the query/mutation
|
|
1985
1982
|
* name.
|
|
1986
1983
|
*/
|
|
1987
|
-
|
|
1988
1984
|
if (Sentry) {
|
|
1989
1985
|
if (traceIds.length) {
|
|
1990
1986
|
Sentry.setTag("traceIds", traceIds.join(", "));
|
|
1991
1987
|
}
|
|
1992
|
-
|
|
1993
1988
|
Sentry.addBreadcrumb({
|
|
1994
1989
|
category: "GraphQL",
|
|
1995
1990
|
message: "GraphQL Error",
|
|
@@ -2000,17 +1995,13 @@ const ManagerApolloProvider = ({
|
|
|
2000
1995
|
});
|
|
2001
1996
|
}
|
|
2002
1997
|
}
|
|
2003
|
-
|
|
2004
1998
|
const invalidToken = (_b = errorResponse.graphQLErrors) === null || _b === void 0 ? void 0 : _b.some(x => {
|
|
2005
1999
|
var _a, _b;
|
|
2006
|
-
|
|
2007
2000
|
return ((_a = x === null || x === void 0 ? void 0 : x.extensions) === null || _a === void 0 ? void 0 : _a.code) === "UNAUTHENTICATED" || ((_b = x === null || x === void 0 ? void 0 : x.message) === null || _b === void 0 ? void 0 : _b.includes("Invalid token specified"));
|
|
2008
2001
|
});
|
|
2009
|
-
|
|
2010
2002
|
if (invalidToken) {
|
|
2011
2003
|
window.location.replace(`${publicUrl}logout`);
|
|
2012
2004
|
}
|
|
2013
|
-
|
|
2014
2005
|
if (errorResponse.networkError) {
|
|
2015
2006
|
// eslint-disable-next-line no-console
|
|
2016
2007
|
console.error(errorResponse.networkError);
|
|
@@ -2451,7 +2442,6 @@ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
|
2451
2442
|
*
|
|
2452
2443
|
* @param methods STABLE object with the methods you'd want to subscribe to. Wrap in useMemo for instance to make it stable
|
|
2453
2444
|
*/
|
|
2454
|
-
|
|
2455
2445
|
const useSubscribeToHostChanges = methods => {
|
|
2456
2446
|
useEffect(() => {
|
|
2457
2447
|
const connection = setupHostConnector(methods);
|
|
@@ -2476,11 +2466,9 @@ const TileAssetSortingProvider = ({
|
|
|
2476
2466
|
sortingState: assetSortingState,
|
|
2477
2467
|
setSortBy: AssetSortingRuntime.setAssetSortingState
|
|
2478
2468
|
}), [assetSortingState]);
|
|
2479
|
-
|
|
2480
2469
|
if (!assetSortingState) {
|
|
2481
2470
|
return null;
|
|
2482
2471
|
}
|
|
2483
|
-
|
|
2484
2472
|
return jsx(AssetSortingProvider, Object.assign({
|
|
2485
2473
|
value: contextValue
|
|
2486
2474
|
}, {
|
|
@@ -2497,19 +2485,16 @@ const TileEnvironmentProvider = ({
|
|
|
2497
2485
|
try {
|
|
2498
2486
|
setEnvironment(yield EnvironmentRuntime.getEnvironmentContext());
|
|
2499
2487
|
} catch (error) {
|
|
2500
|
-
setEnvironment(null);
|
|
2501
|
-
|
|
2488
|
+
setEnvironment(null);
|
|
2489
|
+
// eslint-disable-next-line no-console
|
|
2502
2490
|
console.error("Could not load environment!");
|
|
2503
2491
|
}
|
|
2504
2492
|
});
|
|
2505
|
-
|
|
2506
2493
|
updateEnv();
|
|
2507
2494
|
}, []);
|
|
2508
|
-
|
|
2509
2495
|
if (!environment) {
|
|
2510
2496
|
return null;
|
|
2511
2497
|
}
|
|
2512
|
-
|
|
2513
2498
|
return jsx(EnvironmentContextProvider, Object.assign({
|
|
2514
2499
|
value: environment
|
|
2515
2500
|
}, {
|
|
@@ -2528,11 +2513,9 @@ const TileGlobalSelectionProvider = ({
|
|
|
2528
2513
|
onGlobalSelectionChanged: setGlobalSelectionContext
|
|
2529
2514
|
}), [setGlobalSelectionContext]);
|
|
2530
2515
|
useSubscribeToHostChanges(methods);
|
|
2531
|
-
|
|
2532
2516
|
if (!GlobalSelectionContext) {
|
|
2533
2517
|
return null;
|
|
2534
2518
|
}
|
|
2535
|
-
|
|
2536
2519
|
return jsx(GlobalSelectionProvider, Object.assign({
|
|
2537
2520
|
value: GlobalSelectionContext
|
|
2538
2521
|
}, {
|
|
@@ -2552,18 +2535,15 @@ const TileTokenProvider = ({
|
|
|
2552
2535
|
setTokenContext(null);
|
|
2553
2536
|
}
|
|
2554
2537
|
});
|
|
2555
|
-
|
|
2556
2538
|
updateContext();
|
|
2557
2539
|
}, []);
|
|
2558
2540
|
const methods = React.useMemo(() => ({
|
|
2559
2541
|
onTokenChanged: setTokenContext
|
|
2560
2542
|
}), [setTokenContext]);
|
|
2561
2543
|
useSubscribeToHostChanges(methods);
|
|
2562
|
-
|
|
2563
2544
|
if (!tokenContext) {
|
|
2564
2545
|
return null;
|
|
2565
2546
|
}
|
|
2566
|
-
|
|
2567
2547
|
return jsx(TokenProvider, Object.assign({
|
|
2568
2548
|
value: tokenContext
|
|
2569
2549
|
}, {
|
|
@@ -2578,11 +2558,9 @@ const TileCurrentUserProvider = ({
|
|
|
2578
2558
|
React.useEffect(() => {
|
|
2579
2559
|
CurrentUserRuntime.getCurrentUserContext().catch(() => null).then(setCurrentUserContext);
|
|
2580
2560
|
}, []);
|
|
2581
|
-
|
|
2582
2561
|
if (!currentuserContext) {
|
|
2583
2562
|
return null;
|
|
2584
2563
|
}
|
|
2585
|
-
|
|
2586
2564
|
return jsx(CurrentUserProvider, Object.assign({
|
|
2587
2565
|
value: currentuserContext
|
|
2588
2566
|
}, {
|
|
@@ -2597,11 +2575,9 @@ const UserSubscriptionProvider = ({
|
|
|
2597
2575
|
React.useEffect(() => {
|
|
2598
2576
|
UserSubscriptionRuntime.getUserSubscriptionContext().catch(() => null).then(setSubscription);
|
|
2599
2577
|
}, []);
|
|
2600
|
-
|
|
2601
2578
|
if (!subscription) {
|
|
2602
2579
|
return null;
|
|
2603
2580
|
}
|
|
2604
|
-
|
|
2605
2581
|
return jsx(UserSubscriptionProvider$1, Object.assign({
|
|
2606
2582
|
value: subscription
|
|
2607
2583
|
}, {
|
|
@@ -2630,18 +2606,16 @@ const TrackunitDataProviders = ({
|
|
|
2630
2606
|
const HostNavigator = ({
|
|
2631
2607
|
children
|
|
2632
2608
|
}) => {
|
|
2633
|
-
useURLSynchronization();
|
|
2634
|
-
|
|
2609
|
+
useURLSynchronization();
|
|
2610
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
2635
2611
|
return jsx(Fragment, {
|
|
2636
2612
|
children: children
|
|
2637
2613
|
});
|
|
2638
2614
|
};
|
|
2639
|
-
|
|
2640
2615
|
const TrackunitRouter = ({
|
|
2641
2616
|
children
|
|
2642
2617
|
}) => {
|
|
2643
2618
|
var _a;
|
|
2644
|
-
|
|
2645
2619
|
useEnvironment();
|
|
2646
2620
|
return jsx(BrowserRouter, Object.assign({
|
|
2647
2621
|
basename: `${((_a = document.getElementById("baseHref")) === null || _a === void 0 ? void 0 : _a.getAttribute("href")) || "<missing baseHref>"}${global.module}`
|
|
@@ -2661,7 +2635,6 @@ const TrackunitProviders = ({
|
|
|
2661
2635
|
}
|
|
2662
2636
|
|
|
2663
2637
|
initializeTranslationsForApp(); // Initialize all registered translations
|
|
2664
|
-
|
|
2665
2638
|
return jsx(TrackunitDataProviders, {
|
|
2666
2639
|
children: jsx(ToastProviderApp, {
|
|
2667
2640
|
children: jsx(React.Suspense, Object.assign({
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"graphql": "^15.8.0",
|
|
8
|
-
"@trackunit/iris-app-runtime-core": "0.3.
|
|
9
|
-
"@trackunit/react-core-contexts-api": "0.2.
|
|
10
|
-
"@trackunit/react-core-contexts-test": "0.1.
|
|
11
|
-
"@trackunit/react-core-hooks": "0.2.
|
|
8
|
+
"@trackunit/iris-app-runtime-core": "0.3.2",
|
|
9
|
+
"@trackunit/react-core-contexts-api": "0.2.4",
|
|
10
|
+
"@trackunit/react-core-contexts-test": "0.1.10",
|
|
11
|
+
"@trackunit/react-core-hooks": "0.2.10",
|
|
12
12
|
"react": "17.0.2",
|
|
13
13
|
"@apollo/client": "3.6.9",
|
|
14
|
-
"@sentry/browser": "
|
|
15
|
-
"apollo-upload-client": "
|
|
16
|
-
"@trackunit/i18n-library-translation": "0.0.
|
|
17
|
-
"@trackunit/react-components": "0.0.
|
|
18
|
-
"react-router-dom": "6.4.
|
|
14
|
+
"@sentry/browser": "7.24.2",
|
|
15
|
+
"apollo-upload-client": "14.1.3",
|
|
16
|
+
"@trackunit/i18n-library-translation": "0.0.14",
|
|
17
|
+
"@trackunit/react-components": "0.0.203",
|
|
18
|
+
"react-router-dom": "6.4.3"
|
|
19
19
|
},
|
|
20
20
|
"module": "./index.js",
|
|
21
21
|
"main": "./index.js",
|
|
22
22
|
"type": "module",
|
|
23
|
-
"types": "./index.d.ts",
|
|
23
|
+
"types": "./src/index.d.ts",
|
|
24
24
|
"peerDependencies": {}
|
|
25
25
|
}
|
|
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
|