@things-factory/integration-ui 4.0.9 → 4.0.10

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,15 +1,15 @@
1
1
  import '@material/mwc-icon'
2
- import { registerEditor as registerGristEditor } from '@things-factory/grist-ui'
3
- import { ADD_MODELLER_EDITORS } from '@things-factory/modeller-ui'
4
- import { store } from '@things-factory/shell'
5
2
  import './editors/entity-editor'
6
3
  import './editors/property-editor'
4
+
7
5
  import { ConnectionSelector } from './grist/connection-selector'
8
6
  import { ConnectorSelector } from './grist/connector-selector'
9
7
  import { CrontabEditor } from './grist/crontab-editor'
10
8
  import { JsonGristEditor } from './grist/json-grist-editor'
9
+ import { OxPropertyEditor } from '@operato/property-editor'
11
10
  import { ParametersEditor } from './grist/parameters-editor'
12
11
  import { TaskTypeSelector } from './grist/task-type-selector'
12
+ import { registerEditor as registerGristEditor } from '@things-factory/grist-ui'
13
13
 
14
14
  export default function bootstrap() {
15
15
  registerGristEditor('task-type', TaskTypeSelector)
@@ -19,14 +19,11 @@ export default function bootstrap() {
19
19
  registerGristEditor('parameters', ParametersEditor)
20
20
  registerGristEditor('crontab', CrontabEditor)
21
21
 
22
- store.dispatch({
23
- type: ADD_MODELLER_EDITORS,
24
- editors: {
25
- 'http-headers': 'property-editor-http-headers',
26
- 'http-parameters': 'property-editor-http-parameters',
27
- 'http-body': 'property-editor-http-body',
28
- 'entity-selector': 'property-editor-entity-selector',
29
- 'scenario-step-input': 'property-editor-scenario-step-input'
30
- }
22
+ OxPropertyEditor.register({
23
+ 'http-headers': 'property-editor-http-headers',
24
+ 'http-parameters': 'property-editor-http-parameters',
25
+ 'http-body': 'property-editor-http-body',
26
+ 'entity-selector': 'property-editor-entity-selector',
27
+ 'scenario-step-input': 'property-editor-scenario-step-input'
31
28
  })
32
29
  }
@@ -1,15 +1,17 @@
1
1
  /*
2
2
  * Copyright © HatioLab Inc. All rights reserved.
3
3
  */
4
- import { html, css } from 'lit-element'
5
- import { ThingsEditorProperty, ThingsEditorPropertyStyles } from '@things-factory/modeller-ui'
6
- import { deepClone } from '@things-factory/utils'
7
4
 
8
5
  import './things-editor-entity-selector'
9
6
 
10
- export class PropertyEditorEntitySelector extends ThingsEditorProperty {
7
+ import { css, html } from 'lit-element'
8
+
9
+ import { OxPropertyEditor } from '@operato/property-editor'
10
+ import { deepClone } from '@things-factory/utils'
11
+
12
+ export class PropertyEditorEntitySelector extends OxPropertyEditor {
11
13
  static get styles() {
12
- return [ThingsEditorPropertyStyles]
14
+ return [...OxPropertyEditor.styles]
13
15
  }
14
16
 
15
17
  editorTemplate(props) {
@@ -1,16 +1,16 @@
1
1
  /*
2
2
  * Copyright © HatioLab Inc. All rights reserved.
3
3
  */
4
- import { html, css } from 'lit-element'
5
- import { ThingsEditorProperty, ThingsEditorPropertyStyles } from '@things-factory/modeller-ui'
6
-
7
4
  import './things-editor-http-headers'
8
5
  import './things-editor-http-parameters'
9
6
  import './things-editor-http-body'
10
7
 
11
- export class PropertyEditorScenarioStepInput extends ThingsEditorProperty {
8
+ import { OxPropertyEditor } from '@operato/property-editor'
9
+ import { html } from 'lit-element'
10
+
11
+ export class PropertyEditorScenarioStepInput extends OxPropertyEditor {
12
12
  static get styles() {
13
- return [ThingsEditorPropertyStyles]
13
+ return [...OxPropertyEditor.styles]
14
14
  }
15
15
 
16
16
  editorTemplate(props) {
@@ -27,9 +27,9 @@ export class PropertyEditorScenarioStepInput extends ThingsEditorProperty {
27
27
 
28
28
  customElements.define('property-editor-scenario-step-input', PropertyEditorScenarioStepInput)
29
29
 
30
- export class PropertyEditorHttpHeaders extends ThingsEditorProperty {
30
+ export class PropertyEditorHttpHeaders extends OxPropertyEditor {
31
31
  static get styles() {
32
- return [ThingsEditorPropertyStyles]
32
+ return [...OxPropertyEditor.styles]
33
33
  }
34
34
 
35
35
  editorTemplate(props) {
@@ -45,9 +45,9 @@ export class PropertyEditorHttpHeaders extends ThingsEditorProperty {
45
45
 
46
46
  customElements.define('property-editor-http-headers', PropertyEditorHttpHeaders)
47
47
 
48
- export class PropertyEditorHttpParameters extends ThingsEditorProperty {
48
+ export class PropertyEditorHttpParameters extends OxPropertyEditor {
49
49
  static get styles() {
50
- return [ThingsEditorPropertyStyles]
50
+ return [...OxPropertyEditor.styles]
51
51
  }
52
52
 
53
53
  editorTemplate(props) {
@@ -63,9 +63,9 @@ export class PropertyEditorHttpParameters extends ThingsEditorProperty {
63
63
 
64
64
  customElements.define('property-editor-http-parameters', PropertyEditorHttpParameters)
65
65
 
66
- export class PropertyEditorHttpBody extends ThingsEditorProperty {
66
+ export class PropertyEditorHttpBody extends OxPropertyEditor {
67
67
  static get styles() {
68
- return [ThingsEditorPropertyStyles]
68
+ return [...OxPropertyEditor.styles]
69
69
  }
70
70
 
71
71
  editorTemplate(props) {
@@ -2,10 +2,12 @@
2
2
  * @license Copyright © HatioLab Inc. All rights reserved.
3
3
  */
4
4
 
5
+ import '@things-factory/modeller-ui'
6
+
5
7
  import { LitElement } from 'lit-element'
8
+ import { OxPropertyEditor } from '@operato/property-editor'
6
9
  import { connect } from 'pwa-helpers/connect-mixin'
7
10
  import { store } from '@things-factory/shell'
8
- import '@things-factory/modeller-ui'
9
11
 
10
12
  /**
11
13
  모든 에디터들은 change 이벤트를 지원해야 한다. 또한, 모든 에디터들은 value속성에 값을 가져야 한다.
@@ -60,14 +62,12 @@ class ParametersEditorBuilder extends connect(store)(LitElement) {
60
62
  change.has('value') && this._setValues()
61
63
  }
62
64
 
63
- stateChanged(state) {
64
- this.propertyEditor = state.modeller.editors
65
- }
65
+ stateChanged(state) {}
66
66
 
67
67
  _onPropsChanged(props) {
68
68
  this.renderRoot.textContent = ''
69
69
  ;(props || []).forEach(prop => {
70
- let elementType = this.propertyEditor[prop.type]
70
+ let elementType = OxPropertyEditor.getEditor(prop.type)
71
71
  if (!elementType) {
72
72
  console.warn('Property Editor not defined', prop.type)
73
73
  return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-ui",
3
- "version": "4.0.9",
3
+ "version": "4.0.10",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,12 +24,13 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/export-base": "^4.0.9",
28
- "@things-factory/import-base": "^4.0.9",
29
- "@things-factory/integration-base": "^4.0.9",
30
- "@things-factory/modeller-ui": "^4.0.9",
27
+ "@operato/property-editor": "^0.2.35",
28
+ "@things-factory/export-base": "^4.0.10",
29
+ "@things-factory/import-base": "^4.0.10",
30
+ "@things-factory/integration-base": "^4.0.10",
31
+ "@things-factory/modeller-ui": "^4.0.10",
31
32
  "moment-timezone": "^0.5.27",
32
33
  "subscriptions-transport-ws": "^0.11.0"
33
34
  },
34
- "gitHead": "81c8ae24487cfe79da62717f12bb6752761911ae"
35
+ "gitHead": "1815d5f855c0e4613bd286e1ca9e7d8fd632605a"
35
36
  }