@asaleh37/ui-base 1.2.5 → 1.2.7
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 +3 -1
- package/dist/index.js +5 -5
- 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/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/routes/index.ts +0 -1
- package/src/types/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react-redux"),i=require("@fortawesome/fontawesome-svg-core"),o=require("@fortawesome/free-brands-svg-icons"),a=require("@fortawesome/free-regular-svg-icons"),r=require("@fortawesome/free-solid-svg-icons");require("react-toastify/dist/ReactToastify.css");var d=require("@mui/material"),n=require("@emotion/react"),l=require("react"),s=require("@mui/material/styles"),p=require("@mui/material/CssBaseline"),c=require("@mui/material/AppBar"),u=require("@mui/material/Toolbar"),m=require("@fortawesome/react-fontawesome"),T=require("@reduxjs/toolkit"),A=require("react-toastify"),_=require("axios"),E=require("i18next"),f=require("react-i18next"),I=require("@mui/material/List"),O=require("@mui/material/Card"),N=require("@mui/material/CardHeader"),y=require("@mui/material/ListItemText"),R=require("@mui/material/ListItemIcon"),L=require("@mui/material/Checkbox"),h=require("@mui/material/Button"),P=require("@mui/material/Divider"),M=require("@mui/x-charts"),C=require("@mui/material/LinearProgress"),D=require("@mui/material/Typography"),S=require("@mui/material/Box"),b=require("@mui/x-charts/PieChart"),g=require("@mui/x-date-pickers"),x=require("@mui/x-date-pickers/AdapterMoment"),U=require("moment"),v=require("zod"),F=require("react-hook-form"),w=require("@hookform/resolvers/zod"),B=require("react-router-dom"),k=require("draft-js"),W=require("react-draft-wysiwyg"),G=require("draftjs-to-html"),j=require("draft-js-import-html");require("react-draft-wysiwyg/dist/react-draft-wysiwyg.css");var V=require("@mui/x-data-grid-premium"),Y=require("@mui/material/IconButton"),q=require("@mui/material/Drawer"),K=require("@react-spring/web"),z=require("@mui/material/Collapse"),H=require("@mui/x-tree-view/RichTreeView"),Q=require("@mui/x-tree-view/TreeItem"),Z=require("@mui/x-tree-view/useTreeItem2"),$=require("@mui/x-tree-view/TreeItem2"),X=require("@mui/x-tree-view/TreeItem2Icon"),J=require("@mui/x-tree-view/TreeItem2Provider"),ee=require("@mui/x-tree-view/TreeItem2DragAndDropOverlay"),te=require("stylis-plugin-rtl"),ie=require("stylis"),oe=require("@emotion/cache"),ae=require("@emotion/styled"),re=require("@mui/material/colors"),de=require("@mui/material/SwipeableDrawer"),ne=require("@mui/x-license");function le(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var se=le(l),pe=le(v);!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("html,\r\nbody {\r\n height: 100vh;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n#root {\r\n height: 100vh;\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}\r\n\r\n.red-row {\r\n background-color: #f0d8d8;\r\n}\r\n");const ce=(e=768)=>{const[t,i]=l.useState(window.innerWidth<e);return l.useEffect((()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[e]),t},ue=350,me={themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},Te=T.createSlice({name:"AppLayout",initialState:me,reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),Ae=Te.actions;var _e=Te.reducer;const Ee=T.createSlice({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:fe,hideLoadingMask:Ie}=Ee.actions;var Oe=Ee.reducer;const Ne=()=>{const e=t.useDispatch();return{show:t=>{e(fe(t))},hide:()=>{e(Ie())}}},ye=()=>{const e=Ne(),i=t.useSelector((e=>e.AppInfo.value.apiBaseUrl)),o=_.create({baseURL:i,timeout:6e5,withCredentials:!0});o.defaults.withCredentials=!0,o.interceptors.response.use((e=>e),(e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))A.toast.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&403===e.response.status)))A.toast.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then((e=>{A.toast.error(e)}))}else A.toast.error(e.response.data);else A.toast.error("failed to communicate with the server ... try again later");return"ERROR"}));return{handleGetRequest:async(t={endPointURI:"",parameters:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await o.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await o.post(t.endPointURI,t.data,{params:t.parameters});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async(t={endPointURI:"",parameters:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await o.delete(t.endPointURI,{params:{...t.parameters}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await o.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")}}},Re=T.createSlice({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Le=Re.actions;var he=Re.reducer,Pe={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},Me={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};var Ce={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},De={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const Se={en:{translation:{...Ce,...De,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"dashboard",DASHBOARD_PLURAL:"dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id"}}},ar:{translation:{...Pe,...Me,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"dashboard",DASHBOARD_PLURAL:"dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id"}}}};E.use(f.initReactI18next).init({resources:Se,lng:localStorage.getItem("language")||"en",fallbackLng:"en"});const be=t=>{const[i,o]=l.useState(!1),{t:a}=f.useTranslation();return{ConfirmationWindow:()=>e.jsxs(d.Dialog,{open:i,children:[e.jsx(d.DialogTitle,{children:t.title}),e.jsx(d.DialogContent,{children:e.jsx(d.DialogContentText,{children:t.body})}),e.jsxs(d.DialogActions,{children:[e.jsx(d.Button,{variant:"contained",color:"primary",onClick:()=>{o(!1)},children:a("NO_LABEL")}),e.jsx(d.Button,{variant:"contained",color:"error",onClick:()=>{t.onConfirmationCallBk(),o(!1)},autoFocus:!0,children:a("YES_LABEL")})]})]}),open:i,setOpen:o}},ge=()=>{const e=t.useSelector((e=>e.UserSession)),i=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities)if("DEVELOPMENT_ADMIN"===i?.authority||i?.authority===t)return!0;return!1},UserInfo:i}},xe=t=>{const[i,o]=l.useState(!1);return{windowState:i,setWindowState:o,Window:a=>e.jsx(d.Modal,{open:i,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!i&&t?.onCloseCallBack&&t.onCloseCallBack()},children:e.jsxs(d.Box,{sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:t?.height||"80%",width:t?.width||"90%",minWidth:t.minWidth||400,minHeight:t.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[e.jsx(d.AppBar,{position:"static",children:e.jsxs(d.Toolbar,{variant:"dense",children:[e.jsx(m.FontAwesomeIcon,{icon:t?.windowIcon||"window-maximize",style:{marginRight:5}}),e.jsx(d.Typography,{variant:"h6",color:"inherit",component:"div",children:t?.windowTitle||"window"}),e.jsx("div",{style:{flexGrow:1}}),e.jsx(d.IconButton,{onClick:()=>{o(!1),null!=t.onCloseCallBack&&null!=t.onCloseCallBack&&t.onCloseCallBack()},color:"secondary",children:e.jsx(m.FontAwesomeIcon,{icon:"xmark-square"})})]})}),e.jsx(d.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:a?.children})]})})}},Ue=T.createSlice({name:"loadingMask",initialState:{stores:{},storeKeys:[],isAutoLoadLoaded:!1},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data},setAutoLoadLoaded:()=>{state.isAutoLoadLoaded=!0}}}),{setStoreData:ve,setStoresMetaData:Fe,setAutoLoadLoaded:we}=Ue.actions;var Be=Ue.reducer;const ke=e=>{const i=t.useSelector((e=>e.commonStores.stores)),o=t.useDispatch(),a=ge(),{handleGetRequest:r,handlePostRequest:d,handleDeleteRequest:n}=ye();return{reloadData:async t=>{if(e?.commonStoreKey){const t=Object.keys(i);for(const d of t)if(d===e.commonStoreKey&&(void 0===i[d]?.authority||null===i[d]?.authority||a.isUserAuthorized(i[d]?.authority))&&""!=i[d]?.url){await r({endPointURI:i[d].url,showMask:!1,successCallBkFn:t=>{o(ve({storeKey:d,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{o(ve({storeKey:d,data:[]})),e.setData([])}});break}}else e?.findAll&&await r({endPointURI:e.findAll,showMask:!0,parameters:t||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await r({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await d({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await n({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},We=t=>{const{t:i}=f.useTranslation();return e.jsx(d.TextField,{...t,slotProps:{inputLabel:{shrink:!0}},label:e.jsx(e.Fragment,{children:t?.label?i(t.label):""})})};function Ge(e,t){return e.filter((e=>-1===t.indexOf(e)))}function je(e,t){return e.filter((e=>-1!==t.indexOf(e)))}const Ve=({valueField:t="id",displayField:i="name",options:o=[],selectedOptions:a=[],setSelection:r})=>{const[n,l]=se.useState([]),[s,p]=se.useState([]),[c,u]=se.useState([]),[m,T]=se.useState(""),[A,_]=se.useState(""),E=je(n,s),f=je(n,c);se.useEffect((()=>{o&&p([...o])}),[o]),se.useEffect((()=>{a&&u([...a])}),[a]);const M=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),l(i)},C=e=>je(n,e).length,D=e=>()=>{var t,i;C(e)===e.length?l(Ge(n,e)):l((t=n,i=e,[...t,...Ge(i,t)]))},S=(o,a,r)=>{const l=a.filter((e=>{if(e[i]){const t=e[i];if("left"===r&&t.toLocaleLowerCase().includes(m.toLocaleLowerCase()))return!0;if("right"===r&&t.toLocaleLowerCase().includes(A.toLocaleLowerCase()))return!0}return!1}));return e.jsxs(O,{sx:{height:"100%"},children:[e.jsx(N,{sx:{px:2,py:1},avatar:e.jsx(L,{onClick:D(l),checked:C(l)===l.length&&0!==l.length,indeterminate:C(l)!==l.length&&0!==C(l),disabled:0===l.length,inputProps:{"aria-label":"all items selected"}}),title:o,subheader:`${C(a)} / ${a.length} Selected`}),e.jsx(d.Box,{sx:{width:"100%",padding:1},children:e.jsx(We,{fullWidth:!0,label:"search",value:"left"===r?m:A,onChange:e=>{"left"===r?T(e.target.value):_(e.target.value)}})}),e.jsx(P,{}),e.jsx(I,{sx:{width:"100%",height:"100%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map((o=>(o[t],e.jsxs(d.ListItemButton,{role:"listitem",onClick:M(o),sx:{cursor:"pointer"},children:[e.jsx(R,{children:e.jsx(L,{checked:-1!==n.indexOf(o),tabIndex:-1,disableRipple:!0})}),e.jsx(y,{id:o[t],primary:o[i]})]},o[t]))))})]})};return e.jsxs(d.Grid2,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[e.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:S("Available Items",s,"left")}),e.jsx(d.Grid2,{children:e.jsxs(d.Grid2,{container:!0,direction:"column",alignItems:"center",children:[e.jsx(h,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{u((e=>{let t=c.concat(E);return r(t),t})),p(Ge(s,E)),l(Ge(n,E))},disabled:0===E.length,"aria-label":"move selected right",children:">"}),e.jsx(h,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(s.concat(f)),u((e=>{let t=Ge(c,f);return r(t),t})),l(Ge(n,f))},disabled:0===f.length,"aria-label":"move selected left",children:"<"})]})}),e.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:S("Currently Selected",c,"right")})]})},Ye=t=>e.jsx(M.BarChart,{dataset:t.data,xAxis:[{dataKey:t.valueField,scaleType:"band",label:t.valueLabel}],series:t.labelField?.split(",").map((e=>({dataKey:e,label:e})))}),qe=t=>e.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[e.jsx(d.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:e.jsx("div",{children:t.record[t.valueField]})}),e.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]})]}),Ke=t=>e.jsxs(e.Fragment,{children:[e.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),e.jsx(M.Gauge,{width:200,height:200,value:t.record[t.valueField],valueMax:t.total})]}),ze=t=>e.jsx(M.LineChart,{dataset:t.data,xAxis:[{dataKey:t.valueField,scaleType:"band",label:t.valueLabel}],series:t.labelField?.split(",").map((e=>({dataKey:e,label:e})))});function He(t){return e.jsxs(S,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(S,{sx:{width:"100%",mr:1},children:e.jsx(C,{variant:"determinate",...t})}),e.jsx(S,{sx:{minWidth:35},children:e.jsx(D,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(t.value)}%`})})]})}const Qe=t=>e.jsxs(S,{sx:{width:"100%"},children:[e.jsx(D,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),e.jsx(He,{value:t.record[t.valueField]/t.total*100})]}),Ze=t=>{const i=t.data.map(((e,i)=>({id:i,value:e[t.valueField],label:e[t.labelField]+""})));return e.jsx(b.PieChart,{series:[{data:i}]})},$e=t=>{const{t:i}=f.useTranslation();return e.jsx(d.FormControlLabel,{sx:t.sx,disabled:t.disabled||!1,required:t.required||!1,control:e.jsx(d.Checkbox,{checked:t?.checkedValue==t.value||"true"===t.value||"1"==t.value,onChange:e=>{void 0!==t.onChangeCallBack&&null!=t.onChangeCallBack&&(e.target.checked?void 0!==t.checkedValue&&null!=t.checkedValue?t.onChangeCallBack(t.checkedValue):t.onChangeCallBack(!0):void 0!==t.unCheckedValue&&null!=t.unCheckedValue?t.onChangeCallBack(t.unCheckedValue):t.onChangeCallBack(!1))}}),label:i(t.label)})},Xe=i=>{const o=t.useSelector((e=>e.AppLayout)),{t:a}=f.useTranslation();return e.jsx(d.Autocomplete,{sx:i.sx,value:(e=>{for(let t of i.options)if(t[i.valueField]==e)return t;return null})(i.value),options:i.options,disabled:i.disabled,onChange:(e,t)=>{if(void 0!==i.onChangeCallBack&&null!=i.onChangeCallBack)if(null!=t){let e=t[i.valueField];i.onChangeCallBack(e,t)}else i.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:e=>null!=e?a(e[i.displayField]):"",renderOption:(t,o)=>e.jsx("li",{...t,children:null!=o?a(o[i.displayField]):""}),slots:{popper:t=>e.jsx(d.Popper,{...t,style:{...t.style,direction:o.appDirection}})},renderInput:t=>e.jsx(d.TextField,{...t,required:i.required||!1,variant:"outlined",InputLabelProps:{shrink:!0},label:a(i.label),error:null!=i.errorMessage&&void 0!==i.errorMessage,helperText:null!=i.errorMessage&&void 0!==i.errorMessage?a(i.errorMessage):""})})},Je="YYYY-MM-DD",et="YYYY-MM-DD HH:mm:ss",tt="#37505C",it="#ff6d00",ot="#ea690e",at="#74776B",rt=t=>{const{t:i}=f.useTranslation();return e.jsx(g.LocalizationProvider,{dateAdapter:x.AdapterMoment,children:e.jsx(g.DatePicker,{value:null!=t.value&&void 0!==t.value&&""!==t.value?U(t.value,t?.format||Je):null,sx:t.sx,label:i(t.label),format:t?.format||Je,disabled:t.disabled,onChange:e=>{let i=null;null!=e&&e.isValid()&&(i=e.format(t?.format||Je)),void 0!==t.onChangeCallBack&&null!=t.onChangeCallBack&&t.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0},variant:"outlined",required:t.required,error:void 0!==t.errorMessage&&null!=t.errorMessage,helperText:void 0!==t.errorMessage&&null!=t.errorMessage?e.jsx(e.Fragment,{children:i(t.errorMessage)}):e.jsx(e.Fragment,{})}}})})},dt=t=>{const{t:i}=f.useTranslation();return e.jsx(g.LocalizationProvider,{dateAdapter:x.AdapterMoment,children:e.jsx(g.DateTimePicker,{value:null!=t.value&&void 0!==t.value&&""!==t.value?U(t.value,t?.format||et):null,label:i(t.label),sx:t.sx,format:t?.format||et,disabled:t.disabled,onChange:e=>{let i=null;null!=e&&e.isValid()&&(i=e.format(t?.format||et)),void 0!==t.onChangeCallBack&&null!=t.onChangeCallBack&&t.onChangeCallBack(i)},slotProps:{textField:{variant:"outlined",required:t.required,error:void 0!==t.errorMessage&&null!=t.errorMessage,helperText:void 0!==t.errorMessage&&null!=t.errorMessage?e.jsx(e.Fragment,{children:i(t.errorMessage)}):e.jsx(e.Fragment,{})}}})})};function nt(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>i.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${i} for the full message.`}function lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st,pt={exports:{}},ct={exports:{}},ut={};var mt,Tt,At,_t,Et,ft,It,Ot,Nt,yt,Rt,Lt,ht,Pt,Mt,Ct={};
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react-redux"),i=require("@fortawesome/fontawesome-svg-core"),o=require("@fortawesome/free-brands-svg-icons"),a=require("@fortawesome/free-regular-svg-icons"),r=require("@fortawesome/free-solid-svg-icons");require("react-toastify/dist/ReactToastify.css");var d=require("@mui/material"),n=require("@emotion/react"),l=require("react"),s=require("@mui/material/styles"),p=require("@mui/material/CssBaseline"),c=require("@mui/material/AppBar"),u=require("@mui/material/Toolbar"),m=require("@fortawesome/react-fontawesome"),T=require("@reduxjs/toolkit"),A=require("react-toastify"),_=require("axios"),E=require("i18next"),f=require("react-i18next"),I=require("@mui/material/List"),O=require("@mui/material/Card"),y=require("@mui/material/CardHeader"),N=require("@mui/material/ListItemText"),R=require("@mui/material/ListItemIcon"),L=require("@mui/material/Checkbox"),h=require("@mui/material/Button"),P=require("@mui/material/Divider"),M=require("@mui/x-charts"),C=require("@mui/material/LinearProgress"),D=require("@mui/material/Typography"),S=require("@mui/material/Box"),b=require("@mui/x-charts/PieChart"),g=require("@mui/x-date-pickers"),x=require("@mui/x-date-pickers/AdapterMoment"),U=require("moment"),v=require("zod"),F=require("react-hook-form"),w=require("@hookform/resolvers/zod"),B=require("react-router-dom"),k=require("draft-js"),W=require("react-draft-wysiwyg"),G=require("draftjs-to-html"),j=require("draft-js-import-html");require("react-draft-wysiwyg/dist/react-draft-wysiwyg.css");var V=require("@mui/x-data-grid-premium"),Y=require("@mui/material/IconButton"),q=require("@mui/material/Drawer"),K=require("@react-spring/web"),z=require("@mui/material/Collapse"),H=require("@mui/x-tree-view/RichTreeView"),Q=require("@mui/x-tree-view/TreeItem"),Z=require("@mui/x-tree-view/useTreeItem2"),$=require("@mui/x-tree-view/TreeItem2"),X=require("@mui/x-tree-view/TreeItem2Icon"),J=require("@mui/x-tree-view/TreeItem2Provider"),ee=require("@mui/x-tree-view/TreeItem2DragAndDropOverlay"),te=require("stylis-plugin-rtl"),ie=require("stylis"),oe=require("@emotion/cache"),ae=require("@emotion/styled"),re=require("@mui/material/colors"),de=require("@mui/material/SwipeableDrawer"),ne=require("@mui/x-license"),le=require("@mui/lab"),se=require("@mui/x-tree-view/models");function pe(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var ce=pe(l),ue=pe(v);!function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===i&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("html,\r\nbody {\r\n height: 100vh;\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n#root {\r\n height: 100vh;\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}\r\n\r\n.red-row {\r\n background-color: #f0d8d8;\r\n}\r\n");const me=(e=768)=>{const[t,i]=l.useState(window.innerWidth<e);return l.useEffect((()=>{const t=()=>i(window.innerWidth<e);return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[e]),t},Te=350,Ae={themeMode:localStorage.getItem("themeMode")||"light",appDirection:"ar"==localStorage.getItem("language")?"rtl":"ltr"},_e=T.createSlice({name:"AppLayout",initialState:Ae,reducers:{setThemeMode:(e,t)=>{e.themeMode=t.payload},setAppDirection:(e,t)=>{e.appDirection=t.payload}}}),Ee=_e.actions;var fe=_e.reducer;const Ie=T.createSlice({name:"loadingMask",initialState:{value:{isOpened:!1,message:null}},reducers:{showLoadingMask:(e,t)=>{e.value.isOpened=!0,e.value.message=t.payload},hideLoadingMask:e=>{e.value.isOpened=!1,e.value.message=null}}}),{showLoadingMask:Oe,hideLoadingMask:ye}=Ie.actions;var Ne=Ie.reducer;const Re=()=>{const e=t.useDispatch();return{show:t=>{e(Oe(t))},hide:()=>{e(ye())}}},Le=()=>{const e=Re(),i=t.useSelector((e=>e.AppInfo.value.apiBaseUrl)),o=_.create({baseURL:i,timeout:6e5,withCredentials:!0});o.defaults.withCredentials=!0,o.interceptors.response.use((e=>e),(e=>{if(e&&(e.response&&(e.response.status&&401===e.response.status)))A.toast.error("your session is now expired, you need to login again",{autoClose:!1});else if(e&&(e.response&&(e.response.status&&403===e.response.status)))A.toast.error("you aren't authorized to process this request");else if(e&&(e.response&&(e.response.status&&500===e.response.status)))if(e.response.data instanceof Blob){e.response.data.text().then((e=>{A.toast.error(e)}))}else A.toast.error(e.response.data);else A.toast.error("failed to communicate with the server ... try again later");return"ERROR"}));return{handleGetRequest:async(t={endPointURI:"",parameters:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await o.get(t.endPointURI,{params:{...t.parameters},withCredentials:!0});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handlePostRequest:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await o.post(t.endPointURI,t.data,{params:t.parameters});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},handleDeleteRequest:async(t={endPointURI:"",parameters:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);let i=await o.delete(t.endPointURI,{params:{...t.parameters}});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")},HandleDownloadHTTPPostPDF:async(t={endPointURI:"",parameters:{},data:{}})=>{void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.show(t.loadingMessage);const i=await o.post(t.endPointURI,t.data,{responseType:"blob"});return void 0!==t.showMask&&null!=t.showMask&&!0===t.showMask&&e.hide(),"ERROR"!==i?(void 0!==t.successCallBkFn&&null!=t.successCallBkFn&&t.successCallBkFn(i),i):(void 0!==t.failureCallBkFn&&null!=t.failureCallBkFn&&t.failureCallBkFn(i),"ERROR")}}},he=T.createSlice({name:"UserSession",initialState:{value:{isAuthenticated:null,authorities:[]}},reducers:{setAuthenticated:(e,t)=>{e.value=t.payload},setUnAuthenticated:e=>{e.value={isAuthenticated:!1,authorities:[]}}}}),Pe=he.actions;var Me=he.reducer,Ce={"System Administration":"إدارة النظام",welcome:"مرحبا",APP_SETTINGS_LABEL:"الاعدادت",WELCOME_MESSAGE:"اهلا , هذا التطبيق تحت التطوير و هو مصمم للتطبيقات المستقبلية",APP_FOOTER:"حقوق الملكية<sup>©</sup> 2023-2026. جميع الحقوق محفوظة.",TREE_HOME_NODE:"الصفحة الرئيسية",TREE_ADMINISTRATION_NODE:"ادارة النظام",COMMING_SOON_LABEL:"قريبا",TRIAL_LABEL:"تجريبي",GRID_ACTION_LABEL:"الاوامر",SAVE_BTN_LABEL:"حفظ",SEARCH_BTN_LABEL:"بحث",RESET_BTN_LABEL:"ازالة البحث",CANCEL_BTN_LABEL:"الغاء",DELETE_BTN_LABEL:"حذف",EDIT_BTN_LABEL:"تعديل",ADD_BTN_LABEL:"اضافة",RESET_GRID_STATE:"مسح حالة الجدول",EXPORT_EXECL_LABEL:"تحميل Execl",CHANGE_ORG_LABEL:"تغير المنظومة",ORG_LABEL:"المنظومة",VERSION:"رقم الاصدار",COPY_RIGHTS:"جميع الحقوق محفوظة © 2024-2030",SUCCESS_MESSAGE:"تم تنفيذ طلبك بنجاح",REQUIRED_FIELD:"هذه الخانة مطلوبة",ACTIONS:"الاوامر",CONFIRMATION:"تأكيد",DELETION_CONFIRMATION_MESSAGE:"هل انت متأكد من حذف هذا البيان؟",ACTION_CONFIRMATION:"هل انت متأكد من تنفيذ هذه العملية؟",YES_LABEL:"نعم",NO_LABEL:"لا",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"يجب ان تختار علي الاقل بند واحد لتنقيذ هذه العملية",DEFAULT_LOADING_MESSAGE:"جاري تنفيذ طلبك ...برجاء الانتظار",SHOW_REPORT_BTN_LABEL:"عرض التقرير",WF_COMMENT_LABEL:"التعليق",WF_TAKE_ACTION_BTN_LABEL:"ارسل",WF_CANCEL_BTN_LABEL:"الغاء",WE_AVAILABLE_ACTIONS_LABEL:"القرارات المتاحة",WE_NEXT_APPROVER_LABEL:"ارسل الي",WF_ACTION_HISTORY_LABEL:"تاريخ القرارات",WF_WAITING_FOR_LABEL:"في انتظار",VIEW_LABEL:"عرض"},De={admin:"admin",ORGANIZATION_SINGULAR:"organization",ORGANIZATION_PLURAL:"organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"organizationmember",ORGANIZATION_MEMBER_PLURAL:"organizationmembers",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"organizationrank",ORGANIZATION_RANK_PLURAL:"organizationranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"organizationunit",ORGANIZATION_UNIT_PLURAL:"organizationunits",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"organizationunittype",ORGANIZATION_UNIT_TYPE_PLURAL:"organizationunittypes",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"systemapplication",SYSTEM_APPLICATION_PLURAL:"systemapplications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"systemapplicationauthority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"systemapplicationauthorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"systemapplicationmodule",SYSTEM_APPLICATION_MODULE_PLURAL:"systemapplicationmodules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"systemapplicationrole",SYSTEM_APPLICATION_ROLE_PLURAL:"systemapplicationroles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id"};var Se={welcome:"welcome",APP_SETTINGS_LABEL:"Settings",WELCOME_MESSAGE:" Hello, This is an under development template for future apps",APP_FOOTER:"Copyright<sup>©</sup> 2023-2026. All rights reserved.",TREE_HOME_NODE:"Home",TREE_ADMINISTRATION_NODE:"Administration",COMMING_SOON_LABEL:"soon",GRID_ACTION_LABEL:"Actions",TRIAL_LABEL:"trial",SAVE_BTN_LABEL:"Save",SEARCH_BTN_LABEL:"search",RESET_BTN_LABEL:"Reset",CANCEL_BTN_LABEL:"Cancel",DELETE_BTN_LABEL:"Delete",EDIT_BTN_LABEL:"Edit",ADD_BTN_LABEL:"Add",RESET_GRID_STATE:"Clear Grid State",EXPORT_EXECL_LABEL:"Export to excel",CHANGE_ORG_LABEL:"Change Organization",ORG_LABEL:"Organization",VERSION:"V.",COPY_RIGHTS:"Copyright © 2024-2030. All rights reserved.",SUCCESS_MESSAGE:"Your request has been processed successfully",REQUIRED_FIELD:"This field is required",ACTIONS:"Actions",CONFIRMATION:"Confirmation",DELETION_CONFIRMATION_MESSAGE:"Are you sure you want to delete this record ?",ACTION_CONFIRMATION:"Are you sure you want to process this action ?",YES_LABEL:"Yes",NO_LABEL:"No",AT_LEAST_ONE_RECORD_SELECTED_MESSAGE:"You must at least select on record to process this action on",DEFAULT_LOADING_MESSAGE:"Processing you request ... please wait",SHOW_REPORT_BTN_LABEL:"Show Report",WF_COMMENT_LABEL:"Comment",WF_TAKE_ACTION_BTN_LABEL:"Submit",WF_CANCEL_BTN_LABEL:"Cancel",WE_AVAILABLE_ACTIONS_LABEL:"Available Actions",WE_NEXT_APPROVER_LABEL:"Send To",WF_ACTION_HISTORY_LABEL:"Action History",WF_WAITING_FOR_LABEL:"Waiting For",VIEW_LABEL:"VIEW"},be={admin:"admin",ORGANIZATION_SINGULAR:"Organization",ORGANIZATION_PLURAL:"Organizations",ORGANIZATION_IS_ACTIVE:"Is active",ORGANIZATION_ORGANIZATION_AR_NAME:"Organization ar name",ORGANIZATION_ORGANIZATION_CODE:"Organization code",ORGANIZATION_ORGANIZATION_EN_NAME:"Organization en name",ORGANIZATION_MEMBER_SINGULAR:"Member",ORGANIZATION_MEMBER_PLURAL:"Members",ORGANIZATION_MEMBER_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_IS_DEFAULT:"Is default",ORGANIZATION_MEMBER_ORGANIZATION_ID:"Organization id",ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID:"Organization rank id",ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID:"Organization unit id",ORGANIZATION_MEMBER_PERSON_ID:"Person id",ORGANIZATION_MEMBER_ROLE_SINGULAR:"organizationmemberrole",ORGANIZATION_MEMBER_ROLE_PLURAL:"organizationmemberroles",ORGANIZATION_MEMBER_ROLE_IS_ACTIVE:"Is active",ORGANIZATION_MEMBER_ROLE_END_DATE:"End date",ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID:"Organization member id",ORGANIZATION_MEMBER_ROLE_START_DATE:"Start date",ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_RANK_SINGULAR:"Rank",ORGANIZATION_RANK_PLURAL:"Ranks",ORGANIZATION_RANK_ENABLED:"Enabled",ORGANIZATION_RANK_ORGANIZATION_ID:"Organization id",ORGANIZATION_RANK_RANK_ORDER:"Rank order",ORGANIZATION_RANK_RANK_AR_NAME:"Rank ar name",ORGANIZATION_RANK_RANK_CODE:"Rank code",ORGANIZATION_RANK_RANK_EN_NAME:"Rank en name",ORGANIZATION_UNIT_SINGULAR:"Organization Unit",ORGANIZATION_UNIT_PLURAL:"Organization Units",ORGANIZATION_UNIT_ENABLED:"Enabled",ORGANIZATION_UNIT_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID:"Organization unit parent id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID:"Organization unit type id",ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME:"Organization unit ar name",ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME:"Organization unit en name",ORGANIZATION_UNIT_TYPE_SINGULAR:"Organization uUnit Type",ORGANIZATION_UNIT_TYPE_PLURAL:"Organization Unit Types",ORGANIZATION_UNIT_TYPE_IS_ACTIVE:"Is active",ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID:"Organization id",ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER:"Organization unit type order",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME:"Unit type ar name",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE:"Unit type code",ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME:"Unit type en name",PERSON_SINGULAR:"person",PERSON_PLURAL:"persons",PERSON_EMAIL:"Email",PERSON_EMPLOYEE_AR_NAME:"Employee ar name",PERSON_EMPLOYEE_EN_NAME:"Employee en name",PERSON_EMPLOYEE_NUMBER:"Employee number",PERSON_MOBILE_NUMBER:"Mobile number",PERSON_PASSWORD:"Password",PERSON_USERNAME:"Username",SYSTEM_APPLICATION_SINGULAR:"Application",SYSTEM_APPLICATION_PLURAL:"Applications",SYSTEM_APPLICATION_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_APPLICATION_CODE:"Application code",SYSTEM_APPLICATION_APPLICATION_DESCRIPTION:"Application description",SYSTEM_APPLICATION_APPLICATION_NAME:"Application name",SYSTEM_APPLICATION_AUTHORITY_SINGULAR:"Authority",SYSTEM_APPLICATION_AUTHORITY_PLURAL:"Authorities",SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID:"System module id",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE:"Authority code",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME:"Authority Name",SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION:"Authority description",SYSTEM_APPLICATION_MODULE_SINGULAR:"Application Module",SYSTEM_APPLICATION_MODULE_PLURAL:"Application Modules",SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION:"Module description",SYSTEM_APPLICATION_MODULE_MODULE_CODE:"Module Code",SYSTEM_APPLICATION_MODULE_MODULE_NAME:"Module name",SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_SINGULAR:"Role",SYSTEM_APPLICATION_ROLE_PLURAL:"Roles",SYSTEM_APPLICATION_ROLE_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID:"System application id",SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION:"Role description",SYSTEM_APPLICATION_ROLE_ROLE_NAME:"Role name",SYSTEM_APPLICATION_ROLE_AUTHORITY_SINGULAR:"systemapplicationroleauthority",SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL:"systemapplicationroleauthorities",SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE:"Is active",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID:"System application authority id",SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID:"System application role id",ORGANIZATION_APPLICATION_MODULE_SINGULAR:"organizationapplicationmodule",ORGANIZATION_APPLICATION_MODULE_PLURAL:"organizationapplicationmodules",ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE:"Expiration date",ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE:"Is active",ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID:"Organization id",ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE:"Subscription date",ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID:"System application module id",PERSON_IS_ACTIVE:"Active"};const ge={en:{translation:{...Se,...be,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"Blueprint",BLUE_PRINT_PLURAL:"Blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"dashboard",DASHBOARD_PLURAL:"dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"Data Query",DATA_QUERY_PLURAL:"Data Queries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_NAME:"Body Name",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"Mail Template",MAIL_TEMPLATE_PLURAL:"Mail Templates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"Report",REPORT_PLURAL:"Reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id"}}},ar:{translation:{...Ce,...De,...{DEVELOPMENT_TOOLS:"Development Tools",SYSTEM_MONITORING:"System Monitoring",dev:"dev",ATTACHMENT_SINGULAR:"attachment",ATTACHMENT_PLURAL:"attachments",ATTACHMENT_ATTACHMENT_NUMBER:"Attachment number",ATTACHMENT_ATTACHMENT_SIZE:"Attachment size",ATTACHMENT_ATTACHMENT_TYPE:"Attachment type",ATTACHMENT_CATEGORY:"Category",ATTACHMENT_DOC_TYPE:"Doc type",ATTACHMENT_FILE_NAME:"File name",ATTACHMENT_REF_KEY:"Ref key",ATTACHMENT_REMARK:"Remark",BLUE_PRINT_SINGULAR:"blueprint",BLUE_PRINT_PLURAL:"blueprints",BLUE_PRINT_BLUE_PRINT_CODE:"Blue print code",BLUE_PRINT_QUERY_ID:"Query id",BLUE_PRINT_PAGE_SINGULAR:"blueprintpage",BLUE_PRINT_PAGE_PLURAL:"blueprintpages",BLUE_PRINT_PAGE_BLUE_PRINT_ID:"Blue print id",BLUE_PRINT_PAGE_ENABLED:"Enabled",BLUE_PRINT_PAGE_PAGE_NAME:"Page name",BLUE_PRINT_PAGE_PAGE_ORDER:"Page order",BLUE_PRINT_PAGE_QUERY_ID:"Query id",BLUE_PRINT_POINT_SINGULAR:"blueprintpoint",BLUE_PRINT_POINT_PLURAL:"blueprintpoints",BLUE_PRINT_POINT_BLUE_PRINT_PAGE_ID:"Blue print page id",BLUE_PRINT_POINT_FONT_SIZE:"Font size",BLUE_PRINT_POINT_POINT_CODE:"Point code",BLUE_PRINT_POINT_X:"X",BLUE_PRINT_POINT_Y:"Y",DASHBOARD_SINGULAR:"dashboard",DASHBOARD_PLURAL:"dashboards",DASHBOARD_DASHBOARD_CODE:"Dashboard code",DASHBOARD_DASHBOARD_NAME:"Dashboard name",DASHBOARD_DASHBOARD_TITLE:"Dashboard title",DASHBOARD_ENABLED:"Enabled",DASHBOARD_LOAD_WIDGETS_INDIVIDUALLY:"Load widgets individually",DASHBOARD_NUMBER_OF_COLUMNS:"Number of columns",DASHBOARD_WIDGET_SINGULAR:"dashboardwidget",DASHBOARD_WIDGET_PLURAL:"dashboardwidgets",DASHBOARD_WIDGET_DASHBOARD_ID:"Dashboard id",DASHBOARD_WIDGET_ENABLED:"Enabled",DASHBOARD_WIDGET_WIDGET_ID:"Widget id",DASHBOARD_WIDGET_WIDGET_ORDER:"Widget order",DATA_QUERY_SINGULAR:"dataquery",DATA_QUERY_PLURAL:"dataqueries",DATA_QUERY_DATASOURCE_CON_ID:"Datasource con id",DATA_QUERY_QUERY_NAME:"Query name",DATA_QUERY_QUERY_STR:"Query str",DATA_QUERY_USE_SYS_CON:"Use sys con",DATA_QUERY_PARAMETER_SINGULAR:"dataqueryparameter",DATA_QUERY_PARAMETER_PLURAL:"dataqueryparameters",DATA_QUERY_PARAMETER_DATA_QUERY_ID:"Data query id",DATA_QUERY_PARAMETER_DEFAULT_VALUE:"Default value",DATA_QUERY_PARAMETER_ENABLED:"Enabled",DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",DATA_QUERY_PARAMETER_HIDDEN:"Hidden",DATA_QUERY_PARAMETER_MANDATORY:"Mandatory",DATASOURCE_CONNECTION_SINGULAR:"Datasource Connection",DATASOURCE_CONNECTION_PLURAL:"Datasource Connections",DATASOURCE_CONNECTION_CONNECTION_NAME:"Connection name",DATASOURCE_CONNECTION_DATASOURCE_PASSWORD:"Datasource password",DATASOURCE_CONNECTION_DATASOURCE_TYPE:"Datasource type",DATASOURCE_CONNECTION_DATASOURCE_URL:"Datasource url",DATASOURCE_CONNECTION_DATASOURCE_USERNAME:"Datasource username",DATASOURCE_CONNECTION_ENABLED:"Enabled",ENTITY_PARAMETER_SINGULAR:"Entity Parameter",ENTITY_PARAMETER_PLURAL:"Entity Parameters",ENTITY_PARAMETER_ENABLED:"Enabled",ENTITY_PARAMETER_PARAMETER_CODE:"Parameter code",ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID:"Parameter data query id",ENTITY_PARAMETER_PARAMETER_DATASET:"Parameter dataset",ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD:"Parameter display field",ENTITY_PARAMETER_PARAMETER_LABEL:"Parameter label",ENTITY_PARAMETER_PARAMETER_TYPE:"Parameter type",ENTITY_PARAMETER_PARAMETER_VALUE_FIELD:"Parameter value field",ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT:"Parameter value format",EXCEL_UPLOADER_DETAIL_SINGULAR:"exceluploaderdetail",EXCEL_UPLOADER_DETAIL_PLURAL:"exceluploaderdetails",EXCEL_UPLOADER_DETAIL_COLUMN_INDEX:"Column index",EXCEL_UPLOADER_DETAIL_EXCEL_UPLOADER_HEADER_ID:"Excel uploader header id",EXCEL_UPLOADER_DETAIL_LOOKUP_QUERY_ID:"Lookup query id",EXCEL_UPLOADER_DETAIL_TABLE_FIELD:"Table field",EXCEL_UPLOADER_HEADER_SINGULAR:"exceluploaderheader",EXCEL_UPLOADER_HEADER_PLURAL:"exceluploaderheaders",EXCEL_UPLOADER_HEADER_UPLOADER_CONNECTION_ID:"Uploader connection id",EXCEL_UPLOADER_HEADER_UPLOADER_DATABASE_NAME:"Uploader database name",EXCEL_UPLOADER_HEADER_UPLOADER_NAME:"Uploader name",EXCEL_UPLOADER_HEADER_UPLOADER_TABLE_NAME:"Uploader table name",LOOKUP_SINGULAR:"lookup",LOOKUP_PLURAL:"lookups",LOOKUP_ENABLED:"Enabled",LOOKUP_LOOKUP_AR_DISPLAY:"Lookup ar display",LOOKUP_LOOKUP_EN_DISPLAY:"Lookup en display",LOOKUP_LOOKUP_TYPE:"Lookup type",LOOKUP_LOOKUP_VALUE:"Lookup value",LOOKUP_ORG_CODE:"Org code",MAIL_ATTACHMENT_SINGULAR:"mailattachment",MAIL_ATTACHMENT_PLURAL:"mailattachments",MAIL_ATTACHMENT_ENABLED:"Enabled",MAIL_ATTACHMENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_ATTACHMENT_REPORT_ID:"Report id",MAIL_BODY_SINGULAR:"mailbody",MAIL_BODY_PLURAL:"mailbodies",MAIL_BODY_BODY_CONTENT:"Body content",MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID:"Body content data query id",MAIL_BODY_BODY_ORDER:"Body order",MAIL_BODY_ENABLED:"Enabled",MAIL_BODY_IS_MAIN:"Is main",MAIL_BODY_MAIL_TEMPLATE_ID:"Mail template id",MAIL_BODY_PRINT_FOR_EACH_RECORD:"Print for each record",MAIL_NOTIFICATION_QUEUE_SINGULAR:"mailnotificationqueue",MAIL_NOTIFICATION_QUEUE_PLURAL:"mailnotificationqueues",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID:"Custom mail attached report id",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY:"Custom mail body",MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT:"Custom mail subject",MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS:"Custom recipients",MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS:"Mail parameters",MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID:"Mail template id",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE:"Notification message",MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME:"Notification time",MAIL_RECIPIENT_SINGULAR:"mailrecipient",MAIL_RECIPIENT_PLURAL:"mailrecipients",MAIL_RECIPIENT_ENABLED:"Enabled",MAIL_RECIPIENT_MAIL_TEMPLATE_ID:"Mail template id",MAIL_RECIPIENT_RECIPIENT_MAIL:"Recipient mail",MAIL_RECIPIENT_RECIPIENT_TYPE:"Recipient type",MAIL_TEMPLATE_SINGULAR:"mailtemplate",MAIL_TEMPLATE_PLURAL:"mailtemplates",MAIL_TEMPLATE_ENABLED:"Enabled",MAIL_TEMPLATE_MAIL_CC_DATA_QUERY_ID:"Mail cc data query id",MAIL_TEMPLATE_MAIL_SUBJECT:"Mail subject",MAIL_TEMPLATE_MAIL_TEMPLATE_CODE:"Mail template code",MAIL_TEMPLATE_MAIL_TEMPLATE_NAME:"Mail template name",MAIL_TEMPLATE_MAIL_TO_DATA_QUERY_ID:"Mail to data query id",MAIL_TEMPLATE_PERIOD_TYPE:"Period type",MAIL_TEMPLATE_PERIOD_VALUE:"Period value",MAIL_TEMPLATE_PERIODICAL:"Periodical",MAIL_TEMPLATE_START_SENDING_AT:"Start sending at",MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID:"Subject data query id",NOTIFICATION_SINGULAR:"notification",NOTIFICATION_PLURAL:"notifications",NOTIFICATION_ENABLED:"Enabled",NOTIFICATION_NOTIFICATION_ACTION_KEY:"Notification action key",NOTIFICATION_NOTIFICATION_ACTION_PAYLOAD:"Notification action payload",NOTIFICATION_NOTIFICATION_CODE:"Notification code",NOTIFICATION_NOTIFICATION_ICON:"Notification icon",NOTIFICATION_NOTIFICATION_QUERY_ID:"Notification query id",NOTIFICATION_NOTIFICATION_TEXT:"Notification text",NOTIFICATION_USERS_TO_NOTIFY_QUERY_ID:"Users to notify query id",NOTIFICATION_QUEUE_SINGULAR:"notificationqueue",NOTIFICATION_QUEUE_PLURAL:"notificationqueues",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_KEY:"Custom notification action key",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ACTION_PAYLOAD:"Custom notification action payload",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_ICON:"Custom notification icon",NOTIFICATION_QUEUE_CUSTOM_NOTIFICATION_TEXT:"Custom notification text",NOTIFICATION_QUEUE_IS_NOTIFIED:"Is notified",NOTIFICATION_QUEUE_NOTIFICATION_CODE:"Notification code",NOTIFICATION_QUEUE_NOTIFICATION_PARAMS:"Notification params",NOTIFICATION_QUEUE_NOTIFIED_TIME:"Notified time",NOTIFICATION_QUEUE_USERNAME:"Username",REPORT_SINGULAR:"report",REPORT_PLURAL:"reports",REPORT_DATASOURCE_CON_ID:"Datasource con id",REPORT_REPORT_BLUE_PRINT_ID:"Report blue print id",REPORT_REPORT_CATEGORY:"Report category",REPORT_REPORT_CODE:"Report code",REPORT_REPORT_EXCEL_DATA_QUERY_ID:"Report excel data query id",REPORT_REPORT_EXPORT_NAME:"Report export name",REPORT_REPORT_JASPER_NAME:"Report jasper name",REPORT_REPORT_JASPER_PATH:"Report jasper path",REPORT_REPORT_MENU_CODE:"Report menu code",REPORT_REPORT_NAME:"Report name",REPORT_REPORT_TYPE:"Report type",REPORT_USE_SYS_DATASOURCE:"Use sys datasource",REPORT_PARAMETER_SINGULAR:"reportparameter",REPORT_PARAMETER_PLURAL:"reportparameters",REPORT_PARAMETER_DEFAULT_VALUE:"Default value",REPORT_PARAMETER_ENABLED:"Enabled",REPORT_PARAMETER_ENTITY_PARAMETER_ID:"Entity parameter id",REPORT_PARAMETER_HIDDEN:"Hidden",REPORT_PARAMETER_MANDATORY:"Mandatory",REPORT_PARAMETER_REPORT_ID:"Report id",USER_REQUEST_SINGULAR:"userrequest",USER_REQUEST_PLURAL:"userrequests",USER_REQUEST_IS_NOTIFIED:"Is notified",USER_REQUEST_MAILS_TO_NOTIFY:"Mails to notify",USER_REQUEST_NOTIFICATION_MESSAGE:"Notification message",USER_REQUEST_NOTIFICATION_TIME:"Notification time",USER_REQUEST_NOTIFICATION_TYPE:"Notification type",USER_REQUEST_NOTIFY_USER:"Notify user",USER_REQUEST_REPORT_CODE:"Report code",USER_REQUEST_REPORT_PARAMETERS:"Report parameters",USER_REQUEST_REQUEST_TYPE:"Request type",USER_REQUEST_STATUS:"Status",USER_REQUEST_STATUS_MESSAGE:"Status message",WIDGET_SINGULAR:"widget",WIDGET_PLURAL:"widgets",WIDGET_DATA_QUERY_ID:"Data query id",WIDGET_ENABLED:"Enabled",WIDGET_HEIGHT:"Height",WIDGET_HORIZONTAL_AXIS_FIELD:"Horizontal axis field",WIDGET_HORIZONTAL_AXIS_LABEL:"Horizontal axis label",WIDGET_ICON:"Icon",WIDGET_SERIES_KEYS:"Series keys",WIDGET_TITLE:"Title",WIDGET_VERTICAL_AXIS_FIELD:"Vertical axis field",WIDGET_VERTICAL_AXIS_LABEL:"Vertical axis label",WIDGET_WIDGET_DESCRIPTION:"Widget description",WIDGET_WIDGET_NAME:"Widget name",WIDGET_WIDGET_TYPE:"Widget type",WIDGET_WIDTH:"Width",WORKFLOW_DOCUMENT_SINGULAR:"Workflow Document",WORKFLOW_DOCUMENT_PLURAL:"Workflow Documents",WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON:"App notification icon",WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE:"App notification style",WORKFLOW_DOCUMENT_APP_VIEW_ROUTE:"App view route",WORKFLOW_DOCUMENT_DOCUMENT_CODE:"Document code",WORKFLOW_DOCUMENT_DOCUMENT_CON_ID:"Document con id",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME:"Document database name",WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE:"Document database table",WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD:"Document id field",WORKFLOW_DOCUMENT_DOCUMENT_NAME:"Document name",WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD:"Document number field",WORKFLOW_DOCUMENT_DOCUMENT_REPORT_ID:"Document report id",WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD:"Document status field",WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED:"Mail approval allowed",WORKFLOW_DOCUMENT_ORG_CODE:"Org code",WORKFLOW_DOCUMENT_USE_SYSTEM_CON:"Use system con",WORKFLOW_DOCUMENT_ACTION_SINGULAR:"workflowdocumentaction",WORKFLOW_DOCUMENT_ACTION_PLURAL:"workflowdocumentactions",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE:"Document action code",WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_NAME:"Document action name",WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID:"Next document status id",WORKFLOW_DOCUMENT_ACTION_POST_ACTION_ENDPOINT:"Post action endpoint",WORKFLOW_DOCUMENT_ACTION_PRE_ACTION_ENDPOINT:"Pre action endpoint",WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT:"Require comment",WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_HISTORY_SINGULAR:"workflowdocumentactionhistory",WORKFLOW_DOCUMENT_ACTION_HISTORY_PLURAL:"workflowdocumentactionhistories",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_BY:"Action by",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_COMMENT:"Action comment",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_METHOD:"Action method",WORKFLOW_DOCUMENT_ACTION_HISTORY_ACTION_TIME:"Action time",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_HISTORY_DOCUMENT_REF_ID:"Document ref id",WORKFLOW_DOCUMENT_ACTION_HISTORY_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_ACTION_MAIL_SINGULAR:"workflowdocumentactionmail",WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL:"workflowdocumentactionmails",WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID:"Document action id",WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED:"Enabled",WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID:"Mail template id",WORKFLOW_DOCUMENT_MAIL_LOG_SINGULAR:"workflowdocumentmaillog",WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL:"workflowdocumentmaillogs",WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID:"Graph api msg id",WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED:"Is processed",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE:"Mail action code",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT:"Mail body content",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM:"Mail from",WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT:"Mail subject",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE:"Process message",WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME:"Process time",WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID:"Ref doc id",WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID:"Workflow document id",WORKFLOW_DOCUMENT_STATUS_SINGULAR:"workflowdocumentstatus",WORKFLOW_DOCUMENT_STATUS_PLURAL:"workflowdocumentstatuses",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE:"Document status code",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_NAME:"Document status name",WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER:"Document status order",WORKFLOW_DOCUMENT_STATUS_ENABLED:"Enabled",WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE:"Is zero state",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTION_TAKERS_QUERY_ID:"Next action takers query id",WORKFLOW_DOCUMENT_STATUS_NEXT_ACTIONS_QUERY_ID:"Next actions query id",WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID:"Workflow document id"}}}};E.use(f.initReactI18next).init({resources:ge,lng:localStorage.getItem("language")||"en",fallbackLng:"en"});const xe=t=>{const[i,o]=l.useState(!1),{t:a}=f.useTranslation();return{ConfirmationWindow:()=>e.jsxs(d.Dialog,{open:i,children:[e.jsx(d.DialogTitle,{children:t.title}),e.jsx(d.DialogContent,{children:e.jsx(d.DialogContentText,{children:t.body})}),e.jsxs(d.DialogActions,{children:[e.jsx(d.Button,{variant:"contained",color:"primary",onClick:()=>{o(!1)},children:a("NO_LABEL")}),e.jsx(d.Button,{variant:"contained",color:"error",onClick:()=>{t.onConfirmationCallBk(),o(!1)},autoFocus:!0,children:a("YES_LABEL")})]})]}),open:i,setOpen:o}},Ue=()=>{const e=t.useSelector((e=>e.UserSession)),i=e.value;return{UserSession:e,isUserAuthorized:t=>{if(e?.value?.authorities)for(let i of e.value.authorities)if("DEVELOPMENT_ADMIN"===i?.authority||i?.authority===t)return!0;return!1},UserInfo:i}},ve=t=>{const[i,o]=l.useState(!1);return{windowState:i,setWindowState:o,Window:a=>e.jsx(d.Modal,{open:i,sx:{zIndex:e=>e.zIndex.drawer},onClose:()=>{!i&&t?.onCloseCallBack&&t.onCloseCallBack()},children:e.jsxs(d.Box,{sx:{position:"absolute",top:"50%",left:"50%",maxHeight:"90%",transform:"translate(-50%, -50%)",height:t?.height||"80%",width:t?.width||"90%",minWidth:t.minWidth||400,minHeight:t.minHeight||200,overflow:"hidden",bgcolor:"modalBackground.main",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:[e.jsx(d.AppBar,{position:"static",children:e.jsxs(d.Toolbar,{variant:"dense",children:[e.jsx(m.FontAwesomeIcon,{icon:t?.windowIcon||"window-maximize",style:{marginRight:5}}),e.jsx(d.Typography,{variant:"h6",color:"inherit",component:"div",children:t?.windowTitle||"window"}),e.jsx("div",{style:{flexGrow:1}}),e.jsx(d.IconButton,{onClick:()=>{o(!1),null!=t.onCloseCallBack&&null!=t.onCloseCallBack&&t.onCloseCallBack()},color:"secondary",children:e.jsx(m.FontAwesomeIcon,{icon:"xmark-square"})})]})}),e.jsx(d.Paper,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",height:"100%",padding:1,overflow:"hidden"},children:a?.children})]})})}},Fe=T.createSlice({name:"loadingMask",initialState:{stores:{},storeKeys:[],isAutoLoadLoaded:!1},reducers:{setStoresMetaData:(e,t)=>{e.stores=t.payload,e.storeKeys=Object.keys(t.payload)},setStoreData:(e,t)=>{e.stores[t.payload.storeKey].data=t.payload.data},setAutoLoadLoaded:()=>{state.isAutoLoadLoaded=!0}}}),{setStoreData:we,setStoresMetaData:Be,setAutoLoadLoaded:ke}=Fe.actions;var We=Fe.reducer;const Ge=e=>{const i=t.useSelector((e=>e.commonStores.stores)),o=t.useDispatch(),a=Ue(),{handleGetRequest:r,handlePostRequest:d,handleDeleteRequest:n}=Le();return{reloadData:async t=>{if(e?.commonStoreKey){const t=Object.keys(i);for(const d of t)if(d===e.commonStoreKey&&(void 0===i[d]?.authority||null===i[d]?.authority||a.isUserAuthorized(i[d]?.authority))&&""!=i[d]?.url){await r({endPointURI:i[d].url,showMask:!1,successCallBkFn:t=>{o(we({storeKey:d,data:t.data})),e.setData(t.data)},failureCallBkFn:()=>{o(we({storeKey:d,data:[]})),e.setData([])}});break}}else e?.findAll&&await r({endPointURI:e.findAll,showMask:!0,parameters:t||{},successCallBkFn:t=>{e.setData(t.data)}})},loadRecordById:async t=>{let i=null;if(e?.findById){const o={};o[e?.findByIdParamName||"id"]=t,await r({endPointURI:e.findById,showMask:!0,parameters:o,successCallBkFn:e=>{i=e.data}})}return i},saveRecord:async t=>{let i=null;return e?.save&&await d({endPointURI:e.save,data:t,showMask:!0,successCallBkFn:e=>{i=e.data}}),i},deleteRecordById:async t=>{let i=!0;if(e?.deleteById){const o={};o[e?.deleteByIdParamName||"id"]=t,await n({endPointURI:e.deleteById,showMask:!0,parameters:o,successCallBkFn:()=>{i=!0},failureCallBkFn:()=>{i=!1}})}return i}}},je=t=>{const{t:i}=f.useTranslation();return e.jsx(d.TextField,{...t,slotProps:{inputLabel:{shrink:!0}},label:e.jsx(e.Fragment,{children:t?.label?i(t.label):""})})};function Ve(e,t){return e.filter((e=>-1===t.indexOf(e)))}function Ye(e,t){return e.filter((e=>-1!==t.indexOf(e)))}const qe=({valueField:t="id",displayField:i="name",options:o=[],selectedOptions:a=[],setSelection:r})=>{const[n,l]=ce.useState([]),[s,p]=ce.useState([]),[c,u]=ce.useState([]),[m,T]=ce.useState(""),[A,_]=ce.useState(""),E=Ye(n,s),f=Ye(n,c);ce.useEffect((()=>{o&&p([...o])}),[o]),ce.useEffect((()=>{a&&u([...a])}),[a]);const M=e=>()=>{const t=n.indexOf(e),i=[...n];-1===t?i.push(e):i.splice(t,1),l(i)},C=e=>Ye(n,e).length,D=e=>()=>{var t,i;C(e)===e.length?l(Ve(n,e)):l((t=n,i=e,[...t,...Ve(i,t)]))},S=(o,a,r)=>{const l=a.filter((e=>{if(e[i]){const t=e[i];if("left"===r&&t.toLocaleLowerCase().includes(m.toLocaleLowerCase()))return!0;if("right"===r&&t.toLocaleLowerCase().includes(A.toLocaleLowerCase()))return!0}return!1}));return e.jsxs(O,{sx:{height:"100%"},children:[e.jsx(y,{sx:{px:2,py:1},avatar:e.jsx(L,{onClick:D(l),checked:C(l)===l.length&&0!==l.length,indeterminate:C(l)!==l.length&&0!==C(l),disabled:0===l.length,inputProps:{"aria-label":"all items selected"}}),title:o,subheader:`${C(a)} / ${a.length} Selected`}),e.jsx(d.Box,{sx:{width:"100%",padding:1},children:e.jsx(je,{fullWidth:!0,label:"search",value:"left"===r?m:A,onChange:e=>{"left"===r?T(e.target.value):_(e.target.value)}})}),e.jsx(P,{}),e.jsx(I,{sx:{width:"100%",height:"100%",bgcolor:"secondary",overflow:"auto"},dense:!0,component:"div",role:"list",children:l.map((o=>(o[t],e.jsxs(d.ListItemButton,{role:"listitem",onClick:M(o),sx:{cursor:"pointer"},children:[e.jsx(R,{children:e.jsx(L,{checked:-1!==n.indexOf(o),tabIndex:-1,disableRipple:!0})}),e.jsx(N,{id:o[t],primary:o[i]})]},o[t]))))})]})};return e.jsxs(d.Grid2,{container:!0,spacing:2,sx:{flexGrow:1,overflow:"auto",margin:1,display:"flex",width:"100%"},justifyContent:"center",alignItems:"center",children:[e.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:S("Available Items",s,"left")}),e.jsx(d.Grid2,{children:e.jsxs(d.Grid2,{container:!0,direction:"column",alignItems:"center",children:[e.jsx(h,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{u((e=>{let t=c.concat(E);return r(t),t})),p(Ve(s,E)),l(Ve(n,E))},disabled:0===E.length,"aria-label":"move selected right",children:">"}),e.jsx(h,{sx:{my:.5},variant:"outlined",size:"small",onClick:()=>{p(s.concat(f)),u((e=>{let t=Ve(c,f);return r(t),t})),l(Ve(n,f))},disabled:0===f.length,"aria-label":"move selected left",children:"<"})]})}),e.jsx(d.Grid2,{sx:{height:"100%",flex:1},children:S("Currently Selected",c,"right")})]})},Ke=t=>e.jsx(M.BarChart,{dataset:t.data,xAxis:[{dataKey:t.valueField,scaleType:"band",label:t.valueLabel}],series:t.labelField?.split(",").map((e=>({dataKey:e,label:e})))}),ze=t=>e.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",height:150,padding:1,flexGrow:1,justifyContent:"center",alignItems:"center"},children:[e.jsx(d.Box,{sx:{display:"flex",width:"100%",justifyContent:"space-evenly",alignItems:"center"},children:e.jsx("div",{children:t.record[t.valueField]})}),e.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]})]}),He=t=>e.jsxs(e.Fragment,{children:[e.jsx(d.Typography,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),e.jsx(M.Gauge,{width:200,height:200,value:t.record[t.valueField],valueMax:t.total})]}),Qe=t=>e.jsx(M.LineChart,{dataset:t.data,xAxis:[{dataKey:t.valueField,scaleType:"band",label:t.valueLabel}],series:t.labelField?.split(",").map((e=>({dataKey:e,label:e})))});function Ze(t){return e.jsxs(S,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(S,{sx:{width:"100%",mr:1},children:e.jsx(C,{variant:"determinate",...t})}),e.jsx(S,{sx:{minWidth:35},children:e.jsx(D,{variant:"body2",sx:{color:"text.secondary"},children:`${Math.round(t.value)}%`})})]})}const $e=t=>e.jsxs(S,{sx:{width:"100%"},children:[e.jsx(D,{sx:{fontSize:16,fontWeight:"bold"},children:t.record[t.labelField]}),e.jsx(Ze,{value:t.record[t.valueField]/t.total*100})]}),Xe=t=>{const i=t.data.map(((e,i)=>({id:i,value:e[t.valueField],label:e[t.labelField]+""})));return e.jsx(b.PieChart,{series:[{data:i}]})},Je=t=>{const{t:i}=f.useTranslation();return e.jsx(d.FormControlLabel,{sx:t.sx,disabled:t.disabled||!1,required:t.required||!1,control:e.jsx(d.Checkbox,{checked:t?.checkedValue==t.value||"true"===t.value||"1"==t.value,onChange:e=>{void 0!==t.onChangeCallBack&&null!=t.onChangeCallBack&&(e.target.checked?void 0!==t.checkedValue&&null!=t.checkedValue?t.onChangeCallBack(t.checkedValue):t.onChangeCallBack(!0):void 0!==t.unCheckedValue&&null!=t.unCheckedValue?t.onChangeCallBack(t.unCheckedValue):t.onChangeCallBack(!1))}}),label:i(t.label)})},et=i=>{const o=t.useSelector((e=>e.AppLayout)),{t:a}=f.useTranslation();return e.jsx(d.Autocomplete,{sx:i.sx,value:(e=>{for(let t of i.options)if(t[i.valueField]==e)return t;return null})(i.value),options:i.options,disabled:i.disabled,onChange:(e,t)=>{if(void 0!==i.onChangeCallBack&&null!=i.onChangeCallBack)if(null!=t){let e=t[i.valueField];i.onChangeCallBack(e,t)}else i.onChangeCallBack(null,null)},clearOnBlur:!0,handleHomeEndKeys:!0,getOptionLabel:e=>null!=e?a(e[i.displayField]):"",renderOption:(t,o)=>e.jsx("li",{...t,children:null!=o?a(o[i.displayField]):""}),slots:{popper:t=>e.jsx(d.Popper,{...t,style:{...t.style,direction:o.appDirection}})},renderInput:t=>e.jsx(d.TextField,{...t,required:i.required||!1,variant:"outlined",InputLabelProps:{shrink:!0},label:a(i.label),error:null!=i.errorMessage&&void 0!==i.errorMessage,helperText:null!=i.errorMessage&&void 0!==i.errorMessage?a(i.errorMessage):""})})},tt="YYYY-MM-DD",it="YYYY-MM-DD HH:mm:ss",ot="#37505C",at="#ff6d00",rt="#ea690e",dt="#74776B",nt=t=>{const{t:i}=f.useTranslation();return e.jsx(g.LocalizationProvider,{dateAdapter:x.AdapterMoment,children:e.jsx(g.DatePicker,{value:null!=t.value&&void 0!==t.value&&""!==t.value?U(t.value,t?.format||tt):null,sx:t.sx,label:i(t.label),format:t?.format||tt,disabled:t.disabled,onChange:e=>{let i=null;null!=e&&e.isValid()&&(i=e.format(t?.format||tt)),void 0!==t.onChangeCallBack&&null!=t.onChangeCallBack&&t.onChangeCallBack(i)},slotProps:{textField:{InputLabelProps:{shrink:!0},variant:"outlined",required:t.required,error:void 0!==t.errorMessage&&null!=t.errorMessage,helperText:void 0!==t.errorMessage&&null!=t.errorMessage?e.jsx(e.Fragment,{children:i(t.errorMessage)}):e.jsx(e.Fragment,{})}}})})},lt=t=>{const{t:i}=f.useTranslation();return e.jsx(g.LocalizationProvider,{dateAdapter:x.AdapterMoment,children:e.jsx(g.DateTimePicker,{value:null!=t.value&&void 0!==t.value&&""!==t.value?U(t.value,t?.format||it):null,label:i(t.label),sx:t.sx,format:t?.format||it,disabled:t.disabled,onChange:e=>{let i=null;null!=e&&e.isValid()&&(i=e.format(t?.format||it)),void 0!==t.onChangeCallBack&&null!=t.onChangeCallBack&&t.onChangeCallBack(i)},slotProps:{textField:{variant:"outlined",required:t.required,error:void 0!==t.errorMessage&&null!=t.errorMessage,helperText:void 0!==t.errorMessage&&null!=t.errorMessage?e.jsx(e.Fragment,{children:i(t.errorMessage)}):e.jsx(e.Fragment,{})}}})})};function st(e,...t){const i=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>i.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${i} for the full message.`}function pt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ct,ut={exports:{}},mt={exports:{}},Tt={};var At,_t,Et,ft,It,Ot,yt,Nt,Rt,Lt,ht,Pt,Mt,Ct,Dt,St={};
|
|
2
2
|
/** @license React v16.13.1
|
|
3
3
|
* react-is.development.js
|
|
4
4
|
*
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/function
|
|
9
|
+
*/function bt(){return _t||(_t=1,"production"===process.env.NODE_ENV?mt.exports=function(){if(ct)return Tt;ct=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,n=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:switch(e=e.type){case l:case s:case o:case r:case a:case c:return e;default:switch(e=e&&e.$$typeof){case n:case p:case T:case m:case d:return e;default:return u}}case i:return u}}}function O(e){return I(e)===s}return Tt.AsyncMode=l,Tt.ConcurrentMode=s,Tt.ContextConsumer=n,Tt.ContextProvider=d,Tt.Element=t,Tt.ForwardRef=p,Tt.Fragment=o,Tt.Lazy=T,Tt.Memo=m,Tt.Portal=i,Tt.Profiler=r,Tt.StrictMode=a,Tt.Suspense=c,Tt.isAsyncMode=function(e){return O(e)||I(e)===l},Tt.isConcurrentMode=O,Tt.isContextConsumer=function(e){return I(e)===n},Tt.isContextProvider=function(e){return I(e)===d},Tt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Tt.isForwardRef=function(e){return I(e)===p},Tt.isFragment=function(e){return I(e)===o},Tt.isLazy=function(e){return I(e)===T},Tt.isMemo=function(e){return I(e)===m},Tt.isPortal=function(e){return I(e)===i},Tt.isProfiler=function(e){return I(e)===r},Tt.isStrictMode=function(e){return I(e)===a},Tt.isSuspense=function(e){return I(e)===c},Tt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===r||e===a||e===c||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===m||e.$$typeof===d||e.$$typeof===n||e.$$typeof===p||e.$$typeof===_||e.$$typeof===E||e.$$typeof===f||e.$$typeof===A)},Tt.typeOf=I,Tt}():mt.exports=(At||(At=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,n=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,A=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,f=e?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var u=e.$$typeof;switch(u){case t:var A=e.type;switch(A){case l:case s:case o:case r:case a:case c:return A;default:var _=A&&A.$$typeof;switch(_){case n:case p:case T:case m:case d:return _;default:return u}}case i:return u}}}var O=l,y=s,N=n,R=d,L=t,h=p,P=o,M=T,C=m,D=i,S=r,b=a,g=c,x=!1;function U(e){return I(e)===s}St.AsyncMode=O,St.ConcurrentMode=y,St.ContextConsumer=N,St.ContextProvider=R,St.Element=L,St.ForwardRef=h,St.Fragment=P,St.Lazy=M,St.Memo=C,St.Portal=D,St.Profiler=S,St.StrictMode=b,St.Suspense=g,St.isAsyncMode=function(e){return x||(x=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),U(e)||I(e)===l},St.isConcurrentMode=U,St.isContextConsumer=function(e){return I(e)===n},St.isContextProvider=function(e){return I(e)===d},St.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},St.isForwardRef=function(e){return I(e)===p},St.isFragment=function(e){return I(e)===o},St.isLazy=function(e){return I(e)===T},St.isMemo=function(e){return I(e)===m},St.isPortal=function(e){return I(e)===i},St.isProfiler=function(e){return I(e)===r},St.isStrictMode=function(e){return I(e)===a},St.isSuspense=function(e){return I(e)===c},St.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===r||e===a||e===c||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===m||e.$$typeof===d||e.$$typeof===n||e.$$typeof===p||e.$$typeof===_||e.$$typeof===E||e.$$typeof===f||e.$$typeof===A)},St.typeOf=I}()),St)),mt.exports}
|
|
10
10
|
/*
|
|
11
11
|
object-assign
|
|
12
12
|
(c) Sindre Sorhus
|
|
13
13
|
@license MIT
|
|
14
|
-
*/function St(){if(_t)return At;_t=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return At=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,a){for(var r,d,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var s in r=Object(arguments[l]))t.call(r,s)&&(n[s]=r[s]);if(e){d=e(r);for(var p=0;p<d.length;p++)i.call(r,d[p])&&(n[d[p]]=r[d[p]])}}return n},At}function bt(){if(ft)return Et;ft=1;return Et="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function gt(){return Ot?It:(Ot=1,It=Function.call.bind(Object.prototype.hasOwnProperty))}function xt(){if(yt)return Nt;yt=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=bt(),i={},o=gt();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function a(a,r,d,n,l){if("production"!==process.env.NODE_ENV)for(var s in a)if(o(a,s)){var p;try{if("function"!=typeof a[s]){var c=Error((n||"React class")+": "+d+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}p=a[s](r,s,n,d,null,t)}catch(e){p=e}if(!p||p instanceof Error||e((n||"React class")+": type specification of "+d+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in i)){i[p.message]=!0;var u=l?l():"";e("Failed "+d+" type: "+p.message+(null!=u?u:""))}}}return a.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Nt=a}function Ut(){if(Lt)return Rt;Lt=1;var e=Dt(),t=St(),i=bt(),o=gt(),a=xt(),r=function(){};function d(){return null}return"production"!==process.env.NODE_ENV&&(r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Rt=function(n,l){var s="function"==typeof Symbol&&Symbol.iterator;var p="<<anonymous>>",c={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:T(d),arrayOf:function(e){return T((function(t,o,a,r,d){if("function"!=typeof e)return new m("Property `"+d+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var n=t[o];if(!Array.isArray(n))return new m("Invalid "+r+" `"+d+"` of type `"+f(n)+"` supplied to `"+a+"`, expected an array.");for(var l=0;l<n.length;l++){var s=e(n,l,a,r,d+"["+l+"]",i);if(s instanceof Error)return s}return null}))},element:T((function(e,t,i,o,a){var r=e[t];return n(r)?null:new m("Invalid "+o+" `"+a+"` of type `"+f(r)+"` supplied to `"+i+"`, expected a single ReactElement.")})),elementType:T((function(t,i,o,a,r){var d=t[i];return e.isValidElementType(d)?null:new m("Invalid "+a+" `"+r+"` of type `"+f(d)+"` supplied to `"+o+"`, expected a single ReactElement type.")})),instanceOf:function(e){return T((function(t,i,o,a,r){if(!(t[i]instanceof e)){var d=e.name||p;return new m("Invalid "+a+" `"+r+"` of type `"+(((n=t[i]).constructor&&n.constructor.name?n.constructor.name:p)+"` supplied to `")+o+"`, expected instance of `"+d+"`.")}var n;return null}))},node:T((function(e,t,i,o,a){return E(e[t])?null:new m("Invalid "+o+" `"+a+"` supplied to `"+i+"`, expected a ReactNode.")})),objectOf:function(e){return T((function(t,a,r,d,n){if("function"!=typeof e)return new m("Property `"+n+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[a],s=f(l);if("object"!==s)return new m("Invalid "+d+" `"+n+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var p in l)if(o(l,p)){var c=e(l,p,r,d,n+"."+p,i);if(c instanceof Error)return c}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),d;return T((function(t,i,o,a,r){for(var d=t[i],n=0;n<e.length;n++)if(u(d,e[n]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===I(t)?String(t):t}));return new m("Invalid "+a+" `"+r+"` of value `"+String(d)+"` supplied to `"+o+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var t=0;t<e.length;t++){var a=e[t];if("function"!=typeof a)return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(a)+" at index "+t+"."),d}return T((function(t,a,r,d,n){for(var l=[],s=0;s<e.length;s++){var p=(0,e[s])(t,a,r,d,n,i);if(null==p)return null;p.data&&o(p.data,"expectedType")&&l.push(p.data.expectedType)}return new m("Invalid "+d+" `"+n+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return T((function(t,o,a,r,d){var n=t[o],l=f(n);if("object"!==l)return new m("Invalid "+r+" `"+d+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");for(var s in e){var p=e[s];if("function"!=typeof p)return _(a,r,d,s,I(p));var c=p(n,s,a,r,d+"."+s,i);if(c)return c}return null}))},exact:function(e){return T((function(a,r,d,n,l){var s=a[r],p=f(s);if("object"!==p)return new m("Invalid "+n+" `"+l+"` of type `"+p+"` supplied to `"+d+"`, expected `object`.");var c=t({},a[r],e);for(var u in c){var T=e[u];if(o(e,u)&&"function"!=typeof T)return _(d,n,l,u,I(T));if(!T)return new m("Invalid "+n+" `"+l+"` key `"+u+"` supplied to `"+d+"`.\nBad object: "+JSON.stringify(a[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var A=T(s,u,d,n,l+"."+u,i);if(A)return A}return null}))}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function m(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function T(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function a(a,d,n,s,c,u,T){if(s=s||p,u=u||n,T!==i){if(l){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=s+":"+n;!t[_]&&o<3&&(r("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[_]=!0,o++)}}return null==d[n]?a?null===d[n]?new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `null`."):new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(d,n,s,c,u)}var d=a.bind(null,!1);return d.isRequired=a.bind(null,!0),d}function A(e){return T((function(t,i,o,a,r,d){var n=t[i];return f(n)!==e?new m("Invalid "+a+" `"+r+"` of type `"+I(n)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null}))}function _(e,t,i,o,a){return new m((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function E(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(E);if(null===e||n(e))return!0;var t=function(e){var t=e&&(s&&e[s]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!E(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!E(a[1]))return!1}return!0;default:return!1}}function f(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function I(e){if(null==e)return""+e;var t=f(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function O(e){var t=I(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return m.prototype=Error.prototype,c.checkPropTypes=a,c.resetWarningCache=a.resetWarningCache,c.PropTypes=c,c},Rt}function vt(){if(Pt)return ht;Pt=1;var e=bt();function t(){}function i(){}return i.resetWarningCache=t,ht=function(){function o(t,i,o,a,r,d){if(d!==e){var n=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw n.name="Invariant Violation",n}}function a(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:a,element:o,elementType:o,instanceOf:a,node:o,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:t};return r.PropTypes=r,r}}function Ft(){if(Mt)return pt.exports;if(Mt=1,"production"!==process.env.NODE_ENV){var e=Dt();pt.exports=Ut()(e.isElement,true)}else pt.exports=vt()();return pt.exports}var wt=lt(Ft());var Bt,kt={exports:{}},Wt={};function Gt(){if(Bt)return Wt;Bt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),d=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function T(m){if("object"==typeof m&&null!==m){var T=m.$$typeof;switch(T){case e:switch(m=m.type){case i:case a:case o:case l:case s:case u:return m;default:switch(m=m&&m.$$typeof){case d:case n:case c:case p:case r:return m;default:return T}}case t:return T}}}return Wt.ContextConsumer=r,Wt.ContextProvider=d,Wt.Element=e,Wt.ForwardRef=n,Wt.Fragment=i,Wt.Lazy=c,Wt.Memo=p,Wt.Portal=t,Wt.Profiler=a,Wt.StrictMode=o,Wt.Suspense=l,Wt.SuspenseList=s,Wt.isContextConsumer=function(e){return T(e)===r},Wt.isContextProvider=function(e){return T(e)===d},Wt.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},Wt.isForwardRef=function(e){return T(e)===n},Wt.isFragment=function(e){return T(e)===i},Wt.isLazy=function(e){return T(e)===c},Wt.isMemo=function(e){return T(e)===p},Wt.isPortal=function(e){return T(e)===t},Wt.isProfiler=function(e){return T(e)===a},Wt.isStrictMode=function(e){return T(e)===o},Wt.isSuspense=function(e){return T(e)===l},Wt.isSuspenseList=function(e){return T(e)===s},Wt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===o||e===l||e===s||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===p||e.$$typeof===d||e.$$typeof===r||e.$$typeof===n||e.$$typeof===m||void 0!==e.getModuleId)},Wt.typeOf=T,Wt}var jt,Vt,Yt={};
|
|
14
|
+
*/function gt(){if(ft)return Et;ft=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;return Et=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(o,a){for(var r,d,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(o),l=1;l<arguments.length;l++){for(var s in r=Object(arguments[l]))t.call(r,s)&&(n[s]=r[s]);if(e){d=e(r);for(var p=0;p<d.length;p++)i.call(r,d[p])&&(n[d[p]]=r[d[p]])}}return n},Et}function xt(){if(Ot)return It;Ot=1;return It="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Ut(){return Nt?yt:(Nt=1,yt=Function.call.bind(Object.prototype.hasOwnProperty))}function vt(){if(Lt)return Rt;Lt=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=xt(),i={},o=Ut();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function a(a,r,d,n,l){if("production"!==process.env.NODE_ENV)for(var s in a)if(o(a,s)){var p;try{if("function"!=typeof a[s]){var c=Error((n||"React class")+": "+d+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}p=a[s](r,s,n,d,null,t)}catch(e){p=e}if(!p||p instanceof Error||e((n||"React class")+": type specification of "+d+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in i)){i[p.message]=!0;var u=l?l():"";e("Failed "+d+" type: "+p.message+(null!=u?u:""))}}}return a.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(i={})},Rt=a}function Ft(){if(Pt)return ht;Pt=1;var e=bt(),t=gt(),i=xt(),o=Ut(),a=vt(),r=function(){};function d(){return null}return"production"!==process.env.NODE_ENV&&(r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ht=function(n,l){var s="function"==typeof Symbol&&Symbol.iterator;var p="<<anonymous>>",c={array:A("array"),bigint:A("bigint"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:T(d),arrayOf:function(e){return T((function(t,o,a,r,d){if("function"!=typeof e)return new m("Property `"+d+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var n=t[o];if(!Array.isArray(n))return new m("Invalid "+r+" `"+d+"` of type `"+f(n)+"` supplied to `"+a+"`, expected an array.");for(var l=0;l<n.length;l++){var s=e(n,l,a,r,d+"["+l+"]",i);if(s instanceof Error)return s}return null}))},element:T((function(e,t,i,o,a){var r=e[t];return n(r)?null:new m("Invalid "+o+" `"+a+"` of type `"+f(r)+"` supplied to `"+i+"`, expected a single ReactElement.")})),elementType:T((function(t,i,o,a,r){var d=t[i];return e.isValidElementType(d)?null:new m("Invalid "+a+" `"+r+"` of type `"+f(d)+"` supplied to `"+o+"`, expected a single ReactElement type.")})),instanceOf:function(e){return T((function(t,i,o,a,r){if(!(t[i]instanceof e)){var d=e.name||p;return new m("Invalid "+a+" `"+r+"` of type `"+(((n=t[i]).constructor&&n.constructor.name?n.constructor.name:p)+"` supplied to `")+o+"`, expected instance of `"+d+"`.")}var n;return null}))},node:T((function(e,t,i,o,a){return E(e[t])?null:new m("Invalid "+o+" `"+a+"` supplied to `"+i+"`, expected a ReactNode.")})),objectOf:function(e){return T((function(t,a,r,d,n){if("function"!=typeof e)return new m("Property `"+n+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[a],s=f(l);if("object"!==s)return new m("Invalid "+d+" `"+n+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var p in l)if(o(l,p)){var c=e(l,p,r,d,n+"."+p,i);if(c instanceof Error)return c}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),d;return T((function(t,i,o,a,r){for(var d=t[i],n=0;n<e.length;n++)if(u(d,e[n]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===I(t)?String(t):t}));return new m("Invalid "+a+" `"+r+"` of value `"+String(d)+"` supplied to `"+o+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&r("Invalid argument supplied to oneOfType, expected an instance of array."),d;for(var t=0;t<e.length;t++){var a=e[t];if("function"!=typeof a)return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(a)+" at index "+t+"."),d}return T((function(t,a,r,d,n){for(var l=[],s=0;s<e.length;s++){var p=(0,e[s])(t,a,r,d,n,i);if(null==p)return null;p.data&&o(p.data,"expectedType")&&l.push(p.data.expectedType)}return new m("Invalid "+d+" `"+n+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return T((function(t,o,a,r,d){var n=t[o],l=f(n);if("object"!==l)return new m("Invalid "+r+" `"+d+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");for(var s in e){var p=e[s];if("function"!=typeof p)return _(a,r,d,s,I(p));var c=p(n,s,a,r,d+"."+s,i);if(c)return c}return null}))},exact:function(e){return T((function(a,r,d,n,l){var s=a[r],p=f(s);if("object"!==p)return new m("Invalid "+n+" `"+l+"` of type `"+p+"` supplied to `"+d+"`, expected `object`.");var c=t({},a[r],e);for(var u in c){var T=e[u];if(o(e,u)&&"function"!=typeof T)return _(d,n,l,u,I(T));if(!T)return new m("Invalid "+n+" `"+l+"` key `"+u+"` supplied to `"+d+"`.\nBad object: "+JSON.stringify(a[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var A=T(s,u,d,n,l+"."+u,i);if(A)return A}return null}))}};function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function m(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function T(e){if("production"!==process.env.NODE_ENV)var t={},o=0;function a(a,d,n,s,c,u,T){if(s=s||p,u=u||n,T!==i){if(l){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=s+":"+n;!t[_]&&o<3&&(r("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[_]=!0,o++)}}return null==d[n]?a?null===d[n]?new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `null`."):new m("The "+c+" `"+u+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(d,n,s,c,u)}var d=a.bind(null,!1);return d.isRequired=a.bind(null,!0),d}function A(e){return T((function(t,i,o,a,r,d){var n=t[i];return f(n)!==e?new m("Invalid "+a+" `"+r+"` of type `"+I(n)+"` supplied to `"+o+"`, expected `"+e+"`.",{expectedType:e}):null}))}function _(e,t,i,o,a){return new m((e||"React class")+": "+t+" type `"+i+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function E(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(E);if(null===e||n(e))return!0;var t=function(e){var t=e&&(s&&e[s]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var i,o=t.call(e);if(t!==e.entries){for(;!(i=o.next()).done;)if(!E(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!E(a[1]))return!1}return!0;default:return!1}}function f(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function I(e){if(null==e)return""+e;var t=f(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function O(e){var t=I(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return m.prototype=Error.prototype,c.checkPropTypes=a,c.resetWarningCache=a.resetWarningCache,c.PropTypes=c,c},ht}function wt(){if(Ct)return Mt;Ct=1;var e=xt();function t(){}function i(){}return i.resetWarningCache=t,Mt=function(){function o(t,i,o,a,r,d){if(d!==e){var n=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw n.name="Invariant Violation",n}}function a(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:a,element:o,elementType:o,instanceOf:a,node:o,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:t};return r.PropTypes=r,r}}function Bt(){if(Dt)return ut.exports;if(Dt=1,"production"!==process.env.NODE_ENV){var e=bt();ut.exports=Ft()(e.isElement,true)}else ut.exports=wt()();return ut.exports}var kt=pt(Bt());var Wt,Gt={exports:{}},jt={};function Vt(){if(Wt)return jt;Wt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),d=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function T(m){if("object"==typeof m&&null!==m){var T=m.$$typeof;switch(T){case e:switch(m=m.type){case i:case a:case o:case l:case s:case u:return m;default:switch(m=m&&m.$$typeof){case d:case n:case c:case p:case r:return m;default:return T}}case t:return T}}}return jt.ContextConsumer=r,jt.ContextProvider=d,jt.Element=e,jt.ForwardRef=n,jt.Fragment=i,jt.Lazy=c,jt.Memo=p,jt.Portal=t,jt.Profiler=a,jt.StrictMode=o,jt.Suspense=l,jt.SuspenseList=s,jt.isContextConsumer=function(e){return T(e)===r},jt.isContextProvider=function(e){return T(e)===d},jt.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},jt.isForwardRef=function(e){return T(e)===n},jt.isFragment=function(e){return T(e)===i},jt.isLazy=function(e){return T(e)===c},jt.isMemo=function(e){return T(e)===p},jt.isPortal=function(e){return T(e)===t},jt.isProfiler=function(e){return T(e)===a},jt.isStrictMode=function(e){return T(e)===o},jt.isSuspense=function(e){return T(e)===l},jt.isSuspenseList=function(e){return T(e)===s},jt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===o||e===l||e===s||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===p||e.$$typeof===d||e.$$typeof===r||e.$$typeof===n||e.$$typeof===m||void 0!==e.getModuleId)},jt.typeOf=T,jt}var Yt,qt,Kt={};
|
|
15
15
|
/**
|
|
16
16
|
* @license React
|
|
17
17
|
* react-is.development.js
|
|
@@ -20,7 +20,7 @@ object-assign
|
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the MIT license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/function qt(){return jt||(jt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var T=e.$$typeof;switch(T){case t:switch(e=e.type){case o:case r:case a:case s:case p:case m:return e;default:switch(e=e&&e.$$typeof){case n:case l:case u:case c:case d:return e;default:return T}}case i:return T}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),n=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),T=Symbol.for("react.client.reference");Yt.ContextConsumer=d,Yt.ContextProvider=n,Yt.Element=t,Yt.ForwardRef=l,Yt.Fragment=o,Yt.Lazy=u,Yt.Memo=c,Yt.Portal=i,Yt.Profiler=r,Yt.StrictMode=a,Yt.Suspense=s,Yt.SuspenseList=p,Yt.isContextConsumer=function(t){return e(t)===d},Yt.isContextProvider=function(t){return e(t)===n},Yt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Yt.isForwardRef=function(t){return e(t)===l},Yt.isFragment=function(t){return e(t)===o},Yt.isLazy=function(t){return e(t)===u},Yt.isMemo=function(t){return e(t)===c},Yt.isPortal=function(t){return e(t)===i},Yt.isProfiler=function(t){return e(t)===r},Yt.isStrictMode=function(t){return e(t)===a},Yt.isSuspense=function(t){return e(t)===s},Yt.isSuspenseList=function(t){return e(t)===p},Yt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===r||e===a||e===s||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===n||e.$$typeof===d||e.$$typeof===l||e.$$typeof===T||void 0!==e.getModuleId)},Yt.typeOf=e}()),Yt}function Kt(){return Vt||(Vt=1,"production"===process.env.NODE_ENV?kt.exports=Gt():kt.exports=qt()),kt.exports}var zt=Kt();function Ht(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Qt(e){if(se.isValidElement(e)||zt.isValidElementType(e)||!Ht(e))return e;const t={};return Object.keys(e).forEach((i=>{t[i]=Qt(e[i])})),t}function Zt(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return Ht(e)&&Ht(t)&&Object.keys(t).forEach((a=>{se.isValidElement(t[a])||zt.isValidElementType(t[a])?o[a]=t[a]:Ht(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Ht(e[a])?o[a]=Zt(e[a],t[a],i):i.clone?o[a]=Ht(t[a])?Qt(t[a]):t[a]:o[a]=t[a]})),o}function $t(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...a}=e,r=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),d=Object.keys(r);function n(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function s(e,a){const r=d.indexOf(a);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==r&&"number"==typeof t[d[r]]?t[d[r]]:a)-o/100}${i})`}return{keys:d,values:r,up:n,down:l,between:s,only:function(e){return d.indexOf(e)+1<d.length?s(e,d[d.indexOf(e)+1]):n(e)},not:function(e){const t=d.indexOf(e);return 0===t?n(d[1]):t===d.length-1?l(d[t]):s(e,d[d.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...a}}const Xt={borderRadius:4},Jt="production"!==process.env.NODE_ENV?wt.oneOfType([wt.number,wt.string,wt.object,wt.array]):{};function ei(e,t){return t?Zt(e,t,{clone:!1}):e}const ti={xs:0,sm:600,md:900,lg:1200,xl:1536},ii={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ti[e]}px)`},oi={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:ti[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function ai(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||ii;return t.reduce(((o,a,r)=>(o[e.up(e.keys[r])]=i(t[r]),o)),{})}if("object"==typeof t){const e=o.breakpoints||ii;return Object.keys(t).reduce(((a,r)=>{if(d=e.keys,"@"===(n=r)||n.startsWith("@")&&(d.some((e=>n.startsWith(`@${e}`)))||n.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:nt(18,`(${t})`));return null}const[,o,a]=i,r=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(r)}(o.containerQueries?o:oi,r);e&&(a[e]=i(t[r],r))}else if(Object.keys(e.values||ti).includes(r)){a[e.up(r)]=i(t[r],r)}else{const e=r;a[e]=t[e]}var d,n;return a}),{})}return i(t)}function ri(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function di(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=i)return i}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function ni(e,t,i,o=i){let a;return a="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:di(e,i)||o,t&&(a=t(a,o,e)),a}function li(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:a}=e,r=e=>{if(null==e[t])return null;const r=e[t],d=di(e.theme,o)||{};return ai(e,r,(e=>{let o=ni(d,a,e);return e===o&&"string"==typeof e&&(o=ni(d,a,`${t}${"default"===e?"":ri(e)}`,e)),!1===i?o:{[i]:o}}))};return r.propTypes="production"!==process.env.NODE_ENV?{[t]:Jt}:{},r.filterProps=[t],r}const si={m:"margin",p:"padding"},pi={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},ci={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ui=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}((e=>{if(e.length>2){if(!ci[e])return[e];e=ci[e]}const[t,i]=e.split(""),o=si[t],a=pi[i]||"";return Array.isArray(a)?a.map((e=>o+e)):[o+a]})),mi=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ai=[...mi,...Ti];function _i(e,t,i,o){const a=di(e,t,!0)??i;return"number"==typeof a||"string"==typeof a?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof a?a.startsWith("var(")&&0===e?0:a.startsWith("var(")&&1===e?a:`calc(${e} * ${a})`:a*e):Array.isArray(a)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=a[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof a?a:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Ei(e){return _i(e,"spacing",8,"spacing")}function fi(e,t){return"string"==typeof t||null==t?t:e(t)}function Ii(e,t,i,o){if(!t.includes(i))return null;const a=function(e,t){return i=>e.reduce(((e,o)=>(e[o]=fi(t,i),e)),{})}(ui(i),o);return ai(e,e[i],a)}function Oi(e,t){const i=Ei(e.theme);return Object.keys(e).map((o=>Ii(e,t,o,i))).reduce(ei,{})}function Ni(e){return Oi(e,mi)}function yi(e){return Oi(e,Ti)}function Ri(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((i=>{e[i]=t})),e)),{}),i=e=>Object.keys(e).reduce(((i,o)=>t[o]?ei(i,t[o](e)):i),{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},i.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),i}function Li(e){return"number"!=typeof e?e:`${e}px solid`}function hi(e,t){return li({prop:e,themeKey:"borders",transform:t})}Ni.propTypes="production"!==process.env.NODE_ENV?mi.reduce(((e,t)=>(e[t]=Jt,e)),{}):{},Ni.filterProps=mi,yi.propTypes="production"!==process.env.NODE_ENV?Ti.reduce(((e,t)=>(e[t]=Jt,e)),{}):{},yi.filterProps=Ti,"production"===process.env.NODE_ENV||Ai.reduce(((e,t)=>(e[t]=Jt,e)),{});const Pi=hi("border",Li),Mi=hi("borderTop",Li),Ci=hi("borderRight",Li),Di=hi("borderBottom",Li),Si=hi("borderLeft",Li),bi=hi("borderColor"),gi=hi("borderTopColor"),xi=hi("borderRightColor"),Ui=hi("borderBottomColor"),vi=hi("borderLeftColor"),Fi=hi("outline",Li),wi=hi("outlineColor"),Bi=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=_i(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:fi(t,e)});return ai(e,e.borderRadius,i)}return null};Bi.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Jt}:{},Bi.filterProps=["borderRadius"],Ri(Pi,Mi,Ci,Di,Si,bi,gi,xi,Ui,vi,Bi,Fi,wi);const ki=e=>{if(void 0!==e.gap&&null!==e.gap){const t=_i(e.theme,"spacing",8,"gap"),i=e=>({gap:fi(t,e)});return ai(e,e.gap,i)}return null};ki.propTypes="production"!==process.env.NODE_ENV?{gap:Jt}:{},ki.filterProps=["gap"];const Wi=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=_i(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:fi(t,e)});return ai(e,e.columnGap,i)}return null};Wi.propTypes="production"!==process.env.NODE_ENV?{columnGap:Jt}:{},Wi.filterProps=["columnGap"];const Gi=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=_i(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:fi(t,e)});return ai(e,e.rowGap,i)}return null};Gi.propTypes="production"!==process.env.NODE_ENV?{rowGap:Jt}:{},Gi.filterProps=["rowGap"];function ji(e,t){return"grey"===t?t:e}Ri(ki,Wi,Gi,li({prop:"gridColumn"}),li({prop:"gridRow"}),li({prop:"gridAutoFlow"}),li({prop:"gridAutoColumns"}),li({prop:"gridAutoRows"}),li({prop:"gridTemplateColumns"}),li({prop:"gridTemplateRows"}),li({prop:"gridTemplateAreas"}),li({prop:"gridArea"}));function Vi(e){return e<=1&&0!==e?100*e+"%":e}Ri(li({prop:"color",themeKey:"palette",transform:ji}),li({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ji}),li({prop:"backgroundColor",themeKey:"palette",transform:ji}));const Yi=li({prop:"width",transform:Vi}),qi=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||ti[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:Vi(t)}};return ai(e,e.maxWidth,t)}return null};qi.filterProps=["maxWidth"];const Ki=li({prop:"minWidth",transform:Vi}),zi=li({prop:"height",transform:Vi}),Hi=li({prop:"maxHeight",transform:Vi}),Qi=li({prop:"minHeight",transform:Vi});li({prop:"size",cssProperty:"width",transform:Vi}),li({prop:"size",cssProperty:"height",transform:Vi});Ri(Yi,qi,Ki,zi,Hi,Qi,li({prop:"boxSizing"}));const Zi={border:{themeKey:"borders",transform:Li},borderTop:{themeKey:"borders",transform:Li},borderRight:{themeKey:"borders",transform:Li},borderBottom:{themeKey:"borders",transform:Li},borderLeft:{themeKey:"borders",transform:Li},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Li},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Bi},color:{themeKey:"palette",transform:ji},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ji},backgroundColor:{themeKey:"palette",transform:ji},p:{style:yi},pt:{style:yi},pr:{style:yi},pb:{style:yi},pl:{style:yi},px:{style:yi},py:{style:yi},padding:{style:yi},paddingTop:{style:yi},paddingRight:{style:yi},paddingBottom:{style:yi},paddingLeft:{style:yi},paddingX:{style:yi},paddingY:{style:yi},paddingInline:{style:yi},paddingInlineStart:{style:yi},paddingInlineEnd:{style:yi},paddingBlock:{style:yi},paddingBlockStart:{style:yi},paddingBlockEnd:{style:yi},m:{style:Ni},mt:{style:Ni},mr:{style:Ni},mb:{style:Ni},ml:{style:Ni},mx:{style:Ni},my:{style:Ni},margin:{style:Ni},marginTop:{style:Ni},marginRight:{style:Ni},marginBottom:{style:Ni},marginLeft:{style:Ni},marginX:{style:Ni},marginY:{style:Ni},marginInline:{style:Ni},marginInlineStart:{style:Ni},marginInlineEnd:{style:Ni},marginBlock:{style:Ni},marginBlockStart:{style:Ni},marginBlockEnd:{style:Ni},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ki},rowGap:{style:Gi},columnGap:{style:Wi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Vi},maxWidth:{style:qi},minWidth:{transform:Vi},height:{transform:Vi},maxHeight:{transform:Vi},minHeight:{transform:Vi},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const $i=function(){function e(e,t,i,o){const a={[e]:t,theme:i},r=o[e];if(!r)return{[e]:t};const{cssProperty:d=e,themeKey:n,transform:l,style:s}=r;if(null==t)return null;if("typography"===n&&"inherit"===t)return{[e]:t};const p=di(i,n)||{};if(s)return s(a);return ai(a,t,(t=>{let i=ni(p,l,t);return t===i&&"string"==typeof t&&(i=ni(p,l,`${e}${"default"===t?"":ri(t)}`,t)),!1===d?i:{[d]:i}}))}return function t(i){const{sx:o,theme:a={}}=i||{};if(!o)return null;const r=a.unstable_sxConfig??Zi;function d(i){let o=i;if("function"==typeof i)o=i(a);else if("object"!=typeof i)return i;if(!o)return null;const d=function(e={}){const t=e.keys?.reduce(((t,i)=>(t[e.up(i)]={},t)),{});return t||{}}(a.breakpoints),n=Object.keys(d);let l=d;return Object.keys(o).forEach((i=>{const d=(n=o[i],s=a,"function"==typeof n?n(s):n);var n,s;if(null!=d)if("object"==typeof d)if(r[i])l=ei(l,e(i,d,a,r));else{const e=ai({theme:a},d,(e=>({[i]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),i=new Set(t);return e.every((e=>i.size===Object.keys(e).length))}(e,d)?l=ei(l,e):l[i]=t({sx:d,theme:a})}else l=ei(l,e(i,d,a,r))})),function(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)}));return i.length?i.reduce(((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e}),{...t}):t}(a,function(e,t){return e.reduce(((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e}),t)}(n,l))}return Array.isArray(o)?o.map(d):d(o)}}();function Xi(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function Ji(e=null){const t=se.useContext(n.ThemeContext);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}$i.filterProps=["sx"];const eo=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:a,shape:r={},...d}=e,n=$t(i),l=function(e=8,t=Ei({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const i=t(e);return"number"==typeof i?`${i}px`:i})).join(" "));return i.mui=!0,i}(a);let s=Zt({breakpoints:n,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...Xt,...r}},d);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const a=t(e.breakpoints.not(...i),o);return a.includes("not all and")?a.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):a}}const o={},a=e=>(i(o,e),o);return i(a),{...e,containerQueries:a}}(s),s.applyStyles=Xi,s=t.reduce(((e,t)=>Zt(e,t)),s),s.unstable_sxConfig={...Zi,...d?.unstable_sxConfig},s.unstable_sx=function(e){return $i({sx:e,theme:this})},s}();function to(e){const{sx:t,...i}=e,{systemProps:o,otherProps:a}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??Zi;return Object.keys(e).forEach((o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]})),t})(i);let r;return r=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return Ht(i)?{...o,...i}:o}:{...o,...t},{...a,sx:r}}const io=e=>e,oo=(()=>{let e=io;return{configure(t){e=t},generate:t=>e(t),reset(){e=io}}})();function ao(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(i=ao(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function ro(){for(var e,t,i=0,o="",a=arguments.length;i<a;i++)(e=arguments[i])&&(t=ao(e))&&(o&&(o+=" "),o+=t);return o}const no={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const lo=function(t={}){const{themeId:i,defaultTheme:o,defaultClassName:a="MuiBox-root",generateClassName:r}=t,d=
|
|
23
|
+
*/function zt(){return Yt||(Yt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var T=e.$$typeof;switch(T){case t:switch(e=e.type){case o:case r:case a:case s:case p:case m:return e;default:switch(e=e&&e.$$typeof){case n:case l:case u:case c:case d:return e;default:return T}}case i:return T}}}var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),n=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),T=Symbol.for("react.client.reference");Kt.ContextConsumer=d,Kt.ContextProvider=n,Kt.Element=t,Kt.ForwardRef=l,Kt.Fragment=o,Kt.Lazy=u,Kt.Memo=c,Kt.Portal=i,Kt.Profiler=r,Kt.StrictMode=a,Kt.Suspense=s,Kt.SuspenseList=p,Kt.isContextConsumer=function(t){return e(t)===d},Kt.isContextProvider=function(t){return e(t)===n},Kt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Kt.isForwardRef=function(t){return e(t)===l},Kt.isFragment=function(t){return e(t)===o},Kt.isLazy=function(t){return e(t)===u},Kt.isMemo=function(t){return e(t)===c},Kt.isPortal=function(t){return e(t)===i},Kt.isProfiler=function(t){return e(t)===r},Kt.isStrictMode=function(t){return e(t)===a},Kt.isSuspense=function(t){return e(t)===s},Kt.isSuspenseList=function(t){return e(t)===p},Kt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===r||e===a||e===s||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===u||e.$$typeof===c||e.$$typeof===n||e.$$typeof===d||e.$$typeof===l||e.$$typeof===T||void 0!==e.getModuleId)},Kt.typeOf=e}()),Kt}function Ht(){return qt||(qt=1,"production"===process.env.NODE_ENV?Gt.exports=Vt():Gt.exports=zt()),Gt.exports}var Qt=Ht();function Zt(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function $t(e){if(ce.isValidElement(e)||Qt.isValidElementType(e)||!Zt(e))return e;const t={};return Object.keys(e).forEach((i=>{t[i]=$t(e[i])})),t}function Xt(e,t,i={clone:!0}){const o=i.clone?{...e}:e;return Zt(e)&&Zt(t)&&Object.keys(t).forEach((a=>{ce.isValidElement(t[a])||Qt.isValidElementType(t[a])?o[a]=t[a]:Zt(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Zt(e[a])?o[a]=Xt(e[a],t[a],i):i.clone?o[a]=Zt(t[a])?$t(t[a]):t[a]:o[a]=t[a]})),o}function Jt(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:o=5,...a}=e,r=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),d=Object.keys(r);function n(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${i})`}function s(e,a){const r=d.indexOf(a);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${i}) and (max-width:${(-1!==r&&"number"==typeof t[d[r]]?t[d[r]]:a)-o/100}${i})`}return{keys:d,values:r,up:n,down:l,between:s,only:function(e){return d.indexOf(e)+1<d.length?s(e,d[d.indexOf(e)+1]):n(e)},not:function(e){const t=d.indexOf(e);return 0===t?n(d[1]):t===d.length-1?l(d[t]):s(e,d[d.indexOf(e)+1]).replace("@media","@media not all and")},unit:i,...a}}const ei={borderRadius:4},ti="production"!==process.env.NODE_ENV?kt.oneOfType([kt.number,kt.string,kt.object,kt.array]):{};function ii(e,t){return t?Xt(e,t,{clone:!1}):e}const oi={xs:0,sm:600,md:900,lg:1200,xl:1536},ai={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${oi[e]}px)`},ri={containerQueries:e=>({up:t=>{let i="number"==typeof t?t:oi[t]||t;return"number"==typeof i&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function di(e,t,i){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||ai;return t.reduce(((o,a,r)=>(o[e.up(e.keys[r])]=i(t[r]),o)),{})}if("object"==typeof t){const e=o.breakpoints||ai;return Object.keys(t).reduce(((a,r)=>{if(d=e.keys,"@"===(n=r)||n.startsWith("@")&&(d.some((e=>n.startsWith(`@${e}`)))||n.match(/^@\d/))){const e=function(e,t){const i=t.match(/^@([^/]+)?\/?(.+)?$/);if(!i){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:st(18,`(${t})`));return null}const[,o,a]=i,r=Number.isNaN(+o)?o||0:+o;return e.containerQueries(a).up(r)}(o.containerQueries?o:ri,r);e&&(a[e]=i(t[r],r))}else if(Object.keys(e.values||oi).includes(r)){a[e.up(r)]=i(t[r],r)}else{const e=r;a[e]=t[e]}var d,n;return a}),{})}return i(t)}function ni(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":st(7));return e.charAt(0).toUpperCase()+e.slice(1)}function li(e,t,i=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&i){const i=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=i)return i}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function si(e,t,i,o=i){let a;return a="function"==typeof e?e(i):Array.isArray(e)?e[i]||o:li(e,i)||o,t&&(a=t(a,o,e)),a}function pi(e){const{prop:t,cssProperty:i=e.prop,themeKey:o,transform:a}=e,r=e=>{if(null==e[t])return null;const r=e[t],d=li(e.theme,o)||{};return di(e,r,(e=>{let o=si(d,a,e);return e===o&&"string"==typeof e&&(o=si(d,a,`${t}${"default"===e?"":ni(e)}`,e)),!1===i?o:{[i]:o}}))};return r.propTypes="production"!==process.env.NODE_ENV?{[t]:ti}:{},r.filterProps=[t],r}const ci={m:"margin",p:"padding"},ui={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},mi={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Ti=function(e){const t={};return i=>(void 0===t[i]&&(t[i]=e(i)),t[i])}((e=>{if(e.length>2){if(!mi[e])return[e];e=mi[e]}const[t,i]=e.split(""),o=ci[t],a=ui[i]||"";return Array.isArray(a)?a.map((e=>o+e)):[o+a]})),Ai=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],_i=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ei=[...Ai,..._i];function fi(e,t,i,o){const a=li(e,t,!0)??i;return"number"==typeof a||"string"==typeof a?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),"string"==typeof a?a.startsWith("var(")&&0===e?0:a.startsWith("var(")&&1===e?a:`calc(${e} * ${a})`:a*e):Array.isArray(a)?e=>{if("string"==typeof e)return e;const i=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(i)?i>a.length-1&&console.error([`MUI: The value provided (${i}) overflows.`,`The supported values are: ${JSON.stringify(a)}.`,`${i} > ${a.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const o=a[i];return e>=0?o:"number"==typeof o?-o:"string"==typeof o&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:"function"==typeof a?a:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Ii(e){return fi(e,"spacing",8,"spacing")}function Oi(e,t){return"string"==typeof t||null==t?t:e(t)}function yi(e,t,i,o){if(!t.includes(i))return null;const a=function(e,t){return i=>e.reduce(((e,o)=>(e[o]=Oi(t,i),e)),{})}(Ti(i),o);return di(e,e[i],a)}function Ni(e,t){const i=Ii(e.theme);return Object.keys(e).map((o=>yi(e,t,o,i))).reduce(ii,{})}function Ri(e){return Ni(e,Ai)}function Li(e){return Ni(e,_i)}function hi(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((i=>{e[i]=t})),e)),{}),i=e=>Object.keys(e).reduce(((i,o)=>t[o]?ii(i,t[o](e)):i),{});return i.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},i.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),i}function Pi(e){return"number"!=typeof e?e:`${e}px solid`}function Mi(e,t){return pi({prop:e,themeKey:"borders",transform:t})}Ri.propTypes="production"!==process.env.NODE_ENV?Ai.reduce(((e,t)=>(e[t]=ti,e)),{}):{},Ri.filterProps=Ai,Li.propTypes="production"!==process.env.NODE_ENV?_i.reduce(((e,t)=>(e[t]=ti,e)),{}):{},Li.filterProps=_i,"production"===process.env.NODE_ENV||Ei.reduce(((e,t)=>(e[t]=ti,e)),{});const Ci=Mi("border",Pi),Di=Mi("borderTop",Pi),Si=Mi("borderRight",Pi),bi=Mi("borderBottom",Pi),gi=Mi("borderLeft",Pi),xi=Mi("borderColor"),Ui=Mi("borderTopColor"),vi=Mi("borderRightColor"),Fi=Mi("borderBottomColor"),wi=Mi("borderLeftColor"),Bi=Mi("outline",Pi),ki=Mi("outlineColor"),Wi=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=fi(e.theme,"shape.borderRadius",4,"borderRadius"),i=e=>({borderRadius:Oi(t,e)});return di(e,e.borderRadius,i)}return null};Wi.propTypes="production"!==process.env.NODE_ENV?{borderRadius:ti}:{},Wi.filterProps=["borderRadius"],hi(Ci,Di,Si,bi,gi,xi,Ui,vi,Fi,wi,Wi,Bi,ki);const Gi=e=>{if(void 0!==e.gap&&null!==e.gap){const t=fi(e.theme,"spacing",8,"gap"),i=e=>({gap:Oi(t,e)});return di(e,e.gap,i)}return null};Gi.propTypes="production"!==process.env.NODE_ENV?{gap:ti}:{},Gi.filterProps=["gap"];const ji=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=fi(e.theme,"spacing",8,"columnGap"),i=e=>({columnGap:Oi(t,e)});return di(e,e.columnGap,i)}return null};ji.propTypes="production"!==process.env.NODE_ENV?{columnGap:ti}:{},ji.filterProps=["columnGap"];const Vi=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=fi(e.theme,"spacing",8,"rowGap"),i=e=>({rowGap:Oi(t,e)});return di(e,e.rowGap,i)}return null};Vi.propTypes="production"!==process.env.NODE_ENV?{rowGap:ti}:{},Vi.filterProps=["rowGap"];function Yi(e,t){return"grey"===t?t:e}hi(Gi,ji,Vi,pi({prop:"gridColumn"}),pi({prop:"gridRow"}),pi({prop:"gridAutoFlow"}),pi({prop:"gridAutoColumns"}),pi({prop:"gridAutoRows"}),pi({prop:"gridTemplateColumns"}),pi({prop:"gridTemplateRows"}),pi({prop:"gridTemplateAreas"}),pi({prop:"gridArea"}));function qi(e){return e<=1&&0!==e?100*e+"%":e}hi(pi({prop:"color",themeKey:"palette",transform:Yi}),pi({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yi}),pi({prop:"backgroundColor",themeKey:"palette",transform:Yi}));const Ki=pi({prop:"width",transform:qi}),zi=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const i=e.theme?.breakpoints?.values?.[t]||oi[t];return i?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:qi(t)}};return di(e,e.maxWidth,t)}return null};zi.filterProps=["maxWidth"];const Hi=pi({prop:"minWidth",transform:qi}),Qi=pi({prop:"height",transform:qi}),Zi=pi({prop:"maxHeight",transform:qi}),$i=pi({prop:"minHeight",transform:qi});pi({prop:"size",cssProperty:"width",transform:qi}),pi({prop:"size",cssProperty:"height",transform:qi});hi(Ki,zi,Hi,Qi,Zi,$i,pi({prop:"boxSizing"}));const Xi={border:{themeKey:"borders",transform:Pi},borderTop:{themeKey:"borders",transform:Pi},borderRight:{themeKey:"borders",transform:Pi},borderBottom:{themeKey:"borders",transform:Pi},borderLeft:{themeKey:"borders",transform:Pi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Pi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Wi},color:{themeKey:"palette",transform:Yi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yi},backgroundColor:{themeKey:"palette",transform:Yi},p:{style:Li},pt:{style:Li},pr:{style:Li},pb:{style:Li},pl:{style:Li},px:{style:Li},py:{style:Li},padding:{style:Li},paddingTop:{style:Li},paddingRight:{style:Li},paddingBottom:{style:Li},paddingLeft:{style:Li},paddingX:{style:Li},paddingY:{style:Li},paddingInline:{style:Li},paddingInlineStart:{style:Li},paddingInlineEnd:{style:Li},paddingBlock:{style:Li},paddingBlockStart:{style:Li},paddingBlockEnd:{style:Li},m:{style:Ri},mt:{style:Ri},mr:{style:Ri},mb:{style:Ri},ml:{style:Ri},mx:{style:Ri},my:{style:Ri},margin:{style:Ri},marginTop:{style:Ri},marginRight:{style:Ri},marginBottom:{style:Ri},marginLeft:{style:Ri},marginX:{style:Ri},marginY:{style:Ri},marginInline:{style:Ri},marginInlineStart:{style:Ri},marginInlineEnd:{style:Ri},marginBlock:{style:Ri},marginBlockStart:{style:Ri},marginBlockEnd:{style:Ri},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Gi},rowGap:{style:Vi},columnGap:{style:ji},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:qi},maxWidth:{style:zi},minWidth:{transform:qi},height:{transform:qi},maxHeight:{transform:qi},minHeight:{transform:qi},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Ji=function(){function e(e,t,i,o){const a={[e]:t,theme:i},r=o[e];if(!r)return{[e]:t};const{cssProperty:d=e,themeKey:n,transform:l,style:s}=r;if(null==t)return null;if("typography"===n&&"inherit"===t)return{[e]:t};const p=li(i,n)||{};if(s)return s(a);return di(a,t,(t=>{let i=si(p,l,t);return t===i&&"string"==typeof t&&(i=si(p,l,`${e}${"default"===t?"":ni(t)}`,t)),!1===d?i:{[d]:i}}))}return function t(i){const{sx:o,theme:a={}}=i||{};if(!o)return null;const r=a.unstable_sxConfig??Xi;function d(i){let o=i;if("function"==typeof i)o=i(a);else if("object"!=typeof i)return i;if(!o)return null;const d=function(e={}){const t=e.keys?.reduce(((t,i)=>(t[e.up(i)]={},t)),{});return t||{}}(a.breakpoints),n=Object.keys(d);let l=d;return Object.keys(o).forEach((i=>{const d=(n=o[i],s=a,"function"==typeof n?n(s):n);var n,s;if(null!=d)if("object"==typeof d)if(r[i])l=ii(l,e(i,d,a,r));else{const e=di({theme:a},d,(e=>({[i]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),i=new Set(t);return e.every((e=>i.size===Object.keys(e).length))}(e,d)?l=ii(l,e):l[i]=t({sx:d,theme:a})}else l=ii(l,e(i,d,a,r))})),function(e,t){if(!e.containerQueries)return t;const i=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const i=/min-width:\s*([0-9.]+)/;return+(e.match(i)?.[1]||0)-+(t.match(i)?.[1]||0)}));return i.length?i.reduce(((e,i)=>{const o=t[i];return delete e[i],e[i]=o,e}),{...t}):t}(a,function(e,t){return e.reduce(((e,t)=>{const i=e[t];return(!i||0===Object.keys(i).length)&&delete e[t],e}),t)}(n,l))}return Array.isArray(o)?o.map(d):d(o)}}();function eo(e,t){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||"function"!=typeof i.getColorSchemeSelector)return{};let o=i.getColorSchemeSelector(e);return"&"===o?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return i.palette.mode===e?t:{}}function to(e=null){const t=ce.useContext(n.ThemeContext);return t&&(i=t,0!==Object.keys(i).length)?t:e;var i}Ji.filterProps=["sx"];const io=function(e={},...t){const{breakpoints:i={},palette:o={},spacing:a,shape:r={},...d}=e,n=Jt(i),l=function(e=8,t=Ii({spacing:e})){if(e.mui)return e;const i=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const i=t(e);return"number"==typeof i?`${i}px`:i})).join(" "));return i.mui=!0,i}(a);let s=Xt({breakpoints:n,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:l,shape:{...ei,...r}},d);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function i(i,o){i.up=(...i)=>t(e.breakpoints.up(...i),o),i.down=(...i)=>t(e.breakpoints.down(...i),o),i.between=(...i)=>t(e.breakpoints.between(...i),o),i.only=(...i)=>t(e.breakpoints.only(...i),o),i.not=(...i)=>{const a=t(e.breakpoints.not(...i),o);return a.includes("not all and")?a.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):a}}const o={},a=e=>(i(o,e),o);return i(a),{...e,containerQueries:a}}(s),s.applyStyles=eo,s=t.reduce(((e,t)=>Xt(e,t)),s),s.unstable_sxConfig={...Xi,...d?.unstable_sxConfig},s.unstable_sx=function(e){return Ji({sx:e,theme:this})},s}();function oo(e){const{sx:t,...i}=e,{systemProps:o,otherProps:a}=(e=>{const t={systemProps:{},otherProps:{}},i=e?.theme?.unstable_sxConfig??Xi;return Object.keys(e).forEach((o=>{i[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]})),t})(i);let r;return r=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const i=t(...e);return Zt(i)?{...o,...i}:o}:{...o,...t},{...a,sx:r}}const ao=e=>e,ro=(()=>{let e=ao;return{configure(t){e=t},generate:t=>e(t),reset(){e=ao}}})();function no(e){var t,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(i=no(e[t]))&&(o&&(o+=" "),o+=i)}else for(i in e)e[i]&&(o&&(o+=" "),o+=i);return o}function lo(){for(var e,t,i=0,o="",a=arguments.length;i<a;i++)(e=arguments[i])&&(t=no(e))&&(o&&(o+=" "),o+=t);return o}const so={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};const po=function(t={}){const{themeId:i,defaultTheme:o,defaultClassName:a="MuiBox-root",generateClassName:r}=t,d=
|
|
24
24
|
/**
|
|
25
25
|
* @mui/styled-engine v7.1.1
|
|
26
26
|
*
|
|
@@ -28,5 +28,5 @@ object-assign
|
|
|
28
28
|
* This source code is licensed under the MIT license found in the
|
|
29
29
|
* LICENSE file in the root directory of this source tree.
|
|
30
30
|
*/
|
|
31
|
-
function(e,t){const i=ae(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})($i),n=se.forwardRef((function(t,n){const l=function(e=eo){return Ji(e)}(o),{className:s,component:p="div",...c}=to(t);return e.jsx(d,{as:p,ref:n,className:ro(s,r?r(a):a),theme:i&&l[i]||l,...c})}));return n}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach((t=>{o[t]=function(e,t,i="Mui"){const o=no[t];return o?`${i}-${o}`:`${oo.generate(e)}-${t}`}(e,t,i)})),o}("MuiBox",["root"]).root,generateClassName:oo.generate});function so(e){return"number"==typeof e&&!isNaN(e)}function po(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function co(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function uo(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}"production"!==process.env.NODE_ENV&&(lo.propTypes={children:wt.node,component:wt.elementType,sx:wt.oneOfType([wt.arrayOf(wt.oneOfType([wt.func,wt.object,wt.bool])),wt.func,wt.object])});const mo=({label:t,errorMessage:i,value:o,setValue:a,maxLength:r})=>{const{t:n}=f.useTranslation(),s={customInlineFn:(e,{Style:t})=>{if(e.style.color)return t("color-"+e.style.color)}};let p=j.stateFromHTML(o,s);const[c,u]=l.useState(k.EditorState.createWithContent(p));l.useEffect((()=>{o!=G(k.convertToRaw(c.getCurrentContent()))&&u(k.EditorState.createWithContent(j.stateFromHTML(o,s)))}),[o]);return e.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",padding:1},children:[t?e.jsx(d.Box,{children:n(t)}):e.jsx(e.Fragment,{}),e.jsx(W.Editor,{editorState:c,onEditorStateChange:e=>{let t=G(k.convertToRaw(e.getCurrentContent()));if(console.log("Text Length "+t.length),t.length>r){let e=j.stateFromHTML(t.substring(0,r),s);u(k.EditorState.createWithContent(e))}else u(e),a(G(k.convertToRaw(e.getCurrentContent())))},handlePastedText:e=>{const t=c.getCurrentContent().getPlainText("").length,i=(()=>{const e=c.getSelection();let t=0;if(!e.isCollapsed()){const i=c.getCurrentContent(),o=e.getStartKey(),a=e.getEndKey(),r=o===a,d=i.getBlockForKey(o).getLength()-e.getStartOffset(),n=e.getEndOffset(),l=i.getKeyAfter(a);if(r)t+=e.getEndOffset()-e.getStartOffset();else{let e=o;for(;e&&e!==l;)t+=e===o?d+1:e===a?n:i.getBlockForKey(e).getLength()+1,e=i.getKeyAfter(e)}}return t})();if(t+e.length-i>r)return alert("max text length is "+r),"handled"},editorStyle:{height:"200px",border:"1px solid #F1F1F1",padding:"10px",overflow:"auto"},wrapperStyle:{marginBottom:"1rem"},toolbarStyle:{border:"1px solid #ccc"}}),i?e.jsx(d.Box,{sx:{color:"red"},children:n(i)}):e.jsx(e.Fragment,{})]})},To=i=>{const o=t.useSelector((e=>e.AppLayout)),a=ge(),[r,d]=l.useState([]),{handleGetRequest:n}=ye();return l.useEffect((()=>{i.lookupType&&(async()=>{await n({endPointURI:"api/v1/dev/system/lookup",showMask:!0,parameters:{lookupType:i.lookupType},successCallBkFn:e=>{d(e.data)},failureCallBkFn:()=>{d([])}})})()}),[i.lookupType,a.UserSession]),e.jsx(Xe,{...i,options:r,displayField:"ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},Ao=t=>{if(t?.fieldInfo){const i=t.fieldInfo,o=t?.formManager||null,a=t?.formActions||null,r=t?.formValues||null,n=t?.fieldInfo?.fieldName||null,l=t?.fieldInfo?.fieldType||null;return i&&o&&r&&n&&l?t.hiddenFields.includes(n)?e.jsx(e.Fragment,{}):e.jsx(d.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?e.jsx(We,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),hidden:i?.hidden||!1,label:i?.fieldLabel,value:r[n],onChange:e=>{let t=null;""!=e.target.value&&(t="number"===l&&po(e.target.value)?Number(e.target.value):e.target.value),o.setValue(n,t),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(t,o,a)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style},error:null!=o.formState.errors[n],helperText:o?.formState?.errors[n]?.message?.toString()}):"date"===i?.fieldType?e.jsx(rt,{format:i?.dateFormat||Je,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(n,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"datetime"===i?.fieldType?e.jsx(dt,{format:i?.dateFormat||et,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(n,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"checkbox"===i?.fieldType?e.jsx($e,{label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(n,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},value:r[n],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),sx:i?.formProps?.style}):"combobox"===i?.fieldType?e.jsx(Xe,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),onChangeCallBack:(e,t)=>{let r=null;e&&(r=e+""),o.setValue(n,r),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(r,o,a,t)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"lookup"===i?.fieldType?e.jsx(To,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),onChangeCallBack:(e,t)=>{let r=null;e&&(r=e+""),o.setValue(n,r),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(r,o,a,t)},lookupType:i.lookupType,value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"html"===i?.fieldType?e.jsx(mo,{label:i.fieldLabel,value:r[n]||"",errorMessage:o?.formState?.errors[n]?.message?.toString(),setValue:e=>{o.setValue(n,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},maxLength:4e3}):e.jsx(e.Fragment,{children:"Unknown field type"})}):e.jsx(e.Fragment,{})}return e.jsx(e.Fragment,{})},_o=t=>{const i=ge(),{ConfirmationWindow:o,setOpen:a}=be({body:t?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{t?.actionFn(t?.record)}});return null==t?.authority||i.isUserAuthorized(t.authority)?e.jsxs(e.Fragment,{children:[e.jsx(o,{}),e.jsxs(d.Button,{variant:t?.formActionProps?.actionButtonVariant,color:t?.formActionProps?.actionButtonColor,onClick:()=>{if(t?.actionFn){if(t?.preActionValidation&&!t.preActionValidation(t.record))return;!0===t?.isConfirmationRequired?a(!0):t?.actionFn(t.record)}},children:[t?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{marginRight:5,marginLeft:5}}):e.jsx(e.Fragment,{}),e.jsx("div",{children:t?.label})]})]}):e.jsx(e.Fragment,{})},Eo=t=>{const{t:i}=f.useTranslation();return e.jsx(e.Fragment,{children:e.jsxs(d.Grid2,{container:!0,sx:t?.style,alignItems:"flex-start",children:[t?.label?e.jsx(d.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:t?.icon?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{marginRight:5,marginLeft:5}}),e.jsx("div",{children:i(t.label)})]}):e.jsx(e.Fragment,{children:i(t.label)})}):e.jsx(e.Fragment,{}),t?.elements?t.elements.map((i=>"group"===i.type?e.jsx(Eo,{...i.props,formManager:t.formManager,formValues:t.formValues,formActions:t.formActions,hiddenFields:t.hiddenFields,disabledFields:t.disabledFields}):"field"===i.type&&"props"===i.mode?e.jsx(Ao,{fieldInfo:i.props,formManager:t.formManager,formValues:t.formValues,formActions:t.formActions,hiddenFields:t.hiddenFields,disabledFields:t.disabledFields}):"field"===i.type&&"node"===i.mode?e.jsx(d.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:e.jsx(i.node,{formManager:t.formManager,formValues:t.formValues,formActions:t.formActions})}):void 0)):null,t?.actions?e.jsx(d.Grid2,{size:{sm:12},sx:{padding:1},children:t.actions.map((i=>e.jsx(_o,{...i,record:t.formValues})))}):e.jsx(e.Fragment,{})]})})},fo=t=>({...t,type:"string",renderEditCell:t=>e.jsx(dt,{sx:{width:"100%"},label:"",value:t.value,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(et)),o},valueFormatter:(e,t,i)=>t[i.field]}),Io=t=>({...t,type:"custom",valueGetter:e=>e?e+"":e,renderCell:t=>{let i=null;try{i=t.colDef.options.find((e=>e[t.colDef.valueField]==t.value))}catch(e){}return e.jsx("div",{children:null!=i?i[t.colDef.displayField]:t.value})},renderEditCell:t=>e.jsx(Xe,{...t,sx:{width:"100%"},options:t.colDef.options,valueField:t.colDef.valueField,displayField:t.colDef.displayField,onChangeCallBack:(e,i)=>{null===e&&t.api.setEditCellValue({id:t.id,field:t.field,value:null}),t.api.setEditCellValue({id:t.id,field:t.field,value:e+""})}})}),Oo=t=>({...t,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const o=i?.value;return o===t.checkedValue||"true"===o||1===o||!0===o?e.jsx(m.FontAwesomeIcon,{icon:"check",color:"green"}):e.jsx(m.FontAwesomeIcon,{icon:"xmark",color:"red"})},renderEditCell:i=>e.jsx($e,{...i,checkedValue:t?.checkedValue||!0,unCheckedValue:t?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),No=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...No(i));return t},yo=e=>{const t=[];for(const i of e)t.push(...No(i));return t},Ro=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?pe.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):pe.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?pe.boolean({required_error:"This field is required"}):pe.boolean().optional().nullable():t[e]=!0===i?.required?pe.string({message:"This field is required"}).min(1,"This field is required"):pe.string().optional().nullable()}return t},Lo=t=>{const{t:i}=f.useTranslation(),o=yo(t.elements),a=[];for(const e of o)e?.hidden&&a.push(e.fieldName);const[r,n]=l.useState(a),s={};for(const e of t.elements)"field"===e?.type&&"props"===e?.mode&&e?.props?.defaultValue&&(s[e.props.fieldName]=e.props.defaultValue);const[p,c]=l.useState([]),u=pe.object(Ro(o)),T=F.useForm({resolver:w.zodResolver(u),defaultValues:s}),_=T.watch(),E=B.useParams(),I=t?.formRouteRecordIdParamName,O={setFieldValue:(e,t)=>{T.setValue(e,t)},hideField:e=>{n((t=>[...t,e]))},showField:e=>{n((t=>t.filter((t=>t!==e))))},disableField:e=>{c((t=>[...t,e]))},enableField:e=>{c((t=>t.filter((t=>t!==e))))}};return l.useEffect((()=>{(async()=>{let e=null;if(t?.recordIdToEdit?e=t.recordIdToEdit:I&&E[I]&&(e=E[I]),e){const i=await t.apiActions.loadRecordById(e);if(i){T.reset({...i}),t?.formLoadCallBk&&t?.formLoadCallBk(O,T,i);for(const e of o)"combobox"===e?.fieldType&&i[e.fieldName]&&T.setValue(e.fieldName,i[e.fieldName]+"")}}else T.reset({})})()}),[t?.recordIdToEdit]),e.jsxs(e.Fragment,{children:[e.jsx(lo,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:e.jsx(d.Grid2,{sx:{width:"100%"},container:!0,children:t.elements.map(((t,i)=>"group"===t.type?e.jsx(Eo,{...t.props,formManager:T,formValues:_,formActions:O,hiddenFields:r,disabledFields:p},i):"field"===t.type&&"props"===t.mode?e.jsx(Ao,{fieldInfo:t.props,formManager:T,formValues:_,formActions:O,hiddenFields:r,disabledFields:p},i):"field"===t.type&&"node"===t.mode?e.jsx(d.Grid2,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:e.jsx(t.node,{formManager:T,formValues:_})},i):void 0))})}),e.jsxs(lo,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[t?.actions?t.actions.map((t=>!0===t?.formActionProps?.enabled?e.jsx(_o,{...t,record:_}):e.jsx(e.Fragment,{}))):e.jsx(e.Fragment,{}),e.jsx("div",{style:{flex:1}}),e.jsx(d.Button,{variant:t?.saveButtonSpecs?.actionButtonVariant?t.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:t?.saveButtonSpecs?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.saveButtonSpecs.icon}):null,color:t?.saveButtonSpecs?.actionButtonColor?t.saveButtonSpecs.actionButtonColor:"primary",onClick:T.handleSubmit((e=>{console.log("form values",e),(async e=>{if((!t?.preSaveValidation||t.preSaveValidation(e))&&e){const i=await t.apiActions.saveRecord(e);i&&(T.reset({...i}),t?.formSavedSuccessfullyCallBk&&t.formSavedSuccessfullyCallBk(i),t?.formCloseCallBk&&t.formCloseCallBk())}})(e)}),(e=>{A.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)})),children:i(t?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e.jsx(d.Button,{variant:t?.cancelButtonSpecs?.actionButtonVariant?t.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:t?.cancelButtonSpecs?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.cancelButtonSpecs.icon}):null,color:t?.cancelButtonSpecs?.actionButtonColor?t.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{t?.formCloseCallBk&&t.formCloseCallBk(),T.reset(s)},children:i(t?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},ho=t=>{const{t:i}=f.useTranslation(),o=ge(),{ConfirmationWindow:a,setOpen:r}=be({body:i(t?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(t?.actionFn(t.recordsToProcessActionOn,t.recordIdsToProcessActionOn)),t?.reloadData&&t.reloadData()}});let n=!0;if(t.authority&&(n=o.isUserAuthorized(t.authority)),n)return e.jsxs(e.Fragment,{children:[e.jsx(a,{}),e.jsxs(d.Button,{onClick:async()=>{if(t?.recordsToProcessActionOn&&t?.recordsToProcessActionOn.length>0){if(t?.preActionValidation)for(const e of t.recordsToProcessActionOn)if(!t.preActionValidation(e))return;!0===t?.isConfirmationRequired?r(!0):(await t.actionFn(t.recordsToProcessActionOn,t.recordIdsToProcessActionOn),t?.reloadData&&t.reloadData())}else A.toast.error(i("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:t?.label?"outlined":t?.formActionProps?.actionButtonVariant?t.formActionProps.actionButtonVariant:"text",size:"small",color:t?.formActionProps?.actionButtonColor||"primary",children:[t?.icon?e.jsx(m.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:t.icon}):e.jsx(e.Fragment,{}),t?.label?i(t.label):e.jsx(e.Fragment,{})]})]})},Po=d.styled(V.QuickFilter)({display:"grid",alignItems:"center"}),Mo=d.styled(V.ToolbarButton)((({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])}))),Co=d.styled(d.TextField)((({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])}))),Do=t=>{const{t:i}=f.useTranslation(),o=ge(),a=!t?.templateProps?.editAction?.authority||o.isUserAuthorized(t.templateProps.editAction.authority),r=((e,t,i)=>{const o=[],a=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),a.push(e[i]);else if(e?.ids)for(const r of e.ids){const e=t.find((e=>e[i]===r));o.push(e),a.push(r)}return{selectedRecords:o,selectedRecordIds:a}})(t?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},t?.templateProps?.data||[],t?.templateProps?.keyColumnName||"id");return e.jsxs(V.Toolbar,{children:[a&&"none"!=t?.templateProps?.editMode?.editMode?e.jsxs(d.Button,{onClick:t?.handleCreateNewRecord,children:[e.jsx(m.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),i("ADD_BTN_LABEL")]}):e.jsx(e.Fragment,{}),t?.templateProps?.rowActions?t.templateProps.rowActions.map(((e,i)=>!0===e?.gridActionProps?.multiRecord?l.createElement(ho,{...e,key:i,reloadData:async()=>{t.templateProps.apiActions.reloadData(t?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:r.selectedRecordIds,recordsToProcessActionOn:r.selectedRecords}):null)):e.jsx(e.Fragment,{}),e.jsx(d.Box,{sx:{flex:1,mx:.5},children:t?.templateProps?.tBar}),e.jsx(d.Tooltip,{title:"Columns",children:e.jsx(V.ColumnsPanelTrigger,{render:e.jsx(V.ToolbarButton,{}),children:e.jsx(V.GridViewColumnIcon,{fontSize:"small"})})}),e.jsx(d.Tooltip,{title:"Filters",children:e.jsx(V.FilterPanelTrigger,{render:(t,i)=>e.jsx(V.ToolbarButton,{...t,color:"default",children:e.jsx(d.Badge,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:e.jsx(V.GridFilterListIcon,{fontSize:"small"})})})})}),t?.templateProps?.gridStateKey?e.jsx(d.Tooltip,{title:i("RESET_GRID_STATE"),children:e.jsx(d.IconButton,{onClick:t?.clearGridState,children:e.jsx(m.FontAwesomeIcon,{icon:"eraser"})})}):e.jsx(e.Fragment,{}),e.jsx(d.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),e.jsx(d.Tooltip,{title:i("EXPORT_EXECL_LABEL"),children:e.jsx(V.ExportExcel,{render:e.jsx(d.MenuItem,{}),children:e.jsx(m.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),e.jsxs(Po,{children:[e.jsx(V.QuickFilterTrigger,{render:(t,o)=>e.jsx(d.Tooltip,{title:i("SEARCH_BTN_LABEL"),enterDelay:0,children:e.jsx(Mo,{...t,ownerState:{expanded:o.expanded},color:"default","aria-disabled":o.expanded,children:e.jsx(m.FontAwesomeIcon,{icon:"search"})})})}),e.jsx(V.QuickFilterControl,{render:({ref:t,...o},a)=>e.jsx(Co,{...o,ownerState:{expanded:a.expanded},inputRef:t,"aria-label":"Search",placeholder:`${i("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:e.jsx(d.InputAdornment,{position:"start",children:e.jsx(m.FontAwesomeIcon,{icon:"search"})}),endAdornment:a.value?e.jsx(d.InputAdornment,{position:"end",children:e.jsx(V.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:e.jsx(m.FontAwesomeIcon,{icon:"xmark"})})}):null,...o.slotProps?.input},...o.slotProps}})})]}),e.jsx(d.IconButton,{onClick:()=>{t.templateProps.apiActions.reloadData(t?.templateProps?.gridLoadParametersValues)},children:e.jsx(m.FontAwesomeIcon,{icon:"refresh"})})]})},So=t=>{const{t:i}=f.useTranslation(),o=ge(),{ConfirmationWindow:a,setOpen:r}=be({body:i(t?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(t?.actionFn(t.record)),t?.reloadData&&t.reloadData()}});let n=!0;t.authority&&(n=o.isUserAuthorized(t.authority));let l={};t?.getActionIconStyleForRecord&&(l=t.getActionIconStyleForRecord(t.record));let s=!0;t?.isActionVisibleForRecord&&(s=t?.isActionVisibleForRecord(t.record));let p=!1;if(t?.isActionDisabledForRecord&&(p=t.isActionDisabledForRecord(t.record)),n&&s)return e.jsxs(e.Fragment,{children:[e.jsx(a,{}),e.jsx(V.GridActionsCellItem,{disabled:p,icon:e.jsx(d.Tooltip,{title:t?.label?i(t.label):"",children:e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{...l,color:p?"gray":null!=l?.color?l.color:void 0}})}),showInMenu:t?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!p){if(t?.preActionValidation&&!t.preActionValidation(t.record))return;!0===t?.isConfirmationRequired?r(!0):(await t.actionFn(t.record),!0===t?.gridActionProps?.reloadGridAfterAction&&t?.reloadData&&t.reloadData())}}})]})};let bo=-1;const go=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},xo=(e,t)=>{const i=go(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},Uo=["__check__","actions"],vo=i=>{const o=t.useSelector((e=>e.AppLayout)),{getLookupOptions:a}=(()=>{const{handleGetRequest:e}=ye(),i=t.useSelector((e=>e.AppLayout)),o=async t=>{let i=[];return await e({endPointURI:"api/v1/dev/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let t=await o(e.lookupType);return{...e,options:t,displayField:"ltr"===i.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),[r,n]=l.useState([]),{t:s}=f.useTranslation(),p=yo(i.formElements),c=[],u=l.useMemo((()=>i?.gridStateKey?go(i.gridStateKey):{}),[]);for(const e of p)!0===e?.gridProps?.hidden&&c.push(e.fieldName);let T={};if(u?.columnVisibilityModel){T=u.columnVisibilityModel;const e=Object.keys(T);for(const t of c)e.includes(t)||(T[t]=!1)}else for(const e of c)T[e]=!1;const _=t.useSelector((e=>e.AppLayout.appDirection)),[E,I]=l.useState(T),[O,N]=l.useState(u.columnOrder||[]),[y,R]=l.useState(u.columnWidths||{}),[L,h]=l.useState(u.columnGroupingModel||[]);let P=u?.pinnedColumns?.left||[];P=P.filter((e=>!Uo.includes(e)));let M=u?.pinnedColumns?.right||[]||[];M=M.filter((e=>!Uo.includes(e)));const[C,D]=l.useState({left:[..."ltr"===_?Uo:[],...P],right:[..."rtl"===_?Uo:[],...M]}),S=ge(),b=B.useNavigate(),[g,x]=l.useState(null),[F,w]=l.useState(null),[k,W]=l.useState({}),G=async()=>{let t=((t,i,o)=>{const a=[];for(const d of t)if("text"===d?.fieldType||"number"===d?.fieldType){const e={...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,type:"number"==d?.fieldType?"number":"string",field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200};a.push(e)}else if("date"===d?.fieldType){const t=(r={...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200},{...r,type:"string",renderEditCell:t=>e.jsx(rt,{sx:{width:"100%"},label:"",value:t.value,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(Je)),o},valueFormatter:(e,t,i)=>t[i.field]});a.push(t)}else if("datetime"===d?.fieldType){const e=fo({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200});a.push(e)}else if("checkbox"===d?.fieldType){const e=Oo({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,checkedValue:d?.checkedValue,unCheckedValue:d?.unCheckedValue,width:150});a.push(e)}else if("combobox"===d?.fieldType){const e=Io({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,valueField:d?.optionValueField||"value",displayField:d?.optionDisplayField||"display",options:d?.options||[],flex:1,minWidth:200});a.push(e)}else if("lookup"===d?.fieldType){const e=Io({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,lookupType:d?.lookupType,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,valueField:d?.optionValueField||"value",displayField:d?.optionDisplayField||"display",options:d?.options||[],flex:1,minWidth:200});a.push(e)}var r;return a})(p,"row"===i?.editMode?.editMode||!1,s);for(let e of t)e?.lookupType&&(e.displayField="ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",e.options=await a(e.lookupType),e.valueField="lookupValue");n(t)},[j,Y]=l.useState({ids:new Set,type:"include"});let q="id";i?.keyColumnName&&(q=i?.keyColumnName);const K=i.setData,z=v.z.object(Ro(p));let H=!0;i?.editAction?.authority&&(H=S.isUserAuthorized(i.editAction.authority));let Q=!0;i?.deleteAction?.authority&&(Q=S.isUserAuthorized(i.deleteAction.authority));const{ConfirmationWindow:Z,setOpen:$}=be({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;g&&!0===g?.isNew||(e=await i.apiActions.deleteRecordById(g[q])),e&&(i?.deleteAction?.postActionCallBack&&await i.deleteAction.postActionCallBack(g),K((e=>e.filter((e=>e[q]!=g[q])))))}});let X,J,ee,te,ie,oe;"modal"===i?.editMode?.editMode&&(X=i?.editMode?.specs?.modalHeight||"fit-content",J=i?.editMode?.specs?.modalWidth||"300",ee=i?.editMode?.specs?.modalMinHeight,te=i?.editMode?.specs?.modalMinWidth,ie=i?.editMode?.specs?.modalIcon||"window",oe=i?.editMode?.specs?.modalTitle||"Record Form");const{Window:ae,setWindowState:re}=xe({height:X,minHeight:ee,minWidth:te,onCloseCallBack:()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},width:J,windowIcon:ie,windowTitle:oe}),de={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(i?.rowActions?30*i.rowActions.length:0)+(i?.editAction&&i?.editAction?.isEnabled?30:0)+(i?.deleteAction&&i?.deleteAction?.isEnabled?30:0),getActions:t=>{const o=t.row,a=[];if("none"!=i?.editMode?.editMode&&(void 0===i?.disableDefaultAction||!i.disableDefaultAction)){const t=k[o[q]]?.mode===V.GridRowModes.Edit;if("row"===i.editMode.editMode&&t)H&&(a.push(e.jsx(V.GridActionsCellItem,{icon:e.jsx(m.FontAwesomeIcon,{icon:"save"}),label:s("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const t=e[q];W({...k,[t]:{mode:V.GridRowModes.View}})})(o)}})),a.push(e.jsx(V.GridActionsCellItem,{icon:e.jsx(m.FontAwesomeIcon,{icon:"cancel"}),label:s("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const t=e[q];t&&so(t)&&t<0?(W({...k,[t]:{mode:V.GridRowModes.View,ignoreModifications:!0}}),K((e=>{const i=e.filter((e=>e[q]!=t));return i}))):W({...k,[t]:{mode:V.GridRowModes.View,ignoreModifications:!0}})})(o)},color:"inherit"})));else{if(i?.editAction&&!0===i?.editAction?.isEnabled){let t=!0;i?.editAction?.isActionVisibleForRecord&&(t=i?.editAction?.isActionVisibleForRecord(o));let r=!1;i?.editAction?.isActionDisabledForRecord&&(r=i?.editAction?.isActionDisabledForRecord(o)),H&&t&&a.push(e.jsx(V.GridActionsCellItem,{disabled:r,icon:e.jsx(d.Tooltip,{title:s("EDIT_BTN_LABEL"),children:e.jsx(m.FontAwesomeIcon,{icon:"edit",style:{color:r?"gray":void 0}})}),showInMenu:i?.editAction?.gridActionProps?.showInMenu||!1,label:s("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{H&&!r&&(async e=>{if(e)if(w(e),"form"===i.editMode.editMode)b(i.editMode.specs.formRoute+"/"+e[q]);else if("modal"===i.editMode.editMode)re(!0);else if("row"===i?.editMode?.editMode){const t=e[q];W({...k,[t]:{mode:V.GridRowModes.Edit}})}})(o)}}))}if(i?.deleteAction&&!0===i?.deleteAction?.isEnabled){let t=!0;i?.deleteAction?.isActionVisibleForRecord&&(t=i?.deleteAction?.isActionVisibleForRecord(o));let r=!1;i?.deleteAction?.isActionDisabledForRecord&&(r=i?.deleteAction?.isActionDisabledForRecord(o)),Q&&t&&a.push(e.jsx(V.GridActionsCellItem,{disabled:r,icon:e.jsx(d.Tooltip,{title:s("DELETE_BTN_LABEL"),children:e.jsx(m.FontAwesomeIcon,{icon:"trash",style:{color:r?"gray":void 0}})}),showInMenu:i?.deleteAction?.gridActionProps?.showInMenu||!1,label:s("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(Q&&!r){if(i?.deleteAction?.preActionValidation&&!i.deleteAction.preActionValidation(o))return;x(o),$(!0)}}}))}}}if(i?.rowActions)for(const t of i.rowActions)t?.gridActionProps?.multiRecord&&!0===t?.gridActionProps?.multiRecord||a.push(e.jsx(So,{...t,record:o,reloadData:async()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)}}));return a}};let ne=[];(void 0===i?.disableDefaultAction||!i.disableDefaultAction||i?.rowActions&&i?.rowActions.length>0)&&ne.push(de),ne=[...ne,...r];l.useEffect((()=>{void 0!==i?.autoLoad&&!0!==i.autoLoad||i.apiActions.reloadData(i?.gridLoadParametersValues),G()}),[]),l.useEffect((()=>{G()}),[_,i.formElements]);const le=l.useMemo((()=>{const e=ne.map((e=>({...e,width:y[e.field]||e.width})));if(O.length){const t=new Map(e.map((e=>[e.field,e])));return O.map((e=>t.get(e))).filter(Boolean)}return e}),[O,y,ne]);return e.jsxs(e.Fragment,{children:[e.jsx(Z,{}),"modal"===i?.editMode?.editMode?e.jsx(ae,{children:i?.editMode?.specs?.formComponent?e.jsx(i.editMode.specs.formComponent,{recordIdToEdit:F?F[q]:void 0,formCloseCallBk:()=>{re(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)}}):e.jsx(Lo,{formLoadCallBk:i.formLoadCallBk,recordIdToEdit:F?F[q]:void 0,formCloseCallBk:()=>{re(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)},elements:i.formElements,apiActions:i.apiActions,editAuthorityKey:i?.editAction?.authority,formSavedSuccessfullyCallBk:i?.editAction?.postActionCallBack,preSaveValidation:i?.editAction?.preActionValidation,actions:i?.rowActions})}):e.jsx(e.Fragment,{}),void 0!==i?.hideInfoBar||i?.hideInfoBar?e.jsx(e.Fragment,{}):e.jsxs(d.Box,{sx:{display:"flex"},children:[void 0!==i?.hideBackButton||i?.hideBackButton?e.jsx(e.Fragment,{}):e.jsx(d.IconButton,{onClick:()=>{b(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),e.jsxs(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[i?.girdIcon?e.jsx(m.FontAwesomeIcon,{icon:i.girdIcon,style:{marginRight:5,marginLeft:5}}):e.jsx(e.Fragment,{}),e.jsx(d.Typography,{variant:"h5",children:i?.gridTitle?co(s(i?.gridTitle)):""})]})]}),i?.gridLoadParameters&&i?.gridLoadParameters.length>0&&i?.gridLoadParametersValues&&i?.setGridLoadParametersValues?e.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[e.jsx(d.AccordionSummary,{expandIcon:e.jsx(V.GridExpandMoreIcon,{}),children:e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),e.jsx(d.Typography,{component:"span",children:"Filters"})]})}),e.jsx(d.AccordionDetails,{children:e.jsx(d.Box,{children:e.jsx(Lo,{saveButtonSpecs:{label:s("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:s("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?i.setGridLoadParametersValues(e):i.setGridLoadParametersValues({}),i.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:i.gridLoadParameters})})})]}):e.jsx(e.Fragment,{}),e.jsx(V.DataGridPremium,{...i?.muiProps,slots:{toolbar:Do},slotProps:{toolbar:{templateProps:{...i,rowSelectionModel:j,data:i?.data},handleCreateNewRecord:()=>{if("form"===i?.editMode?.editMode)b(i.editMode.specs.formRoute);else if("modal"===i?.editMode?.editMode)w(null),re(!0);else if("row"===i?.editMode?.editMode){bo-=1;const e={};e[q]=bo,e.isNew=!0;for(const t of r)"actions"!=t?.type&&t?.field!=q&&t?.field&&(e[t.field]=null);K((t=>[e,...t])),W((e=>({...e,[bo]:{mode:V.GridRowModes.Edit}})))}},clearGridState:()=>{i?.gridStateKey&&localStorage.removeItem(i.gridStateKey),I({}),N([]),R({}),h([]),D({left:[..."ltr"===_?Uo:[]],right:[..."rtl"===_?Uo:[]]})}}},getRowId:e=>e[q],showToolbar:!0,rows:i?.data,columns:le,checkboxSelection:!0,editMode:"row",rowModesModel:"row"==i.editMode.editMode?k:void 0,onRowModesModelChange:"row"==i.editMode.editMode?e=>{W(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async t=>{if("row"===i.editMode.editMode){let o=null;const a=(e=>{try{z.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof v.z.ZodError?e.errors.map((e=>"Error in field ("+e.path+") : "+e.message)).join(","):"invalid record data",t}})(t);if(a){const t=a.split(",");throw A.toast.error(e.jsx("div",{style:{},children:t.map((t=>e.jsxs(e.Fragment,{children:[e.jsx("div",{children:t}),e.jsx(d.Divider,{})]})))})),new Error(a)}if(i?.editAction?.preActionValidation&&!i.editAction.preActionValidation(t))throw new Error("error on the configured presave validation");const r={...t};if(t[q]&&so(t[q])&&Number(t[q])<0&&(r[q]=null),o=await i.apiActions.saveRecord(r),null==o)throw new Error("Failed to process your request, contact your administrator");return i?.editAction?.postActionCallBack&&await i.editAction.postActionCallBack(t),!0===t?.isNew&&K((e=>{const i=e.filter((e=>e[q]!==t[q]));return[o,...i]})),!0===i?.editMode?.reloadAfterSave&&i?.apiActions?.reloadData&&i?.apiActions?.reloadData(i?.gridLoadParametersValues),o}},rowSelectionModel:j,onRowSelectionModelChange:e=>{Y(e)},columnVisibilityModel:E,onColumnVisibilityModelChange:e=>{I(e),i?.gridStateKey&&xo(i.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:o}=e;N((e=>{const a=e.length?[...e]:ne.map((e=>e.field)),r=a.indexOf(t.field);return-1===r||(a.splice(r,1),a.splice(o,0,t.field),i?.gridStateKey&&xo(i.gridStateKey,{columnOrder:a})),a}))},onColumnWidthChange:e=>{const t={...y,[e.colDef.field]:e.width};R(t),i?.gridStateKey&&xo(i.gridStateKey,{columnWidths:t})},rowGroupingModel:L,onRowGroupingModelChange:e=>{(e=>{h(e),i?.gridStateKey&&xo(i.gridStateKey,{columnGroupingModel:e})})(e)},pinnedColumns:C,onPinnedColumnsChange:e=>{let t=e?.left||[];t=t.filter((e=>!Uo.includes(e)));let o=e?.right||[];o=o.filter((e=>!Uo.includes(e)));const a={left:[..."ltr"===_?Uo:[],...t],right:[..."rtl"===_?Uo:[],...o]};D(a),i?.gridStateKey&&xo(i.gridStateKey,{pinnedColumns:a})},sx:{width:"100%"}})]})},Fo=i=>{const{UserSession:o}=ge(),a=t.useSelector((e=>e.AppLayout)),r=t.useDispatch(),{handlePostRequest:n}=ye(),[s,p]=l.useState(o.value.currentOrganization.id);return e.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[e.jsx(Xe,{sx:{width:"100%"},displayField:"ltr"===a.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:s,onChangeCallBack:e=>{p(e)}}),e.jsx(d.Button,{sx:{m:1},variant:"contained",disabled:null==s||s===o.value.currentOrganization.id,onClick:async()=>{await n({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:s},data:{},successCallBkFn:e=>{const t={...e.data,isAuthenticated:!0};r(Le.setAuthenticated(t)),i.successChangeCallBackFn&&i.successChangeCallBackFn()}})},children:"Change Organization"})]})},wo=T.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Bo,setSideBarState:ko}=wo.actions;var Wo=wo.reducer;const Go=d.styled(c,{shouldForwardProp:e=>"open"!==e})((({theme:e})=>{const i=t.useSelector((e=>e.AppLayout)),o=ce();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:o?void 0:"calc(100% - 350px)",marginLeft:o||"ltr"!==i.appDirection?void 0:"350px",marginRight:o||"rtl"!==i.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}})),jo=()=>{const{Window:i,setWindowState:o}=xe({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),a=t.useSelector((e=>e.AppInfo.value)),r=t.useSelector((e=>e.AppLayout)),n=t.useSelector((e=>e.SideBar)),{UserSession:l}=ge(),s=l.value.currentOrganization,{handleGetRequest:p}=ye(),c=ce(),T=t.useDispatch();return e.jsxs(e.Fragment,{children:[e.jsx(i,{children:e.jsx(Fo,{successChangeCallBackFn:()=>{o(!1)}})}),e.jsx(Go,{position:"fixed",open:n.isOpened,children:e.jsxs(u,{children:[e.jsx(d.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{T(Bo())},edge:"start",sx:[{mr:"ltr"===r.appDirection?2:void 0,ml:"rtl"===r.appDirection?2:void 0},n.isOpened&&{display:"none"}],children:e.jsx(m.FontAwesomeIcon,{icon:"bars"})}),e.jsx(d.Avatar,{src:a.appLogo,sx:{marginRight:1,marginLeft:1}}),e.jsx(d.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:c?"":`${a.appName} - ${"ltr"===r.appDirection?s?.organizationEnName:s?.organizationArName}`}),e.jsx(d.Tooltip,{title:"light"===r.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:e.jsx(d.IconButton,{color:"inherit",onClick:()=>{T(Ae.setThemeMode("light"===r.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===r.themeMode?"dark":"light")},children:"light"===r.themeMode?e.jsx(m.FontAwesomeIcon,{icon:"moon"}):e.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),e.jsx(d.Tooltip,{title:"ar"===E.language?"Change Language To English":"Change Language To Arabic",children:e.jsx(d.IconButton,{color:"inherit",onClick:()=>{let e="ar"===E.language?"en":"ar";var t;t=e,E.changeLanguage(t),localStorage.setItem("language",t),T(Ae.setAppDirection("ar"===e?"rtl":"ltr"))},children:e.jsx(m.FontAwesomeIcon,{icon:"language"})})}),l.value?.userOrganizations&&l.value?.userOrganizations.length>1?e.jsx(d.Tooltip,{title:"Change Current Organization",children:e.jsx(d.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:e.jsx(m.FontAwesomeIcon,{icon:"globe"})})}):e.jsx(e.Fragment,{}),e.jsx(d.Avatar,{}),e.jsx("div",{style:{marginLeft:5,marginRight:5},children:c?"":l.value?.username}),e.jsx(d.IconButton,{color:"inherit",onClick:async()=>{try{await p({endPointURI:"api/auth/logout"})}catch(e){console.log("logout error",e)}T(Le.setUnAuthenticated())},children:e.jsx(m.FontAwesomeIcon,{rotation:"rtl"===r.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},Vo=d.styled("div")((({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"}))),Yo=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=Yo(e,i.children);if(t)return t}}},qo=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"development_admin.organization",label:"ORGANIZATION_PLURAL",authority:"DEVELOPMENT_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"DEVELOPMENT_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"system_admin.Person",label:"PERSON_PLURAL",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",icon:"code",children:[{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function Ko(){return e.jsx(S,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const zo=s.styled($.TreeItem2Root)((({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${Q.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})}))),Ho=s.styled($.TreeItem2Content)((({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:s.alpha(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}}))),Qo=K.animated(z);function Zo(t){const i=K.useSpring({to:{opacity:t.in?1:0,transform:`translate3d(0,${t.in?0:20}px,0)`}});return e.jsx(Qo,{style:i,...t})}const $o=s.styled(D)({color:"inherit",fontWeight:500});function Xo({icon:i,expandable:o,children:a,...r}){const{t:d}=f.useTranslation(),n=t.useSelector((e=>e.AppLayout));return e.jsxs($.TreeItem2Label,{...r,sx:{display:"flex",alignItems:"center",padding:1},children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:"ltr"===n.appDirection?7:void 0,marginLeft:"rtl"===n.appDirection?7:void 0,fontSize:"1.2rem"},icon:i}),e.jsx($o,{variant:"body2",sx:{fontSize:16},children:d(a)}),o&&e.jsx(Ko,{})]})}const Jo=e=>Array.isArray(e)?e.length>0&&e.some(Jo):Boolean(e),ea=se.forwardRef((function(t,i){const{id:o,itemId:a,label:r,disabled:d,children:n,...l}=t,{getRootProps:s,getContentProps:p,getIconContainerProps:c,getCheckboxProps:u,getLabelProps:m,getGroupTransitionProps:T,getDragAndDropOverlayProps:A,status:_,publicAPI:E}=Z.useTreeItem2({id:o,itemId:a,children:n,label:r,disabled:d,rootRef:i}),f=E.getItem(a),I=Jo(n);return e.jsx(J.TreeItem2Provider,{itemId:a,children:e.jsxs(zo,{...s(l),children:[e.jsxs(Ho,{...p({className:ro("content",{"Mui-expanded":_.expanded,"Mui-selected":_.selected,"Mui-focused":_.focused,"Mui-disabled":_.disabled})}),children:[e.jsx($.TreeItem2IconContainer,{...c(),children:e.jsx(X.TreeItem2Icon,{status:_})}),e.jsx($.TreeItem2Checkbox,{...u()}),e.jsx(Xo,{...m({icon:f?.icon||"book",expandable:I&&_.expanded})}),e.jsx(ee.TreeItem2DragAndDropOverlay,{...A()})]}),n&&e.jsx(Zo,{...T()})]})})}));function ta(){const i=B.useNavigate(),o=t.useSelector((e=>e.AppLayout)),a=t.useSelector((e=>e.AppInfo.value));t.useDispatch();const r=ce(),{isUserAuthorized:d}=ge(),n=e=>e.filter((e=>void 0===e.authority||null==e.authority||d(e.authority))).map((e=>(e.children&&(e.children=n(e.children)),e))),l=[];a.enableAdministrationModule&&l.push(...qo),l.push(...a.businessNavigationItems);const s=n(l);return e.jsx(H.RichTreeView,{items:s,onItemClick:(e,t)=>{const o=Yo(t,l);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||i(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:ue,direction:o.appDirection,maxHeight:r?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:ea}})}const ia=()=>{const i=t.useSelector((e=>e.AppInfo.value)),{UserSession:o}=ge(),a=o.value.currentOrganization,r=d.useTheme(),n=t.useSelector((e=>e.AppLayout)),l=t.useSelector((e=>e.SideBar)),s=t.useDispatch();return e.jsxs(q,{sx:{width:ue,flexShrink:0,"& .MuiDrawer-paper":{width:ue,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===n.appDirection?"left":"right",open:l.isOpened,children:[e.jsxs(Vo,{children:[e.jsxs(d.Box,{sx:{width:"100%"},children:[e.jsx(d.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[e.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${i.appName} - ${"ltr"===n.appDirection?a?.organizationEnName:a?.organizationArName}`}),e.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",i.appVersion]})]})]}),e.jsx(Y,{onClick:()=>{s(Bo())},children:"ltr"===r.direction?e.jsx(m.FontAwesomeIcon,{icon:"angle-left"}):e.jsx(m.FontAwesomeIcon,{icon:"angle-right"})})]}),e.jsx(P,{}),e.jsx(ta,{})]})},oa=oe({key:"muirtl",stylisPlugins:[ie.prefixer,te]}),aa=oe({key:"mui"}),ra=t=>{const[i,o]=l.useState(!0),[a,r]=l.useState([]),{handleGetRequest:n}=ye();l.useEffect((()=>{(async()=>{o(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:t.dataQueryId,...t.parameterValues},successCallBkFn:e=>{o(!1),r(e.data)},failureCallBkFn:()=>{o(!1),r(null)}})})()}),[t.parameterValues]);let s=0;if(1==a.length&&(s=100),"CircularProgress"===t.widgetType||"LinearProgress"===t.widgetType)for(const e of a)s+=e[t.verticalAxisField];return e.jsxs(e.Fragment,{children:["LineChart"===t.widgetType||"PieChart"===t.widgetType||"ColumnChart"===t.widgetType?e.jsxs(d.Box,{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:t?.icon||"chart-pie"}),t?.title]}):e.jsx(e.Fragment,{}),e.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:i?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),e.jsx("div",{children:"Loading"})]}):"ColumnChart"===t.widgetType?e.jsx(Ye,{data:a,widgetTitle:t.title,labelField:t.verticalAxisField,valueField:t.horizontalAxisField,valueLabel:t.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===t.widgetType?e.jsx(ze,{data:a,widgetTitle:t.title,labelField:t.verticalAxisField,valueField:t.horizontalAxisField,valueLabel:t.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===t.widgetType?e.jsx(Ze,{data:a,widgetTitle:t.title,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,widgetType:"Line"}):e.jsxs(d.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[e.jsx(d.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:t.title}),a.map(((i,o)=>"Card"===t.widgetType?e.jsx(d.Grid2,{size:{md:3,xs:12},children:e.jsx(qe,{widgetTitle:"",record:i,labelField:t.verticalAxisField,valueField:t.horizontalAxisField},o)}):"CircularProgress"===t.widgetType?e.jsx(d.Grid2,{size:{md:3,xs:12},children:e.jsx(Ke,{widgetTitle:"",record:i,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,total:s},o)}):"LinearProgress"===t.widgetType?e.jsx(d.Grid2,{size:{md:3,xs:12},children:e.jsx(Qe,{widgetTitle:"",record:i,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,total:s},o)}):void 0))]})})]})},da=t=>{const[i,o]=l.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),[a,r]=l.useState(t?.parameters||{}),n=B.useNavigate(),{handleGetRequest:s,handlePostRequest:p}=ye();return l.useEffect((()=>{t.dashboardCode&&(async()=>{await s({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:t.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()}),[t.dashboardCode,t.parameters]),e.jsx(e.Fragment,{children:i?e.jsxs(e.Fragment,{children:[e.jsxs(d.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(d.IconButton,{onClick:()=>{n(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),e.jsx(d.Box,{sx:{flex:1}}),e.jsx(m.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),e.jsx(d.Box,{children:i?.dashboardTitle}),e.jsx(d.Box,{sx:{flex:1}})]}),e.jsx(d.Grid2,{container:!0,spacing:1,sx:{flexGrow:1,overflowY:"auto",padding:1},children:i?.widgets.map(((t,i)=>e.jsx(d.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=t.widgetType?"column":void 0,height:t?.height||300},size:{md:t?.width,sm:12},children:e.jsx(ra,{...t})},i)))})]}):e.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},na=t=>{const{t:i}=f.useTranslation(),{handleGetRequest:o}=ye(),[a,r]=l.useState([]),d=ke({findAll:"api/v1/admin/organizationapplicationmodule/all",deleteById:"api/v1/admin/organizationapplicationmodule",save:"api/v1/admin/organizationapplicationmodule",findById:"api/v1/admin/organizationapplicationmodule",setData:r}),[n,s]=l.useState([]);l.useEffect((()=>{(async()=>{await o({endPointURI:"api/v1/admin/systemapplicationmodule/all",showMask:!0,successCallBkFn:e=>{s(e.data)}})})()}),[]);const p=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:d,data:a,gridLoadParametersValues:{organizationId:t?.selectedOrganization?.id},hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT",preActionValidation:async e=>(e.organizationId=t?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},la=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=ke({findAll:"api/v1/admin/organizationunittype/all",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:a});return e.jsx(vo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{organizationId:t?.selectedOrganization?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT",preActionValidation:async e=>(e.organizationId=t?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},sa=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=ke({findAll:"api/v1/admin/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:a}),[d,n]=l.useState([]),{handleGetRequest:s}=ye();l.useEffect((()=>{(async()=>{await s({endPointURI:"api/v1/admin/organizationunittype/all",showMask:!0,parameters:{organizationId:t.selectedOrganization.id},successCallBkFn:e=>{n(e.data)}})})()}),[]);const p=[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{organizationId:t?.selectedOrganization?.id},setData:a,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",preActionValidation:async e=>(e.organizationId=t?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},pa=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=ke({findAll:"api/v1/admin/organizationrank/all",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:a});return e.jsx(vo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{organizationId:t?.selectedOrganization?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",preActionValidation:async e=>(e.organizationId=t?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},ca=t=>{const[i,o]=l.useState([]),[a,r]=l.useState([]),{handlePostRequest:n,handleGetRequest:s}=ye();l.useEffect((()=>{t.selectedRecord&&(async()=>{await s({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:t.selectedRecord.id,organizationId:t.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),r(e.data.availableRoles)}})})()}),[t.selectedRecord]);return e.jsxs(e.Fragment,{children:[e.jsx(Ve,{displayField:"appRoleDisplay",options:a,valueField:"id",selectedOptions:i,setSelection:o}),e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[e.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:t.selectedRecord.id},data:i,successCallBkFn:()=>{A.toast.success("Your request has been proccesed successfully"),t.closeModalFn&&t.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),e.jsx(d.Button,{variant:"contained",color:"error",onClick:t.closeModalFn,children:"Cancel"})]})]})},ua=i=>{const[o,a]=l.useState(null),{Window:r,setWindowState:d}=xe({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),n=t.useSelector((e=>e.commonStores.stores.SystemOrganizations.data)),s=t.useSelector((e=>e.commonStores.stores.SystemOrganizationRanks.data)),p=t.useSelector((e=>e.commonStores.stores.SystemOrganizationUnits.data)),{t:c}=f.useTranslation(),[u,m]=l.useState([]),T=ke({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:m}),A=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(ca,{selectedRecord:o,closeModalFn:()=>{d(!1)}})}),e.jsx(vo,{apiActions:T,hideInfoBar:!0,data:u,setData:m,editMode:{editMode:"row"},formElements:A,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{a(e),d(!0)}}],gridLoadParametersValues:{personId:i.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async e=>(e.personId=i.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},ma=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=ke({findAll:"api/v1/admin/systemapplicationmodule/application/all",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:a});return e.jsx(vo,{apiActions:r,data:o,gridLoadParametersValues:{applicationId:t?.selectedApplication?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT",preActionValidation:async e=>(e.systemApplicationId=t?.selectedApplication?.id,!0)},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},Ta=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=ke({findAll:"api/v1/admin/systemapplicationauthority/all",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:a}),[d,n]=l.useState([]),{handleGetRequest:s}=ye();l.useEffect((()=>{(async()=>{await s({endPointURI:"api/v1/admin/systemapplicationmodule/application/all",showMask:!0,parameters:{applicationId:t.selectedApplication.id},successCallBkFn:e=>{n(e.data)}})})()}),[]);const p=[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{applicationId:t?.selectedApplication?.id},setData:a,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT",preActionValidation:async e=>(e.systemApplicationId=t?.selectedApplication?.id,!0)},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},Aa=t=>{const[i,o]=l.useState([]),[a,r]=l.useState([]),{handlePostRequest:n,handleGetRequest:s}=ye();l.useEffect((()=>{t.roleId&&t.appId&&(async()=>{await s({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{appId:t.appId,roleId:t.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()}),[t.roleId,t.appId]);return e.jsxs(e.Fragment,{children:[e.jsx(Ve,{displayField:"authorityName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[e.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:t.roleId},data:i,successCallBkFn:()=>{A.toast.success("Your request has been proccesed successfully"),t.closeModalFn&&t.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),e.jsx(d.Button,{variant:"contained",color:"error",onClick:t.closeModalFn,children:"Cancel"})]})]})},_a=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),[r,d]=l.useState(null),{Window:n,setWindowState:s}=xe({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),p=ke({findAll:"api/v1/admin/systemapplicationrole/all",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:a});return e.jsxs(e.Fragment,{children:[e.jsx(n,{children:e.jsx(Aa,{appId:t.selectedApplication.id,roleId:r?.id,closeModalFn:()=>{s(!1)}})}),e.jsx(vo,{apiActions:p,data:o,hideInfoBar:!0,gridLoadParametersValues:{applicationId:t?.selectedApplication?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{d(e),s(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT",preActionValidation:async e=>(e.systemApplicationId=t?.selectedApplication?.id,!0)},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Ea=i=>{const o=t.useSelector((e=>e.commonStores.stores.SystemOrganizations.data)),{t:a}=f.useTranslation(),[r,d]=l.useState([]),n=ke({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:o,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return e.jsx(vo,{apiActions:n,data:r,setData:d,hideInfoBar:!0,gridLoadParametersValues:{systemApplicationId:i.selectedApplication.id},editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:a("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT",preActionValidation:e=>(e.systemApplicationId=i.selectedApplication.id,!0)},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},fa=i=>{const o=t.useSelector((e=>e.commonStores.stores.SystemEntityParameters.data)),{t:a}=f.useTranslation(),[r,d]=l.useState([]),n=ke({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:n,data:r,setData:d,editMode:{editMode:"row"},hideInfoBar:!0,formElements:s,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:i.selectedRecord.id},gridTitle:a("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async e=>(e.dataQueryId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},Ia=i=>{const{t:o}=f.useTranslation(),a=t.useSelector((e=>e.commonStores.stores.SystemEntityParameters.data)),[r,d]=l.useState([]),n=ke({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return e.jsx(vo,{apiActions:n,data:r,hideInfoBar:!0,setData:d,gridLoadParametersValues:{reportId:i.selectedRecord.id},editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async e=>(e.reportId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Oa=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return console.log("formElements",t),t},Na=t=>(console.log("reportdata",t.reportData),e.jsx(vo,{data:t.reportData,disableDefaultAction:!0,setData:t.setReportData,formElements:Oa(t.reportData),gridLoadParameters:t.gridLoadParameters,gridLoadParametersValues:t.gridLoadParametersValues,setGridLoadParametersValues:t.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{t.reloadReport()},saveRecord:async()=>{}}})),ya=t=>{const[i,o]=l.useState(null),[a,r]=l.useState(null),[n,s]=l.useState([]),[p,c]=l.useState("WAITING_REPORT_CODE"),{handleGetRequest:u,handlePostRequest:T,HandleDownloadHTTPPostPDF:A}=ye(),[_,E]=l.useState(null),[I,O]=l.useState({...t?.reportParametersValues}),[N,y]=l.useState([]),{t:R}=f.useTranslation(),L=e=>{const t=[];for(const i of e){const e={type:"field",mode:"props",props:{fieldLabel:i?.parameterLabel,fieldName:i?.parameterCode,fieldType:i?.parameterType,hidden:i?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:i?.mandatory,defaultValue:I[i?.parameterCode]||i?.defaultValue}};t.push(e)}return t},h=async(e,i)=>{c("WAITING_RESULT"),"Excel"===e?.reportType?await T({endPointURI:"api/v1/dev/report/run",showMask:!0,data:{reportCode:t.reportCode,parameters:i,resultMode:t.resultMode,jasperOutPutFileType:t.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),s(e.data)}}):e?.reportType&&await A({endPointURI:"api/v1/dev/report/run",showMask:!0,data:{reportCode:t.reportCode,parameters:i,resultMode:t.resultMode,jasperOutPutFileType:t.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}console.log(e)},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),c("ERROR")}})};return l.useEffect((()=>{t?.reportCode&&(async()=>{c("LOADING_METADATA"),await u({endPointURI:"api/v1/dev/report/metadata",showMask:!0,parameters:{reportCode:t.reportCode},successCallBkFn:e=>{E(e.data),y(L(e.data.reportParameters)),!0===t?.byPassParameterEntry||0==e.data.reportParameters.length?(h(e.data,I),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()}),[t.reportCode,t.byPassParameterEntry,t.reportParametersValues,t.jasperOutPutFileType,t.resultMode]),e.jsxs(e.Fragment,{children:[e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[e.jsxs(d.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[e.jsx(m.FontAwesomeIcon,{icon:"Excel"===_?.reportType?"file-excel":"file-pdf",color:"Excel"===_?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),_?.reportName]}),"Excel"!=_?.reportType&&"SHOWING_RESULT"===p?e.jsxs(e.Fragment,{children:[!0===t?.byPassParameterEntry?e.jsx(e.Fragment,{}):N.length>0?e.jsx(d.IconButton,{onClick:()=>{y(L(_.reportParameters)),c("WAITING_PARAMETER_INPUT")},children:e.jsx(m.FontAwesomeIcon,{icon:"filter"})}):e.jsx(e.Fragment,{}),e.jsx(d.IconButton,{children:e.jsx(m.FontAwesomeIcon,{icon:"refresh",onClick:()=>{h(_,I)}})})]}):e.jsx(e.Fragment,{})]}),e.jsx(d.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=_?.reportType?e.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},expanded:!0,children:[e.jsx(d.AccordionSummary,{children:e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),e.jsx(d.Typography,{component:"span",children:"Filters"})]})}),e.jsx(d.AccordionDetails,{children:e.jsx(d.Box,{children:e.jsx(Lo,{saveButtonSpecs:{label:R("SHOW_REPORT_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success",hidden:!0},cancelButtonSpecs:{label:R("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{O(null!=e?e:{}),h(_,e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:N})})})]}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===_?.reportType?"Excel"===_?.reportType?e.jsx(Na,{reportData:n,setReportData:s,reloadReport:async()=>{h(_,I)},gridLoadParameters:N,gridLoadParametersValues:I,setGridLoadParametersValues:O}):e.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?e.jsxs(d.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),a]}):e.jsx(e.Fragment,{})})]})},Ra={Blueprint:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!0,isVisible:!0},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!1,isVisible:!1},reportJasperPath:{isMandatory:!1,isVisible:!1}},Jasper:{useSysDatasource:{isMandatory:!1,isVisible:!0},datasourceConId:{isMandatory:!1,isVisible:!0},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!0,isVisible:!0},reportJasperPath:{isMandatory:!0,isVisible:!0}},Excel:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!0,isVisible:!0},reportJasperName:{isMandatory:!1,isVisible:!1},reportJasperPath:{isMandatory:!1,isVisible:!1}}},La=(e,t,i)=>{if(e&&Ra[e]){const o=Ra[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportBluePrintId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportJasperPath"),i.setValue("useSysDatasource",null),i.setValue("datasourceConId",null),i.setValue("reportBluePrintId",null),i.setValue("reportExcelDataQueryId",null),i.setValue("reportJasperName",null),i.setValue("reportJasperPath",null)},ha=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=ke({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:a});return e.jsx(vo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:t.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:e=>e?.recipientMail&&!uo(e.recipientMail)?(A.toast.error("You must enter a valid email address"),!1):(e.mailTemplateId=t.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Pa=i=>{const{t:o}=f.useTranslation(),[a,r]=l.useState([]),d=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),n=ke({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:r}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"html"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return e.jsx(vo,{apiActions:n,data:a,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:i.selectedRecord.id},setData:r,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:s,keyColumnName:"id",gridTitle:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async e=>(e.mailTemplateId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},Ma=i=>{const o=t.useSelector((e=>e.commonStores.stores.SystemReports.data)),{t:a}=f.useTranslation(),[r,d]=l.useState([]),n=ke({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return e.jsx(vo,{apiActions:n,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:i.selectedRecord.id},setData:d,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:a("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:e=>(e.mailTemplateId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},Ca={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},Da=(e,t,i)=>{if(e&&Ca[e]){const o=Ca[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},Sa=i=>{const{t:o}=f.useTranslation(),[a,r]=l.useState([]),d=ke({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:r}),n=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:d,data:a,setData:r,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:i.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:s,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:e=>(e.workflowDocumentId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},ba=i=>{const{t:o}=f.useTranslation(),[a,r]=l.useState([]),d=ke({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:r}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:t.useSelector((e=>e.commonStores.stores.SystemMailTemplates.data)),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:d,data:a,hideInfoBar:!0,gridLoadParametersValues:{actionId:i.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:e=>(e.documentActionId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},ga=t=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=xe({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:d}=f.useTranslation(),{handleGetRequest:n}=ye(),[s,p]=l.useState([]);l.useEffect((()=>{(async()=>{await n({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:t.selectedRecord.id},successCallBkFn:e=>{p(e.data)}})})()}),[t.selectedRecord]);const[c,u]=l.useState([]),m=ke({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:s,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(ba,{selectedRecord:i})}),e.jsx(vo,{apiActions:m,data:c,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:t.selectedRecord.id},setData:u,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{o(e),r(!0)}}],formElements:T,keyColumnName:"id",gridTitle:d("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:e=>(e.workflowDocumentId=t.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},xa={LineChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},ColumnChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},PieChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},Card:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},CircularProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},LinearProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}}},Ua=(e,t,i)=>{if(e&&xa[e]){const o=xa[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("height"),i.setValue("height",null),t.hideField("width"),i.setValue("width",null),t.hideField("horizontalAxisField"),i.setValue("horizontalAxisField",null),t.hideField("horizontalAxisLabel"),i.setValue("horizontalAxisLabel",null),t.hideField("seriesKeys"),i.setValue("seriesKeys",null),t.hideField("verticalAxisField"),i.setValue("verticalAxisField",null),t.hideField("verticalAxisLabel"),i.setValue("verticalAxisLabel",null)},va=i=>{const{t:o}=f.useTranslation(),[a,r]=l.useState([]),d=t.useSelector((e=>e.commonStores.stores.SystemWidgets.data)),n=ke({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:r}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:n,data:a,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:s,gridLoadParametersValues:{dashboardId:i.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async e=>(e.dashboardId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Fa=[{path:"/",component:()=>e.jsx(da,{dashboardCode:"XX_TEMPLATE_DASHBOARD"})},...[...[{path:"admin/organizations",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=ke({findAll:"api/v1/admin/organization/all",deleteById:"api/v1/admin/organization",save:"api/v1/admin/organization",findById:"api/v1/admin/organization",setData:o}),{Window:r,setWindowState:d}=xe({windowTitle:"Organization Subscriped Application Modules",windowIcon:"layer-group"}),{Window:n,setWindowState:s}=xe({windowTitle:"Organization Unit Types",windowIcon:"tags"}),{Window:p,setWindowState:c}=xe({windowTitle:"Organization Units",windowIcon:"folder-tree"}),{Window:u,setWindowState:m}=xe({windowTitle:"Organization Ranks",windowIcon:"street-view"}),[T,A]=l.useState(null);return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(na,{selectedOrganization:T})}),e.jsx(n,{children:e.jsx(la,{selectedOrganization:T})}),e.jsx(p,{children:e.jsx(sa,{selectedOrganization:T})}),e.jsx(u,{children:e.jsx(pa,{selectedOrganization:T})}),e.jsx(vo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},rowActions:[{icon:"layer-group",actionFn:async e=>{A(e),d(!0)},label:"modules"},{icon:"tags",actionFn:async e=>{A(e),s(!0)},label:"Organization Unit Types"},{icon:"folder-tree",actionFn:async e=>{A(e),c(!0)},label:"Organization Units"},{icon:"street-view",actionFn:async e=>{A(e),m(!0)},label:"Organization Ranks"}],formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Status",fieldName:"status",fieldType:"lookup",lookupType:"STATUS"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})]})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:ua,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=ke({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return e.jsx(vo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:pa,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:sa,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:la,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState(null),[a,r]=l.useState([]),d=ke({findAll:"api/v1/admin/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:r}),{Window:n,setWindowState:s}=xe({windowTitle:"Organizations Membership",windowIcon:"globe"});return e.jsxs(e.Fragment,{children:[e.jsx(n,{children:e.jsx(ua,{selectedPerson:i})}),e.jsx(vo,{apiActions:d,data:a,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"globe",label:"User Organizations",actionFn:async e=>{o(e),s(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(A.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(A.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=ke({findAll:"api/v1/admin/systemapplication/all",deleteById:"api/v1/admin/systemapplication",save:"api/v1/admin/systemapplication",findById:"api/v1/admin/systemapplication",setData:o}),{Window:r,setWindowState:d}=xe({windowTitle:"System Application Modules",windowIcon:"layer-group"}),{Window:n,setWindowState:s}=xe({windowTitle:"System Application Authorities",windowIcon:"key"}),{Window:p,setWindowState:c}=xe({windowTitle:"System Application Roles",windowIcon:"tag"}),{Window:u,setWindowState:m}=xe({windowTitle:"System Application Lookups",windowIcon:"list-check"}),[T,A]=l.useState(null);return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(ma,{selectedApplication:T})}),e.jsx(n,{children:e.jsx(Ta,{selectedApplication:T})}),e.jsx(p,{children:e.jsx(_a,{selectedApplication:T})}),e.jsx(u,{children:e.jsx(Ea,{selectedApplication:T})}),e.jsx(vo,{apiActions:a,rowActions:[{icon:"layer-group",actionFn:async e=>{A(e),d(!0)},label:"modules"},{icon:"key",actionFn:async e=>{A(e),s(!0)},label:"Authorities"},{icon:"tag",actionFn:async e=>{A(e),c(!0)},label:"Roles"},{icon:"list-check",actionFn:async e=>{A(e),m(!0)},label:"Lookups"}],data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})]})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:Ta,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:ma,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:_a,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=ke({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return e.jsx(vo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"}],...[{path:"dev/blueprints",component:()=>{const{t:i}=f.useTranslation(),o=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),[a,r]=l.useState([]),d=ke({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}}];return e.jsx(vo,{apiActions:d,data:a,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:n,keyColumnName:"id",gridTitle:i("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=xe({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),d=t.useSelector((e=>e.commonStores.stores.SystemDataSources.data)),{t:n}=f.useTranslation(),[s,p]=l.useState([]),c=ke({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:p}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:d,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(fa,{selectedRecord:i})}),e.jsx(vo,{apiActions:c,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),r(!0)},icon:"p"}],data:s,setData:p,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:u,keyColumnName:"id",gridTitle:n("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:i}=ye(),o=t.useSelector((e=>e.commonStores.stores.SystemDataSourceType.data)),{t:a}=f.useTranslation(),[r,d]=l.useState([]),n=ke({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:d,commonStoreKey:"SystemDataSources"}),s=[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:o,optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:n,data:r,setData:d,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:s,keyColumnName:"id",gridTitle:a("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async e=>{await i({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:e.id},successCallBkFn:e=>{A.toast.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:i}=f.useTranslation(),o=t.useSelector((e=>e.commonStores.stores.SystemParameterTypes.data)),[a,r]=l.useState([]),d=ke({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:o,optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){"combobox"===e?(t.setValue("parameterValueFormat",null),i.showField("parameterDataQueryId"),i.showField("parameterDataset"),i.showField("parameterDisplayField"),i.showField("parameterValueField"),i.hideField("parameterValueFormat")):"date"===e||"datetime"===e?("date"===e?t.setValue("parameterValueFormat",Je):"datetime"===e&&t.setValue("parameterValueFormat",et),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.showField("parameterValueFormat")):(t.setValue("parameterValueFormat",null),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.hideField("parameterValueFormat"))}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataset",null),i.hideField("parameterDataset")):i.showField("parameterDataset")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataQueryId",null),i.hideField("parameterDataQueryId")):i.showField("parameterDataQueryId")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:d,data:a,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:n,keyColumnName:"id",gridTitle:i("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:Ea,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:i}=f.useTranslation(),[o,a]=l.useState(null),{Window:r,setWindowState:d}=xe({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:n,setWindowState:s}=xe({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[p,c]=l.useState([]),u=t.useSelector((e=>e.commonStores.stores.SystemDataSources.data)),m=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),T=t.useSelector((e=>e.commonStores.stores.SystemBluePrints.data)),_=ke({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:c}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",formProps:{onValueChangeCallBack(e,t,i,o){La(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:u,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:T,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:m,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_PATH",fieldName:"reportJasperPath",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(ya,{reportCode:o?.reportCode,resultMode:"App"})}),e.jsx(n,{children:e.jsx(Ia,{selectedRecord:o})}),e.jsx(vo,{apiActions:_,data:p,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{a(e),s(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{a(e),d(!0)}}],formLoadCallBk:(e,t,i)=>{La(i.reportType,e,t),!0===i?.useSysDatasource&&e.hideField("datasourceConId")},formElements:E,keyColumnName:"id",gridTitle:i("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Jasper"!==e?.reportType||e?.reportJasperPath?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(A.toast.error("You must choose the report query"),!1):(A.toast.error("You must choose the report blueprint"),!1):(A.toast.error("You must enter the jasper report path"),!1):(A.toast.error("You must enter the jasper report name"),!1):(A.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const i=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),[o,a]=l.useState(null),{Window:r,setWindowState:d}=xe({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:n,setWindowState:s}=xe({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:p,setWindowState:c}=xe({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:u}=f.useTranslation(),[m,T]=l.useState([]),_=ke({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:T}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:[{value:"Year"},{value:"Month"},{value:"Day"},{value:"Hour"},{value:"Minute"},{value:"Second"}],optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(ha,{selectedRecord:o,callBkFn:()=>{d(!1)}})}),e.jsx(n,{children:e.jsx(Pa,{selectedRecord:o,callBkFn:()=>{d(!1)}})}),e.jsx(p,{children:e.jsx(Ma,{selectedRecord:o,callBkFn:()=>{c(!1)}})}),e.jsx(vo,{apiActions:_,data:m,setData:T,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:E,keyColumnName:"id",gridTitle:u("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{a(e),d(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{a(e),s(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{a(e),c(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(A.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(A.toast.error("You must specifiy the period value since this email is periodical"),!1):(A.toast.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=ke({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){Da(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(vo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:r,keyColumnName:"id",gridTitle:t("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{Da(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=xe({windowTitle:"Document Status",windowIcon:"tag"}),{Window:d,setWindowState:n}=xe({windowTitle:"Document Action",windowIcon:"stamp"}),s=t.useSelector((e=>e.commonStores.stores.SystemOrganizations.data)),p=t.useSelector((e=>e.commonStores.stores.SystemReports.data)),c=t.useSelector((e=>e.commonStores.stores.SystemDataSources.data)),{t:u}=f.useTranslation(),[m,T]=l.useState([]),A=ke({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:T}),_=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:s,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:p,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("documentConId"),t.setValue("documentConId",null)):i.showField("documentConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(Sa,{selectedRecord:i})}),e.jsx(d,{children:e.jsx(ga,{selectedRecord:i})}),e.jsx(vo,{apiActions:A,formLoadCallBk:(e,t,i)=>{!0===i.useSystemCon?e.hideField("documentConId"):e.showField("documentConId")},data:m,setData:T,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),r(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),n(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:u("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:_,keyColumnName:"id",gridTitle:u("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:i}=f.useTranslation(),o=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),a=t.useSelector((e=>e.commonStores.stores.SystemWidgetTypes.data)),[r,d]=l.useState([]),n=ke({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",options:a,optionDisplayField:"name",optionValueField:"name",formProps:{onValueChangeCallBack(e,t,i,o){Ua(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_SERIES_KEYS",fieldName:"seriesKeys",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_LABEL",fieldName:"verticalAxisLabel",required:!1,fieldType:"text"}}]}}];return e.jsx(vo,{apiActions:n,data:r,setData:d,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:s,keyColumnName:"id",gridTitle:i("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"},formLoadCallBk:(e,t,i)=>{Ua(i.widgetType,e,t)}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState(null),{Window:a,setWindowState:r}=xe({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[d,n]=l.useState([]),s=B.useNavigate(),p=ke({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:n});return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(va,{selectedRecord:i})}),e.jsx(vo,{apiActions:p,data:d,setData:n,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{o(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/dashboard/"+e.dashboardCode)}}],gridTitle:t("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:()=>{const{dashboardCode:t}=B.useParams();return e.jsx(da,{dashboardCode:t})}},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=ke({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return e.jsx(vo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=ke({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:a}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:t.useSelector((e=>e.commonStores.stores.SystemMailTemplates.data)),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}];return e.jsx(vo,{apiActions:r,disableDefaultAction:!0,data:o,setData:a,editMode:{editMode:"none"},formElements:d,keyColumnName:"id",gridTitle:i("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}}]]],wa=t=>{const{isUserAuthorized:i}=ge();return t?.authority&&!i(t.authority)?e.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e.jsxs("h2",{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):e.jsx(e.Fragment,{children:t.children})},Ba=()=>{const i=t.useSelector((e=>e.AppLayout)),o=t.useSelector((e=>e.AppInfo.value)),a=t.useSelector((e=>e.AppInfo.value.businessRoutes)),r=t.useDispatch(),{show:s,hide:p}=Ne(),c=t.useSelector((e=>e.commonStores)),[u,m]=l.useState(!1),{isUserAuthorized:T}=ge(),{handleGetRequest:A}=ye();return l.useEffect((()=>{c?.storeKeys&&(async()=>{s("Loading ... please wait");const e=c.stores,t=c.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!T(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||await A({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{r(ve({storeKey:i,data:e.data}))},failureCallBkFn:()=>{r(ve({storeKey:i,data:[]}))}});p()})()}),[c.storeKeys]),e.jsx(n.CacheProvider,{value:"ltr"===i.appDirection?aa:oa,children:e.jsx(d.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:e.jsxs(B.Routes,{children:[o.enableAdministrationModule?Fa.map(((t,i)=>e.jsx(B.Route,{path:t.path,element:e.jsx(wa,{authority:t.authority,children:e.jsx(t.component,{})})},"adm"+i))):null,a.map(((t,i)=>e.jsx(B.Route,{path:t.path,element:e.jsx(wa,{authority:t.authority,children:e.jsx(t.component,{})})},"bs"+i)))]})})})},ka=s.styled("div")((({theme:e})=>({width:30,height:6,margin:10,backgroundColor:re.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:re.grey[900]})})));function Wa(i){const{window:o}=i,a=t.useSelector((e=>e.SideBar)),r=t.useSelector((e=>e.AppInfo.value)),n=t.useDispatch(),l=e=>{n(ko(e))},s=void 0!==o?()=>o().document.body:void 0;return e.jsx(de,{container:s,anchor:"bottom",open:a.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:e.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[e.jsx(ka,{}),e.jsx(d.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:e.jsx(ta,{})}),e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[e.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:r.appName}),e.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",r.appVersion]})]})]})})}const Ga=()=>{const{t:i}=f.useTranslation(),o=t.useSelector((e=>e.loadingMask.value)),a=t.useSelector((e=>e.AppLayout));return e.jsxs(d.Backdrop,{dir:a.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[e.jsx(d.CircularProgress,{color:"inherit"}),e.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||i("DEFAULT_LOADING_MESSAGE")})]})},ja=()=>{const i=t.useSelector((e=>e.AppInfo.value)),[o,a]=l.useState(""),[r,s]=l.useState(""),[p,c]=l.useState(!1),u=t.useSelector((e=>e.UserSession.value)),m=t.useDispatch(),T=async()=>{if(null==o||""==o)return void A.toast.error("username is required to proceed");if(null==r||""==r)return void A.toast.error("password is required to proceed");c(!0);let e=null;try{if(e=await _.post(`${i.apiBaseUrl}/api/auth/login`,{username:o,password:r},{withCredentials:!0}),null!=e.data&&""!==e.data){c(!1);const t={...e.data,isAuthenticated:!0};m(Le.setAuthenticated(t))}}catch(e){c(!1),A.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},E=t.useSelector((e=>e.UserSession.value)),f=d.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||ot} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:i.appTheme?.dark?.primaryColor||ot},secondary:{main:i.appTheme?.dark?.secondaryColor||at}}});return l.useEffect((()=>{(async()=>{if(i?.apiBaseUrl&&null==E.isAuthenticated)try{let e=await _.get(`${i.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0});if(null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};m(Le.setAuthenticated(t))}else m(Le.setUnAuthenticated())}catch(e){m(Le.setUnAuthenticated())}})()}),[i]),e.jsx(n.ThemeProvider,{theme:f,children:e.jsx(d.Paper,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==u.isAuthenticated?e.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[e.jsx("img",{src:i?.appLogo,width:150,height:150}),e.jsx(d.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:i?.appName}),e.jsxs(d.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",i.appVersion]}),e.jsx(d.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),e.jsx(d.TextField,{label:"password",sx:{width:300,m:1},value:r,type:"password",onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),e.jsx(d.Button,{loading:p,onClick:T,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):e.jsxs(e.Fragment,{children:[e.jsx(d.CircularProgress,{sx:{marginRight:1}}),e.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})})},Va=s.styled("main",{shouldForwardProp:e=>"open"!==e})((({theme:e,open:i})=>{const o=t.useSelector((e=>e.AppLayout)),a=s.useTheme(),r=ce();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&i?"calc(100% - 350px)":"100%",direction:o.appDirection,justifyContent:"flex-start",transition:!0===i?a.transitions.create(["margin","width"],{easing:a.transitions.easing.easeOut,duration:a.transitions.duration.enteringScreen}):a.transitions.create(["margin","width"],{easing:a.transitions.easing.sharp,duration:a.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==o.appDirection||!0!==i?0:ue+"px",marginRight:r||"rtl"!==o.appDirection||!0!==i?0:ue+"px"}}));function Ya(){const i=t.useSelector((e=>e.SideBar)),o=ce(),a=t.useSelector((e=>e.UserSession));return e.jsxs(B.BrowserRouter,{children:[e.jsx(A.ToastContainer,{draggable:!0,position:"bottom-center"}),e.jsx(Ga,{}),!0===a.value.isAuthenticated?e.jsxs(Va,{open:i.isOpened,children:[e.jsx(p,{}),e.jsx(jo,{}),o?null:e.jsx(ia,{}),o?e.jsx(Wa,{}):null,e.jsx(Vo,{}),e.jsx(Ba,{})]}):e.jsx(ja,{})]})}const qa=T.createSlice({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),Ka=qa.actions;var za=qa.reducer;const Ha={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},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"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/admin/organization/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/admin/organization/ranks/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/admin/organization/units/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"}},Qa=i=>{const o=t.useDispatch();ne.LicenseInfo.setLicenseKey(i.muiPremiumKey);const a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.light?.primaryColor||tt} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:i.appTheme?.light?.primaryColor||tt},secondary:{main:i.appTheme?.light?.secondaryColor||it},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||ot} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:i.appTheme?.dark?.primaryColor||ot},secondary:{main:i.appTheme?.dark?.secondaryColor||at}}};let s={};i.enableAdministrationModule&&(s={...Ha}),i.businessCommonStoresMetaData&&(s={...s,...i.businessCommonStoresMetaData}),o(Fe(s));const p=t.useSelector((e=>e.AppLayout));let c={...a};"dark"===p.themeMode&&(c={...r});const u=d.createTheme({direction:p.appDirection,...c});return l.useEffect((()=>{document.title=i.documentTitle,o(Ka.setAppInfo(i))}),[]),e.jsx(n.ThemeProvider,{theme:u,children:e.jsx(Ya,{})})};i.library.add(o.fab),i.library.add(a.far),i.library.add(r.fas);Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return A.toast}}),exports.BaseApp=i=>{const o={AppLayout:_e,UserSession:he,loadingMask:Oe,commonStores:Be,SideBar:Wo,AppInfo:za,...i.businessReduxReducers},a=T.configureStore({reducer:o});return e.jsx(t.Provider,{store:a,children:e.jsx(Qa,{...i})})},exports.CheckBox=$e,exports.ComboBox=Xe,exports.DARK_THEME_INITIAL_MAIN_COLOR=ot,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=at,exports.DATE_FORMAT=Je,exports.DATE_TIME_FORMAT=et,exports.Datefield=rt,exports.DatetimeField=dt,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=tt,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=it,exports.TemplateBarChart=Ye,exports.TemplateDataCard=qe,exports.TemplateForm=Lo,exports.TemplateGauge=Ke,exports.TemplateGrid=vo,exports.TemplateLineChart=ze,exports.TemplateLineProgress=Qe,exports.TemplatePieChart=Ze,exports.TemplateTextField=We,exports.TransferList=Ve,exports.capitalizeFirstLetter=co,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=so,exports.isNumeric=po,exports.isValidEmail=uo,exports.useApiActions=ke,exports.useAxios=ye,exports.useConfirmationWindow=be,exports.useIsMobile=ce,exports.useLoadingMask=Ne,exports.useSession=ge,exports.useWindow=xe,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(v).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return v[e]}})}));
|
|
31
|
+
function(e,t){const i=ae(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const o=`"${e}"`;return 0===t.length?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),i(...t)}:i}("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Ji),n=ce.forwardRef((function(t,n){const l=function(e=io){return to(e)}(o),{className:s,component:p="div",...c}=oo(t);return e.jsx(d,{as:p,ref:n,className:lo(s,r?r(a):a),theme:i&&l[i]||l,...c})}));return n}({defaultClassName:function(e,t,i="Mui"){const o={};return t.forEach((t=>{o[t]=function(e,t,i="Mui"){const o=so[t];return o?`${i}-${o}`:`${ro.generate(e)}-${t}`}(e,t,i)})),o}("MuiBox",["root"]).root,generateClassName:ro.generate});function co(e){return"number"==typeof e&&!isNaN(e)}function uo(e){return"string"==typeof e&&""!==e.trim()&&!isNaN(Number(e))}function mo(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function To(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}"production"!==process.env.NODE_ENV&&(po.propTypes={children:kt.node,component:kt.elementType,sx:kt.oneOfType([kt.arrayOf(kt.oneOfType([kt.func,kt.object,kt.bool])),kt.func,kt.object])});const Ao=({label:t,errorMessage:i,value:o,setValue:a,maxLength:r})=>{const{t:n}=f.useTranslation(),s={customInlineFn:(e,{Style:t})=>{if(e.style.color)return t("color-"+e.style.color)}};let p=j.stateFromHTML(o,s);const[c,u]=l.useState(k.EditorState.createWithContent(p));l.useEffect((()=>{o!=G(k.convertToRaw(c.getCurrentContent()))&&u(k.EditorState.createWithContent(j.stateFromHTML(o,s)))}),[o]);return e.jsxs(d.Paper,{sx:{display:"flex",flexDirection:"column",padding:1},children:[t?e.jsx(d.Box,{children:n(t)}):e.jsx(e.Fragment,{}),e.jsx(W.Editor,{editorState:c,onEditorStateChange:e=>{let t=G(k.convertToRaw(e.getCurrentContent()));if(console.log("Text Length "+t.length),t.length>r){let e=j.stateFromHTML(t.substring(0,r),s);u(k.EditorState.createWithContent(e))}else u(e),a(G(k.convertToRaw(e.getCurrentContent())))},handlePastedText:e=>{const t=c.getCurrentContent().getPlainText("").length,i=(()=>{const e=c.getSelection();let t=0;if(!e.isCollapsed()){const i=c.getCurrentContent(),o=e.getStartKey(),a=e.getEndKey(),r=o===a,d=i.getBlockForKey(o).getLength()-e.getStartOffset(),n=e.getEndOffset(),l=i.getKeyAfter(a);if(r)t+=e.getEndOffset()-e.getStartOffset();else{let e=o;for(;e&&e!==l;)t+=e===o?d+1:e===a?n:i.getBlockForKey(e).getLength()+1,e=i.getKeyAfter(e)}}return t})();if(t+e.length-i>r)return alert("max text length is "+r),"handled"},editorStyle:{height:"200px",border:"1px solid #F1F1F1",padding:"10px",overflow:"auto"},wrapperStyle:{marginBottom:"1rem"},toolbarStyle:{border:"1px solid #ccc"}}),i?e.jsx(d.Box,{sx:{color:"red"},children:n(i)}):e.jsx(e.Fragment,{})]})},_o=i=>{const o=t.useSelector((e=>e.AppLayout)),a=Ue(),[r,d]=l.useState([]),{handleGetRequest:n}=Le();return l.useEffect((()=>{i.lookupType&&(async()=>{await n({endPointURI:"api/v1/dev/system/lookup",showMask:!0,parameters:{lookupType:i.lookupType},successCallBkFn:e=>{d(e.data)},failureCallBkFn:()=>{d([])}})})()}),[i.lookupType,a.UserSession]),e.jsx(et,{...i,options:r,displayField:"ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"})},Eo=t=>{if(t?.fieldInfo){const i=t.fieldInfo,o=t?.formManager||null,a=t?.formActions||null,r=t?.formValues||null,n=t?.fieldInfo?.fieldName||null,l=t?.fieldInfo?.fieldType||null;return i&&o&&r&&n&&l?t.hiddenFields.includes(n)?e.jsx(e.Fragment,{}):e.jsx(d.Grid2,{size:i?.formProps?.fieldSize||{lg:12,md:12,sm:12},sx:{padding:1,width:"100%"},children:"text"===l||"number"===l?e.jsx(je,{...i.muiTextFieldProps,fullWidth:!0,type:l,disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),hidden:i?.hidden||!1,label:i?.fieldLabel,value:r[n],onChange:e=>{let t=null;""!=e.target.value&&(t="number"===l&&uo(e.target.value)?Number(e.target.value):e.target.value),o.setValue(n,t),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(t,o,a)},sx:{"& .MuiInputBase-root":{height:`${i?.formProps?.fieldHeight}px`||void 0},"& .MuiInputBase-input":{height:"100% !important"},...i?.formProps?.style},error:null!=o.formState.errors[n],helperText:o?.formState?.errors[n]?.message?.toString()}):"date"===i?.fieldType?e.jsx(nt,{format:i?.dateFormat||tt,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(n,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"datetime"===i?.fieldType?e.jsx(lt,{format:i?.dateFormat||it,sx:i?.formProps?.style||{width:"100%"},disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(n,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},value:r[n],error:null!=o.formState.errors[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"checkbox"===i?.fieldType?e.jsx(Je,{label:i?.fieldLabel,onChangeCallBack:e=>{o.setValue(n,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},value:r[n],checkedValue:i?.checkedValue||!0,unCheckedValue:i?.unCheckedValue||!1,disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),sx:i?.formProps?.style}):"combobox"===i?.fieldType?e.jsx(et,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),onChangeCallBack:(e,t)=>{let r=null;e&&(r=e+""),o.setValue(n,r),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(r,o,a,t)},options:i?.options||[],displayField:i?.optionDisplayField||"",valueField:i?.optionValueField||"",value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"lookup"===i?.fieldType?e.jsx(_o,{sx:i?.formProps?.style||{width:"100%"},label:i?.fieldLabel,disabled:!(!i?.disabled&&!t.disabledFields.includes(n)),onChangeCallBack:(e,t)=>{let r=null;e&&(r=e+""),o.setValue(n,r),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(r,o,a,t)},lookupType:i.lookupType,value:r[n],errorMessage:o?.formState?.errors[n]?.message?.toString()}):"html"===i?.fieldType?e.jsx(Ao,{label:i.fieldLabel,value:r[n]||"",errorMessage:o?.formState?.errors[n]?.message?.toString(),setValue:e=>{o.setValue(n,e),i?.formProps?.onValueChangeCallBack&&i?.formProps?.onValueChangeCallBack(e,o,a)},maxLength:4e3}):e.jsx(e.Fragment,{children:"Unknown field type"})}):e.jsx(e.Fragment,{})}return e.jsx(e.Fragment,{})},fo=t=>{const i=Ue(),{ConfirmationWindow:o,setOpen:a}=xe({body:t?.confirmationMessage||"",title:"Confirmation",onConfirmationCallBk:()=>{t?.actionFn(t?.record)}});return null==t?.authority||i.isUserAuthorized(t.authority)?e.jsxs(e.Fragment,{children:[e.jsx(o,{}),e.jsxs(d.Button,{variant:t?.formActionProps?.actionButtonVariant,color:t?.formActionProps?.actionButtonColor,onClick:()=>{if(t?.actionFn){if(t?.preActionValidation&&!t.preActionValidation(t.record))return;!0===t?.isConfirmationRequired?a(!0):t?.actionFn(t.record)}},children:[t?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{marginRight:5,marginLeft:5}}):e.jsx(e.Fragment,{}),e.jsx("div",{children:t?.label})]})]}):e.jsx(e.Fragment,{})},Io=t=>{const{t:i}=f.useTranslation();return e.jsx(e.Fragment,{children:e.jsxs(d.Grid2,{container:!0,sx:t?.style,alignItems:"flex-start",children:[t?.label?e.jsx(d.Grid2,{size:12,sx:{padding:1,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"flex-start"},children:t?.icon?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{marginRight:5,marginLeft:5}}),e.jsx("div",{children:i(t.label)})]}):e.jsx(e.Fragment,{children:i(t.label)})}):e.jsx(e.Fragment,{}),t?.elements?t.elements.map((i=>"group"===i.type?e.jsx(Io,{...i.props,formManager:t.formManager,formValues:t.formValues,formActions:t.formActions,hiddenFields:t.hiddenFields,disabledFields:t.disabledFields}):"field"===i.type&&"props"===i.mode?e.jsx(Eo,{fieldInfo:i.props,formManager:t.formManager,formValues:t.formValues,formActions:t.formActions,hiddenFields:t.hiddenFields,disabledFields:t.disabledFields}):"field"===i.type&&"node"===i.mode?e.jsx(d.Grid2,{size:i?.props?.formProps?.fieldSize||{lg:3,md:6,sm:12},sx:{padding:1,width:"100%"},children:e.jsx(i.node,{formManager:t.formManager,formValues:t.formValues,formActions:t.formActions})}):void 0)):null,t?.actions?e.jsx(d.Grid2,{size:{sm:12},sx:{padding:1},children:t.actions.map((i=>e.jsx(fo,{...i,record:t.formValues})))}):e.jsx(e.Fragment,{})]})})},Oo=t=>({...t,type:"string",renderEditCell:t=>e.jsx(lt,{sx:{width:"100%"},label:"",value:t.value,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(it)),o},valueFormatter:(e,t,i)=>t[i.field]}),yo=t=>({...t,type:"custom",valueGetter:e=>e?e+"":e,renderCell:t=>{let i=null;try{i=t.colDef.options.find((e=>e[t.colDef.valueField]==t.value))}catch(e){}return e.jsx("div",{children:null!=i?i[t.colDef.displayField]:t.value})},renderEditCell:t=>e.jsx(et,{...t,sx:{width:"100%"},options:t.colDef.options,valueField:t.colDef.valueField,displayField:t.colDef.displayField,onChangeCallBack:(e,i)=>{null===e&&t.api.setEditCellValue({id:t.id,field:t.field,value:null}),t.api.setEditCellValue({id:t.id,field:t.field,value:e+""})}})}),No=t=>({...t,type:"custom",valueGetter:e=>null==e||null==e?null:e,renderCell:i=>{const o=i?.value;return o===t.checkedValue||"true"===o||1===o||!0===o?e.jsx(m.FontAwesomeIcon,{icon:"check",color:"green"}):e.jsx(m.FontAwesomeIcon,{icon:"xmark",color:"red"})},renderEditCell:i=>e.jsx(Je,{...i,checkedValue:t?.checkedValue||!0,unCheckedValue:t?.unCheckedValue||!1,onChangeCallBack:e=>{i.api.setEditCellValue({id:i.id,field:i.field,value:e})}})}),Ro=e=>{const t=[];if("field"===e.type&&"props"===e.mode&&e?.props)t.push(e.props);else if("group"===e.type&&e?.props&&e?.props?.elements)for(const i of e.props.elements)t.push(...Ro(i));return t},Lo=e=>{const t=[];for(const i of e)t.push(...Ro(i));return t},ho=e=>{const t={};for(const i of e)if(i?.fieldName){const e=i.fieldName;"number"===i.fieldType?t[e]=!0===i?.required?ue.number({required_error:"This field is required",invalid_type_error:"This field must be a number"}):ue.number().optional().nullable():"checkbox"===i.fieldType?t[e]=!0===i?.required?ue.boolean({required_error:"This field is required"}):ue.boolean().optional().nullable():t[e]=!0===i?.required?ue.string({message:"This field is required"}).min(1,"This field is required"):ue.string().optional().nullable()}return t},Po=t=>{const{t:i}=f.useTranslation(),o=Lo(t.elements),a=[];for(const e of o)e?.hidden&&a.push(e.fieldName);const[r,n]=l.useState(a),s={};for(const e of t.elements)"field"===e?.type&&"props"===e?.mode&&e?.props?.defaultValue&&(s[e.props.fieldName]=e.props.defaultValue);const[p,c]=l.useState([]),u=ue.object(ho(o)),T=F.useForm({resolver:w.zodResolver(u),defaultValues:s}),_=T.watch(),E=B.useParams(),I=t?.formRouteRecordIdParamName,O={setFieldValue:(e,t)=>{T.setValue(e,t)},hideField:e=>{n((t=>[...t,e]))},showField:e=>{n((t=>t.filter((t=>t!==e))))},disableField:e=>{c((t=>[...t,e]))},enableField:e=>{c((t=>t.filter((t=>t!==e))))}};return l.useEffect((()=>{(async()=>{let e=null;if(t?.recordIdToEdit?e=t.recordIdToEdit:I&&E[I]&&(e=E[I]),e){const i=await t.apiActions.loadRecordById(e);if(i){T.reset({...i}),t?.formLoadCallBk&&t?.formLoadCallBk(O,T,i);for(const e of o)"combobox"===e?.fieldType&&i[e.fieldName]&&T.setValue(e.fieldName,i[e.fieldName]+"")}}else T.reset({})})()}),[t?.recordIdToEdit]),e.jsxs(e.Fragment,{children:[e.jsx(po,{sx:{display:"flex",flex:1,width:"100%",height:"fit-content",flexDirection:"column",alignItems:"center",overflow:"auto"},children:e.jsx(d.Grid2,{sx:{width:"100%"},container:!0,children:t.elements.map(((t,i)=>"group"===t.type?e.jsx(Io,{...t.props,formManager:T,formValues:_,formActions:O,hiddenFields:r,disabledFields:p},i):"field"===t.type&&"props"===t.mode?e.jsx(Eo,{fieldInfo:t.props,formManager:T,formValues:_,formActions:O,hiddenFields:r,disabledFields:p},i):"field"===t.type&&"node"===t.mode?e.jsx(d.Grid2,{size:t?.props?.formProps?.fieldSize||{lg:3,md:6,xs:12},sx:{padding:1,width:"100%"},children:e.jsx(t.node,{formManager:T,formValues:_})},i):void 0))})}),e.jsxs(po,{sx:{display:"flex",width:"100%",alignItems:"center",justifyContent:"flex-start"},children:[t?.actions?t.actions.map((t=>!0===t?.formActionProps?.enabled?e.jsx(fo,{...t,record:_}):e.jsx(e.Fragment,{}))):e.jsx(e.Fragment,{}),e.jsx("div",{style:{flex:1}}),e.jsx(d.Button,{variant:t?.saveButtonSpecs?.actionButtonVariant?t.saveButtonSpecs.actionButtonVariant:"contained",sx:{m:1},startIcon:t?.saveButtonSpecs?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.saveButtonSpecs.icon}):null,color:t?.saveButtonSpecs?.actionButtonColor?t.saveButtonSpecs.actionButtonColor:"primary",onClick:T.handleSubmit((e=>{console.log("form values",e),(async e=>{if((!t?.preSaveValidation||t.preSaveValidation(e))&&e){const i=await t.apiActions.saveRecord(e);i&&(T.reset({...i}),t?.formSavedSuccessfullyCallBk&&t.formSavedSuccessfullyCallBk(i),t?.formCloseCallBk&&t.formCloseCallBk())}})(e)}),(e=>{A.toast.error("Form Data is not valid, make sure you have all field with valid data"),console.log("form validation error",e)})),children:i(t?.saveButtonSpecs?.label||"SAVE_BTN_LABEL")}),e.jsx(d.Button,{variant:t?.cancelButtonSpecs?.actionButtonVariant?t.cancelButtonSpecs.actionButtonVariant:"contained",startIcon:t?.cancelButtonSpecs?.icon?e.jsx(m.FontAwesomeIcon,{icon:t.cancelButtonSpecs.icon}):null,color:t?.cancelButtonSpecs?.actionButtonColor?t.cancelButtonSpecs.actionButtonColor:"error",sx:{m:1},onClick:()=>{t?.formCloseCallBk&&t.formCloseCallBk(),T.reset(s)},children:i(t?.cancelButtonSpecs?.label||"CANCEL_BTN_LABEL")})]})]})},Mo=t=>{const{t:i}=f.useTranslation(),o=Ue(),{ConfirmationWindow:a,setOpen:r}=xe({body:i(t?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(t?.actionFn(t.recordsToProcessActionOn,t.recordIdsToProcessActionOn)),t?.reloadData&&t.reloadData()}});let n=!0;if(t.authority&&(n=o.isUserAuthorized(t.authority)),n)return e.jsxs(e.Fragment,{children:[e.jsx(a,{}),e.jsxs(d.Button,{onClick:async()=>{if(t?.recordsToProcessActionOn&&t?.recordsToProcessActionOn.length>0){if(t?.preActionValidation)for(const e of t.recordsToProcessActionOn)if(!t.preActionValidation(e))return;!0===t?.isConfirmationRequired?r(!0):(await t.actionFn(t.recordsToProcessActionOn,t.recordIdsToProcessActionOn),t?.reloadData&&t.reloadData())}else A.toast.error(i("AT_LEAST_ONE_RECORD_SELECTED_MESSAGE"))},variant:t?.label?"outlined":t?.formActionProps?.actionButtonVariant?t.formActionProps.actionButtonVariant:"text",size:"small",color:t?.formActionProps?.actionButtonColor||"primary",children:[t?.icon?e.jsx(m.FontAwesomeIcon,{style:{marginRight:5,marginLeft:5},icon:t.icon}):e.jsx(e.Fragment,{}),t?.label?i(t.label):e.jsx(e.Fragment,{})]})]})},Co=d.styled(V.QuickFilter)({display:"grid",alignItems:"center"}),Do=d.styled(V.ToolbarButton)((({theme:e,ownerState:t})=>({gridArea:"1 / 1",width:"min-content",height:"min-content",zIndex:1,opacity:t.expanded?0:1,pointerEvents:t.expanded?"none":"auto",transition:e.transitions.create(["opacity"])}))),So=d.styled(d.TextField)((({theme:e,ownerState:t})=>({gridArea:"1 / 1",overflowX:"clip",width:t.expanded?260:"var(--trigger-width)",opacity:t.expanded?1:0,transition:e.transitions.create(["width","opacity"])}))),bo=t=>{const{t:i}=f.useTranslation(),o=Ue(),a=!t?.templateProps?.editAction?.authority||o.isUserAuthorized(t.templateProps.editAction.authority),r=((e,t,i)=>{const o=[],a=[];if("exclude"===e.type&&0===e.ids.size)for(const e of t)o.push(e),a.push(e[i]);else if(e?.ids)for(const r of e.ids){const e=t.find((e=>e[i]===r));o.push(e),a.push(r)}return{selectedRecords:o,selectedRecordIds:a}})(t?.templateProps?.rowSelectionModel||{ids:new Set,type:"include"},t?.templateProps?.data||[],t?.templateProps?.keyColumnName||"id");return e.jsxs(V.Toolbar,{children:[a&&"none"!=t?.templateProps?.editMode?.editMode?e.jsxs(d.Button,{onClick:t?.handleCreateNewRecord,children:[e.jsx(m.FontAwesomeIcon,{icon:"add",style:{marginRight:5,marginLeft:5}}),i("ADD_BTN_LABEL")]}):e.jsx(e.Fragment,{}),t?.templateProps?.rowActions?t.templateProps.rowActions.map(((e,i)=>!0===e?.gridActionProps?.multiRecord?l.createElement(Mo,{...e,key:i,reloadData:async()=>{t.templateProps.apiActions.reloadData(t?.templateProps?.gridLoadParametersValues)},recordIdsToProcessActionOn:r.selectedRecordIds,recordsToProcessActionOn:r.selectedRecords}):null)):e.jsx(e.Fragment,{}),e.jsx(d.Box,{sx:{flex:1,mx:.5},children:t?.templateProps?.tBar}),e.jsx(d.Tooltip,{title:"Columns",children:e.jsx(V.ColumnsPanelTrigger,{render:e.jsx(V.ToolbarButton,{}),children:e.jsx(V.GridViewColumnIcon,{fontSize:"small"})})}),e.jsx(d.Tooltip,{title:"Filters",children:e.jsx(V.FilterPanelTrigger,{render:(t,i)=>e.jsx(V.ToolbarButton,{...t,color:"default",children:e.jsx(d.Badge,{badgeContent:i.filterCount,color:"primary",variant:"dot",children:e.jsx(V.GridFilterListIcon,{fontSize:"small"})})})})}),t?.templateProps?.gridStateKey?e.jsx(d.Tooltip,{title:i("RESET_GRID_STATE"),children:e.jsx(d.IconButton,{onClick:t?.clearGridState,children:e.jsx(m.FontAwesomeIcon,{icon:"eraser"})})}):e.jsx(e.Fragment,{}),e.jsx(d.Divider,{orientation:"vertical",variant:"middle",flexItem:!0,sx:{mx:.5}}),e.jsx(d.Tooltip,{title:i("EXPORT_EXECL_LABEL"),children:e.jsx(V.ExportExcel,{render:e.jsx(d.MenuItem,{}),children:e.jsx(m.FontAwesomeIcon,{icon:"file-excel",color:"green"})})}),e.jsxs(Co,{children:[e.jsx(V.QuickFilterTrigger,{render:(t,o)=>e.jsx(d.Tooltip,{title:i("SEARCH_BTN_LABEL"),enterDelay:0,children:e.jsx(Do,{...t,ownerState:{expanded:o.expanded},color:"default","aria-disabled":o.expanded,children:e.jsx(m.FontAwesomeIcon,{icon:"search"})})})}),e.jsx(V.QuickFilterControl,{render:({ref:t,...o},a)=>e.jsx(So,{...o,ownerState:{expanded:a.expanded},inputRef:t,"aria-label":"Search",placeholder:`${i("SEARCH_BTN_LABEL")}...`,size:"small",slotProps:{input:{startAdornment:e.jsx(d.InputAdornment,{position:"start",children:e.jsx(m.FontAwesomeIcon,{icon:"search"})}),endAdornment:a.value?e.jsx(d.InputAdornment,{position:"end",children:e.jsx(V.QuickFilterClear,{edge:"end",size:"small","aria-label":"Clear search",children:e.jsx(m.FontAwesomeIcon,{icon:"xmark"})})}):null,...o.slotProps?.input},...o.slotProps}})})]}),e.jsx(d.IconButton,{onClick:()=>{t.templateProps.apiActions.reloadData(t?.templateProps?.gridLoadParametersValues)},children:e.jsx(m.FontAwesomeIcon,{icon:"refresh"})})]})},go=t=>{const{t:i}=f.useTranslation(),o=Ue(),{ConfirmationWindow:a,setOpen:r}=xe({body:i(t?.confirmationMessage||"ACTION_CONFIRMATION"),title:i("CONFIRMATION"),onConfirmationCallBk:async()=>{await(t?.actionFn(t.record)),t?.reloadData&&t.reloadData()}});let n=!0;t.authority&&(n=o.isUserAuthorized(t.authority));let l={};t?.getActionIconStyleForRecord&&(l=t.getActionIconStyleForRecord(t.record));let s=!0;t?.isActionVisibleForRecord&&(s=t?.isActionVisibleForRecord(t.record));let p=!1;if(t?.isActionDisabledForRecord&&(p=t.isActionDisabledForRecord(t.record)),n&&s)return e.jsxs(e.Fragment,{children:[e.jsx(a,{}),e.jsx(V.GridActionsCellItem,{disabled:p,icon:e.jsx(d.Tooltip,{title:t?.label?i(t.label):"",children:e.jsx(m.FontAwesomeIcon,{icon:t.icon,style:{...l,color:p?"gray":null!=l?.color?l.color:void 0}})}),showInMenu:t?.gridActionProps?.showInMenu||!1,label:"",className:"textPrimary",color:"inherit",onClick:async()=>{if(!p){if(t?.preActionValidation&&!t.preActionValidation(t.record))return;!0===t?.isConfirmationRequired?r(!0):(await t.actionFn(t.record),!0===t?.gridActionProps?.reloadGridAfterAction&&t?.reloadData&&t.reloadData())}}})]})};let xo=-1;const Uo=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch(e){return console.error("Failed to load grid state",e),{}}},vo=(e,t)=>{const i=Uo(e);localStorage.setItem(e,JSON.stringify({...i,...t}))},Fo=["__check__","actions"],wo=i=>{const o=t.useSelector((e=>e.AppLayout)),{getLookupOptions:a}=(()=>{const{handleGetRequest:e}=Le(),i=t.useSelector((e=>e.AppLayout)),o=async t=>{let i=[];return await e({endPointURI:"api/v1/dev/system/lookup",showMask:!0,parameters:{lookupType:t},successCallBkFn:e=>{i=e.data}}),i};return{generateLookupGridColumn:async e=>{let t=await o(e.lookupType);return{...e,options:t,displayField:"ltr"===i.appDirection?"lookupEnDisplay":"lookupArDisplay",valueField:"lookupValue"}},getLookupOptions:o}})(),[r,n]=l.useState([]),{t:s}=f.useTranslation(),p=Lo(i.formElements),c=[],u=l.useMemo((()=>i?.gridStateKey?Uo(i.gridStateKey):{}),[]);for(const e of p)!0===e?.gridProps?.hidden&&c.push(e.fieldName);let T={};if(u?.columnVisibilityModel){T=u.columnVisibilityModel;const e=Object.keys(T);for(const t of c)e.includes(t)||(T[t]=!1)}else for(const e of c)T[e]=!1;const _=t.useSelector((e=>e.AppLayout.appDirection)),[E,I]=l.useState(T),[O,y]=l.useState(u.columnOrder||[]),[N,R]=l.useState(u.columnWidths||{}),[L,h]=l.useState(u.columnGroupingModel||[]);let P=u?.pinnedColumns?.left||[];P=P.filter((e=>!Fo.includes(e)));let M=u?.pinnedColumns?.right||[]||[];M=M.filter((e=>!Fo.includes(e)));const[C,D]=l.useState({left:[..."ltr"===_?Fo:[],...P],right:[..."rtl"===_?Fo:[],...M]}),S=Ue(),b=B.useNavigate(),[g,x]=l.useState(null),[F,w]=l.useState(null),[k,W]=l.useState({}),G=async()=>{let t=((t,i,o)=>{const a=[];for(const d of t)if("text"===d?.fieldType||"number"===d?.fieldType){const e={...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,type:"number"==d?.fieldType?"number":"string",field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200};a.push(e)}else if("date"===d?.fieldType){const t=(r={...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200},{...r,type:"string",renderEditCell:t=>e.jsx(nt,{sx:{width:"100%"},label:"",value:t.value,onChangeCallBack:e=>{t.api.setEditCellValue({id:t.id,field:t.field,value:e})}}),valueParser:(e,t,i)=>{let o=null;return null!==e&&(o=U(e).format(tt)),o},valueFormatter:(e,t,i)=>t[i.field]});a.push(t)}else if("datetime"===d?.fieldType){const e=Oo({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,flex:1,minWidth:200});a.push(e)}else if("checkbox"===d?.fieldType){const e=No({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,checkedValue:d?.checkedValue,unCheckedValue:d?.unCheckedValue,width:150});a.push(e)}else if("combobox"===d?.fieldType){const e=yo({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,valueField:d?.optionValueField||"value",displayField:d?.optionDisplayField||"display",options:d?.options||[],flex:1,minWidth:200});a.push(e)}else if("lookup"===d?.fieldType){const e=yo({...d?.gridProps?.muiProps,editable:null!=d?.gridProps?.muiProps?.editable?d?.gridProps?.muiProps?.editable:i,lookupType:d?.lookupType,field:d?.fieldName,headerName:o(d?.fieldLabel||d?.fieldName),headerAlign:"center",align:"center",hidden:d?.hidden,searchable:d?.gridProps?.searchable,valueField:d?.optionValueField||"value",displayField:d?.optionDisplayField||"display",options:d?.options||[],flex:1,minWidth:200});a.push(e)}var r;return a})(p,"row"===i?.editMode?.editMode||!1,s);for(let e of t)e?.lookupType&&(e.displayField="ltr"===o.appDirection?"lookupEnDisplay":"lookupArDisplay",e.options=await a(e.lookupType),e.valueField="lookupValue");n(t)},[j,Y]=l.useState({ids:new Set,type:"include"});let q="id";i?.keyColumnName&&(q=i?.keyColumnName);const K=i.setData,z=v.z.object(ho(p));let H=!0;i?.editAction?.authority&&(H=S.isUserAuthorized(i.editAction.authority));let Q=!0;i?.deleteAction?.authority&&(Q=S.isUserAuthorized(i.deleteAction.authority));const{ConfirmationWindow:Z,setOpen:$}=xe({title:"Confirmation",body:"Are you sure you want to delete this record ?",onConfirmationCallBk:async()=>{let e=!0;g&&!0===g?.isNew||(e=await i.apiActions.deleteRecordById(g[q])),e&&(i?.deleteAction?.postActionCallBack&&await i.deleteAction.postActionCallBack(g),K((e=>e.filter((e=>e[q]!=g[q])))))}});let X,J,ee,te,ie,oe;"modal"===i?.editMode?.editMode&&(X=i?.editMode?.specs?.modalHeight||"fit-content",J=i?.editMode?.specs?.modalWidth||"300",ee=i?.editMode?.specs?.modalMinHeight,te=i?.editMode?.specs?.modalMinWidth,ie=i?.editMode?.specs?.modalIcon||"window",oe=i?.editMode?.specs?.modalTitle||"Record Form");const{Window:ae,setWindowState:re}=ve({height:X,minHeight:ee,minWidth:te,onCloseCallBack:()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)},width:J,windowIcon:ie,windowTitle:oe}),de={type:"actions",field:"actions",headerName:"",headerAlign:"center",width:(i?.rowActions?30*i.rowActions.length:0)+(i?.editAction&&i?.editAction?.isEnabled?30:0)+(i?.deleteAction&&i?.deleteAction?.isEnabled?30:0),getActions:t=>{const o=t.row,a=[];if("none"!=i?.editMode?.editMode&&(void 0===i?.disableDefaultAction||!i.disableDefaultAction)){const t=k[o[q]]?.mode===V.GridRowModes.Edit;if("row"===i.editMode.editMode&&t)H&&(a.push(e.jsx(V.GridActionsCellItem,{icon:e.jsx(m.FontAwesomeIcon,{icon:"save"}),label:s("SAVE_BTN_LABEL"),onClick:()=>{(e=>{const t=e[q];W({...k,[t]:{mode:V.GridRowModes.View}})})(o)}})),a.push(e.jsx(V.GridActionsCellItem,{icon:e.jsx(m.FontAwesomeIcon,{icon:"cancel"}),label:s("CANCEL_BTN_LABEL"),onClick:()=>{(e=>{const t=e[q];t&&co(t)&&t<0?(W({...k,[t]:{mode:V.GridRowModes.View,ignoreModifications:!0}}),K((e=>{const i=e.filter((e=>e[q]!=t));return i}))):W({...k,[t]:{mode:V.GridRowModes.View,ignoreModifications:!0}})})(o)},color:"inherit"})));else{if(i?.editAction&&!0===i?.editAction?.isEnabled){let t=!0;i?.editAction?.isActionVisibleForRecord&&(t=i?.editAction?.isActionVisibleForRecord(o));let r=!1;i?.editAction?.isActionDisabledForRecord&&(r=i?.editAction?.isActionDisabledForRecord(o)),H&&t&&a.push(e.jsx(V.GridActionsCellItem,{disabled:r,icon:e.jsx(d.Tooltip,{title:s("EDIT_BTN_LABEL"),children:e.jsx(m.FontAwesomeIcon,{icon:"edit",style:{color:r?"gray":void 0}})}),showInMenu:i?.editAction?.gridActionProps?.showInMenu||!1,label:s("EDIT_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{H&&!r&&(async e=>{if(e)if(w(e),"form"===i.editMode.editMode)b(i.editMode.specs.formRoute+"/"+e[q]);else if("modal"===i.editMode.editMode)re(!0);else if("row"===i?.editMode?.editMode){const t=e[q];W({...k,[t]:{mode:V.GridRowModes.Edit}})}})(o)}}))}if(i?.deleteAction&&!0===i?.deleteAction?.isEnabled){let t=!0;i?.deleteAction?.isActionVisibleForRecord&&(t=i?.deleteAction?.isActionVisibleForRecord(o));let r=!1;i?.deleteAction?.isActionDisabledForRecord&&(r=i?.deleteAction?.isActionDisabledForRecord(o)),Q&&t&&a.push(e.jsx(V.GridActionsCellItem,{disabled:r,icon:e.jsx(d.Tooltip,{title:s("DELETE_BTN_LABEL"),children:e.jsx(m.FontAwesomeIcon,{icon:"trash",style:{color:r?"gray":void 0}})}),showInMenu:i?.deleteAction?.gridActionProps?.showInMenu||!1,label:s("DELETE_BTN_LABEL"),className:"textPrimary",color:"inherit",onClick:()=>{if(Q&&!r){if(i?.deleteAction?.preActionValidation&&!i.deleteAction.preActionValidation(o))return;x(o),$(!0)}}}))}}}if(i?.rowActions)for(const t of i.rowActions)t?.gridActionProps?.multiRecord&&!0===t?.gridActionProps?.multiRecord||a.push(e.jsx(go,{...t,record:o,reloadData:async()=>{i.apiActions.reloadData(i?.gridLoadParametersValues)}}));return a}};let ne=[];(void 0===i?.disableDefaultAction||!i.disableDefaultAction||i?.rowActions&&i?.rowActions.length>0)&&ne.push(de),ne=[...ne,...r];l.useEffect((()=>{void 0!==i?.autoLoad&&!0!==i.autoLoad||i.apiActions.reloadData(i?.gridLoadParametersValues),G()}),[]),l.useEffect((()=>{G()}),[_,i.formElements]);const le=l.useMemo((()=>{const e=ne.map((e=>({...e,width:N[e.field]||e.width})));if(O.length){const t=new Map(e.map((e=>[e.field,e])));return O.map((e=>t.get(e))).filter(Boolean)}return e}),[O,N,ne]);return e.jsxs(e.Fragment,{children:[e.jsx(Z,{}),"modal"===i?.editMode?.editMode?e.jsx(ae,{children:i?.editMode?.specs?.formComponent?e.jsx(i.editMode.specs.formComponent,{recordIdToEdit:F?F[q]:void 0,formCloseCallBk:()=>{re(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)}}):e.jsx(Po,{formLoadCallBk:i.formLoadCallBk,recordIdToEdit:F?F[q]:void 0,formCloseCallBk:()=>{re(!1),i.apiActions.reloadData(i?.gridLoadParametersValues)},elements:i.formElements,apiActions:i.apiActions,editAuthorityKey:i?.editAction?.authority,formSavedSuccessfullyCallBk:i?.editAction?.postActionCallBack,preSaveValidation:i?.editAction?.preActionValidation,actions:i?.rowActions})}):e.jsx(e.Fragment,{}),void 0!==i?.hideInfoBar||i?.hideInfoBar?e.jsx(e.Fragment,{}):e.jsxs(d.Box,{sx:{display:"flex"},children:[void 0!==i?.hideBackButton||i?.hideBackButton?e.jsx(e.Fragment,{}):e.jsx(d.IconButton,{onClick:()=>{b(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),e.jsxs(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:[i?.girdIcon?e.jsx(m.FontAwesomeIcon,{icon:i.girdIcon,style:{marginRight:5,marginLeft:5}}):e.jsx(e.Fragment,{}),e.jsx(d.Typography,{variant:"h5",children:i?.gridTitle?mo(s(i?.gridTitle)):""})]})]}),i?.gridLoadParameters&&i?.gridLoadParameters.length>0&&i?.gridLoadParametersValues&&i?.setGridLoadParametersValues?e.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},children:[e.jsx(d.AccordionSummary,{expandIcon:e.jsx(V.GridExpandMoreIcon,{}),children:e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),e.jsx(d.Typography,{component:"span",children:"Filters"})]})}),e.jsx(d.AccordionDetails,{children:e.jsx(d.Box,{children:e.jsx(Po,{saveButtonSpecs:{label:s("SEARCH_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success"},cancelButtonSpecs:{label:s("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{null!=e?i.setGridLoadParametersValues(e):i.setGridLoadParametersValues({}),i.apiActions.reloadData(e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:i.gridLoadParameters})})})]}):e.jsx(e.Fragment,{}),e.jsx(V.DataGridPremium,{...i?.muiProps,slots:{toolbar:bo},slotProps:{toolbar:{templateProps:{...i,rowSelectionModel:j,data:i?.data},handleCreateNewRecord:()=>{if("form"===i?.editMode?.editMode)b(i.editMode.specs.formRoute);else if("modal"===i?.editMode?.editMode)w(null),re(!0);else if("row"===i?.editMode?.editMode){xo-=1;const e={};e[q]=xo,e.isNew=!0;for(const t of r)"actions"!=t?.type&&t?.field!=q&&t?.field&&(e[t.field]=null);K((t=>[e,...t])),W((e=>({...e,[xo]:{mode:V.GridRowModes.Edit}})))}},clearGridState:()=>{i?.gridStateKey&&localStorage.removeItem(i.gridStateKey),I({}),y([]),R({}),h([]),D({left:[..."ltr"===_?Fo:[]],right:[..."rtl"===_?Fo:[]]})}}},getRowId:e=>e[q],showToolbar:!0,rows:i?.data,columns:le,checkboxSelection:!0,editMode:"row",rowModesModel:"row"==i.editMode.editMode?k:void 0,onRowModesModelChange:"row"==i.editMode.editMode?e=>{W(e)}:void 0,rowGroupingColumnMode:"multiple",processRowUpdate:async t=>{if("row"===i.editMode.editMode){let o=null;const a=(e=>{try{z.parse(e)}catch(e){console.log("validateRecord err",e);let t=null;return t=e instanceof v.z.ZodError?e.errors.map((e=>"Error in field ("+e.path+") : "+e.message)).join(","):"invalid record data",t}})(t);if(a){const t=a.split(",");throw A.toast.error(e.jsx("div",{style:{},children:t.map((t=>e.jsxs(e.Fragment,{children:[e.jsx("div",{children:t}),e.jsx(d.Divider,{})]})))})),new Error(a)}if(i?.editAction?.preActionValidation&&!i.editAction.preActionValidation(t))throw new Error("error on the configured presave validation");const r={...t};if(t[q]&&co(t[q])&&Number(t[q])<0&&(r[q]=null),o=await i.apiActions.saveRecord(r),null==o)throw new Error("Failed to process your request, contact your administrator");return i?.editAction?.postActionCallBack&&await i.editAction.postActionCallBack(t),!0===t?.isNew&&K((e=>{const i=e.filter((e=>e[q]!==t[q]));return[o,...i]})),!0===i?.editMode?.reloadAfterSave&&i?.apiActions?.reloadData&&i?.apiActions?.reloadData(i?.gridLoadParametersValues),o}},rowSelectionModel:j,onRowSelectionModelChange:e=>{Y(e)},columnVisibilityModel:E,onColumnVisibilityModelChange:e=>{I(e),i?.gridStateKey&&vo(i.gridStateKey,{columnVisibilityModel:e})},onColumnOrderChange:e=>{const{column:t,targetIndex:o}=e;y((e=>{const a=e.length?[...e]:ne.map((e=>e.field)),r=a.indexOf(t.field);return-1===r||(a.splice(r,1),a.splice(o,0,t.field),i?.gridStateKey&&vo(i.gridStateKey,{columnOrder:a})),a}))},onColumnWidthChange:e=>{const t={...N,[e.colDef.field]:e.width};R(t),i?.gridStateKey&&vo(i.gridStateKey,{columnWidths:t})},rowGroupingModel:L,onRowGroupingModelChange:e=>{(e=>{h(e),i?.gridStateKey&&vo(i.gridStateKey,{columnGroupingModel:e})})(e)},pinnedColumns:C,onPinnedColumnsChange:e=>{let t=e?.left||[];t=t.filter((e=>!Fo.includes(e)));let o=e?.right||[];o=o.filter((e=>!Fo.includes(e)));const a={left:[..."ltr"===_?Fo:[],...t],right:[..."rtl"===_?Fo:[],...o]};D(a),i?.gridStateKey&&vo(i.gridStateKey,{pinnedColumns:a})},sx:{width:"100%"}})]})},Bo=i=>{const{UserSession:o}=Ue(),a=t.useSelector((e=>e.AppLayout)),r=t.useDispatch(),{handlePostRequest:n}=Le(),[s,p]=l.useState(o.value.currentOrganization.id);return e.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",padding:1},children:[e.jsx(et,{sx:{width:"100%"},displayField:"ltr"===a.appDirection?"organizationEnName":"organizationArName",valueField:"id",label:"",options:o.value.userOrganizations,value:s,onChangeCallBack:e=>{p(e)}}),e.jsx(d.Button,{sx:{m:1},variant:"contained",disabled:null==s||s===o.value.currentOrganization.id,onClick:async()=>{await n({endPointURI:"api/auth/changeCurrentOrg",showMask:!0,parameters:{username:o.value.username,orgId:s},data:{},successCallBkFn:e=>{const t={...e.data,isAuthenticated:!0};r(Pe.setAuthenticated(t)),i.successChangeCallBackFn&&i.successChangeCallBackFn()}})},children:"Change Organization"})]})},ko=T.createSlice({name:"SideBar",initialState:{isOpened:!1},reducers:{toggleSideBarState:e=>{e.isOpened=!e.isOpened},setSideBarState:(e,t)=>{e.isOpened=t.payload}}}),{toggleSideBarState:Wo,setSideBarState:Go}=ko.actions;var jo=ko.reducer;const Vo=d.styled(c,{shouldForwardProp:e=>"open"!==e})((({theme:e})=>{const i=t.useSelector((e=>e.AppLayout)),o=me();return{transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),variants:[{props:({open:e})=>e,style:{width:o?void 0:"calc(100% - 350px)",marginLeft:o||"ltr"!==i.appDirection?void 0:"350px",marginRight:o||"rtl"!==i.appDirection?void 0:"350px",transition:e.transitions.create(["margin","width"],{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.enteringScreen})}}]}})),Yo=()=>{const{Window:i,setWindowState:o}=ve({windowTitle:"Change Current Organization",windowIcon:"globe",width:"fit-content",height:"fit-content"}),a=t.useSelector((e=>e.AppInfo.value)),r=t.useSelector((e=>e.AppLayout)),n=t.useSelector((e=>e.SideBar)),{UserSession:l}=Ue(),s=l.value.currentOrganization,{handleGetRequest:p}=Le(),c=me(),T=t.useDispatch();return e.jsxs(e.Fragment,{children:[e.jsx(i,{children:e.jsx(Bo,{successChangeCallBackFn:()=>{o(!1)}})}),e.jsx(Vo,{position:"fixed",open:n.isOpened,children:e.jsxs(u,{children:[e.jsx(d.IconButton,{color:"inherit","aria-label":"open drawer",onClick:()=>{T(Wo())},edge:"start",sx:[{mr:"ltr"===r.appDirection?2:void 0,ml:"rtl"===r.appDirection?2:void 0},n.isOpened&&{display:"none"}],children:e.jsx(m.FontAwesomeIcon,{icon:"bars"})}),e.jsx(d.Avatar,{src:a.appLogo,sx:{marginRight:1,marginLeft:1}}),e.jsx(d.Typography,{variant:"h6",noWrap:!0,component:"div",sx:{flex:1},children:c?"":`${a.appName} - ${"ltr"===r.appDirection?s?.organizationEnName:s?.organizationArName}`}),e.jsx(d.Tooltip,{title:"light"===r.themeMode?"Switch Theme to Dark":"Switch Theme to Light",children:e.jsx(d.IconButton,{color:"inherit",onClick:()=>{T(Ee.setThemeMode("light"===r.themeMode?"dark":"light")),localStorage.setItem("themeMode","light"===r.themeMode?"dark":"light")},children:"light"===r.themeMode?e.jsx(m.FontAwesomeIcon,{icon:"moon"}):e.jsx(m.FontAwesomeIcon,{icon:{prefix:"far",iconName:"sun"}})})}),e.jsx(d.Tooltip,{title:"ar"===E.language?"Change Language To English":"Change Language To Arabic",children:e.jsx(d.IconButton,{color:"inherit",onClick:()=>{let e="ar"===E.language?"en":"ar";var t;t=e,E.changeLanguage(t),localStorage.setItem("language",t),T(Ee.setAppDirection("ar"===e?"rtl":"ltr"))},children:e.jsx(m.FontAwesomeIcon,{icon:"language"})})}),l.value?.userOrganizations&&l.value?.userOrganizations.length>1?e.jsx(d.Tooltip,{title:"Change Current Organization",children:e.jsx(d.IconButton,{color:"inherit",onClick:()=>{o(!0)},children:e.jsx(m.FontAwesomeIcon,{icon:"globe"})})}):e.jsx(e.Fragment,{}),e.jsx(d.Avatar,{}),e.jsx("div",{style:{marginLeft:5,marginRight:5},children:c?"":l.value?.username}),e.jsx(d.IconButton,{color:"inherit",onClick:async()=>{try{await p({endPointURI:"api/auth/logout"})}catch(e){console.log("logout error",e)}T(Pe.setUnAuthenticated())},children:e.jsx(m.FontAwesomeIcon,{rotation:"rtl"===r.appDirection?180:void 0,icon:"arrow-right-from-bracket"})})]})})]})},qo=d.styled("div")((({theme:e})=>({display:"flex",alignItems:"center",...e.mixins.toolbar,justifyContent:"flex-end"}))),Ko=(e,t)=>{for(const i of t){if(i.id===e)return i;if(i.children){const t=Ko(e,i.children);if(t)return t}}},zo=[...[{id:"home",icon:"home",label:"Home",action:"NAVIGATION",actionPayload:{path:"/"}},{id:"system_admin",label:"System Administration",authority:"SYSTEM_ADMIN",icon:"cog",children:[{id:"development_admin.organization",label:"ORGANIZATION_PLURAL",authority:"DEVELOPMENT_ADMIN",icon:"globe",action:"NAVIGATION",actionPayload:{path:"admin/organizations"}},{id:"development_admin.SystemApplication",label:"SYSTEM_APPLICATION_PLURAL",authority:"DEVELOPMENT_ADMIN",icon:"window-restore",action:"NAVIGATION",actionPayload:{path:"admin/systemapplications"}},{id:"system_admin.Person",label:"PERSON_PLURAL",icon:"users",action:"NAVIGATION",actionPayload:{path:"admin/persons"}},{id:"system_admin.devtools",label:"DEVELOPMENT_TOOLS",icon:"code",children:[{id:"system_admin.devtools.DatasourceConnection",label:"DATASOURCE_CONNECTION_PLURAL",icon:"plug",action:"NAVIGATION",actionPayload:{path:"dev/datasourceconnections"}},{id:"system_admin.devtools.EntityParameter",label:"ENTITY_PARAMETER_PLURAL",icon:"p",action:"NAVIGATION",actionPayload:{path:"dev/entityparameters"}},{id:"system_admin.devtools.DataQuery",label:"DATA_QUERY_PLURAL",icon:"file-code",action:"NAVIGATION",actionPayload:{path:"dev/dataqueries"}},{id:"system_admin.devtools.Report",label:"REPORT_PLURAL",icon:"file",action:"NAVIGATION",actionPayload:{path:"dev/reports"}},{id:"system_admin.devtools.MailConfig",label:"Mail Sender Config",icon:{iconName:"paper-plane",prefix:"fas"},action:"NAVIGATION",actionPayload:{path:"dev/mailsender/config"}},{id:"system_admin.devtools.MailTemplate",label:"MAIL_TEMPLATE_PLURAL",icon:"envelope",action:"NAVIGATION",actionPayload:{path:"dev/mailtemplates"}},{id:"system_admin.devtools.WorkflowDocument",label:"WORKFLOW_DOCUMENT_PLURAL",icon:"chart-diagram",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocuments"}},{id:"system_admin.devtools.Widget",label:"WIDGET_PLURAL",icon:"chart-pie",action:"NAVIGATION",actionPayload:{path:"dev/widgets"}},{id:"system_admin.devtools.Dashboard",label:"DASHBOARD_PLURAL",icon:"square-poll-vertical",action:"NAVIGATION",actionPayload:{path:"dev/dashboards"}},{id:"system_admin.devtools.BluePrint",label:"BLUE_PRINT_PLURAL",icon:"fingerprint",action:"NAVIGATION",actionPayload:{path:"dev/blueprints"}},{id:"system_admin.devtools.Notification",label:"NOTIFICATION_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notifications"}}]},{id:"system_admin.followup",label:"SYSTEM_MONITORING",icon:"tv",children:[{id:"system_admin.WorkflowDocumentMailLog",label:"Action Mail Logs",icon:"envelopes-bulk",action:"NAVIGATION",actionPayload:{path:"dev/workflowdocumentmaillogs"}},{id:"system_admin.MailNotificationQueue",label:"Mail Notification Queue",icon:"envelope-open-text",action:"NAVIGATION",actionPayload:{path:"dev/mailnotificationqueues"}},{id:"system_admin.NotificationQueue",label:"NOTIFICATION_QUEUE_PLURAL",icon:"bell",action:"NAVIGATION",actionPayload:{path:"dev/notificationqueues"}}]}]}]];function Ho(){return e.jsx(S,{sx:{width:6,height:6,borderRadius:"70%",bgcolor:"warning.main",display:"inline-block",verticalAlign:"middle",zIndex:1,mx:1}})}const Qo=s.styled($.TreeItem2Root)((({theme:e})=>({color:e.palette.grey[400],position:"relative",[`& .${Q.treeItemClasses.groupTransition}`]:{marginLeft:e.spacing(2.5)},...e.applyStyles("light",{color:e.palette.grey[800]})}))),Zo=s.styled($.TreeItem2Content)((({theme:e})=>({flexDirection:"row-reverse",borderRadius:e.spacing(.7),marginBottom:e.spacing(.5),marginTop:e.spacing(.5),padding:e.spacing(.5),paddingRight:e.spacing(1),"&.Mui-expanded ":{"&:not(.Mui-focused, .Mui-selected, .Mui-selected.Mui-focused) .labelIcon":{color:e.palette.primary.dark,...e.applyStyles("light",{color:e.palette.primary.main})},"&::before":{content:'""',display:"block",position:"absolute",left:"16px",top:"44px",height:"calc(100% - 48px)",width:"1.5px",backgroundColor:e.palette.grey[700],...e.applyStyles("light",{backgroundColor:e.palette.grey[300]})}},"&:hover":{backgroundColor:s.alpha(e.palette.primary.main,.1),color:"white",...e.applyStyles("light",{color:e.palette.primary.main})},"&.Mui-focused, &.Mui-selected, &.Mui-selected.Mui-focused":{backgroundColor:e.palette.primary.dark,color:e.palette.primary.contrastText,...e.applyStyles("light",{backgroundColor:e.palette.primary.main})}}))),$o=K.animated(z);function Xo(t){const i=K.useSpring({to:{opacity:t.in?1:0,transform:`translate3d(0,${t.in?0:20}px,0)`}});return e.jsx($o,{style:i,...t})}const Jo=s.styled(D)({color:"inherit",fontWeight:500});function ea({icon:i,expandable:o,children:a,...r}){const{t:d}=f.useTranslation(),n=t.useSelector((e=>e.AppLayout));return e.jsxs($.TreeItem2Label,{...r,sx:{display:"flex",alignItems:"center",padding:1},children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:"ltr"===n.appDirection?7:void 0,marginLeft:"rtl"===n.appDirection?7:void 0,fontSize:"1.2rem"},icon:i}),e.jsx(Jo,{variant:"body2",sx:{fontSize:16},children:d(a)}),o&&e.jsx(Ho,{})]})}const ta=e=>Array.isArray(e)?e.length>0&&e.some(ta):Boolean(e),ia=ce.forwardRef((function(t,i){const{id:o,itemId:a,label:r,disabled:d,children:n,...l}=t,{getRootProps:s,getContentProps:p,getIconContainerProps:c,getCheckboxProps:u,getLabelProps:m,getGroupTransitionProps:T,getDragAndDropOverlayProps:A,status:_,publicAPI:E}=Z.useTreeItem2({id:o,itemId:a,children:n,label:r,disabled:d,rootRef:i}),f=E.getItem(a),I=ta(n);return e.jsx(J.TreeItem2Provider,{itemId:a,children:e.jsxs(Qo,{...s(l),children:[e.jsxs(Zo,{...p({className:lo("content",{"Mui-expanded":_.expanded,"Mui-selected":_.selected,"Mui-focused":_.focused,"Mui-disabled":_.disabled})}),children:[e.jsx($.TreeItem2IconContainer,{...c(),children:e.jsx(X.TreeItem2Icon,{status:_})}),e.jsx($.TreeItem2Checkbox,{...u()}),e.jsx(ea,{...m({icon:f?.icon||"book",expandable:I&&_.expanded})}),e.jsx(ee.TreeItem2DragAndDropOverlay,{...A()})]}),n&&e.jsx(Xo,{...T()})]})})}));function oa(){const i=B.useNavigate(),o=t.useSelector((e=>e.AppLayout)),a=t.useSelector((e=>e.AppInfo.value));t.useDispatch();const r=me(),{isUserAuthorized:d}=Ue(),n=e=>e.filter((e=>void 0===e.authority||null==e.authority||d(e.authority))).map((e=>(e.children&&(e.children=n(e.children)),e))),l=[];a.enableAdministrationModule&&l.push(...zo),l.push(...a.businessNavigationItems);const s=n(l);return e.jsx(H.RichTreeView,{items:s,onItemClick:(e,t)=>{const o=Ko(t,l);"NAVIGATION"!==o?.action||null==o?.actionPayload||void 0!==o.children&&null!==o.children&&0!=o.children.length||i(o?.actionPayload?.path||"")},sx:{height:"fit-content",flexGrow:1,maxWidth:Te,direction:o.appDirection,maxHeight:r?300:void 0,overflowY:"auto",overflowX:"auto"},slots:{item:ia}})}const aa=()=>{const i=t.useSelector((e=>e.AppInfo.value)),{UserSession:o}=Ue(),a=o.value.currentOrganization,r=d.useTheme(),n=t.useSelector((e=>e.AppLayout)),l=t.useSelector((e=>e.SideBar)),s=t.useDispatch();return e.jsxs(q,{sx:{width:Te,flexShrink:0,"& .MuiDrawer-paper":{width:Te,boxSizing:"border-box"}},variant:"persistent",anchor:"ltr"===n.appDirection?"left":"right",open:l.isOpened,children:[e.jsxs(qo,{children:[e.jsxs(d.Box,{sx:{width:"100%"},children:[e.jsx(d.Typography,{color:"primary",sx:{width:"100%",textAlign:"center",fontSize:18,fontWeight:"bold"},children:"System Content"}),e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1},children:[e.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:`${i.appName} - ${"ltr"===n.appDirection?a?.organizationEnName:a?.organizationArName}`}),e.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",i.appVersion]})]})]}),e.jsx(Y,{onClick:()=>{s(Wo())},children:"ltr"===r.direction?e.jsx(m.FontAwesomeIcon,{icon:"angle-left"}):e.jsx(m.FontAwesomeIcon,{icon:"angle-right"})})]}),e.jsx(P,{}),e.jsx(oa,{})]})},ra=oe({key:"muirtl",stylisPlugins:[ie.prefixer,te]}),da=oe({key:"mui"}),na=t=>{const[i,o]=l.useState(!0),[a,r]=l.useState([]),{handleGetRequest:n}=Le();l.useEffect((()=>{(async()=>{o(!0),await n({endPointURI:"api/v1/dev/query/result",showMask:!1,parameters:{queryId:t.dataQueryId,...t.parameterValues},successCallBkFn:e=>{o(!1),r(e.data)},failureCallBkFn:()=>{o(!1),r(null)}})})()}),[t.parameterValues]);let s=0;if(1==a.length&&(s=100),"CircularProgress"===t.widgetType||"LinearProgress"===t.widgetType)for(const e of a)s+=e[t.verticalAxisField];return e.jsxs(e.Fragment,{children:["LineChart"===t.widgetType||"PieChart"===t.widgetType||"ColumnChart"===t.widgetType?e.jsxs(d.Box,{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:t?.icon||"chart-pie"}),t?.title]}):e.jsx(e.Fragment,{}),e.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:i?e.jsxs(e.Fragment,{children:[e.jsx(m.FontAwesomeIcon,{icon:{prefix:"fas",iconName:"arrows-spin"},style:{marginRight:10,marginLeft:10},spin:!0,size:"2x"}),e.jsx("div",{children:"Loading"})]}):"ColumnChart"===t.widgetType?e.jsx(Ke,{data:a,widgetTitle:t.title,labelField:t.verticalAxisField,valueField:t.horizontalAxisField,valueLabel:t.horizontalAxisLabel,widgetType:"Line"}):"LineChart"===t.widgetType?e.jsx(Qe,{data:a,widgetTitle:t.title,labelField:t.verticalAxisField,valueField:t.horizontalAxisField,valueLabel:t.horizontalAxisLabel,widgetType:"Line"}):"PieChart"===t.widgetType?e.jsx(Xe,{data:a,widgetTitle:t.title,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,widgetType:"Line"}):e.jsxs(d.Grid2,{container:!0,sx:{width:"100%",alignItems:"flex-start",justifyContent:"flex-start"},spacing:2,size:{xs:12},children:[e.jsx(d.Grid2,{size:{xs:12},sx:{textAlign:"center"},children:t.title}),a.map(((i,o)=>"Card"===t.widgetType?e.jsx(d.Grid2,{size:{md:3,xs:12},children:e.jsx(ze,{widgetTitle:"",record:i,labelField:t.verticalAxisField,valueField:t.horizontalAxisField},o)}):"CircularProgress"===t.widgetType?e.jsx(d.Grid2,{size:{md:3,xs:12},children:e.jsx(He,{widgetTitle:"",record:i,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,total:s},o)}):"LinearProgress"===t.widgetType?e.jsx(d.Grid2,{size:{md:3,xs:12},children:e.jsx($e,{widgetTitle:"",record:i,labelField:t.horizontalAxisField,valueField:t.verticalAxisField,total:s},o)}):void 0))]})})]})},la=t=>{const[i,o]=l.useState({dashboardCode:"",dashboardName:"",dashboardTitle:"",dashboardParameters:[],widgets:[]}),[a,r]=l.useState(t?.parameters||{}),n=B.useNavigate(),{handleGetRequest:s,handlePostRequest:p}=Le();return l.useEffect((()=>{t.dashboardCode&&(async()=>{await s({endPointURI:"api/v1/dev/dashboard/metadata",showMask:!0,parameters:{dashboardCode:t.dashboardCode},successCallBkFn:e=>{o(e.data)},failureCallBkFn:()=>{o(null)}})})()}),[t.dashboardCode,t.parameters]),e.jsx(e.Fragment,{children:i?e.jsxs(e.Fragment,{children:[e.jsxs(d.Box,{sx:{fontSize:20,fontWeight:"bold",display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(d.IconButton,{onClick:()=>{n(-1,{replace:!0})},children:e.jsx(m.FontAwesomeIcon,{icon:"arrow-left"})}),e.jsx(d.Box,{sx:{flex:1}}),e.jsx(m.FontAwesomeIcon,{style:{marginLeft:10,marginRight:10},icon:"square-poll-vertical"}),e.jsx(d.Box,{children:i?.dashboardTitle}),e.jsx(d.Box,{sx:{flex:1}})]}),e.jsx(d.Grid2,{container:!0,spacing:1,sx:{flexGrow:1,overflowY:"auto",padding:1},children:i?.widgets.map(((t,i)=>e.jsx(d.Grid2,{sx:{alignItems:"center",justifyContent:"center",padding:1,display:"flex",overflow:"auto",flexDirection:"Card"!=t.widgetType?"column":void 0,height:t?.height||300},size:{md:t?.width,sm:12},children:e.jsx(na,{...t})},i)))})]}):e.jsx(d.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold"},children:"No Dashboard Found"})})},sa=t=>{const{t:i}=f.useTranslation(),{handleGetRequest:o}=Le(),[a,r]=l.useState([]),d=Ge({findAll:"api/v1/admin/organizationapplicationmodule/all",deleteById:"api/v1/admin/organizationapplicationmodule",save:"api/v1/admin/organizationapplicationmodule",findById:"api/v1/admin/organizationapplicationmodule",setData:r}),[n,s]=l.useState([]);l.useEffect((()=>{(async()=>{await o({endPointURI:"api/v1/admin/systemapplicationmodule/all",showMask:!0,successCallBkFn:e=>{s(e.data)}})})()}),[]);const p=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SYSTEM_APPLICATION_MODULE_ID",fieldName:"systemApplicationModuleId",required:!1,fieldType:"combobox",options:n,optionDisplayField:"moduleName",optionValueField:"id"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_APPLICATION_MODULE_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_SUBSCRIPTION_DATE",fieldName:"subscriptionDate",required:!0,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_EXPIRATION_DATE",fieldName:"expirationDate",required:!1,fieldType:"date"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_APPLICATION_MODULE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:d,data:a,gridLoadParametersValues:{organizationId:t?.selectedOrganization?.id},hideInfoBar:!0,setData:r,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"ORGANIZATION_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_EDIT",preActionValidation:async e=>(e.organizationId=t?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_APPLICATION_MODULE_DELETE"}})},pa=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=Ge({findAll:"api/v1/admin/organizationunittype/all",deleteById:"api/v1/admin/organizationunittype",save:"api/v1/admin/organizationunittype",findById:"api/v1/admin/organizationunittype",setData:a});return e.jsx(wo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{organizationId:t?.selectedOrganization?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_ID",hidden:!0,gridProps:{hidden:!0},fieldName:"organizationId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_ORGANIZATION_UNIT_TYPE_ORDER",fieldName:"organizationUnitTypeOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_CODE",fieldName:"unitTypeCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_AR_NAME",fieldName:"unitTypeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_UNIT_TYPE_EN_NAME",fieldName:"unitTypeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_TYPE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_TYPE_PLURAL",girdIcon:"tags",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_EDIT",preActionValidation:async e=>(e.organizationId=t?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_TYPE_DELETE"}})},ca=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=Ge({findAll:"api/v1/admin/organizationunit/all",deleteById:"api/v1/admin/organizationunit",save:"api/v1/admin/organizationunit",findById:"api/v1/admin/organizationunit",setData:a}),[d,n]=l.useState([]),{handleGetRequest:s}=Le();l.useEffect((()=>{(async()=>{await s({endPointURI:"api/v1/admin/organizationunittype/all",showMask:!0,parameters:{organizationId:t.selectedOrganization.id},successCallBkFn:e=>{n(e.data)}})})()}),[]);const p=[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_TYPE_ID",fieldName:"organizationUnitTypeId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"unitTypeEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_AR_NAME",fieldName:"organizationUnitArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_EN_NAME",fieldName:"organizationUnitEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ORGANIZATION_UNIT_PARENT_ID",fieldName:"organizationUnitParentId",required:!1,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"organizationUnitEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_UNIT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{organizationId:t?.selectedOrganization?.id},setData:a,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"ORGANIZATION_UNIT_PLURAL",girdIcon:"folder-tree",editAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_EDIT",preActionValidation:async e=>(e.organizationId=t?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_UNIT_DELETE"}})},ua=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=Ge({findAll:"api/v1/admin/organizationrank/all",deleteById:"api/v1/admin/organizationrank",save:"api/v1/admin/organizationrank",findById:"api/v1/admin/organizationrank",setData:a});return e.jsx(wo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{organizationId:t?.selectedOrganization?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_RANK_ORGANIZATION_ID",fieldName:"organizationId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_ORDER",fieldName:"rankOrder",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_CODE",fieldName:"rankCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_AR_NAME",fieldName:"rankArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_RANK_EN_NAME",fieldName:"rankEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_RANK_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_RANK_PLURAL",girdIcon:"street-view",editAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_EDIT",preActionValidation:async e=>(e.organizationId=t?.selectedOrganization?.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_RANK_DELETE"}})},ma=t=>{const[i,o]=l.useState([]),[a,r]=l.useState([]),{handlePostRequest:n,handleGetRequest:s}=Le();l.useEffect((()=>{t.selectedRecord&&(async()=>{await s({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:t.selectedRecord.id,organizationId:t.selectedRecord.organizationId},successCallBkFn:e=>{o(e.data.currentRoles),r(e.data.availableRoles)}})})()}),[t.selectedRecord]);return e.jsxs(e.Fragment,{children:[e.jsx(qe,{displayField:"appRoleDisplay",options:a,valueField:"id",selectedOptions:i,setSelection:o}),e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[e.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/organization/member/roles",showMask:!0,parameters:{orgMemberId:t.selectedRecord.id},data:i,successCallBkFn:()=>{A.toast.success("Your request has been proccesed successfully"),t.closeModalFn&&t.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),e.jsx(d.Button,{variant:"contained",color:"error",onClick:t.closeModalFn,children:"Cancel"})]})]})},Ta=i=>{const[o,a]=l.useState(null),{Window:r,setWindowState:d}=ve({windowIcon:"tag",windowTitle:"Organization Member Roles",width:"50%"}),n=t.useSelector((e=>e.commonStores.stores.SystemOrganizations.data)),s=t.useSelector((e=>e.commonStores.stores.SystemOrganizationRanks.data)),p=t.useSelector((e=>e.commonStores.stores.SystemOrganizationUnits.data)),{t:c}=f.useTranslation(),[u,m]=l.useState([]),T=Ge({findAll:"api/v1/admin/organizationmember/all",deleteById:"api/v1/admin/organizationmember",save:"api/v1/admin/organizationmember",findById:"api/v1/admin/organizationmember",setData:m}),A=[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_IS_DEFAULT",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_ID",fieldName:"organizationId",required:!0,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"organizationEnName"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_RANK_ID",fieldName:"organizationRankId",required:!1,fieldType:"combobox",options:s,optionValueField:"id",optionDisplayField:"rankDisplay"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ORGANIZATION_UNIT_ID",fieldName:"organizationUnitId",required:!1,fieldType:"combobox",options:p,optionValueField:"id",optionDisplayField:"fullPath"}},{type:"field",mode:"props",props:{fieldLabel:"Membership number",fieldName:"organizationMembershipNumber",fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"ORGANIZATION_MEMBER_PERSON_ID",fieldName:"personId",required:!1,fieldType:"number"}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(ma,{selectedRecord:o,closeModalFn:()=>{d(!1)}})}),e.jsx(wo,{apiActions:T,hideInfoBar:!0,data:u,setData:m,editMode:{editMode:"row"},formElements:A,rowActions:[{icon:"tag",label:"Roles",actionFn:async e=>{a(e),d(!0)}}],gridLoadParametersValues:{personId:i.selectedPerson.id},keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_EDIT",preActionValidation:async e=>(e.personId=i.selectedPerson.id,!0)},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_DELETE"}})]})},Aa=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=Ge({findAll:"api/v1/admin/systemapplicationmodule/application/all",deleteById:"api/v1/admin/systemapplicationmodule",save:"api/v1/admin/systemapplicationmodule",findById:"api/v1/admin/systemapplicationmodule",setData:a});return e.jsx(wo,{apiActions:r,data:o,gridLoadParametersValues:{applicationId:t?.selectedApplication?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_CODE",fieldName:"moduleCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_NAME",fieldName:"moduleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_MODULE_DESCRIPTION",fieldName:"moduleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_MODULE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}],keyColumnName:"id",hideInfoBar:!0,gridTitle:"SYSTEM_APPLICATION_MODULE_PLURAL",girdIcon:"layer-group",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_EDIT",preActionValidation:async e=>(e.systemApplicationId=t?.selectedApplication?.id,!0)},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_MODULE_DELETE"}})},_a=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=Ge({findAll:"api/v1/admin/systemapplicationauthority/all",deleteById:"api/v1/admin/systemapplicationauthority",save:"api/v1/admin/systemapplicationauthority",findById:"api/v1/admin/systemapplicationauthority",setData:a}),[d,n]=l.useState([]),{handleGetRequest:s}=Le();l.useEffect((()=>{(async()=>{await s({endPointURI:"api/v1/admin/systemapplicationmodule/application/all",showMask:!0,parameters:{applicationId:t.selectedApplication.id},successCallBkFn:e=>{n(e.data)}})})()}),[]);const p=[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_SYSTEM_MODULE_ID",fieldName:"systemModuleId",required:!1,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"moduleName"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_NAME",fieldName:"authorityName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_CODE",fieldName:"authorityCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_AUTHORITY_DESCRIPTION",fieldName:"authorityDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{applicationId:t?.selectedApplication?.id},setData:a,editMode:{editMode:"row"},formElements:p,keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_AUTHORITY_PLURAL",girdIcon:"key",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_EDIT",preActionValidation:async e=>(e.systemApplicationId=t?.selectedApplication?.id,!0)},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_AUTHORITY_DELETE"}})},Ea=t=>{const[i,o]=l.useState([]),[a,r]=l.useState([]),{handlePostRequest:n,handleGetRequest:s}=Le();l.useEffect((()=>{t.roleId&&t.appId&&(async()=>{await s({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{appId:t.appId,roleId:t.roleId},successCallBkFn:e=>{o(e.data.selectedAuthorities),r(e.data.availableAuthorities)}})})()}),[t.roleId,t.appId]);return e.jsxs(e.Fragment,{children:[e.jsx(qe,{displayField:"authorityName",options:a,valueField:"id",selectedOptions:i,setSelection:o}),e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[e.jsx(d.Button,{variant:"contained",onClick:async()=>{await n({endPointURI:"api/v1/admin/systemApplicationRoleAuthorities",showMask:!0,parameters:{roleId:t.roleId},data:i,successCallBkFn:()=>{A.toast.success("Your request has been proccesed successfully"),t.closeModalFn&&t.closeModalFn()}})},sx:{marginRight:1,marginLeft:1},children:"Save"}),e.jsx(d.Button,{variant:"contained",color:"error",onClick:t.closeModalFn,children:"Cancel"})]})]})},fa=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),[r,d]=l.useState(null),{Window:n,setWindowState:s}=ve({windowTitle:"System Application Role Authorities",windowIcon:"key",width:"50%"}),p=Ge({findAll:"api/v1/admin/systemapplicationrole/all",deleteById:"api/v1/admin/systemapplicationrole",save:"api/v1/admin/systemapplicationrole",findById:"api/v1/admin/systemapplicationrole",setData:a});return e.jsxs(e.Fragment,{children:[e.jsx(n,{children:e.jsx(Ea,{appId:t.selectedApplication.id,roleId:r?.id,closeModalFn:()=>{s(!1)}})}),e.jsx(wo,{apiActions:p,data:o,hideInfoBar:!0,gridLoadParametersValues:{applicationId:t?.selectedApplication?.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_SYSTEM_APPLICATION_ID",fieldName:"systemApplicationId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_NAME",fieldName:"roleName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_ROLE_DESCRIPTION",fieldName:"roleDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_PLURAL",girdIcon:"tag",rowActions:[{icon:"key",actionFn:async e=>{d(e),s(!0)},label:"Authorities"}],editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_EDIT",preActionValidation:async e=>(e.systemApplicationId=t?.selectedApplication?.id,!0)},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_DELETE"}})]})},Ia=i=>{const o=t.useSelector((e=>e.commonStores.stores.SystemOrganizations.data)),{t:a}=f.useTranslation(),[r,d]=l.useState([]),n=Ge({findAll:"api/v1/dev/lookup/all",deleteById:"api/v1/dev/lookup",save:"api/v1/dev/lookup",findById:"api/v1/dev/lookup",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"Organization",fieldName:"organizationId",options:o,optionDisplayField:"organizationEnName",optionValueField:"id",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_TYPE",fieldName:"lookupType",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_AR_DISPLAY",fieldName:"lookupArDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_EN_DISPLAY",fieldName:"lookupEnDisplay",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_LOOKUP_VALUE",fieldName:"lookupValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"LOOKUP_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"System Application",fieldName:"systemApplicationId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return e.jsx(wo,{apiActions:n,data:r,setData:d,hideInfoBar:!0,gridLoadParametersValues:{systemApplicationId:i.selectedApplication.id},editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:a("LOOKUP_PLURAL"),girdIcon:"list-check",editAction:{isEnabled:!0,authority:"LOOKUP_EDIT",preActionValidation:e=>(e.systemApplicationId=i.selectedApplication.id,!0)},deleteAction:{isEnabled:!0,authority:"LOOKUP_DELETE"}})},Oa=i=>{const o=t.useSelector((e=>e.commonStores.stores.SystemEntityParameters.data)),{t:a}=f.useTranslation(),[r,d]=l.useState([]),n=Ge({findAll:"api/v1/dev/dataqueryparameter/all",deleteById:"api/v1/dev/dataqueryparameter",save:"api/v1/dev/dataqueryparameter",findById:"api/v1/dev/dataqueryparameter",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DATA_QUERY_ID",fieldName:"dataQueryId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:o,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:n,data:r,setData:d,editMode:{editMode:"row"},hideInfoBar:!0,formElements:s,keyColumnName:"id",gridLoadParametersValues:{dataQueryId:i.selectedRecord.id},gridTitle:a("DATA_QUERY_PARAMETER_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_EDIT",preActionValidation:async e=>(e.dataQueryId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_PARAMETER_DELETE"}})},ya=i=>{const{t:o}=f.useTranslation(),a=t.useSelector((e=>e.commonStores.stores.SystemEntityParameters.data)),[r,d]=l.useState([]),n=Ge({findAll:"api/v1/dev/reportparameter/all",deleteById:"api/v1/dev/reportparameter",save:"api/v1/dev/reportparameter",findById:"api/v1/dev/reportparameter",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENTITY_PARAMETER_ID",fieldName:"entityParameterId",required:!0,fieldType:"combobox",options:a,optionValueField:"id",optionDisplayField:"parameterCode"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_DEFAULT_VALUE",fieldName:"defaultValue",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_HIDDEN",fieldName:"hidden",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_MANDATORY",fieldName:"mandatory",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_PARAMETER_REPORT_ID",fieldName:"reportId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}}];return e.jsx(wo,{apiActions:n,data:r,hideInfoBar:!0,setData:d,gridLoadParametersValues:{reportId:i.selectedRecord.id},editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:o("REPORT_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"REPORT_PARAMETER_EDIT",preActionValidation:async e=>(e.reportId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"REPORT_PARAMETER_DELETE"}})},Na=e=>{if(0===e.length)return[];const t=[];for(const i of Object.keys(e[0])){const e={type:"field",mode:"props",props:{fieldLabel:i,fieldName:i,fieldType:"text"}};t.push(e)}return console.log("formElements",t),t},Ra=t=>(console.log("reportdata",t.reportData),e.jsx(wo,{data:t.reportData,disableDefaultAction:!0,setData:t.setReportData,formElements:Na(t.reportData),gridLoadParameters:t.gridLoadParameters,gridLoadParametersValues:t.gridLoadParametersValues,setGridLoadParametersValues:t.setGridLoadParametersValues,editMode:{editMode:"none"},girdIcon:"file-excel",gridTitle:"Report",autoLoad:!0,hideInfoBar:!0,apiActions:{deleteRecordById:async()=>!0,loadRecordById:async()=>{},reloadData:async()=>{t.reloadReport()},saveRecord:async()=>{}}})),La=t=>{const[i,o]=l.useState(null),[a,r]=l.useState(null),[n,s]=l.useState([]),[p,c]=l.useState("WAITING_REPORT_CODE"),{handleGetRequest:u,handlePostRequest:T,HandleDownloadHTTPPostPDF:A}=Le(),[_,E]=l.useState(null),[I,O]=l.useState({...t?.reportParametersValues}),[y,N]=l.useState([]),{t:R}=f.useTranslation(),L=e=>{const t=[];for(const i of e){const e={type:"field",mode:"props",props:{fieldLabel:i?.parameterLabel,fieldName:i?.parameterCode,fieldType:i?.parameterType,hidden:i?.hidden,formProps:{fieldSize:{lg:4,md:6,sm:12}},required:i?.mandatory,defaultValue:I[i?.parameterCode]||i?.defaultValue}};t.push(e)}return t},h=async(e,i)=>{c("WAITING_RESULT"),"Excel"===e?.reportType?await T({endPointURI:"api/v1/dev/report/run",showMask:!0,data:{reportCode:t.reportCode,parameters:i,resultMode:t.resultMode,jasperOutPutFileType:t.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT"),s(e.data)}}):e?.reportType&&await A({endPointURI:"api/v1/dev/report/run",showMask:!0,data:{reportCode:t.reportCode,parameters:i,resultMode:t.resultMode,jasperOutPutFileType:t.jasperOutPutFileType},successCallBkFn:e=>{c("SHOWING_RESULT");const t=e.headers["content-disposition"];let i="downloaded_file";if(t&&-1!==t.indexOf("filename=")){const e=t.match(/filename="?([^"]+)"?/);e&&e[1]&&(i=e[1])}if(i.includes("pdf")){const t=new Blob([e.data],{type:"application/pdf"}),i=URL.createObjectURL(t);o(i)}else{const t=new Blob([e.data],{type:e.headers["content-type"]}),o=window.URL.createObjectURL(t),a=document.createElement("a");a.href=o,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(o)}console.log(e)},failureCallBkFn:e=>{r("Failed To run report ... contact your administrator"),c("ERROR")}})};return l.useEffect((()=>{t?.reportCode&&(async()=>{c("LOADING_METADATA"),await u({endPointURI:"api/v1/dev/report/metadata",showMask:!0,parameters:{reportCode:t.reportCode},successCallBkFn:e=>{E(e.data),N(L(e.data.reportParameters)),!0===t?.byPassParameterEntry||0==e.data.reportParameters.length?(h(e.data,I),c("WAITING_RESULT")):c("WAITING_PARAMETER_INPUT")},failureCallBkFn:e=>{r("Failed loading report metadata ... contact your administrator"),c("ERROR")}})})()}),[t.reportCode,t.byPassParameterEntry,t.reportParametersValues,t.jasperOutPutFileType,t.resultMode]),e.jsxs(e.Fragment,{children:[e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%"},children:[e.jsxs(d.Box,{sx:{flex:1,textAlign:"center",marginBottom:1},children:[e.jsx(m.FontAwesomeIcon,{icon:"Excel"===_?.reportType?"file-excel":"file-pdf",color:"Excel"===_?.reportType?"darkgreen":"darkred",style:{marginRight:10,marginLeft:10}}),_?.reportName]}),"Excel"!=_?.reportType&&"SHOWING_RESULT"===p?e.jsxs(e.Fragment,{children:[!0===t?.byPassParameterEntry?e.jsx(e.Fragment,{}):y.length>0?e.jsx(d.IconButton,{onClick:()=>{N(L(_.reportParameters)),c("WAITING_PARAMETER_INPUT")},children:e.jsx(m.FontAwesomeIcon,{icon:"filter"})}):e.jsx(e.Fragment,{}),e.jsx(d.IconButton,{children:e.jsx(m.FontAwesomeIcon,{icon:"refresh",onClick:()=>{h(_,I)}})})]}):e.jsx(e.Fragment,{})]}),e.jsx(d.Box,{sx:{flexGrow:1,width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start"},children:"WAITING_PARAMETER_INPUT"===p&&"Excel"!=_?.reportType?e.jsxs(d.Accordion,{defaultExpanded:!0,sx:{width:"100%"},expanded:!0,children:[e.jsx(d.AccordionSummary,{children:e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{style:{marginLeft:5,marginRight:5},icon:"search"}),e.jsx(d.Typography,{component:"span",children:"Filters"})]})}),e.jsx(d.AccordionDetails,{children:e.jsx(d.Box,{children:e.jsx(Po,{saveButtonSpecs:{label:R("SHOW_REPORT_BTN_LABEL"),icon:"search",actionButtonVariant:"outlined",actionButtonColor:"success",hidden:!0},cancelButtonSpecs:{label:R("RESET_BTN_LABEL"),icon:"eraser",actionButtonVariant:"outlined",actionButtonColor:"error"},apiActions:{deleteRecordById:async()=>!0,saveRecord:async e=>{O(null!=e?e:{}),h(_,e)},reloadData:async()=>{},loadRecordById:async()=>{}},elements:y})})})]}):"SHOWING_RESULT"===p||("WAITING_PARAMETER_INPUT"===p||"WAITING_RESULT"===p)&&"Excel"===_?.reportType?"Excel"===_?.reportType?e.jsx(Ra,{reportData:n,setReportData:s,reloadReport:async()=>{h(_,I)},gridLoadParameters:y,gridLoadParametersValues:I,setGridLoadParametersValues:O}):e.jsx("iframe",{src:i,width:"100%",height:"100%",title:"PDF Preview",style:{border:"1px solid #ccc",marginTop:"20px"}}):"ERROR"===p?e.jsxs(d.Box,{sx:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:[e.jsx(m.FontAwesomeIcon,{icon:"circle-exclamation",color:"darkred",style:{marginRight:10,marginLeft:10}}),a]}):e.jsx(e.Fragment,{})})]})},ha={Blueprint:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!0,isVisible:!0},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!1,isVisible:!1},reportJasperPath:{isMandatory:!1,isVisible:!1}},Jasper:{useSysDatasource:{isMandatory:!1,isVisible:!0},datasourceConId:{isMandatory:!1,isVisible:!0},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!1,isVisible:!1},reportJasperName:{isMandatory:!0,isVisible:!0},reportJasperPath:{isMandatory:!0,isVisible:!0}},Excel:{useSysDatasource:{isMandatory:!1,isVisible:!1},datasourceConId:{isMandatory:!1,isVisible:!1},reportBluePrintId:{isMandatory:!1,isVisible:!1},reportExcelDataQueryId:{isMandatory:!0,isVisible:!0},reportJasperName:{isMandatory:!1,isVisible:!1},reportJasperPath:{isMandatory:!1,isVisible:!1}}},Pa=(e,t,i)=>{if(e&&ha[e]){const o=ha[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("useSysDatasource"),t.hideField("datasourceConId"),t.hideField("reportBluePrintId"),t.hideField("reportExcelDataQueryId"),t.hideField("reportJasperName"),t.hideField("reportJasperPath"),i.setValue("useSysDatasource",null),i.setValue("datasourceConId",null),i.setValue("reportBluePrintId",null),i.setValue("reportExcelDataQueryId",null),i.setValue("reportJasperName",null),i.setValue("reportJasperPath",null)},Ma=t=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=Ge({findAll:"api/v1/dev/mailrecipient/all",deleteById:"api/v1/dev/mailrecipient",save:"api/v1/dev/mailrecipient",findById:"api/v1/dev/mailrecipient",setData:a});return e.jsx(wo,{apiActions:r,data:o,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:t.selectedRecord.id},setData:a,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_TYPE",fieldName:"recipientType",required:!0,fieldType:"combobox",options:[{value:"To"},{value:"CC"}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_RECIPIENT_MAIL",fieldName:"recipientMail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_RECIPIENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:i("MAIL_RECIPIENT_PLURAL"),girdIcon:"users",editAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_EDIT",preActionValidation:e=>e?.recipientMail&&!To(e.recipientMail)?(A.toast.error("You must enter a valid email address"),!1):(e.mailTemplateId=t.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_RECIPIENT_DELETE"}})},Ca=i=>{const{t:o}=f.useTranslation(),[a,r]=l.useState([]),d=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),n=Ge({findAll:"api/v1/dev/mailbody/all",deleteById:"api/v1/dev/mailbody",save:"api/v1/dev/mailbody",findById:"api/v1/dev/mailbody",setData:r}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_NAME",fieldName:"bodyName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_ORDER",fieldName:"bodyOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT",fieldName:"bodyContent",required:!0,fieldType:"html"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_BODY_CONTENT_DATA_QUERY_ID",fieldName:"bodyContentDataQueryId",required:!1,fieldType:"combobox",options:d,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_PRINT_FOR_EACH_RECORD",fieldName:"printForEachRecord",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_IS_MAIN",fieldName:"isMain",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_BODY_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return e.jsx(wo,{apiActions:n,data:a,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:i.selectedRecord.id},setData:r,editMode:{editMode:"modal",specs:{modalIcon:{prefix:"fas",iconName:"envelope-open-text"},modalTitle:"Mail Body",modalWidth:"50%"}},formElements:s,keyColumnName:"id",gridTitle:o("MAIL_BODY_PLURAL"),girdIcon:{prefix:"fas",iconName:"envelope-open-text"},editAction:{isEnabled:!0,authority:"MAIL_BODY_EDIT",preActionValidation:async e=>(e.mailTemplateId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_BODY_DELETE"}})},Da=i=>{const o=t.useSelector((e=>e.commonStores.stores.SystemReports.data)),{t:a}=f.useTranslation(),[r,d]=l.useState([]),n=Ge({findAll:"api/v1/dev/mailattachment/all",deleteById:"api/v1/dev/mailattachment",save:"api/v1/dev/mailattachment",findById:"api/v1/dev/mailattachment",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{options:o,optionValueField:"id",optionDisplayField:"reportName",fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportId",required:!0,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_ATTACHMENT_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}}];return e.jsx(wo,{apiActions:n,data:r,hideInfoBar:!0,gridLoadParametersValues:{mailTemplateId:i.selectedRecord.id},setData:d,editMode:{editMode:"row"},formElements:s,keyColumnName:"id",gridTitle:a("MAIL_ATTACHMENT_PLURAL"),girdIcon:"paperclip",editAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_EDIT",preActionValidation:e=>(e.mailTemplateId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"MAIL_ATTACHMENT_DELETE"}})},Sa={Gmail:{mailHost:{isMandatory:!0,isVisible:!0},mailPort:{isMandatory:!0,isVisible:!0},mailUsername:{isMandatory:!0,isVisible:!0},mailPassword:{isMandatory:!0,isVisible:!0},mailProtocol:{isMandatory:!0,isVisible:!0},isMailSmtpAuthEnabled:{isMandatory:!0,isVisible:!0},isMailStarttlsEnabled:{isMandatory:!0,isVisible:!0},isSmtpSSlEnabled:{isMandatory:!0,isVisible:!0},azureGraphApiClientId:{isMandatory:!1,isVisible:!1},azureGraphApiClientSecret:{isMandatory:!1,isVisible:!1},azureGraphApiTenantId:{isMandatory:!1,isVisible:!1},azureGraphApiScope:{isMandatory:!1,isVisible:!1},azureGraphApiEmailId:{isMandatory:!1,isVisible:!1}},Azure:{mailHost:{isMandatory:!1,isVisible:!1},mailPort:{isMandatory:!1,isVisible:!1},mailUsername:{isMandatory:!1,isVisible:!1},mailPassword:{isMandatory:!1,isVisible:!1},mailProtocol:{isMandatory:!1,isVisible:!1},isMailSmtpAuthEnabled:{isMandatory:!1,isVisible:!1},isMailStarttlsEnabled:{isMandatory:!1,isVisible:!1},isSmtpSSlEnabled:{isMandatory:!1,isVisible:!1},azureGraphApiClientId:{isMandatory:!0,isVisible:!0},azureGraphApiClientSecret:{isMandatory:!0,isVisible:!0},azureGraphApiTenantId:{isMandatory:!0,isVisible:!0},azureGraphApiScope:{isMandatory:!0,isVisible:!0},azureGraphApiEmailId:{isMandatory:!0,isVisible:!0}}},ba=(e,t,i)=>{if(e&&Sa[e]){const o=Sa[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("mailHost"),i.setValue("mailHost",null),t.hideField("mailPort"),i.setValue("mailPort",null),t.hideField("mailUsername"),i.setValue("mailUsername",null),t.hideField("mailPassword"),i.setValue("mailPassword",null),t.hideField("mailProtocol"),i.setValue("mailProtocol",null),t.hideField("isMailSmtpAuthEnabled"),i.setValue("isMailSmtpAuthEnabled",null),t.hideField("isMailStarttlsEnabled"),i.setValue("isMailStarttlsEnabled",null),t.hideField("isSmtpSSlEnabled"),i.setValue("isSmtpSSlEnabled",null),t.hideField("azureGraphApiClientId"),i.setValue("azureGraphApiClientId",null),t.hideField("azureGraphApiClientSecret"),i.setValue("azureGraphApiClientSecret",null),t.hideField("azureGraphApiTenantId"),i.setValue("azureGraphApiTenantId",null),t.hideField("azureGraphApiScope"),i.setValue("azureGraphApiScope",null),t.hideField("azureGraphApiEmailId"),i.setValue("azureGraphApiEmailId",null)},ga=i=>{const{t:o}=f.useTranslation(),[a,r]=l.useState([]),d=Ge({findAll:"api/v1/dev/workflowdocumentstatus/all",deleteById:"api/v1/dev/workflowdocumentstatus",save:"api/v1/dev/workflowdocumentstatus",findById:"api/v1/dev/workflowdocumentstatus",setData:r}),n=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_CODE",fieldName:"documentStatusCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status Arabic Name",fieldName:"documentStatusArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Status English Name",fieldName:"documentStatusEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_DOCUMENT_STATUS_ORDER",fieldName:"documentStatusOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_IS_ZERO_STATE",fieldName:"isZeroState",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Next Actions Query (must return array of actions in table named workflow_document_action)",fieldName:"nextActionsQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Query (must return array of persons in table named person)",fieldName:"nextActionTakersQueryId",required:!1,fieldType:"combobox",options:n,optionValueField:"id",optionDisplayField:"queryName",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Next Action Takers Authority",fieldName:"nextActionTakersAuthority",fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_STATUS_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:d,data:a,setData:r,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:i.selectedRecord.id},editMode:{editMode:"modal",specs:{modalIcon:"tag",modalTitle:"Workflow Document Status",modalWidth:600}},formElements:s,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_STATUS_PLURAL"),girdIcon:"tags",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_EDIT",preActionValidation:e=>(e.workflowDocumentId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_STATUS_DELETE"}})},xa=i=>{const{t:o}=f.useTranslation(),[a,r]=l.useState([]),d=Ge({findAll:"api/v1/dev/workflowdocumentactionmail/all",deleteById:"api/v1/dev/workflowdocumentactionmail",save:"api/v1/dev/workflowdocumentactionmail",findById:"api/v1/dev/workflowdocumentactionmail",setData:r}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_DOCUMENT_ACTION_ID",fieldName:"documentActionId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!0,fieldType:"combobox",options:t.useSelector((e=>e.commonStores.stores.SystemMailTemplates.data)),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_MAIL_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:d,data:a,hideInfoBar:!0,gridLoadParametersValues:{actionId:i.selectedRecord.id},setData:r,editMode:{editMode:"row"},formElements:n,keyColumnName:"id",gridTitle:o("WORKFLOW_DOCUMENT_ACTION_MAIL_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_EDIT",preActionValidation:e=>(e.documentActionId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_MAIL_DELETE"}})},Ua=t=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=ve({windowTitle:"Action Mail Notification",windowIcon:"envelope",width:"50%"}),{t:d}=f.useTranslation(),{handleGetRequest:n}=Le(),[s,p]=l.useState([]);l.useEffect((()=>{(async()=>{await n({endPointURI:"api/v1/dev/workflowdocumentstatus/all",showMask:!0,parameters:{workflowDocumentId:t.selectedRecord.id},successCallBkFn:e=>{p(e.data)}})})()}),[t.selectedRecord]);const[c,u]=l.useState([]),m=Ge({findAll:"api/v1/dev/workflowdocumentaction/all",deleteById:"api/v1/dev/workflowdocumentaction",save:"api/v1/dev/workflowdocumentaction",findById:"api/v1/dev/workflowdocumentaction",setData:u}),T=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_DOCUMENT_ACTION_CODE",fieldName:"documentActionCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action Arabic Name",fieldName:"documentActionArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Action English Name",fieldName:"documentActionEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_NEXT_DOCUMENT_STATUS_ID",fieldName:"nextDocumentStatusId",required:!0,fieldType:"combobox",options:s,optionDisplayField:"documentStatusCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"Post Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"postActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Pre Action Endpoint ( system will call it with post method and parameters refDocumentId , workflowActionId)",fieldName:"preActionEndpoint",required:!1,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_REQUIRE_COMMENT",fieldName:"requireComment",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ACTION_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(xa,{selectedRecord:i})}),e.jsx(wo,{apiActions:m,data:c,hideInfoBar:!0,gridLoadParametersValues:{workflowDocumentId:t.selectedRecord.id},setData:u,editMode:{editMode:"modal",specs:{modalIcon:"stamp",modalTitle:"Workflow Document Action",modalWidth:700}},rowActions:[{label:"Action Mail Notifications",icon:"envelope",actionFn:async e=>{o(e),r(!0)}}],formElements:T,keyColumnName:"id",gridTitle:d("WORKFLOW_DOCUMENT_ACTION_PLURAL"),girdIcon:"stamp",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_EDIT",preActionValidation:e=>(e.workflowDocumentId=t.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_ACTION_DELETE"}})]})},va={LineChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},ColumnChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!0,isVisible:!0},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!0,isVisible:!0}},PieChart:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},Card:{height:{isMandatory:!0,isVisible:!0},width:{isMandatory:!0,isVisible:!0},horizontalAxisField:{isMandatory:!0,isVisible:!0},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!0,isVisible:!0},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},CircularProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}},LinearProgress:{height:{isMandatory:!1,isVisible:!1},width:{isMandatory:!1,isVisible:!1},horizontalAxisField:{isMandatory:!1,isVisible:!1},horizontalAxisLabel:{isMandatory:!1,isVisible:!1},seriesKeys:{isMandatory:!1,isVisible:!1},verticalAxisField:{isMandatory:!1,isVisible:!1},verticalAxisLabel:{isMandatory:!1,isVisible:!1}}},Fa=(e,t,i)=>{if(e&&va[e]){const o=va[e],a=Object.keys(o);for(const e of a){o[e].isVisible?t.showField(e):(t.hideField(e),i.setValue(e,null))}}else t.hideField("height"),i.setValue("height",null),t.hideField("width"),i.setValue("width",null),t.hideField("horizontalAxisField"),i.setValue("horizontalAxisField",null),t.hideField("horizontalAxisLabel"),i.setValue("horizontalAxisLabel",null),t.hideField("seriesKeys"),i.setValue("seriesKeys",null),t.hideField("verticalAxisField"),i.setValue("verticalAxisField",null),t.hideField("verticalAxisLabel"),i.setValue("verticalAxisLabel",null)},wa=i=>{const{t:o}=f.useTranslation(),[a,r]=l.useState([]),d=t.useSelector((e=>e.commonStores.stores.SystemWidgets.data)),n=Ge({findAll:"api/v1/dev/dashboardwidget/all",deleteById:"api/v1/dev/dashboardwidget",save:"api/v1/dev/dashboardwidget",findById:"api/v1/dev/dashboardwidget",setData:r}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_DASHBOARD_ID",fieldName:"dashboardId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ID",fieldName:"widgetId",required:!0,fieldType:"combobox",options:d,optionValueField:"id",optionDisplayField:"widgetName"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_WIDGET_ORDER",fieldName:"widgetOrder",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:n,data:a,setData:r,editMode:{editMode:"row"},hideInfoBar:!0,formElements:s,gridLoadParametersValues:{dashboardId:i.selectedRecord.id},keyColumnName:"id",gridTitle:o("DASHBOARD_WIDGET_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_EDIT",preActionValidation:async e=>(e.dashboardId=i.selectedRecord.id,!0)},deleteAction:{isEnabled:!0,authority:"DASHBOARD_WIDGET_DELETE"}})},Ba=[{path:"/",component:()=>e.jsx(la,{dashboardCode:"XX_TEMPLATE_DASHBOARD"})},...[...[{path:"admin/organizations",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=Ge({findAll:"api/v1/admin/organization/all",deleteById:"api/v1/admin/organization",save:"api/v1/admin/organization",findById:"api/v1/admin/organization",setData:o}),{Window:r,setWindowState:d}=ve({windowTitle:"Organization Subscriped Application Modules",windowIcon:"layer-group"}),{Window:n,setWindowState:s}=ve({windowTitle:"Organization Unit Types",windowIcon:"tags"}),{Window:p,setWindowState:c}=ve({windowTitle:"Organization Units",windowIcon:"folder-tree"}),{Window:u,setWindowState:m}=ve({windowTitle:"Organization Ranks",windowIcon:"street-view"}),[T,A]=l.useState(null);return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(sa,{selectedOrganization:T})}),e.jsx(n,{children:e.jsx(pa,{selectedOrganization:T})}),e.jsx(p,{children:e.jsx(ca,{selectedOrganization:T})}),e.jsx(u,{children:e.jsx(ua,{selectedOrganization:T})}),e.jsx(wo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},rowActions:[{icon:"layer-group",actionFn:async e=>{A(e),d(!0)},label:"modules"},{icon:"tags",actionFn:async e=>{A(e),s(!0)},label:"Organization Unit Types"},{icon:"folder-tree",actionFn:async e=>{A(e),c(!0)},label:"Organization Units"},{icon:"street-view",actionFn:async e=>{A(e),m(!0)},label:"Organization Ranks"}],formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_CODE",fieldName:"organizationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_AR_NAME",fieldName:"organizationArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_ORGANIZATION_EN_NAME",fieldName:"organizationEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Status",fieldName:"status",fieldType:"lookup",lookupType:"STATUS"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_PLURAL",girdIcon:"globe",editAction:{isEnabled:!0,authority:"ORGANIZATION_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_DELETE"}})]})},authority:"ORGANIZATION_VIEW"},{path:"admin/organizationmembers",component:Ta,authority:"ORGANIZATION_MEMBER_VIEW"},{path:"admin/organizationmemberroles",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=Ge({findAll:"api/v1/admin/organizationmemberrole/all",deleteById:"api/v1/admin/organizationmemberrole",save:"api/v1/admin/organizationmemberrole",findById:"api/v1/admin/organizationmemberrole",setData:o});return e.jsx(wo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_END_DATE",fieldName:"endDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_ORGANIZATION_MEMBER_ID",fieldName:"organizationMemberId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_START_DATE",fieldName:"startDate",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"ORGANIZATION_MEMBER_ROLE_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"ORGANIZATION_MEMBER_ROLE_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_EDIT"},deleteAction:{isEnabled:!0,authority:"ORGANIZATION_MEMBER_ROLE_DELETE"}})},authority:"ORGANIZATION_MEMBER_ROLE_VIEW"},{path:"admin/organizationranks",component:ua,authority:"ORGANIZATION_RANK_VIEW"},{path:"admin/organizationunits",component:ca,authority:"ORGANIZATION_UNIT_VIEW"},{path:"admin/organizationunittypes",component:pa,authority:"ORGANIZATION_UNIT_TYPE_VIEW"},{path:"admin/persons",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState(null),[a,r]=l.useState([]),d=Ge({findAll:"api/v1/admin/person/all",deleteById:"api/v1/admin/person",save:"api/v1/admin/person",findById:"api/v1/admin/person",setData:r}),{Window:n,setWindowState:s}=ve({windowTitle:"Organizations Membership",windowIcon:"globe"});return e.jsxs(e.Fragment,{children:[e.jsx(n,{children:e.jsx(Ta,{selectedPerson:i})}),e.jsx(wo,{apiActions:d,data:a,setData:r,editMode:{editMode:"modal",specs:{modalIcon:"user",modalTitle:"Person Profile",modalWidth:300}},formElements:[{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"Ref Source",fieldName:"refSource",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,fieldLabel:"PERSON_EMPLOYEE_NUMBER",fieldName:"refSyncNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_AR_NAME",fieldName:"employeeArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMPLOYEE_EN_NAME",fieldName:"employeeEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_EMAIL",fieldName:"email",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_MOBILE_NUMBER",fieldName:"mobileNumber",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{hidden:!0,gridProps:{hidden:!0},fieldLabel:"PERSON_PASSWORD",fieldName:"password",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_USERNAME",fieldName:"username",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"PERSON_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"PERSON_PLURAL",rowActions:[{icon:"globe",label:"User Organizations",actionFn:async e=>{o(e),s(!0)}}],girdIcon:"users",editAction:{isEnabled:!0,authority:"PERSON_EDIT",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(A.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)},deleteAction:{isEnabled:!0,authority:"PERSON_DELETE",preActionValidation:e=>null==e.refSource||null==e.refSource||""==e.refSource||(A.toast.error("This Person Was synced from other system therefore you can't modify this record"),!1)}})]})},authority:"PERSON_VIEW"},{path:"admin/systemapplications",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=Ge({findAll:"api/v1/admin/systemapplication/all",deleteById:"api/v1/admin/systemapplication",save:"api/v1/admin/systemapplication",findById:"api/v1/admin/systemapplication",setData:o}),{Window:r,setWindowState:d}=ve({windowTitle:"System Application Modules",windowIcon:"layer-group"}),{Window:n,setWindowState:s}=ve({windowTitle:"System Application Authorities",windowIcon:"key"}),{Window:p,setWindowState:c}=ve({windowTitle:"System Application Roles",windowIcon:"tag"}),{Window:u,setWindowState:m}=ve({windowTitle:"System Application Lookups",windowIcon:"list-check"}),[T,A]=l.useState(null);return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(Aa,{selectedApplication:T})}),e.jsx(n,{children:e.jsx(_a,{selectedApplication:T})}),e.jsx(p,{children:e.jsx(fa,{selectedApplication:T})}),e.jsx(u,{children:e.jsx(Ia,{selectedApplication:T})}),e.jsx(wo,{apiActions:a,rowActions:[{icon:"layer-group",actionFn:async e=>{A(e),d(!0)},label:"modules"},{icon:"key",actionFn:async e=>{A(e),s(!0)},label:"Authorities"},{icon:"tag",actionFn:async e=>{A(e),c(!0)},label:"Roles"},{icon:"list-check",actionFn:async e=>{A(e),m(!0)},label:"Lookups"}],data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_CODE",fieldName:"applicationCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_NAME",fieldName:"applicationName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_APPLICATION_DESCRIPTION",fieldName:"applicationDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_PLURAL",girdIcon:"window-restore",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_DELETE"}})]})},authority:"SYSTEM_APPLICATION_VIEW"},{path:"admin/systemapplicationauthorities",component:_a,authority:"SYSTEM_APPLICATION_AUTHORITY_VIEW"},{path:"admin/systemapplicationmodules",component:Aa,authority:"SYSTEM_APPLICATION_MODULE_VIEW"},{path:"admin/systemapplicationroles",component:fa,authority:"SYSTEM_APPLICATION_ROLE_VIEW"},{path:"admin/systemapplicationroleauthorities",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=Ge({findAll:"api/v1/admin/systemapplicationroleauthority/all",deleteById:"api/v1/admin/systemapplicationroleauthority",save:"api/v1/admin/systemapplicationroleauthority",findById:"api/v1/admin/systemapplicationroleauthority",setData:o});return e.jsx(wo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_IS_ACTIVE",fieldName:"isActive",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_AUTHORITY_ID",fieldName:"systemApplicationAuthorityId",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"SYSTEM_APPLICATION_ROLE_AUTHORITY_SYSTEM_APPLICATION_ROLE_ID",fieldName:"systemApplicationRoleId",required:!0,fieldType:"text"}}],keyColumnName:"id",gridTitle:"SYSTEM_APPLICATION_ROLE_AUTHORITY_PLURAL",girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_EDIT"},deleteAction:{isEnabled:!0,authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_DELETE"}})},authority:"SYSTEM_APPLICATION_ROLE_AUTHORITY_VIEW"}],...[{path:"dev/blueprints",component:()=>{const{t:i}=f.useTranslation(),o=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),[a,r]=l.useState([]),d=Ge({commonStoreKey:"SystemBluePrints",deleteById:"api/v1/dev/blueprint",save:"api/v1/dev/blueprint",findById:"api/v1/dev/blueprint",setData:r}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_BLUE_PRINT_CODE",fieldName:"bluePrintCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"BLUE_PRINT_QUERY_ID",fieldName:"queryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}}];return e.jsx(wo,{apiActions:d,data:a,setData:r,editMode:{editMode:"row",reloadAfterSave:!0},formElements:n,keyColumnName:"id",gridTitle:i("BLUE_PRINT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"BLUE_PRINT_EDIT"},deleteAction:{isEnabled:!0,authority:"BLUE_PRINT_DELETE"}})},authority:"BLUE_PRINT_VIEW"},{path:"dev/dataqueries",component:()=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=ve({width:"50%",windowTitle:"Data query parameters",windowIcon:"p"}),d=t.useSelector((e=>e.commonStores.stores.SystemDataSources.data)),{t:n}=f.useTranslation(),[s,p]=l.useState([]),c=Ge({commonStoreKey:"SystemDataQueries",deleteById:"api/v1/dev/dataquery",save:"api/v1/dev/dataquery",findById:"api/v1/dev/dataquery",setData:p}),u=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_NAME",fieldName:"queryName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_USE_SYS_CON",fieldName:"useSysCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_DATASOURCE_CON_ID",fieldName:"datasourceConId",required:!1,options:d,optionDisplayField:"connectionName",optionValueField:"id",fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"DATA_QUERY_QUERY_STR",fieldName:"queryStr",formProps:{fieldHeight:400},gridProps:{hidden:!0},muiTextFieldProps:{multiline:!0,rows:4},required:!1,fieldType:"text"}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(Oa,{selectedRecord:i})}),e.jsx(wo,{apiActions:c,rowActions:[{label:"Query Parameters",actionFn:async e=>{o(e),r(!0)},icon:"p"}],data:s,setData:p,editMode:{editMode:"modal",specs:{modalTitle:"System Query",modalWidth:600,modalIcon:"file-code"}},formElements:u,keyColumnName:"id",gridTitle:n("DATA_QUERY_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"DATA_QUERY_EDIT"},deleteAction:{isEnabled:!0,authority:"DATA_QUERY_DELETE"}})]})},authority:"DATA_QUERY_VIEW"},{path:"dev/datasourceconnections",component:()=>{const{handleGetRequest:i}=Le(),o=t.useSelector((e=>e.commonStores.stores.SystemDataSourceType.data)),{t:a}=f.useTranslation(),[r,d]=l.useState([]),n=Ge({deleteById:"api/v1/dev/datasourceconnection",save:"api/v1/dev/datasourceconnection",findById:"api/v1/dev/datasourceconnection",setData:d,commonStoreKey:"SystemDataSources"}),s=[{type:"field",mode:"props",props:{fieldLabel:"ID",fieldName:"id",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_CONNECTION_NAME",fieldName:"connectionName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_TYPE",fieldName:"datasourceType",required:!0,fieldType:"combobox",options:o,optionValueField:"value",optionDisplayField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_URL",fieldName:"datasourceUrl",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_USERNAME",fieldName:"datasourceUsername",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_DATASOURCE_PASSWORD",fieldName:"datasourcePassword",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DATASOURCE_CONNECTION_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:n,data:r,setData:d,editMode:{editMode:"modal",specs:{modalTitle:"Datasource Connection",modalIcon:"plug",modalWidth:300}},formElements:s,keyColumnName:"id",gridTitle:a("DATASOURCE_CONNECTION_PLURAL"),girdIcon:"plug",rowActions:[{icon:"plug",label:"test connection",actionFn:async e=>{await i({endPointURI:"api/v1/dev/datasourceConnection/test",showMask:!0,parameters:{id:e.id},successCallBkFn:e=>{A.toast.success(e.data)}})}}],editAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_EDIT"},deleteAction:{isEnabled:!0,authority:"DATASOURCE_CONNECTION_DELETE"}})},authority:"DATASOURCE_CONNECTION_VIEW"},{path:"dev/entityparameters",component:()=>{const{t:i}=f.useTranslation(),o=t.useSelector((e=>e.commonStores.stores.SystemParameterTypes.data)),[a,r]=l.useState([]),d=Ge({commonStoreKey:"SystemEntityParameters",deleteById:"api/v1/dev/entityparameter",save:"api/v1/dev/entityparameter",findById:"api/v1/dev/entityparameter",setData:r}),n=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_CODE",fieldName:"parameterCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_LABEL",fieldName:"parameterLabel",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_TYPE",fieldName:"parameterType",required:!0,fieldType:"combobox",options:o,optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){"combobox"===e?(t.setValue("parameterValueFormat",null),i.showField("parameterDataQueryId"),i.showField("parameterDataset"),i.showField("parameterDisplayField"),i.showField("parameterValueField"),i.hideField("parameterValueFormat")):"date"===e||"datetime"===e?("date"===e?t.setValue("parameterValueFormat",tt):"datetime"===e&&t.setValue("parameterValueFormat",it),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.showField("parameterValueFormat")):(t.setValue("parameterValueFormat",null),i.hideField("parameterDataQueryId"),i.hideField("parameterDataset"),i.hideField("parameterDisplayField"),i.hideField("parameterValueField"),i.hideField("parameterValueFormat"))}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATA_QUERY_ID",fieldName:"parameterDataQueryId",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataset",null),i.hideField("parameterDataset")):i.showField("parameterDataset")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DATASET",fieldName:"parameterDataset",hidden:!0,required:!1,fieldType:"text",formProps:{onValueChangeCallBack(e,t,i,o){null!=e&&""!=e?(t.setValue("parameterDataQueryId",null),i.hideField("parameterDataQueryId")):i.showField("parameterDataQueryId")}}}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_DISPLAY_FIELD",fieldName:"parameterDisplayField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FIELD",fieldName:"parameterValueField",hidden:!0,required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_PARAMETER_VALUE_FORMAT",fieldName:"parameterValueFormat",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"ENTITY_PARAMETER_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:d,data:a,setData:r,editMode:{editMode:"modal",specs:{modalTitle:"Entity Parameter",modalIcon:"p",modalWidth:300}},formElements:n,keyColumnName:"id",gridTitle:i("ENTITY_PARAMETER_PLURAL"),girdIcon:"p",editAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_EDIT"},deleteAction:{isEnabled:!0,authority:"ENTITY_PARAMETER_DELETE"}})},authority:"ENTITY_PARAMETER_VIEW"},{path:"dev/lookups",component:Ia,authority:"LOOKUP_VIEW"},{path:"dev/reports",component:()=>{const{t:i}=f.useTranslation(),[o,a]=l.useState(null),{Window:r,setWindowState:d}=ve({windowTitle:"Report View",windowIcon:"eye",width:"80%"}),{Window:n,setWindowState:s}=ve({windowTitle:"Report Parameters",windowIcon:"p",width:"80%"}),[p,c]=l.useState([]),u=t.useSelector((e=>e.commonStores.stores.SystemDataSources.data)),m=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),T=t.useSelector((e=>e.commonStores.stores.SystemBluePrints.data)),_=Ge({findAll:"api/v1/dev/report/all",deleteById:"api/v1/dev/report",save:"api/v1/dev/report",findById:"api/v1/dev/report",setData:c}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_TYPE",fieldName:"reportType",options:[{value:"Excel"},{value:"Jasper"},{value:"Blueprint"}],optionDisplayField:"value",optionValueField:"value",required:!0,fieldType:"combobox",formProps:{onValueChangeCallBack(e,t,i,o){Pa(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CODE",fieldName:"reportCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_NAME",fieldName:"reportName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_CATEGORY",fieldName:"reportCategory",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Authority Code",fieldName:"reportAuthorityCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXPORT_NAME",fieldName:"reportExportName",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_USE_SYS_DATASOURCE",fieldName:"useSysDatasource",hidden:!0,gridProps:{hidden:!0},formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("datasourceConId"),t.setValue("datasourceConId",null)):i.showField("datasourceConId")}},required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_DATASOURCE_CON_ID",fieldName:"datasourceConId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:u,optionValueField:"id",optionDisplayField:"connectionName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_BLUE_PRINT_ID",fieldName:"reportBluePrintId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:T,optionDisplayField:"bluePrintCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_EXCEL_DATA_QUERY_ID",fieldName:"reportExcelDataQueryId",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"combobox",options:m,optionValueField:"id",optionDisplayField:"queryName"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_NAME",fieldName:"reportJasperName",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"REPORT_REPORT_JASPER_PATH",fieldName:"reportJasperPath",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",fieldType:"checkbox"}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(La,{reportCode:o?.reportCode,resultMode:"App"})}),e.jsx(n,{children:e.jsx(ya,{selectedRecord:o})}),e.jsx(wo,{apiActions:_,data:p,setData:c,editMode:{editMode:"modal",specs:{modalTitle:"Report",modalIcon:"file",modalWidth:300}},rowActions:[{icon:"p",label:"Report Parameters",isActionVisibleForRecord:e=>"Jasper"===e.reportType,actionFn:async(e,t)=>{a(e),s(!0)}},{icon:"eye",label:"View Report",actionFn:async(e,t)=>{a(e),d(!0)}}],formLoadCallBk:(e,t,i)=>{Pa(i.reportType,e,t),!0===i?.useSysDatasource&&e.hideField("datasourceConId")},formElements:E,keyColumnName:"id",gridTitle:i("REPORT_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"REPORT_EDIT",preActionValidation:e=>"Jasper"!==e?.reportType||!1!==e?.useSysDatasource||e?.datasourceConId?"Jasper"!==e?.reportType||e?.reportJasperName?"Jasper"!==e?.reportType||e?.reportJasperPath?"Blueprint"!==e?.reportType||e?.reportBluePrintId?!("Excel"===e?.reportType&&!e?.reportExcelDataQueryId)||(A.toast.error("You must choose the report query"),!1):(A.toast.error("You must choose the report blueprint"),!1):(A.toast.error("You must enter the jasper report path"),!1):(A.toast.error("You must enter the jasper report name"),!1):(A.toast.error("You must choose the datasource"),!1)},deleteAction:{isEnabled:!0,authority:"REPORT_DELETE"}})]})},authority:"REPORT_VIEW"},{path:"dev/mailtemplates",component:()=>{const i=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),[o,a]=l.useState(null),{Window:r,setWindowState:d}=ve({windowTitle:"Mail Receipents",windowIcon:"users"}),{Window:n,setWindowState:s}=ve({windowTitle:"Mail Bodies",windowIcon:{prefix:"fas",iconName:"envelope-open-text"}}),{Window:p,setWindowState:c}=ve({windowTitle:"Mail Attachment",windowIcon:"paperclip",width:500}),{t:u}=f.useTranslation(),[m,T]=l.useState([]),_=Ge({commonStoreKey:"SystemMailTemplates",deleteById:"api/v1/dev/mailtemplate",save:"api/v1/dev/mailtemplate",findById:"api/v1/dev/mailtemplate",setData:T}),E=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_CODE",fieldName:"mailTemplateCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_TEMPLATE_NAME",fieldName:"mailTemplateName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{label:"subject",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_MAIL_SUBJECT",fieldName:"mailSubject",required:!0,fieldType:"text",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_SUBJECT_DATA_QUERY_ID",fieldName:"subjectDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Recipients",icon:"users",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"To Recipient Query (must return list of objects with property email)",fieldName:"mailToDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"CC Recipient Query (must return list of objects with property email)",fieldName:"mailCcDataQueryId",required:!1,fieldType:"combobox",options:i,optionDisplayField:"queryName",optionValueField:"id",gridProps:{hidden:!0}}}]}},{type:"group",props:{label:"Periodical Configuration",icon:"history",style:{padding:1,border:"0.5px dashed black",margin:1},elements:[{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIODICAL",fieldName:"periodical",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_TYPE",fieldName:"periodType",options:[{value:"Year"},{value:"Month"},{value:"Day"},{value:"Hour"},{value:"Minute"},{value:"Second"}],optionDisplayField:"value",optionValueField:"value",required:!1,fieldType:"combobox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_PERIOD_VALUE",fieldName:"periodValue",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_TEMPLATE_START_SENDING_AT",fieldName:"startSendingAt",required:!1,fieldType:"datetime"}}]}}];return e.jsxs(e.Fragment,{children:[e.jsx(r,{children:e.jsx(Ma,{selectedRecord:o,callBkFn:()=>{d(!1)}})}),e.jsx(n,{children:e.jsx(Ca,{selectedRecord:o,callBkFn:()=>{d(!1)}})}),e.jsx(p,{children:e.jsx(Da,{selectedRecord:o,callBkFn:()=>{c(!1)}})}),e.jsx(wo,{apiActions:_,data:m,setData:T,editMode:{editMode:"modal",specs:{modalWidth:300,modalTitle:"Mail Template",modalIcon:"envelope"}},formElements:E,keyColumnName:"id",gridTitle:u("MAIL_TEMPLATE_PLURAL"),girdIcon:"envelope",rowActions:[{icon:"users",label:"Recipients",actionFn:async e=>{a(e),d(!0)}},{icon:{prefix:"fas",iconName:"envelope-open-text"},label:"Mail Body",actionFn:async e=>{a(e),s(!0)}},{icon:"paperclip",label:"Mail Attachments",actionFn:async e=>{a(e),c(!0)}}],editAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_EDIT",preActionValidation:e=>!0!==e?.periodical||e?.periodType?!0!==e?.periodical||e?.periodValue?!(!0===e?.periodical&&!e?.startSendingAt)||(A.toast.error("You must specifiy the start sending time since this email is periodical"),!1):(A.toast.error("You must specifiy the period value since this email is periodical"),!1):(A.toast.error("You must specifiy the period type since this email is periodical"),!1)},deleteAction:{isEnabled:!0,authority:"MAIL_TEMPLATE_DELETE"}})]})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/mailsender/config",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=Ge({findAll:"api/v1/dev/mailsenderconfig/all",deleteById:"api/v1/dev/mailsenderconfig",save:"api/v1/dev/mailsenderconfig",findById:"api/v1/dev/mailsenderconfig",setData:o}),r=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Name",fieldName:"configName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Engine",fieldName:"mailEngine",required:!0,fieldType:"combobox",options:[{value:"Gmail"},{value:"Azure"}],optionDisplayField:"value",optionValueField:"value",formProps:{onValueChangeCallBack(e,t,i,o){ba(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Hostname",fieldName:"mailHost",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"port",fieldName:"mailPort",required:!1,fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"username",fieldName:"mailUsername",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"password",fieldName:"mailPassword",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Approval Receive Email",fieldName:"workFlowApprovalReceiveEmail",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Protocol",fieldName:"mailProtocol",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Smtp Auth",fieldName:"isMailSmtpAuthEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable Start TLS",fieldName:"isMailStarttlsEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Enable SSL",fieldName:"isSmtpSSlEnabled",required:!1,fieldType:"checkbox",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Client Id",fieldName:"azureGraphApiClientId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Secret",fieldName:"azureGraphApiClientSecret",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Tenant Id",fieldName:"azureGraphApiTenantId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Scope",fieldName:"azureGraphApiScope",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Azure Graph API Email Id",fieldName:"azureGraphApiEmailId",required:!1,fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"Default",fieldName:"isDefault",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"Active",fieldName:"isActive",required:!1,fieldType:"checkbox"}}];return e.jsx(wo,{apiActions:a,data:i,setData:o,editMode:{editMode:"modal",specs:{modalIcon:{iconName:"paper-plane",prefix:"fas"},modalTitle:"Mail Sender Configuration",modalWidth:300}},formElements:r,keyColumnName:"id",gridTitle:t("Mail Sender Configuration"),girdIcon:{iconName:"paper-plane",prefix:"fas"},editAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_SENDER_CONFIG_DELETE"},formLoadCallBk:(e,t,i)=>{ba(i.mailEngine,e,t)}})},authority:"MAILTEMPLATE_VIEW"},{path:"dev/workflowdocuments",component:()=>{const[i,o]=l.useState(null),{Window:a,setWindowState:r}=ve({windowTitle:"Document Status",windowIcon:"tag"}),{Window:d,setWindowState:n}=ve({windowTitle:"Document Action",windowIcon:"stamp"}),s=t.useSelector((e=>e.commonStores.stores.SystemOrganizations.data)),p=t.useSelector((e=>e.commonStores.stores.SystemReports.data)),c=t.useSelector((e=>e.commonStores.stores.SystemDataSources.data)),{t:u}=f.useTranslation(),[m,T]=l.useState([]),A=Ge({findAll:"api/v1/dev/workflowdocument/all",deleteById:"api/v1/dev/workflowdocument",save:"api/v1/dev/workflowdocument",findById:"api/v1/dev/workflowdocument",setData:T}),_=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_ORG_CODE",fieldName:"orgCode",required:!1,fieldType:"combobox",options:s,optionDisplayField:"organizationCode",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CODE",fieldName:"documentCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document En Display Name",fieldName:"documentEnName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Workflow Document Ar Display Name",fieldName:"documentArName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"Report To be Attached For The Document ( will be passed a parameter called doc_id)",fieldName:"documentReportId",required:!1,fieldType:"combobox",options:p,optionDisplayField:"reportName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_APPROVAL_ALLOWED",fieldName:"mailApprovalAllowed",required:!1,fieldType:"checkbox"}},{type:"group",props:{icon:"bell",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"App Visual Notifications",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_ICON",fieldName:"appNotificationIcon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_NOTIFICATION_STYLE",fieldName:"appNotificationStyle",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_APP_VIEW_ROUTE",fieldName:"appViewRoute",required:!1,fieldType:"text"}}]}},{type:"group",props:{icon:"database",style:{border:"1px dashed black",padding:1,marginBottom:1},label:"Related Document Database",elements:[{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_USE_SYSTEM_CON",fieldName:"useSystemCon",required:!1,fieldType:"checkbox",formProps:{onValueChangeCallBack(e,t,i,o){e?(i.hideField("documentConId"),t.setValue("documentConId",null)):i.showField("documentConId")}}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_CON_ID",fieldName:"documentConId",required:!1,fieldType:"combobox",options:c,optionDisplayField:"connectionName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_NAME",fieldName:"documentDatabaseName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_DATABASE_TABLE",fieldName:"documentDatabaseTable",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_ID_FIELD",fieldName:"documentIdField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_STATUS_FIELD",fieldName:"documentStatusField",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_DOCUMENT_NUMBER_FIELD",fieldName:"documentNumberField",required:!0,fieldType:"text"}}]}}];return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(ga,{selectedRecord:i})}),e.jsx(d,{children:e.jsx(Ua,{selectedRecord:i})}),e.jsx(wo,{apiActions:A,formLoadCallBk:(e,t,i)=>{!0===i.useSystemCon?e.hideField("documentConId"):e.showField("documentConId")},data:m,setData:T,rowActions:[{icon:"tag",label:"Document States",actionFn:async e=>{o(e),r(!0)}},{icon:"stamp",label:"Document Actions",actionFn:async e=>{o(e),n(!0)}}],editMode:{editMode:"modal",specs:{modalIcon:"chart-diagram",modalTitle:u("WORKFLOW_DOCUMENT_SINGULAR")}},formElements:_,keyColumnName:"id",gridTitle:u("WORKFLOW_DOCUMENT_PLURAL"),girdIcon:"chart-diagram",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_DELETE"}})]})},authority:"WORKFLOW_DOCUMENT_VIEW"},{path:"dev/widgets",component:()=>{const{t:i}=f.useTranslation(),o=t.useSelector((e=>e.commonStores.stores.SystemDataQueries.data)),a=t.useSelector((e=>e.commonStores.stores.SystemWidgetTypes.data)),[r,d]=l.useState([]),n=Ge({commonStoreKey:"SystemWidgets",deleteById:"api/v1/dev/widget",save:"api/v1/dev/widget",findById:"api/v1/dev/widget",setData:d}),s=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_TYPE",fieldName:"widgetType",required:!0,fieldType:"combobox",options:a,optionDisplayField:"name",optionValueField:"name",formProps:{onValueChangeCallBack(e,t,i,o){Fa(e,i,t)}}}},{type:"field",mode:"props",props:{fieldLabel:"Query",fieldName:"dataQueryId",required:!0,fieldType:"combobox",options:o,optionDisplayField:"queryName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_NAME",fieldName:"widgetName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ICON",fieldName:"icon",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_TITLE",fieldName:"title",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDGET_DESCRIPTION",fieldName:"widgetDescription",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HEIGHT",fieldName:"height",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_WIDTH",fieldName:"width",required:!1,fieldType:"combobox",options:[{value:1},{value:2},{value:3},{value:4},{value:5},{value:6},{value:7},{value:8},{value:9},{value:10},{value:11},{value:12}],optionDisplayField:"value",optionValueField:"value"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}},{type:"group",props:{style:{padding:1,border:"1px solid black",width:"100%"},label:"Data Specs",elements:[{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_FIELD",fieldName:"horizontalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_HORIZONTAL_AXIS_LABEL",fieldName:"horizontalAxisLabel",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_SERIES_KEYS",fieldName:"seriesKeys",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_FIELD",fieldName:"verticalAxisField",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WIDGET_VERTICAL_AXIS_LABEL",fieldName:"verticalAxisLabel",required:!1,fieldType:"text"}}]}}];return e.jsx(wo,{apiActions:n,data:r,setData:d,editMode:{editMode:"modal",specs:{modalIcon:"chart-pie",modalTitle:"Widget"}},formElements:s,keyColumnName:"id",gridTitle:i("WIDGET_PLURAL"),girdIcon:"chart-pie",editAction:{isEnabled:!0,authority:"WIDGET_EDIT"},deleteAction:{isEnabled:!0,authority:"WIDGET_DELETE"},formLoadCallBk:(e,t,i)=>{Fa(i.widgetType,e,t)}})},authority:"WIDGET_VIEW"},{path:"dev/dashboards",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState(null),{Window:a,setWindowState:r}=ve({windowTitle:"Dashboard Widgets",windowIcon:"chart-pie"}),[d,n]=l.useState([]),s=B.useNavigate(),p=Ge({findAll:"api/v1/dev/dashboard/all",deleteById:"api/v1/dev/dashboard",save:"api/v1/dev/dashboard",findById:"api/v1/dev/dashboard",setData:n});return e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(wa,{selectedRecord:i})}),e.jsx(wo,{apiActions:p,data:d,setData:n,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_CODE",fieldName:"dashboardCode",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_NAME",fieldName:"dashboardName",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_DASHBOARD_TITLE",fieldName:"dashboardTitle",required:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"DASHBOARD_ENABLED",fieldName:"enabled",required:!1,fieldType:"checkbox"}}],keyColumnName:"id",rowActions:[{label:"Widgets",icon:"chart-pie",actionFn:async e=>{o(e),r(!0)}},{label:"View",icon:"eye",actionFn:async e=>{s("/dashboard/"+e.dashboardCode)}}],gridTitle:t("DASHBOARD_PLURAL"),girdIcon:"square-poll-vertical",editAction:{isEnabled:!0,authority:"DASHBOARD_EDIT"},deleteAction:{isEnabled:!0,authority:"DASHBOARD_DELETE"}})]})},authority:"DASHBOARD_VIEW"},{path:"dashboard/:dashboardCode",component:()=>{const{dashboardCode:t}=B.useParams();return e.jsx(la,{dashboardCode:t})}},{path:"dev/workflowdocumentmaillogs",component:()=>{const{t:t}=f.useTranslation(),[i,o]=l.useState([]),a=Ge({findAll:"api/v1/dev/workflowdocumentmaillog/all",deleteById:"api/v1/dev/workflowdocumentmaillog",save:"api/v1/dev/workflowdocumentmaillog",findById:"api/v1/dev/workflowdocumentmaillog",setData:o});return e.jsx(wo,{apiActions:a,data:i,setData:o,editMode:{editMode:"row"},formElements:[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_GRAPH_API_MSG_ID",fieldName:"graphApiMsgId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_IS_PROCESSED",fieldName:"isProcessed",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_ACTION_CODE",fieldName:"mailActionCode",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_BODY_CONTENT",fieldName:"mailBodyContent",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_FROM",fieldName:"mailFrom",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_SUBJECT",fieldName:"mailSubject",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_MESSAGE",fieldName:"processMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_PROCESS_TIME",fieldName:"processTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_REF_DOC_ID",fieldName:"refDocId",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_WORKFLOW_DOCUMENT_ID",fieldName:"workflowDocumentId",required:!1,fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"WORKFLOW_DOCUMENT_MAIL_LOG_MAIL_RECEIVE_TIME",fieldName:"mailReceiveTime",required:!1,fieldType:"datetime"}}],keyColumnName:"id",gridTitle:t("WORKFLOW_DOCUMENT_MAIL_LOG_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_EDIT"},deleteAction:{isEnabled:!0,authority:"WORKFLOW_DOCUMENT_MAIL_LOG_DELETE"}})}},{path:"dev/mailnotificationqueues",component:()=>{const{t:i}=f.useTranslation(),[o,a]=l.useState([]),r=Ge({findAll:"api/v1/dev/mailnotificationqueue/all",deleteById:"api/v1/dev/mailnotificationqueue",save:"api/v1/dev/mailnotificationqueue",findById:"api/v1/dev/mailnotificationqueue",setData:a}),d=[{type:"field",mode:"props",props:{fieldLabel:"id",fieldName:"id",fieldType:"number",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createTime",fieldName:"createTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"createdBy",fieldName:"createdBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateBy",fieldName:"lastUpdateBy",fieldType:"text",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"lastUpdateTime",fieldName:"lastUpdateTime",fieldType:"datetime",hidden:!0,gridProps:{hidden:!0}}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_TEMPLATE_ID",fieldName:"mailTemplateId",required:!1,fieldType:"combobox",options:t.useSelector((e=>e.commonStores.stores.SystemMailTemplates.data)),optionDisplayField:"mailTemplateName",optionValueField:"id"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_ATTACHED_REPORT_ID",fieldName:"customMailAttachedReportId",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"number"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_BODY",fieldName:"customMailBody",required:!1,hidden:!0,gridProps:{hidden:!0},fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_MAIL_SUBJECT",fieldName:"customMailSubject",required:!1,hidden:!0,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_CUSTOM_RECIPIENTS",fieldName:"customRecipients",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_IS_NOTIFIED",fieldName:"isNotified",required:!1,fieldType:"checkbox"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_TIME",fieldName:"notificationTime",required:!1,fieldType:"datetime"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_NOTIFICATION_MESSAGE",fieldName:"notificationMessage",required:!1,fieldType:"text"}},{type:"field",mode:"props",props:{fieldLabel:"MAIL_NOTIFICATION_QUEUE_MAIL_PARAMETERS",fieldName:"mailParameters",hidden:!0,gridProps:{hidden:!0},required:!1,fieldType:"text"}}];return e.jsx(wo,{apiActions:r,disableDefaultAction:!0,data:o,setData:a,editMode:{editMode:"none"},formElements:d,keyColumnName:"id",gridTitle:i("MAIL_NOTIFICATION_QUEUE_PLURAL"),girdIcon:"table-cells",editAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_EDIT"},deleteAction:{isEnabled:!0,authority:"MAIL_NOTIFICATION_QUEUE_DELETE"}})}}]]],ka=t=>{const{isUserAuthorized:i}=Ue();return t?.authority&&!i(t.authority)?e.jsx(d.Box,{sx:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"red"},children:e.jsxs("h2",{children:[e.jsx(m.FontAwesomeIcon,{style:{marginRight:10,marginLeft:10},icon:"cancel"}),"You aren't authorized to access this page"]})}):e.jsx(e.Fragment,{children:t.children})},Wa=()=>{const i=t.useSelector((e=>e.AppLayout)),o=t.useSelector((e=>e.AppInfo.value)),a=t.useSelector((e=>e.AppInfo.value.businessRoutes)),r=t.useDispatch(),{show:s,hide:p}=Re(),c=t.useSelector((e=>e.commonStores)),[u,m]=l.useState(!1),{isUserAuthorized:T}=Ue(),{handleGetRequest:A}=Le();return l.useEffect((()=>{c?.storeKeys&&(async()=>{s("Loading ... please wait");const e=c.stores,t=c.storeKeys;for(let i of t)void 0!==e[i]?.authority&&null!==e[i]?.authority&&!T(e[i]?.authority)||""==e[i]?.url||!0!==e[i].autoLoad||await A({endPointURI:e[i].url,showMask:!1,successCallBkFn:e=>{r(we({storeKey:i,data:e.data}))},failureCallBkFn:()=>{r(we({storeKey:i,data:[]}))}});p()})()}),[c.storeKeys]),e.jsx(n.CacheProvider,{value:"ltr"===i.appDirection?da:ra,children:e.jsx(d.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"flex-start",flex:1,overflow:"hidden",padding:3},children:e.jsxs(B.Routes,{children:[o.enableAdministrationModule?Ba.map(((t,i)=>e.jsx(B.Route,{path:t.path,element:e.jsx(ka,{authority:t.authority,children:e.jsx(t.component,{})})},"adm"+i))):null,a.map(((t,i)=>e.jsx(B.Route,{path:t.path,element:e.jsx(ka,{authority:t.authority,children:e.jsx(t.component,{})})},"bs"+i)))]})})})},Ga=s.styled("div")((({theme:e})=>({width:30,height:6,margin:10,backgroundColor:re.grey[300],borderRadius:3,top:8,...e.applyStyles("dark",{backgroundColor:re.grey[900]})})));function ja(i){const{window:o}=i,a=t.useSelector((e=>e.SideBar)),r=t.useSelector((e=>e.AppInfo.value)),n=t.useDispatch(),l=e=>{n(Go(e))},s=void 0!==o?()=>o().document.body:void 0;return e.jsx(de,{container:s,anchor:"bottom",open:a.isOpened,onClose:()=>{l(!1)},onOpen:()=>{l(!0)},swipeAreaWidth:56,disableSwipeToOpen:!1,ModalProps:{keepMounted:!0},children:e.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",overflow:"hidden"},children:[e.jsx(Ga,{}),e.jsx(d.Box,{sx:{flexGrow:1,display:"flex",justifyContent:"center",width:"99%",overflowY:"auto"},children:e.jsx(oa,{})}),e.jsxs(d.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-around",marginTop:1,width:"100%"},children:[e.jsx(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:r.appName}),e.jsxs(d.Typography,{sx:{fontSize:12},color:"textDisabled",children:["V.",r.appVersion]})]})]})})}const Va=()=>{const{t:i}=f.useTranslation(),o=t.useSelector((e=>e.loadingMask.value)),a=t.useSelector((e=>e.AppLayout));return e.jsxs(d.Backdrop,{dir:a.appDirection,sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:o.isOpened,children:[e.jsx(d.CircularProgress,{color:"inherit"}),e.jsx("div",{style:{marginRight:10,marginLeft:10},children:o?.message||i("DEFAULT_LOADING_MESSAGE")})]})},Ya=()=>{const i=t.useSelector((e=>e.AppInfo.value)),[o,a]=l.useState(""),[r,s]=l.useState(""),[p,c]=l.useState(!1),u=t.useSelector((e=>e.UserSession.value)),m=t.useDispatch(),T=async()=>{if(null==o||""==o)return void A.toast.error("username is required to proceed");if(null==r||""==r)return void A.toast.error("password is required to proceed");c(!0);let e=null;try{if(e=await _.post(`${i.apiBaseUrl}/api/auth/login`,{username:o,password:r},{withCredentials:!0}),null!=e.data&&""!==e.data){c(!1);const t={...e.data,isAuthenticated:!0};m(Pe.setAuthenticated(t))}}catch(e){c(!1),A.toast.error(e?.response?.data||"failed to authenticate, contact your administrator")}},E=t.useSelector((e=>e.UserSession.value)),f=d.createTheme({components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||rt} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:i.appTheme?.dark?.primaryColor||rt},secondary:{main:i.appTheme?.dark?.secondaryColor||dt}}});return l.useEffect((()=>{(async()=>{if(i?.apiBaseUrl&&null==E.isAuthenticated)try{let e=await _.get(`${i.apiBaseUrl}/api/auth/userInfo`,{withCredentials:!0});if(null!=e&&null!=e.data){const t={...e.data,isAuthenticated:!0};m(Pe.setAuthenticated(t))}else m(Pe.setUnAuthenticated())}catch(e){m(Pe.setUnAuthenticated())}})()}),[i]),e.jsx(n.ThemeProvider,{theme:f,children:e.jsx(d.Paper,{sx:{display:"flex",height:"100vh",width:"100%",borderRadius:0,alignItems:"center",justifyContent:"center"},children:0==u.isAuthenticated?e.jsxs(d.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[e.jsx("img",{src:i?.appLogo,width:150,height:150}),e.jsx(d.Typography,{sx:{m:1},variant:"h4",color:"textSecondary",children:i?.appName}),e.jsxs(d.Typography,{sx:{paddingRight:1,width:"100%",textAlign:"right",fontSize:10},variant:"caption",color:"textSecondary",children:["V.",i.appVersion]}),e.jsx(d.TextField,{label:"username",sx:{width:300,m:1},value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),e.jsx(d.TextField,{label:"password",sx:{width:300,m:1},value:r,type:"password",onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&T()}}),e.jsx(d.Button,{loading:p,onClick:T,variant:"contained",color:"primary",sx:{m:1},children:"login"})]}):e.jsxs(e.Fragment,{children:[e.jsx(d.CircularProgress,{sx:{marginRight:1}}),e.jsx("div",{children:"You will be redirected shortly ... please wait"})]})})})},qa=s.styled("main",{shouldForwardProp:e=>"open"!==e})((({theme:e,open:i})=>{const o=t.useSelector((e=>e.AppLayout)),a=s.useTheme(),r=me();return{display:"flex",flexDirection:"column",overflow:"hidden",flexGrow:1,width:!r&&i?"calc(100% - 350px)":"100%",direction:o.appDirection,justifyContent:"flex-start",transition:!0===i?a.transitions.create(["margin","width"],{easing:a.transitions.easing.easeOut,duration:a.transitions.duration.enteringScreen}):a.transitions.create(["margin","width"],{easing:a.transitions.easing.sharp,duration:a.transitions.duration.leavingScreen}),marginLeft:r||"ltr"!==o.appDirection||!0!==i?0:Te+"px",marginRight:r||"rtl"!==o.appDirection||!0!==i?0:Te+"px"}}));function Ka(){const i=t.useSelector((e=>e.SideBar)),o=me(),a=t.useSelector((e=>e.UserSession));return e.jsxs(B.BrowserRouter,{children:[e.jsx(A.ToastContainer,{draggable:!0,position:"bottom-center"}),e.jsx(Va,{}),!0===a.value.isAuthenticated?e.jsxs(qa,{open:i.isOpened,children:[e.jsx(p,{}),e.jsx(Yo,{}),o?null:e.jsx(aa,{}),o?e.jsx(ja,{}):null,e.jsx(qo,{}),e.jsx(Wa,{})]}):e.jsx(Ya,{})]})}const za=T.createSlice({name:"AppInfo",initialState:{value:{documentTitle:null,apiBaseUrl:null,appName:null,appVersion:null,appLogo:null,muiPremiumKey:null,enableAdministrationModule:!1,businessRoutes:[],businessNavigationItems:[],businessReduxReducers:{},businessCommonStoresMetaData:{},appTheme:{light:{primaryColor:"#37505C",secondaryColor:"#ff6d00"},dark:{primaryColor:"#ea690e",secondaryColor:"#74776B"}}}},reducers:{setAppInfo:(e,t)=>{e.value=t.payload}}}),Ha=za.actions;var Qa=za.reducer;const Za={SystemDataSourceType:{autoLoad:!1,data:[{value:"Mysql"},{value:"Oracle"},{value:"DB2"}],url:""},SystemParameterTypes:{autoLoad:!1,url:"",data:[{value:"text"},{value:"number"},{value:"date"},{value:"datetime"},{value:"combobox"},{value:"checkbox"},{value:"html"},{value:"lookup"}]},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"}]},SystemOrganizations:{autoLoad:!0,url:"api/v1/admin/organization/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemOrganizationRanks:{autoLoad:!0,url:"api/v1/admin/organization/ranks/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemOrganizationUnits:{autoLoad:!0,url:"api/v1/admin/organization/units/all",authority:"DEVELOPMENT_ADMIN",data:[]},SystemDataSources:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/datasourceconnection/all"},SystemDataQueries:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/dataquery/all"},SystemBluePrints:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/blueprint/all"},SystemReports:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/report/all"},SystemEntityParameters:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/entityparameter/all"},SystemMailTemplates:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/mailtemplate/all"},SystemWidgets:{autoLoad:!0,data:[],authority:"DEVELOPMENT_ADMIN",url:"api/v1/dev/widget/all"}},$a=i=>{const o=t.useDispatch();ne.LicenseInfo.setLicenseKey(i.muiPremiumKey);const a={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.light?.primaryColor||ot} #ffffff;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"light",primary:{main:i.appTheme?.light?.primaryColor||ot},secondary:{main:i.appTheme?.light?.secondaryColor||at},background:{default:"#f5f5f5",paper:"#f5f5f5"}}},r={components:{MuiCssBaseline:{styleOverrides:`\n /* Custom Scrollbar */\n * {\n scrollbar-width: thin;\n scrollbar-color: ${i.appTheme?.dark?.primaryColor||rt} #121212;\n }\n \n /* Webkit Browsers */\n *::-webkit-scrollbar {\n width: 12px;\n height: 10px;\n } \n `}},palette:{mode:"dark",primary:{main:i.appTheme?.dark?.primaryColor||rt},secondary:{main:i.appTheme?.dark?.secondaryColor||dt}}};let s={};i.enableAdministrationModule&&(s={...Za}),i.businessCommonStoresMetaData&&(s={...s,...i.businessCommonStoresMetaData}),o(Be(s));const p=t.useSelector((e=>e.AppLayout));let c={...a};"dark"===p.themeMode&&(c={...r});const u=d.createTheme({direction:p.appDirection,...c});return l.useEffect((()=>{document.title=i.documentTitle,o(Ha.setAppInfo(i))}),[]),e.jsx(n.ThemeProvider,{theme:u,children:e.jsx(Ka,{})})};i.library.add(o.fab),i.library.add(a.far),i.library.add(r.fas);Object.defineProperty(exports,"FontAwesomeIcon",{enumerable:!0,get:function(){return m.FontAwesomeIcon}}),Object.defineProperty(exports,"toast",{enumerable:!0,get:function(){return A.toast}}),exports.BaseApp=i=>{const o={AppLayout:fe,UserSession:Me,loadingMask:Ne,commonStores:We,SideBar:jo,AppInfo:Qa,...i.businessReduxReducers},a=T.configureStore({reducer:o});return e.jsx(t.Provider,{store:a,children:e.jsx($a,{...i})})},exports.CheckBox=Je,exports.ComboBox=et,exports.DARK_THEME_INITIAL_MAIN_COLOR=rt,exports.DARK_THEME_INITIAL_SECANDARY_COLOR=dt,exports.DATE_FORMAT=tt,exports.DATE_TIME_FORMAT=it,exports.Datefield=nt,exports.DatetimeField=lt,exports.LIGHT_THEME_INITIAL_MAIN_COLOR=ot,exports.LIGHT_THEME_INITIAL_SECANDARY_COLOR=at,exports.TemplateBarChart=Ke,exports.TemplateDataCard=ze,exports.TemplateForm=Po,exports.TemplateGauge=He,exports.TemplateGrid=wo,exports.TemplateLineChart=Qe,exports.TemplateLineProgress=$e,exports.TemplatePieChart=Xe,exports.TemplateTextField=je,exports.TransferList=qe,exports.capitalizeFirstLetter=mo,exports.hasDigitsOnly=function(e){return/^\d+$/.test(e)},exports.isNumber=co,exports.isNumeric=uo,exports.isValidEmail=To,exports.useApiActions=Ge,exports.useAxios=Le,exports.useConfirmationWindow=xe,exports.useIsMobile=me,exports.useLoadingMask=Re,exports.useSession=Ue,exports.useWindow=ve,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(v).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return v[e]}})})),Object.keys(le).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return le[e]}})})),Object.keys(se).forEach((function(e){"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return se[e]}})}));
|
|
32
32
|
//# sourceMappingURL=index.js.map
|