@things-factory/board-ui 7.0.1-alpha.60 → 7.0.1-alpha.69
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/client/apptools/favorite-tool.ts +8 -7
- package/client/board-list/board-tile-list.ts +38 -34
- package/client/board-list/group-bar-styles.ts +4 -0
- package/client/board-list/group-bar.ts +7 -8
- package/client/board-list/play-group-bar.ts +4 -4
- package/client/data-grist/board-renderer.ts +6 -6
- package/client/pages/board-list-page.ts +20 -6
- package/client/setting-let/board-view-setting-let.ts +10 -6
- package/client/viewparts/board-basic-info.ts +192 -214
- package/client/viewparts/board-info-link.ts +1 -1
- package/client/viewparts/board-info.ts +3 -3
- package/client/viewparts/board-template-builder.ts +0 -1
- package/client/viewparts/board-versions.ts +20 -12
- package/client/viewparts/group-info-basic.ts +48 -36
- package/client/viewparts/group-info-import.ts +8 -11
- package/client/viewparts/group-info.ts +1 -1
- package/client/viewparts/link-builder.ts +8 -8
- package/client/viewparts/play-group-info-basic.ts +38 -34
- package/client/viewparts/play-group-info-link.ts +1 -1
- package/client/viewparts/play-group-info.ts +1 -1
- package/dist-client/apptools/favorite-tool.d.ts +3 -3
- package/dist-client/apptools/favorite-tool.js +6 -6
- package/dist-client/apptools/favorite-tool.js.map +1 -1
- package/dist-client/board-list/board-tile-list.d.ts +1 -1
- package/dist-client/board-list/board-tile-list.js +30 -26
- package/dist-client/board-list/board-tile-list.js.map +1 -1
- package/dist-client/board-list/group-bar-styles.js +4 -0
- package/dist-client/board-list/group-bar-styles.js.map +1 -1
- package/dist-client/board-list/group-bar.d.ts +1 -1
- package/dist-client/board-list/group-bar.js +6 -6
- package/dist-client/board-list/group-bar.js.map +1 -1
- package/dist-client/board-list/play-group-bar.d.ts +1 -1
- package/dist-client/board-list/play-group-bar.js +3 -3
- package/dist-client/board-list/play-group-bar.js.map +1 -1
- package/dist-client/data-grist/board-renderer.d.ts +1 -1
- package/dist-client/data-grist/board-renderer.js +6 -6
- package/dist-client/data-grist/board-renderer.js.map +1 -1
- package/dist-client/pages/board-list-page.d.ts +0 -1
- package/dist-client/pages/board-list-page.js +17 -5
- package/dist-client/pages/board-list-page.js.map +1 -1
- package/dist-client/setting-let/board-view-setting-let.d.ts +2 -3
- package/dist-client/setting-let/board-view-setting-let.js +10 -6
- package/dist-client/setting-let/board-view-setting-let.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/board-basic-info.d.ts +7 -1
- package/dist-client/viewparts/board-basic-info.js +188 -209
- package/dist-client/viewparts/board-basic-info.js.map +1 -1
- package/dist-client/viewparts/board-info-link.js +1 -1
- package/dist-client/viewparts/board-info-link.js.map +1 -1
- package/dist-client/viewparts/board-info.js +1 -1
- package/dist-client/viewparts/board-info.js.map +1 -1
- package/dist-client/viewparts/board-template-builder.d.ts +0 -1
- package/dist-client/viewparts/board-template-builder.js +0 -1
- package/dist-client/viewparts/board-template-builder.js.map +1 -1
- package/dist-client/viewparts/board-versions.d.ts +2 -1
- package/dist-client/viewparts/board-versions.js +19 -12
- package/dist-client/viewparts/board-versions.js.map +1 -1
- package/dist-client/viewparts/group-info-basic.d.ts +3 -1
- package/dist-client/viewparts/group-info-basic.js +48 -36
- package/dist-client/viewparts/group-info-basic.js.map +1 -1
- package/dist-client/viewparts/group-info-import.d.ts +2 -1
- package/dist-client/viewparts/group-info-import.js +8 -11
- package/dist-client/viewparts/group-info-import.js.map +1 -1
- package/dist-client/viewparts/group-info.js +1 -1
- package/dist-client/viewparts/group-info.js.map +1 -1
- package/dist-client/viewparts/link-builder.d.ts +1 -1
- package/dist-client/viewparts/link-builder.js +6 -6
- package/dist-client/viewparts/link-builder.js.map +1 -1
- package/dist-client/viewparts/play-group-info-basic.d.ts +3 -1
- package/dist-client/viewparts/play-group-info-basic.js +34 -34
- package/dist-client/viewparts/play-group-info-basic.js.map +1 -1
- package/dist-client/viewparts/play-group-info-link.js +1 -1
- package/dist-client/viewparts/play-group-info-link.js.map +1 -1
- package/dist-client/viewparts/play-group-info.js +1 -1
- package/dist-client/viewparts/play-group-info.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -8
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
|
-
import { css, html, LitElement } from 'lit'
|
|
5
|
-
import { customElement, property
|
|
4
|
+
import { css, html, LitElement, nothing } from 'lit'
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
6
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { store } from '@operato/shell'
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
import { UPDATE_FAVORITES } from '@things-factory/fav-base/client'
|
|
11
12
|
|
|
12
13
|
@customElement('favorite-tool')
|
|
13
14
|
export class FavoriteTool extends connect(store)(LitElement) {
|
|
@@ -36,11 +37,11 @@ export class FavoriteTool extends connect(store)(LitElement) {
|
|
|
36
37
|
|
|
37
38
|
return renderable
|
|
38
39
|
? html`
|
|
39
|
-
<
|
|
40
|
-
>${this.favored ? 'star' : 'star_border'}</
|
|
40
|
+
<md-icon @click=${this.onClick.bind(this)} ?favorable=${!this.favored}
|
|
41
|
+
>${this.favored ? 'star' : 'star_border'}</md-icon
|
|
41
42
|
>
|
|
42
43
|
`
|
|
43
|
-
:
|
|
44
|
+
: nothing
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
updated(changes) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/board/ox-board-creation-card.js'
|
|
2
|
-
import '@material/mwc-icon'
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html, LitElement, PropertyValues, nothing } from 'lit'
|
|
@@ -7,6 +7,7 @@ import { customElement, property, state, query } from 'lit/decorators.js'
|
|
|
7
7
|
import { keyed } from 'lit/directives/keyed.js'
|
|
8
8
|
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
10
|
+
|
|
10
11
|
import { privileged } from '@things-factory/auth-base/dist-client'
|
|
11
12
|
|
|
12
13
|
@customElement('board-tile-list')
|
|
@@ -37,6 +38,7 @@ export class BoardTileList extends LitElement {
|
|
|
37
38
|
|
|
38
39
|
[card] > a {
|
|
39
40
|
display: flex;
|
|
41
|
+
clip-path: border-box;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
[card]:hover {
|
|
@@ -55,26 +57,23 @@ export class BoardTileList extends LitElement {
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
img {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
margin: auto;
|
|
61
|
-
max-width: 100%;
|
|
62
|
-
max-height: 100%;
|
|
60
|
+
flex: 1;
|
|
61
|
+
object-fit: contain;
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
md-icon[iconBtn] {
|
|
66
65
|
float: right;
|
|
67
66
|
margin-top: -20px;
|
|
68
67
|
margin-left: 2px;
|
|
69
68
|
color: var(--board-list-star-color);
|
|
70
69
|
font-size: 1.4em;
|
|
71
70
|
}
|
|
72
|
-
|
|
71
|
+
md-icon[info] {
|
|
73
72
|
color: var(--primary-color);
|
|
74
73
|
}
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
md-icon[iconBtn][favored],
|
|
76
|
+
md-icon[info]:hover {
|
|
78
77
|
color: var(--board-list-star-active-color);
|
|
79
78
|
}
|
|
80
79
|
|
|
@@ -174,36 +173,41 @@ export class BoardTileList extends LitElement {
|
|
|
174
173
|
? privileged(
|
|
175
174
|
{ privilege: 'mutation', category: 'board' },
|
|
176
175
|
html`
|
|
177
|
-
<ox-board-creation-card
|
|
176
|
+
<ox-board-creation-card
|
|
177
|
+
.groups=${this.groups}
|
|
178
|
+
.defaultGroup=${this.group}
|
|
179
|
+
@create-board=${e => this.onCreateBoard(e)}
|
|
180
|
+
card
|
|
181
|
+
create
|
|
182
|
+
></ox-board-creation-card>
|
|
178
183
|
`
|
|
179
184
|
)
|
|
180
185
|
: nothing}
|
|
181
186
|
${keyed(
|
|
182
187
|
Date.now(),
|
|
183
188
|
boards.map(
|
|
184
|
-
board =>
|
|
185
|
-
|
|
186
|
-
<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
`
|
|
189
|
+
board => html`
|
|
190
|
+
<div card draggable="true" id=${board.id}>
|
|
191
|
+
<a href="board-viewer/${board.id}"> <img src=${board.thumbnail} /> </a>
|
|
192
|
+
|
|
193
|
+
<div name>${board.name}</div>
|
|
194
|
+
<!-- <div description>${board.description}</div> -->
|
|
195
|
+
|
|
196
|
+
<md-icon
|
|
197
|
+
iconBtn
|
|
198
|
+
info
|
|
199
|
+
@click=${e => {
|
|
200
|
+
this.infoBoard(board)
|
|
201
|
+
e.preventDefault()
|
|
202
|
+
}}
|
|
203
|
+
>info</md-icon
|
|
204
|
+
>
|
|
205
|
+
|
|
206
|
+
${(this.favorites || []).includes(board.id)
|
|
207
|
+
? html` <md-icon iconBtn favored @click=${e => this.removeFavorite(board.id)}>star</md-icon> `
|
|
208
|
+
: html` <md-icon iconBtn @click=${e => this.addFavorite(board.id)}>star_border</md-icon> `}
|
|
209
|
+
</div>
|
|
210
|
+
`
|
|
207
211
|
)
|
|
208
212
|
)}
|
|
209
213
|
`
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
3
|
import { html, LitElement } from 'lit'
|
|
4
4
|
import { customElement, property } from 'lit/decorators.js'
|
|
5
|
-
|
|
6
5
|
import ScrollBooster from 'scrollbooster'
|
|
7
6
|
|
|
7
|
+
import { longpressable } from '@operato/utils'
|
|
8
8
|
import { privileged } from '@things-factory/auth-base/dist-client'
|
|
9
|
-
import { longpressable } from '@things-factory/utils'
|
|
10
9
|
import { GroupBarStyles } from './group-bar-styles'
|
|
11
10
|
|
|
12
11
|
@customElement('group-bar')
|
|
@@ -23,17 +22,17 @@ export default class GroupBar extends LitElement {
|
|
|
23
22
|
return html`
|
|
24
23
|
<ul>
|
|
25
24
|
<li ?active=${!this.groupId}>
|
|
26
|
-
<a href=${this.targetPage || ''}><
|
|
25
|
+
<a href=${this.targetPage || ''}><md-icon>dashboard</md-icon></a>
|
|
27
26
|
</li>
|
|
28
27
|
|
|
29
28
|
<li ?active=${this.groupId === 'favor'}>
|
|
30
|
-
<a href="${this.targetPage}/favor"><
|
|
29
|
+
<a href="${this.targetPage}/favor"><md-icon>star</md-icon></a>
|
|
31
30
|
</li>
|
|
32
31
|
|
|
33
32
|
${privileged(
|
|
34
33
|
{ privilege: 'mutation', category: 'board' },
|
|
35
34
|
html`<li ?active=${this.groupId === 'mywork'}>
|
|
36
|
-
<a href="${this.targetPage}/mywork"><
|
|
35
|
+
<a href="${this.targetPage}/mywork"><md-icon>engineering</md-icon></a>
|
|
37
36
|
</li>`
|
|
38
37
|
)}
|
|
39
38
|
${(this.groups || []).map(
|
|
@@ -47,7 +46,7 @@ export default class GroupBar extends LitElement {
|
|
|
47
46
|
<li padding></li>
|
|
48
47
|
|
|
49
48
|
<li add>
|
|
50
|
-
<
|
|
49
|
+
<md-icon @click=${e => this.infoGroup()}>add</md-icon>
|
|
51
50
|
</li>
|
|
52
51
|
</ul>
|
|
53
52
|
`
|
|
@@ -84,7 +83,7 @@ export default class GroupBar extends LitElement {
|
|
|
84
83
|
var scrollTarget = this.renderRoot.querySelector('ul')
|
|
85
84
|
|
|
86
85
|
/* long-press */
|
|
87
|
-
longpressable(scrollTarget)
|
|
86
|
+
longpressable(scrollTarget!)
|
|
88
87
|
|
|
89
88
|
scrollTarget!.addEventListener('mousewheel', this.onWheelEvent.bind(this), false)
|
|
90
89
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
3
|
import { html, LitElement } from 'lit'
|
|
4
4
|
import { customElement, property } from 'lit/decorators.js'
|
|
5
5
|
import ScrollBooster from 'scrollbooster'
|
|
6
6
|
|
|
7
|
-
import { longpressable } from '@
|
|
7
|
+
import { longpressable } from '@operato/utils'
|
|
8
8
|
import { GroupBarStyles } from './group-bar-styles'
|
|
9
9
|
|
|
10
10
|
@customElement('play-group-bar')
|
|
@@ -31,7 +31,7 @@ export default class PlayGroupBar extends LitElement {
|
|
|
31
31
|
<li padding> </li>
|
|
32
32
|
|
|
33
33
|
<li add>
|
|
34
|
-
<
|
|
34
|
+
<md-icon @click=${e => this._infoGroup()}>add</md-icon>
|
|
35
35
|
</li>
|
|
36
36
|
</ul>
|
|
37
37
|
`
|
|
@@ -72,7 +72,7 @@ export default class PlayGroupBar extends LitElement {
|
|
|
72
72
|
var scrollTarget = this.renderRoot.querySelector('ul')
|
|
73
73
|
|
|
74
74
|
/* long-press */
|
|
75
|
-
longpressable(scrollTarget)
|
|
75
|
+
longpressable(scrollTarget!)
|
|
76
76
|
|
|
77
77
|
scrollTarget!.addEventListener('mousewheel', this._onWheelEvent.bind(this), false)
|
|
78
78
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -49,7 +49,7 @@ class BoardRendererElement extends LitElement {
|
|
|
49
49
|
max-width: 100%;
|
|
50
50
|
max-height: 100%;
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
md-icon {
|
|
53
53
|
position: absolute;
|
|
54
54
|
top: 0;
|
|
55
55
|
text-align: center;
|
|
@@ -59,13 +59,13 @@ class BoardRendererElement extends LitElement {
|
|
|
59
59
|
height: var(--board-renderer-icon-size);
|
|
60
60
|
font: var(--board-renderer-font);
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
md-icon[edit] {
|
|
63
63
|
right: 0;
|
|
64
64
|
|
|
65
65
|
border-bottom-left-radius: var(--board-renderer-icon-border-radius);
|
|
66
66
|
background-color: var(--board-renderer-icon-edit-background-color);
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
md-icon[view] {
|
|
69
69
|
left: 0;
|
|
70
70
|
|
|
71
71
|
border-bottom-right-radius: var(--board-renderer-icon-border-radius);
|
|
@@ -105,8 +105,8 @@ class BoardRendererElement extends LitElement {
|
|
|
105
105
|
? html`
|
|
106
106
|
<span>${name}</span>
|
|
107
107
|
<img src=${thumbnail} alt="no thumbnail!" />
|
|
108
|
-
<
|
|
109
|
-
<
|
|
108
|
+
<md-icon view @mousedown=${e => this.onClickViewer(e, id)}>search</md-icon>
|
|
109
|
+
<md-icon edit @mousedown=${e => this.onClickModeler(e, id)}>edit</md-icon>
|
|
110
110
|
`
|
|
111
111
|
: html` choose board.. `
|
|
112
112
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import '@material/mwc-icon'
|
|
2
1
|
import '../viewparts/board-info'
|
|
3
2
|
import '../viewparts/group-info'
|
|
4
3
|
import '../board-list/board-tile-list'
|
|
@@ -83,7 +82,13 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
83
82
|
return {
|
|
84
83
|
title: {
|
|
85
84
|
icon: 'dashboard',
|
|
86
|
-
text: group
|
|
85
|
+
text: group
|
|
86
|
+
? 'Group ' + group.name
|
|
87
|
+
: groupId == 'favor'
|
|
88
|
+
? 'Favorite'
|
|
89
|
+
: groupId == 'mywork'
|
|
90
|
+
? 'My works'
|
|
91
|
+
: 'Board List'
|
|
87
92
|
},
|
|
88
93
|
search: {
|
|
89
94
|
handler: search => {
|
|
@@ -104,7 +109,12 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
104
109
|
|
|
105
110
|
render() {
|
|
106
111
|
return html`
|
|
107
|
-
<group-bar
|
|
112
|
+
<group-bar
|
|
113
|
+
.groups=${this.groups}
|
|
114
|
+
.groupId=${this.groupId}
|
|
115
|
+
targetPage="board-list"
|
|
116
|
+
@info-group=${e => this.onInfoGroup(e.detail)}
|
|
117
|
+
></group-bar>
|
|
108
118
|
|
|
109
119
|
<board-tile-list
|
|
110
120
|
id="list"
|
|
@@ -321,7 +331,9 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
321
331
|
list.style.transition = 'transform 0.3s'
|
|
322
332
|
list.style.transform = `translate3d(${d < 0 ? '-100%' : '100%'}, 0, 0)`
|
|
323
333
|
|
|
324
|
-
navigate(
|
|
334
|
+
navigate(
|
|
335
|
+
`${this.page}/${groups[currentIndex + (d < 0 ? 1 : -1)].id}${this.searchText ? '?search=' + this.searchText : ''}`
|
|
336
|
+
)
|
|
325
337
|
}
|
|
326
338
|
}
|
|
327
339
|
}
|
|
@@ -501,7 +513,8 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
501
513
|
}
|
|
502
514
|
})
|
|
503
515
|
|
|
504
|
-
data &&
|
|
516
|
+
data &&
|
|
517
|
+
this._notify('info', i18next.t('text.joined into play-group', { board: board.name, playGroup: playGroup.name }))
|
|
505
518
|
} catch (ex) {
|
|
506
519
|
this._notify('error', ex, ex)
|
|
507
520
|
}
|
|
@@ -523,7 +536,8 @@ export class BoardListPage extends localize(i18next)(connect(store)(InfiniteScro
|
|
|
523
536
|
}
|
|
524
537
|
})
|
|
525
538
|
|
|
526
|
-
data &&
|
|
539
|
+
data &&
|
|
540
|
+
this._notify('info', i18next.t('text.leaved from play-group', { board: board.name, playGroup: playGroup.name }))
|
|
527
541
|
} catch (ex) {
|
|
528
542
|
this._notify('error', ex, ex)
|
|
529
543
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
import '@material/mwc-formfield'
|
|
3
|
-
import '@material/mwc-checkbox'
|
|
1
|
+
import '@material/web/checkbox/checkbox.js'
|
|
4
2
|
import '@operato/i18n/ox-i18n.js'
|
|
3
|
+
import '@things-factory/setting-base'
|
|
5
4
|
|
|
6
5
|
import { css, html, LitElement } from 'lit'
|
|
7
6
|
import { customElement, property } from 'lit/decorators.js'
|
|
@@ -14,6 +13,10 @@ export class BoardViewSettingLet extends localize(i18next)(LitElement) {
|
|
|
14
13
|
static styles = [
|
|
15
14
|
css`
|
|
16
15
|
label {
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 10px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
|
|
17
20
|
font: var(--label-font);
|
|
18
21
|
color: var(--label-color);
|
|
19
22
|
text-transform: var(--label-text-transform);
|
|
@@ -29,9 +32,10 @@ export class BoardViewSettingLet extends localize(i18next)(LitElement) {
|
|
|
29
32
|
<ox-i18n slot="title" msgid="title.board view setting"></ox-i18n>
|
|
30
33
|
|
|
31
34
|
<div slot="content">
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
+
<label>
|
|
36
|
+
<md-checkbox id="auto-refresh" @change=${e => this.onChange(e)} ?checked=${this.autoRefresh}></md-checkbox>
|
|
37
|
+
${String(i18next.t('label.auto refresh board view'))}
|
|
38
|
+
</label>
|
|
35
39
|
</div>
|
|
36
40
|
</setting-let>
|
|
37
41
|
`
|