@activecollab/components 2.0.400 → 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
|
@@ -6,12 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.WebhookLogsDialog = exports.WEBHOOK_REPOSITORIES = exports.WEBHOOK_CONNECTIONS = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _RoundAvatar = require("./RoundAvatar");
|
|
10
|
+
var _tokens = require("./tokens");
|
|
9
11
|
var _Button = require("../../components/Button");
|
|
10
12
|
var _Chip = require("../../components/Chip");
|
|
13
|
+
var _CompleteCheckbox = require("../../components/CompleteCheckbox");
|
|
11
14
|
var _Dialog = require("../../components/Dialog");
|
|
12
15
|
var _Filter = require("../../components/Filter");
|
|
13
16
|
var _IconButton = require("../../components/IconButton");
|
|
14
17
|
var _Icons = require("../../components/Icons");
|
|
18
|
+
var _Label = require("../../components/Label");
|
|
19
|
+
var _SelectTrigger = require("../../components/SelectTrigger");
|
|
20
|
+
var _Sheet = require("../../components/Sheet");
|
|
21
|
+
var _Tooltip = require("../../components/Tooltip");
|
|
15
22
|
var _Typography = require("../../components/Typography");
|
|
16
23
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
24
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -46,9 +53,18 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
46
53
|
|
|
47
54
|
/**
|
|
48
55
|
* Normalized event kind. The processor layer maps each provider's raw event
|
|
49
|
-
* header (GitHub `issues
|
|
50
|
-
*
|
|
51
|
-
*
|
|
56
|
+
* header (GitHub `issues` / GitLab `Issue Hook`, GitHub `pull_request` / GitLab
|
|
57
|
+
* `Merge Request Hook`, …) onto one provider-agnostic kind, so the same logical
|
|
58
|
+
* event reads — and filters — identically across connections instead of
|
|
59
|
+
* appearing once per provider. The set below mirrors the app's
|
|
60
|
+
* `EVENT_TYPE_OPTIONS` constant.
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The task an outcome created or referenced. In the app each
|
|
65
|
+
* `vcs_webhook_outcomes` row carries a nullable `task_id`; when it is set the
|
|
66
|
+
* outcome offers an "Open Task" link that opens the task in a sheet on top of
|
|
67
|
+
* the log dialog.
|
|
52
68
|
*/
|
|
53
69
|
|
|
54
70
|
var WEBHOOK_CONNECTIONS = exports.WEBHOOK_CONNECTIONS = [{
|
|
@@ -117,12 +133,38 @@ var WEBHOOK_REPOSITORIES = exports.WEBHOOK_REPOSITORIES = [{
|
|
|
117
133
|
connectionId: "gl-acme-ce"
|
|
118
134
|
}];
|
|
119
135
|
var EVENT_KIND_LABELS = {
|
|
120
|
-
issue: "Issue",
|
|
121
136
|
push: "Push",
|
|
122
|
-
|
|
137
|
+
issue: "Issue",
|
|
138
|
+
pull_request: "Pull Request",
|
|
139
|
+
pull_request_review: "Pull Request Review",
|
|
123
140
|
repository: "Repository",
|
|
124
|
-
|
|
141
|
+
other: "Other"
|
|
125
142
|
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Fixed Event Type filter options, mirroring the app's `EVENT_TYPE_OPTIONS`.
|
|
146
|
+
* The app offers the full list regardless of which kinds are present in the
|
|
147
|
+
* current result set, so we do the same instead of deriving it from the logs.
|
|
148
|
+
*/
|
|
149
|
+
var EVENT_TYPE_OPTIONS = [{
|
|
150
|
+
id: "push",
|
|
151
|
+
label: "Push"
|
|
152
|
+
}, {
|
|
153
|
+
id: "issue",
|
|
154
|
+
label: "Issue"
|
|
155
|
+
}, {
|
|
156
|
+
id: "pull_request",
|
|
157
|
+
label: "Pull Request"
|
|
158
|
+
}, {
|
|
159
|
+
id: "pull_request_review",
|
|
160
|
+
label: "Pull Request Review"
|
|
161
|
+
}, {
|
|
162
|
+
id: "repository",
|
|
163
|
+
label: "Repository"
|
|
164
|
+
}, {
|
|
165
|
+
id: "other",
|
|
166
|
+
label: "Other"
|
|
167
|
+
}];
|
|
126
168
|
var STATUS_LABELS = {
|
|
127
169
|
received: "Received",
|
|
128
170
|
unhandled: "Unhandled",
|
|
@@ -188,9 +230,6 @@ var StatusChip = function StatusChip(_ref) {
|
|
|
188
230
|
typographyProps: {
|
|
189
231
|
variant: "Caption 1",
|
|
190
232
|
weight: "medium"
|
|
191
|
-
},
|
|
192
|
-
style: {
|
|
193
|
-
borderRadius: 6
|
|
194
233
|
}
|
|
195
234
|
});
|
|
196
235
|
};
|
|
@@ -269,7 +308,15 @@ var WEBHOOK_LOGS = [{
|
|
|
269
308
|
eventKind: "issue",
|
|
270
309
|
status: "processed",
|
|
271
310
|
deliveryIdentifier: "d3b07384-d9a0-4c9b-8f1e-2a6f1b9c4e21",
|
|
272
|
-
outcomes: [
|
|
311
|
+
outcomes: [{
|
|
312
|
+
summary: "Created task #1842 from issue #42",
|
|
313
|
+
task: {
|
|
314
|
+
id: 1842,
|
|
315
|
+
name: "Webhook delivery retries are not logged",
|
|
316
|
+
projectName: "Feather",
|
|
317
|
+
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."
|
|
318
|
+
}
|
|
319
|
+
}],
|
|
273
320
|
payload: PAYLOAD_ISSUE_OPENED,
|
|
274
321
|
receivedOn: "Jun 29, 2026 · 14:32",
|
|
275
322
|
receivedAt: 1751207520
|
|
@@ -277,10 +324,12 @@ var WEBHOOK_LOGS = [{
|
|
|
277
324
|
id: "log-6",
|
|
278
325
|
connectionId: "gl-content",
|
|
279
326
|
repositoryId: "co-handbook",
|
|
280
|
-
eventKind: "
|
|
327
|
+
eventKind: "pull_request",
|
|
281
328
|
status: "skipped",
|
|
282
329
|
deliveryIdentifier: "b1946ac9-2f3a-4c0d-9b7e-1d2c3e4f5a6b",
|
|
283
|
-
outcomes: [
|
|
330
|
+
outcomes: [{
|
|
331
|
+
summary: "Skipped: merge request has no linked issue"
|
|
332
|
+
}],
|
|
284
333
|
payload: PAYLOAD_MERGE_REQUEST,
|
|
285
334
|
receivedOn: "Jun 29, 2026 · 11:08",
|
|
286
335
|
receivedAt: 1751195280
|
|
@@ -291,7 +340,9 @@ var WEBHOOK_LOGS = [{
|
|
|
291
340
|
eventKind: "issue",
|
|
292
341
|
status: "failed",
|
|
293
342
|
deliveryIdentifier: "9c1185a5-c5e9-4e3f-8a1b-7d6e5f4c3b2a",
|
|
294
|
-
outcomes: [
|
|
343
|
+
outcomes: [{
|
|
344
|
+
summary: "Failed at task creation: project not found"
|
|
345
|
+
}],
|
|
295
346
|
payload: PAYLOAD_ISSUE_OPENED,
|
|
296
347
|
receivedOn: "Jun 28, 2026 · 18:54",
|
|
297
348
|
receivedAt: 1751136840
|
|
@@ -302,7 +353,23 @@ var WEBHOOK_LOGS = [{
|
|
|
302
353
|
eventKind: "push",
|
|
303
354
|
status: "processed",
|
|
304
355
|
deliveryIdentifier: "f7c3bc1d-8c5a-4b2e-9f0a-1b2c3d4e5f60",
|
|
305
|
-
outcomes: [
|
|
356
|
+
outcomes: [{
|
|
357
|
+
summary: "Created task #1839 from issue #311",
|
|
358
|
+
task: {
|
|
359
|
+
id: 1839,
|
|
360
|
+
name: "Refresh the onboarding handbook",
|
|
361
|
+
projectName: "Handbook",
|
|
362
|
+
description: "The onboarding handbook is out of date. Review each section and update the steps that changed in the last release."
|
|
363
|
+
}
|
|
364
|
+
}, {
|
|
365
|
+
summary: "Created task #1840 from issue #312",
|
|
366
|
+
task: {
|
|
367
|
+
id: 1840,
|
|
368
|
+
name: "Document webhook scopes",
|
|
369
|
+
projectName: "Handbook",
|
|
370
|
+
description: "Explain the connection and repository webhook scopes, and when each one applies."
|
|
371
|
+
}
|
|
372
|
+
}],
|
|
306
373
|
payload: PAYLOAD_PUSH,
|
|
307
374
|
receivedOn: "Jun 28, 2026 · 09:21",
|
|
308
375
|
receivedAt: 1751102460
|
|
@@ -310,7 +377,7 @@ var WEBHOOK_LOGS = [{
|
|
|
310
377
|
id: "log-3",
|
|
311
378
|
connectionId: "gh-activecollab",
|
|
312
379
|
repositoryId: "ac-feather",
|
|
313
|
-
eventKind: "
|
|
380
|
+
eventKind: "other",
|
|
314
381
|
status: "unhandled",
|
|
315
382
|
deliveryIdentifier: "1574bddb-75c3-4b1e-8a9c-0d1e2f3a4b5c",
|
|
316
383
|
outcomes: [],
|
|
@@ -337,7 +404,15 @@ var WEBHOOK_LOGS = [{
|
|
|
337
404
|
eventKind: "issue",
|
|
338
405
|
status: "processed",
|
|
339
406
|
deliveryIdentifier: "fa3ebd6742c360b2d9652b7f78d9bd7d",
|
|
340
|
-
outcomes: [
|
|
407
|
+
outcomes: [{
|
|
408
|
+
summary: "Created task #1804 from issue #29",
|
|
409
|
+
task: {
|
|
410
|
+
id: 1804,
|
|
411
|
+
name: "Restore missing repository icons",
|
|
412
|
+
projectName: "Feather",
|
|
413
|
+
description: "Provider icons are missing from the repository list. Restore the GitHub and GitLab glyphs."
|
|
414
|
+
}
|
|
415
|
+
}],
|
|
341
416
|
payload: PAYLOAD_ISSUE_OPENED,
|
|
342
417
|
receivedOn: "Jun 26, 2026 · 13:12",
|
|
343
418
|
receivedAt: 1750943520
|
|
@@ -386,7 +461,7 @@ var PayloadPre = _styledComponents.default.pre.withConfig({
|
|
|
386
461
|
var PayloadWrap = _styledComponents.default.div.withConfig({
|
|
387
462
|
displayName: "WebhookLogsDialog__PayloadWrap",
|
|
388
463
|
componentId: "sc-6ol7f6-1"
|
|
389
|
-
})([".payload-
|
|
464
|
+
})([".payload-header{display:flex;align-items:center;justify-content:space-between;min-height:24px;margin-bottom:4px;}"]);
|
|
390
465
|
var PayloadBlock = function PayloadBlock(_ref3) {
|
|
391
466
|
var payload = _ref3.payload;
|
|
392
467
|
var _useState = (0, _react.useState)(true),
|
|
@@ -400,9 +475,12 @@ var PayloadBlock = function PayloadBlock(_ref3) {
|
|
|
400
475
|
return highlightJson(payload);
|
|
401
476
|
}, [payload]);
|
|
402
477
|
var canToggle = lineCount > PAYLOAD_COLLAPSED_LINES;
|
|
403
|
-
return /*#__PURE__*/_react.default.createElement(PayloadWrap, null,
|
|
404
|
-
className: "payload-
|
|
405
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
478
|
+
return /*#__PURE__*/_react.default.createElement(PayloadWrap, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
479
|
+
className: "payload-header"
|
|
480
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
481
|
+
color: "secondary",
|
|
482
|
+
weight: "bold"
|
|
483
|
+
}, "Payload"), canToggle ? /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
406
484
|
variant: "text colored",
|
|
407
485
|
size: "small",
|
|
408
486
|
onClick: function onClick() {
|
|
@@ -410,7 +488,7 @@ var PayloadBlock = function PayloadBlock(_ref3) {
|
|
|
410
488
|
return !value;
|
|
411
489
|
});
|
|
412
490
|
}
|
|
413
|
-
}, collapsed ? "Show More" : "Show Less")
|
|
491
|
+
}, collapsed ? "Show More" : "Show Less") : null), /*#__PURE__*/_react.default.createElement(PayloadPre, {
|
|
414
492
|
$collapsed: collapsed && canToggle,
|
|
415
493
|
dangerouslySetInnerHTML: {
|
|
416
494
|
__html: html
|
|
@@ -423,11 +501,12 @@ var PayloadBlock = function PayloadBlock(_ref3) {
|
|
|
423
501
|
var LogRowWrap = _styledComponents.default.div.withConfig({
|
|
424
502
|
displayName: "WebhookLogsDialog__LogRowWrap",
|
|
425
503
|
componentId: "sc-6ol7f6-2"
|
|
426
|
-
})(["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(
|
|
504
|
+
})(["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);}"]);
|
|
427
505
|
var LogRow = function LogRow(_ref4) {
|
|
428
506
|
var _connection$name;
|
|
429
507
|
var log = _ref4.log,
|
|
430
|
-
connection = _ref4.connection
|
|
508
|
+
connection = _ref4.connection,
|
|
509
|
+
onOpenTask = _ref4.onOpenTask;
|
|
431
510
|
var _useState3 = (0, _react.useState)(false),
|
|
432
511
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
433
512
|
open = _useState4[0],
|
|
@@ -468,27 +547,116 @@ var LogRow = function LogRow(_ref4) {
|
|
|
468
547
|
}, "Webhook identifier"), /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
469
548
|
className: "lr-id",
|
|
470
549
|
color: "tertiary"
|
|
471
|
-
}, log.deliveryIdentifier)), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
550
|
+
}, log.deliveryIdentifier)), log.outcomes.length > 0 ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
472
551
|
className: "lr-field-label",
|
|
473
552
|
color: "secondary",
|
|
474
553
|
weight: "bold"
|
|
475
|
-
}, "Outcomes"),
|
|
554
|
+
}, "Outcomes"), /*#__PURE__*/_react.default.createElement("ul", {
|
|
476
555
|
className: "lr-outcome-list"
|
|
477
556
|
}, log.outcomes.map(function (outcome, index) {
|
|
478
557
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
479
|
-
key: index
|
|
558
|
+
key: index,
|
|
559
|
+
className: "lr-outcome"
|
|
480
560
|
}, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
481
561
|
color: "tertiary"
|
|
482
|
-
}, outcome)
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
562
|
+
}, outcome.summary), outcome.task ? /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
563
|
+
title: "See the task without closing the log"
|
|
564
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
565
|
+
type: "button",
|
|
566
|
+
className: "lr-open-task",
|
|
567
|
+
onClick: function onClick() {
|
|
568
|
+
return onOpenTask(outcome.task);
|
|
569
|
+
}
|
|
570
|
+
}, "Open Task")) : null);
|
|
571
|
+
}))) : null, log.payload ? /*#__PURE__*/_react.default.createElement(PayloadBlock, {
|
|
490
572
|
payload: log.payload
|
|
491
|
-
})
|
|
573
|
+
}) : null) : null);
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
/* --- Task preview sheet --------------------------------------------------- */
|
|
577
|
+
/* Opens the outcome's task in a right-side sheet, on top of the (still open) */
|
|
578
|
+
/* log dialog. Uses the same Sheet setup as the Task sheet stories — position */
|
|
579
|
+
/* "right", stretch mode, and a Close control — so it reads as the real task */
|
|
580
|
+
/* sheet. The body is a representative stand-in for the app's full task sheet. */
|
|
581
|
+
|
|
582
|
+
var StyledTaskSheet = _styledComponents.default.div.withConfig({
|
|
583
|
+
displayName: "WebhookLogsDialog__StyledTaskSheet",
|
|
584
|
+
componentId: "sc-6ol7f6-3"
|
|
585
|
+
})(["display:grid;min-height:100%;padding:8px;grid-template-columns:1fr;@media (min-width:", "){grid-template-columns:1fr 328px;}"], _tokens.LG);
|
|
586
|
+
var StyledTaskMain = _styledComponents.default.div.withConfig({
|
|
587
|
+
displayName: "WebhookLogsDialog__StyledTaskMain",
|
|
588
|
+
componentId: "sc-6ol7f6-4"
|
|
589
|
+
})(["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);}"], _tokens.LG);
|
|
590
|
+
var StyledTaskProperties = _styledComponents.default.div.withConfig({
|
|
591
|
+
displayName: "WebhookLogsDialog__StyledTaskProperties",
|
|
592
|
+
componentId: "sc-6ol7f6-5"
|
|
593
|
+
})(["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;}"], _tokens.LG);
|
|
594
|
+
var SheetField = function SheetField(_ref5) {
|
|
595
|
+
var label = _ref5.label,
|
|
596
|
+
children = _ref5.children;
|
|
597
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
598
|
+
className: "field"
|
|
599
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
600
|
+
className: "field-label"
|
|
601
|
+
}, /*#__PURE__*/_react.default.createElement(_Label.Label, {
|
|
602
|
+
size: "small"
|
|
603
|
+
}, label)), children);
|
|
604
|
+
};
|
|
605
|
+
var TaskPreviewSheet = function TaskPreviewSheet(_ref6) {
|
|
606
|
+
var task = _ref6.task,
|
|
607
|
+
open = _ref6.open,
|
|
608
|
+
onClose = _ref6.onClose;
|
|
609
|
+
if (!task) {
|
|
610
|
+
return null;
|
|
611
|
+
}
|
|
612
|
+
var controls = [{
|
|
613
|
+
tooltip: "Close",
|
|
614
|
+
disabled: false,
|
|
615
|
+
onClick: onClose,
|
|
616
|
+
icon: /*#__PURE__*/_react.default.createElement(_Icons.CancelCrossIcon, null),
|
|
617
|
+
className: ""
|
|
618
|
+
}];
|
|
619
|
+
return /*#__PURE__*/_react.default.createElement(_Sheet.Sheet, {
|
|
620
|
+
open: open,
|
|
621
|
+
onClose: onClose,
|
|
622
|
+
controls: controls,
|
|
623
|
+
position: "right",
|
|
624
|
+
animation: "right",
|
|
625
|
+
mode: "stretch"
|
|
626
|
+
}, /*#__PURE__*/_react.default.createElement(StyledTaskSheet, null, /*#__PURE__*/_react.default.createElement(StyledTaskMain, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
627
|
+
className: "task-header"
|
|
628
|
+
}, /*#__PURE__*/_react.default.createElement(_CompleteCheckbox.CompleteCheckbox, null), /*#__PURE__*/_react.default.createElement(_Typography.Header2, {
|
|
629
|
+
className: "task-title"
|
|
630
|
+
}, "#", task.id, ": ", task.name)), /*#__PURE__*/_react.default.createElement("div", {
|
|
631
|
+
className: "metadata"
|
|
632
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
633
|
+
className: "seg",
|
|
634
|
+
color: "secondary"
|
|
635
|
+
}, task.projectName), /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
636
|
+
className: "seg",
|
|
637
|
+
color: "secondary"
|
|
638
|
+
}, "Task #", task.id), /*#__PURE__*/_react.default.createElement(_Typography.Caption1, {
|
|
639
|
+
className: "seg",
|
|
640
|
+
color: "secondary"
|
|
641
|
+
}, "Created from a webhook delivery")), /*#__PURE__*/_react.default.createElement("div", {
|
|
642
|
+
className: "description"
|
|
643
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Body2, null, task.description))), /*#__PURE__*/_react.default.createElement(StyledTaskProperties, null, /*#__PURE__*/_react.default.createElement(SheetField, {
|
|
644
|
+
label: "Task List"
|
|
645
|
+
}, /*#__PURE__*/_react.default.createElement(_SelectTrigger.SelectTrigger, {
|
|
646
|
+
className: "field-control"
|
|
647
|
+
}, "Inbox")), /*#__PURE__*/_react.default.createElement(SheetField, {
|
|
648
|
+
label: "Assignees"
|
|
649
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
650
|
+
className: "assignee-row"
|
|
651
|
+
}, /*#__PURE__*/_react.default.createElement(_RoundAvatar.RoundAvatar, {
|
|
652
|
+
$bg: _tokens.AVATAR_COLORS.purple,
|
|
653
|
+
$size: 28,
|
|
654
|
+
$bordered: false
|
|
655
|
+
}, "IS"), /*#__PURE__*/_react.default.createElement(_Typography.Body2, null, "Ilija Studen"))), /*#__PURE__*/_react.default.createElement(SheetField, {
|
|
656
|
+
label: "Start and Due Date"
|
|
657
|
+
}, /*#__PURE__*/_react.default.createElement(_SelectTrigger.SelectTrigger, {
|
|
658
|
+
className: "field-control"
|
|
659
|
+
}, "Not set")))));
|
|
492
660
|
};
|
|
493
661
|
|
|
494
662
|
/* --- The dialog ---------------------------------------------------------- */
|
|
@@ -496,26 +664,26 @@ var LogRow = function LogRow(_ref4) {
|
|
|
496
664
|
/** Wider than the default 540px dialog so the log columns have room. */
|
|
497
665
|
var WebhookLogsDialogStyled = (0, _styledComponents.default)(_Dialog.Dialog).withConfig({
|
|
498
666
|
displayName: "WebhookLogsDialog__WebhookLogsDialogStyled",
|
|
499
|
-
componentId: "sc-6ol7f6-
|
|
667
|
+
componentId: "sc-6ol7f6-6"
|
|
500
668
|
})(["&&{width:calc(100vw - 64px);max-width:760px;}"]);
|
|
501
669
|
var DialogTitleBar = _styledComponents.default.div.withConfig({
|
|
502
670
|
displayName: "WebhookLogsDialog__DialogTitleBar",
|
|
503
|
-
componentId: "sc-6ol7f6-
|
|
671
|
+
componentId: "sc-6ol7f6-7"
|
|
504
672
|
})(["display:flex;align-items:center;justify-content:space-between;gap:16px;.title-actions{display:flex;align-items:center;gap:8px;flex-shrink:0;}"]);
|
|
505
673
|
var LogListHeader = _styledComponents.default.div.withConfig({
|
|
506
674
|
displayName: "WebhookLogsDialog__LogListHeader",
|
|
507
|
-
componentId: "sc-6ol7f6-
|
|
508
|
-
})(["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;}"]);
|
|
675
|
+
componentId: "sc-6ol7f6-8"
|
|
676
|
+
})(["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;}"]);
|
|
509
677
|
var EmptyLogs = _styledComponents.default.div.withConfig({
|
|
510
678
|
displayName: "WebhookLogsDialog__EmptyLogs",
|
|
511
|
-
componentId: "sc-6ol7f6-
|
|
512
|
-
})(["padding:40px 0;text-align:center;"]);
|
|
513
|
-
var WebhookLogsDialog = exports.WebhookLogsDialog = function WebhookLogsDialog(
|
|
514
|
-
var open =
|
|
515
|
-
onClose =
|
|
516
|
-
initialConnectionId =
|
|
517
|
-
connectionIds =
|
|
518
|
-
repositoryIds =
|
|
679
|
+
componentId: "sc-6ol7f6-9"
|
|
680
|
+
})(["display:flex;flex-direction:column;align-items:center;gap:8px;padding:40px 0;text-align:center;svg{fill:var(--color-theme-500);}"]);
|
|
681
|
+
var WebhookLogsDialog = exports.WebhookLogsDialog = function WebhookLogsDialog(_ref7) {
|
|
682
|
+
var open = _ref7.open,
|
|
683
|
+
onClose = _ref7.onClose,
|
|
684
|
+
initialConnectionId = _ref7.initialConnectionId,
|
|
685
|
+
connectionIds = _ref7.connectionIds,
|
|
686
|
+
repositoryIds = _ref7.repositoryIds;
|
|
519
687
|
var _useState5 = (0, _react.useState)(function () {
|
|
520
688
|
var initial = {};
|
|
521
689
|
if (connectionIds && connectionIds.length > 0) {
|
|
@@ -531,6 +699,18 @@ var WebhookLogsDialog = exports.WebhookLogsDialog = function WebhookLogsDialog(_
|
|
|
531
699
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
532
700
|
filters = _useState6[0],
|
|
533
701
|
setFilters = _useState6[1];
|
|
702
|
+
|
|
703
|
+
// The task opened from an outcome's "Open Task" link. The dialog stays open
|
|
704
|
+
// underneath; the sheet layers on top. `lastTask` keeps the content mounted
|
|
705
|
+
// through the sheet's slide-out so it does not blank out mid-animation.
|
|
706
|
+
var _useState7 = (0, _react.useState)(null),
|
|
707
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
708
|
+
activeTask = _useState8[0],
|
|
709
|
+
setActiveTask = _useState8[1];
|
|
710
|
+
var lastTaskRef = (0, _react.useRef)(null);
|
|
711
|
+
if (activeTask) {
|
|
712
|
+
lastTaskRef.current = activeTask;
|
|
713
|
+
}
|
|
534
714
|
var connectionsById = (0, _react.useMemo)(function () {
|
|
535
715
|
var map = {};
|
|
536
716
|
WEBHOOK_CONNECTIONS.forEach(function (connection) {
|
|
@@ -574,12 +754,12 @@ var WebhookLogsDialog = exports.WebhookLogsDialog = function WebhookLogsDialog(_
|
|
|
574
754
|
}, {
|
|
575
755
|
id: "event_type",
|
|
576
756
|
title: "Event Type",
|
|
577
|
-
submenu:
|
|
578
|
-
|
|
579
|
-
|
|
757
|
+
submenu: EVENT_TYPE_OPTIONS.map(function (_ref8) {
|
|
758
|
+
var id = _ref8.id,
|
|
759
|
+
label = _ref8.label;
|
|
580
760
|
return {
|
|
581
|
-
id
|
|
582
|
-
name:
|
|
761
|
+
id,
|
|
762
|
+
name: label
|
|
583
763
|
};
|
|
584
764
|
})
|
|
585
765
|
}, {
|
|
@@ -647,7 +827,7 @@ var WebhookLogsDialog = exports.WebhookLogsDialog = function WebhookLogsDialog(_
|
|
|
647
827
|
}
|
|
648
828
|
setFilters(next);
|
|
649
829
|
}, []);
|
|
650
|
-
return /*#__PURE__*/_react.default.createElement(WebhookLogsDialogStyled, {
|
|
830
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(WebhookLogsDialogStyled, {
|
|
651
831
|
open: open,
|
|
652
832
|
onClose: onClose,
|
|
653
833
|
enableBackgroundClick: true
|
|
@@ -686,10 +866,17 @@ var WebhookLogsDialog = exports.WebhookLogsDialog = function WebhookLogsDialog(_
|
|
|
686
866
|
return /*#__PURE__*/_react.default.createElement(LogRow, {
|
|
687
867
|
key: log.id,
|
|
688
868
|
log: log,
|
|
689
|
-
connection: connectionsById[log.connectionId]
|
|
869
|
+
connection: connectionsById[log.connectionId],
|
|
870
|
+
onOpenTask: setActiveTask
|
|
690
871
|
});
|
|
691
|
-
})) : /*#__PURE__*/_react.default.createElement(EmptyLogs, null, /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
872
|
+
})) : /*#__PURE__*/_react.default.createElement(EmptyLogs, null, /*#__PURE__*/_react.default.createElement(_Icons.AccessLogIcon, null), /*#__PURE__*/_react.default.createElement(_Typography.Body2, {
|
|
692
873
|
color: "tertiary"
|
|
693
|
-
}, "No webhook logs match the selected filters."))))
|
|
874
|
+
}, "No webhook logs match the selected filters.")))), /*#__PURE__*/_react.default.createElement(TaskPreviewSheet, {
|
|
875
|
+
task: activeTask !== null && activeTask !== void 0 ? activeTask : lastTaskRef.current,
|
|
876
|
+
open: Boolean(activeTask),
|
|
877
|
+
onClose: function onClose() {
|
|
878
|
+
return setActiveTask(null);
|
|
879
|
+
}
|
|
880
|
+
}));
|
|
694
881
|
};
|
|
695
882
|
//# sourceMappingURL=WebhookLogsDialog.js.map
|