@things-factory/board-ui 5.0.0-alpha.3 → 5.0.0-alpha.30

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.
@@ -1,6 +1,7 @@
1
- import gql from 'graphql-tag'
2
- import { client, gqlContext } from '@things-factory/shell'
3
1
  import { ReferenceMap, create, error } from '@hatiolab/things-scene'
2
+ import { client, gqlContext, subscribe } from '@things-factory/shell'
3
+
4
+ import gql from 'graphql-tag'
4
5
 
5
6
  export function createBoardProvider() {
6
7
  var _provider = new ReferenceMap(
@@ -31,7 +32,32 @@ export function createBoardProvider() {
31
32
  scene = create({
32
33
  model,
33
34
  mode: 0,
34
- refProvider: provider
35
+ refProvider: provider,
36
+ dataSubscriptionProvider: {
37
+ subscribe: async (tag, component) => {
38
+ return await subscribe(
39
+ {
40
+ query: gql`
41
+ subscription {
42
+ data(tag: "${tag}") {
43
+ tag
44
+ data
45
+ }
46
+ }
47
+ `
48
+ },
49
+ {
50
+ next: async ({ data }) => {
51
+ if (data) {
52
+ component.data = data.data.data
53
+ }
54
+ }
55
+ }
56
+ )
57
+ },
58
+
59
+ dispose() {}
60
+ }
35
61
  })
36
62
 
37
63
  // s.app.baseUrl = undefined;
@@ -1,10 +1,11 @@
1
1
  import './board-modeller/editors/board-editor-property'
2
2
 
3
- import { OxPropertyEditor } from '@operato/property-editor'
3
+ /* should use @things-factory/grist-ui to register both grist (things-factory grist and operato grist) */
4
4
  import { registerEditor, registerRenderer } from '@things-factory/grist-ui'
5
5
 
6
6
  import { BoardEditor } from './data-grist/board-editor'
7
7
  import { BoardRenderer } from './data-grist/board-renderer'
8
+ import { OxPropertyEditor } from '@operato/property-editor'
8
9
 
9
10
  export default function bootstrap() {
10
11
  registerRenderer('board', BoardRenderer)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/board-ui",
3
- "version": "5.0.0-alpha.3",
3
+ "version": "5.0.0-alpha.30",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -26,11 +26,12 @@
26
26
  "dependencies": {
27
27
  "@material/mwc-list": "^0.25.3",
28
28
  "@material/mwc-select": "^0.25.3",
29
- "@operato/board": "^0.4.3",
30
- "@operato/help": "^0.4.3",
31
- "@operato/i18n": "^0.4.3",
32
- "@operato/layout": "^0.4.3",
33
- "@operato/popup": "^0.4.3",
29
+ "@operato/app": "1.0.0-beta.0",
30
+ "@operato/board": "1.0.0-beta.0",
31
+ "@operato/help": "1.0.0-beta.0",
32
+ "@operato/i18n": "1.0.0-beta.0",
33
+ "@operato/layout": "1.0.0-beta.0",
34
+ "@operato/popup": "1.0.0-beta.0",
34
35
  "@polymer/iron-icon": "^3.0.1",
35
36
  "@polymer/iron-icons": "^3.0.1",
36
37
  "@polymer/paper-button": "^3.0.1",
@@ -40,11 +41,10 @@
40
41
  "@polymer/paper-listbox": "^3.0.1",
41
42
  "@polymer/paper-menu-button": "^3.0.1",
42
43
  "@polymer/paper-slider": "^3.0.1",
43
- "@things-factory/barcode-base": "^5.0.0-alpha.3",
44
- "@things-factory/grist-ui": "^5.0.0-alpha.3",
45
- "@things-factory/modeller-ui": "^5.0.0-alpha.3",
44
+ "@things-factory/barcode-base": "^5.0.0-alpha.30",
45
+ "@things-factory/grist-ui": "^5.0.0-alpha.30",
46
46
  "file-saver": "^2.0.2",
47
47
  "sortablejs": "^1.10.2"
48
48
  },
49
- "gitHead": "0584a36ba889ff0b426cc87c0d9c8f14ffa2f677"
49
+ "gitHead": "352de3c888d68121aef99da33b31b966d0123328"
50
50
  }