@things-factory/board-ui 8.0.37 → 9.0.0-9.0.0-beta.59.0
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/apptools/favorite-tool.js +1 -1
- package/dist-client/apptools/favorite-tool.js.map +1 -1
- package/dist-client/board-list/board-tile-list.js +1 -1
- package/dist-client/board-list/board-tile-list.js.map +1 -1
- package/dist-client/board-list/group-bar.js +1 -1
- package/dist-client/board-list/group-bar.js.map +1 -1
- package/dist-client/board-list/play-group-bar.js +1 -1
- package/dist-client/board-list/play-group-bar.js.map +1 -1
- package/dist-client/board-provider.js +0 -4
- package/dist-client/board-provider.js.map +1 -1
- package/dist-client/bootstrap.js +4 -4
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/data-grist/board-editor.d.ts +1 -1
- package/dist-client/data-grist/board-editor.js +1 -1
- package/dist-client/data-grist/board-editor.js.map +1 -1
- package/dist-client/entries/headless-scene-components.d.ts +1 -0
- package/dist-client/entries/headless-scene-components.js +4 -0
- package/dist-client/entries/headless-scene-components.js.map +1 -0
- package/dist-client/entries/scene-player.d.ts +5 -0
- package/dist-client/entries/scene-player.js +84 -0
- package/dist-client/entries/scene-player.js.map +1 -0
- package/dist-client/entries/scene-viewer.d.ts +5 -0
- package/dist-client/entries/scene-viewer.js +85 -0
- package/dist-client/entries/scene-viewer.js.map +1 -0
- package/dist-client/entries/things-scene-components.import +1 -0
- package/dist-client/graphql/index.d.ts +6 -6
- package/dist-client/graphql/index.js +6 -6
- package/dist-client/graphql/index.js.map +1 -1
- package/dist-client/index.d.ts +8 -8
- package/dist-client/index.js +8 -8
- package/dist-client/index.js.map +1 -1
- package/dist-client/pages/board-list-page.d.ts +4 -4
- package/dist-client/pages/board-list-page.js +5 -5
- package/dist-client/pages/board-list-page.js.map +1 -1
- package/dist-client/pages/board-modeller-page.js +2 -2
- package/dist-client/pages/board-modeller-page.js.map +1 -1
- package/dist-client/pages/board-player-by-name-page.d.ts +1 -1
- package/dist-client/pages/board-player-by-name-page.js +1 -1
- package/dist-client/pages/board-player-by-name-page.js.map +1 -1
- package/dist-client/pages/board-player-page.js +1 -1
- package/dist-client/pages/board-player-page.js.map +1 -1
- package/dist-client/pages/board-template/board-template-list-page.js +1 -1
- package/dist-client/pages/board-template/board-template-list-page.js.map +1 -1
- package/dist-client/pages/board-viewer-by-name-page.d.ts +1 -1
- package/dist-client/pages/board-viewer-by-name-page.js +1 -1
- package/dist-client/pages/board-viewer-by-name-page.js.map +1 -1
- package/dist-client/pages/board-viewer-page.js +1 -1
- package/dist-client/pages/board-viewer-page.js.map +1 -1
- package/dist-client/pages/play-list-page.d.ts +3 -3
- package/dist-client/pages/play-list-page.js +3 -3
- package/dist-client/pages/play-list-page.js.map +1 -1
- package/dist-client/pages/printable-board-viewer-page.d.ts +1 -1
- package/dist-client/pages/printable-board-viewer-page.js +9 -4
- package/dist-client/pages/printable-board-viewer-page.js.map +1 -1
- package/dist-client/pages/theme/theme-list-page.js +1 -1
- package/dist-client/pages/theme/theme-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/board-basic-info.js +1 -1
- package/dist-client/viewparts/board-basic-info.js.map +1 -1
- package/dist-client/viewparts/board-info.d.ts +3 -3
- package/dist-client/viewparts/board-info.js +3 -3
- package/dist-client/viewparts/board-info.js.map +1 -1
- package/dist-client/viewparts/board-versions.js +1 -1
- package/dist-client/viewparts/board-versions.js.map +1 -1
- package/dist-client/viewparts/group-info-import.js +1 -1
- package/dist-client/viewparts/group-info-import.js.map +1 -1
- package/dist-client/viewparts/group-info.d.ts +2 -2
- package/dist-client/viewparts/group-info.js +2 -2
- package/dist-client/viewparts/group-info.js.map +1 -1
- package/dist-client/viewparts/index.d.ts +3 -3
- package/dist-client/viewparts/index.js +3 -3
- package/dist-client/viewparts/index.js.map +1 -1
- package/dist-client/viewparts/link-builder.js +1 -1
- package/dist-client/viewparts/link-builder.js.map +1 -1
- package/dist-client/viewparts/play-group-info-basic.js +1 -1
- package/dist-client/viewparts/play-group-info-basic.js.map +1 -1
- package/dist-client/viewparts/play-group-info.d.ts +2 -2
- package/dist-client/viewparts/play-group-info.js +2 -2
- package/dist-client/viewparts/play-group-info.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/board-modeller/effects/hover-event.ko.md +3 -3
- package/helps/board-modeller/effects/hover-event.md +6 -4
- package/helps/board-modeller/effects/hover-event.zh.md +3 -3
- package/package.json +20 -19
- package/things-factory.config.js +12 -48
- package/translations/en.json +42 -31
- package/translations/ja.json +43 -32
- package/translations/ko.json +43 -32
- package/translations/ms.json +31 -25
- package/translations/zh.json +41 -30
- 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 -135
- 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
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
import { client } from '@operato/graphql'
|
|
4
|
-
import { gqlBuilder } from '@things-factory/utils'
|
|
5
|
-
|
|
6
|
-
export async function fetchBoardTemplateList(listParam = {}) {
|
|
7
|
-
const response = await client.query({
|
|
8
|
-
query: gql`
|
|
9
|
-
{
|
|
10
|
-
boardTemplates(${gqlBuilder.buildArgs(listParam)}) {
|
|
11
|
-
items {
|
|
12
|
-
id
|
|
13
|
-
name
|
|
14
|
-
description
|
|
15
|
-
thumbnail
|
|
16
|
-
visibility
|
|
17
|
-
createdAt
|
|
18
|
-
updatedAt
|
|
19
|
-
}
|
|
20
|
-
total
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
`
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
return response.data
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export async function fetchBoardTemplate(id) {
|
|
30
|
-
const response = await client.query({
|
|
31
|
-
query: gql`
|
|
32
|
-
query FetchBoardTemplate($id: String!) {
|
|
33
|
-
boardTemplate(id: $id) {
|
|
34
|
-
id
|
|
35
|
-
name
|
|
36
|
-
description
|
|
37
|
-
thumbnail
|
|
38
|
-
model
|
|
39
|
-
visibility
|
|
40
|
-
createdAt
|
|
41
|
-
creator {
|
|
42
|
-
id
|
|
43
|
-
name
|
|
44
|
-
}
|
|
45
|
-
updatedAt
|
|
46
|
-
updater {
|
|
47
|
-
id
|
|
48
|
-
name
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
`,
|
|
53
|
-
variables: { id }
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
return response.data
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export async function createBoardTemplate(boardTemplate) {
|
|
60
|
-
/*
|
|
61
|
-
input NewBoard {
|
|
62
|
-
name : String!
|
|
63
|
-
description : String
|
|
64
|
-
model : String!
|
|
65
|
-
visibility : String!
|
|
66
|
-
}
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
boardTemplate.model = JSON.stringify(boardTemplate.model)
|
|
70
|
-
|
|
71
|
-
const response = await client.mutate({
|
|
72
|
-
mutation: gql`
|
|
73
|
-
mutation CreateBoardTemplate($boardTemplate: NewBoardTemplate!) {
|
|
74
|
-
createBoardTemplate(boardTemplate: $boardTemplate) {
|
|
75
|
-
id
|
|
76
|
-
name
|
|
77
|
-
description
|
|
78
|
-
model
|
|
79
|
-
visibility
|
|
80
|
-
createdAt
|
|
81
|
-
updatedAt
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
`,
|
|
85
|
-
variables: {
|
|
86
|
-
boardTemplate
|
|
87
|
-
}
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
return response.data
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export async function updateBoardTemplate(boardTemplate) {
|
|
94
|
-
/*
|
|
95
|
-
input BoardPatch {
|
|
96
|
-
name : String
|
|
97
|
-
description : String
|
|
98
|
-
model : String
|
|
99
|
-
visibility : String
|
|
100
|
-
}
|
|
101
|
-
*/
|
|
102
|
-
var { id, name, description, model, visibility } = boardTemplate
|
|
103
|
-
model = JSON.stringify(model)
|
|
104
|
-
|
|
105
|
-
const response = await client.mutate({
|
|
106
|
-
mutation: gql`
|
|
107
|
-
mutation UpdateBoard($id: String!, $patch: BoardTemplatePatch!) {
|
|
108
|
-
updateBoard(id: $id, patch: $patch) {
|
|
109
|
-
id
|
|
110
|
-
name
|
|
111
|
-
description
|
|
112
|
-
model
|
|
113
|
-
visibility
|
|
114
|
-
createdAt
|
|
115
|
-
updatedAt
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
`,
|
|
119
|
-
variables: {
|
|
120
|
-
id,
|
|
121
|
-
patch: { name, description, model, visibility }
|
|
122
|
-
}
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
return response.data
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export async function deleteBoardTemplate(id) {
|
|
129
|
-
const response = await client.mutate({
|
|
130
|
-
mutation: gql`
|
|
131
|
-
mutation ($id: String!) {
|
|
132
|
-
deleteBoardTemplate(id: $id)
|
|
133
|
-
}
|
|
134
|
-
`,
|
|
135
|
-
variables: {
|
|
136
|
-
id
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
return response.data
|
|
141
|
-
}
|
package/client/graphql/board.ts
DELETED
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
import { client } from '@operato/graphql'
|
|
4
|
-
import { gqlBuilder } from '@things-factory/utils'
|
|
5
|
-
|
|
6
|
-
export async function fetchBoardList(listParam = {}) {
|
|
7
|
-
const response = await client.query({
|
|
8
|
-
query: gql`
|
|
9
|
-
{
|
|
10
|
-
boards(${gqlBuilder.buildArgs(listParam)}) {
|
|
11
|
-
items {
|
|
12
|
-
id
|
|
13
|
-
name
|
|
14
|
-
description
|
|
15
|
-
thumbnail
|
|
16
|
-
state
|
|
17
|
-
version
|
|
18
|
-
createdAt
|
|
19
|
-
updatedAt
|
|
20
|
-
}
|
|
21
|
-
total
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
`
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
return response.data
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export async function fetchBoard(id) {
|
|
31
|
-
const response = await client.query({
|
|
32
|
-
query: gql`
|
|
33
|
-
query FetchBoardById($id: String!) {
|
|
34
|
-
board(id: $id) {
|
|
35
|
-
id
|
|
36
|
-
name
|
|
37
|
-
description
|
|
38
|
-
group {
|
|
39
|
-
id
|
|
40
|
-
name
|
|
41
|
-
}
|
|
42
|
-
thumbnail
|
|
43
|
-
model
|
|
44
|
-
createdAt
|
|
45
|
-
creator {
|
|
46
|
-
id
|
|
47
|
-
name
|
|
48
|
-
}
|
|
49
|
-
state
|
|
50
|
-
version
|
|
51
|
-
updatedAt
|
|
52
|
-
updater {
|
|
53
|
-
id
|
|
54
|
-
name
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
`,
|
|
59
|
-
variables: { id }
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
return response.data
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export async function createBoard(board) {
|
|
66
|
-
/*
|
|
67
|
-
input NewBoard {
|
|
68
|
-
name : String!
|
|
69
|
-
description : String
|
|
70
|
-
model : String!
|
|
71
|
-
groupId : String!
|
|
72
|
-
}
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
board.model = JSON.stringify(board.model)
|
|
76
|
-
|
|
77
|
-
const response = await client.mutate({
|
|
78
|
-
mutation: gql`
|
|
79
|
-
mutation CreateBoard($board: NewBoard!) {
|
|
80
|
-
createBoard(board: $board) {
|
|
81
|
-
id
|
|
82
|
-
name
|
|
83
|
-
description
|
|
84
|
-
model
|
|
85
|
-
state
|
|
86
|
-
version
|
|
87
|
-
createdAt
|
|
88
|
-
updatedAt
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
`,
|
|
92
|
-
variables: {
|
|
93
|
-
board
|
|
94
|
-
}
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
return response.data
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export async function cloneBoard({
|
|
101
|
-
id,
|
|
102
|
-
name,
|
|
103
|
-
description,
|
|
104
|
-
targetSubdomain,
|
|
105
|
-
targetGroupId
|
|
106
|
-
}: {
|
|
107
|
-
id: string
|
|
108
|
-
name: string
|
|
109
|
-
description: string
|
|
110
|
-
targetSubdomain: string
|
|
111
|
-
targetGroupId: string
|
|
112
|
-
}) {
|
|
113
|
-
const response = await client.mutate({
|
|
114
|
-
mutation: gql`
|
|
115
|
-
mutation CloneBoard($id: String!, $patch: BoardPatch!, $targetSubdomain: String!, $targetGroupId: String) {
|
|
116
|
-
cloneBoard(id: $id, patch: $patch, targetSubdomain: $targetSubdomain, targetGroupId: $targetGroupId) {
|
|
117
|
-
id
|
|
118
|
-
name
|
|
119
|
-
description
|
|
120
|
-
model
|
|
121
|
-
group {
|
|
122
|
-
id
|
|
123
|
-
name
|
|
124
|
-
}
|
|
125
|
-
state
|
|
126
|
-
version
|
|
127
|
-
createdAt
|
|
128
|
-
updatedAt
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
`,
|
|
132
|
-
variables: {
|
|
133
|
-
id,
|
|
134
|
-
patch: { name, description },
|
|
135
|
-
targetSubdomain,
|
|
136
|
-
targetGroupId
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
return response.data
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export async function releaseBoard(board) {
|
|
144
|
-
var { id } = board
|
|
145
|
-
|
|
146
|
-
const response = await client.mutate({
|
|
147
|
-
mutation: gql`
|
|
148
|
-
mutation ReleaseBoard($id: String!) {
|
|
149
|
-
releaseBoard(id: $id) {
|
|
150
|
-
id
|
|
151
|
-
name
|
|
152
|
-
description
|
|
153
|
-
model
|
|
154
|
-
group {
|
|
155
|
-
id
|
|
156
|
-
name
|
|
157
|
-
}
|
|
158
|
-
state
|
|
159
|
-
version
|
|
160
|
-
createdAt
|
|
161
|
-
updatedAt
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
`,
|
|
165
|
-
variables: {
|
|
166
|
-
id
|
|
167
|
-
}
|
|
168
|
-
})
|
|
169
|
-
|
|
170
|
-
return response.data
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export async function revertBoardVersion(id, version) {
|
|
174
|
-
const response = await client.mutate({
|
|
175
|
-
mutation: gql`
|
|
176
|
-
mutation RevertBoardVersion($id: String!, $version: Float!) {
|
|
177
|
-
revertBoardVersion(id: $id, version: $version) {
|
|
178
|
-
name
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
`,
|
|
182
|
-
variables: {
|
|
183
|
-
id,
|
|
184
|
-
version
|
|
185
|
-
}
|
|
186
|
-
})
|
|
187
|
-
|
|
188
|
-
return response.data.revertBoardVersion
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export async function updateBoard(board) {
|
|
192
|
-
/*
|
|
193
|
-
input BoardPatch {
|
|
194
|
-
name : String
|
|
195
|
-
description : String
|
|
196
|
-
model : String
|
|
197
|
-
}
|
|
198
|
-
*/
|
|
199
|
-
var { id, name, description, model, groupId } = board
|
|
200
|
-
model = JSON.stringify(model)
|
|
201
|
-
|
|
202
|
-
const response = await client.mutate({
|
|
203
|
-
mutation: gql`
|
|
204
|
-
mutation UpdateBoard($id: String!, $patch: BoardPatch!) {
|
|
205
|
-
updateBoard(id: $id, patch: $patch) {
|
|
206
|
-
id
|
|
207
|
-
name
|
|
208
|
-
description
|
|
209
|
-
model
|
|
210
|
-
group {
|
|
211
|
-
id
|
|
212
|
-
name
|
|
213
|
-
}
|
|
214
|
-
state
|
|
215
|
-
version
|
|
216
|
-
createdAt
|
|
217
|
-
updatedAt
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
`,
|
|
221
|
-
variables: {
|
|
222
|
-
id,
|
|
223
|
-
patch: { name, description, model, groupId }
|
|
224
|
-
}
|
|
225
|
-
})
|
|
226
|
-
|
|
227
|
-
return response.data
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export async function deleteBoard(id) {
|
|
231
|
-
const response = await client.mutate({
|
|
232
|
-
mutation: gql`
|
|
233
|
-
mutation ($id: String!) {
|
|
234
|
-
deleteBoard(id: $id)
|
|
235
|
-
}
|
|
236
|
-
`,
|
|
237
|
-
variables: {
|
|
238
|
-
id
|
|
239
|
-
}
|
|
240
|
-
})
|
|
241
|
-
|
|
242
|
-
return response.data
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export async function importBoards({
|
|
246
|
-
groupId,
|
|
247
|
-
files,
|
|
248
|
-
overwrite
|
|
249
|
-
}: {
|
|
250
|
-
groupId: string
|
|
251
|
-
files: File[]
|
|
252
|
-
overwrite: boolean
|
|
253
|
-
}) {
|
|
254
|
-
const response = await client.mutate({
|
|
255
|
-
mutation: gql`
|
|
256
|
-
mutation importBoards($groupId: String!, $files: [Upload!]!, $overwrite: Boolean!) {
|
|
257
|
-
importBoards(groupId: $groupId, files: $files, overwrite: $overwrite) {
|
|
258
|
-
id
|
|
259
|
-
name
|
|
260
|
-
description
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
`,
|
|
264
|
-
variables: {
|
|
265
|
-
groupId,
|
|
266
|
-
files,
|
|
267
|
-
overwrite
|
|
268
|
-
},
|
|
269
|
-
context: { hasUpload: true }
|
|
270
|
-
})
|
|
271
|
-
|
|
272
|
-
return response.data
|
|
273
|
-
}
|
|
@@ -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 fetchFavoriteBoardList(listParam = {}) {
|
|
6
|
-
const response = await client.query({
|
|
7
|
-
query: gql`
|
|
8
|
-
{
|
|
9
|
-
favoriteBoards(${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
|
-
}
|
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
|
-
}
|