@things-factory/board-ui 8.0.5 → 9.0.0-beta.10
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/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -19
- package/translations/en.json +32 -29
- package/translations/ja.json +34 -31
- package/translations/ko.json +34 -31
- package/translations/ms.json +29 -25
- package/translations/zh.json +32 -29
- package/assets/images/bg-blue.png +0 -0
- package/assets/images/bg-green.png +0 -0
- package/assets/images/bg-input-select.png +0 -0
- package/assets/images/bg-rail.png +0 -0
- package/assets/images/forklift.png +0 -0
- package/assets/images/icon-backinfo.png +0 -0
- package/assets/images/icon-brand.png +0 -0
- package/assets/images/icon-close.png +0 -0
- package/assets/images/icon-editor-gradient-direction.png +0 -0
- package/assets/images/icon-mobile-brand.png +0 -0
- package/assets/images/icon-nametag.png +0 -0
- package/assets/images/icon-properties-label.png +0 -0
- package/assets/images/icon-properties-line-type.png +0 -0
- package/assets/images/icon-properties-table.png +0 -0
- package/assets/images/icon-resource-select.png +0 -0
- package/assets/images/person.png +0 -0
- package/assets/images/profile.png +0 -0
- package/client/apptools/favorite-tool.ts +0 -124
- package/client/board-list/board-tile-list.ts +0 -272
- package/client/board-list/group-bar-styles.ts +0 -63
- package/client/board-list/group-bar.ts +0 -99
- package/client/board-list/play-group-bar.ts +0 -88
- package/client/board-provider.ts +0 -92
- package/client/bootstrap.ts +0 -39
- package/client/data-grist/board-editor.ts +0 -113
- package/client/data-grist/board-renderer.ts +0 -134
- package/client/data-grist/color-map-editor.ts +0 -17
- package/client/data-grist/color-ranges-editor.ts +0 -17
- package/client/graphql/board-template.ts +0 -141
- package/client/graphql/board.ts +0 -273
- package/client/graphql/favorite-board.ts +0 -25
- package/client/graphql/group.ts +0 -138
- package/client/graphql/index.ts +0 -6
- package/client/graphql/my-board.ts +0 -25
- package/client/graphql/play-group.ts +0 -189
- package/client/index.ts +0 -10
- package/client/pages/attachment-list-page.ts +0 -142
- package/client/pages/board-list-page.ts +0 -603
- package/client/pages/board-modeller-page.ts +0 -288
- package/client/pages/board-player-by-name-page.ts +0 -29
- package/client/pages/board-player-page.ts +0 -241
- package/client/pages/board-template/board-template-list-page.ts +0 -248
- package/client/pages/board-viewer-by-name-page.ts +0 -24
- package/client/pages/board-viewer-page.ts +0 -271
- package/client/pages/font-list-page.ts +0 -31
- package/client/pages/play-list-page.ts +0 -400
- package/client/pages/printable-board-viewer-page.ts +0 -54
- package/client/pages/theme/theme-editors.ts +0 -56
- package/client/pages/theme/theme-list-page.ts +0 -313
- package/client/pages/things-scene-components-with-tools.import +0 -0
- package/client/pages/things-scene-components.import +0 -0
- package/client/route.ts +0 -51
- package/client/setting-let/board-view-setting-let.ts +0 -68
- package/client/themes/board-theme.css +0 -77
- package/client/things-scene-import.d.ts +0 -4
- package/client/viewparts/board-basic-info.ts +0 -646
- package/client/viewparts/board-info-link.ts +0 -56
- package/client/viewparts/board-info.ts +0 -85
- package/client/viewparts/board-template-builder.ts +0 -134
- package/client/viewparts/board-versions.ts +0 -172
- package/client/viewparts/group-info-basic.ts +0 -267
- package/client/viewparts/group-info-import.ts +0 -132
- package/client/viewparts/group-info.ts +0 -87
- package/client/viewparts/index.ts +0 -3
- package/client/viewparts/link-builder.ts +0 -210
- package/client/viewparts/play-group-info-basic.ts +0 -268
- package/client/viewparts/play-group-info-link.ts +0 -46
- package/client/viewparts/play-group-info.ts +0 -81
- package/images/icon-properties-arrow-type.png +0 -0
- package/images/icon-properties-gradient-direction.png +0 -0
- package/images/icon-properties-line-type.png +0 -0
- package/images/icon-properties-padding.png +0 -0
- package/images/icon-properties-table.png +0 -0
- package/images/icon-shell-inspector.png +0 -0
- package/server/index.ts +0 -0
package/client/graphql/group.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
import { client } from '@operato/graphql'
|
|
4
|
-
|
|
5
|
-
export async function fetchGroup(id) {
|
|
6
|
-
const response = await client.query({
|
|
7
|
-
query: gql`
|
|
8
|
-
query FetchGroupById($id: String!) {
|
|
9
|
-
group(id: $id) {
|
|
10
|
-
id
|
|
11
|
-
name
|
|
12
|
-
description
|
|
13
|
-
createdAt
|
|
14
|
-
creator {
|
|
15
|
-
id
|
|
16
|
-
name
|
|
17
|
-
}
|
|
18
|
-
updatedAt
|
|
19
|
-
updater {
|
|
20
|
-
id
|
|
21
|
-
name
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
`,
|
|
26
|
-
variables: { id }
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
return response.data
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export async function updateGroup(group) {
|
|
33
|
-
var { id, name, description } = group
|
|
34
|
-
|
|
35
|
-
const response = await client.mutate({
|
|
36
|
-
mutation: gql`
|
|
37
|
-
mutation UpdateGroup($id: String!, $patch: GroupPatch!) {
|
|
38
|
-
updateGroup(id: $id, patch: $patch) {
|
|
39
|
-
id
|
|
40
|
-
name
|
|
41
|
-
description
|
|
42
|
-
createdAt
|
|
43
|
-
updatedAt
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
`,
|
|
47
|
-
variables: {
|
|
48
|
-
id,
|
|
49
|
-
patch: { name, description }
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
return response.data
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export async function deleteGroup(id) {
|
|
57
|
-
const response = await client.mutate({
|
|
58
|
-
mutation: gql`
|
|
59
|
-
mutation ($id: String!) {
|
|
60
|
-
deleteGroup(id: $id)
|
|
61
|
-
}
|
|
62
|
-
`,
|
|
63
|
-
variables: {
|
|
64
|
-
id
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
return response.data
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export async function fetchGroupList() {
|
|
72
|
-
const response = await client.query({
|
|
73
|
-
query: gql`
|
|
74
|
-
{
|
|
75
|
-
groups {
|
|
76
|
-
items {
|
|
77
|
-
id
|
|
78
|
-
name
|
|
79
|
-
description
|
|
80
|
-
createdAt
|
|
81
|
-
updatedAt
|
|
82
|
-
}
|
|
83
|
-
total
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
`
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
return response.data
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export async function createGroup(group) {
|
|
93
|
-
const response = await client.mutate({
|
|
94
|
-
mutation: gql`
|
|
95
|
-
mutation CreateGroup($group: NewGroup!) {
|
|
96
|
-
createGroup(group: $group) {
|
|
97
|
-
id
|
|
98
|
-
name
|
|
99
|
-
description
|
|
100
|
-
createdAt
|
|
101
|
-
updatedAt
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
`,
|
|
105
|
-
variables: { group }
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
return response.data
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export async function joinGroup(boardId, groupId) {
|
|
112
|
-
const response = await client.mutate({
|
|
113
|
-
mutation: gql`
|
|
114
|
-
mutation JoinGroup($id: String!, $boardIds: [String!]!) {
|
|
115
|
-
joinGroup(id: $id, boardIds: $boardIds) {
|
|
116
|
-
id
|
|
117
|
-
name
|
|
118
|
-
description
|
|
119
|
-
boards {
|
|
120
|
-
id
|
|
121
|
-
name
|
|
122
|
-
description
|
|
123
|
-
createdAt
|
|
124
|
-
updatedAt
|
|
125
|
-
}
|
|
126
|
-
createdAt
|
|
127
|
-
updatedAt
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
`,
|
|
131
|
-
variables: {
|
|
132
|
-
id: groupId,
|
|
133
|
-
boardIds: [boardId]
|
|
134
|
-
}
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
return response.data
|
|
138
|
-
}
|
package/client/graphql/index.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
import { client } from '@operato/graphql'
|
|
3
|
-
import { gqlBuilder } from '@things-factory/utils'
|
|
4
|
-
|
|
5
|
-
export async function fetchMyBoardList(listParam = {}) {
|
|
6
|
-
const response = await client.query({
|
|
7
|
-
query: gql`
|
|
8
|
-
{
|
|
9
|
-
boardsCreatedByMe(${gqlBuilder.buildArgs(listParam)}) {
|
|
10
|
-
items {
|
|
11
|
-
id
|
|
12
|
-
name
|
|
13
|
-
description
|
|
14
|
-
thumbnail
|
|
15
|
-
createdAt
|
|
16
|
-
updatedAt
|
|
17
|
-
}
|
|
18
|
-
total
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
return response.data
|
|
25
|
-
}
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
import { client } from '@operato/graphql'
|
|
4
|
-
|
|
5
|
-
export async function fetchPlayGroupList() {
|
|
6
|
-
const response = await client.query({
|
|
7
|
-
query: gql`
|
|
8
|
-
{
|
|
9
|
-
playGroups {
|
|
10
|
-
items {
|
|
11
|
-
id
|
|
12
|
-
name
|
|
13
|
-
description
|
|
14
|
-
}
|
|
15
|
-
total
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
`
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
return response.data
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export async function fetchPlayGroup(groupId) {
|
|
25
|
-
const response = await client.query({
|
|
26
|
-
query: gql`
|
|
27
|
-
query FetchPlayGroup($id: String!) {
|
|
28
|
-
playGroup(id: $id) {
|
|
29
|
-
id
|
|
30
|
-
name
|
|
31
|
-
description
|
|
32
|
-
boards {
|
|
33
|
-
id
|
|
34
|
-
name
|
|
35
|
-
description
|
|
36
|
-
model
|
|
37
|
-
thumbnail
|
|
38
|
-
createdAt
|
|
39
|
-
creator {
|
|
40
|
-
id
|
|
41
|
-
name
|
|
42
|
-
}
|
|
43
|
-
updatedAt
|
|
44
|
-
updater {
|
|
45
|
-
id
|
|
46
|
-
name
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
createdAt
|
|
50
|
-
creator {
|
|
51
|
-
id
|
|
52
|
-
name
|
|
53
|
-
}
|
|
54
|
-
updatedAt
|
|
55
|
-
updater {
|
|
56
|
-
id
|
|
57
|
-
name
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
`,
|
|
62
|
-
variables: {
|
|
63
|
-
id: groupId
|
|
64
|
-
}
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
return response.data
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export async function createPlayGroup(group) {
|
|
71
|
-
var { name, description } = group
|
|
72
|
-
|
|
73
|
-
const response = await client.mutate({
|
|
74
|
-
mutation: gql`
|
|
75
|
-
mutation CreatePlayGroup($playGroup: NewPlayGroup!) {
|
|
76
|
-
createPlayGroup(playGroup: $playGroup) {
|
|
77
|
-
id
|
|
78
|
-
name
|
|
79
|
-
description
|
|
80
|
-
createdAt
|
|
81
|
-
updatedAt
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
`,
|
|
85
|
-
variables: {
|
|
86
|
-
playGroup: { name, description }
|
|
87
|
-
}
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
return response.data
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export async function updatePlayGroup(group) {
|
|
94
|
-
var { id, name, description } = group
|
|
95
|
-
|
|
96
|
-
const response = await client.mutate({
|
|
97
|
-
mutation: gql`
|
|
98
|
-
mutation UpdatePlayGroup($id: String!, $patch: PlayGroupPatch!) {
|
|
99
|
-
updatePlayGroup(id: $id, patch: $patch) {
|
|
100
|
-
id
|
|
101
|
-
name
|
|
102
|
-
description
|
|
103
|
-
createdAt
|
|
104
|
-
updatedAt
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
`,
|
|
108
|
-
variables: {
|
|
109
|
-
id,
|
|
110
|
-
patch: { name, description }
|
|
111
|
-
}
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
return response.data
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export async function deletePlayGroup(id) {
|
|
118
|
-
const response = await client.mutate({
|
|
119
|
-
mutation: gql`
|
|
120
|
-
mutation ($id: String!) {
|
|
121
|
-
deletePlayGroup(id: $id)
|
|
122
|
-
}
|
|
123
|
-
`,
|
|
124
|
-
variables: {
|
|
125
|
-
id
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
return response.data
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export async function joinPlayGroup(boardId, group) {
|
|
132
|
-
var { id, name, description } = group
|
|
133
|
-
|
|
134
|
-
const response = await client.mutate({
|
|
135
|
-
mutation: gql`
|
|
136
|
-
mutation JoinPlayGroup($id: String!, $boardIds: [String!]!) {
|
|
137
|
-
joinPlayGroup(id: $id, boardIds: $boardIds) {
|
|
138
|
-
id
|
|
139
|
-
name
|
|
140
|
-
description
|
|
141
|
-
boards {
|
|
142
|
-
id
|
|
143
|
-
name
|
|
144
|
-
description
|
|
145
|
-
createdAt
|
|
146
|
-
updatedAt
|
|
147
|
-
}
|
|
148
|
-
createdAt
|
|
149
|
-
updatedAt
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
`,
|
|
153
|
-
variables: {
|
|
154
|
-
id,
|
|
155
|
-
boardIds: [boardId]
|
|
156
|
-
}
|
|
157
|
-
})
|
|
158
|
-
|
|
159
|
-
return response.data
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export async function leavePlayGroup(boardId, groupId) {
|
|
163
|
-
const response = await client.mutate({
|
|
164
|
-
mutation: gql`
|
|
165
|
-
mutation ($id: String!, $boardIds: [String]!) {
|
|
166
|
-
leavePlayGroup(id: $id, boardIds: $boardIds) {
|
|
167
|
-
id
|
|
168
|
-
name
|
|
169
|
-
description
|
|
170
|
-
boards {
|
|
171
|
-
id
|
|
172
|
-
name
|
|
173
|
-
description
|
|
174
|
-
createdAt
|
|
175
|
-
updatedAt
|
|
176
|
-
}
|
|
177
|
-
createdAt
|
|
178
|
-
updatedAt
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
`,
|
|
182
|
-
variables: {
|
|
183
|
-
id: groupId,
|
|
184
|
-
boardIds: [boardId]
|
|
185
|
-
}
|
|
186
|
-
})
|
|
187
|
-
|
|
188
|
-
return response.data
|
|
189
|
-
}
|
package/client/index.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './board-provider'
|
|
2
|
-
|
|
3
|
-
export * from './pages/board-viewer-page'
|
|
4
|
-
export * from './pages/board-player-page'
|
|
5
|
-
export * from './pages/board-modeller-page'
|
|
6
|
-
|
|
7
|
-
export * from './setting-let/board-view-setting-let'
|
|
8
|
-
export * from './apptools/favorite-tool'
|
|
9
|
-
export * from './graphql'
|
|
10
|
-
export * from './viewparts'
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import '@operato/attachment/ox-attachment-list.js'
|
|
2
|
-
|
|
3
|
-
import { css, html } from 'lit'
|
|
4
|
-
import { customElement, query } from 'lit/decorators.js'
|
|
5
|
-
import gql from 'graphql-tag'
|
|
6
|
-
|
|
7
|
-
import { i18next, localize } from '@operato/i18n'
|
|
8
|
-
import { PageView } from '@operato/shell'
|
|
9
|
-
import { OxAttachmentList } from '@operato/attachment/ox-attachment-list.js'
|
|
10
|
-
import { client } from '@operato/graphql'
|
|
11
|
-
|
|
12
|
-
async function fetchDataFromURL(fileURL: string) {
|
|
13
|
-
try {
|
|
14
|
-
const response = await fetch(fileURL)
|
|
15
|
-
|
|
16
|
-
if (!response.ok) {
|
|
17
|
-
throw new Error('Network response was not ok')
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const blob = await response.blob() // 파일 데이터를 Blob으로 변환
|
|
21
|
-
|
|
22
|
-
if (blob.size === 0) {
|
|
23
|
-
throw new Error('Content is empty') // Content가 비어 있으면 예외
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return new Promise((resolve, reject) => {
|
|
27
|
-
const reader = new FileReader()
|
|
28
|
-
|
|
29
|
-
reader.onload = (event: any) => {
|
|
30
|
-
const dataURL = event.target.result
|
|
31
|
-
resolve(dataURL)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
reader.onerror = (event: any) => {
|
|
35
|
-
reject(event.error)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
reader.readAsDataURL(blob) // Blob을 Data URL로 읽기
|
|
39
|
-
})
|
|
40
|
-
} catch (error) {
|
|
41
|
-
throw error
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@customElement('attachment-list-page')
|
|
46
|
-
export class AttachmentListPage extends localize(i18next)(PageView) {
|
|
47
|
-
static styles = [
|
|
48
|
-
css`
|
|
49
|
-
:host {
|
|
50
|
-
display: flex;
|
|
51
|
-
}
|
|
52
|
-
`
|
|
53
|
-
]
|
|
54
|
-
|
|
55
|
-
@query('ox-attachment-list') attachmentList!: OxAttachmentList
|
|
56
|
-
|
|
57
|
-
get context() {
|
|
58
|
-
return {
|
|
59
|
-
title: i18next.t('title.attachment list'),
|
|
60
|
-
search: {
|
|
61
|
-
handler: search => {
|
|
62
|
-
this.grist.searchText = search
|
|
63
|
-
},
|
|
64
|
-
value: this.grist?.searchText || ''
|
|
65
|
-
},
|
|
66
|
-
board_topmenu: true,
|
|
67
|
-
exportable: {
|
|
68
|
-
name: i18next.t('title.attachment list'),
|
|
69
|
-
data: this.exportHandler.bind(this)
|
|
70
|
-
},
|
|
71
|
-
importable: {
|
|
72
|
-
handler: this.importHandler.bind(this)
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
render() {
|
|
78
|
-
return html` <ox-attachment-list .creatable=${true} without-search></ox-attachment-list> `
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
get grist() {
|
|
82
|
-
return this.attachmentList.grist
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
languageUpdated(i18next) {
|
|
86
|
-
this.attachmentList.requestUpdate()
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
async pageInitialized() {
|
|
90
|
-
await this.updateComplete
|
|
91
|
-
|
|
92
|
-
this.attachmentList.refreshAttachments()
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
async exportHandler() {
|
|
96
|
-
const records = this.grist.data.records
|
|
97
|
-
const data = {} as any
|
|
98
|
-
|
|
99
|
-
for (const record of records) {
|
|
100
|
-
const { id, name, mimetype, encoding, category, fullpath } = record
|
|
101
|
-
|
|
102
|
-
try {
|
|
103
|
-
const dataURL = await fetchDataFromURL(fullpath)
|
|
104
|
-
|
|
105
|
-
id &&
|
|
106
|
-
(data[id!] = {
|
|
107
|
-
id,
|
|
108
|
-
name,
|
|
109
|
-
mimetype,
|
|
110
|
-
encoding,
|
|
111
|
-
category,
|
|
112
|
-
contents: dataURL
|
|
113
|
-
})
|
|
114
|
-
} catch (err) {
|
|
115
|
-
console.log(name, err)
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return data
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
async importHandler(data, file) {
|
|
123
|
-
await client.mutate({
|
|
124
|
-
mutation: gql`
|
|
125
|
-
mutation importAttachments($file: Upload!) {
|
|
126
|
-
importAttachments(file: $file) {
|
|
127
|
-
id
|
|
128
|
-
name
|
|
129
|
-
description
|
|
130
|
-
path
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
`,
|
|
134
|
-
variables: {
|
|
135
|
-
file
|
|
136
|
-
},
|
|
137
|
-
context: { hasUpload: true }
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
this.grist.fetch()
|
|
141
|
-
}
|
|
142
|
-
}
|