@things-factory/integration-ui 5.0.0-alpha.10 → 5.0.0-alpha.13

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,11 +4,10 @@ import './editors/property-editor'
4
4
 
5
5
  import { ConnectionSelector } from './grist/connection-selector'
6
6
  import { ConnectorSelector } from './grist/connector-selector'
7
- import { CrontabEditor } from './grist/crontab-editor'
8
- import { JsonGristEditor } from './grist/json-grist-editor'
7
+ import { OxGristEditorCrontab } from '@operato/app/grist-editor/ox-grist-editor-crontab.js'
8
+ import { OxGristEditorJson } from '@operato/app/grist-editor/ox-grist-editor-json.js'
9
+ import { OxGristEditorParameters } from '@operato/app/grist-editor/ox-grist-editor-parameters.js'
9
10
  import { OxPropertyEditor } from '@operato/property-editor'
10
- import { ParametersEditor } from '@operato/app/grist/parameters-editor.js'
11
- // import { ParametersEditor } from './grist/parameters-editor'
12
11
  import { TaskTypeSelector } from './grist/task-type-selector'
13
12
  import { registerEditor as registerGristEditor } from '@operato/data-grist'
14
13
 
@@ -16,9 +15,9 @@ export default function bootstrap() {
16
15
  registerGristEditor('task-type', TaskTypeSelector)
17
16
  registerGristEditor('connector', ConnectorSelector)
18
17
  registerGristEditor('connection', ConnectionSelector)
19
- registerGristEditor('json', JsonGristEditor)
20
- registerGristEditor('parameters', ParametersEditor)
21
- registerGristEditor('crontab', CrontabEditor)
18
+ registerGristEditor('json', OxGristEditorJson)
19
+ registerGristEditor('parameters', OxGristEditorParameters)
20
+ registerGristEditor('crontab', OxGristEditorCrontab)
22
21
 
23
22
  OxPropertyEditor.register({
24
23
  'http-headers': 'property-editor-http-headers',
@@ -1,12 +1,11 @@
1
1
  import '@material/mwc-icon'
2
2
 
3
+ import { OxGristEditor } from '@operato/data-grist'
3
4
  import { html } from 'lit'
4
5
 
5
- import { InputEditor } from '@operato/data-grist'
6
-
7
6
  const EMPTY_OPTION = { name: '', value: '' }
8
7
 
9
- export class DynamicSelector extends InputEditor {
8
+ export class DynamicSelector extends OxGristEditor {
10
9
  getOptions() {
11
10
  return []
12
11
  }
@@ -1,9 +1,8 @@
1
+ import { OxGristEditor } from '@operato/data-grist'
2
+ import { client } from '@operato/graphql'
1
3
  import gql from 'graphql-tag'
2
4
  import { html } from 'lit'
3
5
 
4
- import { InputEditor } from '@operato/data-grist'
5
- import { client } from '@operato/graphql'
6
-
7
6
  const FETCH_TASK_TYPES_GQL = gql`
8
7
  query ($connectionName: String!) {
9
8
  taskTypesByConnection(connectionName: $connectionName) {
@@ -16,7 +15,7 @@ const FETCH_TASK_TYPES_GQL = gql`
16
15
 
17
16
  const EMPTY_OPTION = { name: '', value: '' }
18
17
 
19
- export class TaskTypeSelector extends InputEditor {
18
+ export class TaskTypeSelector extends OxGristEditor {
20
19
  async getOptions() {
21
20
  var { connectionName = '' } = this.column.record
22
21
  if (typeof connectionName === 'function') {
@@ -1,14 +1,14 @@
1
1
  import '@operato/data-grist'
2
2
 
3
- import gql from 'graphql-tag'
3
+ import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
4
+ import { PageView, store } from '@operato/shell'
4
5
  import { css, html } from 'lit'
5
- import { connect } from 'pwa-helpers/connect-mixin'
6
+ import { i18next, localize } from '@operato/i18n'
6
7
 
7
- import { client } from '@operato/graphql'
8
8
  import { HelpDecoratedRenderer } from '@operato/help/help-decorated-renderer.js'
9
- import { i18next, localize } from '@operato/i18n'
10
- import { PageView, store } from '@operato/shell'
11
- import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
9
+ import { client } from '@operato/graphql'
10
+ import { connect } from 'pwa-helpers/connect-mixin'
11
+ import gql from 'graphql-tag'
12
12
  import { isMobileDevice } from '@operato/utils'
13
13
 
14
14
  export class Connection extends connect(store)(localize(i18next)(PageView)) {
@@ -203,7 +203,8 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
203
203
  const { name, help, parameterSpec: spec } = record.type ? this.connectors?.[record.type] : {}
204
204
  const context = this.grist
205
205
  return { name, help, spec, context }
206
- }
206
+ },
207
+ renderer: 'json5'
207
208
  },
208
209
  width: 100
209
210
  },
@@ -364,13 +365,6 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
364
365
  }
365
366
  }
366
367
 
367
- async stateChanged(state) {
368
- if (this.active && this._currentPopupName && !state.layout.viewparts[this._currentPopupName]) {
369
- this.grist.fetch()
370
- this._currentPopupName = null
371
- }
372
- }
373
-
374
368
  async _updateConnectionManager() {
375
369
  let patches = this.grist.dirtyRecords
376
370
  if (patches && patches.length) {
@@ -1,9 +1,9 @@
1
- import gql from 'graphql-tag'
2
- import { css, html, LitElement } from 'lit'
1
+ import { LitElement, css, html } from 'lit'
2
+ import { i18next, localize } from '@operato/i18n'
3
3
 
4
- import { client } from '@operato/graphql'
5
4
  import { HelpDecoratedRenderer } from '@operato/help/help-decorated-renderer.js'
6
- import { i18next, localize } from '@operato/i18n'
5
+ import { client } from '@operato/graphql'
6
+ import gql from 'graphql-tag'
7
7
  import { isMobileDevice } from '@operato/utils'
8
8
 
9
9
  class ScenarioDetail extends localize(i18next)(LitElement) {
@@ -179,7 +179,8 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
179
179
  var { name, parameterSpec: spec, help } = record.task ? this.taskTypes?.[record.task] : {}
180
180
  const context = this.dataGrist
181
181
  return { name, spec, help, context }
182
- }
182
+ },
183
+ renderer: 'json5'
183
184
  },
184
185
  width: 200
185
186
  }
@@ -2,17 +2,17 @@ import '@operato/data-grist'
2
2
  import './scenario-detail'
3
3
  import './scenario-importer'
4
4
 
5
- import gql from 'graphql-tag'
5
+ import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
6
+ import { PageView, navigate, store } from '@operato/shell'
6
7
  import { css, html } from 'lit'
7
- import moment from 'moment-timezone'
8
- import { connect } from 'pwa-helpers/connect-mixin'
9
-
10
- import { client } from '@operato/graphql'
11
8
  import { i18next, localize } from '@operato/i18n'
12
9
  import { notify, openPopup } from '@operato/layout'
13
- import { navigate, PageView, store } from '@operato/shell'
14
- import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
10
+
11
+ import { client } from '@operato/graphql'
12
+ import { connect } from 'pwa-helpers/connect-mixin'
13
+ import gql from 'graphql-tag'
15
14
  import { isMobileDevice } from '@operato/utils'
15
+ import moment from 'moment-timezone'
16
16
 
17
17
  function IS_SCENARIO_RUNNING(state) {
18
18
  return state && state !== 'UNLOADED'
@@ -417,13 +417,6 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
417
417
  }
418
418
  }
419
419
 
420
- async stateChanged(state) {
421
- if (this.active && this._currentPopupName && !state.layout.viewparts[this._currentPopupName]) {
422
- this.grist.fetch()
423
- this._currentPopupName = null
424
- }
425
- }
426
-
427
420
  async _copyScenario() {
428
421
  var selected = this.grist.selected
429
422
  if (selected.length == 0) return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-ui",
3
- "version": "5.0.0-alpha.10",
3
+ "version": "5.0.0-alpha.13",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,20 +24,20 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@operato/app": "^1.0.0-alpha.23",
28
- "@operato/data-grist": "1.0.0-alpha.23",
29
- "@operato/graphql": "1.0.0-alpha.23",
30
- "@operato/help": "1.0.0-alpha.23",
31
- "@operato/i18n": "1.0.0-alpha.23",
32
- "@operato/layout": "1.0.0-alpha.23",
33
- "@operato/property-editor": "1.0.0-alpha.23",
34
- "@operato/styles": "1.0.0-alpha.23",
35
- "@operato/utils": "1.0.0-alpha.23",
36
- "@things-factory/export-base": "^5.0.0-alpha.10",
37
- "@things-factory/import-base": "^5.0.0-alpha.10",
38
- "@things-factory/integration-base": "^5.0.0-alpha.10",
27
+ "@operato/app": "^1.0.0-alpha.33",
28
+ "@operato/data-grist": "1.0.0-alpha.33",
29
+ "@operato/graphql": "1.0.0-alpha.33",
30
+ "@operato/help": "1.0.0-alpha.33",
31
+ "@operato/i18n": "1.0.0-alpha.33",
32
+ "@operato/layout": "1.0.0-alpha.33",
33
+ "@operato/property-editor": "1.0.0-alpha.33",
34
+ "@operato/styles": "1.0.0-alpha.33",
35
+ "@operato/utils": "1.0.0-alpha.33",
36
+ "@things-factory/export-base": "^5.0.0-alpha.13",
37
+ "@things-factory/import-base": "^5.0.0-alpha.13",
38
+ "@things-factory/integration-base": "^5.0.0-alpha.13",
39
39
  "moment-timezone": "^0.5.27",
40
40
  "subscriptions-transport-ws": "^0.11.0"
41
41
  },
42
- "gitHead": "24e85b0265d10cb664b8279bb927ea2a86227775"
42
+ "gitHead": "49704052461599b174959ff494abb9ef1facd887"
43
43
  }