@asaleh37/ui-base 1.0.8 → 1.1.0
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.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/App.tsx +31 -0
- package/src/components/BaseApp.tsx +2 -3
- package/src/components/admin/AttachmentGrid.tsx +116 -0
- package/src/components/admin/AuthorityGrid.tsx +88 -0
- package/src/components/admin/BluePrintGrid.tsx +55 -0
- package/src/components/admin/BluePrintPageGrid.tsx +85 -0
- package/src/components/admin/BluePrintPointGrid.tsx +85 -0
- package/src/components/admin/DashboardGrid.tsx +95 -0
- package/src/components/admin/DashboardWidgetGrid.tsx +75 -0
- package/src/components/admin/DataQueryGrid.tsx +75 -0
- package/src/components/admin/DataQueryParameterGrid.tsx +98 -0
- package/src/components/admin/DatasourceConnectionGrid.tsx +98 -0
- package/src/components/admin/EmployeeGrid.tsx +105 -0
- package/src/components/admin/EntityParameterGrid.tsx +125 -0
- package/src/components/admin/ExcelUploaderDetailGrid.tsx +78 -0
- package/src/components/admin/ExcelUploaderHeaderGrid.tsx +78 -0
- package/src/components/admin/LookupGrid.tsx +95 -0
- package/src/components/admin/MailAttachmentGrid.tsx +65 -0
- package/src/components/admin/MailBodyGrid.tsx +105 -0
- package/src/components/admin/MailNotificationQueueGrid.tsx +131 -0
- package/src/components/admin/MailRecipientGrid.tsx +75 -0
- package/src/components/admin/MailTemplateGrid.tsx +145 -0
- package/src/components/admin/NewTableGrid.tsx +65 -0
- package/src/components/admin/NotificationGrid.tsx +115 -0
- package/src/components/admin/NotificationQueueGrid.tsx +125 -0
- package/src/components/admin/OrganizationApplicationGrid.tsx +81 -0
- package/src/components/admin/OrganizationGrid.tsx +65 -0
- package/src/components/admin/OrganizationRankGrid.tsx +85 -0
- package/src/components/admin/OrganizationUnitGrid.tsx +85 -0
- package/src/components/admin/OrganizationUserGrid.tsx +75 -0
- package/src/components/admin/OrganizationUserRoleGrid.tsx +98 -0
- package/src/components/admin/ReportGrid.tsx +155 -0
- package/src/components/admin/ReportParameterGrid.tsx +95 -0
- package/src/components/admin/RoleAuthorityGrid.tsx +65 -0
- package/src/components/admin/RoleGrid.tsx +78 -0
- package/src/components/admin/UserAccountGrid.tsx +65 -0
- package/src/components/admin/UserRequestGrid.tsx +145 -0
- package/src/components/admin/WidgetGrid.tsx +175 -0
- package/src/components/admin/WorkflowDocumentActionGrid.tsx +111 -0
- package/src/components/admin/WorkflowDocumentActionHistoryGrid.tsx +111 -0
- package/src/components/admin/WorkflowDocumentActionMailGrid.tsx +71 -0
- package/src/components/admin/WorkflowDocumentGrid.tsx +185 -0
- package/src/components/admin/WorkflowDocumentMailLogGrid.tsx +141 -0
- package/src/components/admin/WorkflowDocumentStatusGrid.tsx +121 -0
- package/src/components/common/Home.tsx +31 -0
- package/src/components/common/LanguageSwitcher.tsx +25 -0
- package/src/components/common/LayoutHandlers.tsx +12 -0
- package/src/components/common/LoadingMask.tsx +19 -0
- package/src/components/common/Login.tsx +183 -0
- package/src/components/templates/DataEntryTemplates/DataEntryTypes.ts +288 -0
- package/src/components/templates/DataEntryTemplates/DataEntryUtil.ts +201 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormAction.tsx +60 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementField.tsx +194 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormElementGroup.tsx +98 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/CheckBox.tsx +64 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/ComboBox.tsx +94 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/Datefield.tsx +65 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/DatetimeField.tsx +64 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/FiltersPanel.tsx +237 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/FormFields/TemplateTextField.tsx +9 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataForm/TemplateForm.tsx +256 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/DataGridColumnsUtil.tsx +188 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid.tsx +844 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridMultiRecordAction.tsx +89 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridRecordAction.tsx +92 -0
- package/src/components/templates/DataEntryTemplates/TemplateDataGrid/TemplateGridTopBar.tsx +228 -0
- package/src/components/templates/DataEntryTemplates/useApiActions.ts +125 -0
- package/src/components/templates/TransferList.tsx +250 -0
- package/src/components/templates/Window/ConfirmationWindow.tsx +55 -0
- package/src/components/templates/visuals/TemplateDashboard.tsx +126 -0
- package/src/components/templates/visuals/charts/TemplateBarChart.tsx +16 -0
- package/src/components/templates/visuals/charts/TemplateDataCard.tsx +60 -0
- package/src/components/templates/visuals/charts/TemplateGauge.tsx +16 -0
- package/src/components/templates/visuals/charts/TemplateLineChart.tsx +16 -0
- package/src/components/templates/visuals/charts/TemplateLineProgress.tsx +40 -0
- package/src/components/templates/visuals/charts/TemplatePieChart.tsx +25 -0
- package/src/hooks/UseConfirmationWindow.tsx +54 -0
- package/src/hooks/UseMobile.tsx +13 -0
- package/src/hooks/UseSession.tsx +26 -0
- package/src/hooks/UseWindow.tsx +106 -0
- package/src/hooks/useAxios.tsx +271 -0
- package/src/hooks/useLoadingMask.tsx +16 -0
- package/src/layout/DrawerHeader.tsx +10 -0
- package/src/layout/Layout.tsx +122 -0
- package/src/layout/MainContent.tsx +43 -0
- package/src/layout/MobileDrawer.tsx +103 -0
- package/src/layout/NavigationTree.tsx +284 -0
- package/src/layout/SideBar.tsx +80 -0
- package/src/layout/TopBar.tsx +142 -0
- package/src/locales/arabic/adminLocalsAr.json +356 -0
- package/src/locales/arabic/common.json +34 -0
- package/src/locales/arabic/index.ts +7 -0
- package/src/locales/english/adminLocalsEn.json +356 -0
- package/src/locales/english/common.json +33 -0
- package/src/locales/english/index.ts +6 -0
- package/src/locales/english/index.tsx +0 -0
- package/src/locales/i18n.ts +15 -0
- package/src/locales/index.ts +9 -0
- package/src/navigationItems/Administration/adminNavigationItems.tsx +182 -0
- package/src/navigationItems/Administration/index.tsx +71 -0
- package/src/navigationItems/common/CommonNavigationItems.tsx +12 -0
- package/src/navigationItems/common/index.tsx +7 -0
- package/src/navigationItems/index.tsx +34 -0
- package/src/redux/features/administration/AdministrationStoresMetaData.ts +72 -0
- package/src/redux/features/business/BusinessStoresMetaData.ts +3 -0
- package/src/redux/features/business/CommonStoreSlice.ts +37 -0
- package/src/redux/features/common/AppInfoSlice.ts +30 -0
- package/src/redux/features/common/AppLayoutSlice.ts +37 -0
- package/src/redux/features/common/LoadingMaskSlice.ts +30 -0
- package/src/redux/features/common/UserSessionSlice.ts +62 -0
- package/src/redux/store.ts +10 -10
- package/src/routes/administration/adminRoutes.tsx +259 -0
- package/src/routes/administration/index.ts +4 -0
- package/src/routes/index.ts +11 -0
- package/src/routes/types/index.ts +5 -0
- package/src/styles/index.css +20 -0
- package/src/theme/DarkThemeOptions.ts +30 -0
- package/src/theme/LightThemeOptions.ts +34 -0
- package/src/util/AppUtils.ts +18 -0
- package/src/util/constants.ts +2 -0
- package/tsconfig.json +2 -2
- package/src/MyComponent1.tsx +0 -16
- package/src/components/Counter.tsx +0 -32
- package/src/redux/CounterSlice.ts +0 -17
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),a=require("react-redux"),t=require("@reduxjs/toolkit"),r=require("@fortawesome/fontawesome-svg-core"),o=require("@fortawesome/free-brands-svg-icons"),n=require("@fortawesome/free-regular-svg-icons"),i=require("@fortawesome/free-solid-svg-icons"),s=require("@mui/x-license");require("react-toastify/dist/ReactToastify.css");var d=require("@mui/material"),l=require("zod"),u=require("react-toastify"),c=require("@fortawesome/react-fontawesome");const p={sideBarOpened:!1,themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},m=t.createSlice({name:"AppLayout",initialState:p,reducers:{toggleSideBarState:e=>{e.sideBarOpened=!e.sideBarOpened},setSideBarState:(e,a)=>{e.sideBarOpened=a.payload},setThemeMode:(e,a)=>{e.themeMode=a.payload},setAppDirection:(e,a)=>{e.appDirection=a.payload}}});m.actions;var y=m.reducer;const f=t.createSlice({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[],userProfile:null}},reducers:{setAuthenticated:(e,a)=>{e.value=a.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[],userProfile:null}}}});f.actions;var h=f.reducer;const g=t.createSlice({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,a)=>{e.value.isOpened=!0,e.value.message=a.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:v,hideLoadingMask:S}=g.actions;var b=g.reducer;const L={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"datetime"},{value:"date"},{value:"text"},{value:"number"},{value:"droplist"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/dataquery/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/entityparameter/all"},SystemAuthorities:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/authority/all"},SystemRoles:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/role/all"}},M=t.createSlice({name:"loadingMask",initialState:L,reducers:{setStoreData(e,a){e[a.payload.storeKey].data=a.payload.data}}}),{setStoreData:x}=M.actions;var O=M.reducer;const E=t.createSlice({name:"AppInfo",initialState:{documentTitle:"",apiBaseUrl:"",appName:"",appVersion:"",appLogo:null},reducers:{setAppInfo:(e,a)=>{a.payload}}});E.actions;var T=E.reducer;const A=t.configureStore({reducer:{AppLayout:y,UserSession:h,loadingMask:b,commonStores:O,AppInfo:T}});!function(e,a){void 0===a&&(a={});var t=a.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.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"),s.LicenseInfo.setLicenseKey("c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y"),r.library.add(o.fab),r.library.add(n.far),r.library.add(i.fas);Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return u.toast}}),Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return c.FontAwesomeIcon}}),exports.BaseApp=t=>e.jsx(a.Provider,{store:A,children:e.jsx("div",{children:"Base App"})}),Object.keys(d).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return d[e]}})})),Object.keys(l).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return l[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":"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,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,qNAImC,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/features/common/AppLayoutSlice.ts","../src/redux/features/common/UserSessionSlice.ts","../src/redux/features/common/LoadingMaskSlice.ts","../src/redux/features/business/BusinessStoresMetaData.ts","../src/redux/features/business/CommonStoreSlice.ts","../src/redux/features/administration/AdministrationStoresMetaData.ts","../src/redux/features/common/AppInfoSlice.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\nexport const DRAWER_WIDTH = 350;\r\n\r\ninterface AppLayoutState {\r\n sideBarOpened: boolean;\r\n themeMode: \"light\" | \"dark\" | string;\r\n appDirection: \"ltr\" | \"rtl\";\r\n}\r\n\r\nconst initialState: AppLayoutState = {\r\n sideBarOpened: false,\r\n themeMode: localStorage.getItem(\"themeMode\") || \"light\",\r\n appDirection: localStorage.getItem(\"language\") == \"ar\" ? \"rtl\" : \"ltr\",\r\n};\r\n\r\nconst AppLayoutSlice = createSlice({\r\n name: \"AppLayout\",\r\n initialState,\r\n reducers: {\r\n toggleSideBarState: (state) => {\r\n state.sideBarOpened = !state.sideBarOpened;\r\n },\r\n setSideBarState: (state, action) => {\r\n state.sideBarOpened = action.payload;\r\n },\r\n setThemeMode: (state, action) => {\r\n state.themeMode = action.payload;\r\n },\r\n setAppDirection: (state, action) => {\r\n state.appDirection = action.payload;\r\n },\r\n },\r\n});\r\n\r\nexport const AppLayoutActions = AppLayoutSlice.actions;\r\nexport default AppLayoutSlice.reducer;\r\n","import { createSlice } from \"@reduxjs/toolkit\";\r\n\r\nexport interface OrganizationProps {\r\n organizationCode?: string;\r\n organizationName?: string;\r\n}\r\nexport interface UserProfileProps {\r\n username?: string;\r\n currentOrganizationCode?: string;\r\n userOrganizations?: Array<OrganizationProps>;\r\n employeeNumber?: string;\r\n employeeName?: string;\r\n divisionCode?: string;\r\n divisionName?: string;\r\n departmentCode?: string;\r\n departmentName?: string;\r\n rankCode?: string;\r\n rankName?: string;\r\n sectionCode?: string;\r\n sectionName?: string;\r\n subsectionCode?: string;\r\n subsectionName?: string;\r\n extNumber?: string;\r\n mobileNumber?: string;\r\n email?: string;\r\n}\r\n\r\nexport interface UserSessionProps {\r\n value: {\r\n isAuthenticated: boolean | null;\r\n userProfile: UserProfileProps | null;\r\n authorities: Array<{ authority: string }>;\r\n };\r\n}\r\n\r\nconst initialState: UserSessionProps = {\r\n value: {\r\n isAuthenticated: null,\r\n authorities: [],\r\n userProfile: null,\r\n },\r\n};\r\n\r\nconst UserSessionSlice = createSlice({\r\n name: \"UserSession\",\r\n initialState,\r\n reducers: {\r\n setAuthenticated: (state, action) => {\r\n state.value = action.payload;\r\n },\r\n setUnAuthenticated: (state) => {\r\n state.value = {\r\n isAuthenticated: false,\r\n authorities: [],\r\n userProfile: null,\r\n };\r\n },\r\n },\r\n});\r\n\r\nexport const UserSessionActions = UserSessionSlice.actions;\r\nexport default UserSessionSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\n\r\ninterface LoadingMaskStateValue {\r\n value: { isOpened: boolean; message?: string | null };\r\n}\r\n\r\nconst initialState: LoadingMaskStateValue = {\r\n value: { isOpened: false, message: null },\r\n};\r\n\r\nconst loadingMaskSlice = createSlice({\r\n name: \"loadingMask\",\r\n initialState,\r\n reducers: {\r\n showLoadingMask: (\r\n state,\r\n action: PayloadAction<string | null | undefined>\r\n ) => {\r\n state.value.isOpened = true;\r\n state.value.message = action.payload;\r\n },\r\n hideLoadingMask: (state) => {\r\n state.value.isOpened = false;\r\n state.value.message = null;\r\n },\r\n },\r\n});\r\n\r\nexport const { showLoadingMask, hideLoadingMask } = loadingMaskSlice.actions;\r\nexport default loadingMaskSlice.reducer;\r\n","import { CommonStoresInterface } from \"./CommonStoreSlice\";\r\n\r\nexport const BUSINESS_STORES: CommonStoresInterface = {};\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { BUSINESS_STORES } from \"./BusinessStoresMetaData\";\r\nimport { ADMINISTRATION_STORES } from \"../administration/AdministrationStoresMetaData\";\r\n\r\nexport interface CommonStoresInterface {\r\n [key: string]: StoreMetaData;\r\n}\r\n\r\ninterface setStoreDataProps {\r\n storeKey: string;\r\n data: Array<any>;\r\n}\r\n\r\nexport interface StoreMetaData {\r\n url: string;\r\n data: Array<any>;\r\n autoLoad: boolean;\r\n authority?: string;\r\n}\r\n\r\nconst initialState: CommonStoresInterface = {\r\n ...BUSINESS_STORES,\r\n ...ADMINISTRATION_STORES,\r\n};\r\n\r\nconst commonStoreSlice = createSlice({\r\n name: \"loadingMask\",\r\n initialState,\r\n reducers: {\r\n setStoreData(state, action: PayloadAction<setStoreDataProps>) {\r\n state[action.payload.storeKey].data = action.payload.data;\r\n },\r\n },\r\n});\r\n\r\nexport const { setStoreData } = commonStoreSlice.actions;\r\nexport default commonStoreSlice.reducer;\r\n","import { CommonStoresInterface } from \"../business/CommonStoreSlice\";\r\n\r\nexport const ADMINISTRATION_STORES: CommonStoresInterface = {\r\n SystemDataSourceType: {\r\n autoLoad: false,\r\n data: [{ value: \"Mysql\" }, { value: \"Oracle\" }, { value: \"DB2\" }],\r\n url: \"\",\r\n },\r\n SystemParameterTypes: {\r\n autoLoad: false,\r\n url: \"\",\r\n data: [\r\n { value: \"datetime\" },\r\n { value: \"date\" },\r\n { value: \"text\" },\r\n { value: \"number\" },\r\n { value: \"droplist\" },\r\n ],\r\n },\r\n SystemReportTypes: {\r\n autoLoad: false,\r\n url: \"\",\r\n data: [{ value: \"Excel\" }, { value: \"Jasper\" }, { value: \"Blueprint\" }],\r\n },\r\n SystemWidgetTypes: {\r\n autoLoad: false,\r\n url: \"\",\r\n data: [\r\n { name: \"LineChart\" },\r\n { name: \"ColumnChart\" },\r\n { name: \"PieChart\" },\r\n { name: \"Card\" },\r\n { name: \"CircularProgress\" },\r\n { name: \"LinearProgress\" },\r\n ],\r\n },\r\n SystemMailRecipientTypes: {\r\n autoLoad: false,\r\n url: \"\",\r\n data: [{ name: \"To\" }, { name: \"CC\" }],\r\n },\r\n SystemDataSources: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/datasourceconnection/all\",\r\n },\r\n SystemDataQueries: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/dataquery/all\",\r\n },\r\n SystemEntityParameters: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/entityparameter/all\",\r\n },\r\n SystemAuthorities: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/authority/all\",\r\n },\r\n SystemRoles: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/role/all\",\r\n },\r\n};\r\n","import { createSlice } from \"@reduxjs/toolkit\";\r\n\r\nexport type AppInfo = {\r\n documentTitle: string;\r\n apiBaseUrl: string;\r\n appName: string;\r\n appVersion: string;\r\n appLogo: any;\r\n};\r\n\r\nconst initialState: AppInfo = {\r\n documentTitle: \"\",\r\n apiBaseUrl: \"\",\r\n appName: \"\",\r\n appVersion: \"\",\r\n appLogo: null,\r\n};\r\n\r\nconst AppInfoSlice = createSlice({\r\n name: \"AppInfo\",\r\n initialState: initialState,\r\n reducers: {\r\n setAppInfo: (state, action) => {\r\n state = action.payload;\r\n },\r\n },\r\n});\r\n\r\nexport const AppInfoActions = AppInfoSlice.actions;\r\nexport default AppInfoSlice.reducer;\r\n","import { configureStore } from \"@reduxjs/toolkit\";\r\nimport AppLayoutReducer from \"./features/common/AppLayoutSlice\";\r\nimport UserSessionReducer from \"./features/common/UserSessionSlice\";\r\nimport LoadingMaskReducer from \"./features/common/LoadingMaskSlice\";\r\nimport CommonStoreReducer from \"./features/business/CommonStoreSlice\";\r\nimport AppInfoReducer from \"./features/common/AppInfoSlice\";\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 AppInfo: AppInfoReducer,\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":["initialState","sideBarOpened","themeMode","localStorage","getItem","appDirection","AppLayoutSlice","createSlice","name","reducers","toggleSideBarState","state","setSideBarState","action","payload","setThemeMode","setAppDirection","actions","AppLayoutReducer","reducer","UserSessionSlice","value","isAuthenticated","authorities","userProfile","setAuthenticated","setUnAuthenticated","UserSessionReducer","loadingMaskSlice","isOpened","message","showLoadingMask","hideLoadingMask","LoadingMaskReducer","SystemDataSourceType","autoLoad","data","url","SystemParameterTypes","SystemReportTypes","SystemWidgetTypes","SystemMailRecipientTypes","SystemDataSources","authority","SystemDataQueries","SystemEntityParameters","SystemAuthorities","SystemRoles","commonStoreSlice","setStoreData","storeKey","CommonStoreReducer","AppInfoSlice","documentTitle","apiBaseUrl","appName","appVersion","appLogo","setAppInfo","AppInfoReducer","store","configureStore","AppLayout","UserSession","loadingMask","commonStores","AppInfo","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":"2eAUA,MAAMA,EAA+B,CACnCC,eAAe,EACfC,UAAWC,aAAaC,QAAQ,cAAgB,QAChDC,aAAkD,MAApCF,aAAaC,QAAQ,YAAsB,MAAQ,OAG7DE,EAAiBC,EAAAA,YAAY,CACjCC,KAAM,yBACNR,EACAS,SAAU,CACRC,mBAAqBC,IACnBA,EAAMV,eAAiBU,EAAMV,eAE/BW,gBAAiB,CAACD,EAAOE,KACvBF,EAAMV,cAAgBY,EAAOC,SAE/BC,aAAc,CAACJ,EAAOE,KACpBF,EAAMT,UAAYW,EAAOC,SAE3BE,gBAAiB,CAACL,EAAOE,KACvBF,EAAMN,aAAeQ,EAAOC,YAKFR,EAAeW,QAC/C,IAAeC,EAAAZ,EAAea,QCD9B,MAQMC,EAAmBb,EAAAA,YAAY,CACnCC,KAAM,2BAT+B,CACrCa,MAAO,CACLC,gBAAiB,KACjBC,YAAa,GACbC,YAAa,OAOff,SAAU,CACRgB,iBAAkB,CAACd,EAAOE,KACxBF,EAAMU,MAAQR,EAAOC,SAE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BAe,EAAAA,YAAYC,cACV,4HAIFC,EAAAA,QAAQC,IAAIC,EAAAA,KACZF,EAAAA,QAAQC,IAAIE,EAAAA,KACZH,EAAAA,QAAQC,IAAIG,EAAAA,qNAIoCC,GAE5CC,MAACC,EAAAA,SAAS,CAAA/B,MAAOA,EACfgC,SAAAF,EAAAG,IAAA,MAAA,CAAAD,SAAA","x_google_ignoreList":[8]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Provider as a}from"react-redux";import{createSlice as t,configureStore as r}from"@reduxjs/toolkit";import{library as o}from"@fortawesome/fontawesome-svg-core";import{fab as i}from"@fortawesome/free-brands-svg-icons";import{far as n}from"@fortawesome/free-regular-svg-icons";import{fas as s}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";const l=t({name:"AppLayout",initialState:{sideBarOpened:!1,themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},reducers:{toggleSideBarState:e=>{e.sideBarOpened=!e.sideBarOpened},setSideBarState:(e,a)=>{e.sideBarOpened=a.payload},setThemeMode:(e,a)=>{e.themeMode=a.payload},setAppDirection:(e,a)=>{e.appDirection=a.payload}}});l.actions;var u=l.reducer;const m=t({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[],userProfile:null}},reducers:{setAuthenticated:(e,a)=>{e.value=a.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[],userProfile:null}}}});m.actions;var c=m.reducer;const p=t({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,a)=>{e.value.isOpened=!0,e.value.message=a.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:y,hideLoadingMask:f}=p.actions;var h=p.reducer;const g=t({name:"loadingMask",initialState:{SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"datetime"},{value:"date"},{value:"text"},{value:"number"},{value:"droplist"}]},SystemReportTypes:{autoLoad:!1,url:"",data:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}]},SystemWidgetTypes:{autoLoad:!1,url:"",data:[{name:"LineChart"},{name:"ColumnChart"},{name:"PieChart"},{name:"Card"},{name:"CircularProgress"},{name:"LinearProgress"}]},SystemMailRecipientTypes:{autoLoad:!1,url:"",data:[{name:"To"},{name:"CC"}]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/dataquery/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/entityparameter/all"},SystemAuthorities:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/authority/all"},SystemRoles:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/admin/role/all"}},reducers:{setStoreData(e,a){e[a.payload.storeKey].data=a.payload.data}}}),{setStoreData:v}=g.actions;var S=g.reducer;const M=t({name:"AppInfo",initialState:{documentTitle:"",apiBaseUrl:"",appName:"",appVersion:"",appLogo:null},reducers:{setAppInfo:(e,a)=>{a.payload}}});M.actions;const L=r({reducer:{AppLayout:u,UserSession:c,loadingMask:h,commonStores:S,AppInfo:M.reducer}});!function(e,a){void 0===a&&(a={});var t=a.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&r.firstChild?r.insertBefore(o,r.firstChild):r.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"),d.setLicenseKey("c2bd611fa642666253500ab9c8e4f78fTz0xMTE4MjEsRT0xNzc2OTg4Nzk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y"),o.add(i),o.add(n),o.add(s);const T=t=>e(a,{store:L,children:e("div",{children:"Base App"})});export{T as BaseApp};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -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":"+rBAEA,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/features/common/AppLayoutSlice.ts","../src/redux/features/common/UserSessionSlice.ts","../src/redux/features/common/LoadingMaskSlice.ts","../src/redux/features/business/BusinessStoresMetaData.ts","../src/redux/features/business/CommonStoreSlice.ts","../src/redux/features/administration/AdministrationStoresMetaData.ts","../src/redux/features/common/AppInfoSlice.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\nexport const DRAWER_WIDTH = 350;\r\n\r\ninterface AppLayoutState {\r\n sideBarOpened: boolean;\r\n themeMode: \"light\" | \"dark\" | string;\r\n appDirection: \"ltr\" | \"rtl\";\r\n}\r\n\r\nconst initialState: AppLayoutState = {\r\n sideBarOpened: false,\r\n themeMode: localStorage.getItem(\"themeMode\") || \"light\",\r\n appDirection: localStorage.getItem(\"language\") == \"ar\" ? \"rtl\" : \"ltr\",\r\n};\r\n\r\nconst AppLayoutSlice = createSlice({\r\n name: \"AppLayout\",\r\n initialState,\r\n reducers: {\r\n toggleSideBarState: (state) => {\r\n state.sideBarOpened = !state.sideBarOpened;\r\n },\r\n setSideBarState: (state, action) => {\r\n state.sideBarOpened = action.payload;\r\n },\r\n setThemeMode: (state, action) => {\r\n state.themeMode = action.payload;\r\n },\r\n setAppDirection: (state, action) => {\r\n state.appDirection = action.payload;\r\n },\r\n },\r\n});\r\n\r\nexport const AppLayoutActions = AppLayoutSlice.actions;\r\nexport default AppLayoutSlice.reducer;\r\n","import { createSlice } from \"@reduxjs/toolkit\";\r\n\r\nexport interface OrganizationProps {\r\n organizationCode?: string;\r\n organizationName?: string;\r\n}\r\nexport interface UserProfileProps {\r\n username?: string;\r\n currentOrganizationCode?: string;\r\n userOrganizations?: Array<OrganizationProps>;\r\n employeeNumber?: string;\r\n employeeName?: string;\r\n divisionCode?: string;\r\n divisionName?: string;\r\n departmentCode?: string;\r\n departmentName?: string;\r\n rankCode?: string;\r\n rankName?: string;\r\n sectionCode?: string;\r\n sectionName?: string;\r\n subsectionCode?: string;\r\n subsectionName?: string;\r\n extNumber?: string;\r\n mobileNumber?: string;\r\n email?: string;\r\n}\r\n\r\nexport interface UserSessionProps {\r\n value: {\r\n isAuthenticated: boolean | null;\r\n userProfile: UserProfileProps | null;\r\n authorities: Array<{ authority: string }>;\r\n };\r\n}\r\n\r\nconst initialState: UserSessionProps = {\r\n value: {\r\n isAuthenticated: null,\r\n authorities: [],\r\n userProfile: null,\r\n },\r\n};\r\n\r\nconst UserSessionSlice = createSlice({\r\n name: \"UserSession\",\r\n initialState,\r\n reducers: {\r\n setAuthenticated: (state, action) => {\r\n state.value = action.payload;\r\n },\r\n setUnAuthenticated: (state) => {\r\n state.value = {\r\n isAuthenticated: false,\r\n authorities: [],\r\n userProfile: null,\r\n };\r\n },\r\n },\r\n});\r\n\r\nexport const UserSessionActions = UserSessionSlice.actions;\r\nexport default UserSessionSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\n\r\ninterface LoadingMaskStateValue {\r\n value: { isOpened: boolean; message?: string | null };\r\n}\r\n\r\nconst initialState: LoadingMaskStateValue = {\r\n value: { isOpened: false, message: null },\r\n};\r\n\r\nconst loadingMaskSlice = createSlice({\r\n name: \"loadingMask\",\r\n initialState,\r\n reducers: {\r\n showLoadingMask: (\r\n state,\r\n action: PayloadAction<string | null | undefined>\r\n ) => {\r\n state.value.isOpened = true;\r\n state.value.message = action.payload;\r\n },\r\n hideLoadingMask: (state) => {\r\n state.value.isOpened = false;\r\n state.value.message = null;\r\n },\r\n },\r\n});\r\n\r\nexport const { showLoadingMask, hideLoadingMask } = loadingMaskSlice.actions;\r\nexport default loadingMaskSlice.reducer;\r\n","import { CommonStoresInterface } from \"./CommonStoreSlice\";\r\n\r\nexport const BUSINESS_STORES: CommonStoresInterface = {};\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\nimport { BUSINESS_STORES } from \"./BusinessStoresMetaData\";\r\nimport { ADMINISTRATION_STORES } from \"../administration/AdministrationStoresMetaData\";\r\n\r\nexport interface CommonStoresInterface {\r\n [key: string]: StoreMetaData;\r\n}\r\n\r\ninterface setStoreDataProps {\r\n storeKey: string;\r\n data: Array<any>;\r\n}\r\n\r\nexport interface StoreMetaData {\r\n url: string;\r\n data: Array<any>;\r\n autoLoad: boolean;\r\n authority?: string;\r\n}\r\n\r\nconst initialState: CommonStoresInterface = {\r\n ...BUSINESS_STORES,\r\n ...ADMINISTRATION_STORES,\r\n};\r\n\r\nconst commonStoreSlice = createSlice({\r\n name: \"loadingMask\",\r\n initialState,\r\n reducers: {\r\n setStoreData(state, action: PayloadAction<setStoreDataProps>) {\r\n state[action.payload.storeKey].data = action.payload.data;\r\n },\r\n },\r\n});\r\n\r\nexport const { setStoreData } = commonStoreSlice.actions;\r\nexport default commonStoreSlice.reducer;\r\n","import { CommonStoresInterface } from \"../business/CommonStoreSlice\";\r\n\r\nexport const ADMINISTRATION_STORES: CommonStoresInterface = {\r\n SystemDataSourceType: {\r\n autoLoad: false,\r\n data: [{ value: \"Mysql\" }, { value: \"Oracle\" }, { value: \"DB2\" }],\r\n url: \"\",\r\n },\r\n SystemParameterTypes: {\r\n autoLoad: false,\r\n url: \"\",\r\n data: [\r\n { value: \"datetime\" },\r\n { value: \"date\" },\r\n { value: \"text\" },\r\n { value: \"number\" },\r\n { value: \"droplist\" },\r\n ],\r\n },\r\n SystemReportTypes: {\r\n autoLoad: false,\r\n url: \"\",\r\n data: [{ value: \"Excel\" }, { value: \"Jasper\" }, { value: \"Blueprint\" }],\r\n },\r\n SystemWidgetTypes: {\r\n autoLoad: false,\r\n url: \"\",\r\n data: [\r\n { name: \"LineChart\" },\r\n { name: \"ColumnChart\" },\r\n { name: \"PieChart\" },\r\n { name: \"Card\" },\r\n { name: \"CircularProgress\" },\r\n { name: \"LinearProgress\" },\r\n ],\r\n },\r\n SystemMailRecipientTypes: {\r\n autoLoad: false,\r\n url: \"\",\r\n data: [{ name: \"To\" }, { name: \"CC\" }],\r\n },\r\n SystemDataSources: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/datasourceconnection/all\",\r\n },\r\n SystemDataQueries: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/dataquery/all\",\r\n },\r\n SystemEntityParameters: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/entityparameter/all\",\r\n },\r\n SystemAuthorities: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/authority/all\",\r\n },\r\n SystemRoles: {\r\n autoLoad: true,\r\n data: [],\r\n authority: \"DEVELOPMENT_ADMIN\",\r\n url: \"api/v1/admin/role/all\",\r\n },\r\n};\r\n","import { createSlice } from \"@reduxjs/toolkit\";\r\n\r\nexport type AppInfo = {\r\n documentTitle: string;\r\n apiBaseUrl: string;\r\n appName: string;\r\n appVersion: string;\r\n appLogo: any;\r\n};\r\n\r\nconst initialState: AppInfo = {\r\n documentTitle: \"\",\r\n apiBaseUrl: \"\",\r\n appName: \"\",\r\n appVersion: \"\",\r\n appLogo: null,\r\n};\r\n\r\nconst AppInfoSlice = createSlice({\r\n name: \"AppInfo\",\r\n initialState: initialState,\r\n reducers: {\r\n setAppInfo: (state, action) => {\r\n state = action.payload;\r\n },\r\n },\r\n});\r\n\r\nexport const AppInfoActions = AppInfoSlice.actions;\r\nexport default AppInfoSlice.reducer;\r\n","import { configureStore } from \"@reduxjs/toolkit\";\r\nimport AppLayoutReducer from \"./features/common/AppLayoutSlice\";\r\nimport UserSessionReducer from \"./features/common/UserSessionSlice\";\r\nimport LoadingMaskReducer from \"./features/common/LoadingMaskSlice\";\r\nimport CommonStoreReducer from \"./features/business/CommonStoreSlice\";\r\nimport AppInfoReducer from \"./features/common/AppInfoSlice\";\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 AppInfo: AppInfoReducer,\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":["AppLayoutSlice","createSlice","name","sideBarOpened","themeMode","localStorage","getItem","appDirection","reducers","toggleSideBarState","state","setSideBarState","action","payload","setThemeMode","setAppDirection","actions","AppLayoutReducer","reducer","UserSessionSlice","value","isAuthenticated","authorities","userProfile","setAuthenticated","setUnAuthenticated","UserSessionReducer","loadingMaskSlice","isOpened","message","showLoadingMask","hideLoadingMask","LoadingMaskReducer","commonStoreSlice","SystemDataSourceType","autoLoad","data","url","SystemParameterTypes","SystemReportTypes","SystemWidgetTypes","SystemMailRecipientTypes","SystemDataSources","authority","SystemDataQueries","SystemEntityParameters","SystemAuthorities","SystemRoles","setStoreData","storeKey","CommonStoreReducer","AppInfoSlice","initialState","documentTitle","apiBaseUrl","appName","appVersion","appLogo","setAppInfo","store","configureStore","AppLayout","UserSession","loadingMask","commonStores","AppInfo","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":"8lBAUA,MAMMA,EAAiBC,EAAY,CACjCC,KAAM,yBAP6B,CACnCC,eAAe,EACfC,UAAWC,aAAaC,QAAQ,cAAgB,QAChDC,aAAkD,MAApCF,aAAaC,QAAQ,YAAsB,MAAQ,OAMjEE,SAAU,CACRC,mBAAqBC,IACnBA,EAAMP,eAAiBO,EAAMP,eAE/BQ,gBAAiB,CAACD,EAAOE,KACvBF,EAAMP,cAAgBS,EAAOC,SAE/BC,aAAc,CAACJ,EAAOE,KACpBF,EAAMN,UAAYQ,EAAOC,SAE3BE,gBAAiB,CAACL,EAAOE,KACvBF,EAAMH,aAAeK,EAAOC,YAKFb,EAAegB,QAC/C,IAAeC,EAAAjB,EAAekB,QCD9B,MAQMC,EAAmBlB,EAAY,CACnCC,KAAM,2BAT+B,CACrCkB,MAAO,CACLC,gBAAiB,KACjBC,YAAa,GACbC,YAAa,OAOff,SAAU,CACRgB,iBAAkB,CAACd,EAAOE,KACxBF,EAAMU,MAAQR,EAAOC,SAEvBY,mBAAqBf,IACnBA,EAAMU,MAAQ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AAmCC,GAE5CC,EAACC,EAAS,CAAAhC,MAAOA,EACfiC,SAAAF,EAAA,MAAA,CAAAE,SAAA","x_google_ignoreList":[8]}
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useSelector } from "react-redux";
|
|
2
|
+
import { createTheme } from "@mui/material";
|
|
3
|
+
import { ThemeProvider } from "@emotion/react";
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
import { RootState } from "../redux/store";
|
|
6
|
+
import { LightThemeOptions } from "../theme/LightThemeOptions";
|
|
7
|
+
import { DarkThemeOptions } from "../theme/DarkThemeOptions";
|
|
8
|
+
import Layout from "../layout/Layout";
|
|
9
|
+
|
|
10
|
+
function App() {
|
|
11
|
+
const AppInfo = useSelector((state: RootState) => state.AppInfo);
|
|
12
|
+
const AppLayoutState = useSelector((state: RootState) => state.AppLayout);
|
|
13
|
+
let themeOptions = { ...LightThemeOptions };
|
|
14
|
+
if (AppLayoutState.themeMode === "dark") {
|
|
15
|
+
themeOptions = { ...DarkThemeOptions };
|
|
16
|
+
}
|
|
17
|
+
const theme = createTheme({
|
|
18
|
+
direction: AppLayoutState.appDirection,
|
|
19
|
+
...themeOptions,
|
|
20
|
+
});
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
document.title = AppInfo.documentTitle;
|
|
23
|
+
}, []);
|
|
24
|
+
return (
|
|
25
|
+
<ThemeProvider theme={theme}>
|
|
26
|
+
<Layout />
|
|
27
|
+
</ThemeProvider>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default App;
|
|
@@ -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
|
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import useApiActions from "../templates/DataEntryTemplates/useApiActions";
|
|
3
|
+
import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
|
|
4
|
+
import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const AttachmentGrid: React.FC = () => {
|
|
8
|
+
const [data, setData] = useState([]);
|
|
9
|
+
const apiActions = useApiActions({
|
|
10
|
+
findAll: "api/v1/admin/attachment/all",
|
|
11
|
+
deleteById: "api/v1/admin/attachment",
|
|
12
|
+
save: "api/v1/admin/attachment",
|
|
13
|
+
findById: "api/v1/admin/attachment",
|
|
14
|
+
setData: setData,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const formElements: Array<FormElementProps> = [
|
|
18
|
+
{
|
|
19
|
+
type: "field",
|
|
20
|
+
mode: "props",
|
|
21
|
+
props: {
|
|
22
|
+
fieldLabel: "ATTACHMENT_ATTACHMENT_NUMBER",
|
|
23
|
+
fieldName: "attachmentNumber",
|
|
24
|
+
required: false,
|
|
25
|
+
fieldType: "text",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "field",
|
|
30
|
+
mode: "props",
|
|
31
|
+
props: {
|
|
32
|
+
fieldLabel: "ATTACHMENT_ATTACHMENT_SIZE",
|
|
33
|
+
fieldName: "attachmentSize",
|
|
34
|
+
required: false,
|
|
35
|
+
fieldType: "text",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: "field",
|
|
40
|
+
mode: "props",
|
|
41
|
+
props: {
|
|
42
|
+
fieldLabel: "ATTACHMENT_ATTACHMENT_TYPE",
|
|
43
|
+
fieldName: "attachmentType",
|
|
44
|
+
required: false,
|
|
45
|
+
fieldType: "text",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: "field",
|
|
50
|
+
mode: "props",
|
|
51
|
+
props: {
|
|
52
|
+
fieldLabel: "ATTACHMENT_CATEGORY",
|
|
53
|
+
fieldName: "category",
|
|
54
|
+
required: false,
|
|
55
|
+
fieldType: "text",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: "field",
|
|
60
|
+
mode: "props",
|
|
61
|
+
props: {
|
|
62
|
+
fieldLabel: "ATTACHMENT_DOC_TYPE",
|
|
63
|
+
fieldName: "docType",
|
|
64
|
+
required: false,
|
|
65
|
+
fieldType: "text",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: "field",
|
|
70
|
+
mode: "props",
|
|
71
|
+
props: {
|
|
72
|
+
fieldLabel: "ATTACHMENT_FILE_NAME",
|
|
73
|
+
fieldName: "fileName",
|
|
74
|
+
required: false,
|
|
75
|
+
fieldType: "text",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: "field",
|
|
80
|
+
mode: "props",
|
|
81
|
+
props: {
|
|
82
|
+
fieldLabel: "ATTACHMENT_REF_KEY",
|
|
83
|
+
fieldName: "refKey",
|
|
84
|
+
required: false,
|
|
85
|
+
fieldType: "text",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: "field",
|
|
90
|
+
mode: "props",
|
|
91
|
+
props: {
|
|
92
|
+
fieldLabel: "ATTACHMENT_REMARK",
|
|
93
|
+
fieldName: "remark",
|
|
94
|
+
required: false,
|
|
95
|
+
fieldType: "text",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<TemplateGrid
|
|
102
|
+
apiActions={apiActions}
|
|
103
|
+
data={data}
|
|
104
|
+
setData={setData}
|
|
105
|
+
editMode={{ editMode: "row" }}
|
|
106
|
+
formElements={formElements}
|
|
107
|
+
keyColumnName={"id"}
|
|
108
|
+
gridTitle="ATTACHMENT_PLURAL"
|
|
109
|
+
girdIcon="table-cells"
|
|
110
|
+
editAction={{ isEnabled: true, authority: "ATTACHMENT_EDIT" }}
|
|
111
|
+
deleteAction={{ isEnabled: true, authority: "ATTACHMENT_DELETE" }}
|
|
112
|
+
/>
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export default AttachmentGrid;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
|
|
3
|
+
import useApiActions from "../templates/DataEntryTemplates/useApiActions";
|
|
4
|
+
import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
|
|
5
|
+
|
|
6
|
+
const AuthorityGrid: React.FC = () => {
|
|
7
|
+
const [data, setData] = useState([]);
|
|
8
|
+
const apiActions = useApiActions({
|
|
9
|
+
commonStoreKey: "SystemAuthorities",
|
|
10
|
+
deleteById: "api/v1/admin/authority",
|
|
11
|
+
save: "api/v1/admin/authority",
|
|
12
|
+
findById: "api/v1/admin/authority",
|
|
13
|
+
setData: setData,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const formElements: Array<FormElementProps> = [
|
|
17
|
+
{
|
|
18
|
+
type: "field",
|
|
19
|
+
mode: "props",
|
|
20
|
+
props: {
|
|
21
|
+
fieldLabel: "AUTHORITY_AUTHORITY_CODE",
|
|
22
|
+
fieldName: "authorityCode",
|
|
23
|
+
required: true,
|
|
24
|
+
fieldType: "text",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "field",
|
|
29
|
+
mode: "props",
|
|
30
|
+
props: {
|
|
31
|
+
fieldLabel: "AUTHORITY_AUTHORITY_DESCRIPTION",
|
|
32
|
+
fieldName: "authorityDescription",
|
|
33
|
+
required: true,
|
|
34
|
+
fieldType: "text",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: "field",
|
|
39
|
+
mode: "props",
|
|
40
|
+
props: {
|
|
41
|
+
fieldLabel: "AUTHORITY_AUTHORITY_NAME",
|
|
42
|
+
fieldName: "authorityName",
|
|
43
|
+
required: true,
|
|
44
|
+
fieldType: "text",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "field",
|
|
49
|
+
mode: "props",
|
|
50
|
+
props: {
|
|
51
|
+
fieldLabel: "AUTHORITY_IS_ACTIVE",
|
|
52
|
+
fieldName: "isActive",
|
|
53
|
+
required: false,
|
|
54
|
+
fieldType: "checkbox",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: "field",
|
|
59
|
+
mode: "props",
|
|
60
|
+
props: {
|
|
61
|
+
fieldLabel: "AUTHORITY_ORGANIZATION_APPLICATION_ID",
|
|
62
|
+
fieldName: "organizationApplicationId",
|
|
63
|
+
required: false,
|
|
64
|
+
fieldType: "text",
|
|
65
|
+
gridProps: {
|
|
66
|
+
hidden: true,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<TemplateGrid
|
|
74
|
+
apiActions={apiActions}
|
|
75
|
+
data={data}
|
|
76
|
+
setData={setData}
|
|
77
|
+
editMode={{ editMode: "row", reloadAfterSave: true }}
|
|
78
|
+
formElements={formElements}
|
|
79
|
+
keyColumnName={"id"}
|
|
80
|
+
gridTitle="AUTHORITY_PLURAL"
|
|
81
|
+
girdIcon="table-cells"
|
|
82
|
+
editAction={{ isEnabled: true, authority: "AUTHORITY_EDIT" }}
|
|
83
|
+
deleteAction={{ isEnabled: true, authority: "AUTHORITY_DELETE" }}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default AuthorityGrid;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
|
|
3
|
+
import useApiActions from "../templates/DataEntryTemplates/useApiActions";
|
|
4
|
+
import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
|
|
5
|
+
|
|
6
|
+
const BluePrintGrid: React.FC = () => {
|
|
7
|
+
const [data, setData] = useState([]);
|
|
8
|
+
const apiActions = useApiActions({
|
|
9
|
+
findAll: "api/v1/admin/blueprint/all",
|
|
10
|
+
deleteById: "api/v1/admin/blueprint",
|
|
11
|
+
save: "api/v1/admin/blueprint",
|
|
12
|
+
findById: "api/v1/admin/blueprint",
|
|
13
|
+
setData: setData,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const formElements: Array<FormElementProps> = [
|
|
17
|
+
{
|
|
18
|
+
type: "field",
|
|
19
|
+
mode: "props",
|
|
20
|
+
props: {
|
|
21
|
+
fieldLabel: "BLUE_PRINT_BLUE_PRINT_CODE",
|
|
22
|
+
fieldName: "bluePrintCode",
|
|
23
|
+
required: false,
|
|
24
|
+
fieldType: "text",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "field",
|
|
29
|
+
mode: "props",
|
|
30
|
+
props: {
|
|
31
|
+
fieldLabel: "BLUE_PRINT_QUERY_ID",
|
|
32
|
+
fieldName: "queryId",
|
|
33
|
+
required: false,
|
|
34
|
+
fieldType: "text",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<TemplateGrid
|
|
41
|
+
apiActions={apiActions}
|
|
42
|
+
data={data}
|
|
43
|
+
setData={setData}
|
|
44
|
+
editMode={{ editMode: "row" }}
|
|
45
|
+
formElements={formElements}
|
|
46
|
+
keyColumnName={"id"}
|
|
47
|
+
gridTitle="BLUE_PRINT_PLURAL"
|
|
48
|
+
girdIcon="table-cells"
|
|
49
|
+
editAction={{ isEnabled: true, authority: "BLUE_PRINT_EDIT" }}
|
|
50
|
+
deleteAction={{ isEnabled: true, authority: "BLUE_PRINT_DELETE" }}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default BluePrintGrid;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
|
|
3
|
+
import useApiActions from "../templates/DataEntryTemplates/useApiActions";
|
|
4
|
+
import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
|
|
5
|
+
|
|
6
|
+
const BluePrintPageGrid: React.FC = () => {
|
|
7
|
+
const [data, setData] = useState([]);
|
|
8
|
+
const apiActions = useApiActions({
|
|
9
|
+
findAll: "api/v1/admin/blueprintpage/all",
|
|
10
|
+
deleteById: "api/v1/admin/blueprintpage",
|
|
11
|
+
save: "api/v1/admin/blueprintpage",
|
|
12
|
+
findById: "api/v1/admin/blueprintpage",
|
|
13
|
+
setData: setData,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const formElements: Array<FormElementProps> = [
|
|
17
|
+
{
|
|
18
|
+
type: "field",
|
|
19
|
+
mode: "props",
|
|
20
|
+
props: {
|
|
21
|
+
fieldLabel: "BLUE_PRINT_PAGE_BLUE_PRINT_ID",
|
|
22
|
+
fieldName: "bluePrintId",
|
|
23
|
+
required: false,
|
|
24
|
+
fieldType: "text",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "field",
|
|
29
|
+
mode: "props",
|
|
30
|
+
props: {
|
|
31
|
+
fieldLabel: "BLUE_PRINT_PAGE_ENABLED",
|
|
32
|
+
fieldName: "enabled",
|
|
33
|
+
required: false,
|
|
34
|
+
fieldType: "checkbox",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: "field",
|
|
39
|
+
mode: "props",
|
|
40
|
+
props: {
|
|
41
|
+
fieldLabel: "BLUE_PRINT_PAGE_PAGE_NAME",
|
|
42
|
+
fieldName: "pageName",
|
|
43
|
+
required: false,
|
|
44
|
+
fieldType: "text",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "field",
|
|
49
|
+
mode: "props",
|
|
50
|
+
props: {
|
|
51
|
+
fieldLabel: "BLUE_PRINT_PAGE_PAGE_ORDER",
|
|
52
|
+
fieldName: "pageOrder",
|
|
53
|
+
required: false,
|
|
54
|
+
fieldType: "text",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: "field",
|
|
59
|
+
mode: "props",
|
|
60
|
+
props: {
|
|
61
|
+
fieldLabel: "BLUE_PRINT_PAGE_QUERY_ID",
|
|
62
|
+
fieldName: "queryId",
|
|
63
|
+
required: false,
|
|
64
|
+
fieldType: "text",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<TemplateGrid
|
|
71
|
+
apiActions={apiActions}
|
|
72
|
+
data={data}
|
|
73
|
+
setData={setData}
|
|
74
|
+
editMode={{ editMode: "row" }}
|
|
75
|
+
formElements={formElements}
|
|
76
|
+
keyColumnName={"id"}
|
|
77
|
+
gridTitle="BLUE_PRINT_PAGE_PLURAL"
|
|
78
|
+
girdIcon="table-cells"
|
|
79
|
+
editAction={{ isEnabled: true, authority: "BLUE_PRINT_PAGE_EDIT" }}
|
|
80
|
+
deleteAction={{ isEnabled: true, authority: "BLUE_PRINT_PAGE_DELETE" }}
|
|
81
|
+
/>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default BluePrintPageGrid;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import TemplateGrid from "../templates/DataEntryTemplates/TemplateDataGrid/TemplateGrid";
|
|
3
|
+
import useApiActions from "../templates/DataEntryTemplates/useApiActions";
|
|
4
|
+
import { FormElementProps } from "../templates/DataEntryTemplates/DataEntryTypes";
|
|
5
|
+
|
|
6
|
+
const BluePrintPointGrid: React.FC = () => {
|
|
7
|
+
const [data, setData] = useState([]);
|
|
8
|
+
const apiActions = useApiActions({
|
|
9
|
+
findAll: "api/v1/admin/blueprintpoint/all",
|
|
10
|
+
deleteById: "api/v1/admin/blueprintpoint",
|
|
11
|
+
save: "api/v1/admin/blueprintpoint",
|
|
12
|
+
findById: "api/v1/admin/blueprintpoint",
|
|
13
|
+
setData: setData,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const formElements: Array<FormElementProps> = [
|
|
17
|
+
{
|
|
18
|
+
type: "field",
|
|
19
|
+
mode: "props",
|
|
20
|
+
props: {
|
|
21
|
+
fieldLabel: "BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID",
|
|
22
|
+
fieldName: "bluePrintPageId",
|
|
23
|
+
required: false,
|
|
24
|
+
fieldType: "text",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "field",
|
|
29
|
+
mode: "props",
|
|
30
|
+
props: {
|
|
31
|
+
fieldLabel: "BLUE_PRINT_POINT_FONT_SIZE",
|
|
32
|
+
fieldName: "fontSize",
|
|
33
|
+
required: false,
|
|
34
|
+
fieldType: "text",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: "field",
|
|
39
|
+
mode: "props",
|
|
40
|
+
props: {
|
|
41
|
+
fieldLabel: "BLUE_PRINT_POINT_POINT_CODE",
|
|
42
|
+
fieldName: "pointCode",
|
|
43
|
+
required: false,
|
|
44
|
+
fieldType: "text",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "field",
|
|
49
|
+
mode: "props",
|
|
50
|
+
props: {
|
|
51
|
+
fieldLabel: "BLUE_PRINT_POINT_X",
|
|
52
|
+
fieldName: "x",
|
|
53
|
+
required: false,
|
|
54
|
+
fieldType: "text",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: "field",
|
|
59
|
+
mode: "props",
|
|
60
|
+
props: {
|
|
61
|
+
fieldLabel: "BLUE_PRINT_POINT_Y",
|
|
62
|
+
fieldName: "y",
|
|
63
|
+
required: false,
|
|
64
|
+
fieldType: "text",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<TemplateGrid
|
|
71
|
+
apiActions={apiActions}
|
|
72
|
+
data={data}
|
|
73
|
+
setData={setData}
|
|
74
|
+
editMode={{ editMode: "row" }}
|
|
75
|
+
formElements={formElements}
|
|
76
|
+
keyColumnName={"id"}
|
|
77
|
+
gridTitle="BLUE_PRINT_POINT_PLURAL"
|
|
78
|
+
girdIcon="table-cells"
|
|
79
|
+
editAction={{ isEnabled: true, authority: "BLUE_PRINT_POINT_EDIT" }}
|
|
80
|
+
deleteAction={{ isEnabled: true, authority: "BLUE_PRINT_POINT_DELETE" }}
|
|
81
|
+
/>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default BluePrintPointGrid;
|