@objectstack/console 17.2.0 → 17.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +698 -0
- package/README.md +26 -10
- package/dist/.objectstack-injection.json +2 -2
- package/dist/.objectui-sha +1 -1
- package/dist/assets/ActionResultDialog-Bsr2GS71.js +9 -0
- package/dist/assets/{AiPendingActionsPage-CyG11hX9.js → AiPendingActionsPage-DB-UVcdM.js} +1 -1
- package/dist/assets/ApiConsolePage-Bzqo2owc.js +1 -0
- package/dist/assets/{AppDocsIndex-BXkNskk1.js → AppDocsIndex-KhVqdZ-P.js} +1 -1
- package/dist/assets/AppManagementPage-CsZ0LMQn.js +1 -0
- package/dist/assets/ApprovalsInboxPage-D_LOnhJ7.js +1 -0
- package/dist/assets/{AuditLogPage-BZZ6tzHu.js → AuditLogPage-B9eqwuzl.js} +1 -1
- package/dist/assets/ComponentNavView-DeokLfkW.js +1 -0
- package/dist/assets/CreateViewDialog-BMdQ4ZYy.js +1 -0
- package/dist/assets/DashboardView-DHZboRi8.js +1 -0
- package/dist/assets/{DeveloperHubPage-KEpKc45V.js → DeveloperHubPage-C_VYirN0.js} +1 -1
- package/dist/assets/DocPage-_9x-3Dbi.js +1 -0
- package/dist/assets/{DocShell-DMJHUgE5.js → DocShell-D4dSPfBz.js} +1 -1
- package/dist/assets/{DocsIndex-Bb5OtPb3.js → DocsIndex-CJVRa_hE.js} +1 -1
- package/dist/assets/{DocsLayout-CoIVTMH_.js → DocsLayout-C-tYgUZv.js} +1 -1
- package/dist/assets/{DocsSlug-BARWHmXg.js → DocsSlug-DmyGpfEy.js} +1 -1
- package/dist/assets/ExpressionProvider-B6z09kM6.js +1 -0
- package/dist/assets/FlowRunsPage-OjGJi-JU.js +1 -0
- package/dist/assets/{IntegrationsPage-DTXA-Nne.js → IntegrationsPage-CrDMDe62.js} +2 -2
- package/dist/assets/InterfaceListPage-P3y6hqTX.js +1 -0
- package/dist/assets/MarketplaceInstalledPage-CQek7WnV.js +1 -0
- package/dist/assets/MarketplacePackagePage-DL2ivKSc.js +4 -0
- package/dist/assets/MarketplacePage-B-6EokyB.js +1 -0
- package/dist/assets/MetadataInspector-IQGUoLyp.js +1 -0
- package/dist/assets/ObjectDataPage-Bmc3RQhM.js +1 -0
- package/dist/assets/PageView-DzUZqB_h.js +1 -0
- package/dist/assets/ProfilePage-NklCqPxc.js +1 -0
- package/dist/assets/PublicFormsPage-CItIvcLQ.js +1 -0
- package/dist/assets/RecordDetailView-XWxuegfV.js +3 -0
- package/dist/assets/RecordFormPage-B-yrhs7J.js +1 -0
- package/dist/assets/ReportDefaultInspector-D5Kro5_t.js +1 -0
- package/dist/assets/ReportView-COpZ8PQT.js +2 -0
- package/dist/assets/RuntimeDraftBar-CSVtuByp.js +1 -0
- package/dist/assets/SchemaForm-DIsxxOZF.js +3 -0
- package/dist/assets/SearchResultsPage-B2r6kgni.js +1 -0
- package/dist/assets/SettingsHub-DQz2HDtZ.js +1 -0
- package/dist/assets/SettingsView-BfOEalDW.js +1 -0
- package/dist/assets/SkeletonDetail-DMOa5zcl.js +1 -0
- package/dist/assets/SystemHubPage-DM2VRSIP.js +1 -0
- package/dist/assets/{abnfDiagram-N423BO3Z-DfpQlDUF.js → abnfDiagram-VCTEODGH-DaPlU6Hz.js} +1 -1
- package/dist/assets/app-shell-eager-leaves-wjbiJgVZ.js +1 -0
- package/dist/assets/{utils-CJ4UwXMF.js → appRoute-DEVGXLLH.js} +1 -1
- package/dist/assets/architecture-7GRP2DOG-kzM7RUjO.js +1 -0
- package/dist/assets/architectureDiagram-5GKGNRK7-Cq014PwG.js +36 -0
- package/dist/assets/blockDiagram-OSKFZWR5-vtlcoeZc.js +129 -0
- package/dist/assets/c4Diagram-7LVT6UL2-BrdwRG2M.js +38 -0
- package/dist/assets/channel-D2IgUFnY.js +1 -0
- package/dist/assets/{chunk-U6XO7XAA-D-dXvZaW.js → chunk-2ZTRR5NV-DXmA5XXf.js} +1 -1
- package/dist/assets/chunk-3NF5O7KM-CjWAf_Jo.js +168 -0
- package/dist/assets/{chunk-YOTPTUD7-CDtXQZ13.js → chunk-3Z5EZCMW-D3OlaP15.js} +1 -1
- package/dist/assets/chunk-4HAMMTFA-BtV_msXT.js +62 -0
- package/dist/assets/{chunk-BIQX33UG-DMScvo0C.js → chunk-5V3GS4D5-sE73jHoi.js} +1 -1
- package/dist/assets/{chunk-MOZMSUNE-DG70Besp.js → chunk-6AZGARVD-dsTIs5yl.js} +1 -1
- package/dist/assets/{chunk-5JV3BV7I-BrKM6vC-.js → chunk-6EIED4P4-BB4xaK3K.js} +1 -1
- package/dist/assets/{chunk-R7FJI6CG-DsJHM8am.js → chunk-6K3QC6MW-DaG1LefG.js} +1 -1
- package/dist/assets/{chunk-OSBZ3O6U-Dch_xyhf.js → chunk-6TQVIW2G-DL8WEcT0.js} +1 -1
- package/dist/assets/{chunk-JG7HCLWE-lCTbN-f1.js → chunk-747NJXEK-Bdie6H1T.js} +1 -1
- package/dist/assets/chunk-75Z2AOVW-DdRL9yNr.js +2 -0
- package/dist/assets/chunk-CLGD4ZFX-De9kMAXh.js +1 -0
- package/dist/assets/chunk-DU6HZSFF-DqjylQO-.js +127 -0
- package/dist/assets/chunk-F27PBJKO-tEB_K-iD.js +1 -0
- package/dist/assets/{chunk-KEIR6QF5-ydf36Hye.js → chunk-FOHPRMQF-C65HoZVt.js} +2 -2
- package/dist/assets/chunk-GMAD6QVW-BMzd_HHM.js +72 -0
- package/dist/assets/chunk-GVQU2GXP-B1p1nHC0.js +1 -0
- package/dist/assets/chunk-H2I77ZZE-ioXC4dHO.js +1 -0
- package/dist/assets/{chunk-GF5L2VYU-Dgjjn2FR.js → chunk-HLEWEB6X-zZ3ZMup3.js} +1 -1
- package/dist/assets/{chunk-QBLGF6JB-CzQYydMJ.js → chunk-I5DQTOEV-Cz6Y6T9y.js} +1 -1
- package/dist/assets/{chunk-5FCAYU7R-BuOxxvKk.js → chunk-ICYGCRZG-DdtFYQ2l.js} +1 -1
- package/dist/assets/{chunk-CQNSW5MT-CCth14ZS.js → chunk-IH6LHLGP-DybuHD8B.js} +1 -1
- package/dist/assets/{chunk-CYSBUYHQ-DIigEFGo.js → chunk-KI3K4JFJ-CB_CI00L.js} +1 -1
- package/dist/assets/chunk-L3NEJ4N5-DePXufTQ.js +1 -0
- package/dist/assets/chunk-LNGE3PJU-DWpGwHrW.js +34 -0
- package/dist/assets/chunk-LQGUR6SS-BUWUp_dz.js +1 -0
- package/dist/assets/chunk-OSK3NFVY-L7nTUJKT.js +10 -0
- package/dist/assets/{chunk-5TONJI2A-Bdh0MHqz.js → chunk-OUJLGHUK-TbeyE6CA.js} +1 -1
- package/dist/assets/chunk-P2QGCYS3-BG-i3rdI.js +1 -0
- package/dist/assets/{chunk-KBJHAD2P-DI4-lUt-.js → chunk-POPQ4Y6H-DLEB8EqK.js} +1 -1
- package/dist/assets/{chunk-4I5QYGJK-DlrWrdEa.js → chunk-PWAF6VOD-Be_prJjm.js} +1 -1
- package/dist/assets/{chunk-6Q2QTUOP-C2vvuHlO.js → chunk-SVP7TREG-BdJpxJji.js} +1 -1
- package/dist/assets/{chunk-EMLP6XTP-B4CrDa5p.js → chunk-UY3FDG6J-CDAtW6MI.js} +1 -1
- package/dist/assets/{chunk-5HE753X5-T_shrJhj.js → chunk-XHIXRSVI-CqmtoxrP.js} +1 -1
- package/dist/assets/chunk-XXDRQBXY-CEXsCcSu.js +1 -0
- package/dist/assets/{chunk-5RXB4S5H-JwFhdddt.js → chunk-ZLD2IHE6-BLIPZykR.js} +2 -2
- package/dist/assets/classDiagram-CYGNFDIV-BielDdJQ.js +1 -0
- package/dist/assets/classDiagram-v2-TLXNO2FR-BielDdJQ.js +1 -0
- package/dist/assets/componentRegistry-ByxoJqMW.js +1 -0
- package/dist/assets/cose-bilkent-JH36ORCC-CnLWv9XE.js +1 -0
- package/dist/assets/createDerive-DtfnFzGm.js +2 -0
- package/dist/assets/cynefin-OW5HDTMX-Dtvf1C60.js +1 -0
- package/dist/assets/{cynefinDiagram-MW4NZA55-B8MvpqXe.js → cynefinDiagram-5FMLGOSQ-Do1SZz4I.js} +1 -1
- package/dist/assets/cytoscape.esm-CGd-uY3x.js +321 -0
- package/dist/assets/dagre-OS7QT2EB-CqmZ9Y9O.js +4 -0
- package/dist/assets/dagre-PrKaheQc.js +1 -0
- package/dist/assets/data-adapter-1YRpH3h_.js +5 -0
- package/dist/assets/default-inspector-registry-CmSpNwTr.js +1 -0
- package/dist/assets/{diagram-7IWD3JNH-Xj62y5BF.js → diagram-S7CK7UJ4-CMpcDWop.js} +4 -4
- package/dist/assets/{diagram-UB23O5K3-bseKIzhv.js → diagram-UQ7AKVKN-DLK_4yej.js} +1 -1
- package/dist/assets/{diagram-B4RE2ZJO-mI-iOCGl.js → diagram-VSXAHHWV-MAILxw0S.js} +1 -1
- package/dist/assets/diagram-VX7I27RA-DGiXGVX7.js +24 -0
- package/dist/assets/{diagram-LBJQPF4R-BMTSoZch.js → diagram-Z3DM3KII-BywboeGI.js} +1 -1
- package/dist/assets/dist-B88JFSFg.js +5 -0
- package/dist/assets/{ebnfDiagram-BXEA7PRR-Bgo10FP1.js → ebnfDiagram-PWID7BFC-DdMLbnuP.js} +1 -1
- package/dist/assets/erDiagram-2YWLMYGG-O6raGx2P.js +99 -0
- package/dist/assets/eventmodeling-NTZA5JFV-CSwP2CpK.js +1 -0
- package/dist/assets/expressionUser-CASszt1z.js +1 -0
- package/dist/assets/flowDiagram-T62WH6J4-CkAxOnqU.js +1 -0
- package/dist/assets/framework-DFE_Mws9.js +36 -0
- package/dist/assets/{ganttDiagram-PKOTCBZU-CrmKcYGt.js → ganttDiagram-EL5Y4UJY-Dijdjc50.js} +2 -2
- package/dist/assets/{getIcon-1ZXs1v-a.js → getIcon-B4Pp7Q-0.js} +1 -1
- package/dist/assets/gitGraph-4MIJSDKK--Dc33TN5.js +1 -0
- package/dist/assets/gitGraphDiagram-WWUBYQGX-Cfl4OIGG.js +106 -0
- package/dist/assets/{highlighted-body-OFNGDK62-CnGKNo0r.js → highlighted-body-OFNGDK62-BlqGRgbU.js} +1 -1
- package/dist/assets/i18n-DGcOKnTh.js +9 -0
- package/dist/assets/i18n-locales-BBA090ve.js +31 -0
- package/dist/assets/index-C5Fu9Kda.css +2 -0
- package/dist/assets/index-ClPLLRzK.js +20 -0
- package/dist/assets/info-A6RAGUB7-DBa3mCQO.js +1 -0
- package/dist/assets/{infoDiagram-6WML65LV-BT0Q6MIs.js → infoDiagram-FKFFQAWI-oOVNWlVA.js} +1 -1
- package/dist/assets/infrastructure-B4zG1jNa.js +3 -0
- package/dist/assets/{ishikawaDiagram-WSZJBQD7-kvPjMvBP.js → ishikawaDiagram-5VMMS53U-BUfTfup1.js} +1 -1
- package/dist/assets/{journeyDiagram-NVQOT4AX-DhXy7wxt.js → journeyDiagram-EYS64GPL-4fyU8Ui9.js} +1 -1
- package/dist/assets/{kanban-definition-27J2QSJJ-CFDavpZY.js → kanban-definition-UXKFOSKX-qwquHo2y.js} +2 -2
- package/dist/assets/mermaid-GHXKKRXX-_UhQGe8N.js +1 -0
- package/dist/assets/{mermaid-parser.core-Dd2B8Ckv.js → mermaid-parser.core-DUt1FNlO.js} +1 -1
- package/dist/assets/mermaid.core-RfBGJVq5.js +10 -0
- package/dist/assets/metadata-admin-Bo-vWW2Z.js +9 -0
- package/dist/assets/{mindmap-definition-FAOFIHXS-ITGoV4nW.js → mindmap-definition-THT77NOG-cOVHgGB_.js} +1 -1
- package/dist/assets/nav-selection-Dzm_mA3C.js +1 -0
- package/dist/assets/packet-AYTQ26CC-CPP93DZD.js +1 -0
- package/dist/assets/{pegDiagram-VL7TDLO6-BoRu9yvl.js → pegDiagram-XKGWAZYB-DQikOuPL.js} +1 -1
- package/dist/assets/pie-WAS4IAKB-B-zzBvuc.js +1 -0
- package/dist/assets/{pieDiagram-7S7Q4E2Y-DVsM9krU.js → pieDiagram-E7YTZNPT-Cu9wPXiv.js} +3 -3
- package/dist/assets/plugin-calendar-DqlnPeWE.js +1 -0
- package/dist/assets/plugin-charts-hJ5C1pY-.js +7 -0
- package/dist/assets/plugin-chatbot-BeSLDg4N.js +122 -0
- package/dist/assets/plugin-dashboard-d1o52lHr.js +6 -0
- package/dist/assets/plugin-form-D8x_rH5w.js +1 -0
- package/dist/assets/plugin-gantt-B2GTMGPH.js +63 -0
- package/dist/assets/plugin-grid-DGXy_yQF.js +9 -0
- package/dist/assets/plugin-kanban-CVf6Nj3e.js +1 -0
- package/dist/assets/plugin-map-hkbw1bGS.js +1 -0
- package/dist/assets/{plugin-markdown-DNllWgPM.js → plugin-markdown-Bdb2UThR.js} +4 -4
- package/dist/assets/plugin-report-CelulaB7.js +59 -0
- package/dist/assets/plugin-timeline-DTcJ-hts.js +1 -0
- package/dist/assets/plugin-tree-Bk5vG9la.js +1 -0
- package/dist/assets/plugin-view-CKs41t7o.js +1 -0
- package/dist/assets/plugins-views-DZmsFOak.js +4 -0
- package/dist/assets/{quadrantDiagram-CIZ2JOQS-C4VzXHnp.js → quadrantDiagram-AXDQQJYC-DqTU6p89.js} +3 -3
- package/dist/assets/radar-RG4KPBEZ-DWmbpYEk.js +1 -0
- package/dist/assets/railroad-74A4TZTK-xJ7dMu2F.js +1 -0
- package/dist/assets/railroad-abnf-HS5TGJTU-Cw4KG_nE.js +1 -0
- package/dist/assets/railroad-ebnf-LZEXJU2U-C0cgrfTl.js +1 -0
- package/dist/assets/railroad-peg-WCYAUIDC-DOEGG9oQ.js +1 -0
- package/dist/assets/{railroadDiagram-AXF67PYL-DqZ3yKWv.js → railroadDiagram-O6MQD6OU-CHGgIBKb.js} +1 -1
- package/dist/assets/{requirementDiagram-LRYGKXZP-BeH0P3vD.js → requirementDiagram-IS5BZ75X-B20mHS5h.js} +2 -2
- package/dist/assets/{runtime-metadata-persistence-DTOJpVmd.js → runtime-metadata-persistence-DzS2YaNb.js} +1 -1
- package/dist/assets/{sankeyDiagram-W5VNT64P-Bu_tPh-A.js → sankeyDiagram-P5KCCOFB-oqGY91Cw.js} +3 -3
- package/dist/assets/{sequenceDiagram-SI44F4Z6-BWEuLn1a.js → sequenceDiagram-WJ2MYXX4-CVMm7Aid.js} +1 -1
- package/dist/assets/{src-CY2xhbXR.js → src-D7tZqf12.js} +1 -1
- package/dist/assets/src-DCXZnd2l.js +1 -0
- package/dist/assets/{src-DhAd4aY4.js → src-DEMdKbQy.js} +1 -1
- package/dist/assets/src-hcMLuWxG.js +17 -0
- package/dist/assets/stateDiagram-XQSTLZYL-3oM7IdVe.js +1 -0
- package/dist/assets/stateDiagram-v2-IH3M54BS-BznjPAgb.js +1 -0
- package/dist/assets/studioEntry-BUFsLXCL.js +1 -0
- package/dist/assets/submitRedirect-7ExeC4kw.js +1 -0
- package/dist/assets/swimlanes-V6O3JKXN-Djgbrkmh.js +1 -0
- package/dist/assets/swimlanesDiagram-JKAHXJPX-DHJJ3qZq.js +8 -0
- package/dist/assets/{timeline-definition-Z64GVDOM-BcUiJfLU.js → timeline-definition-24CTP7MA-k2lbfDvL.js} +1 -1
- package/dist/assets/treeView-Q6P3EWNA-BcWCBGcU.js +1 -0
- package/dist/assets/treemap-WGGIJYW6-DMTEJzXV.js +1 -0
- package/dist/assets/ui-components-CMHDBJEm.js +37 -0
- package/dist/assets/ui-layout-Jk_qY9Ni.js +1 -0
- package/dist/assets/use-book-data-CM73PGvc.js +1 -0
- package/dist/assets/useActionModal-D_iilsul.js +1 -0
- package/dist/assets/usePackageL10n-BfPqgsRL.js +1 -0
- package/dist/assets/useSettingsLabel-CW2sBbmj.js +1 -0
- package/dist/assets/utils-MjUhYVsx.js +1 -0
- package/dist/assets/vendor-charts-BBlPrtHS.js +67 -0
- package/dist/assets/vendor-i18n-CzBLXLJU.js +1 -0
- package/dist/assets/{vendor-markdown-C_Ip9E_I.js → vendor-markdown-BW_XFZ_b.js} +25 -25
- package/dist/assets/vendor-objectstack-BU0HrnMy.js +270 -0
- package/dist/assets/{vendor-zod-r9lyeyrU.js → vendor-zod-Bwe8XZZa.js} +3 -3
- package/dist/assets/{vennDiagram-T6HMQDX7-BKJsL5fS.js → vennDiagram-4TSXK5OY-zweM554s.js} +1 -1
- package/dist/assets/wardley-WFR3VGLG-BRyRizpT.js +1 -0
- package/dist/assets/{wardleyDiagram-T6FBY63Y-CZ0aMbYX.js → wardleyDiagram-VM6X3IG4-Dg9r6Ajz.js} +1 -1
- package/dist/assets/{xychartDiagram-ELKLHX3M-BpK2RmQ_.js → xychartDiagram-S5SC5T6Z-CraplxeN.js} +3 -3
- package/dist/eager-closure.json +184 -143
- package/dist/index.html +222 -6
- package/package.json +2 -2
- package/dist/assets/AdapterProvider-gULVLpjV.js +0 -3
- package/dist/assets/ApiConsolePage-DYuOp_W4.js +0 -1
- package/dist/assets/AppManagementPage-BvSxDdA_.js +0 -1
- package/dist/assets/ApprovalsInboxPage-oep3a-Ek.js +0 -1
- package/dist/assets/ComponentNavView-Cq4wkNUa.js +0 -1
- package/dist/assets/DashboardView-C23ZCS2S.js +0 -1
- package/dist/assets/DocPage-Y4rWCZ3E.js +0 -1
- package/dist/assets/ExpressionProvider-vGLngw8h.js +0 -1
- package/dist/assets/FlowRunsPage-BeGa9_ge.js +0 -1
- package/dist/assets/InterfaceListPage-BMvedZyV.js +0 -1
- package/dist/assets/ManagedByBadge-mKmG0hP7.js +0 -1
- package/dist/assets/MarketplaceAccessDenied-BBMyNu2w.js +0 -1
- package/dist/assets/MarketplaceInstalledPage-B4qrvb7w.js +0 -1
- package/dist/assets/MarketplacePackagePage-BuVfVeBj.js +0 -4
- package/dist/assets/MarketplacePage-Cmltk5nG.js +0 -1
- package/dist/assets/MetadataInspector-kVAu8vlh.js +0 -1
- package/dist/assets/MetadataProvider-DyFZSNqq.js +0 -1
- package/dist/assets/ObjectDataPage-BKHEYwXA.js +0 -1
- package/dist/assets/PageView-CTqS-VD9.js +0 -1
- package/dist/assets/ProfilePage-CBUxXn5a.js +0 -1
- package/dist/assets/PublicFormsPage-B8Dk8fky.js +0 -1
- package/dist/assets/RecordDetailView-BBNqsNy9.js +0 -11
- package/dist/assets/RecordFormPage-CeUmmc_n.js +0 -1
- package/dist/assets/ReportDefaultInspector-CRjDi2Er.js +0 -3
- package/dist/assets/ReportView-Cwi_Po4H.js +0 -2
- package/dist/assets/SearchResultsPage-Cg0oq2by.js +0 -1
- package/dist/assets/SettingsHub-B5_S9YgI.js +0 -1
- package/dist/assets/SettingsView-Csi1awf-.js +0 -1
- package/dist/assets/SystemHubPage-CnDri9oU.js +0 -1
- package/dist/assets/architecture-TIHT7OUA-B8Ln-u1a.js +0 -1
- package/dist/assets/architectureDiagram-T3A2C74G-Ej_4n3NG.js +0 -36
- package/dist/assets/blockDiagram-VBNYF7ZC-l_P_W7_Y.js +0 -132
- package/dist/assets/c4Diagram-5PPSVZJV-CE82HAlO.js +0 -10
- package/dist/assets/channel-DowAYf9b.js +0 -1
- package/dist/assets/chunk-2GRJ4B5K-D1if-ThW.js +0 -1
- package/dist/assets/chunk-3NCLNEKW-Z5ckM4mG.js +0 -1
- package/dist/assets/chunk-7BUUIJ7U-Bb538aSH.js +0 -1
- package/dist/assets/chunk-7Z6QIM7H-m6s_oalL.js +0 -10
- package/dist/assets/chunk-I66GZJ75-BsY3mBMx.js +0 -127
- package/dist/assets/chunk-J7OUQ5F2-Cl4FNR_k.js +0 -1
- package/dist/assets/chunk-JQJVKLGR-BApWxqMA.js +0 -156
- package/dist/assets/chunk-NSK5VX7P-BBTxIP6Z.js +0 -2
- package/dist/assets/chunk-QR6OTTB3-DJcD7xr-.js +0 -62
- package/dist/assets/chunk-RYQCIY6F-CnMsR_qh.js +0 -1
- package/dist/assets/chunk-UBXNYLIW-B7z1tp3V.js +0 -1
- package/dist/assets/chunk-W5SLKNZC-BnMc5i0B.js +0 -1
- package/dist/assets/chunk-WRU74C26-MrzCPX2E.js +0 -70
- package/dist/assets/chunk-XXDRQBXY-NKBlW2Dm.js +0 -1
- package/dist/assets/chunk-ZIRB5QZD-O39ZBUk3.js +0 -32
- package/dist/assets/classDiagram-JCYQIIEL-C4ADaKBz.js +0 -1
- package/dist/assets/classDiagram-v2-OCEON4UE-C4ADaKBz.js +0 -1
- package/dist/assets/cose-bilkent-JH36ORCC-XP-DnSP5.js +0 -1
- package/dist/assets/createDerive-B3AGnDaY.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-exAq6djZ.js +0 -1
- package/dist/assets/cytoscape.esm-B-NFISlW.js +0 -321
- package/dist/assets/dagre-Buvkdvvj.js +0 -1
- package/dist/assets/dagre-VZM6K2ZE-B5E8-xuM.js +0 -4
- package/dist/assets/diagram-Q27KOJAE-B98Knrnh.js +0 -24
- package/dist/assets/dist-Ck19TqqJ.js +0 -5
- package/dist/assets/erDiagram-JOGREHBK-BU4b8mUv.js +0 -85
- package/dist/assets/eventmodeling-45OFAUF4-DVTVIsGT.js +0 -1
- package/dist/assets/flowDiagram-UKHOOZJN-BDHHPApJ.js +0 -1
- package/dist/assets/framework-BwfIhdyz.js +0 -55
- package/dist/assets/gitGraph-TEB2WS4Q-DizXBl0d.js +0 -1
- package/dist/assets/gitGraphDiagram-DS77QQ5N-COu0mOui.js +0 -106
- package/dist/assets/i18n-rra-09wp.js +0 -9
- package/dist/assets/index-BLepsDd_.js +0 -19
- package/dist/assets/index-D26gl3rg.css +0 -2
- package/dist/assets/info-DKCQHKI2-CfAGND28.js +0 -1
- package/dist/assets/infrastructure-BCTDJsqi.js +0 -3
- package/dist/assets/map-BaFkSB1l.js +0 -1
- package/dist/assets/mermaid-GHXKKRXX-CR9PcY0X.js +0 -1
- package/dist/assets/mermaid.core-BwiBFu_S.js +0 -10
- package/dist/assets/metadata-admin-BE9_-F_f.js +0 -25
- package/dist/assets/packet-7NZHBO7P-DeymwuCa.js +0 -1
- package/dist/assets/pie-RZYD4A2V-C2S5u8nr.js +0 -1
- package/dist/assets/plugin-calendar-BfY9ZunQ.js +0 -1
- package/dist/assets/plugin-charts-CmWL7Og-.js +0 -7
- package/dist/assets/plugin-chatbot-mxoQfkdx.js +0 -120
- package/dist/assets/plugin-dashboard-CzbAW1Rz.js +0 -6
- package/dist/assets/plugin-form-ItAwTFz-.js +0 -1
- package/dist/assets/plugin-gantt-DF5W5xkN.js +0 -64
- package/dist/assets/plugin-grid-B42Photo.js +0 -9
- package/dist/assets/plugin-kanban-Dh3HIJIm.js +0 -1
- package/dist/assets/plugin-map-C1wSLqlB.js +0 -1
- package/dist/assets/plugin-report-yfOfZPQg.js +0 -59
- package/dist/assets/plugin-timeline-BpuaaqBd.js +0 -1
- package/dist/assets/plugin-tree-BrXE50se.js +0 -1
- package/dist/assets/plugin-view-Jc0rkk7A.js +0 -1
- package/dist/assets/plugins-views-cOiN-mPq.js +0 -4
- package/dist/assets/radar-I7S5WNFK-DzcfTC8k.js +0 -1
- package/dist/assets/railroad-3IZDKUUU-DT2-gzup.js +0 -1
- package/dist/assets/railroad-abnf-AHOZXSZD-BvCkhVdg.js +0 -1
- package/dist/assets/railroad-ebnf-EBAXGLYW-rvjxEE4k.js +0 -1
- package/dist/assets/railroad-peg-LSFZ7HO6-BIzZt1tD.js +0 -1
- package/dist/assets/skeletons-BwA1TSR2.js +0 -1
- package/dist/assets/src-BLbFBP_B.js +0 -1
- package/dist/assets/stateDiagram-OKZ733FA-Cp7aDYsZ.js +0 -1
- package/dist/assets/stateDiagram-v2-UEYNNEHI-DaTg8C5m.js +0 -1
- package/dist/assets/swimlanes-SLNWSIFB-wrx1JN6o.js +0 -1
- package/dist/assets/swimlanesDiagram-ULZ7WXOC-Bqz9GVuM.js +0 -8
- package/dist/assets/treeView-QDETBFTQ-DKZwqlNb.js +0 -1
- package/dist/assets/treemap-6X3UGDF4-Bqsldamv.js +0 -1
- package/dist/assets/ui-components-Dwq5utCl.js +0 -42
- package/dist/assets/ui-layout-DPFlQaQp.js +0 -1
- package/dist/assets/use-book-data-CZc8MJsb.js +0 -1
- package/dist/assets/useActionModal-DYiSBx1G.js +0 -1
- package/dist/assets/usePackageL10n-D91-102Q.js +0 -1
- package/dist/assets/useSettingsLabel-CeZ36S4g.js +0 -1
- package/dist/assets/vendor-charts-BEGSmcjR.js +0 -67
- package/dist/assets/vendor-i18n-Cpia2wlg.js +0 -1
- package/dist/assets/vendor-objectstack-B1R3ym-9.js +0 -264
- package/dist/assets/wardley-OPB4EBWU-C_U_bbc2.js +0 -1
- /package/dist/assets/{sizeCapture-X5ZJPWSS-B0uUizjq.js → sizeCapture-INFHLROL-B0uUizjq.js} +0 -0
package/dist/index.html
CHANGED
|
@@ -42,11 +42,33 @@
|
|
|
42
42
|
against that function — so a drift between the two spellings fails a test
|
|
43
43
|
rather than silently restoring the duplicate.
|
|
44
44
|
|
|
45
|
+
The ORIGIN is the other half of that contract (objectui#5660). Sharing
|
|
46
|
+
keys on the full URL, so the two callers must agree on the server origin
|
|
47
|
+
or they build two different keys, never find each other, and issue two
|
|
48
|
+
requests to two different servers. This script used to read
|
|
49
|
+
`window.__CONSOLE_SERVER_URL` — a global NOTHING in this repository ever
|
|
50
|
+
set — while every module-side consumer reads
|
|
51
|
+
`import.meta.env.VITE_SERVER_URL`. A dev pointing the console at a
|
|
52
|
+
separate server therefore got exactly that split, silently, because both
|
|
53
|
+
spellings collapse to '' in a same-origin production build, which is the
|
|
54
|
+
only shape the dedup above was ever measured in. Vite's HTML env
|
|
55
|
+
substitution resolves the SAME variable the modules read, so one value
|
|
56
|
+
reaches both callers.
|
|
57
|
+
|
|
45
58
|
Falls back gracefully on any error (non-blocking).
|
|
46
59
|
-->
|
|
47
60
|
<script>
|
|
48
61
|
(async function applyEarlyBranding() {
|
|
49
|
-
|
|
62
|
+
// Vite's HTML env substitution fills the token below with
|
|
63
|
+
// `import.meta.env.VITE_SERVER_URL` — the same value `src/main.tsx`
|
|
64
|
+
// hands `initRuntimeConfig()`. It substitutes only when the variable is
|
|
65
|
+
// SET and leaves the token verbatim when it is not (`htmlEnvHook`:
|
|
66
|
+
// `if (key in env) return env[key]; else return text`). Unset is the
|
|
67
|
+
// ordinary production case — Console SPA and tenant runtime share an
|
|
68
|
+
// origin — so an unsubstituted token MUST read as same-origin '' and
|
|
69
|
+
// never as a path segment. No origin can begin with '%'.
|
|
70
|
+
const injected = '';
|
|
71
|
+
const base = (injected.charAt(0) === '%' ? '' : injected).replace(/\/+$/, '');
|
|
50
72
|
const url = base + '/api/v1/runtime/config';
|
|
51
73
|
const init = { credentials: 'include', headers: { Accept: 'application/json' } };
|
|
52
74
|
// Must equal inflightGetKey(url, init) — see the comment above.
|
|
@@ -158,16 +180,210 @@
|
|
|
158
180
|
}
|
|
159
181
|
})();
|
|
160
182
|
</script>
|
|
161
|
-
|
|
183
|
+
<!--
|
|
184
|
+
BOOT SPLASH — the console's FIRST PAINT (objectui#2628).
|
|
185
|
+
|
|
186
|
+
Everything above this point is invisible: `<body>` held `<div id="root">`
|
|
187
|
+
and nothing else, so the browser had nothing to paint until the module
|
|
188
|
+
graph had downloaded, evaluated, and resolved the two network round trips
|
|
189
|
+
`src/main.tsx` awaits before `createRoot().render()`. Measured on this
|
|
190
|
+
repository's own production build (Playwright + CDP `Page.startScreencast`,
|
|
191
|
+
frames classified pixel-by-pixel, corroborated by the Paint Timing API):
|
|
192
|
+
|
|
193
|
+
localhost, no throttling 1224-2016 ms of PURE WHITE
|
|
194
|
+
20 Mbps / 80 ms RTT 2289-2297 ms
|
|
195
|
+
Fast 4G (4 Mbps / 70 ms) 5808-6167 ms
|
|
196
|
+
|
|
197
|
+
— 2.21 MB over 64 requests before one pixel of content. The card reported
|
|
198
|
+
3-6 s from staging; the Fast-4G column is that band.
|
|
199
|
+
|
|
200
|
+
WHY IT IS HERE AND NOT IN A COMPONENT. The gap being filled IS the load of
|
|
201
|
+
the JavaScript, so an indicator that ships inside that JavaScript cannot
|
|
202
|
+
paint during it — it becomes visible at exactly the moment it is no longer
|
|
203
|
+
needed. This markup is in the HTML document, so it paints from the parser,
|
|
204
|
+
before the first chunk is even requested. `LoadingScreen`
|
|
205
|
+
(`@object-ui/app-shell`) is NOT a second copy of this and must not be
|
|
206
|
+
confused with it: it renders AFTER React mounts and owns the init screen's
|
|
207
|
+
ten-language step copy. This one covers the window before that.
|
|
208
|
+
|
|
209
|
+
NO TEXT, deliberately. A string here could not be translated — the i18n
|
|
210
|
+
packs live in the bundle this is waiting for — so shipping copy would mean
|
|
211
|
+
shipping English into a ten-language product, and shipping the product
|
|
212
|
+
name would mean waiting for `GET /api/v1/runtime/config`. The mark is the
|
|
213
|
+
same gradient tile + pulsing halo `LoadingScreen` opens with, so the
|
|
214
|
+
handoff reads as the same screen filling in rather than two loaders. It is
|
|
215
|
+
`aria-hidden` for the same reason there is no text: it carries nothing a
|
|
216
|
+
screen reader could use, and `LoadingScreen` brings the accessible copy
|
|
217
|
+
with it a moment later.
|
|
218
|
+
|
|
219
|
+
The colours are the app's OWN canvas and accent tokens
|
|
220
|
+
(`apps/console/src/index.css`: `--background`, `--primary`), inlined
|
|
221
|
+
because that stylesheet is also in the bundle. That is what makes the
|
|
222
|
+
window non-white rather than merely non-empty: the first frame is already
|
|
223
|
+
the surface `LoadingScreen` then draws on.
|
|
224
|
+
-->
|
|
225
|
+
<style>
|
|
226
|
+
#boot-splash {
|
|
227
|
+
position: fixed;
|
|
228
|
+
inset: 0;
|
|
229
|
+
z-index: 2147483000;
|
|
230
|
+
display: flex;
|
|
231
|
+
align-items: center;
|
|
232
|
+
justify-content: center;
|
|
233
|
+
/* `--background`, light. */
|
|
234
|
+
background: hsl(240 24% 97%);
|
|
235
|
+
}
|
|
236
|
+
:root[data-boot-theme='dark'] #boot-splash {
|
|
237
|
+
/* `--background`, dark. */
|
|
238
|
+
background: hsl(240 6% 6%);
|
|
239
|
+
}
|
|
240
|
+
#boot-splash .boot-splash-mark {
|
|
241
|
+
position: relative;
|
|
242
|
+
width: 72px;
|
|
243
|
+
height: 72px;
|
|
244
|
+
}
|
|
245
|
+
/* `bg-primary/20 rounded-2xl blur-xl animate-pulse` */
|
|
246
|
+
#boot-splash .boot-splash-halo {
|
|
247
|
+
position: absolute;
|
|
248
|
+
inset: 0;
|
|
249
|
+
border-radius: 1rem;
|
|
250
|
+
background: hsl(211 100% 50% / 0.2);
|
|
251
|
+
filter: blur(24px);
|
|
252
|
+
animation: boot-splash-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
253
|
+
}
|
|
254
|
+
/* `bg-linear-to-br from-primary to-primary/80 p-4 rounded-2xl shadow-lg` */
|
|
255
|
+
#boot-splash .boot-splash-tile {
|
|
256
|
+
position: relative;
|
|
257
|
+
width: 72px;
|
|
258
|
+
height: 72px;
|
|
259
|
+
box-sizing: border-box;
|
|
260
|
+
padding: 16px;
|
|
261
|
+
border-radius: 1rem;
|
|
262
|
+
background-image: linear-gradient(
|
|
263
|
+
to bottom right,
|
|
264
|
+
hsl(211 100% 50%),
|
|
265
|
+
hsl(211 100% 50% / 0.8)
|
|
266
|
+
);
|
|
267
|
+
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
268
|
+
color: #fff;
|
|
269
|
+
}
|
|
270
|
+
:root[data-boot-theme='dark'] #boot-splash .boot-splash-halo {
|
|
271
|
+
background: hsl(211 100% 60% / 0.2);
|
|
272
|
+
}
|
|
273
|
+
:root[data-boot-theme='dark'] #boot-splash .boot-splash-tile {
|
|
274
|
+
background-image: linear-gradient(
|
|
275
|
+
to bottom right,
|
|
276
|
+
hsl(211 100% 60%),
|
|
277
|
+
hsl(211 100% 60% / 0.8)
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
#boot-splash svg {
|
|
281
|
+
display: block;
|
|
282
|
+
width: 40px;
|
|
283
|
+
height: 40px;
|
|
284
|
+
}
|
|
285
|
+
@keyframes boot-splash-pulse {
|
|
286
|
+
0%,
|
|
287
|
+
100% {
|
|
288
|
+
opacity: 1;
|
|
289
|
+
}
|
|
290
|
+
50% {
|
|
291
|
+
opacity: 0.4;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
/* Motion is the only moving part; without it the tile still paints, so
|
|
295
|
+
the window stays non-white for readers who ask for no animation. */
|
|
296
|
+
@media (prefers-reduced-motion: reduce) {
|
|
297
|
+
#boot-splash .boot-splash-halo {
|
|
298
|
+
animation: none;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
</style>
|
|
302
|
+
<!--
|
|
303
|
+
Theme + handoff for the splash above. A CLASSIC inline script for the same
|
|
304
|
+
reason the shim above is one: it must have run before the parser reaches
|
|
305
|
+
`<div id="boot-splash">`, so the very first painted frame already carries
|
|
306
|
+
the right canvas colour instead of flashing light and then correcting.
|
|
307
|
+
|
|
308
|
+
THEME. `ThemeProvider` (@object-ui/app-shell) stores the user's choice
|
|
309
|
+
under `vite-ui-theme` and defaults to following the OS; this reads the same
|
|
310
|
+
key and the same `prefers-color-scheme` so a dark-theme user never sees a
|
|
311
|
+
light frame. It writes `data-boot-theme` rather than the `light`/`dark`
|
|
312
|
+
CLASS that provider toggles, because those two must not collide: the
|
|
313
|
+
provider does `classList.remove('light','dark')` on mount and would be
|
|
314
|
+
undoing a decision it did not make. The attribute is removed with the
|
|
315
|
+
splash, so it exists only inside the boot window.
|
|
316
|
+
|
|
317
|
+
HANDOFF. The splash goes the moment React's first commit puts anything in
|
|
318
|
+
`#root` — not on a timer, and not after some fixed delay. A timer would
|
|
319
|
+
either uncover the white page again or sit on top of a rendered app. The
|
|
320
|
+
observer watches the document rather than `#root` because it runs from
|
|
321
|
+
`<head>`, before `#root` has been parsed. The mutation callback is a
|
|
322
|
+
microtask checkpoint on React's commit task, so removal lands in the same
|
|
323
|
+
frame the app first paints: no gap, and never two indicators at once.
|
|
324
|
+
|
|
325
|
+
If the bundle never evaluates at all, the splash stays up rather than
|
|
326
|
+
reverting to white. That is a deliberately unchanged failure MODE — a
|
|
327
|
+
boot that never mounts was a permanently blank page before this and is a
|
|
328
|
+
permanently pending one now — and it stays detectable: the
|
|
329
|
+
`#root`-content assertion in `e2e/console-rendering.spec.ts` reads the
|
|
330
|
+
React root, which this does not touch.
|
|
331
|
+
-->
|
|
332
|
+
<script>
|
|
333
|
+
(function installBootSplash() {
|
|
334
|
+
var stored = null;
|
|
335
|
+
try {
|
|
336
|
+
stored = localStorage.getItem('vite-ui-theme');
|
|
337
|
+
} catch (_) {
|
|
338
|
+
/* storage blocked — fall through to the OS preference */
|
|
339
|
+
}
|
|
340
|
+
var followsOs = !stored || stored === 'system' || stored === 'auto';
|
|
341
|
+
var prefersDark =
|
|
342
|
+
typeof matchMedia === 'function' &&
|
|
343
|
+
matchMedia('(prefers-color-scheme: dark)').matches;
|
|
344
|
+
var dark = stored === 'dark' || (followsOs && prefersDark);
|
|
345
|
+
document.documentElement.setAttribute('data-boot-theme', dark ? 'dark' : 'light');
|
|
346
|
+
|
|
347
|
+
if (typeof MutationObserver !== 'function') return;
|
|
348
|
+
var observer = new MutationObserver(function () {
|
|
349
|
+
var root = document.getElementById('root');
|
|
350
|
+
if (!root || !root.firstChild) return;
|
|
351
|
+
observer.disconnect();
|
|
352
|
+
var splash = document.getElementById('boot-splash');
|
|
353
|
+
if (splash && splash.parentNode) splash.parentNode.removeChild(splash);
|
|
354
|
+
document.documentElement.removeAttribute('data-boot-theme');
|
|
355
|
+
});
|
|
356
|
+
observer.observe(document.documentElement, { childList: true, subtree: true });
|
|
357
|
+
})();
|
|
358
|
+
</script>
|
|
359
|
+
<script type="module" crossorigin src="./assets/index-ClPLLRzK.js"></script>
|
|
162
360
|
<link rel="stylesheet" crossorigin href="./assets/ui-components-BL3SEdAz.css">
|
|
163
|
-
<link rel="stylesheet" crossorigin href="./assets/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
<link rel="modulepreload" href="./assets/ui-components-Dwq5utCl.js" />
|
|
361
|
+
<link rel="stylesheet" crossorigin href="./assets/index-C5Fu9Kda.css">
|
|
362
|
+
<link rel="modulepreload" href="./assets/framework-DFE_Mws9.js" />
|
|
363
|
+
<link rel="modulepreload" href="./assets/ui-components-CMHDBJEm.js" />
|
|
167
364
|
<link rel="modulepreload" href="./assets/vendor-radix-DFmVRiEf.js" />
|
|
168
365
|
<link rel="modulepreload" href="./assets/vendor-react-CsWFRkED.js" />
|
|
169
366
|
</head>
|
|
170
367
|
<body>
|
|
368
|
+
<div id="boot-splash" aria-hidden="true">
|
|
369
|
+
<div class="boot-splash-mark">
|
|
370
|
+
<div class="boot-splash-halo"></div>
|
|
371
|
+
<div class="boot-splash-tile">
|
|
372
|
+
<svg
|
|
373
|
+
viewBox="0 0 24 24"
|
|
374
|
+
fill="none"
|
|
375
|
+
stroke="currentColor"
|
|
376
|
+
stroke-width="2"
|
|
377
|
+
stroke-linecap="round"
|
|
378
|
+
stroke-linejoin="round"
|
|
379
|
+
>
|
|
380
|
+
<ellipse cx="12" cy="5" rx="9" ry="3"></ellipse>
|
|
381
|
+
<path d="M3 5V19A9 3 0 0 0 21 19V5"></path>
|
|
382
|
+
<path d="M3 12A9 3 0 0 0 21 12"></path>
|
|
383
|
+
</svg>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
171
387
|
<div id="root"></div>
|
|
172
388
|
</body>
|
|
173
389
|
</html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectstack/console",
|
|
3
|
-
"version": "17.
|
|
4
|
-
"description": "Prebuilt Console SPA pinned to this @objectstack/
|
|
3
|
+
"version": "17.4.0",
|
|
4
|
+
"description": "Prebuilt Console SPA pinned to this framework release, installed as a dependency of @objectstack/cli. Source of truth: @object-ui/console (https://github.com/objectstack-ai/objectui).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/objectstack-ai/objectstack/tree/main/packages/console",
|
|
7
7
|
"repository": {
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n}from"./vendor-react-CsWFRkED.js";import{x as r}from"./infrastructure-BCTDJsqi.js";import{N as i,O as a,et as o,o as s}from"./framework-BwfIhdyz.js";import{r as c}from"./vendor-ui-utils-BFw4cGI6.js";var l=e(t(),1),u=0,d=new Set,f=[];function p(){for(let e of d)try{e(u)}catch{}if(u===0&&f.length>0){let e=f;f=[];for(let t of e)try{t()}catch{}}}function m(){u+=1,p()}function h(){u=Math.max(0,u-1),p()}function g(){return u}function _(){return u===0}function v(e){return d.add(e),()=>{d.delete(e)}}function y(e=1e4){return u===0?Promise.resolve():new Promise(t=>{let n=!1,r=()=>{n||(n=!0,t())};f.push(r),e>0&&typeof setTimeout<`u`&&setTimeout(r,e)})}function b(e){return(async(...t)=>{m();try{return await e(...t)}finally{h()}})}function x(){if(typeof window>`u`)return;let e=window,t=e.__objectui??={};Object.defineProperty(t,"pendingRequests",{get:g,configurable:!0}),Object.defineProperty(t,"idle",{get:_,configurable:!0}),t.whenIdle=y,t.subscribe=v}async function S(e,t,n){let r;try{r=(await e.getObjectSchema(t))?.fields}catch{}return e=>n(t,e,r?.[e]?.label||e)}var C={readonly:(e,t)=>e(`detail.writeStrippedReadonly`,{fields:t,defaultValue:`Read-only, so it did not take effect: {{fields}}`}),readonly_when:(e,t)=>e(`detail.writeStrippedByState`,{fields:t,defaultValue:`Not editable in this record's current state, so it did not take effect: {{fields}}`}),primary_key:(e,t)=>e(`detail.writeStrippedPrimaryKey`,{fields:t,defaultValue:`The record's identifier cannot be changed by a save, so it did not take effect: {{fields}}`})},w=(e,t)=>e(`detail.writeStrippedUnknownReason`,{fields:t,defaultValue:`Not applied by the server: {{fields}}`});function T(e){return C[e]??w}async function E(e,t,n,r,i){let a=new Map;for(let t of e.droppedFields){let e=a.get(t.reason)??[];for(let n of t.fields)e.includes(n)||e.push(n);a.set(t.reason,e)}if(a.size===0)return;let o=n&&e.resource?await S(n,e.resource,r):e=>e,s=[];for(let[e,n]of a){if(n.length===0)continue;let r=n.map(o).join(`, `);s.push(T(e)(t,r))}s.length!==0&&i.warning(t(`detail.writeStrippedTitle`,{defaultValue:`Saved — but some fields did not take effect`}),{description:s.join(`
|
|
2
|
-
`)})}var D=1e4;function O(e){let t=e.where?`[${e.rule}] ${e.where}`:`[${e.rule}]`,n=e.hint?` ${e.hint}`:``;return`${t} — ${e.message}${n}`}function k(e,t,n){!e.advisories||e.advisories.length===0||n.warning(t(`console.saveAdvisoryTitle`,{count:e.advisories.length,defaultValue:`Saved — the authoring check raised {{count}} advisory finding(s)`}),{description:e.advisories.map(O).join(`
|
|
3
|
-
`),duration:D})}var A=n();function j({children:e,adapter:t}){let[n,u]=(0,l.useState)(t??null),{t:d}=i(),f=(0,l.useRef)(d);f.current=d;let{fieldLabel:p}=a(),m=(0,l.useRef)(p);return m.current=p,(0,l.useEffect)(()=>{if(t){u(t);return}let e=!1,n,i;x();async function a(){try{let t=new s({baseUrl:``,fetch:b(r()),autoReconnect:!0,maxReconnectAttempts:5,reconnectDelay:1e3,cache:{maxSize:50,ttl:3e5}});n=t.onWriteWarning(e=>{E(e,f.current,t,m.current,c)}),i=t.onSaveAdvisory(e=>{k(e,f.current,c)}),await t.connect(),e||u(t)}catch(t){e||console.error(`[Console] Failed to initialize:`,t)}}return a(),()=>{e=!0,n?.(),i?.()}},[t]),(0,A.jsx)(o.Provider,{value:n,children:e})}export{k as n,b as r,j as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n}from"./vendor-react-CsWFRkED.js";import{V as r,nt as i}from"./framework-BwfIhdyz.js";import{Aa as a,Ci as o,Er as s,Is as c,Oa as l,Pr as u,Tr as d,Ws as f,Yo as p,_c as m,gc as h,mc as g,oa as _,ri as v,wr as y,ya as b,yo as x}from"./ui-components-Dwq5utCl.js";import"./index-BLepsDd_.js";var S=e(t(),1),C=[`plugin`,`plugins`,`kind`,`package`];function w(e){return[{method:`POST`,path:`${e}/sign-in/email`,desc:`Sign in (email)`,group:`Auth`,bodyTemplate:{email:`user@example.com`,password:``}},{method:`POST`,path:`${e}/sign-up/email`,desc:`Sign up (email)`,group:`Auth`,bodyTemplate:{email:``,password:``,name:``}},{method:`POST`,path:`${e}/sign-out`,desc:`Sign out`,group:`Auth`},{method:`GET`,path:`${e}/get-session`,desc:`Get session`,group:`Auth`}]}var T={ai:{group:`AI`,defaultRoute:`/api/v1/ai`,endpoints:[{method:`POST`,path:`/chat`,desc:`Chat completion (JSON)`,bodyTemplate:{messages:[{role:`user`,content:``}],stream:!1}},{method:`POST`,path:`/chat/stream`,desc:`Streaming chat (SSE)`,bodyTemplate:{messages:[{role:`user`,content:``}]}},{method:`POST`,path:`/complete`,desc:`Text completion`,bodyTemplate:{prompt:``}},{method:`GET`,path:`/models`,desc:`List available models`},{method:`GET`,path:`/status`,desc:`Active LLM adapter provenance`},{method:`GET`,path:`/effective-model`,desc:`Effective model ids and where they came from`},{method:`POST`,path:`/conversations`,desc:`Create conversation`,bodyTemplate:{}},{method:`GET`,path:`/conversations`,desc:`List conversations`},{method:`GET`,path:`/conversations/:id`,desc:`Get conversation with message history`},{method:`PATCH`,path:`/conversations/:id`,desc:`Update conversation (title, metadata)`,bodyTemplate:{title:``}},{method:`DELETE`,path:`/conversations/:id`,desc:`Delete conversation`},{method:`POST`,path:`/conversations/:id/messages`,desc:`Add message to conversation`,bodyTemplate:{role:`user`,content:``}},{method:`GET`,path:`/conversations/:id/debug`,desc:`Reconcile a build conversation: agent-claimed vs live metadata`},{method:`GET`,path:`/agents`,desc:`List active agents`},{method:`POST`,path:`/agents/:agentName/chat`,desc:`Chat with a named agent (JSON)`,bodyTemplate:{messages:[{role:`user`,content:``}],stream:!1}},{method:`GET`,path:`/assistant`,desc:`Resolve the default assistant and its active skills`},{method:`GET`,path:`/assistant/skills`,desc:`List active skills for a context`},{method:`POST`,path:`/assistant/chat`,desc:`Ambient chat — auto-resolves agent and skills (JSON)`,bodyTemplate:{messages:[{role:`user`,content:``}],stream:!1}},{method:`GET`,path:`/tools`,desc:`List registered AI tools`},{method:`POST`,path:`/tools/:toolName/execute`,desc:`Execute one tool directly (playground)`,bodyTemplate:{parameters:{}}},{method:`GET`,path:`/pending-actions`,desc:`List pending actions awaiting approval`},{method:`GET`,path:`/pending-actions/:id`,desc:`Get one pending action`},{method:`POST`,path:`/pending-actions/:id/approve`,desc:`Approve a pending action and execute it`,bodyTemplate:{}},{method:`POST`,path:`/pending-actions/:id/reject`,desc:`Reject a pending action`,bodyTemplate:{reason:``}},{method:`POST`,path:`/evals/runs`,desc:`Run an eval case — ai:admin, makes paid LLM calls`,bodyTemplate:{caseId:``}},{method:`GET`,path:`/usage`,desc:`AI quota headroom per meter (console usage indicator)`}]},realtime:{group:`Realtime`,defaultRoute:`/api/v1/realtime`,endpoints:[{method:`POST`,path:`/connect`,desc:`Establish realtime connection`,bodyTemplate:{transport:`websocket`}},{method:`POST`,path:`/disconnect`,desc:`Close realtime connection`,bodyTemplate:{connectionId:``}},{method:`POST`,path:`/subscribe`,desc:`Subscribe to channel`,bodyTemplate:{channel:``}},{method:`POST`,path:`/unsubscribe`,desc:`Unsubscribe from channel`,bodyTemplate:{channel:``}},{method:`PUT`,path:`/presence/:channel`,desc:`Set presence state`,bodyTemplate:{status:`online`}},{method:`GET`,path:`/presence/:channel`,desc:`Get channel presence`}]},notification:{group:`Notifications`,defaultRoute:`/api/v1/notifications`,endpoints:[{method:`GET`,path:``,desc:`List notifications`},{method:`POST`,path:`/devices`,desc:`Register device for push`,bodyTemplate:{token:``,platform:`web`}},{method:`DELETE`,path:`/devices/:deviceId`,desc:`Unregister device`},{method:`GET`,path:`/preferences`,desc:`Get notification preferences`},{method:`PATCH`,path:`/preferences`,desc:`Update notification preferences`,bodyTemplate:{email:!0,push:!0}},{method:`POST`,path:`/read`,desc:`Mark notifications as read`,bodyTemplate:{ids:[]}},{method:`POST`,path:`/read/all`,desc:`Mark all as read`}]},analytics:{group:`Analytics`,defaultRoute:`/api/v1/analytics`,endpoints:[{method:`POST`,path:`/query`,desc:`Execute analytics query`,bodyTemplate:{measures:[],dimensions:[]}},{method:`GET`,path:`/meta`,desc:`Get analytics metadata`}]},automation:{group:`Automation`,defaultRoute:`/api/v1/automation`,endpoints:[{method:`POST`,path:`/trigger`,desc:`Trigger automation`,bodyTemplate:{name:``,params:{}}}]},i18n:{group:`i18n`,defaultRoute:`/api/v1/i18n`,endpoints:[{method:`GET`,path:`/locales`,desc:`Get available locales`},{method:`GET`,path:`/translations/:locale`,desc:`Get translations for locale`},{method:`GET`,path:`/labels/:object/:locale`,desc:`Get translated field labels`}]},ui:{group:`UI`,defaultRoute:`/api/v1/ui`,endpoints:[{method:`GET`,path:`/views`,desc:`List views`},{method:`GET`,path:`/views/:id`,desc:`Get view by ID`},{method:`POST`,path:`/views`,desc:`Create view`,bodyTemplate:{name:``,object:``,type:`list`}},{method:`PATCH`,path:`/views/:id`,desc:`Update view`,bodyTemplate:{name:``}},{method:`DELETE`,path:`/views/:id`,desc:`Delete view`}]},"file-storage":{group:`Storage`,defaultRoute:`/api/v1/storage`,endpoints:[{method:`POST`,path:`/upload`,desc:`Upload file (multipart/form-data)`},{method:`GET`,path:`/:fileId`,desc:`Download file`},{method:`DELETE`,path:`/:fileId`,desc:`Delete file`}]}},E={"file-storage":`storage`};function D(e,t){let n=T[e];return n?n.endpoints.map(e=>({method:e.method,path:`${t}${e.path}`,desc:e.desc,group:n.group,...e.bodyTemplate?{bodyTemplate:e.bodyTemplate}:{}})):[]}function ee(){let e=i(),[t,n]=(0,S.useState)([]),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(!0),[l,u]=(0,S.useState)(null),d=(0,S.useCallback)(async()=>{c(!0),u(null);let t=`/api/v1`,i=`${t}/discovery`,a=[{method:`GET`,path:i,desc:`API Discovery`,group:`System`},{method:`GET`,path:`${t}/meta/types`,desc:`List metadata types`,group:`Metadata`},{method:`GET`,path:`${t}/packages`,desc:`List packages`,group:`System`},{method:`GET`,path:`/api/v1/health`,desc:`Health check`,group:`System`}];try{let s=`/api/v1/auth`,c={},l={};try{let e=await fetch(i);if(e.ok){let t=await e.json(),n=t?.data??t;l=n?.routes??{},c=n?.services??{},l.auth&&(s=l.auth)}}catch{}let u=[];for(let[e,t]of Object.entries(T)){let n=E[e],i=(n?c[n]:void 0)??c[e],a=i?r(i):!1,o=i?.route??l[e]??t.defaultRoute;a&&u.push(...D(e,o))}let d=e?.getClient?.(),f=[];try{let e=await d?.meta?.getTypes?.();e&&Array.isArray(e.types)?f=e.types:Array.isArray(e)&&(f=e)}catch{}let p=[];try{let e=f.includes(`object`)?`object`:null;if(e&&d?.meta?.getItems){let t=await d.meta.getItems(e),n=[];Array.isArray(t)?n=t:t&&Array.isArray(t.items)?n=t.items:t&&Array.isArray(t.value)&&(n=t.value),p=n.map(e=>e.name||e.id).filter(Boolean)}}catch{}let m=p.flatMap(e=>{let n=e.startsWith(`sys_`)?`Data: system tables`:`Data: ${e}`;return[{method:`GET`,path:`${t}/data/${e}`,desc:`List ${e}`,group:n},{method:`POST`,path:`${t}/data/${e}`,desc:`Create ${e}`,group:n,bodyTemplate:{name:`example`}},{method:`GET`,path:`${t}/data/${e}/:id`,desc:`Get ${e} by ID`,group:n},{method:`PATCH`,path:`${t}/data/${e}/:id`,desc:`Update ${e}`,group:n,bodyTemplate:{name:`updated`}},{method:`DELETE`,path:`${t}/data/${e}/:id`,desc:`Delete ${e}`,group:n}]}),h=f.filter(e=>!C.includes(e)).map(e=>({method:`GET`,path:`${t}/meta/${e}`,desc:`List ${e} metadata`,group:`Metadata`})),g=p.map(e=>({method:`GET`,path:`${t}/meta/object/${e}`,desc:`${e} schema`,group:`Metadata`})),_=[...a,...w(s),...u,...h,...g,...m],v=new Map;for(let e of _){let t=v.get(e.group)||[];t.push(e),v.set(e.group,t)}let y=[`System`,`Auth`,`AI`,`Workflow`,`Realtime`,`Notifications`,`Analytics`,`Automation`,`i18n`,`UI`,`Feed`,`Storage`,`Metadata`],b=Array.from(v.entries()).sort(([e],[t])=>{let n=y.indexOf(e),r=y.indexOf(t);return n!==-1&&r!==-1?n-r:n===-1?r===-1?e.localeCompare(t):1:-1}).map(([e,t])=>({key:e,label:e,endpoints:t}));n(b),o(_)}catch(e){u(e.message||`Failed to discover APIs`)}finally{c(!1)}},[e]);return(0,S.useEffect)(()=>{d()},[d]),{groups:t,allEndpoints:a,loading:s,error:l,refresh:d}}var O=n(),k={GET:`text-emerald-600 bg-emerald-50 border-emerald-200 dark:text-emerald-400 dark:bg-emerald-950/50`,POST:`text-blue-600 bg-blue-50 border-blue-200 dark:text-blue-400 dark:bg-blue-950/50`,PATCH:`text-amber-600 bg-amber-50 border-amber-200 dark:text-amber-400 dark:bg-amber-950/50`,PUT:`text-amber-600 bg-amber-50 border-amber-200 dark:text-amber-400 dark:bg-amber-950/50`,DELETE:`text-red-600 bg-red-50 border-red-200 dark:text-red-400 dark:bg-red-950/50`},te={2:`text-emerald-600 dark:text-emerald-400`,3:`text-blue-600 dark:text-blue-400`,4:`text-amber-600 dark:text-amber-400`,5:`text-red-600 dark:text-red-400`},ne=[{key:`$top`,placeholder:`10`,hint:`limit`},{key:`$skip`,placeholder:`0`,hint:`offset`},{key:`$sort`,placeholder:`name`,hint:`sort field`},{key:`$select`,placeholder:`name,email`,hint:`fields`},{key:`$count`,placeholder:`true`,hint:`total count`},{key:`$filter`,placeholder:`status eq 'active'`,hint:`OData filter`}],A=1;function j(){let e=i()?.getClient?.(),{groups:t,loading:n,refresh:r}=ee(),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(new Set),[D,j]=(0,S.useState)(null),[re,M]=(0,S.useState)(``),[ie,N]=(0,S.useState)(``),[P,F]=(0,S.useState)(``),[I,L]=(0,S.useState)([]),[R,z]=(0,S.useState)(!1),[B,V]=(0,S.useState)(null),[H,U]=(0,S.useState)([]),[W,ae]=(0,S.useState)(null),[G,K]=(0,S.useState)(!1),q=(0,S.useMemo)(()=>{if(!C)return t;let e=C.toLowerCase();return t.map(t=>({...t,endpoints:t.endpoints.filter(t=>t.desc.toLowerCase().includes(e)||t.path.toLowerCase().includes(e)||t.method.toLowerCase().includes(e))})).filter(e=>e.endpoints.length>0)},[t,C]),oe=(0,S.useCallback)(e=>{E(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),se=(0,S.useCallback)(e=>{j(e),M(e.method),N(e.path),F(e.bodyTemplate?JSON.stringify(e.bodyTemplate,null,2):``),L([]),V(null)},[]),J=re||D?.method||`GET`,Y=ie||D?.path||``,X=(0,S.useMemo)(()=>{let e=I.filter(e=>e.enabled&&e.key.trim());if(e.length===0)return Y;let t=e.map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join(`&`);return`${Y}?${t}`},[Y,I]),Z=(0,S.useCallback)((e=``,t=``)=>{L(n=>[...n,{id:A++,key:e,value:t,enabled:!0}])},[]),ce=(0,S.useCallback)(e=>{L(t=>t.filter(t=>t.id!==e))},[]),Q=(0,S.useCallback)((e,t,n)=>{L(r=>r.map(r=>r.id===e?{...r,[t]:n}:r))},[]),le=(0,S.useCallback)(e=>{L(t=>t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t))},[]),$=(0,S.useCallback)(async()=>{if(R||!X)return;let t=`${e?.baseUrl??``}${X}`;z(!0);let n=performance.now();try{let e={method:J,headers:{"Content-Type":`application/json`}};[`POST`,`PATCH`,`PUT`].includes(J)&&P.trim()&&(e.body=P);let r=await fetch(t,e),i=Math.round(performance.now()-n),a;if((r.headers.get(`content-type`)??``).includes(`json`)){let e=await r.json();a=JSON.stringify(e,null,2)}else a=await r.text();let o={status:r.status,body:a,duration:i};V(o),U(e=>[{id:Date.now(),method:J,url:X,body:P||void 0,status:r.status,duration:i,response:a,timestamp:new Date},...e].slice(0,50))}catch(e){let t=Math.round(performance.now()-n);V({status:0,body:`Network Error: ${e.message}`,duration:t})}finally{z(!1)}},[e,X,J,P,R]),ue=(0,S.useCallback)(e=>{M(e.method);let[t,n]=e.url.split(`?`);if(N(t),F(e.body||``),n){let e=new URLSearchParams(n),t=[];e.forEach((e,n)=>{t.push({id:A++,key:n,value:e,enabled:!0})}),L(t)}else L([]);V(null),j(null)},[]),de=(0,S.useCallback)(()=>{B?.body&&(navigator.clipboard.writeText(B.body),K(!0),setTimeout(()=>K(!1),1500))},[B]),fe=e=>te[String(e)[0]]??`text-muted-foreground`;return(0,O.jsxs)(`div`,{className:`flex flex-1 min-h-0 overflow-hidden`,children:[(0,O.jsxs)(`div`,{className:`w-72 shrink-0 border-r flex flex-col overflow-hidden`,children:[(0,O.jsxs)(`div`,{className:`p-3 border-b space-y-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`h3`,{className:`text-sm font-semibold text-foreground flex-1`,children:`API Endpoints`}),(0,O.jsx)(`button`,{type:`button`,onClick:r,disabled:n,className:`p-1 rounded hover:bg-muted transition-colors text-muted-foreground hover:text-foreground`,title:`Refresh endpoints`,children:(0,O.jsx)(b,{className:`h-3.5 w-3.5 ${n?`animate-spin`:``}`})})]}),(0,O.jsxs)(`div`,{className:`relative`,children:[(0,O.jsx)(_,{className:`absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground`}),(0,O.jsx)(`input`,{type:`text`,value:C,onChange:e=>w(e.target.value),placeholder:`Search endpoints...`,className:`w-full rounded-md border bg-background pl-8 pr-3 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-ring`})]})]}),(0,O.jsx)(`div`,{className:`flex-1 overflow-auto p-2 space-y-1`,children:n?(0,O.jsxs)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,O.jsx)(x,{className:`h-4 w-4 animate-spin mr-2`}),`Discovering APIs...`]}):q.length===0?(0,O.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,O.jsx)(p,{className:`h-6 w-6 opacity-30 mb-2`}),(0,O.jsx)(`span`,{children:C?`No matching endpoints`:`No endpoints found`})]}):q.map(e=>{let t=T.has(e.key)||!!C;return(0,O.jsxs)(y,{open:t,onOpenChange:()=>oe(e.key),children:[(0,O.jsx)(s,{asChild:!0,children:(0,O.jsxs)(`button`,{type:`button`,className:`w-full flex items-center gap-1.5 px-2 py-1.5 rounded-md text-xs font-medium text-muted-foreground hover:bg-muted/50 hover:text-foreground transition-colors`,children:[(0,O.jsx)(g,{className:`h-3 w-3 shrink-0 transition-transform duration-200 ${t?`rotate-90`:``}`}),(0,O.jsx)(`span`,{className:`flex-1 text-left truncate`,children:e.label}),(0,O.jsx)(`span`,{className:`shrink-0 text-[10px] tabular-nums opacity-60`,children:e.endpoints.length})]})}),(0,O.jsx)(d,{children:(0,O.jsx)(`div`,{className:`ml-3 space-y-0.5 mt-0.5`,children:e.endpoints.map((e,t)=>(0,O.jsxs)(`button`,{type:`button`,onClick:()=>se(e),className:`w-full text-left flex items-center gap-1.5 px-2 py-1 rounded text-xs transition-colors ${D===e?`bg-accent text-accent-foreground`:`hover:bg-muted/50 text-muted-foreground hover:text-foreground`}`,children:[(0,O.jsx)(u,{variant:`outline`,className:`font-mono text-[9px] shrink-0 px-1 py-0 ${k[e.method]||``}`,children:e.method}),(0,O.jsx)(`span`,{className:`truncate`,children:e.desc})]},`${e.method}-${e.path}-${t}`))})})]},e.key)})}),(0,O.jsxs)(`div`,{className:`p-3 border-t space-y-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,O.jsx)(`h4`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:`Query Parameters`}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>Z(),className:`inline-flex items-center gap-0.5 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:[(0,O.jsx)(l,{className:`h-3 w-3`}),`Add`]})]}),(0,O.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:ne.map(e=>(0,O.jsx)(`button`,{type:`button`,onClick:()=>Z(e.key,``),className:`text-[10px] px-1.5 py-0.5 rounded border bg-muted/30 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors font-mono`,title:e.hint,children:e.key},e.key))}),I.length>0&&(0,O.jsx)(`div`,{className:`space-y-1`,children:I.map(e=>(0,O.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,O.jsx)(`input`,{type:`checkbox`,checked:e.enabled,onChange:()=>le(e.id),className:`h-3 w-3 shrink-0 rounded border accent-primary`}),(0,O.jsx)(`input`,{type:`text`,value:e.key,onChange:t=>Q(e.id,`key`,t.target.value),placeholder:`key`,className:`flex-1 min-w-0 rounded border bg-background px-1.5 py-0.5 text-[10px] font-mono focus:outline-none focus:ring-1 focus:ring-ring`}),(0,O.jsx)(`input`,{type:`text`,value:e.value,onChange:t=>Q(e.id,`value`,t.target.value),placeholder:`value`,className:`flex-1 min-w-0 rounded border bg-background px-1.5 py-0.5 text-[10px] font-mono focus:outline-none focus:ring-1 focus:ring-ring`}),(0,O.jsx)(`button`,{type:`button`,onClick:()=>ce(e.id),className:`shrink-0 p-0.5 rounded text-muted-foreground hover:text-destructive transition-colors`,children:(0,O.jsx)(v,{className:`h-3 w-3`})})]},e.id))})]})]}),(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0 overflow-hidden`,children:[(0,O.jsxs)(`div`,{className:`p-3 border-b space-y-1`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`select`,{value:J,onChange:e=>M(e.target.value),className:`rounded-md border bg-background px-2 py-1.5 font-mono text-xs font-semibold focus:outline-none focus:ring-1 focus:ring-ring ${k[J]||``}`,children:[`GET`,`POST`,`PATCH`,`PUT`,`DELETE`].map(e=>(0,O.jsx)(`option`,{value:e,children:e},e))}),(0,O.jsx)(`input`,{type:`text`,value:Y,onChange:e=>N(e.target.value),className:`flex-1 rounded-md border bg-background px-3 py-1.5 font-mono text-sm focus:outline-none focus:ring-1 focus:ring-ring`,placeholder:`/api/v1/...`,onKeyDown:e=>{e.key===`Enter`&&$()}}),(0,O.jsxs)(`button`,{type:`button`,onClick:$,disabled:R||!X,className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors`,children:[R?(0,O.jsx)(x,{className:`h-3.5 w-3.5 animate-spin`}):(0,O.jsx)(a,{className:`h-3.5 w-3.5`}),`Send`]})]}),I.some(e=>e.enabled&&e.key.trim())&&(0,O.jsxs)(`div`,{className:`text-[10px] font-mono text-muted-foreground truncate pl-1`,children:[`→ `,X]})]}),(0,O.jsxs)(`div`,{className:`flex-1 flex flex-col min-h-0 overflow-auto`,children:[[`POST`,`PATCH`,`PUT`].includes(J)&&(0,O.jsxs)(`div`,{className:`p-3 border-b space-y-1`,children:[(0,O.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:`Request Body (JSON)`}),(0,O.jsx)(`textarea`,{value:P,onChange:e=>F(e.target.value),rows:5,className:`w-full rounded-md border bg-background px-3 py-2 font-mono text-xs focus:outline-none focus:ring-1 focus:ring-ring resize-y`,placeholder:`{ "key": "value" }`})]}),R&&(0,O.jsxs)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,O.jsx)(x,{className:`h-4 w-4 animate-spin mr-2`}),`Sending request...`]}),B&&!R&&(0,O.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col overflow-hidden`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 bg-muted/30 border-b`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,O.jsx)(`span`,{className:`font-mono font-semibold ${fe(B.status)}`,children:B.status||`ERR`}),(0,O.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1`,children:[(0,O.jsx)(f,{className:`h-3 w-3`}),B.duration,`ms`]})]}),(0,O.jsxs)(`button`,{type:`button`,onClick:de,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[G?(0,O.jsx)(m,{className:`h-3 w-3`}):(0,O.jsx)(c,{className:`h-3 w-3`}),G?`Copied`:`Copy`]})]}),(0,O.jsx)(`pre`,{className:`flex-1 overflow-auto p-3 text-xs font-mono bg-muted/10 whitespace-pre-wrap break-all`,children:B.body})]}),!B&&!R&&(0,O.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-muted-foreground text-sm`,children:(0,O.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,O.jsx)(p,{className:`h-10 w-10 mx-auto opacity-20`}),(0,O.jsxs)(`p`,{children:[`Select an endpoint or type a URL and click `,(0,O.jsx)(`strong`,{children:`Send`})]}),(0,O.jsx)(`p`,{className:`text-xs opacity-60`,children:`All registered APIs are auto-discovered from the platform`})]})}),H.length>0&&(0,O.jsxs)(`div`,{className:`border-t`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,O.jsxs)(`h4`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wider`,children:[`History (`,H.length,`)`]}),(0,O.jsxs)(`button`,{type:`button`,onClick:()=>U([]),className:`inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:[(0,O.jsx)(o,{className:`h-3 w-3`}),`Clear`]})]}),(0,O.jsx)(`div`,{className:`space-y-0.5 px-2 pb-2 max-h-60 overflow-auto`,children:H.map(e=>(0,O.jsxs)(`div`,{className:`rounded border`,children:[(0,O.jsxs)(`button`,{type:`button`,onClick:()=>ae(W===e.id?null:e.id),className:`w-full flex items-center gap-2 px-2 py-1.5 text-xs hover:bg-muted/30 transition-colors`,children:[W===e.id?(0,O.jsx)(h,{className:`h-3 w-3 shrink-0`}):(0,O.jsx)(g,{className:`h-3 w-3 shrink-0`}),(0,O.jsx)(u,{variant:`outline`,className:`font-mono text-[9px] shrink-0 ${k[e.method]||``}`,children:e.method}),(0,O.jsx)(`span`,{className:`font-mono truncate text-left flex-1`,children:e.url}),(0,O.jsx)(`span`,{className:`ml-auto shrink-0 font-mono ${fe(e.status)}`,children:e.status}),(0,O.jsxs)(`span`,{className:`shrink-0 text-muted-foreground`,children:[e.duration,`ms`]}),(0,O.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),ue(e)},className:`shrink-0 p-0.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors`,title:`Replay request`,children:(0,O.jsx)(a,{className:`h-2.5 w-2.5`})})]}),W===e.id&&(0,O.jsx)(`pre`,{className:`px-3 py-2 text-xs font-mono bg-muted/10 border-t overflow-auto max-h-40 whitespace-pre-wrap break-all`,children:e.response})]},e.id))})]})]})]})]})}export{j as ApiConsolePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,h as n,p as r,r as i}from"./vendor-react-CsWFRkED.js";import{N as a,nt as o,rt as s}from"./framework-BwfIhdyz.js";import{Ci as c,Dr as l,Fa as u,In as d,Oa as f,Oo as p,Or as m,Pr as h,Ti as g,Ts as _,Xr as v,kr as y,oa as b,qi as x,wi as S,zi as C}from"./ui-components-Dwq5utCl.js";import{r as w}from"./vendor-ui-utils-BFw4cGI6.js";import"./index-BLepsDd_.js";var T=e(t(),1);function E(e,t){if(e!=null){if(typeof e==`string`)return e;if(t){let n=t(e.key,{defaultValue:e.defaultValue,...e.params});if(n&&n!==e.key)return n}return e.defaultValue||e.key}}var D=i();function O(e,t){return(e instanceof Error?e.message:String(e??``))||t}function k(){let{t:e}=a(),t=r(),{appName:i}=n(),k=i?`/apps/${i}`:``,{apps:A,refresh:j}=s(),M=o(),N=(0,T.useCallback)(()=>M?.getClient?.()?.meta??null,[M]),P=e(`appManagement.toast.unknownError`,{defaultValue:`unknown error`}),F=(0,T.useCallback)(t=>E(t?.label,e)||t?.name||``,[e]),[I,L]=(0,T.useState)(``),[R,z]=(0,T.useState)(new Set),[B,V]=(0,T.useState)(null),[H,U]=(0,T.useState)(!1),W=(A||[]).filter(t=>{if(!I)return!0;let n=I.toLowerCase();return(t.name||``).toLowerCase().includes(n)||F(t).toLowerCase().includes(n)||(E(t.description,e)||``).toLowerCase().includes(n)}),G=(0,T.useCallback)(e=>{z(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),K=(0,T.useCallback)(()=>{R.size===W.length?z(new Set):z(new Set(W.map(e=>e.name)))},[R.size,W]),q=(0,T.useCallback)(async t=>{let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);try{let r=t.active===!1;await n.saveItem(`app`,t.name,{...t,active:r}),w.success(r?e(`appManagement.toast.appEnabled`,{defaultValue:`{{name}} enabled`,name:F(t)}):e(`appManagement.toast.appDisabled`,{defaultValue:`{{name}} disabled`,name:F(t)})),await j()}catch(t){w.error(e(`appManagement.toast.toggleFailed`,{defaultValue:`Failed to toggle app status: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[j,N,e,F,P]),J=(0,T.useCallback)(async t=>{let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);try{let r=(A||[]).filter(e=>e?.isDefault===!0&&e.name!==t.name);for(let e of r)await n.saveItem(`app`,e.name,{...e,isDefault:!1});await n.saveItem(`app`,t.name,{...t,isDefault:!0}),w.success(e(`appManagement.toast.setDefaultDone`,{defaultValue:`{{name}} set as default`,name:F(t)})),await j()}catch(t){w.error(e(`appManagement.toast.setDefaultFailed`,{defaultValue:`Failed to set default app: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[A,j,N,e,F,P]),Y=(0,T.useCallback)(async t=>{if(B!==t.name){V(t.name);return}let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);try{await n.deleteItem(`app`,t.name),w.success(e(`appManagement.toast.appDeleted`,{defaultValue:`{{name}} deleted`,name:F(t)})),V(null),await j()}catch(t){w.error(e(`appManagement.toast.deleteFailed`,{defaultValue:`Failed to delete app: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[B,j,N,e,F,P]),X=(0,T.useCallback)(async t=>{let n=N();if(!n){w.error(e(`appManagement.toast.noClient`,{defaultValue:`Cannot reach the metadata service`}));return}U(!0);let r=0,i=[];try{let a=new Map((A||[]).map(e=>[e?.name,e]));for(let o of R){let s=a.get(o);if(s)try{await n.saveItem(`app`,o,{...s,active:t}),r+=1}catch(t){i.push(e(`appManagement.toast.bulkFailureEntry`,{defaultValue:`{{name}} ({{reason}})`,name:F(s),reason:O(t,P)}))}}if(r>0&&(w.success(t?e(`appManagement.toast.bulkEnabled`,{defaultValue:`{{n}} apps enabled`,n:r}):e(`appManagement.toast.bulkDisabled`,{defaultValue:`{{n}} apps disabled`,n:r})),z(new Set)),i.length>0){let t=e(`appManagement.toast.bulkFailureJoiner`,{defaultValue:`; `});w.error(e(`appManagement.toast.bulkFailed`,{defaultValue:`Failed for {{n}}: {{details}}`,n:i.length,details:i.join(t)}))}await j()}catch(t){w.error(e(`appManagement.toast.bulkOperationFailed`,{defaultValue:`Bulk operation failed: {{reason}}`,reason:O(t,P)}))}finally{U(!1)}},[A,R,j,N,e,F,P]);return(0,D.jsxs)(`div`,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,D.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-center justify-between gap-3`,children:[(0,D.jsxs)(`div`,{className:`min-w-0`,children:[(0,D.jsx)(`h1`,{className:`text-xl sm:text-2xl font-bold tracking-tight`,children:e(`appManagement.title`,{defaultValue:`Applications`})}),(0,D.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e(`appManagement.subtitle`,{defaultValue:`Manage all configured applications`})})]}),(0,D.jsxs)(v,{onClick:()=>t(`${k}/create-app`),"data-testid":`create-app-btn`,children:[(0,D.jsx)(f,{className:`h-4 w-4 mr-2`}),e(`appManagement.newApp`,{defaultValue:`New App`})]})]}),(0,D.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-2`,children:[(0,D.jsxs)(`div`,{className:`relative flex-1 max-w-sm`,children:[(0,D.jsx)(`label`,{htmlFor:`app-search`,className:`sr-only`,children:e(`appManagement.searchLabel`,{defaultValue:`Search apps`})}),(0,D.jsx)(b,{className:`pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`,"aria-hidden":`true`}),(0,D.jsx)(d,{id:`app-search`,placeholder:e(`appManagement.searchPlaceholder`,{defaultValue:`Search apps…`}),value:I,onChange:e=>L(e.target.value),className:`pl-8`,"data-testid":`app-search-input`})]}),R.size>0&&(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(h,{variant:`secondary`,children:e(`appManagement.selectedCount`,{defaultValue:`{{n}} selected`,n:R.size})}),(0,D.jsx)(v,{variant:`outline`,size:`sm`,onClick:()=>X(!0),disabled:H,children:e(`appManagement.bulkEnable`,{defaultValue:`Enable`})}),(0,D.jsx)(v,{variant:`outline`,size:`sm`,onClick:()=>X(!1),disabled:H,children:e(`appManagement.bulkDisable`,{defaultValue:`Disable`})})]})]}),W.length>0&&(0,D.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,D.jsx)(l,{id:`select-all-apps`,checked:R.size===W.length&&W.length>0,onCheckedChange:()=>K()}),(0,D.jsx)(`label`,{htmlFor:`select-all-apps`,className:`cursor-pointer`,children:e(`appManagement.selectAll`,{defaultValue:`Select all ({{n}})`,n:W.length})})]}),W.length===0?(0,D.jsxs)(`div`,{className:`text-center py-12 text-muted-foreground`,"data-testid":`no-apps-message`,children:[(0,D.jsx)(p,{className:`h-12 w-12 mx-auto mb-3 opacity-30`}),(0,D.jsx)(`p`,{children:e(`appManagement.empty`,{defaultValue:`No apps found.`})})]}):(0,D.jsx)(`div`,{className:`grid gap-3`,children:W.map(n=>{let r=n.active!==!1,i=n.isDefault===!0,a=B===n.name,o=F(n);return(0,D.jsx)(m,{className:r?``:`opacity-60`,"data-testid":`app-card-${n.name}`,children:(0,D.jsxs)(y,{className:`flex items-center gap-3 py-3 px-4`,children:[(0,D.jsx)(l,{id:`select-app-${n.name}`,checked:R.has(n.name),onCheckedChange:()=>G(n.name),"aria-label":e(`appManagement.selectApp`,{defaultValue:`Select {{name}}`,name:o}),className:`shrink-0`}),(0,D.jsx)(`div`,{className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,D.jsx)(p,{className:`h-4 w-4`})}),(0,D.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`span`,{className:`font-medium truncate`,children:o}),i&&(0,D.jsx)(h,{variant:`default`,className:`text-xs`,children:e(`appManagement.defaultBadge`,{defaultValue:`Default`})}),(0,D.jsx)(h,{variant:r?`secondary`:`outline`,className:`text-xs`,children:r?e(`appManagement.active`,{defaultValue:`Active`}):e(`appManagement.inactive`,{defaultValue:`Inactive`})})]}),n.description&&(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:E(n.description,e)})]}),(0,D.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,D.jsx)(v,{variant:`ghost`,size:`icon`,title:e(`appManagement.openApp`,{defaultValue:`Open app`}),"aria-label":e(`appManagement.openAppNamed`,{defaultValue:`Open {{name}}`,name:o}),onClick:()=>t(`/apps/${n._packageId??n.name}`),children:(0,D.jsx)(_,{className:`h-4 w-4`})}),(0,D.jsx)(v,{variant:`ghost`,size:`icon`,title:e(`appManagement.editApp`,{defaultValue:`Edit app`}),"aria-label":e(`appManagement.editAppNamed`,{defaultValue:`Edit {{name}}`,name:o}),onClick:()=>t(`${k}/edit-app/${n.name}`),children:(0,D.jsx)(u,{className:`h-4 w-4`})}),n._packageId?(0,D.jsx)(v,{variant:`ghost`,size:`icon`,title:e(`appManagement.editWithAi`,{defaultValue:`Edit with AI`}),"aria-label":e(`appManagement.editWithAiNamed`,{defaultValue:`Edit {{name}} with AI`,name:o}),onClick:()=>t(`/ai/build?package=${encodeURIComponent(n._packageId)}&new=1`),children:(0,D.jsx)(x,{className:`h-4 w-4`})}):null,(0,D.jsx)(v,{variant:`ghost`,size:`icon`,title:r?e(`appManagement.disableApp`,{defaultValue:`Disable app`}):e(`appManagement.enableApp`,{defaultValue:`Enable app`}),"aria-label":r?e(`appManagement.disableAppNamed`,{defaultValue:`Disable {{name}}`,name:o}):e(`appManagement.enableAppNamed`,{defaultValue:`Enable {{name}}`,name:o}),onClick:()=>q(n),disabled:H,children:r?(0,D.jsx)(S,{className:`h-4 w-4`}):(0,D.jsx)(g,{className:`h-4 w-4`})}),(0,D.jsx)(v,{variant:`ghost`,size:`icon`,title:e(`appManagement.setDefault`,{defaultValue:`Set as default`}),"aria-label":e(`appManagement.setDefaultNamed`,{defaultValue:`Set {{name}} as default`,name:o}),onClick:()=>J(n),disabled:H||i,children:(0,D.jsx)(C,{className:`h-4 w-4 ${i?`fill-current text-yellow-500`:``}`})}),(0,D.jsx)(v,{variant:`ghost`,size:`icon`,title:a?e(`appManagement.confirmDelete`,{defaultValue:`Click again to confirm delete`}):e(`appManagement.deleteApp`,{defaultValue:`Delete app`}),"aria-label":a?e(`appManagement.confirmDeleteNamed`,{defaultValue:`Confirm delete {{name}}`,name:o}):e(`appManagement.deleteAppNamed`,{defaultValue:`Delete {{name}}`,name:o}),onClick:()=>Y(n),disabled:H,className:a?`text-destructive`:``,children:(0,D.jsx)(c,{className:`h-4 w-4`})})]})]})},n.name)})})]})}export{k as AppManagementPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,b as n,g as r,h as i,r as a}from"./vendor-react-CsWFRkED.js";import{S as o,n as s,v as ee,x as te}from"./infrastructure-BCTDJsqi.js";import{N as ne,nt as re}from"./framework-BwfIhdyz.js";import{Bt as ie,Cn as ae,Dn as oe,Dr as se,En as c,Gi as ce,Gr as le,Gt as l,Hr as ue,Ht as de,In as fe,Is as pe,Jr as me,Jt as he,Kr as ge,Kt as u,La as _e,On as ve,Or as ye,Pr as d,Rr as be,Sn as xe,Tn as Se,Ts as Ce,Ur as we,Ut as Te,Vr as Ee,Vt as De,Wr as Oe,Ws as ke,Wt as Ae,Xc as je,Xr as f,Xs as Me,Yr as Ne,Ys as Pe,_c as Fe,aa as Ie,ac as Le,ai as Re,al as p,bn as ze,cc as Be,fi as Ve,gn as m,gt as He,hc as Ue,ht as We,kr as Ge,mc as Ke,oa as qe,qr as Je,qt as Ye,ri as Xe,ta as Ze,vn as Qe,wn as $e,xn as et,ya as tt,yn as nt,yt as rt,zr as it,zt as at}from"./ui-components-Dwq5utCl.js";import{r as h}from"./vendor-ui-utils-BFw4cGI6.js";import{r as ot,y as st}from"./RecordDetailView-BBNqsNy9.js";import{n as ct}from"./index-BLepsDd_.js";var g=e(n(),1),lt=`${``.replace(/\/$/,``)}/api/v1`;async function _(e,t){let n=o.get(),r=await fetch(`${lt}${e}`,{credentials:`include`,headers:{"Content-Type":`application/json`,...n?{Authorization:`Bearer ${n}`}:{},...t?.headers||{}},...t}),i=null;try{i=await r.json()}catch{}if(!r.ok){let e=i?.code??`HTTP_${r.status}`,t=i?.message??i?.error??r.statusText,n=Error(`${e}: ${t}`);throw n.code=e,n.status=r.status,n.details=i,n}return i}var v={listProcesses(e={}){let t=new URLSearchParams;e.object&&t.set(`object`,e.object),e.activeOnly&&t.set(`activeOnly`,`true`);let n=t.toString();return _(`/approvals/processes${n?`?${n}`:``}`)},listRequests(e={}){let t=new URLSearchParams;e.status&&t.set(`status`,e.status),e.object&&t.set(`object`,e.object),e.recordId&&t.set(`recordId`,e.recordId);let n=Array.isArray(e.approverId)?e.approverId.filter(Boolean).join(`,`):e.approverId;n&&t.set(`approverId`,n),e.submitterId&&t.set(`submitterId`,e.submitterId),e.q?.trim()&&t.set(`q`,e.q.trim()),e.limit!=null&&t.set(`limit`,String(e.limit)),e.offset!=null&&t.set(`offset`,String(e.offset));let r=t.toString();return _(`/approvals/requests${r?`?${r}`:``}`)},async getRequest(e){return{data:await _(`/approvals/requests/${encodeURIComponent(e)}`)}},listActions(e){return _(`/approvals/requests/${encodeURIComponent(e)}/actions`)},async approve(e,t){let n=await _(`/approvals/requests/${encodeURIComponent(e)}/approve`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,finalized:n.finalized}},async reject(e,t){let n=await _(`/approvals/requests/${encodeURIComponent(e)}/reject`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,finalized:n.finalized}},async recall(e,t){return{data:(await _(`/approvals/requests/${encodeURIComponent(e)}/recall`,{method:`POST`,body:JSON.stringify(t)})).request,finalized:!0}},async reassign(e,t){return{data:(await _(`/approvals/requests/${encodeURIComponent(e)}/reassign`,{method:`POST`,body:JSON.stringify(t)})).request}},async remind(e,t={}){let n=await _(`/approvals/requests/${encodeURIComponent(e)}/remind`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,notified:n.notified}},async requestInfo(e,t){return{data:(await _(`/approvals/requests/${encodeURIComponent(e)}/request-info`,{method:`POST`,body:JSON.stringify(t)})).request}},async sendBack(e,t){let n=await _(`/approvals/requests/${encodeURIComponent(e)}/revise`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,autoRejected:n.autoRejected===!0}},async resubmit(e,t={}){let n=await _(`/approvals/requests/${encodeURIComponent(e)}/resubmit`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,resumed:n.resumed===!0}},async comment(e,t){return{data:(await _(`/approvals/requests/${encodeURIComponent(e)}/comment`,{method:`POST`,body:JSON.stringify(t)})).request}},async submit(e){return _(`/approvals/requests`,{method:`POST`,body:JSON.stringify(e)})}};function ut(e){if(!e)return[];let t=new Set;e.id&&t.add(e.id),e.email&&t.add(e.email);let n=[...e.positions||[],...typeof e.role==`string`?e.role.split(`,`):[]];for(let e of n){let n=String(e).trim();n&&t.add(`role:${n}`)}return Array.from(t)}function y(e,t){return`${e}::${t}`}function b(e){return typeof e.object_name==`string`&&e.object_name!==``&&typeof e.record_id==`string`&&e.record_id!==``}function x(e){let t=new Map,n=new Set;for(let r of e){if(!b(r))continue;let e=y(r.object_name,r.record_id);if(n.has(e))continue;n.add(e);let i=t.get(r.object_name);i?i.push(r.record_id):t.set(r.object_name,[r.record_id])}let r=[];for(let[e,n]of t)for(let t=0;t<n.length;t+=100)r.push({objectName:e,ids:n.slice(t,t+100)});return r}function S(e){if(Array.isArray(e))return e;let t=e?.data;return Array.isArray(t)?t:[]}async function dt(e,t){let n=new Map,r=x(t);return await Promise.all(r.map(async({objectName:t,ids:r})=>{let i;try{let n=await e.find(t,{$filter:{id:{$in:r}},$select:[`id`],$top:r.length});i=new Set(S(n).map(e=>e?.id).filter(e=>typeof e==`string`&&e!==``))}catch{return}for(let e of r)n.set(y(t,e),i.has(e))})),n}function ft(e){let t=re(),[n,r]=(0,g.useState)(()=>new Map),i=(0,g.useRef)(new Set),a=(0,g.useRef)(e);a.current=e;let o=(0,g.useMemo)(()=>e.filter(b).map(e=>y(e.object_name,e.record_id)).join(`|`),[e]);return(0,g.useEffect)(()=>{if(!t)return;let e=a.current.filter(e=>b(e)&&!i.current.has(y(e.object_name,e.record_id)));if(e.length===0)return;for(let t of e)b(t)&&i.current.add(y(t.object_name,t.record_id));let n=!1;return dt(t,e).then(e=>{n||e.size===0||r(t=>{let n=new Map(t);for(let[t,r]of e)n.set(t,r);return n})}),()=>{n=!0}},[t,o]),(0,g.useMemo)(()=>({isUnreadable:e=>b(e)&&n.get(y(e.object_name,e.record_id))===!1}),[n])}var C=a(),pt=50,w={pending:`border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-400`,approved:`border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-400`,rejected:`border-red-200 bg-red-50 text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-400`,recalled:`border-border bg-muted text-muted-foreground`,returned:`border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-400`};function mt({status:e,label:t}){return(0,C.jsx)(d,{variant:`outline`,className:p(`font-medium`,w[e]??``),children:t})}function ht(e){if(!e)return`—`;try{return new Date(e).toLocaleString()}catch{return e}}function T(e){return e?e.includes(`@`)?e:e.startsWith(`role:`)?`Role: ${e.slice(5)}`:e.length>14?`${e.slice(0,6)}…${e.slice(-4)}`:e:`—`}function E(e){return e&&String(e).replace(/^flow:/,``).trim().split(/[_\-\s]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)||`—`}function gt(e){return e.process_label||E(e.process_name)}function _t(e){return e.step_label?e.step_label:e.current_step?E(e.current_step):null}function vt(e){return e.submitter_name||T(e.submitter_id)}function yt(e,t){return t.pending_approver_names?.[e]||T(e)}function D(e,t){let n=t.pending_approver_groups?.[e];return n&&n.length?n.join(` / `):void 0}function bt(e){let t=[],n=new Map;for(let r of e.pending_approvers||[]){let i=yt(r,e),a=D(r,e),o=a?`${i} ${a}`:i,s=n.get(o);s?(s.count+=1,r&&!s.title.split(`, `).includes(r)&&(s.title+=`, ${r}`)):(n.set(o,{label:i,group:a,count:1,title:r||i}),t.push(o))}return t.map(e=>n.get(e))}function xt(e){if(e.submitter_name)return!1;let t=(e.submitter_id||``).trim();return!t||t.startsWith(`flow:`)||t.startsWith(`system:`)}function St(e){return e.object_label||e.object_name}function O(e){return e.submitted_at||e.created_at||void 0}function Ct(e,t){let n=O(e);if(!n)return null;let r=Date.parse(n);return Number.isNaN(r)?null:(t-r)/36e5}function wt(e,t){if(e.status!==`pending`)return`text-muted-foreground`;let n=Ct(e,t);return n==null?`text-muted-foreground`:n>72?`text-red-600 dark:text-red-400 font-medium`:n>24?`text-amber-600 dark:text-amber-400`:`text-muted-foreground`}function Tt(e){let t=Math.max(1,Math.round(Math.abs(e)/36e5));return t<48?`${t}h`:`${Math.round(t/24)}d`}function Et(e,t){if(!e)return null;let n=Date.parse(e);return Number.isNaN(n)?null:{overdue:n<t,ms:Math.abs(t-n)}}var k=new Set([`id`,`created_at`,`updated_at`,`created_by`,`updated_by`,`organization_id`]);function A(e){let t=e.split(`_`).filter(Boolean);return t.length>1&&t[t.length-1].toLowerCase()===`id`&&t.pop(),t.map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Dt(e,t){if(typeof t==`boolean`)return t?`✓`:`—`;if(typeof t==`number`){if(t>0xe8d4a51000&&/(_at$|_date$|^date_|_time$)/.test(e))try{return new Date(t).toLocaleDateString()}catch{}return t.toLocaleString()}let n=String(t);if(/^\d{4}-\d{2}-\d{2}T\d{2}/.test(n))try{return new Date(n).toLocaleString()}catch{}return n}var j=/^[A-Za-z0-9_-]{15,}$/;function Ot(e,t,n,r=6,i){if(!e||typeof e!=`object`||Array.isArray(e))return[];let a=[];for(let[o,s]of Object.entries(e)){if(k.has(o)||i&&o===i||s==null||typeof s==`object`||String(s).trim()===``)continue;let e=t?.[o];if(!(!e&&typeof s==`string`&&j.test(s.trim())&&!/^\d+$/.test(s.trim()))&&(a.push([n?.[o]??A(o),e??Dt(o,s)]),a.length>=r))break}return a}var kt=/(amount|total|price|value|cost|sum|budget|salary|fee|revenue|balance|金额|总额|价格|费用|预算|金额)/i;function M(e){let t=e.payload;if(!t||typeof t!=`object`||Array.isArray(t))return null;for(let[n,r]of Object.entries(t)){if(k.has(n)||!kt.test(n))continue;let t=typeof r==`number`?r:typeof r==`string`&&r.trim()!==``&&Number.isFinite(Number(r))?Number(r):null;if(!(t==null||!Number.isFinite(t)))return{key:n,label:e.payload_labels?.[n]??A(n),value:t,display:e.payload_display?.[n]??t.toLocaleString()}}return null}function At({r:e,tr:t}){return(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:`font-medium truncate`,children:gt(e)}),(0,C.jsxs)(`div`,{className:`text-xs text-muted-foreground truncate`,children:[_t(e)||`—`,(e.round??1)>1&&(0,C.jsx)(`span`,{className:`ml-1.5 text-violet-600 dark:text-violet-400`,children:t(`roundChip`,`Round {{n}}`,{n:e.round})})]})]})}function jt({r:e,href:n}){let r=M(e),i=e.record_title||T(e.record_id);return(0,C.jsxs)(`div`,{className:`min-w-0`,children:[n===null?(0,C.jsx)(`div`,{className:`text-sm truncate max-w-full`,title:e.record_id,children:i}):(0,C.jsxs)(t,{to:n,onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-1 text-sm hover:underline truncate max-w-full`,title:e.record_id,children:[(0,C.jsx)(`span`,{className:`truncate`,children:i}),(0,C.jsx)(Ce,{className:`h-3 w-3 shrink-0 text-muted-foreground`})]}),(0,C.jsxs)(`div`,{className:`text-xs text-muted-foreground truncate`,children:[St(e),r&&(0,C.jsxs)(`span`,{className:`ml-1.5 font-medium text-foreground`,title:`${r.label}: ${r.display}`,children:[`· `,r.display]})]})]})}function Mt({r:e,actionable:t,busy:n,needsInputs:r,tr:i,onApprove:a,onReject:o}){if(!t)return null;let s=i(`needsDecisionInputs`,`This approval collects decision outputs — open it to decide.`);return(0,C.jsxs)(`div`,{className:`flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity`,onClick:e=>e.stopPropagation(),title:r?s:void 0,children:[(0,C.jsx)(f,{size:`sm`,variant:`ghost`,className:`h-7 px-2 text-emerald-700 hover:text-emerald-800 hover:bg-emerald-50 dark:text-emerald-400`,disabled:n||r,onClick:()=>a(e),"aria-label":r?s:i(`approve`,`Approve`),children:(0,C.jsx)(Le,{className:`h-4 w-4`})}),(0,C.jsx)(f,{size:`sm`,variant:`ghost`,className:`h-7 px-2 text-red-600 hover:text-red-700 hover:bg-red-50 dark:text-red-400`,disabled:n||r,onClick:()=>o(e),"aria-label":r?s:i(`reject`,`Reject`),children:(0,C.jsx)(Me,{className:`h-4 w-4`})})]})}function N(){let{t:e,language:n}=ne(),{user:a}=ee(),{appName:o}=i(),[re,lt]=r(),_=(0,g.useMemo)(()=>ut(a),[a]),{systemPermissions:y}=s(),b=ct(y),x=(0,g.useCallback)((t,n,r)=>String(e(`approvalsInbox.${t}`,{defaultValue:n,...r})),[e]),[S,dt]=(0,g.useState)(()=>Date.now());(0,g.useEffect)(()=>{let e=setInterval(()=>dt(Date.now()),6e4);return()=>clearInterval(e)},[]);let w=(0,g.useCallback)(e=>{if(!e)return`—`;let t=Date.parse(e);if(Number.isNaN(t))return e;let r=Math.round((S-t)/1e3);if(r<45)return x(`justNow`,`just now`);let i=Math.round(r/60);if(i<60)return x(`minutesAgo`,`{{count}}m ago`,{count:i});let a=Math.round(i/60);if(a<24)return x(`hoursAgo`,`{{count}}h ago`,{count:a});let o=Math.round(a/24);if(o<30)return x(`daysAgo`,`{{count}}d ago`,{count:o});try{return new Date(e).toLocaleDateString(n)}catch{return e}},[x,n,S]),E=(0,g.useCallback)(e=>{switch(e){case`pending`:return x(`statusPending`,`Pending`);case`approved`:return x(`statusApproved`,`Approved`);case`rejected`:return x(`statusRejected`,`Rejected`);case`recalled`:return x(`statusRecalled`,`Recalled`);case`returned`:return x(`statusReturned`,`Returned for revision`);default:return e}},[x]),D=(0,g.useCallback)((e,t)=>{let n=e?.code??``,r=e?.status??0;return n===`NOT_IMPLEMENTED`||r===501?x(`recallUnavailable`,`Recall is not available on this deployment.`):n===`THROTTLED`||r===429?x(`remindThrottled`,`A reminder was sent recently — try again later.`):r===404?x(`requestGone`,`This request no longer exists. Refresh the list.`):n===`FORBIDDEN`||r===403?x(`notAllowed`,`You are not allowed to perform this action.`):n===`INVALID_STATE`||r===409?x(`alreadyDecided`,`This request was already decided. Refresh the list.`):e?.message||t},[x]),Ct=(0,g.useCallback)(e=>e.overdue?x(`slaOverdue`,`SLA overdue {{dur}}`,{dur:Tt(e.ms)}):x(`slaRemaining`,`SLA {{dur}} left`,{dur:Tt(e.ms)}),[x]),k=(0,g.useCallback)(e=>`/apps/${o||`setup`}/${encodeURIComponent(e.object_name)}/record/${encodeURIComponent(e.record_id)}`,[o]),[A,Dt]=(0,g.useState)(`pending`),[j,kt]=(0,g.useState)([]),[N,Nt]=(0,g.useState)(!1),[Pt,Ft]=(0,g.useState)(!1),[It,P]=(0,g.useState)(null),[Lt,Rt]=(0,g.useState)(null),[zt,Bt]=(0,g.useState)(0),[F,Vt]=(0,g.useState)(null),[I,L]=(0,g.useState)(null),[Ht,R]=(0,g.useState)([]),[Ut,Wt]=(0,g.useState)(!1),Gt=ft((0,g.useMemo)(()=>I?[...j,I]:j,[j,I])),Kt=(0,g.useMemo)(()=>te(),[]),qt=(0,g.useCallback)(async e=>{let t=window.open(``,`_blank`,`noopener`);try{let n=``.replace(/\/$/,``),r=await Kt(`${n}/api/v1/storage/files/${encodeURIComponent(e.id)}/url`);if(!r.ok)throw Error(`HTTP_${r.status}`);let i=await r.json().catch(()=>null),a=i?.data?.url??i?.url;if(!a)throw Error(`NO_URL`);let o=/^https?:\/\//i.test(a)?a:`${n}${a}`;t?t.location.href=o:window.open(o,`_blank`,`noopener`)}catch{t?.close(),h.error(x(`attachmentOpenFailed`,`Could not open the attachment — please try again`))}},[Kt,x]),[z,Jt]=(0,g.useState)(``),[B,Yt]=(0,g.useState)(``),[V,Xt]=(0,g.useState)(`all`),[Zt,Qt]=(0,g.useState)(`all`),[H,$t]=(0,g.useState)(`all`),[en,tn]=(0,g.useState)(`recent`),[U,nn]=(0,g.useState)(new Set),[rn,an]=(0,g.useState)(!1),[W,on]=(0,g.useState)(null),[G,sn]=(0,g.useState)(null),[cn,ln]=(0,g.useState)(null),[K,un]=(0,g.useState)(``),[dn,fn]=(0,g.useState)(!1),[pn,mn]=(0,g.useState)(-1);(0,g.useEffect)(()=>{if(A===`pending`)return;let e=window.setTimeout(()=>Yt(z),350);return()=>window.clearTimeout(e)},[z,A]);let q=(0,g.useCallback)(async()=>{Nt(!0),Rt(null);try{let e=[];if(A===`pending`)e=_.length?(await v.listRequests({status:`pending`,approverId:_})).data:[],Bt(e.length),P(null);else{let t={q:B||void 0,status:H===`all`?void 0:H,limit:pt,offset:0};if(A===`submitted`){let n=a?.id;if(n){let r=await v.listRequests({submitterId:n,...t});e=r.data,P(r.total??r.data.length)}else e=[],P(0)}else{let n=await v.listRequests(t);e=n.data,P(n.total??n.data.length)}_.length&&v.listRequests({status:`pending`,approverId:_}).then(e=>Bt(e.data.length)).catch(()=>{})}e.sort((e,t)=>(O(t)||``).localeCompare(O(e)||``)),kt(e)}catch(e){Rt(e?.message||String(e)),kt([])}finally{Nt(!1)}},[A,_,a?.id,B,H]);(0,g.useEffect)(()=>{q()},[q]);let hn=(0,g.useCallback)(async()=>{if(!(A===`pending`||Pt)){Ft(!0);try{let e=await v.listRequests({submitterId:A===`submitted`?a?.id??void 0:void 0,q:B||void 0,status:H===`all`?void 0:H,limit:pt,offset:j.length});kt(t=>{let n=new Set(t.map(e=>e.id));return[...t,...e.data.filter(e=>!n.has(e.id))]}),e.total!=null&&P(e.total)}catch(e){h.error(D(e,x(`loadFailed`,`Failed to load request`)))}finally{Ft(!1)}}},[A,Pt,a?.id,B,H,j.length,D,x]),J=(0,g.useCallback)(async e=>{Vt(e),Wt(!0);try{let[t,n]=await Promise.all([v.getRequest(e),v.listActions(e)]);L(t.data),R(n.data)}catch(e){h.error(D(e,x(`loadFailed`,`Failed to load request`))),L(null),R([])}finally{Wt(!1)}},[D,x]),gn=()=>{Vt(null),L(null),R([])};(0,g.useEffect)(()=>{let e=re.get(`request`);e&&(lt(e=>{let t=new URLSearchParams(e);return t.delete(`request`),t},{replace:!0}),J(e))},[re]);let Y=(0,g.useCallback)(()=>{_.length&&v.listRequests({status:`pending`,approverId:_}).then(e=>Bt(e.data.length)).catch(()=>{})},[_]),_n=(0,g.useCallback)(async e=>{let[t,n]=await Promise.all([v.getRequest(e),v.listActions(e)]);L(t.data),R(n.data),q()},[q]),vn=(0,g.useCallback)(async()=>{if(!I)return;let e=I.id;try{let[t,n]=await Promise.all([v.getRequest(e),v.listActions(e)]);L(t.data),R(n.data),q();let r=new Set(t.data.pending_approvers||[]),i=t.data.status===`pending`&&_.some(e=>r.has(e));if(A===`pending`&&!i){let t=Pn.current,n=t.findIndex(t=>t.id===e),r=t[n+1]??t[n-1];if(r&&r.id!==e){J(r.id);return}gn()}}catch{_n(e)}},[I,_,A,q,J,gn,_n]),yn=(0,g.useCallback)(async()=>{if(!(!I||!K.trim())){fn(!0);try{await v.comment(I.id,{actor_id:a?.id,comment:K.trim()}),un(``),await _n(I.id)}catch(e){h.error(D(e,x(`actionFailed`,`Action failed`)))}finally{fn(!1)}}},[I,K,a?.id,_n,D,x]),bn=(0,g.useMemo)(()=>{if(!I||I.status!==`pending`)return!1;if(I.viewer)return I.viewer.can_act||!!I.viewer.can_override;let e=new Set(I.pending_approvers||[]);return _.some(t=>e.has(t))},[I,_]),xn=(0,g.useMemo)(()=>!I||I.status!==`pending`?!1:I.viewer?I.viewer.is_submitter:I.submitter_id===a?.id,[I,a?.id]),Sn=(0,g.useMemo)(()=>!I||I.status!==`returned`?!1:I.viewer?I.viewer.is_submitter:I.submitter_id===a?.id,[I,a?.id]),Cn=(0,g.useMemo)(()=>{let e=new Set;for(let t of j)e.add(gt(t));return Array.from(e).sort()},[j]),wn=(0,g.useMemo)(()=>{let e=new Set;for(let t of j)t.object_name&&e.add(t.object_name);return Array.from(e).sort()},[j]),X=(0,g.useMemo)(()=>{let e=z.trim().toLowerCase(),t=j.filter(t=>V!==`all`&>(t)!==V||Zt!==`all`&&t.object_name!==Zt||H!==`all`&&t.status!==H?!1:A!==`pending`||!e||[t.process_name,t.process_label,t.step_label,t.object_name,t.record_id,t.record_title,t.submitter_id,t.submitter_name,...t.pending_approvers||[]].filter(Boolean).join(` `).toLowerCase().includes(e));if(en===`recent`)return t;let n=[...t];return en===`amount`?n.sort((e,t)=>{let n=M(e)?.value,r=M(t)?.value;return n==null&&r==null?0:n==null?1:r==null?-1:r-n}):n.sort((e,t)=>(O(e)||``).localeCompare(O(t)||``)),n},[j,z,V,Zt,H,A,en]),Z=(0,g.useMemo)(()=>F?X.findIndex(e=>e.id===F):-1,[X,F]);(0,g.useEffect)(()=>{if(U.size===0)return;let e=new Set(X.map(e=>e.id)),t=!1,n=new Set;for(let r of U)e.has(r)?n.add(r):t=!0;t&&nn(n)},[X,U]),(0,g.useEffect)(()=>{pn>=X.length&&mn(X.length-1)},[X.length,pn]);let Tn=(0,g.useCallback)(e=>{if(e.status!==`pending`)return!1;let t=new Set(_);return(e.pending_approvers||[]).some(e=>t.has(e))},[_]),Q=(0,g.useCallback)(e=>Array.isArray(e.decision_outputs)&&e.decision_outputs.length>0,[]),En=(0,g.useCallback)(e=>Tn(e)&&!Q(e),[Tn,Q]),$=(0,g.useMemo)(()=>X.filter(e=>U.has(e.id)&&En(e)),[X,U,En]),Dn=X.filter(e=>e.status===`pending`),On=Dn.length>0&&Dn.every(e=>U.has(e.id)),kn=(0,g.useCallback)(()=>{nn(e=>{if(On)return new Set;let t=new Set(e);for(let e of Dn)t.add(e.id);return t})},[On,Dn]),An=(0,g.useCallback)(e=>{nn(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),jn=(0,g.useCallback)(async e=>{let t=$;if(t.length===0)return;an(!0);let n=0,r=[];for(let i of t){let t=new Set(i.pending_approvers||[]),o=_.find(e=>t.has(e))||a?.id||``;try{await(e===`approve`?v.approve:v.reject)(i.id,{actor_id:o}),n++}catch{r.push(i.record_title||T(i.record_id))}}if(an(!1),nn(new Set),r.length===0)h.success(e===`approve`?x(`bulkApproved`,`Approved {{count}} requests`,{count:n}):x(`bulkRejected`,`Rejected {{count}} requests`,{count:n}));else{let e=r.slice(0,3).join(`, `);h.error(x(`bulkPartial`,`{{ok}} succeeded, {{fail}} failed: {{which}}`,{ok:n,fail:r.length,which:e+(r.length>3?`…`:``)}))}q(),Y()},[$,_,a?.id,q,Y,x]),Mn=(0,g.useCallback)(async()=>{let e=W;if(!e)return;let t=new Set(e.pending_approvers||[]),n=_.find(e=>t.has(e))||a?.id||``;ln(e.id),on(null);try{let t=await v.approve(e.id,{actor_id:n});h.success(t.finalized?x(`inlineApproved`,`Approved "{{title}}"`,{title:e.record_title||T(e.record_id)}):x(`approvedWaiting`,`Approved — waiting on the remaining approvers`)),q(),Y()}catch(e){h.error(D(e,x(`actionFailed`,`Action failed`)))}finally{ln(null)}},[W,_,a?.id,q,Y,D,x]),Nn=(0,g.useCallback)(async()=>{let e=G;if(!e)return;let t=new Set(e.pending_approvers||[]),n=_.find(e=>t.has(e))||a?.id||``;ln(e.id),sn(null);try{await v.reject(e.id,{actor_id:n}),h.success(x(`inlineRejected`,`Rejected "{{title}}"`,{title:e.record_title||T(e.record_id)})),q(),Y()}catch(e){h.error(D(e,x(`actionFailed`,`Action failed`)))}finally{ln(null)}},[G,_,a?.id,q,Y,D,x]),Pn=(0,g.useRef)(X);Pn.current=X;let Fn=(0,g.useRef)(pn);Fn.current=pn,(0,g.useEffect)(()=>{let e=e=>{if(F||W||G)return;let t=e.target,n=t?.tagName;if(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||document.querySelector(`[role="alertdialog"]`))return;let r=Pn.current;if(!r.length)return;let i=Fn.current;e.key===`j`||e.key===`ArrowDown`?(e.preventDefault(),mn(Math.min(i+1,r.length-1))):e.key===`k`||e.key===`ArrowUp`?(e.preventDefault(),mn(Math.max(i-1,0))):e.key===`Enter`&&i>=0&&r[i]?(e.preventDefault(),J(r[i].id)):(e.key===`x`||e.key===` `)&&i>=0&&r[i]&&A===`pending`?(e.preventDefault(),An(r[i].id)):e.key===`a`&&i>=0&&r[i]&&En(r[i])?(e.preventDefault(),on(r[i])):e.key===`r`&&i>=0&&r[i]&&En(r[i])&&(e.preventDefault(),sn(r[i]))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[F,W,G,A,J,An,En]),(0,g.useEffect)(()=>{if(!F)return;let e=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let t=e.target,n=t?.tagName;if(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||document.querySelector(`[role="alertdialog"]`))return;let r=Pn.current,i=r.findIndex(e=>e.id===F);if(i<0)return;let a=e.key===`ArrowLeft`?r[i-1]:r[i+1];a&&(e.preventDefault(),J(a.id))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[F,J]);let In=!!z||V!==`all`||Zt!==`all`||H!==`all`,Ln=e=>{Dt(e),$t(`all`),Xt(`all`),Qt(`all`),Jt(``),tn(`recent`),mn(-1)};return(0,C.jsxs)(`div`,{className:`flex flex-col gap-4 sm:gap-6 p-4 sm:p-6 max-w-6xl`,children:[(0,C.jsxs)(`header`,{className:`flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsxs)(`h1`,{className:`text-2xl font-semibold flex items-center gap-2`,children:[(0,C.jsx)(ce,{className:`h-6 w-6`}),x(`title`,`Approvals Inbox`)]}),(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:x(`subtitle`,`Review and act on approval requests.`)})]}),(0,C.jsxs)(f,{variant:`outline`,size:`sm`,onClick:q,disabled:N,className:`self-start sm:self-auto`,children:[(0,C.jsx)(tt,{className:`h-4 w-4 mr-2 ${N?`animate-spin`:``}`}),x(`refresh`,`Refresh`)]})]}),Lt&&(0,C.jsxs)(be,{variant:`destructive`,children:[(0,C.jsx)(Be,{className:`h-4 w-4`}),(0,C.jsx)(it,{children:Lt})]}),(0,C.jsxs)(at,{value:A,onValueChange:Ln,children:[(0,C.jsxs)(De,{children:[(0,C.jsxs)(de,{value:`pending`,children:[x(`tabMyPending`,`My Pending`),zt>0&&(0,C.jsx)(d,{variant:`secondary`,className:`ml-2`,children:zt})]}),(0,C.jsx)(de,{value:`submitted`,children:x(`tabSubmitted`,`Submitted by me`)}),(0,C.jsx)(de,{value:`all`,children:x(`tabAll`,`All`)})]}),(0,C.jsxs)(ie,{value:A,className:`mt-4 space-y-3`,children:[!N&&(j.length>0||A!==`pending`&&(B||H!==`all`))&&(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsxs)(`div`,{className:`relative flex-1 min-w-[200px] max-w-sm`,children:[(0,C.jsx)(qe,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground`}),(0,C.jsx)(fe,{value:z,onChange:e=>Jt(e.target.value),placeholder:x(`searchPlaceholder`,`Search record, process, requester…`),className:`pl-8 h-8 text-sm`}),z&&(0,C.jsx)(`button`,{type:`button`,onClick:()=>Jt(``),className:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,"aria-label":x(`clearSearch`,`Clear search`),children:(0,C.jsx)(Xe,{className:`h-3.5 w-3.5`})})]}),A!==`pending`&&(0,C.jsxs)($e,{value:H,onValueChange:$t,children:[(0,C.jsx)(oe,{className:`h-8 w-auto min-w-[130px] text-sm`,children:(0,C.jsx)(ve,{placeholder:x(`statusFilter`,`Status`)})}),(0,C.jsxs)(Se,{children:[(0,C.jsx)(c,{value:`all`,children:x(`allStatuses`,`All statuses`)}),(0,C.jsx)(c,{value:`pending`,children:E(`pending`)}),(0,C.jsx)(c,{value:`approved`,children:E(`approved`)}),(0,C.jsx)(c,{value:`rejected`,children:E(`rejected`)}),(0,C.jsx)(c,{value:`recalled`,children:E(`recalled`)}),(0,C.jsx)(c,{value:`returned`,children:E(`returned`)})]})]}),Cn.length>1&&(0,C.jsxs)($e,{value:V,onValueChange:Xt,children:[(0,C.jsx)(oe,{className:`h-8 w-auto min-w-[140px] text-sm`,children:(0,C.jsx)(ve,{placeholder:x(`processFilter`,`Process`)})}),(0,C.jsxs)(Se,{children:[(0,C.jsx)(c,{value:`all`,children:x(`allProcesses`,`All processes`)}),Cn.map(e=>(0,C.jsx)(c,{value:e,children:e},e))]})]}),wn.length>1&&(0,C.jsxs)($e,{value:Zt,onValueChange:Qt,children:[(0,C.jsx)(oe,{className:`h-8 w-auto min-w-[140px] text-sm`,children:(0,C.jsx)(ve,{placeholder:x(`objectFilter`,`Object`)})}),(0,C.jsxs)(Se,{children:[(0,C.jsx)(c,{value:`all`,children:x(`allObjects`,`All objects`)}),wn.map(e=>(0,C.jsx)(c,{value:e,children:e},e))]})]}),(0,C.jsxs)($e,{value:en,onValueChange:e=>tn(e),children:[(0,C.jsxs)(oe,{className:`h-8 w-auto min-w-[120px] text-sm`,children:[(0,C.jsx)(je,{className:`h-3.5 w-3.5 mr-1 text-muted-foreground`}),(0,C.jsx)(ve,{placeholder:x(`sortBy`,`Sort`)})]}),(0,C.jsxs)(Se,{children:[(0,C.jsx)(c,{value:`recent`,children:x(`sortRecent`,`Newest first`)}),(0,C.jsx)(c,{value:`oldest`,children:x(`sortOldest`,`Oldest first`)}),(0,C.jsx)(c,{value:`amount`,children:x(`sortAmount`,`Amount (high→low)`)})]})]}),In&&(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:x(`filterCount`,`{{shown}} of {{total}}`,{shown:X.length,total:j.length})})]}),A===`pending`&&U.size>0&&(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3 py-2 rounded-md border bg-accent/30 text-sm`,children:[(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`strong`,{children:U.size}),` `,x(`selected`,`selected`),$.length!==U.size&&(0,C.jsx)(`span`,{className:`text-muted-foreground ml-1`,children:x(`actionableCount`,`({{count}} actionable)`,{count:$.length})})]}),(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,C.jsxs)(Ee,{children:[(0,C.jsx)(Ne,{asChild:!0,children:(0,C.jsxs)(f,{size:`sm`,disabled:rn||$.length===0,children:[(0,C.jsx)(Le,{className:`h-3.5 w-3.5 mr-1`}),x(`approveN`,`Approve {{count}}`,{count:$.length||``})]})}),(0,C.jsxs)(Oe,{children:[(0,C.jsxs)(Je,{children:[(0,C.jsx)(me,{children:x(`bulkApproveTitle`,`Approve {{count}} requests?`,{count:$.length})}),(0,C.jsx)(le,{children:x(`bulkApproveBody`,`Each request is approved with your identity and its flow continues down the approve branch.`)})]}),(0,C.jsxs)(ge,{children:[(0,C.jsx)(we,{children:x(`cancel`,`Cancel`)}),(0,C.jsx)(ue,{onClick:()=>jn(`approve`),children:x(`approveN`,`Approve {{count}}`,{count:$.length})})]})]})]}),(0,C.jsxs)(Ee,{children:[(0,C.jsx)(Ne,{asChild:!0,children:(0,C.jsxs)(f,{size:`sm`,variant:`outline`,disabled:rn||$.length===0,className:`border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground`,children:[(0,C.jsx)(Me,{className:`h-3.5 w-3.5 mr-1`}),x(`rejectN`,`Reject {{count}}`,{count:$.length||``})]})}),(0,C.jsxs)(Oe,{children:[(0,C.jsxs)(Je,{children:[(0,C.jsx)(me,{children:x(`bulkRejectTitle`,`Reject {{count}} requests?`,{count:$.length})}),(0,C.jsx)(le,{children:x(`bulkRejectBody`,`This rejects the selected requests and notifies their submitters.`)})]}),(0,C.jsxs)(ge,{children:[(0,C.jsx)(we,{children:x(`cancel`,`Cancel`)}),(0,C.jsx)(ue,{onClick:()=>jn(`reject`),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:x(`rejectN`,`Reject {{count}}`,{count:$.length})})]})]})]}),(0,C.jsx)(f,{size:`sm`,variant:`ghost`,onClick:()=>nn(new Set),disabled:rn,children:x(`clear`,`Clear`)})]})]}),N?(0,C.jsxs)(`div`,{className:`space-y-2`,children:[(0,C.jsx)(m,{className:`h-10 w-full`}),(0,C.jsx)(m,{className:`h-10 w-full`}),(0,C.jsx)(m,{className:`h-10 w-full`})]}):j.length===0?(0,C.jsx)(`div`,{className:`flex items-center justify-center min-h-[240px] rounded-md border border-dashed`,children:(0,C.jsxs)(We,{children:[(0,C.jsx)(rt,{children:x(`emptyTitle`,`No requests`)}),(0,C.jsx)(He,{children:A===`pending`?x(`emptyPending`,`You're all caught up — nothing is waiting on you.`):x(`emptyOther`,`Nothing here yet.`)}),A===`pending`&&(0,C.jsx)(f,{variant:`link`,size:`sm`,className:`mt-1`,onClick:()=>Ln(`all`),children:x(`emptyViewAll`,`Browse all requests`)})]})}):X.length===0?(0,C.jsx)(`div`,{className:`flex items-center justify-center min-h-[160px] rounded-md border border-dashed text-sm text-muted-foreground`,children:x(`noMatches`,`No matches for current filters.`)}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(ye,{className:`hidden md:block`,children:(0,C.jsx)(Ge,{className:`p-0`,children:(0,C.jsxs)(Te,{children:[(0,C.jsx)(Ye,{children:(0,C.jsxs)(he,{children:[A===`pending`&&(0,C.jsx)(u,{className:`w-10`,children:(0,C.jsx)(se,{checked:On,onCheckedChange:kn,"aria-label":x(`selectAll`,`Select all`),disabled:Dn.length===0})}),(0,C.jsx)(u,{className:`w-[22%]`,children:x(`colRequest`,`Request`)}),(0,C.jsx)(u,{className:`w-[30%]`,children:x(`colRecord`,`Record`)}),(0,C.jsx)(u,{className:`w-[16%]`,children:x(`colRequester`,`Requester`)}),(0,C.jsx)(u,{className:`w-[110px] min-w-[96px] whitespace-nowrap`,children:x(`colStatus`,`Status`)}),(0,C.jsx)(u,{className:`w-[132px]`,children:x(`colWaiting`,`Submitted`)}),(0,C.jsx)(u,{className:`w-20`,"aria-label":x(`colActions`,`Actions`)})]})}),(0,C.jsx)(Ae,{children:X.map((e,t)=>(0,C.jsxs)(he,{className:p(`group cursor-pointer hover:bg-accent/50`,pn===t&&`ring-2 ring-inset ring-ring bg-accent/30`),onClick:()=>{mn(t),J(e.id)},children:[A===`pending`&&(0,C.jsx)(l,{className:`w-10`,onClick:e=>e.stopPropagation(),children:(0,C.jsx)(se,{checked:U.has(e.id),onCheckedChange:()=>An(e.id),disabled:e.status!==`pending`,"aria-label":x(`selectRow`,`Select request`)})}),(0,C.jsx)(l,{children:(0,C.jsx)(At,{r:e,tr:x})}),(0,C.jsx)(l,{children:(0,C.jsx)(jt,{r:e,href:Gt.isUnreadable(e)?null:k(e)})}),(0,C.jsx)(l,{children:xt(e)?(0,C.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sm text-muted-foreground`,children:[(0,C.jsx)(Re,{className:`h-3.5 w-3.5 shrink-0`}),(0,C.jsx)(`span`,{className:`truncate italic`,children:x(`flowOrigin`,`Flow-initiated`)})]}):(0,C.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sm`,children:[(0,C.jsx)(Ve,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,C.jsx)(`span`,{className:`truncate`,title:e.submitter_id||``,children:vt(e)})]})}),(0,C.jsx)(l,{children:(0,C.jsx)(mt,{status:e.status,label:E(e.status)})}),(0,C.jsxs)(l,{className:p(`text-xs whitespace-nowrap`,wt(e,S)),title:ht(O(e)),children:[(0,C.jsx)(ke,{className:`h-3 w-3 inline mr-1`}),w(O(e)),e.status===`pending`&&(()=>{let t=Et(e.sla_due_at,S);return t?(0,C.jsx)(`div`,{className:p(`mt-0.5 text-[10px] font-medium`,t.overdue?`text-red-600 dark:text-red-400`:`text-muted-foreground`),children:Ct(t)}):null})()]}),(0,C.jsx)(l,{className:`w-20`,children:(0,C.jsx)(Mt,{r:e,actionable:Tn(e),busy:cn===e.id,needsInputs:Q(e),tr:x,onApprove:on,onReject:sn})})]},e.id))})]})})}),(0,C.jsx)(`div`,{className:`md:hidden space-y-2`,children:X.map(e=>(0,C.jsx)(ye,{className:`cursor-pointer active:bg-accent/50`,onClick:()=>void J(e.id),children:(0,C.jsxs)(Ge,{className:`p-3 space-y-1.5`,children:[(0,C.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,C.jsx)(`div`,{className:`font-medium text-sm truncate`,children:gt(e)}),(0,C.jsx)(mt,{status:e.status,label:E(e.status)})]}),(0,C.jsxs)(`div`,{className:`text-sm truncate`,children:[e.record_title||T(e.record_id),(0,C.jsx)(`span`,{className:`text-muted-foreground text-xs ml-1.5`,children:St(e)}),(()=>{let t=M(e);return t?(0,C.jsxs)(`span`,{className:`text-xs ml-1.5 font-medium`,title:t.label,children:[`· `,t.display]}):null})()]}),(0,C.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[xt(e)?(0,C.jsxs)(`span`,{className:`inline-flex items-center gap-1 truncate italic`,children:[(0,C.jsx)(Re,{className:`h-3 w-3`}),x(`flowOrigin`,`Flow-initiated`)]}):(0,C.jsxs)(`span`,{className:`inline-flex items-center gap-1 truncate`,children:[(0,C.jsx)(Ve,{className:`h-3 w-3`}),vt(e)]}),(0,C.jsxs)(`span`,{className:p(`inline-flex items-center gap-1 whitespace-nowrap`,wt(e,S)),children:[(0,C.jsx)(ke,{className:`h-3 w-3`}),w(O(e))]})]}),Tn(e)&&(0,C.jsxs)(`div`,{className:`flex gap-2 pt-1`,onClick:e=>e.stopPropagation(),title:Q(e)?x(`needsDecisionInputs`,`This approval collects decision outputs — open it to decide.`):void 0,children:[(0,C.jsxs)(f,{size:`sm`,className:`h-7 flex-1`,disabled:cn===e.id||Q(e),onClick:()=>on(e),children:[(0,C.jsx)(Le,{className:`h-3.5 w-3.5 mr-1`}),x(`approve`,`Approve`)]}),(0,C.jsxs)(f,{size:`sm`,variant:`outline`,className:`h-7 flex-1 border-destructive text-destructive`,disabled:cn===e.id||Q(e),onClick:()=>sn(e),children:[(0,C.jsx)(Me,{className:`h-3.5 w-3.5 mr-1`}),x(`reject`,`Reject`)]})]})]})},e.id))}),A!==`pending`&&It!=null&&(0,C.jsxs)(`div`,{className:`flex items-center justify-center gap-3 py-1`,children:[(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:x(`loadedOf`,`Loaded {{loaded}} of {{total}}`,{loaded:j.length,total:It})}),j.length<It&&(0,C.jsx)(f,{size:`sm`,variant:`outline`,disabled:Pt,onClick:()=>void hn(),children:Pt?x(`loadingMore`,`Loading…`):x(`loadMore`,`Load more`)})]}),(0,C.jsx)(`div`,{className:`hidden md:block text-[11px] text-muted-foreground`,children:x(`keyboardHint`,`Keyboard: j/k move · Enter open · x select · a approve · r reject`)})]})]})]}),(0,C.jsx)(Ee,{open:!!W,onOpenChange:e=>!e&&on(null),children:(0,C.jsxs)(Oe,{children:[(0,C.jsxs)(Je,{children:[(0,C.jsx)(me,{children:x(`approveOneTitle`,`Approve "{{title}}"?`,{title:W?W.record_title||T(W.record_id):``})}),(0,C.jsx)(le,{children:x(`approveOneBody`,`This approves the request with your identity. To add a comment or attachment, open the request instead.`)})]}),(0,C.jsxs)(ge,{children:[(0,C.jsx)(we,{children:x(`cancel`,`Cancel`)}),(0,C.jsx)(ue,{onClick:()=>void Mn(),children:x(`approve`,`Approve`)})]})]})}),(0,C.jsx)(Ee,{open:!!G,onOpenChange:e=>!e&&sn(null),children:(0,C.jsxs)(Oe,{children:[(0,C.jsxs)(Je,{children:[(0,C.jsx)(me,{children:x(`rejectOneTitle`,`Reject "{{title}}"?`,{title:G?G.record_title||T(G.record_id):``})}),(0,C.jsx)(le,{children:x(`rejectOneBody`,`This rejects the request and notifies the submitter.`)})]}),(0,C.jsxs)(ge,{children:[(0,C.jsx)(we,{children:x(`cancel`,`Cancel`)}),(0,C.jsx)(ue,{onClick:()=>void Nn(),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:x(`reject`,`Reject`)})]})]})}),(0,C.jsx)(Qe,{open:!!F,onOpenChange:e=>!e&&gn(),children:(0,C.jsxs)(nt,{className:`w-full sm:max-w-xl overflow-y-auto`,children:[(0,C.jsxs)(et,{children:[(0,C.jsx)(xe,{children:I?gt(I):x(`drawerTitle`,`Approval Request`)}),(0,C.jsx)(ze,{children:I?_t(I)||St(I):``})]}),I&&Z>=0&&X.length>1&&(0,C.jsxs)(`div`,{className:`flex items-center justify-between mt-2 text-xs text-muted-foreground`,children:[(0,C.jsxs)(f,{variant:`ghost`,size:`sm`,className:`h-7 px-2`,disabled:Z<=0,onClick:()=>{let e=X[Z-1];e&&J(e.id)},children:[(0,C.jsx)(Ue,{className:`h-4 w-4 mr-0.5`}),x(`prevRequest`,`Previous`)]}),(0,C.jsx)(`span`,{children:x(`positionOf`,`Request {{index}} of {{total}}`,{index:Z+1,total:X.length})}),(0,C.jsxs)(f,{variant:`ghost`,size:`sm`,className:`h-7 px-2`,disabled:Z>=X.length-1,onClick:()=>{let e=X[Z+1];e&&J(e.id)},children:[x(`nextRequest`,`Next`),(0,C.jsx)(Ke,{className:`h-4 w-4 ml-0.5`})]})]}),Ut?(0,C.jsxs)(`div`,{className:`space-y-2 mt-6`,children:[(0,C.jsx)(m,{className:`h-6 w-3/4`}),(0,C.jsx)(m,{className:`h-6 w-1/2`}),(0,C.jsx)(m,{className:`h-20 w-full`})]}):I?(0,C.jsxs)(`div`,{className:`space-y-4 mt-6`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,C.jsx)(mt,{status:I.status,label:E(I.status)}),(I.round??1)>1&&(0,C.jsx)(d,{variant:`outline`,className:`text-[10px] border-violet-200 text-violet-700 dark:border-violet-500/30 dark:text-violet-400`,children:x(`roundChip`,`Round {{n}}`,{n:I.round})}),(0,C.jsxs)(`span`,{className:`inline-flex items-center gap-1`,title:ht(O(I)),children:[(0,C.jsx)(ke,{className:`h-3 w-3`}),x(`submittedAgo`,`Submitted {{when}}`,{when:w(O(I))})]}),I.completed_at&&(0,C.jsxs)(`span`,{children:[`· `,x(`completedAt`,`Completed {{when}}`,{when:w(I.completed_at)})]}),I.status===`pending`&&(()=>{let e=Et(I.sla_due_at,S);return e?(0,C.jsx)(d,{variant:`outline`,className:p(`text-[10px]`,e.overdue?`border-red-200 bg-red-50 text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-400`:`border-border text-muted-foreground`),children:Ct(e)}):null})()]}),(()=>{let e=M(I),n=Ot(I.payload,I.payload_display,I.payload_labels,6,e?.key);return(0,C.jsx)(ye,{children:(0,C.jsxs)(Ge,{className:`p-4 space-y-3`,children:[(0,C.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[Gt.isUnreadable(I)?(0,C.jsx)(`div`,{className:`text-base font-semibold truncate`,children:I.record_title||T(I.record_id)}):(0,C.jsxs)(t,{to:k(I),className:`text-base font-semibold hover:underline inline-flex items-center gap-1.5`,children:[(0,C.jsx)(`span`,{className:`truncate`,children:I.record_title||T(I.record_id)}),(0,C.jsx)(Ce,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`})]}),(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:St(I)})]}),(0,C.jsx)(`div`,{className:`text-right text-xs text-muted-foreground shrink-0`,children:(0,C.jsx)(`div`,{className:`inline-flex items-center gap-1`,children:xt(I)?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Re,{className:`h-3 w-3`}),(0,C.jsx)(`span`,{className:`italic`,children:x(`flowOrigin`,`Flow-initiated`)})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Ve,{className:`h-3 w-3`}),(0,C.jsx)(`span`,{title:I.submitter_id||``,children:vt(I)})]})})})]}),e&&(0,C.jsxs)(`div`,{className:`border-t pt-3`,children:[(0,C.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e.label}),(0,C.jsx)(`div`,{className:`text-xl font-semibold tabular-nums`,title:e.display,children:e.display})]}),n.length>0&&(0,C.jsx)(`div`,{className:p(`grid grid-cols-2 gap-x-4 gap-y-2 text-sm`,!e&&`border-t pt-3`),children:n.map(([e,t])=>(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e}),(0,C.jsx)(`div`,{className:`truncate`,title:t,children:t})]},e))}),I.decision_progress&&(()=>{let e=I.decision_progress,t=(I.pending_approvers||[]).length;return(0,C.jsxs)(`div`,{className:`border-t pt-3`,children:[(0,C.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2 mb-1.5`,children:[(0,C.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:e.behavior===`per_group`?x(`progressGroups`,`Sign-off progress — {{got}} of {{need}} groups`,{got:e.got,need:e.need}):x(`progressApprovals`,`Approvals — {{got}} of {{need}}`,{got:e.got,need:e.need})}),e.behavior!==`per_group`&&I.status===`pending`&&t>0&&(0,C.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:x(`progressEligible`,`{{count}} eligible approver(s)`,{count:t})})]}),(0,C.jsx)(`div`,{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":e.need,"aria-valuenow":Math.min(e.got,e.need),"aria-label":x(`progressBar`,`Decision progress`),className:`flex gap-1`,children:e.need>0&&e.need<=12?Array.from({length:e.need}).map((t,n)=>(0,C.jsx)(`div`,{className:p(`h-1.5 flex-1 rounded-full`,n<e.got?`bg-emerald-500`:`bg-muted`)},n)):(0,C.jsx)(`div`,{className:`h-1.5 flex-1 rounded-full bg-muted overflow-hidden`,children:(0,C.jsx)(`div`,{className:`h-full rounded-full bg-emerald-500`,style:{width:`${e.need>0?Math.min(100,e.got/e.need*100):0}%`}})})}),e.groups&&(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,children:e.groups.map(e=>(0,C.jsxs)(d,{variant:`outline`,className:p(`text-[11px] gap-1`,e.satisfied?`border-emerald-300 text-emerald-700 dark:border-emerald-700 dark:text-emerald-400`:`text-muted-foreground`),title:`${e.got}/${e.need}`,children:[e.satisfied?(0,C.jsx)(Fe,{className:`h-3 w-3`}):(0,C.jsx)(Pe,{className:`h-2.5 w-2.5`}),e.group,` `,e.got,`/`,e.need]},e.group))})]})})(),I.status===`pending`&&(I.pending_approvers||[]).length>0&&(0,C.jsxs)(`div`,{className:`border-t pt-3`,children:[(0,C.jsx)(`div`,{className:`text-[11px] text-muted-foreground mb-1`,children:x(`waitingOn`,`Waiting on`)}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:bt(I).map((e,t)=>(0,C.jsxs)(d,{variant:`outline`,className:`text-[11px]`,title:e.title,children:[e.label,e.group&&(0,C.jsxs)(`span`,{className:`ml-1 text-muted-foreground`,children:[`· `,e.group]}),e.count>1&&(0,C.jsxs)(`span`,{className:`ml-1 text-muted-foreground`,children:[`×`,e.count]})]},`${e.label}-${e.group??``}-${t}`))})]})]})})})(),(I.flow_steps?.length??0)>1&&(0,C.jsx)(`ol`,{className:`flex flex-col px-1`,"aria-label":x(`stepProgress`,`Approval steps`),children:I.flow_steps.map((e,t,n)=>{let r=n[t+1];return(0,C.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col items-center self-stretch`,children:[(0,C.jsx)(`span`,{className:p(`flex items-center justify-center h-5 w-5 shrink-0 rounded-full text-[10px] font-semibold`,e.state===`done`&&`bg-emerald-500 text-white`,e.state===`current`&&`bg-amber-500 text-white ring-2 ring-amber-200 dark:ring-amber-500/30`,e.state===`upcoming`&&`bg-muted text-muted-foreground border`),children:e.state===`done`?(0,C.jsx)(Fe,{className:`h-3 w-3`}):t+1}),r&&(0,C.jsx)(`div`,{className:p(`w-px flex-1 min-h-3 my-1`,r.state===`done`||r.state===`current`?`bg-emerald-300 dark:bg-emerald-700`:`bg-border`)})]}),(0,C.jsx)(`span`,{className:p(`min-w-0 flex-1 pt-0.5 text-xs break-words`,e.state===`current`?`font-medium`:`text-muted-foreground`),children:e.label})]},e.id)})}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h3`,{className:`text-sm font-semibold mb-3`,children:x(`history`,`Activity`)}),Ht.length===0?(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:x(`noActions`,`No actions yet.`)}):(0,C.jsx)(`ol`,{className:`relative space-y-3 pl-5 before:absolute before:left-[7px] before:top-1 before:bottom-1 before:w-px before:bg-border`,children:Ht.map(e=>{let t=st(e),n=t?`bg-amber-500`:e.action===`approve`?`bg-emerald-500`:e.action===`reject`?`bg-destructive`:e.action===`submit`?`bg-blue-500`:e.action===`reassign`?`bg-indigo-500`:e.action===`remind`||e.action===`request_info`?`bg-amber-500`:e.action===`comment`?`bg-slate-400`:e.action===`escalate`?`bg-red-500`:e.action===`revise`?`bg-violet-500`:e.action===`resubmit`?`bg-blue-500`:`bg-muted-foreground`,r=e.actor_id===`system:sla`?x(`systemSlaActor`,`System (SLA)`):e.actor_name??(e.actor_id&&e.actor_id===I.submitter_id?vt(I):T(e.actor_id)),i=e.action===`submit`?x(`actSubmit`,`Submitted`):e.action===`approve`?x(`actApprove`,`Approved`):e.action===`reject`?x(`actReject`,`Rejected`):e.action===`recall`?x(`actRecall`,`Recalled`):e.action===`reassign`?x(`actReassign`,`Reassigned`):e.action===`remind`?x(`actRemind`,`Reminder sent`):e.action===`request_info`?x(`actRequestInfo`,`Requested more info`):e.action===`comment`?x(`actComment`,`Commented`):e.action===`escalate`?x(`actEscalate`,`SLA escalated`):e.action===`revise`?x(`actRevise`,`Sent back for revision`):e.action===`resubmit`?x(`actResubmit`,`Resubmitted`):e.action;return(0,C.jsxs)(`li`,{className:`relative text-xs`,children:[(0,C.jsx)(`span`,{className:`absolute -left-[18px] top-1 h-3 w-3 rounded-full ring-2 ring-background ${n}`,"aria-hidden":!0}),(0,C.jsxs)(`div`,{className:`flex items-baseline gap-1.5 flex-wrap`,children:[(0,C.jsx)(`span`,{className:`font-medium`,children:i}),(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:`·`}),(0,C.jsx)(`span`,{title:e.actor_id||``,children:r}),t&&(0,C.jsxs)(d,{variant:`outline`,className:`gap-1 border-amber-500/60 px-1.5 py-0 text-[10px] font-medium text-amber-700 dark:text-amber-400`,title:x(`viaOverrideHint`,`The actor held no approver slot on this step — admitted by the admin-override path.`),"data-testid":`via-override-chip`,children:[(0,C.jsx)(Ze,{className:`h-3 w-3`,"aria-hidden":!0}),x(`viaOverrideChip`,`Admin override`)]}),(0,C.jsx)(`span`,{className:`ml-auto text-muted-foreground text-[10px]`,title:ht(e.created_at),children:w(e.created_at)})]}),(()=>{let t=e;return e.action!==`reassign`||!t.reassign_from&&!t.reassign_to?null:(0,C.jsx)(`div`,{className:`text-muted-foreground mt-0.5`,children:x(`reassignFromTo`,`from {{from}} to {{to}}`,{from:t.reassign_from_name??T(t.reassign_from),to:t.reassign_to_name??T(t.reassign_to)})})})(),e.comment&&(0,C.jsxs)(`div`,{className:`text-muted-foreground italic mt-0.5`,children:[`"`,e.comment,`"`]}),Array.isArray(e.attachments)&&e.attachments.length>0&&(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mt-1`,children:e.attachments.map((t,n)=>(0,C.jsxs)(`button`,{type:`button`,onClick:()=>void qt(t),className:`inline-flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full border text-muted-foreground hover:text-foreground hover:bg-accent transition-colors`,title:t.name||t.id,children:[(0,C.jsx)(_e,{className:`h-3 w-3`}),t.name||`${x(`attachmentChip`,`Attachment`)}${e.attachments.length>1?` ${n+1}`:``}`]},t.id||n))})]},e.id)})}),I.status===`pending`&&(bn||xn)&&(0,C.jsxs)(`div`,{className:`flex items-center gap-2 mt-3`,children:[(0,C.jsx)(fe,{value:K,onChange:e=>un(e.target.value),onKeyDown:e=>{e.key===`Enter`&&K.trim()&&(e.preventDefault(),yn())},placeholder:x(`replyPlaceholder`,`Reply on this request…`),className:`h-8 text-sm`}),(0,C.jsx)(f,{size:`sm`,variant:`outline`,className:`h-8 px-2 shrink-0`,disabled:!K.trim()||dn,onClick:()=>void yn(),children:(0,C.jsx)(Ie,{className:`h-3.5 w-3.5`})})]})]}),b&&I.payload!=null&&(0,C.jsxs)(`details`,{className:`group`,children:[(0,C.jsx)(`summary`,{className:`cursor-pointer text-xs text-muted-foreground hover:text-foreground select-none`,children:x(`rawData`,`Raw data (JSON)`)}),(0,C.jsxs)(`div`,{className:`mt-2`,children:[(0,C.jsx)(`div`,{className:`flex justify-end`,children:(0,C.jsxs)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(JSON.stringify(I.payload,null,2)),h.success(x(`copied`,`Copied`))}catch{h.error(x(`copyFailed`,`Copy failed`))}},className:`text-[10px] text-muted-foreground hover:text-foreground inline-flex items-center gap-1`,children:[(0,C.jsx)(pe,{className:`h-3 w-3`}),x(`copy`,`Copy`)]})}),(0,C.jsx)(`pre`,{className:`text-[11px] bg-muted/50 rounded p-2 overflow-auto max-h-48 mt-1`,children:JSON.stringify(I.payload,null,2)})]})]}),I.status===`pending`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(ae,{}),(0,C.jsxs)(`div`,{className:`space-y-3`,children:[(0,C.jsx)(ot,{objectName:`sys_approval_request`,record:I,location:`record_section`,label:x(`declaredActions`,`Actions`),onDone:()=>{vn()}}),!bn&&(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:xn?x(`whyDisabledSubmitter`,`You submitted this request, so you can recall it — but only the assigned approvers can approve or reject.`):x(`whyDisabled`,`Only the assigned approvers can act on this request. It is waiting on: {{who}}.`,{who:(I.pending_approvers||[]).map(e=>yt(e,I)).join(`, `)||`—`})})]})]}),Sn&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(ae,{}),(0,C.jsxs)(`div`,{className:`space-y-3`,children:[(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:x(`returnedHint`,`An approver sent this back to you. The record is unlocked — fix the data, then resubmit to start a new approval round.`)}),(0,C.jsxs)(`div`,{className:`flex gap-2 flex-wrap items-center`,children:[(0,C.jsx)(f,{asChild:!0,size:`sm`,variant:`outline`,children:(0,C.jsxs)(t,{to:k(I),children:[(0,C.jsx)(Ce,{className:`h-4 w-4 mr-1`}),x(`editRecordBtn`,`Edit record`)]})}),(0,C.jsx)(ot,{objectName:`sys_approval_request`,record:I,location:`record_section`,onDone:()=>{_n(I.id),q()}})]})]})]})]}):null]})})]})}export{N as ApprovalsInboxPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-C0FnF6B9.js";import{b as e,g as t,h as n,r}from"./vendor-react-CsWFRkED.js";import{gt as i,ht as a,yt as o}from"./ui-components-Dwq5utCl.js";import{r as s}from"./index-BLepsDd_.js";e();var c=r();function l({extraProps:e}={}){let r=n(),[l]=t(),u=r.ns,d=r.name,f=u&&d?`${u}:${d}`:u??``,p=s(f);if(!p)return(0,c.jsx)(`div`,{className:`h-full flex items-center justify-center p-8`,children:(0,c.jsxs)(a,{children:[(0,c.jsx)(o,{children:`Component not registered`}),(0,c.jsxs)(i,{children:[`No component is registered for `,(0,c.jsx)(`code`,{className:`font-mono`,children:f||`(empty)`}),`. Ensure the plugin that provides this surface is installed and has called`,(0,c.jsx)(`code`,{className:`font-mono`,children:` registerAppComponent()`}),`.`]})]})});let m={};for(let[e,t]of l.entries())m[e]=t;let h=p.component;return(0,c.jsx)(h,{...m,...e??{}})}export{l as ComponentNavView,l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{b as n,h as r,r as i}from"./vendor-react-CsWFRkED.js";import{D as a,J as o,N as s,nt as c,rt as l}from"./framework-BwfIhdyz.js";import{gt as u,ht as d,ko as f,yt as p}from"./ui-components-Dwq5utCl.js";import{r as m}from"./vendor-ui-utils-BFw4cGI6.js";import"./AdapterProvider-gULVLpjV.js";import"./MetadataProvider-DyFZSNqq.js";import{r as h}from"./ExpressionProvider-vGLngw8h.js";import{t as g}from"./useActionModal-DYiSBx1G.js";import{t as _}from"./utils-CJ4UwXMF.js";import{t as v}from"./preferLocal-CKqyhTP9.js";import{n as y,t as b}from"./MetadataInspector-kVAu8vlh.js";import{n as x}from"./skeletons-BwA1TSR2.js";import{n as S}from"./plugin-dashboard-CzbAW1Rz.js";import{t as C}from"./useOpenRecordList-DOZu_JZX.js";var w=t({DashboardView:()=>D}),T=e(n(),1),E=i();function D({dataSource:e}){let t=C(),{dashboardName:n}=r(),{showDebug:i}=y(),w=c(),{t:D}=s(),{dashboardLabel:O,dashboardDescription:k}=a(),[A,j]=(0,T.useState)(!0),{modalHandler:M,modalElement:N}=g(w),P=(0,T.useMemo)(()=>({export_dashboard_pdf:async()=>{m.info(D(`dashboardActions.printDialogOpening`));try{return window.print(),{success:!0}}catch(e){return m.error(D(`dashboardActions.exportFailed`,{message:e?.message||String(e)})),{success:!1,error:e?.message||String(e)}}},forecast_dashboard:async()=>(m.info(D(`dashboardActions.forecastSoon`)),{success:!0})}),[D]);(0,T.useEffect)(()=>{j(!0),queueMicrotask(()=>j(!1))},[n]);let{dashboards:F,objects:I}=l(),{app:L}=h(),R=v(F,n,L?._packageId),z=(0,T.useMemo)(()=>new Set((I||[]).map(e=>e?.name).filter(Boolean)),[I]),B=(0,T.useMemo)(()=>{if(!R||z.size===0)return R;let e=R.widgets;if(!Array.isArray(e)||e.length===0)return R;let t=e.filter(e=>{let t=e?.requiresObject??e?.object;return!t||z.has(t)});return t.length===e.length?R:{...R,widgets:t}},[R,z]);return A?(0,E.jsx)(x,{}):R?(0,E.jsxs)(`div`,{className:`flex flex-col h-full overflow-hidden bg-background`,children:[(0,E.jsx)(`div`,{className:`flex flex-col sm:flex-row justify-between sm:items-center gap-3 sm:gap-4 p-4 sm:p-6 border-b shrink-0`,children:(0,E.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(()=>{let e=_((B||R).title,D),t=_(R.label,D),n=O({name:R.name,label:t}),r=e||n||R.name;return(0,E.jsx)(`h1`,{className:`text-lg sm:text-xl md:text-2xl font-bold tracking-tight truncate`,children:r})})(),(()=>{let e=(B||R).description??R.description,t=k({name:R.name,description:_(e,D)});return t?(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1 line-clamp-2`,children:t}):null})()]})}),(0,E.jsxs)(`div`,{className:`flex-1 overflow-hidden flex flex-col sm:flex-row relative`,children:[(0,E.jsx)(`div`,{className:`flex-1 min-w-0 overflow-auto p-2 sm:p-4 md:p-6`,children:(0,E.jsx)(o,{value:{openRecordList:t},children:(0,E.jsx)(S,{schema:B,dataSource:e,modalHandler:M,scriptHandlers:P,hideHeaderText:!0})})}),(0,E.jsx)(b,{open:i,sections:[{title:`Dashboard Configuration`,data:B}]})]}),N]}):(0,E.jsx)(`div`,{className:`h-full flex items-center justify-center p-8`,children:(0,E.jsxs)(d,{children:[(0,E.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted`,children:(0,E.jsx)(f,{className:`h-6 w-6 text-muted-foreground`})}),(0,E.jsx)(p,{children:D(`empty.dashboardNotFound`)}),(0,E.jsx)(u,{children:D(`empty.dashboardNotFoundDescription`,{name:n})})]})})}export{w as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,b as n,h as r,p as i,r as a}from"./vendor-react-CsWFRkED.js";import{N as o,nt as s}from"./framework-BwfIhdyz.js";import{Ts as c,cc as l,do as u,gc as d,ms as f,yo as p}from"./ui-components-Dwq5utCl.js";import"./index-BLepsDd_.js";import{t as m}from"./DocShell-DMJHUgE5.js";import{i as h,l as g,n as _,u as v}from"./use-book-data-CZc8MJsb.js";import{r as y,t as b}from"./plugin-markdown-DNllWgPM.js";var x=e(n(),1),S=/(^```[^\n]*\n[\s\S]*?\n```[ \t]*$|^~~~[^\n]*\n[\s\S]*?\n~~~[ \t]*$)/m,C=/(`[^`\n]+`)/,w=/\]\((?:\.\/)?([a-z][a-z0-9_]*)\.md(#[^)\s]*)?\)/g;function T(e){return e.split(C).map((e,t)=>t%2==1?e:e.replace(w,`](/docs/$1$2)`)).join(``)}function E(e){let t=[],n=e;for(;;){let e=S.exec(n);if(!e||e.index===void 0)return t.push(T(n)),t.join(``);t.push(T(n.slice(0,e.index)),e[0]),n=n.slice(e.index+e[0].length)}}var D=a();function O({book:e,activeDoc:n,docHref:r}){return(0,D.jsxs)(`nav`,{"aria-label":e.label??e.name,className:`text-sm`,children:[e.label?(0,D.jsx)(`div`,{className:`mb-3 px-2 text-sm font-semibold text-foreground`,children:e.label}):null,(0,D.jsx)(`div`,{className:`space-y-5`,children:e.groups.map(e=>(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`mb-1 px-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:e.label}),(0,D.jsx)(`ul`,{className:`space-y-0.5`,children:e.entries.map((e,i)=>{if(e.separator)return(0,D.jsx)(`li`,{className:`my-1.5 border-t border-border/60`,"aria-hidden":!0},`sep-${i}`);if(e.href)return(0,D.jsx)(`li`,{children:(0,D.jsxs)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer`,className:`flex items-center gap-1.5 rounded px-2 py-1 text-muted-foreground hover:bg-muted/50 hover:text-foreground`,children:[(0,D.jsx)(`span`,{className:`truncate`,children:e.label??e.href}),(0,D.jsx)(c,{className:`h-3 w-3 shrink-0 opacity-60`})]})},`ext-${i}`);if(!e.doc)return null;let a=e.doc===n;return(0,D.jsx)(`li`,{children:(0,D.jsx)(t,{to:r(e.doc),"aria-current":a?`page`:void 0,className:`block truncate rounded px-2 py-1 transition ${a?`bg-primary/10 font-medium text-foreground`:`text-muted-foreground hover:bg-muted/50 hover:text-foreground`}`,children:e.label??e.doc})},e.doc)})})]},e.key))})]})}function k(){let{slug:e,name:t,appName:n}=r(),a=i(),c=s(),{t:S}=o(),[C,w]=(0,x.useState)(null),[T,k]=(0,x.useState)(`loading`),[A,j]=(0,x.useState)(``);(0,x.useEffect)(()=>{let e=!1;async function r(){if(!(!t||!c)){k(`loading`);try{let r=await c.getClient().meta.getItem(`doc`,t,n?{packageId:n}:void 0),i=r?.item??r?.data??r;if(e)return;i&&typeof i.content==`string`?(w({name:t,label:i.label,content:i.content}),k(`ready`)):k(`missing`)}catch(t){if(e)return;(t?.status??t?.response?.status)===404||/not found/i.test(t?.message??``)?k(`missing`):(j(t?.message??`Failed to load documentation`),k(`error`))}}}return r(),()=>{e=!0}},[t,n,c]);let M=(0,x.useCallback)(e=>{document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`}),window.history.replaceState(null,``,`${window.location.pathname}${window.location.search}#${e}`)},[]),N=(0,x.useCallback)(e=>{if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0)return;let t=e.target.closest(`a`)?.getAttribute(`href`);t&&(t.startsWith(`/docs/`)?(e.preventDefault(),a(t)):t.startsWith(`#`)&&(e.preventDefault(),M(decodeURIComponent(t.slice(1)))))},[a,M]),P=(0,x.useCallback)((e,t)=>{e.defaultPrevented||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||(e.preventDefault(),M(t))},[M]),F=(0,x.useMemo)(()=>y(C?.content??``),[C?.content]),I=S(`help.onThisPage`,{defaultValue:`On this page`}),{books:L,docs:R}=_(),z=n?`/apps/${n}/docs`:`/docs`,B=(0,x.useMemo)(()=>{let t=L.find(t=>h(t)===e);return t?g(t,v(t,R)):null},[L,R,e]),V=(0,x.useCallback)(t=>`${z}/${e}/${t}`,[z,e]);return T===`loading`?(0,D.jsx)(`div`,{className:`flex h-full items-center justify-center p-10 text-muted-foreground`,children:(0,D.jsx)(p,{className:`h-5 w-5 animate-spin`,"aria-label":`Loading documentation`})}):T===`missing`?(0,D.jsx)(m,{breadcrumb:t,children:(0,D.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-col items-center gap-3 p-10 text-center`,children:[(0,D.jsx)(f,{className:`h-10 w-10 text-muted-foreground`}),(0,D.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Documentation not found`}),(0,D.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No document named `,(0,D.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5`,children:t}),` is installed. It may belong to a package that is not installed, or it was removed in a newer version.`]})]})}):T===`error`?(0,D.jsx)(m,{breadcrumb:t,children:(0,D.jsxs)(`div`,{className:`mx-auto flex max-w-3xl flex-col items-center gap-3 p-10 text-center`,children:[(0,D.jsx)(l,{className:`h-10 w-10 text-destructive`}),(0,D.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Failed to load documentation`}),(0,D.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:A})]})}):(0,D.jsxs)(m,{breadcrumb:C?.label??t,children:[B?(0,D.jsxs)(`details`,{className:`group mx-auto max-w-6xl px-4 pt-4 sm:px-6 lg:hidden`,children:[(0,D.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-2 rounded-md border bg-muted/30 px-3 py-2 text-sm font-medium [&::-webkit-details-marker]:hidden`,children:[(0,D.jsx)(u,{className:`h-4 w-4 text-muted-foreground`}),(0,D.jsx)(`span`,{className:`truncate`,children:B.label??`Contents`}),(0,D.jsx)(d,{className:`ml-auto h-4 w-4 text-muted-foreground transition-transform group-open:rotate-180`})]}),(0,D.jsx)(`div`,{className:`mt-2 rounded-md border p-3`,children:(0,D.jsx)(O,{book:B,activeDoc:t,docHref:V})})]}):null,(0,D.jsxs)(`div`,{className:`mx-auto flex gap-8 p-4 sm:p-6 ${B?`max-w-6xl`:`max-w-5xl`}`,children:[B?(0,D.jsx)(`aside`,{className:`hidden w-56 shrink-0 lg:block`,children:(0,D.jsx)(`nav`,{className:`sticky top-20 max-h-[calc(100vh-6rem)] overflow-auto pr-1`,children:(0,D.jsx)(O,{book:B,activeDoc:t,docHref:V})})}):null,(0,D.jsx)(`article`,{className:`min-w-0 max-w-3xl flex-1 [&_h1]:scroll-mt-24 [&_h2]:scroll-mt-24 [&_h3]:scroll-mt-24`,onClick:N,children:(0,D.jsx)(b,{schema:{type:`markdown`,content:E(C?.content??``)}})}),F.length>=3?(0,D.jsx)(`aside`,{className:`hidden xl:block w-56 shrink-0`,children:(0,D.jsxs)(`nav`,{"aria-label":I,className:`sticky top-20 max-h-[calc(100vh-6rem)] overflow-auto`,children:[(0,D.jsx)(`div`,{className:`mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:I}),(0,D.jsx)(`ul`,{className:`border-l border-border text-sm`,children:F.map(e=>(0,D.jsx)(`li`,{style:{paddingLeft:(e.depth-2)*12},children:(0,D.jsx)(`a`,{href:`#${e.id}`,onClick:t=>P(t,e.id),className:`-ml-px block border-l border-transparent py-0.5 pl-3 text-muted-foreground hover:border-primary hover:text-foreground`,children:e.text})},e.id))})]})}):null]})]})}export{k as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n}from"./vendor-react-CsWFRkED.js";import{Tr as r,kt as i}from"./framework-BwfIhdyz.js";var a=e(t(),1),o=n(),s=(0,a.createContext)(null);function c({children:e,user:t={},app:n={},data:c={},features:l={}}){let u=(0,a.useMemo)(()=>({user:t,app:n,data:c,features:l,evaluator:new r({current_user:t,user:t,ctx:{user:t},os:{user:t},app:n,data:c,features:l})}),[t,n,c,l]),d=(0,a.useMemo)(()=>({current_user:t,user:t,ctx:{user:t},os:{user:t},app:n,data:c,features:l}),[t,n,c,l]);return(0,o.jsx)(s.Provider,{value:u,children:(0,o.jsx)(i,{scope:d,children:e})})}function l(){let e=(0,a.useContext)(s);if(!e){let e={user:{},app:{},data:{},features:{}},t={current_user:{},ctx:{user:{}},os:{user:{}},...e};return{...e,evaluator:new r(t)}}return e}function u(e,t){if(e==null||e===!0||e===`true`)return!0;if(e===!1||e===`false`)return!1;try{return t.evaluateCondition(e)}catch{return!0}}export{u as n,l as r,c as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,r as n}from"./vendor-react-CsWFRkED.js";import{x as r}from"./infrastructure-BCTDJsqi.js";import{nt as i,rt as a}from"./framework-BwfIhdyz.js";import{Aa as o,Ar as s,Bn as c,Gt as l,In as u,Jt as d,Kt as f,Mr as p,Or as m,Pr as h,Rt as g,Sn as _,Ut as v,Ws as y,Wt as b,Xr as x,Xs as S,Yt as C,ac as w,ai as T,bn as E,cc as D,gn as O,jr as k,kn as A,kr as j,qt as M,vn as N,xn as P,ya as F,yn as I,yo as L}from"./ui-components-Dwq5utCl.js";import{k as R}from"./RecordDetailView-BBNqsNy9.js";import"./index-BLepsDd_.js";var z=e(t(),1),B=n();function V({status:e}){let t={success:{icon:w,cls:`text-emerald-600 border-emerald-300`},completed:{icon:w,cls:`text-emerald-600 border-emerald-300`},failed:{icon:S,cls:`text-red-600 border-red-300`},error:{icon:S,cls:`text-red-600 border-red-300`},running:{icon:L,cls:`text-blue-600 border-blue-300 animate-pulse`},pending:{icon:y,cls:`text-amber-600 border-amber-300`},paused:{icon:y,cls:`text-amber-600 border-amber-300`},skipped:{icon:D,cls:`text-muted-foreground`}}[e]??{icon:D,cls:`text-muted-foreground`},n=t.icon;return(0,B.jsxs)(h,{variant:`outline`,className:`text-[10px] font-mono inline-flex items-center gap-1 ${t.cls}`,children:[(0,B.jsx)(n,{className:`h-3 w-3`}),e]})}function H(e){if(!e)return`—`;try{return new Date(e).toLocaleString()}catch{return e}}function U(e,t){switch(t){case`number`:{if(e===``)return;let t=Number(e);return Number.isNaN(t)?e:t}case`boolean`:return e===`true`;case`object`:case`list`:case`array`:if(e.trim()===``)return;try{return JSON.parse(e)}catch{return e}default:return e}}function W({data:e}){return(0,B.jsx)(`pre`,{className:`rounded border bg-muted/30 p-2 text-xs font-mono overflow-auto whitespace-pre-wrap break-all max-h-96`,children:JSON.stringify(e,null,2)})}function G(){let e=i()?.getClient?.(),[t,n]=(0,z.useState)([]),[r,a]=(0,z.useState)(!0),[o,c]=(0,z.useState)(null),[l,u]=(0,z.useState)(``),[d,f]=(0,z.useState)(0),h=(0,z.useCallback)(async()=>{if(!e?.meta?.getItems){c(`meta.getItems is not available on this client`),a(!1);return}a(!0),c(null);try{let t=await e.meta.getItems(`flow`),r=(Array.isArray(t)?t:Array.isArray(t?.items)?t.items:Array.isArray(t?.value)?t.value:[]).map(e=>({name:e?.spec?.name??e?.name,label:e?.spec?.label,spec:e?.spec??e,updatedAt:e?.updatedAt??e?.updated_at})).filter(e=>e.name);n(r),!l&&r.length>0&&u(r[0].name)}catch(e){c(e?.message??String(e))}finally{a(!1)}},[e,l]);(0,z.useEffect)(()=>{h()},[h]);let g=(0,z.useMemo)(()=>t.find(e=>e.name===l)??null,[t,l]);return(0,B.jsxs)(`div`,{className:`flex flex-col gap-4 p-4 sm:p-6`,children:[(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsxs)(`h1`,{className:`text-xl sm:text-2xl font-bold tracking-tight flex items-center gap-2`,children:[(0,B.jsx)(T,{className:`h-5 w-5`}),`Flow Runs`]}),(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Pick a flow, trigger a test run with sample inputs, and inspect recent run history`})]}),(0,B.jsxs)(m,{children:[(0,B.jsx)(k,{className:`pb-3`,children:(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(p,{className:`text-base`,children:`Flow`}),(0,B.jsx)(s,{children:`Select a flow definition to test`})]}),(0,B.jsxs)(x,{variant:`outline`,size:`sm`,onClick:h,disabled:r,children:[(0,B.jsx)(F,{className:`h-3.5 w-3.5 mr-2 ${r?`animate-spin`:``}`}),`Refresh`]})]})}),(0,B.jsxs)(j,{children:[r&&(0,B.jsx)(O,{className:`h-9 w-72`}),o&&(0,B.jsx)(`p`,{className:`text-sm text-red-500 font-mono break-all`,children:o}),!r&&!o&&t.length===0&&(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No flow definitions found.`}),!r&&!o&&t.length>0&&(0,B.jsx)(`select`,{value:l,onChange:e=>u(e.target.value),className:`flex h-9 w-full max-w-md rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus:outline-none focus:ring-1 focus:ring-ring`,children:t.map(e=>(0,B.jsx)(`option`,{value:e.name,children:e.label?`${e.label} (${e.name})`:e.name},e.name))})]})]}),g&&(0,B.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,B.jsx)(K,{client:e,flow:g.spec,onExecuted:()=>f(e=>e+1)}),(0,B.jsx)(q,{client:e,flowName:g.name,refreshKey:d})]})]})}function K({client:e,flow:t,onExecuted:n}){let l=(0,z.useMemo)(()=>(t?.variables??[]).filter(e=>e?.isInput),[t]),d=i(),{objects:f}=a(),_=(0,z.useMemo)(()=>r(),[]),[v,b]=(0,z.useState)({}),[T,E]=(0,z.useState)(!1),[D,O]=(0,z.useState)(null),[A,M]=(0,z.useState)(null),[N,P]=(0,z.useState)(null);(0,z.useEffect)(()=>{b({}),O(null),M(null),P(null)},[t?.name]);let F=(e,t)=>b(n=>({...n,[e]:t}));return(0,B.jsxs)(m,{children:[(0,B.jsxs)(k,{className:`pb-3`,children:[(0,B.jsx)(p,{className:`text-base`,children:`Test Run`}),(0,B.jsx)(s,{children:`Provide input values and invoke the flow`})]}),(0,B.jsxs)(j,{className:`space-y-3`,children:[l.length===0&&(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This flow declares no input variables. Click Run to invoke with no parameters.`}),l.map(e=>(0,B.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,B.jsxs)(c,{htmlFor:`var-${e.name}`,className:`flex items-center gap-2`,children:[(0,B.jsx)(`span`,{className:`font-mono text-xs`,children:e.name}),(0,B.jsx)(h,{variant:`outline`,className:`text-[10px] font-mono`,children:e.type})]}),e.type===`boolean`?(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(C,{id:`var-${e.name}`,checked:v[e.name]===`true`,onCheckedChange:t=>F(e.name,t?`true`:`false`)}),(0,B.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:v[e.name]===`true`?`true`:`false`})]}):e.type===`object`||e.type===`list`||e.type===`array`?(0,B.jsx)(g,{id:`var-${e.name}`,placeholder:`JSON ${e.type}`,value:v[e.name]??``,onChange:t=>F(e.name,t.target.value),className:`font-mono text-xs min-h-[80px]`}):(0,B.jsx)(u,{id:`var-${e.name}`,type:e.type===`number`?`number`:`text`,value:v[e.name]??``,onChange:t=>F(e.name,t.target.value)})]},e.name)),(0,B.jsx)(`div`,{className:`pt-1`,children:(0,B.jsxs)(x,{onClick:async()=>{if(!e?.automation?.execute){M(`automation.execute is not available on this client`);return}E(!0),M(null),O(null),P(null);try{let r={};for(let e of l){let t=v[e.name];t!==void 0&&(r[e.name]=U(t,e.type))}let i=await e.automation.execute(t.name,{params:r});O(i),i?.status===`paused`&&i?.screen&&i?.runId&&P({flowName:t.name,runId:i.runId,screen:i.screen}),n?.()}catch(e){M(e?.message??String(e))}finally{E(!1)}},disabled:T,size:`sm`,children:[T?(0,B.jsx)(L,{className:`h-3.5 w-3.5 mr-2 animate-spin`}):(0,B.jsx)(o,{className:`h-3.5 w-3.5 mr-2`}),T?`Running…`:`Run Flow`]})}),(D||A)&&(0,B.jsxs)(`div`,{className:`pt-2 border-t mt-2 space-y-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[A||D?.success===!1?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(S,{className:`h-4 w-4 text-red-500`}),` Failed`]}):D?.status===`paused`?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(y,{className:`h-4 w-4 text-amber-500`}),` Waiting for input`]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(w,{className:`h-4 w-4 text-emerald-500`}),` Result`]}),typeof D?.durationMs==`number`&&(0,B.jsxs)(h,{variant:`secondary`,className:`text-[10px] font-mono`,children:[D.durationMs,` ms`]})]}),A&&(0,B.jsx)(`p`,{className:`text-sm text-red-500 font-mono break-all`,children:A}),D?.status===`paused`&&D?.screen&&D?.runId&&!N&&(0,B.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,B.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`This run is paused at screen `,(0,B.jsx)(`span`,{className:`font-mono`,children:D.screen.nodeId}),`.`]}),(0,B.jsx)(x,{size:`sm`,variant:`outline`,onClick:()=>P({flowName:t.name,runId:D.runId,screen:D.screen}),children:`Continue run`})]}),D&&(0,B.jsx)(W,{data:D})]})]}),(0,B.jsx)(R,{state:N,authFetch:_,baseUrl:``,dataSource:d,objects:f,onClose:()=>{P(null),n?.()},onComplete:()=>{P(null),n?.()}})]})}function q({client:e,flowName:t,refreshKey:n}){let[r,i]=(0,z.useState)([]),[a,o]=(0,z.useState)(!0),[c,u]=(0,z.useState)(null),[g,y]=(0,z.useState)(null),[S,C]=(0,z.useState)(null),[w,T]=(0,z.useState)(!1),[D,R]=(0,z.useState)(null),U=(0,z.useCallback)(async()=>{if(!e?.automation?.listRuns){u(`automation.listRuns is not available on this client`),o(!1);return}o(!0),u(null);try{let n=await e.automation.listRuns(t,{limit:20}),r=Array.isArray(n)?n:n?.items??n?.runs??[];i(r)}catch(e){u(e?.message??String(e))}finally{o(!1)}},[e,t]);(0,z.useEffect)(()=>{U()},[U,n]);let G=async n=>{y(n),C(null),R(null),T(!0);try{let r=await e.automation.getRun(t,n);C(r?.run??r)}catch(e){R(e?.message??String(e))}finally{T(!1)}};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(m,{children:[(0,B.jsx)(k,{className:`pb-3`,children:(0,B.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(p,{className:`text-base`,children:`Recent Runs`}),(0,B.jsx)(s,{className:`font-mono text-xs`,children:t})]}),(0,B.jsxs)(x,{variant:`outline`,size:`sm`,onClick:U,disabled:a,children:[a?(0,B.jsx)(L,{className:`h-3.5 w-3.5 mr-2 animate-spin`}):(0,B.jsx)(F,{className:`h-3.5 w-3.5 mr-2`}),`Refresh`]})]})}),(0,B.jsxs)(j,{children:[a&&(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(O,{className:`h-8 w-full`}),(0,B.jsx)(O,{className:`h-8 w-full`}),(0,B.jsx)(O,{className:`h-8 w-full`})]}),!a&&c&&(0,B.jsx)(`p`,{className:`text-sm text-red-500 font-mono break-all`,children:c}),!a&&!c&&r.length===0&&(0,B.jsx)(`p`,{className:`text-sm text-muted-foreground py-6 text-center`,children:`No runs yet. Use the Test Run panel to invoke this flow.`}),!a&&!c&&r.length>0&&(0,B.jsxs)(v,{children:[(0,B.jsx)(M,{children:(0,B.jsxs)(d,{children:[(0,B.jsx)(f,{children:`Run`}),(0,B.jsx)(f,{children:`Status`}),(0,B.jsx)(f,{children:`Started`}),(0,B.jsx)(f,{className:`text-right`,children:`Duration`})]})}),(0,B.jsx)(b,{children:r.map(e=>(0,B.jsxs)(d,{className:`cursor-pointer`,onClick:()=>G(e.id),children:[(0,B.jsxs)(l,{className:`font-mono text-xs`,children:[e.id.slice(0,12),`…`]}),(0,B.jsx)(l,{children:(0,B.jsx)(V,{status:e.status})}),(0,B.jsx)(l,{className:`text-xs text-muted-foreground`,children:H(e.startedAt)}),(0,B.jsx)(l,{className:`text-right font-mono text-xs`,children:typeof e.durationMs==`number`?`${e.durationMs} ms`:`—`})]},e.id))})]})]})]}),(0,B.jsx)(N,{open:!!g,onOpenChange:e=>{e||(y(null),C(null))},children:(0,B.jsxs)(I,{side:`right`,className:`w-full sm:max-w-2xl p-0 flex flex-col`,children:[(0,B.jsxs)(P,{className:`p-4 border-b`,children:[(0,B.jsxs)(_,{className:`font-mono text-sm break-all`,children:[`Run `,g]}),(0,B.jsx)(E,{children:S&&(0,B.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,B.jsx)(V,{status:S.status}),typeof S.durationMs==`number`&&(0,B.jsxs)(h,{variant:`secondary`,className:`text-[10px] font-mono`,children:[S.durationMs,` ms`]}),(0,B.jsx)(`span`,{className:`text-xs`,children:H(S.startedAt)})]})})]}),(0,B.jsxs)(A,{className:`flex-1 p-4`,children:[w&&(0,B.jsxs)(`div`,{className:`space-y-2`,children:[(0,B.jsx)(O,{className:`h-16 w-full`}),(0,B.jsx)(O,{className:`h-16 w-full`}),(0,B.jsx)(O,{className:`h-16 w-full`})]}),D&&(0,B.jsx)(`p`,{className:`text-sm text-red-500 font-mono break-all`,children:D}),!w&&S&&(0,B.jsx)(`div`,{className:`space-y-3`,children:Array.isArray(S.steps)&&S.steps.length>0?S.steps.map((e,t)=>(0,B.jsxs)(`div`,{className:`rounded-md border p-3 space-y-2`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,B.jsxs)(`span`,{className:`text-muted-foreground font-mono text-xs`,children:[`#`,t+1]}),(0,B.jsx)(`span`,{className:`font-mono text-sm font-medium`,children:e.nodeLabel||e.nodeId}),e.nodeType&&(0,B.jsx)(h,{variant:`outline`,className:`text-[10px] font-mono`,children:e.nodeType}),(0,B.jsx)(V,{status:e.status}),typeof e.durationMs==`number`&&(0,B.jsxs)(h,{variant:`secondary`,className:`text-[10px] font-mono ml-auto`,children:[e.durationMs,` ms`]})]}),e.input!==void 0&&(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`text-[10px] uppercase text-muted-foreground mb-1`,children:`Input`}),(0,B.jsx)(W,{data:e.input})]}),e.output!==void 0&&(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`text-[10px] uppercase text-muted-foreground mb-1`,children:`Output`}),(0,B.jsx)(W,{data:e.output})]}),e.error&&(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`text-[10px] uppercase text-red-500 mb-1`,children:`Error`}),(0,B.jsx)(W,{data:e.error})]})]},`${e.nodeId}-${t}`)):(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`div`,{className:`text-[10px] uppercase text-muted-foreground mb-1`,children:`Run`}),(0,B.jsx)(W,{data:S})]})})]})]})})]})}export{G as FlowRunsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{b as t,g as n,p as r,r as i}from"./vendor-react-CsWFRkED.js";import{v as a}from"./infrastructure-BCTDJsqi.js";import{N as o,nt as s,rt as c,ur as l,wt as u,yt as d}from"./framework-BwfIhdyz.js";import{Ns as f,ft as p,gt as m,ht as h,yt as g}from"./ui-components-Dwq5utCl.js";import"./MetadataProvider-DyFZSNqq.js";import{t as _}from"./RecordDetailView-BBNqsNy9.js";import{d as v}from"./plugins-views-cOiN-mPq.js";var y=e(t(),1),b=[`single`,`group`,`isolated`];function x(e){return e===`group`||e===`isolated`}function S(){let{getAuthConfig:e}=a(),[t,n]=(0,y.useState)(void 0);return(0,y.useEffect)(()=>{let t=!1;return e?.().then(e=>{if(t)return;let r=e?.features?.tenancyPosture;r&&b.includes(r)&&n(r)}).catch(()=>{}),()=>{t=!0}},[e]),t}var C=`uf_`;function w(e){let t={};return e.forEach((e,n)=>{if(n.startsWith(C)&&e!==``){let r=n.slice(3);t[r]=e.split(`,`).map(e=>{try{return decodeURIComponent(e)}catch{return e}})}}),Object.keys(t).length>0?t:void 0}function T(e,t){let n=new URLSearchParams(e);for(let[e,r]of Object.entries(t)){let t=C+e;r&&r.length>0?n.set(t,r.map(e=>encodeURIComponent(String(e))).join(`,`)):n.delete(t)}return n}var E=i();function D(e){return Array.isArray(e?.columns)&&e.columns.length>0}function ee(e,t){let n=e?.listViews||e?.list_views||{},r=(t?[n[`${e?.name}.${t}`],n[t],...t==="default"||t===`list`?[e?.list]:[]]:[e?.list,...Object.values(n)]).filter(Boolean);return r.find(D)??r[0]}function O(e,t){let n=n=>t?.orgAttribution&&e?.fields?.organization_id&&!n.includes(`organization_id`)?[...n,`organization_id`]:n,r=e?.highlightFields;if(Array.isArray(r)&&r.length>0)return n(r.filter(t=>e.fields?.[t]));let i=e?.fields;return i&&typeof i==`object`?n(Object.entries(i).filter(([e,t])=>t&&!t.hidden&&!l(e,t)).map(([e])=>e).slice(0,6)):[]}function k(e,t){let n=e?.fields;if(!(!n||typeof n!=`object`))return Object.entries(n).find(([e,n])=>n&&!n.hidden&&!l(e,n)&&t(e,n))?.[0]}var A=new Set([`select`,`multiselect`,`radio`,`enum`,`boolean`]),j=new Set([`date`,`datetime`,`time`]),M=new Set([`image`,`file`,`attachment`,`avatar`,`photo`]);function N(e){let t=k(e,(e,t)=>A.has(t.type))??k(e,e=>/status|stage|state|priority|category|kind/i.test(e));return t?{groupByField:t}:void 0}function P(e){return k(e,(e,t)=>j.has(t.type))??k(e,e=>/date|due|start|end|deadline|schedule/i.test(e))}function F(e){let t=P(e);return t?{startDateField:t}:void 0}function I(e){let t=k(e,(e,t)=>M.has(t.type));return t?{coverField:t}:void 0}var L=new Set([`location`,`geo`,`geolocation`,`geopoint`,`point`]);function R(e){let t=k(e,(e,t)=>j.has(t.type)&&/start|begin|kickoff/i.test(e))??k(e,(e,t)=>j.has(t.type));if(!t)return;let n=k(e,(e,n)=>j.has(n.type)&&e!==t&&/end|due|finish|deadline|close/i.test(e))??k(e,(e,n)=>j.has(n.type)&&e!==t);if(!n)return;let r=k(e,(e,t)=>(t.type===`number`||t.type===`percent`)&&/progress|percent|complete/i.test(e));return{startDateField:t,endDateField:n,...r?{progressField:r}:{}}}function z(e){let t=k(e,(e,t)=>L.has(t.type))??k(e,e=>/location|address|geo|coords?|place|venue/i.test(e));return t?{locationField:t}:void 0}function B({page:e,className:t,onConfigChange:i,reserveEditAffordance:a}){let{t:l}=o(),{objects:b}=c(),x=s(),C=r(),[k,A]=n(),j=S()===`group`,[M]=y.useState(()=>w(new URLSearchParams(window.location.search))),P=y.useCallback(e=>{A(t=>T(t,e),{replace:!0})},[A]),L=e?.interfaceConfig||{},B=y.useMemo(()=>(b||[]).find(e=>e.name===L.source),[b,L.source]),V=y.useMemo(()=>ee(B,L.sourceView),[B,L.sourceView]),H=L.recordAction===`page`||L.recordAction===`modal`||L.recordAction===`none`?L.recordAction:`drawer`,U=y.useCallback(e=>`/apps/${window.location.pathname.split(`/`)[2]||``}/${L.source}/record/${encodeURIComponent(String(e))}`,[L.source]),W=d({navigation:{mode:H===`none`?`none`:H},objectName:L.source,onNavigate:e=>C(U(e))}),G=k.get(`recordId`),te=y.useCallback((e,t)=>{if(H===`none`)return;let n=e?.id??e?._id;if(t&&(t.metaKey||t.ctrlKey||t.button===1)&&n!=null){window.open(U(n),`_blank`);return}if((H===`drawer`||H===`modal`)&&n!=null){A(e=>{let t=new URLSearchParams(e);return t.set(`recordId`,String(n)),t});return}W.handleClick(e,t)},[H,U,W,A]),ne=y.useCallback(()=>{A(e=>{let t=new URLSearchParams(e);return t.delete(`recordId`),t})},[A]);y.useEffect(()=>{G&&!W.isOpen?W.open({id:G}):!G&&W.isOpen&&W.close()},[G]);let K=B?.name,q=!!V&&!D(V),J=V?.name??(L.sourceView?`${L.source}.${L.sourceView}`:void 0),[Y,X]=y.useState(null);y.useEffect(()=>{let e=!1;if(X(null),!(!K||!L.source||!q||!J))return(async()=>{try{let t=x,n=null;if(typeof t?.listViewOverrides==`function`)try{n=(await t.listViewOverrides(L.source))?.[J]??null}catch{}!D(n)&&typeof t?.getView==`function`&&(n=await t.getView(L.source,J)),!e&&n&&typeof n==`object`&&X(n)}catch{}})(),()=>{e=!0}},[K,L.source,L.sourceView,q,J,x]);let Z=y.useMemo(()=>Y?{...V,...Y}:V,[V,Y]),re=JSON.stringify(Z??null),Q=y.useMemo(()=>{if(!B)return;let e=Z||{},t=L.appearance??e.appearance,n=t?.allowedVisualizations||[],r=new Set(n),i=L.userActions||{},a=e.kanban??(r.has(`kanban`)?N(B):void 0),o=e.calendar??(r.has(`calendar`)?F(B):void 0),s=e.timeline??(r.has(`timeline`)?F(B):void 0),c=e.gallery??(r.has(`gallery`)?I(B):void 0),l=e.gantt??(r.has(`gantt`)?R(B):void 0),u=e.options?.map??(r.has(`map`)?z(B):void 0),d=[...Array.isArray(e.filter)?e.filter:[],...Array.isArray(L.filterBy)?L.filterBy:[]],f=D(L)?L.columns:D(e)?e.columns:O(B,{orgAttribution:j}),p=Array.isArray(L.sort)&&L.sort.length?L.sort:e.sort;return{type:`list-view`,objectName:B.name,viewType:n[0]??e.type??`grid`,columns:f,...d.length?{filter:d}:{},...p?.length?{sort:p}:{},grouping:e.grouping,rowColor:e.rowColor,pagination:e.pagination,searchableFields:e.searchableFields,emptyState:e.emptyState,kanban:a,calendar:o,gallery:c,timeline:s,gantt:l,...u||e.options?{options:{...e.options??{},...u?{map:u}:{}}}:{},userFilters:L.userFilters??e.userFilters,appearance:t,showViewSwitcher:n.length>1,showRecordCount:L.showRecordCount,addRecord:L.addRecord,userActions:{search:i.search!==!1,sort:i.sort!==!1,filter:i.filter===!0,rowHeight:i.rowHeight===!0,group:i.group===!0,hideFields:i.hideFields===!0,rowColor:i.rowColor===!0},allowExport:!1,inlineEdit:i.editInline===!0}},[K,re,L,j]);if(!B||!Q)return(0,E.jsx)(`div`,{className:`h-full flex items-center justify-center p-8`,children:(0,E.jsxs)(h,{children:[(0,E.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted`,children:(0,E.jsx)(f,{className:`h-6 w-6 text-muted-foreground`})}),(0,E.jsx)(g,{children:l(`empty.objectNotFound`,{defaultValue:`Object Not Found`})}),(0,E.jsx)(m,{children:l(`empty.interfacePageSourceMissing`,{defaultValue:`This interface page references "{{name}}", which is not available.`,name:L.source||`?`})})]})});let $=Array.isArray(L.buttons)&&L.buttons.length?L.buttons.map(e=>(B.actions||[]).find(t=>t?.name===e)).filter(Boolean).map(e=>({...e,locations:[`list_toolbar`]})):[];return(0,E.jsxs)(`div`,{className:t??`h-full flex flex-col`,"data-testid":`interface-list-page`,children:[(0,E.jsxs)(`div`,{className:`pl-4 pt-4 pb-2 shrink-0 flex items-start justify-between gap-3 ${a?`pr-12`:`pr-4`}`,children:[(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`h1`,{className:`text-lg font-semibold leading-tight`,children:typeof e.label==`string`?e.label:e.name}),typeof e.description==`string`&&e.description&&(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground mt-0.5`,children:e.description})]}),$.length>0&&(0,E.jsx)(`div`,{className:`shrink-0`,"data-testid":`interface-page-buttons`,children:(0,E.jsx)(u,{schema:{type:`action:bar`,location:`list_toolbar`,actions:$,size:`sm`,variant:`outline`}})})]}),(0,E.jsx)(`div`,{className:`flex-1 min-h-0 overflow-auto`,children:(0,E.jsx)(v,{schema:Q,dataSource:x,userFilterSelections:M,onUserFilterSelectionsChange:P,onSortChange:i?e=>i({sort:e}):void 0,onColumnStateChange:i?e=>{e?.order?.length&&i({columns:e.order})}:void 0,onRowClick:H===`none`?void 0:te})}),W.isOverlay&&(0,E.jsx)(p,{...W,setIsOpen:e=>{e||ne()},title:typeof e.label==`string`?e.label:L.source||`Record`,children:e=>(0,E.jsx)(_,{objectNameOverride:L.source,recordIdOverride:String(e?.id??e?._id??G??``),embedded:!0,dataSource:x,objects:b,onEdit:()=>{}})})]})}export{N as a,x as c,I as i,S as l,F as n,T as o,O as r,w as s,B as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./vendor-react-CsWFRkED.js";import{N as t}from"./framework-BwfIhdyz.js";import{Pr as n,al as r,fn as i,hn as a,ia as o,mn as s,pn as c,ta as l,tl as u,vo as d}from"./ui-components-Dwq5utCl.js";var f=e(),p={config:{icon:o,i18nKey:`config`,short:`Admin config`,title:`Administrator configuration`,body:()=>`These rows define how the platform behaves at runtime. Author them here; the runtime data they produce lives in a separate table.`,tone:`border-sky-300/60 bg-sky-50 text-sky-900 hover:bg-sky-100 dark:border-sky-500/40 dark:bg-sky-950/40 dark:text-sky-100`},"engine-owned":{icon:d,i18nKey:`system`,short:`System-managed`,title:`Managed by the platform`,body:()=>`Rows here are created automatically when actions run on the source record. The list below is a read-only monitoring surface — row-level actions (Approve, Recall, Resend, …) live on each row.`,tone:`border-slate-300/60 bg-slate-50 text-slate-900 hover:bg-slate-100 dark:border-slate-500/40 dark:bg-slate-950/40 dark:text-slate-100`},"system-data":{icon:o,i18nKey:`systemWritable`,short:`Platform schema`,title:`Platform-defined, admin-writable`,body:()=>`This object's schema is defined by the platform, but its rows are yours to create and edit here. Who may write is governed by delegated administration and record-level security, not by this badge.`,tone:`border-slate-300/60 bg-slate-50 text-slate-900 hover:bg-slate-100 dark:border-slate-500/40 dark:bg-slate-950/40 dark:text-slate-100`},"append-only":{icon:u,i18nKey:`appendOnly`,short:`Read-only · Audit log`,title:`Read-only historical record`,body:()=>`Immutable audit log. Rows cannot be created, edited, or deleted from the UI — they're written by the platform when events occur. Use Export to download for compliance review.`,tone:`border-zinc-300/60 bg-zinc-50 text-zinc-900 hover:bg-zinc-100 dark:border-zinc-500/40 dark:bg-zinc-950/40 dark:text-zinc-100`},"better-auth":{icon:l,i18nKey:`betterAuth`,short:`Identity`,title:`Managed by the identity provider`,body:e=>`This object's schema is owned by ${e}. Direct edits bypass password hashing, session validation, two-factor checks, and audit hooks. Manage these records through your authentication provider's sign-in, invitation, and security flows instead.`,tone:`border-amber-300/60 bg-amber-50 text-amber-900 hover:bg-amber-100 dark:border-amber-500/40 dark:bg-amber-950/40 dark:text-amber-100`}};function m({managedBy:e,label:o,className:l}){let{t:u}=t();if(!e||e===`platform`)return null;let d=p[e];if(!d)return null;let m=d.icon,h=o??`better-auth`,g=u(`managedByBadge.${d.i18nKey}.short`,{defaultValue:d.short}),_=u(`managedByBadge.${d.i18nKey}.title`,{defaultValue:d.title}),v=u(`managedByBadge.${d.i18nKey}.body`,{defaultValue:d.body(h),provider:h});return(0,f.jsx)(s,{delayDuration:200,children:(0,f.jsxs)(i,{children:[(0,f.jsx)(a,{asChild:!0,children:(0,f.jsxs)(n,{variant:`outline`,"data-testid":`managed-by-badge`,"data-bucket":e,className:r(`gap-1 font-normal text-[11px] leading-none py-0.5 px-1.5 cursor-help`,d.tone,l),children:[(0,f.jsx)(m,{className:`h-3 w-3`,"aria-hidden":`true`}),(0,f.jsx)(`span`,{children:g})]})}),(0,f.jsxs)(c,{side:`bottom`,align:`start`,className:`max-w-xs text-xs leading-relaxed`,children:[(0,f.jsx)(`p`,{className:`font-semibold mb-1`,children:_}),(0,f.jsx)(`p`,{className:`text-muted-foreground`,children:v})]})]})})}export{m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,p as t,r as n}from"./vendor-react-CsWFRkED.js";import{S as r}from"./infrastructure-BCTDJsqi.js";import{N as i,Yn as a}from"./framework-BwfIhdyz.js";import{Or as o,Xr as s,kr as c,vo as l}from"./ui-components-Dwq5utCl.js";var u={cloudUrl:``,singleEnvironment:!1,defaultOrgId:null,defaultEnvironmentId:null,features:{installLocal:!1,marketplace:!0,aiStudio:!0,autoPublishAiBuilds:!0,customDomain:!1,sso:!1},branding:{productName:`ObjectOS`,productShortName:`ObjectOS`,stage:`preview`,brandColor:`#4F46E5`,pwaThemeColor:`#4f46e5`}},d=[`preview`,`beta`,`ga`];function f(e){return typeof e==`string`&&d.includes(e)}var p={...u};function m(e){p={...p,...e,features:{...p.features,...e.features??{}},branding:{...p.branding,...e.branding??{}}}}async function h(e=``){let t=(e||``).replace(/\/+$/,``);try{let e=await a(`${t}/api/v1/runtime/config`,{credentials:`include`,headers:{Accept:`application/json`}});if(!e||typeof e!=`object`)return;m({cloudUrl:typeof e.cloudUrl==`string`?e.cloudUrl.replace(/\/+$/,``):p.cloudUrl,singleEnvironment:!!e.singleEnvironment,defaultOrgId:e.defaultOrgId??p.defaultOrgId??null,defaultEnvironmentId:e.defaultEnvironmentId??p.defaultEnvironmentId??null,features:e.features?{installLocal:!!e.features.installLocal,marketplace:e.features.marketplace!==!1,aiStudio:e.features.aiStudio!==!1,autoPublishAiBuilds:e.features.autoPublishAiBuilds!==!1,customDomain:e.features.customDomain===!0,sso:e.features.sso===!0}:p.features,branding:e.branding?{productName:typeof e.branding.productName==`string`&&e.branding.productName.trim()?e.branding.productName.trim():p.branding.productName,productShortName:typeof e.branding.productShortName==`string`&&e.branding.productShortName.trim()?e.branding.productShortName.trim():p.branding.productShortName,stage:f(e.branding.stage)?e.branding.stage:p.branding.stage,logoUrl:typeof e.branding.logoUrl==`string`&&e.branding.logoUrl.trim()?e.branding.logoUrl.trim():p.branding.logoUrl,faviconUrl:typeof e.branding.faviconUrl==`string`&&e.branding.faviconUrl.trim()?e.branding.faviconUrl.trim():p.branding.faviconUrl,brandColor:typeof e.branding.brandColor==`string`&&e.branding.brandColor.trim()?e.branding.brandColor.trim():p.branding.brandColor,pwaDescription:typeof e.branding.pwaDescription==`string`&&e.branding.pwaDescription.trim()?e.branding.pwaDescription.trim():p.branding.pwaDescription,pwaThemeColor:typeof e.branding.pwaThemeColor==`string`&&e.branding.pwaThemeColor.trim()?e.branding.pwaThemeColor.trim():p.branding.pwaThemeColor}:p.branding})}catch{}}function g(){return p}function _(){return p.branding?.productName||`ObjectOS`}function v(){return p.branding?.productShortName||_()}function y(){return p.branding?.stage??`preview`}function b(){return p.branding?.brandColor||`#4F46E5`}function x(){return p.branding?.logoUrl}function S(){return p.branding?.faviconUrl}function C(){return p.branding?.pwaDescription||`${_()} — runtime console`}function w(){return p.branding?.pwaThemeColor||b()}function T(){return p.cloudUrl??``}function E(){return p.features?.marketplace!==!1}function D(){return p.features?.aiStudio!==!1}var O=``.replace(/\/$/,``),k=`${O}/api/v1/marketplace`;function A(e){let t=r.get();return t?{...e,Authorization:`Bearer ${t}`}:e}function j(e,t){let n=e?.error?.code??e?.code??`HTTP_${t.status}`,r=e?.error?.message??e?.error??e?.message??t.statusText;return{code:String(n),message:typeof r==`string`?r:String(n)}}async function M(e,t){let n=await fetch(`${k}${e}`,{credentials:`omit`,headers:{Accept:`application/json`,...t?.headers||{}},...t}),r=null;try{r=await n.json()}catch{}if(!n.ok){let{code:e,message:t}=j(r,n),i=Error(typeof t==`string`?t:`${e}`);throw i.code=e,i.status=n.status,i}return r?.data??r}async function N(e={}){let t=new URLSearchParams;e.q&&t.set(`q`,e.q),e.category&&t.set(`category`,e.category),e.limit!=null&&t.set(`limit`,String(e.limit)),e.offset!=null&&t.set(`offset`,String(e.offset));let n=t.toString();return M(`/packages${n?`?${n}`:``}`)}async function P(e){return M(`/packages/${encodeURIComponent(e)}`)}async function F(e){if(T()){let t=await fetch(`/api/v1/cloud-connection/install`,{method:`POST`,credentials:`include`,headers:A({Accept:`application/json`,"Content-Type":`application/json`}),body:JSON.stringify({package_id:e.packageId,seed_sample_data:!!e.seedSampleData})}),n=null;try{n=await t.json()}catch{}if(!t.ok||n?.success===!1){let{code:e,message:r}=j(n,t),i=Error(typeof r==`string`?r:`${e}`);throw i.code=e,i.status=t.status,i}return n?.data??n}let t=await fetch(`${O}/api/v1/actions/sys_package/install_package`,{method:`POST`,credentials:`include`,headers:{Accept:`application/json`,"Content-Type":`application/json`},body:JSON.stringify({recordId:e.packageId,params:{environment_id:e.environmentId,seed_sample_data:!!e.seedSampleData}})}),n=null;try{n=await t.json()}catch{}let r=n?.data,i=!!r&&typeof r==`object`&&r.success===!1;if(!t.ok||i){let e=j(n,t),a=n?.code??e.code,o=i?r.error??t.statusText:e.message,s=Error(typeof o==`string`?o:`${a}`);throw s.code=a,s.status=t.status,s}return n?.data??n}async function I(){let e=T()||O,t=await fetch(`${e}/api/v1/data/sys_environment?limit=200`,{credentials:`include`,headers:{Accept:`application/json`}});if(!t.ok){let e=Error(`HTTP_${t.status}`);throw e.status=t.status,e}let n=await t.json().catch(()=>({})),r=n?.records??n?.data??n?.items??n??[];return Array.isArray(r)?r:[]}async function L(){let e=T()||O,t=null;try{let n=await fetch(`${e}/api/v1/auth/get-session`,{credentials:`include`,headers:{Accept:`application/json`}});n.ok&&(t=(await n.json().catch(()=>({})))?.user?.id??null)}catch{}if(!t)return new Set;let n=`${e}/api/v1/data/sys_member?limit=200`,r;try{let e=await fetch(n,{credentials:`include`,headers:{Accept:`application/json`}});if(!e.ok)return new Set;r=await e.json().catch(()=>({}))}catch{return new Set}let i=r?.records??r?.data??r?.items??r??[];if(!Array.isArray(i))return new Set;let a=new Set;for(let e of i){if(String(e?.user_id??e?.userId??``)!==t)continue;let n=String(e?.role??``).toLowerCase(),r=e?.organization_id??e?.organizationId;r&&(n===`owner`||n===`admin`)&&a.add(String(r))}return a}function R(e){return`${T()||`https://cloud.objectos.app`}/apps/cloud-control/sys_package/${encodeURIComponent(e)}`}function z(){return`${T()||`https://cloud.objectos.app`}/apps/cloud-control/sys_environment`}async function B(e,t){if(!e)return null;if(T())try{let t=await fetch(`/api/v1/cloud-connection/installation?package_id=${encodeURIComponent(e)}`,{credentials:`include`,headers:A({Accept:`application/json`})});if(!t.ok)return null;let n=await t.json().catch(()=>({})),r=n?.data??n??{};return r.installed?{installationId:String(r.installationId??``),version:String(r.version??`installed`),withSampleData:r.withSampleData===!0}:null}catch{return null}if(!t)return null;let n=O;try{let r=await fetch(`${n}/api/v1/cloud/environments/${encodeURIComponent(t)}/installations/${encodeURIComponent(e)}`,{credentials:`include`,headers:{Accept:`application/json`}});if(!r.ok)return null;let i=await r.json().catch(()=>({})),a=i?.data??i??{};return a.installed?{installationId:String(a.installationId??``),version:String(a.version??`installed`),withSampleData:a.withSampleData===!0}:null}catch{return null}}async function V(e){if(!e)return{ok:!1,error:`installation id required`};let t=T()||O;try{let n=await fetch(`${t}/api/v1/cloud/installations/${encodeURIComponent(e)}/reseed-sample-data`,{method:`POST`,credentials:`include`,headers:{Accept:`application/json`,"Content-Type":`application/json`},body:`{}`}),r=await n.json().catch(()=>({}));return!n.ok||r?.success===!1?{ok:!1,error:j(r,n).message}:{ok:!0}}catch(e){return{ok:!1,error:e?.message||`Network error`}}}async function H(e){if(!e)return{ok:!1,error:`installation id required`};let t=T()||O;try{let n=await fetch(`${t}/api/v1/cloud/installations/${encodeURIComponent(e)}/purge-sample-data`,{method:`POST`,credentials:`include`,headers:{Accept:`application/json`,"Content-Type":`application/json`},body:`{}`}),r=await n.json().catch(()=>({}));return!n.ok||r?.success===!1?{ok:!1,error:j(r,n).message}:{ok:!0,deleted:Number(r?.data?.deleted??0)}}catch(e){return{ok:!1,error:e?.message||`Network error`}}}async function U(){try{let e=await fetch(`${O}/api/v1/cloud-connection/org-packages`,{credentials:`include`,headers:{Accept:`application/json`}});if(!e.ok)return{connected:!1,items:[]};let t=(await e.json().catch(()=>({})))?.data??{},n=Array.isArray(t.items)?t.items:[];return{connected:t.connected===!0,items:n}}catch{return{connected:!1,items:[]}}}async function W(e){let t=await fetch(`${k}/install-local`,{method:`POST`,credentials:`include`,headers:{Accept:`application/json`,"Content-Type":`application/json`},body:JSON.stringify({packageId:e.packageId,...e.versionId?{versionId:e.versionId}:{}})}),n=null;try{n=await t.json()}catch{}if(!t.ok){let{code:e,message:r}=j(n,t),i=Error(typeof r==`string`?r:`${e}`);throw i.code=e,i.status=t.status,i}return n?.data??n}async function G(){try{let e=await fetch(`${k}/install-local`,{credentials:`include`,headers:{Accept:`application/json`}});if(!e.ok)return[];let t=await e.json().catch(()=>({})),n=t?.data?.items??t?.items??[];return Array.isArray(n)?n:[]}catch{return[]}}async function K(){try{let e=await fetch(`${O}/api/v1/cloud-connection/installed`,{credentials:`include`,headers:{Accept:`application/json`}});if(!e.ok)return{connected:!1,items:[]};let t=(await e.json().catch(()=>({})))?.data??{},n=(Array.isArray(t.packages)?t.packages:[]).map(e=>{let t=String(e.packageId??e.package_id??``);return{packageId:t,versionId:String(e.package_version_id??``),manifestId:t,version:String(e.version??`installed`),installedAt:String(e.installed_at??e.installedAt??``),installedBy:e.installed_by??e.installedBy??null,withSampleData:e.with_sample_data===!0||e.withSampleData===!0}});return{connected:t.connected===!0,items:n}}catch{return{connected:!1,items:[]}}}async function q(e){let t=await fetch(`${k}/install-local/${encodeURIComponent(e)}`,{method:`DELETE`,credentials:`include`,headers:{Accept:`application/json`}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(j(e,t).message)}}async function J(e,t){let n=await fetch(`${k}/install-local/${encodeURIComponent(e)}/${t===`reseed`?`reseed-sample-data`:`purge-sample-data`}`,{method:`POST`,credentials:`include`,headers:{Accept:`application/json`}}),r=await n.json().catch(()=>({}));if(!n.ok){let e=r?.error?.message??n.statusText,t=Error(typeof e==`string`?e:`HTTP_${n.status}`);throw t.code=r?.error?.code??`HTTP_${n.status}`,t}return r?.data??r}function Y(e){return J(e,`reseed`)}function X(e){return J(e,`purge`)}var Z=n();function Q(){let n=t(),{appName:r}=e(),{t:a}=i(),u=r?`/apps/${r}`:`/`;return(0,Z.jsx)(`div`,{className:`container mx-auto max-w-2xl px-6 py-16`,children:(0,Z.jsx)(o,{children:(0,Z.jsxs)(c,{className:`flex flex-col items-center gap-4 py-12 text-center`,children:[(0,Z.jsx)(`div`,{className:`rounded-full bg-muted p-3`,children:(0,Z.jsx)(l,{className:`h-6 w-6 text-muted-foreground`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{className:`text-lg font-semibold`,children:a(`marketplace.accessDenied.title`)}),(0,Z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:a(`marketplace.accessDenied.description`)})]}),(0,Z.jsx)(s,{variant:`outline`,onClick:()=>n(u),children:a(`marketplace.action.backHome`)})]})})})}export{E as A,_ as C,g as D,w as E,h as O,y as S,C as T,V as _,P as a,S as b,I as c,G as d,N as f,Y as g,H as h,B as i,D as k,L as l,X as m,R as n,W as o,U as p,z as r,F as s,Q as t,K as u,q as v,v as w,x,T as y};
|