@things-factory/ai-dashboard 10.1.269 → 10.1.271
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.
|
@@ -429,9 +429,13 @@ export class CardVersions extends localize(i18next)(LitElement) {
|
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
/*
|
|
432
|
+
/*
|
|
433
|
+
* 'fit' is the house size of a form of a few fields - it stands at its own height; a small popup was narrower than the form.
|
|
434
|
+
* The wrapper only listens for `done`; it takes no box (display: contents), so the card sizes the form itself - a 'fit' card
|
|
435
|
+
* shrinks the form in it to the screen, and a box between them would stop that (ox-floating-overlay).
|
|
436
|
+
*/
|
|
433
437
|
function open(template: unknown, title: string, size: 'fit' | 'medium' = 'fit') {
|
|
434
|
-
const popup: any = openPopup(html`<div @done=${() => popup?.close?.()}>${template}</div>`, { backdrop: true, size, title })
|
|
438
|
+
const popup: any = openPopup(html`<div style="display: contents" @done=${() => popup?.close?.()}>${template}</div>`, { backdrop: true, size, title })
|
|
435
439
|
return popup
|
|
436
440
|
}
|
|
437
441
|
|
|
@@ -445,9 +445,13 @@ CardVersions = __decorate([
|
|
|
445
445
|
customElement('ai-dashboard-card-versions')
|
|
446
446
|
], CardVersions);
|
|
447
447
|
export { CardVersions };
|
|
448
|
-
/*
|
|
448
|
+
/*
|
|
449
|
+
* 'fit' is the house size of a form of a few fields - it stands at its own height; a small popup was narrower than the form.
|
|
450
|
+
* The wrapper only listens for `done`; it takes no box (display: contents), so the card sizes the form itself - a 'fit' card
|
|
451
|
+
* shrinks the form in it to the screen, and a box between them would stop that (ox-floating-overlay).
|
|
452
|
+
*/
|
|
449
453
|
function open(template, title, size = 'fit') {
|
|
450
|
-
const popup = openPopup(html `<div @done=${() => popup?.close?.()}>${template}</div>`, { backdrop: true, size, title });
|
|
454
|
+
const popup = openPopup(html `<div style="display: contents" @done=${() => popup?.close?.()}>${template}</div>`, { backdrop: true, size, title });
|
|
451
455
|
return popup;
|
|
452
456
|
}
|
|
453
457
|
export const openCardAiPrompt = (card) => open(html `<ai-dashboard-card-ai-form .card=${card}></ai-dashboard-card-ai-form>`, t('ai-dashboard.card.ai'), 'medium');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-dialogs.js","sourceRoot":"","sources":["../../client/components/card-dialogs.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,OAAO,4BAA4B,CAAA;AACnC,OAAO,uCAAuC,CAAA;AAC9C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,oCAAoC,CAAA;AAE3C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAA;AAEhF,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAsE,MAAM,sBAAsB,CAAA;AACpI,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,MAAM,CAAC,GAAG,CAAC,GAAW,EAAE,UAAmC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAA;AAEjG;;;GAGG;AACH,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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c,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAA,qCAAqC,IAAI,gCAAgC,EAAE,CAAC,CAAC,4BAA4B,CAAC,EAAE,QAAQ,CAAC,CAAA","sourcesContent":["/*\n * The small forms a card opens - what to change with the assistant, a new name, whom to share it with, and its\n * versions (ADR-0160 decisions 7, 9). Each changes one card through its own door and tells an open dashboard.\n */\nimport '@material/web/icon/icon.js'\nimport '@material/web/button/filled-button.js'\nimport '@material/web/button/text-button.js'\nimport '@operato/popup/ox-popup-actions.js'\n\nimport gql from 'graphql-tag'\nimport { LitElement, css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { QueryController } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { CommonPopupStyles, PopupBodyStyles } from '@operato/styles'\nimport { askAssistant } from '@things-factory/ai-assistant/dist-client/index.js'\n\nimport { cardApi, dashboardChanged, type CardItem, type CardShare, type CardVersion, type ShareOptions } from '../utils/card-api.js'\nimport { cardSelection } from '../utils/card-words.js'\n\nconst t = (key: string, options: Record<string, unknown> = {}) => String(i18next.t(key, options))\n\n/*\n * The house popup (CommonPopupStyles, PopupBodyStyles): only .body scrolls and ox-popup-actions stays put - a share\n * list of three people pushed 저장 out of sight (2026-10-25). The form fills the popup it is opened in.\n */\nconst FormStyles = css`\n :host {\n height: 100%;\n line-height: 1.5;\n }\n\n p.lead,\n p.note {\n margin: 0;\n }\n\n p.lead {\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n }\n\n textarea,\n input[type='text'],\n input[type='search'] {\n box-sizing: border-box;\n width: 100%;\n padding: 9px 12px;\n border: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n border-radius: 8px;\n background: var(--ui-panel, var(--md-sys-color-surface-container-lowest));\n color: inherit;\n font: inherit;\n }\n\n textarea {\n min-height: 88px;\n resize: vertical;\n }\n\n textarea:focus,\n input:focus {\n outline: 2px solid color-mix(in srgb, var(--ui-accent, var(--md-sys-color-primary)) 40%, transparent);\n border-color: var(--ui-accent, var(--md-sys-color-primary));\n }\n\n .hints {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n }\n\n .hints button {\n padding: 4px 10px;\n border: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n border-radius: 999px;\n background: transparent;\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n font: inherit;\n font-size: var(--ui-t-small, 12px);\n cursor: pointer;\n }\n\n .hints button:hover {\n border-color: var(--ui-accent, var(--md-sys-color-primary));\n color: var(--ui-accent, var(--md-sys-color-primary));\n }\n\n h5 {\n margin: 6px 0 0;\n font-size: var(--ui-t-small, 12px);\n font-weight: 600;\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n text-transform: none;\n }\n\n label.option {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n border: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n border-radius: 8px;\n cursor: pointer;\n }\n\n label.option small {\n margin-left: auto;\n color: var(--ui-faint, var(--md-sys-color-on-surface-variant));\n }\n\n .people {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n .person {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 10px;\n border-radius: 8px;\n background: var(--ui-panel-2, var(--md-sys-color-surface-container-low));\n --md-icon-size: 16px;\n }\n\n .person small {\n color: var(--ui-faint, var(--md-sys-color-on-surface-variant));\n }\n\n .person button,\n .found button {\n margin-left: auto;\n border: 0;\n background: transparent;\n color: var(--ui-accent, var(--md-sys-color-primary));\n font: inherit;\n cursor: pointer;\n }\n\n .found {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n border-radius: 8px;\n }\n\n .found div {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 10px;\n }\n\n .found div + div {\n border-top: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n }\n\n ol.versions {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n ol.versions li {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 12px;\n border: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n border-radius: 8px;\n }\n\n ol.versions .v {\n flex: none;\n min-width: 36px;\n font-weight: 650;\n font-variant-numeric: tabular-nums;\n color: var(--ui-accent, var(--md-sys-color-primary));\n }\n\n ol.versions .label {\n flex: 1;\n min-width: 0;\n }\n\n ol.versions small {\n display: block;\n color: var(--ui-faint, var(--md-sys-color-on-surface-variant));\n }\n`\n\n/** What to change in a card - sent to the conversation beside the page with the card picked, as a screen request. */\n@customElement('ai-dashboard-card-ai-form')\nexport class CardAiForm extends localize(i18next)(LitElement) {\n static styles = [CommonPopupStyles, PopupBodyStyles, FormStyles]\n @property({ attribute: false }) card!: CardItem\n @state() private text = ''\n\n render() {\n const hints = ['ai-dashboard.ai.hint-period', 'ai-dashboard.ai.hint-top', 'ai-dashboard.ai.hint-line', 'ai-dashboard.ai.hint-table']\n return html`<div class=\"body\">\n <p class=\"lead\">${t('ai-dashboard.ai.lead', { name: this.card.name })}</p>\n <textarea .value=${this.text} placeholder=${t('ai-dashboard.ai.placeholder')} @input=${(e: any) => (this.text = e.target.value)} @keydown=${(e: KeyboardEvent) => e.key === 'Enter' && (e.metaKey || e.ctrlKey) && this.send()}></textarea>\n <div class=\"hints\">${hints.map(key => html`<button @click=${() => (this.text = t(key))}>${t(key)}</button>`)}</div>\n </div>\n <ox-popup-actions>\n <md-text-button slot=\"cancel\" @click=${() => this.close()}>${t('ai-dashboard.button.cancel')}</md-text-button>\n <md-filled-button slot=\"confirm\" ?disabled=${!this.text.trim()} @click=${() => this.send()}>${t('ai-dashboard.ai.send')}</md-filled-button>\n </ox-popup-actions>`\n }\n\n private close() {\n this.dispatchEvent(new CustomEvent('done', { bubbles: true, composed: true }))\n }\n\n private send() {\n if (!this.text.trim()) return\n /* Closed first: the dock opens over the page, and a popup that is no longer the top one refuses to close. */\n this.close()\n askAssistant({\n ask: t('ai-dashboard.ai.ask', { name: this.card.name, version: this.card.version, change: this.text.trim() }),\n selection: cardSelection(this.card, t('ai-dashboard.title'))\n })\n }\n}\n\n/** A card's new name - a new version. */\n@customElement('ai-dashboard-card-rename-form')\nexport class CardRenameForm extends localize(i18next)(LitElement) {\n static styles = [CommonPopupStyles, PopupBodyStyles, FormStyles]\n @property({ attribute: false }) card!: CardItem\n @state() private name = ''\n\n connectedCallback() {\n super.connectedCallback()\n this.name = this.card?.name ?? ''\n }\n\n render() {\n return html`<div class=\"body\">\n <input type=\"text\" .value=${this.name} maxlength=\"100\" @input=${(e: any) => (this.name = e.target.value)} @keydown=${(e: KeyboardEvent) => e.key === 'Enter' && this.save()} />\n </div>\n <ox-popup-actions>\n <md-text-button slot=\"cancel\" @click=${() => this.close()}>${t('ai-dashboard.button.cancel')}</md-text-button>\n <md-filled-button slot=\"confirm\" ?disabled=${!this.name.trim() || this.name.trim() === this.card.name} @click=${() => this.save()}>${t('ai-dashboard.button.save')}</md-filled-button>\n </ox-popup-actions>`\n }\n\n private close() {\n this.dispatchEvent(new CustomEvent('done', { bubbles: true, composed: true }))\n }\n\n private async save() {\n try {\n await cardApi.rename(this.card.id, this.name.trim())\n dashboardChanged()\n this.close()\n } catch (error: any) {\n notify({ level: 'error', message: error?.message ?? String(error) })\n }\n }\n}\n\n/** Whom one's own card is shared with - the whole domain, one's own departments, people found by name. */\n@customElement('ai-dashboard-card-share-form')\nexport class CardShareForm extends localize(i18next)(LitElement) {\n static styles = [CommonPopupStyles, PopupBodyStyles, FormStyles]\n @property({ attribute: false }) card!: CardItem\n @state() private shares: CardShare[] = []\n @state() private search = ''\n /** The name the people are found by - the typed text once typing pauses. */\n @state() private findBy = ''\n private searching?: ReturnType<typeof setTimeout>\n\n private optionsRead = new QueryController(\n this,\n gql`query { dashboardShareOptions { domainId domainName departments { id name } peopleAvailable roles { id name note } } }`\n )\n private peopleRead = new QueryController(this, gql`query ($text: String!) { dashboardSharePeople(text: $text) { id name note } }`, {\n variables: () => (this.findBy ? { text: this.findBy } : undefined)\n })\n\n private get options(): ShareOptions | undefined {\n return this.optionsRead.data?.dashboardShareOptions\n }\n\n private get found(): { id: string; name: string; note?: string }[] {\n return this.peopleRead.data?.dashboardSharePeople ?? []\n }\n\n connectedCallback() {\n super.connectedCallback()\n this.shares = [...(this.card?.shares ?? [])].map(({ scope, targetId, targetName }) => ({ scope, targetId, targetName }))\n }\n\n private has(scope: string, id: string) {\n return this.shares.some(one => one.scope === scope && one.targetId === id)\n }\n\n private toggle(share: CardShare, on: boolean) {\n this.shares = on ? [...this.shares.filter(one => !(one.scope === share.scope && one.targetId === share.targetId)), share] : this.shares.filter(one => !(one.scope === share.scope && one.targetId === share.targetId))\n }\n\n private find(text: string) {\n this.search = text\n clearTimeout(this.searching)\n this.searching = setTimeout(() => (this.findBy = text.trim()), 250)\n }\n\n render() {\n const options = this.options\n const people = this.shares.filter(one => one.scope === 'USER')\n return html`<div class=\"body\">\n <p class=\"lead\">${t('ai-dashboard.share.lead')}</p>\n ${options\n ? html`<h5>${t('ai-dashboard.share.everyone-title')}</h5>\n <label class=\"option\">\n <input type=\"checkbox\" .checked=${this.has('DOMAIN', options.domainId)} @change=${(e: any) => this.toggle({ scope: 'DOMAIN', targetId: options.domainId, targetName: options.domainName }, e.target.checked)} />\n <md-icon>domain</md-icon>${t('ai-dashboard.share.everyone-in', { name: options.domainName })}\n </label>\n ${options.departments.length\n ? html`<h5>${t('ai-dashboard.share.departments')}</h5>\n ${options.departments.map(\n one => html`<label class=\"option\">\n <input type=\"checkbox\" .checked=${this.has('DEPARTMENT', one.id)} @change=${(e: any) => this.toggle({ scope: 'DEPARTMENT', targetId: one.id, targetName: one.name }, e.target.checked)} />\n <md-icon>groups</md-icon>${one.name}<small>${t('ai-dashboard.share.department-members')}</small>\n </label>`\n )}`\n : nothing}\n ${options.roles.length\n ? html`<h5>${t('ai-dashboard.share.roles')}</h5>\n ${options.roles.map(\n one => html`<label class=\"option\">\n <input type=\"checkbox\" .checked=${this.has('ROLE', one.id)} @change=${(e: any) => this.toggle({ scope: 'ROLE', targetId: one.id, targetName: one.name }, e.target.checked)} />\n <md-icon>badge</md-icon>${one.name}<small>${t('ai-dashboard.share.role-holders')}</small>\n </label>`\n )}`\n : nothing}\n <h5>${t('ai-dashboard.share.people')}</h5>\n ${people.length\n ? html`<div class=\"people\">\n ${people.map(one => html`<div class=\"person\"><md-icon>person</md-icon>${one.targetName ?? one.targetId}<button @click=${() => this.toggle(one, false)}>${t('ai-dashboard.share.remove')}</button></div>`)}\n </div>`\n : nothing}\n ${options.peopleAvailable\n ? html`<input type=\"search\" .value=${this.search} placeholder=${t('ai-dashboard.share.find-person')} @input=${(e: any) => this.find(e.target.value)} />\n ${this.found.length\n ? html`<div class=\"found\">\n ${this.found\n .filter(one => !this.has('USER', one.id))\n .map(one => html`<div><md-icon>person_add</md-icon>${one.name} ${one.note ? html`<small>${one.note}</small>` : nothing}<button @click=${() => this.toggle({ scope: 'USER', targetId: one.id, targetName: one.name }, true)}>${t('ai-dashboard.share.add')}</button></div>`)}\n </div>`\n : nothing}`\n : html`<p class=\"note\">${t('ai-dashboard.share.people-unavailable')}</p>`}\n <p class=\"note\">${t('ai-dashboard.share.rule')}</p>`\n : nothing}\n </div>\n <ox-popup-actions>\n <md-text-button slot=\"cancel\" @click=${() => this.close()}>${t('ai-dashboard.button.cancel')}</md-text-button>\n <md-filled-button slot=\"confirm\" ?disabled=${!options} @click=${() => this.save()}>${t('ai-dashboard.button.save')}</md-filled-button>\n </ox-popup-actions>`\n }\n\n private close() {\n this.dispatchEvent(new CustomEvent('done', { bubbles: true, composed: true }))\n }\n\n private async save() {\n try {\n await cardApi.share(this.card.id, this.shares)\n notify({ level: 'info', message: t(this.shares.length ? 'ai-dashboard.text.shared' : 'ai-dashboard.text.private', { name: this.card.name }) })\n dashboardChanged()\n this.close()\n } catch (error: any) {\n notify({ level: 'error', message: error?.message ?? String(error) })\n }\n }\n}\n\n/** One's own card's versions, newest first - an earlier one comes back as a new version. */\n@customElement('ai-dashboard-card-versions')\nexport class CardVersions extends localize(i18next)(LitElement) {\n static styles = [CommonPopupStyles, PopupBodyStyles, FormStyles]\n @property({ attribute: false }) card!: CardItem\n\n private versionsRead = new QueryController(\n this,\n gql`query ($id: String!) { dashboardCardVersions(id: $id) { version name definition creatorName createdAt } }`,\n { variables: () => (this.card ? { id: this.card.id } : undefined) }\n )\n\n private get versions(): CardVersion[] | undefined {\n return this.versionsRead.data?.dashboardCardVersions\n }\n\n render() {\n const view = (definition: any) => t(`ai-dashboard.view.${definition?.view?.kind ?? 'table'}`)\n return html`<div class=\"body\">\n <p class=\"lead\">${t('ai-dashboard.versions.lead')}</p>\n <ol class=\"versions\">\n ${(this.versions ?? []).map(\n one => html`<li>\n <span class=\"v\">v${one.version}</span>\n <span class=\"label\">${one.name}<small>${view(one.definition)} · ${one.creatorName ?? ''} · ${one.createdAt ? new Date(one.createdAt).toLocaleString(i18next.language) : ''}</small></span>\n ${one.version === this.card.version\n ? html`<small>${t('ai-dashboard.versions.current')}</small>`\n : html`<md-text-button @click=${() => this.restore(one.version)}>${t('ai-dashboard.versions.restore')}</md-text-button>`}\n </li>`\n )}\n </ol>\n </div>`\n }\n\n private async restore(version: number) {\n try {\n await cardApi.restore(this.card.id, version)\n notify({ level: 'info', message: t('ai-dashboard.text.restored', { version }) })\n dashboardChanged()\n this.dispatchEvent(new CustomEvent('done', { bubbles: true, composed: true }))\n } catch (error: any) {\n notify({ level: 'error', message: error?.message ?? String(error) })\n }\n }\n}\n\n/* 'fit' is the house size of a form of a few fields - it stands at its own height; a small popup was narrower than the form. */\nfunction open(template: unknown, title: string, size: 'fit' | 'medium' = 'fit') {\n const popup: any = openPopup(html`<div @done=${() => popup?.close?.()}>${template}</div>`, { backdrop: true, size, title })\n return popup\n}\n\nexport const openCardAiPrompt = (card: CardItem) => open(html`<ai-dashboard-card-ai-form .card=${card}></ai-dashboard-card-ai-form>`, t('ai-dashboard.card.ai'), 'medium')\nexport const openCardRename = (card: CardItem) => open(html`<ai-dashboard-card-rename-form .card=${card}></ai-dashboard-card-rename-form>`, t('ai-dashboard.card.rename'))\nexport const openCardShare = (card: CardItem) => open(html`<ai-dashboard-card-share-form .card=${card}></ai-dashboard-card-share-form>`, t('ai-dashboard.share.title', { name: card.name }), 'medium')\nexport const openCardVersions = (card: CardItem) => open(html`<ai-dashboard-card-versions .card=${card}></ai-dashboard-card-versions>`, t('ai-dashboard.card.versions'), 'medium')\n"]}
|
|
1
|
+
{"version":3,"file":"card-dialogs.js","sourceRoot":"","sources":["../../client/components/card-dialogs.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,OAAO,4BAA4B,CAAA;AACnC,OAAO,uCAAuC,CAAA;AAC9C,OAAO,qCAAqC,CAAA;AAC5C,OAAO,oCAAoC,CAAA;AAE3C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAA;AAEhF,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAsE,MAAM,sBAAsB,CAAA;AACpI,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,MAAM,CAAC,GAAG,CAAC,GAAW,EAAE,UAAmC,EAAE,EAAE,EAA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AC,IAAI,CAAC,IAAI,CAAA,uCAAuC,IAAI,kCAAkC,EAAE,CAAC,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAA;AACtM,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAA,qCAAqC,IAAI,gCAAgC,EAAE,CAAC,CAAC,4BAA4B,CAAC,EAAE,QAAQ,CAAC,CAAA","sourcesContent":["/*\n * The small forms a card opens - what to change with the assistant, a new name, whom to share it with, and its\n * versions (ADR-0160 decisions 7, 9). Each changes one card through its own door and tells an open dashboard.\n */\nimport '@material/web/icon/icon.js'\nimport '@material/web/button/filled-button.js'\nimport '@material/web/button/text-button.js'\nimport '@operato/popup/ox-popup-actions.js'\n\nimport gql from 'graphql-tag'\nimport { LitElement, css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { QueryController } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { CommonPopupStyles, PopupBodyStyles } from '@operato/styles'\nimport { askAssistant } from '@things-factory/ai-assistant/dist-client/index.js'\n\nimport { cardApi, dashboardChanged, type CardItem, type CardShare, type CardVersion, type ShareOptions } from '../utils/card-api.js'\nimport { cardSelection } from '../utils/card-words.js'\n\nconst t = (key: string, options: Record<string, unknown> = {}) => String(i18next.t(key, options))\n\n/*\n * The house popup (CommonPopupStyles, PopupBodyStyles): only .body scrolls and ox-popup-actions stays put - a share\n * list of three people pushed 저장 out of sight (2026-10-25). The form fills the popup it is opened in.\n */\nconst FormStyles = css`\n :host {\n height: 100%;\n line-height: 1.5;\n }\n\n p.lead,\n p.note {\n margin: 0;\n }\n\n p.lead {\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n }\n\n textarea,\n input[type='text'],\n input[type='search'] {\n box-sizing: border-box;\n width: 100%;\n padding: 9px 12px;\n border: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n border-radius: 8px;\n background: var(--ui-panel, var(--md-sys-color-surface-container-lowest));\n color: inherit;\n font: inherit;\n }\n\n textarea {\n min-height: 88px;\n resize: vertical;\n }\n\n textarea:focus,\n input:focus {\n outline: 2px solid color-mix(in srgb, var(--ui-accent, var(--md-sys-color-primary)) 40%, transparent);\n border-color: var(--ui-accent, var(--md-sys-color-primary));\n }\n\n .hints {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n }\n\n .hints button {\n padding: 4px 10px;\n border: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n border-radius: 999px;\n background: transparent;\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n font: inherit;\n font-size: var(--ui-t-small, 12px);\n cursor: pointer;\n }\n\n .hints button:hover {\n border-color: var(--ui-accent, var(--md-sys-color-primary));\n color: var(--ui-accent, var(--md-sys-color-primary));\n }\n\n h5 {\n margin: 6px 0 0;\n font-size: var(--ui-t-small, 12px);\n font-weight: 600;\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n text-transform: none;\n }\n\n label.option {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n border: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n border-radius: 8px;\n cursor: pointer;\n }\n\n label.option small {\n margin-left: auto;\n color: var(--ui-faint, var(--md-sys-color-on-surface-variant));\n }\n\n .people {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n .person {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 10px;\n border-radius: 8px;\n background: var(--ui-panel-2, var(--md-sys-color-surface-container-low));\n --md-icon-size: 16px;\n }\n\n .person small {\n color: var(--ui-faint, var(--md-sys-color-on-surface-variant));\n }\n\n .person button,\n .found button {\n margin-left: auto;\n border: 0;\n background: transparent;\n color: var(--ui-accent, var(--md-sys-color-primary));\n font: inherit;\n cursor: pointer;\n }\n\n .found {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n border-radius: 8px;\n }\n\n .found div {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 10px;\n }\n\n .found div + div {\n border-top: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n }\n\n ol.versions {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n ol.versions li {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 12px;\n border: 1px solid var(--ui-line-soft, var(--md-sys-color-outline-variant));\n border-radius: 8px;\n }\n\n ol.versions .v {\n flex: none;\n min-width: 36px;\n font-weight: 650;\n font-variant-numeric: tabular-nums;\n color: var(--ui-accent, var(--md-sys-color-primary));\n }\n\n ol.versions .label {\n flex: 1;\n min-width: 0;\n }\n\n ol.versions small {\n display: block;\n color: var(--ui-faint, var(--md-sys-color-on-surface-variant));\n }\n`\n\n/** What to change in a card - sent to the conversation beside the page with the card picked, as a screen request. */\n@customElement('ai-dashboard-card-ai-form')\nexport class CardAiForm extends localize(i18next)(LitElement) {\n static styles = [CommonPopupStyles, PopupBodyStyles, FormStyles]\n @property({ attribute: false }) card!: CardItem\n @state() private text = ''\n\n render() {\n const hints = ['ai-dashboard.ai.hint-period', 'ai-dashboard.ai.hint-top', 'ai-dashboard.ai.hint-line', 'ai-dashboard.ai.hint-table']\n return html`<div class=\"body\">\n <p class=\"lead\">${t('ai-dashboard.ai.lead', { name: this.card.name })}</p>\n <textarea .value=${this.text} placeholder=${t('ai-dashboard.ai.placeholder')} @input=${(e: any) => (this.text = e.target.value)} @keydown=${(e: KeyboardEvent) => e.key === 'Enter' && (e.metaKey || e.ctrlKey) && this.send()}></textarea>\n <div class=\"hints\">${hints.map(key => html`<button @click=${() => (this.text = t(key))}>${t(key)}</button>`)}</div>\n </div>\n <ox-popup-actions>\n <md-text-button slot=\"cancel\" @click=${() => this.close()}>${t('ai-dashboard.button.cancel')}</md-text-button>\n <md-filled-button slot=\"confirm\" ?disabled=${!this.text.trim()} @click=${() => this.send()}>${t('ai-dashboard.ai.send')}</md-filled-button>\n </ox-popup-actions>`\n }\n\n private close() {\n this.dispatchEvent(new CustomEvent('done', { bubbles: true, composed: true }))\n }\n\n private send() {\n if (!this.text.trim()) return\n /* Closed first: the dock opens over the page, and a popup that is no longer the top one refuses to close. */\n this.close()\n askAssistant({\n ask: t('ai-dashboard.ai.ask', { name: this.card.name, version: this.card.version, change: this.text.trim() }),\n selection: cardSelection(this.card, t('ai-dashboard.title'))\n })\n }\n}\n\n/** A card's new name - a new version. */\n@customElement('ai-dashboard-card-rename-form')\nexport class CardRenameForm extends localize(i18next)(LitElement) {\n static styles = [CommonPopupStyles, PopupBodyStyles, FormStyles]\n @property({ attribute: false }) card!: CardItem\n @state() private name = ''\n\n connectedCallback() {\n super.connectedCallback()\n this.name = this.card?.name ?? ''\n }\n\n render() {\n return html`<div class=\"body\">\n <input type=\"text\" .value=${this.name} maxlength=\"100\" @input=${(e: any) => (this.name = e.target.value)} @keydown=${(e: KeyboardEvent) => e.key === 'Enter' && this.save()} />\n </div>\n <ox-popup-actions>\n <md-text-button slot=\"cancel\" @click=${() => this.close()}>${t('ai-dashboard.button.cancel')}</md-text-button>\n <md-filled-button slot=\"confirm\" ?disabled=${!this.name.trim() || this.name.trim() === this.card.name} @click=${() => this.save()}>${t('ai-dashboard.button.save')}</md-filled-button>\n </ox-popup-actions>`\n }\n\n private close() {\n this.dispatchEvent(new CustomEvent('done', { bubbles: true, composed: true }))\n }\n\n private async save() {\n try {\n await cardApi.rename(this.card.id, this.name.trim())\n dashboardChanged()\n this.close()\n } catch (error: any) {\n notify({ level: 'error', message: error?.message ?? String(error) })\n }\n }\n}\n\n/** Whom one's own card is shared with - the whole domain, one's own departments, people found by name. */\n@customElement('ai-dashboard-card-share-form')\nexport class CardShareForm extends localize(i18next)(LitElement) {\n static styles = [CommonPopupStyles, PopupBodyStyles, FormStyles]\n @property({ attribute: false }) card!: CardItem\n @state() private shares: CardShare[] = []\n @state() private search = ''\n /** The name the people are found by - the typed text once typing pauses. */\n @state() private findBy = ''\n private searching?: ReturnType<typeof setTimeout>\n\n private optionsRead = new QueryController(\n this,\n gql`query { dashboardShareOptions { domainId domainName departments { id name } peopleAvailable roles { id name note } } }`\n )\n private peopleRead = new QueryController(this, gql`query ($text: String!) { dashboardSharePeople(text: $text) { id name note } }`, {\n variables: () => (this.findBy ? { text: this.findBy } : undefined)\n })\n\n private get options(): ShareOptions | undefined {\n return this.optionsRead.data?.dashboardShareOptions\n }\n\n private get found(): { id: string; name: string; note?: string }[] {\n return this.peopleRead.data?.dashboardSharePeople ?? []\n }\n\n connectedCallback() {\n super.connectedCallback()\n this.shares = [...(this.card?.shares ?? [])].map(({ scope, targetId, targetName }) => ({ scope, targetId, targetName }))\n }\n\n private has(scope: string, id: string) {\n return this.shares.some(one => one.scope === scope && one.targetId === id)\n }\n\n private toggle(share: CardShare, on: boolean) {\n this.shares = on ? [...this.shares.filter(one => !(one.scope === share.scope && one.targetId === share.targetId)), share] : this.shares.filter(one => !(one.scope === share.scope && one.targetId === share.targetId))\n }\n\n private find(text: string) {\n this.search = text\n clearTimeout(this.searching)\n this.searching = setTimeout(() => (this.findBy = text.trim()), 250)\n }\n\n render() {\n const options = this.options\n const people = this.shares.filter(one => one.scope === 'USER')\n return html`<div class=\"body\">\n <p class=\"lead\">${t('ai-dashboard.share.lead')}</p>\n ${options\n ? html`<h5>${t('ai-dashboard.share.everyone-title')}</h5>\n <label class=\"option\">\n <input type=\"checkbox\" .checked=${this.has('DOMAIN', options.domainId)} @change=${(e: any) => this.toggle({ scope: 'DOMAIN', targetId: options.domainId, targetName: options.domainName }, e.target.checked)} />\n <md-icon>domain</md-icon>${t('ai-dashboard.share.everyone-in', { name: options.domainName })}\n </label>\n ${options.departments.length\n ? html`<h5>${t('ai-dashboard.share.departments')}</h5>\n ${options.departments.map(\n one => html`<label class=\"option\">\n <input type=\"checkbox\" .checked=${this.has('DEPARTMENT', one.id)} @change=${(e: any) => this.toggle({ scope: 'DEPARTMENT', targetId: one.id, targetName: one.name }, e.target.checked)} />\n <md-icon>groups</md-icon>${one.name}<small>${t('ai-dashboard.share.department-members')}</small>\n </label>`\n )}`\n : nothing}\n ${options.roles.length\n ? html`<h5>${t('ai-dashboard.share.roles')}</h5>\n ${options.roles.map(\n one => html`<label class=\"option\">\n <input type=\"checkbox\" .checked=${this.has('ROLE', one.id)} @change=${(e: any) => this.toggle({ scope: 'ROLE', targetId: one.id, targetName: one.name }, e.target.checked)} />\n <md-icon>badge</md-icon>${one.name}<small>${t('ai-dashboard.share.role-holders')}</small>\n </label>`\n )}`\n : nothing}\n <h5>${t('ai-dashboard.share.people')}</h5>\n ${people.length\n ? html`<div class=\"people\">\n ${people.map(one => html`<div class=\"person\"><md-icon>person</md-icon>${one.targetName ?? one.targetId}<button @click=${() => this.toggle(one, false)}>${t('ai-dashboard.share.remove')}</button></div>`)}\n </div>`\n : nothing}\n ${options.peopleAvailable\n ? html`<input type=\"search\" .value=${this.search} placeholder=${t('ai-dashboard.share.find-person')} @input=${(e: any) => this.find(e.target.value)} />\n ${this.found.length\n ? html`<div class=\"found\">\n ${this.found\n .filter(one => !this.has('USER', one.id))\n .map(one => html`<div><md-icon>person_add</md-icon>${one.name} ${one.note ? html`<small>${one.note}</small>` : nothing}<button @click=${() => this.toggle({ scope: 'USER', targetId: one.id, targetName: one.name }, true)}>${t('ai-dashboard.share.add')}</button></div>`)}\n </div>`\n : nothing}`\n : html`<p class=\"note\">${t('ai-dashboard.share.people-unavailable')}</p>`}\n <p class=\"note\">${t('ai-dashboard.share.rule')}</p>`\n : nothing}\n </div>\n <ox-popup-actions>\n <md-text-button slot=\"cancel\" @click=${() => this.close()}>${t('ai-dashboard.button.cancel')}</md-text-button>\n <md-filled-button slot=\"confirm\" ?disabled=${!options} @click=${() => this.save()}>${t('ai-dashboard.button.save')}</md-filled-button>\n </ox-popup-actions>`\n }\n\n private close() {\n this.dispatchEvent(new CustomEvent('done', { bubbles: true, composed: true }))\n }\n\n private async save() {\n try {\n await cardApi.share(this.card.id, this.shares)\n notify({ level: 'info', message: t(this.shares.length ? 'ai-dashboard.text.shared' : 'ai-dashboard.text.private', { name: this.card.name }) })\n dashboardChanged()\n this.close()\n } catch (error: any) {\n notify({ level: 'error', message: error?.message ?? String(error) })\n }\n }\n}\n\n/** One's own card's versions, newest first - an earlier one comes back as a new version. */\n@customElement('ai-dashboard-card-versions')\nexport class CardVersions extends localize(i18next)(LitElement) {\n static styles = [CommonPopupStyles, PopupBodyStyles, FormStyles]\n @property({ attribute: false }) card!: CardItem\n\n private versionsRead = new QueryController(\n this,\n gql`query ($id: String!) { dashboardCardVersions(id: $id) { version name definition creatorName createdAt } }`,\n { variables: () => (this.card ? { id: this.card.id } : undefined) }\n )\n\n private get versions(): CardVersion[] | undefined {\n return this.versionsRead.data?.dashboardCardVersions\n }\n\n render() {\n const view = (definition: any) => t(`ai-dashboard.view.${definition?.view?.kind ?? 'table'}`)\n return html`<div class=\"body\">\n <p class=\"lead\">${t('ai-dashboard.versions.lead')}</p>\n <ol class=\"versions\">\n ${(this.versions ?? []).map(\n one => html`<li>\n <span class=\"v\">v${one.version}</span>\n <span class=\"label\">${one.name}<small>${view(one.definition)} · ${one.creatorName ?? ''} · ${one.createdAt ? new Date(one.createdAt).toLocaleString(i18next.language) : ''}</small></span>\n ${one.version === this.card.version\n ? html`<small>${t('ai-dashboard.versions.current')}</small>`\n : html`<md-text-button @click=${() => this.restore(one.version)}>${t('ai-dashboard.versions.restore')}</md-text-button>`}\n </li>`\n )}\n </ol>\n </div>`\n }\n\n private async restore(version: number) {\n try {\n await cardApi.restore(this.card.id, version)\n notify({ level: 'info', message: t('ai-dashboard.text.restored', { version }) })\n dashboardChanged()\n this.dispatchEvent(new CustomEvent('done', { bubbles: true, composed: true }))\n } catch (error: any) {\n notify({ level: 'error', message: error?.message ?? String(error) })\n }\n }\n}\n\n/*\n * 'fit' is the house size of a form of a few fields - it stands at its own height; a small popup was narrower than the form.\n * The wrapper only listens for `done`; it takes no box (display: contents), so the card sizes the form itself - a 'fit' card\n * shrinks the form in it to the screen, and a box between them would stop that (ox-floating-overlay).\n */\nfunction open(template: unknown, title: string, size: 'fit' | 'medium' = 'fit') {\n const popup: any = openPopup(html`<div style=\"display: contents\" @done=${() => popup?.close?.()}>${template}</div>`, { backdrop: true, size, title })\n return popup\n}\n\nexport const openCardAiPrompt = (card: CardItem) => open(html`<ai-dashboard-card-ai-form .card=${card}></ai-dashboard-card-ai-form>`, t('ai-dashboard.card.ai'), 'medium')\nexport const openCardRename = (card: CardItem) => open(html`<ai-dashboard-card-rename-form .card=${card}></ai-dashboard-card-rename-form>`, t('ai-dashboard.card.rename'))\nexport const openCardShare = (card: CardItem) => open(html`<ai-dashboard-card-share-form .card=${card}></ai-dashboard-card-share-form>`, t('ai-dashboard.share.title', { name: card.name }), 'medium')\nexport const openCardVersions = (card: CardItem) => open(html`<ai-dashboard-card-versions .card=${card}></ai-dashboard-card-versions>`, t('ai-dashboard.card.versions'), 'medium')\n"]}
|