@things-factory/board-ui 6.2.0 → 6.2.5

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.
Files changed (31) hide show
  1. package/client/board-list/board-tile-list.ts +1 -0
  2. package/client/board-list/group-bar.ts +7 -1
  3. package/client/graphql/index.ts +1 -0
  4. package/client/graphql/my-board.ts +25 -0
  5. package/client/pages/{board-list-page.js → board-list-page.ts} +127 -64
  6. package/client/pages/{play-list-page.js → play-list-page.ts} +38 -40
  7. package/dist-client/board-list/board-tile-list.d.ts +1 -0
  8. package/dist-client/board-list/board-tile-list.js +4 -0
  9. package/dist-client/board-list/board-tile-list.js.map +1 -1
  10. package/dist-client/board-list/group-bar.d.ts +1 -0
  11. package/dist-client/board-list/group-bar.js +10 -1
  12. package/dist-client/board-list/group-bar.js.map +1 -1
  13. package/dist-client/graphql/index.d.ts +1 -0
  14. package/dist-client/graphql/index.js +1 -0
  15. package/dist-client/graphql/index.js.map +1 -1
  16. package/dist-client/graphql/my-board.d.ts +1 -0
  17. package/dist-client/graphql/my-board.js +24 -0
  18. package/dist-client/graphql/my-board.js.map +1 -0
  19. package/dist-client/pages/board-list-page.d.ts +103 -0
  20. package/dist-client/pages/board-list-page.js +144 -63
  21. package/dist-client/pages/board-list-page.js.map +1 -1
  22. package/dist-client/pages/play-list-page.d.ts +57 -0
  23. package/dist-client/pages/play-list-page.js +62 -41
  24. package/dist-client/pages/play-list-page.js.map +1 -1
  25. package/dist-client/pages/theme/theme-editors.d.ts +1 -1
  26. package/dist-client/tsconfig.tsbuildinfo +1 -1
  27. package/dist-server/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +2 -2
  29. package/dist-client/viewparts/menu-tools.d.ts +0 -20
  30. package/dist-client/viewparts/menu-tools.js +0 -147
  31. package/dist-client/viewparts/menu-tools.js.map +0 -1
@@ -1,3 +1,4 @@
1
+ import { __decorate, __metadata } from "tslib";
1
2
  import '@material/mwc-fab';
2
3
  import '@material/mwc-icon';
3
4
  import '../viewparts/play-group-info';
@@ -5,6 +6,7 @@ import '../board-list/board-tile-list';
5
6
  import '../board-list/play-group-bar';
6
7
  import gql from 'graphql-tag';
7
8
  import { css, html } from 'lit';
9
+ import { customElement, property, query } from 'lit/decorators.js';
8
10
  import { connect } from 'pwa-helpers/connect-mixin.js';
9
11
  import { UPDATE_FAVORITES } from '@things-factory/fav-base';
10
12
  import { openOverlay } from '@operato/layout';
@@ -14,41 +16,13 @@ import { i18next, localize } from '@operato/i18n';
14
16
  import { ScrollbarStyles } from '@operato/styles';
15
17
  import { pulltorefresh } from '@operato/pull-to-refresh';
16
18
  import { swipe, isMobileDevice } from '@things-factory/utils';
17
- import { createPlayGroup, deletePlayGroup, fetchPlayGroup, fetchPlayGroupList, leavePlayGroup, updateBoard, updatePlayGroup } from '../graphql';
18
- class PlayListPage extends localize(i18next)(connect(store)(PageView)) {
19
- static get styles() {
20
- return [
21
- ScrollbarStyles,
22
- css `
23
- :host {
24
- display: flex;
25
- flex-direction: column;
26
- position: relative;
27
-
28
- overflow: hidden;
29
- }
30
-
31
- board-tile-list {
32
- flex: 1;
33
- overflow-y: auto;
34
- }
35
-
36
- #play {
37
- position: absolute;
38
- bottom: 15px;
39
- right: 16px;
40
- text-decoration: auto;
41
- }
42
- `
43
- ];
44
- }
45
- static get properties() {
46
- return {
47
- groupId: String,
48
- groups: Array,
49
- boards: Array,
50
- favorites: Array
51
- };
19
+ import { createPlayGroup, deletePlayGroup, fetchPlayGroup, fetchPlayGroupList, updateBoard, updatePlayGroup } from '../graphql';
20
+ let PlayListPage = class PlayListPage extends localize(i18next)(connect(store)(PageView)) {
21
+ constructor() {
22
+ super(...arguments);
23
+ this.groups = [];
24
+ this.boards = [];
25
+ this.favorites = [];
52
26
  }
53
27
  get context() {
54
28
  var group = this.groups && this.groups.find(group => group.id === this.groupId);
@@ -96,10 +70,10 @@ class PlayListPage extends localize(i18next)(connect(store)(PageView)) {
96
70
  }
97
71
  if (!this.groupId) {
98
72
  let groupId = this.groups && this.groups[0] && this.groups[0].id;
99
- var newURL = new URL(window.location);
73
+ var newURL = new URL(window.location.href);
100
74
  newURL.pathname += `/${groupId}`;
101
75
  if (groupId) {
102
- navigate(newURL, true);
76
+ navigate(newURL.href, true);
103
77
  }
104
78
  return;
105
79
  }
@@ -111,7 +85,7 @@ class PlayListPage extends localize(i18next)(connect(store)(PageView)) {
111
85
  this.boards = [];
112
86
  }
113
87
  this.updateContext();
114
- var list = this.shadowRoot.querySelector('board-tile-list');
88
+ var list = this.boardTileList;
115
89
  list.style.transition = '';
116
90
  list.style.transform = `translate3d(0, 0, 0)`;
117
91
  }
@@ -130,7 +104,7 @@ class PlayListPage extends localize(i18next)(connect(store)(PageView)) {
130
104
  this.favorites = state.favorite.favorites;
131
105
  }
132
106
  firstUpdated() {
133
- var list = this.shadowRoot.querySelector('board-tile-list');
107
+ var list = this.boardTileList;
134
108
  pulltorefresh({
135
109
  container: this.shadowRoot,
136
110
  scrollable: list,
@@ -338,6 +312,53 @@ class PlayListPage extends localize(i18next)(connect(store)(PageView)) {
338
312
  }
339
313
  }));
340
314
  }
341
- }
342
- window.customElements.define('play-list-page', PlayListPage);
315
+ };
316
+ PlayListPage.styles = [
317
+ ScrollbarStyles,
318
+ css `
319
+ :host {
320
+ display: flex;
321
+ flex-direction: column;
322
+ position: relative;
323
+
324
+ overflow: hidden;
325
+ }
326
+
327
+ board-tile-list {
328
+ flex: 1;
329
+ overflow-y: auto;
330
+ }
331
+
332
+ #play {
333
+ position: absolute;
334
+ bottom: 15px;
335
+ right: 16px;
336
+ text-decoration: auto;
337
+ }
338
+ `
339
+ ];
340
+ __decorate([
341
+ property({ type: String }),
342
+ __metadata("design:type", String)
343
+ ], PlayListPage.prototype, "groupId", void 0);
344
+ __decorate([
345
+ property({ type: Array }),
346
+ __metadata("design:type", Array)
347
+ ], PlayListPage.prototype, "groups", void 0);
348
+ __decorate([
349
+ property({ type: Array }),
350
+ __metadata("design:type", Array)
351
+ ], PlayListPage.prototype, "boards", void 0);
352
+ __decorate([
353
+ property({ type: Array }),
354
+ __metadata("design:type", Array)
355
+ ], PlayListPage.prototype, "favorites", void 0);
356
+ __decorate([
357
+ query('board-tile-list'),
358
+ __metadata("design:type", HTMLElement)
359
+ ], PlayListPage.prototype, "boardTileList", void 0);
360
+ PlayListPage = __decorate([
361
+ customElement('play-list-page')
362
+ ], PlayListPage);
363
+ export { PlayListPage };
343
364
  //# sourceMappingURL=play-list-page.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"play-list-page.js","sourceRoot":"","sources":["../../client/pages/play-list-page.js"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,8BAA8B,CAAA;AACrC,OAAO,+BAA+B,CAAA;AACtC,OAAO,8BAA8B,CAAA;AAErC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,eAAe,EAChB,MAA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gBAAgB;QACpB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;OAOT;SACF,CAAC,CAAA;QAEF,KAAK,CAAC,QAAQ,CAAC;YACb,IAAI,EAAE,gBAAgB;YACtB,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;SACvE,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,QAAQ,CAAC,aAAa,CACpB,IAAI,WAAW,CAAC,QAAQ,EAAE;YACxB,MAAM,EAAE;gBACN,KAAK;gBACL,OAAO;gBACP,EAAE;aACH;SACF,CAAC,CACH,CAAA;IACH,CAAC;CACF;AAED,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAA","sourcesContent":["import '@material/mwc-fab'\nimport '@material/mwc-icon'\nimport '../viewparts/play-group-info'\nimport '../board-list/board-tile-list'\nimport '../board-list/play-group-bar'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { connect } from 'pwa-helpers/connect-mixin.js'\n\nimport { UPDATE_FAVORITES } from '@things-factory/fav-base'\nimport { openOverlay } from '@operato/layout'\nimport { navigate, PageView, store } from '@operato/shell'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { pulltorefresh } from '@operato/pull-to-refresh'\nimport { swipe, isMobileDevice } from '@things-factory/utils'\n\nimport {\n createPlayGroup,\n deletePlayGroup,\n fetchPlayGroup,\n fetchPlayGroupList,\n leavePlayGroup,\n updateBoard,\n updatePlayGroup\n} from '../graphql'\n\nclass PlayListPage extends localize(i18next)(connect(store)(PageView)) {\n static get styles() {\n return [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n position: relative;\n\n overflow: hidden;\n }\n\n board-tile-list {\n flex: 1;\n overflow-y: auto;\n }\n\n #play {\n position: absolute;\n bottom: 15px;\n right: 16px;\n text-decoration: auto;\n }\n `\n ]\n }\n\n static get properties() {\n return {\n groupId: String,\n groups: Array,\n boards: Array,\n favorites: Array\n }\n }\n\n get context() {\n var group = this.groups && this.groups.find(group => group.id === this.groupId)\n\n return {\n title: {\n icon: 'video_library',\n text: group ? group.name : 'Play List'\n },\n board_topmenu: true\n }\n }\n\n render() {\n return html`\n <play-group-bar\n .groups=${this.groups}\n .groupId=${this.groupId}\n target-page=\"play-list\"\n @info-play-group=${e => this.onInfoPlayGroup(e.detail)}\n ></play-group-bar>\n\n <board-tile-list\n .favorites=${this.favorites}\n .boards=${this.boards}\n .group=${this.groupId}\n @info-board=${e => this.onInfoBoard(e.detail)}\n @delete-board=${e => this.onDeleteBoard(e.detail)}\n @refresh-favorites=${e => this.refreshFavorites()}\n @reordered=${e => this.onReorder(e.detail)}\n reorderable\n ></board-tile-list>\n\n <a id=\"play\" .href=${'board-player/' + this.groupId}>\n <mwc-fab icon=\"play_arrow\" title=\"play\"> </mwc-fab>\n </a>\n `\n }\n\n async refresh() {\n this.groups = (await fetchPlayGroupList()).playGroups.items\n\n this.groups && (await this.refreshBoards())\n }\n\n async refreshBoards() {\n if (!this.groups) {\n await this.refresh()\n return\n }\n\n if (!this.groupId) {\n let groupId = this.groups && this.groups[0] && this.groups[0].id\n var newURL = new URL(window.location)\n\n newURL.pathname += `/${groupId}`\n\n if (groupId) {\n navigate(newURL, true)\n }\n return\n }\n\n if (this.groupId) {\n var playGroup = (await fetchPlayGroup(this.groupId)).playGroup\n this.boards = playGroup ? playGroup.boards : []\n } else {\n this.boards = []\n }\n\n this.updateContext()\n\n var list = this.shadowRoot.querySelector('board-tile-list')\n\n list.style.transition = ''\n list.style.transform = `translate3d(0, 0, 0)`\n }\n\n async pageInitialized() {\n this.refresh()\n }\n\n async pageUpdated(changes, lifecycle) {\n if (this.active) {\n this.page = lifecycle.page\n this.groupId = lifecycle.resourceId\n\n await this.updateComplete\n\n this.refreshBoards()\n }\n }\n\n stateChanged(state) {\n this.favorites = state.favorite.favorites\n }\n\n firstUpdated() {\n var list = this.shadowRoot.querySelector('board-tile-list')\n\n pulltorefresh({\n container: this.shadowRoot,\n scrollable: list,\n refresh: () => {\n return this.refresh()\n }\n })\n\n if (isMobileDevice()) {\n swipe({\n container: list,\n animates: {\n dragging: async (d, opts) => {\n var groups = this.groups\n var currentIndex = groups.findIndex(group => group.id == this.groupId)\n\n if ((d > 0 && currentIndex <= 0) || (d < 0 && currentIndex >= groups.length - 1)) {\n /* TODO blocked gesture */\n return false\n }\n\n list.style.transform = `translate3d(${d}px, 0, 0)`\n },\n aborting: async opts => {\n list.style.transition = 'transform 0.3s'\n list.style.transform = `translate3d(0, 0, 0)`\n\n setTimeout(() => {\n list.style.transition = ''\n }, 300)\n },\n swiping: async (d, opts) => {\n var groups = this.groups\n var currentIndex = groups.findIndex(group => group.id == this.groupId)\n\n if ((d > 0 && currentIndex <= 0) || (d < 0 && currentIndex >= groups.length - 1)) {\n list.style.transition = ''\n list.style.transform = `translate3d(0, 0, 0)`\n } else {\n list.style.transition = 'transform 0.3s'\n list.style.transform = `translate3d(${d < 0 ? '-100%' : '100%'}, 0, 0)`\n\n navigate(`${this.page}/${groups[currentIndex + (d < 0 ? 1 : -1)].id}`)\n }\n }\n }\n })\n }\n }\n\n async onInfoBoard(board) {\n openOverlay('viewpart-info', {\n template: html`\n <board-info\n .board=${board}\n .groupId=${this.groupId}\n @update-board=${e => this.onUpdateBoard(e.detail)}\n @delete-board=${e => this.onDeleteBoard(e.detail)}\n @join-playgroup=${e => this.onJoinPlayGroup(e.detail)}\n @leave-playgroup=${e => this.onLeavePlayGroup(e.detail)}\n ></board-info>\n `\n })\n }\n\n async onInfoPlayGroup(group) {\n openOverlay('viewpart-info', {\n template: html`\n <play-group-info\n .playGroup=${group}\n @update-play-group=${e => this.onUpdatePlayGroup(e.detail)}\n @delete-play-group=${e => this.onDeletePlayGroup(e.detail)}\n @create-play-group=${e => this.onCreatePlayGroup(e.detail)}\n ></play-group-info>\n `\n })\n }\n\n async onCreatePlayGroup(playGroup) {\n try {\n await createPlayGroup(playGroup)\n this._notify('info', i18next.t('text.play-group created', { playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onUpdatePlayGroup(playGroup) {\n try {\n await updatePlayGroup(playGroup)\n this._notify('info', i18next.t('text.play-group updated', { playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onDeletePlayGroup(playGroup) {\n try {\n await deletePlayGroup(playGroup.id)\n this._notify('info', i18next.t('text.play-group deleted', { playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onUpdateBoard(board) {\n try {\n await updateBoard(board)\n this._notify('info', i18next.t('text.board updated', { board: board.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refreshBoards()\n }\n\n async onDeleteBoard(board) {\n const playGroup = this.groups && this.groups.find(group => group.id === this.groupId)\n await this.onLeavePlayGroup({ board, playGroup })\n }\n\n async onJoinPlayGroup({ board, playGroup }) {\n try {\n await client.mutate({\n mutation: gql`\n mutation JoinPlayGroup($id: String!, $boardIds: [String!]!) {\n joinPlayGroup(id: $id, boardIds: $boardIds) {\n id\n }\n }\n `,\n variables: {\n id: playGroup.id,\n boardIds: [board.id]\n }\n })\n\n this._notify('info', i18next.t('text.joined into play-group', { board: board.name, playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onLeavePlayGroup({ board, playGroup }) {\n try {\n await client.mutate({\n mutation: gql`\n mutation ($id: String!, $boardIds: [String!]!) {\n leavePlayGroup(id: $id, boardIds: $boardIds) {\n id\n }\n }\n `,\n variables: {\n id: playGroup.id,\n boardIds: [board.id]\n }\n })\n\n this._notify('info', i18next.t('text.leaved from play-group', { board: board.name, playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onReorder({ boardIds, groupId }) {\n try {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!, $boardIds: [String!]!) {\n reorderPlayGroup(id: $id, boardIds: $boardIds) {\n id\n name\n }\n }\n `,\n variables: {\n id: groupId,\n boardIds\n }\n })\n\n const playGroup = response.data.reorderPlayGroup\n\n this._notify('info', i18next.t('text.reorder play-group', { playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async refreshFavorites() {\n const response = await client.query({\n query: gql`\n query {\n myFavorites {\n id\n routing\n }\n }\n `\n })\n\n store.dispatch({\n type: UPDATE_FAVORITES,\n favorites: response.data.myFavorites.map(favorite => favorite.routing)\n })\n }\n\n _notify(level, message, ex) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level,\n message,\n ex\n }\n })\n )\n }\n}\n\nwindow.customElements.define('play-list-page', PlayListPage)\n"]}
1
+ {"version":3,"file":"play-list-page.js","sourceRoot":"","sources":["../../client/pages/play-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,8BAA8B,CAAA;AACrC,OAAO,+BAA+B,CAAA;AACtC,OAAO,8BAA8B,CAAA;AAErC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAmB,MAAM,mBAAmB,CAAA;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,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AAC;8BAAiB,WAAW;mDAAA;AA/B1C,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CA6WxB;SA7WY,YAAY","sourcesContent":["import '@material/mwc-fab'\nimport '@material/mwc-icon'\nimport '../viewparts/play-group-info'\nimport '../board-list/board-tile-list'\nimport '../board-list/play-group-bar'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAll, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin.js'\n\nimport { UPDATE_FAVORITES } from '@things-factory/fav-base'\nimport { openOverlay } from '@operato/layout'\nimport { navigate, PageView, store } from '@operato/shell'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { pulltorefresh } from '@operato/pull-to-refresh'\nimport { swipe, isMobileDevice } from '@things-factory/utils'\n\nimport {\n createPlayGroup,\n deletePlayGroup,\n fetchPlayGroup,\n fetchPlayGroupList,\n leavePlayGroup,\n updateBoard,\n updatePlayGroup\n} from '../graphql'\n\n@customElement('play-list-page')\nexport class PlayListPage extends localize(i18next)(connect(store)(PageView)) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n position: relative;\n\n overflow: hidden;\n }\n\n board-tile-list {\n flex: 1;\n overflow-y: auto;\n }\n\n #play {\n position: absolute;\n bottom: 15px;\n right: 16px;\n text-decoration: auto;\n }\n `\n ]\n\n @property({ type: String }) groupId?: string\n @property({ type: Array }) groups: any[] = []\n @property({ type: Array }) boards: any[] = []\n @property({ type: Array }) favorites: any[] = []\n\n @query('board-tile-list') boardTileList!: HTMLElement\n\n private page?: string\n\n get context() {\n var group = this.groups && this.groups.find(group => group.id === this.groupId)\n\n return {\n title: {\n icon: 'video_library',\n text: group ? group.name : 'Play List'\n },\n board_topmenu: true\n }\n }\n\n render() {\n return html`\n <play-group-bar\n .groups=${this.groups}\n .groupId=${this.groupId}\n target-page=\"play-list\"\n @info-play-group=${e => this.onInfoPlayGroup(e.detail)}\n ></play-group-bar>\n\n <board-tile-list\n .favorites=${this.favorites}\n .boards=${this.boards}\n .group=${this.groupId}\n @info-board=${e => this.onInfoBoard(e.detail)}\n @delete-board=${e => this.onDeleteBoard(e.detail)}\n @refresh-favorites=${e => this.refreshFavorites()}\n @reordered=${e => this.onReorder(e.detail)}\n reorderable\n ></board-tile-list>\n\n <a id=\"play\" .href=${'board-player/' + this.groupId}>\n <mwc-fab icon=\"play_arrow\" title=\"play\"> </mwc-fab>\n </a>\n `\n }\n\n async refresh() {\n this.groups = (await fetchPlayGroupList()).playGroups.items\n\n this.groups && (await this.refreshBoards())\n }\n\n async refreshBoards() {\n if (!this.groups) {\n await this.refresh()\n return\n }\n\n if (!this.groupId) {\n let groupId = this.groups && this.groups[0] && this.groups[0].id\n var newURL = new URL(window.location.href)\n\n newURL.pathname += `/${groupId}`\n\n if (groupId) {\n navigate(newURL.href, true)\n }\n return\n }\n\n if (this.groupId) {\n var playGroup = (await fetchPlayGroup(this.groupId)).playGroup\n this.boards = playGroup ? playGroup.boards : []\n } else {\n this.boards = []\n }\n\n this.updateContext()\n\n var list = this.boardTileList\n\n list.style.transition = ''\n list.style.transform = `translate3d(0, 0, 0)`\n }\n\n async pageInitialized() {\n this.refresh()\n }\n\n async pageUpdated(changes, lifecycle) {\n if (this.active) {\n this.page = lifecycle.page\n this.groupId = lifecycle.resourceId\n\n await this.updateComplete\n\n this.refreshBoards()\n }\n }\n\n stateChanged(state) {\n this.favorites = state.favorite.favorites\n }\n\n firstUpdated() {\n var list = this.boardTileList\n\n pulltorefresh({\n container: this.shadowRoot,\n scrollable: list,\n refresh: () => {\n return this.refresh()\n }\n })\n\n if (isMobileDevice()) {\n swipe({\n container: list,\n animates: {\n dragging: async (d, opts) => {\n var groups = this.groups\n var currentIndex = groups.findIndex(group => group.id == this.groupId)\n\n if ((d > 0 && currentIndex <= 0) || (d < 0 && currentIndex >= groups.length - 1)) {\n /* TODO blocked gesture */\n return false\n }\n\n list.style.transform = `translate3d(${d}px, 0, 0)`\n },\n aborting: async opts => {\n list.style.transition = 'transform 0.3s'\n list.style.transform = `translate3d(0, 0, 0)`\n\n setTimeout(() => {\n list.style.transition = ''\n }, 300)\n },\n swiping: async (d, opts) => {\n var groups = this.groups\n var currentIndex = groups.findIndex(group => group.id == this.groupId)\n\n if ((d > 0 && currentIndex <= 0) || (d < 0 && currentIndex >= groups.length - 1)) {\n list.style.transition = ''\n list.style.transform = `translate3d(0, 0, 0)`\n } else {\n list.style.transition = 'transform 0.3s'\n list.style.transform = `translate3d(${d < 0 ? '-100%' : '100%'}, 0, 0)`\n\n navigate(`${this.page}/${groups[currentIndex + (d < 0 ? 1 : -1)].id}`)\n }\n }\n }\n })\n }\n }\n\n async onInfoBoard(board) {\n openOverlay('viewpart-info', {\n template: html`\n <board-info\n .board=${board}\n .groupId=${this.groupId}\n @update-board=${e => this.onUpdateBoard(e.detail)}\n @delete-board=${e => this.onDeleteBoard(e.detail)}\n @join-playgroup=${e => this.onJoinPlayGroup(e.detail)}\n @leave-playgroup=${e => this.onLeavePlayGroup(e.detail)}\n ></board-info>\n `\n })\n }\n\n async onInfoPlayGroup(group) {\n openOverlay('viewpart-info', {\n template: html`\n <play-group-info\n .playGroup=${group}\n @update-play-group=${e => this.onUpdatePlayGroup(e.detail)}\n @delete-play-group=${e => this.onDeletePlayGroup(e.detail)}\n @create-play-group=${e => this.onCreatePlayGroup(e.detail)}\n ></play-group-info>\n `\n })\n }\n\n async onCreatePlayGroup(playGroup) {\n try {\n await createPlayGroup(playGroup)\n this._notify('info', i18next.t('text.play-group created', { playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onUpdatePlayGroup(playGroup) {\n try {\n await updatePlayGroup(playGroup)\n this._notify('info', i18next.t('text.play-group updated', { playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onDeletePlayGroup(playGroup) {\n try {\n await deletePlayGroup(playGroup.id)\n this._notify('info', i18next.t('text.play-group deleted', { playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onUpdateBoard(board) {\n try {\n await updateBoard(board)\n this._notify('info', i18next.t('text.board updated', { board: board.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refreshBoards()\n }\n\n async onDeleteBoard(board) {\n const playGroup = this.groups && this.groups.find(group => group.id === this.groupId)\n await this.onLeavePlayGroup({ board, playGroup })\n }\n\n async onJoinPlayGroup({ board, playGroup }) {\n try {\n await client.mutate({\n mutation: gql`\n mutation JoinPlayGroup($id: String!, $boardIds: [String!]!) {\n joinPlayGroup(id: $id, boardIds: $boardIds) {\n id\n }\n }\n `,\n variables: {\n id: playGroup.id,\n boardIds: [board.id]\n }\n })\n\n this._notify('info', i18next.t('text.joined into play-group', { board: board.name, playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onLeavePlayGroup({ board, playGroup }) {\n try {\n await client.mutate({\n mutation: gql`\n mutation ($id: String!, $boardIds: [String!]!) {\n leavePlayGroup(id: $id, boardIds: $boardIds) {\n id\n }\n }\n `,\n variables: {\n id: playGroup.id,\n boardIds: [board.id]\n }\n })\n\n this._notify('info', i18next.t('text.leaved from play-group', { board: board.name, playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async onReorder({ boardIds, groupId }) {\n try {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!, $boardIds: [String!]!) {\n reorderPlayGroup(id: $id, boardIds: $boardIds) {\n id\n name\n }\n }\n `,\n variables: {\n id: groupId,\n boardIds\n }\n })\n\n const playGroup = response.data.reorderPlayGroup\n\n this._notify('info', i18next.t('text.reorder play-group', { playGroup: playGroup.name }))\n } catch (ex) {\n this._notify('error', ex, ex)\n }\n\n this.refresh()\n }\n\n async refreshFavorites() {\n const response = await client.query({\n query: gql`\n query {\n myFavorites {\n id\n routing\n }\n }\n `\n })\n\n store.dispatch({\n type: UPDATE_FAVORITES,\n favorites: response.data.myFavorites.map(favorite => favorite.routing)\n })\n }\n\n _notify(level: 'info' | 'warn' | 'error', message: any, ex?: any) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level,\n message,\n ex\n }\n })\n )\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  export declare function buildThemeValueRecordConfig(): {
2
2
  editor: (value: any, column: any, record: any, rowIndex: any, field: any) => import("@operato/data-grist").OxGristEditor;
3
- renderer: (value: any, column: any, record: any, rowIndex: any, field: any) => string | void | import("lit-html").TemplateResult<1 | 2> | import("@operato/data-grist").OxGristRenderer;
3
+ renderer: (value: any, column: any, record: any, rowIndex: any, field: any) => string | void | import("lit-html").TemplateResult<2 | 1> | import("@operato/data-grist").OxGristRenderer;
4
4
  editable: boolean;
5
5
  };