@xframework-ca-test/cli 1.0.33 → 1.0.35
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 +60 -46
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,u as Me,n as We,o as fe,s as xe,a1 as ge,i as ye,l as ke}from"./vendor-mui-98daa63f.js";import{r as k,e as Ue,g as Ge,f as Ke}from"./vendor-react-ece1c85f.js";import{d as _,a as je,h as ue,k as Je,c as Ze,F as Re,b as $e}from"./index.esm-b2d342b5.js";import{h as Qe}from"./vendor-charts-4be0b5ab.js";import{E as re,F as ne,r as Xe,a0 as ee,e5 as et,B as Q,ew as tt,ai as Te,d as at}from"./index-3b5ce20a.js";import{a as st,F as Ie}from"./FormContainer-9a52b9e8.js";import{A as ve}from"./AdaptableCard-3d1e1f96.js";import{C as Pe}from"./tableV3-24eed052.js";import{D as Ne}from"./Drawer-4f97e662.js";import{S as Oe}from"./StickyFooter-3e569b80.js";import{A as rt,T as be}from"./actioncell-6b5ebd6c.js";import{C as nt}from"./ConfirmDialog-2838a642.js";import{h as it,f as Se,i as ot,j as lt,k as ct,l as dt,m as ut,n as pt,b as mt}from"./DynamicTablesService-6aa57f52.js";import{P as ht}from"./PasswordInput-333c82ca.js";import{U as Be}from"./Upload-be937eb6.js";import{a as ft,d as xt}from"./index-a14e51de.js";import{V as gt}from"./validationPatterns-77446c46.js";import{u as yt}from"./usePermission-4689548c.js";import{r as Ve}from"./createSvgIcon-aba65987.js";import{P as Ye}from"./PageBreadcrumb-cf54a6e9.js";import{c as bt}from"./WidgetLayoutsService-49730609.js";import{D as jt,g as pe}from"./vendor-devex-4076ffeb.js";import{u as ce}from"./useFilteredData-e8fad668.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./FileSaver.min-20f3f13a.js";import"./mapView-c8063ed6.js";import"./esm-c40433f8.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./useControllableState-d0909575.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./lodash-306e3f66.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";import"./index-88c52b97.js";import"./useDidUpdate-de319a18.js";const vt=({tableId:r,rowId:n,isOpen:o,fetchData:u,onDialogClose:s})=>{const i=async()=>{try{const l=await it(r,n);l!=null&&l.message&&(s(),u(),re.push(e.jsx(ne,{title:"Delete",type:"success",duration:2500,children:"Successfully Deleted"}),{placement:"top-center"}))}catch(l){console.error("Delete failed:",l)}};return e.jsx(nt,{isOpen:o,type:"danger",title:"Delete",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:i,children:e.jsx("p",{children:"Are you sure you want to delete this item? All records related to this item will be deleted as well."})})};async function St(r,n){var s,i;const o=await Se(r,{});return(((i=(s=o==null?void 0:o.data)==null?void 0:s.data)==null?void 0:i.$values)||[]).map(l=>{const p=l.Id,c=n!=null&&n.length?n.map(m=>l[m]).filter(Boolean).join(" "):String(p);return{value:String(p),label:String(c)}})}const wt=({schema:r,touched:n,errors:o,values:u,globalUploadProps:s,drawerType:i,addressRef:l})=>{const[p,c]=k.useState({}),[m,a]=k.useState({}),[h,v]=k.useState({}),N=k.useMemo(()=>r.map(t=>({name:t.name,ds:t.dataSource})).filter(t=>t.ds&&t.ds.tableId),[r]);k.useEffect(()=>{let t=!0;const f={};return N.forEach(({name:g,ds:A})=>{const x=A==null?void 0:A.tableId,j=A==null?void 0:A.labelField,w=j==null?void 0:j.split(",").map(F=>F.trim()).filter(Boolean);if(!x||p[g])return;const E=new AbortController;f[g]=E,a(F=>({...F,[g]:!0})),v(F=>({...F,[g]:null})),St(x,w).then(F=>{console.log("opts",F),t&&c(I=>({...I,[g]:F}))}).catch(F=>{t&&F.name!=="AbortError"&&(v(I=>({...I,[g]:F.message||"Failed to load options"})),c(I=>({...I,[g]:null})))}).finally(()=>{t&&a(F=>({...F,[g]:!1}))})}),()=>{t=!1,Object.values(f).forEach(g=>g.abort())}},[N.map(t=>t.name).join(","),JSON.stringify(N)]);const D=(t=[],f)=>{if(f==null)return null;const g=typeof f=="string"?f.toLowerCase():String(f);return t.find(A=>typeof A.value=="string"?A.value.toLowerCase()===g:String(A.value)===g)||null},$=(t=[],f=[])=>t.filter(g=>f==null?void 0:f.includes(g.value)),d=t=>{let{value:f}=t.target;f=f.replace(/\D/g,"");const g=f.length;return g>0&&(f="("+f),g>3&&(f=f.slice(0,4)+") "+f.slice(4,11)),g>6&&(f=f.slice(0,9)+"-"+f.slice(9)),f};return e.jsx(e.Fragment,{children:r.filter(t=>!(i==="Edit"&&t.name==="Id")).filter(t=>t.type!=="file").map(t=>{if(t.conditional&&!t.conditional(u))return null;const f=p[t.name],g=!!m[t.name],A=h[t.name]??null;return e.jsx(st,{label:t.label,asterisk:t.required,invalid:!!(n[t.name]&&o[t.name]),errorMessage:o[t.name]??"",children:t.type==="select"||t.type==="multiselect"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>{const w=t.options||[],E=w.length>0?w:Array.isArray(f)?f:[],F=t.type==="multiselect",I=(()=>{var R,B;if(!F||Array.isArray(x.value))return x.value;if(!x.value||typeof x.value!="string"||!x.value.trim())return[];try{return JSON.parse(x.value)}catch{return((B=(R=x.value).split)==null?void 0:B.call(R,",").map(Y=>Y.trim()))??[]}})(),O=F?$(E,I.map(String)):D(E,String(I));return e.jsxs(e.Fragment,{children:[e.jsx(Xe,{...F?{isMulti:!0}:{},options:E,value:O,placeholder:t.placeholder||t.label,isLoading:g,noOptionsMessage:()=>g?"Loading...":A||"No options",onChange:R=>{if(F){const B=Array.isArray(R)?R.map(Y=>Y.value):[];j.setFieldValue(t.name,B)}else j.setFieldValue(t.name,R?R.value:"")}}),A?e.jsx("div",{className:"text-sm text-red-600 mt-1",children:A}):null]})}}):t.type==="textarea"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(ee,{...x,type:"textarea",value:x.value??"",placeholder:t.placeholder||t.label,onChange:w=>j.setFieldValue(t.name,w.target.value)})}):t.type==="password"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(ht,{...x,value:x.value,placeholder:t.placeholder||t.label,onChange:w=>j.setFieldValue(t.name,w.target.value)})}):t.type==="richtext"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(et,{value:x.value,onChange:w=>j.setFieldValue(t.name,w)})}):t.type==="file"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>{var F,I,O;const w=Array.isArray(u[t.name])?u[t.name]:Array.isArray(x.value)?x.value:[],E={draggable:((F=t.uploadProps)==null?void 0:F.draggable)??!0,beforeUpload:((I=t.uploadProps)==null?void 0:I.beforeUpload)??(s==null?void 0:s.beforeUpload),accept:t.accept??((O=t.uploadProps)==null?void 0:O.accept)??void 0,multiple:!!t.multiple,...t.uploadProps??{},...s??{}};return e.jsx(Be,{draggable:!!E.draggable,cropNeeded:!1,beforeUpload:E.beforeUpload,accept:E.accept,multiple:!!E.multiple,fileList:w,onChange:R=>{j.setFieldValue(t.name,R)},onFileRemove:R=>{j.setFieldValue(t.name,R)}})}}):t.type==="datepicker"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(ft,{field:x,form:j,inputFormat:"MM/DD/YYYY",value:u[t.name]||null,...t.type==="datetime"?{showTime:!0}:{},onChange:w=>{j.setFieldValue(t.name,w)}})}):t.type==="datetimepicker"||t.type==="time"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(xt,{amPm:!0,field:t,placeholder:"Datetime",value:t.value,onChange:w=>{j.setFieldValue(t.name,w)}})}):t.type==="checkbox"?e.jsx(_,{name:t.name,type:"checkbox",children:({field:x,form:j})=>e.jsx("input",{...x,type:"checkbox",checked:!!x.value,onChange:w=>j.setFieldValue(t.name,w.target.checked)})}):t.type==="number"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(ee,{...x,type:"number",value:x.value??"",placeholder:t.placeholder||t.label,onChange:w=>{const E=w.target.value;j.setFieldValue(t.name,E===""?"":Number(E))}})}):t.type==="email"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(ee,{...x,type:"email",value:x.value??"",placeholder:t.placeholder||t.label,onChange:w=>j.setFieldValue(t.name,w.target.value)})}):t.type==="phone"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(ee,{...x,type:"text",value:x.value??"",placeholder:t.placeholder||t.label,onChange:w=>{const E=d(w);j.setFieldValue(t.name,E)}})}):t.type==="colorPicker"?e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(ee,{...x,className:"w-[100px]",type:"color",value:x.value??"",placeholder:t.placeholder||t.label,onChange:w=>{j.setFieldValue(t.name,w.target.value)}})}):t.name.includes("address")?e.jsx(_,{name:t.name,children:({field:x})=>e.jsx(ee,{...x,ref:l,placeholder:t.placeholder||t.label})}):e.jsx(_,{name:t.name,children:({field:x,form:j})=>e.jsx(ee,{...x,value:x.value??"",placeholder:t.placeholder||t.label,onChange:w=>j.setFieldValue(t.name,w.target.value)})})},t.name)})})},Ct=je().matches(gt.sqlInjectionSafe,"Invalid input: SQL keywords not allowed"),se=r=>r&&(typeof File<"u"&&r instanceof File||typeof Blob<"u"&&r instanceof Blob||typeof r.size=="number"&&typeof r.type=="string"),De=(r,n,o)=>{if(!r)return!0;if(!(typeof o=="number"?r.size<=o*1024*1024:!0))return!1;if(Array.isArray(n)&&n.length>0){const s=r.type||"",i=(r.name||"").toLowerCase();return n.some(p=>{const c=p.toLowerCase();if(c.startsWith("."))return i.endsWith(c);if(c.endsWith("/*")){const m=c.split("/")[0];return s.startsWith(m+"/")}return s===c})}return!0},kt=r=>{const n={};return r.forEach(o=>{const u=o.label||o.name;let s;switch(o.type){case"richtext":case"text":case"password":s=Ct;break;case"number":s=Je();break;case"select":s=ue();break;case"multiselect":s=ue();break;case"email":s=je().matches(/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,}$/,"Invalid email");break;case"phone":s=je().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).nullable();break;case"file":case"file[]":{const i=o.type==="file[]"||!!o.multiple,l=o.accept,p=o.maxSizeMB,c=o.maxFiles,m=ue().test("is-file-like",`${u} must be a file.`,a=>a?Array.isArray(a)||typeof FileList<"u"&&a instanceof FileList?a.length>0?se(a[0]):!0:se(a):!0).test("file-size-and-type",`${u} failed file validation`,a=>{if(!a)return!0;let h=a;return(typeof FileList<"u"&&a instanceof FileList||Array.isArray(a))&&(h=a[0]),De(h,l,p)});i?s=ue().test("is-file-list-or-array",`${u} must be one or more files`,a=>a?typeof FileList<"u"&&a instanceof FileList||Array.isArray(a)?a.length>0:!!se(a):!0).test("files-count-and-each",`${u} failed file(s) validation`,a=>{if(!a)return!0;let h=[];if(typeof FileList<"u"&&a instanceof FileList)h=Array.from(a);else if(Array.isArray(a))h=a;else if(se(a))h=[a];else return!1;if(typeof c=="number"&&h.length>c)return!1;for(const v of h)if(!De(v,l,p))return!1;return!0}):s=m}break}!o.required&&s&&typeof s.nullable=="function"&&(s=s.nullable()),o.required&&(o.type==="multiselect"?s=s.min(1,`${u} is required`).required(`${u} is required`):o.type==="file"||o.type==="file[]"||o.multiple?s=s.test("file-required",`${u} is required`,i=>i?typeof FileList<"u"&&i instanceof FileList||Array.isArray(i)?i.length>0:se(i):!1):s=s.required(`${u} is required`)),n[o.name]=s}),Ze().shape(n)};var Fe={},Ft=Me;Object.defineProperty(Fe,"__esModule",{value:!0});var _e=Fe.default=void 0,Lt=Ft(Ve()),Nt=e;_e=Fe.default=(0,Lt.default)((0,Nt.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description");var Le={},Dt=Me;Object.defineProperty(Le,"__esModule",{value:!0});var we=Le.default=void 0,At=Dt(Ve()),Et=e;we=Le.default=(0,At.default)((0,Et.jsx)("path",{d:"M19 7H9c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2m0 2v2H9V9zm-6 6v-2h2v2zm2 2v2h-2v-2zm-4-2H9v-2h2zm6-2h2v2h-2zm-8 4h2v2H9zm8 2v-2h2v2zM6 17H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2v1h-2V5H5v10h1z"}),"TableView");const zt=({onExport:r})=>{const[n,o]=k.useState(null),[u,s]=k.useState(null),i=c=>{o(c.currentTarget)},l=()=>o(null),p=async c=>{s(c),l();try{await r(c)}finally{s(null)}};return e.jsxs(e.Fragment,{children:[e.jsx(Q,{block:!0,variant:"solid",size:"sm",icon:e.jsx(tt,{}),disabled:u!==null,onClick:i,children:u?"Exporting...":"Export"}),e.jsxs(We,{anchorEl:n,open:!!n,onClose:l,children:[e.jsxs(fe,{disabled:u==="csv",onClick:()=>p("csv"),children:[e.jsx(xe,{children:u==="csv"?e.jsx(ge,{size:20}):e.jsx(_e,{fontSize:"small"})}),e.jsx(ye,{primary:"Export as CSV"})]}),e.jsxs(fe,{disabled:u==="xlsx",onClick:()=>p("xlsx"),children:[e.jsx(xe,{children:u==="xlsx"?e.jsx(ge,{size:20}):e.jsx(we,{fontSize:"small"})}),e.jsx(ye,{primary:"Export as xlsx"})]}),e.jsxs(fe,{disabled:u==="json",onClick:()=>p("json"),children:[e.jsx(xe,{children:u==="json"?e.jsx(ge,{size:20}):e.jsx(we,{fontSize:"small"})}),e.jsx(ye,{primary:"Export as Json"})]})]})]})};var He={exports:{}};(function(r,n){(function(o,u){r.exports=u()})(Ue,function(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},u=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,i=/\d\d/,l=/\d\d?/,p=/\d*[^-_:/,()\s\d]+/,c={},m=function(d){return(d=+d)+(d>68?1900:2e3)},a=function(d){return function(t){this[d]=+t}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(d){(this.zone||(this.zone={})).offset=function(t){if(!t||t==="Z")return 0;var f=t.match(/([+-]|\d\d)/g),g=60*f[1]+(+f[2]||0);return g===0?0:f[0]==="+"?-g:g}(d)}],v=function(d){var t=c[d];return t&&(t.indexOf?t:t.s.concat(t.f))},N=function(d,t){var f,g=c.meridiem;if(g){for(var A=1;A<=24;A+=1)if(d.indexOf(g(A,0,t))>-1){f=A>12;break}}else f=d===(t?"pm":"PM");return f},D={A:[p,function(d){this.afternoon=N(d,!1)}],a:[p,function(d){this.afternoon=N(d,!0)}],Q:[s,function(d){this.month=3*(d-1)+1}],S:[s,function(d){this.milliseconds=100*+d}],SS:[i,function(d){this.milliseconds=10*+d}],SSS:[/\d{3}/,function(d){this.milliseconds=+d}],s:[l,a("seconds")],ss:[l,a("seconds")],m:[l,a("minutes")],mm:[l,a("minutes")],H:[l,a("hours")],h:[l,a("hours")],HH:[l,a("hours")],hh:[l,a("hours")],D:[l,a("day")],DD:[i,a("day")],Do:[p,function(d){var t=c.ordinal,f=d.match(/\d+/);if(this.day=f[0],t)for(var g=1;g<=31;g+=1)t(g).replace(/\[|\]/g,"")===d&&(this.day=g)}],w:[l,a("week")],ww:[i,a("week")],M:[l,a("month")],MM:[i,a("month")],MMM:[p,function(d){var t=v("months"),f=(v("monthsShort")||t.map(function(g){return g.slice(0,3)})).indexOf(d)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[p,function(d){var t=v("months").indexOf(d)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[i,function(d){this.year=m(d)}],YYYY:[/\d{4}/,a("year")],Z:h,ZZ:h};function $(d){var t,f;t=d,f=c&&c.formats;for(var g=(d=t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,O,R){var B=R&&R.toUpperCase();return O||f[R]||o[R]||f[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Y,G,K){return G||K.slice(1)})})).match(u),A=g.length,x=0;x<A;x+=1){var j=g[x],w=D[j],E=w&&w[0],F=w&&w[1];g[x]=F?{regex:E,parser:F}:j.replace(/^\[|\]$/g,"")}return function(I){for(var O={},R=0,B=0;R<A;R+=1){var Y=g[R];if(typeof Y=="string")B+=Y.length;else{var G=Y.regex,K=Y.parser,te=I.slice(B),J=G.exec(te)[0];K.call(O,J),I=I.replace(J,"")}}return function(W){var X=W.afternoon;if(X!==void 0){var H=W.hours;X?H<12&&(W.hours+=12):H===12&&(W.hours=0),delete W.afternoon}}(O),O}}return function(d,t,f){f.p.customParseFormat=!0,d&&d.parseTwoDigitYear&&(m=d.parseTwoDigitYear);var g=t.prototype,A=g.parse;g.parse=function(x){var j=x.date,w=x.utc,E=x.args;this.$u=w;var F=E[1];if(typeof F=="string"){var I=E[2]===!0,O=E[3]===!0,R=I||O,B=E[2];O&&(B=E[2]),c=this.$locale(),!I&&B&&(c=f.Ls[B]),this.$d=function(te,J,W,X){try{if(["x","X"].indexOf(J)>-1)return new Date((J==="X"?1e3:1)*te);var H=$(J)(te),ae=H.year,ie=H.month,de=H.day,oe=H.hours,me=H.minutes,he=H.seconds,y=H.milliseconds,C=H.zone,L=H.week,z=new Date,M=de||(ae||ie?1:z.getDate()),S=ae||z.getFullYear(),V=0;ae&&!ie||(V=ie>0?ie-1:z.getMonth());var T,P=oe||0,U=me||0,Z=he||0,le=y||0;return C?new Date(Date.UTC(S,V,M,P,U,Z,le+60*C.offset*1e3)):W?new Date(Date.UTC(S,V,M,P,U,Z,le)):(T=new Date(S,V,M,P,U,Z,le),L&&(T=X(T).week(L).toDate()),T)}catch{return new Date("")}}(j,F,w,f),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),R&&j!=this.format(F)&&(this.$d=new Date("")),c={}}else if(F instanceof Array)for(var Y=F.length,G=1;G<=Y;G+=1){E[1]=F[G-1];var K=f.apply(this,E);if(K.isValid()){this.$d=K.$d,this.$L=K.$L,this.init();break}G===Y&&(this.$d=new Date(""))}else A.call(this,x)}}})})(He);var Mt=He.exports;const Rt=Ge(Mt);Te.extend(Rt);const q=(r,n)=>e.jsx("div",{"data-cname":r,className:"mobile-cell",children:n}),Ae=(r,n)=>{if(!r)return"—";const o=Te(r);return o.isValid()?o.format(n):"—"},Ee=r=>r?String(r).trim():"",$t=(r,n)=>{const o=(s,i)=>s?((n==null?void 0:n[s])??[]).find(p=>p.value===(i==null?void 0:i.toLowerCase())||""):null,u=(s,i)=>{let l=[];if(Array.isArray(i))l=i;else if(typeof i=="string")try{const c=JSON.parse(i);l=Array.isArray(c)?c:[c]}catch{l=i.replace(/[\[\]\s"]/g,"").split(",").filter(Boolean)}else i!=null&&(l=[i]);l=l.map(c=>String(c).trim().toLowerCase()).filter(Boolean);const p=(n==null?void 0:n[s])??[];return l.map(c=>{var m;return((m=p.find(a=>a.value===c))==null?void 0:m.label)??c}).filter(Boolean).join(", ")};return r.map(s=>{const i={dataField:s.dataField,caption:s.caption,width:s.width,visible:s.visible},l=s.displayName||s.caption||s.dataField,p=s.type,c=s.uiConfig,m=((c==null?void 0:c.Mode)||"").toLowerCase();if(m==="static"&&(c!=null&&c.StaticValues)){const a=c.StaticValues.split(",").map(h=>({id:h.trim(),label:h.trim()}));return p==="dropdown"&&(i.lookup={dataSource:a,valueExpr:"id",displayExpr:"label"},i.calculateCellValue=h=>{var v;return((v=a.find(N=>N.id===h[s.dataField]))==null?void 0:v.label)??h[s.dataField]},i.cellRender=h=>q(l,h.value??"")),p==="multiselect"&&(i.calculateCellValue=h=>{const v=h[s.dataField];return v?(Array.isArray(v)?v:typeof v=="string"?JSON.parse(v):[v]).map(D=>{var $;return(($=a.find(d=>d.id===D))==null?void 0:$.label)??D}).join(", "):""},i.cellRender=h=>q(l,h.value??"")),i}return m==="table"&&(c!=null&&c.DataSource)?(p==="dropdown"&&(i.calculateCellValue=a=>{var h;return((h=o(s.dataField,a[s.dataField]))==null?void 0:h.label)??""},i.cellRender=a=>{var N;const h=o(s.dataField,(N=a==null?void 0:a.data)==null?void 0:N[s.dataField]),v=Ee(h==null?void 0:h.color);return q(l,e.jsx("div",{className:"text-[13px] rounded-full px-3 py-1 w-24",style:{color:v||"#000",backgroundColor:v?`${v}20`:"#FFF"},children:(h==null?void 0:h.label)??""}))}),p==="multiselect"&&(i.calculateCellValue=a=>u(s.dataField,a[s.dataField])??"",i.cellRender=a=>{var h;return q(l,u(s.dataField,(h=a==null?void 0:a.data)==null?void 0:h[s.dataField]))}),i):p==="colorPicker"?(i.cellRender=a=>{const h=Ee(a==null?void 0:a.value);return q(l,e.jsx("div",{className:"text-[13px] rounded-full px-3 py-1 w-24 text-center",style:{color:h,backgroundColor:`${h}20`},children:h||""}))},i):p==="richtext"?(i.cellRender=a=>{const v=((a==null?void 0:a.value)??"").replace(/<[^>]*>/g,"").trim();return q(l,v||"")},i):p==="datepicker"?(i.dataType="date",i.cellRender=a=>q(l,Ae(a==null?void 0:a.value,"MM/DD/YYYY")),i):p==="datetimepicker"?(i.dataType="datetime",i.cellRender=a=>q(l,Ae(a==null?void 0:a.value,"MM/DD/YYYY hh:mm")),i):p==="upload"?(i.cellRender=a=>{var N;let h=(N=a==null?void 0:a.data)==null?void 0:N[s.dataField];if(!h)return q(l,"");try{h=typeof h=="string"?JSON.parse(h):h}catch{return q(l,"Invalid file")}const v=Array.isArray(h)?h:[h];return q(l,e.jsx(e.Fragment,{children:v.map((D,$)=>e.jsx("div",{children:e.jsx("a",{href:D.Url||D.StoragePath,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:D.FileName||`File ${$+1}`})},$))}))},i):(i.cellRender=a=>q(l,String((a==null?void 0:a.value)??"")),i)})},Tt=({tableId:r,row:n,columnName:o,setFileDrawerOpen:u,fetchData:s})=>{const[i,l]=k.useState([]),[p,c]=k.useState(!1),[m,a]=k.useState([]),h=d=>{l(d)},v=d=>{d.success?(s(),re.push(e.jsx(ne,{title:"Success",type:"success",duration:2500,children:(d==null?void 0:d.message)||"Success"}),{placement:"top-center"})):re.push(e.jsx(ne,{title:"Error",type:"danger",duration:2500,children:d.message}),{placement:"top-center"})},N=async()=>{var d,t;try{c(!0),a([]),console.log("fileList",i[0]);const f=await ot(r,n==null?void 0:n.Id,o==null?void 0:o.dataField,i==null?void 0:i[0]);v(f)}catch(f){a([((t=(d=f==null?void 0:f.response)==null?void 0:d.data)==null?void 0:t.message)||"Upload failed"])}finally{c(!1)}},D=async()=>{const d=await lt(r,n==null?void 0:n.Id,o==null?void 0:o.dataField);console.log("res",d)};k.useEffect(()=>{D()},[]);const $=async d=>{const t=await ct(r,d==null?void 0:d.Id,o==null?void 0:o.dataField);v(t)};return e.jsxs(e.Fragment,{children:[e.jsx(Re,{initialValues:{files:[]},validationSchema:{},onSubmit:()=>{},children:()=>e.jsx($e,{children:e.jsx(Ie,{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(ve,{divider:!0,className:"mb-4",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block mb-1 font-medium",children:"Upload File"}),e.jsx(Be,{draggable:!0,multiple:!1,accept:".csv,.xlsx,.xls",fileList:i||[],onChange:d=>h(d),onFileRemove:d=>h(d)}),(m==null?void 0:m.length)>0&&e.jsx("div",{className:"mt-1 text-red-500 text-sm",children:e.jsx("ul",{children:m.map((d,t)=>e.jsx("li",{children:d},t))})}),e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsx(Q,{type:"button",size:"sm",variant:"solid",loading:p,onClick:N,children:"Upload"})})]}),e.jsx(Oe,{className:"flex items-center p-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsx("div",{className:"flex items-center justify-end w-full",children:e.jsx(Q,{size:"sm",disabled:p,onClick:()=>u(!1),children:"Close"})})})]})})})})})}),e.jsxs("div",{className:"mt-3",children:[e.jsx("label",{className:"block mb-1 font-medium",children:"Files"}),e.jsxs(jt,{dataSource:[],keyExpr:"id",showBorders:!0,columnAutoWidth:!0,rowAlternationEnabled:!0,noDataText:"No files uploaded yet",height:300,children:[e.jsx(pe,{dataField:"name",caption:"File Name"}),e.jsx(pe,{dataField:"size",caption:"Size (KB)"}),e.jsx(pe,{dataField:"uploadedAt",caption:"Uploaded On",dataType:"date",format:"dd/MM/yyyy HH:mm"}),e.jsx(pe,{caption:"Actions",width:100,alignment:"center",cellRender:({data:d})=>e.jsx(Q,{size:"xs",variant:"solid",color:"red-600",onClick:()=>$(d),children:"Delete"})})]})]})]})};function It(r){return r.map((n,o)=>{const u=(n.Name||`field_${o}`).trim(),s=(n.DisplayName||u).trim(),i=u.toLowerCase(),l=(n.ColumnType||"").toLowerCase(),p=(n.Format||"").toLowerCase(),c=n.ColumnType==="multiselect";let m="text";l==="boolean"?m="checkbox":l==="number"||l==="integer"||l==="float"||l==="double"?m="number":l==="multiselect"?m="multiselect":l==="dropdown"?m="select":l==="upload"?m="file":l==="richtext"?m="richtext":l==="textarea"?m="textarea":l==="datepicker"?m="datepicker":l==="datetimepicker"?m="datetimepicker":l==="email"?m="email":l==="phone"?m="phone":p==="date"||i.includes("date")?m="date":p==="time"||i.includes("time")?m="time":l==="colorpicker"&&(m="colorPicker");let a=(n.Enum||[]).map(D=>({label:D,value:D})),h;const v=n.UiConfig;if(v&&v.Mode){const D=(v.Mode||"").toString().toLowerCase();if(D==="static"){const $=(v.StaticValues||"").toString();$.trim()&&(a=$.split(",").map(d=>d.trim()).filter(Boolean).map(d=>({label:d,value:d}))),a.length&&m!=="multiselect"&&(m="select")}else if(D==="table"){const $=(v.DataSource||"").toString(),d=(v.Labels||"").toString()||(v.LabelField||"").toString()||"";$&&(h={tableId:$,labelField:d},c?m="multiselect":m="select")}}a.length&&((n.ColumnType||"").toLowerCase()==="multiselect"?m="multiselect":(n.ColumnType||"").toLowerCase()==="dropdown"&&(m="select"));const N={id:`f${o+1}`,name:u,label:s,type:m,required:!!n.Required,maxLength:n.MaxLength||void 0,options:a.length?a:void 0,multiple:c||void 0,accept:n.Accept||void 0,placeholder:void 0,dataSource:h};return Object.keys(N).forEach(D=>{N[D]===void 0&&delete N[D]}),N})}const b={ink:"#1B1B1B",orange:"var(--custom-600)",muted:"#646464",line:"#E9E9E9",soft:"#F6F4F1",cream:"#FBF2EA",green:"#16A34A"};function Pt(r){try{const n=JSON.parse(r.layoutData||"{}");return{kind:n.kind||"page",title:r.layoutName,desc:n.desc||r.description||"",nav:n.nav||{},icon:n.icon||"fileText",refresh:n.refresh||"5m",audience:n.audience||"team",slots:n.slots||[],isDraft:n.isDraft===!0}}catch{return{kind:"page",title:r.layoutName,desc:r.description||"",nav:{},icon:"fileText",refresh:"5m",audience:"team",slots:[],isDraft:!1}}}const Ce={datatable:"Data Table",kpi:"KPI Stats",graph:"Graph",tabs:"Tabs",map:"Map",calendar:"Calendar",chat:"Chat",report:"Report",files:"File Explorer",datagrid:"Data Grid",alert:"Alert",donut:"Donut Chart",activity:"Activity Feed",leaderboard:"Leaderboard"},Ot=({source:r,col:n,label:o,filters:u})=>{const{total:s,loading:i}=ce(r||void 0,u??null,{pageSize:1});return e.jsxs("div",{style:{background:b.cream,borderRadius:10,padding:14},children:[e.jsx("div",{className:"uppercase",style:{fontSize:12,fontWeight:700,letterSpacing:"0.06em",color:b.muted},children:o||n||"Metric"}),e.jsx("div",{style:{fontSize:26,fontWeight:900,color:b.ink,lineHeight:1,marginTop:6},children:i?e.jsx("span",{style:{fontSize:14,color:"#999"},children:"…"}):s!==null?s.toLocaleString():"—"}),e.jsxs("div",{className:"flex items-center",style:{gap:6,marginTop:8},children:[e.jsx("span",{style:{background:"#E8F7EE",color:"#16A34A",fontSize:11,fontWeight:700,padding:"2px 6px",borderRadius:999},children:"↑ 12.4%"}),e.jsx("span",{style:{fontSize:12,color:b.muted},children:"vs last month"})]})]})},qe=({config:r})=>{const n=r.source,o=r.columns,u=r.filters,{rows:s,loading:i}=ce(n,u??null,{columns:o!=null&&o.length?o:void 0,pageSize:50}),l=k.useMemo(()=>s.length===0?[]:(o!=null&&o.length?o:Object.keys(s[0]).filter(c=>!["$id","id","Id"].includes(c)).slice(0,10)).map(c=>({dataField:c,caption:c,width:150})),[s,o]);return n?e.jsx(Pe,{tableName:r.title||"Table",dataSource:s,height:"350px",columns:l,keyExpr:"$id",stateStorageKey:`pb-tbl-${n}`,isLoading:i}):e.jsx("div",{className:"text-center",style:{padding:"20px",color:b.muted,fontSize:14},children:"No data source configured"})},Bt=({config:r})=>{const n=r.source,o=r.xAxis,u=r.yAxis,s=r.chart||"bar",i=r.filters,{rows:l,loading:p}=ce(n,i??null,{pageSize:500});if(!n||!o||!u)return e.jsx("div",{className:"text-center",style:{padding:"20px",color:b.muted,fontSize:14},children:"Configure data source and chart axes in the builder"});if(p)return e.jsx(ke,{sx:{"& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}});const c=s==="area"?"area":s==="line"?"line":"bar";return e.jsx(Qe,{options:{chart:{type:c,height:240,toolbar:{show:!1}},xaxis:{categories:l.map(m=>m[o])},yaxis:{title:{text:u}},colors:["var(--custom-600)"],dataLabels:{enabled:!1},...c==="bar"?{plotOptions:{bar:{borderRadius:4,columnWidth:"55%"}}}:{},...c!=="bar"?{stroke:{curve:"smooth",width:2}}:{}},series:[{name:r.title||u,data:l.map(m=>Number(m[u])||0)}],type:c,height:240})},Vt=({config:r})=>{const n=r.kpiCards||[];return n.length===0?e.jsx("div",{className:"text-center",style:{padding:"20px",color:b.muted,fontSize:14},children:"No KPI cards configured"}):e.jsx("div",{className:"grid",style:{gridTemplateColumns:`repeat(${Math.min(n.length,4)}, 1fr)`,gap:12},children:n.map((o,u)=>e.jsx(Ot,{source:o.source,col:o.col,label:o.label,filters:o.filters},u))})},ze=({name:r,size:n=16})=>{const o={file:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),e.jsx("path",{d:"M14 2v6h6"})]}),folder:e.jsx("path",{d:"M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2z"})};return e.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:o[r]??null})},Yt=({config:r})=>{const n=r.source,o=r.latCol,u=r.lngCol,s=r.filters,{rows:i,loading:l}=ce(n,s??null,{pageSize:500});if(!o||!u)return e.jsx("div",{className:"flex items-center justify-center",style:{height:200,background:"linear-gradient(135deg,#E8EEF3 0%,#D4DEE8 100%)",borderRadius:8},children:e.jsx("div",{className:"text-center",style:{fontSize:13,color:b.muted,padding:"0 16px"},children:"Select a data source and latitude / longitude columns to visualise points."})});if(l)return e.jsx("div",{className:"flex items-center justify-center",style:{height:200,background:"linear-gradient(135deg,#E8EEF3 0%,#D4DEE8 100%)",borderRadius:8},children:e.jsx("div",{style:{fontSize:13,color:b.muted},children:"Loading map data…"})});const p=i.map(g=>({lat:parseFloat(g[o]),lng:parseFloat(g[u])})).filter(g=>!isNaN(g.lat)&&!isNaN(g.lng)),c=p.map(g=>g.lat),m=p.map(g=>g.lng),a=p.length?Math.min(...c):0,h=p.length?Math.max(...c):1,v=p.length?Math.min(...m):0,N=p.length?Math.max(...m):1,D=h-a||1,$=N-v||1,d=24,t=600-d*2,f=200-d*2;return e.jsxs("div",{className:"relative overflow-hidden",style:{height:200,background:"linear-gradient(135deg,#E8EEF3 0%,#D4DEE8 100%)",borderRadius:8},children:[e.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 600 200",preserveAspectRatio:"none",children:[e.jsx("path",{d:"M0,140 Q120,100 200,120 T400,90 T600,110 L600,200 L0,200 Z",fill:"rgba(46,122,194,0.12)"}),p.map((g,A)=>{const x=d+(g.lng-v)/$*t,j=d+(h-g.lat)/D*f;return e.jsxs("g",{children:[e.jsx("circle",{cx:x,cy:j,r:"12",fill:"var(--custom-600)",opacity:"0.2"}),e.jsx("circle",{cx:x,cy:j,r:"5",fill:"var(--custom-600)"})]},A)}),p.length===0&&e.jsx("text",{x:"300",y:"108",textAnchor:"middle",fontSize:"13",fill:b.muted,children:"No rows matched for selected columns"})]}),e.jsxs("div",{className:"absolute",style:{top:10,right:10,background:"#fff",padding:"5px 10px",borderRadius:999,fontSize:13,fontWeight:700,boxShadow:"0 1px 3px rgba(0,0,0,0.06)"},children:[r.layer||"Points"," · ",p.length]})]})},_t=({config:r})=>{const n=r.tabDefs||[],[o,u]=k.useState(0),s=Math.min(o,Math.max(0,n.length-1)),i=n[s];return n.length===0?e.jsxs("div",{children:[e.jsx("div",{className:"flex",style:{borderBottom:`1px solid ${b.line}`,marginBottom:12},children:["Overview","Activity","Settings"].map((l,p)=>e.jsx("button",{className:"cursor-default",style:{border:0,background:"transparent",padding:"10px 14px",fontWeight:700,fontSize:14,color:p===0?b.orange:b.muted,borderBottom:p===0?`2px solid ${b.orange}`:"2px solid transparent"},children:l},l))}),e.jsx("div",{style:{fontSize:13,color:b.muted},children:"Configure each tab with a data source to show live data."})]}):e.jsxs("div",{children:[e.jsx("div",{className:"flex flex-wrap",style:{borderBottom:`1px solid ${b.line}`,marginBottom:12},children:n.map((l,p)=>e.jsx("button",{onClick:()=>u(p),className:"cursor-pointer whitespace-nowrap",style:{border:0,background:"transparent",padding:"10px 14px",fontWeight:700,fontSize:14,color:p===s?b.orange:b.muted,borderBottom:p===s?`2px solid ${b.orange}`:"2px solid transparent"},children:l.label||`Tab ${p+1}`},p))}),i&&(i.source?e.jsx(qe,{config:{source:i.source,columns:i.columns,title:i.label}}):e.jsx("div",{className:"text-center",style:{padding:"20px 0",color:b.muted,fontSize:13},children:"No data source configured for this tab."}))]})},Ht=({config:r})=>{const n=r.source,o=r.nameCol,u=r.infoCol,s=r.dateCol,i=r.filters,{rows:l,loading:p}=ce(n,i??null,{pageSize:50});if(p)return e.jsx("div",{className:"overflow-hidden",style:{border:`1px solid ${b.line}`,borderRadius:8},children:[1,2,3,4].map(m=>e.jsxs("div",{className:"flex items-center",style:{gap:10,padding:"10px 14px",borderBottom:`1px solid ${b.line}`},children:[e.jsx("div",{className:"shrink-0 opacity-50",style:{width:16,height:16,borderRadius:3,background:b.line}}),e.jsx("div",{className:"flex-1 opacity-40",style:{height:13,borderRadius:3,background:b.line}}),e.jsx("div",{className:"opacity-30",style:{width:70,height:11,borderRadius:3,background:b.line}})]},m))});if(!n)return e.jsx("div",{className:"overflow-hidden",style:{border:`1px solid ${b.line}`,borderRadius:8},children:[["Driver-handbook-v9.pdf","2.4 MB","6d"],["Safety-stand-down-Q1.docx","380 KB","2w"],["Permits-2026.zip","12 files","2d"]].map((m,a,h)=>e.jsxs("div",{className:"grid items-center",style:{gridTemplateColumns:"24px 1fr 100px 60px",gap:10,padding:"10px 14px",borderBottom:a<h.length-1?`1px solid ${b.line}`:"none",fontSize:13},children:[e.jsx(ze,{name:"file",size:16}),e.jsx("span",{style:{fontWeight:700,color:b.ink},children:m[0]}),e.jsx("span",{style:{color:b.muted,fontSize:12},children:m[1]}),e.jsx("span",{style:{color:b.muted,fontSize:12},children:m[2]})]},a))});if(l.length===0)return e.jsx("div",{className:"text-center",style:{border:`1px solid ${b.line}`,borderRadius:8,padding:"28px 16px",color:b.muted,fontSize:13},children:"No items found in this data source."});const c=o||(Object.keys(l[0]).find(m=>!["$id","id","Id"].includes(m))??"");return e.jsx("div",{className:"overflow-hidden",style:{border:`1px solid ${b.line}`,borderRadius:8},children:l.map((m,a)=>e.jsxs("div",{className:"grid items-center",style:{gridTemplateColumns:"24px 1fr 100px 60px",gap:10,padding:"10px 14px",borderBottom:a<l.length-1?`1px solid ${b.line}`:"none",fontSize:13},children:[e.jsx(ze,{name:"file",size:16}),e.jsx("span",{className:"overflow-hidden whitespace-nowrap",style:{fontWeight:700,color:b.ink,textOverflow:"ellipsis"},children:String(m[o||c]??"—")}),e.jsx("span",{style:{color:b.muted,fontSize:12},children:u?String(m[u]??"—"):"—"}),e.jsx("span",{style:{color:b.muted,fontSize:12},children:s?String(m[s]??"—"):"—"})]},a))})},qt=({config:r})=>{const n=r.channel||"";return e.jsxs("div",{className:"flex flex-col",style:{border:`1px solid ${b.line}`,borderRadius:8,padding:16,gap:10,minHeight:120},children:[n&&e.jsxs("div",{className:"uppercase",style:{fontSize:12,fontWeight:700,color:b.muted,letterSpacing:"0.06em"},children:["# ",n]}),e.jsx("div",{className:"flex flex-col",style:{gap:8},children:[{user:"System",msg:"Channel connected."},{user:"Operator",msg:"Ready for updates."}].map((o,u)=>e.jsxs("div",{className:"flex items-start",style:{gap:8},children:[e.jsx("div",{className:"rounded-full flex items-center justify-center shrink-0",style:{width:28,height:28,background:b.soft,fontSize:11,fontWeight:700,color:b.muted},children:o.user[0]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:12,fontWeight:700,color:b.ink},children:o.user}),e.jsx("div",{style:{fontSize:13,color:b.muted},children:o.msg})]})]},u))}),e.jsx("div",{className:"text-center",style:{fontSize:11,color:"#ccc",marginTop:4},children:"Live messages load at runtime"})]})},Wt=({slot:r})=>{if(!r.configured)return e.jsxs("div",{className:"text-center",style:{padding:"20px",color:b.muted,fontSize:14},children:[Ce[r.type]||r.type," — not yet configured"]});switch(r.type){case"datatable":return e.jsx(qe,{config:r.config});case"kpi":return e.jsx(Vt,{config:r.config});case"graph":return e.jsx(Bt,{config:r.config});case"map":return e.jsx(Yt,{config:r.config});case"tabs":return e.jsx(_t,{config:r.config});case"files":return e.jsx(Ht,{config:r.config});case"chat":return e.jsx(qt,{config:r.config});default:return e.jsx("div",{className:"text-center",style:{padding:"20px",color:b.muted,fontSize:14},children:Ce[r.type]||r.type})}},Ut=({menuData:r})=>{const n=Ke(),o=r.layoutId,{name:u}=r,[s,i]=k.useState(null),[l,p]=k.useState(!1);return k.useEffect(()=>{p(!0),bt(o).then(c=>{const m=(c==null?void 0:c.data)??c;i(Pt(m))}).catch(console.error).finally(()=>p(!1))},[o]),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(Ye,{items:[{label:u}]}),e.jsx("div",{className:"lg:flex items-center justify-between",children:e.jsx("div",{className:"flex items-center gap-3 mb-4 lg:mb-0",children:e.jsx("h3",{children:(s==null?void 0:s.title)||u})})}),(s==null?void 0:s.desc)&&e.jsx("p",{style:{fontSize:14,color:b.muted,margin:"4px 0 0"},children:s.desc})]}),l&&e.jsx(ke,{sx:{backgroundColor:"rgba(0,0,0,0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),s&&e.jsx("div",{style:{padding:24,background:"#FAFAFA",minHeight:"calc(100vh - 200px)"},children:s.slots.length===0?e.jsxs("div",{className:"text-center",style:{border:`2px dashed ${b.line}`,borderRadius:16,padding:"48px 24px",background:"#fff",maxWidth:520,margin:"0 auto"},children:[e.jsx("h3",{style:{fontSize:18,fontWeight:700,color:b.ink,margin:"0 0 8px"},children:s.kind==="page"?"This page is empty":"This dashboard is empty"}),e.jsx("p",{style:{fontSize:14,color:b.muted,margin:"0 0 20px"},children:"Open the builder to add components and configure this page."}),e.jsx(Q,{variant:"solid",size:"sm",onClick:()=>n(`/build/page-builder/${o}`),children:"Open in Builder"})]}):e.jsx("div",{className:"grid",style:{gridTemplateColumns:"repeat(12, 1fr)",gap:16},children:s.slots.map(c=>{const m=c.span||(s.kind==="page"?12:6);return Ce[c.type]||c.type,c.config.showHeader,e.jsx("div",{className:"overflow-hidden",style:{gridColumn:`span ${m}`,background:"#fff",border:`1px solid ${b.line}`,borderRadius:12,boxShadow:"0 1px 4px rgba(0,0,0,0.05)"},children:e.jsx("div",{style:{padding:c.type==="datatable"?0:16},children:e.jsx(Wt,{slot:c})})},c.id)})})})]})},Gt=({menuData:r})=>{const{name:n,keyExpr:o,dynamicTableId:u,height:s="calc(100vh - 200px)"}=r,i=yt(n),[l,p]=k.useState([]),[c,m]=k.useState([]),[a,h]=k.useState(!1),[v,N]=k.useState(!1),[D,$]=k.useState("Add"),[d,t]=k.useState(null),[f,g]=k.useState([]),[A,x]=k.useState(!1),[j,w]=k.useState(!1),E=k.useRef(null),F=async y=>{var M;const C=await mt(y),L=((M=JSON.parse(C.data.schemaDefinition||"{}"))==null?void 0:M.Columns)||[],z=L.filter(S=>S.Name!=="Id").map(S=>({dataField:S.Name,caption:S.DisplayName,width:150,visible:!0,type:S.ColumnType,uiConfig:S.UiConfig}));return g(It(L.filter(S=>S.Name!=="Id"))),m(z),L},I=async y=>{var L,z;const C=await Se(y,{});p(((z=(L=C==null?void 0:C.data)==null?void 0:L.data)==null?void 0:z.$values)||[])},O=async()=>{h(!0);try{await Promise.all([F(u),I(u)])}catch(y){console.error("Failed to fetch schema or table data",y),h(!1)}finally{h(!1)}};k.useEffect(()=>{O()},[n]);const R=f.reduce((y,C)=>(y[C.name]="",y),{}),B=y=>{y.success?(O(),re.push(e.jsx(ne,{title:"Success",type:"success",duration:2500,children:(y==null?void 0:y.message)||"Success"}),{placement:"top-center"})):re.push(e.jsx(ne,{title:"Error",type:"danger",duration:2500,children:y.message}),{placement:"top-center"})},Y=async(y,C)=>{var L,z,M;try{let S;D==="Add"?S=await ut(u,{data:y}):D==="Edit"&&(d!=null&&d.Id)&&(S=await pt(u,d.Id,{data:y})),S&&(B(S),S.success&&N(!1),C(!1))}catch(S){console.error("Submit failed",S),C(!1),re.push(e.jsx(ne,{title:"Error",type:"danger",duration:2500,children:((M=(z=(L=S==null?void 0:S.response)==null?void 0:L.data)==null?void 0:z.data)==null?void 0:M.message)||(S==null?void 0:S.message)||"Submission failed"}),{placement:"top-center"})}},G=c==null?void 0:c.some(y=>y.type==="upload"),K={edit:i.isEdit,delete:i.isDelete,view:!1,fileImport:i.isEdit&&G},te=(y,C)=>{C===be.edit&&($("Edit"),t(y),N(!0)),C===be.delete&&(t(y),x(!0)),C===be.fileImport&&(t(y),w(!0))},J=()=>new Date().toISOString().replace(/[:.]/g,"-"),[W,X]=k.useState({}),[H,ae]=k.useState({}),[ie,de]=k.useState({}),oe=k.useMemo(()=>f.map(y=>({name:y.name,ds:y.dataSource})).filter(y=>y.ds&&y.ds.tableId),[f]);async function me(y,C,L){var V,T;const z=await Se(y,{signal:L}),M=((T=(V=z==null?void 0:z.data)==null?void 0:V.data)==null?void 0:T.$values)||[],S=typeof C=="string"?C.split(",").map(P=>P.trim()).filter(Boolean):C;return M.map(P=>{const U=P.Id,Z=S!=null&&S.length?S.map(le=>P[le]).filter(Boolean).join(" - "):String(U);return{value:String(U),label:String(Z)}})}k.useEffect(()=>{let y=!0;const C={};return oe.forEach(({name:L,ds:z})=>{const M=z==null?void 0:z.tableId,S=z==null?void 0:z.labelField;if(!M||W[L])return;const V=new AbortController;C[L]=V,ae(T=>({...T,[L]:!0})),de(T=>({...T,[L]:null})),me(M,S,V.signal).then(T=>{console.log("opts",T),y&&X(P=>({...P,[L]:T}))}).catch(T=>{y&&T.name!=="AbortError"&&(de(P=>({...P,[L]:T.message||"Failed to load options"})),X(P=>({...P,[L]:null})))}).finally(()=>{y&&ae(T=>({...T,[L]:!1}))})}),()=>{y=!1,Object.values(C).forEach(L=>L.abort())}},[oe.map(y=>y.name).join(","),JSON.stringify(oe)]);const he=k.useMemo(()=>$t(c,W),[c,W]);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(Ye,{items:[{label:n}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:n}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center gap-2",children:[e.jsx(Q,{block:!0,variant:"solid",size:"sm",icon:e.jsx(at,{}),onClick:()=>{$("Add"),t(null),N(!0)},children:"Add New"}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(zt,{onExport:async y=>{const C=await dt(u,y);if(y==="json"){const L=C.data??C,z=new Blob([JSON.stringify(L,null,2)],{type:"application/json"}),M=window.URL.createObjectURL(z),S=document.createElement("a");S.href=M,S.setAttribute("download",`${n}_${J()}_export.json`),document.body.appendChild(S),S.click(),S.remove()}else{const L=C.blob?await C.blob():new Blob([C.data],{type:C.type}),z=window.URL.createObjectURL(L),M=document.createElement("a");M.href=z,M.setAttribute("download",`${n}_${J()}_export.${y==="csv"?"csv":"xlsx"}`),document.body.appendChild(M),M.click(),M.remove()}}})})]})]})]}),a&&e.jsx(ke,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsx(ve,{className:"m-6 h-full py-4 px-6 bg-transparent",children:e.jsx("div",{className:"responsive-table",children:e.jsx(Pe,{tableName:n,dataSource:l,height:s,columns:c.length>0?[{dataField:"Action",caption:"Action",width:130,allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:y=>e.jsx("div",{id:"mAction","data-cname":"Actions",children:e.jsx(rt,{row:y.data,actions:K,buttonClick:te})})},...he]:[],keyExpr:"$id",stateStorageKey:n.toLowerCase(),isLoading:a})})}),e.jsx(Ne,{title:D,isOpen:v,portalClassName:"w30",onClose:()=>N(!1),children:e.jsx(Re,{initialValues:d||R,validationSchema:kt(f),onSubmit:(y,{setSubmitting:C})=>{Y(y,C)},children:({setFieldValue:y,errors:C,touched:L,values:z,isSubmitting:M})=>(k.useEffect(()=>{const S=()=>{if(window.google&&window.google.maps){const V=new window.google.maps.places.Autocomplete(E.current,{types:["address"],componentRestrictions:{country:"us"}});V.addListener("place_changed",()=>{const T=V.getPlace(),P={};T.address_components.forEach(U=>{const Z=U.types;Z.includes("locality")?P.city=U.long_name:Z.includes("administrative_area_level_1")?P.state=U.short_name:Z.includes("postal_code")&&(P.zipcode=U.long_name)}),y("address",T.name),y("city",P.city||""),y("state",P.state||""),y("zip",P.zipcode||"")})}};if(window.google&&window.google.maps)S();else{const V=setInterval(()=>{window.google&&window.google.maps&&(S(),clearInterval(V))},500)}},[]),e.jsx($e,{children:e.jsx(Ie,{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(ve,{divider:!0,className:"mb-4",children:[e.jsx(wt,{schema:f,errors:C,touched:L,values:z,drawerType:D,addressRef:E}),e.jsx(Oe,{className:"flex items-center p-4",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:M,onClick:()=>N(!1),children:"Discard"}),e.jsx(Q,{size:"sm",variant:"solid",type:"submit",loading:M,children:D==="Edit"?"Save":D})]})})]})})})})}))})}),e.jsx(vt,{tableId:u,rowId:(d==null?void 0:d.Id)||"",isOpen:A,fetchData:O,onDialogClose:()=>x(!1)}),e.jsx(Ne,{title:"Manage File",isOpen:j,portalClassName:"w50",onClose:()=>w(!1),children:e.jsx(Tt,{setFileDrawerOpen:w,fetchData:O,tableId:u,row:d,columnName:c==null?void 0:c.find(y=>y.type==="upload")})})]})},Ta=({menuData:r})=>r.layoutId?e.jsx(Ut,{menuData:r}):e.jsx(Gt,{menuData:r});export{Ta as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./vendor-mui-98daa63f.js";import{u as m,r as c}from"./vendor-react-ece1c85f.js";import"./index-3b5ce20a.js";import{A as d}from"./AdaptableCard-3d1e1f96.js";import{P as n}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";const f=h=>{var r;const{state:e}=m(),i=e==null?void 0:e.leadData;e!=null&&e.leadMeetings;const[p,l]=c.useState(0);return c.useEffect(()=>{i&&l(i.leadStatusId===1||i.leadStatusId===6?0:i.leadStatusId===5?1:2)},[i]),s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[s.jsx(n,{items:[{label:"Build"},{label:"Grid Map"},{label:"Map Detail"}]}),s.jsx("div",{className:"lg:flex items-center justify-between",children:s.jsx("h3",{className:"mb-4 lg:mb-0",children:"Map Detail"})})]}),s.jsx(d,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:s.jsxs(d,{className:"py-4 px-6",children:[s.jsx("h3",{className:"mt-2 mtb-2 lg:mb-0",children:"Details"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Owner"}),s.jsx("h6",{children:i==null?void 0:i.leadName})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Source"}),s.jsx("h6",{children:i==null?void 0:i.leadSource})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Company"}),s.jsx("h6",{children:i==null?void 0:i.accountName})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Website"}),s.jsx("h6",{children:i==null?void 0:i.website})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Designation"}),s.jsx("h6",{children:(r=i==null?void 0:i.contactPosistion)==null?void 0:r.positionName})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Email"}),s.jsx("h6",{children:i==null?void 0:i.contactEmail})]})]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Phone"}),s.jsx("h6",{children:i==null?void 0:i.contactNumber})]})}),s.jsx("hr",{}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Address"}),s.jsxs("h6",{children:[i==null?void 0:i.address,", ",i==null?void 0:i.state,", ",i==null?void 0:i.city,", ",i==null?void 0:i.zip]})]})}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Industry"}),s.jsx("h6",{children:i==null?void 0:i.industry})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"No Of Employees"}),s.jsx("h6",{children:i==null?void 0:i.noOfEmployees})]})]}),s.jsx("hr",{}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsx("div",{className:"mb-3",children:s.jsx("h6",{children:"Business Card"})})})]})})]})};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{L as M}from"./Logo-dd6f7656.js";import{c as o,g as l,h as u,i as k}from"./index-3b5ce20a.js";import{M as x,D as c}from"./index-a14e51de.js";import{L as I}from"./vendor-react-ece1c85f.js";import{V as p,n as L}from"./ClassicLayout-a9866742.js";import{u as N}from"./vendor-i18n-b89304ef.js";function $(i){const t=i.replace("#","");if(t.length!==6)return 0;const n=parseInt(t.slice(0,2),16),s=parseInt(t.slice(2,4),16),a=parseInt(t.slice(4,6),16);return(.299*n+.587*s+.114*a)/255}const P=()=>{const i=o(r=>r.theme.mode),t=o(r=>r.theme.navMode),n=o(r=>r.theme.themeSecondaryColours),s=n==null?void 0:n["600"],a=s?$(s)<.5?"dark":"light":t==="dark"?"dark":i;return e.jsx(M,{mode:a,logoWidth:"150px",className:"hidden md:block"})},f=({path:i,children:t,isExternalLink:n,className:s})=>e.jsx(I,{className:l("h-full w-full flex items-center gap-2",s),to:i,target:n?"_blank":"",children:t}),h=({nav:i,isLink:t,manuVariant:n})=>{const{menuName:s,translateKey:a,icon:r,routeLink:m,isExternalLink:g}=i;return e.jsx(e.Fragment,{children:m&&t?e.jsx(f,{path:m,isExternalLink:g,children:e.jsx(x,{variant:n,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(p,{icon:r||s,isDefaultIcon:!r}),s]})})}):e.jsxs(x,{variant:n,children:[e.jsx(p,{icon:r||s,isDefaultIcon:!r}),e.jsx("span",{children:s})]})})},d=({icon:i})=>{if(!i)return e.jsx(u,{className:"text-base opacity-50"});const t=k[i];if(t)return e.jsx(t,{className:"text-base opacity-60 shrink-0"});const n=L[i];return n?e.jsx("span",{className:"text-base opacity-60 shrink-0",children:n}):e.jsx(u,{className:"text-base opacity-50 shrink-0"})},j=({nav:i})=>{const{menuName:t,routeLink:n,$id:s,icon:a,isExternalLink:r}=i;return e.jsx(c.Item,{eventKey:s,className:l(n&&"px-0"),children:n?e.jsxs(f,{path:n,className:l(n&&"px-2"),isExternalLink:r,children:[e.jsx(d,{icon:a}),e.jsx("span",{children:t})]}):e.jsxs("span",{className:"flex items-center gap-2 px-2",children:[e.jsx(d,{icon:a}),e.jsx("span",{children:t})]})})},V=({manuVariant:i,userAuthority:t=[],menus:n=[]})=>(N(),e.jsx("span",{className:"flex items-center",children:n.map(s=>s.isView?s.childMenus.$values.length>0?e.jsx(c,{trigger:"hover",renderTitle:e.jsx(h,{manuVariant:i,nav:s},s.$id),children:s.childMenus.$values.map(a=>a.isView?e.jsx(e.Fragment,{children:a.childMenus.$values.length>0?e.jsx(c.Menu,{title:a.menuName,children:a.childMenus.$values.map(r=>r.isView?e.jsx(j,{nav:r}):null)}):e.jsx(j,{nav:a},a.$id)}):null)},s.$id):s.childMenus.$values.length===0?e.jsx(h,{isLink:!0,nav:s,manuVariant:i}):null:null)}));export{V as H,P as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./vendor-mui-
|
|
1
|
+
import{j as n}from"./vendor-mui-98daa63f.js";import{r as x,L as _}from"./vendor-react-ece1c85f.js";import{P as O}from"./papaparse.min-f30b4da6.js";import{E as D}from"./vendor-excel-3b3553df.js";import"./Alert-59d09a99.js";import{B as N,cW as J,E as R,F as U}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{U as Y}from"./Upload-be937eb6.js";import{S as Z}from"./StickyFooter-3e569b80.js";const L=1,q=["text/csv","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel"],G=m=>{var f;const g=m.split(".");return g.length>1?(f=g.pop())==null?void 0:f.toLowerCase():""},me=({requiredHeaders:m,apiUrl:g,allowedHeaders:f,onDiscard:w,importType:T,templateFile:P,fetchData:$})=>{const[b,E]=x.useState([]),[K,j]=x.useState([]),[v,a]=x.useState([]),[A,i]=x.useState(!1),[k,S]=x.useState(!1),W=()=>{j([]),a([]),i(!1)},I=e=>{e.success?(R.push(n.jsx(U,{title:"Success",type:"success",duration:2500,children:(e==null?void 0:e.message)||"Success"}),{placement:"top-center"}),i(!1),j([]),E([]),w(),$()):R.push(n.jsx(U,{title:"Error",type:"danger",duration:2500,children:e.message||"Import Failed"}),{placement:"top-center"})},C=(e,t)=>{const s=[],o=e.map(l=>l.trim()),r=f&&f.length>0?f:m,d=m.filter(l=>!o.includes(l)),h=o.filter(l=>!r.includes(l));d.length>0&&(d.length===m.length?s.push("The uploaded file does not match the expected template. None of the required columns were found."):s.push(`Missing required columns: ${d.join(", ")}`)),h.length>0&&s.push(`These columns are not allowed and will be ignored: ${h.join(", ")}`),(d.length>0||h.length>0)&&(s.push(`Required columns: ${m.join(", ")}`),s.push(`Allowed columns: ${r.join(", ")}`));const u=o.filter(l=>r.includes(l));u.length===0&&s.push("No valid columns found. The file does not match the expected template.");const y=t.map(l=>{const p={};return u.forEach(c=>{p[c]=l[c]}),p});if(y.forEach((l,p)=>{m.forEach(c=>{(!l[c]||String(l[c]).trim()==="")&&s.push(`Row ${p+2}: "${c}" cannot be empty`)})}),s.length>0){a(s),i(!1);return}j(y),i(!0),a([])},V=e=>{O.parse(e,{header:!0,skipEmptyLines:!0,transformHeader:t=>t.trim(),complete:t=>{const s=t.data,o=t.meta.fields||[];if(!o||o.length===0){a(["No header row found in the CSV file."]),i(!1);return}C(o,s)},error:t=>{a([t.message]),i(!1)}})},z=async e=>{try{const t=await e.arrayBuffer(),s=new D.Workbook;await s.xlsx.load(t);const o=s.worksheets[0];if(!o){a(["No sheets found in the Excel file."]),i(!1);return}const r=[];if(o.eachRow({includeEmpty:!1},l=>{const p=l.values.slice(1).map(c=>c==null?"":String(c));r.push(p)}),r.length===0){a(["The Excel sheet is empty."]),i(!1);return}const[d,...h]=r;if(!d||d.length===0){a(["No header row found in the Excel file."]),i(!1);return}const u=d.map(l=>String(l).trim()),y=h.map(l=>{const p={};return u.forEach((c,X)=>{p[c]=l[X]??""}),p});C(u,y)}catch(t){a([(t==null?void 0:t.message)||"Failed to parse Excel file. Please check the format."]),i(!1)}},F=e=>{if(E(e),W(),!e||e.length===0)return;const t=e[0];if(!t)return;const s=t.name.toLowerCase(),o=s.endsWith(".csv"),r=s.endsWith(".xlsx"),d=s.endsWith(".xls");if(!o&&!r&&!d){a(["Unsupported file type. Please upload a CSV or Excel file (.csv, .xlsx, .xls)."]),i(!1);return}o?V(t):z(t)},B=async()=>{var e,t,s;try{S(!0),a([]);const o=await g(b,T,G((e=b[0])==null?void 0:e.name));I(o)}catch(o){a([((s=(t=o==null?void 0:o.response)==null?void 0:t.data)==null?void 0:s.message)||"Upload failed"])}finally{S(!1)}},M=(e,t)=>{let s=!0;const o=1e7;if(t.length>=L)return`You can only upload ${L} file(s)`;if(e)for(const r of e)q.includes(r.type)?r.size>=o&&(s="Upload file cannot be more than 10MB!"):s="Only csv, xlsx, xls files are allowed!";return s};return n.jsxs("div",{children:[n.jsx(Y,{draggable:!0,accept:".csv,.xlsx,.xls",cropNeeded:!1,fileList:b,beforeUpload:M,onChange:e=>F(e),onFileRemove:e=>F(e)}),n.jsx(_,{download:!0,className:"block lg:inline-block md:mx-2 md:mb-0 mb-4 text-blue-600",to:P,rel:"noopener noreferrer",target:"_blank",children:"Download Template"}),v.length>0&&n.jsxs("div",{style:{color:"red",marginTop:10},children:[n.jsx("b",{children:"Validation Errors:"}),n.jsx("ul",{children:v.map((e,t)=>n.jsx("li",{children:e},t))})]}),A&&n.jsx(Z,{className:"px-8 flex items-center justify-between py-4 w30",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:n.jsxs("div",{className:"flex items-center justify-between w-full",children:[n.jsx(N,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",disabled:k,onClick:()=>w==null?void 0:w(),children:"Discard"}),n.jsx(N,{type:"button",size:"sm",variant:"solid",loading:k,icon:n.jsx(J,{}),onClick:B,children:"Upload"})]})})]})};export{me as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-mui-
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{r as a}from"./vendor-react-ece1c85f.js";import{S as D}from"./index-8677acd1.js";import{U as R}from"./Upload-be937eb6.js";import{ax as F,B as P,cs as N,D as E,k as T}from"./index-3b5ce20a.js";import{S as O}from"./StickyFooter-3e569b80.js";import{a as M}from"./index-0b08ce18.js";import{r as _,u as B,s as L}from"./index-d33facae.js";const H=n=>{F.getState();const i=a.useRef({}),[x,p]=a.useState(""),[g,o]=a.useState("Draw"),[A,h]=a.useState(null),b=1,y=5e5;a.useState("");const w=()=>i.current.clear();a.useState(""),a.useState("");const f=(s,t="image.png")=>{const[r,c]=s.split(","),u=r.match(/:(.*?);/),S=u?u[1]:"image/png",d=atob(c),m=new Uint8Array(d.length);for(let j=0;j<d.length;j++)m[j]=d.charCodeAt(j);const U=new Blob([m],{type:S});return new File([U],t,{type:S})},l=()=>{if(i.current.isEmpty())alert("Please provide a signature first.");else{const s=i.current.toDataURL("image/png");p(s);const t="myImage.png";new File([s],t,{type:"image/png"});const r=f(s);h(r)}},C=(s,t)=>{let r=!0;if(t.length>=b)return`You can only upload ${b} file(s)`;if(s)for(const c of s)c.size>=y&&(r="Upload file cannot more then 500kb!");return r},I=()=>{n.onSignSubmit(A,x),n.onDrawerClose()};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"signature-container",children:[g=="Draw"&&e.jsxs("div",{children:[e.jsx("button",{onClick:()=>o("Upload"),children:"Upload"}),e.jsx("br",{}),e.jsx(D,{ref:i,penColor:"black",canvasProps:{width:500,height:200,className:"signature-canvas"}}),e.jsxs("div",{className:"buttons",children:[e.jsx("button",{onClick:w,children:"Clear"}),e.jsx("button",{onClick:l,children:"Save"})]})]}),g=="Upload"&&e.jsxs("div",{children:[e.jsx("button",{onClick:()=>o("Draw"),children:"Sign"}),e.jsx("br",{}),e.jsx(R,{draggable:!0,cropNeeded:!1,beforeUpload:C,onChange:s=>{p(URL.createObjectURL(s[0])),h(s[0])}})]})]}),x!=""&&e.jsxs("div",{children:[e.jsx("br",{}),e.jsx("br",{}),e.jsx("div",{children:e.jsx("h3",{children:"Preview"})}),e.jsx("div",{children:e.jsx("img",{src:x})})]}),e.jsx(O,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsx("div",{className:"md:flex items-center justify-between w-full",children:e.jsx(P,{size:"sm",variant:"solid",onClick:I,icon:e.jsx(M,{}),type:"button",children:"Add"})})})]})};async function J(n){return(await N.apiV10UserSignatureAddSignaturePost(n==null?void 0:n.signatureName,n.signatureFile,n.userId)).data}async function K(n){return(await N.apiV10UserSignatureAddAnonmousUserSignaturePost(n==null?void 0:n.signatureName,n.signatureFile,n.token)).data}E("TimeLogData",_);const Q=n=>{console.log("avaialblesignatureUrl",n),F.getState();const i=a.useRef({}),[x,p]=a.useState(""),[g,o]=a.useState("Draw"),[A,h]=a.useState(null),b=1,y=5e5,w=()=>i.current.clear(),f=T(),l=B(t=>t.TimeLogData.data.signatureImageUrl);console.log("signatureImageUrl",l),a.useEffect(()=>{console.log("INSIde UseEffect - signatureImageUrl",n.Id,l),l!=""?o("preview"):o("Draw"),console.log("avaialblesignatureUrl",n)},[l]);const C=(t,r="image.png")=>{const[c,u]=t.split(","),S=c.match(/:(.*?);/),d=S?S[1]:"image/png",m=atob(u),U=new Uint8Array(m.length);for(let v=0;v<m.length;v++)U[v]=m.charCodeAt(v);const k=new Blob([U],{type:d});return new File([k],r,{type:d})},I=()=>{if(i.current.isEmpty())alert("Please provide a signature first.");else{const t=i.current.toDataURL("image/png");console.log("Saved Signature:",t),p(t);const r=C(t);h(r),o("preview"),n.onSignSubmit(r,t),f(L(t))}},s=(t,r)=>{let c=!0;if(r.length>=b)return`You can only upload ${b} file(s)`;if(t)for(const u of t)u.size>=y&&(c="Upload file cannot more then 500kb!");return c};return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"signature-container",style:{marginBottom:"0.5rem"},children:[g=="Draw"&&e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",position:"relative",width:"50%"},children:[e.jsx("div",{children:e.jsx("button",{onClick:()=>o("Upload"),children:"Upload"})}),e.jsxs("div",{className:"buttons",style:{marginTop:"0",position:"absolute",right:"0"},children:[e.jsx("button",{onClick:w,children:"Clear"}),e.jsx("button",{onClick:I,children:"Save"})]})]}),e.jsx("hr",{style:{width:"50%"}}),e.jsx(D,{ref:i,penColor:"black",canvasProps:{height:100,className:"signature-canvas"}})]}),g=="Upload"&&e.jsxs("div",{children:[e.jsx("button",{onClick:()=>o("Draw"),children:"Sign"}),e.jsx("hr",{}),e.jsx(R,{draggable:!0,cropNeeded:!1,beforeUpload:s,onChange:t=>{console.log("files: ",t),p(URL.createObjectURL(t[0])),h(t[0]),o("preview"),f(L(URL.createObjectURL(t[0]))),n.onSignSubmit(t[0],URL.createObjectURL(t[0]))}})]}),g=="preview"&&l!=""&&e.jsxs("div",{children:[e.jsx("button",{onClick:()=>o("Draw"),children:"Sign"})," | ",e.jsx("button",{onClick:()=>o("Upload"),children:"Upload"}),e.jsx("hr",{}),e.jsx("br",{}),e.jsx("img",{src:l})]})]})})};export{H as A,Q as I,K as a,J as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{A as r}from"./AdaptableCard-3d1e1f96.js";import{P as j}from"./PageBreadcrumb-cf54a6e9.js";import{f,r as n}from"./vendor-react-ece1c85f.js";import{T as x}from"./index-289b3fd9.js";import{a0 as l,r as d,c6 as v,B as i,d as h,dr as b,cc as N,aQ as g,m as w}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as y}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./Upload-be937eb6.js";import"./useControllableState-d0909575.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"./useDidUpdate-de319a18.js";const C=s=>{f(),n.useState(!1);const a=[{value:"ocean",label:"Ocean",color:"#00B8D9"},{value:"blue",label:"Blue",color:"#0052CC"},{value:"purple",label:"Purple",color:"#5243AA"},{value:"red",label:"Red",color:"#FF5630"},{value:"orange",label:"Orange",color:"#FF8B00"},{value:"yellow",label:"Yellow",color:"#FFC400"},{value:"green",label:"Green",color:"#36B37E"},{value:"forest",label:"Forest",color:"#00875A"},{value:"slate",label:"Slate",color:"#253858"},{value:"silver",label:"Silver",color:"#666666"}];return e.jsx(e.Fragment,{children:e.jsxs("div",{children:[e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Account Name"}),e.jsx(l,{placeholder:""})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Parent Account"}),e.jsx(d,{placeholder:"Please Select",options:a})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Address"}),e.jsx(l,{placeholder:"",textArea:!0})]}),e.jsxs("div",{className:"lg:flex md:flex-none sm:flex-none pb-2",children:[e.jsxs("div",{className:"lg:w-1/3 md:w-full sm:w-full pr-4",children:[e.jsx("div",{className:"font-bold",children:"City"}),e.jsx(l,{placeholder:""})]}),e.jsxs("div",{className:"lg:w-1/3 md:w-full sm:w-full pr-4",children:[e.jsx("div",{className:"font-bold",children:"State"}),e.jsx(d,{placeholder:"Please Select",options:a})]}),e.jsxs("div",{className:"lg:w-1/3 md:w-full sm:w-full",children:[e.jsx("div",{className:"font-bold",children:"Zipcode"}),e.jsx(l,{placeholder:""})]})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Primary Contact"}),e.jsx(l,{placeholder:""})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Billing Contact"}),e.jsx(d,{placeholder:"Please Select",options:a})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Notes"}),e.jsx(l,{placeholder:"",textArea:!0})]})]})})},Z=()=>{const{TabNav:s,TabList:a,TabContent:c}=x;n.useState(!1),n.useState(!1);const[u,t]=n.useState(!1),m=()=>{t(!0)},o=P=>{t(!1)},p=e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(i,{size:"sm",className:"mr-2",onClick:()=>o(),children:"Cancel"}),e.jsx(i,{size:"sm",className:"mr-2",children:"Create and Add Another"}),e.jsx(i,{size:"sm",variant:"solid",onClick:()=>o(),children:"Add Account"})]});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(j,{items:[{label:"Billing & Invoice"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Invoices"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(l,{size:"sm",className:"mr-2",placeholder:"Search",prefix:e.jsx(v,{className:"text-lg"})}),e.jsx(i,{onClick:()=>m(),block:!0,variant:"solid",size:"sm",icon:e.jsx(h,{}),children:"Add Invoice"}),e.jsx(y,{title:"Add Invoice",isOpen:u,onClose:o,onRequestClose:o,portalClassName:"w30",footer:p,children:e.jsx(C,{})})]})]})]}),e.jsx(r,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsxs(x,{className:"billing-tabs h-full",defaultValue:"all",variant:"pill",children:[e.jsxs(a,{children:[e.jsx(s,{icon:e.jsx(b,{}),value:"all",children:"All Invoices"}),e.jsx(s,{icon:e.jsx(N,{}),value:"overdue",children:"Overdue"}),e.jsx(s,{icon:e.jsx(g,{}),value:"upcoming",children:"Upcoming"}),e.jsx(s,{icon:e.jsx(w,{}),value:"paid",children:"Paid"})]}),e.jsxs("div",{className:"py-4 h-full",children:[e.jsx(c,{value:"all",children:e.jsxs(r,{className:"invoices h-full py-4 px-6",bodyClass:"h-full",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none py-20 px-20",children:e.jsxs("div",{className:"lg:w-full md:w-full sm:w-full text-center",children:[e.jsx("h3",{children:"Professional Invoicing"}),e.jsx("h5",{children:`It's more than just saying "Pay me"`}),e.jsx("div",{className:"py-8",children:e.jsxs("p",{children:["The care and detail you put into invoicing can do wonders for your brand and future business.",e.jsx("br",{}),"Take these steps below to show customers the best you have to offer."]})})]})}),e.jsxs("div",{className:"lg:flex md:flex-none sm:flex-none py-20 w-3/6 container mx-auto",children:[e.jsxs("div",{className:"lg:w-1/3 md:w-full sm:w-full text-center px-4",children:[e.jsx("div",{className:"circle",children:"01"}),e.jsx("h4",{className:"my-2",children:"Create and Invoice"}),e.jsx("p",{className:"text-xs",children:"Enter your customers email, add services with amount and you are ready to send."})]}),e.jsxs("div",{className:"lg:w-1/3 md:w-full sm:w-full text-center px-4 border-l-2 border-r-2",children:[e.jsx("div",{className:"circle",children:"02"}),e.jsx("h4",{className:"my-2",children:"Send in Seconds"}),e.jsx("p",{className:"text-xs",children:"Share the invoice over email with a click."})]}),e.jsxs("div",{className:"lg:w-1/3 md:w-full sm:w-full text-center px-4 ",children:[e.jsx("div",{className:"circle",children:"03"}),e.jsx("h4",{className:"my-2",children:"Record the Payment"}),e.jsx("p",{className:"text-xs",children:"Record payments made with ease and keep a track of the due and paid amounts."})]})]}),e.jsx("div",{className:"container text-center mx-auto py-20",children:e.jsx(i,{onClick:()=>m(),variant:"solid",size:"sm",icon:e.jsx(h,{}),children:"Create Invoice"})})]})}),e.jsx(c,{value:"overdue",children:e.jsx(r,{className:"h-full py-4 px-6",bodyClass:"h-full",children:e.jsx("p",{children:"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization. (Gerald Weinberg)"})})}),e.jsx(c,{value:"upcoming",children:e.jsx(r,{className:"h-full py-4 px-6",bodyClass:"h-full",children:e.jsx("p",{children:"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization. (Gerald Weinberg)"})})}),e.jsx(c,{value:"paid",children:e.jsx(r,{className:"h-full py-4 px-6",bodyClass:"h-full",children:e.jsx("p",{children:"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization. (Gerald Weinberg)"})})})]})]})})]})};export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{dJ as t}from"./index-3b5ce20a.js";async function p(a){return(await t.apiV10AppKeyVaultAddKeyDataPost(a)).data}async function o(a){return(await t.apiV10AppKeyVaultGetAllKeysDataPost(a)).data}async function r(a){return(await t.apiV10AppKeyVaultGetKeyDataByIdIdGet(a)).data}async function y(a,e){return(await t.apiV10AppKeyVaultUpdateKeyDataIdPut(a,e)).data}async function i(a){return(await t.apiV10AppKeyVaultDeleteKeyDataIdDelete(a)).data}async function u(a){return(await t.apiV10AppKeyVaultGetAllKeysPost(a)).data}export{o as a,u as b,r as c,p as d,y as e,i as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as P,y as re,z as M,j as e,B as oe,C as le,D as ce,E as de}from"./vendor-mui-98daa63f.js";import{D as X,k as D,a0 as E,ai as L,r as R,B as I,E as v,F as S,aC as pe,aQ as me}from"./index-3b5ce20a.js";import{r as y,j as ue}from"./vendor-react-ece1c85f.js";import{i as fe,j as q,u as z,k as he,l as A,d as V,r as xe}from"./index-91505016.js";import{A as C}from"./AdaptableCard-3d1e1f96.js";import{d as je}from"./Check-af681a30.js";import{P as ge}from"./permissionHoc-0818bfb0.js";import{C as F}from"./CustomerInfoField-4bf880e2.js";import{T as Y}from"./index-289b3fd9.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{a as ye,T as Q}from"./index-a14e51de.js";import{D as O}from"./Drawer-4f97e662.js";import{a as N,F as ee}from"./FormContainer-9a52b9e8.js";import{S as ve}from"./Switcher-e2fba588.js";import"./Upload-be937eb6.js";import{h as te}from"./index-b0ef7ac3.js";import{S as se}from"./StickyFooter-3e569b80.js";import{d as w,c as $,a as T,i as Se,F as ae,b as ie}from"./index.esm-b2d342b5.js";import{r as be,u as Ne,g as we}from"./index-c29b8474.js";import{a as ne}from"./index-0b08ce18.js";import{b as Te}from"./ScheduleService-41a88c41.js";import Ce from"./OpportunitiesList-2f96958f.js";import{P as Le}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"./LeadSourceService-cf71ea64.js";import"./ContactService-8afcaeb7.js";import"./createSvgIcon-aba65987.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./index-52963879.js";import"./OpportunityServices-c4510dd2.js";import"./actioncell-6b5ebd6c.js";import"./EditLead-c8c9760a.js";import"./DoubleSidedImage-b4bd3915.js";import"./ConfirmDialog-2838a642.js";import"./AddAccount-2cd72664.js";import"./index-0fd6e996.js";import"./AccountServices-f68f471d.js";import"./index-11297f4a.js";import"./DepartmentServices-a53e998b.js";import"./validationPatterns-77446c46.js";import"./CourseService-29ad460c.js";import"./ApiService-df126758.js";import"./index-d221d69e.js";import"./UserService-1b93ceb0.js";import"./tableV3-24eed052.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";import"./usePermission-4689548c.js";import"./WrapperCell-3d5592cf.js";const ke=P(re)(({theme:s})=>({[`&.${M.alternativeLabel}`]:{top:10,left:"calc(-50% + 16px)",right:"calc(50% + 16px)"},[`&.${M.active}`]:{[`& .${M.line}`]:{borderColor:"var(--custom-600)"}},[`&.${M.completed}`]:{[`& .${M.line}`]:{borderColor:"var(--custom-600)"}},[`& .${M.line}`]:{borderColor:"#eaeaf0",borderTopWidth:3,borderRadius:1,...s.applyStyles("dark",{borderColor:s.palette.grey[800]})}})),Me=P("div")(({theme:s})=>({color:"#eaeaf0",display:"flex",height:22,alignItems:"center","& .QontoStepIcon-completedIcon":{color:"var(--custom-600)",zIndex:1,fontSize:18},"& .QontoStepIcon-circle":{width:8,height:8,borderRadius:"50%",color:"var(--custom-600)",backgroundColor:"var(--custom-600)"},...s.applyStyles("dark",{color:s.palette.grey[700]}),variants:[{props:({ownerState:a})=>a.active,style:{color:"var(--custom-600)"}}]}));function Ie(s){const{active:a,completed:n,className:c}=s;return e.jsx(Me,{ownerState:{active:a},className:c,children:n?e.jsx(je,{className:"QontoStepIcon-completedIcon"}):e.jsx("div",{className:"QontoStepIcon-circle"})})}P("div")(({theme:s})=>({backgroundColor:"#ccc",zIndex:1,color:"#fff",width:50,height:50,display:"flex",borderRadius:"50%",justifyContent:"center",alignItems:"center",...s.applyStyles("dark",{backgroundColor:s.palette.grey[700]}),variants:[{props:({ownerState:a})=>a.active,style:{backgroundImage:"linear-gradient( 136deg, rgb(242,113,33) 0%, rgb(233,64,87) 50%, rgb(138,35,135) 100%)",boxShadow:"0 4px 10px 0 rgba(0,0,0,.25)"}},{props:({ownerState:a})=>a.completed,style:{backgroundImage:"linear-gradient( 136deg, rgb(242,113,33) 0%, rgb(233,64,87) 50%, rgb(138,35,135) 100%)"}}]}));const De=["Contact","Meeting","Outcome"];function Fe(s){return e.jsx(oe,{sx:{width:"100%"},spacing:4,children:e.jsx(le,{alternativeLabel:!0,activeStep:s.activeStep,connector:e.jsx(ke,{}),children:De.map(a=>e.jsx(ce,{children:e.jsx(de,{StepIconComponent:Ie,children:a})},a))})})}X("calendar",be);const $e=s=>{const a=D(),{allContacts:n}=Ne(l=>l.calendar.data),{touched:c,errors:r,type:j}=s,t=[{value:"4ae1cc43-1c19-474a-ac0c-3f8653bf5c2c",label:"Lead"}];return y.useEffect(()=>{a(we({}))},[]),e.jsxs(C,{className:"mb-4",children:[e.jsx(N,{asterisk:!0,label:"Event Name",invalid:r.eventName&&c.eventName,errorMessage:r.eventName,children:e.jsx(w,{type:"text",autoComplete:"off",name:"eventName",placeholder:"Event Name",component:E})}),e.jsx(N,{asterisk:!0,label:"Event Date",invalid:r.eventDate&&c.eventDate,errorMessage:r.eventDate,children:e.jsx(w,{name:"eventDate",children:({field:l,form:o})=>{var p,i;return e.jsx(e.Fragment,{children:e.jsx(ye,{name:"eventDate",placeholder:"Event Date",field:l,value:(p=o==null?void 0:o.values)!=null&&p.eventDate?new Date((i=o==null?void 0:o.values)==null?void 0:i.eventDate):void 0,onChange:f=>{f&&o.setFieldValue("eventDate",f)}})})}})}),e.jsx(N,{asterisk:!0,label:"From Time",invalid:r.fromTime&&c.fromTime,errorMessage:r.fromTime,children:e.jsx(w,{name:"fromTime",placeholder:"fromTime",children:({field:l,form:o})=>e.jsx(Q,{name:"fromTime",id:"fromTime",field:l,format:"12",defaultValue:o.values.fromTime?new Date(o.values.fromTime):void 0,clearable:!1,onChange:p=>{const i=L(p).format("HH:mm:ss");o.setFieldValue("fromTime",i)}})})}),e.jsx(N,{asterisk:!0,label:"To Time",invalid:r.toTime&&c.toTime,errorMessage:r.toTime,children:e.jsx(w,{name:"toTime",placeholder:"toTime",children:({field:l,form:o})=>e.jsx(Q,{name:"toTime",id:"toTime",field:l,format:"12",defaultValue:o.values.toTime?new Date(o.values.toTime):void 0,clearable:!1,onChange:p=>{const i=L(p).format("HH:mm:ss");console.log("toTime",p,"formattedTime",i),o.setFieldValue("toTime",i)}})})}),e.jsx(N,{asterisk:!0,label:"Invite Contact(s)",invalid:!!(r.participants&&c.participants),errorMessage:r.participants,children:e.jsx(w,{name:"participants",children:({field:l,form:o})=>{var f,h;const p=((h=(f=o==null?void 0:o.values)==null?void 0:f.participants)==null?void 0:h.map(g=>({label:g.email,value:g.participantId,email:g.email,participantId:g.participantId})))||[],i=n.map(g=>({label:g.email,value:g.id,email:g.email,id:g.id}));return e.jsx(R,{isMulti:!0,className:"rounded-md",options:i,value:p,onChange:g=>o.setFieldValue("participants",g.map(u=>({email:u.email,participantId:u.value})))})}})}),e.jsx(N,{asterisk:!0,label:"Type",invalid:r.eventType&&c.eventType,errorMessage:r.eventType,children:e.jsx(w,{name:"eventType",children:({field:l,form:o})=>e.jsx(R,{field:l,form:o,options:t,name:"eventType",onChange:p=>{o.setFieldValue(l.name,p)}})})}),e.jsx(N,{asterisk:!0,label:"Link",invalid:r.link&&c.link,errorMessage:r.link,children:e.jsx(w,{type:"text",autoComplete:"off",name:"link",placeholder:"Link",component:E})}),e.jsx(N,{label:"Notes",invalid:r.notes&&c.notes,errorMessage:r.notes,children:e.jsx(w,{textArea:!0,type:"text",autoComplete:"off",name:"notes",placeholder:"Notes",component:E})}),e.jsx(N,{label:"SendNotification",invalid:r.sendNotification&&c.sendNotification,errorMessage:r.sendNotification,children:e.jsx("div",{children:e.jsx(w,{name:"sendNotification",component:ve})})})]})},{useUniqueId:Ee}=te,W=$().shape({eventName:T().required("Event name Required"),eventDate:T().required("Event date Required"),fromTime:T().required("From time Required"),toTime:T().required("Totime Required"),participants:Se().of($()).min(1,"At least one participant is required").required("Participants Required"),eventType:$().required("Event type Required"),link:T().required("Link Required"),notes:T()}),H=y.forwardRef((s,a)=>{const{type:n,footerWidth:c,initialData:r={id:"",eventName:"",eventDate:null,fromTime:null,toTime:null,participants:[],eventType:"",link:"",notes:"",sendNotification:!1},onFormSubmit:j,onDiscard:t,onDelete:l}=s,o=Ee("LeadMeeting-");return e.jsx(e.Fragment,{children:e.jsx(ae,{innerRef:a,initialValues:{...r},validationSchema:W,onSubmit:(p,{setSubmitting:i})=>{const f=p;n==="new"&&(f.id=o),j==null||j(f,i)},children:({values:p,touched:i,errors:f,isSubmitting:h})=>e.jsx(ie,{children:e.jsxs(ee,{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($e,{type:n,touched:i,errors:f})})}),e.jsx(se,{className:`px-8 flex items-center justify-between py-4 ${c}`,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(I,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>t==null?void 0:t(),children:"Discard"}),e.jsx(I,{size:"sm",variant:"solid",loading:h,icon:e.jsx(ne,{}),type:"submit",children:"Save"})]})})]})})})})});H.displayName="LeadMeetingForm";function B(s){const a=String(s).trim();return/^\d+$/.test(a)?`${parseInt(a,10).toString().padStart(2,"0")}:00:00`:/^\d{2}:\d{2}:\d{2}$/.test(a)?a:" "}const Oe=s=>{const{onDrawerClose:a,leadId:n,footerWidth:c}=s,r=D(),j=()=>{r(q({id:n}))},t=async(l,o)=>{var i,f,h,g;o(!0);const p={eventName:l.eventName??"",eventDate:L(l.eventDate).format("YYYY-MM-DD"),endDate:L(l.eventDate).format("YYYY-MM-DD"),fromTime:B(l.fromTime??""),toTime:B(l.toTime??""),participants:l.participants??"",participantIds:(i=l==null?void 0:l.participants)==null?void 0:i.map(u=>u.participantId??u.id),eventCategoryId:((f=l.eventType)==null?void 0:f.value)??"",link:l.link??"",notes:l.notes??"",sendNotification:l.sendNotification??"",entityId:n};try{(await fe(p)).success&&(v.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Lead meeting Successfully Added"}),{placement:"top-center"}),j(),a())}catch(u){o(!1),v.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:(g=(h=u==null?void 0:u.response)==null?void 0:h.data)==null?void 0:g.message}),{placement:"top-center"})}};return e.jsx(H,{type:"new",footerWidth:c,onFormSubmit:t,onDiscard:a})},Z=s=>{if(!s)return"";if(s.includes("T")){const n=s.split("T")[1];return J(n)}const a=new Date(s);if(!isNaN(a.getTime())){const n=a.getHours().toString().padStart(2,"0"),c=a.getMinutes().toString().padStart(2,"0"),r=a.getSeconds().toString().padStart(2,"0");return`${n}:${c}:${r}`}return J(s)},J=s=>{if(!s)return"00:00:00";if(/^\d{2}:\d{2}:\d{2}$/.test(s))return s;const a=s.replace(/\D/g,"");return a.length===1||a.length===2?a.padStart(2,"0")+":00:00":a.length===3?a.slice(-2).padStart(2,"0")+":00:00":a.length===4?a.slice(0,2)+":"+a.slice(2,4)+":00":a.length===6?a.slice(0,2)+":"+a.slice(2,4)+":"+a.slice(4,6):"00:00:00"};function qe(s){const[a,n]=s.split(":").map(Number),c=a>=12?"PM":"AM",r=a%12||12,j=String(r).padStart(2,"0"),t=String(n).padStart(2,"0");return`${j}:${t} ${c}`}function _(s,a="Asia/Kolkata"){var c,r;return`${L((c=s==null?void 0:s.split("T"))==null?void 0:c[0]).format("MMM DD, YYYY")}, ${qe((r=s==null?void 0:s.split("T"))==null?void 0:r[1])}`}const Re=({leadId:s,meetingId:a,onDrawerClose:n,footerWidth:c})=>{const r=D(),j=z(i=>{var f,h;return(h=(f=i.LeadsData)==null?void 0:f.data)==null?void 0:h.leadMeetingList}),[t,l]=y.useState(null);y.useEffect(()=>{var f;const i=j==null?void 0:j.find(h=>h.id===a);i?l({id:(i==null?void 0:i.id)||"",eventName:i.eventName??"",eventDate:i.eventDate,fromTime:_(`${i.startDateTime}Z`),toTime:_(`${i.endDateTime}Z`),participants:((f=i==null?void 0:i.participants)==null?void 0:f.map(h=>({email:h==null?void 0:h.email,participantId:h==null?void 0:h.participantId})))??[],eventType:{label:"Lead",value:i.eventType},link:i.link,notes:i.notes,sendNotification:i.sendNotification??!1}):(v.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:"Meeting not found in state"}),{placement:"top-center"}),n())},[a]);const o=async(i,f)=>{var g,u,m,d;f(!0);const h={id:i.id,eventName:i.eventName??"",eventDate:L(i.eventDate).format("YYYY-MM-DD")??"",fromTime:Z(i.fromTime)??"",toTime:Z(i.toTime)??"",participants:i.participants??"",participantIds:(g=i==null?void 0:i.participants)==null?void 0:g.map(x=>x.participantId),eventType:((u=i.eventType)==null?void 0:u.value)??"",link:i.link??"",notes:i.notes??"",sendNotification:i.sendNotification??"",entityId:s};try{(await Te(h.id,h)).success&&(v.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Lead meeting successfully updated"}),{placement:"top-center"}),r(q({id:s})),n())}catch(x){const b=((d=(m=x.response)==null?void 0:m.data)==null?void 0:d.message)||"Something went wrong";v.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:b}),{placement:"top-center"})}finally{f(!1)}},p=()=>n();return t?e.jsx(H,{type:"edit",initialData:t,footerWidth:c,onFormSubmit:o,onDiscard:p}):e.jsx("div",{className:"p-4",children:"Loading..."})},Ae=s=>{D();const{touched:a,errors:n,type:c}=s,r=[{value:2,label:"Qualified"},{value:3,label:"UnQualified"}];return e.jsxs(C,{className:"mb-4",children:[e.jsx(N,{asterisk:!0,label:"Lead Status",invalid:n.leadStatus&&a.leadStatus,errorMessage:n.leadStatus,children:e.jsx(w,{name:"leadStatus",children:({field:j,form:t})=>e.jsx(R,{field:j,form:t,options:r,name:"leadStatus",onChange:l=>{t.setFieldValue(j.name,l)}})})}),e.jsx(N,{label:"Notes",invalid:n.notes&&a.notes,errorMessage:n.notes,children:e.jsx(w,{type:"text",autoComplete:"off",name:"notes",placeholder:"Notes",component:E,textArea:!0})})]})},{useUniqueId:Ye}=te,Pe=$().shape({leadStatus:$().required("Status Required"),notes:T()}),U=y.forwardRef((s,a)=>{const{type:n,footerWidth:c,initialData:r={id:"",leadStatus:"",notes:""},onFormSubmit:j,onDiscard:t}=s,l=Ye("LeadStatus-");return e.jsx(ae,{innerRef:a,initialValues:{...r},validationSchema:Pe,onSubmit:(o,{setSubmitting:p})=>{const i={...o};n==="new"&&(i.id=l),j==null||j(i,p)},children:({touched:o,errors:p,isSubmitting:i})=>e.jsx(ie,{children:e.jsxs(ee,{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(Ae,{type:n,touched:o,errors:p})})}),e.jsx(se,{className:`px-8 flex items-center justify-between py-4 ${c}`,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(I,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>t==null?void 0:t(),children:"Discard"}),e.jsx(I,{size:"sm",variant:"solid",loading:i,icon:e.jsx(ne,{}),type:"submit",children:"Save"})]})})]})})})});U.displayName="LeadStatusForm";const ze=({leadId:s})=>{var g;const a=D(),n=z(u=>{var m,d;return(d=(m=u.LeadsData)==null?void 0:m.data)==null?void 0:d.leadMeetingList}),[c,r]=y.useState(!1),[j,t]=y.useState(!1),[l,o]=y.useState(!1),p=()=>{a(q({id:s}))},i=()=>{var d;const u=(d=n==null?void 0:n[0])==null?void 0:d.link;if(!u)return;const m=window.open(u,"_blank","noopener,noreferrer");m&&(m.opener=null)},f=async()=>{var u,m;try{(await he(n[0].id)).success&&(v.push(e.jsx(S,{title:"Success",type:"success",children:"Meeting cancelled successfully"}),{placement:"top-center"}),p())}catch(d){v.push(e.jsx(S,{title:"Error",type:"danger",children:(m=(u=d.response)==null?void 0:u.data)==null?void 0:m.message}),{placement:"top-center"})}},h=async u=>{var m,d,x;try{const b={LeadStatus:(m=u.leadStatus)==null?void 0:m.value,Notes:u.notes??""};(await A(s,b)).success&&(v.push(e.jsx(S,{title:"Success",type:"success",children:"Lead status successfully updated"}),{placement:"top-center"}),o(!1))}catch(b){v.push(e.jsx(S,{title:"Error",type:"danger",children:(x=(d=b.response)==null?void 0:d.data)==null?void 0:x.message}),{placement:"top-center"})}};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between mt-5 gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{children:"Upcoming Meetings"}),(n==null?void 0:n.length)===0&&e.jsx("p",{children:"No meetings have been scheduled at this time. Please establish contact with the client to arrange a suitable appointment"})]}),(n==null?void 0:n.length)===0&&e.jsx(I,{variant:"solid",onClick:()=>r(!0),children:"Schedule a Meeting"})]}),e.jsx(O,{title:"Schedule a Meeting",isOpen:c,onClose:()=>r(!1),portalClassName:"w30",children:e.jsx(Oe,{footerWidth:"w30",leadId:s,onDrawerClose:()=>{r(!1),p()}})}),e.jsx(O,{title:"Edit Meeting",isOpen:j,onClose:()=>t(!1),portalClassName:"w30",children:e.jsx(Re,{footerWidth:"w30",leadId:s,meetingId:(g=n==null?void 0:n[0])==null?void 0:g.id,onDrawerClose:()=>{t(!1),p()}})}),e.jsx(O,{title:"Lead Status",isOpen:l,onClose:()=>o(!1),portalClassName:"w30",children:e.jsx(U,{footerWidth:"w30",type:"new",onFormSubmit:h,onDiscard:()=>o(!1)})}),(n==null?void 0:n.length)>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between mt-5 px-5 gap-4",children:[e.jsxs("div",{children:[e.jsx("h4",{children:n[0].eventName}),e.jsxs("p",{children:[L(n[0].eventDate).format("D MMM")," | ",n[0].fromTime," - ",n[0].toTime]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx("a",{className:"font-bold text-primary cursor-pointer",onClick:i,children:"Join"}),e.jsx("a",{className:"cursor-pointer",onClick:()=>t(!0),children:"Edit Meeting"}),e.jsx("a",{className:"cursor-pointer",onClick:f,children:"Cancel Meeting"})]})]})]})},He=({leadId:s,leadData:a})=>e.jsx("div",{children:e.jsx(Ce,{leadId:s,accountId:null,leadData:a})}),{TabNav:K,TabList:Ue,TabContent:G}=Y,Ve=({currentTab:s,setCurrentTab:a,leadId:n,leadData:c})=>e.jsxs(Y,{className:"opportunity-tabs",variant:"pill",value:s,onChange:a,children:[e.jsx(Y,{className:"opportunity-tabs",variant:"pill",value:s,onChange:a,children:e.jsx(C,{className:"p-2 my-2",children:e.jsxs(Ue,{className:"flex flex-col sm:flex-row flex-wrap gap-2",children:[e.jsx(K,{icon:e.jsx(pe,{}),className:"w-full sm:w-auto text-center",value:"Opportunities",children:" Opportunity "}),e.jsx(K,{icon:e.jsx(me,{}),className:"w-full sm:w-auto text-center",value:"Meetings",children:" Meeting "})]})})}),e.jsx(C,{className:"my-2",children:e.jsxs("div",{className:"p-3",children:[e.jsx(G,{value:"Meetings",children:e.jsx(ze,{leadId:n})}),e.jsx(G,{value:"Opportunities",children:e.jsx(He,{leadId:n,leadData:c})})]})})]});X("LeadsData",xe);const Qe=()=>{var u;const{id:s}=ue(),a=D(),[n,c]=y.useState(!1),[r,j]=y.useState(0);y.useEffect(()=>{if(s){const m={id:s};a(V(m)),a(q(m))}},[s]);const t=z(m=>{var d,x;return(x=(d=m.LeadsData)==null?void 0:d.data)==null?void 0:x.lead});y.useEffect(()=>{t&&j(t.leadStatusId===1||t.leadStatusId===6?0:t.leadStatusId===5?1:2)},[t]);const l=()=>{a(V({id:s}))},o=async m=>await A(s,m),p=()=>{r===0?o({LeadStatus:5,Notes:""}).then(d=>{d.success&&(v.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Lead status successfully updated"}),{placement:"top-center"}),l())}).catch(d=>{var x,b;v.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:(b=(x=d==null?void 0:d.response)==null?void 0:x.data)==null?void 0:b.message}),{placement:"top-center"})}):c(!0)},i=async m=>{var d,x,b;try{const k={LeadStatus:(d=m.leadStatus)==null?void 0:d.value,Notes:m.notes??""};(await A(s,k)).success&&(v.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Lead status successfully updated"}),{placement:"top-center"}),c(!1),l())}catch(k){v.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:(b=(x=k==null?void 0:k.response)==null?void 0:x.data)==null?void 0:b.message}),{placement:"top-center"})}},[f,h]=y.useState("Opportunities"),g=m=>{const d=m.length;let x=m;return d>0&&(x="("+x),d>3&&(x=x.slice(0,4)+") "+x.slice(4,11)),d>6&&(x=x.slice(0,9)+"-"+x.slice(9)),x};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(Le,{items:[{label:"CRM"},{label:"Leads"},{label:"Lead Details"}]}),e.jsx("div",{className:"lg:flex items-center justify-between",children:e.jsx("h3",{className:"mb-4 lg:mb-0",children:" Lead Details "})})]}),e.jsx(C,{className:"m-6 py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsxs(C,{className:"borderless",children:[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 justify-center md:justify-start md:space-between",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:"Owner:"})," ",t==null?void 0:t.leadName]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Source:"})," ",t==null?void 0:t.leadSource]})]}),e.jsxs("div",{className:"w-full md:w-1/2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Company:"})," ",t==null?void 0:t.accountName]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Designation:"})," ",(u=t==null?void 0:t.contactPosistion)==null?void 0:u.positionName]})]})]})}),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.jsxs("div",{className:"flex flex-col sm:flex-row justify-between mt-5 gap-4",children:[e.jsx(Fe,{activeStep:r}),e.jsx(I,{variant:"solid",size:"md",onClick:p,children:r===0?e.jsx("span",{children:"Mark Status Complete"}):e.jsx("span",{children:"Update Status"})})]})})})]}),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(F,{title:"Email",value:(t==null?void 0:t.contactEmail)||"--"}),e.jsx(F,{title:"Phone",value:t!=null&&t.contactNumber?g(t==null?void 0:t.contactNumber):"--"}),e.jsx(F,{title:"Address",value:`${(t==null?void 0:t.address)||""}, ${(t==null?void 0:t.state)||""}, ${(t==null?void 0:t.city)||""}, ${(t==null?void 0:t.zip)||""}`}),e.jsx(F,{title:"Industry",value:(t==null?void 0:t.industry)||"--"}),e.jsx(F,{title:"No. Of Employees",value:(t==null?void 0:t.noOfEmployees)||"--"})]})})})]})}),e.jsx(C,{className:"mt-0 ml-6 mr-6 mb-6 borderless bg-transparent",bodyClass:"h-full",children:e.jsx(Ve,{currentTab:f,setCurrentTab:h,leadId:s,leadData:t})}),e.jsx(O,{title:"Lead Status",isOpen:n,onClose:()=>c(!1),portalClassName:"w30",children:e.jsx(U,{footerWidth:"w30",type:"new",onFormSubmit:i,onDiscard:()=>c(!1)})})]})},Xt=ge(Qe,"Leads");export{Xt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d9 as o}from"./index-3b5ce20a.js";async function s(e){return(await o.apiV10LeadSourceAddLeadSourcePost(e)).data}async function n(e){return(await o.apiV10LeadSourceGetLeadSourcesPost(e)).data}async function c(e){return(await o.apiV10LeadSourceGetLeadSourceByIdIdGet(e)).data}async function d(e,a){return(await o.apiV10LeadSourceUpdateLeadSourceIdPut(e,a)).data}async function u(e){return(await o.apiV10LeadSourceDeleteLeadSourceIdDelete(e)).data}export{n as a,c as b,s as c,d,u as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,l as be}from"./vendor-mui-98daa63f.js";import{A as ne}from"./AdaptableCard-3d1e1f96.js";import{r as d,f as ve,L as Ce}from"./vendor-react-ece1c85f.js";import{u as r,t as q,f as Le,a as re,b as Se,g as Ne,s as I,r as we,h as ce}from"./index-91505016.js";import{k as U,d4 as Ie,E as Fe,F as De,r as O,B as A,D as Q,l as ke,d as Ae,al as N,as as w,d5 as ye,d6 as Pe,d7 as Ee,aK as Re,a7 as Me}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{C as z}from"./index-a14e51de.js";import{D as T}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{A as Oe,E as ze}from"./EditLead-c8c9760a.js";import{A as $e,T as $}from"./actioncell-6b5ebd6c.js";import{D as qe}from"./tableV2-99c808c0.js";import{C as Te}from"./ConfirmDialog-2838a642.js";import{r as Ue}from"./index-11297f4a.js";import{r as Qe}from"./index-0fd6e996.js";import{u as Ve}from"./usePermission-4689548c.js";import{P as Be}from"./PageBreadcrumb-cf54a6e9.js";import"./vendor-redux-a1f00e6b.js";import"./LeadSourceService-cf71ea64.js";import"./ContactService-8afcaeb7.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"./StickyFooter-3e569b80.js";import"./index.esm-b2d342b5.js";import"./AddAccount-2cd72664.js";import"./AccountServices-f68f471d.js";import"./DepartmentServices-a53e998b.js";import"./Check-af681a30.js";import"./createSvgIcon-aba65987.js";import"./index-0b08ce18.js";import"./validationPatterns-77446c46.js";import"./CourseService-29ad460c.js";import"./ApiService-df126758.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";const We=()=>{const n=U(),u=r(i=>i.LeadsData.data.deleteConfirmation),h=r(i=>i.LeadsData.data.selectedRowData),f=r(i=>i.LeadsData.data.tableData),t=()=>{n(q(!1))},j=async()=>{n(q(!1)),await Le(h.id)&&(Ie(),n(re(f)),Fe.push(e.jsx(De,{title:"Deleted",type:"success",duration:2500,children:"Lead Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(Te,{isOpen:u,type:"danger",title:"Delete Lead",confirmButtonColor:"red-600",onClose:t,onRequestClose:t,onCancel:t,onConfirm:j,children:e.jsx("p",{children:"Are you sure you want to delete this Lead? This action cannot be undone."})})},Ge=({onSaveClick:n,onCancel:u,onClearFilers:h})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(A,{size:"sm",className:"mr-2",onClick:h,children:"Clear All"}),e.jsx(A,{size:"sm",className:"mr-2",onClick:u,children:"Cancel"}),e.jsx(A,{size:"sm",variant:"solid",onClick:n,children:"Query"})]}),He=n=>{const u=U(),[h,f]=d.useState(!1),t=r(s=>s.LeadsData.data.filterData),[j,i]=d.useState(t==null?void 0:t.contactId),[F,v]=d.useState(t==null?void 0:t.leadSourceId),[D,g]=d.useState(t==null?void 0:t.leadStatus),b=[{value:1,label:"New"},{value:2,label:"Qualified"},{value:3,label:"UnQualified"},{value:5,label:"Meeting"}],C=()=>{f(!1),n.onClose()},y=()=>{u(Ne({}))};d.useEffect(()=>{P(),y()},[]);const P=()=>{u(Se({}))},E=r(s=>{var c,m,l;return(l=(m=(c=s.LeadsData)==null?void 0:c.data)==null?void 0:m.leadSourceList)==null?void 0:l.map(o=>({value:o.id,label:o.leadSourceName}))}),k=r(s=>{var c,m,l;return(l=(m=(c=s.LeadsData)==null?void 0:c.data)==null?void 0:m.contactList)==null?void 0:l.map(o=>({value:o.id,label:o.contactName}))}),R=()=>{u(I({leadStatus:"",leadSourceId:"",contactId:""})),i(""),g(""),v("")},x=()=>{n.onClose(),f(!1),u(I({leadStatus:D,leadSourceId:F,contactId:j}))};return d.useEffect(()=>{n.isOpen&&f(!0)},[n.isOpen]),d.useEffect(()=>{var s,c,m;(s=t==null?void 0:t.contactId)!=null&&s.value||i(""),(c=t==null?void 0:t.leadSourceId)!=null&&c.value||v(""),(m=t==null?void 0:t.leadStatus)!=null&&m.value||g("")},[t]),e.jsx(e.Fragment,{children:e.jsxs(T,{title:"Advanced Filter Selection Page",isOpen:h,portalClassName:"w30",footer:e.jsx(Ge,{onCancel:C,onSaveClick:x,onClearFilers:R}),onClose:C,onRequestClose:C,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:"Lead Source"})}),e.jsx(O,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,isClearable:!0,value:F,onChange:s=>v(s),options:E})]}),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:"Contact"})}),e.jsx(O,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,isClearable:!0,value:j,onChange:s=>i(s),options:k})]}),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:"Status"})}),e.jsx(O,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:D,onChange:s=>g(s),options:b})]})]})})};Q("LeadsData",we);Q("ContactsData",Ue);Q("AccountsData",Qe);const Us=()=>{var H,K,_,J,X,Y,Z,ee,se,ae,te,le,de,oe;const n="Leads",[u,h]=d.useState([]),[f,t]=d.useState(!1),[j,i]=d.useState(!1),[F,v]=d.useState(),[D,g]=d.useState(!1),b=Ve(n),C={edit:b.isEdit,delete:b.isDelete,view:b.isView},y=()=>{g(!0)},P=()=>{g(!1)},E=()=>{t(!0)},k=()=>{t(!1)},R=ve(),x=U(),s=r(a=>a.LeadsData.data.filterData),c=r(a=>a.LeadsData.data.loading),m=r(a=>a.LeadsData.data.leadList),{metrics:l}=r(a=>a.LeadsData.data),[o,L]=d.useState(null),{textTheme:ue}=ke(),{pageIndex:V,pageSize:B,sort:W,query:me}=r(a=>a.LeadsData.data.tableData);d.useEffect(()=>{xe()},[V,B,W,s,o]);const xe=()=>{var a,p,ie;x(re({pageIndex:V,pageSize:B,sort:W,query:me,...o!==null&&{leadStatus:o},...((a=s==null?void 0:s.leadSourceId)==null?void 0:a.value)&&{leadSourceId:s.leadSourceId.value},...((p=s==null?void 0:s.contactId)==null?void 0:p.value)&&{contactId:s.contactId.value},...((ie=s==null?void 0:s.leadStatus)==null?void 0:ie.value)&&{leadStatus:s.leadStatus.value}}))},S=({type:a})=>{switch(a){case"allLeads":return e.jsx(w,{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(Me,{})});case"newLeads":return e.jsx(w,{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(Re,{})});case"qualifiedLeads":return e.jsx(w,{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(Ee,{})});case"unqualifiedLeads":return e.jsx(w,{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(Pe,{})});case"inprogressLeads":return e.jsx(w,{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(ye,{})});default:return e.jsx("div",{})}},pe=a=>{R("/app/crm/lead-details/"+a.id)},[he,fe]=d.useState({pageSize:"",pageIndex:""}),je=(a,p)=>{p===$.view&&pe(a),p===$.edit&&(v(a.id),x(ce(a)),i(!0)),p===$.delete&&(x(q(!0)),x(ce(a)))},G=()=>{i(!1)},ge=[{dataField:"Action",caption:"Action",width:"75",cellRender:a=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx($e,{row:a==null?void 0:a.data,actions:C,buttonClick:je})})},{dataField:"leadName",caption:"Lead Name",width:"180",cellRender:a=>{var p;return e.jsx("div",{"data-cname":"Lead Name",children:e.jsx(Ce,{to:`/app/crm/lead-details/${(p=a==null?void 0:a.data)==null?void 0:p.id}`,className:`${ue} ml-2 rtl:mr-2`,children:a.value})})}},{dataField:"leadSource",caption:"Lead Source",width:"200"},{dataField:"accountName",caption:"Company",width:"200"},{dataField:"contactEmail",caption:"Email",width:"150"},{dataField:"contactNumber",caption:"Phone",width:"150"},{dataField:"completeAddress",caption:"Address",width:"300"},{dataField:"createdDate",caption:"Created On",width:"180",dataType:"date",format:"MM/dd/yyyy"},{dataField:"leadStatus",caption:"Status",width:"180"}],M=a=>{a==="leadSourceId"&&x(I({...s,leadSourceId:""})),a==="contactId"&&x(I({...s,contactId:""})),a==="leadStatus"&&x(I({...s,leadStatus:""}))};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(Be,{items:[{label:"CRM"},{label:"Leads"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Leads"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[b.isEdit&&e.jsx(A,{onClick:()=>E(),block:!0,variant:"solid",size:"sm",icon:e.jsx(Ae,{}),children:"Add Lead"}),e.jsx(T,{title:"Add Lead",isOpen:f,onClose:k,portalClassName:"w30",children:e.jsx(Oe,{footerWidth:"w30",onDrawerClose:k})}),e.jsx(T,{title:"Edit Lead",isOpen:j,onClose:G,portalClassName:"w30",children:e.jsx(ze,{footerWidth:"w30",id:F,onDrawerClose:G})})]})]})]}),e.jsxs(ne,{className:"h-full py-4 px-6 m-6 bg-transparent",bodyClass:"h-full",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 xl:grid-cols-5 gap-4 mb-5",children:[e.jsx(N,{onClick:()=>L(null),className:`crm-card crm-stat-card ${o==null?"is-selected":""}`,children:e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[e.jsx(S,{type:"allLeads"}),e.jsx("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",children:(l==null?void 0:l.totalLeads)||0}),e.jsx("p",{className:"font-semibold",children:"All Leads"})]})})]})}),e.jsx(N,{onClick:()=>L(1),className:`crm-card crm-stat-card ${o===1?"is-selected":""}`,children:e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[e.jsx(S,{type:"newLeads"}),e.jsx("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",children:(K=(H=l==null?void 0:l.statusCounts)==null?void 0:H.$values.find(a=>a.status==="New"))==null?void 0:K.count}),e.jsx("p",{className:"font-semibold",children:"New Leads"})]})})]})}),e.jsx(N,{onClick:()=>L(2),className:`crm-card crm-stat-card ${o===2?"is-selected":""}`,children:e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[e.jsx(S,{type:"qualifiedLeads"}),e.jsx("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",children:(J=(_=l==null?void 0:l.statusCounts)==null?void 0:_.$values.find(a=>a.status==="Qualified"))==null?void 0:J.count}),e.jsx("p",{className:"font-semibold",children:"Qualified Leads"})]})})]})}),e.jsx(N,{onClick:()=>L(3),className:`crm-card crm-stat-card ${o===3?"is-selected":""}`,children:e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[e.jsx(S,{type:"unqualifiedLeads"}),e.jsx("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",children:(Y=(X=l==null?void 0:l.statusCounts)==null?void 0:X.$values.find(a=>a.status==="UnQualified"))==null?void 0:Y.count}),e.jsx("p",{className:"font-semibold",children:"Unqualified Leads"})]})})]})}),e.jsx(N,{onClick:()=>L(5),className:`crm-card crm-stat-card ${o===5?"is-selected":""}`,children:e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[e.jsx(S,{type:"inprogressLeads"}),e.jsx("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",children:(ee=(Z=l==null?void 0:l.statusCounts)==null?void 0:Z.$values.find(a=>a.status==="Meeting"))==null?void 0:ee.count}),e.jsx("p",{className:"font-semibold",children:"Meeting"})]})})]})})]}),c&&e.jsx(be,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsxs(ne,{className:"borderless",children:[e.jsxs("div",{className:"text-right mb-3",children:[((se=s==null?void 0:s.leadSourceId)==null?void 0:se.value)&&e.jsx(z,{title:"Source",value:(ae=s==null?void 0:s.leadSourceId)==null?void 0:ae.label,onRemovefilter:M,tagId:"leadSourceId"}),((te=s==null?void 0:s.contactId)==null?void 0:te.value)&&e.jsx(z,{title:"Contact",value:(le=s==null?void 0:s.contactId)==null?void 0:le.label,onRemovefilter:M,tagId:"contactId"}),((de=s==null?void 0:s.leadStatus)==null?void 0:de.value)&&e.jsx(z,{title:"Status",value:(oe=s==null?void 0:s.leadStatus)==null?void 0:oe.label,onRemovefilter:M,tagId:"leadStatus"})]}),e.jsx(qe,{columns:ge,tableName:"Lead-List",data:m||[],height:"calc(100vh - 400px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:u,setSelectedRowId:h,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:he,setPager:fe,openFilter:y,isPaginationReq:!0,isFilterReq:!0,isSelectionReq:!1,isLoading:c})]})]}),e.jsx(We,{}),e.jsx(He,{isOpen:D,onClose:P})]})};export{Us as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as m}from"./vendor-mui-98daa63f.js";import{c as _,U as L,g as I,G as P}from"./index-3b5ce20a.js";import{r as $,L as y}from"./vendor-react-ece1c85f.js";function M(t,o){if(!o)return"/img/logo/";const s=o.replace(/\\/g,"/").split("/").map(encodeURIComponent).join("/");return`${t}/${s}`}const k="/img/logo/",A=t=>{const{type:o="full",mode:l="light",className:s,imgClass:d,style:p,logoWidth:h="auto"}=t,{logoIconLightMode:a,fullLogoIconLightMode:i,logoIconDarkMode:r,fullLogoIconDarkMode:c}=_(e=>e==null?void 0:e.theme),g=$.useMemo(()=>{const e={streamline_light:a,full_light:i,streamline_dark:r,full_dark:c},u=`${o}_${l}`,n=e[u],f=(n==null?void 0:n.settingFilePath)||"";return M(window.RUNTIME_CONFIG.VITE_API_BASE_URL,f)},[o,l,a,i,r,c]);return m.jsx(y,{to:L.authenticatedEntryPath,className:I("logo",s),style:{...p,width:h,display:"inline-block"},children:m.jsx("img",{style:{fill:`${l}`},className:d,src:g==="/img/logo/"?`${k}logo-${l}-${o}.png`:g,alt:`${P} logo`})})};export{A as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{A as l}from"./AdaptableCard-3d1e1f96.js";import{P as m}from"./PageBreadcrumb-cf54a6e9.js";import{M as p}from"./mapView-c8063ed6.js";import{r as i}from"./vendor-react-ece1c85f.js";import{a as u}from"./KeyVaultService-9608f0ff.js";import{dI as b}from"./index-3b5ce20a.js";import"./esm-c40433f8.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./useControllableState-d0909575.js";import"./index-a14e51de.js";import"./useDidUpdate-de319a18.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-i18n-b89304ef.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";const y="EncryptKeyVaultD",h=[{id:"2f3a5b24-bacf-4f29-9a4e-1f2b3a6e5d23",leadName:"Alice Johnson",leadSource:"Referral",accountName:"Acme Corp",website:"https://acme.com",contactPosistion:{positionName:"Sales Manager"},contactEmail:"alice.johnson@acme.com",contactNumber:"123-456-7890",address:"123 Main St",city:"Houston",state:"TX",zip:"77002",industry:"Technology",noOfEmployees:150,latitude:29.749907,longitude:-95.358421,hoveredRowKey:878888},{id:"6cb7f33e-1254-4d2a-b9a4-fef9a0840a41",leadName:"Bob Smith",leadSource:"Website",accountName:"Beta Ltd",website:"https://beta.com",contactPosistion:{positionName:"CTO"},contactEmail:"bob.smith@beta.com",contactNumber:"987-654-3210",address:"456 Market St",city:"Austin",state:"TX",zip:"73301",industry:"Finance",noOfEmployees:80,latitude:30.267153,longitude:-97.743057,hoveredRowKey:878888},{id:"891c9bbf-f8e9-4e1b-9b6b-5d2bbf81c24f",leadName:"Charlie Brown",leadSource:"LinkedIn",accountName:"Gamma Inc",website:"https://gamma.com",contactPosistion:{positionName:"Marketing Head"},contactEmail:"charlie.brown@gamma.com",contactNumber:"555-123-4567",address:"789 Elm St",city:"Dallas",state:"TX",zip:"75201",industry:"Retail",noOfEmployees:50,latitude:32.7767,longitude:-96.797,hoveredRowKey:878888},{id:"c3ed3344-76f3-4e9d-bae9-82d324c8e7ff",leadName:"Diana Prince",leadSource:"Email Campaign",accountName:"Delta LLC",website:"https://delta.com",contactPosistion:{positionName:"CEO"},contactEmail:"diana.prince@delta.com",contactNumber:"321-654-9870",address:"1600 Pennsylvania Ave NW",city:"Washington",state:"DC",zip:"20500",industry:"Government",noOfEmployees:1e3,latitude:38.8977,longitude:-77.0365,hoveredRowKey:878888},{id:"45a2e6de-9cb7-4d5a-9121-3e93d7bfa234",leadName:"Ethan Hunt",leadSource:"Cold Call",accountName:"Impossible Missions Force",website:"https://imf.gov",contactPosistion:{positionName:"Agent"},contactEmail:"ethan.hunt@imf.gov",contactNumber:"222-333-4444",address:"1 Mission Blvd",city:"San Diego",state:"CA",zip:"92101",industry:"Defense",noOfEmployees:500,latitude:32.7157,longitude:-117.1611,hoveredRowKey:878888},{id:"37f70c93-2899-4a4e-85e2-785d9b3e3c8e",leadName:"Fiona Gallagher",leadSource:"Inbound Call",accountName:"Shameless Inc",website:"https://shameless.com",contactPosistion:{positionName:"Operations Lead"},contactEmail:"fiona.gallagher@shameless.com",contactNumber:"777-888-9999",address:"742 Evergreen Terrace",city:"Springfield",state:"IL",zip:"62704",industry:"Hospitality",noOfEmployees:120,latitude:39.7817,longitude:-89.6501,hoveredRowKey:878888},{id:"1c94a0f3-bf83-4ab1-a95e-e1116c21b0ee",leadName:"George Costanza",leadSource:"Conference",accountName:"Vandelay Industries",website:"https://vandelay.com",contactPosistion:{positionName:"Importer/Exporter"},contactEmail:"george.costanza@vandelay.com",contactNumber:"444-555-6666",address:"129 W 81st St",city:"New York",state:"NY",zip:"10024",industry:"Import/Export",noOfEmployees:40,latitude:40.7812,longitude:-73.9665,hoveredRowKey:878888},{id:"9b3b2ad9-e0bc-40d0-9ab2-1609c9a97927",leadName:"Hannah Baker",leadSource:"Webinar",accountName:"Liberty High",website:"https://libertyhigh.edu",contactPosistion:{positionName:"Counselor"},contactEmail:"hannah.baker@libertyhigh.edu",contactNumber:"333-222-1111",address:"12 River Rd",city:"Portland",state:"OR",zip:"97201",industry:"Education",noOfEmployees:200,latitude:45.5051,longitude:-122.675,hoveredRowKey:878888},{id:"ae5e52dc-dcb0-4a76-a12c-3ebd9b31a168",leadName:"Ian Malcolm",leadSource:"Trade Show",accountName:"Jurassic Systems",website:"https://jurassic.tech",contactPosistion:{positionName:"Mathematician"},contactEmail:"ian.malcolm@jurassic.tech",contactNumber:"111-222-3333",address:"100 Jurassic Park Rd",city:"Honolulu",state:"HI",zip:"96801",industry:"Science",noOfEmployees:10,latitude:45.3451,longitude:-122.2355,hoveredRowKey:878888},{id:"e2e68d5f-51f4-4dc2-ae76-b121789ae2fd",leadName:"Jane Eyre",leadSource:"Newsletter",accountName:"Thornfield Hall",website:"https://thornfield.com",contactPosistion:{positionName:"Governess"},contactEmail:"jane.eyre@thornfield.com",contactNumber:"123-321-1234",address:"44 Bronte St",city:"Rochester",state:"NY",zip:"14604",industry:"Literature",noOfEmployees:5,latitude:43.1566,longitude:-77.6088,hoveredRowKey:878888}],L=()=>{const[t,s]=i.useState(""),n=async()=>{try{const o=(await u({})).data.$values.find(d=>d.key==="Google Maps");if(!o){console.error("Google Maps key not found");return}const c=o.value,r=await b(c,y);s(r)}catch(a){console.error("Error fetching data:",a)}};return i.useEffect(()=>{n()},[]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(m,{items:[{label:"Build"},{label:"Map View"}]}),e.jsx("div",{className:"lg:flex items-center justify-between",children:e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Map View"})})]}),e.jsx(l,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:t!=""&&e.jsx(p,{decryptValue:t,isDashboard:!0,properties:h})})]})};export{y as DECRYPTION_KEY,L as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{f as y,r as f}from"./vendor-react-ece1c85f.js";import{L as v}from"./Logo-dd6f7656.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 d=({name:s,size:r=18,stroke:i=1.8})=>{const a={width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:i,strokeLinecap:"round",strokeLinejoin:"round"};switch(s){case"arrow":return e.jsx("svg",{...a,children:e.jsx("path",{d:"M5 12h14M13 6l6 6-6 6"})});case"play":return e.jsx("svg",{...a,children:e.jsx("polygon",{points:"5,3 19,12 5,21",fill:"currentColor",stroke:"none"})});case"code":return e.jsxs("svg",{...a,children:[e.jsx("polyline",{points:"16 18 22 12 16 6"}),e.jsx("polyline",{points:"8 6 2 12 8 18"})]});case"layers":return e.jsxs("svg",{...a,children:[e.jsx("path",{d:"M12 2 2 7l10 5 10-5-10-5z"}),e.jsx("path",{d:"M2 17l10 5 10-5"}),e.jsx("path",{d:"M2 12l10 5 10-5"})]});case"grid":return e.jsxs("svg",{...a,children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),e.jsx("rect",{x:"3",y:"14",width:"7",height:"7"}),e.jsx("rect",{x:"14",y:"14",width:"7",height:"7"})]});case"sliders":return e.jsxs("svg",{...a,children:[e.jsx("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),e.jsx("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),e.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),e.jsx("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),e.jsx("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),e.jsx("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),e.jsx("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),e.jsx("line",{x1:"17",y1:"16",x2:"23",y2:"16"})]});case"plug":return e.jsxs("svg",{...a,children:[e.jsx("path",{d:"M9 2v6"}),e.jsx("path",{d:"M15 2v6"}),e.jsx("path",{d:"M5 8h14v3a7 7 0 0 1-14 0z"}),e.jsx("path",{d:"M12 18v4"})]});case"rocket":return e.jsxs("svg",{...a,children:[e.jsx("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),e.jsx("path",{d:"M12 15l-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),e.jsx("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),e.jsx("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]});case"shield":return e.jsx("svg",{...a,children:e.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})});case"users":return e.jsxs("svg",{...a,children:[e.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"9",cy:"7",r:"4"}),e.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),e.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]});case"check":return e.jsx("svg",{...a,children:e.jsx("polyline",{points:"20 6 9 17 4 12"})});case"git":return e.jsxs("svg",{...a,children:[e.jsx("circle",{cx:"18",cy:"18",r:"3"}),e.jsx("circle",{cx:"6",cy:"6",r:"3"}),e.jsx("path",{d:"M6 21V9a9 9 0 0 0 9 9"})]});case"spark":return e.jsx("svg",{...a,children:e.jsx("path",{d:"M12 2l2.4 7.4H22l-6 4.4 2.3 7.2-6.3-4.6-6.3 4.6L8 13.8 2 9.4h7.6z"})});case"table":return e.jsxs("svg",{...a,children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),e.jsx("line",{x1:"3",y1:"15",x2:"21",y2:"15"}),e.jsx("line",{x1:"9",y1:"3",x2:"9",y2:"21"})]});case"chart":return e.jsxs("svg",{...a,children:[e.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),e.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),e.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]});case"form":return e.jsxs("svg",{...a,children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M8 8h8M8 12h8M8 16h5"})]});case"kpi":return e.jsxs("svg",{...a,children:[e.jsx("path",{d:"M3 3v18h18"}),e.jsx("path",{d:"M7 14l4-4 4 4 5-5"})]});case"lock":return e.jsxs("svg",{...a,children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]});default:return null}},t={ink:"#1B1B1B",orange:"var(--custom-600)",muted:"#646464",line:"#E9E9E9",soft:"#F6F4F1",cream:"#FBF2EA",green:"#16A34A"},k=()=>e.jsxs("div",{className:"relative",style:{height:520},children:[e.jsxs("div",{className:"absolute inset-0 rounded-[18px] bg-white overflow-hidden border border-ca-slate-100",style:{boxShadow:"0 30px 80px rgba(20,20,20,0.12), 0 4px 12px rgba(20,20,20,0.06)"},children:[e.jsxs("div",{className:"flex items-center gap-1.5 h-9 px-3.5 border-b border-ca-slate-100",style:{background:t.soft},children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:"#FC6058"}}),e.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:"#FDBC40"}}),e.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:"#34C949"}}),e.jsx("span",{className:"ml-3 text-[11px] text-ca-slate-500 font-ibm-mono bg-white px-3 py-1 rounded-full border border-ca-slate-100",children:"app.acme.com / fleet · operations"})]}),e.jsxs("div",{className:"p-6 grid grid-cols-2 gap-3.5",children:[e.jsxs("div",{className:"rounded-[12px] p-3.5 border border-black/[.04]",style:{background:t.cream},children:[e.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.06em] text-ca-slate-500",children:"On-time rate"}),e.jsx("div",{className:"text-[28px] font-black text-ca-ink mt-1.5 leading-none tracking-[-0.02em]",children:"94.6%"}),e.jsx("div",{className:"text-[12px] font-bold mt-1",style:{color:t.green},children:"▲ 2.4 vs. last week"})]}),e.jsxs("div",{className:"rounded-[12px] p-3.5 border border-black/[.04]",style:{background:t.cream},children:[e.jsx("div",{className:"text-[11px] font-bold uppercase tracking-[0.06em] text-ca-slate-500",children:"Loads in transit"}),e.jsx("div",{className:"text-[28px] font-black text-ca-ink mt-1.5 leading-none tracking-[-0.02em]",children:"1,284"}),e.jsx("div",{className:"text-[12px] font-bold mt-1",style:{color:t.green},children:"▲ 118 since 9am"})]}),e.jsxs("div",{className:"col-span-2 bg-white border border-ca-slate-100 rounded-[12px] p-3.5 flex flex-col",style:{height:200},children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("div",{className:"text-[12px] font-bold text-ca-ink",children:"Throughput · last 12 weeks"}),e.jsxs("div",{className:"flex gap-2.5 text-[10px] text-ca-slate-500",children:[e.jsxs("span",{children:[e.jsx("i",{className:"inline-block w-2 h-2 rounded-[2px] mr-1 align-middle bg-ca-orange-500"}),"This year"]}),e.jsxs("span",{children:[e.jsx("i",{className:"inline-block w-2 h-2 rounded-[2px] mr-1 align-middle bg-ca-slate-200"}),"Last year"]})]})]}),e.jsxs("svg",{viewBox:"0 0 320 110",preserveAspectRatio:"none",className:"flex-1 w-full",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"hg",x1:"0",x2:"0",y1:"0",y2:"1",children:[e.jsx("stop",{offset:"0",stopColor:t.orange,stopOpacity:"0.32"}),e.jsx("stop",{offset:"1",stopColor:t.orange,stopOpacity:"0"})]})}),e.jsx("path",{d:"M0 78 L26 70 L52 75 L78 60 L104 65 L130 50 L156 55 L182 38 L208 42 L234 30 L260 22 L286 18 L320 10 L320 110 L0 110 Z",fill:"url(#hg)"}),e.jsx("path",{d:"M0 78 L26 70 L52 75 L78 60 L104 65 L130 50 L156 55 L182 38 L208 42 L234 30 L260 22 L286 18 L320 10",fill:"none",stroke:t.orange,strokeWidth:"2.4"}),e.jsx("path",{d:"M0 88 L26 86 L52 80 L78 84 L104 76 L130 78 L156 70 L182 72 L208 64 L234 66 L260 58 L286 60 L320 50",fill:"none",stroke:"#D9D9D9",strokeWidth:"1.6",strokeDasharray:"3 4"})]})]})]})]}),e.jsxs("div",{className:"absolute flex items-center gap-2.5 bg-white rounded-[12px] px-3.5 py-3 border border-ca-slate-100 text-[13px]",style:{bottom:24,left:-40,boxShadow:"0 20px 50px rgba(20,20,20,0.18)",animation:"mpFloatA 4s ease-in-out infinite"},children:[e.jsx("div",{className:"w-[30px] h-[30px] rounded-[8px] bg-ca-orange-500 text-white grid place-items-center flex-shrink-0",children:e.jsx(d,{name:"rocket",size:16})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-ca-ink text-[12px]",children:"Deployed in 3.2s"}),e.jsx("div",{className:"text-[11px] text-ca-slate-500",children:"production · v0.41.2"})]})]}),e.jsxs("div",{className:"absolute flex items-center gap-2.5 bg-white rounded-[12px] px-3.5 py-3 border border-ca-slate-100 text-[13px]",style:{top:50,right:-30,boxShadow:"0 20px 50px rgba(20,20,20,0.18)",animation:"mpFloatB 5s ease-in-out infinite"},children:[e.jsx("div",{className:"w-[30px] h-[30px] rounded-[8px] grid place-items-center flex-shrink-0 text-white bg-ca-ink",children:e.jsx(d,{name:"code",size:16})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-ca-ink text-[12px]",children:"~ 240 lines saved"}),e.jsx("div",{className:"text-[11px] text-ca-slate-500",children:"vs hand-rolled"})]})]})]}),N=({onCta:s})=>e.jsxs("section",{className:"relative pt-[90px] px-10 overflow-hidden",children:[e.jsx("div",{className:"absolute pointer-events-none",style:{top:-120,right:-160,width:540,height:540,background:"radial-gradient(circle, color-mix(in oklab, var(--custom-600) 18%, transparent), transparent 70%)"}}),e.jsxs("div",{className:"max-w-[1320px] mx-auto grid gap-16 items-center",style:{gridTemplateColumns:"1.05fr 1fr"},children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2.5 text-[13px] font-bold text-ca-ink bg-white border border-ca-slate-100 rounded-full px-3.5 py-1.5 mb-7",children:[e.jsx("span",{className:"bg-ca-orange-500 text-white text-[11px] px-2.5 py-[3px] rounded-full uppercase tracking-[0.04em]",children:"v2.0 · Sonoma"}),"AI-assisted layout suggestions are live",e.jsx(d,{name:"arrow",size:12,stroke:2.4})]}),e.jsxs("h1",{className:"font-lato font-black text-ca-ink mb-7 leading-[0.98] tracking-[-0.035em]",style:{fontSize:76},children:["The framework devs use to ship"," ",e.jsx("em",{className:"not-italic inline-block",style:{background:`linear-gradient(120deg, ${t.orange} 0%, #F49A5C 100%)`,WebkitBackgroundClip:"text",backgroundClip:"text",color:"transparent"},children:"internal apps in hours."})]}),e.jsx("p",{className:"text-[19px] leading-relaxed text-ca-slate-500 font-light max-w-[540px] mb-10",children:"xFramework is a low-code runtime for software teams. Drop in components, connect your data, theme it to your brand — and get a production app with auth, perms and audit baked in. No more “internal tool tax.”"}),e.jsxs("div",{className:"flex items-center gap-3.5 flex-wrap",children:[e.jsxs("button",{className:"inline-flex items-center gap-2.5 font-lato font-bold text-[16px] px-7 py-4 rounded-full border-0 cursor-pointer text-white bg-ca-ink transition-all duration-200 active:scale-[0.98]",onClick:s,children:["Start building free ",e.jsx(d,{name:"arrow",size:16,stroke:2.4})]}),e.jsxs("a",{href:"#mp-tour",className:"inline-flex items-center gap-2.5 font-lato font-bold text-[16px] px-7 py-4 rounded-full border border-ca-slate-100 text-ca-ink no-underline hover:border-ca-ink transition-all duration-200",children:[e.jsx(d,{name:"play",size:14})," Take the tour"]})]}),e.jsxs("div",{className:"flex items-center gap-4 mt-6 text-[13px] text-ca-slate-500",children:[e.jsxs("span",{children:[e.jsx("span",{className:"inline-grid place-items-center w-4 h-4 rounded-full mr-1 font-black text-[10px]",style:{background:"#DBF1E1",color:t.green},children:"✓"})," No credit card"]}),e.jsxs("span",{children:[e.jsx("span",{className:"inline-grid place-items-center w-4 h-4 rounded-full mr-1 font-black text-[10px]",style:{background:"#DBF1E1",color:t.green},children:"✓"})," SOC 2 Type II"]}),e.jsxs("span",{children:[e.jsx("span",{className:"inline-grid place-items-center w-4 h-4 rounded-full mr-1 font-black text-[10px]",style:{background:"#DBF1E1",color:t.green},children:"✓"})," Self-host or cloud"]})]})]}),e.jsx(k,{})]})]}),w=()=>e.jsx("section",{className:"mt-[110px] py-[30px] px-10 border-t border-b border-ca-slate-100",children:e.jsxs("div",{className:"max-w-[1320px] mx-auto flex items-center gap-[60px] flex-wrap",children:[e.jsx("div",{className:"text-[12px] font-bold uppercase tracking-[0.14em] text-ca-slate-500 flex-shrink-0",children:"Trusted by software teams at"}),e.jsx("div",{className:"flex-1 flex gap-[50px] flex-wrap items-center",children:["CARGOWAVE","Lumenly","Northstar.io","MHX Logistics","Foundry42","Hyperloop"].map(s=>e.jsx("span",{className:"font-lato font-black text-[19px] tracking-[-0.01em] opacity-75",style:{color:"#999"},children:s},s))})]})}),S=[{icon:"code",title:"For developers",body:"Stop writing the same CRUD screen for the fourth time this quarter. Compose pages from typed components, override anything in code.",items:["TypeScript SDK + REST & GraphQL adapters","Drop into Next, Remix, or any React app","Custom components with full hot reload"]},{icon:"layers",title:"For software companies",body:"Turn your back-office tools into a product surface. White-label themes, multi-tenant orgs, audit logs — all in the box.",items:["Theme to your brand in < 5 minutes","RBAC, SSO (SAML, OIDC), SCIM provisioning","Per-customer subdomains & data scoping"]},{icon:"rocket",title:"For shipping fast",body:"Click build, configure, ship. Roles, permissions and audit are wired automatically — you never touch a migration just to add a column.",items:["One-click deploy to xFramework Cloud","Self-host with Docker or Helm in 10 minutes","Versioned releases with rollback"]}],L=()=>e.jsx("section",{className:"pt-[110px] px-10",id:"mp-why",children:e.jsxs("div",{className:"max-w-[1320px] mx-auto",children:[e.jsxs("div",{className:"grid gap-[60px] mb-[60px] items-end",style:{gridTemplateColumns:"1fr 1fr"},children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[12px] font-bold tracking-[0.14em] uppercase text-ca-orange-500 mb-5",children:"Why xFramework"}),e.jsx("h2",{className:"font-lato font-black text-ca-ink m-0 leading-[1.02] tracking-[-0.03em]",style:{fontSize:56},children:"Built for the people who get pinged on Slack at midnight."})]}),e.jsx("p",{className:"text-[18px] text-ca-slate-500 font-light leading-relaxed max-w-[480px] m-0",children:"A framework that respects your stack. Use it as a full app, embed it inside your product, or call it like a library — your call."})]}),e.jsx("div",{className:"grid grid-cols-3 gap-[18px]",children:S.map(s=>e.jsxs("article",{className:"bg-white border border-ca-slate-100 rounded-[18px] p-8 transition-all duration-200 hover:-translate-y-0.5",onMouseEnter:r=>{r.currentTarget.style.borderColor=t.ink,r.currentTarget.style.boxShadow="0 12px 30px rgba(20,20,20,0.06)"},onMouseLeave:r=>{r.currentTarget.style.borderColor="",r.currentTarget.style.boxShadow=""},children:[e.jsx("div",{className:"w-11 h-11 rounded-[10px] grid place-items-center text-ca-orange-500 mb-5",style:{background:t.cream},children:e.jsx(d,{name:s.icon,size:22})}),e.jsx("h3",{className:"font-lato font-black text-[22px] text-ca-ink tracking-[-0.01em] mb-3 mt-0",children:s.title}),e.jsx("p",{className:"text-[15px] leading-relaxed text-ca-slate-500 font-light mb-4 mt-0",children:s.body}),e.jsx("ul",{className:"list-none p-0 m-0 flex flex-col gap-2",children:s.items.map(r=>e.jsxs("li",{className:"flex gap-2.5 text-[14px] text-ca-slate-700",children:[e.jsx("span",{className:"inline-grid place-items-center w-4 h-4 rounded-full bg-ca-orange-500 flex-shrink-0 mt-0.5 text-[9px] font-black text-white",children:"✓"}),r]},r))})]},s.title))})]})}),R=()=>e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center",style:{gap:8,padding:"8px 0 14px",borderBottom:`1px solid ${t.line}`,marginBottom:18},children:[["Build","Templates","Recents"].map((s,r)=>e.jsx("span",{style:{fontSize:12,fontWeight:700,padding:"6px 12px",borderRadius:999,background:r===0?t.ink:t.soft,color:r===0?"#fff":t.muted},children:s},s)),e.jsx("span",{className:"flex-1"}),e.jsx("span",{className:"inline-flex items-center",style:{gap:6,fontSize:11,fontWeight:700,background:t.cream,color:t.orange,padding:"4px 10px",borderRadius:999},children:"⌘B"})]}),e.jsxs("div",{className:"grid",style:{gridTemplateColumns:"1fr 1fr",gap:14},children:[e.jsxs("div",{className:"relative",style:{border:`1.5px solid ${t.orange}`,borderRadius:14,padding:22,background:`linear-gradient(180deg, ${t.cream}, #fff)`},children:[e.jsx("div",{className:"absolute",style:{top:14,right:14,fontSize:10,fontWeight:700,background:t.orange,color:"#fff",padding:"3px 10px",borderRadius:999},children:"Most used"}),e.jsx("div",{className:"grid",style:{width:40,height:40,borderRadius:10,background:t.orange,color:"#fff",placeItems:"center",marginBottom:16},children:e.jsx(d,{name:"layers",size:20})}),e.jsx("h4",{style:{fontWeight:900,fontSize:18,margin:"0 0 6px",color:t.ink},children:"Page"}),e.jsx("p",{style:{fontSize:13,color:t.muted,margin:"0 0 14px",lineHeight:1.5},children:"A focused screen — table, form, detail or workflow."}),e.jsx("div",{className:"flex flex-wrap",style:{gap:6},children:["Driver list","Create order","Invoice detail"].map(s=>e.jsx("span",{style:{fontSize:10,padding:"3px 8px",borderRadius:999,background:t.soft,color:"#333",fontWeight:700},children:s},s))})]}),e.jsxs("div",{style:{border:`1.5px solid ${t.line}`,borderRadius:14,padding:22,background:"#fff"},children:[e.jsx("div",{className:"grid",style:{width:40,height:40,borderRadius:10,background:t.ink,color:t.orange,placeItems:"center",marginBottom:16},children:e.jsx(d,{name:"grid",size:20})}),e.jsx("h4",{style:{fontWeight:900,fontSize:18,margin:"0 0 6px",color:t.ink},children:"Dashboard"}),e.jsx("p",{style:{fontSize:13,color:t.muted,margin:"0 0 14px",lineHeight:1.5},children:"Live grid of widgets that auto-refresh."}),e.jsx("div",{className:"flex flex-wrap",style:{gap:6},children:["Ops overview","Sales pipeline","Site health"].map(s=>e.jsx("span",{style:{fontSize:10,padding:"3px 8px",borderRadius:999,background:t.soft,color:"#333",fontWeight:700},children:s},s))})]})]}),e.jsxs("div",{style:{marginTop:18,background:t.soft,borderRadius:12,padding:"14px 16px"},children:[e.jsxs("div",{className:"flex justify-between items-center",style:{marginBottom:10},children:[e.jsx("span",{style:{fontSize:12,fontWeight:700,color:t.ink},children:"Continue where you left off"}),e.jsx("span",{style:{fontSize:11,color:t.orange,fontWeight:700},children:"View all →"})]}),[["kpi","Executive Overview","Analytics / Executive overview","2h ago"],["table","Driver Performance","Operations / Fleet","Yesterday"],["form","Ticket Intake Form","Support / Tickets","3d ago"]].map(([s,r,i,a])=>e.jsxs("div",{className:"flex items-center",style:{gap:10,padding:"8px 0",borderTop:`1px solid ${t.line}`},children:[e.jsx("div",{className:"grid",style:{width:26,height:26,borderRadius:6,background:"#fff",placeItems:"center",color:t.orange},children:e.jsx(d,{name:s,size:14})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{style:{fontSize:12,fontWeight:700,color:t.ink},children:r}),e.jsx("div",{style:{fontSize:10,color:t.muted},children:i})]}),e.jsx("div",{style:{fontSize:10,color:t.muted},children:a})]},r))]})]}),T=()=>e.jsxs("div",{className:"grid h-full",style:{gridTemplateColumns:"200px 1fr",gap:14},children:[e.jsx("div",{className:"flex flex-col",style:{background:t.soft,borderRadius:12,padding:14,gap:4},children:[{grp:"Data",items:[["table","Data Table",!0],["kpi","KPI Stats"],["form","Form"]]},{grp:"Visualize",items:[["chart","Graph"],["grid","Donut"]]},{grp:"Layout",items:[["layers","Header"]]}].map(({grp:s,items:r})=>e.jsxs("div",{children:[e.jsx("div",{className:"uppercase",style:{fontSize:10,fontWeight:700,color:t.muted,letterSpacing:"0.08em",padding:"8px 10px 4px"},children:s}),r.map(([i,a,n])=>e.jsxs("div",{className:"flex items-center",style:{gap:10,padding:"8px 10px",borderRadius:8,fontSize:12,color:n?t.ink:"#333",fontWeight:n?700:500,background:n?"#fff":"transparent",boxShadow:n?"0 1px 2px rgba(0,0,0,0.04)":"none"},children:[e.jsx("div",{className:"grid",style:{width:22,height:22,borderRadius:5,background:n?t.orange:"#fff",placeItems:"center",color:n?"#fff":t.orange},children:e.jsx(d,{name:i,size:12})}),a]},a))]},s))}),e.jsxs("div",{className:"flex flex-col",style:{background:"#fff",border:`2px dashed ${t.line}`,borderRadius:12,padding:16,gap:10},children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{style:{fontSize:13,fontWeight:900,color:t.ink},children:"Driver Performance · canvas"}),e.jsx("span",{style:{fontSize:11,color:t.muted,fontWeight:700},children:"auto-pack: ON"})]}),e.jsx("div",{className:"grid",style:{background:t.cream,border:"1px solid color-mix(in oklab, var(--custom-600) 20%, transparent)",borderRadius:10,padding:14,gridTemplateColumns:"repeat(3,1fr)",gap:10},children:[["On-time","94.6%","▲ 2.4"],["Avg idle","18m","▼ 6m"],["Routes","142","▲ 8"]].map(([s,r,i])=>e.jsxs("div",{children:[e.jsx("div",{className:"uppercase",style:{fontSize:9,color:t.muted,fontWeight:700,letterSpacing:"0.06em"},children:s}),e.jsx("div",{style:{fontSize:22,fontWeight:900,color:t.ink,marginTop:2,lineHeight:1},children:r}),e.jsx("div",{style:{fontSize:10,color:t.green,fontWeight:700},children:i})]},s))}),e.jsxs("div",{style:{background:"#fff",border:`1px solid ${t.line}`,borderRadius:10,padding:12},children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,color:t.ink,marginBottom:8},children:"Driver list"}),["M. Reyes","T. Okafor","B. Andrade","S. Han"].map((s,r)=>e.jsxs("div",{className:"grid items-center",style:{gridTemplateColumns:"1fr 60px 60px 50px",fontSize:11,gap:8,padding:"5px 0",borderTop:r===0?"0":`1px solid ${t.line}`},children:[e.jsx("span",{style:{fontWeight:700,color:t.ink},children:s}),e.jsxs("span",{style:{color:t.muted},children:["R-0",r+1]}),e.jsx("span",{style:{color:r===2?"#E8A33A":t.green,fontWeight:700},children:r===2?"Idle":"On route"}),e.jsxs("span",{className:"text-right",style:{fontWeight:700,color:t.ink},children:[[98,95,82,99][r],"%"]})]},s))]}),e.jsx("div",{className:"text-center",style:{border:`2px dashed ${t.orange}`,background:t.cream,color:t.orange,fontWeight:700,padding:28,fontSize:13,borderRadius:10},children:"+ Drop 'Graph' here"})]})]}),z=()=>e.jsxs("div",{className:"grid h-full",style:{gridTemplateColumns:"1.1fr 1fr",gap:14},children:[e.jsx("div",{className:"overflow-hidden",style:{background:t.soft,borderRadius:12,padding:18},children:[{label:"Widget title",type:"input",value:"Throughput · last 12 months"},{label:"Chart type",type:"seg",opts:["Bar","Line","Area","Stack"],active:"Bar"},{label:"Series",type:"chips",opts:["This year","Last year","Forecast","Target"],active:["This year","Last year"]},{label:"Refresh",type:"seg",opts:["Off","1m","5m","15m"],active:"5m"},{label:"Width",type:"seg",opts:["¼","½","Full"],active:"Full"}].map(s=>e.jsxs("div",{className:"flex flex-col",style:{gap:6,marginBottom:14},children:[e.jsx("label",{className:"uppercase",style:{fontSize:11,fontWeight:700,color:t.muted,letterSpacing:"0.06em"},children:s.label}),s.type==="input"&&e.jsx("div",{className:"flex items-center",style:{background:"#fff",border:`1px solid ${t.orange}`,borderRadius:8,padding:"8px 12px",fontSize:13,color:t.ink,fontWeight:500,boxShadow:"0 0 0 3px color-mix(in oklab, var(--custom-600) 15%, transparent)"},children:s.value}),s.type==="seg"&&e.jsx("div",{className:"flex",style:{background:"#fff",border:`1px solid ${t.line}`,borderRadius:8,padding:3},children:(s.opts??[]).map(r=>e.jsx("button",{className:"flex-1 cursor-pointer",style:{fontSize:11,fontWeight:700,padding:"6px 8px",background:r===s.active?t.ink:"transparent",border:0,borderRadius:6,color:r===s.active?"#fff":t.muted},children:r},r))}),s.type==="chips"&&e.jsx("div",{className:"flex flex-wrap",style:{gap:6},children:(s.opts??[]).map(r=>{var i,a,n;return e.jsx("span",{style:{fontSize:11,fontWeight:700,padding:"4px 10px",borderRadius:999,background:(i=s.active)!=null&&i.includes(r)?t.orange:"#fff",border:`1px solid ${(a=s.active)!=null&&a.includes(r)?t.orange:t.line}`,color:(n=s.active)!=null&&n.includes(r)?"#fff":"#333"},children:r},r)})})]},s.label))}),e.jsxs("div",{className:"flex flex-col",style:{background:"#fff",border:`1px solid ${t.line}`,borderRadius:12,padding:16},children:[e.jsxs("div",{className:"flex items-center uppercase",style:{fontSize:10,fontWeight:700,color:t.muted,letterSpacing:"0.08em",marginBottom:12,gap:8},children:[e.jsx("span",{className:"inline-block",style:{width:7,height:7,borderRadius:999,background:t.green,boxShadow:"0 0 0 4px rgba(22,163,74,0.18)"}}),"Live preview · real data"]}),e.jsxs("div",{style:{background:t.cream,borderRadius:10,padding:14},children:[e.jsx("div",{style:{fontSize:13,fontWeight:900,color:t.ink,marginBottom:8},children:"Throughput · last 12 months"}),e.jsx("svg",{viewBox:"0 0 280 100",className:"w-full",style:{height:90},children:[36,44,30,52,48,60,55,68,62,74,80,88].map((s,r)=>e.jsx("rect",{x:r*22+6,y:100-s,width:"14",height:s,rx:"2",fill:r>9?t.orange:t.ink},r))})]}),e.jsxs("div",{className:"grid",style:{marginTop:12,gridTemplateColumns:"1fr 1fr",gap:8},children:[e.jsxs("div",{style:{background:t.soft,borderRadius:8,padding:10},children:[e.jsx("div",{className:"uppercase",style:{fontSize:9,color:t.muted,fontWeight:700,letterSpacing:"0.06em"},children:"Total YTD"}),e.jsx("div",{style:{fontSize:18,fontWeight:900,color:t.ink,letterSpacing:"-0.02em"},children:"184,420"})]}),e.jsxs("div",{style:{background:t.soft,borderRadius:8,padding:10},children:[e.jsx("div",{className:"uppercase",style:{fontSize:9,color:t.muted,fontWeight:700,letterSpacing:"0.06em"},children:"vs LY"}),e.jsx("div",{style:{fontSize:18,fontWeight:900,color:t.green,letterSpacing:"-0.02em"},children:"+18.2%"})]})]})]})]}),C=()=>e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsx("div",{style:{fontWeight:900,fontSize:16,color:t.ink,marginBottom:6},children:"Connect a data source"}),e.jsx("div",{style:{fontSize:12,color:t.muted,marginBottom:14},children:"9 native adapters. Schemas auto-introspect on connect."}),e.jsx("div",{className:"grid",style:{gridTemplateColumns:"repeat(4,1fr)",gap:10,marginBottom:16},children:[["#336791","Pg","Postgres",!0],["#00758F","My","MySQL"],["#13AA52","Mo","MongoDB",!0],["#29B5E8","SF","Snowflake"],["#E10098","GQ","GraphQL"],["#1B1B1B","RX","REST"],["#FF9900","S3","Amazon S3"],["#5C2D91","BQ","BigQuery"]].map(([s,r,i,a])=>e.jsxs("div",{className:"text-center flex flex-col items-center relative",style:{background:a?t.cream:"#fff",border:`1.5px solid ${a?t.orange:t.line}`,borderRadius:10,padding:"12px 10px",gap:6,fontSize:11,fontWeight:700,color:t.ink},children:[a&&e.jsx("span",{className:"absolute grid",style:{top:6,right:8,width:14,height:14,borderRadius:999,background:t.green,color:"#fff",fontSize:9,fontWeight:900,placeItems:"center"},children:"✓"}),e.jsx("div",{className:"grid",style:{width:32,height:32,borderRadius:8,background:s,placeItems:"center",fontWeight:900,fontSize:14,color:"#fff"},children:r}),i]},i))}),e.jsxs("div",{className:"flex-1",style:{background:t.ink,color:"#fff",borderRadius:10,padding:16,fontFamily:"IBM Plex Mono, monospace",fontSize:12,lineHeight:1.7},children:[e.jsx("div",{children:e.jsx("span",{style:{color:"#6e7681"},children:"// driver_performance · Postgres"})}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#ff7b72"},children:"select"})," d.id, d.name,"]}),e.jsxs("div",{children:[" ",e.jsx("span",{style:{color:"#d2a8ff"},children:"avg"}),"(r.on_time)::",e.jsx("span",{style:{color:"#ff7b72"},children:"numeric"}),"(",e.jsx("span",{style:{color:"#79c0ff"},children:"5"}),",",e.jsx("span",{style:{color:"#79c0ff"},children:"2"}),") ",e.jsx("span",{style:{color:"#ff7b72"},children:"as"})," rate,"]}),e.jsxs("div",{children:[" ",e.jsx("span",{style:{color:"#d2a8ff"},children:"count"}),"(r.id) ",e.jsx("span",{style:{color:"#ff7b72"},children:"as"})," trips"]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#ff7b72"},children:"from"})," drivers d"]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#ff7b72"},children:"join"})," routes r ",e.jsx("span",{style:{color:"#ff7b72"},children:"on"})," r.driver_id = d.id"]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#ff7b72"},children:"where"})," r.completed_at > ",e.jsx("span",{style:{color:"#a5d6ff"},children:"'2026-04-01'"})]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#ff7b72"},children:"group by"})," ",e.jsx("span",{style:{color:"#79c0ff"},children:"1"}),", ",e.jsx("span",{style:{color:"#79c0ff"},children:"2"}),";"]})]})]}),B=()=>e.jsxs("div",{className:"h-full flex flex-col",style:{gap:12},children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{style:{fontWeight:900,fontSize:18,color:t.ink,margin:0},children:"Operations · live"}),e.jsxs("span",{className:"flex items-center",style:{fontSize:11,color:t.green,fontWeight:700,gap:6},children:[e.jsx("i",{className:"inline-block",style:{width:7,height:7,background:t.green,borderRadius:999,boxShadow:"0 0 0 4px rgba(22,163,74,0.2)"}}),"auto · 5m"]})]}),e.jsxs("div",{className:"grid flex-1",style:{gridTemplateColumns:"repeat(4,1fr)",gridAutoRows:80,gap:10},children:[[{l:"On-time",v:"94.6%",d:"▲ 2.4",accent:!0},{l:"In transit",v:"1,284",d:"▲ 118"},{l:"Avg idle",v:"18m",d:"▼ 6m"},{l:"Exceptions",v:"7",dark:!0}].map(s=>e.jsxs("div",{className:"flex flex-col",style:{background:s.dark?t.ink:s.accent?t.cream:"#fff",border:`1px solid ${s.dark?t.ink:s.accent?"color-mix(in oklab, var(--custom-600) 20%, transparent)":t.line}`,borderRadius:10,padding:12},children:[e.jsx("div",{className:"uppercase",style:{fontSize:9,color:s.dark?"rgba(255,255,255,0.5)":t.muted,fontWeight:700,letterSpacing:"0.06em"},children:s.l}),e.jsx("div",{style:{fontSize:22,fontWeight:900,color:s.dark?"#fff":t.ink,lineHeight:1,marginTop:4},children:s.v}),s.d&&e.jsx("div",{style:{fontSize:10,color:t.green,fontWeight:700,marginTop:2},children:s.d})]},s.l)),e.jsxs("div",{style:{gridColumn:"span 2",gridRow:"span 2",background:"#fff",border:`1px solid ${t.line}`,borderRadius:10,padding:12},children:[e.jsx("div",{className:"uppercase",style:{fontSize:9,color:t.muted,fontWeight:700,letterSpacing:"0.06em"},children:"Throughput · 12m"}),e.jsx("svg",{viewBox:"0 0 200 90",style:{marginTop:6},children:[24,32,26,40,36,48,44,54,58,64,70,80].map((s,r)=>e.jsx("rect",{x:r*15+6,y:90-s,width:"9",height:s,rx:"1.5",fill:r>9?t.orange:t.ink},r))})]}),e.jsxs("div",{style:{gridColumn:"span 2",gridRow:"span 2",background:"#fff",border:`1px solid ${t.line}`,borderRadius:10,padding:12},children:[e.jsx("div",{className:"uppercase",style:{fontSize:9,color:t.muted,fontWeight:700,letterSpacing:"0.06em"},children:"On-time trend"}),e.jsxs("svg",{viewBox:"0 0 200 90",className:"w-full",style:{marginTop:6},children:[e.jsx("path",{d:"M0 60 L20 50 L40 56 L60 42 L80 46 L100 32 L120 38 L140 22 L160 28 L180 18 L200 12",fill:"none",stroke:t.orange,strokeWidth:"2.4"}),e.jsx("path",{d:"M0 60 L20 50 L40 56 L60 42 L80 46 L100 32 L120 38 L140 22 L160 28 L180 18 L200 12 L200 90 L0 90 Z",fill:t.orange,fillOpacity:"0.12"})]})]})]})]}),D=()=>e.jsxs("div",{className:"h-full flex flex-col",style:{gap:14},children:[e.jsx("div",{style:{fontWeight:900,fontSize:18,color:t.ink},children:"Publish · production"}),e.jsx("div",{className:"grid",style:{gridTemplateColumns:"1fr 1fr",gap:10},children:[{l:"Version",v:"v0.41.2 · just now",dark:!1},{l:"URL",v:"app.acme.com/fleet",dark:!0,code:!0},{l:"Build",v:"3.2s ✓",dark:!0},{l:"Auth",v:"SSO · Okta",dark:!1}].map(s=>e.jsxs("div",{style:{background:s.dark?t.ink:t.soft,borderRadius:12,padding:14},children:[e.jsx("div",{className:"uppercase",style:{fontSize:10,fontWeight:700,letterSpacing:"0.08em",color:s.dark?"rgba(255,255,255,0.5)":t.muted,marginBottom:8},children:s.l}),e.jsx("div",{style:{fontSize:14,fontWeight:700,color:s.dark?"#fff":t.ink},children:s.code?e.jsx("code",{style:{background:"rgba(255,255,255,0.08)",padding:"2px 8px",borderRadius:4,fontFamily:"IBM Plex Mono, monospace",fontSize:11,color:"#ffd9b8"},children:s.v}):s.v})]},s.l))}),e.jsxs("div",{className:"flex-1",style:{background:"#fff",border:`1px solid ${t.line}`,borderRadius:12,padding:14},children:[e.jsx("div",{className:"uppercase",style:{fontSize:11,fontWeight:700,color:t.muted,letterSpacing:"0.08em",marginBottom:6},children:"Roles & permissions"}),[{av:"BO",avBg:t.orange,name:"Brian Olivier",role:"Workspace Admin · all apps",perm:"Admin",permStyle:{background:t.ink,color:"#fff"}},{av:"SH",avBg:t.ink,name:"Sara Han",role:"Operations team",perm:"Editor",permStyle:{background:t.cream,color:t.orange}},{av:"MR",avBg:t.muted,name:"Maria Reyes",role:"Dispatch (East)",perm:"Viewer",permStyle:{background:"#E6F4EC",color:t.green}}].map((s,r)=>e.jsxs("div",{className:"flex items-center",style:{gap:10,padding:"8px 0",borderTop:r===0?"0":`1px solid ${t.line}`},children:[e.jsx("div",{className:"grid",style:{width:28,height:28,borderRadius:999,background:s.avBg,placeItems:"center",color:"#fff",fontSize:11,fontWeight:900},children:s.av}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{style:{fontSize:12,fontWeight:700,color:t.ink},children:s.name}),e.jsx("div",{style:{fontSize:11,color:t.muted},children:s.role})]}),e.jsx("div",{style:{fontSize:11,fontWeight:700,padding:"4px 10px",borderRadius:999,...s.permStyle},children:s.perm})]},s.name))]})]}),u=[{n:"01",title:"Start with Build, not a blank file.",body:"Every screen begins from one button. Pick a Page for a structured workflow — table, form, detail. Pick a Dashboard to monitor what's happening. Pick up where you left off from Recents.",tags:["Pages","Dashboards","Recents","Templates"],frame:R},{n:"02",title:"Drag in components, not bug tickets.",body:"13 first-class building blocks — data tables, forms, KPIs, graphs, donuts, alerts, file uploads, headers. Drag, drop, snap. Layouts auto-pack so you can't break the grid.",tags:["Data Table","Form","KPI","Graph","Donut","Alert"],frame:T},{n:"03",title:"Configure live, no preview-pane lies.",body:"Every component opens a configurator. Tweak titles, columns, breakpoints, filters, units. The preview re-renders against real data as you type — so what you see in dev is what ships.",tags:["Live preview","Real data","Validation","Conditional logic"],frame:z},{n:"04",title:"Connect anything that has a URL.",body:"Postgres, MySQL, Mongo, REST, GraphQL, Snowflake, S3 — point it, query it, cache it. Bring credentials from your secrets manager, or roll xFramework's vault.",tags:["Postgres","REST","GraphQL","Snowflake","S3"],frame:C},{n:"05",title:"Roll up to dashboards stakeholders won't ignore.",body:"Mix KPIs, charts, donuts, and tables on a true grid. Refresh intervals are per-widget. Filters cascade. Export PNG or PDF. Pin a dashboard to a TV in ops with one URL.",tags:["Auto-refresh","Drilldown","TV mode","Cascading filters"],frame:B},{n:"06",title:"Ship with auth, audit, and rollback for free.",body:"Publish puts your app on a real URL with versioning, role-based access, SSO, and a full audit log. Roll back to any prior version in one click. No infra ticket.",tags:["SSO / SAML","RBAC","Audit log","Versioning"],frame:D}],F=()=>{const[s,r]=f.useState(0),[i,a]=f.useState(0),n=f.useRef([]),h=f.useRef(null);f.useEffect(()=>{const c=new IntersectionObserver(o=>{o.forEach(p=>{if(!p.isIntersecting)return;const m=n.current.findIndex(b=>b===p.target);m!==-1&&r(m)})},{threshold:0,rootMargin:"-30% 0px -45% 0px"});n.current.forEach(o=>o&&c.observe(o));const l=o=>{if(!o||o===document.documentElement)return window;const{overflowY:p}=getComputedStyle(o);return(p==="auto"||p==="scroll")&&o.scrollHeight>o.clientHeight?o:l(o.parentElement)},x=h.current?l(h.current.parentElement):window,g=()=>{if(!h.current)return;const o=window.innerHeight,p=h.current.getBoundingClientRect(),m=p.height-o,b=Math.min(Math.max(-p.top,0),m);a(m>0?b/m:0)};return g(),x.addEventListener("scroll",g,{passive:!0}),window.addEventListener("resize",g),()=>{c.disconnect(),x.removeEventListener("scroll",g),window.removeEventListener("resize",g)}},[]);const j=c=>{var l;(l=n.current[c])==null||l.scrollIntoView({behavior:"smooth",block:"center"})};return e.jsx("section",{ref:h,className:"mt-[140px] px-6 rounded-t-[32px] bg-ca-ink text-white",id:"mp-tour",children:e.jsxs("div",{className:"max-w-[1320px] mx-auto pt-[100px]",children:[e.jsxs("div",{className:"grid gap-[60px] mb-[60px] items-end",style:{gridTemplateColumns:"1fr 1fr"},children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[12px] font-bold tracking-[0.14em] uppercase text-ca-orange-500 mb-[18px]",children:"The tour · 90 seconds"}),e.jsxs("h2",{className:"font-lato font-black leading-none tracking-[-0.03em] m-0 text-white",style:{fontSize:60},children:["Watch a developer ship an app, ",e.jsx("em",{className:"not-italic text-ca-orange-500",children:"scroll by scroll."})]})]}),e.jsx("p",{className:"text-[18px] font-light leading-relaxed m-0",style:{color:"rgba(255,255,255,0.65)"},children:"Six steps — same path you'll take the first time you sign in. Scroll through to see the framework think."})]}),e.jsxs("div",{className:"relative grid gap-[80px] pb-[100px]",style:{gridTemplateColumns:"1fr 1.25fr"},children:[e.jsx("div",{className:"absolute rounded-full",style:{left:-28,top:100,width:2,height:"calc(100% - 200px)",background:"rgba(255,255,255,0.08)"},children:e.jsx("i",{className:"block w-full rounded-full transition-all duration-200",style:{background:t.orange,height:`${i*100}%`}})}),e.jsx("div",{className:"flex flex-col",children:u.map((c,l)=>e.jsxs("div",{ref:x=>{n.current[l]=x},className:"py-[60px] cursor-pointer transition-opacity duration-[400ms]",style:{borderTop:l===0?"0":"1px solid rgba(255,255,255,0.1)",opacity:s===l?1:.35},onClick:()=>j(l),children:[e.jsxs("div",{className:"font-ibm-mono text-[13px] text-ca-orange-500 tracking-[0.1em] mb-[18px] flex items-center gap-3",children:[e.jsx("span",{children:c.n}),e.jsx("span",{className:"h-px flex-1 relative max-w-[40px]",style:{background:"rgba(255,255,255,0.15)"},children:e.jsx("i",{className:"absolute left-0 top-0 h-full rounded-full transition-all duration-[600ms]",style:{background:t.orange,width:s===l?"100%":"0%"}})}),e.jsxs("span",{style:{color:"rgba(255,255,255,0.4)"},children:[String(l+1).padStart(2,"0")," / ",String(u.length).padStart(2,"0")]})]}),e.jsx("h3",{className:"font-lato font-black leading-[1.05] tracking-[-0.02em] mb-5 mt-0 text-white",style:{fontSize:38},children:c.title}),e.jsx("p",{className:"text-[16px] leading-relaxed font-light mb-5 mt-0 max-w-[460px]",style:{color:"rgba(255,255,255,0.7)"},children:c.body}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:c.tags.map(x=>e.jsx("span",{className:"text-[12px] font-bold px-3 py-[5px] rounded-full whitespace-nowrap",style:{background:"rgba(255,255,255,0.07)",border:"1px solid rgba(255,255,255,0.12)",color:"rgba(255,255,255,0.85)"},children:x},x))})]},l))}),e.jsx("div",{className:"relative",children:e.jsxs("div",{className:"sticky overflow-hidden",style:{top:100,height:580,background:"#fff",borderRadius:18,boxShadow:"0 30px 80px rgba(0,0,0,0.4)",color:t.ink},children:[e.jsxs("div",{className:"flex items-center gap-1.5 h-[38px] px-3.5 border-b",style:{background:t.soft,borderColor:t.line},children:[e.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:"#DDD"}}),e.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:"#DDD"}}),e.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:"#DDD"}}),e.jsxs("span",{className:"ml-3.5 font-ibm-mono text-[11px] bg-white px-3.5 py-1 rounded-full border flex items-center gap-1.5",style:{color:t.muted,borderColor:t.line},children:[e.jsx("i",{className:"w-2.5 h-2.5 rounded-[2px] inline-block bg-ca-orange-500"}),"xframework.app / step ",s+1," — ",u[s].n]})]}),e.jsx("div",{className:"relative overflow-hidden",style:{height:580-38},children:u.map((c,l)=>{const x=c.frame;return e.jsx("div",{className:"absolute inset-0 p-6 pointer-events-none transition-all duration-[400ms] overflow-hidden",style:{opacity:s===l?1:0,transform:s===l?"translateY(0)":"translateY(16px)",pointerEvents:s===l?"auto":"none"},children:e.jsx(x,{})},l)})})]})})]})]})})},M=[[["kw","import"],[" ","{ Page, DataTable, KPIRow } "],["kw","from"],[" ",""],["str",'"@xframework/react"'],[" ",";"]],[["kw","import"],[" ","{ db } "],["kw","from"],[" ",""],["str",'"@/lib/db"'],[" ",";"]],[],[["com","// Fleet performance — auto-wires auth, perms, audit"]],[["kw","export default function"],[" ",""],["fn","FleetPage"],[" ","() {"]],[[" "," "],["kw","return"],[" "," ("]],[[" "," <"],["tag","Page"],[" "," "],["att","title"],[" ","="],["str",'"Fleet"'],[" "," "],["att","role"],[" ","="],["str",'"ops.viewer"'],[" ",">"]],[[" "," <"],["tag","KPIRow"],[" "," "],["att","source"],[" ","="],["str",'"sql:fleet_kpis"'],[" "," />"]],[[" "," <"],["tag","DataTable"]],[[" "," "],["att","source"],[" ","="],["str",'"sql:driver_performance"']],[[" "," "],["att","columns"],[" ",'={["Driver", "Route", "Status", "On-time"]}']],[[" "," "],["att","refresh"],[" ","="],["str",'"5m"']],[[" "," />"]],[[" "," </"],["tag","Page"],[" ",">"]],[[" "," );"]],[[" ","}"]]],W={kw:"#ff7b72",str:"#a5d6ff",fn:"#d2a8ff",tag:"#7ee787",att:"#ffa657",com:"#6e7681"},P=()=>e.jsxs("div",{className:"overflow-hidden",style:{background:"#0F0F0F",border:"1px solid rgba(255,255,255,0.08)",borderRadius:16,fontFamily:"IBM Plex Mono, monospace",fontSize:13},children:[e.jsxs("div",{className:"flex items-center",style:{gap:10,padding:"12px 16px",borderBottom:"1px solid rgba(255,255,255,0.06)",background:"rgba(255,255,255,0.02)"},children:[e.jsx("span",{style:{width:10,height:10,borderRadius:999,background:"rgba(255,255,255,0.2)"}}),e.jsx("span",{style:{width:10,height:10,borderRadius:999,background:"rgba(255,255,255,0.2)"}}),e.jsx("span",{style:{width:10,height:10,borderRadius:999,background:"rgba(255,255,255,0.2)"}}),e.jsx("span",{style:{fontSize:11,color:"rgba(255,255,255,0.6)",marginLeft:8},children:"app/fleet/page.tsx"}),e.jsx("span",{className:"cursor-pointer",style:{marginLeft:"auto",fontSize:11,color:"rgba(255,255,255,0.6)",padding:"4px 10px",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6},children:"copy"})]}),e.jsx("pre",{className:"overflow-x-auto",style:{margin:0,padding:"20px 22px",lineHeight:1.75,color:"#C9D1D9",whiteSpace:"pre"},children:e.jsx("code",{children:M.map((s,r)=>e.jsx("div",{style:{minHeight:"1em"},children:s.length===0?" ":s.map(([i,a],n)=>i===" "?e.jsx("span",{children:a},n):e.jsx("span",{style:{color:W[i]??"inherit"},children:a},n))},r))})})]}),E=[{icon:"git",title:"Code-first or no-code, your call",body:"Build in the visual editor and eject to TSX whenever you outgrow it. The artifacts are real React components — no proprietary AST."},{icon:"plug",title:"SDK + adapters in one install",body:e.jsx(e.Fragment,{children:"npm i @xframework/react ships the React SDK, CLI, and adapters for Postgres, REST, GraphQL and Snowflake."})},{icon:"shield",title:"Auth & perms at the prop level",body:'Gate any component or column with role="…". RBAC, SSO, audit log are wired automatically.'},{icon:"rocket",title:"Self-host or cloud",body:"Run xFramework Cloud, or pull the Docker image and put it behind your own load balancer. Same SDK, same APIs, same dashboard."}],A=()=>e.jsx("section",{className:"bg-ca-ink text-white ounded-b-[32px]",style:{padding:"100px 40px 110px"},id:"mp-developers",children:e.jsxs("div",{className:"max-w-[1320px] mx-auto",children:[e.jsxs("div",{className:"mb-[60px] max-w-[720px]",children:[e.jsx("div",{className:"text-[12px] font-bold tracking-[0.14em] uppercase text-ca-orange-500 mb-[18px]",children:"For developers"}),e.jsx("h2",{className:"font-lato font-black leading-[1.02] tracking-[-0.03em] m-0 text-white",style:{fontSize:56},children:"Drop xFramework into the codebase you already have."})]}),e.jsxs("div",{className:"grid gap-10",style:{gridTemplateColumns:"1.05fr 1fr"},children:[e.jsx(P,{}),e.jsx("div",{className:"flex flex-col gap-7",children:E.map(s=>e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"w-[38px] h-[38px] rounded-[10px] grid place-items-center flex-shrink-0 text-ca-orange-500",style:{background:"color-mix(in oklab, var(--custom-600) 16%, transparent)"},children:e.jsx(d,{name:s.icon,size:18})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-lato font-black text-[18px] text-white mb-1.5 mt-0",children:s.title}),e.jsx("p",{className:"text-[14px] leading-relaxed m-0",style:{color:"rgba(255,255,255,0.65)"},children:s.body})]})]},s.title))})]})]})}),I=[{num:"~4×",label:"Faster to ship",sub:"Median first-app time vs. building from scratch"},{num:"13",label:"Native components",sub:"Tables, forms, KPIs, charts and more — no NPM hunt"},{num:"9",label:"Data adapters",sub:"Postgres, MySQL, Mongo, Snowflake, REST, GraphQL…"},{num:"99.95%",label:"Cloud uptime",sub:"Last 12 months · multi-region failover"}],O=()=>e.jsx("section",{className:"py-[100px] px-10",children:e.jsx("div",{className:"max-w-[1320px] mx-auto grid grid-cols-4 border-t border-b border-ca-slate-100 gap-0",children:I.map((s,r)=>e.jsxs("div",{className:"py-10 px-8",style:{borderRight:r<3?`1px solid ${t.line}`:"0"},children:[e.jsx("div",{className:"font-lato font-black leading-none tracking-[-0.03em] text-ca-ink",style:{fontSize:56},children:s.num}),e.jsx("div",{className:"text-[14px] font-bold text-ca-ink mt-3.5",children:s.label}),e.jsx("div",{className:"text-[13px] font-light text-ca-slate-500 mt-1",children:s.sub})]},s.label))})}),H=({onCta:s})=>e.jsxs("section",{className:"mx-6 mb-7 px-10 rounded-[32px] relative overflow-hidden",style:{background:t.cream,padding:"90px 40px"},children:[e.jsx("div",{className:"absolute pointer-events-none",style:{right:-120,bottom:-120,width:380,height:380,background:"radial-gradient(circle, color-mix(in oklab, var(--custom-600) 30%, transparent), transparent 70%)"}}),e.jsxs("div",{className:"relative max-w-[1320px] mx-auto grid gap-[60px] items-center",style:{gridTemplateColumns:"1fr 1fr"},children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-lato font-black leading-none tracking-[-0.03em] text-ca-ink mb-6 mt-0",style:{fontSize:64},children:"Stop hand-rolling internal tools."}),e.jsx("p",{className:"text-[18px] text-ca-slate-500 font-light leading-relaxed mb-8 mt-0",children:"Spin up a free workspace, point it at your DB, and have a real app on a real URL before lunch. Your future self — and your roadmap — will thank you."}),e.jsxs("div",{className:"flex gap-3.5 flex-wrap",children:[e.jsxs("button",{className:"inline-flex items-center gap-2.5 font-lato font-bold text-[16px] px-7 py-4 rounded-full border-0 cursor-pointer text-white bg-ca-orange-500 hover:bg-ca-orange-600 transition-all duration-200 active:scale-[0.98]",onClick:s,children:["Start building free ",e.jsx(d,{name:"arrow",size:16,stroke:2.4})]}),e.jsx("a",{href:"#mp-tour",className:"inline-flex items-center gap-2.5 font-lato font-bold text-[16px] px-7 py-4 rounded-full border border-ca-slate-100 text-ca-ink no-underline hover:border-ca-ink transition-all duration-200",children:"Re-watch the tour"})]})]}),e.jsx("div",{className:"flex flex-col gap-3.5 p-7 rounded-[18px]",style:{background:"rgba(255,255,255,0.6)",backdropFilter:"blur(8px)"},children:[{icon:"check",title:"Free forever",body:"for personal & OSS — 3 apps, unlimited views."},{icon:"lock",title:"SOC 2 Type II",body:"GDPR & HIPAA-ready. Self-host for air-gap."},{icon:"users",title:"Migration support",body:"from Retool, Appsmith & Tooljet on team plans."}].map(r=>e.jsxs("div",{className:"flex items-center gap-3 text-[14px]",children:[e.jsx("div",{className:"w-7 h-7 bg-ca-orange-500 text-white rounded-[8px] grid place-items-center flex-shrink-0",children:e.jsx(d,{name:r.icon,size:14})}),e.jsxs("div",{children:[e.jsx("b",{className:"text-ca-ink",children:r.title})," ",r.body]})]},r.title))})]})]}),$=[{title:"Product",links:["Tour","Why xFramework","For developers","Pricing","Changelog"]},{title:"Developers",links:["Documentation","SDK reference","CLI","Templates","GitHub"]},{title:"Company",links:["About","Customers","Blog","Careers","Contact"]},{title:"Trust",links:["Security","SOC 2 / GDPR","Status","Terms","Privacy"]}],G=()=>e.jsxs("footer",{className:"bg-ca-ink",style:{padding:"60px 40px 32px"},children:[e.jsxs("div",{className:"max-w-[1320px] mx-auto grid",style:{gridTemplateColumns:"1.4fr 1fr 1fr 1fr 1fr",gap:40},children:[e.jsxs("div",{children:[e.jsx("div",{className:"mb-4",children:e.jsx(v,{type:"full",mode:"dark",logoWidth:140})}),e.jsx("p",{style:{fontSize:14,color:"rgba(255,255,255,0.6)",lineHeight:1.55,margin:0},children:"The internal-app framework for software teams. Build, theme, ship — without burning a sprint."})]}),$.map(s=>e.jsxs("div",{children:[e.jsx("h5",{className:"uppercase",style:{fontSize:12,fontWeight:700,letterSpacing:"0.14em",color:"rgba(255,255,255,0.5)",margin:"0 0 16px"},children:s.title}),s.links.map(r=>e.jsx("a",{href:"#",className:"block no-underline",style:{fontSize:14,color:"rgba(255,255,255,0.85)",padding:"4px 0"},onMouseEnter:i=>i.currentTarget.style.color=t.orange,onMouseLeave:i=>i.currentTarget.style.color="rgba(255,255,255,0.85)",children:r},r))]},s.title))]}),e.jsxs("div",{className:"max-w-[1320px] mx-auto mt-[50px] pt-6 flex justify-between items-center",style:{borderTop:"1px solid rgba(255,255,255,0.1)",fontSize:13,color:"rgba(255,255,255,0.5)"},children:[e.jsx("span",{children:"© 2026 xFramework, Inc."}),e.jsx("span",{children:"Made for the people who get pinged at midnight."})]})]}),V=()=>e.jsx("style",{children:`
|
|
2
|
+
@keyframes mpFloatA { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
|
|
3
|
+
@keyframes mpFloatB { 0%,100%{transform:translateY(0)} 50%{transform:translateY(10px)} }
|
|
4
|
+
`}),te=()=>{const s=y(),r=()=>s("/build/page-builder");return e.jsxs("div",{className:"font-lato font-light text-ca-slate-700 bg-white",children:[e.jsx(V,{}),e.jsx(N,{onCta:r}),e.jsx(w,{}),e.jsx(L,{}),e.jsx(F,{}),e.jsx(A,{}),e.jsx(O,{}),e.jsx(H,{onCta:r}),e.jsx(G,{})]})};export{te as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{eA as W,_ as H,i as v,a0 as R,r as A,D as E,k as _,B,E as D,F as q,Z as J,bq as K}from"./index-3b5ce20a.js";import{c as ee,a as se}from"./vendor-redux-a1f00e6b.js";import{u as te,a as P}from"./index-359d245d.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import"./Drawer-4f97e662.js";import{a as w,F as ne}from"./FormContainer-9a52b9e8.js";import{c as U,r as d,f as ae}from"./vendor-react-ece1c85f.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{D as oe}from"./DoubleSidedImage-b4bd3915.js";import{l as le}from"./lodash-306e3f66.js";import{r as Q,g as X,u as ie}from"./index-659c6412.js";import{h as re}from"./index-b0ef7ac3.js";import{S as ce}from"./StickyFooter-3e569b80.js";import{d as C,a as $,c as de,k as ue,F as me,b as pe}from"./index.esm-b2d342b5.js";import{A as he}from"./AdaptableCard-3d1e1f96.js";import{a as fe}from"./index-0b08ce18.js";import{V,i as xe}from"./validationPatterns-77446c46.js";import{u as be,r as ge,g as je}from"./index-a733f80b.js";const ye="MenuEditState",He=async n=>(await W(n)).success,Ie={loading:!1,menuData:{menuId:"",menuName:"",portal:"",description:"",routeLink:"",sequence:"",parentId:"",isModule:"",isUnInstallable:"",moduleDescription:""}},Z=ee({name:`${ye}/state`,initialState:Ie,reducers:{setLoading:(n,c)=>{n.loading=c.payload}}}),{setLoading:O}=Z.actions,Ne=Z.reducer,ke=se({data:Ne}),G=H,Me=({field:n,form:c,label:r})=>{const[x,b]=U.useState(!1),[u,I]=U.useState(""),t=n.value,h=t?v[t]:null,L=Object.keys(v).filter(m=>m.toLowerCase().includes(u.toLowerCase()));return e.jsxs("div",{className:"relative",children:[r&&e.jsx("span",{className:"text-sm font-medium text-gray-700",children:r}),e.jsx("button",{type:"button",className:"w-12 h-11 border rounded-lg flex items-center justify-center bg-white hover:bg-gray-50",onClick:()=>b(m=>!m),children:h?e.jsx(h,{size:20}):e.jsx("span",{className:"text-gray-400 text-lg",children:"+"})}),x&&e.jsxs("div",{className:"absolute top-full mt-2 z-50 p-2 bg-white border rounded shadow-lg w-64",children:[e.jsx("input",{type:"text",placeholder:"Search icon...",className:"px-2 py-1 mb-2 w-full border rounded",value:u,onChange:m=>I(m.target.value)}),e.jsx("div",{className:"grid grid-cols-6 gap-2 max-h-48 overflow-y-auto",children:L.map(m=>{const o=v[m];return e.jsx("button",{type:"button",className:`p-2 border rounded hover:bg-gray-100 ${t===m?"bg-blue-100 border-blue-400":""}`,title:m,onClick:()=>{c.setFieldValue(n.name,m),b(!1),I("")},children:e.jsx(o,{size:18})},m)})})]})]})},Se=n=>{const{touched:c,errors:r,type:x,menuList:b,DYNAMIC_GRID_OPTIONS:u,LAYOUT_OPTIONS:I,values:t,setFieldValue:h}=n,[L,m]=d.useState(null),[o,p]=d.useState(null),g=[...b.map(a=>({value:a.id,label:a.name})),{value:"",label:"Select Parent"}].reverse(),M=a=>(a||"").trim().toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-"),f=d.useMemo(()=>{const a=t==null?void 0:t.parentId,i=(a==null?void 0:a.value)??a??"";if(!i)return"";const y=b.find(F=>F.id===i||F.id===((a==null?void 0:a.value)??a));return y?M(y.name):""},[t==null?void 0:t.parentId,b]),k=d.useMemo(()=>{if(x==="new"){const a=M(t==null?void 0:t.menuName);return a?f?`/${f}/${a}`:`/${a}`:""}},[t==null?void 0:t.menuName,f]),[s,l]=d.useState(!1);d.useEffect(()=>{!s&&x==="new"&&h("routeLink",k)},[k,s]);const j=a=>{const i=a;l(!(!i||i===k)),h("routeLink",i)},S=()=>{if(x==="new"){const a=(t==null?void 0:t.routeLink)||"",i=M(a.replace(/^\//,"")),y=i?i.startsWith("/")?i:`/${i}`:"";h("routeLink",y),l(y!==k)}},N=a=>{var y;const i=((y=a.target.files)==null?void 0:y[0])??null;if(m(i),h("moduleIcon",i),i){const F=URL.createObjectURL(i);p(F)}else p(null)},T=()=>{o&&URL.revokeObjectURL(o),m(null),p(null)};return d.useEffect(()=>()=>{o&&URL.revokeObjectURL(o)},[o]),e.jsxs(he,{className:"mb-8",children:[e.jsxs("div",{className:"flex gap-2 items-end",children:[e.jsx(w,{asterisk:!0,label:"Icon",className:"w-13",invalid:r.icon&&c.icon,errorMessage:r.icon,children:e.jsx(C,{name:"icon",component:Me})}),e.jsx(w,{asterisk:!0,label:"Menu Name",className:"flex-1",invalid:r.menuName&&c.menuName,errorMessage:r.menuName,children:e.jsx(C,{type:"text",name:"menuName",placeholder:"Menu Name",component:R})})]}),e.jsx(w,{label:"Parent Menu",children:e.jsx(C,{name:"parentId",children:({field:a,form:i})=>e.jsx(A,{field:a,form:i,options:g,name:"parentId",isClearable:!0,onChange:y=>{i.setFieldValue(a.name,y)}})})}),e.jsx(w,{asterisk:!0,label:"Description",invalid:r.description&&c.description,errorMessage:r.description,children:e.jsx(C,{type:"text",autoComplete:"off",name:"description",placeholder:"Description",component:R})}),e.jsx(w,{label:"Route Link",children:e.jsx(C,{name:"routeLink",children:()=>e.jsx(e.Fragment,{children:e.jsx(R,{name:"routeLink",value:(t==null?void 0:t.routeLink)??"",placeholder:k||"/route-link",onChange:a=>j(a.target.value),onBlur:S})})})}),!t.layoutId&&e.jsx(w,{label:"Dynamic Grid",children:e.jsx(C,{name:"dynamicTableId",children:({field:a,form:i})=>e.jsx(A,{isClearable:!0,field:a,form:i,options:u||[],name:"dynamicTableId",onChange:y=>{i.setFieldValue(a.name,y)}})})}),!t.dynamicTableId&&e.jsx(w,{label:"Layout",children:e.jsx(C,{name:"layoutId",children:({field:a,form:i})=>e.jsx(A,{isClearable:!0,field:a,form:i,options:I||[],name:"layoutId",onChange:y=>{i.setFieldValue(a.name,y)}})})}),e.jsx(w,{label:"Sequence",invalid:r.sequence&&c.sequence,errorMessage:r.sequence,children:e.jsx(C,{type:"number",autoComplete:"off",name:"sequence",min:"0",placeholder:"0",component:R})}),e.jsx("label",{className:"flex items-center space-x-2 ",style:{fontSize:"22px",paddingBottom:"10px",color:"black"},children:"Module Configuration"}),e.jsxs("div",{className:"grid grid-cols-12 gap-1 pt-2 ",style:{paddingBottom:"15px"},children:[e.jsx("div",{className:"md:col-span-6 col-span-1",children:e.jsxs("label",{className:"flex items-center space-x-2",children:[e.jsx("input",{type:"checkbox",name:"isModule",checked:t.isModule,onChange:a=>{h("isModule",a.target.checked),console.log("isModule",a.target.checked)}}),e.jsx("span",{children:"Is Module"})]})}),e.jsx("div",{className:"md:col-span-6 col-span-1",children:e.jsxs("label",{className:"flex items-center space-x-2",children:[e.jsx("input",{type:"checkbox",name:"isDeletable",checked:t.isDeletable,onChange:a=>{h("isDeletable",a.target.checked),console.log("isDeletable",a.target.checked)}}),e.jsx("span",{children:"Is Uninstallable"})]})})]}),e.jsx(w,{label:"Module Description ",invalid:r.moduleDescription&&c.moduleDescription,errorMessage:r.moduleDescription,children:e.jsx(C,{as:"textarea",name:"moduleDescription",rows:5,className:"form-control text-area",style:{width:"100%",fontFamily:"monospace",border:"1px solid #ccc",padding:"10px",boxSizing:"border-box"}})}),e.jsx(w,{label:"Module Icon ",invalid:r.moduleIcon&&c.moduleIcon,errorMessage:r.moduleIcon,className:"mb-24",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("input",{type:"file",accept:"image/*",onChange:N}),o&&e.jsxs("div",{className:"relative w-40 h-40",children:[e.jsx("img",{src:o,alt:"Preview",className:"w-40 h-40 object-cover rounded"}),e.jsx("button",{type:"button",onClick:T,className:"absolute top-1 right-1 bg-black/60 text-white rounded-full w-6 h-6 flex items-center justify-center hover:bg-black",children:"×"})]})]})})]})};E("layouts",ge);const{useUniqueId:we}=re,Y=$().matches(V.sqlInjectionSafe,"Invalid input: SQL keywords not allowed").matches(V.noSpecialChars,"Special characters like < > = { } are not allowed").test("no-base64","Base64 encoded content is not allowed",n=>n?!xe(n.trim()):!0),Le=de().shape({menuName:Y.required("Menu Name Required").max(50,"Menu name must be 50 characters or less"),description:Y.required("Description Required").max(255,"Description must be 255 characters or less"),icon:$().required("Req."),routeLink:$().max(100,"Route Link must be 100 characters or less"),sequence:ue().required("Sequence Required").max(999999999,"Sequence must not exceed 9 digits")}),z=d.forwardRef((n,c)=>{const{layoutList:r}=be(f=>f.layouts.data);console.log("layoutList",r);const x=_(),{type:b,footerWidth:u,initialData:I={id:"",menuName:"",description:"",routeLink:"",sequence:0,parentId:"",dynamicTableId:"",portal:"",isModule:!1,isDeletable:!1,moduleDescription:"",icon:"",moduleIcon:null},onFormSubmit:t,onDiscard:h,onDelete:L,menuList:m,DYNAMIC_GRID_OPTIONS:o}=n,p=()=>{x(je())};d.useEffect(()=>{p()},[]);const g=r.map(f=>({value:f.id,label:f.layoutName})),M=we("Role-");return e.jsx(e.Fragment,{children:e.jsx(me,{innerRef:c,initialValues:{...I},validationSchema:Le,onSubmit:(f,{setSubmitting:k})=>{const s=f;b==="new"&&(s.menuId=M),t==null||t(s,k)},children:({values:f,touched:k,errors:s,isSubmitting:l,setFieldValue:j})=>e.jsx(pe,{children:e.jsxs(ne,{children:[e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2",children:e.jsx(Se,{type:b,touched:k,errors:s,menuList:m,DYNAMIC_GRID_OPTIONS:o,LAYOUT_OPTIONS:g,values:f,setFieldValue:j})})}),e.jsx(ce,{className:`px-8 flex items-center justify-between py-4 ${u?`md:${u}`:""}`,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(B,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>h==null?void 0:h(),children:"Discard"}),e.jsx(B,{size:"sm",variant:"solid",loading:l,icon:e.jsx(fe,{}),type:"submit",children:"Save"})]})})]})})})})});z.displayName="MenuForm";E("MenuEditState",ke);E("dynamicTableList",Q);const Je=({menuData:n,onDrawerClose:c,menuList:r=[],onUpdateSuccess:x,footerWidth:b})=>{const u=_(),I=G(s=>{var l,j;return(j=(l=s.MenuEditState)==null?void 0:l.data)==null?void 0:j.loading}),t=G(s=>{var l,j,S;return((j=(l=s==null?void 0:s.dynamicTableList)==null?void 0:l.data)==null?void 0:j.dynamicTableList)??((S=s==null?void 0:s.dynamicTableList)==null?void 0:S.data)??[]}),[h,L]=d.useState(null),m=d.useMemo(()=>(t==null?void 0:t.map(s=>({value:s.id,label:s.tableName})))??[],[t]),o=d.useCallback((s,l="Success")=>{D.push(e.jsxs(q,{title:l,type:"success",duration:2500,children:["Menu successfully ",s]}),{placement:"top-center"})},[]),p=d.useCallback((s="Something went wrong")=>{D.push(e.jsx(q,{title:"Error",type:"danger",duration:3500,children:s}),{placement:"top-center"})},[]);console.log("menuDetails",h);const g=d.useCallback(()=>{var S;if(!n){L(null);return}const s=r.find(N=>N.id===n.parentId),l=t==null?void 0:t.find(N=>N.id===n.dynamicTableId),j={menuName:n.name??"",menuId:n.id??"",sequence:n.sequence??0,routeLink:n.routeLink??"",parentId:s?{value:s.id,label:s.name}:{value:"",label:""},description:n.description??"",dynamicTableId:l?{value:l==null?void 0:l.id,label:l==null?void 0:l.tableName}:{},portal:"default",layoutId:n.layout?{value:n.layoutId,label:(S=n.layout)==null?void 0:S.layoutName}:null,icon:n.icon??"",isModule:n.isModule??!1,isDeletable:n.isDeletable??!1,moduleDescription:n.moduleDescription??"",moduleIcon:void 0};L(j)},[n,r,t]);d.useEffect(()=>{u(O(!0)),u(X({}))},[u]),d.useEffect(()=>{if(!n){L(null),u(O(!1));return}(!le.isEmpty(t)||n.dynamicTableId==null)&&(g(),u(O(!1)))},[n,t,g,u]);const M=d.useCallback(async(s,l)=>{var j,S;l(!0);try{const N={menuName:s.menuName??"",menuId:s.menuId??"",description:s.description??"",sequence:s.sequence??0,routeLink:s.routeLink??"",dynamicTableId:((j=s==null?void 0:s.dynamicTableId)==null?void 0:j.value)??null,icon:s.icon??"",parentId:(S=s==null?void 0:s.parentId)!=null&&S.value&&s.parentId.value!==""?s.parentId.value:null,portal:"default",isModule:s.isModule??!1,isUnInstallable:s.isDeletable??!1,moduleDescription:s.moduleDescription??"",moduleIcon:s.moduleIcon??void 0};console.log("handleFormSubmit - values",N);const T=await te(N);l(!1),T?(o("updated"),u(P()),c(),x==null||x()):p("Failed to update the menu.")}catch(N){l(!1),p((N==null?void 0:N.message)??"Failed to update the menu.")}},[u,c,x,p,o]),f=d.useCallback(()=>{c()},[c]),k=d.useCallback(async s=>{try{if(s(!1),!(n!=null&&n.id)){p("No menu selected for deletion.");return}await W(n.id)?(o("deleted"),u(P()),c()):p("Failed to delete the menu.")}catch(l){p((l==null?void 0:l.message)??"Failed to delete the menu.")}},[u,n,c,p,o]);return e.jsx(J,{loading:I,children:h?e.jsx(z,{type:"edit",footerWidth:b,initialData:h,menuList:r,DYNAMIC_GRID_OPTIONS:m,onFormSubmit:M,onDiscard:f,onDelete:k}):!I&&e.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[e.jsx(oe,{src:"/img/others/img-2.png",darkModeSrc:"/img/others/img-2-dark.png",alt:"No menu found!"}),e.jsx("h3",{className:"mt-8",children:"No menu found!"})]})})};E("dynamicTableList",Q);const Ke=n=>{const{menuList:c,onDrawerClose:r,onAddNewSuccess:x,footerWidth:b}=n,{dynamicTableList:u}=ie(o=>{var p;return(p=o==null?void 0:o.dynamicTableList)==null?void 0:p.data});ae(),d.useState(!1);const I=_(),t=async o=>{var p;try{return await K(o)}catch(g){return(p=g==null?void 0:g.response)==null?void 0:p.data}},h=u.map(o=>({value:o.id,label:o.tableName})),L=async(o,p)=>{var f;const g={menuName:o.menuName??"",description:o.description??"",sequence:o.sequence??0,parentId:o.parentId.value??null,routeLink:o.routeLink??"",dynamicTableId:((f=o==null?void 0:o.dynamicTableId)==null?void 0:f.value)??null,portal:"default",isModule:o.isModule??!1,isUnInstallable:o.isDeletable??!1,moduleDescription:o.moduleDescription??"",icon:o.icon??"",moduleIcon:o.moduleIcon??""};console.log("newMenuData",g);const M=await t(g);M.success?(I(P()),x(),D.push(e.jsx(q,{title:"Success",type:"success",duration:2500,children:"Menu Successfully Added"}),{placement:"top-center"})):D.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:M.message}),{placement:"top-center"})},m=()=>{r()};return d.useEffect(()=>{I(X({}))},[]),e.jsx(e.Fragment,{children:e.jsx(z,{type:"new",footerWidth:b,footerWidth:b,onFormSubmit:L,onDiscard:m,menuList:c,DYNAMIC_GRID_OPTIONS:h})})};export{Je as M,Ke as a,He as d};
|