@things-factory/integration-ui 5.0.0-y.0 → 5.0.0-zeta.2

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,14 +1,14 @@
1
1
  import '@operato/data-grist'
2
2
 
3
- import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
4
- import { PageView, store } from '@operato/shell'
3
+ import gql from 'graphql-tag'
5
4
  import { css, html } from 'lit'
6
- import { i18next, localize } from '@operato/i18n'
5
+ import { connect } from 'pwa-helpers/connect-mixin'
7
6
 
8
- import { HelpDecoratedRenderer } from '@operato/help/help-decorated-renderer.js'
9
7
  import { client } from '@operato/graphql'
10
- import { connect } from 'pwa-helpers/connect-mixin'
11
- import gql from 'graphql-tag'
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'
12
12
  import { isMobileDevice } from '@operato/utils'
13
13
 
14
14
  export class Connection extends connect(store)(localize(i18next)(PageView)) {
@@ -240,18 +240,6 @@ export class Connection extends connect(store)(localize(i18next)(PageView)) {
240
240
  }
241
241
  ]
242
242
  }
243
-
244
- await this.updateComplete
245
-
246
- this.grist.fetch()
247
- }
248
-
249
- async pageUpdated(changes, lifecycle) {
250
- if (this.active) {
251
- await this.updateComplete
252
-
253
- this.grist.fetch()
254
- }
255
243
  }
256
244
 
257
245
  async fetchHandler({ page, limit, sortings = [], filters = [] }) {
@@ -66,8 +66,6 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
66
66
  `
67
67
  }
68
68
 
69
- async updated(changedProps) {}
70
-
71
69
  async firstUpdated() {
72
70
  this.select = ['name', 'description', 'sequence', 'task', 'connection', 'params', 'skip', 'log']
73
71
  this.gristConfig = {
@@ -223,8 +221,6 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
223
221
  `
224
222
  })
225
223
 
226
- this.requestRefresh()
227
-
228
224
  return {
229
225
  total: response.data.steps.total || 0,
230
226
  records: response.data.steps.items || []
@@ -284,7 +280,10 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
284
280
  }
285
281
  })
286
282
 
287
- if (!response.errors) this.dataGrist.fetch()
283
+ if (!response.errors) {
284
+ this.dataGrist.fetch()
285
+ this.requestRefresh()
286
+ }
288
287
  }
289
288
  }
290
289
 
@@ -308,6 +307,8 @@ class ScenarioDetail extends localize(i18next)(LitElement) {
308
307
  if (response.errors) return
309
308
 
310
309
  this.dataGrist.fetch()
310
+ this.requestRefresh()
311
+
311
312
  await document.dispatchEvent(
312
313
  new CustomEvent('notify', {
313
314
  detail: {
@@ -2,17 +2,17 @@ import '@operato/data-grist'
2
2
  import './scenario-detail'
3
3
  import './scenario-importer'
4
4
 
5
- import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
6
- import { PageView, navigate, store } from '@operato/shell'
5
+ import gql from 'graphql-tag'
7
6
  import { css, html } from 'lit'
8
- import { i18next, localize } from '@operato/i18n'
9
- import { notify, openPopup } from '@operato/layout'
7
+ import moment from 'moment-timezone'
8
+ import { connect } from 'pwa-helpers/connect-mixin'
10
9
 
11
10
  import { client } from '@operato/graphql'
12
- import { connect } from 'pwa-helpers/connect-mixin'
13
- import gql from 'graphql-tag'
11
+ import { i18next, localize } from '@operato/i18n'
12
+ import { notify, openPopup } from '@operato/layout'
13
+ import { navigate, PageView, store } from '@operato/shell'
14
+ import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
14
15
  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'
@@ -114,32 +114,9 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
114
114
  return this.renderRoot.querySelector('ox-grist')
115
115
  }
116
116
 
117
- // update with url params value
118
- _updateSearchConfig(lifecycle) {
119
- // this.searchConfig = this.searchConfig.map(conf => {
120
- // if (conf.name in lifecycle.params) {
121
- // conf.value = lifecycle.params[conf.name]
122
- // } else {
123
- // delete conf.value
124
- // }
125
- // return conf
126
- // })
127
- }
128
-
129
- // set default field value to record with searchConfig
130
- _setDefaultFieldsValue(fields) {
131
- // this.searchConfig.forEach(conf => {
132
- // if (!fields[conf.name] && conf.value) {
133
- // fields[conf.name] = conf.value
134
- // }
135
- // })
136
- }
137
-
138
117
  async pageInitialized(lifecycle) {
139
118
  this.fetchTaskTypes()
140
119
 
141
- this._updateSearchConfig(lifecycle)
142
-
143
120
  this.gristConfig = {
144
121
  list: { fields: ['name', 'description', 'schedule', 'active'] },
145
122
  columns: [
@@ -297,21 +274,13 @@ export class Scenario extends connect(store)(localize(i18next)(PageView)) {
297
274
  }
298
275
  ]
299
276
  }
300
-
301
- await this.updateComplete
302
-
303
- this.grist.fetch()
304
277
  }
305
278
 
306
- async pageUpdated(changes, lifecycle) {
307
- if (this.active) {
308
- // update with url params value
309
- this._updateSearchConfig(lifecycle)
310
- await this.updateComplete
311
-
312
- this.grist.fetch()
313
- }
314
- }
279
+ // async pageUpdated(changes, lifecycle) {
280
+ // if (this.active) {
281
+ // this.grist.fetch()
282
+ // }
283
+ // }
315
284
 
316
285
  async fetchHandler({ page, limit, sortings = [], filters = [] }) {
317
286
  const response = await client.query({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-ui",
3
- "version": "5.0.0-y.0",
3
+ "version": "5.0.0-zeta.2",
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-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-y.0",
37
- "@things-factory/import-base": "^5.0.0-y.0",
38
- "@things-factory/integration-base": "^5.0.0-y.0",
27
+ "@operato/app": "^1.0.0-beta.32",
28
+ "@operato/data-grist": "1.0.0-beta.30",
29
+ "@operato/graphql": "1.0.0-beta.30",
30
+ "@operato/help": "1.0.0-beta.30",
31
+ "@operato/i18n": "1.0.0-beta.30",
32
+ "@operato/layout": "1.0.0-beta.30",
33
+ "@operato/property-editor": "1.0.0-beta.30",
34
+ "@operato/styles": "1.0.0-beta.30",
35
+ "@operato/utils": "1.0.0-beta.30",
36
+ "@things-factory/export-base": "^5.0.0-zeta.2",
37
+ "@things-factory/import-base": "^5.0.0-zeta.2",
38
+ "@things-factory/integration-base": "^5.0.0-zeta.2",
39
39
  "moment-timezone": "^0.5.27",
40
40
  "subscriptions-transport-ws": "^0.11.0"
41
41
  },
42
- "gitHead": "2fb8066dae72d864b0fc3a5b439a18579fa39ee6"
42
+ "gitHead": "fe921b76f32ac48ceddf3c290110509bdb5750d6"
43
43
  }