@xframework-ca-test/cli 1.0.32 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/assets/AIVision-0025192f.js +4 -0
- package/dist/ui/assets/AccountDetails-42610e44.js +1 -0
- package/dist/ui/assets/AccountDetails-5b4cd3f7.js +1 -0
- package/dist/ui/assets/AccountServices-f68f471d.js +1 -0
- package/dist/ui/assets/AccountsList-262479cf.js +1 -0
- package/dist/ui/assets/ActionLink-9db8b1c2.js +1 -0
- package/dist/ui/assets/AdaptableCard-3d1e1f96.js +1 -0
- package/dist/ui/assets/AddAccount-2cd72664.js +1 -0
- package/dist/ui/assets/AddEditFile-6ae10d57.js +1 -0
- package/dist/ui/assets/AddEditTranslation-3812ff0f.js +1 -0
- package/dist/ui/assets/AiApiLogList-1eac39b7.js +1 -0
- package/dist/ui/assets/AiCa-2e90495f.js +1 -0
- package/dist/ui/assets/Alert-59d09a99.js +1 -0
- package/dist/ui/assets/ApiService-df126758.js +1 -0
- package/dist/ui/assets/AppLandingPage-afcea727.js +4 -0
- package/dist/ui/assets/AuditLogsList-ea37686b.js +1 -0
- package/dist/ui/assets/Auth0Callback-00729568.js +1 -0
- package/dist/ui/assets/BarCodes-4ff49536.js +1 -0
- package/dist/ui/assets/BlankLayout-7085ab88.js +1 -0
- package/dist/ui/assets/{BrainServices-a4bb698e.js → BrainServices-4cb93af5.js} +1 -1
- package/dist/ui/assets/CalendarList-689ed66a.js +2 -0
- package/dist/ui/assets/CalendarList-f4a9aa21.css +8 -0
- package/dist/ui/assets/CategoryList-a6d01041.js +1 -0
- package/dist/ui/assets/CategoryList-c03f4259.js +1 -0
- package/dist/ui/assets/ChatContainer-fec7b84d.js +1 -0
- package/dist/ui/assets/ChatsList-4b3194e4.js +1 -0
- package/dist/ui/assets/Check-af681a30.js +1 -0
- package/dist/ui/assets/CheckInVideo-aa9f50b2.js +6 -0
- package/dist/ui/assets/ClassicLayout-a9866742.js +2 -0
- package/dist/ui/assets/CompanyList-94119d71.js +1 -0
- package/dist/ui/assets/{CompanyService-1bf7c3c8.js → CompanyService-491a9cc1.js} +1 -1
- package/dist/ui/assets/{Component-59e4c14b.js → Component-566d01e0.js} +1 -1
- package/dist/ui/assets/ConfirmDialog-2838a642.js +1 -0
- package/dist/ui/assets/ContactDetails-c9dc0ed1.js +1 -0
- package/dist/ui/assets/{ContactService-92281a90.js → ContactService-8afcaeb7.js} +1 -1
- package/dist/ui/assets/ContactsList-5b06c9b8.js +1 -0
- package/dist/ui/assets/CountiesList-18b23cf7.js +1 -0
- package/dist/ui/assets/CountyDetails-ea024f14.js +1 -0
- package/dist/ui/assets/CourseDetails-8a5f8d63.js +1 -0
- package/dist/ui/assets/CourseList-3564fec3.js +1 -0
- package/dist/ui/assets/{CourseService-f0dc3bf1.js → CourseService-29ad460c.js} +1 -1
- package/dist/ui/assets/CreateSignature-c22e4a71.js +7 -0
- package/dist/ui/assets/{CustomerInfoField-fff65ace.js → CustomerInfoField-4bf880e2.js} +1 -1
- package/dist/ui/assets/DeckedLayout-610fe851.js +1 -0
- package/dist/ui/assets/DensitySelector-5d2e901f.js +1 -0
- package/dist/ui/assets/{DepartmentServices-3d56a9e7.js → DepartmentServices-a53e998b.js} +1 -1
- package/dist/ui/assets/{DigitalSignature-fff42e33.js → DigitalSignature-69eaf80c.js} +1 -1
- package/dist/ui/assets/{DocumemtManagementService-6501a5c1.js → DocumemtManagementService-85cde51a.js} +1 -1
- package/dist/ui/assets/DocumentActivity-bc938c61.js +1 -0
- package/dist/ui/assets/DocumentLayout-a12982d7.js +1 -0
- package/dist/ui/assets/DocumentList2-9c8c6284.js +23 -0
- package/dist/ui/assets/DocumentLists-1cdaae06.js +1 -0
- package/dist/ui/assets/DocumentUserSigned-f7371fc5.js +7 -0
- package/dist/ui/assets/DocumentsList-3b25907c.js +1 -0
- package/dist/ui/assets/DoubleSidedImage-b4bd3915.js +1 -0
- package/dist/ui/assets/{Drawer-949c18c6.js → Drawer-4f97e662.js} +1 -1
- package/dist/ui/assets/DynamicDashboard-0a41d287.js +1 -0
- package/dist/ui/assets/{DynamicTablesService-963fe77b.js → DynamicTablesService-6aa57f52.js} +1 -1
- package/dist/ui/assets/EditAccount-e42d66af.js +1 -0
- package/dist/ui/assets/EditLead-c8c9760a.js +1 -0
- package/dist/ui/assets/FaqItems-25d66543.js +6 -0
- package/dist/ui/assets/{FileManagementServices-25fd64c5.js → FileManagementServices-19b47568.js} +1 -1
- package/dist/ui/assets/{FolderOpen-88bfcc74.js → FolderOpen-7b0e2ac0.js} +1 -1
- package/dist/ui/assets/FormContainer-9a52b9e8.js +1 -0
- package/dist/ui/assets/{GeneralSettings-a7f805e8.js → GeneralSettings-c8c2f051.js} +5 -5
- package/dist/ui/assets/GenericPage-81e41302.js +1 -0
- package/dist/ui/assets/GridMapDetails-38f50b3c.js +1 -0
- package/dist/ui/assets/HorizontalMenuContent-fd559f4d.js +1 -0
- package/dist/ui/assets/{ImportFile-3f60d715.js → ImportFile-026b1771.js} +1 -1
- package/dist/ui/assets/{InlineSignaturePad-09c06619.js → InlineSignaturePad-f5630151.js} +1 -1
- package/dist/ui/assets/InvoicesList-9723bc5a.js +1 -0
- package/dist/ui/assets/{KeyVaultService-874d83fe.js → KeyVaultService-9608f0ff.js} +1 -1
- package/dist/ui/assets/LeadDetails-8cdaae0e.js +1 -0
- package/dist/ui/assets/{LeadSourceService-e46fa85e.js → LeadSourceService-cf71ea64.js} +1 -1
- package/dist/ui/assets/LeadsList-1ec20a77.js +1 -0
- package/dist/ui/assets/Logo-dd6f7656.js +1 -0
- package/dist/ui/assets/MapView-dcab88b3.js +1 -0
- package/dist/ui/assets/MarketingPage-998d10b0.js +4 -0
- package/dist/ui/assets/MenuNew-79fc95f3.js +1 -0
- package/dist/ui/assets/{MenuTable-c2c65021.js → MenuTable-f69e0fe4.js} +1 -1
- package/dist/ui/assets/MessageInput-07fcc5cb.js +21 -0
- package/dist/ui/assets/MessagesList-21d2b034.js +1 -0
- package/dist/ui/assets/ModernLayout-05af7cf7.js +1 -0
- package/dist/ui/assets/{NoData-8c485a3a.js → NoData-4cc4af03.js} +1 -1
- package/dist/ui/assets/Notify-8fb74d48.js +1 -0
- package/dist/ui/assets/OpportunitiesList-2f96958f.js +1 -0
- package/dist/ui/assets/OpportunityDetails-aaec3200.js +1 -0
- package/dist/ui/assets/{OpportunityServices-fa4fabfd.js → OpportunityServices-c4510dd2.js} +1 -1
- package/dist/ui/assets/OpportunityStatus-ea3b5ee2.js +1 -0
- package/dist/ui/assets/PageBreadcrumb-cf54a6e9.js +1 -0
- package/dist/ui/assets/{Password-d9294711.js → Password-21414dc6.js} +1 -1
- package/dist/ui/assets/PasswordInput-333c82ca.js +1 -0
- package/dist/ui/assets/{PreferenceService-75bf9db6.js → PreferenceService-d2b3e003.js} +1 -1
- package/dist/ui/assets/Profile-8c9fd2fc.js +1 -0
- package/dist/ui/assets/{ReportEditor-8880f57e.js → ReportEditor-4e4f6d53.js} +3 -3
- package/dist/ui/assets/{ReportViewer-9f1080f7.js → ReportViewer-616d3cfc.js} +30 -30
- package/dist/ui/assets/RoleEdit-a076ea85.js +1 -0
- package/dist/ui/assets/RoleForm-47691f91.js +1 -0
- package/dist/ui/assets/{RoleNew-49fadb16.js → RoleNew-e86a1513.js} +1 -1
- package/dist/ui/assets/{RoleService-7008da2c.js → RoleService-2f9ed883.js} +1 -1
- package/dist/ui/assets/ScheduleCycle-0ae23631.js +1 -0
- package/dist/ui/assets/{ScheduleService-7228f0a3.js → ScheduleService-41a88c41.js} +1 -1
- package/dist/ui/assets/ScreenList-8f58150b.js +1 -0
- package/dist/ui/assets/Settings-fc91c9d2.js +2 -0
- package/dist/ui/assets/{SetupWizard-4172e377.js → SetupWizard-d1363582.js} +1 -1
- package/dist/ui/assets/SimpleLayout-77cfb778.js +1 -0
- package/dist/ui/assets/StackedSideLayout-2f1ee9d1.js +1 -0
- package/dist/ui/assets/StickyFooter-3e569b80.js +1 -0
- package/dist/ui/assets/SupportRequets-0ecd4ab8.js +1 -0
- package/dist/ui/assets/{Switcher-c8648037.js → Switcher-e2fba588.js} +1 -1
- package/dist/ui/assets/TimeLogApprovalDataList-7b49a432.js +1 -0
- package/dist/ui/assets/TimeLogApprovalList-78cab2b6.js +1 -0
- package/dist/ui/assets/TimeLogList-592b29aa.js +1 -0
- package/dist/ui/assets/{TimeLogService-cd7b2f61.js → TimeLogService-83166cbc.js} +1 -1
- package/dist/ui/assets/TimesheetsList-d1520efb.js +1 -0
- package/dist/ui/assets/TranslationList-88d7d5d7.js +1 -0
- package/dist/ui/assets/TweaksPanel-bc10bc47.js +112 -0
- package/dist/ui/assets/{Upload-fb34ce03.js → Upload-be937eb6.js} +4 -4
- package/dist/ui/assets/UserEdit-1f8208f3.js +1 -0
- package/dist/ui/assets/UserForm-e9b56aff.js +1 -0
- package/dist/ui/assets/{UserNew-b36c342c.js → UserNew-31fa258f.js} +1 -1
- package/dist/ui/assets/{UserService-047aef51.js → UserService-1b93ceb0.js} +1 -1
- package/dist/ui/assets/ViewTimeLogForApproval-ae077050.js +1 -0
- package/dist/ui/assets/Views-1359da48.js +1 -0
- package/dist/ui/assets/WelcomeList-dc8666ec.js +9 -0
- package/dist/ui/assets/WidgetLayoutsService-49730609.js +1 -0
- package/dist/ui/assets/{WrapperCell-a7981b07.js → WrapperCell-3d5592cf.js} +1 -1
- package/dist/ui/assets/actioncell-6b5ebd6c.js +1 -0
- package/dist/ui/assets/{ar-3c9c213e.js → ar-fb4f0ea8.js} +1 -1
- package/dist/ui/assets/calendarList-ac838a86.js +2 -0
- package/dist/ui/assets/{cjs-162261df.js → cjs-998de55c.js} +1 -1
- package/dist/ui/assets/createSvgIcon-aba65987.js +1 -0
- package/dist/ui/assets/documentsList-4e2e061e.js +1 -0
- package/dist/ui/assets/{es-be649ede.js → es-cd58d3ad.js} +1 -1
- package/dist/ui/assets/{esm-f306d015.js → esm-c40433f8.js} +1 -1
- package/dist/ui/assets/gridList-e1571c87.js +1 -0
- package/dist/ui/assets/gridMapTable-d95f9c70.js +1 -0
- package/dist/ui/assets/{index-f6be0390.js → index-00a8eb64.js} +1 -1
- package/dist/ui/assets/index-04438b6b.js +22 -0
- package/dist/ui/assets/index-058738bc.js +1 -0
- package/dist/ui/assets/{index-e4c6057f.js → index-0b08ce18.js} +1 -1
- package/dist/ui/assets/index-0d730815.js +4 -0
- package/dist/ui/assets/index-0efcf53a.js +1 -0
- package/dist/ui/assets/index-0f432250.js +1 -0
- package/dist/ui/assets/{index-cebd880b.js → index-0fd6e996.js} +1 -1
- package/dist/ui/assets/{index-49a94e54.js → index-11297f4a.js} +1 -1
- package/dist/ui/assets/index-14c1c1d7.js +1 -0
- package/dist/ui/assets/index-15e1f4be.js +1 -0
- package/dist/ui/assets/index-16586c21.js +1 -0
- package/dist/ui/assets/index-19346c14.js +1 -0
- package/dist/ui/assets/{index-16bb10a6.js → index-1dc2b9d2.js} +1 -1
- package/dist/ui/assets/index-211fbe21.js +1 -0
- package/dist/ui/assets/index-23e16bff.js +1 -0
- package/dist/ui/assets/index-27aef8b5.js +1 -0
- package/dist/ui/assets/{index-36228db5.js → index-289b3fd9.js} +1 -1
- package/dist/ui/assets/{index-a22a3546.js → index-2dae59b1.js} +1 -1
- package/dist/ui/assets/index-353fd6dd.js +1 -0
- package/dist/ui/assets/{index-ea125a16.js → index-359d245d.js} +1 -1
- package/dist/ui/assets/{index-c62ac197.js → index-3b5ce20a.js} +70 -62
- package/dist/ui/assets/index-3b929ba4.js +34 -0
- package/dist/ui/assets/index-42e3a337.js +1 -0
- package/dist/ui/assets/index-44b6de3a.js +1 -0
- package/dist/ui/assets/index-46d3ca9a.js +7 -0
- package/dist/ui/assets/{index-e3cc723f.js → index-49016ad0.js} +1 -1
- package/dist/ui/assets/index-51132258.js +1 -0
- package/dist/ui/assets/{index-dc103f22.js → index-52963879.js} +1 -1
- package/dist/ui/assets/{index-fcc1c999.js → index-533fd007.js} +1 -1
- package/dist/ui/assets/index-59ec468b.js +13 -0
- package/dist/ui/assets/index-5e2d5279.js +1 -0
- package/dist/ui/assets/{index-d17da176.js → index-62f95885.js} +1 -1
- package/dist/ui/assets/index-659c6412.js +1 -0
- package/dist/ui/assets/index-6873dfc3.js +1 -0
- package/dist/ui/assets/index-69a68d9e.js +1 -0
- package/dist/ui/assets/index-6a6902c7.js +1 -0
- package/dist/ui/assets/index-7596c6bb.js +1 -0
- package/dist/ui/assets/{index-47dcc43a.js → index-8045c5f0.js} +1 -1
- package/dist/ui/assets/{index-b028e652.js → index-8677acd1.js} +1 -1
- package/dist/ui/assets/{index-42e65911.js → index-88c52b97.js} +1 -1
- package/dist/ui/assets/index-89cfefab.js +1 -0
- package/dist/ui/assets/{index-bea4c3dc.js → index-8c0643fd.js} +1 -1
- package/dist/ui/assets/index-8d5b6a1f.js +1 -0
- package/dist/ui/assets/index-8d5d70f9.js +1 -0
- package/dist/ui/assets/{index-9b41371d.js → index-91505016.js} +1 -1
- package/dist/ui/assets/{index-ffc00dbb.js → index-92314073.js} +1 -1
- package/dist/ui/assets/index-985cf3f6.js +1 -0
- package/dist/ui/assets/index-a14e51de.js +1 -0
- package/dist/ui/assets/index-a733f80b.js +1 -0
- package/dist/ui/assets/index-a84d5808.js +1 -0
- package/dist/ui/assets/index-acac6006.js +1 -0
- package/dist/ui/assets/index-b0ef7ac3.js +1 -0
- package/dist/ui/assets/index-b6ef5984.js +1 -0
- package/dist/ui/assets/{index-fc9071e0.js → index-bd4edda3.js} +1 -1
- package/dist/ui/assets/{index-0ec72c4b.js → index-c29b8474.js} +1 -1
- package/dist/ui/assets/index-c88c7790.js +19 -0
- package/dist/ui/assets/index-ce89a95e.css +7 -0
- package/dist/ui/assets/index-d221d69e.js +1 -0
- package/dist/ui/assets/{index-f1576468.js → index-d33facae.js} +1 -1
- package/dist/ui/assets/index-e46c57a5.js +1 -0
- package/dist/ui/assets/index-e863817c.js +1 -0
- package/dist/ui/assets/index-f4af2342.js +1 -0
- package/dist/ui/assets/{index-77e820d0.js → index-fc9f8c4b.js} +1 -1
- package/dist/ui/assets/{index-ec2010d2.js → index-ff23edc5.js} +1 -1
- package/dist/ui/assets/{index.esm-70ab539c.js → index.esm-b2d342b5.js} +1 -1
- package/dist/ui/assets/liveLocation-8e0bb2f3.js +1 -0
- package/dist/ui/assets/{mapView-ab35acaa.js → mapView-c8063ed6.js} +1 -1
- package/dist/ui/assets/modeuls-setup-4b06843c.js +1 -0
- package/dist/ui/assets/{permissionHoc-6f787658.js → permissionHoc-0818bfb0.js} +1 -1
- package/dist/ui/assets/{react-21134174.js → react-12ddbe48.js} +1 -1
- package/dist/ui/assets/{react-4d5dc208.js → react-61e0b284.js} +1 -1
- package/dist/ui/assets/{strongPassword-bbec776a.js → strongPassword-6bc8786f.js} +1 -1
- package/dist/ui/assets/{styles-0608350c.js → styles-b7ae7bf6.js} +1 -1
- package/dist/ui/assets/{tableV2-4d1c9fd2.js → tableV2-99c808c0.js} +1 -1
- package/dist/ui/assets/tableV3-24eed052.js +1 -0
- package/dist/ui/assets/ticketRequestDetails-8b299fbd.js +1 -0
- package/dist/ui/assets/{useDidUpdate-25c4d4ed.js → useDidUpdate-de319a18.js} +1 -1
- package/dist/ui/assets/{useDrop-02b0e5d7.js → useDrop-8f0d11a7.js} +1 -1
- package/dist/ui/assets/useFilteredData-e8fad668.js +1 -0
- package/dist/ui/assets/{usePermission-d94b4984.js → usePermission-4689548c.js} +1 -1
- package/dist/ui/assets/{vendor-charts-eccea5d1.js → vendor-charts-4be0b5ab.js} +1 -1
- package/dist/ui/assets/{vendor-codemirror-c8203b49.js → vendor-codemirror-1a1216c9.js} +11 -11
- package/dist/ui/assets/{vendor-devex-33a39e11.js → vendor-devex-4076ffeb.js} +2 -2
- package/dist/ui/assets/{vendor-excel-ee8fc4e5.js → vendor-excel-3b3553df.js} +1 -1
- package/dist/ui/assets/{vendor-i18n-2fcb1983.js → vendor-i18n-b89304ef.js} +1 -1
- package/dist/ui/assets/vendor-mui-98daa63f.js +185 -0
- package/dist/ui/assets/{vendor-pdf-b2a5d8b1.js → vendor-pdf-3c29882d.js} +1 -1
- package/dist/ui/assets/withHeaderItem-df2cc5d9.js +1 -0
- package/dist/ui/assets/{zh-cn-1881e930.js → zh-cn-13c6c696.js} +1 -1
- package/dist/ui/config.js +16 -20
- package/dist/ui/index.html +9 -9
- package/dist/ui/manifest.json +2 -2
- package/index.bundle.js +23 -9
- package/package.json +1 -1
- package/dist/ui/assets/AIVision-4f515575.js +0 -4
- package/dist/ui/assets/AccountDetails-2b42d262.js +0 -1
- package/dist/ui/assets/AccountDetails-492dee8f.js +0 -1
- package/dist/ui/assets/AccountServices-62599aae.js +0 -1
- package/dist/ui/assets/AccountsList-fe7cb5f9.js +0 -1
- package/dist/ui/assets/ActionLink-33e476e1.js +0 -1
- package/dist/ui/assets/AdaptableCard-df7695d6.js +0 -1
- package/dist/ui/assets/AddAccount-a05910e8.js +0 -1
- package/dist/ui/assets/AddEditFile-063c229b.js +0 -1
- package/dist/ui/assets/AddEditTranslation-43beae49.js +0 -1
- package/dist/ui/assets/AiApiLogList-a488921d.js +0 -1
- package/dist/ui/assets/AiCa-9c1b25b2.js +0 -1
- package/dist/ui/assets/Alert-7dfbd254.js +0 -1
- package/dist/ui/assets/ApiService-2b99757f.js +0 -1
- package/dist/ui/assets/AppLandingPage-3956cf0c.js +0 -4
- package/dist/ui/assets/AuditLogsList-7a2ce37d.js +0 -1
- package/dist/ui/assets/Auth0Callback-b943f19f.js +0 -1
- package/dist/ui/assets/BarCodes-17ed5da4.js +0 -1
- package/dist/ui/assets/BlankLayout-2f6e1153.js +0 -1
- package/dist/ui/assets/CalendarList-25834ddb.css +0 -11
- package/dist/ui/assets/CalendarList-72739043.js +0 -2
- package/dist/ui/assets/CategoryList-9f82e9a3.js +0 -1
- package/dist/ui/assets/CategoryList-c97891e7.js +0 -1
- package/dist/ui/assets/ChatContainer-4a38b179.js +0 -1
- package/dist/ui/assets/ChatsList-6c2c3e2f.js +0 -1
- package/dist/ui/assets/Check-71f21a49.js +0 -1
- package/dist/ui/assets/CheckInVideo-cb5fa9a2.js +0 -6
- package/dist/ui/assets/ClassicLayout-7d09e5ac.js +0 -1
- package/dist/ui/assets/CompanyList-9532f511.js +0 -1
- package/dist/ui/assets/ConfirmDialog-3202eb3d.js +0 -1
- package/dist/ui/assets/ContactDetails-3b70919b.js +0 -1
- package/dist/ui/assets/ContactsList-e9ac0fa3.js +0 -1
- package/dist/ui/assets/CountiesList-6ad338a5.js +0 -1
- package/dist/ui/assets/CountyDetails-22d4bc89.js +0 -1
- package/dist/ui/assets/CourseDetails-18040b49.js +0 -1
- package/dist/ui/assets/CourseList-e502f89d.js +0 -1
- package/dist/ui/assets/CreateSignature-375d191b.js +0 -7
- package/dist/ui/assets/DeckedLayout-909ac220.js +0 -1
- package/dist/ui/assets/DensitySelector-a2c1c68f.js +0 -1
- package/dist/ui/assets/DocumentActivity-d63dacec.js +0 -1
- package/dist/ui/assets/DocumentLayout-637075fd.js +0 -1
- package/dist/ui/assets/DocumentList2-518d2fa4.js +0 -23
- package/dist/ui/assets/DocumentLists-2da9ff88.js +0 -1
- package/dist/ui/assets/DocumentUserSigned-27bfa6e6.js +0 -7
- package/dist/ui/assets/DocumentsList-9f56db71.js +0 -1
- package/dist/ui/assets/DoubleSidedImage-ae98733b.js +0 -1
- package/dist/ui/assets/DynamicDashboard-6f177244.js +0 -1
- package/dist/ui/assets/EditAccount-1c1a8318.js +0 -1
- package/dist/ui/assets/EditLead-cc38d2a2.js +0 -1
- package/dist/ui/assets/FaqItems-c1c85af7.js +0 -6
- package/dist/ui/assets/FormContainer-91c2b0e4.js +0 -1
- package/dist/ui/assets/GenericPage-25a5d92a.js +0 -1
- package/dist/ui/assets/GridMapDetails-851a5781.js +0 -1
- package/dist/ui/assets/HorizontalMenuContent-96da38e1.js +0 -1
- package/dist/ui/assets/InvoicesList-8e66a112.js +0 -1
- package/dist/ui/assets/LeadDetails-ad63b3df.js +0 -1
- package/dist/ui/assets/LeadsList-bd7d9804.js +0 -1
- package/dist/ui/assets/Logo-3f3c9ee6.js +0 -1
- package/dist/ui/assets/MapView-afd1c913.js +0 -1
- package/dist/ui/assets/MarketingPage-89a860b1.js +0 -4
- package/dist/ui/assets/MenuEdit-d6e0d64c.js +0 -1
- package/dist/ui/assets/MessageInput-6dc83761.js +0 -21
- package/dist/ui/assets/MessagesList-966b69c5.js +0 -1
- package/dist/ui/assets/ModernLayout-03f30574.js +0 -1
- package/dist/ui/assets/Notify-bb3ce372.js +0 -1
- package/dist/ui/assets/OpportunitiesList-62eb34f6.js +0 -1
- package/dist/ui/assets/OpportunityDetails-356a8580.js +0 -1
- package/dist/ui/assets/OpportunityStatus-fa8108ea.js +0 -1
- package/dist/ui/assets/PasswordInput-8619a9df.js +0 -1
- package/dist/ui/assets/Profile-9104808b.js +0 -1
- package/dist/ui/assets/RoleEdit-98a6410b.js +0 -1
- package/dist/ui/assets/RoleForm-cc251eba.js +0 -1
- package/dist/ui/assets/ScheduleCycle-22c8e809.js +0 -1
- package/dist/ui/assets/ScreenList-9f7afa1c.js +0 -1
- package/dist/ui/assets/SidePanelContent-6b13836f.js +0 -1
- package/dist/ui/assets/SimpleLayout-d5445c0d.js +0 -2
- package/dist/ui/assets/StackedSideLayout-51127dc5.js +0 -1
- package/dist/ui/assets/StickyFooter-5b934274.js +0 -1
- package/dist/ui/assets/SupportRequets-be6542a9.js +0 -1
- package/dist/ui/assets/TimeLogApprovalDataList-c16d8bae.js +0 -1
- package/dist/ui/assets/TimeLogApprovalList-f6a75a20.js +0 -1
- package/dist/ui/assets/TimeLogList-ea288cce.js +0 -1
- package/dist/ui/assets/TimesheetsList-4a20e96c.js +0 -1
- package/dist/ui/assets/TranslationList-7a989333.js +0 -1
- package/dist/ui/assets/UserEdit-87262ea5.js +0 -1
- package/dist/ui/assets/UserForm-31fdd3b3.js +0 -1
- package/dist/ui/assets/ViewTimeLogForApproval-43b24a1a.js +0 -1
- package/dist/ui/assets/Views-74429e81.js +0 -1
- package/dist/ui/assets/WelcomeList-6c693eae.js +0 -9
- package/dist/ui/assets/actioncell-17e12e21.js +0 -1
- package/dist/ui/assets/calendarList-511b4d8f.js +0 -2
- package/dist/ui/assets/createSvgIcon-c5fc0d04.js +0 -1
- package/dist/ui/assets/documentsList-ac2c91ec.js +0 -1
- package/dist/ui/assets/dxicons-4c1b2089.ttf +0 -0
- package/dist/ui/assets/dxicons-ade3c9ed.woff2 +0 -0
- package/dist/ui/assets/dxicons-b4cd1226.woff +0 -0
- package/dist/ui/assets/gridList-cb9a14b1.js +0 -1
- package/dist/ui/assets/gridMapTable-c19770a8.js +0 -1
- package/dist/ui/assets/index-1d60e514.js +0 -1
- package/dist/ui/assets/index-26466d9d.js +0 -1
- package/dist/ui/assets/index-289cfedb.js +0 -1
- package/dist/ui/assets/index-2ce5b358.js +0 -1
- package/dist/ui/assets/index-307ce6d7.js +0 -1
- package/dist/ui/assets/index-36ba4ea7.js +0 -1
- package/dist/ui/assets/index-3f02e05a.js +0 -1
- package/dist/ui/assets/index-44662933.js +0 -13
- package/dist/ui/assets/index-51ee35f9.js +0 -1
- package/dist/ui/assets/index-54372d82.js +0 -1
- package/dist/ui/assets/index-569a9d2c.js +0 -1
- package/dist/ui/assets/index-62de659f.js +0 -13
- package/dist/ui/assets/index-6589dd2d.js +0 -1
- package/dist/ui/assets/index-6b6d0f06.js +0 -1
- package/dist/ui/assets/index-6c618440.js +0 -1
- package/dist/ui/assets/index-785ad361.js +0 -1
- package/dist/ui/assets/index-7df8779c.js +0 -1
- package/dist/ui/assets/index-82c9477e.js +0 -1
- package/dist/ui/assets/index-8ab45286.js +0 -1
- package/dist/ui/assets/index-8c229076.css +0 -7
- package/dist/ui/assets/index-a205cfed.js +0 -34
- package/dist/ui/assets/index-a23f9c87.js +0 -1
- package/dist/ui/assets/index-a455424a.js +0 -1
- package/dist/ui/assets/index-a4f78ee1.js +0 -1
- package/dist/ui/assets/index-aaad94c2.js +0 -1
- package/dist/ui/assets/index-b1b6b0f6.js +0 -1
- package/dist/ui/assets/index-c1f92742.js +0 -4
- package/dist/ui/assets/index-c2088808.js +0 -1
- package/dist/ui/assets/index-cbc29fa8.js +0 -1
- package/dist/ui/assets/index-cd2b7d32.js +0 -1
- package/dist/ui/assets/index-cf3804f1.js +0 -19
- package/dist/ui/assets/index-d0ef2cc2.js +0 -1
- package/dist/ui/assets/index-d1145737.js +0 -7
- package/dist/ui/assets/index-d58fb185.js +0 -1
- package/dist/ui/assets/index-d5b5a7e1.js +0 -1
- package/dist/ui/assets/index-daeff047.js +0 -1
- package/dist/ui/assets/index-ded3b055.js +0 -1
- package/dist/ui/assets/index-ede23a2b.js +0 -1
- package/dist/ui/assets/index-f8144346.js +0 -1
- package/dist/ui/assets/index-fd68b510.js +0 -1
- package/dist/ui/assets/index-fe3409ae.js +0 -1
- package/dist/ui/assets/liveLocation-646eef95.js +0 -1
- package/dist/ui/assets/modeuls-setup-402f891e.js +0 -1
- package/dist/ui/assets/tableV3-3d2f4952.js +0 -1
- package/dist/ui/assets/ticketRequestDetails-f78147f7.js +0 -1
- package/dist/ui/assets/vendor-mui-69397583.js +0 -185
- package/dist/ui/menudata/menus.json +0 -606
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{r as c}from"./vendor-react-ece1c85f.js";import{L as p}from"./Logo-dd6f7656.js";import{c as h,q as g}from"./index-3b5ce20a.js";import{V as d}from"./Views-1359da48.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 u=[30,55,42,68,50,78,62,90,72,95],b=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M12 2l1.8 5.6L19.5 9l-5.7 1.4L12 16l-1.8-5.6L4.5 9l5.7-1.4z"}),e.jsx("path",{d:"M19 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1z"})]}),f=({children:n,content:l,...o})=>{const a=h(t=>{var r;return((r=t==null?void 0:t.theme)==null?void 0:r.sideLayout)||{}}),i=c.useMemo(()=>{try{if(a!=null&&a.moreInformation){const t=JSON.parse(a.moreInformation);return(t==null?void 0:t.themeText)||{}}}catch{}return{}},[a==null?void 0:a.moreInformation]),s=i.primaryText||"Your Journey to Exceptional Service",x=i.secondaryText||"Operations Platform",m=i.description||"Elevate your client relationships and deliver excellence every step of the way — with real-time data and full visibility into your operations.";return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
|
|
2
|
+
@keyframes lgFloat {
|
|
3
|
+
0%,100% { transform:translate(0,0) scale(1); }
|
|
4
|
+
50% { transform:translate(20px,-25px) scale(1.05); }
|
|
5
|
+
}
|
|
6
|
+
@keyframes lgBar {
|
|
7
|
+
0%,100% { transform:scaleY(1); transform-origin:bottom; }
|
|
8
|
+
50% { transform:scaleY(.85); transform-origin:bottom; }
|
|
9
|
+
}
|
|
10
|
+
.lg-orb-1 { animation:lgFloat 8s ease-in-out infinite; }
|
|
11
|
+
.lg-orb-2 { animation:lgFloat 10s ease-in-out -3s infinite; }
|
|
12
|
+
.lg-bar { animation:lgBar 2.6s ease-in-out infinite; }
|
|
13
|
+
`}),e.jsxs("div",{className:"flex h-full",children:[e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center bg-white dark:bg-gray-800 px-8 py-12 overflow-y-auto text-gray-900 dark:text-gray-50",children:e.jsxs("div",{className:"w-full max-w-[440px]",children:[e.jsx("div",{className:"mb-8 lg:hidden",children:e.jsx(p,{mode:"light",logoWidth:"160px"})}),l&&e.jsx("div",{className:"mb-8",children:l}),n?c.cloneElement(n,{...o}):null]})}),e.jsxs("aside",{className:"hidden lg:flex lg:w-[40%] relative overflow-hidden flex-col bg-[#1B1B1B]",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"radial-gradient(circle at 20% 30%,color-mix(in srgb,var(--custom-600) 35%,transparent),transparent 55%),radial-gradient(circle at 80% 70%,color-mix(in srgb,var(--custom-600) 18%,transparent),transparent 55%),linear-gradient(135deg,#1a1612 0%,#1B1B1B 60%,#1a1309 100%)"}}),e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,0.05) 1px,transparent 1px)",backgroundSize:"48px 48px",maskImage:"radial-gradient(circle at 50% 40%,#000 30%,transparent 80%)",WebkitMaskImage:"radial-gradient(circle at 50% 40%,#000 30%,transparent 80%)"}}),e.jsx("div",{className:"lg-orb-1 absolute rounded-full pointer-events-none opacity-70",style:{top:-80,right:-100,width:360,height:360,background:"var(--custom-600)",filter:"blur(40px)"}}),e.jsx("div",{className:"lg-orb-2 absolute rounded-full pointer-events-none opacity-60",style:{bottom:-120,left:-80,width:420,height:420,background:"var(--secondary-600, var(--custom-700))",filter:"blur(40px)"}}),e.jsxs("div",{className:"relative z-10 flex flex-col justify-between flex-1 p-14 text-white",children:[e.jsx("div",{children:e.jsx(p,{mode:"dark",logoWidth:"180px"})}),e.jsxs("div",{className:"max-w-[480px]",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 text-xs font-bold tracking-widest uppercase rounded-full px-3 py-1.5 mb-5",style:{color:"var(--custom-600)",background:"color-mix(in srgb,var(--custom-600) 12%,transparent)",border:"1px solid color-mix(in srgb,var(--custom-600) 30%,transparent)"},children:[e.jsx(b,{}),x]}),e.jsx("h1",{className:"text-[2.8rem] font-black leading-tight tracking-tight text-white mb-4",children:s.includes(" ")?e.jsxs(e.Fragment,{children:[s.split(" ").slice(0,Math.ceil(s.split(" ").length*.6)).join(" ")," ",e.jsx("em",{className:"not-italic",style:{background:"linear-gradient(120deg,var(--custom-600),var(--custom-500))",WebkitBackgroundClip:"text",backgroundClip:"text",color:"transparent"},children:s.split(" ").slice(Math.ceil(s.split(" ").length*.6)).join(" ")})]}):s}),e.jsx("p",{className:"text-base leading-relaxed mb-8 text-white",children:m}),e.jsxs("div",{className:"rounded-xl p-4 mb-6 bg-white/[0.04] border border-white/[0.08] backdrop-blur",children:[e.jsx("div",{className:"grid grid-cols-3 gap-2.5 mb-3",children:[{label:"On-time",value:"94.6%",delta:"▲ 2.4"},{label:"In transit",value:"1,284",delta:"▲ 118"},{label:"Idle / day",value:"18m",delta:"▼ 6m"}].map(t=>e.jsxs("div",{className:"rounded-lg p-2.5 bg-white/5",children:[e.jsx("div",{className:"text-[10px] font-bold tracking-wider uppercase text-white/85",children:t.label}),e.jsx("div",{className:"text-xl font-black text-white mt-1 leading-none",children:t.value}),e.jsx("div",{className:"text-[11px] font-bold mt-0.5 text-green-400",children:t.delta})]},t.label))}),e.jsx("div",{className:"flex items-end gap-1.5 h-14 px-1",children:u.map((t,r)=>e.jsx("div",{className:"flex-1 rounded-sm lg-bar",style:{height:`${t}%`,animationDelay:`${r*.15}s`,background:"linear-gradient(180deg,var(--custom-600),color-mix(in srgb, var(--custom-600) 30%, transparent))"}},r))})]}),e.jsxs("div",{className:"rounded-xl p-5 bg-white/[0.04] border border-white/[0.08]",children:[e.jsx("p",{className:"text-sm leading-relaxed italic mb-3 text-white",children:`"We replaced six separate tools in a weekend. Our ops team didn't even notice — they just got a cleaner UI and faster workflows."`}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-xs font-black text-white flex-shrink-0",style:{background:"var(--custom-600)"},children:"SH"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-bold text-white",children:"Sara Han"}),e.jsx("div",{className:"text-xs text-white/85",children:"Operations Lead"})]})]})]})]}),e.jsx("div",{className:"flex gap-4 flex-wrap",children:["SOC 2 Type II","GDPR & HIPAA-ready","Self-host or cloud"].map(t=>e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-white",children:[e.jsx("span",{className:"w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0 bg-green-400/20 text-green-400",children:e.jsx("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}),t]},t))})]})]})]})]})},v=[30,55,42,68,50,78,62,90,72,95],j=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M12 2l1.8 5.6L19.5 9l-5.7 1.4L12 16l-1.8-5.6L4.5 9l5.7-1.4z"}),e.jsx("path",{d:"M19 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1z"})]}),y=({children:n,content:l,...o})=>{const a=h(t=>{var r;return((r=t==null?void 0:t.theme)==null?void 0:r.coverLayout)||{}}),i=c.useMemo(()=>{try{if(a!=null&&a.moreInformation){const t=JSON.parse(a.moreInformation);return(t==null?void 0:t.themeText)||{}}}catch{}return{}},[a==null?void 0:a.moreInformation]),s=i.primaryText||"Your Journey to Exceptional Service",x=i.secondaryText||"Operations Platform",m=i.description||"Elevate your client relationships and deliver excellence every step of the way — with real-time data and full visibility into your operations.";return e.jsxs("div",{className:"flex h-full",children:[e.jsx("style",{children:`
|
|
14
|
+
@keyframes lgFloat { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-20px,-25px) scale(1.05);} }
|
|
15
|
+
@keyframes lgBar { 0%,100%{transform:scaleY(1);transform-origin:bottom;} 50%{transform:scaleY(.85);transform-origin:bottom;} }
|
|
16
|
+
.lg-orb-l1 { animation:lgFloat 8s ease-in-out infinite; }
|
|
17
|
+
.lg-orb-l2 { animation:lgFloat 10s ease-in-out -3s infinite; }
|
|
18
|
+
.lg-bar { animation:lgBar 2.6s ease-in-out infinite; }
|
|
19
|
+
`}),e.jsxs("aside",{className:"hidden lg:flex lg:w-[40%] relative overflow-hidden flex-col bg-[#1B1B1B]",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"radial-gradient(circle at 80% 30%,color-mix(in srgb,var(--custom-600) 35%,transparent),transparent 55%),radial-gradient(circle at 20% 70%,color-mix(in srgb,var(--custom-600) 18%,transparent),transparent 55%),linear-gradient(225deg,#1a1612 0%,#1B1B1B 60%,#1a1309 100%)"}}),e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,0.05) 1px,transparent 1px)",backgroundSize:"48px 48px",maskImage:"radial-gradient(circle at 50% 40%,#000 30%,transparent 80%)",WebkitMaskImage:"radial-gradient(circle at 50% 40%,#000 30%,transparent 80%)"}}),e.jsx("div",{className:"lg-orb-l1 absolute rounded-full pointer-events-none opacity-70",style:{top:-80,left:-100,width:360,height:360,background:"var(--custom-600)",filter:"blur(40px)"}}),e.jsx("div",{className:"lg-orb-l2 absolute rounded-full pointer-events-none opacity-70",style:{bottom:-120,right:-80,width:420,height:420,background:"#0D9488",filter:"blur(40px)"}}),e.jsxs("div",{className:"relative z-10 flex flex-col justify-between flex-1 p-14 text-white",children:[e.jsx("div",{children:e.jsx(p,{mode:"dark",logoWidth:"180px"})}),e.jsxs("div",{className:"max-w-[480px]",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 text-xs font-bold tracking-widest uppercase rounded-full px-3 py-1.5 mb-5",style:{color:"var(--custom-600)",background:"color-mix(in srgb,var(--custom-600) 12%,transparent)",border:"1px solid color-mix(in srgb,var(--custom-600) 30%,transparent)"},children:[e.jsx(j,{}),x]}),e.jsx("h1",{className:"text-[2.8rem] font-black leading-tight tracking-tight text-white mb-4",children:s.includes(" ")?e.jsxs(e.Fragment,{children:[s.split(" ").slice(0,Math.ceil(s.split(" ").length*.6)).join(" ")," ",e.jsx("em",{className:"not-italic",style:{background:"linear-gradient(120deg,var(--custom-600),var(--custom-500))",WebkitBackgroundClip:"text",backgroundClip:"text",color:"transparent"},children:s.split(" ").slice(Math.ceil(s.split(" ").length*.6)).join(" ")})]}):s}),e.jsx("p",{className:"text-base leading-relaxed mb-8 text-white",children:m}),e.jsxs("div",{className:"rounded-xl p-4 mb-6 bg-white/[0.04] border border-white/[0.08] backdrop-blur",children:[e.jsx("div",{className:"grid grid-cols-3 gap-2.5 mb-3",children:[{label:"On-time",value:"94.6%",delta:"▲ 2.4"},{label:"In transit",value:"1,284",delta:"▲ 118"},{label:"Idle / day",value:"18m",delta:"▼ 6m"}].map(t=>e.jsxs("div",{className:"rounded-lg p-2.5 bg-white/5",children:[e.jsx("div",{className:"text-[10px] font-bold tracking-wider uppercase text-white/85",children:t.label}),e.jsx("div",{className:"text-xl font-black text-white mt-1 leading-none",children:t.value}),e.jsx("div",{className:"text-[11px] font-bold mt-0.5 text-green-400",children:t.delta})]},t.label))}),e.jsx("div",{className:"flex items-end gap-1.5 h-14 px-1",children:v.map((t,r)=>e.jsx("div",{className:"flex-1 rounded-sm lg-bar",style:{height:`${t}%`,animationDelay:`${r*.15}s`,background:"linear-gradient(180deg,var(--custom-600),color-mix(in srgb,var(--custom-600) 30%,transparent))"}},r))})]}),e.jsxs("div",{className:"rounded-xl p-5 bg-white/[0.04] border border-white/[0.08]",children:[e.jsx("p",{className:"text-sm leading-relaxed italic mb-3 text-white",children:`"We replaced six separate tools in a weekend. Our ops team didn't even notice — they just got a cleaner UI and faster workflows."`}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-xs font-black text-white flex-shrink-0",style:{background:"var(--custom-600)"},children:"SH"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-bold text-white",children:"Sara Han"}),e.jsx("div",{className:"text-xs text-white/85",children:"Operations Lead"})]})]})]})]}),e.jsx("div",{className:"flex gap-4 flex-wrap",children:["SOC 2 Type II","GDPR & HIPAA-ready","Self-host or cloud"].map(t=>e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-white",children:[e.jsx("span",{className:"w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0 bg-green-400/20 text-green-400",children:e.jsx("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}),t]},t))})]})]}),e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center bg-white dark:bg-gray-800 px-8 py-12 overflow-y-auto text-gray-900 dark:text-gray-50",children:e.jsxs("div",{className:"w-full max-w-[440px]",children:[e.jsx("div",{className:"mb-8 lg:hidden",children:e.jsx(p,{mode:"light",logoWidth:"160px"})}),l&&e.jsx("div",{className:"mb-8",children:l}),n?c.cloneElement(n,{...o}):null]})})]})},w=[30,55,42,68,50,78,62,90,72,95],k=({children:n,content:l,...o})=>{const a=h(t=>{var r;return((r=t==null?void 0:t.theme)==null?void 0:r.sideLayout)||{}}),i=c.useMemo(()=>{try{if(a!=null&&a.moreInformation){const t=JSON.parse(a.moreInformation);return(t==null?void 0:t.themeText)||{}}}catch{}return{}},[a==null?void 0:a.moreInformation]),s=i.primaryText||"Your Journey to Exceptional Service",x=i.secondaryText||"Operations Platform",m=i.description||"Elevate your client relationships and deliver excellence every step of the way.";return e.jsxs("div",{className:"relative flex h-full w-full overflow-hidden",children:[e.jsx("style",{children:`
|
|
20
|
+
@keyframes lgFloat { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(20px,-25px) scale(1.05);} }
|
|
21
|
+
.lg-orb-c { animation: lgFloat 8s ease-in-out infinite; }
|
|
22
|
+
`}),e.jsxs("div",{className:"absolute inset-0 bg-[#1B1B1B]",children:[e.jsx("div",{className:"absolute inset-0",style:{background:"radial-gradient(circle at 20% 30%,color-mix(in srgb,var(--custom-600) 35%,transparent),transparent 55%),radial-gradient(circle at 80% 70%,color-mix(in srgb,var(--custom-600) 18%,transparent),transparent 55%),linear-gradient(135deg,#1a1612 0%,#1B1B1B 60%,#1a1309 100%)"}}),e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,0.04) 1px,transparent 1px)",backgroundSize:"48px 48px",maskImage:"radial-gradient(circle at 50% 40%,#000 30%,transparent 80%)",WebkitMaskImage:"radial-gradient(circle at 50% 40%,#000 30%,transparent 80%)"}}),e.jsx("div",{className:"lg-orb-c absolute rounded-full opacity-60",style:{top:-120,right:-140,width:560,height:560,background:"var(--custom-600)",filter:"blur(56px)"}}),e.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-white blur-sm opacity-90 z-[1] px-[5vw]",children:e.jsxs("div",{className:"w-full text-center",children:[e.jsx("div",{className:"inline-flex items-center gap-2 font-bold tracking-widest uppercase rounded-full mb-6",style:{fontSize:13,padding:"8px 20px",color:"var(--custom-600)",background:"color-mix(in srgb,var(--custom-600) 12%,transparent)",border:"1px solid color-mix(in srgb,var(--custom-600) 30%,transparent)"},children:x}),e.jsx("h1",{className:"text-white font-black leading-[1.08] tracking-[-0.03em] mb-5",style:{fontSize:"clamp(2.8rem, 5vw, 4.5rem)"},children:s}),e.jsx("p",{className:"text-white leading-relaxed mb-10 max-w-[65ch] mx-auto",style:{fontSize:"clamp(1rem, 1.4vw, 1.25rem)"},children:m}),e.jsxs("div",{className:"rounded-[20px] p-7 bg-white/5 border border-white/[0.08] backdrop-blur",children:[e.jsx("div",{className:"grid grid-cols-3 gap-5 mb-5",children:[{l:"On-time",v:"94.6%",d:"▲ 2.4"},{l:"In transit",v:"1,284",d:"▲ 118"},{l:"Idle / day",v:"18m",d:"▼ 6m"}].map(t=>e.jsxs("div",{className:"rounded-[14px] py-[18px] px-5 bg-white/[0.06] text-center",children:[e.jsx("div",{className:"text-[11px] font-bold tracking-[0.1em] uppercase text-white/85 mb-2",children:t.l}),e.jsx("div",{className:"font-black text-white leading-none",style:{fontSize:"clamp(1.8rem, 3vw, 2.8rem)"},children:t.v}),e.jsx("div",{className:"text-[13px] font-bold mt-1.5 text-green-400",children:t.d})]},t.l))}),e.jsx("div",{className:"flex items-end gap-1.5 h-16",children:w.map((t,r)=>e.jsx("div",{className:"flex-1 rounded-sm",style:{height:`${t}%`,background:"linear-gradient(180deg,var(--custom-600),color-mix(in srgb,var(--custom-600) 30%,transparent))"}},r))})]})]})})]}),e.jsx("div",{className:"absolute top-10 left-12 z-[30]",children:e.jsx(p,{mode:"dark",logoWidth:"180px"})}),e.jsx("div",{className:"relative flex flex-1 items-center justify-center z-[20]",children:e.jsxs("div",{className:"w-full max-w-[440px] bg-white rounded-2xl shadow-2xl p-10 text-gray-900",children:[l&&e.jsx("div",{className:"mb-6",children:l}),n?c.cloneElement(n,{...o}):null]})})]})},N=()=>{const n=h(a=>a.theme.layout.type),l=h(a=>a.theme.loginLayout),o=()=>n===g?e.jsx(d,{}):location.pathname.indexOf("timelog-approval-view-validation")>-1?e.jsx(d,{}):l==="center_layout"?e.jsx(k,{children:e.jsx(d,{})}):location.pathname==="/setup"?e.jsx(d,{}):l==="cover_layout"?e.jsx(y,{children:e.jsx(d,{})}):e.jsx(f,{children:e.jsx(d,{})});return e.jsx("div",{className:"app-layout-blank flex flex-auto flex-col h-[100vh]",children:o()})},E=N;export{E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,l as $}from"./vendor-mui-98daa63f.js";import{u as h,t as v,g as I,s as p,a as G,r as K}from"./index-fc9f8c4b.js";import{P as W}from"./PageBreadcrumb-cf54a6e9.js";import{k as C,E as Q,F as H,a0 as J,c6 as U,B as F,ai as X,D as Z,d as _}from"./index-3b5ce20a.js";import{A}from"./AdaptableCard-3d1e1f96.js";import{r as d,f as ee}from"./vendor-react-ece1c85f.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{a as te,C as E}from"./index-a14e51de.js";import{D as N}from"./Drawer-4f97e662.js";import{F as ae,a as k}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{R as se}from"./RoleNew-e86a1513.js";import{C as le}from"./ConfirmDialog-2838a642.js";import{d as oe,R as re}from"./RoleEdit-a076ea85.js";import{A as ie,T as O}from"./actioncell-6b5ebd6c.js";import{F as ne,b as ce,d as L}from"./index.esm-b2d342b5.js";import{C as de}from"./tableV3-24eed052.js";import"./vendor-redux-a1f00e6b.js";import"./RoleService-2f9ed883.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"./RoleForm-47691f91.js";import"./index-b0ef7ac3.js";import"./StickyFooter-3e569b80.js";import"./index-0b08ce18.js";import"./validationPatterns-77446c46.js";import"./DoubleSidedImage-b4bd3915.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";const me=()=>{const a=C(),m=h(r=>r.roleList.data.deleteConfirmation),f=h(r=>r.roleList.data.selectedRole),n=h(r=>r.roleList.data.tableData),x=()=>{a(v(!1))},s=async()=>{a(v(!1)),await oe(f)&&(a(I(n)),Q.push(e.jsx(H,{title:"Deleted",type:"success",duration:2500,children:"Role Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(le,{isOpen:m,type:"danger",title:"Delete Role",confirmButtonColor:"red-600",onClose:x,onRequestClose:x,onCancel:x,onConfirm:s,children:e.jsx("p",{children:"Are you sure you want to delete this role? All records related to this role will be deleted as well. This action cannot be undone."})})},{DatePickerRange:fe}=te,T=d.forwardRef(({onSubmitComplete:a},m)=>{const f=C(),n=h(l=>l.roleList.data.filterData),[x,s]=d.useState(n.dateRange),r=l=>{a==null||a(),f(p(l))},i=l=>{s(l)};return e.jsx(ne,{enableReinitialize:!0,innerRef:m,initialValues:{...n},onSubmit:l=>{r(l)},children:({values:l,touched:R,errors:D})=>e.jsx(ce,{children:e.jsxs(ae,{children:[e.jsxs(k,{invalid:D.searchText&&R.searchText,errorMessage:D.searchText,children:[e.jsx("h6",{className:"mb-4",children:"Included text"}),e.jsx(L,{type:"text",autoComplete:"off",name:"searchText",placeholder:"Keyword",component:J,prefix:e.jsx(U,{className:"text-lg"})})]}),e.jsxs(k,{errorMessage:D.dateRange,children:[e.jsx("h6",{className:"mb-4",children:"Filter By Date Range"}),e.jsx(L,{name:"dateRange",children:({field:g,form:u})=>e.jsx(e.Fragment,{children:e.jsx(fe,{field:g,name:"dateRange",value:x,form:u,placeholder:"Select dates range",onChange:c=>{c[0]&&u.setFieldValue("fromDate",c[0].toDateString()),c[1]&&u.setFieldValue("toDate",c[1].toDateString()),u.setFieldValue("dateRange",c),i(c)}})})})]})]})})})}),ue=({onSaveClick:a,onCancel:m,onClearFilers:f})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(F,{size:"sm",className:"mr-2",onClick:f,children:"Clear All"}),e.jsx(F,{size:"sm",className:"mr-2",onClick:m,children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",onClick:a,children:"Query"})]}),xe=a=>{const m=d.useRef(null),[f,n]=d.useState(!1);h(l=>l.roleList.data.filterData);const x=C(),s=()=>{n(!1),a.onClose()},r=()=>{x(p({searchText:"",fromDate:"",toDate:"",dateRange:[null,null]})),n(!1),a.onClose()},i=()=>{var l;(l=m.current)==null||l.submitForm()};return d.useEffect(()=>{a.isOpen&&n(!0)},[a.isOpen]),e.jsx(e.Fragment,{children:e.jsx(N,{title:"Filter",isOpen:f,footer:e.jsx(ue,{onCancel:s,onSaveClick:i,onClearFilers:r}),onClose:s,onRequestClose:s,children:e.jsx(T,{ref:m,onSubmitComplete:s})})})};T.displayName="RoleFilterForm";const he=a=>{const m=d.useRef(null);ee();const[f,n]=d.useState(!1),[x,s]=d.useState(""),[r,i]=d.useState(!1),l=t=>{n(!0)},R=t=>{n(!1)},D=C(),{pageIndex:g,pageSize:u,sort:c,query:o,total:j}=h(t=>t.roleList.data.tableData),b=h(t=>t.roleList.data.filterData),w=h(t=>t.roleList.data.loading),B=h(t=>t.roleList.data.roleList);d.useEffect(()=>{y()},[g,u,c,a.isRefetch,b]),d.useEffect(()=>{var t;m&&((t=m.current)==null||t.resetSorting())},[b]),d.useMemo(()=>({pageIndex:g,pageSize:u,sort:c,query:o,total:j}),[g,u,c,o,j]);const y=()=>{const t=I({pageIndex:g,pageSize:u,sort:c,query:o,filterData:b});D(t)},M=[...a!=null&&a.isEdit||a!=null&&a.isDelete?[{dataField:"Action",caption:"Action",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(ie,{row:t==null?void 0:t.data,actions:Y,buttonClick:V})})}]:[],{dataField:"name",caption:"Role Name",cellRender:t=>e.jsx("div",{"data-cname":"Role Name",children:t.data.name})},{dataField:"description",caption:"Role Description",cellRender:t=>e.jsx("div",{"data-cname":"Role Description",children:t.data.description})},{dataField:"createdByName",caption:"Created By",cellRender:t=>e.jsx("div",{"data-cname":"Created By",children:t.data.createdByName})},{dataField:"createdDate",caption:"Created On",cellRender:t=>e.jsx("div",{"data-cname":"Created On",children:t.data.createdDate?X(t.data.createdDate).format("MM/DD/YYYY"):""})}],V=(t,S)=>{S===O.edit&&z(t),S===O.delete&&P(t)},z=t=>{s(`${t.id}`),l()},P=t=>{D(v(!0)),D(G(t.id))},Y={edit:a==null?void 0:a.isEdit,delete:a==null?void 0:a.isDelete,view:!1},q=()=>{i(!1)};return e.jsxs(e.Fragment,{children:[w&&e.jsx($,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsx(de,{tableName:"RolesList",dataSource:B,columns:M,height:"calc(100vh - 280px)",keyExpr:"$id",stateStorageKey:"Role-table",isLoading:w}),e.jsx(N,{title:"Edit Role",isOpen:f,onClose:R,portalClassName:"w30 prevent-overflow",children:e.jsx(re,{footerWidth:"w30",roleId:x,onDrawerClose:R,fetchData:y})}),e.jsx(xe,{isOpen:r,onClose:q}),e.jsx(me,{})]})};Z("roleList",K);const De=()=>{var c;const a="Roles",[m,f]=d.useState(!1),[n,x]=d.useState(!1),s=h(o=>o.roleList.data.filterData),r=h(o=>{var j;return((j=o.auth.session)==null?void 0:j.permission)||[]}),i=((c=r==null?void 0:r.filter(o=>(o==null?void 0:o.defaultMenuName)===a))==null?void 0:c[0])||{isDelete:!1,isEdit:!1,isManage:!1,isView:!1},l=C(),R=()=>{f(!0)},D=o=>{f(!1)},g=o=>{f(!1),x(!n)},u=o=>{o==="search"&&l(p({...s,searchText:""})),o==="role"&&l(p({...s,role:void 0})),o==="date"&&l(p({...s,fromDate:"",toDate:"",dateRange:[null,null]}))};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(W,{items:[{label:"Settings"},{label:"Roles"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Roles"}),(i==null?void 0:i.isEdit)&&e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(F,{block:!0,variant:"solid",size:"sm",icon:e.jsx(_,{}),onClick:()=>R(),children:"Add Role"}),e.jsx(N,{title:"Add Role",isOpen:m,onClose:D,portalClassName:"w30 prevent-overflow",children:e.jsx(se,{footerWidth:"w30",onDrawerClose:D,onAddNew:g})})]})]})]}),e.jsxs(A,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:[e.jsxs("div",{className:"text-right mb-3 ",children:[s.searchText!=""&&e.jsx(E,{title:"Search By",value:s.searchText,tagId:"search",onRemovefilter:u}),s.fromDate!=""&&s.toDate!=""&&e.jsx(E,{title:"DateRange",value:s.fromDate+"-"+s.toDate,tagId:"date",onRemovefilter:u})]}),e.jsx(A,{className:"borderless",children:e.jsx(he,{isRefetch:n,isEdit:i==null?void 0:i.isEdit,isDelete:i==null?void 0:i.isDelete})})]})]})},lt=De;export{lt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bY as a}from"./index-3b5ce20a.js";function i(c){return a({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M480 580H372a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8h108v108a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8V644h108a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8H544V472a8 8 0 0 0-8-8h-48a8 8 0 0 0-8 8v108zm374.6-291.3c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2z"},child:[]}]})(c)}function l(c){return a({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"},child:[]}]})(c)}function h(c){return a({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"},child:[]},{tag:"path",attr:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0 1 30.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1 0 80 0 40 40 0 1 0-80 0z"},child:[]}]})(c)}function r(c){return a({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"},child:[]}]})(c)}function e(c){return a({tag:"svg",attr:{viewBox:"0 0 1024 1024",fill:"currentColor",fillRule:"evenodd"},child:[{tag:"path",attr:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64Zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372Zm128.013 198.826c.023.007.042.018.083.059l45.02 45.019c.04.04.05.06.058.083a.118.118 0 0 1 0 .07c-.007.022-.018.041-.059.082L557.254 512l127.861 127.862a.268.268 0 0 1 .05.06l.009.023a.118.118 0 0 1 0 .07c-.007.022-.018.041-.059.082l-45.019 45.02c-.04.04-.06.05-.083.058a.118.118 0 0 1-.07 0c-.022-.007-.041-.018-.082-.059L512 557.254 384.14 685.115c-.042.041-.06.052-.084.059a.118.118 0 0 1-.07 0c-.022-.007-.041-.018-.082-.059l-45.02-45.019c-.04-.04-.05-.06-.058-.083a.118.118 0 0 1 0-.07c.007-.022.018-.041.059-.082L466.745 512l-127.86-127.86a.268.268 0 0 1-.05-.061l-.009-.023a.118.118 0 0 1 0-.07c.007-.022.018-.041.059-.082l45.019-45.02c.04-.04.06-.05.083-.058a.118.118 0 0 1 .07 0c.022.007.041.018.082.059L512 466.745l127.862-127.86c.04-.041.06-.052.083-.059a.118.118 0 0 1 .07 0Z"},child:[]}]})(c)}export{h as A,l as a,r as b,e as c,i as d};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{j as e,S as ht}from"./vendor-mui-98daa63f.js";import{r,f as gt,u as ut}from"./vendor-react-ece1c85f.js";import{k as _e,c as C,B as U,ea as xe,eb as pe,E as J,F as K,eK as Me,bg as we,e3 as ft,cP as yt,cJ as vt,a0 as fe,L as Ee,eL as jt,o as Ie,n as bt,p as wt,Y as Et,s as kt,aI as St,eM as Ft,eN as Nt,d as Oe,bz as Bt,bA as Ct,e5 as At,eO as Lt,e8 as Dt,e9 as zt}from"./index-3b5ce20a.js";import{P as Pt}from"./PageBreadcrumb-cf54a6e9.js";import{T as We}from"./index-289b3fd9.js";import{A as Rt}from"./AdaptableCard-3d1e1f96.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as Ce}from"./Drawer-4f97e662.js";import{a as Mt}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import{U as Ae}from"./Upload-be937eb6.js";import{L as me}from"./Logo-dd6f7656.js";import{c as It,a as ke,F as Ot,b as Tt,d as Se}from"./index.esm-b2d342b5.js";import{C as _t,t as Te}from"./TweaksPanel-bc10bc47.js";import{F as Le}from"./index-533fd007.js";import{aB as Wt}from"./vendor-devex-4076ffeb.js";import{F as Ut}from"./FileSaver.min-20f3f13a.js";import{a as Ue}from"./index-0b08ce18.js";import{p as ae}from"./Notify-8fb74d48.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";const $t=[{name:"favicon-16x16.png",size:16},{name:"favicon-32x32.png",size:32},{name:"favicon-48x48.png",size:48},{name:"apple-touch-icon.png",size:180},{name:"android-chrome-192x192.png",size:192},{name:"favicon-256x256.png",size:256},{name:"android-chrome-512x512.png",size:512}],Ht=({isOpen:f,onClose:g})=>{const[y,A]=r.useState([]),[L,P]=r.useState(!1),V=_e(),j=C(o=>{var d;return((d=o==null?void 0:o.theme)==null?void 0:d.siteSettings)||{}}),k=async o=>{const d=await Promise.all($t.map(({name:m,size:x})=>new Promise(v=>{const p=document.createElement("canvas");p.width=x,p.height=x;const w=p.getContext("2d"),u=new Image;u.onload=()=>{w.clearRect(0,0,x,x),w.drawImage(u,0,0,x,x),p.toBlob(F=>{const E=URL.createObjectURL(F);v({name:m,size:x,blob:F,url:E})},"image/png")},u.src=URL.createObjectURL(o)})));A(d)},b=o=>{const d=o==null?void 0:o[0];d instanceof File&&k(d)},R=async o=>{const m=`
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64">
|
|
3
|
+
<image href="${await M(o)}" height="64" width="64"/>
|
|
4
|
+
</svg>`.trim();return new Blob([m],{type:"image/svg+xml"})},M=o=>new Promise(d=>{const m=new FileReader;m.onloadend=()=>d(m.result),m.readAsDataURL(o)}),_=async()=>{const o=y.find(d=>d.size===32)||y[0];if(o){P(!0);try{const d=new File([o.blob],"favicon.png",{type:"image/png"});await xe(j.id,"favicon","Favicon",j.settingValue,j.settingType,"Site favicon",d,void 0),V(pe()),J.push(e.jsx(K,{title:"Saved!",type:"success",children:"Favicon applied to site."}),{placement:"top-center"})}catch{J.push(e.jsx(K,{title:"Error",type:"danger",children:"Failed to save favicon."}),{placement:"top-center"})}finally{P(!1)}}},Z=async()=>{var v;const o=new Wt;y.forEach(p=>{o.file(p.name,p.blob)});const d=(v=y.find(p=>p.size>=64))==null?void 0:v.blob;if(d){const p=await R(d);o.file("favicon.svg",p)}const m={name:"My App",short_name:"App",icons:y.filter(p=>[192,256,512].includes(p.size)).map(p=>({src:p.name,sizes:`${p.size}x${p.size}`,type:"image/png"})),theme_color:"#ffffff",background_color:"#ffffff",display:"standalone"};o.file("site.webmanifest",JSON.stringify(m,null,2));const x=await o.generateAsync({type:"blob"});Ut.saveAs(x,"favicons.zip")};return e.jsx(Ce,{title:"Manage Favicon Icon",isOpen:f,portalClassName:"w30",onClose:g,children:e.jsxs("div",{children:[e.jsx("label",{className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Manage Icon"}),e.jsx(Ae,{draggable:!0,accept:"image/*",showList:!1,uploadLimit:1,cropNeeded:!1,onChange:o=>b(o),children:e.jsxs("div",{className:"my-16 text-center",children:[e.jsx("div",{className:"text-6xl mb-4 flex justify-center",children:e.jsx(Le,{})}),e.jsxs("p",{className:"font-semibold",children:[e.jsx("span",{className:"text-gray-800 dark:text-white",children:"Drop your image here, or "}),e.jsx("span",{className:"text-blue-500",children:"browse"})]}),e.jsx("p",{className:"mt-1 opacity-60 dark:text-white",children:"Support: jpeg, png, gif"})]})}),y.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mt-6",children:[e.jsx("h4",{className:"font-semibold mb-2",children:"Generated Favicons:"}),e.jsx("div",{className:"grid grid-cols-3 gap-4",children:y.map((o,d)=>e.jsxs("div",{className:"text-center",children:[e.jsx("img",{src:o.url,alt:`favicon-${o.size}`,className:"mx-auto border"}),e.jsx("p",{className:"text-sm mt-1",children:o.name})]},d))})]}),e.jsxs("div",{className:"flex gap-3 justify-center mt-6",children:[e.jsx(U,{variant:"solid",onClick:_,loading:L,children:"Save to site"}),e.jsx(U,{onClick:Z,children:"Download ZIP"})]})]})]})})},Fe=({isOpen:f,onClose:g,handleFileUpload:y,settingType:A})=>{const[L,P]=r.useState(null),[V,j]=r.useState(null),[k,b]=r.useState(null),[R,M]=r.useState(!1),_=Z=>{var w;const o=Z[0];if(!o)return;const d=10,m=d*1024*1024;if(o.size>m){ae(`File size should not exceed ${d} MB.`,"File Size","warning",4500);return}const x=(w=o.name.split(".").pop())==null?void 0:w.toLowerCase();if(!x||!["jpg","jpeg","png","mp4","mov"].includes(x)){ae("Unsupported file type. Only jpg, jpeg, png, mp4, and mov are allowed.","Unsupported File Type","warning",4500);return}const p=URL.createObjectURL(o);if(o.type.startsWith("image")){const u=new Image;u.onload=()=>{b(o),P(p),j("image")},u.onerror=()=>{ae("Failed to load the image.","Failed","danger",4500),URL.revokeObjectURL(p)},u.src=p}else if(o.type.startsWith("video")){const u=document.createElement("video");u.preload="metadata",u.onloadedmetadata=()=>{window.URL.revokeObjectURL(u.src),b(o),P(p),j("video")},u.onerror=()=>{alert("Failed to load the video."),URL.revokeObjectURL(p)},u.src=p}};return r.useEffect(()=>{f||(L&&URL.revokeObjectURL(L),P(null),j(null),b(null))},[f]),e.jsxs(Ce,{title:"Manage Background",isOpen:f,portalClassName:"w30",onClose:g,children:[e.jsxs("div",{children:[e.jsx("label",{className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Background (Image/Video)"}),e.jsx(Ae,{draggable:!0,accept:"image/*,video/*",onChange:_,cropNeeded:!1,children:e.jsxs("div",{className:"my-16 text-center",children:[e.jsx("div",{className:"text-6xl mb-4 flex justify-center",children:e.jsx(Le,{})}),e.jsxs("p",{className:"font-semibold",children:[e.jsxs("span",{className:"text-gray-800 dark:text-white",children:["Drop your image or video here, or"," "]}),e.jsx("span",{className:"text-blue-500",children:"browse"})]}),e.jsx("p",{className:"mt-1 opacity-60 dark:text-white",children:"Support: jpeg, png, mp4, mov"})]})}),L&&e.jsxs("div",{className:"mt-6",children:[e.jsx("h4",{className:"font-semibold mb-2",children:"Preview:"}),V==="image"?e.jsx("img",{src:L,alt:"Preview",className:"rounded border w-full"}):e.jsx("video",{src:L,controls:!0,className:"w-full rounded border"})]})]}),e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(U,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>g(),children:"Discard"}),e.jsx(U,{size:"sm",variant:"solid",loading:R,icon:e.jsx(Ue,{}),onClick:async()=>{k&&(M(!0),await y({file:k,settingType:A})),g(),M(!1)},children:"Save"})]})]})},Yt=({dataUrl:f,targetW:g,targetH:y,onApply:A,fileName:L,isDark:P=!1})=>{const V=r.useRef(null),j=r.useRef(null),k=r.useRef({x:0,y:0}),b=r.useRef(null),[R,M]=r.useState(1),_=r.useRef(1),[Z,o]=r.useState(!1),d=g/y,m=420,x=Math.round(m/d),v=r.useCallback(()=>{const c=V.current,B=j.current;if(!c||!B)return;const $=c.getContext("2d"),te=_.current,se=B.naturalWidth*te,ie=B.naturalHeight*te,I=(m-se)/2+k.current.x,O=(x-ie)/2+k.current.y;$.clearRect(0,0,m,x),$.fillStyle=P?"#111827":"#ffffff",$.fillRect(0,0,m,x),$.drawImage(B,I,O,se,ie)},[m,x]);r.useEffect(()=>{const c=new Image;c.onload=()=>{j.current=c,k.current={x:0,y:0};const B=Math.min(m/c.naturalWidth,x/c.naturalHeight),$=Math.min(1,B);_.current=$,M($),v()},c.src=f},[f,m,x,v]),r.useEffect(()=>{_.current=R,v()},[R,v]);const p=c=>{b.current={startX:c.clientX,startY:c.clientY,origX:k.current.x,origY:k.current.y}},w=r.useCallback(c=>{b.current&&(k.current={x:b.current.origX+(c.clientX-b.current.startX),y:b.current.origY+(c.clientY-b.current.startY)},v())},[v]),u=r.useCallback(()=>{b.current=null},[]);r.useEffect(()=>(window.addEventListener("mousemove",w),window.addEventListener("mouseup",u),()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",u)}),[w,u]);const F=async()=>{const c=j.current;if(c){o(!0);try{const B=_.current,$=c.naturalWidth*B,te=c.naturalHeight*B,se=(m-$)/2+k.current.x,ie=(x-te)/2+k.current.y,I=-se/B,O=-ie/B,H=m/B,Y=x/B,re=document.createElement("canvas");re.width=g,re.height=y;const he=re.getContext("2d");he.clearRect(0,0,g,y),he.drawImage(c,I,O,H,Y,0,0,g,y),re.toBlob(ge=>{ge&&(A(new File([ge],L,{type:"image/png"}),L),o(!1))},"image/png")}catch{ae("Failed to apply crop.","Error","error",4500),o(!1)}}},E=j.current?Math.min(m/j.current.naturalWidth,x/j.current.naturalHeight):1,q=Math.min(.05,E*.25),D=Math.max(E*5,5);return e.jsxs("div",{children:[e.jsxs("div",{className:"text-xs font-semibold uppercase tracking-widest text-gray-400 mb-2",children:["Crop & scale — ",g,"×",y,"px"]}),e.jsx("div",{className:"rounded-lg overflow-hidden border border-gray-200",style:{width:m,height:x,cursor:"grab",userSelect:"none"},onMouseDown:p,children:e.jsx("canvas",{ref:V,width:m,height:x,style:{display:"block"}})}),e.jsxs("div",{className:"flex items-center gap-3 mt-3 px-1",children:[e.jsx("span",{className:"text-xs text-gray-400 w-10",children:"Zoom"}),e.jsx(ht,{value:R,min:q,max:D,step:.01,onChange:(c,B)=>M(B),size:"small",sx:{color:"var(--custom-600)"}}),e.jsxs("span",{className:"text-xs text-gray-400 w-16 text-right",children:[(R*100).toFixed(0),"%"]})]}),e.jsx(U,{className:"mt-3 w-full",variant:"solid",size:"sm",loading:Z,onClick:F,children:"Apply crop"})]})},ye=({isOpen:f,onClose:g,handleFileUpload:y,settingType:A,label:L,title:P,expectedDimensions:V,isDark:j=!1})=>{const{width:k,height:b}=V,[R,M]=r.useState(null),[_,Z]=r.useState("logo.png"),[o,d]=r.useState(null),[m,x]=r.useState(null),[v,p]=r.useState(!1),w=F=>{var c;const E=F[0];if(!E)return;if(((c=E.name.split(".").pop())==null?void 0:c.toLowerCase())!=="png"||E.type!=="image/png"){ae("Logo must be a transparent PNG.","File Type","warning",4500);return}if(E.size>2*1024*1024){ae("File size should not exceed 2 MB.","File Size","warning",4500);return}Z(E.name),d(null),x(null);const D=new FileReader;D.onloadend=()=>M(D.result),D.readAsDataURL(E)},u=F=>{o&&URL.revokeObjectURL(o),d(URL.createObjectURL(F)),x(F)};return r.useEffect(()=>{f||(o&&URL.revokeObjectURL(o),M(null),d(null),x(null))},[f]),e.jsxs(Ce,{title:P,isOpen:f,portalClassName:"w30",onClose:g,children:[e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:L}),e.jsx(Ae,{draggable:!0,accept:"image/png",onChange:w,cropNeeded:!1,showList:!1,children:e.jsxs("div",{className:"py-8 text-center",children:[e.jsx("div",{className:"text-5xl mb-3 flex justify-center",children:e.jsx(Le,{})}),e.jsxs("p",{className:"font-semibold text-sm",children:[e.jsx("span",{className:"text-gray-800 dark:text-white",children:"Drop PNG here, or "}),e.jsx("span",{className:"text-blue-500",children:"browse"})]}),e.jsxs("p",{className:"mt-1 text-xs opacity-60 dark:text-white",children:["Any size · cropped & scaled to ",k,"×",b,"px"]}),e.jsx("p",{className:"mt-0.5 text-xs opacity-60 dark:text-white",children:"Max 2 MB · PNG only"})]})})]}),R&&e.jsx(Yt,{dataUrl:R,targetW:k,targetH:b,fileName:_,onApply:u,isDark:j}),o&&e.jsxs("div",{children:[e.jsxs("div",{className:"text-xs font-semibold uppercase tracking-widest text-gray-400 mb-2",children:["Preview (",k,"×",b,"px)"]}),e.jsx("div",{className:"rounded-lg border flex items-center justify-center p-4",style:{background:j?"#111827":"#F6F4F1",minHeight:80},children:e.jsx("img",{src:o,alt:"Preview",style:{maxWidth:"100%",maxHeight:140,objectFit:"contain"}})})]})]}),e.jsxs("div",{className:"md:flex items-center justify-between w-full mt-6",children:[e.jsx(U,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:g,children:"Discard"}),e.jsx(U,{size:"sm",variant:"solid",loading:v,disabled:!m,icon:e.jsx(Ue,{}),onClick:async()=>{m&&(p(!0),await y({file:m,settingType:A}),p(!1),g())},children:"Save"})]})]})},{TabNav:Ne,TabList:Gt,TabContent:Be}=We,Vt=["slate","zinc","gray","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","white","black"],Xt=It().shape({fieldA:ke().required("Site Name is required").notOneOf(Vt,"This color name is reserved. Please choose another."),fieldB:ke().required("Primary Color is required"),fieldC:ke()});function ve(f){try{if(f!=null&&f.moreInformation){const g=JSON.parse(f.moreInformation);return(g==null?void 0:g.themeText)||{}}}catch(g){console.error("Error parsing themeText:",g)}return{}}function Jt(f){const g=[".jpg",".jpeg",".png",".gif",".webp"],y=[".mp4",".webm",".ogg",".mov"],A=f.slice(f.lastIndexOf(".")).toLowerCase();return g.includes(A)?"img":(y.includes(A),"video")}function Kt(f,g){if(!g)return"/img/video/bg-login.mp4";const A=g.replace(/\\/g,"/").split("/").map(encodeURIComponent).join("/");return`${f}/${A}`}const Zt=()=>{const[f,g]=r.useState("general"),[y,A]=r.useState(!1),[L,P]=r.useState(!1),[V,j]=r.useState(!1),[k,b]=r.useState(!1),[R,M]=r.useState(!1),[_,Z]=r.useState(!1),[o,d]=r.useState(!1),[m,x]=r.useState(!1),[v,p]=r.useState({label:"Admin Portal",value:"Admin"}),w=C(t=>{var s;return((s=t==null?void 0:t.theme)==null?void 0:s.sideLayout)||{}}),u=C(t=>{var s;return((s=t==null?void 0:t.theme)==null?void 0:s.centerLayout)||{}}),F=C(t=>{var s;return((s=t==null?void 0:t.theme)==null?void 0:s.coverLayout)||{}}),E=C(t=>{var s;return((s=t==null?void 0:t.theme)==null?void 0:s.customerSideLayout)||{}}),q=C(t=>{var s;return((s=t==null?void 0:t.theme)==null?void 0:s.customerCenterLayout)||{}}),D=C(t=>{var s;return((s=t==null?void 0:t.theme)==null?void 0:s.customerCoverLayout)||{}}),c=C(t=>{var s;return((s=t==null?void 0:t.theme)==null?void 0:s.siteSettings)||{}}),B=C(t=>{var s;return((s=t==null?void 0:t.theme)==null?void 0:s.themeColours)||{}}),{logoIconLightMode:$,fullLogoIconLightMode:te,logoIconDarkMode:se,fullLogoIconDarkMode:ie}=C(t=>t==null?void 0:t.theme),I=r.useMemo(()=>ve(w),[w]),O=r.useMemo(()=>ve(F),[F]),H=r.useMemo(()=>ve(D),[D]),Y=r.useMemo(()=>ve(E),[E]),[re,he]=r.useState({side:{heading:(I==null?void 0:I.primaryText)||"",subheading:(I==null?void 0:I.secondaryText)||"",description:(I==null?void 0:I.description)||""},cover:{heading:(O==null?void 0:O.primaryText)||"",subheading:(O==null?void 0:O.secondaryText)||"",description:(O==null?void 0:O.description)||""}}),[ge,$e]=r.useState({side:{heading:(Y==null?void 0:Y.primaryText)||"",subheading:(Y==null?void 0:Y.secondaryText)||"",description:(Y==null?void 0:Y.description)||""},cover:{heading:(H==null?void 0:H.primaryText)||"",subheading:(H==null?void 0:H.secondaryText)||"",description:(H==null?void 0:H.description)||""}}),oe=t=>{const s=Kt(window.RUNTIME_CONFIG.VITE_API_BASE_URL,t==null?void 0:t.settingFilePath),l=Jt(s);return{url:s,type:l}};r.useMemo(()=>oe(w),[w==null?void 0:w.settingFilePath]),r.useMemo(()=>oe(u),[u==null?void 0:u.settingFilePath]),r.useMemo(()=>oe(F),[F==null?void 0:F.settingFilePath]),r.useMemo(()=>oe(E),[E==null?void 0:E.settingFilePath]),r.useMemo(()=>oe(q),[q==null?void 0:q.settingFilePath]),r.useMemo(()=>oe(D),[D==null?void 0:D.settingFilePath]);const De=C(t=>t.theme.loginLayout),He=C(t=>t.theme.customerLoginLayout);C(t=>t.theme);const G=_e(),T={fontSize:11,fontWeight:700,letterSpacing:"0.07em",textTransform:"uppercase",color:"#888",marginBottom:10},Ye=C(t=>t.theme.layout.type),ce=C(t=>t.theme.mode),ne=C(t=>{var s;return((s=t==null?void 0:t.theme)==null?void 0:s.themeSecondaryColours)||{}});r.useEffect(()=>{Me(ce===we,ne)},[ce,ne]);const Ge=()=>{A(!0)},Ve=t=>{A(!1)},ze=()=>{j(!0)},Xe=t=>{j(!1)},Je=()=>{P(!0)},Ke=t=>{P(!1)},Ze=()=>{b(!0)},qe=t=>{b(!1)},Qe=()=>{Je()},et=t=>{M(!1)},tt=t=>{M(!0)},st=t=>{Z(!1)},it=t=>{d(!1)},rt=t=>{x(!1)};gt();const Pe=ut(),ot=Pe.pathname.substring(Pe.pathname.lastIndexOf("/")+1),[qt,nt]=r.useState("#f05b41");r.useCallback(({value:t})=>{nt(t)},[]);const[X,je]=r.useState(De),lt=t=>{G(Lt(t)),je(t),mt(t,v.value==="Admin"?u:q)};r.useEffect(()=>{v.value==="Admin"?je(De):je(He)},[v]),r.useEffect(()=>{g(ot)},[]);async function at(t,s,l,h){try{await xe(t.id,t.settingKey,t.settingName,t.settingValue,s,t.settingDescription,void 0,JSON.stringify({custom:l,...h&&{customSecondary:h}})),G(pe()),J.push(e.jsx(K,{title:"Saved!",type:"success",children:"Branding updated successfully."}),{placement:"top-center"})}catch(S){console.error("Error saving layout setting:",S),J.push(e.jsx(K,{title:"Error",type:"danger",children:"Failed to update Branding. Please try again."}),{placement:"top-center"})}}const ue=t=>{const s={50:.5,100:.4,200:.3,300:.2,400:.1,500:.05,600:0,700:-.05,800:-.1,900:-.15,950:-.2},l={};for(const[h,S]of Object.entries(s))l[h]=S>=0?Te(t).lighten(S*100).toHexString():Te(t).darken(Math.abs(S)*100).toHexString();return l},be=r.useCallback((t,s)=>{if(!t||!s)return;const l=document.documentElement,h=ue(t),S=ue(s);Object.entries(h).forEach(([a,N])=>l.style.setProperty(`--custom-${a}`,N)),l.style.setProperty("--text-custom-600",h[500]),l.style.setProperty("--tw-custom-600",h[600]);const i=parseInt(h[600].slice(1),16);l.style.setProperty("--customs-600",`${i>>16&255}, ${i>>8&255}, ${i&255}`),Object.entries(S).forEach(([a,N])=>l.style.setProperty(`--secondary-${a}`,N)),l.style.setProperty("--ca-ink",s),ce===we&&Me(!0,S)},[ce]),ct=(t,s,l)=>{const h=ue(t);Object.entries(h).forEach(([le,n])=>{document.documentElement.style.setProperty(`--custom-${le}`,n)}),document.documentElement.style.setProperty("--text-custom-600",h[500]),document.documentElement.style.setProperty("--tw-custom-600",h[600]);const S=parseInt(h[600].slice(1),16),i=S>>16&255,a=S>>8&255,N=S&255;document.documentElement.style.setProperty("--customs-600",`${i}, ${a}, ${N}`);const Q={};if(s){const le=ue(s);Object.assign(Q,le),Object.entries(le).forEach(([n,z])=>{document.documentElement.style.setProperty(`--secondary-${n}`,z)})}return G(Dt(h)),Object.keys(Q).length>0&&G(zt(Q)),at(c,l,h,Q),h};async function dt({type:t,loginTexts:s,settingType:l}){const h=s[t],S=JSON.stringify({themeText:{primaryText:h.heading,secondaryText:h.subheading,description:h.description}});try{await xe(l.id,l.settingKey,l.settingName,l.settingValue,l.settingType,l.settingDescription,void 0,S),G(pe()),J.push(e.jsx(K,{title:"Saved!",type:"success",children:"Login text updated successfully"}),{placement:"top-center"})}catch(i){console.error("Error saving login text:",i),J.push(e.jsx(K,{title:"Error",type:"danger",children:"Failed to update login text. Please try again."}),{placement:"top-center"})}}async function ee({file:t,settingType:s}){try{await xe(s.id,s.settingKey,s.settingName,s.settingValue,s.settingType,s.settingDescription,t,s.moreInformation),G(pe()),J.push(e.jsx(K,{title:"Saved!",type:"success",children:"Background uploaded successfully"}),{placement:"top-center"})}catch(l){console.error("Error uploading background:",l),J.push(e.jsx(K,{title:"Error",type:"danger",children:"Failed to upload background. Please try again."}),{placement:"top-center"})}}async function mt(t,s){try{await xe(s.id,s.settingKey,s.settingName,s.settingValue,t,s.settingDescription,void 0,s.moreInformation),G(pe()),J.push(e.jsx(K,{title:"Saved!",type:"success",children:"Login layout updated successfully."}),{placement:"top-center"})}catch(l){console.error("Error saving layout setting:",l),J.push(e.jsx(K,{title:"Error",type:"danger",children:"Failed to update login layout. Please try again."}),{placement:"top-center"})}}const[W,xt]=r.useState(null),pt=t=>{xt(W===t?null:t)},de=[{title:"Welcome Email",subject:"Welcome to ContentActive",message:"<p>Hello <b>[full_name]</b>,</p><br /><h3>Welcome to [site_name]!</h3><br /><p>Below are your login details to login to the [site_name] portal. Please make sure to save your credentails.</p><br/><p>Email: [email]</p><p>Password: [password]</p><br /><p>Thank you</p>",button:""},{title:"Forgot Password",subject:"Forgot your Password?",message:"<p>Hello <b>[full_name]</b>,</p><br /><p>Please follow the link below to update/reset your password.</p><br/><p>If you have any questeions please lets us know by emailing us at: [support_email]</p><br/><p>Email: [email]</p>",button:"Reset Your Password"},{title:"Activation Code",subject:"Activation code for ContentActive",message:"<p>Hello <b>[full_name]</b>,</p><br /><p>Your activation code is below.</p><br/><p>[activation_code]</p><br/><p>If you have any questeions please lets us know by emailing us at: [support_email]</p><br/>",button:""}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(Pt,{items:[{label:"Settings"},{label:"Branding Options"}]}),e.jsx("div",{className:"lg:flex items-center justify-between",children:e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Branding Options"})})]}),e.jsx(Rt,{className:"m-4 borderless overflow-x-auto",children:e.jsxs(We,{defaultValue:"colors",children:[e.jsxs(Gt,{children:[e.jsx(Ne,{icon:e.jsx(ft,{}),value:"colors",children:"Branding"}),e.jsx(Ne,{icon:e.jsx(yt,{}),value:"login",children:"Login"}),e.jsx(Ne,{icon:e.jsx(vt,{}),value:"emails",children:"Email Templates"})]}),e.jsxs("div",{className:"p-4",children:[e.jsx(Be,{value:"colors",children:e.jsx(Ot,{initialValues:{fieldA:(c==null?void 0:c.settingType)||"",fieldB:B[600]||"var(--custom-600)",fieldC:getComputedStyle(document.documentElement).getPropertyValue("--secondary-600").trim()||"#1B1B1B"},validationSchema:Xt,onSubmit:async t=>{ct(t==null?void 0:t.fieldB,t==null?void 0:t.fieldC,t==null?void 0:t.fieldA)},children:({values:t,touched:s,errors:l,isSubmitting:h,setFieldValue:S})=>e.jsx(Tt,{children:e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-[4fr_0.5fr_2fr] gap-0 items-start",children:[e.jsxs("div",{className:"xl:pr-8",children:[e.jsxs("div",{style:{marginBottom:28},children:[e.jsx("div",{style:T,children:"Site name"}),e.jsx(Mt,{className:"mb-0",invalid:l.fieldA&&s.fieldA,errorMessage:l.fieldA,children:e.jsx(Se,{type:"text",name:"fieldA",placeholder:"e.g. ContentActive",component:fe})})]}),e.jsxs("div",{style:{marginBottom:28},children:[e.jsx("div",{style:T,children:"Color scheme"}),e.jsx("div",{style:{background:"#FAFAFA",border:"1px solid #E9E9E9",borderRadius:12,padding:"16px 18px"},children:e.jsx(_t,{accent:t.fieldB,ink:t.fieldC,onApply:i=>{S("fieldB",i.accent),S("fieldC",i.ink),be(i.accent,i.ink)}})})]}),e.jsxs("div",{style:{marginBottom:28},children:[e.jsx("div",{style:T,children:"Custom brand colors"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{style:{background:"#FAFAFA",border:"1px solid #E9E9E9",borderRadius:12,padding:"16px 18px"},children:[e.jsxs("div",{className:"flex items-center justify-between",style:{marginBottom:14},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#1B1B1B"},children:"Primary"}),e.jsx("div",{style:{fontSize:12,color:"#888",marginTop:2},children:"Accent & buttons"})]}),e.jsx(Se,{name:"fieldB",children:({field:i,form:a})=>e.jsx("input",{type:"color",value:i.value||"#F15A22",onChange:N=>{a.setFieldValue("fieldB",N.target.value),be(N.target.value,a.values.fieldC)},style:{width:44,height:34,padding:2,border:"1.5px solid #E9E9E9",borderRadius:8,cursor:"pointer",background:"white"}})})]}),e.jsx("div",{className:"flex overflow-hidden",style:{borderRadius:8,height:32},children:[50,100,200,300,400,500,600,700,800,900,950].map(i=>e.jsx("div",{className:"flex-1 relative",style:{background:`var(--custom-${i})`},children:i===600&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center uppercase",style:{fontSize:9,fontWeight:700,color:"#fff",letterSpacing:"0.05em"},children:"600"})},i))}),l.fieldB&&s.fieldB&&e.jsx("div",{style:{fontSize:12,color:"#DC2626",marginTop:6},children:l.fieldB})]}),e.jsxs("div",{style:{background:"#FAFAFA",border:"1px solid #E9E9E9",borderRadius:12,padding:"16px 18px"},children:[e.jsxs("div",{className:"flex items-center justify-between",style:{marginBottom:14},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#1B1B1B"},children:"Secondary"}),e.jsx("div",{style:{fontSize:12,color:"#888",marginTop:2},children:"Sidebar & header"})]}),e.jsx(Se,{name:"fieldC",children:({field:i,form:a})=>e.jsx("input",{type:"color",value:i.value||"#1B1B1B",onChange:N=>{a.setFieldValue("fieldC",N.target.value),be(a.values.fieldB,N.target.value)},style:{width:44,height:34,padding:2,border:"1.5px solid #E9E9E9",borderRadius:8,cursor:"pointer",background:"white"}})})]}),e.jsx("div",{className:"flex overflow-hidden",style:{borderRadius:8,height:32},children:[50,100,200,300,400,500,600,700,800,900,950].map(i=>e.jsx("div",{className:"flex-1 relative",style:{background:`var(--secondary-${i})`},children:i===600&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center uppercase",style:{fontSize:9,fontWeight:700,color:"#fff",letterSpacing:"0.05em"},children:"600"})},i))})]})]}),e.jsx("p",{style:{fontSize:12,color:"#999",marginTop:10},children:"Selecting a color generates the full 11-shade palette automatically."})]}),e.jsxs("div",{style:{marginBottom:28},children:[e.jsx("div",{style:T,children:"Navigation layout"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[{value:Ee,match:[Ee,jt],label:"Sidebar",desc:"Vertical nav on the left",icon:i=>e.jsxs("svg",{width:"64",height:"48",viewBox:"0 0 64 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:"64",height:"48",rx:"5",fill:i?"color-mix(in srgb, var(--custom-600) 8%, white)":"#F6F4F1"}),e.jsx("rect",{x:"2",y:"2",width:"16",height:"44",rx:"3",fill:i?"var(--custom-600)":"#D0D0D0"}),e.jsx("rect",{x:"22",y:"8",width:"36",height:"3.5",rx:"1.75",fill:i?"#F7C4AE":"#E2E2E2"}),e.jsx("rect",{x:"22",y:"16",width:"28",height:"3.5",rx:"1.75",fill:i?"#F7C4AE":"#E2E2E2"}),e.jsx("rect",{x:"22",y:"24",width:"32",height:"3.5",rx:"1.75",fill:i?"#F7C4AE":"#E2E2E2"}),e.jsx("rect",{x:"22",y:"32",width:"24",height:"3.5",rx:"1.75",fill:i?"#F7C4AE":"#E2E2E2"})]})},{value:Ie,match:[Ie,bt,wt],label:"Top bar",desc:"Horizontal nav at the top",icon:i=>e.jsxs("svg",{width:"64",height:"48",viewBox:"0 0 64 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:"64",height:"48",rx:"5",fill:i?"color-mix(in srgb, var(--custom-600) 8%, white)":"#F6F4F1"}),e.jsx("rect",{x:"2",y:"2",width:"60",height:"12",rx:"3",fill:i?"var(--custom-600)":"#D0D0D0"}),e.jsx("rect",{x:"4",y:"20",width:"56",height:"3.5",rx:"1.75",fill:i?"#F7C4AE":"#E2E2E2"}),e.jsx("rect",{x:"4",y:"28",width:"42",height:"3.5",rx:"1.75",fill:i?"#F7C4AE":"#E2E2E2"}),e.jsx("rect",{x:"4",y:"36",width:"50",height:"3.5",rx:"1.75",fill:i?"#F7C4AE":"#E2E2E2"})]})}].map(i=>{const a=i.match.includes(Ye);return e.jsxs("button",{type:"button",onClick:()=>{G(Et("")),G(kt(i.value)),i.value===Ee&&G(St(!1))},style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:10,padding:"18px 14px 14px",borderRadius:12,cursor:"pointer",border:`2px solid ${a?"var(--custom-600)":"#E9E9E9"}`,background:a?"color-mix(in srgb, var(--custom-600) 8%, white)":"#FAFAFA",boxShadow:a?"0 0 0 3px color-mix(in srgb, var(--custom-600) 15%, transparent)":"none",transition:"all 0.15s",width:"100%"},children:[a&&e.jsx("div",{style:{position:"absolute",top:-1,left:"50%",transform:"translateX(-50%)",background:"var(--custom-600)",color:"#fff",fontSize:9,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",padding:"2px 8px",borderRadius:"0 0 6px 6px"},children:"Current"}),i.icon(a),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{style:{fontSize:13,fontWeight:700,color:a?"var(--custom-600)":"#1B1B1B",marginBottom:2},children:i.label}),e.jsx("div",{style:{fontSize:11,color:"#888"},children:i.desc})]})]},i.value)})})]}),e.jsxs("div",{style:{marginBottom:28},children:[e.jsx("div",{style:T,children:"Theme mode"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[{value:Ft,label:"Light mode",desc:"White backgrounds & dark text",icon:i=>e.jsxs("svg",{width:"64",height:"48",viewBox:"0 0 64 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:"64",height:"48",rx:"5",fill:i?"color-mix(in srgb, var(--custom-600) 8%, white)":"#F6F4F1"}),e.jsx("rect",{x:"2",y:"2",width:"60",height:"44",rx:"4",fill:"#FFFFFF",stroke:i?"var(--custom-600)":"#E2E2E2",strokeWidth:"1"}),e.jsx("rect",{x:"8",y:"10",width:"24",height:"3",rx:"1.5",fill:i?"var(--custom-600)":"#D0D0D0"}),e.jsx("rect",{x:"8",y:"17",width:"48",height:"2.5",rx:"1.25",fill:i?"#F7C4AE":"#E8E8E8"}),e.jsx("rect",{x:"8",y:"23",width:"40",height:"2.5",rx:"1.25",fill:i?"#F7C4AE":"#E8E8E8"}),e.jsx("rect",{x:"8",y:"29",width:"44",height:"2.5",rx:"1.25",fill:i?"#F7C4AE":"#E8E8E8"})]})},{value:we,label:"Dark mode",desc:"Dark backgrounds & light text",icon:i=>{const a=ne[950]||ne[900]||"#0E0E0E",N=ne[800]||"#1A1A1A",Q=ne[700]||"#2A2A2A";return e.jsxs("svg",{width:"64",height:"48",viewBox:"0 0 64 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:"64",height:"48",rx:"5",fill:i?"color-mix(in srgb, var(--custom-600) 8%, white)":"#F6F4F1"}),e.jsx("rect",{x:"2",y:"2",width:"60",height:"44",rx:"4",fill:a,stroke:i?"var(--custom-600)":N,strokeWidth:"1"}),e.jsx("rect",{x:"8",y:"10",width:"24",height:"3",rx:"1.5",fill:i?"var(--custom-600)":Q}),e.jsx("rect",{x:"8",y:"17",width:"48",height:"2.5",rx:"1.25",fill:i?"#F7C4AE":N}),e.jsx("rect",{x:"8",y:"23",width:"40",height:"2.5",rx:"1.25",fill:i?"#F7C4AE":N}),e.jsx("rect",{x:"8",y:"29",width:"44",height:"2.5",rx:"1.25",fill:i?"#F7C4AE":N})]})}}].map(i=>{const a=ce===i.value;return e.jsxs("button",{type:"button",onClick:()=>G(Nt(i.value)),style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:10,padding:"18px 14px 14px",borderRadius:12,cursor:"pointer",width:"100%",border:`2px solid ${a?"var(--custom-600)":"#E9E9E9"}`,background:a?"color-mix(in srgb, var(--custom-600) 8%, white)":"#FAFAFA",boxShadow:a?"0 0 0 3px color-mix(in srgb, var(--custom-600) 15%, transparent)":"none",transition:"all 0.15s"},children:[a&&e.jsx("div",{style:{position:"absolute",top:-1,left:"50%",transform:"translateX(-50%)",background:"var(--custom-600)",color:"#fff",fontSize:9,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",padding:"2px 8px",borderRadius:"0 0 6px 6px"},children:"Current"}),i.icon(a),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{style:{fontSize:13,fontWeight:700,color:a?"var(--custom-600)":"#1B1B1B",marginBottom:2},children:i.label}),e.jsx("div",{style:{fontSize:11,color:"#888"},children:i.desc})]})]},i.value)})})]}),e.jsxs("div",{className:"flex items-center",style:{gap:12,paddingTop:16,borderTop:"1px solid #E9E9E9"},children:[e.jsx(U,{variant:"solid",type:"submit",loading:h,children:h?"Saving…":"Save branding"}),e.jsx("span",{style:{fontSize:13,color:"#999"},children:"Changes apply site-wide immediately."})]})]}),e.jsx("div",{className:"hidden xl:block"}),e.jsxs("div",{className:"rounded-xl p-6",style:{background:"#FAFAFA",border:"1px solid #E9E9E9"},children:[e.jsx("div",{style:T,children:"Logos"}),e.jsx("div",{className:"flex flex-col",style:{gap:10},children:[{label:"Favicon",note:"400×400px · PNG",bg:"#F6F4F1",type:"streamline",mode:void 0,onClick:tt},{label:"Icon · Light mode",note:"48×64px · PNG",bg:"#F6F4F1",type:"streamline",mode:void 0,onClick:Ge},{label:"Full logo · Light mode",note:"300×120px · PNG",bg:"#F6F4F1",type:"full",mode:void 0,onClick:ze},{label:"Icon · Dark mode",note:"48×64px · PNG",bg:"#111827",type:"streamline",mode:"dark",onClick:Qe},{label:"Full logo · Dark mode",note:"300×120px · PNG",bg:"#111827",type:"full",mode:"dark",onClick:Ze}].map(i=>e.jsxs("div",{className:"flex items-stretch overflow-hidden",style:{border:"1px solid #E9E9E9",borderRadius:10,background:"#fff",gap:0},children:[e.jsx("div",{className:"shrink-0 flex items-center justify-center",style:{background:i.bg,width:130,padding:"12px 16px"},children:e.jsx(me,{type:i.type,mode:i.mode,imgClass:"max-h-14 max-w-[100px] object-contain",className:""})}),e.jsxs("div",{className:"flex-1",style:{padding:"10px 12px",borderLeft:"1px solid #E9E9E9"},children:[e.jsx("div",{style:{fontSize:12,fontWeight:700,color:"#1B1B1B",marginBottom:1},children:i.label}),e.jsx("div",{style:{fontSize:11,color:"#999",marginBottom:7},children:i.note}),e.jsx(U,{onClick:i.onClick,variant:"solid",size:"xs",icon:e.jsx(Oe,{}),children:"Upload"})]})]},i.label))})]})]})})})}),e.jsx(Be,{value:"login",children:(()=>{const t=v.value==="Admin",s=X==="side_layout"||X==="cover_layout",l=X==="side_layout"?"side":"cover",h=t?re:ge,S=t?he:$e,i=X==="side_layout"?t?w:E:t?F:D,a=s&&h[l].heading||"Your Journey to Exceptional Service",N=s&&h[l].subheading||"Operations Platform",Q=s&&h[l].description||"Elevate your client relationships and deliver excellence every step of the way.",le=[30,55,42,68,50,78,62,90,72,95];return e.jsx("div",{style:{maxWidth:1600},children:e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-[40%_60%] items-start",children:[e.jsxs("div",{className:"xl:pr-6 xl:border-r xl:border-gray-200",children:[e.jsxs("div",{style:{marginBottom:24},children:[e.jsx("div",{style:T,children:"Login layout"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2.5",children:[{val:"center_layout",label:"Centered",desc:"Form centered on page",icon:n=>e.jsxs("svg",{width:"64",height:"48",viewBox:"0 0 64 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:"64",height:"48",rx:"4",fill:n?"color-mix(in srgb, var(--custom-600) 8%, white)":"#F6F4F1"}),e.jsx("rect",{x:"17",y:"8",width:"30",height:"32",rx:"3",fill:n?"var(--custom-600)":"#D0D0D0"}),e.jsx("rect",{x:"21",y:"14",width:"22",height:"3",rx:"1.5",fill:"rgba(255,255,255,0.7)"}),e.jsx("rect",{x:"21",y:"20",width:"22",height:"2",rx:"1",fill:"rgba(255,255,255,0.4)"}),e.jsx("rect",{x:"21",y:"25",width:"22",height:"2",rx:"1",fill:"rgba(255,255,255,0.4)"}),e.jsx("rect",{x:"21",y:"31",width:"14",height:"4",rx:"2",fill:"rgba(255,255,255,0.9)"})]})},{val:"side_layout",label:"Media Right",desc:"Form left, image right",icon:n=>e.jsxs("svg",{width:"64",height:"48",viewBox:"0 0 64 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:"64",height:"48",rx:"4",fill:n?"color-mix(in srgb, var(--custom-600) 8%, white)":"#F6F4F1"}),e.jsx("rect",{x:"2",y:"2",width:"28",height:"44",rx:"2",fill:"#E9E9E9"}),e.jsx("rect",{x:"6",y:"10",width:"20",height:"2.5",rx:"1.25",fill:"#C0C0C0"}),e.jsx("rect",{x:"6",y:"15",width:"16",height:"2",rx:"1",fill:"#D0D0D0"}),e.jsx("rect",{x:"6",y:"20",width:"18",height:"2",rx:"1",fill:"#D0D0D0"}),e.jsx("rect",{x:"6",y:"28",width:"14",height:"5",rx:"2.5",fill:n?"var(--custom-600)":"#C0C0C0"}),e.jsx("rect",{x:"34",y:"2",width:"28",height:"44",rx:"2",fill:n?"var(--custom-600)":"#D0D0D0",opacity:"0.7"})]})},{val:"cover_layout",label:"Media Left",desc:"Image left, form right",icon:n=>e.jsxs("svg",{width:"64",height:"48",viewBox:"0 0 64 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:"64",height:"48",rx:"4",fill:n?"color-mix(in srgb, var(--custom-600) 8%, white)":"#F6F4F1"}),e.jsx("rect",{x:"2",y:"2",width:"28",height:"44",rx:"2",fill:n?"var(--custom-600)":"#D0D0D0",opacity:"0.7"}),e.jsx("rect",{x:"34",y:"2",width:"28",height:"44",rx:"2",fill:"#E9E9E9"}),e.jsx("rect",{x:"38",y:"10",width:"20",height:"2.5",rx:"1.25",fill:"#C0C0C0"}),e.jsx("rect",{x:"38",y:"15",width:"16",height:"2",rx:"1",fill:"#D0D0D0"}),e.jsx("rect",{x:"38",y:"20",width:"18",height:"2",rx:"1",fill:"#D0D0D0"}),e.jsx("rect",{x:"38",y:"28",width:"14",height:"5",rx:"2.5",fill:n?"var(--custom-600)":"#C0C0C0"})]})}].map(n=>{const z=X===n.val;return e.jsxs("button",{type:"button",onClick:()=>lt(n.val),style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",gap:8,padding:"14px 8px 12px",borderRadius:10,cursor:"pointer",width:"100%",border:`2px solid ${z?"var(--custom-600)":"#E9E9E9"}`,background:z?"color-mix(in srgb, var(--custom-600) 6%, white)":"#FAFAFA",boxShadow:z?"0 0 0 3px color-mix(in srgb, var(--custom-600) 15%, transparent)":"none",transition:"all 0.15s"},children:[z&&e.jsx("div",{style:{position:"absolute",top:-1,left:"50%",transform:"translateX(-50%)",background:"var(--custom-600)",color:"#fff",fontSize:8,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",padding:"2px 7px",borderRadius:"0 0 5px 5px"},children:"Active"}),n.icon(z),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,color:z?"var(--custom-600)":"#1B1B1B"},children:n.label}),e.jsx("div",{style:{fontSize:10,color:"#999",marginTop:1},children:n.desc})]})]},n.val)})})]}),s&&e.jsxs("div",{style:{marginTop:4},children:[e.jsx("div",{style:T,children:"Copy"}),e.jsxs("div",{className:"flex flex-col",style:{border:"1px solid #E9E9E9",borderRadius:12,padding:"16px 18px",background:"#FAFAFA",gap:14},children:[[{key:"heading",label:"Heading"},{key:"subheading",label:"Eyebrow badge"},{key:"description",label:"Description",area:!0}].map(n=>e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,color:"#888",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:5},children:n.label}),e.jsx(fe,{textArea:n.area,rows:n.area?3:void 0,value:h[l][n.key],onChange:z=>S(Re=>({...Re,[l]:{...Re[l],[n.key]:z.target.value}}))})]},n.key)),e.jsx(U,{variant:"solid",size:"sm",onClick:()=>dt({type:l,loginTexts:h,settingType:i}),children:"Save copy"})]})]})]}),e.jsxs("div",{className:"xl:pl-6",children:[e.jsx("div",{style:T,children:"Live preview"}),e.jsxs("div",{style:{borderRadius:16,overflow:"hidden",width:"100%",display:X==="center_layout"?"block":"flex",flexDirection:X==="cover_layout"?"row-reverse":"row",border:"1px solid #E9E9E9",fontFamily:"Lato, sans-serif",minHeight:700,position:"relative"},children:[e.jsx("div",{style:X==="center_layout"?{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:300,background:"#fff",borderRadius:16,boxShadow:"0 24px 64px rgba(0,0,0,0.5)",zIndex:50,padding:"28px 24px",display:"flex",flexDirection:"column",justifyContent:"center"}:{flex:"0 0 42%",background:"#fff",padding:"32px 28px",display:"flex",flexDirection:"column",justifyContent:"center"},children:e.jsxs("div",{style:{maxWidth:280,margin:"0 auto",width:"100%"},children:[e.jsx("div",{style:{fontSize:20,fontWeight:900,color:"#111",marginBottom:4},children:"Welcome Back!"}),e.jsx("div",{style:{fontSize:11,color:"#888",marginBottom:20},children:"Enter your credentials to access your account."}),[{icon:"G",label:"Continue with Google",bg:"#fff"},{icon:"M",label:"Continue with Microsoft",bg:"#fff"}].map(n=>e.jsxs("div",{className:"flex items-center cursor-default",style:{gap:10,padding:"9px 14px",border:"1px solid #E2E2E2",borderRadius:8,marginBottom:8,fontSize:12,fontWeight:600,color:"#333"},children:[e.jsx("span",{className:"shrink-0 flex items-center justify-center",style:{width:16,height:16,borderRadius:"50%",background:"#f0f0f0",fontSize:9,fontWeight:900},children:n.icon}),n.label]},n.label)),e.jsxs("div",{className:"flex items-center",style:{gap:10,margin:"14px 0",color:"#CCC",fontSize:11},children:[e.jsx("div",{className:"flex-1",style:{height:1,background:"#E9E9E9"}}),e.jsx("span",{children:"Or sign in using link"}),e.jsx("div",{className:"flex-1",style:{height:1,background:"#E9E9E9"}})]}),e.jsxs("div",{style:{marginBottom:12},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,color:"#555",marginBottom:5,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Email"}),e.jsx("div",{className:"flex items-center",style:{height:36,borderRadius:7,border:"1.5px solid #E2E2E2",background:"#FAFAFA",padding:"0 12px"},children:e.jsx("span",{style:{fontSize:11,color:"#BBB"},children:"example@domain.com"})})]}),e.jsxs("div",{style:{marginBottom:14},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,color:"#555",marginBottom:5,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Password"}),e.jsxs("div",{className:"flex items-center justify-between",style:{height:36,borderRadius:7,border:"1.5px solid #E2E2E2",background:"#FAFAFA",padding:"0 12px"},children:[e.jsx("span",{className:"flex",style:{gap:3},children:[...Array(8)].map((n,z)=>e.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"#CCC"}},z))}),e.jsx("span",{style:{fontSize:10,color:"#BBB"},children:"👁"})]})]}),e.jsxs("div",{className:"flex items-center justify-between",style:{marginBottom:18,fontSize:10},children:[e.jsxs("div",{className:"flex items-center",style:{gap:6,color:"#555"},children:[e.jsx("div",{style:{width:12,height:12,border:"1.5px solid #CCC",borderRadius:3}}),"Remember me"]}),e.jsx("span",{style:{color:"var(--custom-600)",fontWeight:600},children:"Forgot Password?"})]}),e.jsx("div",{className:"flex items-center justify-center",style:{height:38,borderRadius:8,background:"var(--custom-600)",fontSize:13,fontWeight:700,color:"#fff",marginBottom:16},children:"Sign In"}),e.jsxs("div",{className:"text-center",style:{fontSize:10,color:"#888"},children:["Don't have an account? ",e.jsx("span",{style:{color:"var(--custom-600)",fontWeight:600},children:"Sign Up"})]})]})}),e.jsxs("div",{style:X==="center_layout"?{position:"absolute",top:0,left:0,right:0,bottom:0,background:"#1B1B1B",color:"#fff",overflow:"hidden"}:{flex:"0 0 58%",position:"relative",background:"#1B1B1B",color:"#fff",overflow:"hidden"},children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"radial-gradient(circle at 20% 30%,color-mix(in srgb,var(--custom-600) 35%,transparent),transparent 55%),radial-gradient(circle at 80% 70%,color-mix(in srgb,var(--custom-600) 18%,transparent),transparent 55%),linear-gradient(135deg,#1a1612 0%,#1B1B1B 60%,#1a1309 100%)"}}),e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:"linear-gradient(rgba(255,255,255,0.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,0.05) 1px,transparent 1px)",backgroundSize:"48px 48px",maskImage:"radial-gradient(circle at 50% 40%,#000 30%,transparent 80%)"}}),e.jsx("div",{className:"absolute rounded-full pointer-events-none",style:{top:-60,right:-80,width:280,height:280,background:"var(--custom-600)",filter:"blur(36px)",opacity:.65}}),e.jsx("div",{className:"relative z-[30]",style:{padding:"36px 40px 0"},children:e.jsx(me,{mode:"dark",logoWidth:"140px"})}),e.jsxs("div",{className:"relative z-[10] flex flex-col",style:{padding:"24px 40px 36px",gap:28,filter:X==="center_layout"?"blur(3px)":"none"},children:[e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center uppercase",style:{gap:6,fontSize:10,fontWeight:700,letterSpacing:"0.1em",borderRadius:999,padding:"5px 12px",marginBottom:16,color:"var(--custom-600)",background:"color-mix(in srgb,var(--custom-600) 12%,transparent)",border:"1px solid color-mix(in srgb,var(--custom-600) 30%,transparent)"},children:[e.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 2l1.8 5.6L19.5 9l-5.7 1.4L12 16l-1.8-5.6L4.5 9l5.7-1.4z"})}),N||"Operations Platform"]}),e.jsx("div",{style:{fontSize:32,fontWeight:900,lineHeight:1.1,letterSpacing:"-0.02em",marginBottom:12},children:a.includes(" ")?e.jsxs(e.Fragment,{children:[a.split(" ").slice(0,Math.ceil(a.split(" ").length*.6)).join(" ")," ",e.jsx("span",{style:{background:"linear-gradient(120deg,var(--custom-600),var(--custom-500))",WebkitBackgroundClip:"text",backgroundClip:"text",color:"transparent"},children:a.split(" ").slice(Math.ceil(a.split(" ").length*.6)).join(" ")})]}):a}),e.jsx("p",{style:{fontSize:14,lineHeight:1.65,fontWeight:300,color:"rgba(255,255,255,.7)",margin:0},children:Q})]}),e.jsxs("div",{style:{borderRadius:12,padding:"14px",background:"rgba(255,255,255,.04)",border:"1px solid rgba(255,255,255,.08)"},children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:8,marginBottom:10},children:[{l:"On-time",v:"94.6%",d:"▲ 2.4"},{l:"In transit",v:"1,284",d:"▲ 118"},{l:"Idle / day",v:"18m",d:"▼ 6m"}].map(n=>e.jsxs("div",{style:{borderRadius:8,padding:"10px",background:"rgba(255,255,255,.05)"},children:[e.jsx("div",{className:"uppercase",style:{fontSize:9,fontWeight:700,letterSpacing:"0.08em",color:"rgba(255,255,255,.5)"},children:n.l}),e.jsx("div",{style:{fontSize:18,fontWeight:900,color:"#fff",marginTop:3,lineHeight:1},children:n.v}),e.jsx("div",{style:{fontSize:10,fontWeight:700,marginTop:3,color:"#4ade80"},children:n.d})]},n.l))}),e.jsx("div",{className:"flex items-end",style:{gap:4,height:44,padding:"0 2px"},children:le.map((n,z)=>e.jsx("div",{className:"flex-1",style:{borderRadius:3,height:`${n}%`,background:"linear-gradient(180deg,var(--custom-600),color-mix(in srgb,var(--custom-600) 30%,transparent))"}},z))})]}),e.jsxs("div",{style:{borderRadius:12,padding:"14px 16px",background:"rgba(255,255,255,.04)",border:"1px solid rgba(255,255,255,.08)"},children:[e.jsx("p",{className:"italic",style:{fontSize:12,lineHeight:1.6,color:"rgba(255,255,255,.85)",fontWeight:300,marginBottom:10},children:`"We replaced six separate tools in a weekend. Our ops team didn't even notice — they just got a cleaner UI."`}),e.jsxs("div",{className:"flex items-center",style:{gap:8},children:[e.jsx("div",{className:"shrink-0 flex items-center justify-center",style:{width:26,height:26,borderRadius:"50%",background:"var(--custom-600)",fontSize:10,fontWeight:900},children:"SH"}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:12,fontWeight:700},children:"Sara Han"}),e.jsx("div",{style:{fontSize:10,color:"rgba(255,255,255,.5)"},children:"Operations Lead"})]})]})]}),e.jsx("div",{className:"flex flex-wrap",style:{gap:16,paddingBottom:8},children:["SOC 2 Type II","GDPR & HIPAA-ready","Self-host or cloud"].map(n=>e.jsxs("span",{className:"flex items-center",style:{fontSize:10,color:"rgba(255,255,255,.5)",gap:5},children:[e.jsx("span",{className:"shrink-0 flex items-center justify-center",style:{width:13,height:13,borderRadius:"50%",background:"rgba(74,222,128,.18)",color:"#4ade80"},children:e.jsx("svg",{width:"7",height:"7",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}),n]},n))})]})]})]}),e.jsx("p",{style:{fontSize:11,color:"#999",marginTop:8},children:"Preview updates live as you edit copy."})]})]})})})()}),e.jsx(Be,{value:"emails",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 xl:grid-cols-[180px_1fr_160px_520px] gap-6 items-start",style:{maxWidth:1600},children:[e.jsxs("div",{children:[e.jsx("div",{style:T,children:"Email logo"}),e.jsxs("div",{style:{border:"1px solid #E9E9E9",borderRadius:12,overflow:"hidden"},children:[e.jsx("div",{className:"flex items-center justify-center",style:{background:"#F6F4F1",padding:"20px 16px",minHeight:80},children:e.jsx(me,{type:"full",imgClass:"max-w-full max-h-12 object-contain",className:""})}),e.jsxs("div",{style:{padding:"10px 14px",borderTop:"1px solid #E9E9E9",background:"#FAFAFA"},children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,color:"#1B1B1B",marginBottom:2},children:"Full logo · Light"}),e.jsx("div",{style:{fontSize:11,color:"#999",marginBottom:8},children:"300×120px · PNG"}),e.jsx(U,{onClick:ze,variant:"solid",size:"xs",icon:e.jsx(Oe,{}),children:"Upload"})]})]})]}),e.jsxs("div",{children:[e.jsx("div",{style:T,children:"Email templates"}),e.jsx("div",{className:"flex flex-col",style:{gap:8},children:de.map((t,s)=>e.jsxs("div",{className:"overflow-hidden",style:{border:"1px solid #E9E9E9",borderRadius:10,background:"#fff"},children:[e.jsxs("button",{type:"button",onClick:()=>pt(s),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"13px 16px",background:W===s?"color-mix(in srgb, var(--custom-600) 8%, white)":"#fff",border:"none",cursor:"pointer",borderBottom:W===s?"1px solid #E9E9E9":"none"},children:[e.jsx("span",{style:{fontSize:14,fontWeight:700,color:W===s?"var(--custom-600)":"#1B1B1B"},children:t.title}),e.jsx("span",{style:{color:W===s?"var(--custom-600)":"#999"},children:W===s?e.jsx(Bt,{size:16}):e.jsx(Ct,{size:16})})]}),W===s&&e.jsxs("div",{className:"flex flex-col",style:{padding:"16px 18px",gap:14},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,color:"#888",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:5},children:"Subject"}),e.jsx(fe,{placeholder:t.subject})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,color:"#888",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:5},children:"Message"}),e.jsx(At,{className:"msg-editor",value:t.message})]}),t.button&&e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,color:"#888",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:5},children:"Button text"}),e.jsx(fe,{placeholder:t.button})]}),e.jsx(U,{variant:"solid",size:"sm",children:"Save template"})]})]},s))})]}),e.jsxs("div",{children:[e.jsx("div",{style:T,children:"Available variables"}),e.jsxs("div",{style:{border:"1px solid #E9E9E9",borderRadius:12,padding:"14px 16px",background:"#FAFAFA"},children:[e.jsx("p",{style:{fontSize:11,color:"#888",marginBottom:12},children:"Paste these into subject or body to insert dynamic values."}),e.jsx("div",{className:"flex flex-col",style:{gap:6},children:["activation_code","email","first_name","full_name","last_name","password","reset_link","site_name","support_email"].map(t=>e.jsxs("code",{className:"cursor-pointer",style:{fontSize:11,background:"#fff",border:"1px solid #E9E9E9",borderRadius:6,padding:"4px 8px",color:"var(--custom-600)",fontFamily:"IBM Plex Mono, monospace"},onClick:()=>{var s;return(s=navigator.clipboard)==null?void 0:s.writeText(`[${t}]`)},children:["[",t,"]"]},t))})]})]}),e.jsxs("div",{style:{background:"#F6F4F1",borderRadius:14,padding:"16px",border:"1px solid #E9E9E9"},children:[e.jsx("div",{style:{...T,marginBottom:14},children:"Email preview"}),e.jsxs("div",{style:{borderRadius:10,overflow:"hidden",border:"1px solid #E2E2E2",fontFamily:"Arial, sans-serif",fontSize:13,boxShadow:"0 4px 20px rgba(0,0,0,0.08)"},children:[e.jsx("div",{className:"flex items-center justify-center",style:{background:"var(--secondary-600, var(--ca-ink, #1B1B1B))",padding:"32px 40px"},children:e.jsx(me,{type:"full",mode:"dark",imgClass:"max-h-16 max-w-[220px] object-contain",className:""})}),e.jsx("div",{style:{background:"#fff",padding:"36px 40px 32px",minHeight:400},children:W!==null?e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontSize:18,fontWeight:700,color:"#111",marginBottom:16},children:de[W].subject}),e.jsx("div",{style:{fontSize:14,color:"#444",lineHeight:1.8,marginBottom:20},dangerouslySetInnerHTML:{__html:de[W].message}}),de[W].button&&e.jsx("div",{className:"text-center",style:{marginBottom:8},children:e.jsx("span",{style:{display:"inline-block",background:"var(--custom-600)",color:"#fff",padding:"9px 24px",borderRadius:6,fontSize:12,fontWeight:700,letterSpacing:"0.02em"},children:de[W].button})})]}):e.jsx("div",{className:"text-center",style:{padding:"24px 0",color:"#AAA",fontSize:12},children:"Select a template to preview"})}),e.jsx("div",{style:{height:1,background:"#E9E9E9"}}),e.jsxs("div",{className:"text-center",style:{background:"#F6F4F1",padding:"16px 24px"},children:[e.jsx("div",{className:"flex justify-center",style:{marginBottom:10},children:e.jsx(me,{type:"full",imgClass:"max-h-5 max-w-[80px] object-contain opacity-50",className:""})}),e.jsxs("p",{style:{fontSize:10,color:"#888",lineHeight:1.6,margin:0},children:["You are receiving this email because you have an account with us.",e.jsx("br",{}),"© ",new Date().getFullYear()," ",(c==null?void 0:c.settingType)||"ContentActive",". All rights reserved."]}),e.jsx("p",{style:{fontSize:10,color:"var(--custom-600)",marginTop:8,cursor:"pointer"},children:"Unsubscribe · Privacy Policy · Help"})]})]})]})]})})]})]})}),e.jsx(ye,{label:"Manage Logo",title:"Logo Icon (Light Mode)",isOpen:y,onClose:Ve,handleFileUpload:ee,settingType:$,expectedDimensions:{width:48,height:64}}),e.jsx(ye,{label:"Manage Logo",title:"Full Size Logo (Light Mode)",isOpen:V,onClose:Xe,handleFileUpload:ee,settingType:te,expectedDimensions:{width:300,height:120}}),e.jsx(ye,{label:"Manage Logo",title:"Logo Icon (Dark Mode)",isOpen:L,onClose:Ke,handleFileUpload:ee,settingType:se,expectedDimensions:{width:48,height:64},isDark:!0}),e.jsx(ye,{label:"Manage Logo",title:"Full Size Logo (Dark Mode)",isOpen:k,onClose:qe,handleFileUpload:ee,settingType:ie,expectedDimensions:{width:300,height:120},isDark:!0}),e.jsx(Ht,{isOpen:R,onClose:et}),e.jsx(Fe,{isOpen:o,onClose:it,handleFileUpload:ee,settingType:v.value==="Admin"?w:E}),e.jsx(Fe,{isOpen:_,onClose:st,handleFileUpload:ee,settingType:v.value==="Admin"?F:D}),e.jsx(Fe,{isOpen:m,onClose:rt,handleFileUpload:ee,settingType:v.value==="Admin"?u:q})]})},Ns=Zt;export{Ns as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,l as oa}from"./vendor-mui-98daa63f.js";import{A as Ee}from"./AdaptableCard-3d1e1f96.js";import{P as da}from"./PageBreadcrumb-cf54a6e9.js";import{r as h}from"./vendor-react-ece1c85f.js";import{r as Ne,u as de,g as ne,t as Fe,s as pe}from"./index-659c6412.js";import{D as ve,ad as Re,a0 as K,cH as Ve,cF as Ue,t as ca,bI as ma,k as Ce,B as $,P as ua,b as pa,E as U,F as O,aJ as ha,d as xa,ai as ga}from"./index-3b5ce20a.js";import{A as ya,T as he}from"./actioncell-6b5ebd6c.js";import{C as ja}from"./tableV3-24eed052.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as xe}from"./Drawer-4f97e662.js";import{F as Oe,a as ge}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import{U as qe}from"./Upload-be937eb6.js";import{a as ba,b as ye,c as fa,d as Na,e as va,f as Ca}from"./DynamicTablesService-6aa57f52.js";import{a as wa,c as Ke,F as ze,b as $e,d as je,i as Sa,h as Da}from"./index.esm-b2d342b5.js";import{P as Ye}from"./papaparse.min-f30b4da6.js";import{u as Ge,a as be,n as We,P as He,D as Je,c as Ze,C as Xe}from"./core.esm-4386752a.js";import{s as Qe,S as Be,v as ea,u as aa,a as ta}from"./sortable.esm-0625cd17.js";import{D as ka,E as Ta,k as Fa,F as Ea,az as La,G as _a,aA as Ia,g as Ma}from"./vendor-devex-4076ffeb.js";import{C as Pa}from"./ConfirmDialog-2838a642.js";import{a as Aa}from"./index-0b08ce18.js";import{S as Ra}from"./StickyFooter-3e569b80.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.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"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";ve("dynamicTables",Ne);const oe=100,Va=/^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/,sa=new Set(["select","from","where","table","column","index","order","group","by","insert","update","delete","drop","create","alter","add","set","values","into","join","left","right","inner","outer","on","as","distinct","having","limit","offset","primary","key","foreign","references","constraint","unique","not","null","default","check","and","or","in","is","like","between","exists","all","any","case","when","then","else","end","union","intersect","except","id","row"]),Ua=/^[a-zA-Z_][a-zA-Z0-9_ ]{0,127}$/,fe=[{label:"Text Field",value:"text"},{label:"Text Area",value:"textarea"},{label:"Dropdown",value:"dropdown"},{label:"Multi Select Dropdown",value:"multiselect"},{label:"Upload Document",value:"upload"},{label:"Rich Text Area",value:"richtext"},{label:"Date Picker",value:"datepicker"},{label:"Date and Time Picker",value:"datetimepicker"},{label:"Phone",value:"phone"},{label:"Email",value:"email"},{label:"Color Picker",value:"colorPicker"}],na=["MM/DD/YYYY","DD/MM/YYYY","YYYY-MM-DD","MM-DD-YYYY","DD-MM-YYYY"],De={name:"",displayName:"",type:"string",required:!1,maxLength:255,minimum:0,maximum:0,defaultValue:"",primaryKey:!1,pattern:"",enum:[],format:"",description:"",customValidation:{},columnType:"text",dataSource:"",dateFormat:"",uiConfig:null},Ie=["Details","Columns","UI Config"],Oa=wa().required("Title is required").test("table-name-format","Title must start with a letter or underscore and contain only letters, numbers, and underscores (max 128 chars).",d=>!d||Ua.test(d)).test("reserved","This name is a reserved SQL keyword.",d=>!d||!sa.has(d.toLowerCase())),qa=Ke().shape({title:Oa}),Me=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random()}`,ke=d=>d.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\s+/g," ").trim().replace(/\w\S*/g,o=>o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()),Ka=d=>Va.test(d)?sa.has(d.toLowerCase())?`"${d}" is a reserved SQL keyword.`:null:"Must start with a letter or underscore; only letters, numbers, and underscores allowed (max 63 chars).",za=({setIsOpen:d})=>{const[o,x]=h.useState(0),[t,m]=h.useState([]),[u,j]=h.useState({...De}),[c,P]=h.useState({}),[L,S]=h.useState(null),[N,r]=h.useState(null),[y,I]=h.useState({}),[H,Y]=h.useState(!1),[_,J]=h.useState({title:"",description:""}),[F,D]=h.useState({}),[k,E]=h.useState([]),[M,A]=h.useState({}),{loading:Z,dynamicTableList:z}=de(a=>a.dynamicTables.data),X=Ce();h.useEffect(()=>{(async()=>{try{const l=localStorage.getItem(ua);l&&await pa(l,"default")}catch{}})()},[]);const B=(a,l)=>{var g,C,T;const n={};if(!((g=a.name)!=null&&g.trim()))n.name="Field Name is required";else{const q=Ka(a.name.trim());q&&(n.name=q)}return(C=a.displayName)!=null&&C.trim()||(n.displayName="Display Name is required"),a.type||(n.type="Type is required"),a.type==="string"&&((!a.maxLength||a.maxLength<=0)&&(n.maxLength="Length must be greater than 0"),a.maxLength&&a.maxLength>65535&&(n.maxLength="Length cannot exceed 65535")),a.type==="date"&&!((T=a.dateFormat)!=null&&T.trim())&&(n.dateFormat="Date format is required for date fields"),t.some((q,me)=>l!==void 0&&me===l||a._id&&q._id===a._id?!1:q.name.trim().toLowerCase()===a.name.trim().toLowerCase())&&(n.name="A column with this field name already exists"),n},W=(a,l)=>{j(n=>(a==="primaryKey"&&l===!0&&m(p=>p.map(g=>({...g,primaryKey:!1}))),{...n,[a]:l})),P(n=>({...n,[a]:""}))},le=()=>{if(t.length>=oe){P({name:`Maximum of ${oe} columns allowed.`});return}const a=B(u);if(Object.keys(a).length){P(a);return}const l=u.primaryKey?t.map(n=>({...n,primaryKey:!1})):t;m([...l,{...u,_id:Me()}]),j({...De}),P({})},re=a=>{const l=t.find(n=>n._id===a);l&&(m(n=>n.filter(p=>p._id!==a)),A(n=>{const p={...n};return delete p[l.name],p}))},ee=a=>{const l=t.find(n=>n._id===a);l&&(S(a),r({...l}),I({}))},ae=()=>{S(null),r(null),I({})},te=()=>{if(!N||!L)return;const a=t.findIndex(C=>C._id===L);if(a===-1)return;const l=B(N,a);if(Object.keys(l).length){I(l);return}const n=t[a].name,p=N.name,g=N.primaryKey?t.map((C,T)=>T===a?{...N,_id:L}:{...C,primaryKey:!1}):t.map((C,T)=>T===a?{...N,_id:L}:C);m(g),A(C=>{if(n===p)return C;const T={...C};return C[n]!==void 0&&(T[p]=C[n]),delete T[n],T}),S(null),r(null),I({})},b=Ge(be(He),be(We,{coordinateGetter:Qe})),R=a=>{const{active:l,over:n}=a;if(!n||l.id===n.id)return;const p=t.findIndex(C=>C._id===l.id),g=t.findIndex(C=>C._id===n.id);m(C=>ta(C,p,g))},we=(a,l)=>{J(a),x(1)},ce=()=>x(0),se=()=>{x(0),J({title:"",description:""}),E([]),m([]),j({...De}),r(null),A({}),P({}),I({})},Se=a=>{if(!a.name.toLowerCase().endsWith(".csv")&&a.type!=="text/csv"){U.push(e.jsx(O,{title:"Invalid File",type:"warning",children:"Please upload a CSV file (.csv)."}),{placement:"top-center"});return}let l=!1;Ye.parse(a,{header:!0,skipEmptyLines:!0,dynamicTyping:!1,chunkSize:1024*1024,chunk:n=>{if(!l&&n.meta.fields){const p=n.meta.fields.map(g=>({name:g,type:"string",length:255,columnType:"text",dataSource:""}));E(p),l=!0}},complete:()=>{},error:n=>{console.error("CSV parse error:",n),U.push(e.jsx(O,{title:"CSV Parse Error",type:"danger",children:"Failed to parse the CSV file. Please check the format and try again."}),{placement:"top-center"}),E([])}})},Q=(a,l,n)=>{E(p=>p.map((g,C)=>l==="primaryKey"?{...g,primaryKey:C===a?!!n:!1}:C!==a?g:{...g,[l]:n}))},ie=()=>{if(k.length===0)return;const a=oe-t.length;if(a<=0){U.push(e.jsxs(O,{title:"Limit Reached",type:"warning",children:["Maximum of ",oe," columns already reached."]}),{placement:"top-center"});return}const l=k.slice(0,a).map(p=>{const g={_id:Me(),name:p.name,displayName:p.displayName||ke(p.name),type:p.type,required:p.required??!1,primaryKey:p.primaryKey??!1,columnType:p.columnType||"text",dataSource:p.dataSource||"",format:"",description:"",uiConfig:null};return p.type==="string"?{...g,maxLength:p.length??255}:g});l.some(p=>p.primaryKey)&&m(p=>p.map(g=>({...g,primaryKey:!1}))),m(p=>{const g=new Set(p.map(C=>C.name));return[...p,...l.filter(C=>!g.has(C.name))]}),E([])},s=a=>a.find(l=>l.primaryKey===!0),v=async(a,l)=>{var n;try{const p=await ye(l),g=(n=p==null?void 0:p.data)==null?void 0:n.schemaDefinition,C=typeof g=="string"?JSON.parse(g):g,T=((C==null?void 0:C.Columns)??[]).map(q=>({value:String((q==null?void 0:q.Name)??""),label:String((q==null?void 0:q.DisplayName)??(q==null?void 0:q.Name)??"")}));D(q=>({...q,[a]:T}))}catch{U.push(e.jsx(O,{title:"Error",type:"danger",children:"Failed to load fields for the selected table."}),{placement:"top-center"})}},i=(a,l,n)=>{l==="dataSource"&&v(a,n),A(p=>({...p,[a]:{labels:[],mode:"static",staticValues:"",dataSource:"",...p[a]||{},[l]:n}}))};h.useEffect(()=>{o===2&&X(ne({data:[],total:0}))},[o,X]);const V=h.useMemo(()=>(z==null?void 0:z.map(a=>({value:a.id,label:a.tableName})))??[],[z]),w=t.some(a=>["dropdown","multiselect"].includes(a.columnType)),f=async()=>{var n,p;if(t.length===0){U.push(e.jsx(O,{title:"Warning",type:"warning",children:"Please add at least one column before submitting."}),{placement:"top-center"});return}s(t)||U.push(e.jsx(O,{title:"Warning",type:"warning",children:"No primary key is defined. Without a primary key, CRUD operations on individual rows may not work reliably. Consider marking one column as Primary Key."}),{placement:"top-center"});const a=t.map(g=>({...g,uiConfig:M[g.name]||g.uiConfig||null})),l={tableName:_.title,description:_.description??"",schema:{tableName:_.title,description:_.description??"",columns:a.map(({_id:g,primaryKey:C,...T})=>T),primaryKeys:(()=>{const g=s(a);return g!=null&&g.name?[g.name]:[]})(),uniqueConstraints:[],indexes:[]}};try{Y(!0);const C=await ba(l);C!=null&&C.success?(d(!1),U.push(e.jsx(O,{title:"Success",type:"success",children:C.message}),{placement:"top-center"}),X(ne({data:[],total:0}))):U.push(e.jsx(O,{title:"Failed",type:"danger",children:(C==null?void 0:C.message)||"An unknown error occurred."}),{placement:"top-center"})}catch(g){U.push(e.jsx(O,{title:"Failed",type:"danger",children:((p=(n=g==null?void 0:g.response)==null?void 0:n.data)==null?void 0:p.message)||"Request failed. Please try again."}),{placement:"top-center"})}finally{Y(!1)}},G=()=>e.jsx("div",{className:"flex items-center mb-6",children:Ie.map((a,l)=>e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:`flex items-center justify-center w-7 h-7 rounded-full text-xs font-semibold ${l<o?"bg-green-500 text-white":l===o?"bg-blue-600 text-white":"bg-gray-200 text-gray-500"}`,children:l<o?"✓":l+1}),e.jsx("span",{className:`ml-2 text-sm ${l===o?"font-semibold text-blue-700":"text-gray-500"}`,children:a}),l<Ie.length-1&&e.jsx("div",{className:`mx-3 h-px w-8 ${l<o?"bg-green-400":"bg-gray-300"}`})]},l))});return e.jsxs("div",{className:"mt-2 bg-white",children:[e.jsx(G,{}),o===0&&e.jsx(ze,{initialValues:{title:_.title,description:_.description??""},validationSchema:qa,onSubmit:we,enableReinitialize:!0,children:({isSubmitting:a,errors:l,touched:n})=>e.jsxs($e,{children:[e.jsxs(Oe,{className:"flex flex-wrap",children:[e.jsxs(ge,{asterisk:!0,className:"w-full md:w-1/3 px-2",invalid:!!(l.title&&n.title),errorMessage:l.title,label:"Title",children:[e.jsx(je,{name:"title",children:({field:p})=>e.jsx(K,{...p,placeholder:"e.g. CustomerOrders"})}),e.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Letters, numbers, and underscores only. Must start with a letter or underscore."})]}),e.jsx(ge,{className:"w-full md:w-1/3 px-2",label:"Description",children:e.jsx(je,{name:"description",children:({field:p})=>e.jsx(K,{...p,placeholder:"Optional description"})})})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 mb-4",children:[e.jsx($,{size:"sm",type:"button",disabled:a,onClick:()=>d(!1),children:"Cancel"}),e.jsx($,{size:"sm",variant:"solid",type:"submit",loading:a,children:"Next"})]})]})}),o===1&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h4",{className:"text-lg font-semibold mb-1",children:"Import Columns from CSV"}),e.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Upload a CSV file to auto-generate columns from its headers. You can review and adjust each column before confirming."}),e.jsx("div",{className:"w-full flex justify-center",children:e.jsx("div",{className:"w-1/2",children:e.jsx(qe,{draggable:!0,accept:"text/csv",cropNeeded:!1,uploadLimit:1,onChange:async a=>{a!=null&&a[0]&&Se(a[0])}})})})]}),k.length>0&&e.jsxs("div",{className:"mb-6",children:[e.jsx("h4",{className:"text-lg font-semibold mb-2",children:"Map CSV Columns"}),k.length>20&&e.jsxs("p",{className:"text-yellow-600 text-sm mb-2",children:["Your CSV has ",k.length," columns. Only the first 20 are shown. Edit the CSV to keep the most relevant columns."]}),e.jsx("div",{className:"overflow-auto border rounded",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-gray-100",children:[e.jsx("th",{className:"p-2 border text-left",children:"Column Name"}),e.jsx("th",{className:"p-2 border text-left",children:"Display Name"}),e.jsx("th",{className:"p-2 border text-left",children:"Type"}),e.jsx("th",{className:"p-2 border text-left",children:"UI Type"}),e.jsx("th",{className:"p-2 border text-left",children:"Required"}),e.jsx("th",{className:"p-2 border text-left",children:"Primary Key"}),e.jsx("th",{className:"p-2 border text-left",children:"Length (string)"})]})}),e.jsx("tbody",{children:k.slice(0,20).map((a,l)=>e.jsxs("tr",{children:[e.jsx("td",{className:"p-2 border",children:e.jsx("input",{type:"text",value:a.name,className:"border p-1 w-full",onChange:n=>Q(l,"name",n.target.value)})}),e.jsx("td",{className:"p-2 border",children:e.jsx("input",{type:"text",value:a.displayName??ke(a.name),placeholder:ke(a.name),className:"border p-1 w-full",onChange:n=>Q(l,"displayName",n.target.value)})}),e.jsx("td",{className:"p-2 border",children:e.jsxs("select",{value:a.type,className:"border p-1 rounded w-full",onChange:n=>Q(l,"type",n.target.value),children:[e.jsx("option",{value:"string",children:"string"}),e.jsx("option",{value:"number",children:"number"}),e.jsx("option",{value:"integer",children:"integer"}),e.jsx("option",{value:"boolean",children:"boolean"}),e.jsx("option",{value:"date",children:"date"}),e.jsx("option",{value:"datetime",children:"datetime"}),e.jsx("option",{value:"file",children:"file"})]})}),e.jsx("td",{className:"p-2 border",children:e.jsx("select",{value:a.columnType||"text",className:"border p-1 rounded w-full",onChange:n=>Q(l,"columnType",n.target.value),children:fe.map(n=>e.jsx("option",{value:n.value,children:n.label},n.value))})}),e.jsx("td",{className:"p-2 border text-center",children:e.jsx("input",{type:"checkbox",checked:a.required||!1,onChange:n=>Q(l,"required",n.target.checked)})}),e.jsx("td",{className:"p-2 border text-center",children:e.jsx("input",{type:"checkbox",checked:a.primaryKey||!1,onChange:n=>Q(l,"primaryKey",n.target.checked)})}),e.jsx("td",{className:"p-2 border",children:a.type==="string"&&e.jsx("input",{type:"number",min:1,max:65535,value:a.length,className:"border p-1 w-20",onChange:n=>Q(l,"length",Number(n.target.value))})})]},l))})]})}),e.jsx($,{size:"sm",variant:"solid",className:"mt-3",onClick:ie,children:"Confirm Imported Columns"})]}),e.jsx("h4",{className:"text-lg font-semibold mb-2",children:"Add Column Manually"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx(K,{placeholder:"Field Name (e.g. customer_id)",value:u.name,className:c.name?"border-red-500":"",onChange:a=>W("name",a.target.value)}),c.name&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:c.name})]}),e.jsxs("div",{children:[e.jsx(K,{placeholder:"Display Name",value:u.displayName,className:c.displayName?"border-red-500":"",onChange:a=>W("displayName",a.target.value)}),c.displayName&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:c.displayName})]}),e.jsxs("div",{children:[e.jsxs("select",{value:u.type,className:`dark:bg-gray-700 ring-1 bg-gray-100 focus:bg-transparent rounded-md ring-black/5 focus:outline-none p-1.5 w-full ${c.type?"border-red-500":""}`,onChange:a=>W("type",a.target.value),children:[e.jsx("option",{value:"",children:"Select Type"}),e.jsx("option",{value:"string",children:"string"}),e.jsx("option",{value:"number",children:"number"}),e.jsx("option",{value:"integer",children:"integer"}),e.jsx("option",{value:"boolean",children:"boolean"}),e.jsx("option",{value:"date",children:"date"}),e.jsx("option",{value:"datetime",children:"datetime"}),e.jsx("option",{value:"file",children:"file"})]}),c.type&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:c.type})]}),e.jsx("div",{children:e.jsx("select",{value:u.columnType,className:"dark:bg-gray-700 ring-1 bg-gray-100 focus:bg-transparent rounded-md ring-black/5 focus:outline-none p-1.5 w-full",onChange:a=>W("columnType",a.target.value),children:fe.map(a=>e.jsx("option",{value:a.value,children:a.label},a.value))})}),u.type==="string"&&e.jsxs("div",{children:[e.jsx(K,{type:"number",placeholder:"Max Length (1–65535)",value:u.maxLength||"",className:c.maxLength?"border-red-500":"",onChange:a=>W("maxLength",Number(a.target.value))}),c.maxLength&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:c.maxLength})]}),u.type==="date"&&e.jsxs("div",{children:[e.jsxs("select",{value:u.dateFormat||"",className:`dark:bg-gray-700 ring-1 bg-gray-100 focus:bg-transparent rounded-md ring-black/5 focus:outline-none p-1.5 w-full ${c.dateFormat?"border-red-500":""}`,onChange:a=>W("dateFormat",a.target.value),children:[e.jsx("option",{value:"",children:"Select Date Format"}),na.map(a=>e.jsx("option",{value:a,children:a},a))]}),c.dateFormat&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:c.dateFormat})]}),e.jsx("div",{children:e.jsx(K,{placeholder:"Default Value (optional)",value:u.defaultValue||"",onChange:a=>W("defaultValue",a.target.value)})}),e.jsx("div",{children:e.jsx(K,{placeholder:"Description (optional)",value:u.description||"",onChange:a=>W("description",a.target.value)})}),e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",checked:u.required,onChange:a=>W("required",a.target.checked)}),e.jsx("span",{children:"Required"})]}),e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",checked:u.primaryKey,onChange:a=>W("primaryKey",a.target.checked)}),e.jsx("span",{children:"Primary Key"})]})]})]}),e.jsx($,{size:"sm",variant:"solid",onClick:le,children:"Add Column"}),e.jsxs("div",{className:"mt-8",children:[e.jsxs("h4",{className:"text-lg font-semibold mb-1",children:["Added Columns"," ",e.jsxs("span",{className:"text-sm font-normal text-gray-400",children:["(",t.length,"/",oe,")"]})]}),e.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Drag to reorder. Edit a column to set its UI type and other properties."}),t.length===0?e.jsx("p",{className:"text-gray-400 text-sm",children:"No columns added yet."}):e.jsx("div",{className:"max-h-72 overflow-y-auto p-1",children:e.jsx(Je,{sensors:b,collisionDetection:Ze,onDragEnd:R,children:e.jsx(Be,{items:t.map(a=>a._id),strategy:ea,children:e.jsx("ul",{className:"space-y-2",children:t.map(a=>e.jsx($a,{col:a,isEditing:L===a._id,editBuffer:N,editErrors:y,startEdit:ee,handleRemove:re,saveEdit:te,cancelEdit:ae,setEditBuffer:r},a._id))})})})})]}),e.jsxs("div",{className:"mt-8",children:[e.jsx("h4",{className:"text-lg font-semibold mb-2",children:"Schema Preview"}),e.jsx("pre",{className:"text-xs p-4 rounded overflow-x-auto max-h-60 whitespace-pre-wrap bg-gray-50 border",children:JSON.stringify({tableName:_.title,columns:t.map(({_id:a,...l})=>l)},null,2)})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 mt-8 mb-4",children:[e.jsx($,{size:"sm",onClick:ce,children:"Back"}),e.jsx($,{size:"sm",variant:"twoTone",onClick:se,children:"Reset"}),e.jsx($,{size:"sm",variant:"solid",loading:Z||H,disabled:t.length===0,onClick:()=>w?x(2):f(),children:w?"Configure UI":"Submit"})]})]}),o===2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("h4",{className:"text-lg font-semibold mb-1",children:"UI Configuration"}),e.jsx("p",{className:"text-sm text-gray-500",children:"Configure dropdown data sources for applicable columns."})]}),e.jsx("div",{className:"overflow-auto border rounded mb-6",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-gray-100 text-left",children:[e.jsx("th",{className:"p-2 border",children:"Column"}),e.jsx("th",{className:"p-2 border",children:"Type"}),e.jsx("th",{className:"p-2 border",children:"UI Type"}),e.jsx("th",{className:"p-2 border",children:"Configuration"})]})}),e.jsx("tbody",{children:t.map((a,l)=>{const n=["dropdown","multiselect"].includes(a.columnType),g={...a.uiConfig||{labels:[],mode:"static",staticValues:"",dataSource:""},...M[a.name]||{}},C=F[a.name]||[];return e.jsxs("tr",{className:n?"":"bg-gray-50",children:[e.jsxs("td",{className:"p-2 border",children:[e.jsx("div",{className:"font-medium",children:a.displayName}),e.jsx("div",{className:"text-xs text-gray-400",children:a.name})]}),e.jsx("td",{className:"p-2 border",children:a.type}),e.jsx("td",{className:"p-2 border",children:a.columnType}),e.jsx("td",{className:"p-2 border",children:n?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{className:"text-sm font-medium",children:"Mode:"}),e.jsxs("select",{className:"border p-1 rounded",value:g.mode,onChange:T=>i(a.name,"mode",T.target.value),children:[e.jsx("option",{value:"static",children:"Static Values"}),e.jsx("option",{value:"table",children:"From Table"})]})]}),g.mode==="static"&&e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-700",children:"Comma-separated values"}),e.jsx(K,{type:"textarea",placeholder:"Ex: Active, Inactive, Pending",value:g.staticValues,onChange:T=>i(a.name,"staticValues",T.target.value)})]}),g.mode==="table"&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-700",children:"Data Source Table"}),e.jsxs("select",{className:"border p-1 rounded w-full",value:g.dataSource,onChange:T=>i(a.name,"dataSource",T.target.value),children:[e.jsx("option",{value:"",children:"Select table"}),V.map(T=>e.jsx("option",{value:T.value,children:T.label},T.value))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-700 block mb-1",children:"Label Field (up to 3)"}),e.jsx("div",{className:"border rounded p-2 space-y-1 max-h-32 overflow-auto",children:C.map(T=>{var Le,_e;const q=(Le=g.labels)==null?void 0:Le.includes(T.value),me=!q&&(((_e=g.labels)==null?void 0:_e.length)??0)>=3;return e.jsxs("label",{className:`flex items-center gap-2 cursor-pointer ${me?"opacity-50 cursor-not-allowed":""}`,children:[e.jsx("input",{type:"checkbox",value:T.value,checked:q,disabled:me,onChange:ra=>{let ue=[...g.labels??[]];ra.target.checked?ue.push(T.value):ue=ue.filter(ia=>ia!==T.value),i(a.name,"labels",ue)}}),e.jsx("span",{children:T.label})]},T.value)})}),e.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Selected: ",(g.labels||[]).join(", ")]})]})]})]}):e.jsx("span",{className:"text-gray-400 text-xs",children:"Not applicable"})})]},l)})})]})}),e.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[e.jsx($,{size:"sm",onClick:()=>x(1),children:"Back"}),e.jsx($,{size:"sm",variant:"solid",loading:H,onClick:f,children:"Submit"})]})]})]})},$a=d=>{const{attributes:o,listeners:x,setNodeRef:t,transform:m,transition:u,isDragging:j}=aa({id:d.col._id}),c={transform:Xe.Transform.toString(m),transition:u,opacity:j?.5:1};return e.jsx("div",{ref:t,style:c,children:e.jsx(Ya,{...d,dragHandleProps:{...o,...x}})})},Ya=h.memo(function({col:o,isEditing:x,editBuffer:t,editErrors:m,startEdit:u,handleRemove:j,saveEdit:c,cancelEdit:P,setEditBuffer:L,dragHandleProps:S}){var N;return e.jsx("li",{className:"bg-gray-100 px-4 py-2 rounded shadow-sm",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{...S,className:"cursor-grab p-1 rounded hover:bg-gray-200 shrink-0",title:"Drag to reorder",children:e.jsx(Re,{})}),e.jsx("div",{className:"flex-1 min-w-0",children:x?e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-2",children:[e.jsxs("div",{children:[e.jsx(K,{value:(t==null?void 0:t.name)??"",placeholder:"Field Name",className:m.name?"border-red-500":"",onChange:r=>L(y=>y&&{...y,name:r.target.value})}),m.name&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:m.name})]}),e.jsxs("div",{children:[e.jsx(K,{value:(t==null?void 0:t.displayName)??"",placeholder:"Display Name",className:m.displayName?"border-red-500":"",onChange:r=>L(y=>y&&{...y,displayName:r.target.value})}),m.displayName&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:m.displayName})]}),e.jsx("div",{children:e.jsxs("select",{className:"dark:bg-gray-700 ring-1 bg-gray-100 focus:bg-transparent rounded-md ring-black/5 focus:outline-none p-1.5 w-full",value:(t==null?void 0:t.type)??"string",onChange:r=>L(y=>y&&{...y,type:r.target.value}),children:[e.jsx("option",{value:"string",children:"string"}),e.jsx("option",{value:"number",children:"number"}),e.jsx("option",{value:"integer",children:"integer"}),e.jsx("option",{value:"boolean",children:"boolean"}),e.jsx("option",{value:"date",children:"date"}),e.jsx("option",{value:"datetime",children:"datetime"}),e.jsx("option",{value:"file",children:"file"})]})}),e.jsx("div",{children:e.jsxs("select",{className:"dark:bg-gray-700 ring-1 bg-gray-100 focus:bg-transparent rounded-md ring-black/5 focus:outline-none p-1.5 w-full",value:(t==null?void 0:t.columnType)??"",onChange:r=>L(y=>y&&{...y,columnType:r.target.value}),children:[e.jsx("option",{value:"",children:"Select UI Type"}),fe.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))]})}),(t==null?void 0:t.type)==="string"&&e.jsx("div",{children:e.jsx(K,{type:"number",value:(t==null?void 0:t.maxLength)??255,placeholder:"Max Length",onChange:r=>L(y=>y&&{...y,maxLength:Number(r.target.value)})})}),(t==null?void 0:t.type)==="date"&&e.jsxs("div",{children:[e.jsxs("select",{className:"dark:bg-gray-700 ring-1 bg-gray-100 focus:bg-transparent rounded-md ring-black/5 focus:outline-none p-1.5 w-full",value:(t==null?void 0:t.dateFormat)??"",onChange:r=>L(y=>y&&{...y,dateFormat:r.target.value}),children:[e.jsx("option",{value:"",children:"Select Date Format"}),na.map(r=>e.jsx("option",{value:r,children:r},r))]}),m.dateFormat&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:m.dateFormat})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[e.jsx("input",{type:"checkbox",checked:(t==null?void 0:t.required)??!1,onChange:r=>L(y=>y&&{...y,required:r.target.checked})}),"Required"]}),e.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[e.jsx("input",{type:"checkbox",checked:(t==null?void 0:t.primaryKey)??!1,onChange:r=>L(y=>y&&{...y,primaryKey:r.target.checked})}),"PK"]})]})]}):e.jsxs("div",{className:"truncate text-gray-800",children:[e.jsx("strong",{children:o.displayName})," ","(",e.jsx("code",{className:"text-xs",children:o.name}),")",o.type==="string"&&` (${o.maxLength??255})`,e.jsxs("span",{className:"ml-2 text-gray-500 text-sm",children:["· ",o.type]}),o.columnType&&e.jsxs("span",{className:"ml-2 text-blue-600 text-sm",children:["[",((N=fe.find(r=>r.value===o.columnType))==null?void 0:N.label)??o.columnType,"]"]}),o.primaryKey&&e.jsx("span",{className:"ml-2 text-amber-600 text-xs font-semibold",children:"PK"}),o.required&&e.jsx("span",{className:"ml-1 text-red-500 text-xs",children:"*"})]})}),e.jsx("div",{className:"flex items-center gap-2 shrink-0",children:x?e.jsxs(e.Fragment,{children:[e.jsx(ca,{className:"text-green-600 cursor-pointer",size:20,title:"Save",onClick:c}),e.jsx(ma,{className:"text-red-500 cursor-pointer",size:20,title:"Cancel",onClick:P})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ve,{className:"text-blue-500 cursor-pointer",size:20,title:"Edit",onClick:()=>u(o._id)}),e.jsx(Ue,{className:"text-red-500 cursor-pointer",size:20,title:"Delete",onClick:()=>j(o._id)})]})})]})})});function Ga({defaultColumns:d,data:o,defaultConfig:x={}}){var P,L,S,N,r,y,I,H,Y;const[t,m]=h.useState(o),[u,j]=h.useState({columns:d,sort:{column:"id",order:"asc"},groupBy:[],pageSize:15,features:{filterRow:!0,groupPanel:!0,columnReordering:!0,paging:!0,sorting:!0,grouping:!0,editing:!0},...x}),c=_=>{_.cancel=!0;const J=_.changes;J.length>0&&m(F=>{let D=[...F];return J.forEach(k=>{if(k.type==="insert")D.push(k.data);else if(k.type==="update"){const E=D.findIndex(M=>M.id===k.key);E>-1&&(D[E]={...D[E],...k.data})}else k.type==="remove"&&(D=D.filter(E=>E.id!==k.key))}),D})};return e.jsx("div",{className:"w-full overflow-x-auto",children:e.jsx("div",{className:"",children:e.jsxs(ka,{dataSource:t,showBorders:!1,allowColumnResizing:!0,columnResizingMode:"widget",columnAutoWidth:!0,allowColumnReordering:(P=u.features)==null?void 0:P.columnReordering,defaultSorting:(L=u.features)!=null&&L.sorting?[{selector:u.sort.column,desc:u.sort.order==="desc"}]:[],onSaving:c,children:[e.jsx(Ta,{mode:"batch",allowAdding:(S=u.features)==null?void 0:S.editing,allowUpdating:(N=u.features)==null?void 0:N.editing,allowDeleting:(r=u.features)==null?void 0:r.editing}),e.jsx(Fa,{defaultPageSize:u.pageSize,enabled:(y=u.features)==null?void 0:y.paging}),e.jsx(Ea,{visible:(I=u.features)==null?void 0:I.filterRow}),e.jsx(La,{mode:(H=u.features)!=null&&H.sorting?"multiple":"none"}),e.jsx(_a,{visible:(Y=u.features)==null?void 0:Y.groupPanel}),e.jsx(Ia,{autoExpandAll:!1}),u.columns.filter(_=>_.visible).map(_=>e.jsx(Ma,{dataField:_.dataField,width:_.width,groupIndex:u.groupBy.indexOf(_.dataField)>=0?u.groupBy.indexOf(_.dataField):void 0},_.dataField))]})})})}ve("dynamicTables",Ne);const Wa=["text","dropdown","multiselect","date","datetime","boolean","number","file"],Ha=/^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/,Ja=new Set(["select","from","where","table","column","index","order","group","by","insert","update","delete","drop","create","alter","add","set","values","into","join","left","right","inner","outer","on","as","distinct","having","limit","offset","primary","key","foreign","references","constraint","unique","not","null","default","check","and","or","in","is","like","between","exists","all","any","case","when","then","else","end","union","intersect","except","id","row"]),Pe={name:"",displayName:"",description:"",type:"",maxLength:void 0,required:!1,primaryKey:!1,columnType:"text"},Za=({tableId:d,onClose:o})=>{const x=Ce(),{dynamicTableList:t}=de(s=>s.dynamicTables.data),[m,u]=h.useState(0),[j,c]=h.useState([]),[P,L]=h.useState(null),[S,N]=h.useState(null),[r,y]=h.useState(Pe),[I,H]=h.useState({}),[Y,_]=h.useState({}),[J,F]=h.useState({}),[D,k]=h.useState({}),[E,M]=h.useState(new Set),[A,Z]=h.useState([]),[z,X]=h.useState(!1),[B,W]=h.useState(0);h.useEffect(()=>{x(ne({}))},[x]),h.useEffect(()=>{async function s(){try{const v=await ye(d),i=v==null?void 0:v.data;W((i==null?void 0:i.schemaVersion)??0);const w=(typeof(i==null?void 0:i.schemaDefinition)=="string"?JSON.parse(i.schemaDefinition):i==null?void 0:i.schemaDefinition).Columns.map(a=>({_id:crypto.randomUUID(),name:a.Name,displayName:a.DisplayName,description:a.Description||"",type:a.Type==="guid"?"string":a.Type,maxLength:a.MaxLength,required:a.Required,primaryKey:a.PrimaryKey,columnType:a.ColumnType??"text",uiConfig:a.UiConfig?{mode:a.UiConfig.Mode??"static",staticValues:a.UiConfig.StaticValues??"",dataSource:a.UiConfig.DataSource??"",labels:a.UiConfig.Labels??[]}:null,isNew:!1}));c(w);const f={};w.forEach(a=>{f[a._id]=a.name}),k(f);const G={};w.forEach(a=>{a.uiConfig&&(G[a.name]=a.uiConfig)}),_(G),w.forEach(a=>{var l;((l=a.uiConfig)==null?void 0:l.mode)==="table"&&a.uiConfig.dataSource&&ce(a.name,a.uiConfig.dataSource)})}catch{U.push(e.jsx(O,{title:"Error",type:"danger",children:"Failed to load table schema. Please close and try again."}),{placement:"top-center"})}}s()},[d]);const le=s=>Ha.test(s)?Ja.has(s.toLowerCase())?`"${s}" is a reserved SQL keyword and cannot be used as a column name.`:null:"Name must start with a letter or underscore and contain only letters, numbers, and underscores (max 63 chars).",re=()=>{const s={};if(!r.name.trim())s.name="Field name required";else{const i=le(r.name.trim());i&&(s.name=i)}return r.displayName.trim()||(s.displayName="Display name required"),r.type||(s.type="Type required"),r.type==="string"&&(!r.maxLength||r.maxLength<=0)&&(s.maxLength="Length must be > 0"),r.type==="string"&&r.maxLength&&r.maxLength>65535&&(s.maxLength="Length cannot exceed 65535"),j.some(i=>i.name.trim().toLowerCase()===r.name.trim().toLowerCase())&&(s.name="A column with this name already exists"),H(s),Object.keys(s).length===0},ee=()=>{if(!re())return;const s=r.primaryKey?j.map(v=>({...v,primaryKey:!1})):j;c([{_id:crypto.randomUUID(),...r,isNew:!0,uiConfig:null},...s]),y(Pe),H({})},ae=s=>{L(s._id),N({...s})},te=()=>{if(!S)return;const s=j.find(i=>i._id===S._id);if(s&&!s.isNew&&s.type!==S.type&&!window.confirm(`Changing the type of "${s.displayName}" from "${s.type}" to "${S.type}" may corrupt existing data in this column. Are you sure?`))return;const v=S.primaryKey?j.map(i=>i._id===S._id?S:{...i,primaryKey:!1}):j.map(i=>i._id===S._id?S:i);c(v),S.isNew||M(i=>new Set(i).add(S._id)),L(null),N(null)},b=s=>{const v=j.find(i=>i._id===s);if(c(i=>i.filter(V=>V._id!==s)),v){if(!v.isNew){const i=D[v._id]??v.name;Z(V=>[...V,i])}_(i=>{const V={...i};return delete V[v.name],V})}},R=Ge(be(He),be(We,{coordinateGetter:Qe})),we=s=>{const{active:v,over:i}=s;if(!i||v.id===i.id)return;const V=j.findIndex(a=>a._id===v.id),w=j.findIndex(a=>a._id===i.id),f=ta(j,V,w);c(f);const G=new Set(E);f.forEach((a,l)=>{var n;!a.isNew&&((n=j[l])==null?void 0:n._id)!==a._id&&G.add(a._id)}),M(G)},ce=async(s,v)=>{var i;try{const V=await ye(v),w=typeof((i=V==null?void 0:V.data)==null?void 0:i.schemaDefinition)=="string"?JSON.parse(V.data.schemaDefinition):V.data.schemaDefinition;F(f=>({...f,[s]:(w.Columns??[]).map(G=>({value:G.Name,label:G.DisplayName||G.Name}))}))}catch{U.push(e.jsx(O,{title:"Error",type:"danger",children:"Failed to load fields for the selected table."}),{placement:"top-center"})}},se=(s,v,i)=>{if(v==="dataSource"&&ce(s,i),j.some(w=>w.name===s&&!w.isNew)){const w=j.find(f=>f.name===s);w&&M(f=>new Set(f).add(w._id))}_(w=>({...w,[s]:{mode:"static",staticValues:"",labels:[],dataSource:"",...w[s]||{},[v]:i}}))},Se=h.useMemo(()=>(t==null?void 0:t.map(s=>({value:s.id,label:s.tableName})))??[],[t]),Q=async()=>{var s,v;X(!0);try{const i=j.filter(f=>f.isNew),V=j.filter(f=>!f.isNew),w=[...i.map(f=>({operation:"ADD_COLUMN",columnName:f.name,columnDefinition:{name:f.name,displayName:f.displayName,description:f.description,type:f.type,required:f.required,maxLength:f.maxLength,primaryKey:f.primaryKey,columnType:f.columnType,uiConfig:Y[f.name]??null}})),...A.map(f=>({operation:"REMOVE_COLUMN",columnName:f})),...V.filter(f=>E.has(f._id)).map(f=>{const G=D[f._id]??f.name,a=Y[f.name];return{operation:"MODIFY_COLUMN",columnName:G,columnDefinition:{name:f.name,displayName:f.displayName,description:f.description,type:f.type,required:f.required,maxLength:f.maxLength,primaryKey:f.primaryKey,columnType:f.columnType,uiConfig:a?{mode:a.mode,dataSource:a.dataSource,staticValues:a.staticValues,labels:a.labels}:void 0}}})];w.length>0&&await fa(d,{modifications:w,expectedSchemaVersion:B}),x(ne({})),U.push(e.jsx(O,{title:"Success",type:"success",children:"Table schema updated successfully."}),{placement:"top-center"}),o()}catch(i){U.push(e.jsx(O,{title:"Error",type:"danger",children:((v=(s=i==null?void 0:i.response)==null?void 0:s.data)==null?void 0:v.message)||"Failed to update schema. Please try again."}),{placement:"top-center"})}finally{X(!1)}},ie=j.some(s=>["dropdown","multiselect"].includes(s.columnType));return e.jsxs("div",{className:"bg-white",children:[m===0&&e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"font-semibold mb-3",children:"Edit Columns"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx(K,{placeholder:"Field Name",value:r.name,className:I.name?"border-red-500":"",onChange:s=>y(v=>({...v,name:s.target.value}))}),I.name&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:I.name})]}),e.jsxs("div",{children:[e.jsx(K,{placeholder:"Display Name",value:r.displayName,className:I.displayName?"border-red-500":"",onChange:s=>y(v=>({...v,displayName:s.target.value}))}),I.displayName&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:I.displayName})]}),e.jsxs("div",{children:[e.jsxs("select",{className:"h-10 bg-gray-100 focus:bg-transparent rounded-md dark:bg-gray-700 ring-1 ring-black/5 focus:outline-none p-1.5 w-full",value:r.type,onChange:s=>y(v=>({...v,type:s.target.value})),children:[e.jsx("option",{value:"",children:"Select Type"}),e.jsx("option",{value:"string",children:"string"}),e.jsx("option",{value:"number",children:"number"}),e.jsx("option",{value:"integer",children:"integer"}),e.jsx("option",{value:"boolean",children:"boolean"}),e.jsx("option",{value:"date",children:"date"}),e.jsx("option",{value:"datetime",children:"datetime"}),e.jsx("option",{value:"file",children:"file"})]}),I.type&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:I.type})]}),e.jsx("div",{children:e.jsx("select",{className:"h-10 bg-gray-100 focus:bg-transparent rounded-md dark:bg-gray-700 ring-1 ring-black/5 focus:outline-none p-1.5 w-full",value:r.columnType,onChange:s=>y(v=>({...v,columnType:s.target.value})),children:Wa.map(s=>e.jsx("option",{value:s,children:s},s))})}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",checked:r.required,onChange:s=>y(v=>({...v,required:s.target.checked}))}),e.jsx("span",{children:"Required"})]}),e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",checked:r.primaryKey,onChange:s=>y(v=>({...v,primaryKey:s.target.checked}))}),e.jsx("span",{children:"Primary Key"})]}),r.type==="string"&&e.jsxs("div",{children:[e.jsx(K,{type:"number",placeholder:"Length",value:r.maxLength||"",className:I.maxLength?"border-red-500":"",onChange:s=>y(v=>({...v,maxLength:Number(s.target.value)}))}),I.maxLength&&e.jsx("p",{className:"text-red-500 text-xs mt-1",children:I.maxLength})]})]})]}),e.jsx($,{variant:"solid",size:"sm",onClick:ee,children:"Add Column"}),e.jsx(Je,{sensors:R,collisionDetection:Ze,onDragEnd:we,children:e.jsx(Be,{items:j.map(s=>s._id),strategy:ea,children:e.jsx("ul",{className:"space-y-3 mt-6",children:j.map(s=>e.jsx(Xa,{col:s,isEditing:P===s._id,editBuffer:S,startEdit:ae,saveEdit:te,removeColumn:b,setEditBuffer:N,setEditingId:L},s._id))})})}),e.jsx("div",{className:"flex justify-end mt-6",children:e.jsx($,{variant:"solid",onClick:()=>ie?u(1):Q(),loading:!ie&&z,children:ie?"Configure UI":"Submit"})})]}),m===1&&e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"text-lg font-semibold mb-4",children:"UI Configuration"}),e.jsx("div",{className:"overflow-auto border rounded mb-6",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-gray-100",children:[e.jsx("th",{className:"p-2 border",children:"Column"}),e.jsx("th",{className:"p-2 border",children:"Type"}),e.jsx("th",{className:"p-2 border",children:"UI Type"}),e.jsx("th",{className:"p-2 border",children:"Configuration"})]})}),e.jsx("tbody",{children:j.map(s=>{const v=["dropdown","multiselect"].includes(s.columnType),i=Y[s.name]||{mode:"static",staticValues:"",dataSource:"",labels:[]},V=J[s.name]||[];return e.jsxs("tr",{className:v?"":"bg-gray-50",children:[e.jsxs("td",{className:"p-2 border",children:[e.jsx("div",{className:"font-medium",children:s.displayName}),e.jsx("div",{className:"text-xs text-gray-400",children:s.name})]}),e.jsx("td",{className:"p-2 border",children:s.type}),e.jsx("td",{className:"p-2 border",children:s.columnType}),e.jsx("td",{className:"p-2 border",children:v?e.jsxs(e.Fragment,{children:[e.jsxs("select",{className:"border p-1 rounded mb-2",value:i.mode,onChange:w=>se(s.name,"mode",w.target.value),children:[e.jsx("option",{value:"static",children:"Static"}),e.jsx("option",{value:"table",children:"From Table"})]}),i.mode==="static"&&e.jsx(K,{type:"textarea",placeholder:"Ex: Active, Inactive, Pending",value:i.staticValues,onChange:w=>se(s.name,"staticValues",w.target.value)}),i.mode==="table"&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-700",children:"Data Source Table"}),e.jsxs("select",{className:"border p-1 rounded w-full",value:i.dataSource,onChange:w=>se(s.name,"dataSource",w.target.value),children:[e.jsx("option",{value:"",children:"Select table"}),Se.map(w=>e.jsx("option",{value:w.value,children:w.label},w.value))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-700 block mb-1",children:"Label Field"}),e.jsx("div",{className:"border rounded p-2 space-y-1 max-h-32 overflow-auto",children:V.map(w=>{var a,l;const f=(a=i.labels)==null?void 0:a.includes(w.value),G=!f&&(((l=i.labels)==null?void 0:l.length)??0)>=3;return e.jsxs("label",{className:`flex items-center gap-2 cursor-pointer ${G?"opacity-50 cursor-not-allowed":""}`,children:[e.jsx("input",{type:"checkbox",value:w.value,checked:f,disabled:G,onChange:n=>{let p=[...i.labels??[]];n.target.checked?p.push(w.value):p=p.filter(g=>g!==w.value),se(s.name,"labels",p)}}),e.jsx("span",{children:w.label})]},w.value)})}),e.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Selected: ",(i.labels||[]).join(", ")]})]})]})]}):e.jsx("span",{className:"text-gray-400 text-xs",children:"Not applicable"})})]},s._id)})})]})}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx($,{onClick:()=>u(0),children:"Back"}),e.jsx($,{variant:"solid",loading:z,onClick:Q,children:"Submit"})]})]})]})},Xa=d=>{const{attributes:o,listeners:x,setNodeRef:t,transform:m,transition:u,isDragging:j}=aa({id:d.col._id}),c={transform:Xe.Transform.toString(m),transition:u,opacity:j?.5:1};return e.jsx("div",{ref:t,style:c,children:e.jsx(Qa,{...d,dragHandleProps:{...o,...x}})})},Qa=h.memo(function({col:o,isEditing:x,editBuffer:t,startEdit:m,saveEdit:u,removeColumn:j,setEditBuffer:c,setEditingId:P,dragHandleProps:L}){return e.jsx("li",{className:"border border-gray-200 p-3 rounded",children:x?e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[e.jsx(K,{value:(t==null?void 0:t.name)??"",disabled:!o.isNew,placeholder:"Name",onChange:S=>c(N=>N&&{...N,name:S.target.value})}),e.jsx(K,{value:(t==null?void 0:t.displayName)??"",placeholder:"Display Name",onChange:S=>c(N=>N&&{...N,displayName:S.target.value})}),e.jsxs("select",{className:"dark:bg-gray-700 ring-1 bg-gray-100 focus:bg-transparent rounded-md ring-black/5 focus:outline-none p-1.5",value:(t==null?void 0:t.type)??"",onChange:S=>c(N=>N&&{...N,type:S.target.value}),children:[e.jsx("option",{value:"",children:"Select Type"}),e.jsx("option",{value:"string",children:"string"}),e.jsx("option",{value:"number",children:"number"}),e.jsx("option",{value:"integer",children:"integer"}),e.jsx("option",{value:"boolean",children:"boolean"}),e.jsx("option",{value:"date",children:"date"}),e.jsx("option",{value:"datetime",children:"datetime"}),e.jsx("option",{value:"file",children:"file"})]}),(t==null?void 0:t.type)==="string"&&e.jsx(K,{type:"number",placeholder:"Max Length",value:(t==null?void 0:t.maxLength)||"",onChange:S=>c(N=>N&&{...N,maxLength:Number(S.target.value)})}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",checked:(t==null?void 0:t.required)??!1,onChange:S=>c(N=>N&&{...N,required:S.target.checked})}),e.jsx("span",{children:"Required"})]}),e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",checked:(t==null?void 0:t.primaryKey)??!1,onChange:S=>c(N=>N&&{...N,primaryKey:S.target.checked})}),e.jsx("span",{children:"Primary Key"})]})]}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx($,{variant:"solid",size:"sm",onClick:u,children:"Save"}),e.jsx($,{size:"sm",onClick:()=>{P(null),c(null)},children:"Cancel"})]})]}):e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{...L,className:"cursor-grab text-gray-400 hover:text-gray-600",children:e.jsx(Re,{})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold",children:o.displayName}),e.jsxs("div",{className:"text-xs text-gray-500",children:[o.name," · ",o.type]})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Ve,{className:"cursor-pointer",onClick:()=>m(o)}),o.isNew?e.jsx(Ue,{className:"cursor-pointer text-red-500",onClick:()=>j(o._id)}):e.jsx(ha,{className:"text-gray-400",title:"Existing columns can only be edited, not deleted"})]})]})})});ve("dynamicTables",Ne);const Ba=()=>{const d=Ce(),{deleteConfirmation:o,selectedGrid:x}=de(u=>u.dynamicTables.data),t=()=>{d(Fe(!1))},m=async()=>{d(Fe(!1));try{await Na(x==null?void 0:x.id),d(ne({})),U.push(e.jsx(O,{title:"Deleted",type:"success",duration:2500,children:"Grid Successfully Deleted"}),{placement:"top-center"})}catch{U.push(e.jsx(O,{title:"Error",type:"danger",duration:2500,children:"Failed to delete grid. Please try again."}),{placement:"top-center"})}};return e.jsx(Pa,{isOpen:o,type:"danger",title:"Delete Grid",confirmButtonColor:"red-600",onClose:t,onRequestClose:t,onCancel:t,onConfirm:m,children:e.jsxs("p",{children:["Are you sure you want to delete ",e.jsx("strong",{children:x==null?void 0:x.tableName}),"? All data rows stored in this table will be permanently deleted. This action cannot be undone."]})})},Ae=1,et=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],at=5242880,tt=(d,o)=>{if(o.length>=Ae)return`You can only upload ${Ae} file(s)`;if(d)for(const x of d){if(!et.includes(x.type))return"Please upload a .jpeg, .png or pdf file!";if(x.size>=at)return"Upload image cannot be more than 5MB!"}return!0},st=({values:d,touched:o,errors:x})=>e.jsxs(Ee,{className:"mb-4",children:[e.jsx(ge,{asterisk:!0,label:"File",invalid:!!(x.document&&o.document),errorMessage:x.document,children:e.jsx(je,{name:"document",children:({field:t,form:m})=>e.jsx(qe,{draggable:!0,multiple:!1,beforeUpload:tt,fileList:Array.isArray(d.document)?d.document:[],onChange:u=>{var j;m.setFieldValue(t.name,u),m.setFieldValue("fileName",((j=u==null?void 0:u[0])==null?void 0:j.name)??"")},onFileRemove:u=>m.setFieldValue(t.name,u)})})}),e.jsx(ge,{asterisk:!0,label:"Document Name",invalid:!!(x.fileName&&o.fileName),errorMessage:x.fileName,children:e.jsx(je,{type:"text",autoComplete:"off",name:"fileName",placeholder:"Document Name",component:K})})]}),nt=Ke().shape({document:Sa().of(Da().nullable()).test("file-required","File is required",d=>!!d&&d.length>0).required("File is required")}),Te=d=>d.toLowerCase().replace(/[\s_\-]/g,"").trim();async function lt(d){var j;const o=await ye(d),x=(j=o==null?void 0:o.data)==null?void 0:j.schemaDefinition;if(!x)return[];let t;try{t=typeof x=="string"?JSON.parse(x):x}catch{throw new Error("Invalid schemaDefinition JSON")}return((t==null?void 0:t.Columns)??[]).map(c=>({key:String((c==null?void 0:c.Name)??""),label:String((c==null?void 0:c.DisplayName)??(c==null?void 0:c.Name)??""),required:!!(c!=null&&c.Required)})).filter(c=>!!c.key)}async function rt(d){try{if(!(d!=null&&d.file))throw new Error("Missing file in data");if(!d.tableId)throw new Error("Missing Table ID");return await va(d.tableId,d.file,"csv",!0,!1,!1,JSON.stringify(d.mapping))}catch(o){throw console.error("Error in import:",o),o}}const la=h.forwardRef((d,o)=>{const{initialData:x={fileName:"",document:[]},onDiscard:t,customerId:m,handleApiResponse:u}=d,[j,c]=h.useState([]),[P,L]=h.useState([]),[S,N]=h.useState(!1),[r,y]=h.useState({});h.useEffect(()=>{let F=!0;return N(!0),lt(m).then(D=>{if(!F)return;L(D.filter(E=>E.key!=="Id"));const k={};D.forEach(E=>{E.key!=="Id"&&(k[E.key]=null)}),y(k)}).catch(D=>{console.error(D),U.push(e.jsx(O,{title:"Error",type:"danger",duration:2500,children:"Failed to load fields for mapping"}),{placement:"top-center"})}).finally(()=>N(!1)),()=>{F=!1}},[m]);const I=h.useCallback(F=>{Ye.parse(F,{header:!0,preview:1,skipEmptyLines:!0,complete:D=>{const k=(D.meta.fields||[]).filter(Boolean);if(c(k),k.length&&P.length){const E=new Map(k.map(M=>[Te(M),M]));y(M=>{const A={...M};return P.forEach(Z=>{if(!A[Z.key]){const z=E.get(Te(Z.label))??E.get(Te(Z.key));z&&(A[Z.key]=z)}}),A})}},error:D=>{console.error("CSV parse error:",D),U.push(e.jsx(O,{title:"CSV Error",type:"danger",duration:2500,children:"Could not read CSV headers"}),{placement:"top-center"})}})},[P]),H=h.useMemo(()=>new Set(Object.values(r).filter(F=>!!F)),[r]),Y=h.useCallback(F=>{const D=j.filter(k=>!H.has(k));return F&&!D.includes(F)?[F,...D]:D},[j,H]),_=h.useMemo(()=>P.length?P.filter(F=>F.required).every(F=>!!r[F.key]):!0,[P,r]),J=async(F,D)=>{var M;const k=(M=F.document)==null?void 0:M[0];if(!k){U.push(e.jsx(O,{title:"Error",type:"danger",duration:2500,children:"Please select a CSV file"}),{placement:"top-center"}),D(!1);return}const E={tableId:m,file:k,fileName:F.fileName||k.name,mapping:r};try{const A=await rt(E);A!=null&&A.success&&(t==null||t()),u(A,"Added")}catch(A){console.error("Error during form submission:",A),U.push(e.jsx(O,{title:"Error",type:"danger",duration:2500,children:"An error occurred during document upload"}),{placement:"top-center"})}finally{D(!1)}};return e.jsx(ze,{innerRef:o,initialValues:{...x},validationSchema:nt,enableReinitialize:!0,onSubmit:(F,{setSubmitting:D})=>J(F,D),children:({values:F,touched:D,errors:k,isSubmitting:E})=>e.jsx($e,{children:e.jsx(Oe,{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(Ee,{divider:!0,className:"mb-4",children:[e.jsx(st,{touched:D,errors:k,values:F,customerId:m}),e.jsx(it,{fileList:F.document,onReady:I}),e.jsxs("div",{className:"mt-6",children:[e.jsx("h4",{className:"text-lg font-semibold",children:"Map Columns"}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Match your CSV headers to the database fields."}),S?e.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Loading fields…"}):j.length?e.jsx("div",{className:"mt-4 space-y-3",children:P.map(M=>{const A=r[M.key],Z=Y(A);return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsxs("label",{className:"sm:w-64 shrink-0 font-medium",children:[M.label,M.required&&e.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),e.jsx("div",{className:"flex-1",children:e.jsxs("select",{className:"w-full border rounded-md px-3 py-2 bg-white dark:bg-gray-800",value:A??"",onChange:z=>{const X=z.target.value||null;y(B=>({...B,[M.key]:X}))},children:[e.jsx("option",{value:"",children:"— Select CSV column —"}),Z.map(z=>e.jsx("option",{value:z,children:z},z))]})})]},M.key)})}):e.jsx("p",{className:"mt-4 text-sm text-gray-500",children:"Upload a CSV to load headers."})]}),e.jsx(Ra,{className:"flex items-center p-4 justify-between mt-6",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($,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>t==null?void 0:t(),children:"Discard"}),e.jsx($,{size:"sm",variant:"solid",loading:E,icon:e.jsx(Aa,{}),type:"submit",disabled:!j.length||!_,title:j.length?_?void 0:"Please complete required mappings":"Upload a CSV to continue",children:"Save"})]})})]})})})})})})});la.displayName="DocumentForm";function it({fileList:d,onReady:o}){const[x,t]=h.useState(null);return h.useEffect(()=>{const m=d==null?void 0:d[0];m&&m.name!==x&&(t(m.name),o(m))},[d,x,o]),null}ve("dynamicTables",Ne);const ot=({accountId:d=null})=>{var ee,ae,te;const o="Data Tables",x=Ce(),{loading:t,selectedGrid:m,dynamicTableList:u}=de(b=>b.dynamicTables.data),j=de(b=>{var R;return((R=b.auth.session)==null?void 0:R.permission)||[]}),c=((ee=j==null?void 0:j.filter(b=>(b==null?void 0:b.defaultMenuName)===o))==null?void 0:ee[0])||{isDelete:!0,isEdit:!0,isView:!0},P={edit:c.isEdit,view:c.isView,import:c.isEdit,delete:c.isDelete},[L,S]=h.useState(!1),[N,r]=h.useState(!1),[y,I]=h.useState(!1),[H,Y]=h.useState(!1),[_,J]=h.useState(!1),[F,D]=h.useState(""),k=()=>{S(!0)},E=b=>{S(!1)},M=()=>{x(ne({}))};h.useEffect(()=>{M()},[]);const A=async b=>{try{Y(!0),x(pe(b)),I(!0)}catch(R){console.error("Error fetching table:",R)}finally{Y(!1)}},Z=()=>{k(),D("")},z=async b=>{try{Y(!0);const R=await Ca(b==null?void 0:b.id,{});x(pe((R==null?void 0:R.data)||[])),r(!0)}catch(R){console.error("Error fetching table:",R)}finally{Y(!1)}},X=b=>{x(pe(b)),x(Fe(!0))},B=b=>{x(pe(b)),J(!0)},W=(b,R)=>{R===he.view&&z(b),R===he.edit&&A(b),R===he.delete&&X(b),R===he.import&&B(b)},le=[{dataField:"Action",caption:"Action",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:b=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(ya,{row:b==null?void 0:b.data,actions:P,buttonClick:W})})},{dataField:"tableName",caption:"Title",cellRender:b=>e.jsx("div",{"data-cname":"Title",children:b.data.tableName})},{dataField:"description",caption:"Description",cellRender:b=>e.jsx("div",{"data-cname":"Description",children:b.data.description})},{dataField:"createdDate",caption:"Created Date",cellRender:b=>e.jsx("div",{"data-cname":"Created Date",children:b.data.createdDate?ga(b.data.createdDate).format("MM/DD/YYYY"):""})},{dataField:"isActive",caption:"Status",cellRender:b=>e.jsx("div",{"data-cname":"Status",children:b.data.isActive})}],re=b=>{var R;b.success?(M(),U.push(e.jsx(O,{title:"Success",type:"success",duration:2500,children:(b==null?void 0:b.message)||"Success"}),{placement:"top-center"})):U.push(e.jsx(O,{title:"Error",type:"danger",duration:2500,children:((R=b==null?void 0:b.errorMessages)==null?void 0:R.$values[0])||"Please check the columns"}),{placement:"top-center"})};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b dark:bg-[#292f3c] dark:text-white",children:[e.jsx(da,{items:[{label:"Build"},{label:"Data Tables"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Data Tables"}),(c==null?void 0:c.isEdit)&&e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx($,{block:!0,variant:"solid",size:"sm",icon:e.jsx(xa,{}),onClick:Z,children:"Add New"}),e.jsx(xe,{title:"Add Data Grid",isOpen:L,portalClassName:"w90 prevent-overflow",onClose:E,children:e.jsx(za,{footerWidth:"w30",setIsOpen:S})})]})]})]}),(t||H)&&e.jsx(oa,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsx(Ee,{className:d?"p-0 m-6 boderless":"m-6 borderless boderless",children:e.jsx(ja,{tableName:"DynamicTableList",className:"pt-2",dataSource:u||[],height:"calc(100vh - 200px)",columns:le,keyExpr:"$id",stateStorageKey:"opportunity",isLoading:t})}),e.jsx(xe,{title:"Data Grid",isOpen:N,portalClassName:"w90 prevent-overflow",onClose:()=>r(!1),children:e.jsx(Ga,{gridId:"accounts",data:((ae=m==null?void 0:m.data)==null?void 0:ae.$values)||[],defaultColumns:((te=m==null?void 0:m.schema)==null?void 0:te.$values)||[]})}),e.jsx(xe,{title:"Edit Grid",isOpen:y,portalClassName:"w90 prevent-overflow",onClose:()=>I(!1),children:e.jsx(Za,{tableId:m==null?void 0:m.id,onClose:()=>I(!1)})}),e.jsx(Ba,{}),e.jsx(xe,{title:"Import Data",isOpen:_,portalClassName:"w30",onClose:()=>J(!1),children:e.jsx(la,{initialData:{document:""},onDiscard:()=>J(!1),customerId:m==null?void 0:m.id,handleApiResponse:re})})]})},dt=()=>e.jsx(e.Fragment,{children:e.jsx(ot,{})}),Ht=dt;export{Ht as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{f as j,r as x,u as y}from"./vendor-react-ece1c85f.js";import{F as N}from"./FormContainer-9a52b9e8.js";import{c as p,g as S,B as k,a1 as F,a2 as A,a3 as C}from"./index-3b5ce20a.js";import{A as w}from"./Alert-59d09a99.js";import{c as E,a as P,F as V,b as $}from"./index.esm-b2d342b5.js";import{a as L}from"./UserService-1b93ceb0.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 M=({tempToken:l,userId:c})=>{const m=j(),n=p(t=>{var a;return((a=t==null?void 0:t.theme)==null?void 0:a.themeColours)||{}}),[o,d]=x.useState(""),[g,h]=x.useState(!1),v=E().shape({validatethrough:P().required("Please select a verification method")}),f=async t=>{var a,i;h(!0);try{await L(c,t.validatethrough)?m(`/otp-verification?tempToken=${l}`,{state:{validatethrough:t.validatethrough}}):d("Failed to send otp. Please retry.")}catch(r){d(((i=(a=r==null?void 0:r.response)==null?void 0:a.data)==null?void 0:i.message)??"Failed to send otp. Please retry.")}finally{h(!1)}},b=[{label:"Authenticator App",value:"Authenticator",icon:e.jsx(F,{className:"text-3xl text-custom-500"})},{label:"Email",value:"Email",icon:e.jsx(A,{className:"text-3xl text-custom-500"})},{label:"SMS",value:"SMS",icon:e.jsx(C,{className:"text-3xl text-custom-500"})}];return e.jsxs("div",{className:"xl:min-w-[550px] px-4 space-y-6 mt-8 text-center",children:[e.jsxs("div",{className:"p-8 pt-4 pb-0",children:[e.jsx("h2",{className:"text-2xl font-black mb-2 pb-2",children:"2 Factor Authentication"}),e.jsx("p",{className:"text-base text-gray-700 leading-relaxed pb-2",children:"Choose a method to receive your one-time passcode."})]}),e.jsx(V,{initialValues:{validatethrough:""},validationSchema:v,onSubmit:f,children:({values:t,setFieldValue:a,errors:i,touched:r})=>e.jsx($,{children:e.jsxs(N,{className:"space-y-6 px-4",children:[o&&e.jsx(w,{showIcon:!0,className:"mb-4",type:"danger",children:o}),e.jsx("div",{className:"flex flex-col sm:flex-row justify-center gap-6 sm:gap-8 items-center",children:b.map(s=>{const u=t.validatethrough===s.value;return e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{onClick:()=>a("validatethrough",s.value),className:S("w-32 h-32 border rounded-lg flex items-center justify-center transition dark:text-gray-400 dark:bg-[#292f3c]",u?"border-custom-500 bg-custom-50":"border-gray-300 bg-white cursor-pointer"),children:s.icon}),e.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm text-gray-800 cursor-pointer dark:text-gray-400",children:[e.jsx("input",{type:"radio",name:"validatethrough",value:s.value,checked:u,onChange:()=>a("validatethrough",s.value),style:{accentColor:n[600]}}),s.label]})]},s.value)})}),i.validatethrough&&r.validatethrough&&e.jsx("div",{className:"text-red-500 text-sm",children:i.validatethrough}),t.validatethrough&&e.jsx("div",{className:"pt-4 sm:pb-4",children:e.jsx(k,{type:"submit",variant:"solid",loading:g,block:!0,children:"Next"})})]})})})]})},O=()=>{const{email:l,id:c}=p(o=>o.auth.user);y();const n=new URLSearchParams(document.location.search).get("tempToken")??"";return e.jsx(M,{tempToken:n,email:l??"",userId:c})},W=O;export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o,c as d,a as u}from"./vendor-redux-a1f00e6b.js";import{d as p,e as g}from"./AccountServices-
|
|
1
|
+
import{b as o,c as d,a as u}from"./vendor-redux-a1f00e6b.js";import{d as p,e as g}from"./AccountServices-f68f471d.js";import{b as D}from"./ContactService-8afcaeb7.js";import{ay as f,az as y,_ as C}from"./index-3b5ce20a.js";const c="AccountsData",l=o(`${c}/getAccountsData`,async(t,{rejectWithValue:a})=>{const e=`apiCache-accountsData-${JSON.stringify(t)}`,n=f(e);if(n)return n;try{const s=await p(t);return y(e,s.data),s.data}catch(s){return a(s)}}),r=o(c+"/getAccountDetails",async t=>(await g(t.id)).data),m=o(`${c}/getAccountContactList`,async t=>(await D(t)).data),A={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},b={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:A,filterData:{parentAccount:"",primaryContact:"",billingContact:""},accountList:[],contactList:[]},i=d({name:`${c}`,initialState:b,reducers:{setTableData:(t,a)=>{t.tableData=a.payload},setFilterData:(t,a)=>{t.filterData=a.payload},toggleDeleteConfirmation:(t,a)=>{t.deleteConfirmation=a.payload},setSelectedRowData:(t,a)=>{t.selectedRowData=a.payload}},extraReducers:t=>{t.addCase(l.fulfilled,(a,e)=>{a.accountList=e.payload.$values,a.tableData.total=e.payload.$values.length,a.loading=!1}).addCase(l.pending,a=>{a.loading=!0}).addCase(m.fulfilled,(a,e)=>{a.contactList=e.payload.$values}).addCase(r.fulfilled,(a,e)=>{a.account=e.payload,a.loading=!1}).addCase(r.pending,a=>{a.loading=!0})}}),{setTableData:R,setFilterData:T,toggleDeleteConfirmation:v,setSelectedRowData:x}=i.actions,S=i.reducer,G=u({data:S}),I=C;export{m as a,x as b,r as c,l as g,G as r,T as s,v as t,I as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as c,c as i,a as d}from"./vendor-redux-a1f00e6b.js";import{f as r,b as p}from"./ContactService-
|
|
1
|
+
import{b as c,c as i,a as d}from"./vendor-redux-a1f00e6b.js";import{f as r,b as p}from"./ContactService-8afcaeb7.js";import{d as u}from"./AccountServices-f68f471d.js";import{cV as D,_ as g}from"./index-3b5ce20a.js";const o="ContactsData",s=c(`${o}/getContactsData`,async t=>(await D("apiCache-contactsData",t,p)).data),C=c(`${o}/getContactsAccountData`,async t=>{const a=await u(t);return console.log("accounts",a),a.data}),n=c(o+"/getContactDetails",async t=>(await r(t.id)).data),f={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},y={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:f,filterData:{position:"",account:""},contactList:[],accountList:[]},l=i({name:`${o}`,initialState:y,reducers:{setTableData:(t,a)=>{t.tableData=a.payload},setFilterData:(t,a)=>{t.filterData=a.payload},toggleDeleteConfirmation:(t,a)=>{t.deleteConfirmation=a.payload},setSelectedRowData:(t,a)=>{t.selectedRowData=a.payload}},extraReducers:t=>{t.addCase(s.fulfilled,(a,e)=>{a.contactList=e.payload.$values,a.tableData.total=e.payload.$values.length,a.loading=!1}).addCase(s.pending,a=>{a.loading=!0}).addCase(s.rejected,(a,e)=>{a.contactList=[],a.loading=!1}).addCase(C.fulfilled,(a,e)=>{a.accountList=e.payload.$values}).addCase(n.fulfilled,(a,e)=>{a.contact=e.payload,a.loading=!1}).addCase(n.pending,a=>{a.loading=!0})}}),{setTableData:L,setFilterData:R,toggleDeleteConfirmation:$,setSelectedRowData:h}=l.actions,m=l.reducer,T=d({data:m}),v=g;export{s as a,n as b,R as c,C as g,T as r,h as s,$ as t,v as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,l as be}from"./vendor-mui-98daa63f.js";import{A as F}from"./AdaptableCard-3d1e1f96.js";import{P as De}from"./PageBreadcrumb-cf54a6e9.js";import{r as t}from"./vendor-react-ece1c85f.js";import{u as R,s as ye,r as ne,t as O,d as Ue,g as oe,a as Pe}from"./index-d221d69e.js";import{k as q,a0 as Fe,c6 as Ne,r as Ae,B as U,a_ as Re,D as le,E as ce,F as de,H as Se,d as ke,ex as Ee,cL as Te,aB as Le,a5 as Me}from"./index-3b5ce20a.js";import{T as y,A as se}from"./actioncell-6b5ebd6c.js";import{C as ae}from"./tableV3-24eed052.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{a as Be}from"./index-a14e51de.js";import{D as I}from"./Drawer-4f97e662.js";import{F as Oe,a as N}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import{T as Ie,a as Ve,b as te}from"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{U as qe}from"./UserEdit-1f8208f3.js";import{U as _e}from"./UserNew-31fa258f.js";import{F as me,b as ue,d as A,c as $e,a as re,f as ze}from"./index.esm-b2d342b5.js";import{g as Ge}from"./index-fc9f8c4b.js";import{C as V}from"./ConfirmDialog-2838a642.js";import{i as Ke,j as We,k as He}from"./UserService-1b93ceb0.js";import{P as ie}from"./PasswordInput-333c82ca.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"./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"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./DoubleSidedImage-b4bd3915.js";import"./UserForm-e9b56aff.js";import"./index-b0ef7ac3.js";import"./StickyFooter-3e569b80.js";import"./index-0fd6e996.js";import"./AccountServices-f68f471d.js";import"./ContactService-8afcaeb7.js";import"./index-985cf3f6.js";import"./index-0b08ce18.js";import"./strongPassword-6bc8786f.js";import"./validationPatterns-77446c46.js";import"./RoleService-2f9ed883.js";import"./index-88c52b97.js";const{DatePickerRange:Qe}=Be,pe=t.forwardRef(({onSubmitComplete:r},l)=>{const p=q(),c=R(o=>o.users.data.filterData),[n,i]=t.useState(c.dateRange),m=R(o=>{var x,g;return(((g=(x=o.users)==null?void 0:x.data)==null?void 0:g.roleList)??[]).map(u=>({value:u.id,label:u.name}))}),C=o=>{r==null||r(),p(ye(o))},S=o=>{i(o)},k=()=>{const o=Ge({});p(o)};return t.useEffect(()=>{k()},[]),e.jsx(me,{enableReinitialize:!0,innerRef:l,initialValues:{...c},onSubmit:o=>{C(o)},children:({values:o,touched:b,errors:x})=>e.jsx(ue,{children:e.jsxs(Oe,{children:[e.jsxs(N,{invalid:x.searchText&&b.searchText,errorMessage:x.searchText,children:[e.jsx("h6",{className:"mb-4",children:"Included text"}),e.jsx(A,{type:"text",autoComplete:"off",name:"searchText",placeholder:"Keyword",component:Fe,prefix:e.jsx(Ne,{className:"text-lg"})})]}),e.jsxs(N,{invalid:x.role&&b.role,errorMessage:x.role,children:[e.jsx("h6",{className:"mb-4",children:"Filter By Role"}),e.jsx(A,{name:"role",children:({field:g,form:u})=>e.jsx(e.Fragment,{children:e.jsx(Ae,{options:m,field:g,form:u,name:"role",onChange:h=>{u.setFieldValue(g.name,h)}})})})]}),e.jsxs(N,{errorMessage:x.dateRange,children:[e.jsx("h6",{className:"mb-4",children:"Filter By Date Range"}),e.jsx(A,{name:"dateRange",children:({field:g,form:u})=>e.jsx(e.Fragment,{children:e.jsx(Qe,{field:g,name:"dateRange",value:n,form:u,placeholder:"Select dates range",onChange:h=>{h[0]&&u.setFieldValue("fromDate",h[0].toDateString()),h[1]&&u.setFieldValue("toDate",h[1].toDateString()),u.setFieldValue("dateRange",h),S(h)}})})})]})]})})})}),Je=({onSaveClick:r,onCancel:l})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(U,{size:"sm",className:"mr-2",onClick:l,children:"Cancel"}),e.jsx(U,{size:"sm",variant:"solid",onClick:r,children:"Query"})]}),Xe=r=>{const l=t.useRef(null),[p,c]=t.useState(!1),n=()=>{c(!0)},i=()=>{var C;c(!1),(C=r.onClose)==null||C.call(r)},m=()=>{var C;(C=l.current)==null||C.submitForm()};return t.useEffect(()=>{r.isOpen&&c(!0)},[r.isOpen]),e.jsxs(e.Fragment,{children:[e.jsx(U,{size:"sm",className:"mr-2",icon:e.jsx(Re,{}),onClick:n,children:"Filter"}),e.jsx(I,{title:"Filter",isOpen:p,footer:e.jsx(Je,{onCancel:i,onSaveClick:m}),onClose:i,onRequestClose:i,children:e.jsx(pe,{ref:l,onSubmitComplete:i})})]})};pe.displayName="FilterForm";le("users",ne);const Ye=()=>{const r=q(),{deleteConfirmation:l,selectedUser:p}=R(i=>i.users.data),c=()=>{r(O(!1))},n=async()=>{r(O(!1)),await Ue(p)&&(r(oe({isActive:!0})),ce.push(e.jsx(de,{title:"Archive",type:"success",duration:2500,children:"User Successfully Archived"}),{placement:"top-center"}))};return e.jsx(V,{isOpen:l,type:"danger",title:"Archive User",confirmButtonColor:"red-600",onClose:c,onRequestClose:c,onCancel:c,onConfirm:n,children:e.jsx("p",{children:"Are you sure you want to Archive this user? All records related to this user will be Archived as well."})})},Ze=$e().shape({password:re().required("Password is required"),confirmPassword:re().oneOf([ze("password")],"Passwords must match").required("Confirm Password is required")}),es=({isOpen:r,onClose:l,onSubmit:p,loading:c})=>e.jsx(Se,{isOpen:r,onClose:l,contentClassName:"pb-0 px-0",className:"my-4",children:e.jsxs(e.Fragment,{children:[e.jsx("h4",{className:"px-6",children:"Change Password"}),e.jsx(me,{initialValues:{password:"",confirmPassword:""},validationSchema:Ze,onSubmit:n=>{p(n)},children:({errors:n,touched:i})=>e.jsxs(ue,{className:"px-6 pb-6 pt-4",children:[e.jsx(N,{label:"Password",invalid:!!n.password&&i.password,errorMessage:n.password,children:e.jsx(A,{type:"password",autoComplete:"new-password",name:"password",placeholder:"Password",component:ie,showPasswordStrength:!0,errors:n,touched:i})}),e.jsx(N,{label:"Confirm Password",invalid:!!n.confirmPassword&&i.confirmPassword,errorMessage:n.confirmPassword,children:e.jsx(A,{type:"password",autoComplete:"new-password",name:"confirmPassword",placeholder:"Confirm Password",component:ie,showPasswordStrength:!0,errors:n,touched:i})}),e.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[e.jsx(U,{type:"button",onClick:l,children:"Cancel"}),e.jsx(U,{type:"submit",loading:c,variant:"solid",children:"Update Password"})]})]})})]})});le("users",ne);const ss="Users",as={isDelete:!1,isEdit:!1,isManage:!1,isView:!1},ts=({accountId:r=null})=>{const l=q(),{loading:p,filterData:c,usersList:n}=R(s=>s.users.data),i=R(s=>{var a;return((a=s.auth.session)==null?void 0:a.permission)||[]}),[m,C]=t.useState("active-users"),[S,k]=t.useState(!1),[o,b]=t.useState(""),[x,g]=t.useState(!1),[u,h]=t.useState(!1),[j,D]=t.useState(null),[he,M]=t.useState(!1),[fe,_]=t.useState(!1),f=t.useMemo(()=>(i==null?void 0:i.find(s=>(s==null?void 0:s.defaultMenuName)===ss))??as,[i]),$=t.useMemo(()=>({edit:f.isEdit,archive:f.isDelete,view:!1,loginAsUser:!0,resetPassword:f.isEdit,changePassword:f.isEdit}),[f]),E=()=>{l(oe({isActive:m==="active-users"}))};t.useEffect(()=>{E(),b("")},[c,m]);const w=(s,a,d)=>{ce.push(e.jsx(de,{title:a,type:s,duration:2500,children:d}),{placement:"top-center"})},z=async({action:s,successMessage:a,errorMessage:d,onClose:v})=>{try{const ve=await s();v==null||v(),ve?w("success",a,`User Successfully ${a}`):w("danger","Error",d)}catch{w("danger","Error","Something went wrong")}finally{E()}},G=()=>k(!0),P=()=>k(!1),K=s=>{G(),b(s.id)},xe=()=>{G(),b("")},W=s=>{l(O(!0)),l(Pe(s.id))},ge=()=>{P(),E()},H=async s=>{var a;try{const d=await Le({userId:s});d.success&&window.open(`${{}.VITE_CUSTOMER_PORTAL_URL}/loginAsUser/${(a=d==null?void 0:d.data)==null?void 0:a.token}`,"_blank","noreferrer")}catch{w("danger","Error","Failed")}},Q=async s=>{var a,d;try{(await Me(s==null?void 0:s.email)).success?(D(null),w("success","Password Reset","Password Reset link sent to user email")):w("danger","Error","Failed")}catch(v){w("danger","Error",((d=(a=v.response)==null?void 0:a.data)==null?void 0:d.message)||"Something went wrong")}},je=async s=>{var a,d;try{_(!0),(await Ke(j==null?void 0:j.id,{password:btoa(s==null?void 0:s.password)})).success?(M(!1),D(null),w("success","Password Update","The password has been updated successfully.")):w("danger","Password Update","Unable to update the password. Please try again.")}catch(v){w("danger","Password Update",((d=(a=v.response)==null?void 0:a.data)==null?void 0:d.message)||"An unexpected error occurred while updating the password.")}finally{_(!1)}},J=t.useCallback((s,a)=>{switch(a){case y.edit:K(s);break;case y.delete:W(s);break;case y.loginAsUser:H(s.id);break;case y.resetPassword:Q(s);break;case y.changePassword:D(s),M(!0);break}},[K,W,H,Q]),X=t.useCallback((s,a)=>{a===y.unarchive?(D(s),g(!0)):a===y.delete&&(D(s),h(!0))},[]),T=()=>{g(!1),D(null)},L=()=>{h(!1),D(null)},we=()=>{z({action:()=>We(j==null?void 0:j.id),successMessage:"Unarchived",errorMessage:"Failed to unarchive user",onClose:T})},Ce=()=>{z({action:()=>He(j==null?void 0:j.id),successMessage:"Deleted",errorMessage:"Failed to delete user",onClose:L})},Y=t.useMemo(()=>[{dataField:"Action",caption:"Action",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:s=>e.jsx("div",{id:"mAction","data-cname":"Action",children:m==="archived-users"?e.jsx(se,{row:s==null?void 0:s.data,actions:{edit:!1,delete:f.isDelete,unarchive:f.isDelete,view:!1},buttonClick:X}):e.jsx(se,{row:s==null?void 0:s.data,actions:$,buttonClick:J})})},{dataField:"firstName",caption:"First Name",cellRender:s=>e.jsx("div",{"data-cname":"First Name",children:s.data.firstName})},{dataField:"lastName",caption:"Last Name",cellRender:s=>e.jsx("div",{"data-cname":"Last Name",children:s.data.lastName})},{dataField:"email",caption:"Email",cellRender:s=>e.jsx("div",{"data-cname":"Email",children:s.data.email})},{dataField:"phoneNumber",caption:"Phone No",cellRender:s=>e.jsx("div",{"data-cname":"Phone No",children:s.data.phoneNumber})},{dataField:"role",caption:"Role",cellRender:s=>e.jsx("div",{"data-cname":"Role",children:s.data.role})},{dataField:"loginType",caption:"LoginType",cellRender:s=>e.jsx("div",{"data-cname":"Login Type",children:s.data.loginType})},{dataField:"createdByName",caption:"Created By",cellRender:s=>e.jsx("div",{"data-cname":"Created By",children:s.data.createdByName})},{dataField:"createdDate",caption:"Created Date",cellRender:s=>e.jsx("div",{"data-cname":"Created Date",children:s.data.createdDate})}],[m,$,f,J,X]),B=!!r,Z=B?"m-6 h-full py-1 px-1 bg-transparent":"m-6 h-full py-4 px-6 bg-transparent",ee=B?"p-0":"p-4";return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`topbar py-4 ${B?"pt-0":"px-6"} border-gray-200 border-b dark:bg-[#292f3c] dark:text-white`,children:[e.jsx(De,{items:[{label:"Settings"},{label:"Users"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Users"}),(f==null?void 0:f.isEdit)&&e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(Xe,{}),m==="active-users"&&e.jsx(U,{onClick:xe,block:!0,variant:"solid",size:"sm",icon:e.jsx(ke,{}),children:"Add User"}),!o&&e.jsx(I,{title:"Add User",isOpen:S,onClose:P,portalClassName:"w30 prevent-overflow",children:e.jsx(_e,{footerWidth:"w30",onClose:P,onAddNew:ge})})]})]})]}),e.jsx(F,{className:"pl-4 mx-6",children:e.jsx(Ie,{value:m,onChange:s=>C(s),children:e.jsxs(Ve,{children:[e.jsx(te,{icon:e.jsx(Ee,{}),value:"active-users",children:"Active"}),e.jsx(te,{icon:e.jsx(Te,{}),value:"archived-users",children:"Archived"})]})})}),p&&e.jsx(be,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),m==="active-users"&&e.jsx(F,{className:Z,children:e.jsx(F,{className:ee,children:e.jsx(ae,{tableName:"UserList",className:"pt-2",dataSource:n||[],height:"calc(100vh - 400px)",columns:Y,keyExpr:"id",stateStorageKey:"user-list",isLoading:p})})}),m==="archived-users"&&e.jsx(F,{className:Z,children:e.jsx(F,{className:ee,children:e.jsx(ae,{tableName:"archived-userList",className:"pt-2",dataSource:n||[],height:"calc(100vh - 400px)",columns:Y,keyExpr:"id",stateStorageKey:"archived-user"})})}),o&&e.jsx(I,{title:"Edit User",isOpen:S,onClose:P,portalClassName:"w30",children:e.jsx(qe,{footerWidth:"w30",userId:o,onDrawerClose:P,fetchData:E})}),e.jsx(Ye,{}),e.jsx(V,{isOpen:x,type:"danger",title:"Unarchive User",confirmButtonColor:"red-600",onClose:T,onRequestClose:T,onCancel:T,onConfirm:we,children:e.jsx("p",{children:"Are you sure you want to Unarchive this user? All records related to this user will be Unarchived as well."})}),e.jsx(V,{isOpen:u,type:"danger",title:"Delete User",confirmButtonColor:"red-600",onClose:L,onRequestClose:L,onCancel:L,onConfirm:Ce,children:e.jsx("p",{children:"Are you sure you want to delete this user? All records related to this user will be deleted as well."})}),e.jsx(es,{isOpen:he,onClose:()=>M(!1),userId:j,loading:fe,onSubmit:je})]})},ea=ts;export{ea as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{U as o}from"./UserNew-31fa258f.js";import"./vendor-mui-98daa63f.js";import"./vendor-react-ece1c85f.js";import"./UserForm-e9b56aff.js";import"./FormContainer-9a52b9e8.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";import"./index-b0ef7ac3.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./StickyFooter-3e569b80.js";import"./ConfirmDialog-2838a642.js";import"./index.esm-b2d342b5.js";import"./AdaptableCard-3d1e1f96.js";import"./index-fc9f8c4b.js";import"./RoleService-2f9ed883.js";import"./PasswordInput-333c82ca.js";import"./index-88c52b97.js";import"./index-0fd6e996.js";import"./AccountServices-f68f471d.js";import"./ContactService-8afcaeb7.js";import"./index-985cf3f6.js";import"./index-0b08ce18.js";import"./strongPassword-6bc8786f.js";import"./validationPatterns-77446c46.js";import"./UserService-1b93ceb0.js";export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./vendor-mui-98daa63f.js";import{r as R,f as y}from"./vendor-react-ece1c85f.js";import{F as N,a as p}from"./FormContainer-9a52b9e8.js";import{B as w,a6 as A}from"./index-3b5ce20a.js";import{A as I}from"./Alert-59d09a99.js";import{P as f}from"./PasswordInput-333c82ca.js";import{A as M}from"./ActionLink-9db8b1c2.js";import{u as B}from"./useTimeOutMessage-e4eaa9f2.js";import{c as E,f as T,F as $,b as q,d as h}from"./index.esm-b2d342b5.js";import{p as u}from"./strongPassword-6bc8786f.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"./index-88c52b97.js";const L=E().shape({password:u.required("Enter password"),confirmPassword:u.required("Confirm password").oneOf([T("password"),null],"Passwords do not match")}),O=x=>{const{disableSubmit:j=!1,className:P,signInUrl:g="/sign-in"}=x,[n,b]=R.useState(!1),[i,v]=B(),C=y(),F=async(o,e)=>{var m,c,l;const r=window.location.search,d=(m=new URLSearchParams(r).get("passwordToken"))==null?void 0:m.toString();let{password:t}=o;t=btoa(t);const k={password:t,resetToken:d||""};e(!0);try{(await A(k)).success&&(e(!1),b(!0))}catch(a){v(((l=(c=a==null?void 0:a.response)==null?void 0:c.data)==null?void 0:l.message)||a.toString()),e(!1)}},S=()=>{C("/sign-in")};return s.jsxs("div",{className:P,children:[s.jsx("div",{className:"mb-6",children:n?s.jsxs(s.Fragment,{children:[s.jsx("h3",{className:"mb-1",children:"Reset done"}),s.jsx("p",{children:"Your password has been successfully reset"})]}):s.jsxs(s.Fragment,{children:[s.jsx("h3",{className:"mb-1",children:"Set new password"}),s.jsx("p",{children:"Your new password must different to previous password"})]})}),i&&s.jsx(I,{showIcon:!0,className:"mb-4",type:"danger",children:i}),s.jsx($,{initialValues:{password:"",confirmPassword:""},validationSchema:L,onSubmit:(o,{setSubmitting:e})=>{j?e(!1):F(o,e)},children:({touched:o,errors:e,isSubmitting:r})=>s.jsx(q,{children:s.jsxs(N,{children:[n?s.jsx(w,{block:!0,variant:"solid",type:"button",onClick:S,children:"Continue"}):s.jsxs(s.Fragment,{children:[s.jsx(p,{label:"Password",invalid:e.password&&o.password,errorMessage:e.password,children:s.jsx(h,{autoComplete:"off",name:"password",placeholder:"Password",component:f,showPasswordStrength:!0,touched:o,errors:e})}),s.jsx(p,{label:"Confirm Password",invalid:e.confirmPassword&&o.confirmPassword,errorMessage:e.confirmPassword,children:s.jsx(h,{autoComplete:"off",name:"confirmPassword",placeholder:"Confirm Password",component:f,showPasswordStrength:!0,touched:o,errors:e})}),s.jsx(w,{block:!0,loading:r,variant:"solid",type:"submit",children:r?"Submitting...":"Submit"})]}),s.jsxs("div",{className:"mt-4 text-center",children:[s.jsx("span",{children:"Back to "}),s.jsx(M,{to:g,children:"Sign in"})]})]})})})]})},U=()=>s.jsx(O,{disableSubmit:!1}),ts=U;export{ts as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as t}from"./RoleEdit-a076ea85.js";import"./vendor-mui-98daa63f.js";import"./vendor-react-ece1c85f.js";import"./index-3b5ce20a.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./DoubleSidedImage-b4bd3915.js";import"./RoleService-2f9ed883.js";import"./RoleForm-47691f91.js";import"./FormContainer-9a52b9e8.js";import"./index-b0ef7ac3.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./StickyFooter-3e569b80.js";import"./ConfirmDialog-2838a642.js";import"./index.esm-b2d342b5.js";import"./AdaptableCard-3d1e1f96.js";import"./index-0b08ce18.js";import"./validationPatterns-77446c46.js";export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as
|
|
1
|
+
import{b as d,c as u,a as g}from"./vendor-redux-a1f00e6b.js";import{dh as o,di as n,_ as y}from"./index-3b5ce20a.js";async function L(a){return(await o.apiV10SupportCategoryAddCategoryPost(a)).data}async function S(){return(await o.apiV10SupportCategoryGetCategoryPost()).data}async function b(a,e){return(await o.apiV10SupportCategoryUpdateCategoryIdPost(a,e)).data}async function I(a){return(await o.apiV10SupportCategoryDeleteCategoryIdPost(a)).data}async function C(a){return(await n.apiV10AdminSupportTicketsGet(void 0,a==null?void 0:a.registrationDate,a==null?void 0:a.status,a==null?void 0:a.company,1,1e3)).data}async function D(a){return(await n.apiV10AdminSupportTicketsTicketIdGet(a)).data}async function R(a,e,t,s){return(await n.apiV10AdminSupportTicketsTicketIdMessagesPost(a,t,e,s)).data}async function V(a,e){return(await n.apiV10AdminSupportTicketsTicketIdUpdateStatusPost(a,e)).data}const i="SupportData",r=d(`${i}/getAllTicketList`,async a=>(await C(a)).data),c=d(i+"/getTicketDetails",async a=>(await D(a.id)).data),p=d(i+"/getAllSupportCategories",async()=>(await S()).data),k={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},f={loading:!1,deleteConfirmation:!1,selectedRowData:"",detailsLoading:!1,tableData:k,filterData:{name:"",category:["bags","cloths","devices","shoes","watches"],status:[0,1,2],productStatus:0},ticketList:[],ticketDetails:{},categoryList:[]},l=u({name:`${i}`,initialState:f,reducers:{setTableData:(a,e)=>{a.tableData=e.payload},setFilterData:(a,e)=>{a.filterData=e.payload},toggleDeleteConfirmation:(a,e)=>{a.deleteConfirmation=e.payload},setSelectedRowData:(a,e)=>{a.selectedRowData=e.payload}},extraReducers:a=>{a.addCase(r.fulfilled,(e,t)=>{var s;e.ticketList=(s=t.payload.items)==null?void 0:s.$values,e.loading=!1}).addCase(r.pending,e=>{e.loading=!0}).addCase(r.rejected,e=>{e.loading=!1}).addCase(c.fulfilled,(e,t)=>{e.ticketDetails=t.payload,e.detailsLoading=!1}).addCase(c.pending,e=>{e.detailsLoading=!1}).addCase(p.fulfilled,(e,t)=>{var s;e.categoryList=(s=t.payload.finalResults)==null?void 0:s.$values,e.loading=!1}).addCase(p.pending,e=>{e.loading=!0}).addCase(p.rejected,e=>{e.loading=!1})}}),{setTableData:h,setFilterData:v,toggleDeleteConfirmation:G,setSelectedRowData:P}=l.actions,T=l.reducer,U=g({data:T}),$=y;export{S as a,c as b,R as c,V as d,L as e,b as f,r as g,p as h,I as i,U as r,P as s,$ as u};
|