@things-factory/board-ui 8.0.8 → 8.0.13
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.
|
@@ -4,6 +4,7 @@ import { css, html, LitElement, nothing } from 'lit';
|
|
|
4
4
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
5
5
|
import { ScrollbarStyles } from '@operato/styles';
|
|
6
6
|
import { i18next } from '@operato/i18n';
|
|
7
|
+
import { getPathInfo } from '@operato/utils';
|
|
7
8
|
import { OxPrompt } from '@operato/popup/ox-prompt.js';
|
|
8
9
|
let BoardTemplateBuilder = class BoardTemplateBuilder extends LitElement {
|
|
9
10
|
constructor() {
|
|
@@ -16,6 +17,7 @@ let BoardTemplateBuilder = class BoardTemplateBuilder extends LitElement {
|
|
|
16
17
|
var _a, _b;
|
|
17
18
|
const name = this.name || ((_a = this.board) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
18
19
|
const description = this.description || ((_b = this.board) === null || _b === void 0 ? void 0 : _b.description) || '';
|
|
20
|
+
const { domain } = getPathInfo(window.location.pathname);
|
|
19
21
|
return html `
|
|
20
22
|
<div template>
|
|
21
23
|
<h3>
|
|
@@ -40,9 +42,7 @@ let BoardTemplateBuilder = class BoardTemplateBuilder extends LitElement {
|
|
|
40
42
|
.value=${this.visibility}
|
|
41
43
|
>
|
|
42
44
|
<option value="private">${i18next.t('label.visibility-private')}</option>
|
|
43
|
-
${
|
|
44
|
-
? html ` <option value="domain">${i18next.t('label.visibility-domain')}</option> `
|
|
45
|
-
: nothing}
|
|
45
|
+
${domain ? html ` <option value="domain">${i18next.t('label.visibility-domain')}</option> ` : nothing}
|
|
46
46
|
<option value="public">${i18next.t('label.visibility-public')}</option>
|
|
47
47
|
</select>
|
|
48
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-template-builder.js","sourceRoot":"","sources":["../../client/viewparts/board-template-builder.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,C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AI,CAAC,KAAK,IAAI,EAAE,CAAA;YAE/B,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,mBAAmB,EAAE;gBACnC,MAAM,EAAE;oBACN,EAAE;oBACF,IAAI,EAAE,IAAI,CAAC,IAAI,KAAI,MAAA,IAAI,CAAC,KAAK,0CAAE,IAAI,CAAA;oBACnC,WAAW,EAAE,IAAI,CAAC,WAAW,KAAI,MAAA,IAAI,CAAC,KAAK,0CAAE,WAAW,CAAA;oBACxD,UAAU,EAAE,IAAI,CAAC,UAAU;iBAC5B;gBACD,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;aACf,CAAC,CACH,CAAA;QACH,CAAC;IACH,CAAC;;AAxHM,2BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+CF;CACF,AAlDY,CAkDZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDAA0D;AAE5E;IAAR,KAAK,EAAE;;wDAAgC;AAC/B;IAAR,KAAK,EAAE;;kDAAmB;AAClB;IAAR,KAAK,EAAE;;yDAA0B;AAzDvB,oBAAoB;IADhC,aAAa,CAAC,wBAAwB,CAAC;GAC3B,oBAAoB,CA0HhC","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin.js'\n\nimport { ScrollbarStyles } from '@operato/styles'\nimport { i18next } from '@operato/i18n'\nimport { getPathInfo } from '@operato/utils'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\n\n@customElement('board-template-builder')\nexport class BoardTemplateBuilder extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n padding: var(--spacing-large);\n\n /* for narrow mode */\n flex-direction: column;\n }\n\n div[template] {\n display: grid;\n position: relative;\n }\n\n label {\n font: var(--label-font);\n color: var(--label-color, var(--md-sys-color-on-surface));\n text-transform: capitalize;\n }\n\n input,\n select,\n textarea {\n border: var(--border-dim-color);\n border-radius: var(--border-radius);\n margin: var(--input-margin);\n padding: var(--input-padding);\n font: var(--input-font);\n flex: 1 1 0%;\n }\n\n textarea {\n min-height: 132px;\n resize: none;\n }\n\n select:focus,\n input:focus,\n textarea:focus,\n button {\n outline: none;\n }\n\n button:hover {\n border: var(--button-activ-border);\n box-shadow: var(--button-active-box-shadow);\n }\n `\n ]\n\n @property({ type: Object }) board?: { id: string; name: string; description: string }\n\n @state() visibility?: string = 'private'\n @state() name?: string = ''\n @state() description?: string = ''\n\n render() {\n const name = this.name || this.board?.name || ''\n const description = this.description || this.board?.description || ''\n const { domain } = getPathInfo(window.location.pathname)\n\n return html`\n <div template>\n <h3>\n <ox-title-with-help topic=\"board-service/board-template\" msgid=\"label.board-template\"\n >board template</ox-title-with-help\n >\n </h3>\n <label for=\"name\">${i18next.t('field.name')}</label>\n <input id=\"name\" type=\"text\" .value=${name} @change=${e => (this.name = e.target.value)} />\n\n <label for=\"description\">${i18next.t('field.description')}</label>\n <textarea\n id=\"description\"\n .value=${this.description}\n @change=${e => (this.description = e.target.value)}\n ></textarea>\n\n <label>${i18next.t('field.visibility')}</label>\n <select\n @change=${e => (this.visibility = e.target.value)}\n placeholder=\"choose visibility ...\"\n .value=${this.visibility}\n >\n <option value=\"private\">${i18next.t('label.visibility-private')}</option>\n ${domain ? html` <option value=\"domain\">${i18next.t('label.visibility-domain')}</option> ` : nothing}\n <option value=\"public\">${i18next.t('label.visibility-public')}</option>\n </select>\n\n <button @click=${this.registerBoardAsTemplate}>${i18next.t('text.register-template')}</button>\n </div>\n `\n }\n\n async registerBoardAsTemplate() {\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.register-template') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const { id } = this.board || {}\n\n this.dispatchEvent(\n new CustomEvent('register-template', {\n detail: {\n id,\n name: this.name || this.board?.name,\n description: this.description || this.board?.description,\n visibility: this.visibility\n },\n bubbles: true,\n composed: true\n })\n )\n }\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/board-ui",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.13",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@operato/shell": "^8.0.0",
|
|
42
42
|
"@operato/styles": "^8.0.0",
|
|
43
43
|
"@operato/utils": "^8.0.0",
|
|
44
|
-
"@things-factory/barcode-base": "^8.0.
|
|
45
|
-
"@things-factory/fav-base": "^8.0.
|
|
44
|
+
"@things-factory/barcode-base": "^8.0.13",
|
|
45
|
+
"@things-factory/fav-base": "^8.0.13",
|
|
46
46
|
"@things-factory/utils": "^8.0.8"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "66c1356c18b5c9a21e8280460eb40020f7ea2b37"
|
|
49
49
|
}
|