@xframework-ca-test/cli 1.0.32 → 1.0.34
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/ui/assets/AIVision-0025192f.js +4 -0
- package/dist/ui/assets/AccountDetails-42610e44.js +1 -0
- package/dist/ui/assets/AccountDetails-5b4cd3f7.js +1 -0
- package/dist/ui/assets/AccountServices-f68f471d.js +1 -0
- package/dist/ui/assets/AccountsList-262479cf.js +1 -0
- package/dist/ui/assets/ActionLink-9db8b1c2.js +1 -0
- package/dist/ui/assets/AdaptableCard-3d1e1f96.js +1 -0
- package/dist/ui/assets/AddAccount-2cd72664.js +1 -0
- package/dist/ui/assets/AddEditFile-6ae10d57.js +1 -0
- package/dist/ui/assets/AddEditTranslation-3812ff0f.js +1 -0
- package/dist/ui/assets/AiApiLogList-1eac39b7.js +1 -0
- package/dist/ui/assets/AiCa-2e90495f.js +1 -0
- package/dist/ui/assets/Alert-59d09a99.js +1 -0
- package/dist/ui/assets/ApiService-df126758.js +1 -0
- package/dist/ui/assets/AppLandingPage-afcea727.js +4 -0
- package/dist/ui/assets/AuditLogsList-ea37686b.js +1 -0
- package/dist/ui/assets/Auth0Callback-00729568.js +1 -0
- package/dist/ui/assets/BarCodes-4ff49536.js +1 -0
- package/dist/ui/assets/BlankLayout-7085ab88.js +1 -0
- package/dist/ui/assets/{BrainServices-a4bb698e.js → BrainServices-4cb93af5.js} +1 -1
- package/dist/ui/assets/CalendarList-689ed66a.js +2 -0
- package/dist/ui/assets/CalendarList-f4a9aa21.css +8 -0
- package/dist/ui/assets/CategoryList-a6d01041.js +1 -0
- package/dist/ui/assets/CategoryList-c03f4259.js +1 -0
- package/dist/ui/assets/ChatContainer-fec7b84d.js +1 -0
- package/dist/ui/assets/ChatsList-4b3194e4.js +1 -0
- package/dist/ui/assets/Check-af681a30.js +1 -0
- package/dist/ui/assets/CheckInVideo-aa9f50b2.js +6 -0
- package/dist/ui/assets/ClassicLayout-a9866742.js +2 -0
- package/dist/ui/assets/CompanyList-94119d71.js +1 -0
- package/dist/ui/assets/{CompanyService-1bf7c3c8.js → CompanyService-491a9cc1.js} +1 -1
- package/dist/ui/assets/{Component-59e4c14b.js → Component-566d01e0.js} +1 -1
- package/dist/ui/assets/ConfirmDialog-2838a642.js +1 -0
- package/dist/ui/assets/ContactDetails-c9dc0ed1.js +1 -0
- package/dist/ui/assets/{ContactService-92281a90.js → ContactService-8afcaeb7.js} +1 -1
- package/dist/ui/assets/ContactsList-5b06c9b8.js +1 -0
- package/dist/ui/assets/CountiesList-18b23cf7.js +1 -0
- package/dist/ui/assets/CountyDetails-ea024f14.js +1 -0
- package/dist/ui/assets/CourseDetails-8a5f8d63.js +1 -0
- package/dist/ui/assets/CourseList-3564fec3.js +1 -0
- package/dist/ui/assets/{CourseService-f0dc3bf1.js → CourseService-29ad460c.js} +1 -1
- package/dist/ui/assets/CreateSignature-c22e4a71.js +7 -0
- package/dist/ui/assets/{CustomerInfoField-fff65ace.js → CustomerInfoField-4bf880e2.js} +1 -1
- package/dist/ui/assets/DeckedLayout-610fe851.js +1 -0
- package/dist/ui/assets/DensitySelector-5d2e901f.js +1 -0
- package/dist/ui/assets/{DepartmentServices-3d56a9e7.js → DepartmentServices-a53e998b.js} +1 -1
- package/dist/ui/assets/{DigitalSignature-fff42e33.js → DigitalSignature-69eaf80c.js} +1 -1
- package/dist/ui/assets/{DocumemtManagementService-6501a5c1.js → DocumemtManagementService-85cde51a.js} +1 -1
- package/dist/ui/assets/DocumentActivity-bc938c61.js +1 -0
- package/dist/ui/assets/DocumentLayout-a12982d7.js +1 -0
- package/dist/ui/assets/DocumentList2-9c8c6284.js +23 -0
- package/dist/ui/assets/DocumentLists-1cdaae06.js +1 -0
- package/dist/ui/assets/DocumentUserSigned-f7371fc5.js +7 -0
- package/dist/ui/assets/DocumentsList-3b25907c.js +1 -0
- package/dist/ui/assets/DoubleSidedImage-b4bd3915.js +1 -0
- package/dist/ui/assets/{Drawer-949c18c6.js → Drawer-4f97e662.js} +1 -1
- package/dist/ui/assets/DynamicDashboard-0a41d287.js +1 -0
- package/dist/ui/assets/{DynamicTablesService-963fe77b.js → DynamicTablesService-6aa57f52.js} +1 -1
- package/dist/ui/assets/EditAccount-e42d66af.js +1 -0
- package/dist/ui/assets/EditLead-c8c9760a.js +1 -0
- package/dist/ui/assets/FaqItems-25d66543.js +6 -0
- package/dist/ui/assets/{FileManagementServices-25fd64c5.js → FileManagementServices-19b47568.js} +1 -1
- package/dist/ui/assets/{FolderOpen-88bfcc74.js → FolderOpen-7b0e2ac0.js} +1 -1
- package/dist/ui/assets/FormContainer-9a52b9e8.js +1 -0
- package/dist/ui/assets/{GeneralSettings-a7f805e8.js → GeneralSettings-c8c2f051.js} +5 -5
- package/dist/ui/assets/GenericPage-81e41302.js +1 -0
- package/dist/ui/assets/GridMapDetails-38f50b3c.js +1 -0
- package/dist/ui/assets/HorizontalMenuContent-fd559f4d.js +1 -0
- package/dist/ui/assets/{ImportFile-3f60d715.js → ImportFile-026b1771.js} +1 -1
- package/dist/ui/assets/{InlineSignaturePad-09c06619.js → InlineSignaturePad-f5630151.js} +1 -1
- package/dist/ui/assets/InvoicesList-9723bc5a.js +1 -0
- package/dist/ui/assets/{KeyVaultService-874d83fe.js → KeyVaultService-9608f0ff.js} +1 -1
- package/dist/ui/assets/LeadDetails-8cdaae0e.js +1 -0
- package/dist/ui/assets/{LeadSourceService-e46fa85e.js → LeadSourceService-cf71ea64.js} +1 -1
- package/dist/ui/assets/LeadsList-1ec20a77.js +1 -0
- package/dist/ui/assets/Logo-dd6f7656.js +1 -0
- package/dist/ui/assets/MapView-dcab88b3.js +1 -0
- package/dist/ui/assets/MarketingPage-998d10b0.js +4 -0
- package/dist/ui/assets/MenuNew-79fc95f3.js +1 -0
- package/dist/ui/assets/{MenuTable-c2c65021.js → MenuTable-f69e0fe4.js} +1 -1
- package/dist/ui/assets/MessageInput-07fcc5cb.js +21 -0
- package/dist/ui/assets/MessagesList-21d2b034.js +1 -0
- package/dist/ui/assets/ModernLayout-05af7cf7.js +1 -0
- package/dist/ui/assets/{NoData-8c485a3a.js → NoData-4cc4af03.js} +1 -1
- package/dist/ui/assets/Notify-8fb74d48.js +1 -0
- package/dist/ui/assets/OpportunitiesList-2f96958f.js +1 -0
- package/dist/ui/assets/OpportunityDetails-aaec3200.js +1 -0
- package/dist/ui/assets/{OpportunityServices-fa4fabfd.js → OpportunityServices-c4510dd2.js} +1 -1
- package/dist/ui/assets/OpportunityStatus-ea3b5ee2.js +1 -0
- package/dist/ui/assets/PageBreadcrumb-cf54a6e9.js +1 -0
- package/dist/ui/assets/{Password-d9294711.js → Password-21414dc6.js} +1 -1
- package/dist/ui/assets/PasswordInput-333c82ca.js +1 -0
- package/dist/ui/assets/{PreferenceService-75bf9db6.js → PreferenceService-d2b3e003.js} +1 -1
- package/dist/ui/assets/Profile-8c9fd2fc.js +1 -0
- package/dist/ui/assets/{ReportEditor-8880f57e.js → ReportEditor-4e4f6d53.js} +3 -3
- package/dist/ui/assets/{ReportViewer-9f1080f7.js → ReportViewer-616d3cfc.js} +30 -30
- package/dist/ui/assets/RoleEdit-a076ea85.js +1 -0
- package/dist/ui/assets/RoleForm-47691f91.js +1 -0
- package/dist/ui/assets/{RoleNew-49fadb16.js → RoleNew-e86a1513.js} +1 -1
- package/dist/ui/assets/{RoleService-7008da2c.js → RoleService-2f9ed883.js} +1 -1
- package/dist/ui/assets/ScheduleCycle-0ae23631.js +1 -0
- package/dist/ui/assets/{ScheduleService-7228f0a3.js → ScheduleService-41a88c41.js} +1 -1
- package/dist/ui/assets/ScreenList-8f58150b.js +1 -0
- package/dist/ui/assets/Settings-fc91c9d2.js +2 -0
- package/dist/ui/assets/{SetupWizard-4172e377.js → SetupWizard-d1363582.js} +1 -1
- package/dist/ui/assets/SimpleLayout-77cfb778.js +1 -0
- package/dist/ui/assets/StackedSideLayout-2f1ee9d1.js +1 -0
- package/dist/ui/assets/StickyFooter-3e569b80.js +1 -0
- package/dist/ui/assets/SupportRequets-0ecd4ab8.js +1 -0
- package/dist/ui/assets/{Switcher-c8648037.js → Switcher-e2fba588.js} +1 -1
- package/dist/ui/assets/TimeLogApprovalDataList-7b49a432.js +1 -0
- package/dist/ui/assets/TimeLogApprovalList-78cab2b6.js +1 -0
- package/dist/ui/assets/TimeLogList-592b29aa.js +1 -0
- package/dist/ui/assets/{TimeLogService-cd7b2f61.js → TimeLogService-83166cbc.js} +1 -1
- package/dist/ui/assets/TimesheetsList-d1520efb.js +1 -0
- package/dist/ui/assets/TranslationList-88d7d5d7.js +1 -0
- package/dist/ui/assets/TweaksPanel-bc10bc47.js +112 -0
- package/dist/ui/assets/{Upload-fb34ce03.js → Upload-be937eb6.js} +4 -4
- package/dist/ui/assets/UserEdit-1f8208f3.js +1 -0
- package/dist/ui/assets/UserForm-e9b56aff.js +1 -0
- package/dist/ui/assets/{UserNew-b36c342c.js → UserNew-31fa258f.js} +1 -1
- package/dist/ui/assets/{UserService-047aef51.js → UserService-1b93ceb0.js} +1 -1
- package/dist/ui/assets/ViewTimeLogForApproval-ae077050.js +1 -0
- package/dist/ui/assets/Views-1359da48.js +1 -0
- package/dist/ui/assets/WelcomeList-dc8666ec.js +9 -0
- package/dist/ui/assets/WidgetLayoutsService-49730609.js +1 -0
- package/dist/ui/assets/{WrapperCell-a7981b07.js → WrapperCell-3d5592cf.js} +1 -1
- package/dist/ui/assets/actioncell-6b5ebd6c.js +1 -0
- package/dist/ui/assets/{ar-3c9c213e.js → ar-fb4f0ea8.js} +1 -1
- package/dist/ui/assets/calendarList-ac838a86.js +2 -0
- package/dist/ui/assets/{cjs-162261df.js → cjs-998de55c.js} +1 -1
- package/dist/ui/assets/createSvgIcon-aba65987.js +1 -0
- package/dist/ui/assets/documentsList-4e2e061e.js +1 -0
- package/dist/ui/assets/{es-be649ede.js → es-cd58d3ad.js} +1 -1
- package/dist/ui/assets/{esm-f306d015.js → esm-c40433f8.js} +1 -1
- package/dist/ui/assets/gridList-e1571c87.js +1 -0
- package/dist/ui/assets/gridMapTable-d95f9c70.js +1 -0
- package/dist/ui/assets/{index-f6be0390.js → index-00a8eb64.js} +1 -1
- package/dist/ui/assets/index-04438b6b.js +22 -0
- package/dist/ui/assets/index-058738bc.js +1 -0
- package/dist/ui/assets/{index-e4c6057f.js → index-0b08ce18.js} +1 -1
- package/dist/ui/assets/index-0d730815.js +4 -0
- package/dist/ui/assets/index-0efcf53a.js +1 -0
- package/dist/ui/assets/index-0f432250.js +1 -0
- package/dist/ui/assets/{index-cebd880b.js → index-0fd6e996.js} +1 -1
- package/dist/ui/assets/{index-49a94e54.js → index-11297f4a.js} +1 -1
- package/dist/ui/assets/index-14c1c1d7.js +1 -0
- package/dist/ui/assets/index-15e1f4be.js +1 -0
- package/dist/ui/assets/index-16586c21.js +1 -0
- package/dist/ui/assets/index-19346c14.js +1 -0
- package/dist/ui/assets/{index-16bb10a6.js → index-1dc2b9d2.js} +1 -1
- package/dist/ui/assets/index-211fbe21.js +1 -0
- package/dist/ui/assets/index-23e16bff.js +1 -0
- package/dist/ui/assets/index-27aef8b5.js +1 -0
- package/dist/ui/assets/{index-36228db5.js → index-289b3fd9.js} +1 -1
- package/dist/ui/assets/{index-a22a3546.js → index-2dae59b1.js} +1 -1
- package/dist/ui/assets/index-353fd6dd.js +1 -0
- package/dist/ui/assets/{index-ea125a16.js → index-359d245d.js} +1 -1
- package/dist/ui/assets/{index-c62ac197.js → index-3b5ce20a.js} +70 -62
- package/dist/ui/assets/index-3b929ba4.js +34 -0
- package/dist/ui/assets/index-42e3a337.js +1 -0
- package/dist/ui/assets/index-44b6de3a.js +1 -0
- package/dist/ui/assets/index-46d3ca9a.js +7 -0
- package/dist/ui/assets/{index-e3cc723f.js → index-49016ad0.js} +1 -1
- package/dist/ui/assets/index-51132258.js +1 -0
- package/dist/ui/assets/{index-dc103f22.js → index-52963879.js} +1 -1
- package/dist/ui/assets/{index-fcc1c999.js → index-533fd007.js} +1 -1
- package/dist/ui/assets/index-59ec468b.js +13 -0
- package/dist/ui/assets/index-5e2d5279.js +1 -0
- package/dist/ui/assets/{index-d17da176.js → index-62f95885.js} +1 -1
- package/dist/ui/assets/index-659c6412.js +1 -0
- package/dist/ui/assets/index-6873dfc3.js +1 -0
- package/dist/ui/assets/index-69a68d9e.js +1 -0
- package/dist/ui/assets/index-6a6902c7.js +1 -0
- package/dist/ui/assets/index-7596c6bb.js +1 -0
- package/dist/ui/assets/{index-47dcc43a.js → index-8045c5f0.js} +1 -1
- package/dist/ui/assets/{index-b028e652.js → index-8677acd1.js} +1 -1
- package/dist/ui/assets/{index-42e65911.js → index-88c52b97.js} +1 -1
- package/dist/ui/assets/index-89cfefab.js +1 -0
- package/dist/ui/assets/{index-bea4c3dc.js → index-8c0643fd.js} +1 -1
- package/dist/ui/assets/index-8d5b6a1f.js +1 -0
- package/dist/ui/assets/index-8d5d70f9.js +1 -0
- package/dist/ui/assets/{index-9b41371d.js → index-91505016.js} +1 -1
- package/dist/ui/assets/{index-ffc00dbb.js → index-92314073.js} +1 -1
- package/dist/ui/assets/index-985cf3f6.js +1 -0
- package/dist/ui/assets/index-a14e51de.js +1 -0
- package/dist/ui/assets/index-a733f80b.js +1 -0
- package/dist/ui/assets/index-a84d5808.js +1 -0
- package/dist/ui/assets/index-acac6006.js +1 -0
- package/dist/ui/assets/index-b0ef7ac3.js +1 -0
- package/dist/ui/assets/index-b6ef5984.js +1 -0
- package/dist/ui/assets/{index-fc9071e0.js → index-bd4edda3.js} +1 -1
- package/dist/ui/assets/{index-0ec72c4b.js → index-c29b8474.js} +1 -1
- package/dist/ui/assets/index-c88c7790.js +19 -0
- package/dist/ui/assets/index-ce89a95e.css +7 -0
- package/dist/ui/assets/index-d221d69e.js +1 -0
- package/dist/ui/assets/{index-f1576468.js → index-d33facae.js} +1 -1
- package/dist/ui/assets/index-e46c57a5.js +1 -0
- package/dist/ui/assets/index-e863817c.js +1 -0
- package/dist/ui/assets/index-f4af2342.js +1 -0
- package/dist/ui/assets/{index-77e820d0.js → index-fc9f8c4b.js} +1 -1
- package/dist/ui/assets/{index-ec2010d2.js → index-ff23edc5.js} +1 -1
- package/dist/ui/assets/{index.esm-70ab539c.js → index.esm-b2d342b5.js} +1 -1
- package/dist/ui/assets/liveLocation-8e0bb2f3.js +1 -0
- package/dist/ui/assets/{mapView-ab35acaa.js → mapView-c8063ed6.js} +1 -1
- package/dist/ui/assets/modeuls-setup-4b06843c.js +1 -0
- package/dist/ui/assets/{permissionHoc-6f787658.js → permissionHoc-0818bfb0.js} +1 -1
- package/dist/ui/assets/{react-21134174.js → react-12ddbe48.js} +1 -1
- package/dist/ui/assets/{react-4d5dc208.js → react-61e0b284.js} +1 -1
- package/dist/ui/assets/{strongPassword-bbec776a.js → strongPassword-6bc8786f.js} +1 -1
- package/dist/ui/assets/{styles-0608350c.js → styles-b7ae7bf6.js} +1 -1
- package/dist/ui/assets/{tableV2-4d1c9fd2.js → tableV2-99c808c0.js} +1 -1
- package/dist/ui/assets/tableV3-24eed052.js +1 -0
- package/dist/ui/assets/ticketRequestDetails-8b299fbd.js +1 -0
- package/dist/ui/assets/{useDidUpdate-25c4d4ed.js → useDidUpdate-de319a18.js} +1 -1
- package/dist/ui/assets/{useDrop-02b0e5d7.js → useDrop-8f0d11a7.js} +1 -1
- package/dist/ui/assets/useFilteredData-e8fad668.js +1 -0
- package/dist/ui/assets/{usePermission-d94b4984.js → usePermission-4689548c.js} +1 -1
- package/dist/ui/assets/{vendor-charts-eccea5d1.js → vendor-charts-4be0b5ab.js} +1 -1
- package/dist/ui/assets/{vendor-codemirror-c8203b49.js → vendor-codemirror-1a1216c9.js} +11 -11
- package/dist/ui/assets/{vendor-devex-33a39e11.js → vendor-devex-4076ffeb.js} +2 -2
- package/dist/ui/assets/{vendor-excel-ee8fc4e5.js → vendor-excel-3b3553df.js} +1 -1
- package/dist/ui/assets/{vendor-i18n-2fcb1983.js → vendor-i18n-b89304ef.js} +1 -1
- package/dist/ui/assets/vendor-mui-98daa63f.js +185 -0
- package/dist/ui/assets/{vendor-pdf-b2a5d8b1.js → vendor-pdf-3c29882d.js} +1 -1
- package/dist/ui/assets/withHeaderItem-df2cc5d9.js +1 -0
- package/dist/ui/assets/{zh-cn-1881e930.js → zh-cn-13c6c696.js} +1 -1
- package/dist/ui/config.js +16 -20
- package/dist/ui/index.html +9 -9
- package/dist/ui/manifest.json +2 -2
- package/index.bundle.js +23 -9
- package/package.json +1 -1
- package/dist/ui/assets/AIVision-4f515575.js +0 -4
- package/dist/ui/assets/AccountDetails-2b42d262.js +0 -1
- package/dist/ui/assets/AccountDetails-492dee8f.js +0 -1
- package/dist/ui/assets/AccountServices-62599aae.js +0 -1
- package/dist/ui/assets/AccountsList-fe7cb5f9.js +0 -1
- package/dist/ui/assets/ActionLink-33e476e1.js +0 -1
- package/dist/ui/assets/AdaptableCard-df7695d6.js +0 -1
- package/dist/ui/assets/AddAccount-a05910e8.js +0 -1
- package/dist/ui/assets/AddEditFile-063c229b.js +0 -1
- package/dist/ui/assets/AddEditTranslation-43beae49.js +0 -1
- package/dist/ui/assets/AiApiLogList-a488921d.js +0 -1
- package/dist/ui/assets/AiCa-9c1b25b2.js +0 -1
- package/dist/ui/assets/Alert-7dfbd254.js +0 -1
- package/dist/ui/assets/ApiService-2b99757f.js +0 -1
- package/dist/ui/assets/AppLandingPage-3956cf0c.js +0 -4
- package/dist/ui/assets/AuditLogsList-7a2ce37d.js +0 -1
- package/dist/ui/assets/Auth0Callback-b943f19f.js +0 -1
- package/dist/ui/assets/BarCodes-17ed5da4.js +0 -1
- package/dist/ui/assets/BlankLayout-2f6e1153.js +0 -1
- package/dist/ui/assets/CalendarList-25834ddb.css +0 -11
- package/dist/ui/assets/CalendarList-72739043.js +0 -2
- package/dist/ui/assets/CategoryList-9f82e9a3.js +0 -1
- package/dist/ui/assets/CategoryList-c97891e7.js +0 -1
- package/dist/ui/assets/ChatContainer-4a38b179.js +0 -1
- package/dist/ui/assets/ChatsList-6c2c3e2f.js +0 -1
- package/dist/ui/assets/Check-71f21a49.js +0 -1
- package/dist/ui/assets/CheckInVideo-cb5fa9a2.js +0 -6
- package/dist/ui/assets/ClassicLayout-7d09e5ac.js +0 -1
- package/dist/ui/assets/CompanyList-9532f511.js +0 -1
- package/dist/ui/assets/ConfirmDialog-3202eb3d.js +0 -1
- package/dist/ui/assets/ContactDetails-3b70919b.js +0 -1
- package/dist/ui/assets/ContactsList-e9ac0fa3.js +0 -1
- package/dist/ui/assets/CountiesList-6ad338a5.js +0 -1
- package/dist/ui/assets/CountyDetails-22d4bc89.js +0 -1
- package/dist/ui/assets/CourseDetails-18040b49.js +0 -1
- package/dist/ui/assets/CourseList-e502f89d.js +0 -1
- package/dist/ui/assets/CreateSignature-375d191b.js +0 -7
- package/dist/ui/assets/DeckedLayout-909ac220.js +0 -1
- package/dist/ui/assets/DensitySelector-a2c1c68f.js +0 -1
- package/dist/ui/assets/DocumentActivity-d63dacec.js +0 -1
- package/dist/ui/assets/DocumentLayout-637075fd.js +0 -1
- package/dist/ui/assets/DocumentList2-518d2fa4.js +0 -23
- package/dist/ui/assets/DocumentLists-2da9ff88.js +0 -1
- package/dist/ui/assets/DocumentUserSigned-27bfa6e6.js +0 -7
- package/dist/ui/assets/DocumentsList-9f56db71.js +0 -1
- package/dist/ui/assets/DoubleSidedImage-ae98733b.js +0 -1
- package/dist/ui/assets/DynamicDashboard-6f177244.js +0 -1
- package/dist/ui/assets/EditAccount-1c1a8318.js +0 -1
- package/dist/ui/assets/EditLead-cc38d2a2.js +0 -1
- package/dist/ui/assets/FaqItems-c1c85af7.js +0 -6
- package/dist/ui/assets/FormContainer-91c2b0e4.js +0 -1
- package/dist/ui/assets/GenericPage-25a5d92a.js +0 -1
- package/dist/ui/assets/GridMapDetails-851a5781.js +0 -1
- package/dist/ui/assets/HorizontalMenuContent-96da38e1.js +0 -1
- package/dist/ui/assets/InvoicesList-8e66a112.js +0 -1
- package/dist/ui/assets/LeadDetails-ad63b3df.js +0 -1
- package/dist/ui/assets/LeadsList-bd7d9804.js +0 -1
- package/dist/ui/assets/Logo-3f3c9ee6.js +0 -1
- package/dist/ui/assets/MapView-afd1c913.js +0 -1
- package/dist/ui/assets/MarketingPage-89a860b1.js +0 -4
- package/dist/ui/assets/MenuEdit-d6e0d64c.js +0 -1
- package/dist/ui/assets/MessageInput-6dc83761.js +0 -21
- package/dist/ui/assets/MessagesList-966b69c5.js +0 -1
- package/dist/ui/assets/ModernLayout-03f30574.js +0 -1
- package/dist/ui/assets/Notify-bb3ce372.js +0 -1
- package/dist/ui/assets/OpportunitiesList-62eb34f6.js +0 -1
- package/dist/ui/assets/OpportunityDetails-356a8580.js +0 -1
- package/dist/ui/assets/OpportunityStatus-fa8108ea.js +0 -1
- package/dist/ui/assets/PasswordInput-8619a9df.js +0 -1
- package/dist/ui/assets/Profile-9104808b.js +0 -1
- package/dist/ui/assets/RoleEdit-98a6410b.js +0 -1
- package/dist/ui/assets/RoleForm-cc251eba.js +0 -1
- package/dist/ui/assets/ScheduleCycle-22c8e809.js +0 -1
- package/dist/ui/assets/ScreenList-9f7afa1c.js +0 -1
- package/dist/ui/assets/SidePanelContent-6b13836f.js +0 -1
- package/dist/ui/assets/SimpleLayout-d5445c0d.js +0 -2
- package/dist/ui/assets/StackedSideLayout-51127dc5.js +0 -1
- package/dist/ui/assets/StickyFooter-5b934274.js +0 -1
- package/dist/ui/assets/SupportRequets-be6542a9.js +0 -1
- package/dist/ui/assets/TimeLogApprovalDataList-c16d8bae.js +0 -1
- package/dist/ui/assets/TimeLogApprovalList-f6a75a20.js +0 -1
- package/dist/ui/assets/TimeLogList-ea288cce.js +0 -1
- package/dist/ui/assets/TimesheetsList-4a20e96c.js +0 -1
- package/dist/ui/assets/TranslationList-7a989333.js +0 -1
- package/dist/ui/assets/UserEdit-87262ea5.js +0 -1
- package/dist/ui/assets/UserForm-31fdd3b3.js +0 -1
- package/dist/ui/assets/ViewTimeLogForApproval-43b24a1a.js +0 -1
- package/dist/ui/assets/Views-74429e81.js +0 -1
- package/dist/ui/assets/WelcomeList-6c693eae.js +0 -9
- package/dist/ui/assets/actioncell-17e12e21.js +0 -1
- package/dist/ui/assets/calendarList-511b4d8f.js +0 -2
- package/dist/ui/assets/createSvgIcon-c5fc0d04.js +0 -1
- package/dist/ui/assets/documentsList-ac2c91ec.js +0 -1
- package/dist/ui/assets/dxicons-4c1b2089.ttf +0 -0
- package/dist/ui/assets/dxicons-ade3c9ed.woff2 +0 -0
- package/dist/ui/assets/dxicons-b4cd1226.woff +0 -0
- package/dist/ui/assets/gridList-cb9a14b1.js +0 -1
- package/dist/ui/assets/gridMapTable-c19770a8.js +0 -1
- package/dist/ui/assets/index-1d60e514.js +0 -1
- package/dist/ui/assets/index-26466d9d.js +0 -1
- package/dist/ui/assets/index-289cfedb.js +0 -1
- package/dist/ui/assets/index-2ce5b358.js +0 -1
- package/dist/ui/assets/index-307ce6d7.js +0 -1
- package/dist/ui/assets/index-36ba4ea7.js +0 -1
- package/dist/ui/assets/index-3f02e05a.js +0 -1
- package/dist/ui/assets/index-44662933.js +0 -13
- package/dist/ui/assets/index-51ee35f9.js +0 -1
- package/dist/ui/assets/index-54372d82.js +0 -1
- package/dist/ui/assets/index-569a9d2c.js +0 -1
- package/dist/ui/assets/index-62de659f.js +0 -13
- package/dist/ui/assets/index-6589dd2d.js +0 -1
- package/dist/ui/assets/index-6b6d0f06.js +0 -1
- package/dist/ui/assets/index-6c618440.js +0 -1
- package/dist/ui/assets/index-785ad361.js +0 -1
- package/dist/ui/assets/index-7df8779c.js +0 -1
- package/dist/ui/assets/index-82c9477e.js +0 -1
- package/dist/ui/assets/index-8ab45286.js +0 -1
- package/dist/ui/assets/index-8c229076.css +0 -7
- package/dist/ui/assets/index-a205cfed.js +0 -34
- package/dist/ui/assets/index-a23f9c87.js +0 -1
- package/dist/ui/assets/index-a455424a.js +0 -1
- package/dist/ui/assets/index-a4f78ee1.js +0 -1
- package/dist/ui/assets/index-aaad94c2.js +0 -1
- package/dist/ui/assets/index-b1b6b0f6.js +0 -1
- package/dist/ui/assets/index-c1f92742.js +0 -4
- package/dist/ui/assets/index-c2088808.js +0 -1
- package/dist/ui/assets/index-cbc29fa8.js +0 -1
- package/dist/ui/assets/index-cd2b7d32.js +0 -1
- package/dist/ui/assets/index-cf3804f1.js +0 -19
- package/dist/ui/assets/index-d0ef2cc2.js +0 -1
- package/dist/ui/assets/index-d1145737.js +0 -7
- package/dist/ui/assets/index-d58fb185.js +0 -1
- package/dist/ui/assets/index-d5b5a7e1.js +0 -1
- package/dist/ui/assets/index-daeff047.js +0 -1
- package/dist/ui/assets/index-ded3b055.js +0 -1
- package/dist/ui/assets/index-ede23a2b.js +0 -1
- package/dist/ui/assets/index-f8144346.js +0 -1
- package/dist/ui/assets/index-fd68b510.js +0 -1
- package/dist/ui/assets/index-fe3409ae.js +0 -1
- package/dist/ui/assets/liveLocation-646eef95.js +0 -1
- package/dist/ui/assets/modeuls-setup-402f891e.js +0 -1
- package/dist/ui/assets/tableV3-3d2f4952.js +0 -1
- package/dist/ui/assets/ticketRequestDetails-f78147f7.js +0 -1
- package/dist/ui/assets/vendor-mui-69397583.js +0 -185
- package/dist/ui/menudata/menus.json +0 -606
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as L}from"./vendor-pdf-
|
|
1
|
+
import{_ as L}from"./vendor-pdf-3c29882d.js";import{j as e}from"./vendor-mui-98daa63f.js";import{r as f}from"./vendor-react-ece1c85f.js";import{n as P,M as C,F as O,H as W,S as q,k as N,P as V,b as $,C as J,d as K,e as Q,f as U,T as X,I as w,g as j,l as Y,m as Z}from"./vendor-devex-4076ffeb.js";import{F as ee}from"./FileSaver.min-20f3f13a.js";const re=d=>{const l={},h=[];d.forEach(t=>{l[t.id]={...t,children:[]}}),d.forEach(t=>{t.parentId===null?h.push(l[t.id]):l[t.parentId]&&l[t.parentId].children.push(l[t.id])});const p=t=>{t.sort((c,m)=>(c.sequence??0)-(m.sequence??0)),t.forEach(c=>c.children&&p(c.children))};return p(h),h},le=({dataSource:d,keyExpr:l="ID",mode:h="select",showFilterRow:p=!0,currentFilter:t="auto",showHeaderFilter:c=!0,searchEnabled:m=!0,searchEditorOptions:F={},allowSelectAll:y=!0,selectByClick:M=!0,recursive:_=!0,actionColumn:x,stateStorageKey:b="MenuTable",columns:I=[],isDetailsRow:g=!1,height:k,isReorder:T=!1,onReorder:u,tableID:B})=>{const R=f.useRef(null),[E,S]=f.useState([]),A=[50,100,250,500,1e3];f.useEffect(()=>{S(g?re(d):d)},[d,g]);const z=async r=>{const{Workbook:s}=await L(()=>import("./vendor-excel-3b3553df.js").then(n=>n.e),["assets/vendor-excel-3b3553df.js","assets/vendor-react-ece1c85f.js","assets/vendor-devex-4076ffeb.js","assets/vendor-mui-98daa63f.js"]),o=new s,a=o.addWorksheet("Main sheet");Z({component:r.component,worksheet:a}).then(()=>{o.xlsx.writeBuffer().then(n=>{ee.saveAs(new Blob([n],{type:"application/octet-stream"}),`${b}.xlsx`)})}),r.cancel=!0},G=()=>I.map((r,s)=>e.jsx(j,{dataField:r.dataField,caption:r.caption,dataType:r.dataType,allowSorting:r.allowSorting,allowFiltering:r.allowFiltering,allowEditing:r.allowEditing,allowSearch:r.allowSearch,cellRender:r.cellRender,...r.extraProps},s)),v=({data:r})=>{var s;return(s=r==null?void 0:r.children)!=null&&s.length?e.jsxs(P,{dataSource:r.children,keyExpr:"id",showBorders:!1,showColumnHeaders:!1,rowAlternationEnabled:!0,rowDragging:{allowReordering:!0,showDragIcons:!0,onReorder:o=>{const a=o.fromIndex,n=o.toIndex,i=[...r.children],D=i[a],H=i[n];i.splice(a,1),i.splice(n,0,D),r.children=i,u==null||u({movedItem:D,replacedItem:H,fromIndex:a,toIndex:n})}},children:[I.map((o,a)=>e.jsx(j,{...o},a)),e.jsx(C,{enabled:!0,render:({data:o})=>e.jsx(v,{data:o})})]}):null};return e.jsx("div",{children:e.jsxs(P,{id:B,ref:R,dataSource:E,keyExpr:l,showBorders:!1,showColumnLines:!1,showRowLines:!0,rowAlternationEnabled:!0,allowColumnResizing:!0,columnAutoWidth:!0,allowColumnReordering:!0,remoteOperations:!0,height:k||void 0,onExporting:z,stateStoring:{enabled:!1,type:"localStorage",storageKey:b},rowDragging:T?{allowReordering:!0,showDragIcons:!0,onReorder:r=>{const s=[...E],o=r.fromIndex,a=r.toIndex,n=s[o],i=s[a];s.splice(o,1),s.splice(a,0,n),S(s),u==null||u({movedItem:n,replacedItem:i,fromIndex:o,toIndex:a})}}:void 0,children:[g&&e.jsx(C,{enabled:!0,autoExpandAll:!1,render:({data:r})=>e.jsx(v,{data:r})}),e.jsx(O,{visible:p,applyFilter:t}),e.jsx(W,{visible:c}),e.jsx(q,{visible:!0,width:240,placeholder:"Search..."}),e.jsx(N,{defaultPageSize:50}),e.jsx(V,{showPageSizeSelector:!0,allowedPageSizes:A,showNavigationButtons:!0,displayMode:"full",visible:!0}),e.jsx($,{mode:"virtual",rowRenderingMode:"virtual"}),e.jsxs(J,{height:"340px",enabled:!0,mode:h,children:[e.jsx(K,{my:"right top",at:"right bottom",of:".dx-datagrid-column-chooser-button"}),e.jsx(Q,{enabled:m,editorOptions:F}),e.jsx(U,{allowSelectAll:y,selectByClick:M,recursive:_})]}),e.jsxs(X,{children:[e.jsx(w,{location:"before",name:"searchPanel"}),e.jsx(w,{name:"exportButton"}),e.jsx(w,{name:"columnChooserButton"})]}),x&&e.jsx(j,{dataField:x.dataField,caption:x.caption,cellRender:x.cellRender}),G(),e.jsx(Y,{enabled:!0,allowExportSelectedData:!1})]})})};export{le as M};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{j as p}from"./vendor-mui-98daa63f.js";import{_ as Be,G as ge,c2 as Ge,c3 as Ve,c4 as Qe,c5 as Ze,D as Je,as as Ke,k as Xe,a0 as Ye,c6 as en,B as ye,c7 as nn}from"./index-3b5ce20a.js";import{r as B,u as tn}from"./vendor-react-ece1c85f.js";import{a as rn}from"./index-88c52b97.js";import{u as sn}from"./useDeviceCheck-920641a5.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{b as de,c as ln,a as an}from"./vendor-redux-a1f00e6b.js";import{a as on,b as cn}from"./BrainServices-4cb93af5.js";import{a as un}from"./index-00a8eb64.js";const pn={messages:[],loading:!1,error:null,isChatDialog:!1,file:null,fileType:"",fileName:"",documentId:null,uId:null},re=de("brain/askQuestion",async(n,t)=>{var r,a;try{const o=t.getState(),f=(a=(r=o==null?void 0:o.aiChat)==null?void 0:r.data)==null?void 0:a.uId,m=n==null?void 0:n.ipAddress,d=n==null?void 0:n.message;return console.log(o==null?void 0:o.aiChat),(await on(f,m,d)).data}catch{return t.rejectWithValue("Error occurred while asking the question")}}),se=de("brain/apiUploadAndAsk",async({file:n,message:t},r)=>{try{return(await cn(n,t)).data.questionAnswer}catch{return r.rejectWithValue("Error occurred while asking the question")}}),ie=de("brain/apiQueryDocument",async(n,t)=>{var m,d,l,k,w,C;const r=t.getState();let a=typeof((d=(m=r.aiChat)==null?void 0:m.data)==null?void 0:d.file)=="string";const o=JSON.stringify({fileUrl:(k=(l=r.aiChat)==null?void 0:l.data)==null?void 0:k.file,aiProvider:"Gemini",customPrompt:n==null?void 0:n.question,enableStreaming:!1,maxTokens:1e4,temperature:.5,uploadInputFile:!1,uploadProcessedResult:!1}),f={Authorization:"Bearer sample-user-key-456"};a&&(f["Content-Type"]="application/json");try{const x=new FormData;x.append("File",(C=(w=r.aiChat)==null?void 0:w.data)==null?void 0:C.file),x.append("AiProvider","Gemini"),x.append("CustomPrompt",n==null?void 0:n.question),x.append("EnableStreaming","false"),x.append("Temperature","0.5");const N=await(await fetch(`/api/ImageProcessing/${a?"process-remote-url":"process-remote-upload"}?trackOperation=false`,{method:"POST",headers:f,body:a?o:x})).json();return{content:(N==null?void 0:N.content)||"Please try again",file:N==null?void 0:N.inputFileDownloadUrl}}catch{return t.rejectWithValue("Error occurred while asking the question")}}),Re=ln({name:"brain",initialState:pn,reducers:{resetState:n=>{n.messages=[],n.loading=!1,n.error=null,n.isChatDialog=!1,n.file=null,n.fileType="",n.fileName="",n.documentId=null,n.uId=null},toggleChatDialog:(n,t)=>{n.isChatDialog=t.payload},handleFile:(n,t)=>{const{file:r,fileType:a,fileName:o}=t.payload;n.file=r,n.fileType=a,n.fileName=o},handleDocumentId:(n,t)=>{n.documentId=t.payload}},extraReducers:n=>{n.addCase(re.pending,t=>{t.loading=!0,t.error=null}).addCase(re.fulfilled,(t,r)=>{var a,o,f;console.log("action",r),t.loading=!1,t.uId=(a=r==null?void 0:r.payload)==null?void 0:a.uid,t.messages.push({question:r.meta.arg.message?r.meta.arg.message:r.meta.arg,response:((o=r==null?void 0:r.payload)==null?void 0:o.response)||((f=r==null?void 0:r.payload)==null?void 0:f.answer)||""})}).addCase(re.rejected,(t,r)=>{t.loading=!1,t.error=r.payload}).addCase(se.pending,t=>{t.loading=!0,t.error=null}).addCase(se.fulfilled,(t,r)=>{console.log("action",r),t.loading=!1,t.messages.push({question:r.meta.arg.message,response:r.payload})}).addCase(se.rejected,(t,r)=>{t.loading=!1,t.error=r.payload}).addCase(ie.pending,t=>{t.loading=!0,t.error=null}).addCase(ie.fulfilled,(t,r)=>{var a,o,f;t.loading=!1,(a=r.payload)!=null&&a.file&&(t.file=(o=r.payload)==null?void 0:o.file),t.messages.push({question:r.meta.arg.question,response:(f=r.payload)==null?void 0:f.content})}).addCase(ie.rejected,(t,r)=>{t.loading=!1,t.error=r.payload})}}),{resetState:dn,toggleChatDialog:Ft,handleFile:Lt,handleDocumentId:qt}=Re.actions,fn=Re.reducer,mn=an({data:fn}),J=Be;function P(){return P=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n},P.apply(this,arguments)}const hn=["children","options"],xe=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((n,t)=>(n[t.toLowerCase()]=t,n),{class:"className",for:"htmlFor"}),be={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},gn=["style","script","pre"],yn=["src","href","data","formAction","srcDoc","action"],xn=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,bn=/\n{2,}$/,ke=/^(\s*>[\s\S]*?)(?=\n\n|$)/,kn=/^ *> ?/gm,vn=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,jn=/^ {2,}\n/,wn=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,ve=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,je=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Cn=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Nn=/^(?:\n *)*\n/,An=/\r\n?/g,Sn=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,$n=/^\[\^([^\]]+)]/,On=/\f/g,Tn=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,En=/^\s*?\[(x|\s)\]/,we=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ce=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Ne=/^([^\n]+)\n *(=|-)\2{2,} *\n/,le=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,In=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Ae=/^<!--[\s\S]*?(?:-->)/,Dn=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,ae=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Rn=/^\{.*\}$/,zn=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,_n=/^<([^ >]+[:@\/][^ >]+)>/,Mn=/-([a-z])?/gi,Se=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Pn=/^[^\n]+(?: \n|\n{2,})/,Fn=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Ln=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,qn=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Un=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Hn=/\t/g,Wn=/(^ *\||\| *$)/g,Bn=/^ *:-+: *$/,Gn=/^ *:-+ *$/,Vn=/^ *-+: *$/,Y=n=>`(?=[\\s\\S]+?\\1${n?"\\1":""})`,ee="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",Qn=RegExp(`^([*_])\\1${Y(1)}${ee}\\1\\1(?!\\1)`),Zn=RegExp(`^([*_])${Y(0)}${ee}\\1(?!\\1)`),Jn=RegExp(`^(==)${Y(0)}${ee}\\1`),Kn=RegExp(`^(~~)${Y(0)}${ee}\\1`),Xn=/^(:[a-zA-Z0-9-_]+:)/,Yn=/^\\([^0-9A-Za-z\s])/,et=/\\([^0-9A-Za-z\s])/g,nt=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,tt=/^\n+/,rt=/^([ \t]*)/,st=/(?:^|\n)( *)$/,fe="(?:\\d+\\.)",me="(?:[*+-])";function ze(n){return"( *)("+(n===1?fe:me)+") +"}const _e=ze(1),Me=ze(2);function Pe(n){return RegExp("^"+(n===1?_e:Me))}const it=Pe(1),lt=Pe(2);function Fe(n){return RegExp("^"+(n===1?_e:Me)+"[^\\n]*(?:\\n(?!\\1"+(n===1?fe:me)+" )[^\\n]*)*(\\n|$)","gm")}const at=Fe(1),ot=Fe(2);function Le(n){const t=n===1?fe:me;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const qe=Le(1),Ue=Le(2);function $e(n,t){const r=t===1,a=r?qe:Ue,o=r?at:ot,f=r?it:lt;return{t:m=>f.test(m),o:U(function(m,d){const l=st.exec(d.prevCapture);return l&&(d.list||!d.inline&&!d.simple)?a.exec(m=l[1]+m):null}),i:1,u(m,d,l){const k=r?+m[2]:void 0,w=m[0].replace(bn,`
|
|
2
|
+
`).match(o);let C=!1;return{items:w.map(function(x,I){const N=f.exec(x)[0].length,G=RegExp("^ {1,"+N+"}","gm"),F=x.replace(G,"").replace(f,""),e=I===w.length-1,i=F.indexOf(`
|
|
3
|
+
|
|
4
|
+
`)!==-1||e&&C;C=i;const s=l.inline,u=l.list;let c;l.list=!0,i?(l.inline=!1,c=W(F)+`
|
|
5
|
+
|
|
6
|
+
`):(l.inline=!0,c=W(F));const h=d(c,l);return l.inline=s,l.list=u,h}),ordered:r,start:k}},l:(m,d,l)=>n(m.ordered?"ol":"ul",{key:l.key,start:m.type==="20"?m.start:void 0},m.items.map(function(k,w){return n("li",{key:w},d(k,l))}))}}const ct=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),ut=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function Oe(n){return typeof n=="string"}function W(n){let t=n.length;for(;t>0&&n[t-1]<=" ";)t--;return n.slice(0,t)}function K(n,t){return n.startsWith(t)}function pt(n,t,r){if(Array.isArray(r)){for(let a=0;a<r.length;a++)if(K(n,r[a]))return!0;return!1}return r(n,t)}function H(n){return n.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function dt(n){return Vn.test(n)?"right":Bn.test(n)?"center":Gn.test(n)?"left":null}function Te(n,t,r,a){const o=r.inTable;r.inTable=!0;let f=[[]],m="";function d(){if(!m)return;const l=f[f.length-1];l.push.apply(l,t(m,r)),m=""}return n.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((l,k,w)=>{l.trim()==="|"&&(d(),a)?k!==0&&k!==w.length-1&&f.push([]):m+=l}),d(),r.inTable=o,f}function ft(n,t,r){r.inline=!0;const a=n[2]?n[2].replace(Wn,"").split("|").map(dt):[],o=n[3]?function(m,d,l){return m.trim().split(`
|
|
7
|
+
`).map(function(k){return Te(k,d,l,!0)})}(n[3],t,r):[],f=Te(n[1],t,r,!!o.length);return r.inline=!1,o.length?{align:a,cells:o,header:f,type:"25"}:{children:f,type:"21"}}function Ee(n,t){return n.align[t]==null?{}:{textAlign:n.align[t]}}function U(n){return n.inline=1,n}function M(n){return U(function(t,r){return r.inline?n.exec(t):null})}function E(n){return U(function(t,r){return r.inline||r.simple?n.exec(t):null})}function T(n){return function(t,r){return r.inline||r.simple?null:n.exec(t)}}function Z(n){return U(function(t){return n.exec(t)})}const mt=/(javascript|vbscript|data(?!:image)):/i;function ht(n){try{const t=decodeURIComponent(n).replace(/[^A-Za-z0-9/:]/g,"");if(mt.test(t))return null}catch{return null}return n}function O(n){return n&&n.replace(et,"$1")}function X(n,t,r){const a=r.inline||!1,o=r.simple||!1;r.inline=!0,r.simple=!0;const f=n(t,r);return r.inline=a,r.simple=o,f}function gt(n,t,r){const a=r.inline||!1,o=r.simple||!1;r.inline=!1,r.simple=!0;const f=n(t,r);return r.inline=a,r.simple=o,f}function yt(n,t,r){const a=r.inline||!1;r.inline=!1;const o=n(t,r);return r.inline=a,o}const oe=(n,t,r)=>({children:X(t,n[2],r)});function ce(){return{}}function ue(){return null}function xt(...n){return n.filter(Boolean).join(" ")}function pe(n,t,r){let a=n;const o=t.split(".");for(;o.length&&(a=a[o[0]],a!==void 0);)o.shift();return a||r}function bt(n="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?P({},be,t.namedCodesToUnicode):be;const r=t.slugify||H,a=t.sanitizer||ht,o=t.createElement||B.createElement,f=[ke,ve,je,t.enforceAtxHeadings?Ce:we,Ne,Se,qe,Ue],m=[...f,Pn,le,Ae,ae];function d(e,i){for(let s=0;s<e.length;s++)if(e[s].test(i))return!0;return!1}function l(e,i,...s){const u=pe(t.overrides,e+".props",{});return o(function(c,h){const g=pe(h,c);return g?typeof g=="function"||typeof g=="object"&&"render"in g?g:pe(h,c+".component",c):c}(e,t.overrides),P({},i,u,{className:xt(i==null?void 0:i.className,u.className)||void 0}),...s)}function k(e){e=e.replace(Tn,"");let i=!1;t.forceInline?i=!0:t.forceBlock||(i=Un.test(e)===!1);const s=G(N(i?e:W(e).replace(tt,"")+`
|
|
8
|
+
|
|
9
|
+
`,{inline:i}));for(;Oe(s[s.length-1])&&!s[s.length-1].trim();)s.pop();if(t.wrapper===null)return s;const u=t.wrapper||(i?"span":"div");let c;if(s.length>1||t.forceWrapper)c=s;else{if(s.length===1)return c=s[0],typeof c=="string"?l("span",{key:"outer"},c):c;c=null}return o(u,{key:"outer"},c)}function w(e,i){if(!i||!i.trim())return null;const s=i.match(xn);return s?s.reduce(function(u,c){const h=c.indexOf("=");if(h!==-1){const g=function(y){return y.indexOf("-")!==-1&&y.match(Dn)===null&&(y=y.replace(Mn,function(S,A){return A.toUpperCase()})),y}(c.slice(0,h)).trim(),v=function(y){const S=y[0];return(S==='"'||S==="'")&&y.length>=2&&y[y.length-1]===S?y.slice(1,-1):y}(c.slice(h+1).trim()),b=xe[g]||g;if(b==="ref")return u;const j=u[b]=function(y,S,A,he){return S==="style"?function(L){const D=[];let R="",z=!1,V=!1,ne="";if(!L)return D;for(let _=0;_<L.length;_++){const $=L[_];if($!=='"'&&$!=="'"||z||(V?$===ne&&(V=!1,ne=""):(V=!0,ne=$)),$==="("&&R.endsWith("url")?z=!0:$===")"&&z&&(z=!1),$!==";"||V||z)R+=$;else{const q=R.trim();if(q){const te=q.indexOf(":");if(te>0){const He=q.slice(0,te).trim(),We=q.slice(te+1).trim();D.push([He,We])}}R=""}}const Q=R.trim();if(Q){const _=Q.indexOf(":");if(_>0){const $=Q.slice(0,_).trim(),q=Q.slice(_+1).trim();D.push([$,q])}}return D}(A).reduce(function(L,[D,R]){return L[D.replace(/(-[a-z])/g,z=>z[1].toUpperCase())]=he(R,y,D),L},{}):yn.indexOf(S)!==-1?he(O(A),y,S):(A.match(Rn)&&(A=O(A.slice(1,A.length-1))),A==="true"||A!=="false"&&A)}(e,g,v,a);typeof j=="string"&&(le.test(j)||ae.test(j))&&(u[b]=k(j.trim()))}else c!=="style"&&(u[xe[c]||c]=!0);return u},{}):null}const C=[],x={},I={0:{t:[">"],o:T(ke),i:1,u(e,i,s){const[,u,c]=e[0].replace(kn,"").match(vn);return{alert:u,children:i(c,s)}},l(e,i,s){const u={key:s.key};return e.alert&&(u.className="markdown-alert-"+r(e.alert.toLowerCase(),H),e.children.unshift({attrs:{},children:[{type:"27",text:e.alert}],noInnerParse:!0,type:"11",tag:"header"})),l("blockquote",u,i(e.children,s))}},1:{t:[" "],o:Z(jn),i:1,u:ce,l:(e,i,s)=>l("br",{key:s.key})},2:{t:["--","__","**","- ","* ","_ "],o:T(wn),i:1,u:ce,l:(e,i,s)=>l("hr",{key:s.key})},3:{t:[" "],o:T(je),i:0,u:e=>({lang:void 0,text:O(W(e[0].replace(/^ {4}/gm,"")))}),l:(e,i,s)=>l("pre",{key:s.key},l("code",P({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))},4:{t:["```","~~~"],o:T(ve),i:0,u:e=>({attrs:w("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"})},5:{t:["`"],o:E(Cn),i:3,u:e=>({text:O(e[2])}),l:(e,i,s)=>l("code",{key:s.key},e.text)},6:{t:["[^"],o:T(Sn),i:0,u:e=>(C.push({footnote:e[2],identifier:e[1]}),{}),l:ue},7:{t:["[^"],o:M($n),i:1,u:e=>({target:"#"+r(e[1],H),text:e[1]}),l:(e,i,s)=>l("a",{key:s.key,href:a(e.target,"a","href")},l("sup",{key:s.key},e.text))},8:{t:["[ ]","[x]"],o:M(En),i:1,u:e=>({completed:e[1].toLowerCase()==="x"}),l:(e,i,s)=>l("input",{checked:e.completed,key:s.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:T(t.enforceAtxHeadings?Ce:we),i:1,u:(e,i,s)=>({children:X(i,e[2],s),id:r(e[2],H),level:e[1].length}),l:(e,i,s)=>l("h"+e.level,{id:e.id,key:s.key},i(e.children,s))},10:{t:e=>{const i=e.indexOf(`
|
|
10
|
+
`);return i>0&&i<e.length-1&&(e[i+1]==="="||e[i+1]==="-")},o:T(Ne),i:1,u:(e,i,s)=>({children:X(i,e[1],s),level:e[2]==="="?1:2,type:"9"})},11:{t:["<"],o:Z(le),i:1,u(e,i,s){const[,u]=e[3].match(rt),c=RegExp("^"+u,"gm"),h=e[3].replace(c,""),g=d(m,h)?yt:X,v=e[1].toLowerCase(),b=gn.indexOf(v)!==-1,j=(b?v:e[1]).trim(),y={attrs:w(j,e[2]),noInnerParse:b,tag:j};if(s.inAnchor=s.inAnchor||v==="a",b)y.text=e[3];else{const S=s.inHTML;s.inHTML=!0,y.children=g(i,h,s),s.inHTML=S}return s.inAnchor=!1,y},l:(e,i,s)=>l(e.tag,P({key:s.key},e.attrs),e.text||(e.children?i(e.children,s):""))},13:{t:["<"],o:Z(ae),i:1,u(e){const i=e[1].trim();return{attrs:w(i,e[2]||""),tag:i}},l:(e,i,s)=>l(e.tag,P({},e.attrs,{key:s.key}))},12:{t:["<!--"],o:Z(Ae),i:1,u:()=>({}),l:ue},14:{t:["!["],o:E(ut),i:1,u:e=>({alt:O(e[1]),target:O(e[2]),title:O(e[3])}),l:(e,i,s)=>l("img",{key:s.key,alt:e.alt||void 0,title:e.title||void 0,src:a(e.target,"img","src")})},15:{t:["["],o:M(ct),i:3,u:(e,i,s)=>({children:gt(i,e[1],s),target:O(e[2]),title:O(e[3])}),l:(e,i,s)=>l("a",{key:s.key,href:a(e.target,"a","href"),title:e.title},i(e.children,s))},16:{t:["<"],o:M(_n),i:0,u(e){let i=e[1],s=!1;return i.indexOf("@")!==-1&&i.indexOf("//")===-1&&(s=!0,i=i.replace("mailto:","")),{children:[{text:i,type:"27"}],target:s?"mailto:"+i:i,type:"15"}}},17:{t:(e,i)=>!i.inAnchor&&!t.disableAutoLink&&(K(e,"http://")||K(e,"https://")),o:M(zn),i:0,u:e=>({children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"})},20:$e(l,1),33:$e(l,2),19:{t:[`
|
|
11
|
+
`],o:T(Nn),i:3,u:ce,l:()=>`
|
|
12
|
+
`},21:{o:U(function(e,i){if(i.inline||i.simple||i.inHTML&&e.indexOf(`
|
|
13
|
+
|
|
14
|
+
`)===-1&&i.prevCapture.indexOf(`
|
|
15
|
+
|
|
16
|
+
`)===-1)return null;let s="",u=0;for(;;){const h=e.indexOf(`
|
|
17
|
+
`,u),g=e.slice(u,h===-1?void 0:h+1);if(d(f,g)||(s+=g,h===-1||!g.trim()))break;u=h+1}const c=W(s);return c===""?null:[s,,c]}),i:3,u:oe,l:(e,i,s)=>l("p",{key:s.key},i(e.children,s))},22:{t:["["],o:M(Fn),i:0,u:e=>(x[e[1]]={target:e[2],title:e[4]},{}),l:ue},23:{t:["!["],o:E(Ln),i:0,u:e=>({alt:e[1]?O(e[1]):void 0,ref:e[2]}),l:(e,i,s)=>x[e.ref]?l("img",{key:s.key,alt:e.alt,src:a(x[e.ref].target,"img","src"),title:x[e.ref].title}):null},24:{t:e=>e[0]==="["&&e.indexOf("](")===-1,o:M(qn),i:0,u:(e,i,s)=>({children:i(e[1],s),fallbackChildren:e[0],ref:e[2]}),l:(e,i,s)=>x[e.ref]?l("a",{key:s.key,href:a(x[e.ref].target,"a","href"),title:x[e.ref].title},i(e.children,s)):l("span",{key:s.key},e.fallbackChildren)},25:{t:["|"],o:T(Se),i:1,u:ft,l(e,i,s){const u=e;return l("table",{key:s.key},l("thead",null,l("tr",null,u.header.map(function(c,h){return l("th",{key:h,style:Ee(u,h)},i(c,s))}))),l("tbody",null,u.cells.map(function(c,h){return l("tr",{key:h},c.map(function(g,v){return l("td",{key:v,style:Ee(u,v)},i(g,s))}))})))}},27:{o:U(function(e,i){let s;return K(e,":")&&(s=Xn.exec(e)),s||nt.exec(e)}),i:4,u(e){const i=e[0];return{text:i.indexOf("&")===-1?i:i.replace(In,(s,u)=>t.namedCodesToUnicode[u]||s)}},l:e=>e.text},28:{t:["**","__"],o:E(Qn),i:2,u:(e,i,s)=>({children:i(e[2],s)}),l:(e,i,s)=>l("strong",{key:s.key},i(e.children,s))},29:{t:e=>{const i=e[0];return(i==="*"||i==="_")&&e[1]!==i},o:E(Zn),i:3,u:(e,i,s)=>({children:i(e[2],s)}),l:(e,i,s)=>l("em",{key:s.key},i(e.children,s))},30:{t:["\\"],o:E(Yn),i:1,u:e=>({text:e[1],type:"27"})},31:{t:["=="],o:E(Jn),i:3,u:oe,l:(e,i,s)=>l("mark",{key:s.key},i(e.children,s))},32:{t:["~~"],o:E(Kn),i:3,u:oe,l:(e,i,s)=>l("del",{key:s.key},i(e.children,s))}};t.disableParsingRawHTML===!0&&(delete I[11],delete I[13]);const N=function(e){var i=Object.keys(e);function s(u,c){var h=[];if(c.prevCapture=c.prevCapture||"",u.trim())for(;u;)for(var g=0;g<i.length;){var v=i[g],b=e[v];if(!b.t||pt(u,c,b.t)){var j=b.o(u,c);if(j&&j[0]){u=u.substring(j[0].length);var y=b.u(j,s,c);c.prevCapture+=j[0],y.type||(y.type=v),h.push(y);break}g++}else g++}return c.prevCapture="",h}return i.sort(function(u,c){return e[u].i-e[c].i||(u<c?-1:1)}),function(u,c){return s(function(h){return h.replace(An,`
|
|
18
|
+
`).replace(On,"").replace(Hn," ")}(u),c)}}(I),G=function(e,i){return function s(u,c={}){if(Array.isArray(u)){const h=c.key,g=[];let v=!1;for(let b=0;b<u.length;b++){c.key=b;const j=s(u[b],c),y=Oe(j);y&&v?g[g.length-1]+=j:j!==null&&g.push(j),v=y}return c.key=h,g}return function(h,g,v){const b=e[h.type].l;return i?i(()=>b(h,g,v),h,g,v):b(h,g,v)}(u,s,c)}}(I,t.renderRule),F=k(n);return C.length?l("div",null,F,l("footer",{key:"footer"},C.map(function(e){return l("div",{id:r(e.identifier,H),key:e.identifier},e.identifier,G(N(e.footnote,{inline:!0})))}))):F}const kt=n=>{let{children:t,options:r}=n,a=function(o,f){if(o==null)return{};var m,d,l={},k=Object.keys(o);for(d=0;d<k.length;d++)f.indexOf(m=k[d])>=0||(l[m]=o[m]);return l}(n,hn);return B.cloneElement(bt(t??"",r),a)},Ie="/img/logo/",vt=n=>n.trim().replace(/\n{3,}/g,`
|
|
19
|
+
|
|
20
|
+
`).replace(/(\n\s*\n)+(?=\|)/g,`
|
|
21
|
+
`).replace(/^\s*[\r\n]/gm,"").replace(/(<p>\s*<\/p>)/g,""),jt=n=>{var r;switch((r=n.split("/")[1])==null?void 0:r.toLowerCase()){case"jpg":case"jpeg":case"png":return p.jsx(Ze,{});case"pdf":return p.jsx(rn,{});case"doc":case"docx":return p.jsx(Qe,{});case"xls":case"xlsx":return p.jsx(Ve,{});default:return p.jsx(Ge,{})}},De=({messages:n,loading:t,avatarInfo:r,imgClass:a,mode:o})=>{tn().pathname;const m=sn(),{file:d,fileName:l,fileType:k}=J(x=>x.aiChat.data),w=B.useRef(null);B.useEffect(()=>{w.current.scrollTop=w.current.scrollHeight},[n]);const C=()=>d&&p.jsxs("div",{className:"bubbles",children:[p.jsxs("div",{className:"bubble text-md",children:[p.jsx("div",{className:"bubble-default-user",children:r}),p.jsxs("div",{className:"file-icon flex justify-end",children:[p.jsx("span",{className:"mr-2",children:l}),jt(k)]})]}),p.jsxs("div",{className:"bubble text-md",children:[p.jsx("div",{className:"bubble-ai-user",children:p.jsx("img",{style:{fill:`${o}`},className:a,src:`${Ie}aica.svg`,alt:`${ge} logo`})}),"I can help you with this file. Just tell me what information you need!"]})]});return p.jsxs("div",{ref:w,className:"main-bubbles",style:m?{width:"100%"}:{},children:[(n==null?void 0:n.length)===0&&!d&&p.jsx("div",{className:"flex no-messages",children:p.jsx("div",{className:"lg:flex md:flex-none sm:flex-none flex-contain w-full",children:p.jsxs("div",{className:"lg:w-full md:w-full sm:w-full text-center",children:[p.jsx("h2",{children:"Welcome!"}),p.jsx("h3",{className:"py-5 px-8",children:"I'm here to assist with any business-related questions you have."}),p.jsx("div",{className:"px-8",children:"Whether it's about strategies, market trends, financial insights, or company-specific queries, feel free to ask!"})]})})}),d&&p.jsx(C,{}),n.map(x=>p.jsxs("div",{className:"bubbles",children:[p.jsxs("div",{className:"bubble text-md",children:[p.jsx("div",{className:"bubble-default-user",children:r}),x.question]}),p.jsxs("div",{className:"bubble text-md",children:[p.jsx("div",{className:"bubble-ai-user",children:p.jsx("img",{style:{fill:o},className:a,src:`${Ie}aica.svg`,alt:`${ge} logo`})}),p.jsx("div",{className:"markdown-preview-wrapper text-sm w-full overflow-x-auto p-0 m-0",children:p.jsx(kt,{className:"markdown-preview whitespace-pre-wrap",options:{overrides:{p:{props:{className:"my-4 leading-relaxed text-white whitespace-pre-line"}},strong:{props:{className:"font-semibold text-white"}},h1:{props:{className:"text-2xl font-bold mt-6 mb-3 text-white"}},h2:{props:{className:"text-xl font-semibold mt-5 mb-3 text-white"}},h3:{props:{className:"text-lg font-semibold mt-4 mb-2 text-white"}},ul:{props:{className:"list-disc pl-6 my-2 text-white"}},ol:{props:{className:"list-decimal pl-6 my-2 text-white"}},li:{props:{className:"ml-4 text-white my-1"}},table:{props:{className:"w-full border-collapse overflow-x-auto my-4"}},th:{props:{className:"text-white border px-2 py-1 text-left text-sm whitespace-nowrap"}},td:{props:{className:"border border-white p-2 text-white"}},hr:{props:{className:"my-4 border-white/50"}},br:{props:{className:"my-3 block"}}}},children:vt(x.response)})})]})]},x.id)),t&&p.jsxs("div",{className:"loading-spinner",children:[p.jsx("div",{className:"spinner"}),p.jsx("div",{className:"flex pl-6",children:p.jsx("div",{className:"dot-pulse"})})]})]})};Je("aiChat",mn);const Ut=({mode:n,imgClass:t})=>{const{avatar:r,userName:a}=J(d=>d.auth.user);let o;r?o=p.jsx(Ke,{size:15,shape:"circle",src:r}):o=p.jsx("span",{className:"user-no-avatar",children:a==null?void 0:a.substring(0,1)});const f=J(d=>d.aiChat.data.messages||[]),m=J(d=>d.aiChat.data.loading);return p.jsx("div",{children:f.length===0?p.jsx(De,{messages:[],loading:m,avatarInfo:o,imgClass:t,mode:n}):p.jsx(De,{messages:f,loading:m,avatarInfo:o,imgClass:t,mode:n})})},Ht=({onSendMessage:n})=>{const[t,r]=B.useState(""),a=Xe(),o=()=>{t.trim()&&(n(t),r(""))},f=()=>{a(dn())},m=d=>{d.key==="Enter"&&o()};return p.jsxs("div",{className:"flex message-input",children:[p.jsx("div",{className:"flex-auto",children:p.jsx(Ye,{size:"sm",type:"text",value:t,prefix:p.jsx(en,{}),onKeyDown:m,onChange:d=>r(d.target.value),placeholder:"Ask me something..."})}),p.jsx(ye,{className:"ml-3",variant:"solid",shape:"circle",size:"sm",icon:p.jsx(nn,{}),onClick:o,disabled:!t.trim()}),p.jsx(ye,{className:"ml-3",variant:"solid",shape:"circle",size:"sm",icon:p.jsx(un,{}),onClick:f})]})};export{Ut as C,Ht as M,re as a,qt as b,dn as c,Lt as h,ie as q,mn as r,Ft as t,J as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./vendor-mui-98daa63f.js";import{A as e}from"./AdaptableCard-3d1e1f96.js";import{P as r}from"./PageBreadcrumb-cf54a6e9.js";import{r as a}from"./vendor-react-ece1c85f.js";import"./index-3b5ce20a.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";const f=()=>(a.useState(!1),s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[s.jsx(r,{items:[{label:"Talks"},{label:"Messages"}]}),s.jsx("div",{className:"lg:flex items-center justify-between",children:s.jsx("h3",{className:"mb-4 lg:mb-0",children:"Messages"})})]}),s.jsx(e,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:s.jsx(e,{className:"borderless",children:"Soon..."})})]}));export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{M as p,S as d,U as c,s as u,a as x,H as f}from"./ClassicLayout-a9866742.js";import{V as g}from"./Views-1359da48.js";import{c as s,r as i}from"./vendor-react-ece1c85f.js";import{u as j,a as b,P as h,b as y}from"./index-3b5ce20a.js";import{L as M}from"./Logo-dd6f7656.js";import"./withHeaderItem-df2cc5d9.js";import"./index-8d5b6a1f.js";import"./index-0b08ce18.js";import"./index-00a8eb64.js";import"./index-a14e51de.js";import"./useDidUpdate-de319a18.js";import"./useControllableState-d0909575.js";import"./ApiService-df126758.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import"./vendor-devex-4076ffeb.js";import"./vendor-pdf-3c29882d.js";import"./vendor-i18n-b89304ef.js";import"./index-359d245d.js";import"./vendor-redux-a1f00e6b.js";import"./WidgetLayoutsService-49730609.js";import"./usePermission-4689548c.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";const S=s.memo(r=>{const{menus:o}=r;return e.jsxs(e.Fragment,{children:[e.jsx(M,{type:"streamline",imgClass:"mx-auto mobile-only"}),e.jsx(p,{menus:o}),e.jsx(d,{})]})}),v=s.memo(()=>e.jsx(e.Fragment,{children:e.jsx(c,{hoverable:!1})})),E=()=>{const[r,o]=i.useState([]);j(),b(),i.useEffect(()=>{n()},[]);const n=async()=>{var m;const a=localStorage.getItem(h);if(a){const t=await y(a,"default");let l=u((m=t==null?void 0:t.data)==null?void 0:m.$values);o(l??[])}else o([])};return e.jsx("div",{className:"app-layout-modern flex flex-auto flex-col",children:e.jsxs("div",{className:"flex flex-auto min-w-0",children:[e.jsx(x,{menus:r}),e.jsxs("div",{className:"flex flex-col flex-auto min-h-screen min-w-0 relative w-full bg-white dark:bg-gray-800 border-l border-gray-200 dark:border-gray-700",children:[e.jsx(f,{className:"border-b border-gray-200 dark:border-gray-700",headerEnd:e.jsx(v,{}),headerStart:e.jsx(S,{menus:r})}),e.jsx(g,{})]})]})})},re=s.memo(E);export{re as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-mui-
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";const n=({title:t="No Results Found",description:s="We couldn't find any records. Please try again.",image:a="/img/noData.png"})=>e.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center w-full overflow-hidden",children:[e.jsx("img",{src:a,alt:"No Data",className:"max-w-[180px] w-full max-h-[30vh] object-contain mb-3 opacity-90"}),e.jsx("h2",{className:"text-lg font-semibold text-slate-800 mb-1",children:t}),e.jsx("p",{className:"text-sm text-slate-500 max-w-sm",children:s})]});export{n as N};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./vendor-mui-98daa63f.js";import{E as p,F as e}from"./index-3b5ce20a.js";const n=(s,t="Success",o="success",c=2500)=>{p.push(i.jsx(e,{title:t,type:o,duration:c,children:s}),{placement:"top-center"})};export{n as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,l as $e}from"./vendor-mui-98daa63f.js";import{A as je}from"./AdaptableCard-3d1e1f96.js";import{r as x,f as Te,L as Ne}from"./vendor-react-ece1c85f.js";import{r as ve,u as F,t as Ee,a as we,d as ze,g as Ye,s as W,b as _e,c as Se}from"./index-52963879.js";import{D as G,k as le,a0 as ge,r as te,B as q,E as ce,F as ie,d4 as Le,l as Be,d as Ue,al as Ae,as as U,d5 as We,d6 as Ve,d7 as qe,aK as Fe,a7 as Ge,g as Re,av as Ke,aw as Qe,ai as fe}from"./index-3b5ce20a.js";import{A as Xe,T as ye}from"./actioncell-6b5ebd6c.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{a as He,C as ke}from"./index-a14e51de.js";import{D as V}from"./Drawer-4f97e662.js";import{F as Je,a as T}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{a as Ze,c as et,F as tt,b as at,d as z}from"./index.esm-b2d342b5.js";import{f as Me,g as nt,h as st}from"./OpportunityServices-c4510dd2.js";import{A as ot,E as rt}from"./EditLead-c8c9760a.js";import{g as ct,a as it,r as lt}from"./index-91505016.js";import{a as dt,b as ut}from"./AddAccount-2cd72664.js";import{S as pt}from"./StickyFooter-3e569b80.js";import{V as De,i as mt}from"./validationPatterns-77446c46.js";import{r as xt,g as ht}from"./index-d221d69e.js";import{g as gt}from"./index-0fd6e996.js";import{C as ft}from"./ConfirmDialog-2838a642.js";import{C as yt}from"./tableV3-24eed052.js";import{r as jt}from"./index-11297f4a.js";import{u as wt}from"./usePermission-4689548c.js";import{P as vt}from"./PageBreadcrumb-cf54a6e9.js";import{w as bt}from"./WrapperCell-3d5592cf.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./DoubleSidedImage-b4bd3915.js";import"./index-b0ef7ac3.js";import"./LeadSourceService-cf71ea64.js";import"./index-0b08ce18.js";import"./AccountServices-f68f471d.js";import"./ContactService-8afcaeb7.js";import"./DepartmentServices-a53e998b.js";import"./Check-af681a30.js";import"./createSvgIcon-aba65987.js";import"./CourseService-29ad460c.js";import"./ApiService-df126758.js";import"./UserService-1b93ceb0.js";import"./FileSaver.min-20f3f13a.js";import"./mapView-c8063ed6.js";import"./esm-c40433f8.js";import"./lodash-306e3f66.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";G("opportunity",ve);G("users",xt);G("AccountsData",ve);const ee=Ze().matches(De.sqlInjectionSafe,"Invalid input: SQL keywords not allowed").matches(De.noSpecialChars,"Special characters like < > = { } are not allowed").test("no-base64","Base64 encoded content is not allowed",i=>i?!mt(i.trim()):!0),It=et().shape({opportunityName:ee.required("Name Required").max(100,"Maximum 100 characters allowed"),notes:ee,address:ee,city:ee,state:ee}),Ct=i=>{if(!i)return"";const l=Number(i.toString().replace(/\D/g,""));return l?`$ ${l.toLocaleString()}`:""},Oe=i=>i?String(i).replace(/\D/g,""):null,Nt=i=>{const{type:l,footerWidth:h,ref:a,initialData:d,fetchOpportunity:N,accountId:w,leadId:D}=i,[R,O]=x.useState(!1),[k,s]=x.useState(!1),[M,y]=x.useState(""),[c,E]=x.useState(""),j=x.useRef(null);x.useRef(null);const[I,b]=x.useState(!1),[v,S]=x.useState(),[Y,de]=x.useState(!1),P=le();F(n=>{var r,C,f;return(f=(C=(r=n.LeadsData)==null?void 0:r.data)==null?void 0:C.contactList)==null?void 0:f.map(m=>({value:m.id,label:m.contactName,desc:m}))}),F(n=>{var r,C;let p=(r=n.LeadsData.data.leadList)==null?void 0:r.map(f=>({value:f.id,label:f.leadName,desc:f}));return w&&(p=(C=p==null?void 0:p.filter)==null?void 0:C.call(p,f=>{var m;return w===((m=f==null?void 0:f.desc)==null?void 0:m.accountId)})),p});const{usersList:ae}=F(n=>n.users.data),{accountList:ne}=F(n=>n.AccountsData.data);x.useEffect(()=>{K(),L(),ue(),pe()},[]);const L=()=>{const n=ct({});P(n)},K=()=>{const n=it();P(n)},ue=()=>{P(ht({isActive:!0}))},pe=()=>{const n=gt({});P(n)},me=(n,p)=>{s(!1),p(c,{value:n.id,label:n.contactName,desc:n}),L(),y(""),E("")},Q=()=>{s(!1),y(""),E("")},xe=(n,p)=>{O(!1),p(c,{value:n.id,label:n.accountName}),K(),y(""),E("")},X=()=>{O(!1),y(""),E("")},[he,H]=x.useState([]),se=async n=>{var p;try{return await nt(n)}catch(r){return(p=r==null?void 0:r.response)==null?void 0:p.data}},oe=async n=>{var p;try{return await st(n)}catch(r){return(p=r==null?void 0:r.response)==null?void 0:p.data}},J=x.useCallback(async()=>{var n,p;try{const r=await Me();r!=null&&r.data&&H((p=(n=r==null?void 0:r.data)==null?void 0:n.$values)==null?void 0:p.map(C=>({label:C.stageName,value:C.id})))}catch(r){H([]),console.error("Failed to opportunity logs:",r)}},[]);x.useEffect(()=>{J()},[J]);const re=F(n=>n.opportunity.data.IsDrawerOpen),Z=()=>{P(Ee(!re))},_=async(n,p)=>{const r=(o,g)=>{var $,B,be,Ie,Ce;const A={contactId:(($=o.opportunitySourceId)==null?void 0:$.value)??null,accountId:((B=o.accountId)==null?void 0:B.value)??null,opportunityName:o.opportunityName??"",estAnnualRevenue:Oe(o==null?void 0:o.estAnnualRevenue)??null,value:o.value??null,probability:o.probability??null,potential:Oe(o==null?void 0:o.potentialRevenue)??null,noOfEmployees:String(o.noOfEmployees)??null,industry:o.industryId??"",serviceType:o.serviceTypeId??"",product:o.productId??"",address:o.address??"",address2:o.address2??"",city:o.city??"",state:o.state??"",zip:o.zip??"",bussinessCardImagePath:"",startDate:o.startDate??null,ownerId:((be=o.ownerId)==null?void 0:be.value)??null,notes:o.notes??"",opportunitySourceId:null,opportunityStageId:((Ie=o.opportunityStageId)==null?void 0:Ie.value)??""};return g==="Add"?A:{id:o.id??"",...A,opportunityStageId:((Ce=o.opportunityStageId)==null?void 0:Ce.value)??""}},C=(o,g)=>{o.success?(N&&(Le(),N()),Z(),p(!1),ce.push(e.jsx(ie,{title:"Success",type:"success",duration:2500,children:`Opportunity Successfully ${g}`}),{placement:"top-center"})):(p(!1),ce.push(e.jsx(ie,{title:"Error",type:"danger",duration:2500,children:o.message}),{placement:"top-center"}))},f=r(n,l);let m;try{l==="Add"?(m=await se(f),C(m,"Added")):l==="Edit"&&(m=await oe(f),C(m,"Updated"))}catch(o){console.error("Error during form submission:",o),p(!1),ce.push(e.jsx(ie,{title:"Error",type:"danger",duration:2500,children:`An error occurred during ${l} opportunity`}),{placement:"top-center"})}},t=()=>{S(null),b(!1),L()},u=()=>{S(null),de(!1),K()};return e.jsx(tt,{innerRef:a,initialValues:{...d},validationSchema:It,onSubmit:(n,{setSubmitting:p})=>{const r=n;_==null||_(r,p)},children:({values:n,touched:p,errors:r,isSubmitting:C,setFieldValue:f})=>(x.useEffect(()=>{const m=()=>{if(window.google&&window.google.maps){const o=new window.google.maps.places.Autocomplete(j.current,{types:["address"],componentRestrictions:{country:"us"}});o.addListener("place_changed",()=>{const g=o.getPlace();let A={};g.address_components.forEach($=>{const B=$.types;B.includes("locality")?A.city=$.long_name:B.includes("administrative_area_level_1")?A.state=$.short_name:B.includes("postal_code")&&(A.zipcode=$.long_name)}),f("address",g.name),f("city",A.city||""),f("state",A.state||""),f("zip",A.zipcode||"")})}};if(window.google&&window.google.maps)m();else{const o=setInterval(()=>{window.google&&window.google.maps&&(m(),clearInterval(o))},500)}},[i]),e.jsx(at,{children:e.jsx(Je,{children:e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2 pb-8",children:e.jsxs(je,{divider:!0,className:"mb-4",children:[e.jsx(T,{label:"Opportunity Name",asterisk:!0,invalid:r.opportunityName&&p.opportunityName,errorMessage:r.opportunityName,children:e.jsx(z,{type:"text",autoComplete:"off",name:"opportunityName",placeholder:"Name",component:ge})}),e.jsx(T,{label:"Account / Company",invalid:r.accountId&&p.accountId,errorMessage:r.accountId,children:e.jsx(z,{name:"accountId",children:({field:m,form:o})=>e.jsx(te,{field:m,form:o,options:ne.map(g=>({label:g.accountName,value:g.id})),name:"accountId",isDisabled:!!D,onChange:g=>{o.setFieldValue(m.name,g)}})})}),e.jsx("div",{className:"flex space-x-4",children:e.jsx("div",{className:"flex-1",children:e.jsx(T,{label:"Amount / Deal Value",invalid:r.estAnnualRevenue&&p.estAnnualRevenue,errorMessage:r.estAnnualRevenue,children:e.jsx(z,{type:"text",value:Ct(n.estAnnualRevenue),autoComplete:"off",name:"estAnnualRevenue",placeholder:"Amount / Deal Value",component:ge})})})}),e.jsx("div",{className:"flex space-x-4",children:e.jsx("div",{className:"flex-1",children:e.jsx(T,{label:"Opportunity Stage",invalid:r.opportunityStageId&&p.opportunityStageId,errorMessage:r.opportunityStageId,children:e.jsx(z,{name:"opportunityStageId",children:({field:m,form:o})=>e.jsx(te,{field:m,form:o,options:he,name:"opportunityStageId",onChange:g=>{o.setFieldValue(m.name,g)}})})})})}),e.jsx(T,{label:"Close Date",invalid:r.startDate&&p.startDate,errorMessage:r.startDate,children:e.jsx(z,{name:"startDate",placeholder:"CloseDate",children:({field:m,form:o})=>e.jsx(He,{field:m,form:o,inputFormat:"MM/DD/YYYY",value:n.startDate?new Date(n.startDate):new Date,onChange:g=>{o.setFieldValue(m.name,g)}})})}),e.jsx(T,{label:"Owner",invalid:r.owner&&p.owner,errorMessage:r.owner,children:e.jsx(z,{name:"ownerId",children:({field:m,form:o})=>e.jsx(te,{field:m,form:o,options:ae.filter(g=>{var A;return(A=g.role)==null?void 0:A.toLowerCase().includes("admin")}).map(g=>({label:`${g.firstName} ${g.lastName}`,value:g.id})),name:"ownerId",onChange:g=>{o.setFieldValue(m.name,g)}})})}),e.jsx(T,{label:"Notes",invalid:r.notes&&p.notes,errorMessage:r.notes,children:e.jsx(z,{textArea:!0,type:"text",autoComplete:"off",name:"notes",placeholder:"Notes",component:ge})}),e.jsx(pt,{className:`px-8 flex items-center justify-between py-4 ${h?`md:${h}`:""}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx(q,{size:"sm",className:"mr-2",disabled:C,onClick:()=>Z(),children:"Discard"}),e.jsx(q,{size:"sm",variant:"solid",type:"submit",loading:C,children:`${l==="Edit"?"Save":l} Opportunity`})]})}),e.jsx(V,{title:"New Lead",isOpen:R,onClose:X,portalClassName:"w30",showBackdrop:!1,children:e.jsx(ot,{onDrawerClose:X,isfromDropdown:!0,onContactCreated:m=>xe(m,f),newContactName:M})}),e.jsx(V,{title:"New Contact",isOpen:k,onClose:Q,portalClassName:"w30",showBackdrop:!1,children:e.jsx(dt,{onDrawerClose:Q,isfromDropdown:!0,onContactCreated:m=>me(m,f),newContactName:M})}),e.jsx(V,{title:"Edit Contact",isOpen:I,onClose:t,portalClassName:"w30",showBackdrop:!1,children:e.jsx(ut,{id:v,onDrawerClose:t})}),e.jsx(V,{title:"Edit Lead",isOpen:Y,onClose:u,portalClassName:"w30",showBackdrop:!1,children:e.jsx(rt,{id:v,onDrawerClose:u})})]})})})})}))})},Pe=x.forwardRef((i,l)=>{const{type:h,footerWidth:a,fetchData:d,accountId:N,leadId:w,initialData:D={opportunitySourceID_ref:"",accountID_ref:"",leadId:"",opportunityName:"",opportunityStageID_ref:"",estAnnualRevenue:null,value:null,probability:null,potential:null,noOfEmployees:"",industryID_ref:"",serviceTypeID_ref:"",productID_ref:"",address:"",address2:"",city:"",state:"",zip:"",bussinessCardImagePath:"",startDate:new Date,wonDate:new Date,notes:""},onFormSubmit:R,onDiscard:O,onDelete:k}=i;return e.jsx(e.Fragment,{children:e.jsx(Nt,{footerWidth:a,fetchOpportunity:d,type:h,ref:l,initialData:D,accountId:N,leadId:w})})});Pe.displayName="OpportunityForm";const St=i=>{const l=le(),h=F(w=>w.opportunity.data.deleteConfirmation),a=F(w=>w.opportunity.data.selectedOpportunity),d=async()=>{l(we(!1)),await ze(a==null?void 0:a.id)&&(Le(),i!=null&&i.fetchData&&(i==null||i.fetchData()),ce.push(e.jsx(ie,{title:"Deleted",type:"success",duration:2500,children:"Opportunity Successfully Deleted"}),{placement:"top-center"}))},N=()=>{l(we(!h))};return e.jsx(e.Fragment,{children:e.jsx(ft,{isOpen:h,type:"danger",title:"Delete Opportunity",confirmButtonColor:"red-600",onClose:N,onRequestClose:N,onCancel:N,onConfirm:d,children:e.jsx("p",{children:"Are you sure you want to delete this opportunity?"})})})},At=({onSaveClick:i,onCancel:l,onClearFilers:h})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(q,{size:"sm",className:"mr-2",onClick:h,children:"Clear All"}),e.jsx(q,{size:"sm",className:"mr-2",onClick:l,children:"Cancel"}),e.jsx(q,{size:"sm",variant:"solid",onClick:i,children:"Query"})]}),Ft=i=>{x.useRef(null);const l=le(),[h,a]=x.useState(!1),d=F(j=>{var I,b;return(b=(I=j==null?void 0:j.opportunity)==null?void 0:I.data)==null?void 0:b.filterData}),[N,w]=x.useState(d==null?void 0:d.accountId),[D,R]=x.useState(d==null?void 0:d.opportunityStageId),[O,k]=x.useState([]),s=F(j=>{var b,v,S;return(S=(v=(b=j.opportunity)==null?void 0:b.data)==null?void 0:v.accountsList)==null?void 0:S.map(Y=>({value:Y.id,label:Y.companyName}))});x.useEffect(()=>{M()},[]);const M=async()=>{var I,b;const j=Ye();l(j);try{const v=await Me();v!=null&&v.data&&k((b=(I=v==null?void 0:v.data)==null?void 0:I.$values)==null?void 0:b.map(S=>({label:S.stageName,value:S.id})))}catch(v){k([]),console.error("Failed to opportunity logs:",v)}},y=()=>{a(!1),i.onClose()},c=()=>{l(W({opportunityStageId:"",accountId:""})),w(""),R("")},E=()=>{i.onClose(),a(!1),l(W({opportunityStageId:D,accountId:N}))};return x.useEffect(()=>{i.isOpen&&a(!0)},[i.isOpen]),x.useEffect(()=>{var j,I;(j=d==null?void 0:d.accountId)!=null&&j.value?w(d==null?void 0:d.accountId):w(""),(I=d==null?void 0:d.opportunityStageId)!=null&&I.value?R(d==null?void 0:d.opportunityStageId):R("")},[d]),e.jsx(e.Fragment,{children:e.jsxs(V,{title:"Advanced Filter Selection Page",isOpen:h,portalClassName:"w30",footer:e.jsx(At,{onCancel:y,onSaveClick:E,onClearFilers:c}),onClose:y,onRequestClose:y,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:e.jsx("h5",{children:"Account"})}),e.jsx(te,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:N,onChange:j=>w(j),options:s,isClearable:!0})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:e.jsx("h5",{children:"Opportunity Stage"})}),e.jsx(te,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:D,onChange:j=>R(j),options:O,isClearable:!0})]})]})})};G("opportunity",ve);G("LeadsData",lt);G("ContactsData",jt);const ka=i=>{var H,se,oe,J,re,Z,_;const l=(i==null?void 0:i.accountId)||null,h=(i==null?void 0:i.leadId)||null,a=(i==null?void 0:i.leadData)||null,d=le(),N=Te(),{textTheme:w}=Be();F(t=>t.opportunity.data);const[D,R]=x.useState(!1),{IsDrawerOpen:O,type:k,selectedOpportunity:s,loading:M,metricData:y,filterData:c}=F(t=>t.opportunity.data),E=F(t=>t.opportunity.data.opportunityList),[j,I]=x.useState(!1),b=wt("Opportunities"),v={edit:b.isEdit,delete:b.isDelete,view:b.isView},S=t=>{d(Ee({IsDrawerOpen:!O,type:t}))},Y=t=>{I(!1)},de=t=>{I(!0)},P=t=>{N(`/app/crm/opportunity-details/${t}`)},ae=({type:t})=>{switch(t){case"allLeads":return e.jsx(U,{size:55,shape:"circle",className:"avatar-icon !bg-transparent !text-custom-600 dark:text-custom-100 rounded-lg border-1 border-slate-200 dark:border-custom-100",icon:e.jsx(Ge,{})});case"Initial Contact":return e.jsx(U,{size:55,shape:"circle",className:"avatar-icon !bg-transparent !text-custom-600 dark:text-custom-100 rounded-lg border-1 border-slate-200 dark:border-custom-100",icon:e.jsx(Fe,{})});case"Proposal":return e.jsx(U,{size:55,shape:"circle",className:"avatar-icon !bg-transparent !text-custom-600 dark:text-custom-100 rounded-lg border-1 border-slate-200 dark:border-custom-100",icon:e.jsx(Fe,{})});case"Won":return e.jsx(U,{size:55,shape:"circle",className:"avatar-icon !bg-transparent !text-custom-600 dark:text-custom-100 rounded-lg border-1 border-slate-200 dark:border-custom-100",icon:e.jsx(qe,{})});case"Lost":return e.jsx(U,{size:55,shape:"circle",className:"avatar-icon !bg-transparent !text-custom-600 dark:text-custom-100 rounded-lg border-1 border-slate-200 dark:border-custom-100",icon:e.jsx(Ve,{})});case"Negotiation":return e.jsx(U,{size:55,shape:"circle",className:"avatar-icon !bg-transparent !text-custom-600 dark:text-custom-100 rounded-lg border-1 border-slate-200 dark:border-custom-100",icon:e.jsx(We,{})});default:return e.jsx("div",{})}},ne=({value:t})=>e.jsxs("span",{className:"flex items-center rounded-full gap-1",children:[e.jsxs("span",{className:Re("rounded-full p-1",t>0&&"bg-emerald-100 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-100",t<0&&"text-red-600 bg-red-100 dark:text-red-100 dark:bg-red-500/20"),children:[t>0&&e.jsx(Ke,{}),t<0&&e.jsx(Qe,{})]}),e.jsxs("span",{className:Re("font-semibold",t>0&&"text-emerald-600",t<0&&"text-red-600"),children:[t>0&&e.jsx(e.Fragment,{children:"+ "}),t]})]}),L=x.useCallback(()=>{var t,u,n;d(_e({...((t=c==null?void 0:c.opportunityStageId)==null?void 0:t.value)&&!l&&!h&&{opportunityStageId:c.opportunityStageId.value},...((u=c==null?void 0:c.accountId)==null?void 0:u.value)&&!l&&!h&&{accountId:c.accountId.value},...((n=c==null?void 0:c.leadId)==null?void 0:n.value)&&!l&&!h&&{leadId:c.leadId.value},...l&&{accountId:l},...h&&{leadId:h}}))},[d,c,l,h]);x.useEffect(()=>{L()},[L]);const K=(t,u)=>{u===ye.view&&P(t.id),u===ye.edit&&(S("Edit"),d(Se(t))),u===ye.delete&&(d(we(!0)),d(Se(t)))},ue=[{dataField:"Action",caption:"Action",width:"130",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Actions",children:e.jsx(Xe,{row:t==null?void 0:t.data,actions:v,buttonClick:K})})},{dataField:"opportunityName",caption:"Opportunity Name",width:"230",cellRender:t=>{var u;return e.jsx("div",{"data-cname":"Opportunity Name",children:e.jsx(Ne,{to:`/app/crm/opportunity-details/${(u=t==null?void 0:t.data)==null?void 0:u.id}`,className:`${w} ml-2 rtl:mr-2`,children:t.value})})}},{dataField:"accountName",caption:"Account",width:"230",cellRender:t=>{var u;return l?e.jsx("div",{"data-cname":"Account",children:t.value}):e.jsx("div",{"data-cname":"Account",children:e.jsx(Ne,{to:`/app/crm/account-details/${(u=t==null?void 0:t.data)==null?void 0:u.accountId}`,className:`${w} ml-2 rtl:mr-2`,children:t.value})})}},{dataField:"contactName",caption:"Contact Name",width:"230",cellRender:t=>e.jsx("div",{"data-cname":"Contact Name",children:t.value})},{dataField:"stageName",caption:"Stage",width:"230",cellRender:t=>e.jsx("div",{"data-cname":"Stage",children:t.value})},{dataField:"estAnnualRevenue",caption:"Revenue",width:"230",cellRender:t=>{var u,n;return(u=t.data)!=null&&u.estAnnualRevenue?e.jsxs("div",{"data-cname":"Revenue",children:["$",(n=t.data)==null?void 0:n.estAnnualRevenue.toLocaleString()]}):e.jsx("div",{"data-cname":"Revenue"})}},{dataField:"confidencePercentage",caption:"Confidence",width:"230",dataType:"number",cellRender:t=>{var u,n;return(u=t.data)!=null&&u.confidencePercentage?e.jsxs("div",{"data-cname":"Confidence",children:[(n=t.data)==null?void 0:n.confidencePercentage," %"]}):e.jsx("div",{"data-cname":"Confidence"})}},{dataField:"potential",caption:"Potential Revenue",width:"230",cellRender:t=>{var u,n;return(u=t.data)!=null&&u.potential?e.jsxs("div",{"data-cname":"Confidence",children:["$",(n=t.data)==null?void 0:n.potential.toLocaleString()]}):e.jsx("div",{"data-cname":"Confidence"})}},{dataField:"noOfEmployees",caption:"No. of Employees",width:"230",cellRender:t=>e.jsx("div",{"data-cname":"No. of Employees",children:t.value})},{dataField:"industry",caption:"Industry",width:"230",cellRender:t=>e.jsx("div",{"data-cname":"Industry",children:t.value})},{dataField:"serviceType",caption:"Service Type",width:"230",cellRender:t=>e.jsx("div",{"data-cname":"Service Type",children:t.value})},{dataField:"product",caption:"Product",width:"230",cellRender:t=>e.jsx("div",{"data-cname":"Product",children:t.value})},{dataField:"startDate",caption:"Start Date",width:"230",dataType:"date",format:"MM-dd-yyyy",cellRender:t=>{const u=t.value?fe(t.value).format("MM/DD/YYYY"):"";return e.jsx("div",{"data-cname":"Start Date",children:u})}},{dataField:"wonDate",caption:"Won Date",width:"230",dataType:"date",format:"MM/dd/yyyy",cellRender:t=>{const u=t.value?fe(t.value).format("MM/DD/YYYY"):"";return e.jsx("div",{"data-cname":"Won Date",children:u})}},{dataField:"notes",caption:"Notes",width:"230",cellRender:t=>e.jsx("div",{"data-cname":"Notes",children:t.value})},{dataField:"owner",caption:"Owner",width:"230",cellRender:t=>e.jsx("div",{"data-cname":"Owner",children:t.value})},{dataField:"createdDate",caption:"Created Date",width:"230",dataType:"date",format:"MM/dd/yyyy",cellRender:t=>{const u=t.value?fe(t.value).format("MM/DD/YYYY"):"";return e.jsx("div",{"data-cname":"Created Date",children:u})}}],pe=t=>t.map(u=>({...u,noOfEmployees:parseInt(u.noOfEmployees,10)||""})),me=ue.map(t=>({...t,cellRender:bt(t.cellRender)})),Q=t=>{t==="accountId"&&d(W({...c,accountId:""})),t==="opportunityStageId"&&d(W({...c,opportunityStageId:""}))};x.useEffect(()=>{R(!(l||h))},[l,h]);const xe=k==="Edit",X=k==="Add"&&!!h,he=xe?{...s,leadId:{label:s==null?void 0:s.contactName,value:s==null?void 0:s.leadId},accountId:{label:s==null?void 0:s.accountName,value:(s==null?void 0:s.accountId)??null},ownerId:{label:s==null?void 0:s.owner,value:(s==null?void 0:s.ownerId)??null},opportunityStageId:{label:s==null?void 0:s.stageName,value:s==null?void 0:s.stageId},opportunitySourceId:{label:s==null?void 0:s.contactName,value:s==null?void 0:s.contactId},potentialRevenue:s==null?void 0:s.potential,industryId:(s==null?void 0:s.industry)??"",serviceTypeId:(s==null?void 0:s.serviceType)??"",productId:(s==null?void 0:s.product)??""}:X?{...a,leadId:{label:a==null?void 0:a.contactName,value:a==null?void 0:a.id},accountId:{label:a==null?void 0:a.accountName,value:(a==null?void 0:a.accountId)??null},ownerId:{label:(a==null?void 0:a.owner)??null,value:(a==null?void 0:a.ownerId)??null},industryId:a==null?void 0:a.industry,noOfEmployees:a==null?void 0:a.noOfEmployees,opportunitySourceId:{label:a==null?void 0:a.contactName,value:a==null?void 0:a.contactId,desc:{contactNumber:a==null?void 0:a.contactNumber,contactPosistion:(H=a==null?void 0:a.contactPosition)==null?void 0:H.positionName}},address:(a==null?void 0:a.address)??"",city:(a==null?void 0:a.city)??"",state:(a==null?void 0:a.state)??"",zip:(a==null?void 0:a.zip)??""}:void 0;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:l?"topbar py-4 pt-0 border-gray-200 border-b dark:bg-[#292f3c] dark:text-white":"topbar py-4 px-6 border-gray-200 border-b dark:bg-[#292f3c] dark:text-white",children:[e.jsx(vt,{items:[{label:"CRM"},{label:"Opportunities"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:" Opportunities "}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[b.isEdit&&e.jsx(q,{block:!0,variant:"solid",size:"sm",icon:e.jsx(Ue,{}),onClick:()=>S("Add"),children:"Add Opportunity"}),e.jsx(V,{title:`${k} Opportunity`,isOpen:O,onClose:()=>S("Add"),portalClassName:"w30",children:e.jsx(Pe,{footerWidth:"w30",type:k,fetchData:L,accountId:X?a==null?void 0:a.accountId:l,leadId:h,initialData:he,onFormSubmit:function(t,u){throw new Error("Function not implemented.")}})})]})]})]}),M&&e.jsx($e,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsxs(je,{className:l||h?"h-full py-1 px-1 my-6 bg-transparent borderless":"m-6 h-full py-4 px-6 bg-transparent",children:[D&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-4 mb-5",children:[e.jsx(Ae,{className:`crm-card crm-stat-card ${(c==null?void 0:c.opportunityStageId)===""?"is-selected":""}`,onClick:()=>{d(W({opportunityStageId:"",accountId:""}))},children:e.jsxs("div",{className:"flex items-center flex-wrap",children:[e.jsx(ae,{type:"allLeads"}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex gap-1.5 items-end mb-2 flex-wrap",children:[e.jsx("h3",{className:"font-bold leading-none truncate",children:(y==null?void 0:y.allOpportunities)??0}),e.jsx("p",{className:"font-semibold truncate",children:" Opportunities"})]}),e.jsxs("p",{className:"flex items-center gap-1 flex-wrap",children:[e.jsx(ne,{value:(y==null?void 0:y.allOpportunitiesGrowthRate)??0}),e.jsx("span",{children:"this month"})]})]})]})}),(oe=(se=y==null?void 0:y.stages)==null?void 0:se.$values)==null?void 0:oe.map((t,u)=>{var n;return e.jsx(Ae,{className:`crm-card crm-stat-card ${((n=c==null?void 0:c.opportunityStageId)==null?void 0:n.value)===t.stageId?"is-selected":""}`,onClick:()=>d(W({...c,opportunityStageId:{label:t==null?void 0:t.stageName,value:t.stageId}})),children:e.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[e.jsx(ae,{type:t==null?void 0:t.stageName}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex gap-1.5 items-end mb-2 flex-wrap",children:[e.jsx("h3",{className:"font-bold leading-none truncate",children:(t==null?void 0:t.totalCount)??0}),e.jsx("p",{className:"font-semibold truncate",children:t==null?void 0:t.stageName})]}),e.jsxs("p",{className:"flex items-center gap-1 flex-wrap",children:[e.jsx(ne,{value:t.growthRate??0}),e.jsx("span",{children:"this month"})]})]})]})},t.stageId)})]}),e.jsxs(je,{className:l||h?"p-0 borderless":"borderless",children:[!l&&e.jsxs("div",{className:"text-right mb-3 ",children:[((J=c==null?void 0:c.accountId)==null?void 0:J.value)&&e.jsx(ke,{title:"Account",value:(re=c==null?void 0:c.accountId)==null?void 0:re.label,onRemovefilter:Q,tagId:"accountId"}),((Z=c==null?void 0:c.opportunityStageId)==null?void 0:Z.value)&&e.jsx(ke,{title:"Opportunity Stage",value:(_=c==null?void 0:c.opportunityStageId)==null?void 0:_.label,onRemovefilter:Q,tagId:"opportunityStageId"})]}),e.jsx(St,{fetchData:L}),e.jsx(yt,{tableName:"Opportunities",className:"pt-2",dataSource:pe(E),height:l||h?"calc(100vh - 420px)":"calc(100vh - 400px)",columns:me||[],keyExpr:"$id",stateStorageKey:"opportunity",openFilter:de,isFilterReq:!0,isLoading:M})]})]}),e.jsx(Ft,{isOpen:j,onClose:Y})]})};export{ka as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as Fe,y as We,z as V,j as e,B as He,C as Ye,D as Qe,E as Ge,F as z,G as Ae,H as Ie,J as L,K as Oe,u as G,N as Je,O as Se,Q as De}from"./vendor-mui-98daa63f.js";import{r as j,u as P,f as H,j as Ke}from"./vendor-react-ece1c85f.js";import{b as Xe}from"./index-00a8eb64.js";import{D as $,k as I,a0 as T,B as F,E as N,F as S,d as J,c6 as Ze,ai as Re,a4 as et,dc as tt,dd as st,cJ as at,de as it,aP as nt,df as lt,r as rt}from"./index-3b5ce20a.js";import{r as E,u as v,e as $e,f as Q,h as he,i as ne,j as le,k as ot,l as Ee,m as xe,n as re,o as oe,p as ct,q as Te,v as fe,w as ce,x as de,y as dt,z as Me,A as je,B as pe,C as ue,D as pt}from"./index-52963879.js";import{A as k}from"./AdaptableCard-3d1e1f96.js";import{C as me}from"./CustomerInfoField-4bf880e2.js";import{d as ut}from"./Check-af681a30.js";import{f as ze,t as mt,u as ht,v as xt,w as ft,x as jt,y as gt,z as yt,A as bt,d as Ct,e as wt,B as Nt,b as St,c as Dt,C as vt,D as kt}from"./OpportunityServices-c4510dd2.js";import{T as ge}from"./index-289b3fd9.js";import{D as ie}from"./tableV2-99c808c0.js";import{A as K,T as M}from"./actioncell-6b5ebd6c.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{a as Ft,P as At}from"./index-a14e51de.js";import{D as B}from"./Drawer-4f97e662.js";import{F as X,a as O}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./Upload-be937eb6.js";import{c as W,a as _,F as Z,b as ee,d as R}from"./index.esm-b2d342b5.js";import{S as te}from"./StickyFooter-3e569b80.js";import{C as se}from"./ConfirmDialog-2838a642.js";import{d as It}from"./FolderOpen-7b0e2ac0.js";import{N as Ot}from"./NoData-4cc4af03.js";import{A as Rt}from"./AddEditFile-6ae10d57.js";import{r as ae}from"./createSvgIcon-aba65987.js";import{h as $t}from"./index-b0ef7ac3.js";import{a as Et}from"./index-0b08ce18.js";import{P as Tt}from"./permissionHoc-0818bfb0.js";import{P as Mt}from"./PageBreadcrumb-cf54a6e9.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./useControllableState-d0909575.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./useDidUpdate-de319a18.js";const zt=Fe(We)(({theme:a})=>({[`&.${V.alternativeLabel}`]:{top:10,left:"calc(-50% + 16px)",right:"calc(50% + 16px)"},[`&.${V.active}`]:{[`& .${V.line}`]:{borderColor:"var(--custom-600)"}},[`&.${V.completed}`]:{[`& .${V.line}`]:{borderColor:"var(--custom-600)"}},[`& .${V.line}`]:{borderColor:"#eaeaf0",borderTopWidth:3,borderRadius:1,...a.applyStyles("dark",{borderColor:a.palette.grey[800]})}})),Pt=Fe("div")(({theme:a})=>({color:"#eaeaf0",display:"flex",height:22,alignItems:"center","& .QontoStepIcon-completedIcon":{color:"var(--custom-600)",zIndex:1,fontSize:25},"& .QontoStepIcon-circle":{width:12,height:12,borderRadius:"50%",backgroundColor:"currentColor"},...a.applyStyles("dark",{color:a.palette.grey[700]}),variants:[{props:({ownerState:o})=>o.active,style:{color:"var(--custom-600)"}}]}));function qt(a){const{active:o,completed:d,className:n}=a;return e.jsx(Pt,{ownerState:{active:o},className:n,children:d?e.jsx(ut,{className:"QontoStepIcon-completedIcon"}):e.jsx("div",{className:"QontoStepIcon-circle"})})}function Lt(a){const{oppId:o,handleChange:d}=a,[n,p]=j.useState([]),l=j.useCallback(async()=>{var g,c;try{const b=await ze();b!=null&&b.data&&p((c=(g=b==null?void 0:b.data)==null?void 0:g.$values)==null?void 0:c.map(m=>m))}catch{p([])}},[]);j.useEffect(()=>{l()},[l]);const y=n.findIndex(g=>(g==null?void 0:g.id)===a.activeStep),w=async g=>{var c;d(g,(g==null?void 0:g.displayOrder)>=((c=n[y])==null?void 0:c.displayOrder)?"Add":"Sub")};return e.jsx(He,{sx:{width:"80%",marginTop:"20px"},spacing:4,children:e.jsx(Ye,{alternativeLabel:!0,activeStep:y,connector:e.jsx(zt,{}),children:n.map(g=>e.jsx(Qe,{onClick:()=>w(g),children:e.jsx(Ge,{style:{cursor:"pointer"},StepIconComponent:qt,children:g==null?void 0:g.stageName})},g==null?void 0:g.stageName))})})}$("opportunity",E);const _t=W().shape({title:_().required("Title is Required")}),Bt=a=>{const{type:o,footerWidth:d,ref:n,initialData:p,id:l}=a,y=I();P();const{IsNotesDrawerOpen:w,loading:g,selectedNote:c}=v(i=>i.opportunity.notes),b=async i=>{var s;try{return await mt(i)}catch(r){return(s=r==null?void 0:r.response)==null?void 0:s.data}},m=async i=>{var r;const{id:s}=i;try{return await ht(s,i)}catch(t){return(r=t==null?void 0:t.response)==null?void 0:r.data}},x=i=>{y($e({IsNotesDrawerOpen:!w,type:i}))},u=async(i,s)=>{const r=(f,D)=>{const A={title:f.title??"",description:f.description??"",opportunityId:l};return D==="Add"?A:{id:f.id??"",...A}},t=(f,D)=>{f.success?(y(Q(l)),y(he(l)),x("Add"),s(!1),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`Note Successfully ${D}`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:f.message}),{placement:"top-center"})},h=r(i,o);let C;try{o==="Add"?(C=await b(h),t(C,"Added")):o==="Edit"&&(C=await m(h),t(C,"Updated"))}catch(f){console.error("Error during form submission:",f),s(!1),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:`An error occurred during ${o} Note`}),{placement:"top-center"})}};return e.jsx(Z,{innerRef:n,initialValues:{...p},validationSchema:_t,onSubmit:(i,{setSubmitting:s})=>{const r=i;u==null||u(r,s)},children:({values:i,touched:s,errors:r,isSubmitting:t})=>e.jsx(ee,{children:e.jsx(X,{children:e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2 pb-8",children:e.jsxs(k,{className:"mb-4",children:[e.jsx(O,{asterisk:!0,label:"Title",invalid:r.title&&s.title,errorMessage:r.title,children:e.jsx(R,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:T})}),e.jsx(O,{label:"Description",invalid:r.description||s.description,errorMessage:r.description,children:e.jsx(R,{textArea:!0,autoComplete:"off",name:"description",placeholder:"Description",component:T})}),e.jsx(te,{className:`px-8 flex items-center justify-between py-4 ${d}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(F,{size:"sm",className:"mr-2",type:"button",disabled:t,onClick:()=>x("Add"),children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",type:"submit",loading:t,children:`${o} Note`})]})})]})})})})})})};$("opportunity",E);const Vt={edit:!0,delete:!0},Ut=({opportunityId:a})=>{const[o,d]=j.useState([]),[n,p]=j.useState({pageSize:"",pageIndex:""}),l=I();H(),P();const{IsNotesDrawerOpen:y,loading:w,notesList:g,selectedNote:c,type:b,deleteConfirmation:m}=v(t=>t.opportunity.notes),x=t=>{l($e({IsNotesDrawerOpen:!y,type:t})),l(ne({}))},u=(t,h)=>{h===M.edit&&(x("Edit"),l(ne(t))),h===M.delete&&(l(le(!0)),l(ne(t)))},i=[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(K,{row:t==null?void 0:t.data,actions:Vt,buttonClick:u})})},{dataField:"title",caption:"Title",width:"230"},{dataField:"description",caption:"Description",width:"230"},{dataField:"createdBy",caption:"Created By",width:"230"},{dataField:"createdDate",caption:"Created Date",width:"230",dataType:"date",format:"MM/dd/yyyy"}];j.useEffect(()=>{l(he(a))},[]);const s=()=>{l(le(!m))},r=async()=>{l(le(!1)),await ot(c==null?void 0:c.id)&&(l(he(a)),N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"Note Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between mb-4 gap-3",children:[e.jsx("div",{className:"mb-4 lg:mb-0",children:e.jsx("h4",{className:"text-lg py-3",children:" Notes "})}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>x("Add"),children:"Add Note"})})]}),e.jsx(ie,{columns:i,tableName:"Notes",height:"calc(100vh - 400px)",data:g||[],defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:o,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Billing.BillingItems",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"billing-table",handleSearch:()=>{},isColumnResizing:!0,pager:n,setPager:p,isFilterReq:!1,isPaginationReq:!0,isSelectionReq:!1}),e.jsx(B,{title:`${b} Notes`,isOpen:y,onClose:()=>x("Add"),portalClassName:"w30",children:e.jsx(Bt,{footerWidth:"w30",type:b,initialData:b==="Add"?{title:"",description:""}:c,id:a})}),e.jsx(se,{isOpen:m,type:"danger",title:"Delete Note",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this Note?"})})]})})};$("opportunity",E);const Wt=W().shape({emailSubject:_().required("Subject is Required"),receipients:_().required("Email addresses are required").test("is-valid-email","Invalid email format",a=>a?a.split(",").map(d=>d.trim()).every(d=>/\S+@\S+\.\S+/.test(d)):!0).test("unique-emails","Duplicate emails are not allowed",a=>{if(!a)return!0;const o=a.split(",").map(n=>n.trim()),d=new Set(o);return o.length===d.size})}),Ht=a=>{const{type:o,footerWidth:d,ref:n,initialData:p,id:l}=a,y=I();P();const w=async x=>{var u;try{return await xt(x)}catch(i){return(u=i==null?void 0:i.response)==null?void 0:u.data}},g=async x=>{var u;try{return await ft(x)}catch(i){return(u=i==null?void 0:i.response)==null?void 0:u.data}},c=v(x=>x.opportunity),b=()=>{y(Ee(!c))},m=async(x,u)=>{const i=(h,C)=>{const f={emailDate:new Date,emailSubject:h.emailSubject??"",recipients:h.receipients??"",description:h.description??"",opportunityId:l};return C==="Add"?f:{id:h.id??"",...f}},s=(h,C)=>{h.success?(y(xe(l)),b(),u(!1),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`Email Successfully ${C}`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:h.message}),{placement:"top-center"})},r=i(x,o);let t;try{o==="Add"?(t=await w(r),s(t,"Added")):o==="Edit"&&(t=await g(r),s(t,"Updated"))}catch(h){console.error("Error during form submission:",h),u(!1),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:`An error occurred during ${o} Notes`}),{placement:"top-center"})}};return e.jsx(Z,{innerRef:n,initialValues:{...p},validationSchema:Wt,onSubmit:(x,{setSubmitting:u})=>{const i=x;m==null||m(i,u)},children:({values:x,touched:u,errors:i,isSubmitting:s,setFieldValue:r})=>e.jsx(ee,{children:e.jsx(X,{children:e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2 pb-8",children:e.jsxs(k,{className:"mb-4",children:[e.jsx(O,{asterisk:!0,label:"Subject",invalid:i.emailSubject&&u.emailSubject,errorMessage:i.emailSubject,children:e.jsx(R,{type:"text",autoComplete:"off",name:"emailSubject",placeholder:"Subject",component:T})}),e.jsx(O,{asterisk:!0,label:"Recipient(s)",invalid:i.receipients&&u.receipients,errorMessage:i.receipients,children:e.jsx(R,{name:"receipients",placeholder:"Recipient(s)",type:"text",component:T,onChange:t=>{const C=t.target.value.split(",").map(f=>f.trim()).join(",");r("receipients",C)}})}),e.jsx(O,{label:"Note",invalid:i.description&&u.description,errorMessage:i.description,children:e.jsx(R,{textArea:!0,autoComplete:"off",name:"description",placeholder:"Note",component:T})}),e.jsx(te,{className:`px-8 flex items-center justify-between py-4 ${d}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(F,{size:"sm",className:"mr-2",disabled:s,onClick:()=>b(),children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",type:"submit",loading:s,children:`${o} Email`})]})})]})})})})})})};$("opportunity",E);const Yt={edit:!0,delete:!0},Qt=({opportunityId:a})=>{const[o,d]=j.useState([]),[n,p]=j.useState({pageSize:"",pageIndex:""}),l=I();P();const{IsEmailDrawerOpen:y,loading:w,emailsList:g,selectedEmail:c,type:b,deleteConfirmation:m}=v(t=>t.opportunity.emails),x=t=>{l(re({})),l(Ee({IsEmailDrawerOpen:!y,type:t}))},u=(t,h)=>{h===M.edit&&(x("Edit"),l(re(t))),h===M.delete&&(l(oe(!0)),l(re(t)))},i=[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(K,{row:t==null?void 0:t.data,actions:Yt,buttonClick:u})})},{dataField:"emailDate",caption:"Date",width:"230",dataType:"date",format:"MM/dd/yyyy"},{dataField:"emailSubject",caption:"Subject",width:"230"},{dataField:"recipients",caption:"Recipients",width:"230"},{dataField:"createdBy",caption:"Created By",width:"230"}];j.useEffect(()=>{l(xe(a))},[]);const s=()=>{l(oe(!m))},r=async()=>{l(oe(!1)),await ct(c==null?void 0:c.id)&&(l(xe(a)),N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"Email Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between mb-4 gap-3",children:[e.jsx("div",{className:"mb-4 lg:mb-0",children:e.jsx("h4",{className:"text-lg py-3",children:" Emails "})}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>x("Add"),children:"Add Email"})})]}),e.jsx(ie,{columns:i,tableName:"Email",data:g||[],height:"calc(100vh - 400px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:o,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Billing.BillingItems",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"billing-table",handleSearch:()=>{},isColumnResizing:!0,pager:n,setPager:p,isFilterReq:!1,isPaginationReq:!0,isSelectionReq:!1}),e.jsx(B,{title:`${b} Email`,isOpen:y,onClose:()=>x("Add"),portalClassName:"w30",children:e.jsx(Ht,{footerWidth:"w30",type:b,initialData:b==="Add"?{emailDate:new Date,emailSubject:"",receipients:"",description:""}:{...c,receipients:c==null?void 0:c.recipients},id:a})}),e.jsx(se,{isOpen:m,type:"danger",title:"Delete Email",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this Email?"})})]})})};$("opportunity",E);const Gt=W().shape({subject:_().required("Subject is Required")}),Jt=a=>{const{type:o,footerWidth:d,ref:n,initialData:p,id:l}=a,y=I();P();const{IsTasksDrawerOpen:w,loading:g}=v(u=>u.opportunity.tasks),c=async u=>{var i;try{return await jt(u)}catch(s){return(i=s==null?void 0:s.response)==null?void 0:i.data}},b=async u=>{var s;const{id:i}=u;try{return await gt(i,u)}catch(r){return(s=r==null?void 0:r.response)==null?void 0:s.data}},m=u=>{y(Te({IsNotesDrawerOpen:!w,type:u}))},x=async(u,i)=>{const s=(C,f)=>{const D={subject:C.subject??"",description:C.description??"",opportunityId:l};return f==="Add"?D:{id:C.id??"",...D}},r=(C,f)=>{C.success?(y(Q(l)),y(fe(l)),m("Add"),i(!1),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`Task Successfully ${f}`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:C.message}),{placement:"top-center"})},t=s(u,o);let h;try{o==="Add"?(h=await c(t),r(h,"Added")):o==="Edit"&&(h=await b(t),r(h,"Updated"))}catch(C){console.error("Error during form submission:",C),i(!1),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:`An error occurred during ${o} Task`}),{placement:"top-center"})}};return e.jsx(Z,{innerRef:n,initialValues:{...p},validationSchema:Gt,onSubmit:(u,{setSubmitting:i})=>{const s=u;x==null||x(s,i)},children:({values:u,touched:i,errors:s,isSubmitting:r})=>e.jsx(ee,{children:e.jsx(X,{children:e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2 pb-8",children:e.jsxs(k,{className:"mb-4",children:[e.jsx(O,{asterisk:!0,label:"Subject",invalid:s.subject&&i.subject,errorMessage:s.subject,children:e.jsx(R,{type:"text",autoComplete:"off",name:"subject",placeholder:"Subject",component:T})}),e.jsx(O,{label:"Note",invalid:s.description&&i.description,errorMessage:s.description,children:e.jsx(R,{textArea:!0,autoComplete:"off",name:"description",placeholder:"Note",component:T})}),e.jsx(te,{className:`px-8 flex items-center justify-between py-4 ${d}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(F,{size:"sm",className:"mr-2",type:"button",disabled:r,onClick:()=>m("Add"),children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",type:"submit",loading:r,children:`${o} Task`})]})})]})})})})})})};$("opportunity",E);const Kt={edit:!0,delete:!0},Xt=({opportunityId:a})=>{const[o,d]=j.useState([]),[n,p]=j.useState({pageSize:"",pageIndex:""}),l=I();P();const{IsTaskDrawerOpen:y,loading:w,tasksList:g,selectedTask:c,type:b,deleteConfirmation:m}=v(t=>t.opportunity.tasks);v(t=>t.opportunity);const x=t=>{l(Te({IsTaskDrawerOpen:!y,type:t})),l(ce({}))},u=(t,h)=>{h===M.edit&&(x("Edit"),l(ce(t))),h===M.delete&&(l(de(!0)),l(ce(t)))},i=[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(K,{row:t==null?void 0:t.data,actions:Kt,buttonClick:u})})},{dataField:"subject",caption:"Subject",width:"230"},{dataField:"description",caption:"Description",width:"230"},{dataField:"createdDate",caption:"Created Date",width:"230",dataType:"date",format:"MM/dd/yyyy"}];j.useEffect(()=>{l(fe(a))},[]);const s=()=>{l(de(!m))},r=async()=>{l(de(!1)),await dt(c==null?void 0:c.id)&&(l(fe(a)),N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"Task Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between mb-4 gap-3",children:[e.jsx("div",{className:"mb-4 lg:mb-0",children:e.jsx("h4",{className:"text-lg py-3",children:" Tasks "})}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>x("Add"),children:"Add Task"})})]}),e.jsx(ie,{columns:i,tableName:"tasks",data:g||[],height:"calc(100vh - 400px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:o,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Billing.BillingItems",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"billing-table",handleSearch:()=>{},isColumnResizing:!0,pager:n,setPager:p,isFilterReq:!1,isPaginationReq:!0,isSelectionReq:!1}),e.jsx(B,{title:`${b} Task`,isOpen:y,onClose:()=>x("Add"),portalClassName:"w30",children:e.jsx(Jt,{footerWidth:"w30",type:b,initialData:b==="Add"?{subject:"",description:""}:c,id:a})}),e.jsx(se,{isOpen:m,type:"danger",title:"Delete Task",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this Task?"})})]})})};$("opportunity",E);const Zt=W().shape({title:_().required("Title is Required"),phoneNumber:_().matches(/^[0-9()\-\s]+$/,"Phone must only contain numbers, parentheses, dashes, and spaces").test("is-ten-digits","Please enter valid Phone No",a=>a?a.replace(/[()\-\s]/g,"").length===10:!0).required("Phone Number Required")}),es=a=>{let{value:o}=a.target;o=o.replace(/\D/g,"");var d=o.length;d>0&&(o="("+o),d>3&&(o=o.slice(0,4)+") "+o.slice(4,11)),d>6&&(o=o.slice(0,9)+"-"+o.slice(9)),a.target.value=o},ts=a=>{const{type:o,footerWidth:d,ref:n,initialData:p,id:l}=a,y=I();P();const{IsCallDrawerOpen:w,loading:g,selectedCall:c}=v(i=>i.opportunity.calls),b=async i=>{var s;try{return await yt(i)}catch(r){return(s=r==null?void 0:r.response)==null?void 0:s.data}},m=async i=>{var r;const{id:s}=i;try{return await bt(s,i)}catch(t){return(r=t==null?void 0:t.response)==null?void 0:r.data}},x=i=>{y(Me({IsCallDrawerOpen:!w,type:i}))},u=async(i,s)=>{const r=(f,D)=>{const A={callDate:f.callDate??new Date,title:f.title??"",phoneNumber:f.phoneNumber??"",description:f.description??"",opportunityId:l};return D==="Add"?A:{id:f.id??"",...A}},t=(f,D)=>{f.success?(y(Q(l)),y(je(l)),x("Add"),s(!1),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`Call Successfully ${D}`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:f.message}),{placement:"top-center"})},h=r(i,o);let C;try{o==="Add"?(C=await b(h),t(C,"Added")):o==="Edit"&&(C=await m(h),t(C,"Updated"))}catch(f){console.error("Error during form submission:",f),s(!1),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:`An error occurred during ${o} Call`}),{placement:"top-center"})}};return e.jsx(Z,{innerRef:n,initialValues:{...p},validationSchema:Zt,onSubmit:(i,{setSubmitting:s})=>{const r=i;u==null||u(r,s)},children:({values:i,touched:s,errors:r,isSubmitting:t})=>e.jsx(ee,{children:e.jsx(X,{children:e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2 pb-8",children:e.jsxs(k,{className:"mb-4",children:[e.jsx(O,{label:"Date",invalid:r.callDate&&s.callDate,errorMessage:r.callDate,children:e.jsx(R,{name:"callDate",placeholder:"Date",children:({field:h,form:C})=>e.jsx(Ft,{field:h,form:C,inputFormat:"MM/DD/YYYY",value:i.callDate?new Date(i.callDate):new Date,onChange:f=>{C.setFieldValue(h.name,f)}})})}),e.jsx(O,{asterisk:!0,label:"Title",invalid:r.title&&s.title,errorMessage:r.title,children:e.jsx(R,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:T})}),e.jsx(O,{label:"Phone No.",asterisk:!0,invalid:r.phoneNumber&&s.phoneNumber,errorMessage:r.phoneNumber,children:e.jsx(R,{onInput:h=>{es(h)},type:"text",autoComplete:"off",name:"phoneNumber",placeholder:"Phone",component:T})}),e.jsx(O,{label:"Note",invalid:r.description&&s.description,errorMessage:r.description,children:e.jsx(R,{textArea:!0,autoComplete:"off",name:"description",placeholder:"Note",component:T})}),e.jsx(te,{className:`px-8 flex items-center justify-between py-4 ${d}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(F,{size:"sm",className:"mr-2",type:"button",disabled:t,onClick:()=>x("Add"),children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",type:"submit",loading:t,children:`${o} Call`})]})})]})})})})})})};$("opportunity",E);const ss={edit:!0,delete:!0},as=({opportunityId:a})=>{const[o,d]=j.useState([]),[n,p]=j.useState({pageSize:"",pageIndex:""}),l=I();P();const{IsCallDrawerOpen:y,loading:w,callsList:g,selectedCall:c,type:b,deleteConfirmation:m}=v(t=>t.opportunity.calls);v(t=>t.opportunity.callss);const x=t=>{l(Me({IsCallDrawerOpen:!y,type:t})),l(pe({}))},u=(t,h)=>{h===M.edit&&(x("Edit"),l(pe(t))),h===M.delete&&(l(ue(!0)),l(pe(t)))},i=[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(K,{row:t==null?void 0:t.data,actions:ss,buttonClick:u})})},{dataField:"callDate",caption:"Date",width:"230",dataType:"date",format:"MM/dd/yyyy"},{dataField:"title",caption:"Title",width:"230"},{dataField:"phoneNumber",caption:"Phone No.",width:"230"},{dataField:"description",caption:"Note",width:"230",cellRender:t=>{const h=t.value.replace(/<[^>]*>/g,"");return e.jsx("div",{"data-cname":"Note",children:e.jsx("span",{children:h})})}},{dataField:"createdDate",caption:"Created Date",width:"230",dataType:"date",format:"MM/dd/yyyy"}];j.useEffect(()=>{l(je(a))},[]);const s=()=>{l(ue(!m))},r=async()=>{l(ue(!1)),await pt(c==null?void 0:c.id)&&(l(je(a)),N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"Call Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between mb-4 gap-3",children:[e.jsx("div",{className:"mb-4 lg:mb-0",children:e.jsx("h4",{className:"text-lg py-3",children:" Calls "})}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>x("Add"),children:"Add Call"})})]}),e.jsx(ie,{columns:i,tableName:"Calls",height:"calc(100vh - 400px)",data:g||[],initialColumOrder:[],defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:o,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Billing.BillingItems",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"billing-table",handleSearch:()=>{},isColumnResizing:!0,pager:n,setPager:p,isFilterReq:!1,isPaginationReq:!0,isSelectionReq:!1}),e.jsx(B,{title:`${b} Call`,isOpen:y,onClose:()=>x("Add"),portalClassName:"w30",children:e.jsx(ts,{footerWidth:"w30",type:b,initialData:c,id:a})}),e.jsx(se,{isOpen:m,type:"danger",title:"Delete Call",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this Call?"})})]})})};$("opportunity",E);const is=()=>(j.useState([]),I(),H(),v(a=>a.opportunity.data.IsDrawerOpen),v(a=>a.opportunity.data.opportunityList),v(a=>a.opportunity.data.IsDetailsOpen),j.useState("Activity"),e.jsx(e.Fragment,{children:e.jsx(k,{className:"h-full py-4 bg-transparent",bodyClass:"h-full",children:e.jsx(k,{className:"borderless flex flex-col items-center justify-center h-96",children:e.jsx("h1",{className:"text-3xl font-sans text-custom-600 dark:text-custom-100 bg-transparent",children:"Coming Soon..."})})})})),ns={edit:!0,delete:!0},ls=({files:a,fetchData:o,opportunityId:d,setType:n,setSelectedFile:p,setDrawerOpen:l})=>{const[y,w]=j.useState(!1);j.useState(null);const[g,c]=j.useState(!1),[b,m]=j.useState(""),x=t=>{},u=(t,h)=>{console.log(t,h),M.view,h===M.edit&&(l(!0),n("Edit"),p(t)),h===M.delete&&(m(t==null?void 0:t.fileId),c(!0))},i=async t=>{const h=await Ct(d,t),C=h.headers["content-type"],f=new Blob([h.data],{type:C}),D=URL.createObjectURL(f);if(C.startsWith("image/")||C==="application/pdf")window.open(D,"_blank");else{const A=document.createElement("a");A.href=D,A.download=`file-${t}`,document.body.appendChild(A),A.click(),document.body.removeChild(A)}},s=()=>{m(null),c(!1)},r=async()=>{await wt(d,b)&&N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"File Successfully Deleted"}),{placement:"top-center"}),o(),s()};return e.jsxs(z,{children:[(a==null?void 0:a.length)>0?a.map((t,h)=>e.jsxs(Ae,{expanded:y===t.fileName,onChange:()=>x(t.fileName),sx:{mb:1},children:[e.jsx(Ie,{"aria-controls":`${t.fileName}-content`,id:`${t.fileName}-header`,className:"dark:bg-[#292f3c] dark:text-white",children:e.jsxs(z,{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",width:"100%",gap:1,className:"dark:bg-[#292f3c] dark:text-white",children:[e.jsxs(z,{display:"flex",alignItems:"center",children:[e.jsx(It,{sx:{color:"var(--custom-600)"}}),e.jsx(L,{variant:"h6",sx:{ml:1},onClick:()=>i(t.fileId),children:t.fileName})]}),e.jsx(z,{mt:{xs:1,sm:0},children:e.jsx(K,{row:t,actions:ns,buttonClick:u})})]})}),e.jsx(Oe,{className:"dark:bg-[#292f3c] dark:text-white"})]},h)):e.jsxs(e.Fragment,{children:[" ",e.jsx(Ot,{})," "]}),e.jsx(se,{isOpen:g,type:"danger",title:"Delete file",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this File?"})})]})};$("opportunity",E);const rs=({opportunityId:a})=>{j.useState([]),j.useState({pageSize:"",pageIndex:""}),I(),H(),v(s=>s.opportunity.data.opportunityList),v(s=>s.opportunity.data.IsDetailsOpen);const[o,d]=j.useState(!1),[n,p]=j.useState("Add"),[l,y]=j.useState([]),[w,g]=j.useState(""),[c,b]=j.useState(null);j.useState("Activity");const m=()=>{p("Add"),d(!o)},x=async(s,r)=>{var t,h,C,f;try{const D=n==="Edit"?await St(a,c==null?void 0:c.fileId,s==null?void 0:s.fileName,(h=(t=s==null?void 0:s.files)==null?void 0:t[0])!=null&&h.isViewOnly||(C=s==null?void 0:s.files)==null?void 0:C[0]):await Dt(a,s==null?void 0:s.fileName,(f=s==null?void 0:s.files)==null?void 0:f[0]);D.success?(i(),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`File ${n==="Edit"?"Updated":"Uploaded"} Successfully`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:D.message}),{placement:"top-center"})}catch(D){console.error("Failed to opportunity logs:",D),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:"Something went Wrong"}),{placement:"top-center"})}r(!1),m()},u=()=>{console.log("Form canceled"),m()},i=j.useCallback(async s=>{var r;try{const t=await Nt(a,s);t!=null&&t.data&&y((r=t==null?void 0:t.data)==null?void 0:r.$values)}catch(t){y([]),console.error("Failed to opportunity logs:",t)}},[w]);return j.useEffect(()=>{i(w)},[i,a]),e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h4",{className:"text-lg py-3",children:" Files"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:[e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>d(!0),children:"Add File"}),e.jsx(B,{title:`${n} File`,isOpen:o,onClose:()=>m(),portalClassName:"w30",children:e.jsx(Rt,{footerWidth:"w30",initialData:n==="Add"?{files:[],fileName:""}:{files:[{name:c==null?void 0:c.fileName,type:"applicatiojjn/zip",size:26775,isViewOnly:!0}],fileName:c==null?void 0:c.fileName},onSubmit:x,onCancel:u})})]})]}),e.jsx(T,{className:"max-w-md md:w-52 md:mb-0 mb-4 mb-2",size:"sm",placeholder:"Search Files",prefix:e.jsx(Ze,{className:"text-lg"}),onChange:s=>g(s.target.value),value:w}),e.jsx(ls,{files:l,fetchData:i,opportunityId:a,setType:p,setSelectedFile:b,setDrawerOpen:d})]})})};$("opportunity",E);const os=()=>(j.useState([]),I(),H(),v(a=>a.opportunity.data.IsDrawerOpen),v(a=>a.opportunity.data.opportunityList),v(a=>a.opportunity.data.IsDetailsOpen),j.useState("Activity"),e.jsx(e.Fragment,{children:e.jsx(k,{className:"h-full py-4 bg-transparent borderless",bodyClass:"h-full",children:e.jsx(k,{className:"p-4 flex flex-col items-center justify-center h-96",children:e.jsx("h1",{className:"text-3xl font-sans text-custom-600 dark:text-custom-100 bg-transparent",children:"Coming Soon..."})})})}));var ye={},cs=G;Object.defineProperty(ye,"__esModule",{value:!0});var Pe=ye.default=void 0,ds=cs(ae()),ps=e;Pe=ye.default=(0,ds.default)((0,ps.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");var be={},us=G;Object.defineProperty(be,"__esModule",{value:!0});var qe=be.default=void 0,ms=us(ae()),hs=e;qe=be.default=(0,ms.default)((0,hs.jsx)("path",{d:"M19 3H4.99C3.89 3 3 3.9 3 5l.01 14c0 1.1.89 2 1.99 2h10l6-6V5c0-1.1-.9-2-2-2M7 8h10v2H7zm5 6H7v-2h5zm2 5.5V14h5.5z"}),"StickyNote2");var Ce={},xs=G;Object.defineProperty(Ce,"__esModule",{value:!0});var Le=Ce.default=void 0,fs=xs(ae()),js=e;Le=Ce.default=(0,fs.default)((0,js.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"}),"Email");var we={},gs=G;Object.defineProperty(we,"__esModule",{value:!0});var _e=we.default=void 0,ys=gs(ae()),bs=e;_e=we.default=(0,ys.default)((0,bs.jsx)("path",{d:"M20.01 15.38c-1.23 0-2.42-.2-3.53-.56-.35-.12-.74-.03-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99"}),"Call");const Cs=a=>({Note:e.jsx(qe,{color:"primary",sx:{color:"var(--custom-600)"}}),Email:e.jsx(Le,{sx:{color:"var(--custom-600)"}}),Call:e.jsx(_e,{sx:{color:"var(--custom-600)"}})})[a]||null,ws=({allActivities:a})=>{const[o,d]=j.useState(!1);j.useState(null),j.useState(0);const n=p=>{d(o===p?!1:p)};return e.jsx(z,{children:(a==null?void 0:a.length)>0?a==null?void 0:a.map((p,l)=>e.jsxs(Ae,{expanded:o===p.id,onChange:()=>n(p.id),sx:{mb:1,border:"1px solid #e0e0e0",borderRadius:"8px"},children:[e.jsxs(Ie,{"aria-controls":`${p.type}-content`,id:`${p.type}-header`,className:"dark:bg-[#292f3c] dark:text-white",children:[e.jsx(Pe,{sx:{mr:2}}),e.jsxs(z,{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",width:"100%",gap:1,className:"dark:bg-[#292f3c] dark:text-white",children:[e.jsxs(z,{display:"flex",alignItems:"center",flex:"1",children:[Cs(p.activityType),e.jsxs(L,{sx:{ml:1,fontWeight:"bold"},className:"flex-1",children:[p.activityType,e.jsxs("span",{style:{fontWeight:"normal"},children:[" ",`${p==null?void 0:p.operation} By `]}),p.modifiedBy]})]}),e.jsx(L,{variant:"body2",color:"textSecondary",className:"dark:bg-[#292f3c] dark:text-white",children:p!=null&&p.modifiedDate?Re(p==null?void 0:p.modifiedDate).locale(navigator.language).format("MM-DD-YYYY HH:mm:ss"):""})]})]}),e.jsx(Oe,{className:"dark:bg-[#292f3c] dark:text-white",children:e.jsx(L,{color:"textSecondary",className:"dark:text-white",children:p.activityTypeTitle})})]},l)):e.jsx(e.Fragment,{children:"No Records Found"})})},Ns={All:"","Past 24hr":"last_day","This week":"last_week","This Month":"last_month","Last 3 months":"last_3_months","Last 6 months":"last_6_months"},ve={"Newest first":"newestFirst",Date:"date",Closet:"closet"},Ss=({onFilterApply:a,selectedActivityTypes:o,setSelectedActivityTypes:d,selectedDateRange:n,setSelectedDateRange:p,selectedSortOptions:l,setSelectedSortOptions:y})=>{const w=(m,x)=>{x&&d(x)},g=(m,x)=>{x&&p(x)},c={px:3,py:1,fontSize:"0.875rem",border:"1px solid #ccc","&:not(:first-of-type)":{borderLeft:"1px solid #ccc"},"&.Mui-selected":{backgroundColor:"white",color:"#F25A43",border:"1px solid #F25A43"}},b=(m,x,u)=>{x.target.checked?y(i=>[...i,u]):y(i=>i.filter(s=>s!==u))};return e.jsxs(e.Fragment,{children:[e.jsx(L,{variant:"subtitle1",sx:{mb:1},children:"Sort By"}),e.jsx(z,{children:["Newest first","Date","Closet"].map(m=>e.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(L,{children:m}),e.jsx(Je,{control:e.jsx(et,{}),checked:l.includes(ve[m]),onChange:(x,u)=>b(x,u,ve[m]),label:"",labelPlacement:"end",sx:{marginRight:0}})]},m))}),e.jsx(L,{variant:"subtitle1",sx:{mt:2,mb:1},children:"Activity Type"}),e.jsx(Se,{value:o,onChange:w,"aria-label":"Activity Type",sx:{flexWrap:"wrap",gap:1},children:["Note","Email","Call","Task","Estimate","Files"].map(m=>e.jsx(De,{value:m,sx:c,className:"dark:text-white",children:m},m))}),e.jsx(L,{variant:"subtitle1",sx:{mt:2,mb:1},children:"Date"}),e.jsx(Se,{value:n,onChange:g,exclusive:!0,"aria-label":"Date Range",sx:{flexWrap:"wrap",gap:1},children:["All","Past 24hr","This week","This Month","Last 3 months","Last 6 months"].map(m=>e.jsx(De,{value:Ns[m],sx:c,className:"dark:text-white",children:m},m))})]})};var Ne={},Ds=G;Object.defineProperty(Ne,"__esModule",{value:!0});var Be=Ne.default=void 0,vs=Ds(ae()),ks=e;Be=Ne.default=(0,vs.default)((0,ks.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterListOutlined");$("opportunity",E);const Fs=({opportunityId:a})=>{j.useState([]),I(),H();const{result:o,stageData:d}=v(r=>r.opportunity.data.opportunityDetails||{});v(r=>r.opportunity.data.IsDetailsOpen);const[n,p]=j.useState(!1),[l,y]=j.useState([]),[w,g]=j.useState([]),[c,b]=j.useState(""),[m,x]=j.useState([]);j.useState("Activity");const u=()=>{p(!n)},i=()=>{s(w,m,c),u()},s=j.useCallback(async(r,t,h)=>{var C;try{const f=await vt(a,{activityType:r,operation:"",sortBy:t,duration:h});f!=null&&f.data&&y((C=f==null?void 0:f.data)==null?void 0:C.$values)}catch(f){y([]),console.error("Failed to opportunity logs:",f)}},[]);return j.useEffect(()=>{s(w,m,c)},[s,a,o]),e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h4",{className:"text-lg py-3",children:" Activity"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(F,{block:!0,variant:"plain",size:"sm",icon:e.jsx(Be,{}),onClick:()=>p(!0)}),e.jsx(B,{title:"Filters",isOpen:n,onClose:()=>u(),onRequestClose:()=>u(),portalClassName:"w30",footerClass:"flex",footer:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(F,{variant:"default",size:"md",onClick:u,children:"Cancel"}),e.jsx(F,{variant:"solid",size:"md",onClick:i,children:"Apply"})]}),children:e.jsx(Ss,{onFilterApply:i,selectedActivityTypes:w,setSelectedActivityTypes:g,selectedDateRange:c,setSelectedDateRange:b,selectedSortOptions:m,setSelectedSortOptions:x})})]})]}),e.jsx(ws,{allActivities:l})]})})},{TabNav:U,TabList:As,TabContent:q}=ge,Is=({currentTab:a,setCurrentTab:o,opportunityId:d})=>e.jsxs(ge,{className:"opportunity-tabs",variant:"pill",value:a,onChange:o,children:[e.jsx(ge,{className:"opportunity-tabs",variant:"pill",value:a,onChange:o,children:e.jsx(k,{className:"p-2 my-2",children:e.jsxs(As,{className:"flex flex-col sm:flex-row flex-wrap gap-2",children:[e.jsx(U,{icon:e.jsx(tt,{}),className:"w-full sm:w-auto text-center",value:"Activity",children:"Activity"}),e.jsx(U,{icon:e.jsx(st,{}),className:"w-full sm:w-auto text-center",value:"Notes",children:"Notes"}),e.jsx(U,{icon:e.jsx(at,{}),className:"w-full sm:w-auto text-center",value:"Email",children:"Emails"}),e.jsx(U,{icon:e.jsx(it,{}),className:"w-full sm:w-auto text-center",value:"Calls",children:"Calls"}),e.jsx(U,{icon:e.jsx(nt,{}),className:"w-full sm:w-auto text-center",value:"Task",children:"Tasks"}),e.jsx(U,{icon:e.jsx(lt,{}),className:"w-full sm:w-auto text-center",value:"Files",children:"Files"})]})})}),e.jsx(k,{className:"my-2",children:e.jsxs("div",{className:"p-3",children:[e.jsx(q,{value:"Activity",children:e.jsx(Fs,{opportunityId:d})}),e.jsx(q,{value:"Notes",children:e.jsx(Ut,{opportunityId:d})}),e.jsx(q,{value:"Email",children:e.jsx(Qt,{opportunityId:d})}),e.jsx(q,{value:"Calls",children:e.jsx(as,{opportunityId:d})}),e.jsx(q,{value:"Task",children:e.jsx(Xt,{opportunityId:d})}),e.jsx(q,{value:"Estimates",children:e.jsx(is,{})}),e.jsx(q,{value:"Files",children:e.jsx(rs,{opportunityId:d})}),e.jsx(q,{value:"Details",children:e.jsx(os,{})})]})})]}),Os=a=>{I();const{touched:o,errors:d,type:n}=a,[p,l]=j.useState([]),y=j.useCallback(async()=>{var w,g;try{const c=await ze();c!=null&&c.data&&l((g=c==null?void 0:c.data)==null?void 0:g.$values.slice((w=c==null?void 0:c.data)==null?void 0:w.$values.findIndex(b=>b.conversion===!0)))}catch{l([])}},[]);return j.useEffect(()=>{y()},[y]),e.jsxs(k,{className:"mb-4",children:[e.jsx(O,{asterisk:!0,label:"Opportunity Stage",invalid:d.opportunityStatus&&o.opportunityStatus,errorMessage:d.opportunityStatus,children:e.jsx(R,{name:"opportunityStatus",children:({field:w,form:g})=>e.jsx(rt,{field:w,form:g,options:p.map(c=>({label:c.stageName,value:c.id})),name:"opportunityStatus",onChange:c=>{g.setFieldValue(w.name,c)}})})}),e.jsx(O,{label:"Notes",invalid:d.notes&&o.notes,errorMessage:d.notes,children:e.jsx(R,{type:"text",autoComplete:"off",name:"notes",placeholder:"Notes",component:T,textArea:!0})})]})},{useUniqueId:Rs}=$t,ke=W().shape({opportunityStatus:W().required("Status Required"),notes:_()}),Ve=j.forwardRef((a,o)=>{const{type:d,footerWidth:n,initialData:p={id:"",opportunityStatus:"",notes:""},onFormSubmit:l,onDiscard:y,onDelete:w}=a,g=Rs("OpportunityStatus-");return e.jsx(e.Fragment,{children:e.jsx(Z,{innerRef:o,initialValues:{...p},validationSchema:ke,onSubmit:(c,{setSubmitting:b})=>{const m=c;console.log("formsubmit",m),d==="new"&&(m.id=g),l==null||l(m,b)},children:({values:c,touched:b,errors:m,isSubmitting:x})=>e.jsx(ee,{children:e.jsxs(X,{children:[e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2 pb-8",children:e.jsx(Os,{type:d,touched:b,errors:m})})}),e.jsx(te,{className:`px-8 flex items-center justify-between py-4 ${n}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(F,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>y==null?void 0:y(),children:"Discard"}),e.jsx(F,{size:"sm",variant:"solid",loading:x,icon:e.jsx(Et,{}),type:"submit",children:"Save"})]})})]})})})})});Ve.displayName="OpportunityStatusForm";$("opportunity",E);const $s=()=>{var h,C;let{id:a}=Ke();const o=H();P();const d=I();j.useState(0);const{result:n,stageData:p}=v(f=>f.opportunity.data.opportunityDetails||{}),[l,y]=j.useState(""),[w,g]=j.useState(!1),[c,b]=j.useState("Activity"),m=()=>{o("/modules/opportunities")};j.useEffect(()=>{a&&(d(Q(a)),y(a))},[a]);const x=()=>{d(Q(l))},u=(f,D)=>{if((p==null?void 0:p.id)!==f.id)if(f!=null&&f.conversion)s();else{const A={OpportunityStageId:f.id};i(A).then(Y=>{Y.success&&(N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Opportunity status successfully updated"}),{placement:"top-center"}),x())}).catch(Y=>{var Ue=Y.response.data;N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:Ue.message}),{placement:"top-center"})})}},i=async f=>await kt(l,f),s=()=>{g(!0)},r=()=>{g(!1)},t=async f=>{const D={OpportunityStageId:f.opportunityStatus.value};i(D).then(A=>{A.success&&(N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Opportunity status successfully updated"}),{placement:"top-center"}),x(),r())}).catch(A=>{var Y=A.response.data;N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:Y.message}),{placement:"top-center"})})};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b dark:bg-[#292f3c] dark:text-white",children:[e.jsx(Mt,{items:[{label:"CRM"},{label:"Opportunities"},{label:"Details"}]}),e.jsx("div",{className:"lg:flex items-center justify-between mb-4 lg:mb-0",children:e.jsxs("h3",{className:"flex items-center mb-4 lg:mb-0",children:[e.jsx(Xe,{onClick:m})," Opportunity Details"]})})]}),e.jsxs(k,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:[e.jsxs(k,{className:"borderless",children:[e.jsx("div",{className:"w-full pb-4",children:e.jsx("h3",{className:"text-lg",children:n==null?void 0:n.opportunityName})}),e.jsxs("div",{className:"flex flex-col md:flex-row md:justify-between pb-4 border-b border-gray-200",children:[e.jsx("div",{className:"w-full flex md:flex-1 pt-4 flex justify-center md:justify-start md:space-betweent",children:e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 text-center md:text-left w-full md:gap-8",children:[e.jsxs("div",{className:"w-full md:w-1/2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Account:"})," ",(h=n==null?void 0:n.account)==null?void 0:h.accountName]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Contact Name:"})," ",(C=n==null?void 0:n.contact)==null?void 0:C.contactName]})]}),e.jsxs("div",{className:"w-full md:w-1/2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Service Type:"})," ",n==null?void 0:n.serviceType]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Industry:"})," ",n==null?void 0:n.industry]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Product:"})," ",n==null?void 0:n.product]})]})]})}),e.jsx("div",{className:"w-full md:flex-1 mt-5 md:mt-0 flex justify-center md:justify-between",children:e.jsx("div",{className:"w-[400px] md:w-full",children:e.jsx(Lt,{activeStep:p==null?void 0:p.id,oppId:l,handleChange:u})})}),e.jsx("div",{className:"w-full md:w-auto mt-5 md:mt-0 pl-[calc(50%-42.5px)] md:pl-0",children:e.jsx(At,{variant:"circle",percent:(n==null?void 0:n.confidencePercentage)||0,width:85})})]}),e.jsx("div",{className:"flex justify-center lg:justify-start",children:e.jsx("div",{className:"flex pt-4 pb-2 flex-col lg:flex-row items-center lg:items-start gap-8 w-full lg:w-auto",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-4 sm:gap-8 justify-center",children:[e.jsx(me,{title:"Start Date",value:n!=null&&n.startDate?Re(n==null?void 0:n.startDate).format("DD MMM, YYYY"):"--"}),e.jsx(me,{title:"Annual Revenue",value:n!=null&&n.estAnnualRevenue?`$${n==null?void 0:n.estAnnualRevenue.toLocaleString()}`:"--"}),e.jsx(me,{title:"Potential Revenue",value:n!=null&&n.potential?`$${n==null?void 0:n.potential.toLocaleString()}`:"--"})]})})}),e.jsx(B,{title:"Opportunity Stage",isOpen:w,onClose:r,onRequestClose:r,portalClassName:"w30",children:e.jsx(Ve,{footerWidth:"w30",type:"new",onFormSubmit:t,onDiscard:r})})]}),l!=""&&e.jsx(Is,{currentTab:c,setCurrentTab:b,opportunityId:l})]})]})},ba=Tt($s,"Opportunities");export{ba as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cu as n}from"./index-3b5ce20a.js";async function i(t){return(await n.apiV10OpportunityGetOpportunitiesPost(void 0,void 0,t)).data}async function r(t){return(await n.apiV10OpportunityAddOpportunityPost(t)).data}async function u(t){return(await n.apiV10OpportunityDeleteOpportunityIdDelete(t,!0)).data}async function y(t){return(await n.apiV10OpportunityUpdateOpportunityIdPut(t==null?void 0:t.id,t)).data}async function c(t){return(await n.apiV10OpportunityGetOpportunityByIdIdGet(t)).data}async function d(t){return(await n.apiV10OpportunityGetOpportunityNotesOpportunityIDGet(t)).data}async function O(t,e){return(await n.apiV10OpportunityUpdateOpportunityNoteIdPut(t,e)).data}async function l(t){return(await n.apiV10OpportunityDeleteOpportunityNoteIdDelete(t)).data}async function w(t){return(await n.apiV10OpportunityAddOpportunityNotePost(t)).data}async function f(t){return(await n.apiV10OpportunityGetOpportunityEmailsOpportunityIDGet(t)).data}async function V(t){return(await n.apiV10OpportunityUpdateOpportunityEmailIdPut(t==null?void 0:t.id,t)).data}async function G(t){return(await n.apiV10OpportunityDeleteOpportunityEmailIdDelete(t)).data}async function I(t){return(await n.apiV10OpportunityAddOpportunityEmailPost(t)).data}async function D(t){return(await n.apiV10OpportunityGetOpportunityCallsOpportunityIDGet(t)).data}async function P(t,e){return(await n.apiV10OpportunityUpdateOpportunityCallIdPut(t,e)).data}async function U(t){return(await n.apiV10OpportunityDeleteOpportunityCallIdDelete(t)).data}async function C(t){return(await n.apiV10OpportunityAddOpportunityCallPost(t)).data}async function F(t){return(await n.apiV10OpportunityGetOpportunityTasksOpportunityIDGet(t)).data}async function g(t,e){return(await n.apiV10OpportunityUpdateOpportunityTaskIdPut(t,e)).data}async function A(t){return(await n.apiV10OpportunityDeleteOpportunityTaskIdDelete(t)).data}async function m(t){return(await n.apiV10OpportunityAddOpportunityTaskPost(t)).data}async function E(t,e){return(await n.apiV10OpportunityGetOpportunityLogsPost(t,e)).data}async function S(t,e){return(await n.apiV10OpportunityGetFilesOpportunityIdGet(t,e)).data}async function k(t,e,p){return(await n.apiV10OpportunityUploadFileOpportunityIdPost(t,e,p)).data}async function T(t,e,p,a){return(await n.apiV10OpportunityOpportunityIdEditFileFileIdPut(t,e,p,a)).data}async function N(t,e){return await n.apiV10OpportunityOpportunityIdDownloadFileFileIdGet(t,e,{responseType:"blob"})}async function B(t,e){return(await n.apiV10OpportunityOpportunityIdDeleteFileFileIdDelete(t,e)).data}async function v(){return(await n.apiV10OpportunityGetOpportunityAccountListGet()).data}async function b(){return(await n.apiV10OpportunityGetAllStagesGet()).data}async function L(t){return(await n.apiV10OpportunityAddStagePost(t)).data}async function x(t,e){return(await n.apiV10OpportunityUpdateStageIdPut(t,e)).data}async function h(t){return(await n.apiV10OpportunityDeleteStageIdDelete(t)).data}async function j(t,e){return(await n.apiV10OpportunityUpdateOpportunityStageIdPut(t,e)).data}export{P as A,S as B,E as C,j as D,x as E,L as F,h as G,i as a,T as b,k as c,N as d,B as e,b as f,r as g,y as h,c as i,v as j,u as k,d as l,l as m,D as n,U as o,F as p,A as q,f as r,G as s,w as t,O as u,I as v,V as w,m as x,g as y,C as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{r as l}from"./vendor-react-ece1c85f.js";import{h as k}from"./vendor-charts-4be0b5ab.js";import"./Alert-59d09a99.js";import{ed as L,as as A,ee as Q,U as B,ai as E}from"./index-3b5ce20a.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{h as q}from"./index-8c0643fd.js";import{u as F,G as R,M as $}from"./esm-c40433f8.js";import{u as V}from"./vendor-i18n-b89304ef.js";import{C as W}from"./tableV3-24eed052.js";const oe=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{viewBox:"0 0 11.054 6.629",width:"1em",height:"1em",fill:"#ff0000",children:[e.jsx("path",{d:"M10.461.206H2.37v1.11c0,.605-.495,1.101-1.101,1.101h-.666v3.619c0,.327.265.593.593.593h9.265c.327,0,.593-.265.593-.593V.799c0-.327-.265-.593-.593-.593Z",style:{fill:"#cdcdcd",opacity:".12"}}),e.jsx("rect",{x:"9.23",y:".771",width:".385",height:".305",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"8.791",y:".771",width:".385",height:".305",style:{fill:"#727272"}}),e.jsx("rect",{x:"9.684",y:".771",width:".385",height:".305",style:{fill:"#727272"}}),e.jsx("rect",{x:"10.131",y:".771",width:".385",height:".305",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:".547",width:"1.134",height:".656",style:{fill:"#727272"}}),e.jsx("rect",{x:"2.794",y:"1.441",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"1.441",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"2.165",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"2.165",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"2.889",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"2.889",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"3.613",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"3.613",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"4.437",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"4.437",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"5.161",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"5.161",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("path",{d:"M.38.256C.548.122.748.029.964.006c.868-.091,1.483.838,1.052,1.603-.411.731-1.476.722-1.88-.012C.063,1.466-.009,1.238,0,1.088c.008-.119.144-.111.157-.021.01.076.007.145.026.225.085.369.406.653.78.7.703.088,1.241-.623.962-1.277C1.686.154.967-.023.495.366l.146.011c.08.035.068.142-.021.15-.077.007-.238.007-.315,0-.052-.005-.076-.031-.082-.083l.009-.335c.015-.048.074-.062.116-.04.008.004.033.032.033.038v.147Z",style:{fill:"#727272"}}),e.jsx("path",{d:"M1.059.466c.015-.068.142-.08.157.015-.015.225.021.479,0,.701-.005.053-.028.083-.082.089-.084.009-.37.011-.449-.002-.058-.01-.088-.067-.058-.119.005-.009.035-.036.042-.036h.39V.466Z",style:{fill:"#727272"}})]})]}),ne=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{viewBox:"0 0 11.137 5.585",width:"1em",height:"1em",fill:"#ff0000",children:[e.jsx("path",{d:"M10.544.122H2.456v1.109c0,.605-.495,1.1-1.1,1.1h-.665v2.661c0,.327.265.593.593.593h9.261c.327,0,.593-.265.593-.593V.715c0-.327-.265-.593-.593-.593Z",style:{fill:"#cdcdcd",opacity:".32"}}),e.jsx("rect",{x:"2.88",y:".462",width:"1.134",height:".656",style:{fill:"#727272"}}),e.jsx("rect",{x:"2.88",y:"2.08",width:"4.422",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.525",y:"2.08",width:"3.073",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.88",y:"2.803",width:"4.422",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.525",y:"2.803",width:"3.073",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.88",y:"3.587",width:"4.422",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.525",y:"3.587",width:"3.073",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.88",y:"4.31",width:"4.422",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.525",y:"4.31",width:"3.073",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"0",y:"0",width:"2.034",height:"2.034",rx:".975",ry:".975",style:{fill:"#727272"}}),e.jsx("path",{d:"M.828.418h.378l-.044.741h-.286l-.048-.741ZM1.019,1.24c.103,0,.187.087.187.189,0,.101-.085.187-.187.187s-.187-.087-.187-.187c0-.103.085-.189.187-.189Z",style:{fill:"#fff"}})]})]}),ae=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{viewBox:"0 0 65 65",width:"1em",height:"1em",fill:"#ff0000",children:[e.jsx("rect",{x:"15.8",y:"19.3",width:"7.6",height:"28.7",style:{fill:"#2d2d2d"}}),e.jsx("rect",{x:"26.1",y:"24.6",width:"7.6",height:"23.5",style:{fill:"#6d6d6d",opacity:".1"}}),e.jsx("rect",{x:"36.5",y:"19.3",width:"7.6",height:"28.7",style:{fill:"#2d2d2d"}}),e.jsx("rect",{x:"46.8",y:"29.1",width:"7.6",height:"18.9",style:{fill:"#6d6d6d",opacity:".1"}}),e.jsx("polygon",{points:"8.7 55.3 8.7 5.4 6.9 5.4 6.9 55.3 6.9 57.1 8.7 57.1 58.5 57.1 58.5 55.3 8.7 55.3",style:{fill:"var(--custom-600)",opacity:".1"}})]})]}),de=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{viewBox:"0 0 11.181 5.888",width:"1em",height:"1em",fill:"#ff0000",children:[e.jsx("rect",{x:"0",y:"0",width:"11.181",height:"5.888",rx:".927",ry:".927",style:{fill:"#cdcdcd",opacity:".32"}}),e.jsx("rect",{x:"3.842",y:"1.843",width:"1.709",height:".79",style:{fill:"#727272"}}),e.jsx("rect",{x:"3.842",y:"3.107",width:"6.666",height:".723",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"3.842",y:"4.022",width:"3.863",height:".723",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:".391",y:"1.639",width:"2.942",height:"2.942",rx:"1.433",ry:"1.433",style:{fill:"#727272"}})]})]}),ve=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{fill:"#ff0000",width:"1em",height:"1em",viewBox:"0 0 10.982 6.612",children:[e.jsx("path",{d:"M2.807.09S-.121,4.166.004,4.119s2.308-.03,2.308-.03L5.036,0l-2.229.09Z",style:{fill:"#f2f2f2",opacity:".1"}}),e.jsx("polygon",{points:"4.111 5.209 2.312 4.088 5.036 0 6.827 1.087 4.111 5.209",style:{fill:"#a5a5a5"}}),e.jsx("polygon",{points:"9.086 1.13 6.505 5.415 4.111 5.209 6.827 1.087 9.086 1.13",style:{fill:"#f2f2f2",opacity:".1"}}),e.jsx("polygon",{points:"8.18 6.321 6.505 5.415 9.086 1.13 10.982 2.29 8.18 6.321",style:{fill:"#a5a5a5"}}),e.jsx("path",{d:"M6.03,1.094c.836-.078,1.66.493,1.858,1.311.174.716-.18,1.525-.481,2.169-.329.704-.763,1.393-1.195,2.037-.06.015-.098-.068-.129-.104-.52-.601-1.593-2.758-1.643-3.534-.062-.959.63-1.788,1.589-1.878ZM7.386,2.841c0-.662-.537-1.199-1.199-1.199s-1.199.537-1.199,1.199.537,1.199,1.199,1.199,1.199-.537,1.199-1.199Z",style:{fill:"#111"}})]})]}),xe=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsx("svg",{viewBox:"0 0 493.78 334.31",width:"1em",height:"1em",fill:"currentColor",children:e.jsx("path",{d:"M487.32,0H6.46C2.89,0,0,2.89,0,6.46v48.25h493.78V6.46c0-3.57-2.89-6.46-6.46-6.46ZM110.01,39.23H32.52v-16.68h77.5v16.68ZM388.63,39.23h-22.99v-16.68h22.99v16.68ZM414.86,39.23h-22.99v-16.68h22.99v16.68ZM442,39.23h-22.99v-16.68h22.99v16.68ZM468.69,39.23h-22.99v-16.68h22.99v16.68ZM0,280.87h493.78V60.14H0v220.73ZM389.71,80.17h78.98v15.43h-78.98v-15.43ZM389.71,98.78h78.98v15.43h-78.98v-15.43ZM389.71,117.4h78.98v15.43h-78.98v-15.43ZM389.71,136.01h78.98v15.43h-78.98v-15.43ZM389.71,154.62h78.98v15.43h-78.98v-15.43ZM389.71,173.23h78.98v15.43h-78.98v-15.43ZM389.71,191.85h78.98v15.43h-78.98v-15.43ZM389.71,210.46h78.98v15.43h-78.98v-15.43ZM389.71,229.07h78.98v15.43h-78.98v-15.43ZM389.71,247.68h78.98v15.43h-78.98v-15.43ZM306.96,80.17h78.98v15.43h-78.98v-15.43ZM306.96,98.78h78.98v15.43h-78.98v-15.43ZM306.96,117.4h78.98v15.43h-78.98v-15.43ZM306.96,136.01h78.98v15.43h-78.98v-15.43ZM306.96,154.62h78.98v15.43h-78.98v-15.43ZM306.96,173.23h78.98v15.43h-78.98v-15.43ZM306.96,191.85h78.98v15.43h-78.98v-15.43ZM306.96,210.46h78.98v15.43h-78.98v-15.43ZM306.96,229.07h78.98v15.43h-78.98v-15.43ZM306.96,247.68h78.98v15.43h-78.98v-15.43ZM222.6,80.17h78.98v15.43h-78.98v-15.43ZM222.6,98.78h78.98v15.43h-78.98v-15.43ZM222.6,117.4h78.98v15.43h-78.98v-15.43ZM222.6,136.01h78.98v15.43h-78.98v-15.43ZM222.6,154.62h78.98v15.43h-78.98v-15.43ZM222.6,173.23h78.98v15.43h-78.98v-15.43ZM222.6,191.85h78.98v15.43h-78.98v-15.43ZM222.6,210.46h78.98v15.43h-78.98v-15.43ZM222.6,229.07h78.98v15.43h-78.98v-15.43ZM222.6,247.68h78.98v15.43h-78.98v-15.43ZM139.33,80.17h78.98v15.43h-78.98v-15.43ZM139.33,98.78h78.98v15.43h-78.98v-15.43ZM139.33,117.4h78.98v15.43h-78.98v-15.43ZM139.33,136.01h78.98v15.43h-78.98v-15.43ZM139.33,154.62h78.98v15.43h-78.98v-15.43ZM139.33,173.23h78.98v15.43h-78.98v-15.43ZM139.33,191.85h78.98v15.43h-78.98v-15.43ZM139.33,210.46h78.98v15.43h-78.98v-15.43ZM139.33,229.07h78.98v15.43h-78.98v-15.43ZM139.33,247.68h78.98v15.43h-78.98v-15.43ZM56.59,80.17h78.98v15.43H56.59v-15.43ZM56.59,98.78h78.98v15.43H56.59v-15.43ZM56.59,117.4h78.98v15.43H56.59v-15.43ZM56.59,136.01h78.98v15.43H56.59v-15.43ZM56.59,154.62h78.98v15.43H56.59v-15.43ZM56.59,173.23h78.98v15.43H56.59v-15.43ZM56.59,191.85h78.98v15.43H56.59v-15.43ZM56.59,210.46h78.98v15.43H56.59v-15.43ZM56.59,229.07h78.98v15.43H56.59v-15.43ZM56.59,247.68h78.98v15.43H56.59v-15.43ZM32.52,80.17h20.5v15.43h-20.5v-15.43ZM32.52,98.78h20.5v15.43h-20.5v-15.43ZM32.52,117.4h20.5v15.43h-20.5v-15.43ZM32.52,136.01h20.5v15.43h-20.5v-15.43ZM32.52,154.62h20.5v15.43h-20.5v-15.43ZM32.52,173.23h20.5v15.43h-20.5v-15.43ZM32.52,191.85h20.5v15.43h-20.5v-15.43ZM32.52,210.46h20.5v15.43h-20.5v-15.43ZM32.52,229.07h20.5v15.43h-20.5v-15.43ZM32.52,247.68h20.5v15.43h-20.5v-15.43ZM0,327.85c0,3.57,2.89,6.46,6.46,6.46h480.85c3.57,0,6.46-2.89,6.46-6.46v-41.55H0v41.55ZM447.31,297.91h22.99v16.68h-22.99v-16.68ZM421.08,297.91h22.99v16.68h-22.99v-16.68ZM32.52,297.91h77.5v16.68H32.52v-16.68Z"})})]}),G=({user:s,action:r,timestamp:t})=>e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center mb-2 gap-1",children:[e.jsx("span",{className:"font-semibold text-gray-800 text-sm sm:text-base",children:s}),e.jsx("span",{className:"text-xs sm:text-sm text-gray-500",children:t})]}),e.jsx("p",{className:"text-gray-700 text-sm sm:text-base",children:r})]}),me=()=>{const s=[{id:1,user:"John Doe",action:"Created a new post",timestamp:"2025-04-08 14:25:00"},{id:2,user:"Jane Smith",action:"Updated profile picture",timestamp:"2025-04-08 13:00:45"},{id:3,user:"Michael Lee",action:"Deleted a comment",timestamp:"2025-04-07 09:10:30"},{id:4,user:"Sarah Connor",action:"Logged in",timestamp:"2025-04-06 18:30:15"}];return e.jsx("div",{className:"bg-white",children:s.map(r=>e.jsx(G,{user:r.user,action:r.action,timestamp:r.timestamp},r.id))})};async function b(s){return(await L.executeSavedQuery(s)).data}async function ue(s){return(await L.saveWidgetQuery(s)).data}async function ye(s,r){return(await L.updateSavedQuery(s,r)).data}const fe=({widgetData:s})=>{var v,c,y,n;const r=(v=s==null?void 0:s.configuration)==null?void 0:v.sqlQuery,t=(s==null?void 0:s.configuration)||{},[h,i]=l.useState([]),[o,x]=l.useState([]),[m,a]=l.useState(!1),d=l.useCallback(async()=>{var p,M,f,Z;if(r)try{a(!0);const j=await b({sqlQuery:r,maxRows:50}),C=((p=j==null?void 0:j.data)==null?void 0:p.$values)||[],g=(M=t==null?void 0:t.xAxisCol)==null?void 0:M.value,H=(f=t==null?void 0:t.yAxisCol)==null?void 0:f.value;x(C.map(N=>N[g])),i([{name:((Z=s==null?void 0:s.configuration)==null?void 0:Z.name)||"Bar Data",data:C.map(N=>Number(N[H])||0)}])}catch(j){console.error("Failed to fetch bar chart data",j),x([]),i([])}finally{a(!1)}},[r]);l.useEffect(()=>{d()},[d]);const u={chart:{type:"bar",height:350,toolbar:{show:!1}},plotOptions:{bar:{columnWidth:"55%",borderRadius:4}},dataLabels:{enabled:!1},xaxis:{categories:o,title:{text:((c=t==null?void 0:t.xAxisCol)==null?void 0:c.value)||"Label"}},yaxis:{title:{text:((y=t==null?void 0:t.yAxisCol)==null?void 0:y.value)||"Value"}},title:{text:((n=s==null?void 0:s.configuration)==null?void 0:n.name)||"Bar Chart",align:"center"}};return m?e.jsx("div",{className:"p-4",children:"Loading..."}):e.jsx(k,{options:u,series:h,type:"bar",height:350})},z=({mode:s="icon",icon:r,imageUrl:t})=>{const h=q[r||""]||Q;return e.jsx(A,{size:55,className:"avatar-icon flex items-center justify-center text-orange-600 dark:text-orange-100 bg-transparent",icon:s==="image"&&t?e.jsx("img",{src:t,alt:"stat-icon",className:"w-6 h-6 object-contain"}):e.jsx(h,{})})},I=({count:s,label:r,widgetData:t})=>{var h,i,o;return e.jsx("div",{className:"transition-all cursor-pointer",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(z,{mode:(h=t==null?void 0:t.configuration)==null?void 0:h.mode,icon:(i=t==null?void 0:t.configuration)==null?void 0:i.icon,imageUrl:(o=t==null?void 0:t.configuration)==null?void 0:o.imageUrl}),e.jsx("div",{children:e.jsxs("div",{className:"flex gap-1.5 items-end mb-2",children:[e.jsx("h3",{className:"font-bold leading-none",children:s}),e.jsx("p",{className:"font-semibold",children:r})]})})]})})},pe=({widgetData:s})=>{var o;const[r,t]=l.useState(0),[h,i]=l.useState(!1);return l.useEffect(()=>{(async()=>{var m,a,d,u,v,c,y;if((m=s==null?void 0:s.configuration)!=null&&m.sqlQuery)try{i(!0);const n=await b({sqlQuery:s.configuration.sqlQuery,maxRows:1}),p=((y=(d=(a=n==null?void 0:n.data)==null?void 0:a.$values)==null?void 0:d[0])==null?void 0:y[(c=(v=(u=n==null?void 0:n.columns)==null?void 0:u.$values)==null?void 0:v[0])==null?void 0:c.name])??0;t(p)}catch(n){console.error("Count API failed",n)}finally{i(!1)}})()},[s]),e.jsx("div",{className:"space-y-4",children:e.jsx(I,{count:h?"—":r,label:(o=s==null?void 0:s.configuration)==null?void 0:o.name,widgetData:s})})},je=({widgetData:s})=>{var v,c;const r=(v=s==null?void 0:s.configuration)==null?void 0:v.sqlQuery,t=(s==null?void 0:s.configuration)||{},[h,i]=l.useState([]),[o,x]=l.useState([]),[m,a]=l.useState(!1),d=l.useCallback(async()=>{var y,n,p,M;if(r)try{a(!0);const f=await b({sqlQuery:r,maxRows:100}),Z=((y=f==null?void 0:f.data)==null?void 0:y.$values)||[],j=(n=t==null?void 0:t.xAxisCol)==null?void 0:n.value,C=(p=t==null?void 0:t.yAxisCol)==null?void 0:p.value;x(Z.map(g=>g[j])),i([{name:((M=s==null?void 0:s.configuration)==null?void 0:M.name)||"Line Data",data:Z.map(g=>Number(g[C]))}])}catch(f){console.error("Failed to fetch line chart data",f),x([]),i([])}finally{a(!1)}},[r]);l.useEffect(()=>{d()},[d]);const u={chart:{type:"line",height:350,toolbar:{show:!1}},stroke:{curve:"smooth",width:3},markers:{size:5},xaxis:{categories:o},yaxis:{title:{text:"Value"}},title:{text:((c=s==null?void 0:s.configuration)==null?void 0:c.name)||"Line Chart",align:"center"}};return m?e.jsx("div",{className:"p-4",children:"Loading..."}):e.jsx(k,{options:u,series:h,type:"line",height:350})},P={width:"100%",height:"400px"},w={lat:40.7128,lng:-74.006},Me=()=>{const{t:s,i18n:r}=V(),{isLoaded:t}=F({id:"google-map-wetrack",googleMapsApiKey:B.googleMapKey||"VITE_GOOGLE_MAPS_API_KEY_PLACEHOLDER"});return t&&e.jsx(R,{mapContainerStyle:P,center:w,zoom:12,children:e.jsx($,{position:w})},`map-${r.language}`)},S=({icon:s,title:r,message:t,bgColor:h})=>e.jsxs("div",{className:`w-full mt-6 p-4 ${h} text-white rounded-lg`,children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"w-6 h-6 mr-3",children:s}),e.jsx("span",{className:"font-semibold text-base sm:text-lg",children:r})]}),e.jsx("p",{className:"mt-2 text-sm sm:text-base",children:t})]}),Ze=()=>e.jsxs("div",{className:"px-4",children:[e.jsx(S,{title:"New Message",message:"You have received a new message from John Doe. Check your inbox for more details!",bgColor:"bg-blue-500",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v3m0 0v3m0-3H9m3 0h3m-7 2a2 2 0 100 4 2 2 0 000-4zm4 0a2 2 0 100 4 2 2 0 000-4z"})})}),e.jsx(S,{title:"Warning!",message:"There is a potential issue with your recent submission. Please review it.",bgColor:"bg-orange-500",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v3m0 0v3m0-3H9m3 0h3m-7 2a2 2 0 100 4 2 2 0 000-4zm4 0a2 2 0 100 4 2 2 0 000-4z"})})}),e.jsx(S,{title:"Error!",message:"There was an error while processing your request. Please try again later.",bgColor:"bg-red-500",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M18 6L6 18M6 6l12 12"})})})]}),O=(s=[])=>s.map(r=>{const t=r.name.toLowerCase().includes("date");return{dataField:r.name,caption:r.name.replace(/([A-Z])/g," $1").trim(),width:220,cellRender:h=>{const i=h.value;if(!i)return e.jsx("div",{"data-cname":r.name});if(t){const o=E(i);return e.jsx("div",{"data-cname":r.name,children:o.isValid()?o.format("MM/DD/YYYY"):i})}return e.jsx("div",{"data-cname":r.name,children:i})}}}),ge=({widgetData:s})=>{var a;console.log("widgetData",s);const[r,t]=l.useState([]),[h,i]=l.useState([]),[o,x]=l.useState(!1),m=l.useCallback(async()=>{var d,u,v;if((d=s==null?void 0:s.configuration)!=null&&d.sqlQuery)try{x(!0);const c=await b({sqlQuery:s.configuration.sqlQuery,maxRows:100});t(((u=c==null?void 0:c.data)==null?void 0:u.$values)||[]),i(O(((v=c==null?void 0:c.columns)==null?void 0:v.$values)||[]))}catch(c){console.error("Failed to fetch opportunity status",c),t([]),i([])}finally{x(!1)}},[s]);return l.useEffect(()=>{m()},[m]),e.jsx(W,{tableName:((a=s==null?void 0:s.configuration)==null?void 0:a.name)||"Data Grid",className:"pt-2",dataSource:r,columns:h,height:"500px",keyExpr:"$id",stateStorageKey:"opportunities-status",openFilter:()=>{},isFilterReq:!0,isLoading:o})};export{me as A,fe as B,ae as C,je as L,Me as M,Ze as N,ge as O,xe as a,pe as b,de as c,ve as d,b as e,oe as f,ne as g,ue as s,ye as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./vendor-mui-98daa63f.js";import{L as t}from"./vendor-react-ece1c85f.js";const l=({items:a})=>!a||a.length===0?null:s.jsx("div",{className:"font-mono text-[11px] text-gray-400 mb-2 tracking-widest uppercase",children:a.map((r,e)=>{const n=e===a.length-1;return s.jsxs("span",{children:[e>0&&s.jsx("span",{className:"mx-1 opacity-60",children:"›"}),n?s.jsx("span",{className:"text-custom-600 font-semibold",children:r.label}):r.href?s.jsx(t,{to:r.href,className:"hover:text-gray-600 transition-colors",children:r.label}):s.jsx("span",{children:r.label})]},e)})}),x=l;export{x as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./vendor-mui-
|
|
1
|
+
import{j as s}from"./vendor-mui-98daa63f.js";import{P as t}from"./PasswordInput-333c82ca.js";import{a as P,B as p,eT as f,E as i,F as m}from"./index-3b5ce20a.js";import{F as h}from"./FormContainer-9a52b9e8.js";import{F as x,a as n,c as j}from"./index-6873dfc3.js";import{c as F,a as y,f as C,F as N,b,d}from"./index.esm-b2d342b5.js";import{p as w}from"./strongPassword-6bc8786f.js";import"./vendor-react-ece1c85f.js";import"./index-88c52b97.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./PreferenceService-d2b3e003.js";const g=F().shape({password:y().required("Enter current password"),newPassword:w.required("Enter new password"),confirmNewPassword:w.required("Confirm password").oneOf([C("newPassword"),null],"Passwords do not match")}),H=({data:E})=>{const c=P(),l=async(o,r)=>{r(!0);try{const e=await j(o);c(f()),i.push(s.jsx(m,{title:"Password Updated",type:"success"}),{placement:"top-center"})}catch(e){i.push(s.jsx(m,{title:`Failed to update password: ${e.message}`,type:"error"}),{placement:"top-center"})}r(!1)};return s.jsx(s.Fragment,{children:s.jsx(N,{initialValues:{password:"",newPassword:"",confirmNewPassword:""},validationSchema:g,onSubmit:(o,{setSubmitting:r})=>{r(!0),setTimeout(()=>{l(o,r)},1e3)},children:({touched:o,errors:r,isSubmitting:e,resetForm:u})=>{const a={touched:o,errors:r};return s.jsx(b,{children:s.jsxs(h,{children:[s.jsx(x,{title:"Password",desc:"Enter your current & new password to reset your password"}),s.jsx(n,{name:"password",label:"Current Password",...a,children:s.jsx(d,{type:"password",autoComplete:"off",name:"password",placeholder:"Current Password",component:t,touched:o,errors:r})}),s.jsx(n,{name:"newPassword",label:"New Password",...a,children:s.jsx(d,{type:"password",autoComplete:"off",name:"newPassword",placeholder:"New Password",component:t,showPasswordStrength:!0,touched:o,errors:r})}),s.jsx(n,{name:"confirmNewPassword",label:"Confirm Password",...a,children:s.jsx(d,{type:"password",autoComplete:"off",name:"confirmNewPassword",placeholder:"Confirm Password",component:t,showPasswordStrength:!0,touched:o,errors:r})}),s.jsxs("div",{className:"mt-4 ltr:text-right",children:[s.jsx(p,{className:"ltr:mr-2 rtl:ml-2",type:"button",onClick:u,children:"Reset"}),s.jsx(p,{variant:"solid",loading:e,type:"submit",children:e?"Updating":"Update Password"})]})]})})}})})};export{H as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./vendor-mui-98daa63f.js";import{r as l}from"./vendor-react-ece1c85f.js";import{a0 as N,co as S,cp as k,cq as A}from"./index-3b5ce20a.js";import{b as E}from"./index-88c52b97.js";const z=({onVisibleChange:r,showPasswordStrength:o=!1,field:e,form:t,errors:p,touched:u,...v})=>{var h;const[m,i]=l.useState("password"),[c,w]=l.useState({minLength:!1,lowercase:!1,uppercase:!1,numbers:!1,specialChars:!1}),j=t.values[e.name],x=s=>{w({minLength:s.length>=8,lowercase:/[a-z]/.test(s),uppercase:/[A-Z]/.test(s),numbers:/[0-9]/.test(s),specialChars:/[!@#$%^&*(),.?":{}|<>]/.test(s)})},g=s=>{const n=s.target.value.trim();t.setFieldValue(e.name,n),x(n)},b=l.useMemo(()=>Object.values(c).every(Boolean),[c]),y=s=>{s.preventDefault();const n=m==="password"?"text":"password";i(n),r==null||r(n==="text")};l.useEffect(()=>{o&&x((t==null?void 0:t.values[e==null?void 0:e.name])||"")},[t==null?void 0:t.values[e==null?void 0:e.name],o]);const P=s=>s?"text-teal-500":"text-red-500",C=s=>s?a.jsx(A,{className:"mr-2"}):a.jsx(E,{className:"mr-2"});return a.jsxs("div",{className:"relative",children:[a.jsx(N,{...v,type:m,autoComplete:"on",value:j,onChange:g,invalid:(p==null?void 0:p[e==null?void 0:e.name])&&(u==null?void 0:u[e==null?void 0:e.name]),suffix:a.jsx("span",{className:"cursor-pointer text-xl",onClick:y,children:m==="password"?a.jsx(S,{}):a.jsx(k,{})})}),o&&!b&&((h=t==null?void 0:t.values[e==null?void 0:e.name])==null?void 0:h.length)>0&&a.jsx("div",{className:"absolute left-0 mt-2 w-full bg-white border border-gray-300 rounded-lg shadow-lg p-2 z-10",children:[{condition:c.minLength,label:"Minimum length of 8 characters"},{condition:c.lowercase,label:"At least one lowercase letter"},{condition:c.uppercase,label:"At least one uppercase letter"},{condition:c.numbers,label:"At least one number"},{condition:c.specialChars,label:"At least one special character"}].map(({condition:s,label:n})=>a.jsx("div",{children:a.jsxs("span",{className:`text-sm flex items-center ${P(s)}`,children:[C(s),n]})},n))})]})};export{z as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cY as n,cn as t}from"./index-3b5ce20a.js";async function r(a){return(await n.apiV10AccountEnable2faGet(a)).data}async function c(a){return(await n.apiV10AccountEnable2faForAllPost(a)).data}async function i(a){var e;return(await t.apiV10UserUpdateUserProfileDataPost(a==null?void 0:a.phoneNo,"","","",(e=a.name)==null?void 0:e.toString(),!0,"","",!0)).data}async function p(a){return(await n.apiV10AccountChangePasswordPost(a)).data}async function u(a){const s=a.name;return(await t.apiV10UserUploadProfileAvatarPost(a,s)).data}export{c as a,u as b,r as c,i as d,p as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{a as w,_ as v,a0 as d,aE as y,cJ as S,de as A,as as D,ds as U,B as f,eS as P,E as R,F as E}from"./index-3b5ce20a.js";import{U as C}from"./Upload-be937eb6.js";import{S as $}from"./Switcher-e2fba588.js";import{F as I}from"./FormContainer-9a52b9e8.js";import{F as q,a as c,u as k,e as G,b as L}from"./index-6873dfc3.js";import{c as O,a as m,h as Q,e as T,F as z,b as V,d as u}from"./index.esm-b2d342b5.js";import{r as B}from"./vendor-react-ece1c85f.js";import{Q as J}from"./index-0ec48d3d.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./PreferenceService-d2b3e003.js";const Z=i=>{let{value:a}=i.target;a=a.replace(/\D/g,"");var n=a.length;n>0&&(a="("+a),n>3&&(a=a.slice(0,4)+") "+a.slice(4,11)),n>6&&(a=a.slice(0,9)+"-"+a.slice(9)),i.target.value=a},M=O().shape({name:m().min(3,"Too Short!").max(40,"Too Long!").required("User Name Required"),email:m().matches(/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,}$/,"Invalid email").required("Email Required"),title:m(),avatar:Q(),lang:m(),timeZone:m(),syncData:T(),phoneNo:m().required("Phone No Required").matches(/^[0-9()\-\s]+$/,"Phone must only contain numbers, parentheses, dashes, and spaces").test("is-ten-digits","Please enter valid Phone No",i=>i?i.replace(/[()\-\s]/g,"").length===10:!0)}),me=()=>{const i=w(),a=v(s=>s.auth.user),[n,x]=B.useState(null),F={name:a.userName,email:a.email,title:"",avatar:a.avatar||"",timeZone:"",lang:"",syncData:!1,twoFactor:a.twoFactorEnabled||!1,twoFactorForAllUsers:a.twoFactorForAllUsers||!1,phoneNo:a.phone},j=(s,r,t)=>{t.length>0?(x(t[0]),s.setFieldValue(r.name,t[0])):(x(null),s.setFieldValue(r.name,null))},g=async(s,r)=>{var p,h,l;if(n){const o=await i(k({file:n}));s.avatar=o}a.twoFactorForAllUsers&&(localStorage.setItem("twoFactorEnabled",s.twoFactor.toString()),await G(s.twoFactor??!1));const t=await L(s);if(t&&t.userDetails){localStorage.setItem("updatedUserDetails",JSON.stringify(t.userDetails)),i(P({...t==null?void 0:t.userDetails,userName:`${(p=t==null?void 0:t.userDetails)==null?void 0:p.firstName} ${(h=t==null?void 0:t.userDetails)==null?void 0:h.lastName}`,phone:(l=t==null?void 0:t.userDetails)==null?void 0:l.phoneNumber}));const o=localStorage.getItem("updatedUserDetails");o&&JSON.parse(o),R.push(e.jsx(E,{title:"Profile Updated",type:"success"}),{placement:"top-center"})}r(!1)};return e.jsx(z,{enableReinitialize:!0,initialValues:F,validationSchema:M,onSubmit:(s,{setSubmitting:r})=>{r(!0),setTimeout(()=>{g(s,r)},1e3)},children:({values:s,touched:r,errors:t,isSubmitting:p,resetForm:h})=>{const l={touched:r,errors:t};return e.jsx(V,{children:e.jsxs(I,{children:[e.jsx(q,{title:"General",desc:"Basic info, like your name and address that will displayed in public"}),e.jsx(c,{name:"name",label:"Name",...l,children:e.jsx(u,{type:"text",autoComplete:"off",name:"name",placeholder:"Name",component:d,prefix:e.jsx(y,{className:"text-xl"})})}),e.jsx(c,{name:"email",label:"Email",...l,children:e.jsx(u,{disabled:!0,readOnly:!0,type:"email",autoComplete:"off",name:"email",placeholder:"Email",component:d,prefix:e.jsx(S,{className:"text-xl"})})}),e.jsx(c,{name:"phoneNo",label:"Phone Number",...l,children:e.jsx(u,{type:"text",autoComplete:"off",onInput:o=>{Z(o)},name:"phoneNo",placeholder:"Phone No",component:d,prefix:e.jsx(A,{className:"text-xl"})})}),e.jsx(c,{name:"avatar",label:"Avatar",...l,children:e.jsx(u,{name:"avatar",children:({field:o,form:b})=>e.jsx(C,{className:"cursor-pointer",showList:!1,uploadLimit:1,aspectRatio:1,objectFit:"contain",onChange:N=>j(b,o,N),children:e.jsx(D,{className:"border-2 border-white dark:border-gray-800 shadow-lg",size:60,shape:"circle",icon:e.jsx(U,{}),src:o.value instanceof File?URL.createObjectURL(o.value):o.value})})})}),a.twoFactorForAllUsers&&e.jsx(c,{name:"twoFactor",label:"Two Factor Authentication",...l,border:!1,children:e.jsx(u,{name:"twoFactor",component:$})}),a.twoFactorEnabled&&e.jsx(c,{name:"AuthenticatorQr",label:"Authenticator Qr",...l,border:!1,children:e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsx(J,{value:a.authenticatorUrl||""}),e.jsxs("p",{className:"text-sm text-gray-700 leading-relaxed pt-2 dark:text-gray-400",children:[e.jsx("span",{children:"Scan the QR code using Google or Microsoft Authenticator to set up 2FA."}),e.jsx("br",{}),e.jsx("span",{children:"If you choose to use the Authenticator app for 2FA, enter the OTP shown in the app each time you log in."}),e.jsx("br",{}),e.jsx("span",{children:"Get an authenticator app from the App Store or Google Play."})]})]})}),e.jsxs("div",{className:"mt-4 ltr:text-right",children:[e.jsx(f,{className:"ltr:mr-2 rtl:ml-2",type:"button",onClick:()=>h(),children:"Reset"}),e.jsx(f,{variant:"solid",loading:p,type:"submit",children:p?"Updating":"Update"})]})]})})}})};export{me as default};
|