@things-factory/integration-ui 4.0.25 → 4.0.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.
@@ -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.renderRoot.addEventListener('change', this._onValueChanged.bind(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.renderRoot.textContent = ''
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.renderRoot.appendChild(element)
93
+ this.appendChild(element)
91
94
  })
92
95
  }
93
96
 
94
97
  _setValues() {
95
98
  var value = this.value || {}
96
- Array.from(this.renderRoot.querySelectorAll('[name]')).forEach(prop => {
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.renderRoot.querySelectorAll('[name]')).forEach(prop => {
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
  })
@@ -1,8 +1,9 @@
1
- import { LitElement, html, css } from 'lit-element'
2
- import { unsafeHTML } from 'lit-html/directives/unsafe-html'
3
- import { asyncReplace } from 'lit-html/directives/async-replace'
4
- import { sleep } from '@things-factory/utils'
1
+ import { LitElement, css, html } from 'lit'
2
+
5
3
  import { ScrollbarStyles } from '@things-factory/styles'
4
+ import { asyncReplace } from 'lit/directives/async-replace.js'
5
+ import { sleep } from '@things-factory/utils'
6
+ import { unsafeHTML } from 'lit/directives/unsafe-html.js'
6
7
 
7
8
  export class PendingQMonitor extends LitElement {
8
9
  static get styles() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-ui",
3
- "version": "4.0.25",
3
+ "version": "4.0.30",
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.2.52",
28
- "@operato/property-editor": "^0.2.52",
29
- "@things-factory/export-base": "^4.0.25",
30
- "@things-factory/import-base": "^4.0.25",
31
- "@things-factory/integration-base": "^4.0.25",
32
- "@things-factory/modeller-ui": "^4.0.25",
27
+ "@operato/data-grist": "^0.3.7",
28
+ "@operato/property-editor": "^0.3.7",
29
+ "@things-factory/export-base": "^4.0.30",
30
+ "@things-factory/import-base": "^4.0.30",
31
+ "@things-factory/integration-base": "^4.0.30",
32
+ "@things-factory/modeller-ui": "^4.0.30",
33
33
  "moment-timezone": "^0.5.27",
34
34
  "subscriptions-transport-ws": "^0.11.0"
35
35
  },
36
- "gitHead": "9c44141d651dab7b4a9c0f0b6fecb8d6937d116f"
36
+ "gitHead": "4ab590326e3fc60d113fb438e90eefee708f1f19"
37
37
  }