@things-factory/integration-ui 4.0.26 → 4.0.31
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.
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import '@things-factory/modeller-ui'
|
|
6
6
|
|
|
7
|
-
import { LitElement } from 'lit-element'
|
|
8
|
-
import { OxPropertyEditor } from '@operato/property-editor'
|
|
7
|
+
import { html, LitElement } from 'lit-element'
|
|
9
8
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
9
|
+
|
|
10
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
10
11
|
import { store } from '@things-factory/shell'
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -53,8 +54,12 @@ class ParametersEditorBuilder extends connect(store)(LitElement) {
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
render() {
|
|
58
|
+
return html`<slot></slot>`
|
|
59
|
+
}
|
|
60
|
+
|
|
56
61
|
firstUpdated() {
|
|
57
|
-
this.
|
|
62
|
+
this.addEventListener('change', this._onValueChanged.bind(this))
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
updated(change) {
|
|
@@ -62,10 +67,8 @@ class ParametersEditorBuilder extends connect(store)(LitElement) {
|
|
|
62
67
|
change.has('value') && this._setValues()
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
stateChanged(state) {}
|
|
66
|
-
|
|
67
70
|
_onPropsChanged(props) {
|
|
68
|
-
this.
|
|
71
|
+
this.textContent = ''
|
|
69
72
|
;(props || []).forEach(prop => {
|
|
70
73
|
let elementType = OxPropertyEditor.getEditor(prop.type)
|
|
71
74
|
if (!elementType) {
|
|
@@ -87,13 +90,13 @@ class ParametersEditorBuilder extends connect(store)(LitElement) {
|
|
|
87
90
|
element.property = prop.property
|
|
88
91
|
element.setAttribute('property-editor', true)
|
|
89
92
|
|
|
90
|
-
this.
|
|
93
|
+
this.appendChild(element)
|
|
91
94
|
})
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
_setValues() {
|
|
95
98
|
var value = this.value || {}
|
|
96
|
-
Array.from(this.
|
|
99
|
+
Array.from(this.querySelectorAll('[name]')).forEach(prop => {
|
|
97
100
|
let name = prop.getAttribute('name')
|
|
98
101
|
prop.value = value[name] === undefined ? DEFAULT_VALUE[prop.type] : value[name]
|
|
99
102
|
})
|
|
@@ -101,7 +104,7 @@ class ParametersEditorBuilder extends connect(store)(LitElement) {
|
|
|
101
104
|
|
|
102
105
|
_getValues() {
|
|
103
106
|
var value = {}
|
|
104
|
-
Array.from(this.
|
|
107
|
+
Array.from(this.querySelectorAll('[name]')).forEach(prop => {
|
|
105
108
|
let name = prop.getAttribute('name')
|
|
106
109
|
value[name] = prop.value === undefined ? DEFAULT_VALUE[prop.type] : prop.value
|
|
107
110
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/integration-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.31",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@operato/data-grist": "^0.3.
|
|
28
|
-
"@operato/property-editor": "^0.3.
|
|
29
|
-
"@things-factory/export-base": "^4.0.
|
|
30
|
-
"@things-factory/import-base": "^4.0.
|
|
31
|
-
"@things-factory/integration-base": "^4.0.
|
|
32
|
-
"@things-factory/modeller-ui": "^4.0.
|
|
27
|
+
"@operato/data-grist": "^0.3.7",
|
|
28
|
+
"@operato/property-editor": "^0.3.7",
|
|
29
|
+
"@things-factory/export-base": "^4.0.31",
|
|
30
|
+
"@things-factory/import-base": "^4.0.31",
|
|
31
|
+
"@things-factory/integration-base": "^4.0.31",
|
|
32
|
+
"@things-factory/modeller-ui": "^4.0.31",
|
|
33
33
|
"moment-timezone": "^0.5.27",
|
|
34
34
|
"subscriptions-transport-ws": "^0.11.0"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "6c021ffdeacc9d123298528f6bba91f61389f33d"
|
|
37
37
|
}
|