@commentkit/comment-kit 1.0.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +126 -1
- package/README.md +12 -5
- package/SECURITY.md +3 -1
- package/dist/npm/THIRD_PARTY_NOTICES.txt +22 -23
- package/dist/npm/chunks/AgentSend-DyWxNQ0p.js +64 -0
- package/dist/npm/chunks/Checklist-VYkSl6Q9.js +259 -0
- package/dist/npm/chunks/Composer-CnsGQirF.js +679 -0
- package/dist/npm/chunks/Guest-DkIvY5zt.js +170 -0
- package/dist/npm/chunks/MarkupEditor-DxTI9nJH.js +334 -0
- package/dist/npm/chunks/Panel-riaMYxt-.js +863 -0
- package/dist/npm/chunks/Settings-CB4zxQAL.js +206 -0
- package/dist/npm/chunks/{Shortcuts-3AOERWBh.js → Shortcuts-D1cbajg_.js} +21 -17
- package/dist/npm/chunks/StyleEditor-BtTv3I8_.js +44 -0
- package/dist/npm/chunks/StylePanel-BI-n5Me1.js +199 -0
- package/dist/npm/chunks/TaskFields-HwrD0FrH.js +272 -0
- package/dist/npm/chunks/ThreadCard-CjaC8BTa.js +1026 -0
- package/dist/npm/chunks/Viewer-BnWshSXb.js +110 -0
- package/dist/npm/chunks/agent-Cr6NB6We.js +146 -0
- package/dist/npm/chunks/anchor-OCQnjp_6.js +294 -0
- package/dist/npm/chunks/{ar-BVQ4ToG2.js → ar-BQ9K9Oqf.js} +188 -7
- package/dist/npm/chunks/card-bits-CxteYiZ9.js +126 -0
- package/dist/npm/chunks/client-CJ1tpI62.js +754 -0
- package/dist/npm/chunks/colors-0Ied7PE2.js +101 -0
- package/dist/npm/chunks/confetti-DKeKR7-6.js +41 -0
- package/dist/npm/chunks/{de-CamSq76K.js → de-CcPi8xdC.js} +159 -7
- package/dist/npm/chunks/drafts-CpQdHhcK.js +51 -0
- package/dist/npm/chunks/{es-BBIlcnsU.js → es-DXgkjDCG.js} +159 -7
- package/dist/npm/chunks/extension-BIGfr4Gh.js +50 -0
- package/dist/npm/chunks/{extension-CLm_T7Vj.js → extension-DkDSW4qw.js} +2 -2
- package/dist/npm/chunks/{fr-BXsff0Zz.js → fr-IjJaUbWh.js} +159 -7
- package/dist/npm/chunks/{hi-y-APBuxh.js → hi-BhKQK2MU.js} +159 -7
- package/dist/npm/chunks/html2canvas-pro.esm-lgs6tb4C.js +8378 -0
- package/dist/npm/chunks/i18n-DAJGndZ2.js +904 -0
- package/dist/npm/chunks/{it-C5MH_Ktv.js → it-DKiSCkiD.js} +159 -7
- package/dist/npm/chunks/{ja-s1JJld2J.js → ja-BI1WagDg.js} +159 -7
- package/dist/npm/chunks/{live-CkVrNM1-.js → live-B-mo27Qq.js} +1 -1
- package/dist/npm/chunks/lock-C82sC17d.js +30 -0
- package/dist/npm/chunks/{nl-CFzRMEfl.js → nl-CJw3VUQ5.js} +159 -7
- package/dist/npm/chunks/pick-CYPkLLFJ.js +120 -0
- package/dist/npm/chunks/{pt-BR-DE_r-5UM.js → pt-BR-CjBolC5g.js} +159 -7
- package/dist/npm/chunks/{pusher-BSsQoE1K.js → realtime-D22tI_AS.js} +58 -4
- package/dist/npm/chunks/source-CTQmAh0Y.js +146 -0
- package/dist/npm/chunks/src-CgBEoWl0.js +150 -0
- package/dist/npm/chunks/start-DW9_DKmf.js +1783 -0
- package/dist/npm/chunks/upload-BmrpZE5G.js +42 -0
- package/dist/npm/chunks/uploads-CipONvCy.js +541 -0
- package/dist/npm/chunks/{zh-CN--gibO2l7.js → zh-CN-BrZGx2S0.js} +159 -7
- package/dist/npm/element.js +4 -5
- package/dist/npm/headless.js +3 -3
- package/dist/npm/index.js +2 -2
- package/dist/npm/react.js +1 -1
- package/dist/npm/svelte.js +1 -1
- package/dist/npm/types/adapters/vue.d.ts +14 -0
- package/dist/npm/types/anchor/index.d.ts +22 -1
- package/dist/npm/types/core/api.d.ts +3 -0
- package/dist/npm/types/core/auth.d.ts +11 -0
- package/dist/npm/types/core/client.d.ts +128 -6
- package/dist/npm/types/core/types.d.ts +78 -4
- package/dist/npm/types/headless.d.ts +1 -1
- package/dist/npm/types/index.d.ts +6 -1
- package/dist/npm/vue.js +5 -1
- package/package.json +6 -3
- package/dist/npm/chunks/Guest-CdfnuD8T.js +0 -157
- package/dist/npm/chunks/MarkupEditor-Clb17Tse.js +0 -199
- package/dist/npm/chunks/Panel-CgvEbZXr.js +0 -438
- package/dist/npm/chunks/ThreadCard-DuGKe-gE.js +0 -817
- package/dist/npm/chunks/anchor-DT-Ynhh1.js +0 -270
- package/dist/npm/chunks/art-Bn9_ANNS.js +0 -155
- package/dist/npm/chunks/client-CS5oL_LQ.js +0 -620
- package/dist/npm/chunks/colors-CX-IPjvb.js +0 -86
- package/dist/npm/chunks/extension-DWHHer7j.js +0 -26
- package/dist/npm/chunks/format-CP2xZaec.js +0 -524
- package/dist/npm/chunks/html2canvas-DfGb8yka.js +0 -4024
- package/dist/npm/chunks/mount-VmnAiANB.js +0 -1507
- package/dist/npm/chunks/privacy-DLhezjyi.js +0 -30
- package/dist/npm/chunks/realtime-CBRW9BB3.js +0 -34
- package/dist/npm/chunks/src-DG8ehgE9.js +0 -549
|
@@ -0,0 +1,863 @@
|
|
|
1
|
+
import { i as e } from "./client-CJ1tpI62.js";
|
|
2
|
+
import { a as t } from "./anchor-OCQnjp_6.js";
|
|
3
|
+
import { a as n, f as r, i, l as a, m as o, r as ee, s, t as c, u as l, v as u } from "./i18n-DAJGndZ2.js";
|
|
4
|
+
import { i as d } from "./card-bits-CxteYiZ9.js";
|
|
5
|
+
import { n as f, r as p } from "./Checklist-VYkSl6Q9.js";
|
|
6
|
+
import { a as m, b as te, d as h, i as ne, l as re, n as ie, p as ae, r as oe, u as se, x as ce, y as le } from "./start-DW9_DKmf.js";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/ui/Panel.tsx
|
|
9
|
+
ie(".ck-count{background:var(--ck-bg-hover);color:var(--ck-text-muted);font-variant-numeric:tabular-nums;border-radius:999px;padding:1px 7px;font-size:11.5px;font-weight:700}.ck-item-thumb{outline:1px solid var(--ck-img-outline);outline-offset:-1px}.ck-tabs{border-radius:var(--ck-radius-md);background:var(--ck-bg-muted);gap:2px;margin:8px 10px 0;padding:3px;display:flex}.ck-tab{color:var(--ck-text-muted);white-space:nowrap;background:0 0;border:0;border-radius:7px;flex:1;justify-content:center;align-items:center;gap:6px;padding:5px 8px;font-size:13px;font-weight:600;transition:background-color .12s,color .12s;display:inline-flex}.ck-tab[aria-selected=true]{color:var(--ck-text);background:var(--ck-bg);box-shadow:var(--ck-shadow-sm)}.ck-list{margin:0;padding:4px 6px;list-style:none}.ck-item{text-align:start;border-radius:var(--ck-radius-md);background:0 0;border:0;width:100%;padding:9px 10px;transition:background-color .12s;display:block}.ck-list>li+li,.ck-list>.ck-item+.ck-item{border-top:1px solid var(--ck-hairline)}.ck-item[data-unread=true]{background:var(--ck-accent-soft)}.ck-item[data-shot]{grid-template-columns:minmax(0,1fr) 64px;align-items:start;gap:12px;display:grid}.ck-item-main{min-width:0}.ck-item-top{color:var(--ck-text-muted);align-items:flex-start;gap:8px;font-size:12px;display:flex}.ck-item-tags{flex-wrap:wrap;flex:1;align-items:center;gap:4px 6px;min-width:0;display:flex}.ck-item-tags>strong{color:var(--ck-text);font-variant-numeric:tabular-nums;white-space:nowrap;margin-inline-end:2px;font-weight:650}.ck-item-meta{text-overflow:ellipsis;white-space:nowrap;margin-top:4px;overflow:hidden}.ck-item-thumb{object-fit:cover;object-position:top;background:var(--ck-bg-muted);width:64px;height:44px;box-shadow:0 0 0 1px var(--ck-hairline);border-radius:6px;margin-top:2px}.ck-item-text{-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:4px;line-height:1.45;display:-webkit-box;overflow:hidden}.ck-filters{gap:6px;padding:8px 10px;display:flex}.ck-filters+.ck-filters{padding-top:0}#ck-more-filters{flex-wrap:wrap}.ck-filters .ck-choose,.ck-filters .ck-people-pick{flex:none}#ck-more-filters .ck-choose-btn{height:32px;padding-block-start:0;padding-block-end:0;font-size:13px}.ck-pad{padding:8px 10px}.ck-branchbar{flex-wrap:wrap;gap:6px;padding:8px 10px 0;display:flex}.ck-tag{background:var(--ck-bg-hover);color:var(--ck-text-muted);white-space:nowrap;border-radius:999px;padding:1px 7px;font-size:11px;font-weight:600}.ck-badge-soft{white-space:nowrap;background:color-mix(in srgb, var(--ck-warning) 14%, transparent);color:var(--ck-warning);border-radius:999px;padding:1px 7px;font-size:11px;font-weight:600}.ck-loading{padding:4px 16px}.ck-loading-row{padding:12px 0}.ck-loading-row+.ck-loading-row{border-top:1px solid var(--ck-hairline)}.ck-here{color:var(--ck-text-muted);white-space:nowrap;align-items:center;gap:6px;font-size:12px;display:inline-flex}.ck-dot{background:var(--ck-success);width:8px;height:8px;box-shadow:0 0 0 3px color-mix(in srgb, var(--ck-success) 20%, transparent);border-radius:50%}.ck-pad-x{margin:8px 12px 0}@media (pointer:coarse){.ck-tab{min-width:36px;min-height:36px}.ck-item{min-height:48px}}@media (hover:hover){.ck-tab:hover{color:var(--ck-text)}.ck-item:hover{background:var(--ck-bg-muted)}}.ck-count{font-variant-numeric:tabular-nums}.ck-search{flex:1;align-items:center;display:flex;position:relative}.ck-search>svg{color:var(--ck-text-muted);pointer-events:none;position:absolute}.ck-search>svg:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:10px}.ck-search>svg:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:10px}.ck-search>svg:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:10px}.ck-search>svg:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:10px}.ck-chip-quiet{background:0 0;border-color:#0000}.ck-result-count{font-variant-numeric:tabular-nums;white-space:nowrap;margin-inline-start:auto;font-size:12px}.ck-item-meta{align-items:center;gap:4px;display:flex}.ck-live-note{align-items:center;gap:8px;margin:8px 10px 0;display:flex}.ck-faces{display:inline-flex}.ck-faces .ck-avatar{width:22px;height:22px;box-shadow:0 0 0 2px var(--ck-bg);margin-inline-start:-6px;font-size:9px}.ck-faces .ck-avatar:first-child{margin-inline-start:0}.ck-faces-more{color:var(--ck-text-muted);font-variant-numeric:tabular-nums;margin-inline-start:4px;font-size:12px}.ck-people-pick{position:relative}.ck-people-btn{max-width:170px}.ck-people-menu[data-end]:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:auto;right:0}.ck-people-menu[data-end]:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:auto;right:0}.ck-people-menu[data-end]:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:auto}.ck-people-menu[data-end]:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:auto}.ck-people-menu{z-index:3;top:calc(100% + 4px);overscroll-behavior:contain;background:var(--ck-bg);min-width:200px;max-height:240px;box-shadow:var(--ck-shadow);animation:ck-pop .12s var(--ck-ease);border:1px solid #0000;border-radius:12px;gap:2px;padding:6px;display:grid;position:absolute;overflow:auto}.ck-people-menu:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-people-menu:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-people-menu:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-people-menu:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-people-menu .ck-check{border-radius:6px;margin:0;padding:4px 6px;font-size:13px}@media (hover:hover){.ck-people-menu .ck-check:hover{background:var(--ck-bg-hover)}}.ck-panel-list,.ck-panel-detail{flex-direction:column;flex:1;min-height:0;display:flex}.ck-panel-list{animation:ck-slide-back .2s var(--ck-ease)}@keyframes ck-slide-back{0%{opacity:.4;translate:-16px}}.ck-list>li{animation:ck-rise .22s var(--ck-ease) backwards;animation-delay:calc(var(--i,0) * 30ms);position:relative}@keyframes ck-rise{0%{opacity:0;translate:0 6px}}.ck-list>li[data-done] .ck-item-main{opacity:.6}.ck-kind{color:var(--ck-text-muted);place-items:center;margin-inline-end:2px;display:inline-grid}.ck-flag{color:var(--ck-text-muted);place-items:center;display:inline-grid}.ck-flag[data-priority=urgent]{color:var(--ck-danger)}.ck-flag[data-priority=high]{color:#e06a00}.ck-flag[data-priority=medium]{color:var(--ck-review)}.ck-item-check{font-variant-numeric:tabular-nums;align-items:center;gap:2px;display:inline-flex}.ck-item-reactions{font-variant-numeric:tabular-nums;gap:6px;margin-inline-start:6px;display:inline-flex}.ck-item-reactions>span{align-items:center;gap:2px;display:inline-flex}.ck-item-reactions .ck-emoji{width:12px;height:12px}.ck-item-faces{margin-inline-start:auto}.ck-item-faces .ck-avatar{width:18px;height:18px;margin-inline-end:0;font-size:8px}.ck-item-actions{top:8px;background:var(--ck-bg);box-shadow:var(--ck-shadow-sm);opacity:0;pointer-events:none;border-radius:8px;gap:2px;padding:2px;transition:opacity .12s;display:flex;position:absolute}.ck-item-actions:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:10px}.ck-item-actions:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:10px}.ck-item-actions:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:10px}.ck-item-actions:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:10px}.ck-list>li:hover .ck-item-actions,.ck-list>li:focus-within .ck-item-actions{opacity:1;pointer-events:auto}.ck-item-actions .ck-ghost{place-items:center;width:26px;height:26px;padding:0;display:grid}.ck-choose{position:relative}.ck-choose-btn{text-align:start;white-space:nowrap;cursor:pointer;align-items:center;gap:6px;width:auto;max-width:180px;padding-inline-end:8px;display:inline-flex}.ck-choose-btn bdi{text-overflow:ellipsis;min-width:0;overflow:hidden}.ck-choose-btn svg{color:var(--ck-text-muted);transition:rotate .15s var(--ck-ease);flex:none;rotate:90deg}.ck-choose-btn[aria-expanded=true] svg{rotate:-90deg}.ck-choose[data-compact] .ck-choose-btn{border-radius:999px;height:26px;padding-block-start:0;padding-block-end:0;font-size:12px}.ck-choose-menu{z-index:4;top:calc(100% + 4px);overscroll-behavior:contain;background:var(--ck-bg);min-width:180px;max-height:260px;box-shadow:var(--ck-shadow);animation:ck-pop .12s var(--ck-ease);border:1px solid #0000;border-radius:12px;padding:4px;display:grid;position:absolute;overflow:auto}.ck-choose-menu:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-choose-menu:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-choose-menu:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-choose-menu:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-choose-menu[data-end]:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:auto;right:0}.ck-choose-menu[data-end]:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:auto;right:0}.ck-choose-menu[data-end]:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:auto}.ck-choose-menu[data-end]:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:0;right:auto}.ck-choose-menu button{border-radius:var(--ck-radius-sm);text-align:start;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:0;width:100%;padding:7px 10px;font-size:13px;display:block;overflow:hidden}.ck-choose-menu button[aria-selected=true]{background:var(--ck-accent-soft);font-weight:600}@media (hover:hover){.ck-choose-menu button:hover{background:var(--ck-bg-hover)}}@media (pointer:coarse){.ck-choose-menu button{min-height:40px}.ck-choose-btn{min-height:36px}.ck-item-actions{display:none}}.ck-agent-chip{gap:5px}.ck-agent-chip svg{flex:none}.ck-list>li[data-picking] .ck-item{padding-inline-start:40px}.ck-list>li[data-picking] .ck-item[aria-pressed=true]{background:color-mix(in srgb, var(--ck-accent) 7%, transparent)}.ck-pick{z-index:1;width:16px;height:16px;accent-color:var(--ck-accent);cursor:pointer;margin:0;position:absolute;top:14px}.ck-pick:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:14px}.ck-pick:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:14px}.ck-pick:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:14px}.ck-pick:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:14px}.ck-pickbar{border-top:1px solid var(--ck-hairline);background:var(--ck-bg);align-items:center;gap:8px;padding:10px 12px;display:flex;position:relative}.ck-pickbar>.ck-muted{flex:1;font-size:13px}.ck-pickbar .ck-primary{align-items:center;gap:6px;display:inline-flex}.ck-agent-menu{top:auto;right:auto;bottom:calc(100% + 6px)}.ck-agent-menu:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:12px}.ck-agent-menu:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:12px}.ck-agent-menu:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:12px}.ck-agent-menu:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:12px}.ck-agent-menu button:disabled{opacity:.5;cursor:default}.ck-agent-note{margin:4px 10px 2px;font-size:12px}@media (pointer:coarse){.ck-pick{width:20px;height:20px;top:16px}}");
|
|
10
|
+
var ue = {
|
|
11
|
+
element: "pin",
|
|
12
|
+
region: "area",
|
|
13
|
+
text: "quote",
|
|
14
|
+
page: "page"
|
|
15
|
+
}, de = {
|
|
16
|
+
urgent: 4,
|
|
17
|
+
high: 3,
|
|
18
|
+
medium: 2,
|
|
19
|
+
low: 1,
|
|
20
|
+
none: 0
|
|
21
|
+
};
|
|
22
|
+
function g({ client: c, side: p, dock: ie = "bottom", onClose: g, onOpen: me, onError: y, detail: ve, notify: b }) {
|
|
23
|
+
let x = m(c.state, (e) => e.threads), S = m(c.state, (e) => e.unread), C = m(c.state, (e) => e.allBranches), ye = m(c.state, (e) => e.here), w = m(c.state, (e) => e.session), be = m(c.state, (e) => e.config?.read_only ?? !1), T = c.options.branch, xe = ne(), [E, Se] = o(S > 0 ? "inbox" : "page"), [Ce, D] = o({ state: "loading" }), [we, Te] = o(null), [O, k] = o(!1), A = r(0), [Ee, De] = o({ state: "loading" }), [Oe, ke] = o(null), j = r(0), [M, N] = o(""), [P, Ae] = o("active"), [je, Me] = o(0), [F, Ne] = o([]), [I, Pe] = o(""), [L, Fe] = o(!1), [R, z] = o(null), [Ie, Le] = o([]), [B, Re] = o(!1), [ze, Be] = o(!1), V = m(c.state, (e) => e.team), Ve = !!w?.capabilities.export_for_agents, [H, He] = o(null), [Ue, U] = o(!1), [We, Ge] = o(null), Ke = (e) => He((t) => {
|
|
24
|
+
let n = new Set(t);
|
|
25
|
+
return n.delete(e) || n.add(e), n;
|
|
26
|
+
}), W = () => (He(null), U(!1));
|
|
27
|
+
l(W, [E]);
|
|
28
|
+
let qe = () => {
|
|
29
|
+
U(!0), We || import("./AgentSend-DyWxNQ0p.js").then((e) => Ge(() => e.AgentSend), (e) => (y(e), U(!1)));
|
|
30
|
+
};
|
|
31
|
+
l(() => {
|
|
32
|
+
if (!B) return;
|
|
33
|
+
let e = (e) => {
|
|
34
|
+
e.composedPath().some((e) => e instanceof HTMLElement && e.classList.contains("ck-people-pick")) || Re(!1);
|
|
35
|
+
};
|
|
36
|
+
return addEventListener("pointerdown", e, !0), () => removeEventListener("pointerdown", e, !0);
|
|
37
|
+
}, [B]);
|
|
38
|
+
let [G, Je] = o(null), [K, Ye] = o(!1), [q, Xe] = o("recent"), Ze = m(c.state, (e) => e.live), [Qe, $e] = o(!1);
|
|
39
|
+
l(() => {
|
|
40
|
+
if (Ze !== "lost") return $e(!1);
|
|
41
|
+
let e = setTimeout(() => $e(!0), 4e3);
|
|
42
|
+
return () => clearTimeout(e);
|
|
43
|
+
}, [Ze]);
|
|
44
|
+
let J = r(null), [Y, et] = o({
|
|
45
|
+
people: [],
|
|
46
|
+
labels: []
|
|
47
|
+
}), tt = r(null), nt = r(null);
|
|
48
|
+
l(() => {
|
|
49
|
+
matchMedia("(pointer: fine)").matches && J.current ? J.current.focus({ preventScroll: !0 }) : nt.current?.querySelector("[aria-selected=true]")?.focus({ preventScroll: !0 });
|
|
50
|
+
}, []);
|
|
51
|
+
let X = !!(M || F.length || G || I || L || P !== "active" || R), Z = X, rt = () => {
|
|
52
|
+
N(""), Ae("active"), Ne([]), Je(null), Xe("recent"), Pe(""), Fe(!1), z(null);
|
|
53
|
+
}, it = [
|
|
54
|
+
F.length > 0,
|
|
55
|
+
G !== null,
|
|
56
|
+
P !== "active",
|
|
57
|
+
q !== "recent",
|
|
58
|
+
!!I,
|
|
59
|
+
L,
|
|
60
|
+
!!R
|
|
61
|
+
].filter(Boolean).length, at = F.includes("none") ? "none" : F.join(","), ot = !!w && w.role !== "guest", st = () => ({
|
|
62
|
+
q: M || void 0,
|
|
63
|
+
status: P,
|
|
64
|
+
branch: R ?? c.branchFilter(),
|
|
65
|
+
page_url: E === "page" ? e() : void 0,
|
|
66
|
+
assignee: at || void 0,
|
|
67
|
+
label: G ?? void 0,
|
|
68
|
+
priority: I || void 0,
|
|
69
|
+
author: L ? "me" : void 0,
|
|
70
|
+
sort: q
|
|
71
|
+
}), ct = (e) => e.filter((e) => ge(e, F, G, w));
|
|
72
|
+
l(() => {
|
|
73
|
+
if (E === "inbox" || E === "page" && !X) return;
|
|
74
|
+
let e = ++A.current;
|
|
75
|
+
D({ state: "loading" }), Te(null);
|
|
76
|
+
let t = setTimeout(() => {
|
|
77
|
+
c.listThreads(st()).then((t) => {
|
|
78
|
+
e === A.current && (D({
|
|
79
|
+
state: "ready",
|
|
80
|
+
data: ct(t.data)
|
|
81
|
+
}), Te(t.next_cursor ?? null));
|
|
82
|
+
}, () => e === A.current && D({ state: "error" }));
|
|
83
|
+
}, M ? 250 : 0);
|
|
84
|
+
return () => clearTimeout(t);
|
|
85
|
+
}, [
|
|
86
|
+
E,
|
|
87
|
+
M,
|
|
88
|
+
P,
|
|
89
|
+
je,
|
|
90
|
+
C,
|
|
91
|
+
at,
|
|
92
|
+
G,
|
|
93
|
+
X,
|
|
94
|
+
q,
|
|
95
|
+
I,
|
|
96
|
+
L,
|
|
97
|
+
R
|
|
98
|
+
]);
|
|
99
|
+
let lt = () => {
|
|
100
|
+
if (!we || O) return;
|
|
101
|
+
let e = A.current;
|
|
102
|
+
k(!0), c.listThreads({
|
|
103
|
+
...st(),
|
|
104
|
+
cursor: we
|
|
105
|
+
}).then((t) => {
|
|
106
|
+
e === A.current && (D((e) => e.state === "ready" ? {
|
|
107
|
+
state: "ready",
|
|
108
|
+
data: [...e.data, ...ct(t.data).filter((t) => !e.data.some((e) => e.id === t.id))]
|
|
109
|
+
} : e), Te(t.next_cursor ?? null));
|
|
110
|
+
}, y).finally(() => k(!1));
|
|
111
|
+
};
|
|
112
|
+
l(() => {
|
|
113
|
+
T && c.branches().then(Le);
|
|
114
|
+
}, []), l(() => {
|
|
115
|
+
!K || Y.people.length || Y.labels.length || Promise.all([c.people().catch(() => []), c.labels().catch(() => [])]).then(([e, t]) => et({
|
|
116
|
+
people: e.filter((e) => e.assignable && e.id !== null),
|
|
117
|
+
labels: t
|
|
118
|
+
}));
|
|
119
|
+
}, [K]), l(() => {
|
|
120
|
+
if (E !== "inbox") return;
|
|
121
|
+
let e = ++j.current;
|
|
122
|
+
c.inboxPage().then((t) => e === j.current && (De({
|
|
123
|
+
state: "ready",
|
|
124
|
+
data: t.data
|
|
125
|
+
}), ke(t.next_cursor)), () => e === j.current && De({ state: "error" }));
|
|
126
|
+
}, [
|
|
127
|
+
E,
|
|
128
|
+
S,
|
|
129
|
+
je
|
|
130
|
+
]);
|
|
131
|
+
let ut = () => {
|
|
132
|
+
if (!Oe || O) return;
|
|
133
|
+
let e = j.current;
|
|
134
|
+
k(!0), c.inboxPage(Oe).then((t) => {
|
|
135
|
+
e === j.current && (De((e) => e.state === "ready" ? {
|
|
136
|
+
state: "ready",
|
|
137
|
+
data: [...e.data, ...t.data.filter((t) => !e.data.some((e) => e.id === t.id))]
|
|
138
|
+
} : e), ke(t.next_cursor));
|
|
139
|
+
}, y).finally(() => k(!1));
|
|
140
|
+
}, dt = (e, t) => me("page" in e ? e : e.thread_id, t), ft = (e) => oe(e, ".ck-item", !0), pt = () => Me((e) => e + 1), mt = (e) => e && D((t) => t.state === "ready" ? {
|
|
141
|
+
...t,
|
|
142
|
+
data: t.data.map((t) => t.id === e.id ? e : t)
|
|
143
|
+
} : t), ht = async (e) => {
|
|
144
|
+
try {
|
|
145
|
+
mt(await c.updateThread(e.id, { status: "resolved" })), b?.({
|
|
146
|
+
text: s("resolvedToast", { ref: e.reference }),
|
|
147
|
+
tone: "success",
|
|
148
|
+
action: {
|
|
149
|
+
label: s("undo"),
|
|
150
|
+
run: () => void d(c, e, b, y).then(mt)
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
} catch (e) {
|
|
154
|
+
y(e);
|
|
155
|
+
}
|
|
156
|
+
}, gt = async (e) => {
|
|
157
|
+
let t = te(e.page.url);
|
|
158
|
+
if (!t) return;
|
|
159
|
+
let n = new URL(t);
|
|
160
|
+
n.searchParams.set("ck_thread", e.id);
|
|
161
|
+
try {
|
|
162
|
+
await navigator.clipboard.writeText(n.toString()), b?.({ text: s("copied") });
|
|
163
|
+
} catch {
|
|
164
|
+
y(Error(s("errorGeneric")));
|
|
165
|
+
}
|
|
166
|
+
}, _t = q === "recent" ? x : [...x].sort((e, t) => q === "oldest" ? e.created_at.localeCompare(t.created_at) : (de[t.priority] ?? 0) - (de[e.priority] ?? 0) || t.last_activity_at.localeCompare(e.last_activity_at)), Q = E === "page" && !X ? {
|
|
167
|
+
state: "ready",
|
|
168
|
+
data: _t
|
|
169
|
+
} : Ce, $ = Q.state === "ready" ? Q.data.length : null, vt = Q === Ce ? we : null, yt = $ === null || E === "inbox" ? null : vt ? s("resultsMore", { n: $ }) : E === "page" && X ? s("countOf", {
|
|
170
|
+
n: $,
|
|
171
|
+
total: x.length
|
|
172
|
+
}) : Z || E === "all" ? i("results", $) : null, bt = [
|
|
173
|
+
[
|
|
174
|
+
"page",
|
|
175
|
+
"thisPage",
|
|
176
|
+
x.length
|
|
177
|
+
],
|
|
178
|
+
[
|
|
179
|
+
"all",
|
|
180
|
+
"allPages",
|
|
181
|
+
null
|
|
182
|
+
],
|
|
183
|
+
[
|
|
184
|
+
"inbox",
|
|
185
|
+
"notifications",
|
|
186
|
+
S || null
|
|
187
|
+
]
|
|
188
|
+
];
|
|
189
|
+
return /* @__PURE__ */ a("aside", {
|
|
190
|
+
class: "ck-panel",
|
|
191
|
+
"data-side": p,
|
|
192
|
+
"data-dock": ie,
|
|
193
|
+
"aria-label": s("inbox"),
|
|
194
|
+
"data-commentkit-ui": !0,
|
|
195
|
+
onKeyDown: (e) => {
|
|
196
|
+
if (!(e.key !== "Escape" || ve)) {
|
|
197
|
+
if (H) return void (e.stopPropagation(), W());
|
|
198
|
+
g();
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
children: ve ? /* @__PURE__ */ a("div", {
|
|
202
|
+
class: "ck-panel-detail",
|
|
203
|
+
children: ve
|
|
204
|
+
}) : /* @__PURE__ */ a("div", {
|
|
205
|
+
class: "ck-panel-list",
|
|
206
|
+
children: [
|
|
207
|
+
/* @__PURE__ */ a("div", {
|
|
208
|
+
class: "ck-card-head",
|
|
209
|
+
children: [
|
|
210
|
+
/* @__PURE__ */ a("span", {
|
|
211
|
+
class: "ck-card-title",
|
|
212
|
+
children: s("inbox")
|
|
213
|
+
}),
|
|
214
|
+
V.length > 1 ? /* @__PURE__ */ a("span", {
|
|
215
|
+
class: "ck-here",
|
|
216
|
+
role: "status",
|
|
217
|
+
"aria-label": s("teamHere", { names: V.map((e) => e.name).join(", ") }),
|
|
218
|
+
title: V.map((e) => e.name).join(", "),
|
|
219
|
+
children: [/* @__PURE__ */ a("span", {
|
|
220
|
+
class: "ck-faces",
|
|
221
|
+
"aria-hidden": "true",
|
|
222
|
+
children: V.slice(0, 4).map((e) => /* @__PURE__ */ a(re, { person: e }))
|
|
223
|
+
}), V.length > 4 ? /* @__PURE__ */ a("span", {
|
|
224
|
+
class: "ck-faces-more",
|
|
225
|
+
children: ["+", V.length - 4]
|
|
226
|
+
}) : null]
|
|
227
|
+
}) : ye > 1 ? /* @__PURE__ */ a("span", {
|
|
228
|
+
class: "ck-here",
|
|
229
|
+
role: "status",
|
|
230
|
+
children: [/* @__PURE__ */ a("span", {
|
|
231
|
+
"aria-hidden": "true",
|
|
232
|
+
class: "ck-dot"
|
|
233
|
+
}), i("peopleHere", ye)]
|
|
234
|
+
}) : null,
|
|
235
|
+
Ve && E !== "inbox" && $ && !H ? /* @__PURE__ */ a("button", {
|
|
236
|
+
class: "ck-chip ck-agent-chip",
|
|
237
|
+
onClick: () => Q.state === "ready" && He(new Set(Q.data.map((e) => e.id))),
|
|
238
|
+
children: [/* @__PURE__ */ a(h, {
|
|
239
|
+
name: "agent",
|
|
240
|
+
size: 13
|
|
241
|
+
}), s("sendToAgent")]
|
|
242
|
+
}) : null,
|
|
243
|
+
/* @__PURE__ */ a("button", {
|
|
244
|
+
class: "ck-ghost",
|
|
245
|
+
onClick: g,
|
|
246
|
+
"aria-label": s("close"),
|
|
247
|
+
children: /* @__PURE__ */ a(h, { name: "close" })
|
|
248
|
+
})
|
|
249
|
+
]
|
|
250
|
+
}),
|
|
251
|
+
/* @__PURE__ */ a("div", {
|
|
252
|
+
class: "ck-tabs",
|
|
253
|
+
role: "tablist",
|
|
254
|
+
ref: nt,
|
|
255
|
+
onKeyDown: (e) => oe(e, "[role=tab]"),
|
|
256
|
+
children: bt.map(([e, t, n]) => /* @__PURE__ */ a("button", {
|
|
257
|
+
role: "tab",
|
|
258
|
+
id: `ck-tab-${e}`,
|
|
259
|
+
"aria-controls": "ck-tabpanel",
|
|
260
|
+
class: "ck-tab",
|
|
261
|
+
"aria-selected": E === e,
|
|
262
|
+
tabIndex: E === e ? 0 : -1,
|
|
263
|
+
onClick: () => Se(e),
|
|
264
|
+
onFocus: () => Se(e),
|
|
265
|
+
children: [
|
|
266
|
+
s(t),
|
|
267
|
+
" ",
|
|
268
|
+
n ? /* @__PURE__ */ a("span", {
|
|
269
|
+
class: "ck-count",
|
|
270
|
+
children: n
|
|
271
|
+
}) : null
|
|
272
|
+
]
|
|
273
|
+
}))
|
|
274
|
+
}),
|
|
275
|
+
xe ? Qe ? /* @__PURE__ */ a("div", {
|
|
276
|
+
class: "ck-note ck-live-note",
|
|
277
|
+
role: "status",
|
|
278
|
+
children: [
|
|
279
|
+
s("livePaused"),
|
|
280
|
+
" ",
|
|
281
|
+
/* @__PURE__ */ a("button", {
|
|
282
|
+
class: "ck-btn",
|
|
283
|
+
onClick: () => c.reconnectRealtime(),
|
|
284
|
+
children: s("retry")
|
|
285
|
+
})
|
|
286
|
+
]
|
|
287
|
+
}) : null : /* @__PURE__ */ a("div", {
|
|
288
|
+
class: "ck-note",
|
|
289
|
+
"data-tone": "warning",
|
|
290
|
+
role: "status",
|
|
291
|
+
children: s("offline")
|
|
292
|
+
}),
|
|
293
|
+
be ? /* @__PURE__ */ a("div", {
|
|
294
|
+
class: "ck-note ck-pad-x",
|
|
295
|
+
role: "status",
|
|
296
|
+
children: s("readOnlyShort")
|
|
297
|
+
}) : null,
|
|
298
|
+
T && E !== "inbox" ? /* @__PURE__ */ a("div", {
|
|
299
|
+
class: "ck-branchbar",
|
|
300
|
+
role: "group",
|
|
301
|
+
"aria-label": s("branchFilter"),
|
|
302
|
+
children: [
|
|
303
|
+
/* @__PURE__ */ a("button", {
|
|
304
|
+
class: "ck-chip",
|
|
305
|
+
"aria-pressed": !C && !R,
|
|
306
|
+
onClick: () => (z(null), void c.setAllBranches(!1).catch(() => void 0)),
|
|
307
|
+
title: T,
|
|
308
|
+
children: s("thisBranch", { branch: v(T) })
|
|
309
|
+
}),
|
|
310
|
+
/* @__PURE__ */ a("button", {
|
|
311
|
+
class: "ck-chip",
|
|
312
|
+
"aria-pressed": C && !R,
|
|
313
|
+
onClick: () => (z(null), void c.setAllBranches(!0).catch(() => void 0)),
|
|
314
|
+
children: s("allBranches")
|
|
315
|
+
}),
|
|
316
|
+
Ie.some((e) => e.name !== T) ? /* @__PURE__ */ a(_, {
|
|
317
|
+
label: s("otherBranch"),
|
|
318
|
+
value: R ?? "",
|
|
319
|
+
onChange: (e) => z(e || null),
|
|
320
|
+
compact: !0,
|
|
321
|
+
options: [["", s("otherBranch")], ...Ie.filter((e) => e.name !== T).map((e) => [e.name, `${v(e.name)} (${e.open})`])]
|
|
322
|
+
}) : null
|
|
323
|
+
]
|
|
324
|
+
}) : null,
|
|
325
|
+
E === "inbox" ? null : /* @__PURE__ */ a(u, { children: [
|
|
326
|
+
/* @__PURE__ */ a("div", {
|
|
327
|
+
class: "ck-filters",
|
|
328
|
+
children: [/* @__PURE__ */ a("div", {
|
|
329
|
+
class: "ck-search",
|
|
330
|
+
children: [
|
|
331
|
+
/* @__PURE__ */ a(h, {
|
|
332
|
+
name: "search",
|
|
333
|
+
size: 15
|
|
334
|
+
}),
|
|
335
|
+
/* @__PURE__ */ a("input", {
|
|
336
|
+
ref: J,
|
|
337
|
+
class: "ck-input",
|
|
338
|
+
type: "text",
|
|
339
|
+
role: "searchbox",
|
|
340
|
+
"aria-label": s("search"),
|
|
341
|
+
placeholder: s("search"),
|
|
342
|
+
value: M,
|
|
343
|
+
onInput: (e) => N(e.target.value),
|
|
344
|
+
onKeyDown: (e) => {
|
|
345
|
+
e.stopPropagation(), e.key === "Escape" && M ? (e.preventDefault(), N("")) : e.key === "Escape" && g();
|
|
346
|
+
}
|
|
347
|
+
}),
|
|
348
|
+
M ? /* @__PURE__ */ a("button", {
|
|
349
|
+
class: "ck-ghost ck-ghost-sm",
|
|
350
|
+
"aria-label": s("clearSearch"),
|
|
351
|
+
onClick: () => (N(""), J.current?.focus()),
|
|
352
|
+
children: /* @__PURE__ */ a(h, {
|
|
353
|
+
name: "close",
|
|
354
|
+
size: 14
|
|
355
|
+
})
|
|
356
|
+
}) : null
|
|
357
|
+
]
|
|
358
|
+
}), /* @__PURE__ */ a(_, {
|
|
359
|
+
label: s("statusFilter"),
|
|
360
|
+
value: P,
|
|
361
|
+
onChange: Ae,
|
|
362
|
+
options: [
|
|
363
|
+
["active", s("status_open")],
|
|
364
|
+
["in_review", s("status_in_review")],
|
|
365
|
+
["resolved,closed", s("status_resolved")],
|
|
366
|
+
["all", s("allStatuses")]
|
|
367
|
+
]
|
|
368
|
+
})]
|
|
369
|
+
}),
|
|
370
|
+
/* @__PURE__ */ a("div", {
|
|
371
|
+
class: "ck-branchbar",
|
|
372
|
+
children: [
|
|
373
|
+
ot ? /* @__PURE__ */ a("button", {
|
|
374
|
+
class: "ck-chip",
|
|
375
|
+
"aria-pressed": F.length === 1 && F[0] === "me",
|
|
376
|
+
onClick: () => Ne(F.length === 1 && F[0] === "me" ? [] : ["me"]),
|
|
377
|
+
children: s("assignedToMe")
|
|
378
|
+
}) : null,
|
|
379
|
+
w ? /* @__PURE__ */ a("button", {
|
|
380
|
+
class: "ck-chip",
|
|
381
|
+
"aria-pressed": L,
|
|
382
|
+
onClick: () => Fe(!L),
|
|
383
|
+
children: s("createdByMe")
|
|
384
|
+
}) : null,
|
|
385
|
+
/* @__PURE__ */ a("button", {
|
|
386
|
+
class: "ck-chip",
|
|
387
|
+
"aria-expanded": K,
|
|
388
|
+
"aria-controls": "ck-more-filters",
|
|
389
|
+
onClick: () => Ye(!K),
|
|
390
|
+
children: [s("filters"), it ? /* @__PURE__ */ a("span", {
|
|
391
|
+
class: "ck-count",
|
|
392
|
+
"aria-label": i("filtersOn", it),
|
|
393
|
+
children: it
|
|
394
|
+
}) : null]
|
|
395
|
+
}),
|
|
396
|
+
Z || q !== "recent" ? /* @__PURE__ */ a("button", {
|
|
397
|
+
class: "ck-chip ck-chip-quiet",
|
|
398
|
+
onClick: rt,
|
|
399
|
+
children: s("resetFilters")
|
|
400
|
+
}) : null,
|
|
401
|
+
yt ? /* @__PURE__ */ a("span", {
|
|
402
|
+
class: "ck-muted ck-result-count",
|
|
403
|
+
role: "status",
|
|
404
|
+
children: yt
|
|
405
|
+
}) : null
|
|
406
|
+
]
|
|
407
|
+
}),
|
|
408
|
+
K ? /* @__PURE__ */ a("div", {
|
|
409
|
+
class: "ck-filters",
|
|
410
|
+
id: "ck-more-filters",
|
|
411
|
+
children: [
|
|
412
|
+
/* @__PURE__ */ a(_, {
|
|
413
|
+
label: s("sortBy"),
|
|
414
|
+
value: q,
|
|
415
|
+
onChange: (e) => Xe(e),
|
|
416
|
+
options: [
|
|
417
|
+
["recent", s("sortRecent")],
|
|
418
|
+
["oldest", s("sortOldest")],
|
|
419
|
+
["priority", s("sortPriority")]
|
|
420
|
+
]
|
|
421
|
+
}),
|
|
422
|
+
/* @__PURE__ */ a(_, {
|
|
423
|
+
label: s("priority"),
|
|
424
|
+
value: I,
|
|
425
|
+
onChange: Pe,
|
|
426
|
+
options: [
|
|
427
|
+
["", s("anyPriority")],
|
|
428
|
+
["urgent,high", s("priorityImportant")],
|
|
429
|
+
...[
|
|
430
|
+
"urgent",
|
|
431
|
+
"high",
|
|
432
|
+
"medium",
|
|
433
|
+
"low"
|
|
434
|
+
].map((e) => [e, s(`priority_${e}`)])
|
|
435
|
+
]
|
|
436
|
+
}),
|
|
437
|
+
ot ? /* @__PURE__ */ a("div", {
|
|
438
|
+
class: "ck-people-pick",
|
|
439
|
+
children: [/* @__PURE__ */ a("button", {
|
|
440
|
+
class: "ck-input ck-choose-btn ck-people-btn",
|
|
441
|
+
"aria-expanded": B,
|
|
442
|
+
"aria-haspopup": "true",
|
|
443
|
+
onClick: (e) => {
|
|
444
|
+
let t = e.currentTarget.getBoundingClientRect(), n = e.currentTarget.closest(".ck-panel")?.getBoundingClientRect(), r = !!n && t.left + t.width / 2 > n.left + n.width / 2;
|
|
445
|
+
Be(getComputedStyle(e.currentTarget).direction === "rtl" ? !r : r), Re(!B);
|
|
446
|
+
},
|
|
447
|
+
children: [/* @__PURE__ */ a("bdi", { children: F.length ? _e(F, Y.people) : s("anyone") }), /* @__PURE__ */ a(h, {
|
|
448
|
+
name: "chevron",
|
|
449
|
+
size: 12
|
|
450
|
+
})]
|
|
451
|
+
}), B ? /* @__PURE__ */ a("div", {
|
|
452
|
+
class: "ck-people-menu",
|
|
453
|
+
"data-end": ze || void 0,
|
|
454
|
+
role: "group",
|
|
455
|
+
"aria-label": s("assigneeFilter"),
|
|
456
|
+
onKeyDown: (e) => e.key === "Escape" && (e.stopPropagation(), Re(!1)),
|
|
457
|
+
children: [
|
|
458
|
+
["me", s("assignedToMe")],
|
|
459
|
+
["none", s("unassigned")],
|
|
460
|
+
...Y.people.map((e) => [String(e.id), e.name])
|
|
461
|
+
].map(([e, t]) => /* @__PURE__ */ a("label", {
|
|
462
|
+
class: "ck-check",
|
|
463
|
+
children: [/* @__PURE__ */ a("input", {
|
|
464
|
+
type: "checkbox",
|
|
465
|
+
checked: F.includes(e),
|
|
466
|
+
onChange: (t) => {
|
|
467
|
+
let n = t.target.checked;
|
|
468
|
+
Ne(n ? e === "none" ? ["none"] : [...F.filter((e) => e !== "none"), e] : F.filter((t) => t !== e));
|
|
469
|
+
}
|
|
470
|
+
}), /* @__PURE__ */ a("bdi", { children: t })]
|
|
471
|
+
}))
|
|
472
|
+
}) : null]
|
|
473
|
+
}) : null,
|
|
474
|
+
/* @__PURE__ */ a(_, {
|
|
475
|
+
label: s("labelFilter"),
|
|
476
|
+
value: G === null ? "" : String(G),
|
|
477
|
+
onChange: (e) => Je(e ? Number(e) : null),
|
|
478
|
+
options: [["", s("anyLabel")], ...Y.labels.map((e) => [String(e.id), e.name])]
|
|
479
|
+
})
|
|
480
|
+
]
|
|
481
|
+
}) : null
|
|
482
|
+
] }),
|
|
483
|
+
/* @__PURE__ */ a("div", {
|
|
484
|
+
class: "ck-card-body",
|
|
485
|
+
id: "ck-tabpanel",
|
|
486
|
+
role: "tabpanel",
|
|
487
|
+
"aria-labelledby": `ck-tab-${E}`,
|
|
488
|
+
style: { padding: 0 },
|
|
489
|
+
"aria-busy": (E === "inbox" ? Ee : Q).state === "loading",
|
|
490
|
+
children: E === "inbox" ? /* @__PURE__ */ a(fe, {
|
|
491
|
+
load: Ee,
|
|
492
|
+
onRetry: pt,
|
|
493
|
+
art: "caughtUp",
|
|
494
|
+
empty: /* @__PURE__ */ a("strong", { children: s("allCaughtUp") }),
|
|
495
|
+
children: (e) => /* @__PURE__ */ a(u, { children: [
|
|
496
|
+
/* @__PURE__ */ a("ul", {
|
|
497
|
+
class: "ck-list",
|
|
498
|
+
ref: tt,
|
|
499
|
+
onKeyDown: ft,
|
|
500
|
+
children: e.map((t) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("button", {
|
|
501
|
+
class: "ck-item",
|
|
502
|
+
"data-unread": !t.read,
|
|
503
|
+
onClick: () => dt(t, e.map((e) => e.thread_id)),
|
|
504
|
+
children: [/* @__PURE__ */ a("div", {
|
|
505
|
+
class: "ck-item-top",
|
|
506
|
+
children: [/* @__PURE__ */ a("span", {
|
|
507
|
+
class: "ck-item-tags",
|
|
508
|
+
children: [/* @__PURE__ */ a(pe, { item: t }), t.reference ? ` · ${t.reference}` : ""]
|
|
509
|
+
}), /* @__PURE__ */ a("time", {
|
|
510
|
+
class: "ck-time",
|
|
511
|
+
dateTime: t.created_at,
|
|
512
|
+
title: ee(t.created_at),
|
|
513
|
+
children: n(t.created_at)
|
|
514
|
+
})]
|
|
515
|
+
}), t.excerpt ? /* @__PURE__ */ a("div", {
|
|
516
|
+
class: "ck-item-text",
|
|
517
|
+
dir: "auto",
|
|
518
|
+
children: t.excerpt
|
|
519
|
+
}) : null]
|
|
520
|
+
}) }))
|
|
521
|
+
}),
|
|
522
|
+
Oe ? /* @__PURE__ */ a("div", {
|
|
523
|
+
class: "ck-pad",
|
|
524
|
+
children: /* @__PURE__ */ a("button", {
|
|
525
|
+
class: "ck-btn",
|
|
526
|
+
disabled: O,
|
|
527
|
+
"aria-busy": O,
|
|
528
|
+
onClick: ut,
|
|
529
|
+
children: s("showMore")
|
|
530
|
+
})
|
|
531
|
+
}) : null,
|
|
532
|
+
S ? /* @__PURE__ */ a("div", {
|
|
533
|
+
class: "ck-pad",
|
|
534
|
+
children: /* @__PURE__ */ a("button", {
|
|
535
|
+
class: "ck-btn",
|
|
536
|
+
onClick: () => void c.markRead({ all: !0 }).catch(y),
|
|
537
|
+
children: s("markAllRead")
|
|
538
|
+
})
|
|
539
|
+
}) : null
|
|
540
|
+
] })
|
|
541
|
+
}) : /* @__PURE__ */ a(fe, {
|
|
542
|
+
load: Q,
|
|
543
|
+
onRetry: pt,
|
|
544
|
+
art: Z ? "noMatch" : "noFeedback",
|
|
545
|
+
empty: Z ? /* @__PURE__ */ a(u, { children: [/* @__PURE__ */ a("strong", { children: s("noMatch") }), /* @__PURE__ */ a("button", {
|
|
546
|
+
class: "ck-btn",
|
|
547
|
+
onClick: rt,
|
|
548
|
+
children: s("clearFilters")
|
|
549
|
+
})] }) : /* @__PURE__ */ a(u, { children: [/* @__PURE__ */ a("strong", { children: s(E === "all" ? "nothingAnywhere" : "nothingHere") }), /* @__PURE__ */ a("span", {
|
|
550
|
+
class: "ck-hint",
|
|
551
|
+
children: s("nothingHereHint")
|
|
552
|
+
})] }),
|
|
553
|
+
children: (e) => /* @__PURE__ */ a(u, { children: [/* @__PURE__ */ a("ul", {
|
|
554
|
+
class: "ck-list",
|
|
555
|
+
ref: tt,
|
|
556
|
+
onKeyDown: ft,
|
|
557
|
+
children: e.map((r, o) => {
|
|
558
|
+
let c = E === "page" && t(r.anchor).state === "detached", l = c ? te(r.capture?.screenshot?.thumbnail_url, "image") : null, d = r.assignees ?? (r.assignee ? [r.assignee] : []), p = (r.first_message?.reactions ?? []).slice().sort((e, t) => t.count - e.count).slice(0, 3), m = f(r), ne = r.status === "resolved" || r.status === "closed";
|
|
559
|
+
return /* @__PURE__ */ a("li", {
|
|
560
|
+
style: { "--i": Math.min(o, 12) },
|
|
561
|
+
"data-done": ne || void 0,
|
|
562
|
+
"data-picking": H ? !0 : void 0,
|
|
563
|
+
children: [
|
|
564
|
+
H ? /* @__PURE__ */ a("input", {
|
|
565
|
+
type: "checkbox",
|
|
566
|
+
class: "ck-pick",
|
|
567
|
+
checked: H.has(r.id),
|
|
568
|
+
"aria-label": s("selectThread", { ref: r.reference }),
|
|
569
|
+
onChange: () => Ke(r.id)
|
|
570
|
+
}) : null,
|
|
571
|
+
/* @__PURE__ */ a("button", {
|
|
572
|
+
class: "ck-item",
|
|
573
|
+
"data-shot": l ? "true" : void 0,
|
|
574
|
+
"aria-pressed": H ? H.has(r.id) : void 0,
|
|
575
|
+
onClick: () => H ? Ke(r.id) : dt(r, e.map((e) => e.id)),
|
|
576
|
+
children: [/* @__PURE__ */ a("div", {
|
|
577
|
+
class: "ck-item-main",
|
|
578
|
+
children: [
|
|
579
|
+
/* @__PURE__ */ a("div", {
|
|
580
|
+
class: "ck-item-top",
|
|
581
|
+
children: [/* @__PURE__ */ a("span", {
|
|
582
|
+
class: "ck-item-tags",
|
|
583
|
+
children: [
|
|
584
|
+
/* @__PURE__ */ a("span", {
|
|
585
|
+
class: "ck-kind",
|
|
586
|
+
title: s(`spot_${r.anchor.type}`),
|
|
587
|
+
"aria-label": s(`spot_${r.anchor.type}`),
|
|
588
|
+
children: /* @__PURE__ */ a(h, {
|
|
589
|
+
name: ue[r.anchor.type] ?? "comment",
|
|
590
|
+
size: 12
|
|
591
|
+
})
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ a("strong", { children: ot ? r.reference : s("feedbackRef", { ref: r.reference }) }),
|
|
594
|
+
/* @__PURE__ */ a(ae, { status: r.status }),
|
|
595
|
+
r.priority === "none" ? null : /* @__PURE__ */ a("span", {
|
|
596
|
+
class: "ck-flag",
|
|
597
|
+
"data-priority": r.priority,
|
|
598
|
+
title: `${s("priority")}: ${s(`priority_${r.priority}`)}`,
|
|
599
|
+
"aria-label": `${s("priority")}: ${s(`priority_${r.priority}`)}`,
|
|
600
|
+
children: /* @__PURE__ */ a(h, {
|
|
601
|
+
name: "flag",
|
|
602
|
+
size: 11
|
|
603
|
+
})
|
|
604
|
+
}),
|
|
605
|
+
le(r) ? /* @__PURE__ */ a("span", {
|
|
606
|
+
class: "ck-tag",
|
|
607
|
+
title: `${s(`screen_${ce(r.breakpoint)}`)} (${r.breakpoint}px)`,
|
|
608
|
+
children: s(`size_${ce(r.breakpoint)}`)
|
|
609
|
+
}) : null,
|
|
610
|
+
c ? /* @__PURE__ */ a("span", {
|
|
611
|
+
class: "ck-badge-soft",
|
|
612
|
+
title: s("detached"),
|
|
613
|
+
children: s("notOnPage")
|
|
614
|
+
}) : null
|
|
615
|
+
]
|
|
616
|
+
}), /* @__PURE__ */ a("time", {
|
|
617
|
+
class: "ck-time",
|
|
618
|
+
dateTime: r.last_activity_at,
|
|
619
|
+
title: ee(r.last_activity_at),
|
|
620
|
+
children: n(r.last_activity_at)
|
|
621
|
+
})]
|
|
622
|
+
}),
|
|
623
|
+
/* @__PURE__ */ a("div", {
|
|
624
|
+
class: "ck-item-text",
|
|
625
|
+
dir: "auto",
|
|
626
|
+
children: r.first_message?.body
|
|
627
|
+
}),
|
|
628
|
+
/* @__PURE__ */ a("div", {
|
|
629
|
+
class: "ck-muted ck-item-meta",
|
|
630
|
+
children: [
|
|
631
|
+
/* @__PURE__ */ a(re, { person: r.author }),
|
|
632
|
+
/* @__PURE__ */ a("bdi", { children: he(r.author.name) }),
|
|
633
|
+
E === "all" ? /* @__PURE__ */ a(u, { children: [" · ", /* @__PURE__ */ a("bdi", { children: r.page.title || r.page.path })] }) : "",
|
|
634
|
+
" · ",
|
|
635
|
+
i("messageCount", r.message_count),
|
|
636
|
+
C && r.page.branch && r.page.branch !== T ? ` · ${s("onBranch", { branch: v(r.page.branch) })}` : "",
|
|
637
|
+
m ? /* @__PURE__ */ a("span", {
|
|
638
|
+
class: "ck-item-check",
|
|
639
|
+
children: [
|
|
640
|
+
" · ",
|
|
641
|
+
/* @__PURE__ */ a(h, {
|
|
642
|
+
name: "check",
|
|
643
|
+
size: 11
|
|
644
|
+
}),
|
|
645
|
+
m
|
|
646
|
+
]
|
|
647
|
+
}) : null,
|
|
648
|
+
p.length ? /* @__PURE__ */ a("span", {
|
|
649
|
+
class: "ck-item-reactions",
|
|
650
|
+
"aria-label": p.map((e) => i("reactionLabel", e.count, { emoji: e.emoji })).join(", "),
|
|
651
|
+
children: p.map((e) => /* @__PURE__ */ a("span", { children: [/* @__PURE__ */ a(se, { char: e.emoji }), e.count] }))
|
|
652
|
+
}) : null,
|
|
653
|
+
d.length ? /* @__PURE__ */ a("span", {
|
|
654
|
+
class: "ck-faces ck-item-faces",
|
|
655
|
+
title: `${s("assigneeFilter")}: ${d.map((e) => e.name).join(", ")}`,
|
|
656
|
+
children: d.slice(0, 3).map((e) => /* @__PURE__ */ a(re, { person: e }))
|
|
657
|
+
}) : null
|
|
658
|
+
]
|
|
659
|
+
})
|
|
660
|
+
]
|
|
661
|
+
}), l ? /* @__PURE__ */ a("img", {
|
|
662
|
+
class: "ck-item-thumb",
|
|
663
|
+
src: l,
|
|
664
|
+
alt: s("screenshot"),
|
|
665
|
+
loading: "lazy"
|
|
666
|
+
}) : null]
|
|
667
|
+
}),
|
|
668
|
+
H ? null : /* @__PURE__ */ a("span", {
|
|
669
|
+
class: "ck-item-actions",
|
|
670
|
+
children: [!ne && w?.capabilities.comment && !be ? /* @__PURE__ */ a("button", {
|
|
671
|
+
class: "ck-ghost ck-ghost-sm",
|
|
672
|
+
"aria-label": s("resolveRef", { ref: r.reference }),
|
|
673
|
+
title: s("resolve"),
|
|
674
|
+
onClick: () => void ht(r),
|
|
675
|
+
children: /* @__PURE__ */ a(h, {
|
|
676
|
+
name: "check",
|
|
677
|
+
size: 14
|
|
678
|
+
})
|
|
679
|
+
}) : null, /* @__PURE__ */ a("button", {
|
|
680
|
+
class: "ck-ghost ck-ghost-sm",
|
|
681
|
+
"aria-label": s("copyLinkRef", { ref: r.reference }),
|
|
682
|
+
title: s("copyLink"),
|
|
683
|
+
onClick: () => void gt(r),
|
|
684
|
+
children: /* @__PURE__ */ a(h, {
|
|
685
|
+
name: "link",
|
|
686
|
+
size: 14
|
|
687
|
+
})
|
|
688
|
+
})]
|
|
689
|
+
})
|
|
690
|
+
]
|
|
691
|
+
});
|
|
692
|
+
})
|
|
693
|
+
}), vt ? /* @__PURE__ */ a("div", {
|
|
694
|
+
class: "ck-pad",
|
|
695
|
+
children: /* @__PURE__ */ a("button", {
|
|
696
|
+
class: "ck-btn",
|
|
697
|
+
disabled: O,
|
|
698
|
+
"aria-busy": O,
|
|
699
|
+
onClick: lt,
|
|
700
|
+
children: s("showMore")
|
|
701
|
+
})
|
|
702
|
+
}) : null] })
|
|
703
|
+
})
|
|
704
|
+
}),
|
|
705
|
+
H ? /* @__PURE__ */ a("div", {
|
|
706
|
+
class: "ck-pickbar",
|
|
707
|
+
role: "group",
|
|
708
|
+
"aria-label": s("sendToAgent"),
|
|
709
|
+
children: [
|
|
710
|
+
Ue && We && Q.state === "ready" ? /* @__PURE__ */ a(We, {
|
|
711
|
+
client: c,
|
|
712
|
+
threads: Q.data.filter((e) => H.has(e.id)),
|
|
713
|
+
onError: y,
|
|
714
|
+
onClose: () => U(!1),
|
|
715
|
+
onDone: (e) => (b?.({
|
|
716
|
+
text: e,
|
|
717
|
+
tone: "success"
|
|
718
|
+
}), W())
|
|
719
|
+
}) : null,
|
|
720
|
+
/* @__PURE__ */ a("span", {
|
|
721
|
+
class: "ck-muted",
|
|
722
|
+
role: "status",
|
|
723
|
+
children: i("selectedCount", H.size)
|
|
724
|
+
}),
|
|
725
|
+
/* @__PURE__ */ a("button", {
|
|
726
|
+
class: "ck-btn",
|
|
727
|
+
onClick: W,
|
|
728
|
+
children: s("cancel")
|
|
729
|
+
}),
|
|
730
|
+
/* @__PURE__ */ a("button", {
|
|
731
|
+
class: "ck-btn ck-primary",
|
|
732
|
+
disabled: !H.size,
|
|
733
|
+
"aria-expanded": Ue,
|
|
734
|
+
onClick: () => Ue ? U(!1) : qe(),
|
|
735
|
+
children: [/* @__PURE__ */ a(h, {
|
|
736
|
+
name: "agent",
|
|
737
|
+
size: 14
|
|
738
|
+
}), s("sendToAgent")]
|
|
739
|
+
})
|
|
740
|
+
]
|
|
741
|
+
}) : null
|
|
742
|
+
]
|
|
743
|
+
})
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
function _({ label: e, value: t, options: n, onChange: i, compact: ee = !1 }) {
|
|
747
|
+
let [s, c] = o(!1), [u, d] = o(!1), f = r(null), p = n.find(([e]) => e === t)?.[1] ?? n[0]?.[1] ?? "";
|
|
748
|
+
return l(() => {
|
|
749
|
+
if (!s) return;
|
|
750
|
+
f.current?.querySelector("[aria-selected=true]")?.focus();
|
|
751
|
+
let e = (e) => !e.composedPath().includes(f.current) && c(!1);
|
|
752
|
+
return addEventListener("pointerdown", e, !0), () => removeEventListener("pointerdown", e, !0);
|
|
753
|
+
}, [s]), /* @__PURE__ */ a("div", {
|
|
754
|
+
class: "ck-choose",
|
|
755
|
+
ref: f,
|
|
756
|
+
"data-compact": ee || void 0,
|
|
757
|
+
children: [/* @__PURE__ */ a("button", {
|
|
758
|
+
class: "ck-input ck-choose-btn",
|
|
759
|
+
"aria-haspopup": "listbox",
|
|
760
|
+
"aria-expanded": s,
|
|
761
|
+
"aria-label": `${e}: ${p}`,
|
|
762
|
+
onClick: () => {
|
|
763
|
+
let e = f.current?.getBoundingClientRect(), t = f.current?.closest(".ck-panel")?.getBoundingClientRect();
|
|
764
|
+
if (e && t && f.current) {
|
|
765
|
+
let n = e.left + e.width / 2 > t.left + t.width / 2;
|
|
766
|
+
d(getComputedStyle(f.current).direction === "rtl" ? !n : n);
|
|
767
|
+
}
|
|
768
|
+
c(!s);
|
|
769
|
+
},
|
|
770
|
+
children: [/* @__PURE__ */ a("bdi", { children: p }), /* @__PURE__ */ a(h, {
|
|
771
|
+
name: "chevron",
|
|
772
|
+
size: 12
|
|
773
|
+
})]
|
|
774
|
+
}), s ? /* @__PURE__ */ a("div", {
|
|
775
|
+
class: "ck-choose-menu",
|
|
776
|
+
role: "listbox",
|
|
777
|
+
"aria-label": e,
|
|
778
|
+
"data-end": u || void 0,
|
|
779
|
+
onKeyDown: (e) => {
|
|
780
|
+
e.key === "Escape" ? (e.stopPropagation(), c(!1), (f.current?.querySelector(".ck-choose-btn"))?.focus()) : oe(e, "[role=option]", !0);
|
|
781
|
+
},
|
|
782
|
+
children: n.map(([e, n]) => /* @__PURE__ */ a("button", {
|
|
783
|
+
role: "option",
|
|
784
|
+
"aria-selected": e === t,
|
|
785
|
+
onClick: () => {
|
|
786
|
+
i(e), c(!1);
|
|
787
|
+
},
|
|
788
|
+
children: /* @__PURE__ */ a("bdi", { children: n })
|
|
789
|
+
}))
|
|
790
|
+
}) : null]
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
function fe({ load: e, onRetry: t, art: n, empty: r, children: i }) {
|
|
794
|
+
return e.state === "loading" ? /* @__PURE__ */ a("div", {
|
|
795
|
+
class: "ck-loading",
|
|
796
|
+
role: "status",
|
|
797
|
+
"aria-label": s("loadingEarlier"),
|
|
798
|
+
children: [
|
|
799
|
+
0,
|
|
800
|
+
1,
|
|
801
|
+
2
|
|
802
|
+
].map(() => /* @__PURE__ */ a("div", {
|
|
803
|
+
class: "ck-loading-row",
|
|
804
|
+
children: [
|
|
805
|
+
/* @__PURE__ */ a("div", { class: "ck-skeleton" }),
|
|
806
|
+
/* @__PURE__ */ a("div", { class: "ck-skeleton" }),
|
|
807
|
+
/* @__PURE__ */ a("div", { class: "ck-skeleton" })
|
|
808
|
+
]
|
|
809
|
+
}))
|
|
810
|
+
}) : e.state === "error" ? /* @__PURE__ */ a("div", {
|
|
811
|
+
class: "ck-empty",
|
|
812
|
+
role: "alert",
|
|
813
|
+
children: [
|
|
814
|
+
/* @__PURE__ */ a(p, { name: "error" }),
|
|
815
|
+
s("loadFailed"),
|
|
816
|
+
/* @__PURE__ */ a("button", {
|
|
817
|
+
class: "ck-btn",
|
|
818
|
+
onClick: t,
|
|
819
|
+
children: s("retry")
|
|
820
|
+
})
|
|
821
|
+
]
|
|
822
|
+
}) : e.data.length ? /* @__PURE__ */ a(u, { children: i(e.data) }) : /* @__PURE__ */ a("div", {
|
|
823
|
+
class: "ck-empty",
|
|
824
|
+
children: [/* @__PURE__ */ a(p, { name: n }), r]
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
function pe({ item: e }) {
|
|
828
|
+
let t = `kind_${e.kind}`, [n, r] = /^kind_[a-z_]+$/.test(t) && t in me ? c(t, "actor") : ["", ` ${e.kind.replace(/_/g, " ")}`], { type: i, name: o } = e.actor;
|
|
829
|
+
return /* @__PURE__ */ a(u, { children: [
|
|
830
|
+
n,
|
|
831
|
+
/* @__PURE__ */ a("strong", { children: /* @__PURE__ */ a("bdi", { children: i === "agent" || i === "integration" || i === "system" ? o : s("personName", { name: o }) }) }),
|
|
832
|
+
r
|
|
833
|
+
] });
|
|
834
|
+
}
|
|
835
|
+
var me = {
|
|
836
|
+
kind_mention: !0,
|
|
837
|
+
kind_reply: !0,
|
|
838
|
+
kind_assigned: !0,
|
|
839
|
+
kind_ready_for_review: !0,
|
|
840
|
+
kind_reopened: !0,
|
|
841
|
+
kind_resolved: !0,
|
|
842
|
+
kind_closed: !0,
|
|
843
|
+
kind_new_feedback: !0,
|
|
844
|
+
kind_due_soon: !0,
|
|
845
|
+
kind_overdue: !0,
|
|
846
|
+
kind_agent_request: !0
|
|
847
|
+
};
|
|
848
|
+
function he(e) {
|
|
849
|
+
return e.trim().split(/\s+/)[0] || e;
|
|
850
|
+
}
|
|
851
|
+
function v(e) {
|
|
852
|
+
return e.length > 28 ? `${e.slice(0, 27)}…` : e;
|
|
853
|
+
}
|
|
854
|
+
function ge(e, t, n, r) {
|
|
855
|
+
let i = e.assignees ?? (e.assignee ? [e.assignee] : []);
|
|
856
|
+
return n !== null && e.labels && !e.labels.some((e) => e.id === n) ? !1 : t.length ? t.includes("none") ? !i.length : t.some((e) => e === "me" ? i.some((e) => !!r && e.id === r.person.id && e.type === r.person.type) : i.some((t) => t.id === e)) : !0;
|
|
857
|
+
}
|
|
858
|
+
function _e(e, t) {
|
|
859
|
+
let n = e.map((e) => e === "me" ? s("assignedToMe") : e === "none" ? s("unassigned") : t.find((t) => String(t.id) === e)?.name ?? "").filter(Boolean);
|
|
860
|
+
return n.length > 1 ? `${n[0]} +${n.length - 1}` : n[0] ?? s("anyone");
|
|
861
|
+
}
|
|
862
|
+
//#endregion
|
|
863
|
+
export { g as Panel };
|