@things-factory/board-ui 5.0.0-alpha.48 → 5.0.0-alpha.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.
- package/client/board-provider.js +5 -3
- package/helps/board-modeller/data-binding.ko.md +6 -0
- package/helps/board-modeller/data-binding.md +6 -0
- package/helps/board-modeller/data-binding.zh.md +21 -17
- package/package.json +10 -10
- package/translations/en.json +5 -3
- package/translations/ko.json +4 -2
- package/translations/ms.json +3 -2
- package/translations/zh.json +3 -1
package/client/board-provider.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ReferenceMap, create, error } from '@hatiolab/things-scene'
|
|
2
|
-
import { client, gqlContext, subscribe } from '@things-factory/shell'
|
|
3
|
-
|
|
4
1
|
import gql from 'graphql-tag'
|
|
5
2
|
|
|
3
|
+
import { create, error, ReferenceMap } from '@hatiolab/things-scene'
|
|
4
|
+
import { DataStorage } from '@operato/board'
|
|
5
|
+
import { client, gqlContext, subscribe } from '@operato/graphql'
|
|
6
|
+
|
|
6
7
|
export function createBoardProvider() {
|
|
7
8
|
var _provider = new ReferenceMap(
|
|
8
9
|
async (boardId, resolve, reject) => {
|
|
@@ -33,6 +34,7 @@ export function createBoardProvider() {
|
|
|
33
34
|
model,
|
|
34
35
|
mode: 0,
|
|
35
36
|
refProvider: provider,
|
|
37
|
+
dataStorage: new DataStorage(boardId),
|
|
36
38
|
dataSubscriptionProvider: {
|
|
37
39
|
subscribe: async (tag, component) => {
|
|
38
40
|
return await subscribe(
|
|
@@ -93,3 +93,9 @@
|
|
|
93
93
|
- eval 코드의 parameter 는 value와 targets가 있다.
|
|
94
94
|
- value : 소스 컴포넌트의 data에 accessor가 적용된 값
|
|
95
95
|
- targets : 타겟 컴포넌트 리스트
|
|
96
|
+
|
|
97
|
+
### No Data No Spreading
|
|
98
|
+
|
|
99
|
+
- 규칙 타입에 따른 최종 결과값이 빈 값이 아닌 경우에만 전파한다.
|
|
100
|
+
- 결과값이 undefined, null, NaN, 공백('')인 경우에는 전파하지 않는다.
|
|
101
|
+
- 결과값이 숫자 0인 경우에는 전파한다.
|
|
@@ -93,3 +93,9 @@ Specifies how the data to be propagated is applied to the target component prope
|
|
|
93
93
|
- The parameter of eval code has value and targets.
|
|
94
94
|
- value: The value to which the accessor is applied to the data of the source component
|
|
95
95
|
- targets: list of target components
|
|
96
|
+
|
|
97
|
+
### No Data No Spreading
|
|
98
|
+
|
|
99
|
+
- Data will be spreaded only when the final result value according to the rule type is not an empty value.
|
|
100
|
+
- If the result value is undefined, null, NaN, or blank (''), it will not be spreaded.
|
|
101
|
+
- Otherwise, data will be spreaded, even if the result is the number zero.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
- 可以如下设置组件的数据属性。
|
|
7
7
|
- 初始数据:建模人员可以在建模过程中设置初始数据。
|
|
8
8
|
- 对于数据源组件:将从数据源接收的结果设置为自己的数据。
|
|
9
|
-
- 对于基于UI的组件:通过用户交互更改的值设置为数据。
|
|
9
|
+
- 对于基于 UI 的组件:通过用户交互更改的值设置为数据。
|
|
10
10
|
- 数据传播:可以通过设置其他组件的数据绑定来设置。
|
|
11
11
|
- 可以根据设置的数据绑定模型来更改目标组件的属性,以响应组件数据的更改。
|
|
12
12
|
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
|
|
31
31
|
### no data no show
|
|
32
32
|
|
|
33
|
-
- 在Viewer模式下操作时,如果在组件中没有数据,则不显示。
|
|
33
|
+
- 在 Viewer 模式下操作时,如果在组件中没有数据,则不显示。
|
|
34
34
|
|
|
35
35
|
### intent sensitive
|
|
36
36
|
|
|
37
37
|
- 更改源组件的数据时,数据传播有效。 换句话说,即使重新设置了数据,除非实际更改该值,否则数据传播将不起作用。 这是一种提高监视目的效率的方法。
|
|
38
|
-
- 但是,当打开intent sensitive设置时,即使数据没有更改,即该值实际上并未更改,也可以进行数据传播。
|
|
39
|
-
- 此属性也对源组件的value属性的配置动作发生作用。
|
|
38
|
+
- 但是,当打开 intent sensitive 设置时,即使数据没有更改,即该值实际上并未更改,也可以进行数据传播。
|
|
39
|
+
- 此属性也对源组件的 value 属性的配置动作发生作用。
|
|
40
40
|
|
|
41
41
|
## Initial Data
|
|
42
42
|
|
|
43
43
|
- 设置组件的初始数据。
|
|
44
|
-
- 数据可以设置为字符串,数字或JSON对象类型之一。
|
|
44
|
+
- 数据可以设置为字符串,数字或 JSON 对象类型之一。
|
|
45
45
|
|
|
46
46
|
## Data Spread
|
|
47
47
|
|
|
@@ -58,11 +58,9 @@
|
|
|
58
58
|
### target
|
|
59
59
|
|
|
60
60
|
- 指定用于数据传播的目标组件。
|
|
61
|
-
- 由ID指定:#id
|
|
61
|
+
- 由 ID 指定:#id
|
|
62
62
|
- 指定为类:.class
|
|
63
|
-
- 基于数据的目标指定
|
|
64
|
-
-(key):以数据对象的键值为id的组件将成为目标组件。
|
|
65
|
-
-[property]:将数据对象的属性值作为ID的组件将成为目标组件。
|
|
63
|
+
- 基于数据的目标指定 -(key):以数据对象的键值为 id 的组件将成为目标组件。 -[property]:将数据对象的属性值作为 ID 的组件将成为目标组件。
|
|
66
64
|
|
|
67
65
|
### property
|
|
68
66
|
|
|
@@ -73,14 +71,20 @@
|
|
|
73
71
|
指定如何将要传播的数据应用于目标组件属性。
|
|
74
72
|
|
|
75
73
|
- value
|
|
76
|
-
|
|
74
|
+
- 值本身被设置为组件的目标属性。
|
|
77
75
|
- map
|
|
78
|
-
|
|
76
|
+
- 在目标组件的属性中设置数据属性的值。
|
|
79
77
|
- range
|
|
80
|
-
|
|
78
|
+
- 在目标组件的属性中设置包含该值的范围的映射值。
|
|
81
79
|
- eval
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
- eval 代码可以用 JavaScript 语法编写。
|
|
81
|
+
- eval 代码的 context (this)是源组件。
|
|
82
|
+
- eval 代码的参数具有 value 和 targets。
|
|
83
|
+
- value:源组件的数据中 accessor 对应的值
|
|
84
|
+
- targets:目标组件列表
|
|
85
|
+
|
|
86
|
+
### 无数据不传播(No Data No Spreading)
|
|
87
|
+
|
|
88
|
+
- 只有当根据规则类型的最终结果值不是空值时,才会传播数据。
|
|
89
|
+
- 如果结果值为 undefined、null、NaN 或空白 (''),则不会展开。
|
|
90
|
+
- 否则,即使结果是数字零,数据也会被传播。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/board-ui",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.50",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@material/mwc-list": "^0.25.3",
|
|
28
28
|
"@material/mwc-select": "^0.25.3",
|
|
29
|
-
"@operato/app": "^1.0.0-beta.
|
|
30
|
-
"@operato/board": "^1.0.0-beta.
|
|
31
|
-
"@operato/help": "^1.0.0-beta.
|
|
32
|
-
"@operato/i18n": "^1.0.0-beta.
|
|
33
|
-
"@operato/layout": "^1.0.0-beta.
|
|
34
|
-
"@operato/popup": "^1.0.0-beta.
|
|
29
|
+
"@operato/app": "^1.0.0-beta.20",
|
|
30
|
+
"@operato/board": "^1.0.0-beta.20",
|
|
31
|
+
"@operato/help": "^1.0.0-beta.20",
|
|
32
|
+
"@operato/i18n": "^1.0.0-beta.20",
|
|
33
|
+
"@operato/layout": "^1.0.0-beta.20",
|
|
34
|
+
"@operato/popup": "^1.0.0-beta.20",
|
|
35
35
|
"@polymer/iron-icon": "^3.0.1",
|
|
36
36
|
"@polymer/iron-icons": "^3.0.1",
|
|
37
37
|
"@polymer/paper-button": "^3.0.1",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"@polymer/paper-listbox": "^3.0.1",
|
|
42
42
|
"@polymer/paper-menu-button": "^3.0.1",
|
|
43
43
|
"@polymer/paper-slider": "^3.0.1",
|
|
44
|
-
"@things-factory/barcode-base": "^5.0.0-alpha.
|
|
45
|
-
"@things-factory/grist-ui": "^5.0.0-alpha.
|
|
44
|
+
"@things-factory/barcode-base": "^5.0.0-alpha.50",
|
|
45
|
+
"@things-factory/grist-ui": "^5.0.0-alpha.50",
|
|
46
46
|
"file-saver": "^2.0.2",
|
|
47
47
|
"sortablejs": "^1.10.2"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "ba819c6d9ddf60319283f620b80c9737e7486a91"
|
|
50
50
|
}
|
package/translations/en.json
CHANGED
|
@@ -305,6 +305,7 @@
|
|
|
305
305
|
"label.multiple": "multiple",
|
|
306
306
|
"label.name": "Name",
|
|
307
307
|
"label.ndns": "No Data No Show",
|
|
308
|
+
"label.ndnsp": "No Data No Spreading",
|
|
308
309
|
"label.near": "Near",
|
|
309
310
|
"label.needle-fill-style": "needle fill style",
|
|
310
311
|
"label.needle-fillstyle": "needle fill style",
|
|
@@ -323,8 +324,9 @@
|
|
|
323
324
|
"label.path": "path",
|
|
324
325
|
"label.pattern": "pattern",
|
|
325
326
|
"label.period": "period",
|
|
326
|
-
"label.
|
|
327
|
-
"label.picking-
|
|
327
|
+
"label.persistent-data": "persistent data",
|
|
328
|
+
"label.picking-location": "picking location",
|
|
329
|
+
"label.picking-order": "picking order",
|
|
328
330
|
"label.placeholder": "placeholder",
|
|
329
331
|
"label.play": "play",
|
|
330
332
|
"label.pls-name-font-family": "pls. name font-family",
|
|
@@ -625,4 +627,4 @@
|
|
|
625
627
|
"title.update-user": "Update User",
|
|
626
628
|
"title.update-variable": "Update Variable",
|
|
627
629
|
"title.warn": "Warning"
|
|
628
|
-
}
|
|
630
|
+
}
|
package/translations/ko.json
CHANGED
|
@@ -305,6 +305,7 @@
|
|
|
305
305
|
"label.multiple": "다중",
|
|
306
306
|
"label.name": "이름",
|
|
307
307
|
"label.ndns": "No Data No Show",
|
|
308
|
+
"label.ndnsp": "No Data No Spreading",
|
|
308
309
|
"label.near": "Near",
|
|
309
310
|
"label.needle-fill-style": "바늘 채우기 색상",
|
|
310
311
|
"label.needle-fillstyle": "바늘 채우기 스타일",
|
|
@@ -322,7 +323,8 @@
|
|
|
322
323
|
"label.passcode": "패스코드",
|
|
323
324
|
"label.path": "경로",
|
|
324
325
|
"label.pattern": "패턴",
|
|
325
|
-
"label.period": "
|
|
326
|
+
"label.period": "기간",
|
|
327
|
+
"label.persistent-data": "지속성 데이타",
|
|
326
328
|
"label.picking-location": "피킹 로케이션",
|
|
327
329
|
"label.picking-order": "피킹 오더",
|
|
328
330
|
"label.placeholder": "placeholder",
|
|
@@ -626,4 +628,4 @@
|
|
|
626
628
|
"title.update-user": "사용자 수정",
|
|
627
629
|
"title.update-variable": "변수 수정",
|
|
628
630
|
"title.warn": "경고"
|
|
629
|
-
}
|
|
631
|
+
}
|
package/translations/ms.json
CHANGED
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
"label.multi-axis": "pelbagai paksi",
|
|
305
305
|
"label.multiple": "pelbagai",
|
|
306
306
|
"label.name": "Nama",
|
|
307
|
-
"label.
|
|
307
|
+
"label.ndnsp": "No Data No Spreading",
|
|
308
308
|
"label.near": "hampir",
|
|
309
309
|
"label.needle-fill-style": "gaya isi needle",
|
|
310
310
|
"label.needle-fillstyle": "gaya isi needle",
|
|
@@ -323,6 +323,7 @@
|
|
|
323
323
|
"label.path": "jalan",
|
|
324
324
|
"label.pattern": "corak",
|
|
325
325
|
"label.period": "tempoh",
|
|
326
|
+
"label.persistent-data": "[ms] persistent data",
|
|
326
327
|
"label.picking-location": "memilih lokasi",
|
|
327
328
|
"label.picking-order": "memilih pesanan",
|
|
328
329
|
"label.placeholder": "ruang letak",
|
|
@@ -625,4 +626,4 @@
|
|
|
625
626
|
"title.update-user": "kemaskini pengguna",
|
|
626
627
|
"title.update-variable": "kemaskini pemboleh ubah",
|
|
627
628
|
"title.warn": "amaran"
|
|
628
|
-
}
|
|
629
|
+
}
|
package/translations/zh.json
CHANGED
|
@@ -306,6 +306,7 @@
|
|
|
306
306
|
"label.multiple": "多个",
|
|
307
307
|
"label.name": "名称",
|
|
308
308
|
"label.ndns": "无数据不显示",
|
|
309
|
+
"label.ndnsp": "无数据不传播",
|
|
309
310
|
"label.near": "NEAR",
|
|
310
311
|
"label.needle-fill-style": "指针填充样式",
|
|
311
312
|
"label.needle-fillstyle": "指针样式",
|
|
@@ -324,6 +325,7 @@
|
|
|
324
325
|
"label.path": "路径",
|
|
325
326
|
"label.pattern": "图案",
|
|
326
327
|
"label.period": "期间",
|
|
328
|
+
"label.persistent-data": "持久数据",
|
|
327
329
|
"label.picking-location": "取出位置",
|
|
328
330
|
"label.picking-order": "拣料单",
|
|
329
331
|
"label.placeholder": "占位符",
|
|
@@ -627,4 +629,4 @@
|
|
|
627
629
|
"title.update-user": "更新用户",
|
|
628
630
|
"title.update-variable": "更新变量",
|
|
629
631
|
"title.warn": "警告"
|
|
630
|
-
}
|
|
632
|
+
}
|