@things-factory/board-ui 10.1.41 → 10.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/board-list/board-thumb.d.ts +33 -0
- package/dist-client/board-list/board-thumb.js +119 -0
- package/dist-client/board-list/board-thumb.js.map +1 -0
- package/dist-client/graphql/favorite-board.js +3 -0
- package/dist-client/graphql/favorite-board.js.map +1 -1
- package/dist-client/graphql/my-board.js +3 -0
- package/dist-client/graphql/my-board.js.map +1 -1
- package/dist-client/graphql/play-group.js +2 -0
- package/dist-client/graphql/play-group.js.map +1 -1
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +1 -0
- package/dist-client/index.js.map +1 -1
- package/dist-client/pages/board-list-page.d.ts +39 -42
- package/dist-client/pages/board-list-page.js +388 -284
- package/dist-client/pages/board-list-page.js.map +1 -1
- package/dist-client/pages/board-modeller-page.d.ts +2 -0
- package/dist-client/pages/board-modeller-page.js +18 -1
- package/dist-client/pages/board-modeller-page.js.map +1 -1
- package/dist-client/pages/board-template/board-template-list-page.d.ts +21 -10
- package/dist-client/pages/board-template/board-template-list-page.js +147 -136
- package/dist-client/pages/board-template/board-template-list-page.js.map +1 -1
- package/dist-client/pages/play-list-page.d.ts +22 -12
- package/dist-client/pages/play-list-page.js +264 -113
- package/dist-client/pages/play-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/setting-let/board-modeller-setting-let.d.ts +21 -0
- package/dist-client/setting-let/board-modeller-setting-let.js +144 -0
- package/dist-client/setting-let/board-modeller-setting-let.js.map +1 -0
- package/dist-client/styles/board-card-styles.d.ts +11 -0
- package/dist-client/styles/board-card-styles.js +90 -0
- package/dist-client/styles/board-card-styles.js.map +1 -0
- package/dist-client/themes/board-theme.css +32 -19
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/board-meta.d.ts +10 -0
- package/dist-client/utils/board-meta.js +34 -0
- package/dist-client/utils/board-meta.js.map +1 -0
- package/dist-client/viewparts/board-basic-info.d.ts +38 -7
- package/dist-client/viewparts/board-basic-info.js +378 -349
- package/dist-client/viewparts/board-basic-info.js.map +1 -1
- package/dist-client/viewparts/board-info-link.d.ts +5 -1
- package/dist-client/viewparts/board-info-link.js +79 -21
- package/dist-client/viewparts/board-info-link.js.map +1 -1
- package/dist-client/viewparts/board-info-template.d.ts +15 -0
- package/dist-client/viewparts/board-info-template.js +97 -0
- package/dist-client/viewparts/board-info-template.js.map +1 -0
- package/dist-client/viewparts/board-info.d.ts +5 -0
- package/dist-client/viewparts/board-info.js +24 -73
- package/dist-client/viewparts/board-info.js.map +1 -1
- package/dist-client/viewparts/board-template-builder.d.ts +1 -0
- package/dist-client/viewparts/board-template-builder.js +37 -65
- package/dist-client/viewparts/board-template-builder.js.map +1 -1
- package/dist-client/viewparts/board-template-info.d.ts +3 -0
- package/dist-client/viewparts/board-template-info.js +75 -134
- package/dist-client/viewparts/board-template-info.js.map +1 -1
- package/dist-client/viewparts/group-info-basic.d.ts +8 -3
- package/dist-client/viewparts/group-info-basic.js +54 -190
- package/dist-client/viewparts/group-info-basic.js.map +1 -1
- package/dist-client/viewparts/group-info-import.d.ts +3 -1
- package/dist-client/viewparts/group-info-import.js +29 -62
- package/dist-client/viewparts/group-info-import.js.map +1 -1
- package/dist-client/viewparts/group-info.d.ts +4 -0
- package/dist-client/viewparts/group-info.js +21 -55
- package/dist-client/viewparts/group-info.js.map +1 -1
- package/dist-client/viewparts/info-dialog-styles.d.ts +19 -0
- package/dist-client/viewparts/info-dialog-styles.js +194 -0
- package/dist-client/viewparts/info-dialog-styles.js.map +1 -0
- package/dist-client/viewparts/link-builder.d.ts +3 -0
- package/dist-client/viewparts/link-builder.js +87 -81
- package/dist-client/viewparts/link-builder.js.map +1 -1
- package/dist-client/viewparts/play-group-info-basic.d.ts +4 -3
- package/dist-client/viewparts/play-group-info-basic.js +49 -188
- package/dist-client/viewparts/play-group-info-basic.js.map +1 -1
- package/dist-client/viewparts/play-group-info.d.ts +4 -0
- package/dist-client/viewparts/play-group-info.js +22 -53
- package/dist-client/viewparts/play-group-info.js.map +1 -1
- package/package.json +4 -4
- package/translations/en.json +32 -0
- package/translations/ja.json +10 -0
- package/translations/ko.json +32 -0
- package/translations/ms.json +8 -0
- package/translations/zh.json +10 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-basic-info.js","sourceRoot":"","sources":["../../client/viewparts/board-basic-info.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,8CAA8C,CAAA;AACrD,OAAO,sCAAsC,CAAA;AAC7C,OAAO,yCAAyC,CAAA;AAChD,OAAO,iCAAiC,CAAA;AACxC,OAAO,oCAAoC,CAAA;AAC3C,OAAO,oCAAoC,CAAA;AAC3C,OAAO,8BAA8B,CAAA;AAErC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAA;AAEpE,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAA;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAG3C,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QA6II,mBAAc,GAAU,EAAE,CAAA;QAC1B,kBAAa,GAAU,EAAE,CAAA;QACzB,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;;6CAA4B;AAC3B;IAAR,KAAK,EAAE;;iDAAiC;AAIhC;IAAR,KAAK,EAAE;;gDAAsE;AACrE;IAAR,KAAK,EAAE;;+CAAkD;AACjD;IAAR,KAAK,EAAE;;kDAAyB;AACxB;IAAR,KAAK,EAAE;;gDAAuB;AAvJpB,SAAS;IADrB,aAAa,CAAC,kBAAkB,CAAC;GACrB,SAAS,CAyqBrB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/textfield/filled-text-field.js'\nimport '@material/web/select/outlined-select'\nimport '@material/web/button/elevated-button.js'\nimport '@material/web/chips/chip-set.js'\nimport '@material/web/chips/assist-chip.js'\nimport '@material/web/chips/filter-chip.js'\nimport '@material/web/radio/radio.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { i18next } from '@operato/i18n'\nimport { client } from '@operato/graphql'\nimport { navigate, AppController } from '@operato/shell'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\nimport { hasPrivilege } from '@things-factory/auth-base/dist-client'\n\nimport { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles'\nimport { notify } from '../utils/notify-helper.js'\n\n@customElement('board-basic-info')\nexport class BoardInfo extends LitElement {\n static styles = [\n MDTypeScaleStyles,\n css`\n :host {\n position: relative;\n display: block;\n background-color: var(--md-sys-color-surface);\n color: var(--md-sys-color-on-surface);\n\n --md-filled-field-top-space: 12px;\n --md-filled-field-bottom-space: 12px;\n --md-filled-field-leading-space: 12px;\n --md-filled-field-trailing-space: 12px;\n\n --md-outlined-field-top-space: 12px;\n --md-outlined-field-bottom-space: 12px;\n --md-outlined-field-leading-space: 12px;\n --md-outlined-field-trailing-space: 12px;\n }\n\n /*\n * 썸네일은 **일정한 자리**를 차지해야 한다.\n *\n * 이전에는 max-width: 100% 만 있어서, 원본이 패널보다 작은 보드는 원본 크기로 그려졌다.\n * 그래서 보드마다 이미지 폭이 달라지고 오른쪽에 빈 공간이 남았다(꽉 찬 보드도 있고\n * 절반만 차는 보드도 있었다).\n *\n * width: 100% + aspect-ratio 로 자리를 고정하고, 이미지는 그 안에서 **가운데** 놓는다.\n * 남는 여백은 흰색이 아니라 표면 토큰으로 채운다.\n *\n * contain 이 아니라 scale-down 인 이유: contain 은 작은 이미지를 자리에 맞게 **확대**해서\n * 흐려진다. scale-down 은 큰 이미지는 줄이고 작은 이미지는 원본 크기를 지키며, 어느 쪽이든\n * object-position 기본값(50% 50%)으로 가운데 놓인다.\n */\n img {\n display: block;\n width: 100%;\n aspect-ratio: 16 / 9;\n object-fit: scale-down;\n object-position: center;\n background-color: var(--md-sys-color-surface-container-low);\n /* rgba(0,0,0,.1) 은 다크에서 보이지 않는다 */\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n\n form {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 10px 0;\n grid-auto-rows: minmax(24px, auto);\n padding: var(--spacing-large);\n align-items: center;\n }\n\n md-outlined-select,\n md-filled-text-field {\n flex: 1;\n padding: 4px 0;\n min-width: unset;\n }\n\n md-chip-set {\n flex: 1;\n display: flex;\n gap: 4px;\n }\n\n fieldset {\n display: contents;\n }\n\n legend {\n grid-column: span 12;\n padding: var(--legend-padding);\n color: var(--md-sys-color-on-surface);\n text-transform: capitalize;\n }\n\n fieldset:not(:first-of-type) > legend {\n border-top: 1px solid gray;\n }\n\n label {\n text-transform: capitalize;\n }\n\n md-icon[dim] {\n font-variation-settings: 'FILL' 1;\n --md-icon-size: 14px;\n color: var(--md-sys-color-outline-variant);\n }\n\n [name] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n [danger] {\n --md-assist-chip-elevated-container-color: var(--md-sys-color-error);\n --md-assist-chip-label-text-color: var(--md-sys-color-on-error);\n --md-assist-chip-leading-icon-color: var(--md-sys-color-on-error);\n }\n\n [fullwidth] {\n grid-column: span 12 / auto;\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n [oneline] {\n grid-column: span 12 / auto;\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n }\n\n [oneline] md-filled-text-field,\n [oneline] select {\n flex: 1;\n }\n\n [right] {\n margin-left: auto;\n }\n\n @media screen and (max-width: 460px) {\n :host {\n width: 100vw;\n }\n }\n `\n ]\n\n @property({ type: String }) boardId?: string\n @property({ type: String }) groupId?: string\n\n @state() board: any\n @state() boardGroupList: any[] = []\n @state() playGroupList: any[] = []\n @state() showTarget: boolean = false\n @state() enableModeller?: boolean = false\n\n private _appCtrl = new AppController(this)\n\n @state() targetDomains: { id: string; name: string; subdomain: string }[] = []\n @state() targetGroups: { id: string; name: string }[] = []\n @state() targetSubdomain?: string\n @state() targetGroupId?: string\n\n private original: any\n\n render() {\n const board = this.board || { name: '', description: '', playGroups: [] }\n const boardGroupList = this.boardGroupList || []\n const playGroupList = (this.playGroupList || []).map(group => {\n return {\n ...group,\n checked: false\n }\n })\n ;(board.playGroups || []).map(group => {\n const playGroup = playGroupList.find(g => g.id == group.id)\n if (playGroup) {\n playGroup.checked = true\n }\n })\n\n return html`\n ${board.thumbnail ? html` <img src=${board.thumbnail} /> ` : html``}\n\n <form class=\"md-typescale-body-medium\">\n <fieldset>\n <legend class=\"md-typescale-label-large-prominent\">${i18next.t('label.information')}</legend>\n <div oneline>\n <md-filled-text-field\n label=${String(i18next.t('label.name'))}\n type=\"text\"\n .value=${board.name}\n @change=${e => (this.board = { ...this.board, name: e.target.value })}\n ?disabled=${!this.enableModeller}\n ></md-filled-text-field>\n\n ${this.enableModeller\n ? html`\n <md-icon\n @click=${() => {\n this.showTarget = !this.showTarget\n }}\n tail\n >${this.showTarget ? 'arrow_drop_up' : 'arrow_drop_down'}</md-icon\n >\n `\n : nothing}\n </div>\n ${this.showTarget\n ? html`\n <div fullwidth target>\n <label class=\"md-typescale-label-meium-prominent\">${i18next.t('label.board-copy')}</label>\n <div oneline>\n <md-outlined-select\n label=${String(i18next.t('label.domain'))}\n @change=${e => {\n this.targetSubdomain = e.target.value\n this.getGroupsByDomain(this.targetSubdomain)\n }}\n .value=${this.targetSubdomain || ''}\n ?disabled=${!this.enableModeller}\n >\n <md-select-option aria-label=\"blank\"></md-select-option>\n ${this.targetDomains.map(\n domain => html`\n <md-select-option\n value=${domain.subdomain}\n ?selected=${domain.subdomain == this.targetSubdomain}\n >\n <div slot=\"headline\">${domain.name}</div>\n </md-select-option>\n `\n )}\n </md-outlined-select>\n\n <md-outlined-select\n label=${String(i18next.t('label.group'))}\n @change=${e => (this.targetGroupId = e.target.value)}\n .value=${this.targetGroupId || ''}\n ?disabled=${!this.enableModeller}\n >\n <md-select-option aria-label=\"blank\"></md-select-option>\n ${this.targetGroups.map(\n group => html`\n <md-select-option value=${group.id} ?selected=${group.id == this.targetGroupId}>\n <div slot=\"headline\">${group.name}</div>\n </md-select-option>\n `\n )}\n </md-outlined-select>\n </div>\n\n <md-chip-set oneline>\n <md-assist-chip\n elevated\n label=${String(i18next.t('button.copy'))}\n ?disabled=${!this.enableModeller ||\n !this.original?.name ||\n !this.board.name ||\n !this.targetSubdomain ||\n (this.original.name == this.board.name && this._appCtrl.domain?.subdomain == this.targetSubdomain)}\n @click=${this.cloneBoard.bind(this)}\n right\n >\n <md-icon slot=\"icon\">content_copy</md-icon>\n </md-assist-chip>\n\n <md-assist-chip\n elevated\n label=${String(i18next.t('button.export'))}\n @click=${this.exportBoard.bind(this)}\n >\n <md-icon slot=\"icon\">download</md-icon>\n </md-assist-chip>\n </md-chip-set>\n </div>\n `\n : nothing}\n\n <md-filled-text-field\n oneline\n label=${String(i18next.t('label.description'))}\n .value=${board.description}\n @change=${e => (this.board = { ...this.board, description: e.target.value })}\n ?disabled=${!this.enableModeller}\n ></md-filled-text-field>\n\n <div oneline>\n <label>${i18next.t('label.board-type')}</label>\n <div role=\"radiogroup\" aria-labelledby=\"board-type\" right>\n <md-radio\n id=\"board-type-main\"\n name=\"board-type\"\n value=\"main\"\n ?checked=${board.type === 'main'}\n @change=${e => (this.board = { ...this.board, type: e.target.value })}\n ?disabled=${!this.enableModeller}\n ></md-radio>\n <label for=\"board-type-main\">${i18next.t('label.board-type-main')}</label>\n\n <md-radio\n id=\"board-type-sub\"\n name=\"board-type\"\n value=\"sub\"\n ?checked=${board.type === 'sub'}\n @change=${e => (this.board = { ...this.board, type: e.target.value })}\n ?disabled=${!this.enableModeller}\n ></md-radio>\n <label for=\"board-type-sub\">${i18next.t('label.board-type-sub')}</label>\n\n <md-radio\n id=\"board-type-popup\"\n name=\"board-type\"\n value=\"popup\"\n ?checked=${board.type === 'popup'}\n @change=${e => (this.board = { ...this.board, type: e.target.value })}\n ?disabled=${!this.enableModeller}\n ></md-radio>\n <label for=\"board-type-popup\">${i18next.t('label.board-type-popup')}</label>\n </div>\n </div>\n\n <md-outlined-select\n oneline\n label=${String(i18next.t('label.group'))}\n @change=${e => (this.board = { ...this.board, groupId: e.target.value })}\n .value=${this.groupId || ''}\n .displayText=${boardGroupList?.find(item => item.id == this.groupId)?.name}\n ?disabled=${!this.enableModeller}\n >\n <md-select-option aria-label=\"blank\"></md-select-option>\n ${boardGroupList.map(\n item => html`\n <md-select-option value=${item.id} ?selected=${item.id == this.groupId}>\n <div slot=\"headline\">${item.name}</div>\n </md-select-option>\n `\n )}\n </md-outlined-select>\n\n <md-chip-set oneline>\n <md-assist-chip\n danger\n elevated\n ?disabled=${!this.enableModeller}\n label=${String(i18next.t('button.delete'))}\n @click=${this.deleteBoard.bind(this)}\n >\n <md-icon slot=\"icon\">delete_outline</md-icon>\n </md-assist-chip>\n\n <md-assist-chip\n elevated\n ?disabled=${!this.enableModeller}\n label=${String(i18next.t('button.save'))}\n @click=${this.updateBoard.bind(this)}\n right\n >\n <md-icon slot=\"icon\">save</md-icon>\n </md-assist-chip>\n <md-assist-chip\n elevated\n ?disabled=${!this.enableModeller}\n label=${String(i18next.t('button.edit'))}\n @click=${() => navigate(`${'board-modeller/' + this.boardId}`)}\n >\n <md-icon slot=\"icon\">drive_file_rename_outline</md-icon>\n </md-assist-chip>\n </md-chip-set>\n </fieldset>\n\n <fieldset>\n <legend class=\"md-typescale-label-large-prominent\">${i18next.t('label.status')}</legend>\n <div oneline>\n <label class=\"md-typescale-label-meium\">${i18next.t('label.creator')}</label>\n <md-icon dim>person</md-icon>\n <div name title=${(board.creator && board.creator.name) || 'anonymous'}>\n ${(board.creator && board.creator.name) || 'anonymous'}\n </div>\n <md-icon dim right>schedule</md-icon> ${new Date(board.createdAt).toLocaleString()}\n </div>\n\n <div oneline>\n <label class=\"md-typescale-label-meium\">${i18next.t('label.updater')}</label>\n <md-icon dim>person</md-icon>\n <div name title=${(board.updater && board.updater.name) || 'anonymouse'}>\n ${(board.updater && board.updater.name) || 'anonymouse'}\n </div>\n <md-icon dim right>schedule</md-icon> ${new Date(board.updatedAt).toLocaleString()}\n </div>\n\n <div oneline>\n <label class=\"md-typescale-label-meium\">${i18next.t('label.state')}</label>\n <md-icon dim>signpost</md-icon> ${(board.state || '').toUpperCase()}\n <md-icon dim>pin</md-icon> ${board.version}\n <md-chip-set>\n <md-assist-chip\n elevated\n label=${String(i18next.t('button.release'))}\n ?disabled=${!this.enableModeller || !this.isReleasable}\n @click=${this.releaseBoard.bind(this)}\n right\n >\n <md-icon slot=\"icon\">new_releases</md-icon>\n </md-assist-chip>\n </md-chip-set>\n </div>\n </fieldset>\n\n <fieldset>\n <legend class=\"md-typescale-label-large-prominent\">${i18next.t('label.play-group')}</legend>\n <md-chip-set oneline>\n ${playGroupList.map(\n item => html`\n <md-filter-chip\n label=${item.name}\n ?selected=${item.checked}\n @click=${e => {\n e.target.selected ? this.joinPlayGroup(item) : this.leavePlayGroup(item)\n }}\n ></md-filter-chip>\n `\n )}\n </md-chip-set>\n </fieldset>\n </form>\n `\n }\n\n async firstUpdated() {\n this.targetSubdomain = this.targetSubdomain ?? this._appCtrl.domain?.subdomain\n this.enableModeller = await hasPrivilege({ privilege: 'mutation', category: 'board' })\n\n this.refresh()\n }\n\n async refresh() {\n const response = (\n await client.query({\n query: gql`\n query FetchBoardById($id: String!) {\n board(id: $id) {\n id\n name\n description\n model\n group {\n id\n name\n }\n playGroups {\n id\n name\n }\n thumbnail\n createdAt\n creator {\n id\n name\n }\n type\n state\n version\n updatedAt\n updater {\n id\n name\n }\n }\n\n groups {\n items {\n id\n name\n description\n }\n }\n\n playGroups {\n items {\n id\n name\n description\n }\n total\n }\n\n domainsWithPrivilege(privilege: \"mutation\", category: \"board\") {\n name\n subdomain\n }\n }\n `,\n variables: { id: this.boardId }\n })\n ).data\n\n this.board = response.board\n this.boardGroupList = response.groups.items\n this.playGroupList = response.playGroups.items\n\n this.original = { ...this.board }\n\n this.groupId = this.board.group?.id\n\n this.targetDomains = response.domainsWithPrivilege\n this.targetGroups = response.groups.items\n this.targetGroupId = this.groupId\n }\n\n async getGroupsByDomain(subdomain?: string) {\n this.targetGroups = []\n this.targetGroupId = ''\n\n if (!subdomain) {\n return\n }\n\n const response2 = (\n await client.query({\n query: gql`\n query {\n groups {\n items {\n id\n name\n description\n }\n }\n }\n `,\n variables: { id: this.boardId },\n context: {\n headers: {\n 'x-things-factory-domain': subdomain\n }\n }\n })\n ).data\n\n this.targetGroups = response2.groups.items\n }\n\n get isReleasable() {\n if (!this.board || this.board.state == 'released') {\n return false\n }\n\n const { name, description, groupId } = this.board\n\n return (\n this.original &&\n this.original.name == name &&\n this.original.description == description &&\n this.original.groupId == groupId\n )\n }\n\n async cloneBoard() {\n if (!this.original.name || (this.board.name == this.original.name && this._appCtrl.domain?.subdomain == this.targetSubdomain)) {\n notify('error', i18next.t('error.name must be unique from the original board', { name: this.original.name }))\n return\n }\n\n const { id, name, description } = this.board\n\n this.dispatchEvent(\n new CustomEvent('clone-board', {\n detail: {\n id,\n name,\n description,\n targetSubdomain: this.targetSubdomain,\n targetGroupId: this.targetGroupId\n },\n bubbles: true,\n composed: true\n })\n )\n\n this.close()\n }\n\n async exportBoard() {\n const board = { ...this.board, model: JSON.parse(this.board.model) }\n\n const json = JSON.stringify(board, null, 2)\n const blob = new Blob([json], { type: 'application/json;charset=utf-8' })\n\n const blobUrl = URL.createObjectURL(blob)\n\n const link = document.createElement('a')\n link.href = blobUrl\n link.download = `${board.name}.json`\n\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n\n URL.revokeObjectURL(blobUrl)\n }\n\n async releaseBoard() {\n const { id } = this.board\n\n // 릴리즈 코멘트(선택) 입력 — OxPrompt.prompt(모달, native prompt 대체). 취소 시 릴리즈 중단.\n const comment = await OxPrompt.prompt({\n type: 'question',\n title: String(i18next.t('button.release')),\n text: String(i18next.t('text.release comment optional')),\n multiline: true,\n confirmButton: { text: String(i18next.t('button.release')) },\n cancelButton: { text: String(i18next.t('button.cancel')) }\n })\n if (comment === null) return\n\n this.dispatchEvent(\n new CustomEvent('release-board', {\n detail: {\n id,\n comment: comment.trim() || null\n },\n bubbles: true,\n composed: true\n })\n )\n }\n\n async updateBoard() {\n const { id, name, description, groupId, type } = this.board\n /* model 정보를 제외하고 업데이트 */\n\n this.dispatchEvent(\n new CustomEvent('update-board', {\n detail: { id, name, description, groupId, type },\n bubbles: true,\n composed: true\n })\n )\n }\n\n async deleteBoard() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n this.dispatchEvent(\n new CustomEvent('delete-board', {\n detail: this.board,\n bubbles: true,\n composed: true\n })\n )\n\n this.close()\n }\n }\n\n async joinPlayGroup(group) {\n this.dispatchEvent(\n new CustomEvent('join-playgroup', {\n detail: {\n board: this.board,\n playGroup: group\n },\n bubbles: true,\n composed: true\n })\n )\n }\n\n async leavePlayGroup(group) {\n this.dispatchEvent(\n new CustomEvent('leave-playgroup', {\n detail: {\n board: this.board,\n playGroup: group\n },\n bubbles: true,\n composed: true\n })\n )\n }\n\n close() {\n history.back()\n }\n}\n"]}
|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AAI,CAAC,KAAK;gBACjB,SAAS,EAAE,KAAK;aACjB;YACD,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAA;IACH,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,KAAK;QACxB,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,iBAAiB,EAAE;YACjC,MAAM,EAAE;gBACN,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,SAAS,EAAE,KAAK;aACjB;YACD,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAA;IACH,CAAC;IAED,KAAK;QACH,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;;AA/f2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CAAiB;AAEnC;IAAR,KAAK,EAAE;;wCAAW;AACV;IAAR,KAAK,EAAE;;iDAA2B;AAC1B;IAAR,KAAK,EAAE;;gDAA0B;AACzB;IAAR,KAAK,EAAE;;8CAA6B;AAC5B;IAAR,KAAK,EAAE;;iDAAiC;AAIhC;IAAR,KAAK,EAAE;;gDAAsE;AACrE;IAAR,KAAK,EAAE;;+CAAkD;AACjD;IAAR,KAAK,EAAE;;kDAAyB;AACxB;IAAR,KAAK,EAAE;;gDAAuB;AAEL;IAAzB,KAAK,CAAC,SAAS,CAAC;;uCAAmB;AAlMzB,SAAS;IADrB,aAAa,CAAC,kBAAkB,CAAC;GACrB,SAAS,CAkrBrB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/iconbutton/icon-button.js'\nimport '@material/web/button/filled-button.js'\nimport '@material/web/button/outlined-button.js'\nimport '@material/web/button/text-button.js'\nimport '@material/web/chips/chip-set.js'\nimport '@material/web/chips/filter-chip.js'\nimport '@material/web/menu/menu.js'\nimport '@material/web/menu/menu-item.js'\nimport '@material/web/divider/divider.js'\nimport '@operato/input/ox-input-select-buttons.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { i18next } from '@operato/i18n'\nimport { client } from '@operato/graphql'\nimport { navigate, AppController } from '@operato/shell'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\nimport { CommonPopupStyles } from '@operato/styles'\nimport { hasPrivilege } from '@things-factory/auth-base/dist-client'\n\nimport { notify } from '../utils/notify-helper.js'\nimport { timeAgo } from '../utils/board-meta.js'\nimport { InfoFormStyles } from './info-dialog-styles.js'\n\n/**\n * The basic tab of the board dialog.\n *\n * ## The shape, and why\n *\n * Three kinds of thing used to share one scrolling form: fields that wait for Save, actions that\n * happen the moment you touch them (release, join a play group), and a copy-to-domain panel hidden\n * behind a caret next to the name. The Save button sat in the middle of all that and scrolled out\n * of view on a short screen.\n *\n * Now the dialog reads top to bottom as: what this is (a status band), what you can change (the\n * form, committed by Save), where it plays (membership chips, which apply at once and say so), and\n * a footer that never scrolls away: the primary Save, the way into the modeller, and everything\n * else - duplicate, export, release, delete - behind one \"more\" menu so the footer stays two\n * buttons wide. Duplicate opens its own small panel with its own Copy and Cancel.\n *\n * ## Colour\n *\n * The accent (board's earth brown) is spent on three things only: the filled Save, the selected\n * segment, and the pressed play-group chip. Everything else is the neutral scale - the status band\n * is a low surface, the draft pill a warm secondary container, released a soft tertiary green -\n * so the one thing you are meant to press is the one thing in colour.\n */\n@customElement('board-basic-info')\nexport class BoardInfo extends LitElement {\n static styles = [\n CommonPopupStyles,\n InfoFormStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n padding: 0;\n gap: 0;\n background: var(--info-dialog-surface, var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface)));\n }\n\n /* What this is: state, version, freshness, home group - one quiet line under the tabs. */\n .what {\n flex: none;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px 10px;\n margin: var(--spacing-medium, 8px) var(--popup-padding) 0;\n padding: 7px 10px;\n border-radius: var(--md-sys-shape-corner-small, 6px);\n background: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface-variant);\n font-size: var(--popup-font-size-small);\n }\n\n .what [pill] {\n padding: 1px 8px;\n border-radius: 999px;\n font-size: 0.66rem;\n font-weight: 600;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--md-sys-color-on-secondary-container);\n background: var(--md-sys-color-secondary-container);\n }\n\n .what [pill][released] {\n color: var(--md-sys-color-on-tertiary-container);\n background: var(--md-sys-color-tertiary-container);\n }\n\n .what [dot]::before {\n content: '·';\n margin-right: 10px;\n color: var(--md-sys-color-outline);\n }\n\n .what b {\n font-weight: 500;\n color: var(--md-sys-color-on-surface);\n }\n\n [body] {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-medium, 8px);\n padding: var(--spacing-medium, 8px) var(--popup-padding) var(--popup-padding);\n }\n\n .fields .row {\n display: flex;\n gap: var(--spacing-medium, 8px);\n }\n\n .fields .row > label {\n flex: 1;\n min-width: 0;\n }\n\n /* A choice of three reads faster as a segmented row than as three radios with labels. */\n ox-input-select-buttons {\n --md-filter-chip-container-height: 30px;\n --md-filter-chip-label-text-size: 0.76rem;\n }\n\n .chips {\n --md-filter-chip-container-height: 28px;\n --md-filter-chip-label-text-size: 0.74rem;\n --md-filter-chip-outline-color: var(--md-sys-color-outline-variant);\n --md-filter-chip-label-text-color: var(--md-sys-color-on-surface-variant);\n --md-filter-chip-selected-container-color: var(--md-sys-color-primary-container);\n --md-filter-chip-selected-label-text-color: var(--md-sys-color-on-primary-container);\n --md-filter-chip-selected-leading-icon-color: var(--md-sys-color-on-primary-container);\n }\n\n /* The duplicate panel is a small task inside the dialog: inset, with its own commit. */\n [duplicate] {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-medium, 8px);\n padding: var(--spacing-medium, 8px) var(--spacing-medium, 8px) var(--spacing-small, 4px);\n border: 1px solid var(--md-sys-color-outline-variant);\n border-radius: var(--md-sys-shape-corner-small, 6px);\n background: var(--md-sys-color-surface-container-low);\n }\n\n [duplicate] .section {\n margin-top: 0;\n }\n\n [duplicate] .buttons {\n border-top: 0;\n padding-top: 0;\n }\n\n /* The footer stays put while the body scrolls. */\n [footer] {\n flex: none;\n padding: var(--spacing-medium, 8px) var(--popup-padding);\n border-top: 1px solid var(--md-sys-color-outline-variant);\n background: var(--info-dialog-surface, var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface)));\n }\n\n [footer] .buttons {\n border-top: 0;\n padding-top: 0;\n margin-top: 0;\n align-items: center;\n }\n\n [footer] [more] {\n position: relative;\n }\n\n md-menu {\n min-width: 220px;\n --md-menu-container-color: var(--md-sys-color-surface-container-lowest, #fff);\n --md-menu-container-shape: 10px;\n --md-menu-item-one-line-container-height: 40px;\n --md-menu-item-two-line-container-height: 52px;\n --md-menu-item-label-text-size: 0.84rem;\n --md-menu-item-supporting-text-size: 0.72rem;\n --md-menu-item-leading-space: 14px;\n --md-menu-item-trailing-space: 14px;\n }\n\n md-menu-item[cap] [slot='headline'] {\n text-transform: capitalize;\n }\n\n md-menu-item md-icon[slot='start'] {\n --md-icon-size: 18px;\n }\n\n md-menu-item[danger] {\n --md-menu-item-label-text-color: var(--md-sys-color-error);\n --md-menu-item-leading-icon-color: var(--md-sys-color-error);\n }\n\n md-icon-button {\n --md-icon-button-icon-color: var(--md-sys-color-on-surface-variant);\n }\n\n @media (pointer: coarse) {\n [footer] {\n padding: 0;\n }\n\n [footer] .buttons {\n margin: 0;\n border-top: 0;\n }\n\n [footer] [more] {\n flex: 0 0 auto;\n }\n }\n `\n ]\n\n @property({ type: String }) boardId?: string\n @property({ type: String }) groupId?: string\n\n @state() board: any\n @state() boardGroupList: any[] = []\n @state() playGroupList: any[] = []\n @state() duplicating: boolean = false\n @state() enableModeller?: boolean = false\n\n private _appCtrl = new AppController(this)\n\n @state() targetDomains: { id: string; name: string; subdomain: string }[] = []\n @state() targetGroups: { id: string; name: string }[] = []\n @state() targetSubdomain?: string\n @state() targetGroupId?: string\n\n @query('md-menu') private menu!: any\n\n private original: any\n\n render() {\n const board = this.board || { name: '', description: '', playGroups: [] }\n const boardGroupList = this.boardGroupList || []\n const memberOf = new Set((board.playGroups || []).map(group => group.id))\n const editable = !!this.enableModeller\n\n return html`\n ${this.renderWhat(board, boardGroupList)}\n\n <div body>\n <div class=\"fields\">\n <label>\n ${i18next.t('label.name')}\n <input\n type=\"text\"\n .value=${board.name || ''}\n @change=${e => (this.board = { ...this.board, name: e.target.value })}\n ?disabled=${!editable}\n />\n </label>\n\n <label>\n ${i18next.t('label.description')}\n <input\n type=\"text\"\n .value=${board.description || ''}\n @change=${e => (this.board = { ...this.board, description: e.target.value })}\n ?disabled=${!editable}\n />\n </label>\n\n <div class=\"row\">\n <label>\n ${i18next.t('label.board-type')}\n <ox-input-select-buttons\n .value=${board.type || 'main'}\n .options=${[\n { display: i18next.t('label.board-type-main'), value: 'main' },\n { display: i18next.t('label.board-type-sub'), value: 'sub' },\n { display: i18next.t('label.board-type-popup'), value: 'popup' }\n ]}\n @change=${(e: CustomEvent) => e.detail && (this.board = { ...this.board, type: e.detail })}\n ?disabled=${!editable}\n ></ox-input-select-buttons>\n </label>\n\n <label>\n ${i18next.t('label.group')}\n <select\n .value=${this.board?.groupId || ''}\n @change=${e => (this.board = { ...this.board, groupId: e.target.value })}\n ?disabled=${!editable}\n >\n <option value=\"\"></option>\n ${boardGroupList.map(\n item => html`<option value=${item.id} ?selected=${item.id == this.board?.groupId}>${item.name}</option>`\n )}\n </select>\n </label>\n </div>\n </div>\n\n ${this.duplicating ? this.renderDuplicate(board) : nothing}\n\n <div class=\"section\">${i18next.t('text.plays in', { defaultValue: 'Plays in' })}</div>\n <div class=\"note\">\n ${i18next.t('text.play-group membership applies at once', {\n defaultValue: 'Tap a play group to add or remove this board. This applies right away.'\n })}\n </div>\n <md-chip-set class=\"chips\">\n ${(this.playGroupList || []).map(\n item => html`\n <md-filter-chip\n label=${item.name}\n ?selected=${memberOf.has(item.id)}\n @click=${e => {\n e.target.selected ? this.joinPlayGroup(item) : this.leavePlayGroup(item)\n }}\n ></md-filter-chip>\n `\n )}\n </md-chip-set>\n </div>\n\n <div footer>\n <div class=\"buttons\">\n <span more>\n <md-icon-button id=\"more-anchor\" ?disabled=${!editable} @click=${() => (this.menu.open = !this.menu.open)}>\n <md-icon>more_vert</md-icon>\n </md-icon-button>\n <md-menu anchor=\"more-anchor\" positioning=\"popover\" anchor-corner=\"start-start\" menu-corner=\"end-start\">\n <md-menu-item @click=${() => (this.duplicating = true)}>\n <md-icon slot=\"start\">content_copy</md-icon>\n <div slot=\"headline\">${i18next.t('button.duplicate', { defaultValue: 'Duplicate…' })}</div>\n </md-menu-item>\n <md-menu-item @click=${this.exportBoard.bind(this)}>\n <md-icon slot=\"start\">download</md-icon>\n <div slot=\"headline\">${i18next.t('button.export-json', { defaultValue: 'Export as JSON' })}</div>\n </md-menu-item>\n <md-menu-item cap ?disabled=${!this.isReleasable} @click=${this.releaseBoard.bind(this)}>\n <md-icon slot=\"start\">new_releases</md-icon>\n <div slot=\"headline\">${i18next.t('button.release')}</div>\n ${this.isReleasable || board.state === 'released'\n ? nothing\n : html`<div slot=\"supporting-text\">\n ${i18next.t('text.save before release', { defaultValue: 'Save your changes first' })}\n </div>`}\n </md-menu-item>\n <md-divider></md-divider>\n <md-menu-item cap danger @click=${this.deleteBoard.bind(this)}>\n <md-icon slot=\"start\">delete_outline</md-icon>\n <div slot=\"headline\">${i18next.t('button.delete')}</div>\n </md-menu-item>\n </md-menu>\n </span>\n <div filler></div>\n <md-outlined-button ?disabled=${!editable} @click=${() => navigate(`board-modeller/${this.boardId}`)}>\n <md-icon slot=\"icon\">design_services</md-icon>${i18next.t('button.open-modeller', {\n defaultValue: 'Open in modeller'\n })}\n </md-outlined-button>\n <md-filled-button cap ?disabled=${!editable || !this.isDirty} @click=${this.updateBoard.bind(this)}>\n <md-icon slot=\"icon\">save</md-icon>${i18next.t('button.save')}\n </md-filled-button>\n </div>\n </div>\n `\n }\n\n private renderWhat(board: any, boardGroupList: any[]) {\n if (!this.board) {\n return nothing\n }\n\n const released = board.state === 'released'\n const group = boardGroupList.find(item => item.id == this.original?.groupId)\n const updater = board.updater?.name || board.creator?.name || ''\n const ago = timeAgo(board.updatedAt || board.createdAt)\n\n return html`\n <div class=\"what\">\n <span pill ?released=${released}>\n ${released\n ? i18next.t('label.released', { defaultValue: 'released' })\n : i18next.t('label.draft', { defaultValue: 'draft' })}\n </span>\n <span>v${board.version ?? 0}</span>\n ${group ? html`<span dot><b>${group.name}</b></span>` : nothing}\n ${updater\n ? html`<span dot>${i18next.t('text.updated by', { defaultValue: 'updated by' })} <b>${updater}</b> ${ago}</span>`\n : ago\n ? html`<span dot>${i18next.t('text.updated', { defaultValue: 'updated' })} ${ago}</span>`\n : nothing}\n </div>\n `\n }\n\n private renderDuplicate(board: any) {\n const sameAsSource =\n this.original?.name == board.name && this._appCtrl.domain?.subdomain == this.targetSubdomain\n\n return html`\n <div duplicate>\n <div class=\"section\">${i18next.t('text.duplicate', { defaultValue: 'Duplicate' })}</div>\n <div class=\"note\">\n ${i18next.t('text.duplicate hint', {\n defaultValue: 'Copies this board into a domain and group. Give it a new name when copying within this domain.'\n })}\n </div>\n <div class=\"fields\">\n <div class=\"row\">\n <label>\n ${i18next.t('label.domain')}\n <select\n @change=${e => {\n this.targetSubdomain = e.target.value\n this.getGroupsByDomain(this.targetSubdomain)\n }}\n .value=${this.targetSubdomain || ''}\n >\n <option value=\"\"></option>\n ${this.targetDomains.map(\n domain =>\n html`<option value=${domain.subdomain} ?selected=${domain.subdomain == this.targetSubdomain}>\n ${domain.name}\n </option>`\n )}\n </select>\n </label>\n <label>\n ${i18next.t('label.group')}\n <select @change=${e => (this.targetGroupId = e.target.value)} .value=${this.targetGroupId || ''}>\n <option value=\"\"></option>\n ${this.targetGroups.map(\n group => html`<option value=${group.id} ?selected=${group.id == this.targetGroupId}>${group.name}</option>`\n )}\n </select>\n </label>\n </div>\n </div>\n <div class=\"buttons\">\n <div filler></div>\n <md-text-button cap @click=${() => (this.duplicating = false)}>${i18next.t('button.cancel')}</md-text-button>\n <md-filled-button\n cap\n ?disabled=${!this.original?.name || !board.name || !this.targetSubdomain || sameAsSource}\n @click=${this.cloneBoard.bind(this)}\n >\n <md-icon slot=\"icon\">content_copy</md-icon>${i18next.t('button.copy')}\n </md-filled-button>\n </div>\n </div>\n `\n }\n\n async firstUpdated() {\n this.targetSubdomain = this.targetSubdomain ?? this._appCtrl.domain?.subdomain\n this.enableModeller = await hasPrivilege({ privilege: 'mutation', category: 'board' })\n\n this.refresh()\n }\n\n async refresh() {\n const response = (\n await client.query({\n query: gql`\n query FetchBoardById($id: String!) {\n board(id: $id) {\n id\n name\n description\n model\n group {\n id\n name\n }\n playGroups {\n id\n name\n }\n thumbnail\n createdAt\n creator {\n id\n name\n }\n type\n state\n version\n updatedAt\n updater {\n id\n name\n }\n }\n\n groups {\n items {\n id\n name\n description\n }\n }\n\n playGroups {\n items {\n id\n name\n description\n }\n total\n }\n\n domainsWithPrivilege(privilege: \"mutation\", category: \"board\") {\n name\n subdomain\n }\n }\n `,\n variables: { id: this.boardId }\n })\n ).data\n\n const board = response.board\n this.groupId = board.group?.id\n\n this.board = { ...board, groupId: this.groupId }\n this.original = { ...this.board }\n\n this.boardGroupList = response.groups.items\n this.playGroupList = response.playGroups.items\n\n this.targetDomains = response.domainsWithPrivilege\n this.targetGroups = response.groups.items\n this.targetGroupId = this.groupId\n }\n\n async getGroupsByDomain(subdomain?: string) {\n this.targetGroups = []\n this.targetGroupId = ''\n\n if (!subdomain) {\n return\n }\n\n const response2 = (\n await client.query({\n query: gql`\n query {\n groups {\n items {\n id\n name\n description\n }\n }\n }\n `,\n variables: { id: this.boardId },\n context: {\n headers: {\n 'x-things-factory-domain': subdomain\n }\n }\n })\n ).data\n\n this.targetGroups = response2.groups.items\n }\n\n /** Something in the form differs from what the server has. */\n get isDirty() {\n if (!this.board || !this.original) {\n return false\n }\n\n const { name, description, groupId, type } = this.board\n\n return (\n this.original.name != name ||\n (this.original.description || '') != (description || '') ||\n (this.original.groupId || '') != (groupId || '') ||\n this.original.type != type\n )\n }\n\n get isReleasable() {\n if (!this.board || this.board.state == 'released') {\n return false\n }\n\n return !this.isDirty\n }\n\n async cloneBoard() {\n if (!this.original.name || (this.board.name == this.original.name && this._appCtrl.domain?.subdomain == this.targetSubdomain)) {\n notify('error', i18next.t('error.name must be unique from the original board', { name: this.original.name }))\n return\n }\n\n const { id, name, description } = this.board\n\n this.dispatchEvent(\n new CustomEvent('clone-board', {\n detail: {\n id,\n name,\n description,\n targetSubdomain: this.targetSubdomain,\n targetGroupId: this.targetGroupId\n },\n bubbles: true,\n composed: true\n })\n )\n\n this.close()\n }\n\n async exportBoard() {\n const board = { ...this.board, model: JSON.parse(this.board.model) }\n\n const json = JSON.stringify(board, null, 2)\n const blob = new Blob([json], { type: 'application/json;charset=utf-8' })\n\n const blobUrl = URL.createObjectURL(blob)\n\n const link = document.createElement('a')\n link.href = blobUrl\n link.download = `${board.name}.json`\n\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n\n URL.revokeObjectURL(blobUrl)\n }\n\n async releaseBoard() {\n const { id } = this.board\n\n // 릴리즈 코멘트(선택) 입력 — OxPrompt.prompt(모달, native prompt 대체). 취소 시 릴리즈 중단.\n const comment = await OxPrompt.prompt({\n type: 'question',\n title: String(i18next.t('button.release')),\n text: String(i18next.t('text.release comment optional')),\n multiline: true,\n confirmButton: { text: String(i18next.t('button.release')) },\n cancelButton: { text: String(i18next.t('button.cancel')) }\n })\n if (comment === null) return\n\n this.dispatchEvent(\n new CustomEvent('release-board', {\n detail: {\n id,\n comment: comment.trim() || null\n },\n bubbles: true,\n composed: true\n })\n )\n }\n\n async updateBoard() {\n const { id, name, description, groupId, type } = this.board\n /* model 정보를 제외하고 업데이트 */\n\n this.dispatchEvent(\n new CustomEvent('update-board', {\n detail: { id, name, description, groupId, type },\n bubbles: true,\n composed: true\n })\n )\n\n /* The form is what the server now has; Save goes quiet until the next edit. */\n this.original = { ...this.board }\n this.requestUpdate()\n }\n\n async deleteBoard() {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n this.dispatchEvent(\n new CustomEvent('delete-board', {\n detail: this.board,\n bubbles: true,\n composed: true\n })\n )\n\n this.close()\n }\n }\n\n async joinPlayGroup(group) {\n this.dispatchEvent(\n new CustomEvent('join-playgroup', {\n detail: {\n board: this.board,\n playGroup: group\n },\n bubbles: true,\n composed: true\n })\n )\n }\n\n async leavePlayGroup(group) {\n this.dispatchEvent(\n new CustomEvent('leave-playgroup', {\n detail: {\n board: this.board,\n playGroup: group\n },\n bubbles: true,\n composed: true\n })\n )\n }\n\n close() {\n history.back()\n }\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@material/web/button/outlined-button.js';
|
|
2
4
|
import './link-builder.js';
|
|
3
|
-
import './board-template-builder.js';
|
|
4
5
|
export declare class BoardInfoLink extends LitElement {
|
|
5
6
|
static styles: import("lit").CSSResult[];
|
|
6
7
|
board?: {
|
|
@@ -8,5 +9,8 @@ export declare class BoardInfoLink extends LitElement {
|
|
|
8
9
|
name: string;
|
|
9
10
|
description: string;
|
|
10
11
|
};
|
|
12
|
+
private linkBuilder;
|
|
13
|
+
private copied;
|
|
11
14
|
render(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
private copyLink;
|
|
12
16
|
}
|
|
@@ -1,56 +1,114 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
+
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
4
|
+
import { i18next } from '@operato/i18n';
|
|
5
|
+
import { CommonPopupStyles } from '@operato/styles';
|
|
6
|
+
import { InfoFormStyles } from './info-dialog-styles.js';
|
|
7
|
+
import '@material/web/icon/icon.js';
|
|
8
|
+
import '@material/web/button/outlined-button.js';
|
|
4
9
|
import './link-builder.js';
|
|
5
|
-
import './board-template-builder.js';
|
|
6
10
|
let BoardInfoLink = class BoardInfoLink extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.copied = false;
|
|
14
|
+
}
|
|
7
15
|
static { this.styles = [
|
|
16
|
+
CommonPopupStyles,
|
|
17
|
+
InfoFormStyles,
|
|
8
18
|
css `
|
|
9
19
|
:host {
|
|
10
20
|
display: flex;
|
|
11
21
|
flex-direction: column;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
height: 100%;
|
|
23
|
+
min-height: 0;
|
|
24
|
+
padding: 0;
|
|
25
|
+
gap: 0;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
color: var(--md-sys-color-on-surface);
|
|
28
|
+
background: var(--info-dialog-surface, var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface)));
|
|
29
|
+
}
|
|
17
30
|
|
|
31
|
+
[body] {
|
|
32
|
+
flex: 1;
|
|
33
|
+
min-height: 0;
|
|
18
34
|
overflow-y: auto;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: var(--spacing-large, 16px);
|
|
38
|
+
padding: var(--spacing-large, 16px);
|
|
19
39
|
}
|
|
20
40
|
|
|
21
41
|
link-builder {
|
|
22
|
-
|
|
23
|
-
text-align: start;
|
|
42
|
+
padding: 0;
|
|
24
43
|
}
|
|
25
44
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
/* Same fixed footer as the basic tab: the two commits of this tab, always in reach. */
|
|
46
|
+
[footer] {
|
|
47
|
+
flex: none;
|
|
48
|
+
padding: var(--spacing-medium, 8px) var(--popup-padding);
|
|
49
|
+
border-top: 1px solid var(--md-sys-color-outline-variant);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[footer] .buttons {
|
|
53
|
+
border-top: 0;
|
|
54
|
+
padding-top: 0;
|
|
55
|
+
margin-top: 0;
|
|
56
|
+
align-items: center;
|
|
29
57
|
}
|
|
30
58
|
|
|
31
|
-
@media
|
|
32
|
-
|
|
33
|
-
|
|
59
|
+
@media (pointer: coarse) {
|
|
60
|
+
[footer] {
|
|
61
|
+
padding: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[footer] .buttons {
|
|
65
|
+
margin: 0;
|
|
66
|
+
border-top: 0;
|
|
34
67
|
}
|
|
35
68
|
}
|
|
36
69
|
`
|
|
37
70
|
]; }
|
|
38
71
|
render() {
|
|
39
72
|
return html `
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
73
|
+
<div body>
|
|
74
|
+
<link-builder
|
|
75
|
+
command="headless-full"
|
|
76
|
+
target-id=${this.board?.id || ''}
|
|
77
|
+
target-name=${this.board?.name || ''}
|
|
78
|
+
></link-builder>
|
|
45
79
|
|
|
46
|
-
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div footer>
|
|
83
|
+
<div class="buttons">
|
|
84
|
+
<md-outlined-button @click=${this.copyLink.bind(this)}>
|
|
85
|
+
<md-icon slot="icon">${this.copied ? 'check' : 'link'}</md-icon>
|
|
86
|
+
${this.copied
|
|
87
|
+
? i18next.t('text.link copied', { defaultValue: 'Link copied' })
|
|
88
|
+
: i18next.t('button.copy-link', { defaultValue: 'Copy headless link' })}
|
|
89
|
+
</md-outlined-button>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
47
92
|
`;
|
|
48
93
|
}
|
|
94
|
+
async copyLink() {
|
|
95
|
+
await this.linkBuilder?.copyLink();
|
|
96
|
+
this.copied = true;
|
|
97
|
+
setTimeout(() => (this.copied = false), 2000);
|
|
98
|
+
}
|
|
49
99
|
};
|
|
50
100
|
__decorate([
|
|
51
101
|
property({ type: Object }),
|
|
52
102
|
__metadata("design:type", Object)
|
|
53
103
|
], BoardInfoLink.prototype, "board", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
query('link-builder'),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], BoardInfoLink.prototype, "linkBuilder", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
state(),
|
|
110
|
+
__metadata("design:type", Object)
|
|
111
|
+
], BoardInfoLink.prototype, "copied", void 0);
|
|
54
112
|
BoardInfoLink = __decorate([
|
|
55
113
|
customElement('board-info-link')
|
|
56
114
|
], BoardInfoLink);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-info-link.js","sourceRoot":"","sources":["../../client/viewparts/board-info-link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"board-info-link.js","sourceRoot":"","sources":["../../client/viewparts/board-info-link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA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BAAiB,CAAC;GACpB,aAAa,CA6FzB","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { i18next } from '@operato/i18n'\nimport { CommonPopupStyles } from '@operato/styles'\nimport { InfoFormStyles } from './info-dialog-styles.js'\nimport '@material/web/icon/icon.js'\nimport '@material/web/button/outlined-button.js'\n\nimport './link-builder.js'\n\n@customElement('board-info-link')\nexport class BoardInfoLink extends LitElement {\n static styles = [\n CommonPopupStyles,\n InfoFormStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n padding: 0;\n gap: 0;\n box-sizing: border-box;\n color: var(--md-sys-color-on-surface);\n background: var(--info-dialog-surface, var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface)));\n }\n\n [body] {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-large, 16px);\n padding: var(--spacing-large, 16px);\n }\n\n link-builder {\n padding: 0;\n }\n\n /* Same fixed footer as the basic tab: the two commits of this tab, always in reach. */\n [footer] {\n flex: none;\n padding: var(--spacing-medium, 8px) var(--popup-padding);\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n [footer] .buttons {\n border-top: 0;\n padding-top: 0;\n margin-top: 0;\n align-items: center;\n }\n\n @media (pointer: coarse) {\n [footer] {\n padding: 0;\n }\n\n [footer] .buttons {\n margin: 0;\n border-top: 0;\n }\n }\n `\n ]\n\n @property({ type: Object }) board?: { id: string; name: string; description: string }\n\n @query('link-builder') private linkBuilder!: any\n\n @state() private copied = false\n\n render() {\n return html`\n <div body>\n <link-builder\n command=\"headless-full\"\n target-id=${this.board?.id || ''}\n target-name=${this.board?.name || ''}\n ></link-builder>\n\n </div>\n\n <div footer>\n <div class=\"buttons\">\n <md-outlined-button @click=${this.copyLink.bind(this)}>\n <md-icon slot=\"icon\">${this.copied ? 'check' : 'link'}</md-icon>\n ${this.copied\n ? i18next.t('text.link copied', { defaultValue: 'Link copied' })\n : i18next.t('button.copy-link', { defaultValue: 'Copy headless link' })}\n </md-outlined-button>\n </div>\n </div>\n `\n }\n\n private async copyLink() {\n await this.linkBuilder?.copyLink()\n this.copied = true\n setTimeout(() => (this.copied = false), 2000)\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@material/web/button/filled-button.js';
|
|
4
|
+
import '@material/web/button/outlined-button.js';
|
|
5
|
+
import './board-template-builder.js';
|
|
6
|
+
export declare class BoardInfoTemplate extends LitElement {
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
board?: {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
private templateBuilder;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { css, html, LitElement } from 'lit';
|
|
3
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
4
|
+
import { i18next } from '@operato/i18n';
|
|
5
|
+
import { CommonPopupStyles } from '@operato/styles';
|
|
6
|
+
import { InfoFormStyles } from './info-dialog-styles.js';
|
|
7
|
+
import '@material/web/icon/icon.js';
|
|
8
|
+
import '@material/web/button/filled-button.js';
|
|
9
|
+
import '@material/web/button/outlined-button.js';
|
|
10
|
+
import './board-template-builder.js';
|
|
11
|
+
let BoardInfoTemplate = class BoardInfoTemplate extends LitElement {
|
|
12
|
+
static { this.styles = [
|
|
13
|
+
CommonPopupStyles,
|
|
14
|
+
InfoFormStyles,
|
|
15
|
+
css `
|
|
16
|
+
:host {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
height: 100%;
|
|
20
|
+
min-height: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
gap: 0;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
color: var(--md-sys-color-on-surface);
|
|
25
|
+
background: var(--info-dialog-surface, var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface)));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[body] {
|
|
29
|
+
flex: 1;
|
|
30
|
+
min-height: 0;
|
|
31
|
+
overflow-y: auto;
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: var(--spacing-large, 16px);
|
|
35
|
+
padding: var(--spacing-large, 16px);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
board-template-builder {
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Same fixed footer as the basic tab: the two commits of this tab, always in reach. */
|
|
43
|
+
[footer] {
|
|
44
|
+
flex: none;
|
|
45
|
+
padding: var(--spacing-medium, 8px) var(--popup-padding);
|
|
46
|
+
border-top: 1px solid var(--md-sys-color-outline-variant);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[footer] .buttons {
|
|
50
|
+
border-top: 0;
|
|
51
|
+
padding-top: 0;
|
|
52
|
+
margin-top: 0;
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (pointer: coarse) {
|
|
57
|
+
[footer] {
|
|
58
|
+
padding: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[footer] .buttons {
|
|
62
|
+
margin: 0;
|
|
63
|
+
border-top: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`
|
|
67
|
+
]; }
|
|
68
|
+
render() {
|
|
69
|
+
return html `
|
|
70
|
+
<div body>
|
|
71
|
+
<board-template-builder .board=${this.board}></board-template-builder>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div footer>
|
|
75
|
+
<div class="buttons">
|
|
76
|
+
<div filler></div>
|
|
77
|
+
<md-filled-button cap @click=${() => this.templateBuilder?.registerBoardAsTemplate()}>
|
|
78
|
+
<md-icon slot="icon">bookmark_add</md-icon>${i18next.t('text.register-template')}
|
|
79
|
+
</md-filled-button>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Object }),
|
|
87
|
+
__metadata("design:type", Object)
|
|
88
|
+
], BoardInfoTemplate.prototype, "board", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
query('board-template-builder'),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], BoardInfoTemplate.prototype, "templateBuilder", void 0);
|
|
93
|
+
BoardInfoTemplate = __decorate([
|
|
94
|
+
customElement('board-info-template')
|
|
95
|
+
], BoardInfoTemplate);
|
|
96
|
+
export { BoardInfoTemplate };
|
|
97
|
+
//# sourceMappingURL=board-info-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-info-template.js","sourceRoot":"","sources":["../../client/viewparts/board-info-template.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,4BAA4B,CAAA;AACnC,OAAO,uCAAuC,CAAA;AAC9C,OAAO,yCAAyC,CAAA;AAEhD,OAAO,6BAA6B,CAAA;AAG7B,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;aACxC,WAAM,GAAG;QACd,iBAAiB;QACjB,cAAc;QACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmDF;KACF,AAvDY,CAuDZ;IAMD,MAAM;QACJ,OAAO,IAAI,CAAA;;yCAE0B,IAAI,CAAC,KAAK;;;;;;yCAMV,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,uBAAuB,EAAE;yDACrC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;;;;KAIvF,CAAA;IACH,CAAC;;AAnB2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAA0D;AAE5C;IAAxC,KAAK,CAAC,wBAAwB,CAAC;;0DAA8B;AA5DnD,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CA8E7B","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { i18next } from '@operato/i18n'\nimport { CommonPopupStyles } from '@operato/styles'\nimport { InfoFormStyles } from './info-dialog-styles.js'\nimport '@material/web/icon/icon.js'\nimport '@material/web/button/filled-button.js'\nimport '@material/web/button/outlined-button.js'\n\nimport './board-template-builder.js'\n\n@customElement('board-info-template')\nexport class BoardInfoTemplate extends LitElement {\n static styles = [\n CommonPopupStyles,\n InfoFormStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n height: 100%;\n min-height: 0;\n padding: 0;\n gap: 0;\n box-sizing: border-box;\n color: var(--md-sys-color-on-surface);\n background: var(--info-dialog-surface, var(--md-sys-color-surface-container-lowest, var(--md-sys-color-surface)));\n }\n\n [body] {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-large, 16px);\n padding: var(--spacing-large, 16px);\n }\n\n board-template-builder {\n padding: 0;\n }\n\n /* Same fixed footer as the basic tab: the two commits of this tab, always in reach. */\n [footer] {\n flex: none;\n padding: var(--spacing-medium, 8px) var(--popup-padding);\n border-top: 1px solid var(--md-sys-color-outline-variant);\n }\n\n [footer] .buttons {\n border-top: 0;\n padding-top: 0;\n margin-top: 0;\n align-items: center;\n }\n\n @media (pointer: coarse) {\n [footer] {\n padding: 0;\n }\n\n [footer] .buttons {\n margin: 0;\n border-top: 0;\n }\n }\n `\n ]\n\n @property({ type: Object }) board?: { id: string; name: string; description: string }\n\n @query('board-template-builder') private templateBuilder!: any\n\n render() {\n return html`\n <div body>\n <board-template-builder .board=${this.board}></board-template-builder>\n </div>\n\n <div footer>\n <div class=\"buttons\">\n <div filler></div>\n <md-filled-button cap @click=${() => this.templateBuilder?.registerBoardAsTemplate()}>\n <md-icon slot=\"icon\">bookmark_add</md-icon>${i18next.t('text.register-template')}\n </md-filled-button>\n </div>\n </div>\n `\n }\n}\n"]}
|
|
@@ -2,6 +2,11 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import './board-basic-info.js';
|
|
3
3
|
import './board-versions.js';
|
|
4
4
|
import './board-info-link.js';
|
|
5
|
+
import './board-info-template.js';
|
|
6
|
+
/**
|
|
7
|
+
* The board dialog: basic form, release history, the headless link, and save-as-template, as four tabs
|
|
8
|
+
* inside one popup card (the card's title bar carries the board's name).
|
|
9
|
+
*/
|
|
5
10
|
export declare class BoardInfo extends LitElement {
|
|
6
11
|
static styles: import("lit").CSSResult[];
|
|
7
12
|
board?: {
|
|
@@ -1,97 +1,48 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { html, LitElement } from 'lit';
|
|
3
3
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
+
import { i18next } from '@operato/i18n';
|
|
5
6
|
import { ScrollbarStyles } from '@operato/styles';
|
|
6
7
|
import './board-basic-info.js';
|
|
7
8
|
import './board-versions.js';
|
|
8
9
|
import './board-info-link.js';
|
|
10
|
+
import './board-info-template.js';
|
|
11
|
+
import { InfoDialogStyles } from './info-dialog-styles.js';
|
|
12
|
+
/**
|
|
13
|
+
* The board dialog: basic form, release history, the headless link, and save-as-template, as four tabs
|
|
14
|
+
* inside one popup card (the card's title bar carries the board's name).
|
|
15
|
+
*/
|
|
9
16
|
let BoardInfo = class BoardInfo extends LitElement {
|
|
10
17
|
constructor() {
|
|
11
18
|
super(...arguments);
|
|
12
19
|
this.tab = 'basic';
|
|
13
20
|
}
|
|
14
|
-
static { this.styles = [
|
|
15
|
-
ScrollbarStyles,
|
|
16
|
-
css `
|
|
17
|
-
:host {
|
|
18
|
-
height: 100%;
|
|
19
|
-
min-width: 360px;
|
|
20
|
-
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
position: relative;
|
|
24
|
-
background-color: var(--md-sys-color-surface);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/*
|
|
28
|
-
* 탭은 **채움이 아니라 밑줄**로 표시한다.
|
|
29
|
-
*
|
|
30
|
-
* 이전에는 비활성 탭에 secondary, 활성 탭에 primary 를 배경으로 깔았다. 둘 다 강조 역할이라
|
|
31
|
-
* 다크 스킴에서 밝은 색이 되어(primary rgb(188 135 91)) 패널 상단에 탄색 블록이 생겼다.
|
|
32
|
-
* 헤더바·레일과 같은 부류의 오용이다.
|
|
33
|
-
*
|
|
34
|
-
* 탭 줄은 표면(surface-container)에 두고, 브랜드는 밑줄과 굵기로만 드러낸다.
|
|
35
|
-
* 라벨에 primary 를 쓰지 않는 이유: 대비가 팔레트에 따라 무너진다
|
|
36
|
-
* (operato-board 라이트 3.77, operato-twin 다크 2.61 — 본문 기준 4.5 미달).
|
|
37
|
-
*/
|
|
38
|
-
[tab] {
|
|
39
|
-
width: 100%;
|
|
40
|
-
display: flex;
|
|
41
|
-
background-color: var(--md-sys-color-surface-container);
|
|
42
|
-
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
[tab] > * {
|
|
46
|
-
flex: 1;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
[content] {
|
|
50
|
-
flex: 1;
|
|
51
|
-
overflow-y: auto;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
board-versions {
|
|
55
|
-
height: 100%;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
span {
|
|
59
|
-
padding: 6px 4px 4px;
|
|
60
|
-
font: var(--group-bar-textbutton);
|
|
61
|
-
background-color: transparent;
|
|
62
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
63
|
-
border-bottom: 2px solid transparent;
|
|
64
|
-
cursor: pointer;
|
|
65
|
-
text-align: center;
|
|
66
|
-
text-transform: uppercase;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
span[active] {
|
|
70
|
-
color: var(--md-sys-color-on-surface);
|
|
71
|
-
font: var(--group-bar-textbutton-active);
|
|
72
|
-
border-bottom-color: var(--md-sys-color-primary);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@media screen and (max-width: 460px) {
|
|
76
|
-
:host {
|
|
77
|
-
width: 100vw;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
`
|
|
81
|
-
]; }
|
|
21
|
+
static { this.styles = [ScrollbarStyles, InfoDialogStyles]; }
|
|
82
22
|
render() {
|
|
83
23
|
return html `
|
|
84
24
|
<div tab>
|
|
85
|
-
<span @click=${() => (this.tab = 'basic')} ?active=${this.tab == 'basic'}>
|
|
86
|
-
|
|
87
|
-
|
|
25
|
+
<span @click=${() => (this.tab = 'basic')} ?active=${this.tab == 'basic'}>
|
|
26
|
+
${i18next.t('label.basic', { defaultValue: 'Basic' })}
|
|
27
|
+
</span>
|
|
28
|
+
<span @click=${() => (this.tab = 'versions')} ?active=${this.tab == 'versions'}>
|
|
29
|
+
${i18next.t('label.versions', { defaultValue: 'Versions' })}
|
|
30
|
+
</span>
|
|
31
|
+
<span @click=${() => (this.tab = 'link')} ?active=${this.tab == 'link'}>
|
|
32
|
+
${i18next.t('label.link', { defaultValue: 'Link' })}
|
|
33
|
+
</span>
|
|
34
|
+
<span @click=${() => (this.tab = 'template')} ?active=${this.tab == 'template'}>
|
|
35
|
+
${i18next.t('label.template', { defaultValue: 'Template' })}
|
|
36
|
+
</span>
|
|
88
37
|
</div>
|
|
89
38
|
<div content>
|
|
90
39
|
${this.tab == 'basic'
|
|
91
40
|
? html `<board-basic-info boardId=${ifDefined(this.board?.id)}></board-basic-info>`
|
|
92
41
|
: this.tab == 'versions'
|
|
93
42
|
? html `<board-versions boardId=${ifDefined(this.board?.id)}></board-versions>`
|
|
94
|
-
:
|
|
43
|
+
: this.tab == 'link'
|
|
44
|
+
? html `<board-info-link .board=${this.board}></board-info-link>`
|
|
45
|
+
: html `<board-info-template .board=${this.board}></board-info-template>`}
|
|
95
46
|
</div>
|
|
96
47
|
`;
|
|
97
48
|
}
|