@things-factory/organization 10.1.273 → 10.1.278
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval-line-view.js","sourceRoot":"","sources":["../../client/component/approval-line-view.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAoB,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAA5D;;QAwLuB,YAAO,GAAY,CAAC,CAAC,CAAA;IAuEnD,CAAC;aA9PQ,WAAM,GAAG;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkLF;KACF,AApLY,CAoLZ;IAYD,OAAO,CAAC,OAAO;QACb,gDAAgD;QAChD,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACjE,CAAC;IAED,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAA;QAE9B,OAAO,IAAI,CAAA;;UAEL,IAAI,C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AC,CAAC,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;8BACe,IAAI,CAAC,OAAO,IAAI,KAAK,eAAe,SAAS;gBAC3D,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK;2BACX,KAAK;UACtB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,qBAAqB,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;UACjD,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA,YAAY,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;;KAE7F,CAAA;IACH,CAAC;;AAvE0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;+CAA2B;AACzB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDAAsB;AAOrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDAAiB;AA/LjC,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CA+P5B","sourcesContent":["import { css, html, LitElement, TemplateResult } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ApprovalLineItem, isReferenceStep } from '../types/approval-line'\nimport { OrgMemberTargetType } from '../types/org-member'\n\n@customElement('approval-line-view')\nexport class ApprovalLineView extends localize(i18next)(LitElement) {\n static styles = [\n css`\n /*\n * 면을 갖지 않는다 — 담는 쪽(worklist 의 곁 패널)이 면을 준다. 회색 면을 스스로 칠하면\n * 패널 안에 회색 덩어리가 생긴다.\n */\n /*\n * 이 부품은 넓은 자리(결재선 편집기 · 선택기)와 좁은 자리(worklist 의 정보 팝업)에 함께 쓰인다.\n * 그래서 **어느 폭에서도 무너지지 않아야** 한다 — 좁다고 칸을 짜부라뜨리면 이름이 글자마다\n * 줄바꿈되고, 넓다고 늘어뜨리면 단계 사이가 멀어져 한 줄로 안 읽힌다.\n *\n * 칸마다 최소 폭을 주고, 그 폭도 안 되면 이 안에서 가로로 넘긴다. 담는 화면은 건드릴 것이 없다.\n */\n :host {\n display: block;\n padding: 10px 0;\n overflow-x: auto;\n\n --md-icon-size: 3em;\n color: var(--ui-ink, #17242c);\n }\n\n /*\n * ── 칸은 모두 같은 폭이다 (2026-09-06) ─────────────────────────────\n * approval-line-brief 와 같은 이유다. 이음선을 자기 폭의 50% 로 옆 칸 가운데까지 늘리는데,\n * 그 계산은 칸이 모두 같은 폭일 때만 맞는다. 내용 폭으로 두었더니 「나」는 28px,\n * 「QUALITY-MANAGER」는 140px 이 되어 선이 앞 칸의 가운데를 지나쳤다(실측).\n *\n * grid 로 균등하게 나눈다. 이름은 자기 칸 안에서 줄바꿈하고, 상자는 자기 글자만큼만 넓다.\n * 좁은 팝업에서 4단계도 가로로 넘치지 않는다.\n */\n ol {\n list-style: none;\n margin: 0;\n padding: 0;\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: minmax(96px, 1fr);\n align-items: start;\n min-width: 100%;\n width: max-content;\n }\n\n li {\n position: relative;\n min-width: 0;\n padding: 0 4px;\n text-align: center;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n line-height: 1.35;\n overflow-wrap: anywhere;\n }\n\n /*\n * 앞 칸과 잇는 선. 칸이 균등하므로 앞 칸의 가운데는 -50% 자리다. 상자 폭은 글자마다 다르므로\n * 넉넉히 비워 둔다 — 상자에 닿는 것보다 조금 떨어지는 편이 낫다.\n */\n /*\n * 색은 「어디까지 왔나」를 말한다. 지나온 구간은 강조색, 아직 오지 않은 구간은 흐리게.\n *\n * CSS 는 「현재보다 앞」을 고를 수 없다(형제 선택자는 뒤로만 간다). 그래서 **기본을\n * 강조색**으로 두고, 현재 뒤에 오는 것만 흐리게 되돌린다.\n */\n li:before {\n content: '';\n position: absolute;\n top: 10px;\n right: calc(50% + 14px);\n left: calc(-50% + 14px);\n height: 2px;\n background-color: var(--ui-accent, #00727e);\n }\n\n li:first-child:before {\n display: none;\n }\n\n .who {\n display: block;\n line-height: 1.35;\n }\n\n /*\n * The step marker is the step number, as in approval-line-brief.\n *\n * It used to hold how the approver was chosen — a filled pill reading 역할 (role). Two things\n * were wrong with that. The step number vanished, so the detail view carried less than the\n * summary the user opened it from: the ribbon reads 1 나 · 2 QUALITY-MANAGER, this one read\n * 나 · 역할 QUALITY-MANAGER. And the pill outweighed the name, so \"role\" was read before\n * \"QUALITY-MANAGER\" even though the name is what the user came for.\n *\n * How the approver was chosen now sits under the name, in .kind.\n */\n span {\n display: block;\n width: 20px;\n height: 20px;\n margin: 0 auto 4px;\n border-radius: 50%;\n background-color: var(--ui-line-soft, #e6eaed);\n color: var(--ui-faint, #8a959c);\n font-size: var(--ui-t-small, 11.5px);\n line-height: 20px;\n }\n\n /*\n * The submitter is where the line starts, not a step in it.\n *\n * It used to carry the number 1, which pushed every approver one place along: the popup read\n * 결재선번 1 next to a diagram lighting up step 2. The server counts the 1-based position in\n * approvalLine — submitter excluded, references included (see\n * worklist/server/controllers/activity-approval/approval-line.ts). The diagram now counts the\n * same thing.\n *\n * A filled dot with no digit: the line starts here, and there is no turn to number.\n */\n [origin] span {\n font-size: 0;\n }\n\n /* A reference has no turn to take, so it gets no number — an empty ring holds the place. */\n [reference] span {\n background-color: transparent;\n border: 2px dashed var(--ui-line, #d5dce0);\n box-sizing: border-box;\n }\n\n [approver][current] span {\n background-color: var(--ui-accent, #00727e);\n color: var(--ui-on-accent, #ffffff);\n }\n\n /* How this approver was chosen — role, self, supervisor. Secondary to who they are. */\n .kind {\n display: block;\n margin-top: 2px;\n font-size: var(--ui-t-micro, 11px);\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] {\n font-weight: bold;\n }\n\n /* 아직 오지 않은 단계 — 흐리게 둔다. 검은 상자를 얹으면 지나온 단계보다 무거워 보인다. */\n [approver][current] ~ li {\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] ~ li span {\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] ~ li:before {\n background-color: var(--ui-line, #d5dce0);\n }\n\n /* 현재가 없으면(아직 아무 단계도 아니면) 전부 흐리다 — 지나온 구간이 없다. */\n :host([no-current]) li:before {\n background-color: var(--ui-line, #d5dce0);\n }\n /*\n * 참조 — 결재와 다르게, 그리고 **더 조용하게** 그린다. 결재는 길을 막는 자리이고 참조는 알리는\n * 자리다. 같은 무게로 그리면 결재선을 짠 사람이 몇 명의 승인이 필요한지 잘못 읽는다.\n */\n li[approver][reference] {\n color: var(--ui-muted, #57676f);\n }\n\n li[approver][reference] em {\n margin-left: 4px;\n padding: 0 5px;\n border: 1px solid var(--ui-line, #d5dce0);\n border-radius: 999px;\n font-size: var(--ui-t-small, 11.5px);\n font-style: normal;\n }\n\n `\n ]\n\n @property({ type: Array }) model?: ApprovalLineItem[]\n @property({ type: Number }) current?: number = -1\n /*\n * Who drafted the case, when the reader may be someone else (2026-11-10). The line is declared from\n * the drafter's side - 나, 내 관리자 - and the 대표 reading 이유민's report read 「나」 as himself.\n * Given, the origin is the drafter's name and those steps say whose they are. The line editor, read\n * by the drafter, gives none and reads as before.\n */\n @property({ type: String }) drafter?: string\n\n updated(changes) {\n /* 현재 단계를 못 받았으면 지나온 구간이 없다 — 이음선을 전부 흐리게 둔다. */\n this.toggleAttribute('no-current', !(Number(this.current) > 0))\n }\n\n render() {\n const items = this.model || []\n\n return html`\n <ol>\n ${this.model\n ? html` <li approver origin>\n <span></span>\n <div class=\"who\">${this.drafter || i18next.t('label.Myself')}</div>\n ${this.drafter ? html`<div class=\"kind\">${i18next.t('label.drafter')}</div>` : ''}\n </li>`\n : html``}\n ${items.map((item, order) => this.renderItem(item, order + 1))}\n </ol>\n `\n }\n\n /**\n * One step of the approval line.\n *\n * A reference is drawn differently from an approval. Drawn the same it reads as \"this person has\n * to approve before it moves on\", which a reference does not do — whoever assembles the line has\n * to be able to see here what they put in.\n *\n * It carries no number either: a reference takes no turn, so there is no \"third\" for it to be.\n *\n * The number is the 1-based position in approvalLine, which is exactly what the server means by\n * `order`: submitter excluded, references included, array position as it stands (see\n * worklist/server/controllers/activity-approval/approval-line.ts). A reference holding a slot\n * without showing a digit is therefore right, not a gap.\n */\n renderItem(item: ApprovalLineItem, order: number): TemplateResult {\n const { type, approver } = item\n const relative = [OrgMemberTargetType.Myself, OrgMemberTargetType.MySupervisor, OrgMemberTargetType.MyDepartment].includes(type!)\n /* How the step was chosen, said from the drafter's side when the reader is someone else. */\n const kind = i18next.t(relative && this.drafter ? `label.drafter-${type}` : `label.${type}`)\n const name = approver?.name || (relative ? kind : '')\n\n const reference = isReferenceStep(item)\n\n /*\n * The name is who this is; the kind is how they were chosen (self, supervisor, role). Choosing\n * by self makes the two the same word, and the screen printed 나 twice, stacked. When they\n * match, say it once.\n */\n const shown = name || kind\n const note = name && name !== kind ? kind : ''\n\n return html`\n <li approver ?current=${this.current == order} ?reference=${reference}>\n <span>${reference ? '' : order}</span>\n <div class=\"who\">${shown}</div>\n ${note ? html`<div class=\"kind\">${note}</div>` : ''}\n ${reference ? html`<div><em>${i18next.t('label.participation-reference')}</em></div>` : ''}\n </li>\n `\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"approval-line-view.js","sourceRoot":"","sources":["../../client/component/approval-line-view.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAoB,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGlD,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAA5D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AA7LjC,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CA6P5B","sourcesContent":["import { css, html, LitElement, TemplateResult } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ApprovalLineItem, isReferenceStep } from '../types/approval-line'\nimport { OrgMemberTargetType } from '../types/org-member'\n\n@customElement('approval-line-view')\nexport class ApprovalLineView extends localize(i18next)(LitElement) {\n static styles = [\n css`\n /*\n * 면을 갖지 않는다 — 담는 쪽(worklist 의 곁 패널)이 면을 준다. 회색 면을 스스로 칠하면\n * 패널 안에 회색 덩어리가 생긴다.\n */\n /*\n * 이 부품은 넓은 자리(결재선 편집기 · 선택기)와 좁은 자리(worklist 의 정보 팝업)에 함께 쓰인다.\n * 그래서 **어느 폭에서도 무너지지 않아야** 한다 — 좁다고 칸을 짜부라뜨리면 이름이 글자마다\n * 줄바꿈되고, 넓다고 늘어뜨리면 단계 사이가 멀어져 한 줄로 안 읽힌다.\n *\n * 칸마다 최소 폭을 주고, 그 폭도 안 되면 이 안에서 가로로 넘긴다. 담는 화면은 건드릴 것이 없다.\n */\n :host {\n display: block;\n padding: 10px 0;\n overflow-x: auto;\n\n --md-icon-size: 3em;\n color: var(--ui-ink, #17242c);\n }\n\n /*\n * ── 칸은 모두 같은 폭이다 (2026-09-06) ─────────────────────────────\n * approval-line-brief 와 같은 이유다. 이음선을 자기 폭의 50% 로 옆 칸 가운데까지 늘리는데,\n * 그 계산은 칸이 모두 같은 폭일 때만 맞는다. 내용 폭으로 두었더니 「나」는 28px,\n * 「QUALITY-MANAGER」는 140px 이 되어 선이 앞 칸의 가운데를 지나쳤다(실측).\n *\n * grid 로 균등하게 나눈다. 이름은 자기 칸 안에서 줄바꿈하고, 상자는 자기 글자만큼만 넓다.\n * 좁은 팝업에서 4단계도 가로로 넘치지 않는다.\n */\n ol {\n list-style: none;\n margin: 0;\n padding: 0;\n display: grid;\n grid-auto-flow: column;\n grid-auto-columns: minmax(96px, 1fr);\n align-items: start;\n min-width: 100%;\n width: max-content;\n }\n\n li {\n position: relative;\n min-width: 0;\n padding: 0 4px;\n text-align: center;\n font-size: var(--ui-t-small, 11.5px);\n color: var(--ui-muted, #57676f);\n line-height: 1.35;\n overflow-wrap: anywhere;\n }\n\n /*\n * 앞 칸과 잇는 선. 칸이 균등하므로 앞 칸의 가운데는 -50% 자리다. 상자 폭은 글자마다 다르므로\n * 넉넉히 비워 둔다 — 상자에 닿는 것보다 조금 떨어지는 편이 낫다.\n */\n /*\n * 색은 「어디까지 왔나」를 말한다. 지나온 구간은 강조색, 아직 오지 않은 구간은 흐리게.\n *\n * CSS 는 「현재보다 앞」을 고를 수 없다(형제 선택자는 뒤로만 간다). 그래서 **기본을\n * 강조색**으로 두고, 현재 뒤에 오는 것만 흐리게 되돌린다.\n */\n li:before {\n content: '';\n position: absolute;\n top: 10px;\n right: calc(50% + 14px);\n left: calc(-50% + 14px);\n height: 2px;\n background-color: var(--ui-accent, #00727e);\n }\n\n li:first-child:before {\n display: none;\n }\n\n .who {\n display: block;\n line-height: 1.35;\n }\n\n /*\n * The step marker is the step number, as in approval-line-brief.\n *\n * It used to hold how the approver was chosen — a filled pill reading 역할 (role). Two things\n * were wrong with that. The step number vanished, so the detail view carried less than the\n * summary the user opened it from: the ribbon reads 1 나 · 2 QUALITY-MANAGER, this one read\n * 나 · 역할 QUALITY-MANAGER. And the pill outweighed the name, so \"role\" was read before\n * \"QUALITY-MANAGER\" even though the name is what the user came for.\n *\n * How the approver was chosen now sits under the name, in .kind.\n */\n span {\n display: block;\n width: 20px;\n height: 20px;\n margin: 0 auto 4px;\n border-radius: 50%;\n background-color: var(--ui-line-soft, #e6eaed);\n color: var(--ui-faint, #8a959c);\n font-size: var(--ui-t-small, 11.5px);\n line-height: 20px;\n }\n\n /*\n * The submitter is where the line starts, not a step in it.\n *\n * It used to carry the number 1, which pushed every approver one place along: the popup read\n * 결재선번 1 next to a diagram lighting up step 2. The server counts the 1-based position in\n * approvalLine — submitter excluded, references included (see\n * worklist/server/controllers/activity-approval/approval-line.ts). The diagram now counts the\n * same thing.\n *\n * A filled dot with no digit: the line starts here, and there is no turn to number.\n */\n [origin] span {\n font-size: 0;\n }\n\n /* A reference has no turn to take, so it gets no number — an empty ring holds the place. */\n [reference] span {\n background-color: transparent;\n border: 2px dashed var(--ui-line, #d5dce0);\n box-sizing: border-box;\n }\n\n [approver][current] span {\n background-color: var(--ui-accent, #00727e);\n color: var(--ui-on-accent, #ffffff);\n }\n\n /* How this approver was chosen — role, self, supervisor. Secondary to who they are. */\n .kind {\n display: block;\n margin-top: 2px;\n font-size: var(--ui-t-micro, 11px);\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] {\n font-weight: bold;\n }\n\n /* 아직 오지 않은 단계 — 흐리게 둔다. 검은 상자를 얹으면 지나온 단계보다 무거워 보인다. */\n [approver][current] ~ li {\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] ~ li span {\n color: var(--ui-faint, #8a959c);\n }\n\n [approver][current] ~ li:before {\n background-color: var(--ui-line, #d5dce0);\n }\n\n /* 현재가 없으면(아직 아무 단계도 아니면) 전부 흐리다 — 지나온 구간이 없다. */\n :host([no-current]) li:before {\n background-color: var(--ui-line, #d5dce0);\n }\n /*\n * 참조 — 결재와 다르게, 그리고 **더 조용하게** 그린다. 결재는 길을 막는 자리이고 참조는 알리는\n * 자리다. 같은 무게로 그리면 결재선을 짠 사람이 몇 명의 승인이 필요한지 잘못 읽는다.\n */\n li[approver][reference] {\n color: var(--ui-muted, #57676f);\n }\n\n li[approver][reference] em {\n margin-left: 4px;\n padding: 0 5px;\n border: 1px solid var(--ui-line, #d5dce0);\n border-radius: 999px;\n font-size: var(--ui-t-small, 11.5px);\n font-style: normal;\n }\n\n `\n ]\n\n @property({ type: Array }) model?: ApprovalLineItem[]\n @property({ type: Number }) current?: number = -1\n /*\n * Use the drafter's name for approval steps resolved relative to the drafter. Omit it in the drafter's own\n * line editor, which retains relative labels.\n */\n @property({ type: String }) drafter?: string\n\n updated(changes) {\n /* 현재 단계를 못 받았으면 지나온 구간이 없다 — 이음선을 전부 흐리게 둔다. */\n this.toggleAttribute('no-current', !(Number(this.current) > 0))\n }\n\n render() {\n const items = this.model || []\n\n return html`\n <ol>\n ${this.model\n ? html` <li approver origin>\n <span></span>\n <div class=\"who\">${this.drafter || i18next.t('label.Myself')}</div>\n ${this.drafter ? html`<div class=\"kind\">${i18next.t('label.drafter')}</div>` : ''}\n </li>`\n : html``}\n ${items.map((item, order) => this.renderItem(item, order + 1))}\n </ol>\n `\n }\n\n /**\n * One step of the approval line.\n *\n * A reference is drawn differently from an approval. Drawn the same it reads as \"this person has\n * to approve before it moves on\", which a reference does not do — whoever assembles the line has\n * to be able to see here what they put in.\n *\n * It carries no number either: a reference takes no turn, so there is no \"third\" for it to be.\n *\n * The number is the 1-based position in approvalLine, which is exactly what the server means by\n * `order`: submitter excluded, references included, array position as it stands (see\n * worklist/server/controllers/activity-approval/approval-line.ts). A reference holding a slot\n * without showing a digit is therefore right, not a gap.\n */\n renderItem(item: ApprovalLineItem, order: number): TemplateResult {\n const { type, approver } = item\n const relative = [OrgMemberTargetType.Myself, OrgMemberTargetType.MySupervisor, OrgMemberTargetType.MyDepartment].includes(type!)\n /* How the step was chosen, said from the drafter's side when the reader is someone else. */\n const kind = i18next.t(relative && this.drafter ? `label.drafter-${type}` : `label.${type}`)\n const name = approver?.name || (relative ? kind : '')\n\n const reference = isReferenceStep(item)\n\n /*\n * The name is who this is; the kind is how they were chosen (self, supervisor, role). Choosing\n * by self makes the two the same word, and the screen printed 나 twice, stacked. When they\n * match, say it once.\n */\n const shown = name || kind\n const note = name && name !== kind ? kind : ''\n\n return html`\n <li approver ?current=${this.current == order} ?reference=${reference}>\n <span>${reference ? '' : order}</span>\n <div class=\"who\">${shown}</div>\n ${note ? html`<div class=\"kind\">${note}</div>` : ''}\n ${reference ? html`<div><em>${i18next.t('label.participation-reference')}</em></div>` : ''}\n </li>\n `\n }\n}\n"]}
|