@things-factory/figure-ui 10.1.5 → 10.1.7
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/graphql/index.ts +36 -3
- package/client/modeller/figure-animations.ts +712 -0
- package/client/modeller/figure-ask.ts +5 -5
- package/client/modeller/figure-canvas.ts +1 -1
- package/client/modeller/figure-capabilities.ts +372 -0
- package/client/modeller/figure-history-panel.ts +171 -18
- package/client/modeller/figure-inspector.ts +439 -76
- package/client/modeller/figure-parts.ts +15 -15
- package/client/modeller/figure-preview.ts +2 -2
- package/client/modeller/figure-report.ts +102 -37
- package/client/modeller/figure-settings.ts +20 -20
- package/client/modeller/figure-side.ts +91 -15
- package/client/modeller/figure-source.test.ts +15 -1
- package/client/modeller/figure-source.ts +31 -15
- package/client/modeller/figure-thumbnail.ts +49 -4
- package/client/modeller/maturity.ts +10 -10
- package/client/pages/figure-list-page.ts +204 -66
- package/client/pages/figure-modeller-page.ts +158 -42
- package/client/types.ts +31 -0
- package/client/viewparts/figure-thumb.ts +250 -0
- package/dist-client/graphql/index.d.ts +8 -1
- package/dist-client/graphql/index.js +33 -3
- package/dist-client/graphql/index.js.map +1 -1
- package/dist-client/modeller/figure-animations.d.ts +93 -0
- package/dist-client/modeller/figure-animations.js +655 -0
- package/dist-client/modeller/figure-animations.js.map +1 -0
- package/dist-client/modeller/figure-ask.js +5 -5
- package/dist-client/modeller/figure-ask.js.map +1 -1
- package/dist-client/modeller/figure-canvas.js +1 -1
- package/dist-client/modeller/figure-canvas.js.map +1 -1
- package/dist-client/modeller/figure-capabilities.d.ts +42 -0
- package/dist-client/modeller/figure-capabilities.js +344 -0
- package/dist-client/modeller/figure-capabilities.js.map +1 -0
- package/dist-client/modeller/figure-history-panel.d.ts +15 -1
- package/dist-client/modeller/figure-history-panel.js +165 -18
- package/dist-client/modeller/figure-history-panel.js.map +1 -1
- package/dist-client/modeller/figure-inspector.d.ts +98 -0
- package/dist-client/modeller/figure-inspector.js +425 -75
- package/dist-client/modeller/figure-inspector.js.map +1 -1
- package/dist-client/modeller/figure-parts.js +15 -15
- package/dist-client/modeller/figure-parts.js.map +1 -1
- package/dist-client/modeller/figure-preview.js +2 -2
- package/dist-client/modeller/figure-preview.js.map +1 -1
- package/dist-client/modeller/figure-report.d.ts +18 -1
- package/dist-client/modeller/figure-report.js +105 -37
- package/dist-client/modeller/figure-report.js.map +1 -1
- package/dist-client/modeller/figure-settings.js +19 -19
- package/dist-client/modeller/figure-settings.js.map +1 -1
- package/dist-client/modeller/figure-side.d.ts +24 -0
- package/dist-client/modeller/figure-side.js +94 -14
- package/dist-client/modeller/figure-side.js.map +1 -1
- package/dist-client/modeller/figure-source.d.ts +15 -8
- package/dist-client/modeller/figure-source.js +16 -7
- package/dist-client/modeller/figure-source.js.map +1 -1
- package/dist-client/modeller/figure-thumbnail.js +40 -4
- package/dist-client/modeller/figure-thumbnail.js.map +1 -1
- package/dist-client/modeller/maturity.js +10 -10
- package/dist-client/modeller/maturity.js.map +1 -1
- package/dist-client/pages/figure-list-page.d.ts +11 -4
- package/dist-client/pages/figure-list-page.js +201 -63
- package/dist-client/pages/figure-list-page.js.map +1 -1
- package/dist-client/pages/figure-modeller-page.d.ts +33 -0
- package/dist-client/pages/figure-modeller-page.js +156 -42
- package/dist-client/pages/figure-modeller-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/types.d.ts +29 -0
- package/dist-client/types.js.map +1 -1
- package/dist-client/viewparts/figure-thumb.d.ts +29 -0
- package/dist-client/viewparts/figure-thumb.js +242 -0
- package/dist-client/viewparts/figure-thumb.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -5
- package/test/i18n-prefix-guard.test.ts +171 -0
- package/test/korean-register-guard.test.ts +83 -0
- package/translations/en.json +351 -264
- package/translations/ja.json +276 -264
- package/translations/ko.json +351 -264
- package/translations/ms.json +276 -264
- package/translations/zh.json +276 -264
package/client/graphql/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { client } from '@operato/graphql'
|
|
|
4
4
|
import type {
|
|
5
5
|
Figure,
|
|
6
6
|
FigureFinding,
|
|
7
|
+
FigureInspection,
|
|
7
8
|
FigureListResult,
|
|
8
9
|
FigurePatch,
|
|
9
10
|
FigureProposal,
|
|
@@ -37,8 +38,10 @@ function unwrap<T>(response: { data?: Record<string, unknown>; errors?: readonly
|
|
|
37
38
|
/**
|
|
38
39
|
* 목록에 필요한 필드만 가져온다 — `source` 는 무겁고 목록에서 쓰지 않는다.
|
|
39
40
|
*
|
|
40
|
-
* `
|
|
41
|
-
*
|
|
41
|
+
* **`thumbnail` 도 여기 없다.** base64 문자열이라 목록 응답에 실으면 카탈로그를 열 때마다 그림
|
|
42
|
+
* 전부가 다시 오고(표본 14개 227KB), data URL 은 브라우저가 캐시하지 못한다. 그림은 주소로
|
|
43
|
+
* 부른다(`figure-thumbnail` 라우트). 대신 `thumbnailUpdatedAt` 을 받는다 — 그림이 있나 없나를
|
|
44
|
+
* 그것으로 알고, 판을 가리는 값으로도 쓴다.
|
|
42
45
|
*/
|
|
43
46
|
const FIGURE_LIST_FIELDS = `
|
|
44
47
|
id
|
|
@@ -46,12 +49,12 @@ const FIGURE_LIST_FIELDS = `
|
|
|
46
49
|
name
|
|
47
50
|
description
|
|
48
51
|
category
|
|
52
|
+
tags
|
|
49
53
|
state
|
|
50
54
|
version
|
|
51
55
|
score
|
|
52
56
|
triangles
|
|
53
57
|
groups
|
|
54
|
-
thumbnail
|
|
55
58
|
thumbnailUpdatedAt
|
|
56
59
|
updatedAt
|
|
57
60
|
updater { id name }
|
|
@@ -259,6 +262,36 @@ export async function revertFigureVersion(id: string, version: number): Promise<
|
|
|
259
262
|
return unwrap<SaveResult>(response, 'revertFigureVersion')
|
|
260
263
|
}
|
|
261
264
|
|
|
265
|
+
/**
|
|
266
|
+
* 발행해도 되나 — **누르기 전에** 묻는다.
|
|
267
|
+
*
|
|
268
|
+
* 막는 것은 서버의 `releaseFigure` 이고 이것은 이유를 미리 보여 주기 위한 것이다. 허가증이
|
|
269
|
+
* 아니므로 이 답이 통과라 해도 발행은 다시 판정을 받는다.
|
|
270
|
+
*/
|
|
271
|
+
export async function inspectFigure(id: string): Promise<FigureInspection> {
|
|
272
|
+
const response = await client.query({
|
|
273
|
+
query: gql`
|
|
274
|
+
query InspectFigure($id: String!) {
|
|
275
|
+
inspectFigure(id: $id) {
|
|
276
|
+
blocked
|
|
277
|
+
findings {
|
|
278
|
+
code
|
|
279
|
+
message
|
|
280
|
+
why
|
|
281
|
+
how
|
|
282
|
+
at
|
|
283
|
+
blocking
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
`,
|
|
288
|
+
variables: { id },
|
|
289
|
+
fetchPolicy: 'network-only'
|
|
290
|
+
})
|
|
291
|
+
|
|
292
|
+
return unwrap<FigureInspection>(response, 'inspectFigure')
|
|
293
|
+
}
|
|
294
|
+
|
|
262
295
|
/** 발행된 판들 — 최근 것부터 열 개. */
|
|
263
296
|
export async function fetchFigureVersions(id: string): Promise<FigureVersion[]> {
|
|
264
297
|
const response = await client.query({
|