@things-factory/auth-ui 7.0.1-alpha.4 → 7.0.1-alpha.43
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.ts +6 -10
- package/client/components/change-password.ts +1 -1
- package/client/components/contact-us.ts +2 -8
- package/client/components/delete-user-popup.ts +1 -1
- package/client/index.ts +10 -12
- package/client/pages/application/application.ts +14 -51
- package/client/pages/attribute/attribute-set-item-list.ts +8 -22
- package/client/pages/attribute/attribute-set-management.ts +12 -20
- package/client/pages/auth-provider/auth-provider-management.ts +7 -16
- package/client/pages/domain/domain-management.ts +6 -18
- package/dist-client/bootstrap.d.ts +1 -1
- package/dist-client/bootstrap.js +5 -5
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/components/change-password.js +1 -1
- package/dist-client/components/change-password.js.map +1 -1
- package/dist-client/components/contact-us.js +2 -8
- package/dist-client/components/contact-us.js.map +1 -1
- package/dist-client/components/delete-user-popup.js +1 -1
- package/dist-client/components/delete-user-popup.js.map +1 -1
- package/dist-client/index.d.ts +1 -1
- package/dist-client/index.js +9 -9
- package/dist-client/index.js.map +1 -1
- package/dist-client/pages/application/application.d.ts +1 -1
- package/dist-client/pages/application/application.js +12 -47
- package/dist-client/pages/application/application.js.map +1 -1
- package/dist-client/pages/attribute/attribute-set-item-list.d.ts +1 -1
- package/dist-client/pages/attribute/attribute-set-item-list.js +6 -22
- package/dist-client/pages/attribute/attribute-set-item-list.js.map +1 -1
- package/dist-client/pages/attribute/attribute-set-management.d.ts +10 -2
- package/dist-client/pages/attribute/attribute-set-management.js +6 -11
- package/dist-client/pages/attribute/attribute-set-management.js.map +1 -1
- package/dist-client/pages/auth-provider/auth-provider-management.d.ts +10 -2
- package/dist-client/pages/auth-provider/auth-provider-management.js +6 -11
- package/dist-client/pages/auth-provider/auth-provider-management.js.map +1 -1
- package/dist-client/pages/domain/domain-management.js +2 -11
- package/dist-client/pages/domain/domain-management.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/views/auth-page.html +1 -0
- package/views/oauth2-page.html +1 -0
package/client/bootstrap.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
import '@operato/i18n/ox-i18n.js'
|
|
3
3
|
import '@operato/attribute/grist-editor' /* for register data-grist editor type 'attributes' */
|
|
4
4
|
|
|
@@ -7,14 +7,10 @@ import { html } from 'lit-html'
|
|
|
7
7
|
import { navigate, store } from '@operato/shell'
|
|
8
8
|
import { TOOL_POSITION } from '@operato/layout'
|
|
9
9
|
import { OxGristEditorPrivilege } from '@operato/app/grist-editor/ox-grist-editor-privilege.js'
|
|
10
|
+
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer, OxGristRendererJson5 } from '@operato/data-grist'
|
|
10
11
|
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
registerRenderer as registerGristRenderer,
|
|
14
|
-
OxGristRendererJson5
|
|
15
|
-
} from '@operato/data-grist'
|
|
16
|
-
import { auth } from '@things-factory/auth-base/dist-client'
|
|
17
|
-
import { ADD_MORENDA } from '@things-factory/more-base'
|
|
12
|
+
import { auth } from '@things-factory/auth-base/dist-client/auth.js'
|
|
13
|
+
import { ADD_MORENDA } from '@things-factory/more-base/client'
|
|
18
14
|
|
|
19
15
|
export default function bootstrap() {
|
|
20
16
|
registerGristEditor('privilege', OxGristEditorPrivilege)
|
|
@@ -24,7 +20,7 @@ export default function bootstrap() {
|
|
|
24
20
|
store.dispatch({
|
|
25
21
|
type: ADD_MORENDA,
|
|
26
22
|
morenda: {
|
|
27
|
-
icon: html` <
|
|
23
|
+
icon: html` <md-icon>account_circle</md-icon> `,
|
|
28
24
|
name: html` <ox-i18n msgid="text.auth profile"></ox-i18n> `,
|
|
29
25
|
position: TOOL_POSITION.FRONT_END,
|
|
30
26
|
action: () => {
|
|
@@ -37,7 +33,7 @@ export default function bootstrap() {
|
|
|
37
33
|
store.dispatch({
|
|
38
34
|
type: ADD_MORENDA,
|
|
39
35
|
morenda: {
|
|
40
|
-
icon: html` <
|
|
36
|
+
icon: html` <md-icon>exit_to_app</md-icon> `,
|
|
41
37
|
name: html` <ox-i18n msgid="field.sign out"></ox-i18n> `,
|
|
42
38
|
position: TOOL_POSITION.FRONT_END,
|
|
43
39
|
action: () => {
|
|
@@ -2,7 +2,7 @@ import { css, html, LitElement } from 'lit'
|
|
|
2
2
|
import { customElement, query } from 'lit/decorators.js'
|
|
3
3
|
|
|
4
4
|
import { i18next, localize } from '@operato/i18n'
|
|
5
|
-
import { auth } from '@things-factory/auth-base/dist-client'
|
|
5
|
+
import { auth } from '@things-factory/auth-base/dist-client/auth.js'
|
|
6
6
|
|
|
7
7
|
@customElement('change-password')
|
|
8
8
|
export class ChangePassword extends localize(i18next)(LitElement) {
|
|
@@ -8,7 +8,7 @@ import { css, html, LitElement } from 'lit'
|
|
|
8
8
|
import { customElement, query } from 'lit/decorators.js'
|
|
9
9
|
|
|
10
10
|
import { i18next, localize } from '@operato/i18n'
|
|
11
|
-
import { auth } from '@things-factory/auth-base/dist-client'
|
|
11
|
+
import { auth } from '@things-factory/auth-base/dist-client/auth.js'
|
|
12
12
|
|
|
13
13
|
@customElement('contact-us')
|
|
14
14
|
export class ContactUs extends localize(i18next)(LitElement) {
|
|
@@ -83,13 +83,7 @@ export class ContactUs extends localize(i18next)(LitElement) {
|
|
|
83
83
|
}}
|
|
84
84
|
></mwc-textarea>
|
|
85
85
|
</div>
|
|
86
|
-
<mwc-button
|
|
87
|
-
slot="primaryAction"
|
|
88
|
-
type="submit"
|
|
89
|
-
label=${i18next.t('button.submit')}
|
|
90
|
-
raised
|
|
91
|
-
@click=${e => this._submit(e)}
|
|
92
|
-
></mwc-button>
|
|
86
|
+
<mwc-button slot="primaryAction" type="submit" label=${i18next.t('button.submit')} raised @click=${e => this._submit(e)}></mwc-button>
|
|
93
87
|
<mwc-button slot="secondaryAction" dialogAction="cancel" label=${i18next.t('button.cancel')}></mwc-button>
|
|
94
88
|
</mwc-dialog>
|
|
95
89
|
`
|
|
@@ -5,7 +5,7 @@ import { customElement } from 'lit/decorators.js'
|
|
|
5
5
|
|
|
6
6
|
import { i18next, localize } from '@operato/i18n'
|
|
7
7
|
import { notify } from '@operato/layout'
|
|
8
|
-
import { auth } from '@things-factory/auth-base/dist-client'
|
|
8
|
+
import { auth } from '@things-factory/auth-base/dist-client/auth.js'
|
|
9
9
|
|
|
10
10
|
@customElement('delete-user-popup')
|
|
11
11
|
export class DeleteUserPopup extends localize(i18next)(LitElement) {
|
package/client/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
import '@operato/i18n/ox-i18n.js'
|
|
3
3
|
|
|
4
4
|
import { html } from 'lit-html'
|
|
5
5
|
|
|
6
6
|
import { navigate, store } from '@operato/shell'
|
|
7
|
-
import { ADD_MORENDA } from '@things-factory/more-base'
|
|
7
|
+
import { ADD_MORENDA } from '@things-factory/more-base/client'
|
|
8
8
|
import { hasPrivilege } from '@things-factory/auth-base/dist-client'
|
|
9
9
|
|
|
10
10
|
export * from './components/role-selector.js'
|
|
@@ -12,13 +12,11 @@ export * from './components/domain-switch.js'
|
|
|
12
12
|
export * from './components/invite-user.js'
|
|
13
13
|
|
|
14
14
|
export async function setAuthManagementMenus() {
|
|
15
|
-
if (
|
|
16
|
-
await hasPrivilege({ privilege: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })
|
|
17
|
-
) {
|
|
15
|
+
if (await hasPrivilege({ privilege: 'mutation', category: 'user', domainOwnerGranted: true, superUserGranted: true })) {
|
|
18
16
|
store.dispatch({
|
|
19
17
|
type: ADD_MORENDA,
|
|
20
18
|
morenda: {
|
|
21
|
-
icon: html` <
|
|
19
|
+
icon: html` <md-icon>how_to_reg</md-icon> `,
|
|
22
20
|
name: html` <ox-i18n msgid="text.role_management"></ox-i18n> `,
|
|
23
21
|
action: () => {
|
|
24
22
|
navigate('roles')
|
|
@@ -29,7 +27,7 @@ export async function setAuthManagementMenus() {
|
|
|
29
27
|
store.dispatch({
|
|
30
28
|
type: ADD_MORENDA,
|
|
31
29
|
morenda: {
|
|
32
|
-
icon: html` <
|
|
30
|
+
icon: html` <md-icon>devices</md-icon> `,
|
|
33
31
|
name: html` <ox-i18n msgid="text.appliance"></ox-i18n> `,
|
|
34
32
|
action: () => {
|
|
35
33
|
navigate('appliance-home')
|
|
@@ -40,7 +38,7 @@ export async function setAuthManagementMenus() {
|
|
|
40
38
|
store.dispatch({
|
|
41
39
|
type: ADD_MORENDA,
|
|
42
40
|
morenda: {
|
|
43
|
-
icon: html` <
|
|
41
|
+
icon: html` <md-icon>apps</md-icon> `,
|
|
44
42
|
name: html` <ox-i18n msgid="text.application management"></ox-i18n> `,
|
|
45
43
|
action: () => {
|
|
46
44
|
navigate('applications')
|
|
@@ -51,7 +49,7 @@ export async function setAuthManagementMenus() {
|
|
|
51
49
|
store.dispatch({
|
|
52
50
|
type: ADD_MORENDA,
|
|
53
51
|
morenda: {
|
|
54
|
-
icon: html` <
|
|
52
|
+
icon: html` <md-icon>people</md-icon> `,
|
|
55
53
|
name: html` <ox-i18n msgid="text.user management"></ox-i18n> `,
|
|
56
54
|
action: () => {
|
|
57
55
|
navigate('users')
|
|
@@ -62,7 +60,7 @@ export async function setAuthManagementMenus() {
|
|
|
62
60
|
store.dispatch({
|
|
63
61
|
type: ADD_MORENDA,
|
|
64
62
|
morenda: {
|
|
65
|
-
icon: html` <
|
|
63
|
+
icon: html` <md-icon>badge</md-icon> `,
|
|
66
64
|
name: html` <ox-i18n msgid="text.auth-provider management"></ox-i18n> `,
|
|
67
65
|
action: () => {
|
|
68
66
|
navigate('auth-providers')
|
|
@@ -75,7 +73,7 @@ export async function setAuthManagementMenus() {
|
|
|
75
73
|
store.dispatch({
|
|
76
74
|
type: ADD_MORENDA,
|
|
77
75
|
morenda: {
|
|
78
|
-
icon: html` <
|
|
76
|
+
icon: html` <md-icon>business</md-icon> `,
|
|
79
77
|
name: html` <ox-i18n msgid="text.domain management"></ox-i18n> `,
|
|
80
78
|
action: () => {
|
|
81
79
|
navigate('domains')
|
|
@@ -86,7 +84,7 @@ export async function setAuthManagementMenus() {
|
|
|
86
84
|
store.dispatch({
|
|
87
85
|
type: ADD_MORENDA,
|
|
88
86
|
morenda: {
|
|
89
|
-
icon: html` <
|
|
87
|
+
icon: html` <md-icon>dataset</md-icon> `,
|
|
90
88
|
name: html` <ox-i18n msgid="text.attribute management"></ox-i18n> `,
|
|
91
89
|
action: () => {
|
|
92
90
|
navigate('attributes')
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import Clipboard from 'clipboard'
|
|
2
4
|
import gql from 'graphql-tag'
|
|
3
5
|
import { css, html } from 'lit'
|
|
@@ -8,10 +10,12 @@ import { APPLICATION_TYPES } from '../../constants/application'
|
|
|
8
10
|
|
|
9
11
|
import { client } from '@operato/graphql'
|
|
10
12
|
import { navigate, PageView, store } from '@operato/shell'
|
|
13
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
11
14
|
|
|
12
15
|
@customElement('application-page')
|
|
13
16
|
class Application extends connect(store)(PageView) {
|
|
14
17
|
static styles = [
|
|
18
|
+
ButtonContainerStyles,
|
|
15
19
|
css`
|
|
16
20
|
:host {
|
|
17
21
|
display: flex;
|
|
@@ -109,16 +113,7 @@ class Application extends connect(store)(PageView) {
|
|
|
109
113
|
font: var(--input-hint-font);
|
|
110
114
|
color: var(--input-hint-color);
|
|
111
115
|
}
|
|
112
|
-
|
|
113
|
-
--mdc-theme-primary: var(--mdc-danger-button-primary-color);
|
|
114
|
-
}
|
|
115
|
-
.button-container {
|
|
116
|
-
margin-top: var(--margin-wide);
|
|
117
|
-
text-align: right;
|
|
118
|
-
}
|
|
119
|
-
.button-container mwc-button {
|
|
120
|
-
margin-left: var(--margin-narrow);
|
|
121
|
-
}
|
|
116
|
+
|
|
122
117
|
@media screen and (max-width: 480px) {
|
|
123
118
|
[field] {
|
|
124
119
|
grid-column: span 2;
|
|
@@ -176,10 +171,7 @@ class Application extends connect(store)(PageView) {
|
|
|
176
171
|
<div field grid-span>
|
|
177
172
|
<label for="type-selector">type</label>
|
|
178
173
|
<select id="type-selector" name="type">
|
|
179
|
-
${APPLICATION_TYPES.map(
|
|
180
|
-
type =>
|
|
181
|
-
html`<option value="${app.type}" ?selected="${type === app.type ? true : false}">${type}</option>`
|
|
182
|
-
)}
|
|
174
|
+
${APPLICATION_TYPES.map(type => html`<option value="${app.type}" ?selected="${type === app.type ? true : false}">${type}</option>`)}
|
|
183
175
|
</select>
|
|
184
176
|
</div>
|
|
185
177
|
|
|
@@ -211,30 +203,15 @@ class Application extends connect(store)(PageView) {
|
|
|
211
203
|
<div field grid-span>
|
|
212
204
|
<label for="auth-url">auth URL</label>
|
|
213
205
|
<input id="auth-url" type="text" .value=${app.authUrl} readonly />
|
|
214
|
-
<mwc-button
|
|
215
|
-
dense
|
|
216
|
-
unelevated
|
|
217
|
-
button-in-field
|
|
218
|
-
clipboard-copy
|
|
219
|
-
@click=${e => e.preventDefault()}
|
|
220
|
-
label="copy"
|
|
221
|
-
></mwc-button>
|
|
206
|
+
<mwc-button dense unelevated button-in-field clipboard-copy @click=${e => e.preventDefault()} label="copy"></mwc-button>
|
|
222
207
|
The endpoint for authorization server. This is used to get the authorization code.
|
|
223
208
|
</div>
|
|
224
209
|
|
|
225
210
|
<div field grid-span>
|
|
226
211
|
<label for="access-token-url">access token URL</label>
|
|
227
212
|
<input id="access-token-url" type="text" .value=${app.accessTokenUrl} readonly />
|
|
228
|
-
<mwc-button
|
|
229
|
-
|
|
230
|
-
unelevated
|
|
231
|
-
button-in-field
|
|
232
|
-
clipboard-copy
|
|
233
|
-
@click=${e => e.preventDefault()}
|
|
234
|
-
label="copy"
|
|
235
|
-
></mwc-button>
|
|
236
|
-
The endpoint for authentication server. This is used to exchange the authorization code for an access
|
|
237
|
-
token.
|
|
213
|
+
<mwc-button dense unelevated button-in-field clipboard-copy @click=${e => e.preventDefault()} label="copy"></mwc-button>
|
|
214
|
+
The endpoint for authentication server. This is used to exchange the authorization code for an access token.
|
|
238
215
|
</div>
|
|
239
216
|
</div>
|
|
240
217
|
</fieldset>
|
|
@@ -247,36 +224,22 @@ class Application extends connect(store)(PageView) {
|
|
|
247
224
|
<div field grid-span>
|
|
248
225
|
<label for="app-key">appKey</label>
|
|
249
226
|
<input id="app-key" type="text" .value=${app.appKey} readonly />
|
|
250
|
-
<mwc-button
|
|
251
|
-
dense
|
|
252
|
-
unelevated
|
|
253
|
-
button-in-field
|
|
254
|
-
clipboard-copy
|
|
255
|
-
@click=${e => e.preventDefault()}
|
|
256
|
-
label="copy"
|
|
257
|
-
></mwc-button>
|
|
227
|
+
<mwc-button dense unelevated button-in-field clipboard-copy @click=${e => e.preventDefault()} label="copy"></mwc-button>
|
|
258
228
|
</div>
|
|
259
229
|
|
|
260
230
|
<div field grid-span>
|
|
261
231
|
<label for="app-secret">appSecret</label>
|
|
262
232
|
<input id="app-secret" type="text" .value=${app.appSecret} readonly />
|
|
263
|
-
<mwc-button
|
|
264
|
-
dense
|
|
265
|
-
unelevated
|
|
266
|
-
button-in-field
|
|
267
|
-
clipboard-copy
|
|
268
|
-
@click=${e => e.preventDefault()}
|
|
269
|
-
label="copy"
|
|
270
|
-
></mwc-button>
|
|
233
|
+
<mwc-button dense unelevated button-in-field clipboard-copy @click=${e => e.preventDefault()} label="copy"></mwc-button>
|
|
271
234
|
</div>
|
|
272
235
|
</div>
|
|
273
236
|
</fieldset>
|
|
274
237
|
</div>
|
|
275
238
|
|
|
276
239
|
<div class="button-container">
|
|
277
|
-
<
|
|
278
|
-
<
|
|
279
|
-
<
|
|
240
|
+
<button danger @click=${this.deleteApplication.bind(this)}><md-icon>delete_forever</md-icon>delete this app</button>
|
|
241
|
+
<button @click=${this.updateApplication.bind(this)}><md-icon>save</md-icon>update</button>
|
|
242
|
+
<button><md-icon>passkey</md-icon>generate new secret</button>
|
|
280
243
|
</div>
|
|
281
244
|
</form>
|
|
282
245
|
`
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import gql from 'graphql-tag'
|
|
2
4
|
|
|
3
5
|
import { css, html, LitElement } from 'lit'
|
|
@@ -7,6 +9,7 @@ import { client } from '@operato/graphql'
|
|
|
7
9
|
import { i18next, localize } from '@operato/i18n'
|
|
8
10
|
import { isMobileDevice } from '@operato/utils'
|
|
9
11
|
import { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'
|
|
12
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
10
13
|
|
|
11
14
|
@customElement('attribute-set-item-list')
|
|
12
15
|
class AttributeSetItemList extends localize(i18next)(LitElement) {
|
|
@@ -16,6 +19,7 @@ class AttributeSetItemList extends localize(i18next)(LitElement) {
|
|
|
16
19
|
|
|
17
20
|
static styles = [
|
|
18
21
|
css`
|
|
22
|
+
ButtonContainerStyles,
|
|
19
23
|
:host {
|
|
20
24
|
display: flex;
|
|
21
25
|
flex-direction: column;
|
|
@@ -26,19 +30,6 @@ class AttributeSetItemList extends localize(i18next)(LitElement) {
|
|
|
26
30
|
ox-grist {
|
|
27
31
|
flex: 1;
|
|
28
32
|
}
|
|
29
|
-
|
|
30
|
-
.button-container {
|
|
31
|
-
display: flex;
|
|
32
|
-
margin-left: auto;
|
|
33
|
-
padding: var(--padding-default);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
[danger] {
|
|
37
|
-
--mdc-theme-primary: var(--mdc-danger-button-primary-color);
|
|
38
|
-
}
|
|
39
|
-
mwc-button {
|
|
40
|
-
margin-left: var(--margin-default);
|
|
41
|
-
}
|
|
42
33
|
`
|
|
43
34
|
]
|
|
44
35
|
|
|
@@ -46,16 +37,11 @@ class AttributeSetItemList extends localize(i18next)(LitElement) {
|
|
|
46
37
|
|
|
47
38
|
render() {
|
|
48
39
|
return html`
|
|
49
|
-
<ox-grist
|
|
50
|
-
|
|
51
|
-
.config=${this.gristConfig}
|
|
52
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
53
|
-
></ox-grist>
|
|
40
|
+
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>
|
|
41
|
+
|
|
54
42
|
<div class="button-container">
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
>
|
|
58
|
-
<mwc-button raised @click=${this.updateAttributeSetItems.bind(this)}>${i18next.t('button.save')}</mwc-button>
|
|
43
|
+
<button danger @click=${this.deleteAttributeSetItems.bind(this)}><md-icon>delete_forever</md-icon>${i18next.t('button.delete')}</button>
|
|
44
|
+
<button @click=${this.updateAttributeSetItems.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
59
45
|
</div>
|
|
60
46
|
`
|
|
61
47
|
}
|
|
@@ -67,7 +67,10 @@ export class AttributeSetManagementPage extends connect(store)(localize(i18next)
|
|
|
67
67
|
{
|
|
68
68
|
title: i18next.t('button.delete'),
|
|
69
69
|
action: this.deleteAttributeSet.bind(this),
|
|
70
|
-
icon: 'delete'
|
|
70
|
+
icon: 'delete',
|
|
71
|
+
emphasis: {
|
|
72
|
+
danger: true
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
],
|
|
73
76
|
toolbar: false
|
|
@@ -78,17 +81,9 @@ export class AttributeSetManagementPage extends connect(store)(localize(i18next)
|
|
|
78
81
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
79
82
|
|
|
80
83
|
return html`
|
|
81
|
-
<ox-grist
|
|
82
|
-
.mode=${mode}
|
|
83
|
-
.config=${this.gristConfig}
|
|
84
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
85
|
-
?url-params-sensitive=${this.active}
|
|
86
|
-
>
|
|
84
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${this.active}>
|
|
87
85
|
<div slot="headroom" class="header">
|
|
88
|
-
<div class="title">
|
|
89
|
-
<mwc-icon>summarize</mwc-icon>
|
|
90
|
-
${i18next.t('title.attributes')}
|
|
91
|
-
</div>
|
|
86
|
+
<div class="title">${i18next.t('title.attributes')}</div>
|
|
92
87
|
|
|
93
88
|
<ox-context-page-toolbar class="actions" .context=${this.context}> </ox-context-page-toolbar>
|
|
94
89
|
</div>
|
|
@@ -112,15 +107,12 @@ export class AttributeSetManagementPage extends connect(store)(localize(i18next)
|
|
|
112
107
|
handlers: {
|
|
113
108
|
click: (columns, data, column, record, rowIndex) => {
|
|
114
109
|
if (!record.id) return
|
|
115
|
-
const popup = openPopup(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
title: i18next.t('title.attribute-item list')
|
|
122
|
-
}
|
|
123
|
-
)
|
|
110
|
+
const popup = openPopup(html` <attribute-set-item-list .attribute=${record}></attribute-set-item-list> `, {
|
|
111
|
+
backdrop: true,
|
|
112
|
+
help: 'attribute/ui/attribute-set-item-list',
|
|
113
|
+
size: 'large',
|
|
114
|
+
title: i18next.t('title.attribute-item list')
|
|
115
|
+
})
|
|
124
116
|
popup.onclosed = () => {
|
|
125
117
|
this.grist.fetch()
|
|
126
118
|
}
|
|
@@ -68,7 +68,10 @@ export class AuthProviderManagementPage extends connect(store)(localize(i18next)
|
|
|
68
68
|
{
|
|
69
69
|
title: i18next.t('button.delete'),
|
|
70
70
|
action: this.deleteAuthProvider.bind(this),
|
|
71
|
-
icon: 'delete'
|
|
71
|
+
icon: 'delete',
|
|
72
|
+
emphasis: {
|
|
73
|
+
danger: true
|
|
74
|
+
}
|
|
72
75
|
}
|
|
73
76
|
],
|
|
74
77
|
toolbar: false
|
|
@@ -79,17 +82,9 @@ export class AuthProviderManagementPage extends connect(store)(localize(i18next)
|
|
|
79
82
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
80
83
|
|
|
81
84
|
return html`
|
|
82
|
-
<ox-grist
|
|
83
|
-
.mode=${mode}
|
|
84
|
-
.config=${this.gristConfig}
|
|
85
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
86
|
-
?url-params-sensitive=${this.active}
|
|
87
|
-
>
|
|
85
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${this.active}>
|
|
88
86
|
<div slot="headroom" class="header">
|
|
89
|
-
<div class="title">
|
|
90
|
-
<mwc-icon>summarize</mwc-icon>
|
|
91
|
-
${i18next.t('title.auth-provider')}
|
|
92
|
-
</div>
|
|
87
|
+
<div class="title">${i18next.t('title.auth-provider')}</div>
|
|
93
88
|
|
|
94
89
|
<ox-filters-form autofocus without-search class="filters"></ox-filters-form>
|
|
95
90
|
|
|
@@ -184,11 +179,7 @@ export class AuthProviderManagementPage extends connect(store)(localize(i18next)
|
|
|
184
179
|
record: {
|
|
185
180
|
editable: true,
|
|
186
181
|
options: async (value, column, record, row, field) => {
|
|
187
|
-
const {
|
|
188
|
-
description,
|
|
189
|
-
help,
|
|
190
|
-
parameterSpec: spec
|
|
191
|
-
} = record.type ? this.authProviderTypes[record.type] : ({} as any)
|
|
182
|
+
const { description, help, parameterSpec: spec } = record.type ? this.authProviderTypes[record.type] : ({} as any)
|
|
192
183
|
const context = this.grist
|
|
193
184
|
|
|
194
185
|
return { description, help, spec, context }
|
|
@@ -81,10 +81,7 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
|
|
|
81
81
|
return html`
|
|
82
82
|
<ox-grist .mode=${this.mode} .config=${this.config} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
83
83
|
<div slot="headroom" class="header">
|
|
84
|
-
<div class="title">
|
|
85
|
-
<mwc-icon>summarize</mwc-icon>
|
|
86
|
-
${i18next.t('text.domain management')}
|
|
87
|
-
</div>
|
|
84
|
+
<div class="title">${i18next.t('text.domain management')}</div>
|
|
88
85
|
|
|
89
86
|
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
90
87
|
</div>
|
|
@@ -108,20 +105,11 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
|
|
|
108
105
|
click: async (columns, data, column, record, rowIndex) => {
|
|
109
106
|
const attributeSet = await this.getAttributeSetForDomain()
|
|
110
107
|
|
|
111
|
-
openPopup(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
style="background-color: white;"
|
|
117
|
-
></ox-attribute-view>
|
|
118
|
-
`,
|
|
119
|
-
{
|
|
120
|
-
backdrop: true,
|
|
121
|
-
size: 'large',
|
|
122
|
-
title: record.name + ' ' + i18next.t('title.attributes')
|
|
123
|
-
}
|
|
124
|
-
)
|
|
108
|
+
openPopup(html` <ox-attribute-view .attributeSet=${attributeSet} .value=${record.attributes} style="background-color: white;"></ox-attribute-view> `, {
|
|
109
|
+
backdrop: true,
|
|
110
|
+
size: 'large',
|
|
111
|
+
title: record.name + ' ' + i18next.t('title.attributes')
|
|
112
|
+
})
|
|
125
113
|
}
|
|
126
114
|
}
|
|
127
115
|
},
|
package/dist-client/bootstrap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
2
|
import '@operato/i18n/ox-i18n.js';
|
|
3
3
|
import '@operato/attribute/grist-editor'; /* for register data-grist editor type 'attributes' */
|
|
4
4
|
import { html } from 'lit-html';
|
|
@@ -6,8 +6,8 @@ import { navigate, store } from '@operato/shell';
|
|
|
6
6
|
import { TOOL_POSITION } from '@operato/layout';
|
|
7
7
|
import { OxGristEditorPrivilege } from '@operato/app/grist-editor/ox-grist-editor-privilege.js';
|
|
8
8
|
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer, OxGristRendererJson5 } from '@operato/data-grist';
|
|
9
|
-
import { auth } from '@things-factory/auth-base/dist-client';
|
|
10
|
-
import { ADD_MORENDA } from '@things-factory/more-base';
|
|
9
|
+
import { auth } from '@things-factory/auth-base/dist-client/auth.js';
|
|
10
|
+
import { ADD_MORENDA } from '@things-factory/more-base/client';
|
|
11
11
|
export default function bootstrap() {
|
|
12
12
|
registerGristEditor('privilege', OxGristEditorPrivilege);
|
|
13
13
|
registerGristRenderer('privilege', OxGristRendererJson5);
|
|
@@ -15,7 +15,7 @@ export default function bootstrap() {
|
|
|
15
15
|
store.dispatch({
|
|
16
16
|
type: ADD_MORENDA,
|
|
17
17
|
morenda: {
|
|
18
|
-
icon: html ` <
|
|
18
|
+
icon: html ` <md-icon>account_circle</md-icon> `,
|
|
19
19
|
name: html ` <ox-i18n msgid="text.auth profile"></ox-i18n> `,
|
|
20
20
|
position: TOOL_POSITION.FRONT_END,
|
|
21
21
|
action: () => {
|
|
@@ -27,7 +27,7 @@ export default function bootstrap() {
|
|
|
27
27
|
store.dispatch({
|
|
28
28
|
type: ADD_MORENDA,
|
|
29
29
|
morenda: {
|
|
30
|
-
icon: html ` <
|
|
30
|
+
icon: html ` <md-icon>exit_to_app</md-icon> `,
|
|
31
31
|
name: html ` <ox-i18n msgid="field.sign out"></ox-i18n> `,
|
|
32
32
|
position: TOOL_POSITION.FRONT_END,
|
|
33
33
|
action: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,iCAAiC,CAAA,CAAC,sDAAsD;AAE/F,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,wDAAwD,CAAA;AAC/F,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE5I,OAAO,EAAE,IAAI,EAAE,MAAM,+CAA+C,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAE9D,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,mBAAmB,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAA;IACxD,qBAAqB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAA;IAExD,8BAA8B;IAC9B,KAAK,CAAC,QAAQ,CAAC;QACb,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE;YACP,IAAI,EAAE,IAAI,CAAA,qCAAqC;YAC/C,IAAI,EAAE,IAAI,CAAA,iDAAiD;YAC3D,QAAQ,EAAE,aAAa,CAAC,SAAS;YACjC,MAAM,EAAE,GAAG,EAAE;gBACX,QAAQ,CAAC,SAAS,CAAC,CAAA;YACrB,CAAC;SACF;KACF,CAAC,CAAA;IAEF,0BAA0B;IAC1B,KAAK,CAAC,QAAQ,CAAC;QACb,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE;YACP,IAAI,EAAE,IAAI,CAAA,kCAAkC;YAC5C,IAAI,EAAE,IAAI,CAAA,8CAA8C;YACxD,QAAQ,EAAE,aAAa,CAAC,SAAS;YACjC,MAAM,EAAE,GAAG,EAAE;gBACX,IAAI,CAAC,OAAO,EAAE,CAAA;YAChB,CAAC;SACF;KACF,CAAC,CAAA;IAEF;;;;MAIE;IACF,IAAI,CAAC,OAAO,EAAE,CAAA;AAChB,CAAC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/i18n/ox-i18n.js'\nimport '@operato/attribute/grist-editor' /* for register data-grist editor type 'attributes' */\n\nimport { html } from 'lit-html'\n\nimport { navigate, store } from '@operato/shell'\nimport { TOOL_POSITION } from '@operato/layout'\nimport { OxGristEditorPrivilege } from '@operato/app/grist-editor/ox-grist-editor-privilege.js'\nimport { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer, OxGristRendererJson5 } from '@operato/data-grist'\n\nimport { auth } from '@things-factory/auth-base/dist-client/auth.js'\nimport { ADD_MORENDA } from '@things-factory/more-base/client'\n\nexport default function bootstrap() {\n registerGristEditor('privilege', OxGristEditorPrivilege)\n registerGristRenderer('privilege', OxGristRendererJson5)\n\n /* add user profile morenda */\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>account_circle</md-icon> `,\n name: html` <ox-i18n msgid=\"text.auth profile\"></ox-i18n> `,\n position: TOOL_POSITION.FRONT_END,\n action: () => {\n navigate('profile')\n }\n }\n })\n\n /* add sign-out morenda */\n store.dispatch({\n type: ADD_MORENDA,\n morenda: {\n icon: html` <md-icon>exit_to_app</md-icon> `,\n name: html` <ox-i18n msgid=\"field.sign out\"></ox-i18n> `,\n position: TOOL_POSITION.FRONT_END,\n action: () => {\n auth.signout()\n }\n }\n })\n\n /* \n Get user profile information from server. \n As soon as response received, auth.on('profile', ...) handlers start to work.\n It's very important point to build UI for the user.\n */\n auth.profile()\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from "tslib";
|
|
|
2
2
|
import { css, html, LitElement } from 'lit';
|
|
3
3
|
import { customElement, query } from 'lit/decorators.js';
|
|
4
4
|
import { i18next, localize } from '@operato/i18n';
|
|
5
|
-
import { auth } from '@things-factory/auth-base/dist-client';
|
|
5
|
+
import { auth } from '@things-factory/auth-base/dist-client/auth.js';
|
|
6
6
|
let ChangePassword = class ChangePassword extends localize(i18next)(LitElement) {
|
|
7
7
|
render() {
|
|
8
8
|
return html `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-password.js","sourceRoot":"","sources":["../../client/components/change-password.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"change-password.js","sourceRoot":"","sources":["../../client/components/change-password.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,+CAA+C,CAAA;AAG7D,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IA4D/D,MAAM;QACJ,OAAO,IAAI,CAAA;;;mEAGoD,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC;;;+DAGtC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;;;mEAG1B,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC;;;oCAGjE,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;;KAElG,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM;;QACV,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACxC,IAAI,MAAM,GAAG,EAAE,CAAA;QACf,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC7C,IAAI,CAAC,KAAK,EAAE;gBACV,MAAM,WAAW,GAAG,MAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,GAAG,GAAG,CAAsB,0CAAE,WAAW,CAAA;gBAC/F,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,WAAW,IAAI,GAAG,EAAE,CAAC,CAAC,CAAA;aACxF;YACD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;SACpB;QAED,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,MAAM,CAAC,cAAc,CAAC,EAAE;YACjD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,sDAAsD,CAAC,CAAC,CAAA;SACzF;QAED,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;QAC3B,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC;IAED,SAAS,CAAC,OAAO;QACf,QAAQ,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;IAC5E,CAAC;;AAlGM,qBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqDF;CACF,CAAA;AAED;IAAC,KAAK,CAAC,MAAM,CAAC;8BAAQ,eAAe;4CAAA;AA1D1B,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAoG1B;SApGY,cAAc","sourcesContent":["import { css, html, LitElement } from 'lit'\nimport { customElement, query } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { auth } from '@things-factory/auth-base/dist-client/auth.js'\n\n@customElement('change-password')\nexport class ChangePassword extends localize(i18next)(LitElement) {\n static styles = [\n css`\n * {\n box-sizing: border-box;\n }\n\n *:focus {\n outline: none;\n }\n\n form {\n display: flex;\n flex-direction: column;\n }\n\n input {\n border: var(--change-password-field-border);\n border-radius: var(--change-password-field-border-radius);\n margin: var(--change-password-field-margin);\n padding: var(--change-password-field-padding);\n\n font: var(--change-password-field-font);\n width: var(--change-password-field-width);\n }\n\n input:focus {\n border: 1px solid var(--focus-background-color);\n }\n\n ::placeholder {\n font-size: 0.8rem;\n text-transform: capitalize;\n }\n\n mwc-button {\n margin: var(--margin-narrow) auto var(--margin-default) auto;\n }\n\n button {\n background-color: var(--secondary-color, #394e64);\n margin: 2px 2px 10px 2px;\n height: var(--button-height, 28px);\n color: var(--button-color, #fff);\n font: var(--button-font);\n border-radius: var(--button-radius, 5px);\n border: var(--button-border, 1px solid transparent);\n line-height: 1.5;\n }\n\n button:hover,\n button:active {\n background-color: var(--button-active-background-color, #22a6a7);\n border: var(--button-active-border);\n }\n `\n ]\n\n @query('form') form!: HTMLFormElement\n\n render() {\n return html`\n <form>\n <div class=\"field\">\n <input type=\"password\" name=\"current_pass\" placeholder=${i18next.t('text.current password')} required />\n </div>\n <div class=\"field\">\n <input type=\"password\" name=\"new_pass\" placeholder=${i18next.t('text.new password')} required />\n </div>\n <div class=\"field\">\n <input type=\"password\" name=\"confirm_pass\" placeholder=${i18next.t('text.confirm password')} required />\n </div>\n\n <mwc-button raised label=\"${i18next.t('text.change password')}\" @click=${this.submit.bind(this)}></mwc-button>\n </form>\n `\n }\n\n async submit() {\n const formData = new FormData(this.form)\n let params = {}\n for (const [key, value] of formData.entries()) {\n if (!value) {\n const placeholder = (this.form.querySelector(`[name=${key}]`) as HTMLInputElement)?.placeholder\n return this.showToast(i18next.t('error.value is empty', { value: placeholder || key }))\n }\n params[key] = value\n }\n\n if (params['new_pass'] !== params['confirm_pass']) {\n return this.showToast(i18next.t('error.new-password-and-confirm-password-do-not-match'))\n }\n\n auth.changePassword(params)\n this.form.reset()\n }\n\n showToast(message) {\n document.dispatchEvent(new CustomEvent('notify', { detail: { message } }))\n }\n}\n"]}
|
|
@@ -7,7 +7,7 @@ import '@operato/i18n';
|
|
|
7
7
|
import { css, html, LitElement } from 'lit';
|
|
8
8
|
import { customElement, query } from 'lit/decorators.js';
|
|
9
9
|
import { i18next, localize } from '@operato/i18n';
|
|
10
|
-
import { auth } from '@things-factory/auth-base/dist-client';
|
|
10
|
+
import { auth } from '@things-factory/auth-base/dist-client/auth.js';
|
|
11
11
|
let ContactUs = class ContactUs extends localize(i18next)(LitElement) {
|
|
12
12
|
static get styles() {
|
|
13
13
|
return [
|
|
@@ -74,13 +74,7 @@ let ContactUs = class ContactUs extends localize(i18next)(LitElement) {
|
|
|
74
74
|
}}
|
|
75
75
|
></mwc-textarea>
|
|
76
76
|
</div>
|
|
77
|
-
<mwc-button
|
|
78
|
-
slot="primaryAction"
|
|
79
|
-
type="submit"
|
|
80
|
-
label=${i18next.t('button.submit')}
|
|
81
|
-
raised
|
|
82
|
-
@click=${e => this._submit(e)}
|
|
83
|
-
></mwc-button>
|
|
77
|
+
<mwc-button slot="primaryAction" type="submit" label=${i18next.t('button.submit')} raised @click=${e => this._submit(e)}></mwc-button>
|
|
84
78
|
<mwc-button slot="secondaryAction" dialogAction="cancel" label=${i18next.t('button.cancel')}></mwc-button>
|
|
85
79
|
</mwc-dialog>
|
|
86
80
|
`;
|