@things-factory/integration-ui 5.0.0-alpha.5 → 5.0.0-alpha.52
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/bootstrap.js +11 -7
- package/client/grist/dynamic-selector.js +2 -3
- package/client/grist/task-type-selector.js +3 -4
- package/client/pages/connection.js +8 -14
- package/client/pages/scenario-detail.js +6 -5
- package/client/pages/scenario.js +7 -14
- package/package.json +14 -14
- package/client/grist/crontab-editor-popup.js +0 -610
- package/client/grist/crontab-editor.js +0 -65
- package/client/grist/json-editor.js +0 -120
- package/client/grist/json-grist-editor.js +0 -108
- package/client/grist/parameters-editor-builder.js +0 -133
- package/client/grist/parameters-editor-popup.js +0 -112
- package/client/grist/parameters-editor.js +0 -117
package/client/bootstrap.js
CHANGED
|
@@ -2,22 +2,26 @@ import '@material/mwc-icon'
|
|
|
2
2
|
import './editors/entity-editor'
|
|
3
3
|
import './editors/property-editor'
|
|
4
4
|
|
|
5
|
+
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist'
|
|
6
|
+
|
|
5
7
|
import { ConnectionSelector } from './grist/connection-selector'
|
|
6
8
|
import { ConnectorSelector } from './grist/connector-selector'
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
+
import { OxGristEditorCrontab } from '@operato/app/grist-editor/ox-grist-editor-crontab.js'
|
|
10
|
+
import { OxGristEditorJson } from '@operato/app/grist-editor/ox-grist-editor-json.js'
|
|
11
|
+
import { OxGristEditorParameters } from '@operato/app/grist-editor/ox-grist-editor-parameters.js'
|
|
12
|
+
import { OxGristRendererCrontab } from '@operato/app/grist-editor/ox-grist-renderer-crontab.js'
|
|
9
13
|
import { OxPropertyEditor } from '@operato/property-editor'
|
|
10
|
-
import { ParametersEditor } from './grist/parameters-editor'
|
|
11
14
|
import { TaskTypeSelector } from './grist/task-type-selector'
|
|
12
|
-
import { registerEditor as registerGristEditor } from '@operato/data-grist'
|
|
13
15
|
|
|
14
16
|
export default function bootstrap() {
|
|
15
17
|
registerGristEditor('task-type', TaskTypeSelector)
|
|
16
18
|
registerGristEditor('connector', ConnectorSelector)
|
|
17
19
|
registerGristEditor('connection', ConnectionSelector)
|
|
18
|
-
registerGristEditor('json',
|
|
19
|
-
registerGristEditor('parameters',
|
|
20
|
-
registerGristEditor('crontab',
|
|
20
|
+
registerGristEditor('json', OxGristEditorJson)
|
|
21
|
+
registerGristEditor('parameters', OxGristEditorParameters)
|
|
22
|
+
registerGristEditor('crontab', OxGristEditorCrontab)
|
|
23
|
+
|
|
24
|
+
registerGristRenderer('crontab', OxGristRendererCrontab)
|
|
21
25
|
|
|
22
26
|
OxPropertyEditor.register({
|
|
23
27
|
'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
|
|
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
|
|
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
|
|
3
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
|
4
|
+
import { PageView, store } from '@operato/shell'
|
|
4
5
|
import { css, html } from 'lit'
|
|
5
|
-
import {
|
|
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 {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
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
|
|
2
|
-
import {
|
|
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 {
|
|
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
|
}
|
package/client/pages/scenario.js
CHANGED
|
@@ -2,17 +2,17 @@ import '@operato/data-grist'
|
|
|
2
2
|
import './scenario-detail'
|
|
3
3
|
import './scenario-importer'
|
|
4
4
|
|
|
5
|
-
import
|
|
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
|
-
|
|
14
|
-
import {
|
|
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.
|
|
3
|
+
"version": "5.0.0-alpha.52",
|
|
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/
|
|
28
|
-
"@operato/
|
|
29
|
-
"@operato/
|
|
30
|
-
"@operato/
|
|
31
|
-
"@operato/
|
|
32
|
-
"@operato/
|
|
33
|
-
"@operato/
|
|
34
|
-
"@operato/
|
|
35
|
-
"@
|
|
36
|
-
"@things-factory/
|
|
37
|
-
"@things-factory/
|
|
38
|
-
"@things-factory/
|
|
27
|
+
"@operato/app": "^1.0.0-beta.26",
|
|
28
|
+
"@operato/data-grist": "1.0.0-beta.26",
|
|
29
|
+
"@operato/graphql": "1.0.0-beta.26",
|
|
30
|
+
"@operato/help": "1.0.0-beta.26",
|
|
31
|
+
"@operato/i18n": "1.0.0-beta.26",
|
|
32
|
+
"@operato/layout": "1.0.0-beta.26",
|
|
33
|
+
"@operato/property-editor": "1.0.0-beta.26",
|
|
34
|
+
"@operato/styles": "1.0.0-beta.26",
|
|
35
|
+
"@operato/utils": "1.0.0-beta.26",
|
|
36
|
+
"@things-factory/export-base": "^5.0.0-alpha.52",
|
|
37
|
+
"@things-factory/import-base": "^5.0.0-alpha.52",
|
|
38
|
+
"@things-factory/integration-base": "^5.0.0-alpha.52",
|
|
39
39
|
"moment-timezone": "^0.5.27",
|
|
40
40
|
"subscriptions-transport-ws": "^0.11.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "dd9c8f2e256e256e42bd9bd26db5eaa955f85620"
|
|
43
43
|
}
|