@things-factory/process 7.0.1-alpha.4 → 7.0.1-alpha.41

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.
Files changed (38) hide show
  1. package/client/pages/event/event-importer.ts +7 -19
  2. package/client/pages/event/event-list-page.ts +6 -5
  3. package/client/pages/gateway/gateway-importer.ts +7 -18
  4. package/client/pages/gateway/gateway-list-page.ts +6 -5
  5. package/client/pages/process/process-importer.ts +7 -18
  6. package/client/pages/process/process-list-page.ts +6 -5
  7. package/client/pages/process-instance/process-instance-importer.ts +7 -18
  8. package/client/pages/process-instance/process-instance-list-page.ts +6 -5
  9. package/client/pages/process-thread/process-thread-importer.ts +7 -18
  10. package/client/pages/process-thread/process-thread-list-page.ts +6 -5
  11. package/dist-client/pages/event/event-importer.d.ts +1 -0
  12. package/dist-client/pages/event/event-importer.js +4 -11
  13. package/dist-client/pages/event/event-importer.js.map +1 -1
  14. package/dist-client/pages/event/event-list-page.js +6 -5
  15. package/dist-client/pages/event/event-list-page.js.map +1 -1
  16. package/dist-client/pages/gateway/gateway-importer.d.ts +1 -0
  17. package/dist-client/pages/gateway/gateway-importer.js +4 -11
  18. package/dist-client/pages/gateway/gateway-importer.js.map +1 -1
  19. package/dist-client/pages/gateway/gateway-list-page.js +6 -5
  20. package/dist-client/pages/gateway/gateway-list-page.js.map +1 -1
  21. package/dist-client/pages/process/process-importer.d.ts +1 -0
  22. package/dist-client/pages/process/process-importer.js +4 -11
  23. package/dist-client/pages/process/process-importer.js.map +1 -1
  24. package/dist-client/pages/process/process-list-page.js +6 -5
  25. package/dist-client/pages/process/process-list-page.js.map +1 -1
  26. package/dist-client/pages/process-instance/process-instance-importer.d.ts +1 -0
  27. package/dist-client/pages/process-instance/process-instance-importer.js +4 -11
  28. package/dist-client/pages/process-instance/process-instance-importer.js.map +1 -1
  29. package/dist-client/pages/process-instance/process-instance-list-page.js +6 -5
  30. package/dist-client/pages/process-instance/process-instance-list-page.js.map +1 -1
  31. package/dist-client/pages/process-thread/process-thread-importer.d.ts +1 -0
  32. package/dist-client/pages/process-thread/process-thread-importer.js +4 -11
  33. package/dist-client/pages/process-thread/process-thread-importer.js.map +1 -1
  34. package/dist-client/pages/process-thread/process-thread-list-page.js +6 -5
  35. package/dist-client/pages/process-thread/process-thread-list-page.js.map +1 -1
  36. package/dist-client/tsconfig.tsbuildinfo +1 -1
  37. package/dist-server/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +10 -10
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import '@operato/data-grist'
2
3
 
3
4
  import gql from 'graphql-tag'
@@ -7,9 +8,10 @@ import { property } from 'lit/decorators.js'
7
8
  import { client } from '@operato/graphql'
8
9
  import { i18next } from '@operato/i18n'
9
10
  import { isMobileDevice } from '@operato/utils'
10
-
11
+ import { ButtonContainerStyles } from '@operato/styles'
11
12
  export class EventImporter extends LitElement {
12
13
  static styles = [
14
+ ButtonContainerStyles,
13
15
  css`
14
16
  :host {
15
17
  display: flex;
@@ -21,16 +23,6 @@ export class EventImporter extends LitElement {
21
23
  ox-grist {
22
24
  flex: 1;
23
25
  }
24
-
25
- .button-container {
26
- display: flex;
27
- margin-left: auto;
28
- padding: var(--padding-default);
29
- }
30
-
31
- mwc-button {
32
- margin-left: var(--margin-default);
33
- }
34
26
  `
35
27
  ]
36
28
 
@@ -60,21 +52,18 @@ export class EventImporter extends LitElement {
60
52
  ]
61
53
  }
62
54
 
63
-
64
55
  render() {
65
56
  return html`
66
57
  <ox-grist
67
58
  .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
68
59
  .config=${this.columns}
69
- .data=${
70
- {
71
- records: this.events
72
- }
73
- }
60
+ .data=${{
61
+ records: this.events
62
+ }}
74
63
  ></ox-grist>
75
64
 
76
65
  <div class="button-container">
77
- <mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
66
+ <button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
78
67
  </div>
79
68
  `
80
69
  }
@@ -94,4 +83,3 @@ export class EventImporter extends LitElement {
94
83
  this.dispatchEvent(new CustomEvent('imported'))
95
84
  }
96
85
  }
97
-
@@ -100,7 +100,7 @@ export class EventListPage extends connect(store)(localize(i18next)(ScopedElemen
100
100
 
101
101
  <div id="sorters">
102
102
  Sort
103
- <mwc-icon
103
+ <md-icon
104
104
  @click=${e => {
105
105
  const target = e.currentTarget
106
106
  this.sortersControl.open({
@@ -108,7 +108,7 @@ export class EventListPage extends connect(store)(localize(i18next)(ScopedElemen
108
108
  top: target.offsetTop + target.offsetHeight
109
109
  })
110
110
  }}
111
- >expand_more</mwc-icon
111
+ >expand_more</md-icon
112
112
  >
113
113
  <ox-popup id="sorter-control">
114
114
  <ox-sorters-control> </ox-sorters-control>
@@ -116,9 +116,10 @@ export class EventListPage extends connect(store)(localize(i18next)(ScopedElemen
116
116
  </div>
117
117
 
118
118
  <div id="modes">
119
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
120
- <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
121
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
119
+ <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
120
+ <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
121
+ <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
122
+ </div>
122
123
  </div>
123
124
  </div>
124
125
  </ox-grist>
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import '@operato/data-grist'
2
3
 
3
4
  import gql from 'graphql-tag'
@@ -7,9 +8,11 @@ import { property } from 'lit/decorators.js'
7
8
  import { client } from '@operato/graphql'
8
9
  import { i18next } from '@operato/i18n'
9
10
  import { isMobileDevice } from '@operato/utils'
11
+ import { ButtonContainerStyles } from '@operato/styles'
10
12
 
11
13
  export class GatewayImporter extends LitElement {
12
14
  static styles = [
15
+ ButtonContainerStyles,
13
16
  css`
14
17
  :host {
15
18
  display: flex;
@@ -21,16 +24,6 @@ export class GatewayImporter extends LitElement {
21
24
  ox-grist {
22
25
  flex: 1;
23
26
  }
24
-
25
- .button-container {
26
- display: flex;
27
- margin-left: auto;
28
- padding: var(--padding-default);
29
- }
30
-
31
- mwc-button {
32
- margin-left: var(--margin-default);
33
- }
34
27
  `
35
28
  ]
36
29
 
@@ -60,21 +53,18 @@ export class GatewayImporter extends LitElement {
60
53
  ]
61
54
  }
62
55
 
63
-
64
56
  render() {
65
57
  return html`
66
58
  <ox-grist
67
59
  .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
68
60
  .config=${this.columns}
69
- .data=${
70
- {
71
- records: this.gateways
72
- }
73
- }
61
+ .data=${{
62
+ records: this.gateways
63
+ }}
74
64
  ></ox-grist>
75
65
 
76
66
  <div class="button-container">
77
- <mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
67
+ <button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
78
68
  </div>
79
69
  `
80
70
  }
@@ -94,4 +84,3 @@ export class GatewayImporter extends LitElement {
94
84
  this.dispatchEvent(new CustomEvent('imported'))
95
85
  }
96
86
  }
97
-
@@ -100,7 +100,7 @@ export class GatewayListPage extends connect(store)(localize(i18next)(ScopedElem
100
100
 
101
101
  <div id="sorters">
102
102
  Sort
103
- <mwc-icon
103
+ <md-icon
104
104
  @click=${e => {
105
105
  const target = e.currentTarget
106
106
  this.sortersControl.open({
@@ -108,7 +108,7 @@ export class GatewayListPage extends connect(store)(localize(i18next)(ScopedElem
108
108
  top: target.offsetTop + target.offsetHeight
109
109
  })
110
110
  }}
111
- >expand_more</mwc-icon
111
+ >expand_more</md-icon
112
112
  >
113
113
  <ox-popup id="sorter-control">
114
114
  <ox-sorters-control> </ox-sorters-control>
@@ -116,9 +116,10 @@ export class GatewayListPage extends connect(store)(localize(i18next)(ScopedElem
116
116
  </div>
117
117
 
118
118
  <div id="modes">
119
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
120
- <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
121
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
119
+ <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
120
+ <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
121
+ <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
122
+ </div>
122
123
  </div>
123
124
  </div>
124
125
  </ox-grist>
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import '@operato/data-grist'
2
3
 
3
4
  import gql from 'graphql-tag'
@@ -7,9 +8,11 @@ import { property } from 'lit/decorators.js'
7
8
  import { client } from '@operato/graphql'
8
9
  import { i18next } from '@operato/i18n'
9
10
  import { isMobileDevice } from '@operato/utils'
11
+ import { ButtonContainerStyles } from '@operato/styles'
10
12
 
11
13
  export class ProcessImporter extends LitElement {
12
14
  static styles = [
15
+ ButtonContainerStyles,
13
16
  css`
14
17
  :host {
15
18
  display: flex;
@@ -21,16 +24,6 @@ export class ProcessImporter extends LitElement {
21
24
  ox-grist {
22
25
  flex: 1;
23
26
  }
24
-
25
- .button-container {
26
- display: flex;
27
- margin-left: auto;
28
- padding: var(--padding-default);
29
- }
30
-
31
- mwc-button {
32
- margin-left: var(--margin-default);
33
- }
34
27
  `
35
28
  ]
36
29
 
@@ -60,21 +53,18 @@ export class ProcessImporter extends LitElement {
60
53
  ]
61
54
  }
62
55
 
63
-
64
56
  render() {
65
57
  return html`
66
58
  <ox-grist
67
59
  .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
68
60
  .config=${this.columns}
69
- .data=${
70
- {
71
- records: this.processes
72
- }
73
- }
61
+ .data=${{
62
+ records: this.processes
63
+ }}
74
64
  ></ox-grist>
75
65
 
76
66
  <div class="button-container">
77
- <mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
67
+ <button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
78
68
  </div>
79
69
  `
80
70
  }
@@ -94,4 +84,3 @@ export class ProcessImporter extends LitElement {
94
84
  this.dispatchEvent(new CustomEvent('imported'))
95
85
  }
96
86
  }
97
-
@@ -100,7 +100,7 @@ export class ProcessListPage extends connect(store)(localize(i18next)(ScopedElem
100
100
 
101
101
  <div id="sorters">
102
102
  Sort
103
- <mwc-icon
103
+ <md-icon
104
104
  @click=${e => {
105
105
  const target = e.currentTarget
106
106
  this.sortersControl.open({
@@ -108,7 +108,7 @@ export class ProcessListPage extends connect(store)(localize(i18next)(ScopedElem
108
108
  top: target.offsetTop + target.offsetHeight
109
109
  })
110
110
  }}
111
- >expand_more</mwc-icon
111
+ >expand_more</md-icon
112
112
  >
113
113
  <ox-popup id="sorter-control">
114
114
  <ox-sorters-control> </ox-sorters-control>
@@ -116,9 +116,10 @@ export class ProcessListPage extends connect(store)(localize(i18next)(ScopedElem
116
116
  </div>
117
117
 
118
118
  <div id="modes">
119
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
120
- <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
121
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
119
+ <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
120
+ <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
121
+ <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
122
+ </div>
122
123
  </div>
123
124
  </div>
124
125
  </ox-grist>
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import '@operato/data-grist'
2
3
 
3
4
  import gql from 'graphql-tag'
@@ -7,9 +8,11 @@ import { property } from 'lit/decorators.js'
7
8
  import { client } from '@operato/graphql'
8
9
  import { i18next } from '@operato/i18n'
9
10
  import { isMobileDevice } from '@operato/utils'
11
+ import { ButtonContainerStyles } from '@operato/styles'
10
12
 
11
13
  export class ProcessInstanceImporter extends LitElement {
12
14
  static styles = [
15
+ ButtonContainerStyles,
13
16
  css`
14
17
  :host {
15
18
  display: flex;
@@ -21,16 +24,6 @@ export class ProcessInstanceImporter extends LitElement {
21
24
  ox-grist {
22
25
  flex: 1;
23
26
  }
24
-
25
- .button-container {
26
- display: flex;
27
- margin-left: auto;
28
- padding: var(--padding-default);
29
- }
30
-
31
- mwc-button {
32
- margin-left: var(--margin-default);
33
- }
34
27
  `
35
28
  ]
36
29
 
@@ -60,21 +53,18 @@ export class ProcessInstanceImporter extends LitElement {
60
53
  ]
61
54
  }
62
55
 
63
-
64
56
  render() {
65
57
  return html`
66
58
  <ox-grist
67
59
  .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
68
60
  .config=${this.columns}
69
- .data=${
70
- {
71
- records: this.processInstances
72
- }
73
- }
61
+ .data=${{
62
+ records: this.processInstances
63
+ }}
74
64
  ></ox-grist>
75
65
 
76
66
  <div class="button-container">
77
- <mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
67
+ <button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
78
68
  </div>
79
69
  `
80
70
  }
@@ -94,4 +84,3 @@ export class ProcessInstanceImporter extends LitElement {
94
84
  this.dispatchEvent(new CustomEvent('imported'))
95
85
  }
96
86
  }
97
-
@@ -100,7 +100,7 @@ export class ProcessInstanceListPage extends connect(store)(localize(i18next)(Sc
100
100
 
101
101
  <div id="sorters">
102
102
  Sort
103
- <mwc-icon
103
+ <md-icon
104
104
  @click=${e => {
105
105
  const target = e.currentTarget
106
106
  this.sortersControl.open({
@@ -108,7 +108,7 @@ export class ProcessInstanceListPage extends connect(store)(localize(i18next)(Sc
108
108
  top: target.offsetTop + target.offsetHeight
109
109
  })
110
110
  }}
111
- >expand_more</mwc-icon
111
+ >expand_more</md-icon
112
112
  >
113
113
  <ox-popup id="sorter-control">
114
114
  <ox-sorters-control> </ox-sorters-control>
@@ -116,9 +116,10 @@ export class ProcessInstanceListPage extends connect(store)(localize(i18next)(Sc
116
116
  </div>
117
117
 
118
118
  <div id="modes">
119
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
120
- <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
121
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
119
+ <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
120
+ <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
121
+ <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
122
+ </div>
122
123
  </div>
123
124
  </div>
124
125
  </ox-grist>
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import '@operato/data-grist'
2
3
 
3
4
  import gql from 'graphql-tag'
@@ -7,9 +8,11 @@ import { property } from 'lit/decorators.js'
7
8
  import { client } from '@operato/graphql'
8
9
  import { i18next } from '@operato/i18n'
9
10
  import { isMobileDevice } from '@operato/utils'
11
+ import { ButtonContainerStyles } from '@operato/styles'
10
12
 
11
13
  export class ProcessThreadImporter extends LitElement {
12
14
  static styles = [
15
+ ButtonContainerStyles,
13
16
  css`
14
17
  :host {
15
18
  display: flex;
@@ -21,16 +24,6 @@ export class ProcessThreadImporter extends LitElement {
21
24
  ox-grist {
22
25
  flex: 1;
23
26
  }
24
-
25
- .button-container {
26
- display: flex;
27
- margin-left: auto;
28
- padding: var(--padding-default);
29
- }
30
-
31
- mwc-button {
32
- margin-left: var(--margin-default);
33
- }
34
27
  `
35
28
  ]
36
29
 
@@ -60,21 +53,18 @@ export class ProcessThreadImporter extends LitElement {
60
53
  ]
61
54
  }
62
55
 
63
-
64
56
  render() {
65
57
  return html`
66
58
  <ox-grist
67
59
  .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
68
60
  .config=${this.columns}
69
- .data=${
70
- {
71
- records: this.processThreads
72
- }
73
- }
61
+ .data=${{
62
+ records: this.processThreads
63
+ }}
74
64
  ></ox-grist>
75
65
 
76
66
  <div class="button-container">
77
- <mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
67
+ <button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
78
68
  </div>
79
69
  `
80
70
  }
@@ -94,4 +84,3 @@ export class ProcessThreadImporter extends LitElement {
94
84
  this.dispatchEvent(new CustomEvent('imported'))
95
85
  }
96
86
  }
97
-
@@ -100,7 +100,7 @@ export class ProcessThreadListPage extends connect(store)(localize(i18next)(Scop
100
100
 
101
101
  <div id="sorters">
102
102
  Sort
103
- <mwc-icon
103
+ <md-icon
104
104
  @click=${e => {
105
105
  const target = e.currentTarget
106
106
  this.sortersControl.open({
@@ -108,7 +108,7 @@ export class ProcessThreadListPage extends connect(store)(localize(i18next)(Scop
108
108
  top: target.offsetTop + target.offsetHeight
109
109
  })
110
110
  }}
111
- >expand_more</mwc-icon
111
+ >expand_more</md-icon
112
112
  >
113
113
  <ox-popup id="sorter-control">
114
114
  <ox-sorters-control> </ox-sorters-control>
@@ -116,9 +116,10 @@ export class ProcessThreadListPage extends connect(store)(localize(i18next)(Scop
116
116
  </div>
117
117
 
118
118
  <div id="modes">
119
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
120
- <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
121
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
119
+ <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
120
+ <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
121
+ <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
122
+ </div>
122
123
  </div>
123
124
  </div>
124
125
  </ox-grist>
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js';
1
2
  import '@operato/data-grist';
2
3
  import { LitElement } from 'lit';
3
4
  export declare class EventImporter extends LitElement {
@@ -1,4 +1,5 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
2
3
  import '@operato/data-grist';
3
4
  import gql from 'graphql-tag';
4
5
  import { css, html, LitElement } from 'lit';
@@ -6,6 +7,7 @@ import { property } from 'lit/decorators.js';
6
7
  import { client } from '@operato/graphql';
7
8
  import { i18next } from '@operato/i18n';
8
9
  import { isMobileDevice } from '@operato/utils';
10
+ import { ButtonContainerStyles } from '@operato/styles';
9
11
  export class EventImporter extends LitElement {
10
12
  constructor() {
11
13
  super(...arguments);
@@ -46,7 +48,7 @@ export class EventImporter extends LitElement {
46
48
  ></ox-grist>
47
49
 
48
50
  <div class="button-container">
49
- <mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
51
+ <button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
50
52
  </div>
51
53
  `;
52
54
  }
@@ -66,6 +68,7 @@ export class EventImporter extends LitElement {
66
68
  }
67
69
  }
68
70
  EventImporter.styles = [
71
+ ButtonContainerStyles,
69
72
  css `
70
73
  :host {
71
74
  display: flex;
@@ -77,16 +80,6 @@ EventImporter.styles = [
77
80
  ox-grist {
78
81
  flex: 1;
79
82
  }
80
-
81
- .button-container {
82
- display: flex;
83
- margin-left: auto;
84
- padding: var(--padding-default);
85
- }
86
-
87
- mwc-button {
88
- margin-left: var(--margin-default);
89
- }
90
83
  `
91
84
  ];
92
85
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"event-importer.js","sourceRoot":"","sources":["../../../client/pages/event/event-importer.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,OAAO,aAAc,SAAQ,UAAU;IAA7C;;QA0B6B,WAAM,GAAU,EAAE,CAAA;QACjB,YAAO,GAAG;YACpC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE;YACzC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;oBAC/B,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;oBACtC,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC;oBACjC,KAAK,EAAE,EAAE;iBACV;aACF;SACF,CAAA;IAmCH,CAAC;IAhCC,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;kBAChC,IAAI,CAAC,OAAO;gBAEpB;YACE,OAAO,EAAE,IAAI,CAAC,MAAM;SAExB;;;;qCAI6B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;KAEjF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;;QACR,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;OAIZ;YACD,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;SACnC,CAAC,CAAA;QAEF,IAAI,MAAA,QAAQ,CAAC,MAAM,0CAAE,MAAM;YAAE,OAAM;QAEnC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;;AAnFM,oBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;KAqBF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;6CAAmB;AAC7C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CAuB1B","sourcesContent":["import '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\n\nexport class EventImporter extends LitElement {\n static styles = [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n\n mwc-button {\n margin-left: var(--margin-default);\n }\n `\n ]\n\n @property({ type: Array }) events: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${\n { \n records: this.events \n }\n }\n ></ox-grist>\n\n <div class=\"button-container\">\n <mwc-button raised @click=\"${this.save.bind(this)}\">${i18next.t('button.save')}</mwc-button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importEvents($events: [EventPatch!]!) {\n importEvents(events: $events)\n }\n `,\n variables: { events: this.events }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n\n"]}
1
+ {"version":3,"file":"event-importer.js","sourceRoot":"","sources":["../../../client/pages/event/event-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACvD,MAAM,OAAO,aAAc,SAAQ,UAAU;IAA7C;;QAiB6B,WAAM,GAAU,EAAE,CAAA;QACjB,YAAO,GAAG;YACpC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE;YACzC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;oBAC/B,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;oBACtC,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC;oBACjC,KAAK,EAAE,EAAE;iBACV;aACF;SACF,CAAA;IAgCH,CAAC;IA9BC,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;kBAChC,IAAI,CAAC,OAAO;gBACd;YACN,OAAO,EAAE,IAAI,CAAC,MAAM;SACrB;;;;0BAIiB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,4BAA4B,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;KAE7F,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;;QACR,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;OAIZ;YACD,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;SACnC,CAAC,CAAA;QAEF,IAAI,MAAA,QAAQ,CAAC,MAAM,0CAAE,MAAM;YAAE,OAAM;QAEnC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;;AAvEM,oBAAM,GAAG;IACd,qBAAqB;IACrB,GAAG,CAAA;;;;;;;;;;;KAWF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;6CAAmB;AAC7C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CAuB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\nimport { ButtonContainerStyles } from '@operato/styles'\nexport class EventImporter extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) events: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.events\n }}\n ></ox-grist>\n\n <div class=\"button-container\">\n <button @click=\"${this.save.bind(this)}\"><md-icon>save</md-icon>${i18next.t('button.save')}</button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importEvents($events: [EventPatch!]!) {\n importEvents(events: $events)\n }\n `,\n variables: { events: this.events }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
@@ -64,7 +64,7 @@ let EventListPage = class EventListPage extends connect(store)(localize(i18next)
64
64
 
65
65
  <div id="sorters">
66
66
  Sort
67
- <mwc-icon
67
+ <md-icon
68
68
  @click=${e => {
69
69
  const target = e.currentTarget;
70
70
  this.sortersControl.open({
@@ -72,7 +72,7 @@ let EventListPage = class EventListPage extends connect(store)(localize(i18next)
72
72
  top: target.offsetTop + target.offsetHeight
73
73
  });
74
74
  }}
75
- >expand_more</mwc-icon
75
+ >expand_more</md-icon
76
76
  >
77
77
  <ox-popup id="sorter-control">
78
78
  <ox-sorters-control> </ox-sorters-control>
@@ -80,9 +80,10 @@ let EventListPage = class EventListPage extends connect(store)(localize(i18next)
80
80
  </div>
81
81
 
82
82
  <div id="modes">
83
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
84
- <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
85
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
83
+ <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
84
+ <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
85
+ <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
86
+ </div>
86
87
  </div>
87
88
  </div>
88
89
  </ox-grist>