@hotmeshio/long-tail 0.25.1 → 0.25.2
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/build/api/escalations/batch-flag.d.ts +19 -0
- package/build/api/escalations/batch-flag.js +138 -0
- package/build/api/escalations/index.d.ts +2 -0
- package/build/api/escalations/index.js +8 -1
- package/build/api/escalations/roster-action.d.ts +37 -0
- package/build/api/escalations/roster-action.js +179 -0
- package/build/api/scan-codes/choice-roles.d.ts +3 -0
- package/build/api/scan-codes/choice-roles.js +48 -0
- package/build/api/scan-codes/choice.js +8 -0
- package/build/api/scan-codes/fill-labels.d.ts +15 -0
- package/build/api/scan-codes/fill-labels.js +99 -0
- package/build/api/scan-codes/hold.js +1 -0
- package/build/api/scan-codes/present.js +7 -2
- package/build/api/scan-codes/verb-fill.js +22 -5
- package/build/routes/escalations/resolve.js +45 -0
- package/build/sdk/index.d.ts +11 -0
- package/build/sdk/index.js +3 -0
- package/build/services/escalation/batch-flag.d.ts +25 -0
- package/build/services/escalation/batch-flag.js +51 -0
- package/build/services/escalation/index.d.ts +1 -0
- package/build/services/escalation/index.js +1 -0
- package/build/services/escalation/roster.d.ts +3 -1
- package/build/services/escalation/roster.js +6 -1
- package/build/services/scan-code/validate-subject.js +16 -0
- package/build/services/scan-code/validate.js +7 -0
- package/build/shared/form-validation/index.d.ts +1 -0
- package/build/shared/form-validation/index.js +1 -0
- package/build/shared/form-validation/x-lt-actions.d.ts +80 -0
- package/build/shared/form-validation/x-lt-actions.js +133 -0
- package/build/shared/form-validation/x-lt-roster.d.ts +2 -0
- package/build/shared/form-validation/x-lt-roster.js +28 -3
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/escalation.d.ts +19 -0
- package/build/types/escalation.js +4 -0
- package/build/types/index.d.ts +1 -1
- package/build/types/scan-choice.d.ts +9 -0
- package/build/types/scan-code/response.d.ts +2 -0
- package/build/types/scan-code/rule.d.ts +17 -0
- package/dashboard/dist/assets/{AdminDashboard-C_0ShYrm.js → AdminDashboard-B8MqNLiB.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-C_0ShYrm.js.map → AdminDashboard-B8MqNLiB.js.map} +1 -1
- package/dashboard/dist/assets/{AgentConfigPage-Cc9dI8lO.js → AgentConfigPage-Yg81Eiuo.js} +2 -2
- package/dashboard/dist/assets/{AgentConfigPage-Cc9dI8lO.js.map → AgentConfigPage-Yg81Eiuo.js.map} +1 -1
- package/dashboard/dist/assets/{AgentDetailPage-Sdmt5j-k.js → AgentDetailPage-ZUGYEONO.js} +3 -3
- package/dashboard/dist/assets/{AgentDetailPage-Sdmt5j-k.js.map → AgentDetailPage-ZUGYEONO.js.map} +1 -1
- package/dashboard/dist/assets/{AgentsPage-BuzXc1mg.js → AgentsPage-CZIWMwak.js} +2 -2
- package/dashboard/dist/assets/{AgentsPage-BuzXc1mg.js.map → AgentsPage-CZIWMwak.js.map} +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-BVtpc4xO.js +2 -0
- package/dashboard/dist/assets/{AvailableEscalationsPage-DU84iaBN.js.map → AvailableEscalationsPage-BVtpc4xO.js.map} +1 -1
- package/dashboard/dist/assets/{BotPicker-Ci5PUrkl.js → BotPicker-8bf0yOCT.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-Ci5PUrkl.js.map → BotPicker-8bf0yOCT.js.map} +1 -1
- package/dashboard/dist/assets/{BulkAssignModal-PLx7SLvF.js → BulkAssignModal-B2lr1J6P.js} +2 -2
- package/dashboard/dist/assets/{BulkAssignModal-PLx7SLvF.js.map → BulkAssignModal-B2lr1J6P.js.map} +1 -1
- package/dashboard/dist/assets/{CapabilitiesPage-DuSfgr6i.js → CapabilitiesPage-BQQBR2sj.js} +2 -2
- package/dashboard/dist/assets/{CapabilitiesPage-DuSfgr6i.js.map → CapabilitiesPage-BQQBR2sj.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-KOO37qs6.js → CollapsibleSection-DFW8TYyU.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-KOO37qs6.js.map → CollapsibleSection-DFW8TYyU.js.map} +1 -1
- package/dashboard/dist/assets/{ConfirmDeleteModal-CI1eE-Nr.js → ConfirmDeleteModal-DGlOlQAo.js} +2 -2
- package/dashboard/dist/assets/{ConfirmDeleteModal-CI1eE-Nr.js.map → ConfirmDeleteModal-DGlOlQAo.js.map} +1 -1
- package/dashboard/dist/assets/{ConnectedAppsPage-DZgbCC0G.js → ConnectedAppsPage-CIM9gzHj.js} +2 -2
- package/dashboard/dist/assets/{ConnectedAppsPage-DZgbCC0G.js.map → ConnectedAppsPage-CIM9gzHj.js.map} +1 -1
- package/dashboard/dist/assets/{CountdownTimer-C-Ngk8oq.js → CountdownTimer-BD_iWm6S.js} +2 -2
- package/dashboard/dist/assets/{CountdownTimer-C-Ngk8oq.js.map → CountdownTimer-BD_iWm6S.js.map} +1 -1
- package/dashboard/dist/assets/{CredentialsPage-BR7s6eVu.js → CredentialsPage-CTtUkvoD.js} +2 -2
- package/dashboard/dist/assets/{CredentialsPage-BR7s6eVu.js.map → CredentialsPage-CTtUkvoD.js.map} +1 -1
- package/dashboard/dist/assets/{CronLabel-BQ7Y1Nfd.js → CronLabel-rZMptkYQ.js} +2 -2
- package/dashboard/dist/assets/{CronLabel-BQ7Y1Nfd.js.map → CronLabel-rZMptkYQ.js.map} +1 -1
- package/dashboard/dist/assets/{DropZone-DCZpORx-.js → DropZone-u1JGfR9G.js} +2 -2
- package/dashboard/dist/assets/{DropZone-DCZpORx-.js.map → DropZone-u1JGfR9G.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-BT49mUIc.js → ElapsedCell-CmK9gHC5.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-BT49mUIc.js.map → ElapsedCell-CmK9gHC5.js.map} +1 -1
- package/dashboard/dist/assets/{EntityTimelinePanel-BtARWy3R.js → EntityTimelinePanel-Cfg0EMZs.js} +2 -2
- package/dashboard/dist/assets/{EntityTimelinePanel-BtARWy3R.js.map → EntityTimelinePanel-Cfg0EMZs.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationListSchemaPage-EEBsNpTe.js → EscalationListSchemaPage-CPcbC1-9.js} +2 -2
- package/dashboard/dist/assets/{EscalationListSchemaPage-EEBsNpTe.js.map → EscalationListSchemaPage-CPcbC1-9.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationSchemaPage-BHSC46Ow.js → EscalationSchemaPage-BsYdNVN7.js} +3 -3
- package/dashboard/dist/assets/{EscalationSchemaPage-BHSC46Ow.js.map → EscalationSchemaPage-BsYdNVN7.js.map} +1 -1
- package/dashboard/dist/assets/EscalationTimeline-D1enxZDs.js +2 -0
- package/dashboard/dist/assets/{EscalationTimeline-BWTUBxUf.js.map → EscalationTimeline-D1enxZDs.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationTitleSelect-DOsfY4u8.js → EscalationTitleSelect-DwqhnPKX.js} +2 -2
- package/dashboard/dist/assets/{EscalationTitleSelect-DOsfY4u8.js.map → EscalationTitleSelect-DwqhnPKX.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-Bl8g53x-.js → EscalationsOverview-ChuKh02E.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-Bl8g53x-.js.map → EscalationsOverview-ChuKh02E.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-Bjx17W_i.js → EventTable-GqZIKPce.js} +2 -2
- package/dashboard/dist/assets/{EventTable-Bjx17W_i.js.map → EventTable-GqZIKPce.js.map} +1 -1
- package/dashboard/dist/assets/{FilterBar-Dnse0soD.js → FilterBar-CqPFZkVU.js} +2 -2
- package/dashboard/dist/assets/{FilterBar-Dnse0soD.js.map → FilterBar-CqPFZkVU.js.map} +1 -1
- package/dashboard/dist/assets/{GraphInvokePage-HQEvbHTd.js → GraphInvokePage-_fB7mtBU.js} +2 -2
- package/dashboard/dist/assets/{GraphInvokePage-HQEvbHTd.js.map → GraphInvokePage-_fB7mtBU.js.map} +1 -1
- package/dashboard/dist/assets/{HomePage-DizTklVg.js → HomePage-BXA0Cz0F.js} +2 -2
- package/dashboard/dist/assets/{HomePage-DizTklVg.js.map → HomePage-BXA0Cz0F.js.map} +1 -1
- package/dashboard/dist/assets/{ListToolbar-B0qe2QZ5.js → ListToolbar-Bf4DFITI.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-B0qe2QZ5.js.map → ListToolbar-Bf4DFITI.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-DmH-qtX9.js → McpOverview-H61XQRji.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-DmH-qtX9.js.map → McpOverview-H61XQRji.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryDetailPage-B-qtmwLd.js → McpQueryDetailPage-wbwK8WWq.js} +2 -2
- package/dashboard/dist/assets/{McpQueryDetailPage-B-qtmwLd.js.map → McpQueryDetailPage-wbwK8WWq.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryPage-DX1T-Ugq.js → McpQueryPage-CYvVEk3G.js} +2 -2
- package/dashboard/dist/assets/{McpQueryPage-DX1T-Ugq.js.map → McpQueryPage-CYvVEk3G.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunDetailPage-DNdl10nB.js → McpRunDetailPage-TZBX68i4.js} +2 -2
- package/dashboard/dist/assets/{McpRunDetailPage-DNdl10nB.js.map → McpRunDetailPage-TZBX68i4.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunsPage-DVXVB4AJ.js → McpRunsPage-Cu91Mh52.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-DVXVB4AJ.js.map → McpRunsPage-Cu91Mh52.js.map} +1 -1
- package/dashboard/dist/assets/{NamespacePill-CSZT2fA4.js → NamespacePill-C5epAgq6.js} +2 -2
- package/dashboard/dist/assets/{NamespacePill-CSZT2fA4.js.map → NamespacePill-C5epAgq6.js.map} +1 -1
- package/dashboard/dist/assets/{OperationsPage-BxgWQq8v.js → OperationsPage-D-6sKw6y.js} +2 -2
- package/dashboard/dist/assets/{OperationsPage-BxgWQq8v.js.map → OperationsPage-D-6sKw6y.js.map} +1 -1
- package/dashboard/dist/assets/OperatorDashboard-DD8JUU3L.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-Cw86vOPg.js.map → OperatorDashboard-DD8JUU3L.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeader-C4z1ExF7.js → PageHeader-BSWIspNB.js} +2 -2
- package/dashboard/dist/assets/{PageHeader-C4z1ExF7.js.map → PageHeader-BSWIspNB.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeaderWithStats-B_f_Sz_Q.js → PageHeaderWithStats-DDjopQ-k.js} +2 -2
- package/dashboard/dist/assets/{PageHeaderWithStats-B_f_Sz_Q.js.map → PageHeaderWithStats-DDjopQ-k.js.map} +1 -1
- package/dashboard/dist/assets/{PersonaDetailPage-BTIJ4A6p.js → PersonaDetailPage-CGri6okV.js} +2 -2
- package/dashboard/dist/assets/{PersonaDetailPage-BTIJ4A6p.js.map → PersonaDetailPage-CGri6okV.js.map} +1 -1
- package/dashboard/dist/assets/{PersonasPage-D11PokPb.js → PersonasPage-DtHW6-Qx.js} +2 -2
- package/dashboard/dist/assets/{PersonasPage-D11PokPb.js.map → PersonasPage-DtHW6-Qx.js.map} +1 -1
- package/dashboard/dist/assets/PortalPage-Dgbk_mzr.js +2 -0
- package/dashboard/dist/assets/{PortalPage-1rXm0cNK.js.map → PortalPage-Dgbk_mzr.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessDetailPage-Cp5-969g.js → ProcessDetailPage-BdkacBrD.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-Cp5-969g.js.map → ProcessDetailPage-BdkacBrD.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-assXQe-x.js → ProcessesListPage-DO5A-OfZ.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-assXQe-x.js.map → ProcessesListPage-DO5A-OfZ.js.map} +1 -1
- package/dashboard/dist/assets/ResolverForm-CqGE5lf-.js +8 -0
- package/dashboard/dist/assets/ResolverForm-CqGE5lf-.js.map +1 -0
- package/dashboard/dist/assets/{RoleDetailPage-c_Qij0Tf.js → RoleDetailPage-DgVp0Hih.js} +2 -2
- package/dashboard/dist/assets/{RoleDetailPage-c_Qij0Tf.js.map → RoleDetailPage-DgVp0Hih.js.map} +1 -1
- package/dashboard/dist/assets/{RolePill-Bw_n7EpR.js → RolePill-CoETDpjF.js} +2 -2
- package/dashboard/dist/assets/{RolePill-Bw_n7EpR.js.map → RolePill-CoETDpjF.js.map} +1 -1
- package/dashboard/dist/assets/{RolesPage-D4oaYgTg.js → RolesPage-BmsWq83e.js} +2 -2
- package/dashboard/dist/assets/{RolesPage-D4oaYgTg.js.map → RolesPage-BmsWq83e.js.map} +1 -1
- package/dashboard/dist/assets/RosterWidget-DR-T4Izu.js +2 -0
- package/dashboard/dist/assets/RosterWidget-DR-T4Izu.js.map +1 -0
- package/dashboard/dist/assets/{RunAsSelector-Fptil_sB.js → RunAsSelector-CyUWGp5P.js} +2 -2
- package/dashboard/dist/assets/{RunAsSelector-Fptil_sB.js.map → RunAsSelector-CyUWGp5P.js.map} +1 -1
- package/dashboard/dist/assets/{ScanCodesPage-BeZA_YJW.js → ScanCodesPage-Cy05JOt4.js} +2 -2
- package/dashboard/dist/assets/{ScanCodesPage-BeZA_YJW.js.map → ScanCodesPage-Cy05JOt4.js.map} +1 -1
- package/dashboard/dist/assets/{ScanSchemeDetailPage-Bxi15xNr.js → ScanSchemeDetailPage-BX1afzOg.js} +2 -2
- package/dashboard/dist/assets/{ScanSchemeDetailPage-Bxi15xNr.js.map → ScanSchemeDetailPage-BX1afzOg.js.map} +1 -1
- package/dashboard/dist/assets/ScanStationPage-DLAB41tb.js +2 -0
- package/dashboard/dist/assets/ScanStationPage-DLAB41tb.js.map +1 -0
- package/dashboard/dist/assets/{ScopeBadge-CKgfwTy3.js → ScopeBadge-CGsTtqFr.js} +2 -2
- package/dashboard/dist/assets/{ScopeBadge-CKgfwTy3.js.map → ScopeBadge-CGsTtqFr.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-C2drZk7w.js → StickyPagination-BzUTnYYE.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-C2drZk7w.js.map → StickyPagination-BzUTnYYE.js.map} +1 -1
- package/dashboard/dist/assets/{StreamMessageDetail-x-l5653y.js → StreamMessageDetail-D0W1ekgG.js} +2 -2
- package/dashboard/dist/assets/{StreamMessageDetail-x-l5653y.js.map → StreamMessageDetail-D0W1ekgG.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-Ds_CqLXL.js → SwimlaneTimeline-BPBwmwuO.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-Ds_CqLXL.js.map → SwimlaneTimeline-BPBwmwuO.js.map} +1 -1
- package/dashboard/dist/assets/{TagInput-B6fMAqxd.js → TagInput-S7UuVT_M.js} +2 -2
- package/dashboard/dist/assets/{TagInput-B6fMAqxd.js.map → TagInput-S7UuVT_M.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-BJGKEnIo.js → TaskDetailPage-VuaIXISy.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-BJGKEnIo.js.map → TaskDetailPage-VuaIXISy.js.map} +1 -1
- package/dashboard/dist/assets/{TaskQueuePill-BnDp_DE6.js → TaskQueuePill-BlHNpYiZ.js} +2 -2
- package/dashboard/dist/assets/{TaskQueuePill-BnDp_DE6.js.map → TaskQueuePill-BlHNpYiZ.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-DyLaZvTT.js → TasksListPage-KaUSoqos.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-DyLaZvTT.js.map → TasksListPage-KaUSoqos.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-B_Ta97uy.js → TimeAgo-C_E6u0fr.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-B_Ta97uy.js.map → TimeAgo-C_E6u0fr.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-CiTYBQw-.js → TimestampCell-CUJiAmax.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-CiTYBQw-.js.map → TimestampCell-CUJiAmax.js.map} +1 -1
- package/dashboard/dist/assets/{ToolPill-BRZWo4l8.js → ToolPill-D40uLM_v.js} +2 -2
- package/dashboard/dist/assets/{ToolPill-BRZWo4l8.js.map → ToolPill-D40uLM_v.js.map} +1 -1
- package/dashboard/dist/assets/{ToolTestPanel-Dw8Zu6xr.js → ToolTestPanel-Ch5nQANh.js} +2 -2
- package/dashboard/dist/assets/{ToolTestPanel-Dw8Zu6xr.js.map → ToolTestPanel-Ch5nQANh.js.map} +1 -1
- package/dashboard/dist/assets/{TopicDetailPage-DPMAWKTN.js → TopicDetailPage-BprToO7w.js} +2 -2
- package/dashboard/dist/assets/{TopicDetailPage-DPMAWKTN.js.map → TopicDetailPage-BprToO7w.js.map} +1 -1
- package/dashboard/dist/assets/{TopicsPage-0Z2lAE0d.js → TopicsPage-8SmCnQ-E.js} +2 -2
- package/dashboard/dist/assets/{TopicsPage-0Z2lAE0d.js.map → TopicsPage-8SmCnQ-E.js.map} +1 -1
- package/dashboard/dist/assets/{UserName-DrAbCpdY.js → UserName-BkJryunF.js} +2 -2
- package/dashboard/dist/assets/{UserName-DrAbCpdY.js.map → UserName-BkJryunF.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowExecutionPage-DQITqX-6.js → WorkflowExecutionPage-B2S5ODie.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-DQITqX-6.js.map → WorkflowExecutionPage-B2S5ODie.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowPill-Cly9Ln_3.js → WorkflowPill-DJLcK_CM.js} +2 -2
- package/dashboard/dist/assets/{WorkflowPill-Cly9Ln_3.js.map → WorkflowPill-DJLcK_CM.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsDashboard-CMJPiR6G.js → WorkflowsDashboard-CABuRCXp.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-CMJPiR6G.js.map → WorkflowsDashboard-CABuRCXp.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-DwVMLe1y.js → WorkflowsOverview-BPUHAj8T.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-DwVMLe1y.js.map → WorkflowsOverview-BPUHAj8T.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-Do6s_wmW.js → YamlWorkflowDetailPage-DZGjT-Tl.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-Do6s_wmW.js.map → YamlWorkflowDetailPage-DZGjT-Tl.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowsPage-8Sr6rZMZ.js → YamlWorkflowsPage-DIxHURlM.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowsPage-8Sr6rZMZ.js.map → YamlWorkflowsPage-DIxHURlM.js.map} +1 -1
- package/dashboard/dist/assets/{agents-Maom-dbf.js → agents-BnDp2rcb.js} +2 -2
- package/dashboard/dist/assets/{agents-Maom-dbf.js.map → agents-BnDp2rcb.js.map} +1 -1
- package/dashboard/dist/assets/{bots-BESWftTA.js → bots-maURYoyr.js} +2 -2
- package/dashboard/dist/assets/{bots-BESWftTA.js.map → bots-maURYoyr.js.map} +1 -1
- package/dashboard/dist/assets/{capabilities-BnvJAmFQ.js → capabilities-5-TakMUh.js} +2 -2
- package/dashboard/dist/assets/{capabilities-BnvJAmFQ.js.map → capabilities-5-TakMUh.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-Cu7TD1RX.js → controlplane-BXVVTWoh.js} +2 -2
- package/dashboard/dist/assets/{controlplane-Cu7TD1RX.js.map → controlplane-BXVVTWoh.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-v8gx8wFb.js +2 -0
- package/dashboard/dist/assets/{escalation-columns-BPSH8qMx.js.map → escalation-columns-v8gx8wFb.js.map} +1 -1
- package/dashboard/dist/assets/escalation-items-OWntjDaH.js +2 -0
- package/dashboard/dist/assets/escalation-items-OWntjDaH.js.map +1 -0
- package/dashboard/dist/assets/{index-BkVarz6E.js → index-BIfY4mR2.js} +2 -2
- package/dashboard/dist/assets/{index-BkVarz6E.js.map → index-BIfY4mR2.js.map} +1 -1
- package/dashboard/dist/assets/{index-WA8py2Yc.js → index-BTm3-qwq.js} +2 -2
- package/dashboard/dist/assets/{index-WA8py2Yc.js.map → index-BTm3-qwq.js.map} +1 -1
- package/dashboard/dist/assets/{index-B4SNhwgt.js → index-CR9rhAvN.js} +2 -2
- package/dashboard/dist/assets/{index-B4SNhwgt.js.map → index-CR9rhAvN.js.map} +1 -1
- package/dashboard/dist/assets/index-CWKs10VQ.js +13 -0
- package/dashboard/dist/assets/{index-qY2KDGkM.js.map → index-CWKs10VQ.js.map} +1 -1
- package/dashboard/dist/assets/index-CvKegIVe.js +3 -0
- package/dashboard/dist/assets/{index-kGSUZCOb.js.map → index-CvKegIVe.js.map} +1 -1
- package/dashboard/dist/assets/{index-BLbZsMRG.js → index-D7peGNN0.js} +10 -10
- package/dashboard/dist/assets/index-D7peGNN0.js.map +1 -0
- package/dashboard/dist/assets/{index-BvI2_dSt.js → index-D_ojXTgO.js} +2 -2
- package/dashboard/dist/assets/{index-BvI2_dSt.js.map → index-D_ojXTgO.js.map} +1 -1
- package/dashboard/dist/assets/index-Dafrbwk_.js +2 -0
- package/dashboard/dist/assets/{index-AJNPDsTI.js.map → index-Dafrbwk_.js.map} +1 -1
- package/dashboard/dist/assets/{index-BpWutGxS.js → index-Dk7nwVpm.js} +2 -2
- package/dashboard/dist/assets/{index-BpWutGxS.js.map → index-Dk7nwVpm.js.map} +1 -1
- package/dashboard/dist/assets/{index-_yHsJJTS.js → index-DvkcyTE2.js} +2 -2
- package/dashboard/dist/assets/{index-_yHsJJTS.js.map → index-DvkcyTE2.js.map} +1 -1
- package/dashboard/dist/assets/{index-BLlg1aVG.js → index-WPVpyoD3.js} +2 -2
- package/dashboard/dist/assets/{index-BLlg1aVG.js.map → index-WPVpyoD3.js.map} +1 -1
- package/dashboard/dist/assets/{index-D5JQweUm.js → index-YGTGxcTF.js} +2 -2
- package/dashboard/dist/assets/{index-D5JQweUm.js.map → index-YGTGxcTF.js.map} +1 -1
- package/dashboard/dist/assets/{index-BG7OpNg7.js → index-vgHzaGmW.js} +2 -2
- package/dashboard/dist/assets/{index-BG7OpNg7.js.map → index-vgHzaGmW.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-DCFRNG8R.js → knowledge-L_zY1zmy.js} +2 -2
- package/dashboard/dist/assets/{knowledge-DCFRNG8R.js.map → knowledge-L_zY1zmy.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-Wt8z6yAL.js → mcp-query-CFbGudkb.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-Wt8z6yAL.js.map → mcp-query-CFbGudkb.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-CZhOocmN.js → mcp-wCWFRA0T.js} +2 -2
- package/dashboard/dist/assets/{mcp-CZhOocmN.js.map → mcp-wCWFRA0T.js.map} +1 -1
- package/dashboard/dist/assets/{personas-D2_foqJm.js → personas-B_VIacZJ.js} +2 -2
- package/dashboard/dist/assets/{personas-D2_foqJm.js.map → personas-B_VIacZJ.js.map} +1 -1
- package/dashboard/dist/assets/{pipelines-Bb159fNz.js → pipelines-Bv0Z8xQA.js} +2 -2
- package/dashboard/dist/assets/{pipelines-Bb159fNz.js.map → pipelines-Bv0Z8xQA.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-xAU6C6tb.js → tasks-DP6yaNZs.js} +2 -2
- package/dashboard/dist/assets/{tasks-xAU6C6tb.js.map → tasks-DP6yaNZs.js.map} +1 -1
- package/dashboard/dist/assets/{topics-DFdqb2Te.js → topics-UBSIcpSR.js} +2 -2
- package/dashboard/dist/assets/{topics-DFdqb2Te.js.map → topics-UBSIcpSR.js.map} +1 -1
- package/dashboard/dist/assets/{useDebouncedValue-CbHmpS4w.js → useDebouncedValue-R62q3Xpx.js} +2 -2
- package/dashboard/dist/assets/{useDebouncedValue-CbHmpS4w.js.map → useDebouncedValue-R62q3Xpx.js.map} +1 -1
- package/dashboard/dist/assets/{useNamespace-B_00X1yb.js → useNamespace-CAaszJDE.js} +2 -2
- package/dashboard/dist/assets/{useNamespace-B_00X1yb.js.map → useNamespace-CAaszJDE.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-B4F-s9g0.js → useYamlActivityEvents-emCp9U69.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-B4F-s9g0.js.map → useYamlActivityEvents-emCp9U69.js.map} +1 -1
- package/dashboard/dist/assets/validate-C7yskdEn.js +2 -0
- package/dashboard/dist/assets/validate-C7yskdEn.js.map +1 -0
- package/dashboard/dist/assets/{vendor-icons-C_DQEeBy.js → vendor-icons-DUYcKTjP.js} +2 -2
- package/dashboard/dist/assets/{vendor-icons-C_DQEeBy.js.map → vendor-icons-DUYcKTjP.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-DyjbPFVp.js → yaml-workflows-C2sOwz1p.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-DyjbPFVp.js.map → yaml-workflows-C2sOwz1p.js.map} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/docs/accumulator.md +1 -1
- package/docs/api/http/escalations.md +33 -0
- package/docs/api/sdk/escalations.md +26 -1
- package/docs/hitl/escalation.md +9 -0
- package/docs/hitl/x-lt-embed.md +2 -0
- package/docs/hitl/x-lt-roster.md +31 -7
- package/docs/scan-codes.md +45 -3
- package/package.json +2 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-DU84iaBN.js +0 -2
- package/dashboard/dist/assets/EscalationTimeline-BWTUBxUf.js +0 -2
- package/dashboard/dist/assets/FormattedValue-DeVrRJy4.js +0 -2
- package/dashboard/dist/assets/FormattedValue-DeVrRJy4.js.map +0 -1
- package/dashboard/dist/assets/OperatorDashboard-Cw86vOPg.js +0 -2
- package/dashboard/dist/assets/PortalPage-1rXm0cNK.js +0 -2
- package/dashboard/dist/assets/ResolverForm-CMzNjmGG.js +0 -8
- package/dashboard/dist/assets/ResolverForm-CMzNjmGG.js.map +0 -1
- package/dashboard/dist/assets/ScanStationPage-t5Bz957t.js +0 -2
- package/dashboard/dist/assets/ScanStationPage-t5Bz957t.js.map +0 -1
- package/dashboard/dist/assets/escalation-columns-BPSH8qMx.js +0 -2
- package/dashboard/dist/assets/escalation-items-uDQTphVW.js +0 -2
- package/dashboard/dist/assets/escalation-items-uDQTphVW.js.map +0 -1
- package/dashboard/dist/assets/index-AJNPDsTI.js +0 -2
- package/dashboard/dist/assets/index-BLbZsMRG.js.map +0 -1
- package/dashboard/dist/assets/index-kGSUZCOb.js +0 -3
- package/dashboard/dist/assets/index-qY2KDGkM.js +0 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as l,b as a,c as s}from"./vendor-query-DvWWuNIB.js";import{m as r}from"./index-
|
|
2
|
-
//# sourceMappingURL=yaml-workflows-
|
|
1
|
+
import{u as l,b as a,c as s}from"./vendor-query-DvWWuNIB.js";import{m as r}from"./index-D7peGNN0.js";function f(e={}){const o=new URLSearchParams;return e.status&&o.set("status",e.status),e.graph_topic&&o.set("graph_topic",e.graph_topic),e.app_id&&o.set("app_id",e.app_id),e.search&&o.set("search",e.search),e.set_id&&o.set("set_id",e.set_id),e.limit&&o.set("limit",String(e.limit)),e.offset!==void 0&&o.set("offset",String(e.offset)),l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows?${o}`)})}function m(){return l({queryKey:["yamlWorkflowAppIds"],queryFn:()=>r("/yaml-workflows/app-ids")})}function c(e){return l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows/${e}`),enabled:!!e})}function w(){const e=a();return s({mutationFn:o=>r("/yaml-workflows",{method:"POST",body:JSON.stringify(o)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function k(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/deploy`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function p(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/activate`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function d(){const e=a();return s({mutationFn:({id:o,data:t,sync:n,execute_as:u})=>r(`/yaml-workflows/${o}/invoke`,{method:"POST",body:JSON.stringify({data:t,sync:n,...u?{execute_as:u}:{}})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function h(){const e=a();return s({mutationFn:({id:o,task_queue:t,compilation_feedback:n})=>r(`/yaml-workflows/${o}/regenerate`,{method:"POST",body:JSON.stringify({task_queue:t,compilation_feedback:n})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function q(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/archive`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function W(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/restore`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"}),e.invalidateQueries({queryKey:["yamlWorkflow"],refetchType:"all"})}})}function S(){const e=a();return s({mutationFn:({id:o,...t})=>r(`/yaml-workflows/${o}`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function v(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function T(e){return l({queryKey:["yamlWorkflows",e,"versions"],queryFn:()=>r(`/yaml-workflows/${e}/versions`),enabled:!!e})}function F(e,o){return l({queryKey:["yamlWorkflows",e,"versions",o],queryFn:()=>r(`/yaml-workflows/${e}/versions/${o}`),enabled:!!e&&o!==null})}export{m as a,S as b,c,T as d,k as e,p as f,q as g,W as h,v as i,h as j,F as k,d as l,w as m,f as u};
|
|
2
|
+
//# sourceMappingURL=yaml-workflows-C2sOwz1p.js.map
|
package/dashboard/dist/assets/{yaml-workflows-DyjbPFVp.js.map → yaml-workflows-C2sOwz1p.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml-workflows-DyjbPFVp.js","sources":["../../src/api/yaml-workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { LTYamlWorkflowRecord, LTYamlWorkflowStatus, LTYamlWorkflowVersion } from './types';\n\ninterface YamlWorkflowListResponse {\n workflows: LTYamlWorkflowRecord[];\n total: number;\n}\n\ninterface YamlWorkflowFilters {\n status?: LTYamlWorkflowStatus;\n graph_topic?: string;\n app_id?: string;\n search?: string;\n set_id?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useYamlWorkflows(filters: YamlWorkflowFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.graph_topic) params.set('graph_topic', filters.graph_topic);\n if (filters.app_id) params.set('app_id', filters.app_id);\n if (filters.search) params.set('search', filters.search);\n if (filters.set_id) params.set('set_id', filters.set_id);\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', filters],\n queryFn: () => apiFetch(`/yaml-workflows?${params}`),\n });\n}\n\nexport function useYamlWorkflowAppIds() {\n return useQuery<{ app_ids: string[] }>({\n queryKey: ['yamlWorkflowAppIds'],\n queryFn: () => apiFetch('/yaml-workflows/app-ids'),\n });\n}\n\nexport function useYamlWorkflowByTopic(graphTopic: string | undefined, appId?: string) {\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', 'byTopic', graphTopic, appId],\n queryFn: () => {\n const params = new URLSearchParams({ graph_topic: graphTopic!, limit: '1' });\n if (appId) params.set('app_id', appId);\n return apiFetch(`/yaml-workflows?${params}`);\n },\n enabled: !!graphTopic,\n });\n}\n\nexport function useYamlWorkflow(id: string) {\n return useQuery<LTYamlWorkflowRecord>({\n queryKey: ['yamlWorkflows', id],\n queryFn: () => apiFetch(`/yaml-workflows/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (input: {\n workflow_id: string;\n task_queue: string;\n workflow_name: string;\n name: string;\n description?: string;\n app_id?: string;\n subscribes?: string;\n tags?: string[];\n compilation_feedback?: string;\n }) =>\n apiFetch<LTYamlWorkflowRecord>('/yaml-workflows', {\n method: 'POST',\n body: JSON.stringify(input),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeployYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/deploy`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useActivateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/activate`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, data, sync, execute_as }: { id: string; data: Record<string, unknown>; sync?: boolean; execute_as?: string }) =>\n apiFetch<{ result?: unknown; job_id?: string }>(`/yaml-workflows/${id}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, sync, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRegenerateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, task_queue, compilation_feedback }: { id: string; task_queue?: string; compilation_feedback?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/regenerate`, {\n method: 'POST',\n body: JSON.stringify({ task_queue, compilation_feedback }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useArchiveYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/archive`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRestoreYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/restore`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflow'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpdateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, ...updates }: { id: string; yaml_content?: string; name?: string; description?: string; input_schema?: Record<string, unknown>; output_schema?: Record<string, unknown>; tags?: string[]; app_id?: string; graph_topic?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify(updates),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<{ deleted: boolean }>(`/yaml-workflows/${id}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Cron scheduling ─────────────────────────────────────────────\n\nexport function useSetYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, cron_schedule, cron_envelope, execute_as }: {\n id: string;\n cron_schedule: string;\n cron_envelope?: Record<string, unknown> | null;\n execute_as?: string | null;\n }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'PUT',\n body: JSON.stringify({ cron_schedule, cron_envelope, execute_as }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useClearYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Version history ─────────────────────────────────────────────\n\nexport function useYamlWorkflowVersions(id: string) {\n return useQuery<{ versions: LTYamlWorkflowVersion[]; total: number }>({\n queryKey: ['yamlWorkflows', id, 'versions'],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions`),\n enabled: !!id,\n });\n}\n\nexport function useYamlWorkflowVersion(id: string, version: number | null) {\n return useQuery<LTYamlWorkflowVersion>({\n queryKey: ['yamlWorkflows', id, 'versions', version],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions/${version}`),\n enabled: !!id && version !== null,\n });\n}\n"],"names":["useYamlWorkflows","filters","params","useQuery","apiFetch","useYamlWorkflowAppIds","useYamlWorkflow","id","useCreateYamlWorkflow","queryClient","useQueryClient","useMutation","input","useDeployYamlWorkflow","useActivateYamlWorkflow","useInvokeYamlWorkflow","data","sync","execute_as","useRegenerateYamlWorkflow","task_queue","compilation_feedback","useArchiveYamlWorkflow","useRestoreYamlWorkflow","useUpdateYamlWorkflow","updates","useDeleteYamlWorkflow","useYamlWorkflowVersions","useYamlWorkflowVersion","version"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"yaml-workflows-C2sOwz1p.js","sources":["../../src/api/yaml-workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { LTYamlWorkflowRecord, LTYamlWorkflowStatus, LTYamlWorkflowVersion } from './types';\n\ninterface YamlWorkflowListResponse {\n workflows: LTYamlWorkflowRecord[];\n total: number;\n}\n\ninterface YamlWorkflowFilters {\n status?: LTYamlWorkflowStatus;\n graph_topic?: string;\n app_id?: string;\n search?: string;\n set_id?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useYamlWorkflows(filters: YamlWorkflowFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.graph_topic) params.set('graph_topic', filters.graph_topic);\n if (filters.app_id) params.set('app_id', filters.app_id);\n if (filters.search) params.set('search', filters.search);\n if (filters.set_id) params.set('set_id', filters.set_id);\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', filters],\n queryFn: () => apiFetch(`/yaml-workflows?${params}`),\n });\n}\n\nexport function useYamlWorkflowAppIds() {\n return useQuery<{ app_ids: string[] }>({\n queryKey: ['yamlWorkflowAppIds'],\n queryFn: () => apiFetch('/yaml-workflows/app-ids'),\n });\n}\n\nexport function useYamlWorkflowByTopic(graphTopic: string | undefined, appId?: string) {\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', 'byTopic', graphTopic, appId],\n queryFn: () => {\n const params = new URLSearchParams({ graph_topic: graphTopic!, limit: '1' });\n if (appId) params.set('app_id', appId);\n return apiFetch(`/yaml-workflows?${params}`);\n },\n enabled: !!graphTopic,\n });\n}\n\nexport function useYamlWorkflow(id: string) {\n return useQuery<LTYamlWorkflowRecord>({\n queryKey: ['yamlWorkflows', id],\n queryFn: () => apiFetch(`/yaml-workflows/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (input: {\n workflow_id: string;\n task_queue: string;\n workflow_name: string;\n name: string;\n description?: string;\n app_id?: string;\n subscribes?: string;\n tags?: string[];\n compilation_feedback?: string;\n }) =>\n apiFetch<LTYamlWorkflowRecord>('/yaml-workflows', {\n method: 'POST',\n body: JSON.stringify(input),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeployYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/deploy`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useActivateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/activate`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, data, sync, execute_as }: { id: string; data: Record<string, unknown>; sync?: boolean; execute_as?: string }) =>\n apiFetch<{ result?: unknown; job_id?: string }>(`/yaml-workflows/${id}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, sync, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRegenerateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, task_queue, compilation_feedback }: { id: string; task_queue?: string; compilation_feedback?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/regenerate`, {\n method: 'POST',\n body: JSON.stringify({ task_queue, compilation_feedback }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useArchiveYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/archive`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRestoreYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/restore`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflow'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpdateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, ...updates }: { id: string; yaml_content?: string; name?: string; description?: string; input_schema?: Record<string, unknown>; output_schema?: Record<string, unknown>; tags?: string[]; app_id?: string; graph_topic?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify(updates),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<{ deleted: boolean }>(`/yaml-workflows/${id}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Cron scheduling ─────────────────────────────────────────────\n\nexport function useSetYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, cron_schedule, cron_envelope, execute_as }: {\n id: string;\n cron_schedule: string;\n cron_envelope?: Record<string, unknown> | null;\n execute_as?: string | null;\n }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'PUT',\n body: JSON.stringify({ cron_schedule, cron_envelope, execute_as }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useClearYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Version history ─────────────────────────────────────────────\n\nexport function useYamlWorkflowVersions(id: string) {\n return useQuery<{ versions: LTYamlWorkflowVersion[]; total: number }>({\n queryKey: ['yamlWorkflows', id, 'versions'],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions`),\n enabled: !!id,\n });\n}\n\nexport function useYamlWorkflowVersion(id: string, version: number | null) {\n return useQuery<LTYamlWorkflowVersion>({\n queryKey: ['yamlWorkflows', id, 'versions', version],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions/${version}`),\n enabled: !!id && version !== null,\n });\n}\n"],"names":["useYamlWorkflows","filters","params","useQuery","apiFetch","useYamlWorkflowAppIds","useYamlWorkflow","id","useCreateYamlWorkflow","queryClient","useQueryClient","useMutation","input","useDeployYamlWorkflow","useActivateYamlWorkflow","useInvokeYamlWorkflow","data","sync","execute_as","useRegenerateYamlWorkflow","task_queue","compilation_feedback","useArchiveYamlWorkflow","useRestoreYamlWorkflow","useUpdateYamlWorkflow","updates","useDeleteYamlWorkflow","useYamlWorkflowVersions","useYamlWorkflowVersion","version"],"mappings":"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"}
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-D7peGNN0.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/vendor-query-DvWWuNIB.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="./assets/vendor-react-_9U4mKFr.js">
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-icons-
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-icons-DUYcKTjP.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="./assets/index-CnU7Jjz3.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
package/docs/accumulator.md
CHANGED
|
@@ -53,7 +53,7 @@ Written by the fold at creation, inside the row's Leg1 commit, and maintained by
|
|
|
53
53
|
| `envelope` | `accumulate_items` | `Record<itemKey, { payload?, at, actor?, reciprocalId? }>` |
|
|
54
54
|
| `envelope` | `accumulate_config` | the folded `{ unique, resolveAtMax }` |
|
|
55
55
|
|
|
56
|
-
A batch row records each fill's time and actor under `envelope.batch_filled_at` and `envelope.batch_filled_by`, and may start with entries already satisfied through `filled` (see [Creating Escalations](hitl/escalation.md)). A batch wait may add `partialOnTimeout: true`; it stores `envelope.batch_partial_on_timeout` and its timer delivers `{ ...filledItems, $trigger: 'timeout' }` instead of `false`.
|
|
56
|
+
A batch row records each fill's time and actor under `envelope.batch_filled_at` and `envelope.batch_filled_by`, and may start with entries already satisfied through `filled` (see [Creating Escalations](hitl/escalation.md)). A batch wait may add `partialOnTimeout: true`; it stores `envelope.batch_partial_on_timeout` and its timer delivers `{ ...filledItems, $trigger: 'timeout' }` instead of `false`. A pending key may carry a flag in `envelope.batch_flags` (it stays pending and still fills); a wait that adds `wakeOnFlag: true` ends on the first flag and delivers `{ ...filledItems, $flags, $trigger: 'flag' }`.
|
|
57
57
|
|
|
58
58
|
## Operations
|
|
59
59
|
|
|
@@ -1137,6 +1137,39 @@ Submit ONE declared item of a batch escalation (a `conditional` wait created wit
|
|
|
1137
1137
|
|
|
1138
1138
|
Claim semantics: claim-agnostic by default; `assertClaim: true` (by id) requires the caller's own live claim, asserted atomically. RBAC mirrors the single-resolve forms: the by-id form answers 404 for rows outside the caller's read scope and 403 inside it but outside write scope; the ingress forms collapse a write denial to 404.
|
|
1139
1139
|
|
|
1140
|
+
### Batch item flags
|
|
1141
|
+
|
|
1142
|
+
```
|
|
1143
|
+
POST /api/escalations/:id/flag-batch-item
|
|
1144
|
+
POST /api/escalations/:id/unflag-batch-item
|
|
1145
|
+
```
|
|
1146
|
+
|
|
1147
|
+
Flag ONE pending key of a batch escalation, or clear its flag. **Body:** `{ itemKey, label, payload? }` to flag, `{ itemKey }` to unflag.
|
|
1148
|
+
|
|
1149
|
+
A flag writes `envelope.batch_flags[itemKey]` (`label`, `payload`, the caller as `actor`, the database `at`) in one statement, only while the row and the key are pending. The key stays pending and still fills. On a wait declared with `wakeOnFlag`, the flag resolves the row (recording the caller in `metadata.resolved_by`) and the workflow wakes with the items so far, `$flags` and `$trigger: "flag"`: the answer is `{ outcome: 'completed', workflowId }`. Otherwise it is `{ outcome: 'flagged' }`.
|
|
1150
|
+
|
|
1151
|
+
Refusals: a key already filled 409, a key without a flag (unflag) 409, an undeclared key 400, a non-batch row 400, a row no longer pending 409. RBAC is the by-id batch fill's: 404 outside read scope, 403 outside write scope. Both carry `X-LT-Acting-Token` as the other work verbs do.
|
|
1152
|
+
|
|
1153
|
+
### Roster actions
|
|
1154
|
+
|
|
1155
|
+
```
|
|
1156
|
+
POST /api/escalations/:id/roster-action
|
|
1157
|
+
```
|
|
1158
|
+
|
|
1159
|
+
Run one action a [roster](../../hitl/x-lt-roster.md#actions) entry offers on this row's form. **Body:** `{ field, action, entry, code? }`: the roster field, the action's index among its `x-lt-actions`, the entry key, and a key-in's entered code.
|
|
1160
|
+
|
|
1161
|
+
The request is a pointer. The server re-reads the action from the row's pinned form schema, requires the entry to be on the roster it computes, builds the payload from the declaration, and runs the act (resolve, batch fill, flag, unflag) through its own endpoint as the person acting, under their RBAC and `enforce_schema`. With `X-LT-Acting-Token`, the person acting is the badged person; the badge is read first and spent only when the act runs, and a use is returned when the act does not land.
|
|
1162
|
+
|
|
1163
|
+
| Status | `outcome` | Meaning |
|
|
1164
|
+
|--------|-----------|---------|
|
|
1165
|
+
| 403 | `needs_badge` | The action is limited to roles the person acting lacks; a badge of that role answers it |
|
|
1166
|
+
| 403 | `role_refused` | The badged person lacks the roles; the badge is not spent |
|
|
1167
|
+
| 401 | `not_primed` | The badge expired or was spent |
|
|
1168
|
+
| 422 | `code_mismatch` | The entered code does not name the entry's code |
|
|
1169
|
+
| 409 | | The action or the entry is no longer offered |
|
|
1170
|
+
|
|
1171
|
+
Otherwise the answer is the act's own.
|
|
1172
|
+
|
|
1140
1173
|
## Accumulate items
|
|
1141
1174
|
|
|
1142
1175
|
```
|
|
@@ -453,7 +453,7 @@ if (bin === null) return cancelled();
|
|
|
453
453
|
ship(bin.$accumulated.map((item) => item.itemKey), bin.$trigger);
|
|
454
454
|
```
|
|
455
455
|
|
|
456
|
-
Requires hotmesh 0.29.0+. `conditional` accepts the same `accumulate` field and returns `T | false | null`; `partialOnTimeout: true` on a `batch` wait likewise makes the timer deliver the filled items with `$trigger: 'timeout'
|
|
456
|
+
Requires hotmesh 0.29.0+. `conditional` accepts the same `accumulate` field and returns `T | false | null`; `partialOnTimeout: true` on a `batch` wait likewise makes the timer deliver the filled items with `$trigger: 'timeout'`, and `wakeOnFlag: true` makes a flag on a pending key deliver them with `$flags` and `$trigger: 'flag'` (hotmesh 0.31.3+). See [Creating Escalations](../../hitl/escalation.md#open-accumulation--items-arrive-over-time).
|
|
457
457
|
|
|
458
458
|
### Two-step form
|
|
459
459
|
|
|
@@ -859,6 +859,31 @@ await lt.escalations.resolveBatchItemByMetadata({ key, value, itemKey, resolverP
|
|
|
859
859
|
|
|
860
860
|
**Auth:** Required
|
|
861
861
|
|
|
862
|
+
## flagBatchItem / unflagBatchItem
|
|
863
|
+
|
|
864
|
+
Flag ONE pending key of a batch escalation (for example, `Missing`), or clear its flag. The flag lands in `envelope.batch_flags[itemKey]` with the caller as its actor; the key stays pending and still fills. A wait declared with `wakeOnFlag: true` ends on the flag, and the workflow wakes with the items so far, `$flags` and `$trigger: 'flag'`.
|
|
865
|
+
|
|
866
|
+
```typescript
|
|
867
|
+
await lt.escalations.flagBatchItem({ id, itemKey: '00812999000011#1', label: 'Missing', payload: { note: 'not on the pallet' } });
|
|
868
|
+
await lt.escalations.unflagBatchItem({ id, itemKey: '00812999000011#1' });
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
**Returns:** `LTApiResult<{ outcome: 'flagged' | 'completed' | 'unflagged', itemKey, escalationId, workflowId? }>`. 409 for a key already filled, a key without a flag, or a row no longer pending; 400 for an undeclared key or a non-batch row.
|
|
872
|
+
|
|
873
|
+
**Auth:** Required
|
|
874
|
+
|
|
875
|
+
## runRosterAction
|
|
876
|
+
|
|
877
|
+
Run one action a [roster](../../hitl/x-lt-roster.md#actions) entry offers on a row's form, by pointer: the roster field, the action's index, the entry key, and a key-in's entered code. The server re-reads the action, checks the entry and any `roles` limit, and runs the act as the caller (or as the badged person with `actingToken`).
|
|
878
|
+
|
|
879
|
+
```typescript
|
|
880
|
+
await lt.escalations.runRosterAction({ id: matchingRowId, field: 'shoes', action: 2, entry: '00812999000011#1', code: '812999000011' });
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
**Returns:** the act's own result, or a refusal with `outcome` `needs_badge`, `role_refused`, `not_primed` or `code_mismatch`.
|
|
884
|
+
|
|
885
|
+
**Auth:** Required
|
|
886
|
+
|
|
862
887
|
## accumulate / accumulateBySignalKey / accumulateByMetadata
|
|
863
888
|
|
|
864
889
|
Add ONE item to an open accumulator escalation (`conditionalAccumulator` with `accumulate: {...}`). Interim adds return `accepted` with the count held and slots remaining; the add that reaches `max` returns `completed` and the waiting workflow resumes with the ordered collection, in the same statement. See [Resolution — Accumulator items](../../hitl/resolution.md#accumulator-items).
|
package/docs/hitl/escalation.md
CHANGED
|
@@ -106,6 +106,15 @@ Items are submitted via `POST /api/escalations/:id/resolve-batch-item`, `POST /a
|
|
|
106
106
|
|
|
107
107
|
`timeout` and cancellation keep their standard semantics (`false` / `null`); a plain resolve on a batch row remains an admin override that resolves the whole row with the payload given. Add `partialOnTimeout: true` (hotmesh 0.29.0+) and the timer instead resumes the wait with the items filled so far plus `$trigger: 'timeout'`, the same value the expired row stores as `resolver_payload`.
|
|
108
108
|
|
|
109
|
+
A pending key can be flagged (`flagBatchItem`, or a [roster](x-lt-roster.md#actions) action): the flag is stored in `envelope.batch_flags[itemKey]` and the key stays pending. Add `wakeOnFlag: true` (hotmesh 0.31.3+) and a flag ends the wait instead: it resumes with the items filled so far, `$flags` (each flag's `label`, `payload`, `actor` and `at`) and `$trigger: 'flag'`, so the workflow can route the order, for example to a manager.
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
const result = await conditional<Record<string, unknown>>(signalId, {
|
|
113
|
+
role: 'matching', metadata: { orderId }, batch: shoeKeys, wakeOnFlag: true,
|
|
114
|
+
});
|
|
115
|
+
if (result && result.$trigger === 'flag') return sendToManager(orderId, result.$flags);
|
|
116
|
+
```
|
|
117
|
+
|
|
109
118
|
Entries already satisfied before the wait begins go in `filled` (hotmesh 0.31.0+), keyed by item key with their `payload`, the `at` they were satisfied (from the source of record, never a clock read in the workflow), and an optional `actor`. The row starts with that progress: those keys are left out of `batch_pending`, their payloads, times, and actors are written beside the rest, and the completing wake delivers them with the collection. Every key in `filled` must be declared in `batch`, and at least one must stay open; a `filled` that covers every key throws, so skip the wait instead.
|
|
110
119
|
|
|
111
120
|
```typescript
|
package/docs/hitl/x-lt-embed.md
CHANGED
|
@@ -209,6 +209,8 @@ On success the row updates in place through the standard query invalidation —
|
|
|
209
209
|
|
|
210
210
|
Declare one action for the happy path and leave the exception path to the form. A batch of N sibling items collapses from N navigations to N clicks on one page.
|
|
211
211
|
|
|
212
|
+
An action limited to roles (`roles`) belongs on a [roster](x-lt-roster.md#actions), whose actions run on the server where the limit is checked. The escalation list does not offer an action that declares `roles`.
|
|
213
|
+
|
|
212
214
|
### Empty and loading states
|
|
213
215
|
|
|
214
216
|
- **Loading** — three skeleton rows are displayed.
|
package/docs/hitl/x-lt-roster.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Roster (`x-lt-widget: "roster"`)
|
|
2
2
|
|
|
3
|
-
A roster lists every member a container row expects, each marked **waiting**, **in**, or **flagged**, with the count in its heading ("3 of 5 in · 1 Missing"). The person works from it: a member that arrives ticks in, an action on
|
|
3
|
+
A roster lists every member a container row expects, each marked **waiting**, **in**, or **flagged**, with the count in its heading ("3 of 5 in · 1 Missing"). The person works from it: a member that arrives ticks in, an action on an entry acts in place, and the rest of the form can wait until every member is accounted for.
|
|
4
4
|
|
|
5
5
|
Like the other [embed widgets](x-lt-embed.md), a roster is display-only: declare it `readOnly`, keep it out of `required`, and it contributes nothing to the resolver payload.
|
|
6
6
|
|
|
@@ -42,6 +42,7 @@ Like the other [embed widgets](x-lt-embed.md), a roster is display-only: declare
|
|
|
42
42
|
| `key` | For a `query` set: a template naming each member row's entry. Default `{{escalation.id}}`. |
|
|
43
43
|
| `in` | Where arrivals are read. `items` reads the row's held keys (its accumulated items, or a batch's filled keys); any other entry is a `domain.path` naming a string or an array, such as a scan field in the live form (`resolver.bags`, a field the form declares). Default `["items"]`. |
|
|
44
44
|
| `flagged` | Rules over each member row's own context: `when` is an [`x-lt-showIf`](x-lt-show-if.md) condition (or an array of them), `label` is the text the entry shows. The first matching rule wins. |
|
|
45
|
+
| `countedBy` | The separator of counted keys (`"#"` for `<code>#1`, `<code>#2`). The nth occurrence of a code in an `in` source then ticks `<code>#n`, so two scans of one code into a form field tick both of its keys. |
|
|
45
46
|
|
|
46
47
|
### Expected sets
|
|
47
48
|
|
|
@@ -55,7 +56,7 @@ Stamp the container's id on each member row when the container opens (`packingBo
|
|
|
55
56
|
|
|
56
57
|
### State
|
|
57
58
|
|
|
58
|
-
An entry is **in** when its key is held or appears in an `in` source, **flagged** when its member row matches a `flagged` rule, and **waiting** otherwise. In reads before flagged: a member a manager confirms into the box reads in, even though its own row was resolved as "needs a manager".
|
|
59
|
+
An entry is **in** when its key is held or appears in an `in` source, **flagged** when its member row matches a `flagged` rule (on a `batch` set, when its key carries a flag), and **waiting** otherwise. In reads before flagged: a member a manager confirms into the box reads in, even though its own row was resolved as "needs a manager".
|
|
59
60
|
|
|
60
61
|
## Columns
|
|
61
62
|
|
|
@@ -65,22 +66,45 @@ An entry is **in** when its key is held or appears in an `in` source, **flagged*
|
|
|
65
66
|
|-------|-------|
|
|
66
67
|
| `{{item.itemKey}}` | The entry key |
|
|
67
68
|
| `{{item.label.*}}` | The entry's value in a batch `labels` map |
|
|
68
|
-
| `{{item.payload.*}}`, `{{item.actor}}`, `{{item.at}}` | The
|
|
69
|
+
| `{{item.payload.*}}`, `{{item.actor}}`, `{{item.at}}` | The item once it is in: its payload, who filled it, and when. A batch entry reads them from `batch_items`, `batch_filled_by` and `batch_filled_at`, whether the key was filled by a scan, the API, or `conditional`'s `filled`. |
|
|
70
|
+
|
|
71
|
+
`format: "date"` renders a time and `format: "user"` a person's name: `{ "label": "Received", "value": "{{item.at}}", "format": "date" }`, `{ "label": "By", "value": "{{item.actor}}", "format": "user" }`.
|
|
69
72
|
|
|
70
73
|
Without `x-lt-columns`, each entry shows its key.
|
|
71
74
|
|
|
72
75
|
## Actions
|
|
73
76
|
|
|
74
|
-
`x-lt-actions`
|
|
77
|
+
Each `x-lt-actions` entry is one act on the entry:
|
|
78
|
+
|
|
79
|
+
| Act | Shape | Offered by default | What it does |
|
|
80
|
+
|-----|-------|--------------------|--------------|
|
|
81
|
+
| Resolve | `"resolverPayload": { ... }` | `waiting` | Resolves the entry's member row (a `query` set). String leaves interpolate against the member row. |
|
|
82
|
+
| Fill | `"fill": { "payload": { ... }, "enterCode": true }` | `waiting`, `flagged` | Fills the entry's batch key, as a scan would. With `enterCode`, the person types the code from the label and the server checks it against the key (a UPC-A matches its GTIN-14 key); the payload records it as `enteredCode`. |
|
|
83
|
+
| Flag | `"flag": { "label": "Missing", "payload": { ... } }` | `waiting` | Flags the entry's batch key. The key stays pending and still fills; the entry reads flagged under the label and counts in `roster.<field>.flagged`. |
|
|
84
|
+
| Unflag | `"unflag": true` | `flagged` | Clears the entry's flag while the row is pending ("Found it"). |
|
|
75
85
|
|
|
76
86
|
| Field | Description |
|
|
77
87
|
|-------|-------------|
|
|
78
88
|
| `label` | Button text |
|
|
79
|
-
| `
|
|
80
|
-
| `when` | The entry state(s) that offer the action: `"waiting"` (default), `"in"`, `"flagged"`, or an array |
|
|
89
|
+
| `when` | The entry state(s) that offer the action: `"waiting"`, `"in"`, `"flagged"`, or an array |
|
|
81
90
|
| `confirm` | A confirmation asked in place, beside the entry, before firing |
|
|
91
|
+
| `roles` | The action runs only for a person holding one of these roles |
|
|
92
|
+
| `refuse` | What a person without the roles is told |
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
"x-lt-actions": [
|
|
96
|
+
{ "label": "Missing", "flag": { "label": "Missing" }, "confirm": "Mark this shoe missing?" },
|
|
97
|
+
{ "label": "Found it", "unflag": true },
|
|
98
|
+
{ "label": "Key in (manager)", "fill": { "payload": { "source": "key-in" }, "enterCode": true },
|
|
99
|
+
"roles": ["manager"], "refuse": "A manager's badge is needed to key a box in." }
|
|
100
|
+
]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Actions run on the server.** The dashboard sends only which action and which entry (`POST /api/escalations/:id/roster-action`). The server re-reads the action from the row's pinned form schema, confirms the entry is on the roster it computes, builds the payload from the declaration, and checks `roles` against the person acting. The act then runs through its own endpoint (resolve, batch fill, flag, unflag) under that person's RBAC and `enforce_schema`, records them as the resolver, filler or flagger, and shows a refusal's reason on the entry.
|
|
104
|
+
|
|
105
|
+
**Roles and badges.** An action with `roles` shows to everyone. A person without one of the roles is asked for a badge, and the action runs as whoever badges in; a badge without the roles is refused with `refuse`, and the badge is not spent. On a read-only station login every action runs through a badge, as before. A role limit is an act control layered on RBAC: the person must also be allowed to write the row.
|
|
82
106
|
|
|
83
|
-
|
|
107
|
+
On a wait declared with `wakeOnFlag`, a flag ends the wait: the workflow wakes with the items filled so far, `$flags`, and `$trigger: "flag"`, and can route the order (for example, to a manager). Without it, the flag is recorded and the wait continues.
|
|
84
108
|
|
|
85
109
|
Moving work to another person is a resolve with an outcome. "Send to a manager" above resolves the member row with `outcome: "needs-manager"`; the member's workflow opens a row in the manager's role, where only a manager can resolve it, and the manager's confirm adds the bag to the box.
|
|
86
110
|
|
package/docs/scan-codes.md
CHANGED
|
@@ -278,6 +278,19 @@ duration, form on screen. An unsatisfied identity requirement never
|
|
|
278
278
|
auto-fires as the wrong actor — the scan stops over at the badge screen and
|
|
279
279
|
completes on its own once a badge primes.
|
|
280
280
|
|
|
281
|
+
**Choices limited to a role.** A choice may declare `roles`: it shows to
|
|
282
|
+
everyone and runs only for a person holding one of them (superadmin always
|
|
283
|
+
does). A station without a badge of that role sees the choice withheld and is
|
|
284
|
+
asked for one; a badge without the role is refused with the choice's `refuse`
|
|
285
|
+
copy, and the badge is not spent. The manager walks over, badges, and the
|
|
286
|
+
choice runs as the manager.
|
|
287
|
+
|
|
288
|
+
```jsonc
|
|
289
|
+
{ "label": "Add without scan", "verb": "resolve", "roles": ["manager"],
|
|
290
|
+
"refuse": "A manager's badge is needed to add a bag without its scan.",
|
|
291
|
+
"params": { "resolverPayload": { "outcome": "added-by-manager" } } }
|
|
292
|
+
```
|
|
293
|
+
|
|
281
294
|
## Holding an item: the bench motion
|
|
282
295
|
|
|
283
296
|
At a bench where items go into containers, every act is one item going into
|
|
@@ -312,6 +325,19 @@ reads. A fill or an into-subject add that leaves slots open shows its done
|
|
|
312
325
|
copy under the hold; without done copy the station shows the count ("2 of 5
|
|
313
326
|
checked off" for a fill, "2 of 5 added" for an add).
|
|
314
327
|
|
|
328
|
+
**The held row's list on screen.** `hold.show` names a [roster](hitl/x-lt-roster.md)
|
|
329
|
+
field of the held row's form. The station renders that roster, with its columns
|
|
330
|
+
and heading, under the hold card for as long as the row is held, refreshed on
|
|
331
|
+
the row's own events and after each scan. Each fill ticks its entry in while the
|
|
332
|
+
motion continues, and a refused scan reads on the hold card with the list
|
|
333
|
+
unchanged.
|
|
334
|
+
|
|
335
|
+
```jsonc
|
|
336
|
+
"params": { "hold": { "ttlSeconds": 300, "label": "{item.orderId}",
|
|
337
|
+
"expect": { "schemes": [16], "prompt": "Scan each shoe box." },
|
|
338
|
+
"show": "shoes" } }
|
|
339
|
+
```
|
|
340
|
+
|
|
315
341
|
The server trusts nothing about the subject. Each request re-parses its
|
|
316
342
|
code, re-reads the row under the station's read scope, requires the row to
|
|
317
343
|
still carry the code's target and to be pending. A subject that fails is
|
|
@@ -328,14 +354,30 @@ row.
|
|
|
328
354
|
| `accumulate` with `accumulate.into: "subject"` | The held row collects the scanned code (`itemKey` defaults to `{scan.target}`). Use it when the container has no row yet: the first item for a container tells the workflow which container was scanned. With `accumulate.item`, the scanned code's own pending row is written as the reciprocal in the same statement (see below). On a bounded accumulator the answer carries `progress` and the subject stays held while slots remain. |
|
|
329
355
|
| `fill` with `fill.into: "subject"` | One expected item is checked off: the held row is a batch whose keys are codes, and the scan fills the first open key for its code. A code expected twice is declared `<code>#1`, `<code>#2` and takes two scans; a third is refused. The answer carries `progress: { filled, total, remaining }`, the subject stays held while items remain, and the last fill completes the row. On a `gtin` scheme a refusal's `expected` lists codes as the package prints them (EAN-13, or EAN-8), not the stored 14-digit form. `fill.into: "scanned"` fills the row the scan itself names. |
|
|
330
356
|
|
|
357
|
+
**Naming what a fill still expects.** Codes alone do not tell a person which
|
|
358
|
+
box to take. `fill.labels` names a per-key map on the batch row (the map a batch
|
|
359
|
+
roster's `labels` names, e.g. `envelope.shoe_labels`), and `fill.label` how one
|
|
360
|
+
entry reads: `{label.<path>}` reads the entry's map value and `{code}` its
|
|
361
|
+
printed code. With them, `{fill.pending}` lists the open entries by label,
|
|
362
|
+
`{fill.next}` names the next one (in done copy, the one after this fill), and a
|
|
363
|
+
refusal's `expected` reads the labels. An entry the map does not name reads as
|
|
364
|
+
its code; without `fill.labels`, both tokens read codes.
|
|
365
|
+
|
|
366
|
+
```jsonc
|
|
367
|
+
"refuse": { "markdown": "Not one of this order's shoes. Still to match: {fill.pending}." },
|
|
368
|
+
"done": { "markdown": "Matched. Next: {fill.next}" },
|
|
369
|
+
"params": { "fill": { "into": "subject", "labels": "envelope.shoe_labels",
|
|
370
|
+
"label": "{label.model}, {label.size} (UPC {code})" } }
|
|
371
|
+
```
|
|
372
|
+
|
|
331
373
|
**`match` and `refuse`** check the pairing before anything is written.
|
|
332
374
|
`match.target` lists templates the scanned target must equal (e.g.
|
|
333
375
|
`["{subject.containerCode}"]`); `match.facets` lists facets the located container
|
|
334
376
|
must share with the held row (e.g. `["containerKey"]`). A miss answers `refused`
|
|
335
377
|
with `refuse.markdown` rendered, and nothing is written. The copy may read
|
|
336
|
-
`{container.<facet>}` (the container the scan named)
|
|
337
|
-
(what a fill still expects)
|
|
338
|
-
item goes: "That's Acme West's container. This one goes in **C-12**." When the
|
|
378
|
+
`{container.<facet>}` (the container the scan named), `{fill.pending}`
|
|
379
|
+
(what a fill still expects) and `{fill.next}` (the next open entry), so the
|
|
380
|
+
station says what is wrong and where the item goes: "That's Acme West's container. This one goes in **C-12**." When the
|
|
339
381
|
write itself loses a race (the container closed, another bench took the free
|
|
340
382
|
container), the answer is `refused` with `refuse.conflict`, and a step that
|
|
341
383
|
declares `refuse.conflict` also clears the subject so the next item scan
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotmeshio/long-tail",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.2",
|
|
4
4
|
"description": "Long Tail Workflows — Durable AI workflows with human-in-the-loop escalation. Powered by PostgreSQL.",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@anthropic-ai/sdk": "^0.92.0",
|
|
79
79
|
"@aws-sdk/client-s3": "^3.1017.0",
|
|
80
80
|
"@aws-sdk/s3-request-presigner": "^3.1045.0",
|
|
81
|
-
"@hotmeshio/hotmesh": "^0.31.
|
|
81
|
+
"@hotmeshio/hotmesh": "^0.31.3",
|
|
82
82
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
83
83
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.215.0",
|
|
84
84
|
"@opentelemetry/resources": "^2.5.1",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as m,j as e}from"./vendor-query-DvWWuNIB.js";import{w as ut,x as mt,c as xt,y as ht,M as Se,z as gt,A as ft,B as pt,E as bt,G as yt,H as jt,I as vt,K as Ct,L as kt,O as Nt,Q as wt,r as Pt,R as St,T as Rt,U as Et,V as Tt,W as At,X as Bt,Y as Ot,Z as Lt,_ as Mt,$ as Ft,a0 as zt,a1 as It,a2 as Ut,a3 as $t,a4 as Vt,a5 as _t,a6 as qt}from"./index-BLbZsMRG.js";import{a as Re,u as Ee,f as Ht}from"./vendor-react-_9U4mKFr.js";import{i as Kt}from"./task-queues-7-sHKPsN.js";import{X as re,ak as Dt,y as Gt,al as Qt,am as Wt,$ as Yt,j as Xt,an as Jt,P as Zt,ao as es}from"./vendor-icons-C_DQEeBy.js";import{u as Te,C as ts,r as ss,B as as,a as ns}from"./BulkAssignModal-PLx7SLvF.js";import{E as is}from"./EscalationTitleSelect-DOsfY4u8.js";import{u as ls,E as rs,a as os,t as cs}from"./EscalationTimeline-BWTUBxUf.js";import{m as ds,E as us,a as ms}from"./escalation-columns-BPSH8qMx.js";import{u as xs}from"./useFilterParams-DBRw1Hcv.js";import{u as hs}from"./useDebouncedValue-CbHmpS4w.js";import{D as gs}from"./DataTable-FjFhx0SE.js";import{S as fs}from"./StickyPagination-C2drZk7w.js";import{P as ps}from"./constants-CeBBTzf5.js";import{R as bs,a as ys}from"./RowActions-Bdd7z4eB.js";import{i as js}from"./escalation-items-uDQTphVW.js";import"./UserName-DrAbCpdY.js";import"./FormattedValue-DeVrRJy4.js";import"./EntityTimelinePanel-BtARWy3R.js";import"./FilterBar-Dnse0soD.js";import"./PriorityBadge-r33mpDju.js";import"./RolePill-Bw_n7EpR.js";import"./WorkflowPill-Cly9Ln_3.js";import"./CountdownTimer-C-Ngk8oq.js";import"./EmptyState-DgC_6njU.js";import"./useContainerWidth-DSLp1gEm.js";import"./StatusBadge-DHVwxre2.js";function vs(){const{pathname:t,search:n}=Re(),u=Ee(),{resolveUrl:l}=ut();m.useEffect(()=>{const g=t+n;if(mt(g).length===0)return;const p=l(g);p!==g&&u(p,{replace:!0})},[t,n,l,u])}const Cs=["<","<=",">",">=","="],ks=["priority","created_at","updated_at","status","role"],O="input text-xs py-1",Ne="select text-xs py-1",H="text-text-tertiary hover:text-text-primary transition-colors";function we(t){return t==="true"?!0:t==="false"?!1:t.trim()!==""&&!Number.isNaN(Number(t))?Number(t):t}const Ns=t=>Object.entries(t??{}).map(([n,u])=>({key:n,value:String(u)})),ws=t=>(t??[]).map(n=>{const[u,l]=Object.entries(n)[0]??["",""];return{key:u,value:String(l)}});function A({title:t,hint:n,children:u}){return e.jsxs("div",{className:"border-t border-surface-border/50 py-3 first:border-t-0 first:pt-1",children:[e.jsxs("div",{className:"mb-1.5 flex items-baseline justify-between",children:[e.jsx("span",{className:"text-2xs font-medium uppercase tracking-wide text-text-tertiary",children:t}),n&&e.jsx("span",{className:"text-2xs font-mono text-text-tertiary/70",children:n})]}),u]})}function K({value:t,onChange:n,placeholder:u}){return e.jsx("input",{list:"lt-facet-keys",className:`${O} w-40`,placeholder:u,value:t,onChange:l=>n(l.target.value)})}function Ps({value:t,onChange:n,facetKeys:u=[],search:l="",onSearchChange:g}){const p=Ns(t.facets),b=ws(t.block),f=t.range??[],r=t.exists??[],k=t.orderBy??[],P=a=>{const o={};for(const c of a)c.key&&(o[c.key]=we(c.value));n({...t,facets:Object.keys(o).length?o:void 0})},E=a=>{const o=a.filter(c=>c.key).map(c=>({[c.key]:we(c.value)}));n({...t,block:o.length?o:void 0})},T=a=>n({...t,range:a.length?a:void 0}),y=a=>n({...t,exists:a.length?a:void 0}),v=a=>n({...t,orderBy:a.length?a:void 0});return e.jsxs("div",{className:"text-xs",children:[e.jsx("datalist",{id:"lt-facet-keys",children:u.map(a=>e.jsx("option",{value:a},a))}),e.jsxs("datalist",{id:"lt-sort-fields",children:[ks.map(a=>e.jsx("option",{value:a},a)),u.map(a=>e.jsx("option",{value:`metadata.${a}`},a))]}),g&&e.jsx(A,{title:"Match id",hint:"id · workflow · origin",children:e.jsx("input",{className:`${O} w-full`,placeholder:"Exact escalation, workflow, or origin id…",value:l,onChange:a=>g(a.target.value)})}),e.jsx(A,{title:"Has facet",hint:"metadata @>",children:[...p,{key:"",value:""}].map((a,o)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx(K,{value:a.key,placeholder:"key",onChange:c=>{const i=[...p];i[o]={...a,key:c},P(i)}}),e.jsx("span",{className:"text-text-tertiary",children:"="}),e.jsx("input",{className:`${O} w-40`,placeholder:"value",value:a.value,onChange:c=>{const i=[...p];i[o]={...a,value:c.target.value},P(i)}}),o<p.length&&e.jsx("button",{className:H,onClick:()=>P(p.filter((c,i)=>i!==o)),children:"×"})]},o))}),e.jsx(A,{title:"Range",hint:"numeric",children:[...f,{facet:"",op:"<=",value:0}].map((a,o)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx(K,{value:a.facet,placeholder:"numeric facet",onChange:c=>{const i=[...f];i[o]={...a,facet:c},T(i.filter(j=>j.facet))}}),e.jsx("select",{className:Ne,value:a.op,onChange:c=>{const i=[...f];i[o]={...a,op:c.target.value},T(i.filter(j=>j.facet))},children:Cs.map(c=>e.jsx("option",{value:c,children:c},c))}),e.jsx("input",{type:"number",className:`${O} w-24`,value:a.value,onChange:c=>{const i=[...f];i[o]={...a,value:Number(c.target.value)},T(i.filter(j=>j.facet))}}),o<f.length&&e.jsx("button",{className:H,onClick:()=>T(f.filter((c,i)=>i!==o)),children:"×"})]},o))}),e.jsx(A,{title:"Has key",hint:"metadata ? key",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[r.map(a=>e.jsxs("span",{className:"flex items-center gap-1 rounded bg-accent/15 px-1.5 py-0.5 text-accent",children:[a,e.jsx("button",{className:"text-accent/70 hover:text-accent",onClick:()=>y(r.filter(o=>o!==a)),children:"×"})]},a)),e.jsx(K,{value:"",placeholder:"+ key",onChange:a=>{a&&!r.includes(a)&&y([...r,a])}})]})}),e.jsx(A,{title:"Exclude",hint:"NOT @>",children:[...b,{key:"",value:""}].map((a,o)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx(K,{value:a.key,placeholder:"key",onChange:c=>{const i=[...b];i[o]={...a,key:c},E(i)}}),e.jsx("span",{className:"text-text-tertiary",children:"="}),e.jsx("input",{className:`${O} w-40`,placeholder:"value",value:a.value,onChange:c=>{const i=[...b];i[o]={...a,value:c.target.value},E(i)}}),o<b.length&&e.jsx("button",{className:H,onClick:()=>E(b.filter((c,i)=>i!==o)),children:"×"})]},o))}),e.jsx(A,{title:"Sort by",children:[...k,{field:"",direction:"asc"}].map((a,o)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx("input",{list:"lt-sort-fields",className:`${O} w-44`,placeholder:"column or metadata.key",value:a.field,onChange:c=>{const i=[...k];i[o]={...a,field:c.target.value},v(i.filter(j=>j.field))}}),e.jsxs("select",{className:Ne,value:a.direction??"asc",onChange:c=>{const i=[...k];i[o]={...a,direction:c.target.value},v(i.filter(j=>j.field))},children:[e.jsx("option",{value:"asc",children:"asc"}),e.jsx("option",{value:"desc",children:"desc"})]}),e.jsxs("label",{className:"flex items-center gap-1 text-text-tertiary",children:[e.jsx("input",{type:"checkbox",checked:!!a.numeric,onChange:c=>{const i=[...k];i[o]={...a,numeric:c.target.checked},v(i.filter(j=>j.field))}}),"num"]}),o<k.length&&e.jsx("button",{className:H,onClick:()=>v(k.filter((c,i)=>i!==o)),children:"×"})]},o))})]})}function Ss({value:t,onChange:n,facetKeys:u,search:l,onSearchChange:g,activeFacetCount:p,onClear:b,onClose:f}){return e.jsxs("div",{className:"h-full overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between px-4 py-3 bg-surface-raised border-b border-surface-border/50",children:[e.jsx("span",{className:"text-xs font-semibold text-text-primary",children:"Faceted query"}),e.jsxs("div",{className:"flex items-center gap-2",children:[p>0&&e.jsx("button",{onClick:b,className:"text-2xs text-text-tertiary hover:text-text-primary transition-colors",children:"Clear"}),e.jsx("button",{onClick:f,className:"p-1 rounded hover:bg-surface-hover text-text-tertiary hover:text-text-primary transition-colors",title:"Close",children:e.jsx(re,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"px-4 py-2",children:[e.jsxs("p",{className:"mb-2 text-2xs leading-snug text-text-tertiary",children:["Precise metadata facets plus exact correlation-id lookup — they compose in one SQL query. Facet keys are the ones that actually exist in your visible escalations. Set status to ",e.jsx("span",{className:"font-medium",children:"All"})," to find an order across every status; the whole query is shareable via the URL."]}),e.jsx(Ps,{value:t,onChange:n,facetKeys:u,search:l,onSearchChange:g})]})]})}const Rs=t=>t.isPriorityPending||t.isClaimPending||t.isAssignPending||t.isUnassignPending||t.isTriagePending||t.isCancelPending,D="inline-flex items-center h-7 px-2.5 text-2xs font-medium text-text-secondary bg-surface border border-surface-border rounded-[4px] hover:border-accent/50 hover:text-text-primary transition-colors disabled:opacity-50 disabled:hover:border-surface-border",Pe=`${D} appearance-none cursor-pointer`,Es="inline-flex items-center h-7 px-2.5 text-2xs font-medium text-status-error bg-surface border border-status-error/30 rounded-[4px] hover:border-status-error hover:bg-status-error/5 transition-colors disabled:opacity-50";function Ts(t){var f;const n=Rs(t),u=Te(),{data:l}=xt(),g=ht(),p=g!==null?g:((f=l==null?void 0:l.ai)==null?void 0:f.enabled)===!0,b=t.selectedCount>0;return e.jsx("div",{className:`grid transition-all duration-200 ease-in-out ${b?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0 pointer-events-none"}`,children:e.jsx("div",{className:"overflow-hidden",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-2 py-2.5 pl-3 pr-2 mt-4 mb-3 bg-surface-sunken/60 border-l-2 border-l-accent",children:[e.jsxs("span",{className:"text-2xs font-semibold uppercase tracking-wider text-accent tabular-nums",children:[t.selectedCount," selected"]}),e.jsx("div",{className:"mx-1 h-4 w-px bg-surface-border"}),e.jsxs("select",{onChange:r=>{r.target.value&&(t.onSetPriority(parseInt(r.target.value)),r.target.value="")},disabled:n,className:Pe,defaultValue:"",children:[e.jsx("option",{value:"",disabled:!0,children:"Priority…"}),ps.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))]}),e.jsxs("select",{onChange:r=>{r.target.value&&(t.onClaim(parseInt(r.target.value)),r.target.value="")},disabled:n,className:Pe,defaultValue:"",children:[e.jsx("option",{value:"",disabled:!0,children:"Claim for…"}),u.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))]}),e.jsx("button",{onClick:t.onAssign,disabled:n,className:D,children:t.isAssignPending?"Assigning…":"Assign to…"}),e.jsx("button",{onClick:t.onUnassign,disabled:n,className:D,children:t.isUnassignPending?"Unassigning…":"Unassign"}),p&&e.jsx("button",{onClick:t.onTriage,disabled:n,className:D,children:t.isTriagePending?"Triaging…":"Triage"}),t.cancelLabel!==!1&&e.jsx("button",{onClick:t.onCancel,disabled:n,className:Es,children:t.isCancelPending?t.cancelLabel?`${t.cancelLabel}…`:"Cancelling…":t.cancelLabel||"Cancel"}),e.jsx("div",{className:"flex-1"}),n&&e.jsx("span",{className:"text-2xs text-text-tertiary animate-pulse",children:"Processing…"}),e.jsx("button",{onClick:t.onClearSelection,className:"px-1 text-2xs font-medium text-text-tertiary hover:text-text-primary transition-colors",children:"Clear"})]})})})}function As({open:t,onClose:n,selectedCount:u,onSubmit:l,isPending:g}){const[p,b]=m.useState(""),f=()=>{l(p||void 0)};return e.jsx(Se,{open:t,onClose:n,title:"Submit for AI Triage",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-text-secondary",children:["Submit ",e.jsx("span",{className:"font-medium text-text-primary",children:u})," escalation(s) for AI triage? The triage orchestrator will take over resolution."]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-medium text-text-secondary block mb-1",children:["Triage hint ",e.jsx("span",{className:"text-text-tertiary",children:"(optional)"})]}),e.jsx("input",{type:"text",value:p,onChange:r=>b(r.target.value),placeholder:"e.g., image_orientation",className:"input text-xs font-mono w-full"}),e.jsx("p",{className:"text-2xs text-text-tertiary mt-1",children:"Guides the triage workflow on what remediation to apply"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx("button",{onClick:n,className:"btn-secondary text-xs",children:"Cancel"}),e.jsx("button",{onClick:f,disabled:g,className:"btn-primary text-xs",children:g?"Submitting...":"Submit for Triage"})]})]})})}function B(t,n,u){return l=>{t.mutate(l,{onSuccess:()=>{n(),u==null||u()}})}}function Bs(t){const n=()=>[...t.selectedIds];return{handleSetPriority:r=>{B(t.setPriority,t.clearSelection)({ids:n(),priority:r})},handleBulkClaim:r=>{B(t.bulkClaim,t.clearSelection)({ids:n(),durationMinutes:r})},handleBulkTriage:r=>{B(t.bulkTriage,t.clearSelection,t.closeTriageModal)({ids:n(),hint:r})},handleBulkAssign:(r,k,P)=>{B(t.bulkAssign,t.clearSelection,t.closeAssignModal)({ids:n(),targetUserId:r,durationMinutes:k,reassign:P})},handleBulkUnassign:()=>{B(t.bulkUnassign,t.clearSelection)({ids:n()})},handleBulkCancel:()=>{B(t.bulkCancel,t.clearSelection,t.closeCancelModal)({ids:n()})}}}function Os({claimTarget:t,onClose:n,claimDuration:u,onDurationChange:l,claimDurations:g,onCustomClaimChange:p,onClaim:b,isPending:f}){return e.jsx(Se,{open:!!t,onClose:n,title:"Claim Escalation",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-text-secondary",children:["Claim ",e.jsx("span",{className:"font-medium text-text-primary",children:t==null?void 0:t.type})," for:"]}),e.jsxs("select",{value:u,onChange:r=>{l(r.target.value)},className:"select w-full text-sm",children:[g.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value)),e.jsx("option",{value:"custom",children:"Other..."})]}),u==="custom"&&e.jsx(ts,{onChange:p,autoFocus:!0}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx("button",{onClick:n,className:"btn-secondary text-xs",children:"Cancel"}),e.jsx("button",{onClick:b,className:"btn-primary text-xs",disabled:f,children:f?"Claiming...":"Claim"})]})]})})}function ra(){var ke;vs();const t=Ee(),{filters:n,setFilter:u,pagination:l}=xs({filters:{role:"",type:"",subtype:"",priority:"",status:"available",search:""}});gt({role:n.role||null,verbs:["created","claimed","updated"]});const g=hs(n.search),p=Te(),[b,f]=m.useState(null),[r,k]=m.useState("30"),[P,E]=m.useState(0),T=m.useCallback(s=>E(s),[]),[y,v]=m.useState(new Set),a=m.useRef(null),o=m.useRef(null),c=m.useCallback(s=>{var x;if((x=o.current)==null||x.disconnect(),o.current=null,!s||typeof ResizeObserver>"u")return;const d=new ResizeObserver(()=>{var q;(q=a.current)==null||q.style.setProperty("--lt-sticky-top",`${s.offsetHeight-1}px`)});d.observe(s),o.current=d},[]),[i,j]=m.useState(!1),[L,M]=Ht(),h=m.useMemo(()=>ft(L),[L]),N=m.useCallback(s=>{M(d=>{const x=new URLSearchParams(d);return pt(x,s),x.delete("page"),x})},[M]),{data:F}=bt(i),z=yt(h)+(n.search?1:0),G="facet-query",{setPanel:oe,closePanel:ce,open:Ae,ownerKey:Be}=jt();m.useEffect(()=>{if(!i){ce(G);return}oe(e.jsx(Ss,{value:h,onChange:N,facetKeys:(F==null?void 0:F.keys)??[],search:n.search??"",onSearchChange:s=>u("search",s),activeFacetCount:z,onClear:()=>{N({}),u("search","")},onClose:()=>j(!1)}),{width:420,key:G})},[i,h,N,F,n.search,u,z,oe,ce]);const de=Ae&&Be===G,Q=m.useRef(!1);m.useEffect(()=>{if(de){Q.current=!0;return}Q.current&&(Q.current=!1,j(!1))},[de]);const[Oe,W]=m.useState(!1),[Le,Y]=m.useState(!1),[Me,X]=m.useState(!1),Fe=m.useCallback(s=>N({...h,orderBy:s}),[h,N]),I=Re(),{data:U}=vt(),ue=Ct(),ze=m.useCallback(()=>{var x;const s=window.prompt("Pin label:");if(!(s!=null&&s.trim()))return;const d=((x=U==null?void 0:U.preferences)==null?void 0:x.pinnedViews)??[];ue.mutate({pinnedViews:[...d,{id:kt(),label:s.trim(),url:I.pathname+I.search,badge:!0}]})},[I.pathname,I.search,U,ue]),{canBulk:Ie}=Nt(),{kiosk:J}=wt(),me=h.facets?Object.keys(h.facets):[],Ue=L.get("view"),$e=m.useCallback(s=>{M(d=>{const x=new URLSearchParams(d);return s?x.set("view",s):x.delete("view"),x},{replace:!0})},[M]),Z=Ue==="timeline",Ve=m.useCallback(s=>{const{[s]:d,...x}=h.facets??{};N({...h,facets:Object.keys(x).length>0?x:void 0})},[h,N]),xe=Pt(),he=St(),ge=Rt(),ee=Et(),fe=Tt(),te=At(),$=Bt(),{data:se}=Ot(),{data:S}=Lt(),{data:ae}=Mt(),{user:V,isSuperAdmin:_e,hasRoleType:qe}=Ft(),pe=_e||qe("admin"),be=m.useMemo(()=>new Set(((V==null?void 0:V.roles)??[]).map(s=>s.role)),[V]),He=m.useMemo(()=>{const s=(S==null?void 0:S.roles)??[];return(pe?s:s.filter(x=>be.has(x.role)&&!Kt(x.role))).map(x=>({value:x.role,label:zt(x)})).sort((x,q)=>x.label.localeCompare(q.label))},[S,pe,be]);m.useEffect(()=>{v(new Set)},[n.role,n.type,n.subtype,n.priority,n.status,g,l.page,l.pageSize]);const ne=m.useMemo(()=>({...It(L,_t.AVAILABLE),search:g||void 0}),[L,g]),ye=100,{escalations:C,total:w,groups:Ke,listSchema:De,listSchemaVersion:Ge,singleRole:R,hasRichView:je,isLoading:Qe,isFetching:ve,error:_,refetch:We}=ls(ne,{limit:Z?ye:l.pageSize,offset:l.offset}),Ye=Ut(R??"",void 0,!!R),ie=R?ss((ke=Ye.data)==null?void 0:ke.form_schema).cancel:void 0,le=$t(ne.view,je),Xe=le===qt.RICH,Ce=m.useMemo(()=>{if(!h.jeopardy||!R)return null;const s=((S==null?void 0:S.roles)??[]).find(x=>x.role===R),d=(s==null?void 0:s.priority_threshold_minutes)??(s==null?void 0:s.sla_minutes)??null;return d!=null?Vt(d*6e4):null},[h.jeopardy,R,S]),Je=m.useMemo(()=>{const s=new Set;for(const d of C)y.has(d.id)&&s.add(d.role);return[...s]},[C,y]),Ze=m.useMemo(()=>C.filter(s=>y.has(s.id)&&js(s)).length,[C,y]),et=m.useCallback(()=>v(new Set),[]),tt=()=>{if(!b)return;const s=r==="custom"?P:parseInt(r);!s||s<=0||xe.mutate({id:b.id,durationMinutes:s},{onSuccess:()=>{f(null),t(`/escalations/detail/${b.id}`)}})},{handleSetPriority:st,handleBulkClaim:at,handleBulkTriage:nt,handleBulkAssign:it,handleBulkUnassign:lt,handleBulkCancel:rt}=Bs({selectedIds:y,clearSelection:et,setPriority:he,bulkClaim:ge,bulkTriage:te,bulkAssign:ee,bulkUnassign:fe,bulkCancel:$,closeTriageModal:()=>W(!1),closeAssignModal:()=>Y(!1),closeCancelModal:()=>X(!1)}),ot=s=>{const d=new Set(y);d.has(s)?d.delete(s):d.add(s),v(d)},ct=()=>{y.size===C.length?v(new Set):v(new Set(C.map(s=>s.id)))},dt=[Ie?{key:"select",label:e.jsx("input",{type:"checkbox",checked:C.length>0&&y.size===C.length,onChange:ct,className:"rounded"}),render:s=>e.jsx("input",{type:"checkbox",checked:y.has(s.id),onChange:d=>{d.stopPropagation(),ot(s.id)},onClick:d=>d.stopPropagation(),className:"rounded"}),className:"w-10",priority:1}:{key:"spacer",label:"",render:()=>null,className:"w-10",priority:3},...ds({highlightKeys:me}),{key:"actions",label:"",render:s=>e.jsx(bs,{children:e.jsx(ys,{icon:Dt,title:"Claim escalation",onClick:()=>f(s),alwaysVisible:!0,colorClass:"text-accent/40 hover:text-accent",size:"sm"})}),className:"w-10 text-right"}];return e.jsxs("div",{ref:a,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-10 min-w-0",children:[e.jsx(is,{role:n.role,options:He,onChange:s=>u("role",s),locked:J}),!J&&e.jsx("button",{onClick:()=>{window.location.hash="#docs:dashboard.md:all-escalations"},className:"text-text-quaternary hover:text-accent transition-colors mt-1 shrink-0",title:"Open docs for this page",children:e.jsx(Gt,{className:"w-4 h-4",strokeWidth:1.5})})]}),e.jsxs("div",{ref:c,className:"sticky top-0 z-20 bg-surface",children:[e.jsx(us,{filters:n,setFilter:u,roles:(se==null?void 0:se.roles)??[],types:(ae==null?void 0:ae.types)??[],showStatus:!0,showSearch:!1,showRole:!J,actions:e.jsxs(e.Fragment,{children:[Z&&e.jsxs("span",{className:"text-2xs text-text-tertiary whitespace-nowrap",children:[w>100&&e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"font-medium text-text-secondary",children:[(l.page-1)*100+1,"–",Math.min(l.page*100,w)]})," of "]}),e.jsx("span",{className:"font-medium text-text-secondary",children:w})," ",w===1?"escalation":"escalations"]}),e.jsx(rs,{orderBy:h.orderBy,onChange:Fe}),e.jsx("div",{role:"radiogroup","aria-label":"List view",className:"flex items-center rounded overflow-hidden border border-surface-border",children:[{key:"table",title:"Table view",Icon:Qt},{key:"rich",title:"Rich view",Icon:Wt},{key:"timeline",title:"Timeline view",Icon:Yt}].filter(s=>s.key!=="rich"||je).map(({key:s,title:d,Icon:x})=>e.jsx("button",{role:"radio","aria-checked":le===s,onClick:()=>$e(s),className:`px-1.5 py-1 transition-colors ${le===s?"bg-accent text-text-inverse":"icon-link hover:bg-surface-hover"}`,title:d,children:e.jsx(x,{className:"w-3.5 h-3.5"})},s))}),e.jsxs("button",{onClick:()=>j(s=>!s),"aria-pressed":i,className:`relative rounded border border-surface-border px-1.5 py-1 transition-colors ${i?"bg-accent text-text-inverse":"icon-link hover:bg-surface-hover"}`,title:"Faceted query",children:[e.jsx(Xt,{className:"w-3.5 h-3.5"}),z>0&&e.jsx("span",{className:"absolute -right-1 -top-1 flex h-3.5 min-w-[14px] items-center justify-center rounded-full bg-accent px-0.5 text-2xs font-medium text-text-inverse",children:z})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("button",{onClick:()=>We(),disabled:ve,className:"inline-flex h-7 w-7 items-center justify-center rounded icon-link hover:bg-surface-hover disabled:opacity-50",title:"Refresh",children:e.jsx(Jt,{className:`w-4 h-4 ${ve?"animate-spin":""}`})}),e.jsx("button",{onClick:ze,className:"inline-flex h-7 w-7 items-center justify-center rounded icon-link hover:bg-surface-hover",title:"Pin this view — save the current filters to your Pinned section","data-testid":"pin-current-view",children:e.jsx(Zt,{className:"w-4 h-4"})})]})]})}),e.jsx(Ts,{selectedCount:y.size,onClearSelection:()=>v(new Set),onSetPriority:st,onClaim:at,onAssign:()=>Y(!0),onUnassign:lt,onTriage:()=>W(!0),onCancel:()=>X(!0),isPriorityPending:he.isPending,isClaimPending:ge.isPending,isAssignPending:ee.isPending,isUnassignPending:fe.isPending,isTriagePending:te.isPending,isCancelPending:$.isPending,cancelLabel:ie}),(h.facets&&Object.keys(h.facets).length>0||h.jeopardy)&&e.jsxs("div",{className:"bg-surface/98 backdrop-blur-sm border-b border-surface-border/30 -mx-page-x px-page-x py-2 flex items-center gap-1.5 flex-wrap",children:[h.jeopardy&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-status-error px-2.5 py-0.5 text-2xs font-semibold text-text-inverse",children:[e.jsx(es,{className:"w-2.5 h-2.5",strokeWidth:2.5}),"in jeopardy",Ce&&e.jsxs("span",{className:"font-mono font-normal opacity-90",children:["> ",Ce]}),e.jsx("button",{onClick:()=>N({...h,jeopardy:void 0}),className:"ml-0.5 -mr-0.5 flex items-center text-text-inverse/70 hover:text-text-inverse transition-colors","aria-label":"Clear jeopardy filter",children:e.jsx(re,{className:"w-2.5 h-2.5"})})]}),Object.entries(h.facets??{}).map(([s,d])=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-accent/25 bg-accent/8 px-2.5 py-0.5 text-2xs font-medium text-accent/90",children:[e.jsx("span",{className:"font-mono text-text-tertiary",children:s}),e.jsx("span",{className:"text-text-quaternary",children:"="}),e.jsx("span",{className:"font-mono max-w-[160px] truncate",title:String(d),children:String(d)}),e.jsx("button",{onClick:()=>Ve(s),className:"ml-0.5 -mr-0.5 flex items-center text-text-quaternary hover:text-status-error transition-colors","aria-label":`Remove ${s} filter`,children:e.jsx(re,{className:"w-2.5 h-2.5"})})]},s)),Object.keys(h.facets??{}).length>1&&e.jsx("button",{onClick:()=>N({...h,facets:void 0}),className:"text-2xs text-text-quaternary hover:text-text-secondary transition-colors px-1",children:"clear all"})]})]}),_&&e.jsx("div",{className:"mb-4 px-4 py-3 rounded-md bg-status-error/10 border border-status-error/20 text-xs text-status-error",children:_.message==="Session expired"?"Your session has expired. Please log in again.":`Failed to load escalations: ${_.message}`}),Z?e.jsx(os,{escalations:C,highlightKeys:me,onRowClick:s=>t(`/escalations/detail/${s.id}`,{state:{from:"/escalations/available"}}),total:w,page:l.page,totalPages:Math.ceil(w/ye),onPageChange:l.setPage}):Xe?e.jsx(ms,{role:R,listSchema:De,listSchemaVersion:Ge,activeEscalations:C,groups:Ke,onRowClick:s=>t(`/escalations/detail/${s.id}`,{state:{from:"/escalations/available"}}),onOpenGroup:s=>t(s),onAddFacet:(s,d)=>N({...h,facets:{...h.facets??{},[s]:typeof d=="object"&&d!==null?JSON.stringify(d):d}}),total:w,page:l.page,totalPages:l.totalPages(w),pageSize:l.pageSize,onPageChange:l.setPage,onPageSizeChange:l.setPageSize}):e.jsxs(e.Fragment,{children:[e.jsx(gs,{columns:dt,data:C,layout:"fixed",...cs(ne.layout),keyFn:s=>s.id,onRowClick:s=>t(`/escalations/detail/${s.id}`,{state:{from:"/escalations/available"}}),isLoading:Qe,emptyMessage:_?"Unable to load data":"No escalations"}),e.jsx(fs,{page:l.page,totalPages:l.totalPages(w),onPageChange:l.setPage,total:w,pageSize:l.pageSize,onPageSizeChange:l.setPageSize})]}),e.jsx(Os,{claimTarget:b,onClose:()=>f(null),claimDuration:r,onDurationChange:s=>{k(s),E(0)},claimDurations:p,customClaimMinutes:P,onCustomClaimChange:T,onClaim:tt,isPending:xe.isPending}),e.jsx(As,{open:Oe,onClose:()=>W(!1),selectedCount:y.size,onSubmit:nt,isPending:te.isPending}),e.jsx(as,{open:Le,onClose:()=>Y(!1),selectedCount:y.size,selectedRoles:Je,claimedCount:Ze,onSubmit:it,isPending:ee.isPending}),e.jsx(ns,{open:Me,onClose:()=>X(!1),onConfirm:rt,selectedCount:y.size,isPending:$.isPending,error:$.error,actionLabel:typeof ie=="string"?ie:void 0})]})}export{ra as AvailableEscalationsPage};
|
|
2
|
-
//# sourceMappingURL=AvailableEscalationsPage-DU84iaBN.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,a as P}from"./vendor-query-DvWWuNIB.js";import{X as Q,bH as W,bI as X,d as H,e as Y,as as Z,b as J,u as B,C as K,U as tt}from"./vendor-icons-C_DQEeBy.js";import{bb as et,bc as st,a8 as at,bd as rt,a9 as nt,be as T,ai as A}from"./index-BLbZsMRG.js";import{j as it,n as ot,i as lt}from"./escalation-items-uDQTphVW.js";import{D as ct}from"./DataTable-FjFhx0SE.js";import{m as dt}from"./escalation-columns-BPSH8qMx.js";import{U as xt}from"./UserName-DrAbCpdY.js";import{L as E}from"./vendor-react-_9U4mKFr.js";const k="created_at";function _(t){return t.replace(/^metadata\./,"")}function Lt({orderBy:t,onChange:s}){const i=t==null?void 0:t[0],r=(i==null?void 0:i.field)??k,o=(i==null?void 0:i.direction)??"desc",n=r===k,c=d=>s([{...i??{},field:r,direction:d}]);return e.jsxs("div",{className:"flex items-center gap-1.5",children:[!n&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-accent/25 bg-accent/8 px-2 py-0.5 text-2xs font-medium text-accent/90",children:[e.jsx("span",{className:"text-text-quaternary",children:"sort"}),e.jsx("span",{className:"font-mono max-w-[120px] truncate",title:r,children:_(r)}),e.jsx("button",{onClick:()=>s(void 0),className:"ml-0.5 -mr-0.5 flex items-center text-text-quaternary hover:text-status-error transition-colors","aria-label":"Reset sort to created date",children:e.jsx(Q,{className:"w-2.5 h-2.5"})})]}),e.jsxs("div",{className:"flex items-center rounded overflow-hidden border border-surface-border",role:"radiogroup","aria-label":"Sort direction",children:[e.jsx("button",{type:"button",role:"radio","aria-checked":o==="desc",onClick:()=>c("desc"),className:`px-1.5 py-1 transition-colors ${o==="desc"?"bg-accent text-text-inverse":"icon-link hover:bg-surface-hover"}`,title:n?"Newest first":`${_(r)} descending`,children:e.jsx(W,{className:"w-3.5 h-3.5"})}),e.jsx("button",{type:"button",role:"radio","aria-checked":o==="asc",onClick:()=>c("asc"),className:`px-1.5 py-1 border-l border-surface-border transition-colors ${o==="asc"?"bg-accent text-text-inverse":"icon-link hover:bg-surface-hover"}`,title:n?"Oldest first":`${_(r)} ascending`,children:e.jsx(X,{className:"w-3.5 h-3.5"})})]})]})}function ut(t){if(!t)return null;const{"x-lt-related":s,"x-lt-row-detail":i,...r}=t,o=Array.isArray(r["x-lt-columns"])?r["x-lt-columns"].filter(n=>!(n!=null&&n.related)):r["x-lt-columns"];return{...r,"x-lt-columns":o}}function mt(t){try{return ot(t).groupKey??void 0}catch{return}}function Tt(t,{limit:s,offset:i,staleTime:r,enabled:o=!0}){var j,a,u,m,v;const{available:n,claimed:c,apiStatus:d}=et(t.statusFilter),p=st(t),l=at(p??"",void 0,o&&!!p),x=((j=l.data)==null?void 0:j.list_schema)??null,f=!p||l.isFetched,b=t.view==="table"||t.view==="timeline"?void 0:mt(x),y={role:t.role,type:t.type,subtype:t.subtype,priority:t.priority,limit:s,offset:i,sort_by:"created_at",order:"desc",search:t.search,...t.facets,include:it(ut(x))?"envelope":void 0,...b?{groupBy:b}:{},...r!==void 0?{staleTime:r}:{}},C=rt({...y,enabled:o&&n&&f}),$=nt({status:d,claimed:c||void 0,...y,enabled:o&&!n&&f}),h=n?C:$,w=!!p&&!!x&&!!x["x-lt-layout"]&&x["x-lt-layout"]!=="table";return{escalations:((a=h.data)==null?void 0:a.escalations)??[],total:((u=h.data)==null?void 0:u.total)??0,groups:b?((m=h.data)==null?void 0:m.groups)??null:null,listSchema:x,listSchemaVersion:((v=l.data)==null?void 0:v.version)??null,singleRole:p,hasRichView:w,isLoading:h.isLoading,isFetching:h.isFetching,error:h.error,refetch:()=>{h.refetch()}}}function pt(t){return t===T.COMPACT?{fold:"never",density:"compact"}:t===T.CARDS?{fold:"always",density:"default"}:{fold:"auto",density:"default"}}function At({escalations:t,highlightKeys:s,onRowClick:i,isLoading:r,emptyMessage:o="No escalations",layout:n}){const c=P.useMemo(()=>dt({highlightKeys:s}),[s]);return e.jsx(ct,{columns:c,data:t,layout:"fixed",...pt(n),inline:!0,keyFn:d=>d.id,onRowClick:i,isLoading:r,emptyMessage:o})}const R={pending:"--lt-status-queued-graphic",claimed:"--lt-status-claimed-graphic",resolved:"--lt-status-success-graphic",cancelled:"--lt-text-quaternary",expired:"--lt-text-tertiary"},V="--lt-text-quaternary";function ht(t){return R[t]??V}const N=Object.fromEntries(Object.entries(R).map(([t,s])=>[t,`rgb(var(${s}))`])),D=40,ft=64,bt=24,F=3;function G(t){return t<6e4?`${Math.round(t/1e3)}s`:t<36e5?`${Math.round(t/6e4)}m`:t<864e5?`${(t/36e5).toFixed(1)}h`:`${(t/864e5).toFixed(1)}d`}function O(t){const s=Date.now()-t;return s<6e4?"just now":s<36e5?`${Math.round(s/6e4)}m ago`:s<864e5?`${Math.round(s/36e5)}h ago`:`${Math.round(s/864e5)}d ago`}function q(t){return t.replace(/-/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function yt(t,s){return t?[...s.filter(r=>r in t),...Object.keys(t).filter(r=>!s.includes(r))].map(r=>[r,t[r]]):[]}function vt({e:t}){const s=t.endMs-t.startMs;if(s<=0)return null;const i=N.pending,r=N.claimed,o=t.status==="cancelled"||t.status==="expired"?N.cancelled:N.resolved;let n=100,c=0,d=0;return t.claimedMs!==null?(n=Math.max(0,Math.min(100,(t.claimedMs-t.startMs)/s*100)),t.isOpen?c=100-n:(c=Math.max(0,Math.min(100-n,(t.endMs-t.claimedMs)/s*100)),d=Math.max(0,100-n-c))):t.isOpen||(d=100,n=0),e.jsxs("div",{className:"mt-2 h-0.5 rounded-full overflow-hidden flex bg-surface-sunken",children:[n>0&&e.jsx("div",{style:{width:`${n}%`,backgroundColor:i,opacity:.6}}),c>0&&e.jsx("div",{style:{width:`${c}%`,backgroundColor:r,opacity:.6}}),d>0&&e.jsx("div",{style:{width:`${d}%`,backgroundColor:o,opacity:.6}})]})}function jt({gapMs:t,heightPx:s}){return e.jsx("div",{className:"relative flex items-center justify-center",style:{height:s},children:t>=6e4&&e.jsx("span",{className:"text-2xs text-text-quaternary font-mono bg-surface px-2 relative z-10",children:G(t)})})}function U({e:t,highlightKeys:s,onRowClick:i}){const[r,o]=P.useState(!1),n=N[t.displayStatus]??`rgb(var(${V}))`,c=yt(t.metadata,s),d=r?c:c.slice(0,F),p=c.length-F;return e.jsxs("div",{className:"cursor-pointer max-w-[460px] min-w-[260px] w-full bg-surface-raised rounded-lg shadow-sm border border-surface-border/60 px-3.5 pt-2.5 pb-2 hover:shadow-md hover:border-surface-border transition-all duration-150",style:{borderTopWidth:"3px",borderTopColor:n},onClick:()=>i==null?void 0:i(t),children:[e.jsxs("div",{className:"flex items-baseline gap-2 mb-1.5",children:[e.jsx("span",{className:"text-2xs font-bold uppercase tracking-widest text-text-quaternary shrink-0",children:q(t.role)}),e.jsxs("span",{className:"text-xs font-semibold text-text-primary truncate",title:t.type,children:[t.type,t.subtype&&t.subtype!==t.type&&t.subtype!==""&&e.jsxs("span",{className:"font-normal text-text-tertiary",children:[" · ",t.subtype]})]})]}),d.length>0&&e.jsxs("div",{className:"border-t border-surface-border/40 pt-1 space-y-px",children:[d.map(([l,x])=>{const f=String(x),b=s.includes(l);return e.jsxs("div",{className:"group/row flex items-center gap-1.5 -mx-1 px-1 py-[2px] rounded",children:[e.jsx("span",{className:`shrink-0 w-[60px] text-2xs font-mono uppercase tracking-wide truncate ${b?"text-accent":"text-text-quaternary"}`,title:l,children:l}),e.jsx("span",{className:`flex-1 min-w-0 text-2xs font-medium truncate ${b?"text-text-primary":"text-text-tertiary"}`,title:f,children:f}),e.jsxs("span",{className:"flex items-center gap-px shrink-0 opacity-0 group-hover/row:opacity-100 transition-opacity",children:[e.jsx(E,{to:A(l,x,t.role),className:"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors",title:`Filter ${q(t.role)}: ${l} = ${f}`,onClick:y=>y.stopPropagation(),children:e.jsx(Z,{className:"w-2.5 h-2.5"})}),e.jsx(E,{to:A(l,x),className:"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors",title:`Search all: ${l} = ${f}`,onClick:y=>y.stopPropagation(),children:e.jsx(J,{className:"w-2.5 h-2.5"})})]})]},l)}),p>0&&e.jsx("button",{className:"flex items-center gap-0.5 text-2xs text-text-quaternary hover:text-accent transition-colors mt-0.5 -mx-1 px-1 py-px",onClick:l=>{l.stopPropagation(),o(x=>!x)},children:r?e.jsxs(e.Fragment,{children:[e.jsx(B,{className:"w-2.5 h-2.5"})," less"]}):e.jsxs(e.Fragment,{children:[e.jsx(K,{className:"w-2.5 h-2.5"})," ",p," more"]})})]}),e.jsx(vt,{e:t}),t.assigned_to&&e.jsxs("div",{className:"mt-1 flex items-center justify-end gap-1 text-2xs text-text-tertiary",children:[e.jsx(tt,{className:"w-3 h-3 shrink-0",strokeWidth:1.5}),e.jsx(xt,{userId:t.assigned_to,className:"truncate max-w-[70%]"})]})]})}function Et({escalations:t,highlightKeys:s=[],onRowClick:i,total:r,page:o,totalPages:n,onPageChange:c}){var w,j;const d=Date.now(),l=t.map(a=>{const u=new Date(a.created_at).getTime(),m=a.resolved_at?new Date(a.resolved_at).getTime():null,v=a.claimed_at?new Date(a.claimed_at).getTime():null,M=!m&&a.status!=="cancelled"&&a.status!=="expired",S=m??(M?d:u+3e4),g=a.status==="pending"&<(a)?"claimed":a.status;return{...a,startMs:u,claimedMs:v,endMs:S,isOpen:M,displayStatus:g}});if(l.length===0)return e.jsx("p",{className:"mt-12 text-center text-sm text-text-tertiary",children:"No escalations matched."});const x=l.length,b=Math.max(Math.abs((((w=l[x-1])==null?void 0:w.startMs)??0)-(((j=l[0])==null?void 0:j.startMs)??0)),1)/Math.max(x-1,1),y=ft/Math.max(b,1),$=new Set(l.map(a=>new Date(a.startMs).toDateString())).size>1;function h(a){const u=new Date(a),m=u.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return $?u.toLocaleDateString([],{month:"short",day:"numeric"})+" "+m:m}return e.jsxs("div",{className:"mt-4 pb-24",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-1/2 -translate-x-px inset-y-0 w-px bg-surface-border/80"}),l.map((a,u)=>{const m=l[u-1],v=m?Math.abs(a.startMs-m.startMs):null,M=v!==null?Math.max(bt,Math.round(v*y)):0,S=u%2===0,g=ht(a.displayStatus),z=`rgb(var(${g}))`,I=a.endMs-a.startMs,L=a.isOpen?O(a.startMs):`${O(a.startMs)} · ${G(I)}`;return e.jsxs("div",{children:[u>0&&e.jsx(jt,{gapMs:v,heightPx:M}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"flex-1 flex justify-end items-center",children:S?e.jsxs("div",{className:"flex items-center",children:[e.jsx(U,{e:a,highlightKeys:s,onRowClick:i}),e.jsx("div",{className:"flex-shrink-0 h-px bg-surface-border/70",style:{width:D}})]}):e.jsx("span",{className:"text-2xs text-text-quaternary font-mono tabular-nums pr-3",children:L})}),e.jsx("div",{className:"relative z-10 flex-shrink-0 w-3.5 h-3.5 rounded-full border-2 border-surface cursor-pointer transition-all duration-150 hover:scale-[1.5]",style:{backgroundColor:z,boxShadow:`0 0 0 3px rgb(var(${g}) / 0.16), 0 1px 3px rgb(var(${g}) / 0.19)`},onClick:()=>i==null?void 0:i(a)}),e.jsx("div",{className:"flex-1 flex justify-start items-center",children:S?e.jsx("span",{className:"text-2xs text-text-quaternary font-mono tabular-nums pl-3",children:L}):e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"flex-shrink-0 h-px bg-surface-border/70",style:{width:D}}),e.jsx(U,{e:a,highlightKeys:s,onRowClick:i})]})})]}),e.jsx("div",{className:"flex justify-center relative z-10 mt-0.5",children:e.jsx("span",{className:"text-2xs text-text-quaternary font-mono tabular-nums bg-surface px-1.5",children:h(a.startMs)})})]},a.id)})]}),n>1&&e.jsxs("div",{className:"sticky bottom-0 z-20 bg-surface/95 backdrop-blur-sm border-t border-surface-border -mx-page-x px-page-x pt-2 pb-4 flex items-center justify-between mt-10",children:[e.jsxs("span",{className:"text-2xs text-text-tertiary",children:["Page ",e.jsx("span",{className:"font-medium text-text-secondary",children:o})," ","of ",e.jsx("span",{className:"font-medium text-text-secondary",children:n})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>c(o-1),disabled:o<=1,className:"p-1.5 rounded hover:bg-surface-hover disabled:opacity-30 text-text-tertiary hover:text-text-primary transition-colors disabled:cursor-not-allowed",children:e.jsx(H,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>c(o+1),disabled:o>=n,className:"p-1.5 rounded hover:bg-surface-hover disabled:opacity-30 text-text-tertiary hover:text-text-primary transition-colors disabled:cursor-not-allowed",children:e.jsx(Y,{className:"w-4 h-4"})})]})]})]})}export{Lt as E,Et as a,At as b,pt as t,Tt as u};
|
|
2
|
-
//# sourceMappingURL=EscalationTimeline-BWTUBxUf.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./vendor-query-DvWWuNIB.js";import{b0 as o,bh as c,g as u}from"./index-BLbZsMRG.js";import{U as p}from"./UserName-DrAbCpdY.js";const r=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/,i="—",a={AGE:"age",AGO:"ago",DATE:"date",USER:"user"};function m(e){return e===a.AGE||e===a.AGO}function x({raw:e,format:s}){if(!e||e===i)return t.jsx("span",{className:"text-text-quaternary",children:i});if(s===a.USER)return t.jsx(p,{userId:e,className:"block truncate"});const n=r.test(e)||!Number.isNaN(new Date(e).getTime())&&(m(s)||s===a.DATE);return m(s)&&n?t.jsx("span",{title:c(e),className:"tabular-nums whitespace-nowrap",children:o(e)}):n&&(s===a.DATE||r.test(e))?t.jsx(u,{date:e,format:"datetime",className:"text-text-primary whitespace-nowrap"}):t.jsx(t.Fragment,{children:e})}export{i as E,x as F,m as i};
|
|
2
|
-
//# sourceMappingURL=FormattedValue-DeVrRJy4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormattedValue-DeVrRJy4.js","sources":["../../src/components/common/display/FormattedValue.tsx"],"sourcesContent":["import { DateValue } from './DateValue';\nimport { UserName } from './UserName';\nimport { formatAgoCompact } from '../../../lib/format';\nimport { formatDisplayDateTime } from '../../../lib/display-zone';\n\nconst ISO_DATETIME = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}/;\nexport const EM_DASH = '—';\n\n/** Value formats an author may name on a column, card field, or fact. `ago` is the spoken form of `age`. */\nexport const FIELD_FORMATS = {\n AGE: 'age',\n AGO: 'ago',\n DATE: 'date',\n USER: 'user',\n} as const;\n\n/** True when the format renders as an age that ages with the clock. */\nexport function isAgeFormat(format?: string): boolean {\n return format === FIELD_FORMATS.AGE || format === FIELD_FORMATS.AGO;\n}\n\n/**\n * Render a value with a little care: `age`/`ago` turns a timestamp into a\n * compact age (\"12m\", \"3h\") with the absolute time as its tooltip; `date`\n * renders the full date, hoverable, and so does any ISO datetime with no\n * format; `user` resolves a user id to a display name; an empty value a quiet\n * em dash; anything else plain text.\n */\nexport function FormattedValue({ raw, format }: { raw: string; format?: string }) {\n if (!raw || raw === EM_DASH) return <span className=\"text-text-quaternary\">{EM_DASH}</span>;\n if (format === FIELD_FORMATS.USER) return <UserName userId={raw} className=\"block truncate\" />;\n const isDate = ISO_DATETIME.test(raw) || !Number.isNaN(new Date(raw).getTime()) && (isAgeFormat(format) || format === FIELD_FORMATS.DATE);\n if (isAgeFormat(format) && isDate) {\n return <span title={formatDisplayDateTime(raw)} className=\"tabular-nums whitespace-nowrap\">{formatAgoCompact(raw)}</span>;\n }\n if (isDate && (format === FIELD_FORMATS.DATE || ISO_DATETIME.test(raw))) {\n return <DateValue date={raw} format=\"datetime\" className=\"text-text-primary whitespace-nowrap\" />;\n }\n return <>{raw}</>;\n}\n"],"names":["ISO_DATETIME","EM_DASH","FIELD_FORMATS","isAgeFormat","format","FormattedValue","raw","jsx","UserName","isDate","formatDisplayDateTime","formatAgoCompact","DateValue"],"mappings":"kJAKA,MAAMA,EAAe,iCACRC,EAAU,IAGVC,EAAgB,CAC3B,IAAK,MACL,IAAK,MACL,KAAM,OACN,KAAM,MACR,EAGO,SAASC,EAAYC,EAA0B,CACpD,OAAOA,IAAWF,EAAc,KAAOE,IAAWF,EAAc,GAClE,CASO,SAASG,EAAe,CAAE,IAAAC,EAAK,OAAAF,GAA4C,CAChF,GAAI,CAACE,GAAOA,IAAQL,SAAgBM,EAAAA,IAAC,OAAA,CAAK,UAAU,uBAAwB,SAAAN,CAAA,CAAQ,EACpF,GAAIG,IAAWF,EAAc,KAAM,aAAQM,EAAA,CAAS,OAAQF,EAAK,UAAU,gBAAA,CAAiB,EAC5F,MAAMG,EAAST,EAAa,KAAKM,CAAG,GAAK,CAAC,OAAO,MAAM,IAAI,KAAKA,CAAG,EAAE,SAAS,IAAMH,EAAYC,CAAM,GAAKA,IAAWF,EAAc,MACpI,OAAIC,EAAYC,CAAM,GAAKK,EAClBF,EAAAA,IAAC,OAAA,CAAK,MAAOG,EAAsBJ,CAAG,EAAG,UAAU,iCAAkC,SAAAK,EAAiBL,CAAG,CAAA,CAAE,EAEhHG,IAAWL,IAAWF,EAAc,MAAQF,EAAa,KAAKM,CAAG,SAC3DM,EAAA,CAAU,KAAMN,EAAK,OAAO,WAAW,UAAU,sCAAsC,oBAEvF,SAAAA,CAAA,CAAI,CAChB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as f,j as e}from"./vendor-query-DvWWuNIB.js";import{$ as Z,z as H,a7 as J,Y as X,_ as ee,Z as se,a0 as te,I as ae,K as oe,L as ie,a8 as re,a9 as ne}from"./index-BLbZsMRG.js";import{u as le}from"./useFilterParams-DBRw1Hcv.js";import{u as ce}from"./useDebouncedValue-CbHmpS4w.js";import{b as me}from"./api-path-u2Jf9QXS.js";import{i as pe}from"./task-queues-7-sHKPsN.js";import{D as ue}from"./DataTable-FjFhx0SE.js";import{S as de}from"./StickyPagination-C2drZk7w.js";import{R as he,a as ge}from"./RowActions-Bdd7z4eB.js";import{E as fe,a as xe,T as be,b as we}from"./escalation-columns-BPSH8qMx.js";import{E as ye}from"./EscalationTitleSelect-DOsfY4u8.js";import{L as ve}from"./ListToolbar-B0qe2QZ5.js";import{y as Pe,al as Se,am as je,P as Ce,ap as Re}from"./vendor-icons-C_DQEeBy.js";import{u as Ee,a as ke,f as Le}from"./vendor-react-_9U4mKFr.js";import"./EmptyState-DgC_6njU.js";import"./useContainerWidth-DSLp1gEm.js";import"./escalation-items-uDQTphVW.js";import"./StatusBadge-DHVwxre2.js";import"./FormattedValue-DeVrRJy4.js";import"./UserName-DrAbCpdY.js";import"./EntityTimelinePanel-BtARWy3R.js";import"./FilterBar-Dnse0soD.js";import"./PriorityBadge-r33mpDju.js";import"./RolePill-Bw_n7EpR.js";import"./WorkflowPill-Cly9Ln_3.js";import"./CountdownTimer-C-Ngk8oq.js";function ts(){var T,V;const z=Ee(),{user:i,isSuperAdmin:F,hasRoleType:_}=Z(),{filters:o,setFilter:y,pagination:t,sort:x,setSort:A}=le({filters:{role:"",type:"",priority:"",search:""}});H({role:o.role||null,verbs:["claimed","resolved","updated"]});const O=ce(o.search),M=J(),{data:b}=X(),{data:w}=ee(),{data:n}=se(),v=F||_("admin"),P=f.useMemo(()=>new Set(((i==null?void 0:i.roles)??[]).map(s=>s.role)),[i]),I=f.useMemo(()=>{const s=(n==null?void 0:n.roles)??[];return(v?s:s.filter(a=>P.has(a.role)&&!pe(a.role))).map(a=>({value:a.role,label:te(a)})).sort((a,W)=>a.label.localeCompare(W.label))},[n,v,P]),l=ke(),{data:c}=ae(),S=oe(),U=f.useCallback(()=>{var a;const s=window.prompt("Pin label:");if(!(s!=null&&s.trim()))return;const g=((a=c==null?void 0:c.preferences)==null?void 0:a.pinnedViews)??[];S.mutate({pinnedViews:[...g,{id:ie(),label:s.trim(),url:l.pathname+l.search,badge:!0}]})},[l.pathname,l.search,c,S]),[q,j]=Le(),C=q.get("view"),$=f.useCallback(s=>{j(g=>{const a=new URLSearchParams(g);return s?a.set("view",s):a.delete("view"),a},{replace:!0})},[j]),m=o.role||null,R=re(m??"",void 0,!!m),p=((T=R.data)==null?void 0:T.list_schema)??null,E=!!m&&!!p&&!!p["x-lt-layout"]&&p["x-lt-layout"]!=="table",u=E&&(C?C==="rich":!0),k={assigned_to:i==null?void 0:i.userId,status:"pending",role:o.role||void 0,type:o.type||void 0,priority:o.priority?parseInt(o.priority):void 0,search:O||void 0,sort_by:x.sort_by||"created_at",order:x.order||"desc"},{data:r,isLoading:B,error:d,refetch:D,isFetching:G}=ne({...k,limit:t.pageSize,offset:t.offset}),L=(r==null?void 0:r.escalations)??[],h=(r==null?void 0:r.total)??0,Q=me("/escalations",{...k,limit:t.pageSize,offset:t.offset}),Y={key:"actions",label:"",render:s=>e.jsx(he,{children:e.jsx(ge,{icon:Re,title:"Release escalation",onClick:()=>M.mutate(s.id),alwaysVisible:!0,colorClass:"text-status-warning/40 hover:text-status-warning"})}),className:"w-16 text-right"},K=[be,...we,Y],N=s=>z(`/escalations/detail/${s.id}`,{state:{from:"/escalations/queue"}});return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-10 min-w-0",children:[e.jsx(ye,{role:o.role,options:I,onChange:s=>y("role",s),emptyLabel:"My Escalations"}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:dashboard.md:all-escalations"},className:"text-text-quaternary hover:text-accent transition-colors mt-1 shrink-0",title:"Open docs for this page",children:e.jsx(Pe,{className:"w-4 h-4",strokeWidth:1.5})})]}),e.jsx(fe,{filters:o,setFilter:y,roles:(b==null?void 0:b.roles)??[],types:(w==null?void 0:w.types)??[],actions:e.jsxs(e.Fragment,{children:[e.jsx(ve,{onRefresh:()=>D(),isFetching:G,apiPath:Q}),E&&e.jsx("button",{onClick:()=>$(u?"table":"rich"),className:"ml-2 inline-flex h-7 w-7 items-center justify-center rounded icon-link hover:bg-surface-hover",title:u?"Table view":"Rich view",children:u?e.jsx(Se,{className:"w-4 h-4"}):e.jsx(je,{className:"w-4 h-4"})}),e.jsx("button",{onClick:U,className:"ml-2 inline-flex h-7 w-7 items-center justify-center rounded icon-link hover:bg-surface-hover",title:"Pin this view — save the current filters to your Pinned section","data-testid":"pin-current-view",children:e.jsx(Ce,{className:"w-4 h-4"})})]})}),d&&e.jsx("div",{className:"mb-4 px-4 py-3 rounded-md bg-status-error/10 border border-status-error/20 text-xs text-status-error",children:d.message==="Session expired"?"Your session has expired. Please log in again.":`Failed to load escalations: ${d.message}`}),u?e.jsx(xe,{role:m,listSchema:p,listSchemaVersion:((V=R.data)==null?void 0:V.version)??null,activeEscalations:L,onRowClick:N,forceViewAction:!0,total:h,page:t.page,totalPages:t.totalPages(h),pageSize:t.pageSize,onPageChange:t.setPage,onPageSizeChange:t.setPageSize}):e.jsxs(e.Fragment,{children:[e.jsx(ue,{columns:K,data:L,layout:"fixed",keyFn:s=>s.id,onRowClick:N,isLoading:B,emptyMessage:d?"Unable to load data":"No assigned escalations",sort:x,onSort:A}),e.jsx(de,{page:t.page,totalPages:t.totalPages(h),onPageChange:t.setPage,total:h,pageSize:t.pageSize,onPageSizeChange:t.setPageSize})]})]})}export{ts as OperatorDashboard};
|
|
2
|
-
//# sourceMappingURL=OperatorDashboard-Cw86vOPg.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as f,j as e}from"./vendor-query-DvWWuNIB.js";import{aZ as w,bc as R,bm as N,bn as I,a3 as F,bo as v,a6 as j,Z as _,w as O,bp as M,aX as k,j as $,b1 as A,a0 as V}from"./index-BLbZsMRG.js";import{u as W}from"./useContainerWidth-DSLp1gEm.js";import{u as T,E as q,a as B,b as z}from"./EscalationTimeline-BWTUBxUf.js";import{a as K}from"./escalation-columns-BPSH8qMx.js";import{P as G,al as Y,am as H,an as U,aB as X,L as S}from"./vendor-icons-C_DQEeBy.js";import{u as Z,L as y,e as D}from"./vendor-react-_9U4mKFr.js";import"./escalation-items-uDQTphVW.js";import"./StatusBadge-DHVwxre2.js";import"./DataTable-FjFhx0SE.js";import"./EmptyState-DgC_6njU.js";import"./UserName-DrAbCpdY.js";import"./FormattedValue-DeVrRJy4.js";import"./StickyPagination-C2drZk7w.js";import"./EntityTimelinePanel-BtARWy3R.js";import"./FilterBar-Dnse0soD.js";import"./PriorityBadge-r33mpDju.js";import"./RolePill-Bw_n7EpR.js";import"./WorkflowPill-Cly9Ln_3.js";import"./CountdownTimer-C-Ngk8oq.js";const E="system.escalation.",L=[["escalations"]];function Q(t,i){const l=new Set;let c=!1;for(const{url:d}of t){const s=w(i(d));if(!s)continue;const a=R(s);a?l.add(a):c=!0}if(c||l.size===0)return{patterns:c?[N({})]:[],keysFor:()=>L};const r=new Map([...l].map(d=>[I(d),d]));return{patterns:[...l].sort().map(d=>N({role:d})),keysFor(d){const s=d.startsWith(E)?d.slice(E.length).split(".")[0]:"",a=r.get(s);return a?[["escalations",{role:a}],["escalations","available",{role:a}],["escalations",{roles:[a]}],["escalations","available",{roles:[a]}],["escalations","related",a],["escalations","related-rows",a]]:L}}}const J=25,ee=15e3,te={statusFilter:"",facets:{},view:null},se={"--lt-sticky-top":"0px"};function ae({pin:t,url:i,from:l}){const c=Z(),r=f.useMemo(()=>w(i),[i]),[p,d]=f.useState(null),[s,a]=f.useState(void 0),m=s??(r==null?void 0:r.facets.orderBy),o=f.useMemo(()=>r?m===r.facets.orderBy?r:{...r,facets:{...r.facets,orderBy:m}}:null,[r,m]),n=T(o??te,{limit:J,offset:0,staleTime:ee,enabled:o!==null}),h=o?F(p??o.view,n.hasRichView):null,b=f.useMemo(()=>Object.keys((o==null?void 0:o.facets.facets)??{}),[o]),g=x=>c(`/escalations/detail/${x.id}`,{state:{from:l}}),u=Math.max(0,n.total-n.escalations.length);return e.jsxs("section",{className:"min-h-0 flex flex-col overflow-hidden border border-surface-border bg-surface-sunken rounded-[var(--lt-radius-section)]",style:se,"data-testid":"portal-panel",children:[e.jsxs("header",{className:"flex items-center justify-between gap-2 px-4 py-2.5 shrink-0 border-b border-surface-border bg-surface-hover",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(G,{className:"w-3.5 h-3.5 shrink-0 text-accent/60",strokeWidth:1.5}),e.jsx("h2",{className:"section-h2 truncate",title:t.label,children:t.label}),o&&n.total>0&&e.jsx("span",{className:"text-2xs tabular-nums text-text-tertiary","data-testid":"portal-panel-count",children:v(n.total)})]}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[o&&h!==j.TIMELINE&&n.hasRichView&&e.jsx("div",{role:"radiogroup","aria-label":"Panel view",className:"flex items-center rounded overflow-hidden border border-surface-border",children:[{key:j.TABLE,title:"Table view",Icon:Y},{key:j.RICH,title:"Rich view",Icon:H}].map(({key:x,title:C,Icon:P})=>e.jsx("button",{type:"button",role:"radio","aria-checked":h===x,onClick:()=>d(x),className:`px-1.5 py-1 transition-colors ${h===x?"bg-accent text-text-inverse":"icon-link hover:bg-surface-raised"}`,title:C,children:e.jsx(P,{className:"w-3.5 h-3.5"})},x))}),o&&e.jsx(q,{orderBy:m,onChange:a}),o&&e.jsx("button",{type:"button",onClick:n.refetch,disabled:n.isFetching,className:"inline-flex h-7 w-7 items-center justify-center rounded icon-link hover:bg-surface-hover disabled:opacity-50",title:"Refresh",children:e.jsx(U,{className:`w-3.5 h-3.5 ${n.isFetching?"animate-spin":""}`})}),e.jsx(y,{to:i,className:"inline-flex h-7 w-7 items-center justify-center rounded icon-link hover:bg-surface-hover",title:"Open the full view","data-testid":"portal-panel-open",children:e.jsx(X,{className:"w-3.5 h-3.5"})})]})]}),e.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto @container px-4 py-3",children:[o?n.error?e.jsxs("p",{className:"py-6 text-center text-xs text-status-error",role:"alert",children:["Failed to load: ",n.error.message]}):h===j.TIMELINE?e.jsx(B,{escalations:n.escalations,highlightKeys:b,onRowClick:g,total:n.total,page:1,totalPages:1,onPageChange:()=>{}}):h===j.RICH?e.jsx(K,{role:n.singleRole,listSchema:n.listSchema,listSchemaVersion:n.listSchemaVersion,activeEscalations:n.escalations,groups:n.groups,onRowClick:g,onOpenGroup:x=>c(x)}):e.jsx(z,{escalations:n.escalations,highlightKeys:b,onRowClick:g,isLoading:n.isLoading,layout:o.layout}):e.jsxs("p",{className:"py-6 text-center text-xs text-text-quaternary",children:[e.jsx(y,{to:i,className:"text-accent hover:underline",children:t.label})," opens as its own page."]}),u>0&&e.jsxs(y,{to:i,className:"block pt-3 pb-1 text-2xs text-accent hover:underline","data-testid":"portal-panel-more",children:[v(u)," more in the full view"]})]})]})}const ne=54;function re(){if(typeof document>"u")return 16;const t=parseFloat(getComputedStyle(document.documentElement).fontSize);return Number.isFinite(t)&&t>0?t:16}function le({rows:t,resolveUrl:i,from:l}){const[c,r]=W(),p=r!==null&&r<ne*re(),d=(s,a)=>e.jsx(ae,{pin:s,url:i(s.url),from:l},a);return p?e.jsx("div",{ref:c,className:"flex-1 min-h-0 overflow-y-auto grid grid-cols-1 gap-5 auto-rows-[minmax(18rem,auto)]","data-testid":"portal-grid","data-stacked":"true",children:t.flatMap((s,a)=>s.map((m,o)=>d(m,`${a}-${o}`)))}):e.jsx("div",{ref:c,className:"flex-1 min-h-0 grid gap-5",style:{gridTemplateRows:`repeat(${t.length}, minmax(0, 1fr))`},"data-testid":"portal-grid",children:t.map((s,a)=>e.jsx("div",{className:"min-h-0 grid gap-5",style:{gridTemplateColumns:`repeat(${s.length}, minmax(0, 1fr))`},"data-testid":"portal-row",children:s.map((m,o)=>d(m,`${a}-${o}`))},a))})}const oe={statusFilter:"",facets:{},view:null},ie=15e3;function ce({count:t,url:i}){const l=f.useMemo(()=>w(i),[i]),c=T(l??oe,{limit:1,offset:0,staleTime:ie,enabled:l!==null}),r=l?c.isLoading&&c.total===0?null:c.total:null;return e.jsxs(y,{to:i,className:"block min-w-0 border border-surface-border bg-surface-sunken rounded-[var(--lt-radius-section)] px-4 py-3 hover:bg-surface-hover transition-colors",title:`Open ${t.label}`,"data-testid":"portal-count",children:[e.jsx("p",{className:"text-2xs uppercase tracking-widest text-text-tertiary truncate",children:t.label}),e.jsx("p",{className:"mt-1 text-3xl font-light leading-none text-text-primary","data-testid":"portal-count-value",children:r===null?e.jsx("span",{className:"text-text-quaternary",children:"—"}):v(r)}),t.blurb&&e.jsx("p",{className:"mt-1.5 text-xs text-text-secondary leading-snug",children:t.blurb})]})}function de({counts:t,resolveUrl:i}){return t.length===0?null:e.jsx("div",{className:"grid gap-4 shrink-0 mb-4",style:{gridTemplateColumns:"repeat(auto-fit, minmax(10rem, 1fr))"},"data-testid":"portal-counts",children:t.map((l,c)=>e.jsx(ce,{count:l,url:i(l.url)},`${l.label}-${c}`))})}function me({text:t}){return e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center py-10 text-center",children:[e.jsx(S,{className:"w-6 h-6 text-text-quaternary/50 mb-2",strokeWidth:1}),e.jsx("p",{className:"text-xs text-text-quaternary",children:t})]})}function Ie(){const{role:t="",portal:i}=D(),{data:l,isFetched:c}=_(),{resolveUrl:r}=O(),p=l==null?void 0:l.roles.find(u=>u.role===t),d=M(p),s=i?d.find(u=>u.key===i):d[0],a=(s==null?void 0:s.rows)??null,m=(s==null?void 0:s.counts)??[],o=s?k(t,s.key):k(t),n=f.useMemo(()=>Q(a?[...a.flat(),...m]:[],r),[a,m,r]),h=$("LIST");A(n.patterns,u=>{h(n.keysFor(u.type))});const b=a?a.reduce((u,x)=>u+x.length,0):0,g=c?d.length===0?"This role declares no portal yet. Compose one under Admin, Roles, Portal.":s?null:"This role has no portal by that name.":null;return e.jsxs("div",{className:"flex-1 min-h-0 flex flex-col -mt-[calc(2rem-var(--lt-space-page-x))] -mb-[calc(4rem-var(--lt-space-page-x))]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0 text-2xs uppercase tracking-widest text-text-tertiary",children:[e.jsx(S,{className:"w-3 h-3 text-accent/60 shrink-0",strokeWidth:1.5}),e.jsx("h1",{className:"truncate font-semibold",title:t,children:V(p??{role:t})}),s&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-text-quaternary",children:"·"}),e.jsx("span",{className:"truncate","data-testid":"portal-title",children:s.label})]}),b>0&&e.jsxs("span",{className:"text-text-quaternary normal-case tracking-normal",children:[b," ",b===1?"view":"views"]})]}),c?g?e.jsx(me,{text:g}):e.jsxs(e.Fragment,{children:[e.jsx(de,{counts:m,resolveUrl:r}),e.jsx(le,{rows:a,resolveUrl:r,from:o})]}):null]})}export{Ie as PortalPage};
|
|
2
|
-
//# sourceMappingURL=PortalPage-1rXm0cNK.js.map
|