@operato/board 10.29.103 → 10.29.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@material/web/icon/icon.js';
|
|
2
2
|
import '@material/web/fab/fab.js';
|
|
3
3
|
import { LitElement, PropertyValues } from 'lit';
|
|
4
|
-
import { Component, LoadTracker, ReferenceProvider } from '@hatiolab/things-scene';
|
|
4
|
+
import { Component, DataSubscriptionProvider, LoadTracker, ReferenceProvider } from '@hatiolab/things-scene';
|
|
5
5
|
import './ox-playback-controls.js';
|
|
6
6
|
export declare class BoardViewer extends LitElement {
|
|
7
7
|
static styles: import("lit").CSSResult[];
|
|
@@ -13,6 +13,11 @@ export declare class BoardViewer extends LitElement {
|
|
|
13
13
|
history: boolean;
|
|
14
14
|
/** 앱에서 미리 생성한 LoadTracker. fetch 시작 전에 생성하면 네트워크 시간도 추적. */
|
|
15
15
|
loadTracker?: LoadTracker;
|
|
16
|
+
/**
|
|
17
|
+
* tag 컴포넌트가 데이터를 받는 곳. 지정하지 않으면 실시간 `data(tag)` 구독이다.
|
|
18
|
+
* 보드 모델로 장면을 만들 때 쓰인다 — 지정한 공급자로 연 장면은 실시간 데이터를 구독하지 않는다.
|
|
19
|
+
*/
|
|
20
|
+
dataSubscriptionProvider?: DataSubscriptionProvider;
|
|
16
21
|
hideFullscreen: boolean;
|
|
17
22
|
hideNavigation: boolean;
|
|
18
23
|
playbackEnabled: boolean;
|
|
@@ -202,6 +202,7 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
202
202
|
this.setupScene({ id: this.board.id, scene: this._scene });
|
|
203
203
|
}
|
|
204
204
|
async initScene() {
|
|
205
|
+
var _a;
|
|
205
206
|
if (!this.board || !this.board.id)
|
|
206
207
|
return;
|
|
207
208
|
/* Resolving the model's types is a wait, and `board` can be replaced while it runs. */
|
|
@@ -213,7 +214,7 @@ let BoardViewer = class BoardViewer extends LitElement {
|
|
|
213
214
|
mode: SCENE_MODE.VIEW,
|
|
214
215
|
refProvider: this.provider,
|
|
215
216
|
dataStorage: board.id !== 'preview' ? new BoardDataStorage(board.id) : undefined,
|
|
216
|
-
dataSubscriptionProvider: new DataSubscriptionProviderImpl(),
|
|
217
|
+
dataSubscriptionProvider: (_a = this.dataSubscriptionProvider) !== null && _a !== void 0 ? _a : new DataSubscriptionProviderImpl(),
|
|
217
218
|
handlers: ['waypoint-handler'],
|
|
218
219
|
loading: { tracker: this.loadTracker }
|
|
219
220
|
}, () => this.board === board && this.isConnected);
|
|
@@ -870,6 +871,9 @@ __decorate([
|
|
|
870
871
|
__decorate([
|
|
871
872
|
property({ type: Object })
|
|
872
873
|
], BoardViewer.prototype, "loadTracker", void 0);
|
|
874
|
+
__decorate([
|
|
875
|
+
property({ type: Object })
|
|
876
|
+
], BoardViewer.prototype, "dataSubscriptionProvider", void 0);
|
|
873
877
|
__decorate([
|
|
874
878
|
property({ type: Boolean, reflect: true, attribute: 'hide-fullscreen' })
|
|
875
879
|
], BoardViewer.prototype, "hideFullscreen", void 0);
|
|
@@ -51,101 +51,152 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
51
51
|
return [
|
|
52
52
|
ScrollbarStyles,
|
|
53
53
|
css `
|
|
54
|
+
/*
|
|
55
|
+
* The same look as the board list: white cards with a thin border, the thumbnail on a quiet
|
|
56
|
+
* ground and the name under it, and one plain row of filters above (2026-11-29).
|
|
57
|
+
*/
|
|
54
58
|
:host {
|
|
55
59
|
display: grid;
|
|
56
|
-
grid-template-rows: auto
|
|
60
|
+
grid-template-rows: auto 1fr;
|
|
57
61
|
overflow: hidden;
|
|
58
62
|
color: var(--md-sys-color-on-surface);
|
|
63
|
+
background-color: var(--md-sys-color-surface-container-low, var(--md-sys-color-surface));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#filter {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
flex-wrap: wrap;
|
|
70
|
+
gap: 8px 16px;
|
|
71
|
+
padding: 12px 20px;
|
|
72
|
+
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
59
73
|
background-color: var(--md-sys-color-surface);
|
|
60
74
|
}
|
|
61
75
|
|
|
62
|
-
#
|
|
63
|
-
|
|
64
|
-
padding:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
#filter ox-input-search {
|
|
77
|
+
flex: 0 1 260px;
|
|
78
|
+
padding: 4px 10px;
|
|
79
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
80
|
+
border-radius: 999px;
|
|
81
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
82
|
+
font-size: 13px;
|
|
69
83
|
}
|
|
70
84
|
|
|
71
|
-
.
|
|
85
|
+
.types {
|
|
86
|
+
display: flex;
|
|
87
|
+
gap: 6px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.types button {
|
|
91
|
+
font: inherit;
|
|
92
|
+
font-size: 12.5px;
|
|
93
|
+
padding: 3px 12px;
|
|
94
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
95
|
+
border-radius: 999px;
|
|
96
|
+
background: transparent;
|
|
97
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.types button[aria-pressed='true'] {
|
|
102
|
+
border-color: transparent;
|
|
103
|
+
background: var(--md-sys-color-secondary-container);
|
|
104
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
label.group {
|
|
72
109
|
display: flex;
|
|
73
|
-
flex-direction: column;
|
|
74
110
|
align-items: center;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
111
|
+
gap: 6px;
|
|
112
|
+
margin-left: auto;
|
|
113
|
+
font-size: 12.5px;
|
|
114
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
78
115
|
}
|
|
79
116
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
117
|
+
select {
|
|
118
|
+
font: inherit;
|
|
119
|
+
max-width: 200px;
|
|
120
|
+
padding: 3px 6px;
|
|
121
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
122
|
+
border-radius: 6px;
|
|
123
|
+
background-color: var(--md-sys-color-surface);
|
|
124
|
+
color: var(--md-sys-color-on-surface);
|
|
85
125
|
}
|
|
86
126
|
|
|
87
|
-
|
|
88
|
-
overflow:
|
|
127
|
+
#main {
|
|
128
|
+
overflow: auto;
|
|
129
|
+
padding: 16px 20px 20px;
|
|
130
|
+
display: grid;
|
|
131
|
+
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
|
132
|
+
grid-auto-rows: 196px;
|
|
133
|
+
gap: 14px;
|
|
134
|
+
align-content: start;
|
|
89
135
|
}
|
|
90
136
|
|
|
91
|
-
.card
|
|
137
|
+
.card {
|
|
138
|
+
display: grid;
|
|
139
|
+
grid-template-rows: 1fr auto;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
box-sizing: border-box;
|
|
142
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
143
|
+
border-radius: 8px;
|
|
144
|
+
background-color: var(--md-sys-color-surface);
|
|
92
145
|
cursor: pointer;
|
|
93
146
|
}
|
|
94
147
|
|
|
95
|
-
.card
|
|
96
|
-
color: var(--md-sys-color-
|
|
97
|
-
background-color: var(--md-sys-color-secondary);
|
|
98
|
-
opacity: 0.9;
|
|
99
|
-
margin-top: -35px;
|
|
100
|
-
width: 100%;
|
|
101
|
-
font-weight: bolder;
|
|
102
|
-
font-size: 13px;
|
|
103
|
-
text-indent: 7px;
|
|
148
|
+
.card:hover {
|
|
149
|
+
border-color: var(--md-sys-color-outline);
|
|
104
150
|
}
|
|
105
151
|
|
|
106
|
-
.card
|
|
107
|
-
|
|
108
|
-
background-color: var(--md-sys-color-secondary);
|
|
109
|
-
width: 100%;
|
|
110
|
-
min-height: 16px;
|
|
111
|
-
font-size: 0.6rem;
|
|
112
|
-
text-indent: 7px;
|
|
152
|
+
.card[selected] {
|
|
153
|
+
border: 2px solid var(--md-sys-color-primary);
|
|
113
154
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
155
|
+
|
|
156
|
+
.card.create {
|
|
157
|
+
overflow: visible;
|
|
158
|
+
border: none;
|
|
159
|
+
background-color: transparent;
|
|
117
160
|
}
|
|
118
161
|
|
|
119
|
-
|
|
162
|
+
.card .thumb {
|
|
120
163
|
display: flex;
|
|
121
164
|
align-items: center;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
165
|
+
justify-content: center;
|
|
166
|
+
min-height: 0;
|
|
167
|
+
padding: 8px;
|
|
168
|
+
background-color: var(--md-sys-color-surface-container);
|
|
126
169
|
}
|
|
127
170
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
border-radius: 999px;
|
|
133
|
-
color: var(--md-sys-color-primary);
|
|
171
|
+
.card img {
|
|
172
|
+
max-width: 100%;
|
|
173
|
+
max-height: 100%;
|
|
174
|
+
object-fit: contain;
|
|
134
175
|
}
|
|
135
176
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
177
|
+
.card .caption {
|
|
178
|
+
padding: 8px 12px 10px;
|
|
179
|
+
min-width: 0;
|
|
139
180
|
}
|
|
140
181
|
|
|
141
|
-
|
|
142
|
-
|
|
182
|
+
.card .name,
|
|
183
|
+
.card .description {
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
text-overflow: ellipsis;
|
|
186
|
+
white-space: nowrap;
|
|
143
187
|
}
|
|
144
188
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
189
|
+
.card .name {
|
|
190
|
+
font-size: 13.5px;
|
|
191
|
+
font-weight: 600;
|
|
192
|
+
color: var(--md-sys-color-on-surface);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.card .description {
|
|
196
|
+
margin-top: 2px;
|
|
197
|
+
min-height: 1.4em;
|
|
198
|
+
font-size: 12px;
|
|
199
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
149
200
|
}
|
|
150
201
|
`
|
|
151
202
|
];
|
|
@@ -161,59 +212,43 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
161
212
|
this._infiniteScrollOptions.limit = 50;
|
|
162
213
|
}
|
|
163
214
|
render() {
|
|
215
|
+
const types = [
|
|
216
|
+
{ value: '', label: i18next.t('label.all') },
|
|
217
|
+
{ value: 'main', label: 'Main' },
|
|
218
|
+
{ value: 'sub', label: 'Sub' },
|
|
219
|
+
{ value: 'popup', label: 'Popup' }
|
|
220
|
+
];
|
|
164
221
|
return html `
|
|
165
222
|
<div id="filter">
|
|
166
223
|
<ox-input-search
|
|
224
|
+
.placeholder=${i18next.t('text.search boards by name')}
|
|
167
225
|
@change=${(e) => {
|
|
168
226
|
var _a;
|
|
169
227
|
this.search = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
170
228
|
}}
|
|
171
229
|
></ox-input-search>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}}
|
|
181
|
-
>
|
|
182
|
-
<option value="">${i18next.t('label.all')}</option>
|
|
183
|
-
${['main', 'sub', 'popup'].map(type => html ` <option value=${type}>${type}</option> `)}
|
|
184
|
-
</select>
|
|
230
|
+
|
|
231
|
+
<div class="types" role="group" aria-label=${i18next.t('label.type')}>
|
|
232
|
+
${types.map(type => html `<button
|
|
233
|
+
aria-pressed=${String((this.type || '') === type.value)}
|
|
234
|
+
@click=${() => (this.type = type.value)}
|
|
235
|
+
>
|
|
236
|
+
${type.label}
|
|
237
|
+
</button>`)}
|
|
185
238
|
</div>
|
|
186
239
|
|
|
187
|
-
<
|
|
188
|
-
|
|
240
|
+
<label class="group">
|
|
241
|
+
${i18next.t('label.group')}
|
|
189
242
|
<select
|
|
190
|
-
id="group"
|
|
191
243
|
@change=${(e) => {
|
|
192
244
|
var _a;
|
|
193
245
|
this.group = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
194
|
-
this.requestUpdate();
|
|
195
246
|
}}
|
|
196
247
|
>
|
|
197
248
|
<option value="">${i18next.t('label.all')}</option>
|
|
198
|
-
${this.groups.map(group => html ` <option value=${group.id}>${group.description}</option> `)}
|
|
249
|
+
${this.groups.map(group => html ` <option value=${group.id} ?selected=${group.id === this.group}>${group.description || group.name}</option> `)}
|
|
199
250
|
</select>
|
|
200
|
-
</
|
|
201
|
-
|
|
202
|
-
<div>
|
|
203
|
-
<label for="inherited">Inherited</label>
|
|
204
|
-
<select
|
|
205
|
-
id="inherited"
|
|
206
|
-
@change=${(e) => {
|
|
207
|
-
var _a;
|
|
208
|
-
this.inherited = (_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
|
|
209
|
-
this.requestUpdate();
|
|
210
|
-
}}
|
|
211
|
-
>
|
|
212
|
-
<option value="Include">Include</option>
|
|
213
|
-
<option value="Only">Only</option>
|
|
214
|
-
<option value="None">None</option>
|
|
215
|
-
</select>
|
|
216
|
-
</div>
|
|
251
|
+
</label>
|
|
217
252
|
</div>
|
|
218
253
|
|
|
219
254
|
<div
|
|
@@ -234,9 +269,11 @@ let BoardSelector = class BoardSelector extends InfiniteScrollable(localize(i18n
|
|
|
234
269
|
: html ``}
|
|
235
270
|
${this.boards.map(board => html `
|
|
236
271
|
<div class="card" @click=${(e) => this.onClickSelect(board)} ?selected=${this.value === board.id}>
|
|
237
|
-
<img src=${board.thumbnail}
|
|
238
|
-
<div class="
|
|
239
|
-
|
|
272
|
+
<div class="thumb">${board.thumbnail ? html `<img src=${board.thumbnail} alt="" />` : ''}</div>
|
|
273
|
+
<div class="caption">
|
|
274
|
+
<div class="name">${board.name}</div>
|
|
275
|
+
<div class="description">${board.description || ''}</div>
|
|
276
|
+
</div>
|
|
240
277
|
</div>
|
|
241
278
|
`)}
|
|
242
279
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/board",
|
|
3
|
-
"version": "10.29.
|
|
3
|
+
"version": "10.29.106",
|
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"type": "module",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"@operato/markdown": "^10.29.83",
|
|
153
153
|
"@operato/popup": "^10.29.96",
|
|
154
154
|
"@operato/property-editor": "^10.29.103",
|
|
155
|
-
"@operato/property-panel": "^10.29.
|
|
155
|
+
"@operato/property-panel": "^10.29.105",
|
|
156
156
|
"@operato/styles": "^10.29.83",
|
|
157
157
|
"@operato/utils": "^10.29.85",
|
|
158
158
|
"@types/file-saver": "^2.0.4",
|
|
@@ -203,5 +203,5 @@
|
|
|
203
203
|
"prettier --write"
|
|
204
204
|
]
|
|
205
205
|
},
|
|
206
|
-
"gitHead": "
|
|
206
|
+
"gitHead": "cd7f9a987a820cd82f4980cc2cf3230b68397962"
|
|
207
207
|
}
|