authscape 1.0.442 → 1.0.446

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 CHANGED
@@ -307,6 +307,14 @@ function AuthScapeApp(_ref) {
307
307
  });
308
308
  }
309
309
  };
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
+ };
310
318
  var useStore = (0, _zustand.create)(function (set) {
311
319
  return store;
312
320
  });
@@ -322,16 +330,19 @@ function AuthScapeApp(_ref) {
322
330
  children: /*#__PURE__*/_react["default"].createElement(Component, _extends({}, pageProps, {
323
331
  currentUser: signedInUser.current,
324
332
  toast: _reactToastify.toast,
333
+ loadedUser: frontEndLoadedState,
325
334
  setIsLoading: setIsLoading,
326
335
  logEvent: logEvent,
327
336
  logPurchase: logPurchase,
328
- store: useStore
337
+ store: useStore,
338
+ setToastMessage: setToastMessage
329
339
  })),
330
340
  currentUser: signedInUser.current,
331
341
  logEvent: logEvent,
332
342
  setIsLoading: setIsLoading,
333
343
  toast: _reactToastify.toast,
334
- store: useStore
344
+ store: useStore,
345
+ setSnackBarMessage: setSnackBarMessage
335
346
  }), layout == null && /*#__PURE__*/_react["default"].createElement(Component, _extends({}, pageProps, {
336
347
  currentUser: signedInUser.current,
337
348
  toast: _reactToastify.toast,
@@ -339,7 +350,8 @@ function AuthScapeApp(_ref) {
339
350
  setIsLoading: setIsLoading,
340
351
  logEvent: logEvent,
341
352
  logPurchase: logPurchase,
342
- store: useStore
353
+ store: useStore,
354
+ setToastMessage: setToastMessage
343
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", {
344
356
  dangerouslySetInnerHTML: {
345
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.442",
3
+ "version": "1.0.446",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -274,6 +274,18 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
274
274
  }
275
275
  }
276
276
 
277
+ const setToastMessage = (message, options = null) => {
278
+
279
+ if (options != null)
280
+ {
281
+ toast(message, options);
282
+ }
283
+ else
284
+ {
285
+ toast(message);
286
+ }
287
+ }
288
+
277
289
  const useStore = create((set) => (store));
278
290
 
279
291
  return (
@@ -292,16 +304,17 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
292
304
  {frontEndLoadedState != null && frontEndLoadedState && pathname != "/signin-oidc" &&
293
305
  <>
294
306
  {layout != null && layout({
295
- 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} />,
296
308
  currentUser: signedInUser.current,
297
309
  logEvent: logEvent,
298
310
  setIsLoading: setIsLoading,
299
311
  toast: toast,
300
- store: useStore
312
+ store: useStore,
313
+ setSnackBarMessage: setSnackBarMessage
301
314
  })}
302
315
 
303
316
  {layout == null &&
304
- <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} />
305
318
  }
306
319
  </>
307
320
  }