@activecollab/components 2.0.399 → 2.0.401
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/presentation/shared/WebhookLogsDialog.js +243 -56
- package/dist/cjs/presentation/shared/WebhookLogsDialog.js.map +1 -1
- package/dist/esm/presentation/shared/WebhookLogsDialog.d.ts +26 -6
- package/dist/esm/presentation/shared/WebhookLogsDialog.d.ts.map +1 -1
- package/dist/esm/presentation/shared/WebhookLogsDialog.js +243 -57
- package/dist/esm/presentation/shared/WebhookLogsDialog.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import React, { useCallback, useMemo, useState } from "react";
|
|
2
|
+
import React, { useCallback, useMemo, useRef, useState } from "react";
|
|
3
3
|
import styled from "styled-components";
|
|
4
|
+
import { RoundAvatar } from "./RoundAvatar";
|
|
5
|
+
import { AVATAR_COLORS, LG } from "./tokens";
|
|
4
6
|
import { Button } from "../../components/Button";
|
|
5
7
|
import { Chip } from "../../components/Chip";
|
|
8
|
+
import { CompleteCheckbox } from "../../components/CompleteCheckbox";
|
|
6
9
|
import { Dialog } from "../../components/Dialog";
|
|
7
10
|
import { Filter } from "../../components/Filter";
|
|
8
11
|
import { IconButton } from "../../components/IconButton";
|
|
9
|
-
import { CancelCrossIcon, CollapseExpandSingleIcon, GitHubIcon, GitIcon, GitLabIcon } from "../../components/Icons";
|
|
10
|
-
import {
|
|
12
|
+
import { AccessLogIcon, CancelCrossIcon, CollapseExpandSingleIcon, GitHubIcon, GitIcon, GitLabIcon } from "../../components/Icons";
|
|
13
|
+
import { Label } from "../../components/Label";
|
|
14
|
+
import { SelectTrigger } from "../../components/SelectTrigger";
|
|
15
|
+
import { Sheet } from "../../components/Sheet";
|
|
16
|
+
import { Tooltip } from "../../components/Tooltip";
|
|
17
|
+
import { Body2, Caption1, Caption2, Header2, Header3 } from "../../components/Typography";
|
|
11
18
|
|
|
12
19
|
/**
|
|
13
20
|
* "Webhook Logs" — the VCS webhook delivery log, shown as a wide dialog with a
|
|
@@ -29,9 +36,18 @@ import { Body2, Caption1, Caption2, Header3 } from "../../components/Typography"
|
|
|
29
36
|
|
|
30
37
|
/**
|
|
31
38
|
* Normalized event kind. The processor layer maps each provider's raw event
|
|
32
|
-
* header (GitHub `issues
|
|
33
|
-
*
|
|
34
|
-
*
|
|
39
|
+
* header (GitHub `issues` / GitLab `Issue Hook`, GitHub `pull_request` / GitLab
|
|
40
|
+
* `Merge Request Hook`, …) onto one provider-agnostic kind, so the same logical
|
|
41
|
+
* event reads — and filters — identically across connections instead of
|
|
42
|
+
* appearing once per provider. The set below mirrors the app's
|
|
43
|
+
* `EVENT_TYPE_OPTIONS` constant.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The task an outcome created or referenced. In the app each
|
|
48
|
+
* `vcs_webhook_outcomes` row carries a nullable `task_id`; when it is set the
|
|
49
|
+
* outcome offers an "Open Task" link that opens the task in a sheet on top of
|
|
50
|
+
* the log dialog.
|
|
35
51
|
*/
|
|
36
52
|
|
|
37
53
|
export const WEBHOOK_CONNECTIONS = [{
|
|
@@ -100,12 +116,38 @@ export const WEBHOOK_REPOSITORIES = [{
|
|
|
100
116
|
connectionId: "gl-acme-ce"
|
|
101
117
|
}];
|
|
102
118
|
const EVENT_KIND_LABELS = {
|
|
103
|
-
issue: "Issue",
|
|
104
119
|
push: "Push",
|
|
105
|
-
|
|
120
|
+
issue: "Issue",
|
|
121
|
+
pull_request: "Pull Request",
|
|
122
|
+
pull_request_review: "Pull Request Review",
|
|
106
123
|
repository: "Repository",
|
|
107
|
-
|
|
124
|
+
other: "Other"
|
|
108
125
|
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Fixed Event Type filter options, mirroring the app's `EVENT_TYPE_OPTIONS`.
|
|
129
|
+
* The app offers the full list regardless of which kinds are present in the
|
|
130
|
+
* current result set, so we do the same instead of deriving it from the logs.
|
|
131
|
+
*/
|
|
132
|
+
const EVENT_TYPE_OPTIONS = [{
|
|
133
|
+
id: "push",
|
|
134
|
+
label: "Push"
|
|
135
|
+
}, {
|
|
136
|
+
id: "issue",
|
|
137
|
+
label: "Issue"
|
|
138
|
+
}, {
|
|
139
|
+
id: "pull_request",
|
|
140
|
+
label: "Pull Request"
|
|
141
|
+
}, {
|
|
142
|
+
id: "pull_request_review",
|
|
143
|
+
label: "Pull Request Review"
|
|
144
|
+
}, {
|
|
145
|
+
id: "repository",
|
|
146
|
+
label: "Repository"
|
|
147
|
+
}, {
|
|
148
|
+
id: "other",
|
|
149
|
+
label: "Other"
|
|
150
|
+
}];
|
|
109
151
|
const STATUS_LABELS = {
|
|
110
152
|
received: "Received",
|
|
111
153
|
unhandled: "Unhandled",
|
|
@@ -171,9 +213,6 @@ const StatusChip = _ref => {
|
|
|
171
213
|
typographyProps: {
|
|
172
214
|
variant: "Caption 1",
|
|
173
215
|
weight: "medium"
|
|
174
|
-
},
|
|
175
|
-
style: {
|
|
176
|
-
borderRadius: 6
|
|
177
216
|
}
|
|
178
217
|
});
|
|
179
218
|
};
|
|
@@ -252,7 +291,15 @@ const WEBHOOK_LOGS = [{
|
|
|
252
291
|
eventKind: "issue",
|
|
253
292
|
status: "processed",
|
|
254
293
|
deliveryIdentifier: "d3b07384-d9a0-4c9b-8f1e-2a6f1b9c4e21",
|
|
255
|
-
outcomes: [
|
|
294
|
+
outcomes: [{
|
|
295
|
+
summary: "Created task #1842 from issue #42",
|
|
296
|
+
task: {
|
|
297
|
+
id: 1842,
|
|
298
|
+
name: "Webhook delivery retries are not logged",
|
|
299
|
+
projectName: "Feather",
|
|
300
|
+
description: "Retries are not written to the webhook log, so a delivery that only succeeds on a retry still shows as failed. Log each attempt with its outcome."
|
|
301
|
+
}
|
|
302
|
+
}],
|
|
256
303
|
payload: PAYLOAD_ISSUE_OPENED,
|
|
257
304
|
receivedOn: "Jun 29, 2026 · 14:32",
|
|
258
305
|
receivedAt: 1751207520
|
|
@@ -260,10 +307,12 @@ const WEBHOOK_LOGS = [{
|
|
|
260
307
|
id: "log-6",
|
|
261
308
|
connectionId: "gl-content",
|
|
262
309
|
repositoryId: "co-handbook",
|
|
263
|
-
eventKind: "
|
|
310
|
+
eventKind: "pull_request",
|
|
264
311
|
status: "skipped",
|
|
265
312
|
deliveryIdentifier: "b1946ac9-2f3a-4c0d-9b7e-1d2c3e4f5a6b",
|
|
266
|
-
outcomes: [
|
|
313
|
+
outcomes: [{
|
|
314
|
+
summary: "Skipped: merge request has no linked issue"
|
|
315
|
+
}],
|
|
267
316
|
payload: PAYLOAD_MERGE_REQUEST,
|
|
268
317
|
receivedOn: "Jun 29, 2026 · 11:08",
|
|
269
318
|
receivedAt: 1751195280
|
|
@@ -274,7 +323,9 @@ const WEBHOOK_LOGS = [{
|
|
|
274
323
|
eventKind: "issue",
|
|
275
324
|
status: "failed",
|
|
276
325
|
deliveryIdentifier: "9c1185a5-c5e9-4e3f-8a1b-7d6e5f4c3b2a",
|
|
277
|
-
outcomes: [
|
|
326
|
+
outcomes: [{
|
|
327
|
+
summary: "Failed at task creation: project not found"
|
|
328
|
+
}],
|
|
278
329
|
payload: PAYLOAD_ISSUE_OPENED,
|
|
279
330
|
receivedOn: "Jun 28, 2026 · 18:54",
|
|
280
331
|
receivedAt: 1751136840
|
|
@@ -285,7 +336,23 @@ const WEBHOOK_LOGS = [{
|
|
|
285
336
|
eventKind: "push",
|
|
286
337
|
status: "processed",
|
|
287
338
|
deliveryIdentifier: "f7c3bc1d-8c5a-4b2e-9f0a-1b2c3d4e5f60",
|
|
288
|
-
outcomes: [
|
|
339
|
+
outcomes: [{
|
|
340
|
+
summary: "Created task #1839 from issue #311",
|
|
341
|
+
task: {
|
|
342
|
+
id: 1839,
|
|
343
|
+
name: "Refresh the onboarding handbook",
|
|
344
|
+
projectName: "Handbook",
|
|
345
|
+
description: "The onboarding handbook is out of date. Review each section and update the steps that changed in the last release."
|
|
346
|
+
}
|
|
347
|
+
}, {
|
|
348
|
+
summary: "Created task #1840 from issue #312",
|
|
349
|
+
task: {
|
|
350
|
+
id: 1840,
|
|
351
|
+
name: "Document webhook scopes",
|
|
352
|
+
projectName: "Handbook",
|
|
353
|
+
description: "Explain the connection and repository webhook scopes, and when each one applies."
|
|
354
|
+
}
|
|
355
|
+
}],
|
|
289
356
|
payload: PAYLOAD_PUSH,
|
|
290
357
|
receivedOn: "Jun 28, 2026 · 09:21",
|
|
291
358
|
receivedAt: 1751102460
|
|
@@ -293,7 +360,7 @@ const WEBHOOK_LOGS = [{
|
|
|
293
360
|
id: "log-3",
|
|
294
361
|
connectionId: "gh-activecollab",
|
|
295
362
|
repositoryId: "ac-feather",
|
|
296
|
-
eventKind: "
|
|
363
|
+
eventKind: "other",
|
|
297
364
|
status: "unhandled",
|
|
298
365
|
deliveryIdentifier: "1574bddb-75c3-4b1e-8a9c-0d1e2f3a4b5c",
|
|
299
366
|
outcomes: [],
|
|
@@ -320,7 +387,15 @@ const WEBHOOK_LOGS = [{
|
|
|
320
387
|
eventKind: "issue",
|
|
321
388
|
status: "processed",
|
|
322
389
|
deliveryIdentifier: "fa3ebd6742c360b2d9652b7f78d9bd7d",
|
|
323
|
-
outcomes: [
|
|
390
|
+
outcomes: [{
|
|
391
|
+
summary: "Created task #1804 from issue #29",
|
|
392
|
+
task: {
|
|
393
|
+
id: 1804,
|
|
394
|
+
name: "Restore missing repository icons",
|
|
395
|
+
projectName: "Feather",
|
|
396
|
+
description: "Provider icons are missing from the repository list. Restore the GitHub and GitLab glyphs."
|
|
397
|
+
}
|
|
398
|
+
}],
|
|
324
399
|
payload: PAYLOAD_ISSUE_OPENED,
|
|
325
400
|
receivedOn: "Jun 26, 2026 · 13:12",
|
|
326
401
|
receivedAt: 1750943520
|
|
@@ -365,7 +440,7 @@ const PayloadPre = styled.pre.withConfig({
|
|
|
365
440
|
const PayloadWrap = styled.div.withConfig({
|
|
366
441
|
displayName: "WebhookLogsDialog__PayloadWrap",
|
|
367
442
|
componentId: "sc-6ol7f6-1"
|
|
368
|
-
})([".payload-
|
|
443
|
+
})([".payload-header{display:flex;align-items:center;justify-content:space-between;min-height:24px;margin-bottom:4px;}"]);
|
|
369
444
|
const PayloadBlock = _ref3 => {
|
|
370
445
|
let payload = _ref3.payload;
|
|
371
446
|
const _useState = useState(true),
|
|
@@ -374,13 +449,16 @@ const PayloadBlock = _ref3 => {
|
|
|
374
449
|
const lineCount = useMemo(() => payload.split("\n").length, [payload]);
|
|
375
450
|
const html = useMemo(() => highlightJson(payload), [payload]);
|
|
376
451
|
const canToggle = lineCount > PAYLOAD_COLLAPSED_LINES;
|
|
377
|
-
return /*#__PURE__*/React.createElement(PayloadWrap, null,
|
|
378
|
-
className: "payload-
|
|
379
|
-
}, /*#__PURE__*/React.createElement(
|
|
452
|
+
return /*#__PURE__*/React.createElement(PayloadWrap, null, /*#__PURE__*/React.createElement("div", {
|
|
453
|
+
className: "payload-header"
|
|
454
|
+
}, /*#__PURE__*/React.createElement(Caption1, {
|
|
455
|
+
color: "secondary",
|
|
456
|
+
weight: "bold"
|
|
457
|
+
}, "Payload"), canToggle ? /*#__PURE__*/React.createElement(Button, {
|
|
380
458
|
variant: "text colored",
|
|
381
459
|
size: "small",
|
|
382
460
|
onClick: () => setCollapsed(value => !value)
|
|
383
|
-
}, collapsed ? "Show More" : "Show Less")
|
|
461
|
+
}, collapsed ? "Show More" : "Show Less") : null), /*#__PURE__*/React.createElement(PayloadPre, {
|
|
384
462
|
$collapsed: collapsed && canToggle,
|
|
385
463
|
dangerouslySetInnerHTML: {
|
|
386
464
|
__html: html
|
|
@@ -393,11 +471,12 @@ const PayloadBlock = _ref3 => {
|
|
|
393
471
|
const LogRowWrap = styled.div.withConfig({
|
|
394
472
|
displayName: "WebhookLogsDialog__LogRowWrap",
|
|
395
473
|
componentId: "sc-6ol7f6-2"
|
|
396
|
-
})(["border-top:1px solid var(--color-theme-300);.lr-summary{box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:8px 8px 8px 12px;background:none;border:0;text-align:left;cursor:pointer;font-family:inherit;&:hover{background-color:var(--color-theme-200);}}.lr-expand{flex-shrink:0;color:var(--color-theme-600);transform:rotate(
|
|
474
|
+
})(["border-top:1px solid var(--color-theme-300);.lr-summary{box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:8px 8px 8px 12px;background:none;border:0;text-align:left;cursor:pointer;font-family:inherit;&:hover{background-color:var(--color-theme-200);}}.lr-expand{flex-shrink:0;fill:var(--color-theme-600);color:var(--color-theme-600);transform:rotate(180deg);transition:transform 200ms ease;}.lr-expand.open{transform:rotate(0deg);}.lr-conn{display:flex;align-items:center;gap:8px;width:180px;min-width:0;flex-shrink:0;}.lr-conn svg{width:20px;height:20px;flex-shrink:0;}.lr-conn .lr-conn-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.lr-event{flex:1 1 0%;min-width:0;}.lr-status{flex-shrink:0;}.lr-outcomes{width:96px;flex-shrink:0;text-align:right;}.lr-detail{padding:4px 16px 20px 44px;display:flex;flex-direction:column;gap:16px;}.lr-field-label{display:block;margin-bottom:4px;}.lr-id{font-family:\"SFMono-Regular\",Consolas,\"Liberation Mono\",Menlo,monospace;word-break:break-all;}.lr-outcome-list{margin:0;padding-left:16px;display:flex;flex-direction:column;gap:6px;}.lr-outcome{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;}.lr-open-task{padding:0;border:0;background:none;font:inherit;font-size:13px;line-height:18px;color:var(--color-theme-600);text-decoration:underline;cursor:pointer;white-space:nowrap;}.lr-open-task:hover{color:var(--color-theme-800);}"]);
|
|
397
475
|
const LogRow = _ref4 => {
|
|
398
476
|
var _connection$name;
|
|
399
477
|
let log = _ref4.log,
|
|
400
|
-
connection = _ref4.connection
|
|
478
|
+
connection = _ref4.connection,
|
|
479
|
+
onOpenTask = _ref4.onOpenTask;
|
|
401
480
|
const _useState2 = useState(false),
|
|
402
481
|
open = _useState2[0],
|
|
403
482
|
setOpen = _useState2[1];
|
|
@@ -433,25 +512,112 @@ const LogRow = _ref4 => {
|
|
|
433
512
|
}, "Webhook identifier"), /*#__PURE__*/React.createElement(Body2, {
|
|
434
513
|
className: "lr-id",
|
|
435
514
|
color: "tertiary"
|
|
436
|
-
}, log.deliveryIdentifier)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Caption1, {
|
|
515
|
+
}, log.deliveryIdentifier)), log.outcomes.length > 0 ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Caption1, {
|
|
437
516
|
className: "lr-field-label",
|
|
438
517
|
color: "secondary",
|
|
439
518
|
weight: "bold"
|
|
440
|
-
}, "Outcomes"),
|
|
519
|
+
}, "Outcomes"), /*#__PURE__*/React.createElement("ul", {
|
|
441
520
|
className: "lr-outcome-list"
|
|
442
521
|
}, log.outcomes.map((outcome, index) => /*#__PURE__*/React.createElement("li", {
|
|
443
|
-
key: index
|
|
522
|
+
key: index,
|
|
523
|
+
className: "lr-outcome"
|
|
444
524
|
}, /*#__PURE__*/React.createElement(Body2, {
|
|
445
525
|
color: "tertiary"
|
|
446
|
-
}, outcome)
|
|
447
|
-
|
|
448
|
-
},
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
}, "
|
|
526
|
+
}, outcome.summary), outcome.task ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
527
|
+
title: "See the task without closing the log"
|
|
528
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
529
|
+
type: "button",
|
|
530
|
+
className: "lr-open-task",
|
|
531
|
+
onClick: () => onOpenTask(outcome.task)
|
|
532
|
+
}, "Open Task")) : null)))) : null, log.payload ? /*#__PURE__*/React.createElement(PayloadBlock, {
|
|
453
533
|
payload: log.payload
|
|
454
|
-
})
|
|
534
|
+
}) : null) : null);
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
/* --- Task preview sheet --------------------------------------------------- */
|
|
538
|
+
/* Opens the outcome's task in a right-side sheet, on top of the (still open) */
|
|
539
|
+
/* log dialog. Uses the same Sheet setup as the Task sheet stories — position */
|
|
540
|
+
/* "right", stretch mode, and a Close control — so it reads as the real task */
|
|
541
|
+
/* sheet. The body is a representative stand-in for the app's full task sheet. */
|
|
542
|
+
|
|
543
|
+
const StyledTaskSheet = styled.div.withConfig({
|
|
544
|
+
displayName: "WebhookLogsDialog__StyledTaskSheet",
|
|
545
|
+
componentId: "sc-6ol7f6-3"
|
|
546
|
+
})(["display:grid;min-height:100%;padding:8px;grid-template-columns:1fr;@media (min-width:", "){grid-template-columns:1fr 328px;}"], LG);
|
|
547
|
+
const StyledTaskMain = styled.div.withConfig({
|
|
548
|
+
displayName: "WebhookLogsDialog__StyledTaskMain",
|
|
549
|
+
componentId: "sc-6ol7f6-4"
|
|
550
|
+
})(["padding:24px 24px 0;min-width:0;@media (min-width:", "){grid-column:1;}.task-header{display:flex;align-items:center;gap:8px;min-width:0;margin-bottom:8px;}.task-title{min-width:0;}.metadata{display:flex;flex-wrap:wrap;align-items:center;margin-bottom:24px;}.metadata .seg:not(:last-child){padding-right:12px;margin-right:12px;border-right:1px solid var(--border-primary);}.description{padding-bottom:16px;margin-bottom:16px;border-bottom:1px solid var(--border-primary);}"], LG);
|
|
551
|
+
const StyledTaskProperties = styled.div.withConfig({
|
|
552
|
+
displayName: "WebhookLogsDialog__StyledTaskProperties",
|
|
553
|
+
componentId: "sc-6ol7f6-5"
|
|
554
|
+
})(["padding:0 24px;@media (min-width:", "){grid-column:2;padding:24px;background-color:var(--color-theme-200);border-radius:8px;}.field{margin-bottom:24px;}.field:last-child{margin-bottom:0;}.field-label{display:flex;align-items:center;max-width:280px;margin-bottom:4px;}.field-control{width:100%;}.assignee-row{display:flex;align-items:center;gap:8px;}"], LG);
|
|
555
|
+
const SheetField = _ref5 => {
|
|
556
|
+
let label = _ref5.label,
|
|
557
|
+
children = _ref5.children;
|
|
558
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
559
|
+
className: "field"
|
|
560
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
561
|
+
className: "field-label"
|
|
562
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
563
|
+
size: "small"
|
|
564
|
+
}, label)), children);
|
|
565
|
+
};
|
|
566
|
+
const TaskPreviewSheet = _ref6 => {
|
|
567
|
+
let task = _ref6.task,
|
|
568
|
+
open = _ref6.open,
|
|
569
|
+
onClose = _ref6.onClose;
|
|
570
|
+
if (!task) {
|
|
571
|
+
return null;
|
|
572
|
+
}
|
|
573
|
+
const controls = [{
|
|
574
|
+
tooltip: "Close",
|
|
575
|
+
disabled: false,
|
|
576
|
+
onClick: onClose,
|
|
577
|
+
icon: /*#__PURE__*/React.createElement(CancelCrossIcon, null),
|
|
578
|
+
className: ""
|
|
579
|
+
}];
|
|
580
|
+
return /*#__PURE__*/React.createElement(Sheet, {
|
|
581
|
+
open: open,
|
|
582
|
+
onClose: onClose,
|
|
583
|
+
controls: controls,
|
|
584
|
+
position: "right",
|
|
585
|
+
animation: "right",
|
|
586
|
+
mode: "stretch"
|
|
587
|
+
}, /*#__PURE__*/React.createElement(StyledTaskSheet, null, /*#__PURE__*/React.createElement(StyledTaskMain, null, /*#__PURE__*/React.createElement("div", {
|
|
588
|
+
className: "task-header"
|
|
589
|
+
}, /*#__PURE__*/React.createElement(CompleteCheckbox, null), /*#__PURE__*/React.createElement(Header2, {
|
|
590
|
+
className: "task-title"
|
|
591
|
+
}, "#", task.id, ": ", task.name)), /*#__PURE__*/React.createElement("div", {
|
|
592
|
+
className: "metadata"
|
|
593
|
+
}, /*#__PURE__*/React.createElement(Caption1, {
|
|
594
|
+
className: "seg",
|
|
595
|
+
color: "secondary"
|
|
596
|
+
}, task.projectName), /*#__PURE__*/React.createElement(Caption1, {
|
|
597
|
+
className: "seg",
|
|
598
|
+
color: "secondary"
|
|
599
|
+
}, "Task #", task.id), /*#__PURE__*/React.createElement(Caption1, {
|
|
600
|
+
className: "seg",
|
|
601
|
+
color: "secondary"
|
|
602
|
+
}, "Created from a webhook delivery")), /*#__PURE__*/React.createElement("div", {
|
|
603
|
+
className: "description"
|
|
604
|
+
}, /*#__PURE__*/React.createElement(Body2, null, task.description))), /*#__PURE__*/React.createElement(StyledTaskProperties, null, /*#__PURE__*/React.createElement(SheetField, {
|
|
605
|
+
label: "Task List"
|
|
606
|
+
}, /*#__PURE__*/React.createElement(SelectTrigger, {
|
|
607
|
+
className: "field-control"
|
|
608
|
+
}, "Inbox")), /*#__PURE__*/React.createElement(SheetField, {
|
|
609
|
+
label: "Assignees"
|
|
610
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
611
|
+
className: "assignee-row"
|
|
612
|
+
}, /*#__PURE__*/React.createElement(RoundAvatar, {
|
|
613
|
+
$bg: AVATAR_COLORS.purple,
|
|
614
|
+
$size: 28,
|
|
615
|
+
$bordered: false
|
|
616
|
+
}, "IS"), /*#__PURE__*/React.createElement(Body2, null, "Ilija Studen"))), /*#__PURE__*/React.createElement(SheetField, {
|
|
617
|
+
label: "Start and Due Date"
|
|
618
|
+
}, /*#__PURE__*/React.createElement(SelectTrigger, {
|
|
619
|
+
className: "field-control"
|
|
620
|
+
}, "Not set")))));
|
|
455
621
|
};
|
|
456
622
|
|
|
457
623
|
/* --- The dialog ---------------------------------------------------------- */
|
|
@@ -459,26 +625,26 @@ const LogRow = _ref4 => {
|
|
|
459
625
|
/** Wider than the default 540px dialog so the log columns have room. */
|
|
460
626
|
const WebhookLogsDialogStyled = styled(Dialog).withConfig({
|
|
461
627
|
displayName: "WebhookLogsDialog__WebhookLogsDialogStyled",
|
|
462
|
-
componentId: "sc-6ol7f6-
|
|
628
|
+
componentId: "sc-6ol7f6-6"
|
|
463
629
|
})(["&&{width:calc(100vw - 64px);max-width:760px;}"]);
|
|
464
630
|
const DialogTitleBar = styled.div.withConfig({
|
|
465
631
|
displayName: "WebhookLogsDialog__DialogTitleBar",
|
|
466
|
-
componentId: "sc-6ol7f6-
|
|
632
|
+
componentId: "sc-6ol7f6-7"
|
|
467
633
|
})(["display:flex;align-items:center;justify-content:space-between;gap:16px;.title-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;}"]);
|
|
468
634
|
const LogListHeader = styled.div.withConfig({
|
|
469
635
|
displayName: "WebhookLogsDialog__LogListHeader",
|
|
470
|
-
componentId: "sc-6ol7f6-
|
|
471
|
-
})(["box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:0 8px 8px 44px;.lh-conn{width:180px;flex-shrink:0;}.lh-event{flex:1 1 0%;min-width:0;}.lh-status{width:96px;flex-shrink:0;}.lh-outcomes{width:96px;flex-shrink:0;text-align:right;}"]);
|
|
636
|
+
componentId: "sc-6ol7f6-8"
|
|
637
|
+
})(["box-sizing:border-box;display:flex;align-items:center;gap:12px;padding:0 8px 8px 44px;.lh-conn{width:180px;flex-shrink:0;}.lh-event{flex:1 1 0%;min-width:0;}.lh-status{width:96px;flex-shrink:0;text-align:right;}.lh-outcomes{width:96px;flex-shrink:0;text-align:right;}"]);
|
|
472
638
|
const EmptyLogs = styled.div.withConfig({
|
|
473
639
|
displayName: "WebhookLogsDialog__EmptyLogs",
|
|
474
|
-
componentId: "sc-6ol7f6-
|
|
475
|
-
})(["padding:40px 0;text-align:center;"]);
|
|
476
|
-
export const WebhookLogsDialog =
|
|
477
|
-
let open =
|
|
478
|
-
onClose =
|
|
479
|
-
initialConnectionId =
|
|
480
|
-
connectionIds =
|
|
481
|
-
repositoryIds =
|
|
640
|
+
componentId: "sc-6ol7f6-9"
|
|
641
|
+
})(["display:flex;flex-direction:column;align-items:center;gap:8px;padding:40px 0;text-align:center;svg{fill:var(--color-theme-500);}"]);
|
|
642
|
+
export const WebhookLogsDialog = _ref7 => {
|
|
643
|
+
let open = _ref7.open,
|
|
644
|
+
onClose = _ref7.onClose,
|
|
645
|
+
initialConnectionId = _ref7.initialConnectionId,
|
|
646
|
+
connectionIds = _ref7.connectionIds,
|
|
647
|
+
repositoryIds = _ref7.repositoryIds;
|
|
482
648
|
const _useState3 = useState(() => {
|
|
483
649
|
const initial = {};
|
|
484
650
|
if (connectionIds && connectionIds.length > 0) {
|
|
@@ -493,6 +659,17 @@ export const WebhookLogsDialog = _ref5 => {
|
|
|
493
659
|
}),
|
|
494
660
|
filters = _useState3[0],
|
|
495
661
|
setFilters = _useState3[1];
|
|
662
|
+
|
|
663
|
+
// The task opened from an outcome's "Open Task" link. The dialog stays open
|
|
664
|
+
// underneath; the sheet layers on top. `lastTask` keeps the content mounted
|
|
665
|
+
// through the sheet's slide-out so it does not blank out mid-animation.
|
|
666
|
+
const _useState4 = useState(null),
|
|
667
|
+
activeTask = _useState4[0],
|
|
668
|
+
setActiveTask = _useState4[1];
|
|
669
|
+
const lastTaskRef = useRef(null);
|
|
670
|
+
if (activeTask) {
|
|
671
|
+
lastTaskRef.current = activeTask;
|
|
672
|
+
}
|
|
496
673
|
const connectionsById = useMemo(() => {
|
|
497
674
|
const map = {};
|
|
498
675
|
WEBHOOK_CONNECTIONS.forEach(connection => {
|
|
@@ -530,10 +707,14 @@ export const WebhookLogsDialog = _ref5 => {
|
|
|
530
707
|
}, {
|
|
531
708
|
id: "event_type",
|
|
532
709
|
title: "Event Type",
|
|
533
|
-
submenu:
|
|
534
|
-
id
|
|
535
|
-
|
|
536
|
-
|
|
710
|
+
submenu: EVENT_TYPE_OPTIONS.map(_ref8 => {
|
|
711
|
+
let id = _ref8.id,
|
|
712
|
+
label = _ref8.label;
|
|
713
|
+
return {
|
|
714
|
+
id,
|
|
715
|
+
name: label
|
|
716
|
+
};
|
|
717
|
+
})
|
|
537
718
|
}, {
|
|
538
719
|
id: "status",
|
|
539
720
|
title: "Processing Status",
|
|
@@ -589,7 +770,7 @@ export const WebhookLogsDialog = _ref5 => {
|
|
|
589
770
|
}
|
|
590
771
|
setFilters(next);
|
|
591
772
|
}, []);
|
|
592
|
-
return /*#__PURE__*/React.createElement(WebhookLogsDialogStyled, {
|
|
773
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(WebhookLogsDialogStyled, {
|
|
593
774
|
open: open,
|
|
594
775
|
onClose: onClose,
|
|
595
776
|
enableBackgroundClick: true
|
|
@@ -627,9 +808,14 @@ export const WebhookLogsDialog = _ref5 => {
|
|
|
627
808
|
}, "OUTCOMES")), visibleLogs.map(log => /*#__PURE__*/React.createElement(LogRow, {
|
|
628
809
|
key: log.id,
|
|
629
810
|
log: log,
|
|
630
|
-
connection: connectionsById[log.connectionId]
|
|
631
|
-
|
|
811
|
+
connection: connectionsById[log.connectionId],
|
|
812
|
+
onOpenTask: setActiveTask
|
|
813
|
+
}))) : /*#__PURE__*/React.createElement(EmptyLogs, null, /*#__PURE__*/React.createElement(AccessLogIcon, null), /*#__PURE__*/React.createElement(Body2, {
|
|
632
814
|
color: "tertiary"
|
|
633
|
-
}, "No webhook logs match the selected filters."))))
|
|
815
|
+
}, "No webhook logs match the selected filters.")))), /*#__PURE__*/React.createElement(TaskPreviewSheet, {
|
|
816
|
+
task: activeTask != null ? activeTask : lastTaskRef.current,
|
|
817
|
+
open: Boolean(activeTask),
|
|
818
|
+
onClose: () => setActiveTask(null)
|
|
819
|
+
}));
|
|
634
820
|
};
|
|
635
821
|
//# sourceMappingURL=WebhookLogsDialog.js.map
|