authscape 1.0.444 → 1.0.448
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 +12 -4
- package/package.json +1 -1
- package/src/components/AuthScapeApp.js +13 -5
package/index.js
CHANGED
|
@@ -307,7 +307,14 @@ function AuthScapeApp(_ref) {
|
|
|
307
307
|
});
|
|
308
308
|
}
|
|
309
309
|
};
|
|
310
|
-
var
|
|
310
|
+
var setToastMessage = function setToastMessage(message) {
|
|
311
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
312
|
+
if (options != null) {
|
|
313
|
+
(0, _reactToastify.toast)(message, options);
|
|
314
|
+
} else {
|
|
315
|
+
(0, _reactToastify.toast)(message);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
311
318
|
var useStore = (0, _zustand.create)(function (set) {
|
|
312
319
|
return store;
|
|
313
320
|
});
|
|
@@ -323,18 +330,19 @@ function AuthScapeApp(_ref) {
|
|
|
323
330
|
children: /*#__PURE__*/_react["default"].createElement(Component, _extends({}, pageProps, {
|
|
324
331
|
currentUser: signedInUser.current,
|
|
325
332
|
toast: _reactToastify.toast,
|
|
333
|
+
loadedUser: frontEndLoadedState,
|
|
326
334
|
setIsLoading: setIsLoading,
|
|
327
335
|
logEvent: logEvent,
|
|
328
336
|
logPurchase: logPurchase,
|
|
329
337
|
store: useStore,
|
|
330
|
-
|
|
338
|
+
setToastMessage: setToastMessage
|
|
331
339
|
})),
|
|
332
340
|
currentUser: signedInUser.current,
|
|
333
341
|
logEvent: logEvent,
|
|
334
342
|
setIsLoading: setIsLoading,
|
|
335
343
|
toast: _reactToastify.toast,
|
|
336
344
|
store: useStore,
|
|
337
|
-
|
|
345
|
+
setToastMessage: setToastMessage
|
|
338
346
|
}), layout == null && /*#__PURE__*/_react["default"].createElement(Component, _extends({}, pageProps, {
|
|
339
347
|
currentUser: signedInUser.current,
|
|
340
348
|
toast: _reactToastify.toast,
|
|
@@ -343,7 +351,7 @@ function AuthScapeApp(_ref) {
|
|
|
343
351
|
logEvent: logEvent,
|
|
344
352
|
logPurchase: logPurchase,
|
|
345
353
|
store: useStore,
|
|
346
|
-
|
|
354
|
+
setToastMessage: setToastMessage
|
|
347
355
|
}))), /*#__PURE__*/_react["default"].createElement(_reactToastify.ToastContainer, null)), loadingLayout && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, loadingLayout(isLoadingShow)), frontEndLoaded.current && process.env.microsoftClarityTrackingCode != null && process.env.staging == "production" && /*#__PURE__*/_react["default"].createElement("script", {
|
|
348
356
|
dangerouslySetInnerHTML: {
|
|
349
357
|
__html: "\n (function(c,l,a,r,i,t,y){\n c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments) };\n t=l.createElement(r);\n t.async=1;\n t.src=\"https://www.clarity.ms/tag/\"+i;\n y=l.getElementsByTagName(r)[0];\n y.parentNode.insertBefore(t,y);\n })(window, document, \"clarity\", \"script\", \"" + process.env.microsoftClarityTrackingCode + "\");"
|
package/package.json
CHANGED
|
@@ -274,8 +274,16 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
const
|
|
278
|
-
|
|
277
|
+
const setToastMessage = (message, options = null) => {
|
|
278
|
+
|
|
279
|
+
if (options != null)
|
|
280
|
+
{
|
|
281
|
+
toast(message, options);
|
|
282
|
+
}
|
|
283
|
+
else
|
|
284
|
+
{
|
|
285
|
+
toast(message);
|
|
286
|
+
}
|
|
279
287
|
}
|
|
280
288
|
|
|
281
289
|
const useStore = create((set) => (store));
|
|
@@ -296,17 +304,17 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
|
|
|
296
304
|
{frontEndLoadedState != null && frontEndLoadedState && pathname != "/signin-oidc" &&
|
|
297
305
|
<>
|
|
298
306
|
{layout != null && layout({
|
|
299
|
-
children: <Component {...pageProps} currentUser={signedInUser.current} toast={toast} setIsLoading={setIsLoading} logEvent={logEvent} logPurchase={logPurchase} store={useStore}
|
|
307
|
+
children: <Component {...pageProps} currentUser={signedInUser.current} toast={toast} loadedUser={frontEndLoadedState} setIsLoading={setIsLoading} logEvent={logEvent} logPurchase={logPurchase} store={useStore} setToastMessage={setToastMessage} />,
|
|
300
308
|
currentUser: signedInUser.current,
|
|
301
309
|
logEvent: logEvent,
|
|
302
310
|
setIsLoading: setIsLoading,
|
|
303
311
|
toast: toast,
|
|
304
312
|
store: useStore,
|
|
305
|
-
|
|
313
|
+
setToastMessage: setToastMessage
|
|
306
314
|
})}
|
|
307
315
|
|
|
308
316
|
{layout == null &&
|
|
309
|
-
<Component {...pageProps} currentUser={signedInUser.current} toast={toast} loadedUser={frontEndLoadedState} setIsLoading={setIsLoading} logEvent={logEvent} logPurchase={logPurchase} store={useStore}
|
|
317
|
+
<Component {...pageProps} currentUser={signedInUser.current} toast={toast} loadedUser={frontEndLoadedState} setIsLoading={setIsLoading} logEvent={logEvent} logPurchase={logPurchase} store={useStore} setToastMessage={setToastMessage} />
|
|
310
318
|
}
|
|
311
319
|
</>
|
|
312
320
|
}
|