@livetiles/reach-components-react 0.3.57 → 0.3.62
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.esm2.js +219 -7
- package/index.umd.js +219 -7
- package/package.json +1 -1
package/index.esm2.js
CHANGED
|
@@ -53377,7 +53377,7 @@ fixRegExpWellKnownSymbolLogic$3$1('replace', 2, function (REPLACE, nativeReplace
|
|
|
53377
53377
|
}
|
|
53378
53378
|
});
|
|
53379
53379
|
|
|
53380
|
-
function
|
|
53380
|
+
function usePluginDeviceStore() {
|
|
53381
53381
|
var storage = useContext(PluginContext).storage;
|
|
53382
53382
|
return storage;
|
|
53383
53383
|
}
|
|
@@ -53476,6 +53476,210 @@ function getStorageWrapper(pluginId, storage) {
|
|
|
53476
53476
|
}
|
|
53477
53477
|
}
|
|
53478
53478
|
|
|
53479
|
+
function silenceNotFound(reason) {
|
|
53480
|
+
var _a;
|
|
53481
|
+
|
|
53482
|
+
if (((_a = reason === null || reason === void 0 ? void 0 : reason.response) === null || _a === void 0 ? void 0 : _a.statusCode) === 404) {
|
|
53483
|
+
return undefined;
|
|
53484
|
+
}
|
|
53485
|
+
|
|
53486
|
+
throw reason;
|
|
53487
|
+
}
|
|
53488
|
+
|
|
53489
|
+
function usePluginUserStore() {
|
|
53490
|
+
var userStore = useContext(PluginContext).userStore;
|
|
53491
|
+
return userStore;
|
|
53492
|
+
}
|
|
53493
|
+
|
|
53494
|
+
function usePluginUserStoreValue(key, deps) {
|
|
53495
|
+
var _this = this;
|
|
53496
|
+
|
|
53497
|
+
var userStore = useContext(PluginContext).userStore;
|
|
53498
|
+
|
|
53499
|
+
var _a = usePromise$2(function () {
|
|
53500
|
+
return userStore.get(key).catch(silenceNotFound);
|
|
53501
|
+
}, undefined, __spreadArray$4(__spreadArray$4([], deps || []), [key])),
|
|
53502
|
+
data = _a[0],
|
|
53503
|
+
isLoading = _a[1],
|
|
53504
|
+
error = _a[2],
|
|
53505
|
+
setState = _a[3],
|
|
53506
|
+
refresh = _a[4];
|
|
53507
|
+
|
|
53508
|
+
return {
|
|
53509
|
+
data: data,
|
|
53510
|
+
set: function (newValue) {
|
|
53511
|
+
return __awaiter$7(_this, void 0, void 0, function () {
|
|
53512
|
+
var prevValue;
|
|
53513
|
+
return __generator$7(this, function (_a) {
|
|
53514
|
+
switch (_a.label) {
|
|
53515
|
+
case 0:
|
|
53516
|
+
prevValue = data ? JSON.parse(JSON.stringify(data)) : undefined;
|
|
53517
|
+
setState(newValue);
|
|
53518
|
+
return [4
|
|
53519
|
+
/*yield*/
|
|
53520
|
+
, userStore.set(key, newValue).catch(function (reason) {
|
|
53521
|
+
setState(prevValue);
|
|
53522
|
+
return silenceNotFound(reason);
|
|
53523
|
+
})];
|
|
53524
|
+
|
|
53525
|
+
case 1:
|
|
53526
|
+
return [2
|
|
53527
|
+
/*return*/
|
|
53528
|
+
, _a.sent()];
|
|
53529
|
+
}
|
|
53530
|
+
});
|
|
53531
|
+
});
|
|
53532
|
+
},
|
|
53533
|
+
isLoading: isLoading,
|
|
53534
|
+
error: error,
|
|
53535
|
+
refresh: refresh,
|
|
53536
|
+
remove: function () {
|
|
53537
|
+
return __awaiter$7(_this, void 0, void 0, function () {
|
|
53538
|
+
var prevValue;
|
|
53539
|
+
return __generator$7(this, function (_a) {
|
|
53540
|
+
switch (_a.label) {
|
|
53541
|
+
case 0:
|
|
53542
|
+
prevValue = data ? JSON.parse(JSON.stringify(data)) : undefined;
|
|
53543
|
+
setState(undefined);
|
|
53544
|
+
return [4
|
|
53545
|
+
/*yield*/
|
|
53546
|
+
, userStore.delete(key).catch(function (reason) {
|
|
53547
|
+
setState(prevValue);
|
|
53548
|
+
return silenceNotFound(reason);
|
|
53549
|
+
})];
|
|
53550
|
+
|
|
53551
|
+
case 1:
|
|
53552
|
+
return [2
|
|
53553
|
+
/*return*/
|
|
53554
|
+
, _a.sent()];
|
|
53555
|
+
}
|
|
53556
|
+
});
|
|
53557
|
+
});
|
|
53558
|
+
}
|
|
53559
|
+
};
|
|
53560
|
+
}
|
|
53561
|
+
|
|
53562
|
+
function getPluginUserStoreWrapper(pluginId, api) {
|
|
53563
|
+
return {
|
|
53564
|
+
get: getPluginUserValue,
|
|
53565
|
+
set: setPluginUserValue,
|
|
53566
|
+
delete: deletePluginUserValue
|
|
53567
|
+
};
|
|
53568
|
+
|
|
53569
|
+
function getPluginUserValue(key) {
|
|
53570
|
+
return api.custom("users/current/plugins/" + pluginId + "/store/" + key + "/value").get().then(function (res) {
|
|
53571
|
+
return res.body().data();
|
|
53572
|
+
});
|
|
53573
|
+
}
|
|
53574
|
+
|
|
53575
|
+
function setPluginUserValue(key, value) {
|
|
53576
|
+
return api.custom("users/current/plugins/" + pluginId + "/store/" + key + "/value").put(value).then(function (res) {
|
|
53577
|
+
return res.body().data();
|
|
53578
|
+
});
|
|
53579
|
+
}
|
|
53580
|
+
|
|
53581
|
+
function deletePluginUserValue(key) {
|
|
53582
|
+
return api.custom("users/current/plugins/" + pluginId + "/store/" + key + "/value").delete();
|
|
53583
|
+
}
|
|
53584
|
+
}
|
|
53585
|
+
|
|
53586
|
+
function usePluginSubscriptionStore() {
|
|
53587
|
+
var subscriptionStore = useContext(PluginContext).subscriptionStore;
|
|
53588
|
+
return subscriptionStore;
|
|
53589
|
+
}
|
|
53590
|
+
|
|
53591
|
+
function usePluginSubscriptionStoreValue(key, deps) {
|
|
53592
|
+
var _this = this;
|
|
53593
|
+
|
|
53594
|
+
var subscriptionStore = useContext(PluginContext).subscriptionStore;
|
|
53595
|
+
|
|
53596
|
+
var _a = usePromise$2(function () {
|
|
53597
|
+
return subscriptionStore.get(key).catch(silenceNotFound);
|
|
53598
|
+
}, undefined, __spreadArray$4(__spreadArray$4([], deps || []), [key])),
|
|
53599
|
+
data = _a[0],
|
|
53600
|
+
isLoading = _a[1],
|
|
53601
|
+
error = _a[2],
|
|
53602
|
+
setState = _a[3],
|
|
53603
|
+
refresh = _a[4];
|
|
53604
|
+
|
|
53605
|
+
return {
|
|
53606
|
+
data: data,
|
|
53607
|
+
set: function (newValue) {
|
|
53608
|
+
return __awaiter$7(_this, void 0, void 0, function () {
|
|
53609
|
+
var prevValue;
|
|
53610
|
+
return __generator$7(this, function (_a) {
|
|
53611
|
+
switch (_a.label) {
|
|
53612
|
+
case 0:
|
|
53613
|
+
prevValue = data ? JSON.parse(JSON.stringify(data)) : undefined;
|
|
53614
|
+
setState(newValue);
|
|
53615
|
+
return [4
|
|
53616
|
+
/*yield*/
|
|
53617
|
+
, subscriptionStore.set(key, newValue).catch(function (reason) {
|
|
53618
|
+
setState(prevValue);
|
|
53619
|
+
return silenceNotFound(reason);
|
|
53620
|
+
})];
|
|
53621
|
+
|
|
53622
|
+
case 1:
|
|
53623
|
+
return [2
|
|
53624
|
+
/*return*/
|
|
53625
|
+
, _a.sent()];
|
|
53626
|
+
}
|
|
53627
|
+
});
|
|
53628
|
+
});
|
|
53629
|
+
},
|
|
53630
|
+
isLoading: isLoading,
|
|
53631
|
+
error: error,
|
|
53632
|
+
refresh: refresh,
|
|
53633
|
+
remove: function () {
|
|
53634
|
+
return __awaiter$7(_this, void 0, void 0, function () {
|
|
53635
|
+
var prevValue;
|
|
53636
|
+
return __generator$7(this, function (_a) {
|
|
53637
|
+
switch (_a.label) {
|
|
53638
|
+
case 0:
|
|
53639
|
+
prevValue = data ? JSON.parse(JSON.stringify(data)) : undefined;
|
|
53640
|
+
setState(undefined);
|
|
53641
|
+
return [4
|
|
53642
|
+
/*yield*/
|
|
53643
|
+
, subscriptionStore.delete(key).catch(function (reason) {
|
|
53644
|
+
setState(prevValue);
|
|
53645
|
+
return silenceNotFound(reason);
|
|
53646
|
+
})];
|
|
53647
|
+
|
|
53648
|
+
case 1:
|
|
53649
|
+
return [2
|
|
53650
|
+
/*return*/
|
|
53651
|
+
, _a.sent()];
|
|
53652
|
+
}
|
|
53653
|
+
});
|
|
53654
|
+
});
|
|
53655
|
+
}
|
|
53656
|
+
};
|
|
53657
|
+
}
|
|
53658
|
+
|
|
53659
|
+
function getPluginSubscriptionStoreWrapper(pluginId, api) {
|
|
53660
|
+
return {
|
|
53661
|
+
get: getPluginSubscriptionValue,
|
|
53662
|
+
set: setPluginSubscriptionValue,
|
|
53663
|
+
delete: deletePluginSubscriptionValue
|
|
53664
|
+
};
|
|
53665
|
+
|
|
53666
|
+
function getPluginSubscriptionValue(key) {
|
|
53667
|
+
return api.custom("subscriptions/current/plugins/" + pluginId + "/store/" + key + "/value").get().then(function (res) {
|
|
53668
|
+
return res.body().data();
|
|
53669
|
+
});
|
|
53670
|
+
}
|
|
53671
|
+
|
|
53672
|
+
function setPluginSubscriptionValue(key, value) {
|
|
53673
|
+
return api.custom("subscriptions/current/plugins/" + pluginId + "/store/" + key + "/value").put(value).then(function (res) {
|
|
53674
|
+
return res.body().data();
|
|
53675
|
+
});
|
|
53676
|
+
}
|
|
53677
|
+
|
|
53678
|
+
function deletePluginSubscriptionValue(key) {
|
|
53679
|
+
return api.custom("subscriptions/current/plugins/" + pluginId + "/store/" + key + "/value").delete();
|
|
53680
|
+
}
|
|
53681
|
+
}
|
|
53682
|
+
|
|
53479
53683
|
var PluginWrapper = function PluginWrapper(_a) {
|
|
53480
53684
|
var pluginId = _a.pluginId,
|
|
53481
53685
|
componentName = _a.componentName,
|
|
@@ -53485,6 +53689,7 @@ var PluginWrapper = function PluginWrapper(_a) {
|
|
|
53485
53689
|
props = __rest$2(_a, ["pluginId", "componentName", "settings", "bundleUrl", "bundleModificationDate"]);
|
|
53486
53690
|
|
|
53487
53691
|
var storage = useStorage();
|
|
53692
|
+
var api = useApi();
|
|
53488
53693
|
var getPluginFileUrl = usePluginApi().getPluginFileUrl;
|
|
53489
53694
|
var LazyComponent = useMemo(function () {
|
|
53490
53695
|
return /*#__PURE__*/lazy$1(function () {
|
|
@@ -53494,9 +53699,11 @@ var PluginWrapper = function PluginWrapper(_a) {
|
|
|
53494
53699
|
var pluginContext = useMemo(function () {
|
|
53495
53700
|
return {
|
|
53496
53701
|
settings: settings,
|
|
53497
|
-
storage: getStorageWrapper(pluginId, storage)
|
|
53702
|
+
storage: getStorageWrapper(pluginId, storage),
|
|
53703
|
+
userStore: getPluginUserStoreWrapper(pluginId, api),
|
|
53704
|
+
subscriptionStore: getPluginSubscriptionStoreWrapper(pluginId, api)
|
|
53498
53705
|
};
|
|
53499
|
-
}, [pluginId, settings, storage]);
|
|
53706
|
+
}, [pluginId, settings, storage, api]);
|
|
53500
53707
|
return jsx$1(Suspense, __assign$a({
|
|
53501
53708
|
fallback: jsx$1("div", {}, void 0)
|
|
53502
53709
|
}, {
|
|
@@ -87393,7 +87600,12 @@ var ReachCore = /*#__PURE__*/Object.freeze({
|
|
|
87393
87600
|
createId: createId,
|
|
87394
87601
|
ResourceContext: ResourceContext,
|
|
87395
87602
|
usePluginSettings: usePluginSettings,
|
|
87396
|
-
usePluginStorage:
|
|
87603
|
+
usePluginStorage: usePluginDeviceStore,
|
|
87604
|
+
usePluginDeviceStore: usePluginDeviceStore,
|
|
87605
|
+
usePluginSubscriptionStore: usePluginSubscriptionStore,
|
|
87606
|
+
usePluginSubscriptionStoreValue: usePluginSubscriptionStoreValue,
|
|
87607
|
+
usePluginUserStore: usePluginUserStore,
|
|
87608
|
+
usePluginUserStoreValue: usePluginUserStoreValue,
|
|
87397
87609
|
useReachApiEndPoints: useReachApiEndPoints,
|
|
87398
87610
|
AccountType: AccountType,
|
|
87399
87611
|
PeoplePicker: PeoplePicker,
|
|
@@ -87587,9 +87799,9 @@ var AuthenticationContextProvider = function AuthenticationContextProvider(_a) {
|
|
|
87587
87799
|
}), void 0);
|
|
87588
87800
|
};
|
|
87589
87801
|
|
|
87590
|
-
var version$1 = "0.3.
|
|
87591
|
-
var buildId = "
|
|
87592
|
-
var commitId = "
|
|
87802
|
+
var version$1 = "0.3.62";
|
|
87803
|
+
var buildId = "101307";
|
|
87804
|
+
var commitId = "e3f8f643cdb08e426cef29cac1041b071b4706e2";
|
|
87593
87805
|
var isCustomerBuild = false;
|
|
87594
87806
|
var buildInfo = {
|
|
87595
87807
|
version: version$1,
|
package/index.umd.js
CHANGED
|
@@ -53235,7 +53235,7 @@
|
|
|
53235
53235
|
}
|
|
53236
53236
|
});
|
|
53237
53237
|
|
|
53238
|
-
function
|
|
53238
|
+
function usePluginDeviceStore() {
|
|
53239
53239
|
var storage = React$d.useContext(PluginContext).storage;
|
|
53240
53240
|
return storage;
|
|
53241
53241
|
}
|
|
@@ -53334,6 +53334,210 @@
|
|
|
53334
53334
|
}
|
|
53335
53335
|
}
|
|
53336
53336
|
|
|
53337
|
+
function silenceNotFound(reason) {
|
|
53338
|
+
var _a;
|
|
53339
|
+
|
|
53340
|
+
if (((_a = reason === null || reason === void 0 ? void 0 : reason.response) === null || _a === void 0 ? void 0 : _a.statusCode) === 404) {
|
|
53341
|
+
return undefined;
|
|
53342
|
+
}
|
|
53343
|
+
|
|
53344
|
+
throw reason;
|
|
53345
|
+
}
|
|
53346
|
+
|
|
53347
|
+
function usePluginUserStore() {
|
|
53348
|
+
var userStore = React$d.useContext(PluginContext).userStore;
|
|
53349
|
+
return userStore;
|
|
53350
|
+
}
|
|
53351
|
+
|
|
53352
|
+
function usePluginUserStoreValue(key, deps) {
|
|
53353
|
+
var _this = this;
|
|
53354
|
+
|
|
53355
|
+
var userStore = React$d.useContext(PluginContext).userStore;
|
|
53356
|
+
|
|
53357
|
+
var _a = usePromise$2(function () {
|
|
53358
|
+
return userStore.get(key).catch(silenceNotFound);
|
|
53359
|
+
}, undefined, __spreadArray$4(__spreadArray$4([], deps || []), [key])),
|
|
53360
|
+
data = _a[0],
|
|
53361
|
+
isLoading = _a[1],
|
|
53362
|
+
error = _a[2],
|
|
53363
|
+
setState = _a[3],
|
|
53364
|
+
refresh = _a[4];
|
|
53365
|
+
|
|
53366
|
+
return {
|
|
53367
|
+
data: data,
|
|
53368
|
+
set: function (newValue) {
|
|
53369
|
+
return __awaiter$7(_this, void 0, void 0, function () {
|
|
53370
|
+
var prevValue;
|
|
53371
|
+
return __generator$7(this, function (_a) {
|
|
53372
|
+
switch (_a.label) {
|
|
53373
|
+
case 0:
|
|
53374
|
+
prevValue = data ? JSON.parse(JSON.stringify(data)) : undefined;
|
|
53375
|
+
setState(newValue);
|
|
53376
|
+
return [4
|
|
53377
|
+
/*yield*/
|
|
53378
|
+
, userStore.set(key, newValue).catch(function (reason) {
|
|
53379
|
+
setState(prevValue);
|
|
53380
|
+
return silenceNotFound(reason);
|
|
53381
|
+
})];
|
|
53382
|
+
|
|
53383
|
+
case 1:
|
|
53384
|
+
return [2
|
|
53385
|
+
/*return*/
|
|
53386
|
+
, _a.sent()];
|
|
53387
|
+
}
|
|
53388
|
+
});
|
|
53389
|
+
});
|
|
53390
|
+
},
|
|
53391
|
+
isLoading: isLoading,
|
|
53392
|
+
error: error,
|
|
53393
|
+
refresh: refresh,
|
|
53394
|
+
remove: function () {
|
|
53395
|
+
return __awaiter$7(_this, void 0, void 0, function () {
|
|
53396
|
+
var prevValue;
|
|
53397
|
+
return __generator$7(this, function (_a) {
|
|
53398
|
+
switch (_a.label) {
|
|
53399
|
+
case 0:
|
|
53400
|
+
prevValue = data ? JSON.parse(JSON.stringify(data)) : undefined;
|
|
53401
|
+
setState(undefined);
|
|
53402
|
+
return [4
|
|
53403
|
+
/*yield*/
|
|
53404
|
+
, userStore.delete(key).catch(function (reason) {
|
|
53405
|
+
setState(prevValue);
|
|
53406
|
+
return silenceNotFound(reason);
|
|
53407
|
+
})];
|
|
53408
|
+
|
|
53409
|
+
case 1:
|
|
53410
|
+
return [2
|
|
53411
|
+
/*return*/
|
|
53412
|
+
, _a.sent()];
|
|
53413
|
+
}
|
|
53414
|
+
});
|
|
53415
|
+
});
|
|
53416
|
+
}
|
|
53417
|
+
};
|
|
53418
|
+
}
|
|
53419
|
+
|
|
53420
|
+
function getPluginUserStoreWrapper(pluginId, api) {
|
|
53421
|
+
return {
|
|
53422
|
+
get: getPluginUserValue,
|
|
53423
|
+
set: setPluginUserValue,
|
|
53424
|
+
delete: deletePluginUserValue
|
|
53425
|
+
};
|
|
53426
|
+
|
|
53427
|
+
function getPluginUserValue(key) {
|
|
53428
|
+
return api.custom("users/current/plugins/" + pluginId + "/store/" + key + "/value").get().then(function (res) {
|
|
53429
|
+
return res.body().data();
|
|
53430
|
+
});
|
|
53431
|
+
}
|
|
53432
|
+
|
|
53433
|
+
function setPluginUserValue(key, value) {
|
|
53434
|
+
return api.custom("users/current/plugins/" + pluginId + "/store/" + key + "/value").put(value).then(function (res) {
|
|
53435
|
+
return res.body().data();
|
|
53436
|
+
});
|
|
53437
|
+
}
|
|
53438
|
+
|
|
53439
|
+
function deletePluginUserValue(key) {
|
|
53440
|
+
return api.custom("users/current/plugins/" + pluginId + "/store/" + key + "/value").delete();
|
|
53441
|
+
}
|
|
53442
|
+
}
|
|
53443
|
+
|
|
53444
|
+
function usePluginSubscriptionStore() {
|
|
53445
|
+
var subscriptionStore = React$d.useContext(PluginContext).subscriptionStore;
|
|
53446
|
+
return subscriptionStore;
|
|
53447
|
+
}
|
|
53448
|
+
|
|
53449
|
+
function usePluginSubscriptionStoreValue(key, deps) {
|
|
53450
|
+
var _this = this;
|
|
53451
|
+
|
|
53452
|
+
var subscriptionStore = React$d.useContext(PluginContext).subscriptionStore;
|
|
53453
|
+
|
|
53454
|
+
var _a = usePromise$2(function () {
|
|
53455
|
+
return subscriptionStore.get(key).catch(silenceNotFound);
|
|
53456
|
+
}, undefined, __spreadArray$4(__spreadArray$4([], deps || []), [key])),
|
|
53457
|
+
data = _a[0],
|
|
53458
|
+
isLoading = _a[1],
|
|
53459
|
+
error = _a[2],
|
|
53460
|
+
setState = _a[3],
|
|
53461
|
+
refresh = _a[4];
|
|
53462
|
+
|
|
53463
|
+
return {
|
|
53464
|
+
data: data,
|
|
53465
|
+
set: function (newValue) {
|
|
53466
|
+
return __awaiter$7(_this, void 0, void 0, function () {
|
|
53467
|
+
var prevValue;
|
|
53468
|
+
return __generator$7(this, function (_a) {
|
|
53469
|
+
switch (_a.label) {
|
|
53470
|
+
case 0:
|
|
53471
|
+
prevValue = data ? JSON.parse(JSON.stringify(data)) : undefined;
|
|
53472
|
+
setState(newValue);
|
|
53473
|
+
return [4
|
|
53474
|
+
/*yield*/
|
|
53475
|
+
, subscriptionStore.set(key, newValue).catch(function (reason) {
|
|
53476
|
+
setState(prevValue);
|
|
53477
|
+
return silenceNotFound(reason);
|
|
53478
|
+
})];
|
|
53479
|
+
|
|
53480
|
+
case 1:
|
|
53481
|
+
return [2
|
|
53482
|
+
/*return*/
|
|
53483
|
+
, _a.sent()];
|
|
53484
|
+
}
|
|
53485
|
+
});
|
|
53486
|
+
});
|
|
53487
|
+
},
|
|
53488
|
+
isLoading: isLoading,
|
|
53489
|
+
error: error,
|
|
53490
|
+
refresh: refresh,
|
|
53491
|
+
remove: function () {
|
|
53492
|
+
return __awaiter$7(_this, void 0, void 0, function () {
|
|
53493
|
+
var prevValue;
|
|
53494
|
+
return __generator$7(this, function (_a) {
|
|
53495
|
+
switch (_a.label) {
|
|
53496
|
+
case 0:
|
|
53497
|
+
prevValue = data ? JSON.parse(JSON.stringify(data)) : undefined;
|
|
53498
|
+
setState(undefined);
|
|
53499
|
+
return [4
|
|
53500
|
+
/*yield*/
|
|
53501
|
+
, subscriptionStore.delete(key).catch(function (reason) {
|
|
53502
|
+
setState(prevValue);
|
|
53503
|
+
return silenceNotFound(reason);
|
|
53504
|
+
})];
|
|
53505
|
+
|
|
53506
|
+
case 1:
|
|
53507
|
+
return [2
|
|
53508
|
+
/*return*/
|
|
53509
|
+
, _a.sent()];
|
|
53510
|
+
}
|
|
53511
|
+
});
|
|
53512
|
+
});
|
|
53513
|
+
}
|
|
53514
|
+
};
|
|
53515
|
+
}
|
|
53516
|
+
|
|
53517
|
+
function getPluginSubscriptionStoreWrapper(pluginId, api) {
|
|
53518
|
+
return {
|
|
53519
|
+
get: getPluginSubscriptionValue,
|
|
53520
|
+
set: setPluginSubscriptionValue,
|
|
53521
|
+
delete: deletePluginSubscriptionValue
|
|
53522
|
+
};
|
|
53523
|
+
|
|
53524
|
+
function getPluginSubscriptionValue(key) {
|
|
53525
|
+
return api.custom("subscriptions/current/plugins/" + pluginId + "/store/" + key + "/value").get().then(function (res) {
|
|
53526
|
+
return res.body().data();
|
|
53527
|
+
});
|
|
53528
|
+
}
|
|
53529
|
+
|
|
53530
|
+
function setPluginSubscriptionValue(key, value) {
|
|
53531
|
+
return api.custom("subscriptions/current/plugins/" + pluginId + "/store/" + key + "/value").put(value).then(function (res) {
|
|
53532
|
+
return res.body().data();
|
|
53533
|
+
});
|
|
53534
|
+
}
|
|
53535
|
+
|
|
53536
|
+
function deletePluginSubscriptionValue(key) {
|
|
53537
|
+
return api.custom("subscriptions/current/plugins/" + pluginId + "/store/" + key + "/value").delete();
|
|
53538
|
+
}
|
|
53539
|
+
}
|
|
53540
|
+
|
|
53337
53541
|
var PluginWrapper = function PluginWrapper(_a) {
|
|
53338
53542
|
var pluginId = _a.pluginId,
|
|
53339
53543
|
componentName = _a.componentName,
|
|
@@ -53343,6 +53547,7 @@
|
|
|
53343
53547
|
props = __rest$2(_a, ["pluginId", "componentName", "settings", "bundleUrl", "bundleModificationDate"]);
|
|
53344
53548
|
|
|
53345
53549
|
var storage = useStorage();
|
|
53550
|
+
var api = useApi();
|
|
53346
53551
|
var getPluginFileUrl = usePluginApi().getPluginFileUrl;
|
|
53347
53552
|
var LazyComponent = React$d.useMemo(function () {
|
|
53348
53553
|
return /*#__PURE__*/React$d.lazy(function () {
|
|
@@ -53352,9 +53557,11 @@
|
|
|
53352
53557
|
var pluginContext = React$d.useMemo(function () {
|
|
53353
53558
|
return {
|
|
53354
53559
|
settings: settings,
|
|
53355
|
-
storage: getStorageWrapper(pluginId, storage)
|
|
53560
|
+
storage: getStorageWrapper(pluginId, storage),
|
|
53561
|
+
userStore: getPluginUserStoreWrapper(pluginId, api),
|
|
53562
|
+
subscriptionStore: getPluginSubscriptionStoreWrapper(pluginId, api)
|
|
53356
53563
|
};
|
|
53357
|
-
}, [pluginId, settings, storage]);
|
|
53564
|
+
}, [pluginId, settings, storage, api]);
|
|
53358
53565
|
return jsxRuntime.jsx(React$d.Suspense, __assign$a({
|
|
53359
53566
|
fallback: jsxRuntime.jsx("div", {}, void 0)
|
|
53360
53567
|
}, {
|
|
@@ -87251,7 +87458,12 @@
|
|
|
87251
87458
|
createId: createId,
|
|
87252
87459
|
ResourceContext: ResourceContext,
|
|
87253
87460
|
usePluginSettings: usePluginSettings,
|
|
87254
|
-
usePluginStorage:
|
|
87461
|
+
usePluginStorage: usePluginDeviceStore,
|
|
87462
|
+
usePluginDeviceStore: usePluginDeviceStore,
|
|
87463
|
+
usePluginSubscriptionStore: usePluginSubscriptionStore,
|
|
87464
|
+
usePluginSubscriptionStoreValue: usePluginSubscriptionStoreValue,
|
|
87465
|
+
usePluginUserStore: usePluginUserStore,
|
|
87466
|
+
usePluginUserStoreValue: usePluginUserStoreValue,
|
|
87255
87467
|
useReachApiEndPoints: useReachApiEndPoints,
|
|
87256
87468
|
AccountType: AccountType,
|
|
87257
87469
|
PeoplePicker: PeoplePicker,
|
|
@@ -87445,9 +87657,9 @@
|
|
|
87445
87657
|
}), void 0);
|
|
87446
87658
|
};
|
|
87447
87659
|
|
|
87448
|
-
var version$1 = "0.3.
|
|
87449
|
-
var buildId = "
|
|
87450
|
-
var commitId = "
|
|
87660
|
+
var version$1 = "0.3.62";
|
|
87661
|
+
var buildId = "101307";
|
|
87662
|
+
var commitId = "e3f8f643cdb08e426cef29cac1041b071b4706e2";
|
|
87451
87663
|
var isCustomerBuild = false;
|
|
87452
87664
|
var buildInfo = {
|
|
87453
87665
|
version: version$1,
|
package/package.json
CHANGED