@things-factory/shell 9.0.0-beta.5 → 9.0.0-beta.50

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 (36) hide show
  1. package/_index.html +0 -1
  2. package/config/config.development.js +1 -1
  3. package/config/config.production.js +1 -14
  4. package/dist-server/middlewares/domain-middleware.js +3 -3
  5. package/dist-server/middlewares/domain-middleware.js.map +1 -1
  6. package/dist-server/migrations/index.js +4 -5
  7. package/dist-server/migrations/index.js.map +1 -1
  8. package/dist-server/server.js +1 -1
  9. package/dist-server/server.js.map +1 -1
  10. package/dist-server/service/domain/domain-query.d.ts +1 -0
  11. package/dist-server/service/domain/domain-query.js +12 -0
  12. package/dist-server/service/domain/domain-query.js.map +1 -1
  13. package/dist-server/service/domain/domain-types.d.ts +2 -0
  14. package/dist-server/service/domain/domain-types.js +8 -0
  15. package/dist-server/service/domain/domain-types.js.map +1 -1
  16. package/dist-server/service/domain/domain.js +1 -35
  17. package/dist-server/service/domain/domain.js.map +1 -1
  18. package/dist-server/tsconfig.tsbuildinfo +1 -1
  19. package/dist-server/utils/get-domain.d.ts +9 -10
  20. package/dist-server/utils/get-domain.js +66 -71
  21. package/dist-server/utils/get-domain.js.map +1 -1
  22. package/dist-server/utils/get-query-builder-from-list-params.js.map +1 -1
  23. package/dist-server/utils/get-times-for-period.d.ts +24 -4
  24. package/dist-server/utils/get-times-for-period.js +42 -5
  25. package/dist-server/utils/get-times-for-period.js.map +1 -1
  26. package/package.json +9 -11
  27. package/translations/en.json +2 -0
  28. package/translations/ja.json +2 -0
  29. package/translations/ko.json +3 -1
  30. package/translations/ms.json +2 -0
  31. package/translations/zh.json +2 -0
  32. package/views/public/home.html +0 -1
  33. package/client/scene/scene-components.js +0 -3
  34. package/client/scene/scene-player.js +0 -103
  35. package/client/scene/scene-viewer.js +0 -106
  36. package/client/scene/things-scene-components.import +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"get-times-for-period.js","sourceRoot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AE7D,OAAO;QACL,IAAI,EAAE,yBAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE;QACpD,EAAE,EAAE,yBAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE;KACjD,CAAA;AACH,CAAC","sourcesContent":["import moment from 'moment-timezone'\n\n/**\n * Get the time range for the specified period relative to the current moment in a specific domain's timezone.\n *\n * @param {string} period - The time period to calculate the range for. Valid options are 'today', 'this month', '30 days', 'this year', '12 months'.\n * @param {Object} context - The context object containing domain information.\n * @returns {Promise<{ from: string; to: string }>} - A Promise that resolves to an object containing 'from' and 'to' ISO date strings representing the time range.\n */\nexport async function getTimesForPeriod(period: 'today' | 'this month' | '30 days' | 'this year' | '12 months', context: any): Promise<{ from: string; to: string }> {\n const { domain } = context.state\n const theDate = moment.tz(new Date(), domain.timezone)\n\n if (period == 'today') {\n const from = theDate.clone().format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'day').startOf('day').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == 'this month') {\n const from = theDate.clone().startOf('month').format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'month').startOf('month').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == '30 days') {\n const from = theDate.clone().subtract(30, 'day').format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'day').startOf('day').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == 'this year') {\n const from = theDate.clone().startOf('year').format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'year').startOf('year').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == '12 months') {\n const from = theDate.clone().subtract(12, 'month').startOf('month').format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'month').startOf('month').format('YYYY-MM-DD')\n\n return { from, to }\n }\n}\n\n/**\n * Get the ISO date strings for the specified period relative to the current moment in a specific domain's timezone.\n *\n * @param {string} period - The time period to calculate the range for. Valid options are 'today', 'this month', '30 days', 'this year', '12 months'.\n * @param {Object} context - The context object containing domain information.\n * @returns {Promise<{ from: string; to: string }>} - A Promise that resolves to an object containing 'from' and 'to' ISO date strings representing the time range.\n */\nexport async function getISOStringsForPeriod(\n period: 'today' | 'this month' | '30 days' | 'this year' | '12 months',\n context: any\n): Promise<{ from: string; to: string }> {\n const { domain } = context.state\n const { from, to } = await getTimesForPeriod(period, context)\n\n return {\n from: moment.tz(from, domain.timezone).toISOString(),\n to: moment.tz(to, domain.timezone).toISOString()\n }\n}\n"]}
1
+ {"version":3,"file":"get-times-for-period.js","sourceRoot":"","sources":["../../server/utils/get-times-for-period.ts"],"names":[],"mappings":";;AAgBA,8CA2DC;AAgBD,wDAYC;;AAvGD,8EAAoC;AAEpC;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,iBAAiB,CACrC,MAA+F,EAC/F,UAA+C,EAAE,EACjD,OAAY;IAEZ,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAChC,MAAM,OAAO,GAAG,yBAAM,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAA;IAEtD,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;QACtB,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;QACjD,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;QAE5E,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAA;IACrB,CAAC;SAAM,IAAI,MAAM,IAAI,YAAY,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CA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C,CAAA;QACxD,MAAM,IAAI,GAAG,yBAAM;aAChB,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC;aACvD,OAAO,CAAC,OAAO,CAAC;aAChB,MAAM,CAAC,YAAY,CAAC,CAAA;QACvB,MAAM,EAAE,GAAG,yBAAM;aACd,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC;aACvD,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC;aACf,OAAO,CAAC,OAAO,CAAC;aAChB,MAAM,CAAC,YAAY,CAAC,CAAA;QAEvB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAA;IACrB,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;GAaG;AACI,KAAK,UAAU,sBAAsB,CAC1C,MAA+F,EAC/F,UAA+C,EAAE,EACjD,OAAY;IAEZ,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAChC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,MAAM,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAEtE,OAAO;QACL,IAAI,EAAE,yBAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE;QACpD,EAAE,EAAE,yBAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE;KACjD,CAAA;AACH,CAAC","sourcesContent":["import moment from 'moment-timezone'\n\n/**\n * Get the time range for the specified period relative to the current moment in a specific domain's timezone.\n *\n * @param {('today' | 'this month' | '30 days' | 'this year' | '12 months' | 'date range' | 'month')} period - The time period to calculate the range for.\n * Valid options are 'today', 'this month', '30 days', 'this year', '12 months', 'date range', and 'month'.\n * @param {Object} [options] - Optional parameters for 'date range' and 'month' periods.\n * @param {string[]} [options.date] - The start date and end date for the 'date range' period.\n * @param {string} [options.month] - The month for the 'month' period in 'YYYY-MM' format.\n * @param {Object} context - The context object containing domain information.\n * @param {Object} context.state - The state object containing domain information.\n * @param {Object} context.state.domain - The domain object containing timezone information.\n * @param {string} context.state.domain.timezone - The timezone of the domain.\n * @returns {Promise<{ from: string; to: string }>} - A Promise that resolves to an object containing 'from' and 'to' ISO date strings representing the time range.\n */\nexport async function getTimesForPeriod(\n period: 'today' | 'this month' | '30 days' | 'this year' | '12 months' | 'date range' | 'month',\n options: { date?: string[]; month?: string } = {},\n context: any\n): Promise<{ from: string; to: string }> {\n const { domain } = context.state\n const theDate = moment.tz(new Date(), domain.timezone)\n\n if (period == 'today') {\n const from = theDate.clone().format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'day').startOf('day').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == 'this month') {\n const from = theDate.clone().startOf('month').format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'month').startOf('month').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == '30 days') {\n const from = theDate.clone().subtract(30, 'day').format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'day').startOf('day').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == 'this year') {\n const from = theDate.clone().startOf('year').format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'year').startOf('year').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == '12 months') {\n const from = theDate.clone().subtract(12, 'month').startOf('month').format('YYYY-MM-DD')\n const to = theDate.clone().add(1, 'month').startOf('month').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == 'date range') {\n const [fromDate, toDate] = options?.date || [\n theDate.clone().startOf('month').format('YYYY-MM-DD'),\n theDate.clone().format('YYYY-MM-DD')\n ]\n\n const from = moment.tz(fromDate, domain.timezone).startOf('day').format('YYYY-MM-DD')\n const to = moment.tz(toDate, domain.timezone).add(1, 'day').startOf('day').format('YYYY-MM-DD')\n\n return { from, to }\n } else if (period == 'month') {\n const monthString = options?.month || theDate.clone().startOf('month').format('YYYY-MM')\n\n const [year, month] = monthString.split('-').map(Number)\n const from = moment\n .tz({ year, month: month - 1, day: 1 }, domain.timezone)\n .startOf('month')\n .format('YYYY-MM-DD')\n const to = moment\n .tz({ year, month: month - 1, day: 1 }, domain.timezone)\n .add(1, 'month')\n .startOf('month')\n .format('YYYY-MM-DD')\n\n return { from, to }\n }\n}\n\n/**\n * Get the ISO date strings for the specified period relative to the current moment in a specific domain's timezone.\n *\n * @param {('today' | 'this month' | '30 days' | 'this year' | '12 months' | 'date range' | 'month')} period - The time period to calculate the range for.\n * Valid options are 'today', 'this month', '30 days', 'this year', '12 months', 'date range', and 'month'.\n * @param {Object} [options] - Optional parameters for 'date range' and 'month' periods.\n * @param {string[]} [options.date] - The start date and end date for the 'date range' period.\n * @param {string} [options.month] - The month for the 'month' period in 'YYYY-MM' format.\n * @param {Object} context - The context object containing domain information.\n * @param {Object} context.state - The state object containing domain information.\n * @param {Object} context.state.domain - The domain object containing timezone information.\n * @param {string} context.state.domain.timezone - The timezone of the domain.\n * @returns {Promise<{ from: string; to: string }>} - A Promise that resolves to an object containing 'from' and 'to' ISO date strings representing the time range.\n */\nexport async function getISOStringsForPeriod(\n period: 'today' | 'this month' | '30 days' | 'this year' | '12 months' | 'date range' | 'month',\n options: { date?: string[]; month?: string } = {},\n context: any\n): Promise<{ from: string; to: string }> {\n const { domain } = context.state\n const { from, to } = await getTimesForPeriod(period, options, context)\n\n return {\n from: moment.tz(from, domain.timezone).toISOString(),\n to: moment.tz(to, domain.timezone).toISOString()\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/shell",
3
- "version": "9.0.0-beta.5",
3
+ "version": "9.0.0-beta.50",
4
4
  "description": "Core module for framework",
5
5
  "bin": {
6
6
  "things-factory": "bin/things-factory",
@@ -43,9 +43,7 @@
43
43
  "@graphql-tools/schema": "^8.5.0",
44
44
  "@graphql-tools/utils": "^10.1.2",
45
45
  "@graphql-yoga/redis-event-target": "^3.0.1",
46
- "@hatiolab/things-scene": "^9.0.0-beta",
47
46
  "@koa/cors": "^5.0.0",
48
- "@material-design-icons/font": "^0.14.9",
49
47
  "@material/mwc-button": "^0.27.0",
50
48
  "@material/mwc-icon": "^0.27.0",
51
49
  "@material/mwc-icon-button": "^0.27.0",
@@ -53,7 +51,6 @@
53
51
  "@material/mwc-textfield": "^0.27.0",
54
52
  "@material/web": "^2.0.0",
55
53
  "@open-wc/scoped-elements": "^2.1.3",
56
- "@operato/board": "^9.0.0-beta",
57
54
  "@operato/graphql": "^9.0.0-beta",
58
55
  "@operato/help": "^9.0.0-beta",
59
56
  "@operato/layout": "^9.0.0-beta",
@@ -61,11 +58,11 @@
61
58
  "@operato/typeorm-history": "^9.0.0-beta",
62
59
  "@operato/utils": "^9.0.0-beta",
63
60
  "@reduxjs/toolkit": "^2.2.5",
64
- "@things-factory/ejs-remote": "^9.0.0-beta.5",
65
- "@things-factory/env": "^9.0.0-beta.5",
61
+ "@things-factory/ejs-remote": "^9.0.0-beta.38",
62
+ "@things-factory/env": "^9.0.0-beta.38",
66
63
  "@things-factory/operato-license-checker": "^4.0.4",
67
- "@things-factory/styles": "^9.0.0-beta.1",
68
- "@things-factory/utils": "^9.0.0-beta.0",
64
+ "@things-factory/styles": "^9.0.0-beta.38",
65
+ "@things-factory/utils": "^9.0.0-beta.38",
69
66
  "@webcomponents/scoped-custom-element-registry": "^0.0.9",
70
67
  "@webcomponents/webcomponentsjs": "^2.6.0",
71
68
  "args": "^5.0.0",
@@ -75,7 +72,7 @@
75
72
  "core-js": "^3.26.0",
76
73
  "debug": "^4.1.1",
77
74
  "firebase": "^9.14.0",
78
- "glob": "^7.1.6",
75
+ "glob": "^11.0.1",
79
76
  "graphql": "^16.5.0",
80
77
  "graphql-scalars": "^1.22.4",
81
78
  "graphql-tag": "^2.12.6",
@@ -99,7 +96,7 @@
99
96
  "lit": "^3.1.2",
100
97
  "lodash": "^4.17.21",
101
98
  "lodash-es": "^4.17.21",
102
- "material-symbols": "^0.17.2",
99
+ "material-symbols": "^0.28.0",
103
100
  "mkdirp": "^1.0.4",
104
101
  "moment-timezone": "^0.5.43",
105
102
  "mqtt": "^4.3.4",
@@ -111,6 +108,7 @@
111
108
  "pwa-helpers": "^0.9.1",
112
109
  "react": "^18.2.0",
113
110
  "react-dom": "^18.2.0",
111
+ "reflect-metadata": "^0.2.2",
114
112
  "regenerator-runtime": "^0.13.2",
115
113
  "reselect": "^4.0.0",
116
114
  "sass": "^1.50.1",
@@ -131,5 +129,5 @@
131
129
  "pg": "^8.7.3",
132
130
  "sqlite3": "^5.0.8"
133
131
  },
134
- "gitHead": "f075f1bd00a9b902a677d44f1844bcbd9c85ea97"
132
+ "gitHead": "71ce00fb49db49f4c4aaf876ff812bcf6c7986b4"
135
133
  }
@@ -25,6 +25,7 @@
25
25
  "field.theme": "theme",
26
26
  "prompt.sure to navigate away?": "You have unsaved changes. Are you sure you want to navigate away?",
27
27
  "text.are_you_sure": "are you sure?",
28
+ "text.data_created_successfully": "data created successfully",
28
29
  "text.data_deleted_successfully": "data deleted successfully",
29
30
  "text.data_updated_successfully": "data updated successfully",
30
31
  "text.data_uploaded_successfully": "data uploaded successfully",
@@ -32,6 +33,7 @@
32
33
  "text.nothing_changed": "nothing changed",
33
34
  "text.nothing_selected": "nothing selected",
34
35
  "text.there_is_nothing_to_delete": "there is nothing to delete",
36
+ "text.there_is_nothing_to_process": "there is nothing to process",
35
37
  "text.there_is_nothing_to_save": "there is nothing to save",
36
38
  "text.column visibility setting": "column visibility"
37
39
  }
@@ -25,12 +25,14 @@
25
25
  "field.theme": "テーマ",
26
26
  "prompt.sure to navigate away?": "未保存の変更があります。本当に移動しますか?",
27
27
  "text.are_you_sure": "進行しますか?",
28
+ "text.data_created_successfully": "資料が正常に作成されました.",
28
29
  "text.data_updated_successfully": "資料の修正に成功しました.",
29
30
  "text.data_uploaded_successfully": "資料が正常に作成されました.",
30
31
  "text.data_deleted_successfully": "資料の削除に成功しました.",
31
32
  "text.nothing_changed": "変更なし",
32
33
  "text.nothing_selected": "選択されていない",
33
34
  "text.there_is_nothing_to_delete": "削除するデータがありません.",
35
+ "text.there_is_nothing_to_process": "処理するデータがありません.",
34
36
  "text.there_is_nothing_to_save": "保存するデータがありません.",
35
37
  "text.column visibility setting": "カラムの表示設定"
36
38
  }
@@ -25,12 +25,14 @@
25
25
  "field.theme": "테마",
26
26
  "prompt.sure to navigate away?": "변경 사항이 저장되지 않았습니다. 정말 이동하시겠습니까?",
27
27
  "text.are_you_sure": "진행하시겠습니까?",
28
+ "text.data_created_successfully": "성공적으로 자료를 생성하였습니다.",
28
29
  "text.data_updated_successfully": "성공적으로 자료를 수정하였습니다.",
29
- "text.data_uploaded_successfully": "성공적으로 자료가 생성되었습니다.",
30
+ "text.data_uploaded_successfully": "성공적으로 자료를 업로드하였습니다.",
30
31
  "text.data_deleted_successfully": "성공적으로 자료를 삭제하였습니다.",
31
32
  "text.nothing_changed": "변경사항 없음",
32
33
  "text.nothing_selected": "선택되지 않음",
33
34
  "text.there_is_nothing_to_delete": "삭제할 데이터가 없습니다.",
35
+ "text.there_is_nothing_to_process": "처리할 데이터가 없습니다.",
34
36
  "text.there_is_nothing_to_save": "저장할 데이터가 없습니다.",
35
37
  "text.column visibility setting": "컬럼 보이기"
36
38
  }
@@ -25,12 +25,14 @@
25
25
  "field.theme": "tema",
26
26
  "prompt.sure to navigate away?": "Anda mempunyai perubahan yang belum disimpan. Adakah anda pasti mahu berpindah?",
27
27
  "text.are_you_sure": "adakah anda pasti?",
28
+ "text.data_created_successfully": "data berjaya dicipta",
28
29
  "text.data_deleted_successfully": "data telah berjaya dipadam",
29
30
  "text.data_updated_successfully": "data berjaya dikemaskini",
30
31
  "text.data_uploaded_successfully": "data uploaded successfully",
31
32
  "text.nothing_changed": "nothing changed",
32
33
  "text.nothing_selected": "nothing selected",
33
34
  "text.there_is_nothing_to_delete": "there is nothing to delete",
35
+ "text.there_is_nothing_to_process": "there is nothing to process",
34
36
  "text.there_is_nothing_to_save": "there is nothing to save",
35
37
  "text.column visibility setting": "tetapan kebolehlihatan kolum"
36
38
  }
@@ -25,12 +25,14 @@
25
25
  "field.theme": "主题",
26
26
  "prompt.sure to navigate away?": "更改未保存。您确定要离开吗?",
27
27
  "text.are_you_sure": "您确定要进行吗?",
28
+ "text.data_created_successfully": "数据创建成功。",
28
29
  "text.data_updated_successfully": "数据更新成功。",
29
30
  "text.data_uploaded_successfully": "数据上传成功。",
30
31
  "text.data_deleted_successfully": "数据删除成功。",
31
32
  "text.nothing_changed": "无更改",
32
33
  "text.nothing_selected": "未选择",
33
34
  "text.there_is_nothing_to_delete": "没有要删除的数据。",
35
+ "text.there_is_nothing_to_process": "没有要处理的数据。",
34
36
  "text.there_is_nothing_to_save": "没有要保存的数据。",
35
37
  "text.column visibility setting": "列显示"
36
38
  }
@@ -51,7 +51,6 @@
51
51
 
52
52
  <!-- Performance tip: hint to the browser to start the handshake for the fonts site -->
53
53
  <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
54
- <link href="/node_modules/@material-design-icons/font/index.css" rel="stylesheet" />
55
54
  <link href="/node_modules/material-symbols/index.css" rel="stylesheet" />
56
55
  <link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
57
56
  <link rel="stylesheet" href="/theme.css" />
@@ -1,3 +0,0 @@
1
- import 'core-js/stable'
2
- import 'regenerator-runtime/runtime'
3
- import './things-scene-components.import'
@@ -1,103 +0,0 @@
1
- import './scene-components'
2
- import gql from 'graphql-tag'
3
-
4
- import { ReferenceMap, create, error } from '@hatiolab/things-scene'
5
-
6
- export { BoardViewer, BoardPlayer } from '@operato/board'
7
- import { client, gqlContext, subscribe } from '@operato/graphql'
8
-
9
- export const provider = new ReferenceMap(
10
- async (boardId, resolve, reject) => {
11
- try {
12
- const response = await client.query({
13
- query: gql`
14
- query FetchBoardById($id: String!) {
15
- board(id: $id) {
16
- model
17
- }
18
- }
19
- `,
20
- variables: { id: boardId },
21
- context: gqlContext()
22
- })
23
-
24
- const board = response.data.board
25
-
26
- var model = JSON.parse(board.model)
27
-
28
- var scene
29
-
30
- try {
31
- scene = await provider.get(boardId)
32
- console.warn('Board fetched more than twice.', boardId)
33
- } catch (e) {
34
- scene = create({
35
- model,
36
- mode: 0,
37
- refProvider: provider
38
- })
39
-
40
- // s.app.baseUrl = undefined;
41
- }
42
-
43
- resolve(scene)
44
- } catch (e) {
45
- error(e)
46
- reject(e)
47
- }
48
- },
49
- async (id, ref) => {
50
- ref.dispose()
51
- }
52
- )
53
-
54
- var subscriptionForAutoRefresh
55
-
56
- export const startSubscribingForAutoRefresh = async (playGroupId, callback) => {
57
- if (!playGroupId) {
58
- return
59
- }
60
-
61
- await stopSubscribing()
62
-
63
- subscriptionForAutoRefresh = await subscribe(
64
- {
65
- query: gql`
66
- subscription ($id: String!) {
67
- playGroup(id: $id) {
68
- id
69
- boards {
70
- id
71
- model
72
- }
73
- }
74
- }
75
- `,
76
- variables: {
77
- id: playGroupId
78
- }
79
- },
80
- {
81
- next: async ({ data }) => {
82
- const { id, boards = '{}' } = data.playGroup
83
-
84
- if (data) {
85
- callback &&
86
- (await callback({
87
- id,
88
- boards
89
- }))
90
- }
91
- }
92
- }
93
- )
94
- }
95
-
96
- export const stopSubscribing = async () => {
97
- await subscriptionForAutoRefresh?.unsubscribe()
98
- subscriptionForAutoRefresh = null
99
- }
100
-
101
- window['headlessSceneProvider'] = provider
102
- window['startSubscribingForAutoRefresh'] = startSubscribingForAutoRefresh
103
- window['stopSubscribing'] = stopSubscribing
@@ -1,106 +0,0 @@
1
- import './scene-components'
2
-
3
- import { ReferenceMap, create, error } from '@hatiolab/things-scene'
4
- import { client, gqlContext, subscribe } from '@operato/graphql'
5
-
6
- import gql from 'graphql-tag'
7
-
8
- export { BoardViewer } from '@operato/board'
9
-
10
- export const provider = new ReferenceMap(
11
- async (boardId, resolve, reject) => {
12
- try {
13
- const response = await client.query({
14
- query: gql`
15
- query FetchBoardById($id: String!) {
16
- board(id: $id) {
17
- model
18
- }
19
- }
20
- `,
21
- variables: { id: boardId },
22
- context: gqlContext()
23
- })
24
-
25
- const board = response.data.board
26
-
27
- var model = JSON.parse(board.model)
28
-
29
- var scene
30
-
31
- try {
32
- scene = await provider.get(boardId)
33
- console.warn('Board fetched more than twice.', boardId)
34
- } catch (e) {
35
- scene = create({
36
- model,
37
- mode: 0,
38
- refProvider: provider
39
- })
40
-
41
- // s.app.baseUrl = undefined;
42
- }
43
-
44
- resolve(scene)
45
-
46
- // resolve(scene, {
47
- // ...board,
48
- // model
49
- // })
50
- } catch (e) {
51
- error(e)
52
- reject(e)
53
- }
54
- },
55
- async (id, ref) => {
56
- ref.dispose()
57
- }
58
- )
59
-
60
- var subscriptionForAutoRefresh
61
-
62
- export const startSubscribingForAutoRefresh = async (boardId, callback) => {
63
- if (!boardId) {
64
- return
65
- }
66
-
67
- await stopSubscribing()
68
-
69
- subscriptionForAutoRefresh = await subscribe(
70
- {
71
- query: gql`
72
- subscription ($id: String!) {
73
- board(id: $id) {
74
- id
75
- model
76
- }
77
- }
78
- `,
79
- variables: {
80
- id: boardId
81
- }
82
- },
83
- {
84
- next: async ({ data }) => {
85
- const { id, model = '{}' } = data.board
86
-
87
- if (data) {
88
- callback &&
89
- (await callback({
90
- id,
91
- model: JSON.parse(model)
92
- }))
93
- }
94
- }
95
- }
96
- )
97
- }
98
-
99
- export const stopSubscribing = async () => {
100
- await subscriptionForAutoRefresh?.unsubscribe()
101
- subscriptionForAutoRefresh = null
102
- }
103
-
104
- window['headlessSceneProvider'] = provider
105
- window['startSubscribingForAutoRefresh'] = startSubscribingForAutoRefresh
106
- window['stopSubscribing'] = stopSubscribing
@@ -1 +0,0 @@
1
- /* 이 파일은 node_modules/@things-scene 아래에 설치된 컴포넌트들의 리스트를 스캔해서 자동으로 import 하기위해 things-scene-webpack-loader 에 의해 로드되는 파일이다. */