@things-factory/board-ui 10.1.41 → 10.1.42
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/board-list/board-thumb.d.ts +33 -0
- package/dist-client/board-list/board-thumb.js +119 -0
- package/dist-client/board-list/board-thumb.js.map +1 -0
- package/dist-client/graphql/favorite-board.js +3 -0
- package/dist-client/graphql/favorite-board.js.map +1 -1
- package/dist-client/graphql/my-board.js +3 -0
- package/dist-client/graphql/my-board.js.map +1 -1
- package/dist-client/graphql/play-group.js +2 -0
- package/dist-client/graphql/play-group.js.map +1 -1
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +1 -0
- package/dist-client/index.js.map +1 -1
- package/dist-client/pages/board-list-page.d.ts +39 -42
- package/dist-client/pages/board-list-page.js +388 -284
- package/dist-client/pages/board-list-page.js.map +1 -1
- package/dist-client/pages/board-modeller-page.d.ts +2 -0
- package/dist-client/pages/board-modeller-page.js +18 -1
- package/dist-client/pages/board-modeller-page.js.map +1 -1
- package/dist-client/pages/board-template/board-template-list-page.d.ts +21 -10
- package/dist-client/pages/board-template/board-template-list-page.js +147 -136
- package/dist-client/pages/board-template/board-template-list-page.js.map +1 -1
- package/dist-client/pages/play-list-page.d.ts +22 -12
- package/dist-client/pages/play-list-page.js +264 -113
- package/dist-client/pages/play-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/setting-let/board-modeller-setting-let.d.ts +21 -0
- package/dist-client/setting-let/board-modeller-setting-let.js +144 -0
- package/dist-client/setting-let/board-modeller-setting-let.js.map +1 -0
- package/dist-client/styles/board-card-styles.d.ts +11 -0
- package/dist-client/styles/board-card-styles.js +90 -0
- package/dist-client/styles/board-card-styles.js.map +1 -0
- package/dist-client/themes/board-theme.css +32 -19
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/board-meta.d.ts +10 -0
- package/dist-client/utils/board-meta.js +34 -0
- package/dist-client/utils/board-meta.js.map +1 -0
- package/dist-client/viewparts/board-basic-info.d.ts +38 -7
- package/dist-client/viewparts/board-basic-info.js +378 -349
- package/dist-client/viewparts/board-basic-info.js.map +1 -1
- package/dist-client/viewparts/board-info-link.d.ts +5 -1
- package/dist-client/viewparts/board-info-link.js +79 -21
- package/dist-client/viewparts/board-info-link.js.map +1 -1
- package/dist-client/viewparts/board-info-template.d.ts +15 -0
- package/dist-client/viewparts/board-info-template.js +97 -0
- package/dist-client/viewparts/board-info-template.js.map +1 -0
- package/dist-client/viewparts/board-info.d.ts +5 -0
- package/dist-client/viewparts/board-info.js +24 -73
- package/dist-client/viewparts/board-info.js.map +1 -1
- package/dist-client/viewparts/board-template-builder.d.ts +1 -0
- package/dist-client/viewparts/board-template-builder.js +37 -65
- package/dist-client/viewparts/board-template-builder.js.map +1 -1
- package/dist-client/viewparts/board-template-info.d.ts +3 -0
- package/dist-client/viewparts/board-template-info.js +75 -134
- package/dist-client/viewparts/board-template-info.js.map +1 -1
- package/dist-client/viewparts/group-info-basic.d.ts +8 -3
- package/dist-client/viewparts/group-info-basic.js +54 -190
- package/dist-client/viewparts/group-info-basic.js.map +1 -1
- package/dist-client/viewparts/group-info-import.d.ts +3 -1
- package/dist-client/viewparts/group-info-import.js +29 -62
- package/dist-client/viewparts/group-info-import.js.map +1 -1
- package/dist-client/viewparts/group-info.d.ts +4 -0
- package/dist-client/viewparts/group-info.js +21 -55
- package/dist-client/viewparts/group-info.js.map +1 -1
- package/dist-client/viewparts/info-dialog-styles.d.ts +19 -0
- package/dist-client/viewparts/info-dialog-styles.js +194 -0
- package/dist-client/viewparts/info-dialog-styles.js.map +1 -0
- package/dist-client/viewparts/link-builder.d.ts +3 -0
- package/dist-client/viewparts/link-builder.js +87 -81
- package/dist-client/viewparts/link-builder.js.map +1 -1
- package/dist-client/viewparts/play-group-info-basic.d.ts +4 -3
- package/dist-client/viewparts/play-group-info-basic.js +49 -188
- package/dist-client/viewparts/play-group-info-basic.js.map +1 -1
- package/dist-client/viewparts/play-group-info.d.ts +4 -0
- package/dist-client/viewparts/play-group-info.js +22 -53
- package/dist-client/viewparts/play-group-info.js.map +1 -1
- package/package.json +4 -4
- package/translations/en.json +32 -0
- package/translations/ja.json +10 -0
- package/translations/ko.json +32 -0
- package/translations/ms.json +8 -0
- package/translations/zh.json +10 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** "3 days ago", in the current UI language; empty when there is no date. */
|
|
2
|
+
export declare function timeAgo(value?: string | number | Date): string;
|
|
3
|
+
/**
|
|
4
|
+
* The one line under a board's name in the catalog: which release it is, and how fresh.
|
|
5
|
+
* Both are what an operator picks a board by, once the picture has told them what it is.
|
|
6
|
+
*/
|
|
7
|
+
export declare function boardMeta(board: {
|
|
8
|
+
version?: number;
|
|
9
|
+
updatedAt?: string;
|
|
10
|
+
}): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { i18next } from '@operato/i18n';
|
|
2
|
+
const UNITS = [
|
|
3
|
+
['year', 365 * 24 * 60 * 60 * 1000],
|
|
4
|
+
['month', 30 * 24 * 60 * 60 * 1000],
|
|
5
|
+
['day', 24 * 60 * 60 * 1000],
|
|
6
|
+
['hour', 60 * 60 * 1000],
|
|
7
|
+
['minute', 60 * 1000]
|
|
8
|
+
];
|
|
9
|
+
/** "3 days ago", in the current UI language; empty when there is no date. */
|
|
10
|
+
export function timeAgo(value) {
|
|
11
|
+
if (!value)
|
|
12
|
+
return '';
|
|
13
|
+
const then = new Date(value).getTime();
|
|
14
|
+
if (Number.isNaN(then))
|
|
15
|
+
return '';
|
|
16
|
+
const diff = then - Date.now();
|
|
17
|
+
const rtf = new Intl.RelativeTimeFormat(i18next.language || 'en', { numeric: 'auto' });
|
|
18
|
+
for (const [unit, ms] of UNITS) {
|
|
19
|
+
if (Math.abs(diff) >= ms) {
|
|
20
|
+
return rtf.format(Math.round(diff / ms), unit);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return rtf.format(0, 'minute');
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The one line under a board's name in the catalog: which release it is, and how fresh.
|
|
27
|
+
* Both are what an operator picks a board by, once the picture has told them what it is.
|
|
28
|
+
*/
|
|
29
|
+
export function boardMeta(board) {
|
|
30
|
+
const version = `v${board.version ?? 0}`;
|
|
31
|
+
const ago = timeAgo(board.updatedAt);
|
|
32
|
+
return ago ? `${version} · ${ago}` : version;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=board-meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-meta.js","sourceRoot":"","sources":["../../client/utils/board-meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,MAAM,KAAK,GAA4C;IACrD,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACnC,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACnC,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC5B,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACxB,CAAC,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAC;CACtB,CAAA;AAED,6EAA6E;AAC7E,MAAM,UAAU,OAAO,CAAC,KAA8B;IACpD,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAA;IAErB,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAA;IACtC,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAA;IAEjC,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAC9B,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;IAEtF,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YACzB,OAAO,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;QAChD,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;AAChC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAA+C;IACvE,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,EAAE,CAAA;IACxC,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;IAEpC,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAA;AAC9C,CAAC","sourcesContent":["import { i18next } from '@operato/i18n'\n\nconst UNITS: [Intl.RelativeTimeFormatUnit, number][] = [\n ['year', 365 * 24 * 60 * 60 * 1000],\n ['month', 30 * 24 * 60 * 60 * 1000],\n ['day', 24 * 60 * 60 * 1000],\n ['hour', 60 * 60 * 1000],\n ['minute', 60 * 1000]\n]\n\n/** \"3 days ago\", in the current UI language; empty when there is no date. */\nexport function timeAgo(value?: string | number | Date): string {\n if (!value) return ''\n\n const then = new Date(value).getTime()\n if (Number.isNaN(then)) return ''\n\n const diff = then - Date.now()\n const rtf = new Intl.RelativeTimeFormat(i18next.language || 'en', { numeric: 'auto' })\n\n for (const [unit, ms] of UNITS) {\n if (Math.abs(diff) >= ms) {\n return rtf.format(Math.round(diff / ms), unit)\n }\n }\n\n return rtf.format(0, 'minute')\n}\n\n/**\n * The one line under a board's name in the catalog: which release it is, and how fresh.\n * Both are what an operator picks a board by, once the picture has told them what it is.\n */\nexport function boardMeta(board: { version?: number; updatedAt?: string }): string {\n const version = `v${board.version ?? 0}`\n const ago = timeAgo(board.updatedAt)\n\n return ago ? `${version} · ${ago}` : version\n}\n"]}
|
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
import '@material/web/icon/icon.js';
|
|
2
|
-
import '@material/web/
|
|
3
|
-
import '@material/web/
|
|
4
|
-
import '@material/web/button/
|
|
2
|
+
import '@material/web/iconbutton/icon-button.js';
|
|
3
|
+
import '@material/web/button/filled-button.js';
|
|
4
|
+
import '@material/web/button/outlined-button.js';
|
|
5
|
+
import '@material/web/button/text-button.js';
|
|
5
6
|
import '@material/web/chips/chip-set.js';
|
|
6
|
-
import '@material/web/chips/assist-chip.js';
|
|
7
7
|
import '@material/web/chips/filter-chip.js';
|
|
8
|
-
import '@material/web/
|
|
8
|
+
import '@material/web/menu/menu.js';
|
|
9
|
+
import '@material/web/menu/menu-item.js';
|
|
10
|
+
import '@material/web/divider/divider.js';
|
|
11
|
+
import '@operato/input/ox-input-select-buttons.js';
|
|
9
12
|
import { LitElement } from 'lit';
|
|
13
|
+
/**
|
|
14
|
+
* The basic tab of the board dialog.
|
|
15
|
+
*
|
|
16
|
+
* ## The shape, and why
|
|
17
|
+
*
|
|
18
|
+
* Three kinds of thing used to share one scrolling form: fields that wait for Save, actions that
|
|
19
|
+
* happen the moment you touch them (release, join a play group), and a copy-to-domain panel hidden
|
|
20
|
+
* behind a caret next to the name. The Save button sat in the middle of all that and scrolled out
|
|
21
|
+
* of view on a short screen.
|
|
22
|
+
*
|
|
23
|
+
* Now the dialog reads top to bottom as: what this is (a status band), what you can change (the
|
|
24
|
+
* form, committed by Save), where it plays (membership chips, which apply at once and say so), and
|
|
25
|
+
* a footer that never scrolls away: the primary Save, the way into the modeller, and everything
|
|
26
|
+
* else - duplicate, export, release, delete - behind one "more" menu so the footer stays two
|
|
27
|
+
* buttons wide. Duplicate opens its own small panel with its own Copy and Cancel.
|
|
28
|
+
*
|
|
29
|
+
* ## Colour
|
|
30
|
+
*
|
|
31
|
+
* The accent (board's earth brown) is spent on three things only: the filled Save, the selected
|
|
32
|
+
* segment, and the pressed play-group chip. Everything else is the neutral scale - the status band
|
|
33
|
+
* is a low surface, the draft pill a warm secondary container, released a soft tertiary green -
|
|
34
|
+
* so the one thing you are meant to press is the one thing in colour.
|
|
35
|
+
*/
|
|
10
36
|
export declare class BoardInfo extends LitElement {
|
|
11
37
|
static styles: import("lit").CSSResult[];
|
|
12
38
|
boardId?: string;
|
|
@@ -14,7 +40,7 @@ export declare class BoardInfo extends LitElement {
|
|
|
14
40
|
board: any;
|
|
15
41
|
boardGroupList: any[];
|
|
16
42
|
playGroupList: any[];
|
|
17
|
-
|
|
43
|
+
duplicating: boolean;
|
|
18
44
|
enableModeller?: boolean;
|
|
19
45
|
private _appCtrl;
|
|
20
46
|
targetDomains: {
|
|
@@ -28,12 +54,17 @@ export declare class BoardInfo extends LitElement {
|
|
|
28
54
|
}[];
|
|
29
55
|
targetSubdomain?: string;
|
|
30
56
|
targetGroupId?: string;
|
|
57
|
+
private menu;
|
|
31
58
|
private original;
|
|
32
59
|
render(): import("lit-html").TemplateResult<1>;
|
|
60
|
+
private renderWhat;
|
|
61
|
+
private renderDuplicate;
|
|
33
62
|
firstUpdated(): Promise<void>;
|
|
34
63
|
refresh(): Promise<void>;
|
|
35
64
|
getGroupsByDomain(subdomain?: string): Promise<void>;
|
|
36
|
-
|
|
65
|
+
/** Something in the form differs from what the server has. */
|
|
66
|
+
get isDirty(): boolean;
|
|
67
|
+
get isReleasable(): boolean;
|
|
37
68
|
cloneBoard(): Promise<void>;
|
|
38
69
|
exportBoard(): Promise<void>;
|
|
39
70
|
releaseBoard(): Promise<void>;
|