@things-factory/board-ui 10.1.41 → 10.1.44
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 +6 -6
- package/translations/en.json +30 -0
- package/translations/ja.json +9 -0
- package/translations/ko.json +35 -5
- package/translations/ms.json +8 -1
- package/translations/zh.json +9 -0
|
@@ -1,195 +1,72 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import '@material/web/icon/icon.js';
|
|
3
|
-
import '@material/web/
|
|
4
|
-
import '@material/web/button/
|
|
5
|
-
import '
|
|
6
|
-
import { css, html, LitElement } from 'lit';
|
|
3
|
+
import '@material/web/button/filled-button.js';
|
|
4
|
+
import '@material/web/button/text-button.js';
|
|
5
|
+
import { html, LitElement } from 'lit';
|
|
7
6
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
8
7
|
import { i18next } from '@operato/i18n';
|
|
8
|
+
import { CommonPopupStyles } from '@operato/styles';
|
|
9
9
|
import { fetchGroup } from '../graphql/group.js';
|
|
10
|
+
import { InfoFormStyles } from './info-dialog-styles.js';
|
|
11
|
+
/**
|
|
12
|
+
* The group form: a name, a description, and one commit button. Who made it and when is a
|
|
13
|
+
* side note that only exists for a group that exists - a new group used to show two rows of
|
|
14
|
+
* "Invalid Date" here.
|
|
15
|
+
*/
|
|
10
16
|
let GroupInfo = class GroupInfo extends LitElement {
|
|
11
17
|
constructor() {
|
|
12
18
|
super(...arguments);
|
|
13
19
|
this.group = { name: '', description: '' };
|
|
14
20
|
}
|
|
15
|
-
static { this.styles = [
|
|
16
|
-
css `
|
|
17
|
-
:host {
|
|
18
|
-
display: block;
|
|
19
|
-
color: var(--md-sys-color-on-surface);
|
|
20
|
-
background-color: var(--md-sys-color-surface);
|
|
21
|
-
height: 100%;
|
|
22
|
-
min-width: 360px;
|
|
23
|
-
overflow: auto;
|
|
24
|
-
position: relative;
|
|
25
|
-
|
|
26
|
-
--form-grid-gap: 2px 0;
|
|
27
|
-
|
|
28
|
-
--input-field-padding: var(--spacing-medium);
|
|
29
|
-
--legend-padding: var(--spacing-medium) 0 var(--spacing-small) 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
form {
|
|
33
|
-
display: grid;
|
|
34
|
-
grid-template-columns: repeat(12, 1fr);
|
|
35
|
-
grid-gap: var(--form-grid-gap);
|
|
36
|
-
grid-auto-rows: minmax(24px, auto);
|
|
37
|
-
padding: var(--spacing-large);
|
|
38
|
-
align-items: center;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
md-filled-text-field {
|
|
42
|
-
grid-column: span 12;
|
|
43
|
-
padding: 10px 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
[buttons] {
|
|
47
|
-
grid-column: span 12;
|
|
48
|
-
padding: var(--spacing-medium) 0;
|
|
49
|
-
text-align: right;
|
|
50
|
-
|
|
51
|
-
display: flex;
|
|
52
|
-
gap: var(--spacing-small);
|
|
53
|
-
align-items: center;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
[buttons] * {
|
|
57
|
-
margin: 0 0 0 auto;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
[danger] {
|
|
61
|
-
float: left;
|
|
62
|
-
margin: 0;
|
|
63
|
-
--md-elevated-button-icon-color: var(--md-sys-color-on-error);
|
|
64
|
-
--md-elevated-button-label-text-color: var(--md-sys-color-on-error);
|
|
65
|
-
--md-elevated-button-container-color: var(--md-sys-color-error);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
fieldset {
|
|
69
|
-
display: contents;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
legend {
|
|
73
|
-
grid-column: span 12;
|
|
74
|
-
padding: var(--legend-padding);
|
|
75
|
-
font: var(--legend-font);
|
|
76
|
-
color: var(--md-sys-color-primary);
|
|
77
|
-
text-transform: capitalize;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
label {
|
|
81
|
-
grid-column: span 12;
|
|
82
|
-
text-transform: capitalize;
|
|
83
|
-
color: var(--md-sys-color-primary);
|
|
84
|
-
font: var(--label-font);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
span {
|
|
88
|
-
grid-column: span 12;
|
|
89
|
-
border-bottom: var(--border-dim-color);
|
|
90
|
-
margin-bottom: var(--spacing-medium);
|
|
91
|
-
padding-bottom: var(--spacing-small);
|
|
92
|
-
font: var(--input-field-font);
|
|
93
|
-
}
|
|
94
|
-
span md-icon {
|
|
95
|
-
font-variation-settings: 'FILL' 1;
|
|
96
|
-
|
|
97
|
-
vertical-align: middle;
|
|
98
|
-
font-size: var(--fontsize-large);
|
|
99
|
-
color: var(--md-sys-color-primary);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
input,
|
|
103
|
-
table,
|
|
104
|
-
select,
|
|
105
|
-
textarea,
|
|
106
|
-
[custom-input] {
|
|
107
|
-
grid-column: span 12;
|
|
108
|
-
|
|
109
|
-
border: var(--input-field-border);
|
|
110
|
-
border-radius: var(--input-field-border-radius);
|
|
111
|
-
margin-bottom: var(--spacing-medium);
|
|
112
|
-
padding: var(--input-field-padding);
|
|
113
|
-
font: var(--input-field-font);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
input[type='checkbox'],
|
|
117
|
-
input[type='radio'] {
|
|
118
|
-
place-self: center;
|
|
119
|
-
margin: 0;
|
|
120
|
-
grid-column: 1;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
input[type='checkbox'] + label,
|
|
124
|
-
input[type='radio'] + label {
|
|
125
|
-
text-align: left;
|
|
126
|
-
grid-column: span 11 / auto;
|
|
127
|
-
|
|
128
|
-
font: var(--form-sublabel-font);
|
|
129
|
-
color: var(--md-sys-color-secondary);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
input:focus {
|
|
133
|
-
outline: none;
|
|
134
|
-
border: 1px solid var(--focus-background-color);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
@media screen and (max-width: 460px) {
|
|
138
|
-
:host {
|
|
139
|
-
width: 100vw;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
`
|
|
143
|
-
]; }
|
|
21
|
+
static { this.styles = [CommonPopupStyles, InfoFormStyles]; }
|
|
144
22
|
render() {
|
|
145
23
|
const group = this.group || { name: '', description: '' };
|
|
146
24
|
return html `
|
|
147
|
-
<
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
></md-filled-text-field>
|
|
157
|
-
|
|
158
|
-
<md-filled-text-field
|
|
25
|
+
<div class="fields">
|
|
26
|
+
<label>
|
|
27
|
+
${i18next.t('label.name')}
|
|
28
|
+
<input type="text" .value=${group.name || ''} @change=${e => (this.group.name = e.target.value)} autofocus />
|
|
29
|
+
</label>
|
|
30
|
+
|
|
31
|
+
<label>
|
|
32
|
+
${i18next.t('label.description')}
|
|
33
|
+
<input
|
|
159
34
|
type="text"
|
|
160
|
-
|
|
161
|
-
.value=${group.description}
|
|
35
|
+
.value=${group.description || ''}
|
|
162
36
|
@change=${e => (this.group.description = e.target.value)}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
<span>
|
|
167
|
-
<md-icon>person</md-icon> ${group.creator && group.creator.name} <md-icon>schedule</md-icon> ${new Date(group.createdAt).toLocaleString()}
|
|
168
|
-
</span>
|
|
37
|
+
/>
|
|
38
|
+
</label>
|
|
39
|
+
</div>
|
|
169
40
|
|
|
170
|
-
|
|
171
|
-
<span>
|
|
172
|
-
<md-icon>person</md-icon> ${group.updater && group.updater.name} <md-icon>schedule</md-icon> ${new Date(group.updatedAt).toLocaleString()}
|
|
173
|
-
</span>
|
|
41
|
+
${this.groupId ? this.renderProvenance(group) : ''}
|
|
174
42
|
|
|
175
|
-
|
|
176
|
-
|
|
43
|
+
<div class="buttons">
|
|
44
|
+
${this.groupId
|
|
177
45
|
? html `
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
46
|
+
<md-text-button cap danger @click=${this.deleteGroup.bind(this)}>
|
|
47
|
+
<md-icon slot="icon">delete_outline</md-icon>${i18next.t('button.delete')}
|
|
48
|
+
</md-text-button>
|
|
49
|
+
<div filler></div>
|
|
50
|
+
<md-filled-button cap @click=${this.updateGroup.bind(this)}>
|
|
51
|
+
<md-icon slot="icon">save</md-icon>${i18next.t('button.save')}
|
|
52
|
+
</md-filled-button>
|
|
53
|
+
`
|
|
185
54
|
: html `
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
55
|
+
<div filler></div>
|
|
56
|
+
<md-filled-button cap @click=${this.createGroup.bind(this)}>
|
|
57
|
+
<md-icon slot="icon">create_new_folder</md-icon>${i18next.t('button.create')}
|
|
58
|
+
</md-filled-button>
|
|
59
|
+
`}
|
|
60
|
+
</div>
|
|
61
|
+
`;
|
|
62
|
+
}
|
|
63
|
+
renderProvenance(group) {
|
|
64
|
+
const when = (value) => (value ? new Date(value).toLocaleString() : '');
|
|
65
|
+
return html `
|
|
66
|
+
<div class="provenance">
|
|
67
|
+
<span>${i18next.t('label.creator')} <b>${group.creator?.name || '-'}</b> ${when(group.createdAt)}</span>
|
|
68
|
+
<span>${i18next.t('label.updater')} <b>${group.updater?.name || '-'}</b> ${when(group.updatedAt)}</span>
|
|
69
|
+
</div>
|
|
193
70
|
`;
|
|
194
71
|
}
|
|
195
72
|
updated(changes) {
|
|
@@ -200,12 +77,11 @@ let GroupInfo = class GroupInfo extends LitElement {
|
|
|
200
77
|
firstUpdated() {
|
|
201
78
|
setTimeout(() => {
|
|
202
79
|
;
|
|
203
|
-
this.renderRoot.querySelector('
|
|
80
|
+
this.renderRoot.querySelector('input')?.focus();
|
|
204
81
|
}, 100);
|
|
205
82
|
}
|
|
206
83
|
async refresh() {
|
|
207
84
|
if (!this.groupId) {
|
|
208
|
-
/* model이 없으므로, 기본 모델을 제공함. */
|
|
209
85
|
this.group = { name: '', description: '' };
|
|
210
86
|
}
|
|
211
87
|
else {
|
|
@@ -214,27 +90,15 @@ let GroupInfo = class GroupInfo extends LitElement {
|
|
|
214
90
|
}
|
|
215
91
|
}
|
|
216
92
|
async createGroup() {
|
|
217
|
-
this.dispatchEvent(new CustomEvent('create-group', {
|
|
218
|
-
detail: this.group,
|
|
219
|
-
bubbles: true,
|
|
220
|
-
composed: true
|
|
221
|
-
}));
|
|
93
|
+
this.dispatchEvent(new CustomEvent('create-group', { detail: this.group, bubbles: true, composed: true }));
|
|
222
94
|
this.close();
|
|
223
95
|
}
|
|
224
96
|
async updateGroup() {
|
|
225
|
-
this.dispatchEvent(new CustomEvent('update-group', {
|
|
226
|
-
detail: this.group,
|
|
227
|
-
bubbles: true,
|
|
228
|
-
composed: true
|
|
229
|
-
}));
|
|
97
|
+
this.dispatchEvent(new CustomEvent('update-group', { detail: this.group, bubbles: true, composed: true }));
|
|
230
98
|
this.close();
|
|
231
99
|
}
|
|
232
100
|
async deleteGroup() {
|
|
233
|
-
this.dispatchEvent(new CustomEvent('delete-group', {
|
|
234
|
-
detail: this.group,
|
|
235
|
-
bubbles: true,
|
|
236
|
-
composed: true
|
|
237
|
-
}));
|
|
101
|
+
this.dispatchEvent(new CustomEvent('delete-group', { detail: this.group, bubbles: true, composed: true }));
|
|
238
102
|
this.close();
|
|
239
103
|
}
|
|
240
104
|
close() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-info-basic.js","sourceRoot":"","sources":["../../client/viewparts/group-info-basic.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,8CAA8C,CAAA;AACrD,OAAO,yCAAyC,CAAA;AAChD,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ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K,GAAG,QAAQ,CAAC,KAAK,CAAA;QAC7B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,cAAc,EAAE;YAC9B,MAAM,EAAE,IAAI,CAAC,KAAK;YAClB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAA;QAED,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,cAAc,EAAE;YAC9B,MAAM,EAAE,IAAI,CAAC,KAAK;YAClB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAA;QAED,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,cAAc,EAAE;YAC9B,MAAM,EAAE,IAAI,CAAC,KAAK;YAClB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAA;QAED,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;IAED,KAAK;QACH,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;;AAzH2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CAAiB;AAEnC;IAAR,KAAK,EAAE;;wCAA2C;AArIxC,SAAS;IADrB,aAAa,CAAC,kBAAkB,CAAC;GACrB,SAAS,CA6PrB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/textfield/filled-text-field.js'\nimport '@material/web/button/elevated-button.js'\nimport '@operato/input/ox-input-file.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\n\nimport { fetchGroup } from '../graphql/group.js'\n\n@customElement('group-info-basic')\nexport class GroupInfo extends LitElement {\n static styles = [\n css`\n :host {\n display: block;\n color: var(--md-sys-color-on-surface);\n background-color: var(--md-sys-color-surface);\n height: 100%;\n min-width: 360px;\n overflow: auto;\n position: relative;\n\n --form-grid-gap: 2px 0;\n\n --input-field-padding: var(--spacing-medium);\n --legend-padding: var(--spacing-medium) 0 var(--spacing-small) 0;\n }\n\n form {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n grid-gap: var(--form-grid-gap);\n grid-auto-rows: minmax(24px, auto);\n padding: var(--spacing-large);\n align-items: center;\n }\n\n md-filled-text-field {\n grid-column: span 12;\n padding: 10px 0;\n }\n\n [buttons] {\n grid-column: span 12;\n padding: var(--spacing-medium) 0;\n text-align: right;\n\n display: flex;\n gap: var(--spacing-small);\n align-items: center;\n }\n\n [buttons] * {\n margin: 0 0 0 auto;\n }\n\n [danger] {\n float: left;\n margin: 0;\n --md-elevated-button-icon-color: var(--md-sys-color-on-error);\n --md-elevated-button-label-text-color: var(--md-sys-color-on-error);\n --md-elevated-button-container-color: var(--md-sys-color-error);\n }\n\n fieldset {\n display: contents;\n }\n\n legend {\n grid-column: span 12;\n padding: var(--legend-padding);\n font: var(--legend-font);\n color: var(--md-sys-color-primary);\n text-transform: capitalize;\n }\n\n label {\n grid-column: span 12;\n text-transform: capitalize;\n color: var(--md-sys-color-primary);\n font: var(--label-font);\n }\n\n span {\n grid-column: span 12;\n border-bottom: var(--border-dim-color);\n margin-bottom: var(--spacing-medium);\n padding-bottom: var(--spacing-small);\n font: var(--input-field-font);\n }\n span md-icon {\n font-variation-settings: 'FILL' 1;\n\n vertical-align: middle;\n font-size: var(--fontsize-large);\n color: var(--md-sys-color-primary);\n }\n\n input,\n table,\n select,\n textarea,\n [custom-input] {\n grid-column: span 12;\n\n border: var(--input-field-border);\n border-radius: var(--input-field-border-radius);\n margin-bottom: var(--spacing-medium);\n padding: var(--input-field-padding);\n font: var(--input-field-font);\n }\n\n input[type='checkbox'],\n input[type='radio'] {\n place-self: center;\n margin: 0;\n grid-column: 1;\n }\n\n input[type='checkbox'] + label,\n input[type='radio'] + label {\n text-align: left;\n grid-column: span 11 / auto;\n\n font: var(--form-sublabel-font);\n color: var(--md-sys-color-secondary);\n }\n\n input:focus {\n outline: none;\n border: 1px solid var(--focus-background-color);\n }\n\n @media screen and (max-width: 460px) {\n :host {\n width: 100vw;\n }\n }\n `\n ]\n\n @property({ type: String }) groupId?: string\n\n @state() group: any = { name: '', description: '' }\n\n render() {\n const group = this.group || { name: '', description: '' }\n\n return html`\n <form>\n <fieldset>\n <legend>group information</legend>\n\n <md-filled-text-field\n type=\"text\"\n label=${String(i18next.t('label.name'))}\n .value=${group.name}\n @change=${e => (this.group.name = e.target.value)}\n ></md-filled-text-field>\n\n <md-filled-text-field\n type=\"text\"\n label=${String(i18next.t('label.description'))}\n .value=${group.description}\n @change=${e => (this.group.description = e.target.value)}\n ></md-filled-text-field>\n\n <label>${i18next.t('label.creator')}</label>\n <span>\n <md-icon>person</md-icon> ${group.creator && group.creator.name} <md-icon>schedule</md-icon> ${new Date(\n group.createdAt\n ).toLocaleString()}\n </span>\n\n <label>${i18next.t('label.updater')}</label>\n <span>\n <md-icon>person</md-icon> ${group.updater && group.updater.name} <md-icon>schedule</md-icon> ${new Date(\n group.updatedAt\n ).toLocaleString()}\n </span>\n\n <div buttons>\n ${this.groupId\n ? html`\n <md-elevated-button danger @click=${this.deleteGroup.bind(this)}\n ><md-icon slot=\"icon\">delete_outline</md-icon>${i18next.t('button.delete')}</md-elevated-button\n >\n <md-elevated-button @click=${this.updateGroup.bind(this)}\n ><md-icon slot=\"icon\">save</md-icon>${i18next.t('button.save')}</md-elevated-button\n >\n `\n : html`\n <md-elevated-button @click=${this.createGroup.bind(this)}\n ><md-icon slot=\"icon\">create_new_folder</md-icon>${i18next.t('button.create')}</md-elevated-button\n >\n `}\n </div>\n </fieldset>\n </form>\n `\n }\n\n updated(changes) {\n if (changes.has('groupId')) {\n this.refresh()\n }\n }\n\n firstUpdated() {\n setTimeout(() => {\n ;(this.renderRoot.querySelector('[type=text]') as any).focus()\n }, 100)\n }\n\n async refresh() {\n if (!this.groupId) {\n /* model이 없으므로, 기본 모델을 제공함. */\n this.group = { name: '', description: '' }\n } else {\n const response = await fetchGroup(this.groupId)\n this.group = response.group\n }\n }\n\n async createGroup() {\n this.dispatchEvent(\n new CustomEvent('create-group', {\n detail: this.group,\n bubbles: true,\n composed: true\n })\n )\n\n this.close()\n }\n\n async updateGroup() {\n this.dispatchEvent(\n new CustomEvent('update-group', {\n detail: this.group,\n bubbles: true,\n composed: true\n })\n )\n\n this.close()\n }\n\n async deleteGroup() {\n this.dispatchEvent(\n new CustomEvent('delete-group', {\n detail: this.group,\n bubbles: true,\n composed: true\n })\n )\n\n this.close()\n }\n\n close() {\n history.back()\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"group-info-basic.js","sourceRoot":"","sources":["../../client/viewparts/group-info-basic.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,uCAAuC,CAAA;AAC9C,OAAO,qCAAqC,CAAA;AAE5C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD;;;;GAIG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAKI,UAAK,GAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAA;IA+FrD,CAAC;aAnGQ,WAAM,GAAG,CAAC,iBAAiB,EAAE,cAAc,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IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;QAC1G,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;QAC1G,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;IAED,KAAK;QACH,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;;AAhG2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CAAiB;AAEnC;IAAR,KAAK,EAAE;;wCAA2C;AALxC,SAAS;IADrB,aAAa,CAAC,kBAAkB,CAAC;GACrB,SAAS,CAoGrB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/filled-button.js'\nimport '@material/web/button/text-button.js'\n\nimport { html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { CommonPopupStyles } from '@operato/styles'\n\nimport { fetchGroup } from '../graphql/group.js'\nimport { InfoFormStyles } from './info-dialog-styles.js'\n\n/**\n * The group form: a name, a description, and one commit button. Who made it and when is a\n * side note that only exists for a group that exists - a new group used to show two rows of\n * \"Invalid Date\" here.\n */\n@customElement('group-info-basic')\nexport class GroupInfo extends LitElement {\n static styles = [CommonPopupStyles, InfoFormStyles]\n\n @property({ type: String }) groupId?: string\n\n @state() group: any = { name: '', description: '' }\n\n render() {\n const group = this.group || { name: '', description: '' }\n\n return html`\n <div class=\"fields\">\n <label>\n ${i18next.t('label.name')}\n <input type=\"text\" .value=${group.name || ''} @change=${e => (this.group.name = e.target.value)} autofocus />\n </label>\n\n <label>\n ${i18next.t('label.description')}\n <input\n type=\"text\"\n .value=${group.description || ''}\n @change=${e => (this.group.description = e.target.value)}\n />\n </label>\n </div>\n\n ${this.groupId ? this.renderProvenance(group) : ''}\n\n <div class=\"buttons\">\n ${this.groupId\n ? html`\n <md-text-button cap danger @click=${this.deleteGroup.bind(this)}>\n <md-icon slot=\"icon\">delete_outline</md-icon>${i18next.t('button.delete')}\n </md-text-button>\n <div filler></div>\n <md-filled-button cap @click=${this.updateGroup.bind(this)}>\n <md-icon slot=\"icon\">save</md-icon>${i18next.t('button.save')}\n </md-filled-button>\n `\n : html`\n <div filler></div>\n <md-filled-button cap @click=${this.createGroup.bind(this)}>\n <md-icon slot=\"icon\">create_new_folder</md-icon>${i18next.t('button.create')}\n </md-filled-button>\n `}\n </div>\n `\n }\n\n private renderProvenance(group: any) {\n const when = (value?: string) => (value ? new Date(value).toLocaleString() : '')\n\n return html`\n <div class=\"provenance\">\n <span>${i18next.t('label.creator')} <b>${group.creator?.name || '-'}</b> ${when(group.createdAt)}</span>\n <span>${i18next.t('label.updater')} <b>${group.updater?.name || '-'}</b> ${when(group.updatedAt)}</span>\n </div>\n `\n }\n\n updated(changes) {\n if (changes.has('groupId')) {\n this.refresh()\n }\n }\n\n firstUpdated() {\n setTimeout(() => {\n ;(this.renderRoot.querySelector('input') as any)?.focus()\n }, 100)\n }\n\n async refresh() {\n if (!this.groupId) {\n this.group = { name: '', description: '' }\n } else {\n const response = await fetchGroup(this.groupId)\n this.group = response.group\n }\n }\n\n async createGroup() {\n this.dispatchEvent(new CustomEvent('create-group', { detail: this.group, bubbles: true, composed: true }))\n this.close()\n }\n\n async updateGroup() {\n this.dispatchEvent(new CustomEvent('update-group', { detail: this.group, bubbles: true, composed: true }))\n this.close()\n }\n\n async deleteGroup() {\n this.dispatchEvent(new CustomEvent('delete-group', { detail: this.group, bubbles: true, composed: true }))\n this.close()\n }\n\n close() {\n history.back()\n }\n}\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import '@material/web/icon/icon.js';
|
|
2
|
-
import '@material/web/button/
|
|
2
|
+
import '@material/web/button/filled-button.js';
|
|
3
|
+
import '@material/web/checkbox/checkbox.js';
|
|
3
4
|
import '@operato/input/ox-input-file.js';
|
|
4
5
|
import { LitElement } from 'lit';
|
|
6
|
+
/** Import exported boards into this group: a drop zone, an overwrite switch, one button. */
|
|
5
7
|
export declare class GroupInfoImport extends LitElement {
|
|
6
8
|
static styles: import("lit").CSSResult[];
|
|
7
9
|
groupId?: string;
|
|
@@ -1,83 +1,51 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import '@material/web/icon/icon.js';
|
|
3
|
-
import '@material/web/button/
|
|
3
|
+
import '@material/web/button/filled-button.js';
|
|
4
|
+
import '@material/web/checkbox/checkbox.js';
|
|
4
5
|
import '@operato/input/ox-input-file.js';
|
|
5
6
|
import { css, html, LitElement } from 'lit';
|
|
6
7
|
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
7
8
|
import { i18next } from '@operato/i18n';
|
|
9
|
+
import { CommonPopupStyles } from '@operato/styles';
|
|
8
10
|
import { fetchGroup } from '../graphql/index.js';
|
|
11
|
+
import { InfoFormStyles } from './info-dialog-styles.js';
|
|
12
|
+
/** Import exported boards into this group: a drop zone, an overwrite switch, one button. */
|
|
9
13
|
let GroupInfoImport = class GroupInfoImport extends LitElement {
|
|
10
14
|
static { this.styles = [
|
|
15
|
+
CommonPopupStyles,
|
|
16
|
+
InfoFormStyles,
|
|
11
17
|
css `
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color: var(--md-sys-color-on-surface);
|
|
15
|
-
background-color: var(--md-sys-color-surface);
|
|
16
|
-
height: 100%;
|
|
17
|
-
min-width: 360px;
|
|
18
|
-
overflow: auto;
|
|
19
|
-
position: relative;
|
|
20
|
-
|
|
21
|
-
--form-grid-gap: 2px 0;
|
|
22
|
-
--input-field-padding: var(--spacing-medium);
|
|
23
|
-
--legend-padding: var(--spacing-medium) 0 var(--spacing-small) 0;
|
|
18
|
+
ox-input-file {
|
|
19
|
+
min-height: 120px;
|
|
24
20
|
}
|
|
25
21
|
|
|
26
|
-
[
|
|
27
|
-
grid-column: span 12;
|
|
28
|
-
padding: var(--spacing-medium) 0;
|
|
29
|
-
text-align: right;
|
|
30
|
-
|
|
22
|
+
label[overwrite] {
|
|
31
23
|
display: flex;
|
|
32
|
-
gap: var(--spacing-small);
|
|
33
24
|
align-items: center;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
input[type='checkbox'] + label,
|
|
41
|
-
input[type='radio'] + label {
|
|
42
|
-
text-align: left;
|
|
43
|
-
grid-column: span 11 / auto;
|
|
44
|
-
|
|
45
|
-
font: var(--form-sublabel-font);
|
|
46
|
-
color: var(--form-sublabel-color, var(--md-sys-color-secondary));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
div[import] {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
gap: 4px;
|
|
53
|
-
padding: var(--spacing-large);
|
|
54
|
-
align-items: stretch;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@media screen and (max-width: 460px) {
|
|
58
|
-
:host {
|
|
59
|
-
width: 100vw;
|
|
60
|
-
}
|
|
25
|
+
gap: var(--spacing-small, 4px);
|
|
26
|
+
font-size: var(--popup-font-size-small);
|
|
27
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
28
|
+
cursor: pointer;
|
|
61
29
|
}
|
|
62
30
|
`
|
|
63
31
|
]; }
|
|
64
32
|
render() {
|
|
65
|
-
|
|
33
|
+
if (!this.groupId) {
|
|
34
|
+
return html ``;
|
|
35
|
+
}
|
|
66
36
|
return html `
|
|
67
|
-
|
|
68
|
-
? html `
|
|
69
|
-
<div import>
|
|
70
|
-
<ox-input-file accept="*/*" multiple="true"></ox-input-file>
|
|
37
|
+
<ox-input-file accept="*/*" multiple="true"></ox-input-file>
|
|
71
38
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
39
|
+
<div class="buttons">
|
|
40
|
+
<label overwrite>
|
|
41
|
+
<md-checkbox touch-target="wrapper" checked></md-checkbox>
|
|
42
|
+
${i18next.t('label.overwrite', { defaultValue: 'overwrite' })}
|
|
43
|
+
</label>
|
|
44
|
+
<div filler></div>
|
|
45
|
+
<md-filled-button cap @click=${this.importBoard.bind(this)}>
|
|
46
|
+
<md-icon slot="icon">publish</md-icon>${i18next.t('button.import-board')}
|
|
47
|
+
</md-filled-button>
|
|
48
|
+
</div>
|
|
81
49
|
`;
|
|
82
50
|
}
|
|
83
51
|
updated(changes) {
|
|
@@ -87,7 +55,6 @@ let GroupInfoImport = class GroupInfoImport extends LitElement {
|
|
|
87
55
|
}
|
|
88
56
|
async refresh() {
|
|
89
57
|
if (!this.groupId) {
|
|
90
|
-
/* model이 없으므로, 기본 모델을 제공함. */
|
|
91
58
|
this.group = { name: '', description: '' };
|
|
92
59
|
}
|
|
93
60
|
else {
|
|
@@ -124,7 +91,7 @@ __decorate([
|
|
|
124
91
|
__metadata("design:type", Object)
|
|
125
92
|
], GroupInfoImport.prototype, "fileUploader", void 0);
|
|
126
93
|
__decorate([
|
|
127
|
-
query('
|
|
94
|
+
query('md-checkbox'),
|
|
128
95
|
__metadata("design:type", Object)
|
|
129
96
|
], GroupInfoImport.prototype, "overwrite", void 0);
|
|
130
97
|
GroupInfoImport = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-info-import.js","sourceRoot":"","sources":["../../client/viewparts/group-info-import.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B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C;IAED,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,KAAK,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAA;QAC5C,CAAC;aAAM,CAAC;YACN,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAC/C,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAA;QAC7B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW;QACf,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK;gBAC9B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO;aAClC;SACF,CAAC,CACH,CAAA;QAED,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;IAED,KAAK;QACH,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;;AA7D2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAiB;AAEnC;IAAR,KAAK,EAAE;;8CAAW;AAEK;IAAvB,KAAK,CAAC,eAAe,CAAC;;qDAAkB;AACnB;IAArB,KAAK,CAAC,aAAa,CAAC;;kDAAe;AAzBzB,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAkF3B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/filled-button.js'\nimport '@material/web/checkbox/checkbox.js'\nimport '@operato/input/ox-input-file.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { CommonPopupStyles } from '@operato/styles'\n\nimport { fetchGroup } from '../graphql/index.js'\nimport { InfoFormStyles } from './info-dialog-styles.js'\n\n/** Import exported boards into this group: a drop zone, an overwrite switch, one button. */\n@customElement('group-info-import')\nexport class GroupInfoImport extends LitElement {\n static styles = [\n CommonPopupStyles,\n InfoFormStyles,\n css`\n ox-input-file {\n min-height: 120px;\n }\n\n label[overwrite] {\n display: flex;\n align-items: center;\n gap: var(--spacing-small, 4px);\n font-size: var(--popup-font-size-small);\n color: var(--md-sys-color-on-surface-variant);\n cursor: pointer;\n }\n `\n ]\n\n @property({ type: String }) groupId?: string\n\n @state() group: any\n\n @query('ox-input-file') fileUploader: any\n @query('md-checkbox') overwrite: any\n\n render() {\n if (!this.groupId) {\n return html``\n }\n\n return html`\n <ox-input-file accept=\"*/*\" multiple=\"true\"></ox-input-file>\n\n <div class=\"buttons\">\n <label overwrite>\n <md-checkbox touch-target=\"wrapper\" checked></md-checkbox>\n ${i18next.t('label.overwrite', { defaultValue: 'overwrite' })}\n </label>\n <div filler></div>\n <md-filled-button cap @click=${this.importBoard.bind(this)}>\n <md-icon slot=\"icon\">publish</md-icon>${i18next.t('button.import-board')}\n </md-filled-button>\n </div>\n `\n }\n\n updated(changes) {\n if (changes.has('groupId')) {\n this.refresh()\n }\n }\n\n async refresh() {\n if (!this.groupId) {\n this.group = { name: '', description: '' }\n } else {\n const response = await fetchGroup(this.groupId)\n this.group = response.group\n }\n }\n\n async importBoard() {\n this.dispatchEvent(\n new CustomEvent('import-boards', {\n bubbles: true,\n composed: true,\n detail: {\n group: this.group,\n files: this.fileUploader.files,\n overwrite: this.overwrite.checked\n }\n })\n )\n\n this.close()\n }\n\n close() {\n history.back()\n }\n}\n"]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import './group-info-basic.js';
|
|
3
3
|
import './group-info-import.js';
|
|
4
|
+
/**
|
|
5
|
+
* The group dialog. A new group is one short form and shows no tabs at all; an existing group
|
|
6
|
+
* adds the import tab, which only makes sense once there is a group to import into.
|
|
7
|
+
*/
|
|
4
8
|
export declare class GroupInfo extends LitElement {
|
|
5
9
|
static styles: import("lit").CSSResult[];
|
|
6
10
|
groupId?: string;
|
|
@@ -1,73 +1,39 @@
|
|
|
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 { privileged } from '@things-factory/auth-base/dist-client';
|
|
7
8
|
import './group-info-basic.js';
|
|
8
9
|
import './group-info-import.js';
|
|
10
|
+
import { InfoDialogStyles } from './info-dialog-styles.js';
|
|
11
|
+
/**
|
|
12
|
+
* The group dialog. A new group is one short form and shows no tabs at all; an existing group
|
|
13
|
+
* adds the import tab, which only makes sense once there is a group to import into.
|
|
14
|
+
*/
|
|
9
15
|
let GroupInfo = class GroupInfo extends LitElement {
|
|
10
16
|
constructor() {
|
|
11
17
|
super(...arguments);
|
|
12
18
|
this.tab = 'basic';
|
|
13
19
|
}
|
|
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
|
-
[tab] {
|
|
28
|
-
width: 100%;
|
|
29
|
-
display: flex;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
[tab] > * {
|
|
33
|
-
flex: 1;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
[content] {
|
|
37
|
-
flex: 1;
|
|
38
|
-
overflow-y: auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
span {
|
|
42
|
-
padding: 5px 4px 1px;
|
|
43
|
-
font: var(--group-bar-textbutton);
|
|
44
|
-
background-color: var(--md-sys-color-secondary);
|
|
45
|
-
color: rgba(255, 255, 255, 0.8);
|
|
46
|
-
text-align: center;
|
|
47
|
-
text-transform: uppercase;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
span[active] {
|
|
51
|
-
background-color: var(--md-sys-color-primary);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@media screen and (max-width: 460px) {
|
|
55
|
-
:host {
|
|
56
|
-
width: 100vw;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`
|
|
60
|
-
]; }
|
|
20
|
+
static { this.styles = [ScrollbarStyles, InfoDialogStyles]; }
|
|
61
21
|
render() {
|
|
62
22
|
return html `
|
|
63
|
-
${
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
23
|
+
${this.groupId
|
|
24
|
+
? privileged({ privilege: 'mutation', category: 'board' }, html `
|
|
25
|
+
<div tab>
|
|
26
|
+
<span @click=${() => (this.tab = 'basic')} ?active=${this.tab == 'basic'}>
|
|
27
|
+
${i18next.t('label.basic', { defaultValue: 'Basic' })}
|
|
28
|
+
</span>
|
|
29
|
+
<span @click=${() => (this.tab = 'import')} ?active=${this.tab == 'import'}>
|
|
30
|
+
${i18next.t('label.import', { defaultValue: 'Import' })}
|
|
31
|
+
</span>
|
|
32
|
+
</div>
|
|
33
|
+
`)
|
|
34
|
+
: ''}
|
|
69
35
|
<div content>
|
|
70
|
-
${this.tab == 'basic'
|
|
36
|
+
${this.tab == 'basic' || !this.groupId
|
|
71
37
|
? html `<group-info-basic groupId=${ifDefined(this.groupId)}></group-info-basic>`
|
|
72
38
|
: html `<group-info-import groupId=${ifDefined(this.groupId)}></group-info-import>`}
|
|
73
39
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group-info.js","sourceRoot":"","sources":["../../client/viewparts/group-info.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"group-info.js","sourceRoot":"","sources":["../../client/viewparts/group-info.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAA;AAElE,OAAO,uBAAuB,CAAA;AAC9B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE1D;;;GAGG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAKI,QAAG,GAAW,OAAO,CAAA;IA8BhC,CAAC;aAlCQ,WAAM,GAAG,CAAC,eAAe,EAAE,gBAAgB,CAAC,AAAtC,CAAsC;IAMnD,MAAM;QACJ,OAAO,IAAI,CAAA;QACP,IAAI,CAAC,OAAO;YACZ,CAAC,CAAC,UAAU,CACR,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,EAC5C,IAAI,CAAA;;+BAEe,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,YAAY,IAAI,CAAC,GAAG,IAAI,OAAO;oBACpE,OAAO,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;;+BAExC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,YAAY,IAAI,CAAC,GAAG,IAAI,QAAQ;oBACtE,OAAO,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;;;aAG5D,CACF;YACH,CAAC,CAAC,EAAE;;UAEF,IAAI,CAAC,GAAG,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO;YACpC,CAAC,CAAC,IAAI,CAAA,6BAA6B,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB;YAChF,CAAC,CAAC,IAAI,CAAA,8BAA8B,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB;;KAEvF,CAAA;IACH,CAAC;IAED,KAAK;QACH,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;;AA/B2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CAAiB;AAEnC;IAAR,KAAK,EAAE;;sCAAsB;AALnB,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAmCrB","sourcesContent":["import { html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { i18next } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { privileged } from '@things-factory/auth-base/dist-client'\n\nimport './group-info-basic.js'\nimport './group-info-import.js'\nimport { InfoDialogStyles } from './info-dialog-styles.js'\n\n/**\n * The group dialog. A new group is one short form and shows no tabs at all; an existing group\n * adds the import tab, which only makes sense once there is a group to import into.\n */\n@customElement('group-info')\nexport class GroupInfo extends LitElement {\n static styles = [ScrollbarStyles, InfoDialogStyles]\n\n @property({ type: String }) groupId?: string\n\n @state() tab: string = 'basic'\n\n render() {\n return html`\n ${this.groupId\n ? privileged(\n { privilege: 'mutation', category: 'board' },\n html`\n <div tab>\n <span @click=${() => (this.tab = 'basic')} ?active=${this.tab == 'basic'}>\n ${i18next.t('label.basic', { defaultValue: 'Basic' })}\n </span>\n <span @click=${() => (this.tab = 'import')} ?active=${this.tab == 'import'}>\n ${i18next.t('label.import', { defaultValue: 'Import' })}\n </span>\n </div>\n `\n )\n : ''}\n <div content>\n ${this.tab == 'basic' || !this.groupId\n ? html`<group-info-basic groupId=${ifDefined(this.groupId)}></group-info-basic>`\n : html`<group-info-import groupId=${ifDefined(this.groupId)}></group-info-import>`}\n </div>\n `\n }\n\n close() {\n history.back()\n }\n}\n"]}
|