@things-factory/oauth2-client 7.0.0-alpha.8 → 7.0.0
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/pages/oauth2-client/oauth2-client-importer.ts +8 -19
- package/client/pages/oauth2-client/oauth2-client-list-page.ts +6 -5
- package/client/pages/oauth2-client-register.ts +7 -5
- package/client/pages/oauth2-client.ts +58 -30
- package/client/pages/oauth2-clients.ts +41 -45
- package/dist-client/pages/oauth2-client/oauth2-client-importer.d.ts +1 -0
- package/dist-client/pages/oauth2-client/oauth2-client-importer.js +5 -12
- package/dist-client/pages/oauth2-client/oauth2-client-importer.js.map +1 -1
- package/dist-client/pages/oauth2-client/oauth2-client-list-page.js +6 -5
- package/dist-client/pages/oauth2-client/oauth2-client-list-page.js.map +1 -1
- package/dist-client/pages/oauth2-client-register.d.ts +1 -0
- package/dist-client/pages/oauth2-client-register.js +6 -5
- package/dist-client/pages/oauth2-client-register.js.map +1 -1
- package/dist-client/pages/oauth2-client.d.ts +1 -0
- package/dist-client/pages/oauth2-client.js +58 -30
- package/dist-client/pages/oauth2-client.js.map +1 -1
- package/dist-client/pages/oauth2-clients.d.ts +2 -1
- package/dist-client/pages/oauth2-clients.js +40 -45
- package/dist-client/pages/oauth2-clients.js.map +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/oauth2-client/oauth2-client-mutation.js +2 -2
- package/dist-server/service/oauth2-client/oauth2-client-mutation.js.map +1 -1
- package/dist-server/service/oauth2-client/oauth2-client-query.js +3 -3
- package/dist-server/service/oauth2-client/oauth2-client-query.js.map +1 -1
- package/dist-server/service/oauth2-client/oauth2-client-type.js +6 -6
- package/dist-server/service/oauth2-client/oauth2-client-type.js.map +1 -1
- package/dist-server/service/oauth2-client/oauth2-client.js +5 -5
- package/dist-server/service/oauth2-client/oauth2-client.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/server/service/oauth2-client/oauth2-client-query.ts +4 -1
- package/server/service/oauth2-client/oauth2-client.ts +3 -3
|
@@ -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,30 +8,22 @@ 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 Oauth2ClientImporter extends LitElement {
|
|
12
14
|
static styles = [
|
|
15
|
+
ButtonContainerStyles,
|
|
13
16
|
css`
|
|
14
17
|
:host {
|
|
15
18
|
display: flex;
|
|
16
19
|
flex-direction: column;
|
|
17
20
|
|
|
18
|
-
background-color:
|
|
21
|
+
background-color: var(--md-sys-color-surface);
|
|
19
22
|
}
|
|
20
23
|
|
|
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 Oauth2ClientImporter 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
|
-
|
|
72
|
-
}
|
|
73
|
-
}
|
|
61
|
+
.data=${{
|
|
62
|
+
records: this.oauth2Clients
|
|
63
|
+
}}
|
|
74
64
|
></ox-grist>
|
|
75
65
|
|
|
76
66
|
<div class="button-container">
|
|
77
|
-
<
|
|
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 Oauth2ClientImporter extends LitElement {
|
|
|
94
84
|
this.dispatchEvent(new CustomEvent('imported'))
|
|
95
85
|
}
|
|
96
86
|
}
|
|
97
|
-
|
|
@@ -89,7 +89,7 @@ export class Oauth2ClientListPage extends connect(store)(localize(i18next)(Scope
|
|
|
89
89
|
|
|
90
90
|
<div id="sorters">
|
|
91
91
|
Sort
|
|
92
|
-
<
|
|
92
|
+
<md-icon
|
|
93
93
|
@click=${e => {
|
|
94
94
|
const target = e.currentTarget
|
|
95
95
|
this.sortersControl.open({
|
|
@@ -97,7 +97,7 @@ export class Oauth2ClientListPage extends connect(store)(localize(i18next)(Scope
|
|
|
97
97
|
top: target.offsetTop + target.offsetHeight
|
|
98
98
|
})
|
|
99
99
|
}}
|
|
100
|
-
>expand_more</
|
|
100
|
+
>expand_more</md-icon
|
|
101
101
|
>
|
|
102
102
|
<ox-popup id="sorter-control">
|
|
103
103
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -105,9 +105,10 @@ export class Oauth2ClientListPage extends connect(store)(localize(i18next)(Scope
|
|
|
105
105
|
</div>
|
|
106
106
|
|
|
107
107
|
<div id="modes">
|
|
108
|
-
<
|
|
109
|
-
<
|
|
110
|
-
<
|
|
108
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
109
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
|
110
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
111
|
+
</div>
|
|
111
112
|
</div>
|
|
112
113
|
</div>
|
|
113
114
|
</ox-grist>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
|
+
|
|
1
3
|
import gql from 'graphql-tag'
|
|
2
4
|
import { css, html } from 'lit'
|
|
3
5
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
@@ -14,8 +16,8 @@ export class Oauth2ClientRegister extends connect(store)(PageView) {
|
|
|
14
16
|
:host {
|
|
15
17
|
display: flex;
|
|
16
18
|
flex-direction: column;
|
|
17
|
-
background-color: var(--
|
|
18
|
-
padding: var(--
|
|
19
|
+
background-color: var(--md-sys-color-background);
|
|
20
|
+
padding: var(--spacing-large);
|
|
19
21
|
|
|
20
22
|
position: relative;
|
|
21
23
|
|
|
@@ -48,12 +50,12 @@ export class Oauth2ClientRegister extends connect(store)(PageView) {
|
|
|
48
50
|
}
|
|
49
51
|
label {
|
|
50
52
|
font: var(--label-font);
|
|
51
|
-
color: var(--label-color);
|
|
53
|
+
color: var(--label-color, var(--md-sys-color-on-surface));
|
|
52
54
|
text-transform: var(--label-text-transform);
|
|
53
55
|
}
|
|
54
56
|
input,
|
|
55
57
|
select {
|
|
56
|
-
border: var(--border-
|
|
58
|
+
border: var(--border-dim-color);
|
|
57
59
|
border-radius: var(--border-radius);
|
|
58
60
|
margin: var(--input-margin);
|
|
59
61
|
padding: var(--input-padding);
|
|
@@ -140,7 +142,7 @@ export class Oauth2ClientRegister extends connect(store)(PageView) {
|
|
|
140
142
|
</div>
|
|
141
143
|
</div>
|
|
142
144
|
|
|
143
|
-
<
|
|
145
|
+
<md-elevated-button @click=${this.createOauth2Client.bind(this)}>register</md-elevated-button>
|
|
144
146
|
</form>
|
|
145
147
|
`
|
|
146
148
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/help/ox-help-icon.js'
|
|
2
3
|
|
|
3
4
|
import Clipboard from 'clipboard'
|
|
@@ -48,25 +49,29 @@ export class Oauth2Client extends connect(store)(PageView) {
|
|
|
48
49
|
overflow-y: auto;
|
|
49
50
|
position: relative;
|
|
50
51
|
|
|
51
|
-
background-color: var(--
|
|
52
|
-
padding: var(--
|
|
52
|
+
background-color: var(--md-sys-color-background);
|
|
53
|
+
padding: var(--spacing-large);
|
|
53
54
|
}
|
|
55
|
+
|
|
54
56
|
h2 {
|
|
55
57
|
margin: var(--title-margin);
|
|
56
58
|
font: var(--title-font);
|
|
57
59
|
color: var(--title-text-color);
|
|
58
60
|
}
|
|
61
|
+
|
|
59
62
|
[page-description] {
|
|
60
63
|
margin: var(--page-description-margin);
|
|
61
64
|
font: var(--page-description-font);
|
|
62
65
|
color: var(--page-description-color);
|
|
63
66
|
}
|
|
67
|
+
|
|
64
68
|
[icon] {
|
|
65
69
|
position: absolute;
|
|
66
70
|
top: 10px;
|
|
67
71
|
right: 10px;
|
|
68
72
|
max-width: 80px;
|
|
69
73
|
}
|
|
74
|
+
|
|
70
75
|
[icon] img {
|
|
71
76
|
max-width: 100%;
|
|
72
77
|
max-height: 100%;
|
|
@@ -84,68 +89,87 @@ export class Oauth2Client extends connect(store)(PageView) {
|
|
|
84
89
|
|
|
85
90
|
text-decoration: none;
|
|
86
91
|
}
|
|
92
|
+
|
|
87
93
|
[button-primary]:hover {
|
|
88
94
|
background-color: var(--button-primary-active-background-color);
|
|
89
95
|
box-shadow: var(--button-active-box-shadow);
|
|
90
96
|
}
|
|
91
|
-
label {
|
|
92
|
-
font: var(--label-font);
|
|
93
|
-
color: var(--label-color);
|
|
94
|
-
text-transform: var(--label-text-transform);
|
|
95
|
-
}
|
|
96
|
-
input,
|
|
97
|
-
select {
|
|
98
|
-
border: var(--border-dark-color);
|
|
99
|
-
border-radius: var(--border-radius);
|
|
100
|
-
margin: var(--input-margin);
|
|
101
|
-
padding: var(--input-padding);
|
|
102
|
-
font: var(--input-font);
|
|
103
97
|
|
|
104
|
-
flex: 1;
|
|
105
|
-
}
|
|
106
|
-
select:focus,
|
|
107
|
-
input:focus,
|
|
108
|
-
button {
|
|
109
|
-
outline: none;
|
|
110
|
-
}
|
|
111
|
-
form {
|
|
112
|
-
max-width: var(--content-container-max-width);
|
|
113
|
-
}
|
|
114
98
|
[fieldset-container] {
|
|
115
|
-
background-color: var(--
|
|
116
|
-
margin: var(--
|
|
117
|
-
padding: var(--
|
|
99
|
+
background-color: var(--md-sys-color-surface);
|
|
100
|
+
margin: var(--spacing-large) 0 var(--spacing-medium) 0;
|
|
101
|
+
padding: var(--spacing-medium);
|
|
118
102
|
border-radius: var(--border-radius);
|
|
119
103
|
box-shadow: var(--box-shadow);
|
|
104
|
+
|
|
105
|
+
label {
|
|
106
|
+
font: var(--label-font);
|
|
107
|
+
color: var(--label-color, var(--md-sys-color-on-surface));
|
|
108
|
+
text-transform: var(--label-text-transform);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
input,
|
|
112
|
+
select {
|
|
113
|
+
border: var(--border-dim-color);
|
|
114
|
+
border-radius: var(--border-radius);
|
|
115
|
+
margin: var(--input-margin);
|
|
116
|
+
padding: var(--input-padding);
|
|
117
|
+
font: var(--input-font);
|
|
118
|
+
|
|
119
|
+
flex: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
select:focus,
|
|
123
|
+
input:focus,
|
|
124
|
+
button {
|
|
125
|
+
outline: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
form {
|
|
129
|
+
max-width: var(--content-container-max-width);
|
|
130
|
+
}
|
|
120
131
|
}
|
|
132
|
+
|
|
121
133
|
[fieldset-container] fieldset {
|
|
122
134
|
margin: 0;
|
|
123
135
|
margin-top: -15px;
|
|
124
136
|
}
|
|
137
|
+
|
|
125
138
|
fieldset {
|
|
126
139
|
border-radius: var(--border-radius);
|
|
127
|
-
border: var(--border-
|
|
140
|
+
border: var(--border-dim-color);
|
|
128
141
|
margin: var(--fieldset-margin);
|
|
129
142
|
padding: var(--fieldset-padding);
|
|
130
143
|
}
|
|
144
|
+
|
|
131
145
|
legend {
|
|
132
146
|
padding: var(--legend-padding);
|
|
133
147
|
font-weight: bold;
|
|
134
148
|
color: var(--legend-color);
|
|
135
149
|
}
|
|
150
|
+
|
|
136
151
|
[field-2column] {
|
|
137
152
|
display: grid;
|
|
138
153
|
grid-template-columns: 1fr 1fr;
|
|
139
154
|
grid-gap: 15px;
|
|
140
155
|
}
|
|
156
|
+
|
|
141
157
|
[field] {
|
|
142
158
|
display: flex;
|
|
143
159
|
flex-direction: column;
|
|
144
160
|
position: relative;
|
|
145
161
|
}
|
|
162
|
+
|
|
146
163
|
[grid-span] {
|
|
147
164
|
grid-column: span 2;
|
|
148
165
|
}
|
|
166
|
+
|
|
167
|
+
button {
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
gap: var(--spacing-small);
|
|
171
|
+
}
|
|
172
|
+
|
|
149
173
|
button,
|
|
150
174
|
input[type='submit'],
|
|
151
175
|
[button-in-field] {
|
|
@@ -157,15 +181,17 @@ export class Oauth2Client extends connect(store)(PageView) {
|
|
|
157
181
|
font: var(--button-font);
|
|
158
182
|
text-transform: var(--button-text-transform);
|
|
159
183
|
|
|
160
|
-
margin: var(--
|
|
184
|
+
margin: var(--spacing-medium) 0 var(--spacing-medium) var(--spacing-medium);
|
|
161
185
|
float: right;
|
|
162
186
|
text-decoration: none;
|
|
163
187
|
}
|
|
188
|
+
|
|
164
189
|
button:hover,
|
|
165
190
|
input[type='submit']:hover {
|
|
166
191
|
border: var(--button-activ-border);
|
|
167
192
|
box-shadow: var(--button-active-box-shadow);
|
|
168
193
|
}
|
|
194
|
+
|
|
169
195
|
[button-in-field] {
|
|
170
196
|
border-radius: 0 var(--button-border-radius) var(--button-border-radius) 0;
|
|
171
197
|
position: absolute;
|
|
@@ -173,10 +199,12 @@ export class Oauth2Client extends connect(store)(PageView) {
|
|
|
173
199
|
right: 0;
|
|
174
200
|
max-height: 36px;
|
|
175
201
|
}
|
|
202
|
+
|
|
176
203
|
[input-hint] {
|
|
177
204
|
font: var(--input-hint-font);
|
|
178
205
|
color: var(--input-hint-color);
|
|
179
206
|
}
|
|
207
|
+
|
|
180
208
|
@media screen and (max-width: 480px) {
|
|
181
209
|
[field] {
|
|
182
210
|
grid-column: span 2;
|
|
@@ -208,7 +236,7 @@ export class Oauth2Client extends connect(store)(PageView) {
|
|
|
208
236
|
|
|
209
237
|
return html`
|
|
210
238
|
<div>
|
|
211
|
-
<h2><
|
|
239
|
+
<h2><md-icon>apps</md-icon> ${oauth2Client.name || ''}</h2>
|
|
212
240
|
<p page-description>${oauth2Client.description || ''}</p>
|
|
213
241
|
</div>
|
|
214
242
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
|
+
import '@material/web/button/outlined-button.js'
|
|
3
|
+
|
|
1
4
|
import gql from 'graphql-tag'
|
|
2
5
|
import { css, html } from 'lit'
|
|
3
6
|
import { customElement, property } from 'lit/decorators.js'
|
|
@@ -5,7 +8,7 @@ import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
|
5
8
|
|
|
6
9
|
import { client } from '@operato/graphql'
|
|
7
10
|
import { notify } from '@operato/layout'
|
|
8
|
-
import { PageView, store } from '@operato/shell'
|
|
11
|
+
import { navigate, PageView, store } from '@operato/shell'
|
|
9
12
|
|
|
10
13
|
@customElement('oauth2-clients')
|
|
11
14
|
class Oauth2Clients extends connect(store)(PageView) {
|
|
@@ -14,86 +17,76 @@ class Oauth2Clients extends connect(store)(PageView) {
|
|
|
14
17
|
:host {
|
|
15
18
|
display: flex;
|
|
16
19
|
flex-direction: column;
|
|
17
|
-
background-color: var(--
|
|
18
|
-
padding: var(--
|
|
20
|
+
background-color: var(--md-sys-color-background);
|
|
21
|
+
padding: var(--spacing-large);
|
|
19
22
|
|
|
20
23
|
overflow: auto;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
border: var(--button-border);
|
|
26
|
-
border-radius: var(--button-border-radius);
|
|
27
|
-
margin: var(--button-margin);
|
|
28
|
-
padding: var(--button-primary-padding);
|
|
29
|
-
color: var(--button-primary-color);
|
|
30
|
-
font: var(--button-primary-font);
|
|
31
|
-
text-transform: var(--button-text-transform);
|
|
32
|
-
|
|
33
|
-
text-decoration: none;
|
|
26
|
+
md-elevated-button {
|
|
27
|
+
text-transform: capitalize;
|
|
34
28
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
box-shadow: var(--button-active-box-shadow);
|
|
38
|
-
}
|
|
39
|
-
[button] {
|
|
40
|
-
background-color: var(--button-background-color);
|
|
41
|
-
border: var(--button-border);
|
|
42
|
-
border-radius: var(--button-border-radius);
|
|
43
|
-
margin: var(--button-margin);
|
|
44
|
-
padding: var(--button-padding);
|
|
45
|
-
color: var(--button-color);
|
|
46
|
-
font: var(--button-font);
|
|
47
|
-
text-transform: var(--button-text-transform);
|
|
48
|
-
|
|
49
|
-
margin-right: 0;
|
|
29
|
+
|
|
30
|
+
md-outlined-button {
|
|
50
31
|
float: right;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
[button]:hover {
|
|
54
|
-
border: var(--button-activ-border);
|
|
55
|
-
box-shadow: var(--button-active-box-shadow);
|
|
32
|
+
margin-top: var(--spacing-medium);
|
|
33
|
+
text-transform: capitalize;
|
|
56
34
|
}
|
|
35
|
+
|
|
57
36
|
h2 {
|
|
58
37
|
margin: var(--title-margin);
|
|
59
38
|
font: var(--title-font);
|
|
60
39
|
color: var(--title-text-color);
|
|
61
40
|
}
|
|
41
|
+
|
|
62
42
|
[page-description] {
|
|
63
43
|
margin: var(--page-description-margin);
|
|
64
44
|
font: var(--page-description-font);
|
|
65
45
|
color: var(--page-description-color);
|
|
66
46
|
}
|
|
67
|
-
|
|
68
|
-
margin: var(--margin-wide) 0;
|
|
69
|
-
}
|
|
47
|
+
|
|
70
48
|
table {
|
|
71
|
-
background-color: var(--theme-white-color);
|
|
72
49
|
width: 100%;
|
|
50
|
+
margin: var(--spacing-large) 0;
|
|
73
51
|
border-collapse: collapse;
|
|
74
52
|
}
|
|
53
|
+
|
|
54
|
+
tr {
|
|
55
|
+
background-color: var(--tr-background-color);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
tr:nth-child(odd) {
|
|
59
|
+
background-color: var(--tr-background-odd-color);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
tr:hover {
|
|
63
|
+
background-color: var(--tr-background-hover-color);
|
|
64
|
+
}
|
|
65
|
+
|
|
75
66
|
th {
|
|
76
|
-
background-color: rgba(var(--primary-color-rgb), 0.1);
|
|
77
67
|
border-top: var(--th-border-top);
|
|
78
|
-
border-bottom: var(--border-
|
|
68
|
+
border-bottom: var(--td-border-bottom);
|
|
79
69
|
padding: var(--th-padding);
|
|
80
70
|
|
|
81
71
|
font: var(--th-font);
|
|
82
|
-
color: var(--
|
|
72
|
+
color: var(--th-color);
|
|
83
73
|
text-transform: var(--th-text-transform);
|
|
74
|
+
text-align: left;
|
|
84
75
|
}
|
|
76
|
+
|
|
85
77
|
td {
|
|
86
78
|
padding: var(--td-padding);
|
|
87
|
-
border-bottom: var(--border-
|
|
79
|
+
border-bottom: var(--border-dim-color);
|
|
88
80
|
line-height: 1.1;
|
|
89
81
|
}
|
|
82
|
+
|
|
90
83
|
td a {
|
|
91
84
|
font: var(--td-font);
|
|
92
85
|
text-decoration: none;
|
|
93
|
-
color: var(--
|
|
86
|
+
color: var(--md-sys-color-on-surface);
|
|
94
87
|
}
|
|
88
|
+
|
|
95
89
|
td a strong {
|
|
96
|
-
color: var(--secondary-text-color);
|
|
97
90
|
font: bold 16px var(--theme-font);
|
|
98
91
|
|
|
99
92
|
display: block;
|
|
@@ -103,6 +96,7 @@ class Oauth2Clients extends connect(store)(PageView) {
|
|
|
103
96
|
.text-align-center {
|
|
104
97
|
text-align: center;
|
|
105
98
|
}
|
|
99
|
+
|
|
106
100
|
.text-align-right {
|
|
107
101
|
text-align: right;
|
|
108
102
|
}
|
|
@@ -127,7 +121,9 @@ class Oauth2Clients extends connect(store)(PageView) {
|
|
|
127
121
|
What type of oauth2 client are you building?<br />Choose the platform type that best suits the audience you’re
|
|
128
122
|
building for.
|
|
129
123
|
</p>
|
|
130
|
-
<
|
|
124
|
+
<md-elevated-button @click=${e => navigate('oauth2-client-register')}
|
|
125
|
+
>register new oauth2 client</md-elevated-button
|
|
126
|
+
>
|
|
131
127
|
</div>
|
|
132
128
|
|
|
133
129
|
<div>
|
|
@@ -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 Oauth2ClientImporter extends LitElement {
|
|
10
12
|
constructor() {
|
|
11
13
|
super(...arguments);
|
|
@@ -46,7 +48,7 @@ export class Oauth2ClientImporter extends LitElement {
|
|
|
46
48
|
></ox-grist>
|
|
47
49
|
|
|
48
50
|
<div class="button-container">
|
|
49
|
-
<
|
|
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,27 +68,18 @@ export class Oauth2ClientImporter extends LitElement {
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
Oauth2ClientImporter.styles = [
|
|
71
|
+
ButtonContainerStyles,
|
|
69
72
|
css `
|
|
70
73
|
:host {
|
|
71
74
|
display: flex;
|
|
72
75
|
flex-direction: column;
|
|
73
76
|
|
|
74
|
-
background-color:
|
|
77
|
+
background-color: var(--md-sys-color-surface);
|
|
75
78
|
}
|
|
76
79
|
|
|
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":"oauth2-client-importer.js","sourceRoot":"","sources":["../../../client/pages/oauth2-client/oauth2-client-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;
|
|
1
|
+
{"version":3,"file":"oauth2-client-importer.js","sourceRoot":"","sources":["../../../client/pages/oauth2-client/oauth2-client-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;AAEvD,MAAM,OAAO,oBAAqB,SAAQ,UAAU;IAApD;;QAiB6B,kBAAa,GAAU,EAAE,CAAA;QACxB,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,aAAa;SAC5B;;;;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,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE;SACjD,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,2BAAM,GAAG;IACd,qBAAqB;IACrB,GAAG,CAAA;;;;;;;;;;;KAWF;CACF,AAdY,CAcZ;AAE0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;2DAA0B;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAuB1B","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'\n\nexport class Oauth2ClientImporter extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) oauth2Clients: 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.oauth2Clients\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 importOauth2Clients($oauth2Clients: [Oauth2ClientPatch!]!) {\n importOauth2Clients(oauth2Clients: $oauth2Clients)\n }\n `,\n variables: { oauth2Clients: this.oauth2Clients }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
|
|
@@ -52,7 +52,7 @@ let Oauth2ClientListPage = class Oauth2ClientListPage extends connect(store)(loc
|
|
|
52
52
|
|
|
53
53
|
<div id="sorters">
|
|
54
54
|
Sort
|
|
55
|
-
<
|
|
55
|
+
<md-icon
|
|
56
56
|
@click=${e => {
|
|
57
57
|
const target = e.currentTarget;
|
|
58
58
|
this.sortersControl.open({
|
|
@@ -60,7 +60,7 @@ let Oauth2ClientListPage = class Oauth2ClientListPage extends connect(store)(loc
|
|
|
60
60
|
top: target.offsetTop + target.offsetHeight
|
|
61
61
|
});
|
|
62
62
|
}}
|
|
63
|
-
>expand_more</
|
|
63
|
+
>expand_more</md-icon
|
|
64
64
|
>
|
|
65
65
|
<ox-popup id="sorter-control">
|
|
66
66
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -68,9 +68,10 @@ let Oauth2ClientListPage = class Oauth2ClientListPage extends connect(store)(loc
|
|
|
68
68
|
</div>
|
|
69
69
|
|
|
70
70
|
<div id="modes">
|
|
71
|
-
<
|
|
72
|
-
<
|
|
73
|
-
<
|
|
71
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
72
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
|
73
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
74
|
+
</div>
|
|
74
75
|
</div>
|
|
75
76
|
</div>
|
|
76
77
|
</ox-grist>
|