@activecollab/components 2.0.345 → 2.0.347
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/components/Icons/collection/Git.js +47 -0
- package/dist/cjs/components/Icons/collection/Git.js.map +1 -0
- package/dist/cjs/components/Icons/collection/GitHub.js +47 -0
- package/dist/cjs/components/Icons/collection/GitHub.js.map +1 -0
- package/dist/cjs/components/Icons/collection/GitLab.js +47 -0
- package/dist/cjs/components/Icons/collection/GitLab.js.map +1 -0
- package/dist/cjs/components/Icons/collection/index.js +21 -0
- package/dist/cjs/components/Icons/collection/index.js.map +1 -1
- package/dist/cjs/presentation/shared/WebhookLogsDialog.js +585 -0
- package/dist/cjs/presentation/shared/WebhookLogsDialog.js.map +1 -0
- package/dist/cjs/presentation/shared/headers.js +93 -24
- package/dist/cjs/presentation/shared/headers.js.map +1 -1
- package/dist/cjs/presentation/shared/index.js +15 -0
- package/dist/cjs/presentation/shared/index.js.map +1 -1
- package/dist/esm/components/Icons/collection/Git.d.ts +17 -0
- package/dist/esm/components/Icons/collection/Git.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/Git.js +40 -0
- package/dist/esm/components/Icons/collection/Git.js.map +1 -0
- package/dist/esm/components/Icons/collection/GitHub.d.ts +17 -0
- package/dist/esm/components/Icons/collection/GitHub.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/GitHub.js +40 -0
- package/dist/esm/components/Icons/collection/GitHub.js.map +1 -0
- package/dist/esm/components/Icons/collection/GitLab.d.ts +17 -0
- package/dist/esm/components/Icons/collection/GitLab.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/GitLab.js +40 -0
- package/dist/esm/components/Icons/collection/GitLab.js.map +1 -0
- package/dist/esm/components/Icons/collection/index.d.ts +3 -0
- package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/index.js +3 -0
- package/dist/esm/components/Icons/collection/index.js.map +1 -1
- package/dist/esm/presentation/shared/WebhookLogsDialog.d.ts +62 -0
- package/dist/esm/presentation/shared/WebhookLogsDialog.d.ts.map +1 -0
- package/dist/esm/presentation/shared/WebhookLogsDialog.js +537 -0
- package/dist/esm/presentation/shared/WebhookLogsDialog.js.map +1 -0
- package/dist/esm/presentation/shared/headers.d.ts +6 -1
- package/dist/esm/presentation/shared/headers.d.ts.map +1 -1
- package/dist/esm/presentation/shared/headers.js +94 -31
- package/dist/esm/presentation/shared/headers.js.map +1 -1
- package/dist/esm/presentation/shared/index.d.ts +2 -0
- package/dist/esm/presentation/shared/index.d.ts.map +1 -1
- package/dist/esm/presentation/shared/index.js +1 -0
- package/dist/esm/presentation/shared/index.js.map +1 -1
- package/dist/index.js +331 -220
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebhookLogsDialog.js","names":["_react","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_Button","_Chip","_Dialog","_Filter","_IconButton","_Icons","_Typography","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","return","isArray","WEBHOOK_CONNECTIONS","exports","id","service","EVENT_KIND_LABELS","issue","merge_request","repository","ping","STATUS_LABELS","received","unhandled","skipped","processed","failed","duplicate","STATUS_COLORS","bg","fg","connectionIcon","GitHubIcon","GitLabIcon","GitIcon","StatusChip","_ref","status","_STATUS_COLORS$status","createElement","Chip","label","backgroundColor","color","typographyProps","variant","weight","style","borderRadius","PAYLOAD_ISSUE_OPENED","JSON","stringify","action","number","title","state","html_url","labels","user","login","full_name","private","sender","PAYLOAD_MERGE_REQUEST","object_kind","event_type","username","project","path_with_namespace","object_attributes","iid","source_branch","target_branch","PAYLOAD_PUSH","ref","before","after","commits","message","author","email","WEBHOOK_LOGS","connectionId","eventKind","deliveryIdentifier","outcomes","payload","receivedOn","receivedAt","zen","hook_id","escapeHtml","replace","highlightJson","json","match","cls","concat","PAYLOAD_COLLAPSED_LINES","PayloadPre","styled","pre","withConfig","displayName","componentId","_ref2","$collapsed","PayloadWrap","div","PayloadBlock","_ref3","_useState","useState","_useState2","collapsed","setCollapsed","lineCount","useMemo","split","html","canToggle","className","Button","size","onClick","dangerouslySetInnerHTML","__html","LogRowWrap","LogRow","_ref4","_connection$name","log","connection","_useState3","_useState4","open","setOpen","ConnIcon","type","CollapseExpandSingleIcon","Body2","Caption1","map","outcome","index","key","WebhookLogsDialogStyled","Dialog","DialogTitleBar","LogListHeader","EmptyLogs","WebhookLogsDialog","_ref5","onClose","initialConnectionId","connectionIds","_useState5","_useState6","filters","setFilters","connectionsById","forEach","filterData","submenu","Set","keys","visibleLogs","_filters$connection","_filters$event_type","_filters$status","byConnection","byEvent","byStatus","filter","includes","sort","b","enableBackgroundClick","Title","disableDefaultHeading","Header3","Filter","data","selected","clearAllText","noResultText","emptyFilterText","onChange","IconButton","CancelCrossIcon","ContentDivider","Content","Fragment","Caption2"],"sources":["../../../../src/presentation/shared/WebhookLogsDialog.tsx"],"sourcesContent":["import React, { ElementType, ReactElement, useMemo, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { Button } from \"../../components/Button\";\nimport { Chip } from \"../../components/Chip\";\nimport { Dialog } from \"../../components/Dialog\";\nimport { Filter, SelectedType } from \"../../components/Filter\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n CancelCrossIcon,\n CollapseExpandSingleIcon,\n GitHubIcon,\n GitIcon,\n GitLabIcon,\n} from \"../../components/Icons\";\nimport {\n Body2,\n Caption1,\n Caption2,\n Header3,\n} from \"../../components/Typography\";\n\n/**\n * \"Webhook Logs\" — the VCS webhook delivery log, shown as a wide dialog with a\n * filterable, expandable list. Extracted into `shared/` so it can be opened\n * from more than one surface (the Apps & Integrations Repositories page and the\n * project \"...\" menu on the Project Repos story).\n *\n * Mirrors the app's webhook log model:\n * `vcs_webhook_logs` → connection_id, event_type, processing_status\n * (received / unhandled / skipped / processed /\n * failed / duplicate), delivery_identifier, payload,\n * created_on\n * `vcs_webhook_outcomes` → one row per outcome, each with a localized summary\n *\n * The status is derived from the outcomes server-side; here we render the\n * stored value and map it to a palette colour. The connection glyph is the\n * provider icon (GitHub / GitLab, Git for anything else).\n */\n\ntype WebhookStatus =\n | \"received\"\n | \"unhandled\"\n | \"skipped\"\n | \"processed\"\n | \"failed\"\n | \"duplicate\";\n\nexport interface WebhookConnection {\n id: string;\n name: string;\n service: \"github\" | \"gitlab\";\n}\n\n/**\n * Normalized event kind. The processor layer maps each provider's raw event\n * header (GitHub `issues`, GitLab `Issue Hook`, …) onto one provider-agnostic\n * kind, so the same logical event reads — and filters — identically across\n * connections instead of appearing once per provider.\n */\ntype WebhookEventKind =\n | \"issue\"\n | \"push\"\n | \"merge_request\"\n | \"repository\"\n | \"ping\";\n\nexport interface WebhookLog {\n id: string;\n connectionId: string;\n eventKind: WebhookEventKind;\n status: WebhookStatus;\n /** X-GitHub-Delivery GUID / X-Gitlab-Event-UUID. */\n deliveryIdentifier: string;\n /** Localized outcome summaries; empty when we never reached that stage. */\n outcomes: string[];\n /** Pretty-printed JSON payload; absent when no JSON body was logged. */\n payload?: string;\n /** Display timestamp. */\n receivedOn: string;\n /** Sort key — newest logs render at the top. */\n receivedAt: number;\n}\n\nexport const WEBHOOK_CONNECTIONS: WebhookConnection[] = [\n { id: \"gh-activecollab\", name: \"ActiveCollab\", service: \"github\" },\n { id: \"gh-abstergo\", name: \"Abstergo Ltd.\", service: \"github\" },\n { id: \"gh-binford\", name: \"Binford & Co.\", service: \"github\" },\n { id: \"gl-platform\", name: \"Platform\", service: \"gitlab\" },\n { id: \"gl-content\", name: \"Content\", service: \"gitlab\" },\n { id: \"gl-acme-ce\", name: \"Acme Community\", service: \"gitlab\" },\n];\n\nconst EVENT_KIND_LABELS: Record<WebhookEventKind, string> = {\n issue: \"Issue\",\n push: \"Push\",\n merge_request: \"Merge request\",\n repository: \"Repository\",\n ping: \"Ping\",\n};\n\nconst STATUS_LABELS: Record<WebhookStatus, string> = {\n received: \"Received\",\n unhandled: \"Unhandled\",\n skipped: \"Skipped\",\n processed: \"Processed\",\n failed: \"Failed\",\n duplicate: \"Duplicate\",\n};\n\n/**\n * Status → palette colour, chosen so the colour matches the meaning:\n * processed → green (success), failed → coral (error),\n * skipped → orange (warning), received → sky-blue (in progress),\n * unhandled → silver (neutral / no handler matched),\n * duplicate → purple (replayed delivery, dropped before processing).\n */\nconst STATUS_COLORS: Record<WebhookStatus, { bg: string; fg: string }> = {\n processed: {\n bg: \"var(--color-green-pale)\",\n fg: \"var(--color-green-pale-darker)\",\n },\n failed: { bg: \"var(--color-coral)\", fg: \"var(--color-coral-darker)\" },\n skipped: { bg: \"var(--color-orange)\", fg: \"var(--color-orange-darker)\" },\n received: {\n bg: \"var(--color-blue-sky)\",\n fg: \"var(--color-blue-sky-darker)\",\n },\n unhandled: {\n bg: \"var(--color-gray-silver)\",\n fg: \"var(--color-gray-silver-darker)\",\n },\n duplicate: {\n bg: \"var(--color-purple)\",\n fg: \"var(--color-purple-darker)\",\n },\n};\n\n/** Provider glyph for a connection: GitHub / GitLab, Git for anything else. */\nconst connectionIcon = (\n service?: WebhookConnection[\"service\"]\n): ElementType => {\n if (service === \"github\") {\n return GitHubIcon;\n }\n if (service === \"gitlab\") {\n return GitLabIcon;\n }\n return GitIcon;\n};\n\nconst StatusChip = ({ status }: { status: WebhookStatus }): ReactElement => {\n const { bg, fg } = STATUS_COLORS[status];\n\n return (\n <Chip\n label={STATUS_LABELS[status]}\n backgroundColor={bg}\n color={fg}\n typographyProps={{ variant: \"Caption 1\", weight: \"medium\" }}\n style={{ borderRadius: 6 }}\n />\n );\n};\n\n/* --- Mock log data (newest first is enforced by sorting on receivedAt) --- */\n\nconst PAYLOAD_ISSUE_OPENED = JSON.stringify(\n {\n action: \"opened\",\n issue: {\n id: 2002934201,\n number: 42,\n title: \"Webhook delivery retries are not logged\",\n state: \"open\",\n html_url: \"https://github.com/activecollab/feather/issues/42\",\n labels: [{ name: \"bug\" }, { name: \"vcs\" }],\n user: { login: \"octocat\", id: 583231 },\n },\n repository: {\n id: 776611234,\n full_name: \"activecollab/feather\",\n private: true,\n },\n sender: { login: \"octocat\", id: 583231 },\n },\n null,\n 2\n);\n\nconst PAYLOAD_MERGE_REQUEST = JSON.stringify(\n {\n object_kind: \"merge_request\",\n event_type: \"merge_request\",\n user: { id: 41, name: \"Jane Doe\", username: \"jdoe\" },\n project: { id: 1801, path_with_namespace: \"content/handbook\" },\n object_attributes: {\n iid: 318,\n title: \"Add changelog for 8.2\",\n state: \"merged\",\n action: \"merge\",\n source_branch: \"changelog-8-2\",\n target_branch: \"main\",\n },\n },\n null,\n 2\n);\n\nconst PAYLOAD_PUSH = JSON.stringify(\n {\n ref: \"refs/heads/main\",\n before: \"9b2c1f0e\",\n after: \"f4a7d3c1\",\n commits: [\n {\n id: \"f4a7d3c1\",\n message: \"Fix typo in webhook log repository\",\n author: { name: \"Marko\", email: \"marko@example.com\" },\n },\n ],\n repository: { full_name: \"activecollab/feather\" },\n },\n null,\n 2\n);\n\nconst WEBHOOK_LOGS: WebhookLog[] = [\n {\n id: \"log-7\",\n connectionId: \"gh-activecollab\",\n eventKind: \"issue\",\n status: \"processed\",\n deliveryIdentifier: \"d3b07384-d9a0-4c9b-8f1e-2a6f1b9c4e21\",\n outcomes: [\"Created task #1842 from issue #42\"],\n payload: PAYLOAD_ISSUE_OPENED,\n receivedOn: \"Jun 29, 2026 · 14:32\",\n receivedAt: 1751207520,\n },\n {\n id: \"log-6\",\n connectionId: \"gl-content\",\n eventKind: \"merge_request\",\n status: \"skipped\",\n deliveryIdentifier: \"b1946ac9-2f3a-4c0d-9b7e-1d2c3e4f5a6b\",\n outcomes: [\"Skipped: merge request has no linked issue\"],\n payload: PAYLOAD_MERGE_REQUEST,\n receivedOn: \"Jun 29, 2026 · 11:08\",\n receivedAt: 1751195280,\n },\n {\n id: \"log-5\",\n connectionId: \"gh-activecollab\",\n eventKind: \"issue\",\n status: \"failed\",\n deliveryIdentifier: \"9c1185a5-c5e9-4e3f-8a1b-7d6e5f4c3b2a\",\n outcomes: [\"Failed at task creation: project not found\"],\n payload: PAYLOAD_ISSUE_OPENED,\n receivedOn: \"Jun 28, 2026 · 18:54\",\n receivedAt: 1751136840,\n },\n {\n id: \"log-4\",\n connectionId: \"gl-content\",\n eventKind: \"push\",\n status: \"processed\",\n deliveryIdentifier: \"f7c3bc1d-8c5a-4b2e-9f0a-1b2c3d4e5f60\",\n outcomes: [\n \"Created task #1839 from issue #311\",\n \"Created task #1840 from issue #312\",\n ],\n payload: PAYLOAD_PUSH,\n receivedOn: \"Jun 28, 2026 · 09:21\",\n receivedAt: 1751102460,\n },\n {\n id: \"log-3\",\n connectionId: \"gh-activecollab\",\n eventKind: \"ping\",\n status: \"unhandled\",\n deliveryIdentifier: \"1574bddb-75c3-4b1e-8a9c-0d1e2f3a4b5c\",\n outcomes: [],\n payload: JSON.stringify(\n { zen: \"Keep it logically awesome.\", hook_id: 552012 },\n null,\n 2\n ),\n receivedOn: \"Jun 27, 2026 · 16:05\",\n receivedAt: 1751040300,\n },\n {\n id: \"log-2\",\n connectionId: \"gl-content\",\n eventKind: \"issue\",\n status: \"received\",\n deliveryIdentifier: \"0716d970-2b9e-4a1d-9c3f-5e6a7b8c9d01\",\n outcomes: [],\n receivedOn: \"Jun 27, 2026 · 08:47\",\n receivedAt: 1751013420,\n },\n {\n id: \"log-1\",\n connectionId: \"gh-activecollab\",\n eventKind: \"issue\",\n status: \"processed\",\n deliveryIdentifier: \"fa3ebd6742c360b2d9652b7f78d9bd7d\",\n outcomes: [\"Created task #1804 from issue #29\"],\n payload: PAYLOAD_ISSUE_OPENED,\n receivedOn: \"Jun 26, 2026 · 13:12\",\n receivedAt: 1750943520,\n },\n {\n id: \"log-1-replay\",\n connectionId: \"gh-activecollab\",\n eventKind: \"issue\",\n status: \"duplicate\",\n deliveryIdentifier: \"fa3ebd6742c360b2d9652b7f78d9bd7d\",\n outcomes: [],\n payload: PAYLOAD_ISSUE_OPENED,\n receivedOn: \"Jun 26, 2026 · 13:18\",\n receivedAt: 1750943880,\n },\n];\n\n/* --- Lightweight, Prism-style JSON syntax highlighter -------------------- */\n/* design-system has no `prismjs` dependency (it's an app dependency), so for */\n/* this throwaway mock we tokenize JSON ourselves and colour the tokens with */\n/* the same token classes Prism uses, styled via PayloadPre below. */\n\nconst escapeHtml = (value: string): string =>\n value.replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\");\n\nconst highlightJson = (json: string): string =>\n escapeHtml(json).replace(\n /(\"(?:\\\\u[a-zA-Z0-9]{4}|\\\\[^u]|[^\\\\\"])*\"(\\s*:)?|\\b(?:true|false)\\b|\\bnull\\b|-?\\d+(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)/g,\n (match) => {\n let cls = \"tok-number\";\n\n if (/^\"/.test(match)) {\n cls = /:$/.test(match) ? \"tok-key\" : \"tok-string\";\n } else if (/true|false/.test(match)) {\n cls = \"tok-boolean\";\n } else if (/null/.test(match)) {\n cls = \"tok-null\";\n }\n\n return `<span class=\"${cls}\">${match}</span>`;\n }\n );\n\nconst PAYLOAD_COLLAPSED_LINES = 6;\n\nconst PayloadPre = styled.pre<{ $collapsed: boolean }>`\n margin: 0;\n padding: 12px 14px;\n border: 1px solid var(--color-theme-400);\n border-radius: 6px;\n background-color: var(--color-theme-200);\n color: var(--color-theme-800);\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, monospace;\n font-size: 12px;\n line-height: 18px;\n overflow-x: auto;\n white-space: pre;\n position: relative;\n\n ${({ $collapsed }) =>\n $collapsed\n ? `max-height: ${PAYLOAD_COLLAPSED_LINES * 18 + 24}px;\n overflow-y: hidden;`\n : \"\"}\n\n .tok-key {\n color: var(--color-coral-lighter);\n }\n .tok-string {\n color: var(--color-green-pale-lighter);\n }\n .tok-number {\n color: var(--color-orange-lighter);\n }\n .tok-boolean {\n color: var(--color-blue-sky-lighter);\n }\n .tok-null {\n color: var(--color-purple-lighter);\n }\n`;\n\nconst PayloadWrap = styled.div`\n .payload-toggle {\n display: flex;\n justify-content: flex-end;\n min-height: 24px;\n margin-bottom: 4px;\n }\n`;\n\nconst PayloadBlock = ({ payload }: { payload: string }): ReactElement => {\n const [collapsed, setCollapsed] = useState(true);\n\n const lineCount = useMemo(() => payload.split(\"\\n\").length, [payload]);\n const html = useMemo(() => highlightJson(payload), [payload]);\n const canToggle = lineCount > PAYLOAD_COLLAPSED_LINES;\n\n return (\n <PayloadWrap>\n {canToggle ? (\n <div className=\"payload-toggle\">\n <Button\n variant=\"text colored\"\n size=\"small\"\n onClick={() => setCollapsed((value) => !value)}\n >\n {collapsed ? \"Show More\" : \"Show Less\"}\n </Button>\n </div>\n ) : null}\n <PayloadPre\n $collapsed={collapsed && canToggle}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n </PayloadWrap>\n );\n};\n\n/* --- A single, expandable log row ---------------------------------------- */\n\nconst LogRowWrap = styled.div`\n border-top: 1px solid var(--color-theme-300);\n\n .lr-summary {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n min-height: 56px;\n padding: 8px 8px 8px 12px;\n background: none;\n border: 0;\n text-align: left;\n cursor: pointer;\n font-family: inherit;\n\n &:hover {\n background-color: var(--color-theme-200);\n }\n }\n\n /* Default icon points up; collapsed → point right, expanded → point down. */\n .lr-expand {\n flex-shrink: 0;\n color: var(--color-theme-600);\n transform: rotate(90deg);\n transition: transform 150ms ease;\n }\n\n .lr-expand.open {\n transform: rotate(180deg);\n }\n\n .lr-conn {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 180px;\n min-width: 0;\n flex-shrink: 0;\n }\n\n .lr-conn svg {\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n }\n\n .lr-conn .lr-conn-name {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .lr-event {\n flex: 1 1 0%;\n min-width: 0;\n }\n\n .lr-status {\n flex-shrink: 0;\n }\n\n .lr-outcomes {\n width: 96px;\n flex-shrink: 0;\n text-align: right;\n }\n\n .lr-detail {\n padding: 4px 16px 20px 44px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n .lr-field-label {\n display: block;\n margin-bottom: 4px;\n }\n\n .lr-id {\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, monospace;\n word-break: break-all;\n }\n\n .lr-outcome-list {\n margin: 0;\n padding-left: 18px;\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n`;\n\ninterface LogRowProps {\n log: WebhookLog;\n connection?: WebhookConnection;\n}\n\nconst LogRow = ({ log, connection }: LogRowProps): ReactElement => {\n const [open, setOpen] = useState(false);\n const ConnIcon = connectionIcon(connection?.service);\n\n return (\n <LogRowWrap>\n <button\n type=\"button\"\n className=\"lr-summary\"\n aria-expanded={open}\n onClick={() => setOpen((value) => !value)}\n >\n <CollapseExpandSingleIcon\n className={open ? \"lr-expand open\" : \"lr-expand\"}\n />\n <span className=\"lr-conn\">\n <ConnIcon />\n <Body2 className=\"lr-conn-name\" weight=\"bold\">\n {connection?.name ?? \"Unknown\"}\n </Body2>\n </span>\n <Body2 className=\"lr-event\" color=\"tertiary\">\n {EVENT_KIND_LABELS[log.eventKind]}\n </Body2>\n <span className=\"lr-status\">\n <StatusChip status={log.status} />\n </span>\n <Caption1 className=\"lr-outcomes\" color=\"tertiary\">\n {log.outcomes.length > 0\n ? `${log.outcomes.length} ${\n log.outcomes.length === 1 ? \"outcome\" : \"outcomes\"\n }`\n : \"\"}\n </Caption1>\n </button>\n\n {open ? (\n <div className=\"lr-detail\">\n <div>\n <Caption1\n className=\"lr-field-label\"\n color=\"secondary\"\n weight=\"bold\"\n >\n Webhook identifier\n </Caption1>\n <Body2 className=\"lr-id\" color=\"tertiary\">\n {log.deliveryIdentifier}\n </Body2>\n </div>\n\n <div>\n <Caption1\n className=\"lr-field-label\"\n color=\"secondary\"\n weight=\"bold\"\n >\n Outcomes\n </Caption1>\n {log.outcomes.length > 0 ? (\n <ul className=\"lr-outcome-list\">\n {log.outcomes.map((outcome, index) => (\n <li key={index}>\n <Body2 color=\"tertiary\">{outcome}</Body2>\n </li>\n ))}\n </ul>\n ) : (\n <Body2 color=\"tertiary\">\n No outcomes were recorded for this webhook.\n </Body2>\n )}\n </div>\n\n {log.payload ? (\n <div>\n <Caption1\n className=\"lr-field-label\"\n color=\"secondary\"\n weight=\"bold\"\n >\n Payload\n </Caption1>\n <PayloadBlock payload={log.payload} />\n </div>\n ) : null}\n </div>\n ) : null}\n </LogRowWrap>\n );\n};\n\n/* --- The dialog ---------------------------------------------------------- */\n\n/** Wider than the default 540px dialog so the log columns have room. */\nconst WebhookLogsDialogStyled = styled(Dialog)`\n && {\n width: calc(100vw - 64px);\n max-width: 760px;\n }\n`;\n\nconst DialogTitleBar = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n\n .title-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n }\n`;\n\nconst LogListHeader = styled.div`\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 0 8px 8px 44px;\n\n .lh-conn {\n width: 180px;\n flex-shrink: 0;\n }\n .lh-event {\n flex: 1 1 0%;\n min-width: 0;\n }\n .lh-status {\n width: 96px;\n flex-shrink: 0;\n }\n .lh-outcomes {\n width: 96px;\n flex-shrink: 0;\n text-align: right;\n }\n`;\n\nconst EmptyLogs = styled.div`\n padding: 40px 0;\n text-align: center;\n`;\n\nexport interface WebhookLogsDialogProps {\n open: boolean;\n onClose: () => void;\n /** Pre-filter to a single connection (used when opened from its row menu). */\n initialConnectionId?: string;\n /**\n * Pre-filter to a set of connections (e.g. the connections a project's\n * repositories belong to). Takes precedence over `initialConnectionId`.\n */\n connectionIds?: string[];\n}\n\nexport const WebhookLogsDialog = ({\n open,\n onClose,\n initialConnectionId,\n connectionIds,\n}: WebhookLogsDialogProps): ReactElement => {\n const [filters, setFilters] = useState<SelectedType>((): SelectedType => {\n if (connectionIds && connectionIds.length > 0) {\n return { connection: connectionIds };\n }\n if (initialConnectionId) {\n return { connection: [initialConnectionId] };\n }\n return {};\n });\n\n const connectionsById = useMemo(() => {\n const map: Record<string, WebhookConnection> = {};\n WEBHOOK_CONNECTIONS.forEach((connection) => {\n map[connection.id] = connection;\n });\n return map;\n }, []);\n\n const filterData = useMemo(\n () => [\n {\n id: \"connection\",\n title: \"Connection\",\n submenu: WEBHOOK_CONNECTIONS.map((connection) => ({\n id: connection.id,\n name: connection.name,\n })),\n },\n {\n id: \"event_type\",\n title: \"Event Type\",\n submenu: Array.from(\n new Set(WEBHOOK_LOGS.map((log) => log.eventKind))\n ).map((eventKind) => ({\n id: eventKind,\n name: EVENT_KIND_LABELS[eventKind],\n })),\n },\n {\n id: \"status\",\n title: \"Processing Status\",\n submenu: (Object.keys(STATUS_LABELS) as WebhookStatus[]).map(\n (status) => ({ id: status, name: STATUS_LABELS[status] })\n ),\n },\n ],\n []\n );\n\n const visibleLogs = useMemo(() => {\n const byConnection = filters.connection ?? [];\n const byEvent = filters.event_type ?? [];\n const byStatus = filters.status ?? [];\n\n return WEBHOOK_LOGS.filter((log) => {\n if (byConnection.length && !byConnection.includes(log.connectionId)) {\n return false;\n }\n if (byEvent.length && !byEvent.includes(log.eventKind)) {\n return false;\n }\n if (byStatus.length && !byStatus.includes(log.status)) {\n return false;\n }\n return true;\n }).sort((a, b) => b.receivedAt - a.receivedAt);\n }, [filters]);\n\n return (\n <WebhookLogsDialogStyled\n open={open}\n onClose={onClose}\n enableBackgroundClick\n >\n <Dialog.Title disableDefaultHeading>\n <DialogTitleBar>\n <Header3>Webhook Logs</Header3>\n <div className=\"title-actions\">\n <Filter\n data={filterData}\n selected={filters}\n label=\"Filter\"\n clearAllText=\"Clear All\"\n noResultText=\"No results\"\n emptyFilterText=\"No filters to show\"\n onChange={setFilters}\n />\n <IconButton variant=\"text gray\" onClick={onClose}>\n <CancelCrossIcon />\n </IconButton>\n </div>\n </DialogTitleBar>\n </Dialog.Title>\n <Dialog.ContentDivider />\n <Dialog.Content>\n {visibleLogs.length > 0 ? (\n <>\n <LogListHeader>\n <Caption2 className=\"lh-conn\" color=\"secondary\" weight=\"bold\">\n CONNECTION\n </Caption2>\n <Caption2 className=\"lh-event\" color=\"secondary\" weight=\"bold\">\n EVENT TYPE\n </Caption2>\n <Caption2 className=\"lh-status\" color=\"secondary\" weight=\"bold\">\n STATUS\n </Caption2>\n <Caption2 className=\"lh-outcomes\" color=\"secondary\" weight=\"bold\">\n OUTCOMES\n </Caption2>\n </LogListHeader>\n {visibleLogs.map((log) => (\n <LogRow\n key={log.id}\n log={log}\n connection={connectionsById[log.connectionId]}\n />\n ))}\n </>\n ) : (\n <EmptyLogs>\n <Body2 color=\"tertiary\">\n No webhook logs match the selected filters.\n </Body2>\n </EmptyLogs>\n )}\n </Dialog.Content>\n </WebhookLogsDialogStyled>\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAOA,IAAAS,WAAA,GAAAT,OAAA;AAKqC,SAAAE,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SA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,EAAC;EAAU,GAAC,6CAEjB,CACE,CAEC,CACO,CAAC;AAE9B,CAAC","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
9
9
|
var _ConnectRepositoryDialog = require("./ConnectRepositoryDialog");
|
|
10
10
|
var _RoundAvatar = require("./RoundAvatar");
|
|
11
11
|
var _tokens = require("./tokens");
|
|
12
|
+
var _Badge = require("../../components/Badge");
|
|
12
13
|
var _Button = require("../../components/Button");
|
|
13
14
|
var _GlobalAddButton = require("../../components/Button/GlobalAddButton");
|
|
14
15
|
var _CompleteCheckbox = require("../../components/CompleteCheckbox");
|
|
@@ -21,6 +22,7 @@ var _List = require("../../components/List");
|
|
|
21
22
|
var _Menu = require("../../components/Menu");
|
|
22
23
|
var _Nav = require("../../components/Nav");
|
|
23
24
|
var _ProgressPie = require("../../components/ProgressPie");
|
|
25
|
+
var _ToastMessage = require("../../components/ToastMessage");
|
|
24
26
|
var _Tooltip = require("../../components/Tooltip");
|
|
25
27
|
var _Transitions = require("../../components/Transitions");
|
|
26
28
|
var _Typography = require("../../components/Typography");
|
|
@@ -74,16 +76,33 @@ var StyledProjectHeaderChildren = _styledComponents.default.div.withConfig({
|
|
|
74
76
|
var StyledProjectMenu = _styledComponents.default.div.withConfig({
|
|
75
77
|
displayName: "headers__StyledProjectMenu",
|
|
76
78
|
componentId: "sc-yf6o6n-2"
|
|
77
|
-
})([".toggle-item{justify-content:space-between;}.toggle-item .opt-left{display:flex;align-items:center;min-width:0;}.toggle-item .opt-left svg{margin-right:8px;flex-shrink:0;}.toggle-item .c-complete-checkbox{width:16px;height:16px;border-radius:3px;align-self:center;flex-shrink:0;}.submenu-item{justify-content:space-between;}.submenu-item .repo-caret{flex-shrink:0;fill:var(--color-theme-600);}.repo-row{min-width:0;}.repo-row > svg{flex-shrink:0;}.repo-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"]);
|
|
79
|
+
})([".toggle-item{justify-content:space-between;}.toggle-item .opt-left{display:flex;align-items:center;min-width:0;}.toggle-item .opt-left svg{margin-right:8px;flex-shrink:0;}.toggle-item .c-complete-checkbox{width:16px;height:16px;border-radius:3px;align-self:center;flex-shrink:0;}.submenu-item{justify-content:space-between;}.submenu-item .repo-right{display:flex;align-items:center;gap:8px;flex-shrink:0;}.submenu-item .repo-right .c-badge{background-color:var(--color-theme-300);color:var(--color-theme-700);}.submenu-item .repo-caret{flex-shrink:0;fill:var(--color-theme-600);}.repo-row{min-width:0;}.repo-row > svg{flex-shrink:0;}.repo-name{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}"]);
|
|
78
80
|
|
|
79
|
-
/** Submenu row label for a connected repository: "path (Connection
|
|
80
|
-
*
|
|
81
|
-
*
|
|
81
|
+
/** Submenu row label for a connected repository: "path (Connection)". The
|
|
82
|
+
* service type is omitted because the leading provider icon already conveys
|
|
83
|
+
* it. */
|
|
82
84
|
var repositoryMenuLabel = function repositoryMenuLabel(repo) {
|
|
83
85
|
var connection = _ConnectRepositoryDialog.CONNECTIONS.find(function (c) {
|
|
84
86
|
return c.id === repo.connectionId;
|
|
85
87
|
});
|
|
86
|
-
return connection ? "".concat(repo.name, " (").concat(connection.name, "
|
|
88
|
+
return connection ? "".concat(repo.name, " (").concat(connection.name, ")") : repo.name;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** Provider glyph for a connected repository: GitHub / GitLab for those
|
|
92
|
+
* services, and the generic Git mark for anything else (e.g. an upcoming
|
|
93
|
+
* Bitbucket connection). */
|
|
94
|
+
var repositoryIcon = function repositoryIcon(repo) {
|
|
95
|
+
var connection = _ConnectRepositoryDialog.CONNECTIONS.find(function (c) {
|
|
96
|
+
return c.id === repo.connectionId;
|
|
97
|
+
});
|
|
98
|
+
switch (connection === null || connection === void 0 ? void 0 : connection.service) {
|
|
99
|
+
case "github":
|
|
100
|
+
return _Icons.GitHubIcon;
|
|
101
|
+
case "gitlab":
|
|
102
|
+
return _Icons.GitLabIcon;
|
|
103
|
+
default:
|
|
104
|
+
return _Icons.GitIcon;
|
|
105
|
+
}
|
|
87
106
|
};
|
|
88
107
|
|
|
89
108
|
/** Width of the project "..." menu (matches the DS "normal" menu mode). */
|
|
@@ -92,6 +111,14 @@ var PROJECT_MENU_WIDTH = 260;
|
|
|
92
111
|
/* The menu drills in place (index → Repositories), so the paper must clip the
|
|
93
112
|
sliding panels and give them a positioning context. */
|
|
94
113
|
var ProjectMenuSliderStyle = (0, _styledComponents.createGlobalStyle)([".c-simple-menu__paper.project-options-menu{overflow:hidden;position:relative;}"]);
|
|
114
|
+
|
|
115
|
+
/* Toast anchor — fixed, upper-right corner (the toast slides down from the
|
|
116
|
+
top). The wrapper ignores pointer events so it never blocks the page; only
|
|
117
|
+
the toast itself is interactive. */
|
|
118
|
+
var StyledToastAnchor = _styledComponents.default.div.withConfig({
|
|
119
|
+
displayName: "headers__StyledToastAnchor",
|
|
120
|
+
componentId: "sc-yf6o6n-3"
|
|
121
|
+
})(["position:fixed;top:16px;right:16px;z-index:10000;pointer-events:none;.c-toast-message{pointer-events:auto;}"]);
|
|
95
122
|
/**
|
|
96
123
|
* The project "..." options menu. When the `source` module is loaded it gains
|
|
97
124
|
* a **Repositories** item that, instead of flying out to the side, **drills in
|
|
@@ -103,7 +130,9 @@ var ProjectMenuSliderStyle = (0, _styledComponents.createGlobalStyle)([".c-simpl
|
|
|
103
130
|
*/
|
|
104
131
|
var ProjectOptionsMenu = function ProjectOptionsMenu(_ref2) {
|
|
105
132
|
var _ref2$sourceModuleLoa = _ref2.sourceModuleLoaded,
|
|
106
|
-
sourceModuleLoaded = _ref2$sourceModuleLoa === void 0 ? false : _ref2$sourceModuleLoa
|
|
133
|
+
sourceModuleLoaded = _ref2$sourceModuleLoa === void 0 ? false : _ref2$sourceModuleLoa,
|
|
134
|
+
_ref2$initialConnecte = _ref2.initialConnectedRepositories,
|
|
135
|
+
initialConnectedRepositories = _ref2$initialConnecte === void 0 ? [] : _ref2$initialConnecte;
|
|
107
136
|
var _useState = (0, _react.useState)(false),
|
|
108
137
|
_useState2 = _slicedToArray(_useState, 2),
|
|
109
138
|
open = _useState2[0],
|
|
@@ -120,7 +149,11 @@ var ProjectOptionsMenu = function ProjectOptionsMenu(_ref2) {
|
|
|
120
149
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
121
150
|
height = _useState8[0],
|
|
122
151
|
setHeight = _useState8[1];
|
|
123
|
-
|
|
152
|
+
// Connected repositories drive the count badge on the Repositories item. In
|
|
153
|
+
// production this count comes from the project's `count_repositories` counter,
|
|
154
|
+
// kept current via pusher/websocket events, so the badge reflects repositories
|
|
155
|
+
// connected or disconnected by anyone — not just the current user's actions.
|
|
156
|
+
var _useState9 = (0, _react.useState)(initialConnectedRepositories),
|
|
124
157
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
125
158
|
connectedRepos = _useState0[0],
|
|
126
159
|
setConnectedRepos = _useState0[1];
|
|
@@ -132,6 +165,16 @@ var ProjectOptionsMenu = function ProjectOptionsMenu(_ref2) {
|
|
|
132
165
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
133
166
|
infoOpen = _useState12[0],
|
|
134
167
|
setInfoOpen = _useState12[1];
|
|
168
|
+
var _useState13 = (0, _react.useState)(false),
|
|
169
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
170
|
+
toastOpen = _useState14[0],
|
|
171
|
+
setToastOpen = _useState14[1];
|
|
172
|
+
// Bumped on each connect so the toast remounts and its auto-hide timer
|
|
173
|
+
// restarts from the moment it is shown.
|
|
174
|
+
var _useState15 = (0, _react.useState)(0),
|
|
175
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
176
|
+
toastKey = _useState16[0],
|
|
177
|
+
setToastKey = _useState16[1];
|
|
135
178
|
|
|
136
179
|
// Repositories still available to connect (not already on the project).
|
|
137
180
|
var connectableRepos = _ConnectRepositoryDialog.CONNECTABLE_REPOSITORIES.filter(function (r) {
|
|
@@ -171,6 +214,10 @@ var ProjectOptionsMenu = function ProjectOptionsMenu(_ref2) {
|
|
|
171
214
|
return r.id === repo.id;
|
|
172
215
|
}) ? prev : [...prev, repo];
|
|
173
216
|
});
|
|
217
|
+
setToastOpen(true);
|
|
218
|
+
setToastKey(function (k) {
|
|
219
|
+
return k + 1;
|
|
220
|
+
});
|
|
174
221
|
};
|
|
175
222
|
var handleConnect = function handleConnect() {
|
|
176
223
|
handleClose();
|
|
@@ -207,11 +254,17 @@ var ProjectOptionsMenu = function ProjectOptionsMenu(_ref2) {
|
|
|
207
254
|
onClick: goToRepositories
|
|
208
255
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
209
256
|
className: "opt-left"
|
|
210
|
-
}, /*#__PURE__*/_react.default.createElement(_Icons.GitRepositoryIcon, null), "Repositories"), /*#__PURE__*/_react.default.createElement(
|
|
257
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.GitRepositoryIcon, null), "Repositories"), /*#__PURE__*/_react.default.createElement("span", {
|
|
258
|
+
className: "repo-right"
|
|
259
|
+
}, connectedRepos.length > 0 ? /*#__PURE__*/_react.default.createElement(_Badge.Badge, {
|
|
260
|
+
isStandalone: true,
|
|
261
|
+
dimension: 16,
|
|
262
|
+
value: connectedRepos.length
|
|
263
|
+
}) : null, /*#__PURE__*/_react.default.createElement(_Icons.CaretRightIcon, {
|
|
211
264
|
className: "repo-caret",
|
|
212
265
|
width: 16,
|
|
213
266
|
height: 16
|
|
214
|
-
}))) : null, /*#__PURE__*/_react.default.createElement(_List.ListSeparator, null), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, /*#__PURE__*/_react.default.createElement(_Icons.DuplicateIcon, null), "Duplicate"), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, /*#__PURE__*/_react.default.createElement(_Icons.ProjectTemplateIcon, null), "Apply Template"), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, /*#__PURE__*/_react.default.createElement(_Icons.ProjectTemplateConvertIcon, null), "Convert to Template"), /*#__PURE__*/_react.default.createElement(_List.ListSeparator, null), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, /*#__PURE__*/_react.default.createElement(_Icons.TrashIcon, null), "Delete")));
|
|
267
|
+
})))) : null, /*#__PURE__*/_react.default.createElement(_List.ListSeparator, null), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, /*#__PURE__*/_react.default.createElement(_Icons.DuplicateIcon, null), "Duplicate"), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, /*#__PURE__*/_react.default.createElement(_Icons.ProjectTemplateIcon, null), "Apply Template"), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, /*#__PURE__*/_react.default.createElement(_Icons.ProjectTemplateConvertIcon, null), "Convert to Template"), /*#__PURE__*/_react.default.createElement(_List.ListSeparator, null), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, /*#__PURE__*/_react.default.createElement(_Icons.TrashIcon, null), "Delete")));
|
|
215
268
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ProjectMenuSliderStyle, null), /*#__PURE__*/_react.default.createElement(_Menu.Menu, {
|
|
216
269
|
open: open,
|
|
217
270
|
onOpen: function onOpen() {
|
|
@@ -267,13 +320,14 @@ var ProjectOptionsMenu = function ProjectOptionsMenu(_ref2) {
|
|
|
267
320
|
},
|
|
268
321
|
tabIndex: -1
|
|
269
322
|
}, sortedRepos.map(function (repo) {
|
|
323
|
+
var RepoIcon = repositoryIcon(repo);
|
|
270
324
|
return /*#__PURE__*/_react.default.createElement(_List.ListItem, {
|
|
271
325
|
key: repo.id,
|
|
272
326
|
className: "repo-row",
|
|
273
327
|
onClick: function onClick() {
|
|
274
328
|
return handleOpenRepository();
|
|
275
329
|
}
|
|
276
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
330
|
+
}, /*#__PURE__*/_react.default.createElement(RepoIcon, null), /*#__PURE__*/_react.default.createElement("span", {
|
|
277
331
|
className: "repo-name"
|
|
278
332
|
}, repositoryMenuLabel(repo)));
|
|
279
333
|
}), sortedRepos.length > 0 ? /*#__PURE__*/_react.default.createElement(_List.ListSeparator, null) : null, /*#__PURE__*/_react.default.createElement(_List.ListItem, {
|
|
@@ -297,7 +351,20 @@ var ProjectOptionsMenu = function ProjectOptionsMenu(_ref2) {
|
|
|
297
351
|
onClick: function onClick() {
|
|
298
352
|
return setInfoOpen(false);
|
|
299
353
|
}
|
|
300
|
-
}, "Got it")))
|
|
354
|
+
}, "Got it"))), /*#__PURE__*/_react.default.createElement(StyledToastAnchor, null, /*#__PURE__*/_react.default.createElement(_Transitions.SlideFromTop, {
|
|
355
|
+
in: toastOpen
|
|
356
|
+
}, /*#__PURE__*/_react.default.createElement(_ToastMessage.ToastMessage, {
|
|
357
|
+
key: toastKey,
|
|
358
|
+
className: "c-toast-message",
|
|
359
|
+
type: "success",
|
|
360
|
+
text: "Repository connected.",
|
|
361
|
+
dismissible: true,
|
|
362
|
+
dropShadow: true,
|
|
363
|
+
timeout: 3000,
|
|
364
|
+
onClose: function onClose() {
|
|
365
|
+
return setToastOpen(false);
|
|
366
|
+
}
|
|
367
|
+
}))));
|
|
301
368
|
};
|
|
302
369
|
|
|
303
370
|
/* People popover (mirrors the project header People dropdown): a header row
|
|
@@ -325,13 +392,13 @@ var PROJECT_MEMBERS = [{
|
|
|
325
392
|
}];
|
|
326
393
|
var StyledPeopleMenu = _styledComponents.default.div.withConfig({
|
|
327
394
|
displayName: "headers__StyledPeopleMenu",
|
|
328
|
-
componentId: "sc-yf6o6n-
|
|
395
|
+
componentId: "sc-yf6o6n-4"
|
|
329
396
|
})(["width:256px;.members-label{display:block;margin:8px 0;padding:0 16px;}.member-row{position:relative;display:flex;align-items:center;min-height:40px;margin:0 8px;padding:2px 8px;border-radius:4px;cursor:default;transition:background-color ", ";}.member-row:hover{background-color:var(--color-theme-200);}.member-row.leader::before{content:\"\";position:absolute;top:4px;bottom:4px;left:0;width:4px;border-radius:4px;background-color:", ";}.member-row.leader .member-avatar{outline:2px solid ", ";outline-offset:-2px;}.member-name{flex:1;margin-left:12px;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.member-right{display:flex;align-items:center;gap:2px;flex-shrink:0;margin-left:8px;}.leader-crown{flex-shrink:0;}.member-options{display:none;align-items:center;gap:2px;}.member-row:hover .member-options{display:flex;}"], _tokens.TRANSITION, LEADER_GOLD, LEADER_GOLD);
|
|
330
397
|
var PeoplePopover = function PeoplePopover() {
|
|
331
|
-
var
|
|
332
|
-
|
|
333
|
-
open =
|
|
334
|
-
setOpen =
|
|
398
|
+
var _useState17 = (0, _react.useState)(false),
|
|
399
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
400
|
+
open = _useState18[0],
|
|
401
|
+
setOpen = _useState18[1];
|
|
335
402
|
return /*#__PURE__*/_react.default.createElement(_Menu.Menu, {
|
|
336
403
|
open: open,
|
|
337
404
|
onOpen: function onOpen() {
|
|
@@ -399,7 +466,8 @@ var ProjectPageHeader = exports.ProjectPageHeader = function ProjectPageHeader(_
|
|
|
399
466
|
var _ref3$title = _ref3.title,
|
|
400
467
|
title = _ref3$title === void 0 ? "#131: Ime projekta" : _ref3$title,
|
|
401
468
|
_ref3$sourceModuleLoa = _ref3.sourceModuleLoaded,
|
|
402
|
-
sourceModuleLoaded = _ref3$sourceModuleLoa === void 0 ? false : _ref3$sourceModuleLoa
|
|
469
|
+
sourceModuleLoaded = _ref3$sourceModuleLoa === void 0 ? false : _ref3$sourceModuleLoa,
|
|
470
|
+
initialConnectedRepositories = _ref3.initialConnectedRepositories;
|
|
403
471
|
return /*#__PURE__*/_react.default.createElement(StyledPageHeader, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
404
472
|
className: "page-header-left"
|
|
405
473
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
|
|
@@ -423,7 +491,8 @@ var ProjectPageHeader = exports.ProjectPageHeader = function ProjectPageHeader(_
|
|
|
423
491
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
|
|
424
492
|
variant: "text gray"
|
|
425
493
|
}, /*#__PURE__*/_react.default.createElement(_Icons.InfoIcon, null))), /*#__PURE__*/_react.default.createElement(PeoplePopover, null), /*#__PURE__*/_react.default.createElement(ProjectOptionsMenu, {
|
|
426
|
-
sourceModuleLoaded: sourceModuleLoaded
|
|
494
|
+
sourceModuleLoaded: sourceModuleLoaded,
|
|
495
|
+
initialConnectedRepositories: initialConnectedRepositories
|
|
427
496
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
428
497
|
className: "page-header-spacer"
|
|
429
498
|
}));
|
|
@@ -437,20 +506,20 @@ ProjectPageHeader.displayName = "ProjectPageHeader";
|
|
|
437
506
|
var NAV_TABS = ["Tasks", "Discussions", "Files", "Notes", "Activity"];
|
|
438
507
|
var StyledTabHeader = (0, _styledComponents.default)(_Header.Header).withConfig({
|
|
439
508
|
displayName: "headers__StyledTabHeader",
|
|
440
|
-
componentId: "sc-yf6o6n-
|
|
509
|
+
componentId: "sc-yf6o6n-5"
|
|
441
510
|
})(["justify-content:space-between;align-items:center;margin-bottom:16px;min-height:64px;flex-shrink:0;"]);
|
|
442
511
|
var StyledTabControls = _styledComponents.default.div.withConfig({
|
|
443
512
|
displayName: "headers__StyledTabControls",
|
|
444
|
-
componentId: "sc-yf6o6n-
|
|
513
|
+
componentId: "sc-yf6o6n-6"
|
|
445
514
|
})(["display:flex;align-items:center;flex-shrink:0;gap:4px;.vertical-separator{width:1px;height:24px;background-color:var(--color-theme-400);margin:0 8px;}.filter-button{display:flex;align-items:center;gap:6px;}"]);
|
|
446
515
|
/** The Tasks/Discussions/… tab bar plus the right-hand view toolbar. */
|
|
447
516
|
var TabHeader = exports.TabHeader = function TabHeader(_ref4) {
|
|
448
517
|
var _ref4$activeView = _ref4.activeView,
|
|
449
518
|
activeView = _ref4$activeView === void 0 ? "list" : _ref4$activeView;
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
active =
|
|
453
|
-
setActive =
|
|
519
|
+
var _useState19 = (0, _react.useState)(0),
|
|
520
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
521
|
+
active = _useState20[0],
|
|
522
|
+
setActive = _useState20[1];
|
|
454
523
|
return /*#__PURE__*/_react.default.createElement(StyledTabHeader, null, /*#__PURE__*/_react.default.createElement(_Nav.Nav, {
|
|
455
524
|
onSelect: setActive
|
|
456
525
|
}, NAV_TABS.map(function (label, index) {
|