@asaleh37/ui-base 1.0.7 → 1.0.9

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/index.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ export * from '@mui/material';
2
+ export * from 'zod';
3
+ export { toast } from 'react-toastify';
4
+ export { FontAwesomeIcon, FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
5
+
1
6
  type BaseAppProps = {};
2
7
  declare const BaseApp: React.FC<BaseAppProps>;
3
8
 
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react-redux"),i=require("@reduxjs/toolkit"),n=require("@mui/material"),t=require("@fortawesome/fontawesome-svg-core"),c=require("@fortawesome/free-brands-svg-icons"),a=require("@fortawesome/free-regular-svg-icons"),s=require("@fortawesome/free-solid-svg-icons"),o=require("@mui/x-license");require("react-toastify/dist/ReactToastify.css");var u=i.createSlice({name:"counter",initialState:{value:0},reducers:{increament:function(e){e.value=e.value+1},decreament:function(e){e.value=e.value-1}}}),d=u.actions,l=u.reducer,f=i.configureStore({reducer:{counter:l}}),v=function(){var i=r.useSelector((function(e){return e.counter.value})),t=r.useDispatch();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:["Counter : ",i]}),e.jsx(n.Button,{variant:"contained",color:"success",onClick:function(){t(d.increament())},children:"increment"}),e.jsx(n.Button,{variant:"contained",color:"error",onClick:function(){t(d.decreament())},children:"decrement"})]})};o.LicenseInfo.setLicenseKey("c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y"),t.library.add(c.fab),t.library.add(a.far),t.library.add(s.fas);exports.BaseApp=function(i){return e.jsxs(r.Provider,{store:f,children:[e.jsx("div",{children:"Base App"}),e.jsx(v,{})]})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react-redux"),t=require("@reduxjs/toolkit"),n=require("@fortawesome/fontawesome-svg-core"),o=require("@fortawesome/free-brands-svg-icons"),i=require("@fortawesome/free-regular-svg-icons"),a=require("@fortawesome/free-solid-svg-icons"),c=require("@mui/x-license");require("react-toastify/dist/ReactToastify.css");var s=require("@mui/material"),u=require("zod"),d=require("react-toastify"),f=require("@fortawesome/react-fontawesome"),l=t.createSlice({name:"counter",initialState:{value:0},reducers:{increament:function(e){e.value=e.value+1},decreament:function(e){e.value=e.value-1}}});l.actions;var p=l.reducer,m=t.configureStore({reducer:{counter:p}});!function(e,r){void 0===r&&(r={});var t=r.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("html,\r\nbody {\r\n height: 100%;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n#root {\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n overflow: hidden;\r\n background-color: aliceblue;\r\n}\r\n\r\n.red-row {\r\n background-color: #f0d8d8;\r\n}\r\n"),c.LicenseInfo.setLicenseKey("c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y"),n.library.add(o.fab),n.library.add(i.far),n.library.add(a.fas);Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return d.toast}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return f.FontAwesomeIcon}}),exports.BaseApp=function(t){return e.jsx(r.Provider,{store:m,children:e.jsx("div",{children:"Base App"})})},Object.keys(s).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return s[e]}})})),Object.keys(u).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return u[e]}})}));
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/redux/CounterSlice.ts","../src/redux/store.ts","../src/components/Counter.tsx","../src/components/BaseApp.tsx"],"sourcesContent":["import { createSlice } from \"@reduxjs/toolkit\";\r\n\r\nconst CounterSlice = createSlice({\r\n name: \"counter\",\r\n initialState: { value: 0 },\r\n reducers: {\r\n increament: (state) => {\r\n state.value = state.value + 1;\r\n },\r\n decreament: (state) => {\r\n state.value = state.value - 1;\r\n },\r\n },\r\n});\r\n\r\nexport const CounterActions = CounterSlice.actions;\r\nexport default CounterSlice.reducer;\r\n","import { configureStore } from \"@reduxjs/toolkit\";\r\nimport CounterReducer from \"./CounterSlice\";\r\n// import AppLayoutReducer from \"./features/common/AppLayoutSlice\";\r\n// import UserSessionReducer from \"./features/common/UserSessionSlice\";\r\n// import LoadingMaskReducer from \"./features/common/LoadingMaskSlice\";\r\n// import CommonStoreReducer from \"./features/business/CommonStoreSlice\";\r\n\r\nexport const store = configureStore({\r\n reducer: {\r\n // AppLayout: AppLayoutReducer,\r\n // UserSession: UserSessionReducer,\r\n // loadingMask: LoadingMaskReducer,\r\n // commonStores: CommonStoreReducer,\r\n counter: CounterReducer,\r\n },\r\n});\r\n\r\n// Infer the `RootState` and `AppDispatch` types from the store itself\r\nexport type RootState = ReturnType<typeof store.getState>;\r\nexport type AppDispatch = typeof store.dispatch;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { RootState } from \"../redux/store\";\r\nimport { Button } from \"@mui/material\";\r\nimport { CounterActions } from \"../redux/CounterSlice\";\r\n\r\nexport const Counter: React.FC = () => {\r\n const counter = useSelector((state: RootState) => state.counter.value);\r\n const dispatch = useDispatch();\r\n return (\r\n <>\r\n <div>Counter : {counter}</div>\r\n <Button\r\n variant=\"contained\"\r\n color=\"success\"\r\n onClick={() => {\r\n dispatch(CounterActions.increament());\r\n }}\r\n >\r\n increment\r\n </Button>\r\n <Button\r\n variant=\"contained\"\r\n color=\"error\"\r\n onClick={() => {\r\n dispatch(CounterActions.decreament());\r\n }}\r\n >\r\n decrement\r\n </Button>\r\n </>\r\n );\r\n};\r\n","import { Provider } from \"react-redux\";\r\nimport { store } from \"../redux/store\";\r\nimport { Counter } from \"./Counter\";\r\nimport { library } from \"@fortawesome/fontawesome-svg-core\";\r\nimport { fab } from \"@fortawesome/free-brands-svg-icons\";\r\nimport { far } from \"@fortawesome/free-regular-svg-icons\";\r\nimport { fas } from \"@fortawesome/free-solid-svg-icons\";\r\nimport { LicenseInfo } from \"@mui/x-license\";\r\n\r\nLicenseInfo.setLicenseKey(\r\n \"c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y\"\r\n);\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\n\r\nlibrary.add(fab);\r\nlibrary.add(far);\r\nlibrary.add(fas);\r\n\r\nexport type BaseAppProps = {};\r\n\r\nexport const BaseApp: React.FC<BaseAppProps> = (props) => {\r\n return (\r\n <Provider store={store}>\r\n <div>Base App</div>\r\n <Counter />\r\n </Provider>\r\n );\r\n};\r\n"],"names":["CounterSlice","createSlice","name","initialState","value","reducers","increament","state","decreament","CounterActions","actions","CounterReducer","reducer","store","configureStore","counter","Counter","useSelector","dispatch","useDispatch","_jsxs","jsxs","_Fragment","Fragment","children","_jsx","Button","variant","color","onClick","jsx","LicenseInfo","setLicenseKey","library","add","fab","far","fas","props","Provider"],"mappings":"8YAEA,IAAMA,EAAeC,EAAAA,YAAY,CAC/BC,KAAM,UACNC,aAAc,CAAEC,MAAO,GACvBC,SAAU,CACRC,WAAY,SAACC,GACXA,EAAMH,MAAQG,EAAMH,MAAQ,CAC7B,EACDI,WAAY,SAACD,GACXA,EAAMH,MAAQG,EAAMH,MAAQ,CAC7B,KAIQK,EAAiBT,EAAaU,QAC5BC,EAAAX,EAAaY,QCTfC,EAAQC,EAAAA,eAAe,CAClCF,QAAS,CAKPG,QAASJ,KCRAK,EAAoB,WAC/B,IAAMD,EAAUE,EAAWA,aAAC,SAACV,GAAqB,OAAAA,EAAMQ,QAAQX,SAC1Dc,EAAWC,EAAAA,cACjB,OACEC,EACEC,KAAAC,EAAAC,SAAA,CAAAC,SAAA,CAAAJ,EAAAA,KAAA,MAAA,CAAAI,SAAA,CAAA,aAAgBT,KAChBU,MAACC,EAAAA,OAAM,CACLC,QAAQ,YACRC,MAAM,UACNC,QAAS,WACPX,EAAST,EAAeH,aACzB,EAGMkB,SAAA,cACTC,EAACK,IAAAJ,EAAMA,QACLC,QAAQ,YACRC,MAAM,QACNC,QAAS,WACPX,EAAST,EAAeD,aACzB,EAAAgB,SAAA,gBAMT,ECtBAO,EAAAA,YAAYC,cACV,4HAIFC,EAAAA,QAAQC,IAAIC,EAAAA,KACZF,EAAAA,QAAQC,IAAIE,EAAAA,KACZH,EAAAA,QAAQC,IAAIG,EAAAA,qBAImC,SAACC,GAC9C,OACElB,EAAAA,KAACmB,EAAAA,SAAQ,CAAC1B,MAAOA,EACfW,SAAA,CAAAC,MAAA,MAAA,CAAAD,SAAA,aACAC,EAAAA,IAACT,EAAU,CAAA,KAGjB"}
1
+ {"version":3,"file":"index.js","sources":["../src/redux/CounterSlice.ts","../src/redux/store.ts","../node_modules/style-inject/dist/style-inject.es.js","../src/components/BaseApp.tsx"],"sourcesContent":["import { createSlice } from \"@reduxjs/toolkit\";\r\n\r\nconst CounterSlice = createSlice({\r\n name: \"counter\",\r\n initialState: { value: 0 },\r\n reducers: {\r\n increament: (state) => {\r\n state.value = state.value + 1;\r\n },\r\n decreament: (state) => {\r\n state.value = state.value - 1;\r\n },\r\n },\r\n});\r\n\r\nexport const CounterActions = CounterSlice.actions;\r\nexport default CounterSlice.reducer;\r\n","import { configureStore } from \"@reduxjs/toolkit\";\r\nimport CounterReducer from \"./CounterSlice\";\r\n// import AppLayoutReducer from \"./features/common/AppLayoutSlice\";\r\n// import UserSessionReducer from \"./features/common/UserSessionSlice\";\r\n// import LoadingMaskReducer from \"./features/common/LoadingMaskSlice\";\r\n// import CommonStoreReducer from \"./features/business/CommonStoreSlice\";\r\n\r\nexport const store = configureStore({\r\n reducer: {\r\n // AppLayout: AppLayoutReducer,\r\n // UserSession: UserSessionReducer,\r\n // loadingMask: LoadingMaskReducer,\r\n // commonStores: CommonStoreReducer,\r\n counter: CounterReducer,\r\n },\r\n});\r\n\r\n// Infer the `RootState` and `AppDispatch` types from the store itself\r\nexport type RootState = ReturnType<typeof store.getState>;\r\nexport type AppDispatch = typeof store.dispatch;\r\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { Provider } from \"react-redux\";\r\nimport { store } from \"../redux/store\";\r\nimport { library } from \"@fortawesome/fontawesome-svg-core\";\r\nimport { fab } from \"@fortawesome/free-brands-svg-icons\";\r\nimport { far } from \"@fortawesome/free-regular-svg-icons\";\r\nimport { fas } from \"@fortawesome/free-solid-svg-icons\";\r\nimport \"../styles/index.css\";\r\nimport { LicenseInfo } from \"@mui/x-license\";\r\n\r\nLicenseInfo.setLicenseKey(\r\n \"c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y\"\r\n);\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\n\r\nlibrary.add(fab);\r\nlibrary.add(far);\r\nlibrary.add(fas);\r\n\r\nexport type BaseAppProps = {};\r\n\r\nexport const BaseApp: React.FC<BaseAppProps> = (props) => {\r\n return (\r\n <Provider store={store}>\r\n <div>Base App</div> \r\n </Provider>\r\n );\r\n};\r\n"],"names":["CounterSlice","createSlice","name","initialState","value","reducers","increament","state","decreament","actions","CounterReducer","reducer","store","configureStore","counter","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","LicenseInfo","setLicenseKey","library","add","fab","far","fas","props","_jsx","Provider","children","jsx"],"mappings":"2eAEMA,EAAeC,EAAAA,YAAY,CAC/BC,KAAM,UACNC,aAAc,CAAEC,MAAO,GACvBC,SAAU,CACRC,WAAY,SAACC,GACXA,EAAMH,MAAQG,EAAMH,MAAQ,CAC7B,EACDI,WAAY,SAACD,GACXA,EAAMH,MAAQG,EAAMH,MAAQ,CAC7B,KAIyBJ,EAAaS,QAC3C,IAAeC,EAAAV,EAAaW,QCTfC,EAAQC,EAAAA,eAAe,CAClCF,QAAS,CAKPG,QAASJ,MCbb,SAAqBK,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAE,GAC9B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBU,CAqBxD,kVChBAe,EAAAA,YAAYC,cACV,4HAIFC,EAAAA,QAAQC,IAAIC,EAAAA,KACZF,EAAAA,QAAQC,IAAIE,EAAAA,KACZH,EAAAA,QAAQC,IAAIG,EAAAA,qNAImC,SAACC,GAC9C,OACEC,MAACC,EAAAA,SAAS,CAAA3B,MAAOA,EACf4B,SAAAF,EAAAG,IAAA,MAAA,CAAAD,SAAA,cAGN","x_google_ignoreList":[2]}
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useSelector as t,useDispatch as n,Provider as i}from"react-redux";import{createSlice as c,configureStore as a}from"@reduxjs/toolkit";import{Button as m}from"@mui/material";import{library as s}from"@fortawesome/fontawesome-svg-core";import{fab as d}from"@fortawesome/free-brands-svg-icons";import{far as u}from"@fortawesome/free-regular-svg-icons";import{fas as f}from"@fortawesome/free-solid-svg-icons";import{LicenseInfo as l}from"@mui/x-license";import"react-toastify/dist/ReactToastify.css";var v=c({name:"counter",initialState:{value:0},reducers:{increament:function(e){e.value=e.value+1},decreament:function(e){e.value=e.value-1}}}),p=v.actions,x=a({reducer:{counter:v.reducer}}),b=function(){var i=t((function(e){return e.counter.value})),c=n();return e(r,{children:[e("div",{children:["Counter : ",i]}),o(m,{variant:"contained",color:"success",onClick:function(){c(p.increament())},children:"increment"}),o(m,{variant:"contained",color:"error",onClick:function(){c(p.decreament())},children:"decrement"})]})};l.setLicenseKey("c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y"),s.add(d),s.add(u),s.add(f);var h=function(r){return e(i,{store:x,children:[o("div",{children:"Base App"}),o(b,{})]})};export{h as BaseApp};
1
+ import{jsx as e}from"react/jsx-runtime";import{Provider as r}from"react-redux";import{createSlice as t,configureStore as o}from"@reduxjs/toolkit";import{library as n}from"@fortawesome/fontawesome-svg-core";import{fab as a}from"@fortawesome/free-brands-svg-icons";import{far as i}from"@fortawesome/free-regular-svg-icons";import{fas as c}from"@fortawesome/free-solid-svg-icons";import{LicenseInfo as d}from"@mui/x-license";import"react-toastify/dist/ReactToastify.css";export*from"@mui/material";export*from"zod";export{toast}from"react-toastify";export{FontAwesomeIcon}from"@fortawesome/react-fontawesome";var s=t({name:"counter",initialState:{value:0},reducers:{increament:function(e){e.value=e.value+1},decreament:function(e){e.value=e.value-1}}});s.actions;var m=o({reducer:{counter:s.reducer}});!function(e,r){void 0===r&&(r={});var t=r.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("html,\r\nbody {\r\n height: 100%;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n#root {\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n overflow: hidden;\r\n background-color: aliceblue;\r\n}\r\n\r\n.red-row {\r\n background-color: #f0d8d8;\r\n}\r\n"),d.setLicenseKey("c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y"),n.add(a),n.add(i),n.add(c);var f=function(t){return e(r,{store:m,children:e("div",{children:"Base App"})})};export{f as BaseApp};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/redux/CounterSlice.ts","../src/redux/store.ts","../src/components/Counter.tsx","../src/components/BaseApp.tsx"],"sourcesContent":["import { createSlice } from \"@reduxjs/toolkit\";\r\n\r\nconst CounterSlice = createSlice({\r\n name: \"counter\",\r\n initialState: { value: 0 },\r\n reducers: {\r\n increament: (state) => {\r\n state.value = state.value + 1;\r\n },\r\n decreament: (state) => {\r\n state.value = state.value - 1;\r\n },\r\n },\r\n});\r\n\r\nexport const CounterActions = CounterSlice.actions;\r\nexport default CounterSlice.reducer;\r\n","import { configureStore } from \"@reduxjs/toolkit\";\r\nimport CounterReducer from \"./CounterSlice\";\r\n// import AppLayoutReducer from \"./features/common/AppLayoutSlice\";\r\n// import UserSessionReducer from \"./features/common/UserSessionSlice\";\r\n// import LoadingMaskReducer from \"./features/common/LoadingMaskSlice\";\r\n// import CommonStoreReducer from \"./features/business/CommonStoreSlice\";\r\n\r\nexport const store = configureStore({\r\n reducer: {\r\n // AppLayout: AppLayoutReducer,\r\n // UserSession: UserSessionReducer,\r\n // loadingMask: LoadingMaskReducer,\r\n // commonStores: CommonStoreReducer,\r\n counter: CounterReducer,\r\n },\r\n});\r\n\r\n// Infer the `RootState` and `AppDispatch` types from the store itself\r\nexport type RootState = ReturnType<typeof store.getState>;\r\nexport type AppDispatch = typeof store.dispatch;\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { RootState } from \"../redux/store\";\r\nimport { Button } from \"@mui/material\";\r\nimport { CounterActions } from \"../redux/CounterSlice\";\r\n\r\nexport const Counter: React.FC = () => {\r\n const counter = useSelector((state: RootState) => state.counter.value);\r\n const dispatch = useDispatch();\r\n return (\r\n <>\r\n <div>Counter : {counter}</div>\r\n <Button\r\n variant=\"contained\"\r\n color=\"success\"\r\n onClick={() => {\r\n dispatch(CounterActions.increament());\r\n }}\r\n >\r\n increment\r\n </Button>\r\n <Button\r\n variant=\"contained\"\r\n color=\"error\"\r\n onClick={() => {\r\n dispatch(CounterActions.decreament());\r\n }}\r\n >\r\n decrement\r\n </Button>\r\n </>\r\n );\r\n};\r\n","import { Provider } from \"react-redux\";\r\nimport { store } from \"../redux/store\";\r\nimport { Counter } from \"./Counter\";\r\nimport { library } from \"@fortawesome/fontawesome-svg-core\";\r\nimport { fab } from \"@fortawesome/free-brands-svg-icons\";\r\nimport { far } from \"@fortawesome/free-regular-svg-icons\";\r\nimport { fas } from \"@fortawesome/free-solid-svg-icons\";\r\nimport { LicenseInfo } from \"@mui/x-license\";\r\n\r\nLicenseInfo.setLicenseKey(\r\n \"c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y\"\r\n);\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\n\r\nlibrary.add(fab);\r\nlibrary.add(far);\r\nlibrary.add(fas);\r\n\r\nexport type BaseAppProps = {};\r\n\r\nexport const BaseApp: React.FC<BaseAppProps> = (props) => {\r\n return (\r\n <Provider store={store}>\r\n <div>Base App</div>\r\n <Counter />\r\n </Provider>\r\n );\r\n};\r\n"],"names":["CounterSlice","createSlice","name","initialState","value","reducers","increament","state","decreament","CounterActions","actions","store","configureStore","reducer","counter","Counter","useSelector","dispatch","useDispatch","_jsxs","_Fragment","children","_jsx","Button","variant","color","onClick","LicenseInfo","setLicenseKey","library","add","fab","far","fas","BaseApp","props","Provider"],"mappings":"qjBAEA,IAAMA,EAAeC,EAAY,CAC/BC,KAAM,UACNC,aAAc,CAAEC,MAAO,GACvBC,SAAU,CACRC,WAAY,SAACC,GACXA,EAAMH,MAAQG,EAAMH,MAAQ,CAC7B,EACDI,WAAY,SAACD,GACXA,EAAMH,MAAQG,EAAMH,MAAQ,CAC7B,KAIQK,EAAiBT,EAAaU,QCR9BC,EAAQC,EAAe,CAClCC,QAAS,CAKPC,QDGWd,EAAaa,WEXfE,EAAoB,WAC/B,IAAMD,EAAUE,GAAY,SAACT,GAAqB,OAAAA,EAAMO,QAAQV,SAC1Da,EAAWC,IACjB,OACEC,EACEC,EAAA,CAAAC,SAAA,CAAAF,EAAA,MAAA,CAAAE,SAAA,CAAA,aAAgBP,KAChBQ,EAACC,EAAM,CACLC,QAAQ,YACRC,MAAM,UACNC,QAAS,WACPT,EAASR,EAAeH,aACzB,EAGMe,SAAA,cACTC,EAACC,GACCC,QAAQ,YACRC,MAAM,QACNC,QAAS,WACPT,EAASR,EAAeD,aACzB,EAAAa,SAAA,gBAMT,ECtBAM,EAAYC,cACV,4HAIFC,EAAQC,IAAIC,GACZF,EAAQC,IAAIE,GACZH,EAAQC,IAAIG,GAIL,IAAMC,EAAkC,SAACC,GAC9C,OACEhB,EAACiB,EAAQ,CAACzB,MAAOA,EACfU,SAAA,CAAAC,EAAA,MAAA,CAAAD,SAAA,aACAC,EAACP,EAAU,CAAA,KAGjB"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/redux/CounterSlice.ts","../src/redux/store.ts","../node_modules/style-inject/dist/style-inject.es.js","../src/components/BaseApp.tsx"],"sourcesContent":["import { createSlice } from \"@reduxjs/toolkit\";\r\n\r\nconst CounterSlice = createSlice({\r\n name: \"counter\",\r\n initialState: { value: 0 },\r\n reducers: {\r\n increament: (state) => {\r\n state.value = state.value + 1;\r\n },\r\n decreament: (state) => {\r\n state.value = state.value - 1;\r\n },\r\n },\r\n});\r\n\r\nexport const CounterActions = CounterSlice.actions;\r\nexport default CounterSlice.reducer;\r\n","import { configureStore } from \"@reduxjs/toolkit\";\r\nimport CounterReducer from \"./CounterSlice\";\r\n// import AppLayoutReducer from \"./features/common/AppLayoutSlice\";\r\n// import UserSessionReducer from \"./features/common/UserSessionSlice\";\r\n// import LoadingMaskReducer from \"./features/common/LoadingMaskSlice\";\r\n// import CommonStoreReducer from \"./features/business/CommonStoreSlice\";\r\n\r\nexport const store = configureStore({\r\n reducer: {\r\n // AppLayout: AppLayoutReducer,\r\n // UserSession: UserSessionReducer,\r\n // loadingMask: LoadingMaskReducer,\r\n // commonStores: CommonStoreReducer,\r\n counter: CounterReducer,\r\n },\r\n});\r\n\r\n// Infer the `RootState` and `AppDispatch` types from the store itself\r\nexport type RootState = ReturnType<typeof store.getState>;\r\nexport type AppDispatch = typeof store.dispatch;\r\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { Provider } from \"react-redux\";\r\nimport { store } from \"../redux/store\";\r\nimport { library } from \"@fortawesome/fontawesome-svg-core\";\r\nimport { fab } from \"@fortawesome/free-brands-svg-icons\";\r\nimport { far } from \"@fortawesome/free-regular-svg-icons\";\r\nimport { fas } from \"@fortawesome/free-solid-svg-icons\";\r\nimport \"../styles/index.css\";\r\nimport { LicenseInfo } from \"@mui/x-license\";\r\n\r\nLicenseInfo.setLicenseKey(\r\n \"c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y\"\r\n);\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\n\r\nlibrary.add(fab);\r\nlibrary.add(far);\r\nlibrary.add(fas);\r\n\r\nexport type BaseAppProps = {};\r\n\r\nexport const BaseApp: React.FC<BaseAppProps> = (props) => {\r\n return (\r\n <Provider store={store}>\r\n <div>Base App</div> \r\n </Provider>\r\n );\r\n};\r\n"],"names":["CounterSlice","createSlice","name","initialState","value","reducers","increament","state","decreament","actions","store","configureStore","reducer","counter","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","LicenseInfo","setLicenseKey","library","add","fab","far","fas","BaseApp","props","_jsx","Provider","children"],"mappings":"8lBAEA,IAAMA,EAAeC,EAAY,CAC/BC,KAAM,UACNC,aAAc,CAAEC,MAAO,GACvBC,SAAU,CACRC,WAAY,SAACC,GACXA,EAAMH,MAAQG,EAAMH,MAAQ,CAC7B,EACDI,WAAY,SAACD,GACXA,EAAMH,MAAQG,EAAMH,MAAQ,CAC7B,KAIyBJ,EAAaS,QAC3C,ICTaC,EAAQC,EAAe,CAClCC,QAAS,CAKPC,QDGWb,EAAaY,YEhB5B,SAAqBE,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAE,GAC9B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBU,CAqBxD,kVChBAe,EAAYC,cACV,4HAIFC,EAAQC,IAAIC,GACZF,EAAQC,IAAIE,GACZH,EAAQC,IAAIG,GAIL,IAAMC,EAAkC,SAACC,GAC9C,OACEC,EAACC,EAAS,CAAA7B,MAAOA,EACf8B,SAAAF,EAAA,MAAA,CAAAE,SAAA,cAGN","x_google_ignoreList":[2]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -1,10 +1,10 @@
1
1
  import { Provider } from "react-redux";
2
2
  import { store } from "../redux/store";
3
- import { Counter } from "./Counter";
4
3
  import { library } from "@fortawesome/fontawesome-svg-core";
5
4
  import { fab } from "@fortawesome/free-brands-svg-icons";
6
5
  import { far } from "@fortawesome/free-regular-svg-icons";
7
6
  import { fas } from "@fortawesome/free-solid-svg-icons";
7
+ import "../styles/index.css";
8
8
  import { LicenseInfo } from "@mui/x-license";
9
9
 
10
10
  LicenseInfo.setLicenseKey(
@@ -21,8 +21,7 @@ export type BaseAppProps = {};
21
21
  export const BaseApp: React.FC<BaseAppProps> = (props) => {
22
22
  return (
23
23
  <Provider store={store}>
24
- <div>Base App</div>
25
- <Counter />
24
+ <div>Base App</div>
26
25
  </Provider>
27
26
  );
28
27
  };
@@ -1 +1,6 @@
1
1
  export * from "./BaseApp";
2
+ export * from "@mui/material";
3
+ export * from "zod";
4
+ export { toast } from "react-toastify";
5
+ export { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
6
+ export type { FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
@@ -0,0 +1,20 @@
1
+ html,
2
+ body {
3
+ height: 100%;
4
+ margin: 0;
5
+ padding: 0;
6
+ }
7
+
8
+ #root {
9
+ height: 100%;
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ justify-content: center;
14
+ overflow: hidden;
15
+ background-color: aliceblue;
16
+ }
17
+
18
+ .red-row {
19
+ background-color: #f0d8d8;
20
+ }
@@ -1,16 +0,0 @@
1
- export type MyComponent1Props = {
2
- firstName: string;
3
- lastName: string;
4
- };
5
-
6
- const MyComponent1: React.FC<MyComponent1Props> = (props) => {
7
- return (
8
- <>
9
- <div> My Component 1</div>
10
- <div>{props.firstName}</div>
11
- <div>{props.lastName}</div>
12
- </>
13
- );
14
- };
15
-
16
- export default MyComponent1;
@@ -1,32 +0,0 @@
1
- import { useDispatch, useSelector } from "react-redux";
2
- import { RootState } from "../redux/store";
3
- import { Button } from "@mui/material";
4
- import { CounterActions } from "../redux/CounterSlice";
5
-
6
- export const Counter: React.FC = () => {
7
- const counter = useSelector((state: RootState) => state.counter.value);
8
- const dispatch = useDispatch();
9
- return (
10
- <>
11
- <div>Counter : {counter}</div>
12
- <Button
13
- variant="contained"
14
- color="success"
15
- onClick={() => {
16
- dispatch(CounterActions.increament());
17
- }}
18
- >
19
- increment
20
- </Button>
21
- <Button
22
- variant="contained"
23
- color="error"
24
- onClick={() => {
25
- dispatch(CounterActions.decreament());
26
- }}
27
- >
28
- decrement
29
- </Button>
30
- </>
31
- );
32
- };