umwd-components 0.1.490 → 0.1.491
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/dist/src/components/common/snackbar/GlobalSnackbar.js +1 -1
- package/dist/src/context/common/SnackbarContext.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/context/common/SnackbarContext.d.ts +3 -13
- package/dist/types/data/actions/pagebuilder-actions.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/common/snackbar/GlobalSnackbar.tsx +20 -3
- package/src/context/common/SnackbarContext.tsx +12 -10
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -6
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +0 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +0 -6
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +0 -6
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import e from"react";import
|
|
6
|
+
import{__spreadArray as e,__read as t}from"../../../../node_modules/tslib/tslib.es6.js";import n from"react";import r from"@mui/material/Snackbar";import o from"@mui/material/Alert";import i from"@mui/material/Box";import{useSnackbar as a}from"../../../context/common/SnackbarContext.js";function m(){var m=a(),s=m.state,c=m.dispatch,l=s.messages.filter((function(e){return!0===e.open})),u=function(n,r,o){if("clickaway"!==r){var i=e([],t(s.messages),!1),a=i.findIndex((function(e){return e.id===o}));i[a].open=!1,c({type:"ADD_MESSAGE",payload:i})}};return n.createElement(i,null,l&&l.length>0&&l.map((function(e,t){return n.createElement(r,{key:t,open:e.open,autoHideDuration:3e3,onClose:function(t,n){return u(0,n,e.id)},sx:{translate:"0px -".concat(60*t,"px"),minWidth:"400px"}},n.createElement(o,{onClose:function(t){return u(0,"clickaway",e.id)},severity:e.severity,sx:{width:"100%"}},e.message))})))}export{m as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__assign as
|
|
7
|
+
import{__read as e,__assign as t}from"../../../node_modules/tslib/tslib.es6.js";import r,{useReducer as a,useEffect as o,useContext as n,createContext as s}from"react";var c={messages:[]},i=s({state:c,dispatch:function(){}}),p=function(e,r){switch(r.type){case"SET_STATE":return t({},r.payload);case"ADD_MESSAGE":return t(t({},e),{messages:r.payload});default:throw new Error("No case for type ".concat(r.type))}},u=function(t){var n=t.children,s=e(a(p,c),2),u=s[0],d=s[1];o((function(){d({type:"SET_STATE",payload:c})}),[c]);var l={state:u,dispatch:d};return r.createElement(i.Provider,{value:l},n)},d=function(){return n(i)};export{u as SnackbarProvider,d as useSnackbar};
|