@things-factory/auth-ui 7.0.0-alpha.9 → 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/auth-style-sign.ts +45 -33
- package/client/bootstrap.ts +6 -10
- package/client/components/abstract-auth-page.ts +48 -24
- package/client/components/abstract-password-reset.ts +13 -9
- package/client/components/abstract-sign.ts +105 -0
- package/client/components/change-password.ts +4 -4
- package/client/components/contact-us.ts +20 -26
- package/client/components/create-domain-popup.ts +16 -12
- package/client/components/create-role.ts +14 -16
- package/client/components/create-user.ts +15 -14
- package/client/components/credential-manager.ts +64 -0
- package/client/components/delete-user-popup.ts +4 -3
- package/client/components/domain-switch.ts +18 -15
- package/client/components/invite-customer.ts +6 -10
- package/client/components/invite-user.ts +5 -8
- package/client/components/my-login-history.ts +2 -2
- package/client/components/ownership-transfer-popup.ts +7 -7
- package/client/components/partner-info-card.ts +6 -6
- package/client/components/partner-role-editor.ts +15 -23
- package/client/components/profile-component.ts +71 -15
- package/client/components/role-edit-form.ts +3 -3
- package/client/components/role-privilege-editor.ts +19 -29
- package/client/components/role-selector.ts +7 -7
- package/client/components/user-role-editor.ts +43 -50
- package/client/entries/auth/activate.ts +20 -21
- package/client/entries/auth/checkin.ts +29 -31
- package/client/entries/auth/forgot-password.ts +15 -9
- package/client/entries/auth/result.ts +21 -18
- package/client/entries/auth/signin.ts +4 -0
- package/client/entries/auth/signup.ts +31 -14
- package/client/entries/oauth2/oauth2-decision-error-page.ts +2 -2
- package/client/entries/oauth2/oauth2-decision-page.ts +56 -55
- package/client/entries/public/home.ts +52 -28
- package/client/index.ts +93 -66
- package/client/pages/app-binding/app-binding.ts +48 -30
- package/client/pages/app-binding/app-bindings.ts +26 -7
- package/client/pages/appliance/appliance.ts +85 -26
- package/client/pages/appliance/home.ts +28 -6
- package/client/pages/appliance/register.ts +7 -7
- package/client/pages/application/application.ts +108 -76
- package/client/pages/application/applications.ts +29 -15
- package/client/pages/application/register.ts +8 -8
- package/client/pages/attribute/attribute-set-item-list.ts +13 -19
- package/client/pages/attribute/attribute-set-management.ts +14 -20
- package/client/pages/auth-provider/auth-provider-management.ts +10 -16
- package/client/pages/domain/domain-management.ts +4 -9
- package/client/pages/partner/partner-management.ts +2 -2
- package/client/pages/profile.ts +1 -1
- package/client/pages/role/role-management.ts +14 -12
- package/client/pages/user/user-management.ts +7 -5
- package/client/themes/auth-theme.css +7 -10
- package/dist-client/auth-style-sign.js +45 -33
- package/dist-client/auth-style-sign.js.map +1 -1
- 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/abstract-auth-page.d.ts +5 -4
- package/dist-client/components/abstract-auth-page.js +46 -24
- package/dist-client/components/abstract-auth-page.js.map +1 -1
- package/dist-client/components/abstract-password-reset.d.ts +3 -2
- package/dist-client/components/abstract-password-reset.js +12 -9
- package/dist-client/components/abstract-password-reset.js.map +1 -1
- package/dist-client/components/abstract-sign.d.ts +3 -0
- package/dist-client/components/abstract-sign.js +86 -0
- package/dist-client/components/abstract-sign.js.map +1 -1
- package/dist-client/components/change-password.js +4 -4
- package/dist-client/components/change-password.js.map +1 -1
- package/dist-client/components/contact-us.d.ts +4 -4
- package/dist-client/components/contact-us.js +19 -26
- package/dist-client/components/contact-us.js.map +1 -1
- package/dist-client/components/create-domain-popup.d.ts +1 -1
- package/dist-client/components/create-domain-popup.js +16 -12
- package/dist-client/components/create-domain-popup.js.map +1 -1
- package/dist-client/components/create-role.d.ts +1 -1
- package/dist-client/components/create-role.js +14 -16
- package/dist-client/components/create-role.js.map +1 -1
- package/dist-client/components/create-user.d.ts +2 -1
- package/dist-client/components/create-user.js +14 -14
- package/dist-client/components/create-user.js.map +1 -1
- package/dist-client/components/credential-manager.d.ts +11 -0
- package/dist-client/components/credential-manager.js +64 -0
- package/dist-client/components/credential-manager.js.map +1 -0
- package/dist-client/components/delete-user-popup.js +4 -3
- package/dist-client/components/delete-user-popup.js.map +1 -1
- package/dist-client/components/domain-switch.d.ts +2 -0
- package/dist-client/components/domain-switch.js +20 -15
- package/dist-client/components/domain-switch.js.map +1 -1
- package/dist-client/components/invite-customer.d.ts +1 -1
- package/dist-client/components/invite-customer.js +6 -9
- package/dist-client/components/invite-customer.js.map +1 -1
- package/dist-client/components/invite-user.js +5 -8
- package/dist-client/components/invite-user.js.map +1 -1
- package/dist-client/components/my-login-history.js +2 -2
- package/dist-client/components/my-login-history.js.map +1 -1
- package/dist-client/components/ownership-transfer-popup.d.ts +1 -1
- package/dist-client/components/ownership-transfer-popup.js +7 -7
- package/dist-client/components/ownership-transfer-popup.js.map +1 -1
- package/dist-client/components/partner-info-card.js +6 -6
- package/dist-client/components/partner-info-card.js.map +1 -1
- package/dist-client/components/partner-role-editor.d.ts +2 -2
- package/dist-client/components/partner-role-editor.js +15 -23
- package/dist-client/components/partner-role-editor.js.map +1 -1
- package/dist-client/components/profile-component.d.ts +7 -0
- package/dist-client/components/profile-component.js +70 -15
- package/dist-client/components/profile-component.js.map +1 -1
- package/dist-client/components/role-edit-form.js +3 -3
- package/dist-client/components/role-edit-form.js.map +1 -1
- package/dist-client/components/role-privilege-editor.js +19 -29
- package/dist-client/components/role-privilege-editor.js.map +1 -1
- package/dist-client/components/role-selector.js +7 -7
- package/dist-client/components/role-selector.js.map +1 -1
- package/dist-client/components/user-role-editor.d.ts +2 -0
- package/dist-client/components/user-role-editor.js +42 -49
- package/dist-client/components/user-role-editor.js.map +1 -1
- package/dist-client/entries/auth/activate.d.ts +5 -4
- package/dist-client/entries/auth/activate.js +19 -21
- package/dist-client/entries/auth/activate.js.map +1 -1
- package/dist-client/entries/auth/checkin.d.ts +5 -5
- package/dist-client/entries/auth/checkin.js +27 -28
- package/dist-client/entries/auth/checkin.js.map +1 -1
- package/dist-client/entries/auth/forgot-password.d.ts +2 -1
- package/dist-client/entries/auth/forgot-password.js +15 -9
- package/dist-client/entries/auth/forgot-password.js.map +1 -1
- package/dist-client/entries/auth/reset-password.js.map +1 -1
- package/dist-client/entries/auth/result.d.ts +5 -5
- package/dist-client/entries/auth/result.js +20 -18
- package/dist-client/entries/auth/result.js.map +1 -1
- package/dist-client/entries/auth/signin.d.ts +1 -0
- package/dist-client/entries/auth/signin.js +3 -0
- package/dist-client/entries/auth/signin.js.map +1 -1
- package/dist-client/entries/auth/signup.js +31 -14
- package/dist-client/entries/auth/signup.js.map +1 -1
- package/dist-client/entries/auth/unlock-user.js.map +1 -1
- package/dist-client/entries/oauth2/oauth2-decision-error-page.d.ts +1 -1
- package/dist-client/entries/oauth2/oauth2-decision-error-page.js +2 -2
- package/dist-client/entries/oauth2/oauth2-decision-error-page.js.map +1 -1
- package/dist-client/entries/oauth2/oauth2-decision-page.d.ts +1 -1
- package/dist-client/entries/oauth2/oauth2-decision-page.js +55 -54
- package/dist-client/entries/oauth2/oauth2-decision-page.js.map +1 -1
- package/dist-client/entries/public/home.d.ts +6 -5
- package/dist-client/entries/public/home.js +52 -28
- package/dist-client/entries/public/home.js.map +1 -1
- package/dist-client/index.d.ts +11 -2
- package/dist-client/index.js +74 -66
- package/dist-client/index.js.map +1 -1
- package/dist-client/pages/app-binding/app-binding.d.ts +1 -1
- package/dist-client/pages/app-binding/app-binding.js +47 -30
- package/dist-client/pages/app-binding/app-binding.js.map +1 -1
- package/dist-client/pages/app-binding/app-bindings.d.ts +2 -1
- package/dist-client/pages/app-binding/app-bindings.js +25 -7
- package/dist-client/pages/app-binding/app-bindings.js.map +1 -1
- package/dist-client/pages/appliance/appliance.d.ts +1 -1
- package/dist-client/pages/appliance/appliance.js +84 -26
- package/dist-client/pages/appliance/appliance.js.map +1 -1
- package/dist-client/pages/appliance/home.d.ts +2 -1
- package/dist-client/pages/appliance/home.js +27 -6
- package/dist-client/pages/appliance/home.js.map +1 -1
- package/dist-client/pages/appliance/register.js +7 -7
- package/dist-client/pages/appliance/register.js.map +1 -1
- package/dist-client/pages/application/application.d.ts +1 -1
- package/dist-client/pages/application/application.js +107 -76
- package/dist-client/pages/application/application.js.map +1 -1
- package/dist-client/pages/application/applications.d.ts +2 -1
- package/dist-client/pages/application/applications.js +28 -15
- package/dist-client/pages/application/applications.js.map +1 -1
- package/dist-client/pages/application/register.js +8 -8
- package/dist-client/pages/application/register.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 +11 -18
- package/dist-client/pages/attribute/attribute-set-item-list.js.map +1 -1
- package/dist-client/pages/attribute/attribute-set-management.d.ts +11 -2
- package/dist-client/pages/attribute/attribute-set-management.js +7 -11
- package/dist-client/pages/attribute/attribute-set-management.js.map +1 -1
- package/dist-client/pages/auth-provider/auth-provider-management.d.ts +11 -2
- package/dist-client/pages/auth-provider/auth-provider-management.js +8 -11
- package/dist-client/pages/auth-provider/auth-provider-management.js.map +1 -1
- package/dist-client/pages/domain/domain-management.d.ts +1 -0
- package/dist-client/pages/domain/domain-management.js +3 -7
- package/dist-client/pages/domain/domain-management.js.map +1 -1
- package/dist-client/pages/partner/partner-management.js +2 -2
- package/dist-client/pages/partner/partner-management.js.map +1 -1
- package/dist-client/pages/profile.js +1 -1
- package/dist-client/pages/profile.js.map +1 -1
- package/dist-client/pages/role/role-management.js +13 -10
- package/dist-client/pages/role/role-management.js.map +1 -1
- package/dist-client/pages/user/user-management.d.ts +1 -0
- package/dist-client/pages/user/user-management.js +6 -5
- package/dist-client/pages/user/user-management.js.map +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/themes/auth-theme.css +7 -10
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/password-rule.js.map +1 -1
- package/dist-server/index.d.ts +0 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -18
- package/translations/en.json +2 -0
- package/translations/ja.json +2 -0
- package/translations/ko.json +2 -1
- package/translations/ms.json +2 -0
- package/translations/zh.json +2 -0
- package/views/auth-page.html +5 -3
- package/views/oauth2-page.html +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -7,49 +7,53 @@ import { customElement, query } from 'lit/decorators.js'
|
|
|
7
7
|
import { client } from '@operato/graphql'
|
|
8
8
|
import { i18next, localize } from '@operato/i18n'
|
|
9
9
|
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
10
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
10
11
|
|
|
11
12
|
@customElement('create-domain-popup')
|
|
12
13
|
class CreateDomainPopup extends localize(i18next)(LitElement) {
|
|
13
14
|
static styles = [
|
|
15
|
+
ButtonContainerStyles,
|
|
14
16
|
css`
|
|
15
17
|
:host {
|
|
16
18
|
display: flex;
|
|
17
19
|
flex-direction: column;
|
|
18
|
-
background-color: var(--
|
|
19
|
-
padding: var(--
|
|
20
|
+
background-color: var(--md-sys-color-background);
|
|
21
|
+
padding: var(--spacing-large);
|
|
20
22
|
overflow: auto;
|
|
21
23
|
}
|
|
24
|
+
|
|
22
25
|
input.checkValidName {
|
|
23
26
|
background-color: #fce6e6;
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
|
|
29
|
+
md-elevated-button {
|
|
26
30
|
display: flex;
|
|
27
31
|
justify-content: center;
|
|
28
32
|
}
|
|
33
|
+
|
|
29
34
|
label {
|
|
30
35
|
display: flex;
|
|
31
36
|
flex-direction: column;
|
|
32
37
|
|
|
33
38
|
font: var(--label-font);
|
|
34
|
-
color: var(--label-color);
|
|
39
|
+
color: var(--label-color, var(--md-sys-color-on-surface));
|
|
35
40
|
text-transform: var(--label-text-transform);
|
|
36
41
|
}
|
|
42
|
+
|
|
37
43
|
input {
|
|
38
|
-
border: var(--border-
|
|
44
|
+
border: var(--border-dim-color);
|
|
39
45
|
border-radius: var(--border-radius);
|
|
40
46
|
margin: var(--input-margin);
|
|
41
47
|
padding: var(--input-padding);
|
|
42
|
-
background-color: var(--
|
|
48
|
+
background-color: var(--md-sys-color-surface);
|
|
43
49
|
font: var(--input-font);
|
|
44
50
|
|
|
45
51
|
flex: 1;
|
|
46
52
|
}
|
|
53
|
+
|
|
47
54
|
[field] {
|
|
48
55
|
grid-column: span 2;
|
|
49
56
|
}
|
|
50
|
-
[buttons] {
|
|
51
|
-
margin-top: auto;
|
|
52
|
-
}
|
|
53
57
|
`
|
|
54
58
|
]
|
|
55
59
|
|
|
@@ -71,8 +75,8 @@ class CreateDomainPopup extends localize(i18next)(LitElement) {
|
|
|
71
75
|
<label>${i18next.t('label.description')}<input type="text" name="description" /></label>
|
|
72
76
|
</div>
|
|
73
77
|
|
|
74
|
-
<div
|
|
75
|
-
<
|
|
78
|
+
<div class="button-container">
|
|
79
|
+
<md-elevated-button @click=${e => this.onCreateDomain()}>${i18next.t('button.create')}</md-elevated-button>
|
|
76
80
|
</div>
|
|
77
81
|
`
|
|
78
82
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/textfield/filled-text-field.js'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -12,10 +12,10 @@ import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
|
12
12
|
class CreateRole extends localize(i18next)(LitElement) {
|
|
13
13
|
static styles = css`
|
|
14
14
|
:host {
|
|
15
|
-
--
|
|
16
|
-
background-color: var(--
|
|
17
|
-
margin: var(--
|
|
18
|
-
padding: var(--
|
|
15
|
+
--md-text-field-fill-color: var(--md-sys-color-on-primary);
|
|
16
|
+
background-color: var(--md-sys-color-surface);
|
|
17
|
+
margin: var(--spacing-large) 0;
|
|
18
|
+
padding: var(--spacing-large);
|
|
19
19
|
border-radius: var(--border-radius);
|
|
20
20
|
box-shadow: var(--box-shadow);
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@ class CreateRole extends localize(i18next)(LitElement) {
|
|
|
28
28
|
align-items: center;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
md-outlined-button {
|
|
32
32
|
margin: var(--input-margin);
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ class CreateRole extends localize(i18next)(LitElement) {
|
|
|
37
37
|
grid-template-columns: 1fr 1fr;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
md-outlined-button {
|
|
41
41
|
grid-column: span 2;
|
|
42
42
|
|
|
43
43
|
margin: var(--input-margin);
|
|
@@ -50,22 +50,20 @@ class CreateRole extends localize(i18next)(LitElement) {
|
|
|
50
50
|
|
|
51
51
|
render() {
|
|
52
52
|
return html`
|
|
53
|
-
<
|
|
53
|
+
<md-filled-text-field
|
|
54
54
|
type="text"
|
|
55
55
|
name="name"
|
|
56
56
|
label=${String(i18next.t('label.x name', { x: i18next.t('label.role') }))}
|
|
57
|
-
></
|
|
58
|
-
<
|
|
57
|
+
></md-filled-text-field>
|
|
58
|
+
<md-filled-text-field
|
|
59
59
|
type="text"
|
|
60
60
|
name="description"
|
|
61
61
|
label=${String(i18next.t('label.x description', { x: i18next.t('label.role') }))}
|
|
62
|
-
></
|
|
62
|
+
></md-filled-text-field>
|
|
63
63
|
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
label=${String(i18next.t('button.create'))}
|
|
68
|
-
></mwc-button>
|
|
64
|
+
<md-outlined-button @click=${this.onCreateRole.bind(this)}
|
|
65
|
+
>${String(i18next.t('button.create'))}</md-outlined-button
|
|
66
|
+
>
|
|
69
67
|
`
|
|
70
68
|
}
|
|
71
69
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import '@material/web/button/outlined-button.js'
|
|
2
|
+
import '@material/web/textfield/filled-text-field.js'
|
|
3
|
+
|
|
1
4
|
import { css, html, LitElement } from 'lit'
|
|
2
5
|
import { customElement, query } from 'lit/decorators.js'
|
|
3
6
|
|
|
@@ -7,10 +10,10 @@ import { i18next } from '@operato/i18n'
|
|
|
7
10
|
class CreateUser extends LitElement {
|
|
8
11
|
static styles = css`
|
|
9
12
|
:host {
|
|
10
|
-
--
|
|
11
|
-
background-color: var(--
|
|
12
|
-
margin: var(--
|
|
13
|
-
padding: var(--
|
|
13
|
+
--md-text-field-fill-color: var(--md-sys-color-on-primary);
|
|
14
|
+
background-color: var(--md-sys-color-surface);
|
|
15
|
+
margin: var(--spacing-large) 0;
|
|
16
|
+
padding: var(--spacing-large);
|
|
14
17
|
border-radius: var(--border-radius);
|
|
15
18
|
box-shadow: var(--box-shadow);
|
|
16
19
|
|
|
@@ -23,7 +26,7 @@ class CreateUser extends LitElement {
|
|
|
23
26
|
align-items: center;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
md-outlined-button {
|
|
27
30
|
margin: var(--input-margin);
|
|
28
31
|
}
|
|
29
32
|
|
|
@@ -32,7 +35,7 @@ class CreateUser extends LitElement {
|
|
|
32
35
|
grid-template-columns: 1fr 1fr;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
md-outlined-button {
|
|
36
39
|
grid-column: span 2;
|
|
37
40
|
|
|
38
41
|
margin: var(--input-margin);
|
|
@@ -45,19 +48,17 @@ class CreateUser extends LitElement {
|
|
|
45
48
|
|
|
46
49
|
render() {
|
|
47
50
|
return html`
|
|
48
|
-
<
|
|
51
|
+
<md-filled-text-field
|
|
49
52
|
type="text"
|
|
50
53
|
name="name"
|
|
51
54
|
label=${String(i18next.t('label.x name', { x: i18next.t('label.user') }))}
|
|
52
|
-
></
|
|
55
|
+
></md-filled-text-field>
|
|
53
56
|
|
|
54
|
-
<
|
|
57
|
+
<md-filled-text-field type="email" name="email" label=${String(i18next.t('field.email'))}></md-filled-text-field>
|
|
55
58
|
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
label=${String(i18next.t('button.create'))}
|
|
60
|
-
></mwc-button>
|
|
59
|
+
<md-outlined-button @click=${this.onCreateUser.bind(this)}
|
|
60
|
+
>${String(i18next.t('button.create'))}</md-outlined-button
|
|
61
|
+
>
|
|
61
62
|
`
|
|
62
63
|
}
|
|
63
64
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
import { LitElement, html, css } from 'lit'
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
4
|
+
|
|
5
|
+
import { client } from '@operato/graphql'
|
|
6
|
+
|
|
7
|
+
@customElement('credential-manager')
|
|
8
|
+
export class CredentialManager extends LitElement {
|
|
9
|
+
@property({ type: Array }) credentials: {
|
|
10
|
+
credentialId: string
|
|
11
|
+
}[] = []
|
|
12
|
+
|
|
13
|
+
static styles = css`
|
|
14
|
+
div {
|
|
15
|
+
margin: 20px;
|
|
16
|
+
}
|
|
17
|
+
button {
|
|
18
|
+
margin: 5px;
|
|
19
|
+
}
|
|
20
|
+
`
|
|
21
|
+
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback()
|
|
24
|
+
this.fetchCredentials()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async fetchCredentials() {
|
|
28
|
+
const response = await fetch('/auth/credentials', {
|
|
29
|
+
method: 'GET',
|
|
30
|
+
credentials: 'include'
|
|
31
|
+
})
|
|
32
|
+
this.credentials = await response.json()
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async deleteCredential(credentialId: string) {
|
|
36
|
+
const response = await fetch(`/credentials/${credentialId}`, {
|
|
37
|
+
method: 'DELETE',
|
|
38
|
+
credentials: 'include'
|
|
39
|
+
})
|
|
40
|
+
if (response.ok) {
|
|
41
|
+
this.fetchCredentials()
|
|
42
|
+
} else {
|
|
43
|
+
console.error('Failed to delete credential')
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
render() {
|
|
48
|
+
return html`
|
|
49
|
+
<div>
|
|
50
|
+
<h2>Manage Your WebAuthn Credentials</h2>
|
|
51
|
+
<ul>
|
|
52
|
+
${this.credentials.map(
|
|
53
|
+
credential => html`
|
|
54
|
+
<li>
|
|
55
|
+
${credential.credentialId}
|
|
56
|
+
<button @click=${() => this.deleteCredential(credential.credentialId)}>Delete</button>
|
|
57
|
+
</li>
|
|
58
|
+
`
|
|
59
|
+
)}
|
|
60
|
+
</ul>
|
|
61
|
+
</div>
|
|
62
|
+
`
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -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) {
|
|
@@ -14,6 +14,7 @@ export class DeleteUserPopup extends localize(i18next)(LitElement) {
|
|
|
14
14
|
:host {
|
|
15
15
|
display: flex;
|
|
16
16
|
flex-direction: column;
|
|
17
|
+
color: var(--popup-content-color);
|
|
17
18
|
background-color: var(--popup-content-background-color);
|
|
18
19
|
padding: var(--popup-content-padding);
|
|
19
20
|
}
|
|
@@ -27,7 +28,7 @@ export class DeleteUserPopup extends localize(i18next)(LitElement) {
|
|
|
27
28
|
|
|
28
29
|
label {
|
|
29
30
|
font: bold 14px var(--theme-font);
|
|
30
|
-
color: var(--
|
|
31
|
+
color: var(--md-sys-color-primary);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
input {
|
|
@@ -52,7 +53,7 @@ export class DeleteUserPopup extends localize(i18next)(LitElement) {
|
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
button {
|
|
55
|
-
background-color: var(--status-danger-color,
|
|
56
|
+
background-color: var(--status-danger-color, #d14946);
|
|
56
57
|
margin: 2px 2px 10px 2px;
|
|
57
58
|
height: var(--button-height, 28px);
|
|
58
59
|
color: var(--button-color, #fff);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
3
|
+
import { css, html, LitElement, nothing } from 'lit'
|
|
2
4
|
import { customElement, property } from 'lit/decorators.js'
|
|
3
5
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
4
6
|
|
|
@@ -13,8 +15,8 @@ export class DomainSwitch extends connect(store)(LitElement) {
|
|
|
13
15
|
:host {
|
|
14
16
|
display: flex;
|
|
15
17
|
max-width: 100%;
|
|
16
|
-
background-color:
|
|
17
|
-
border-bottom: var(--border-
|
|
18
|
+
background-color: var(--md-sys-color-primary-container, rgb(215 231 241));
|
|
19
|
+
border-bottom: var(--border-dim-color);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
:host * {
|
|
@@ -25,21 +27,21 @@ export class DomainSwitch extends connect(store)(LitElement) {
|
|
|
25
27
|
flex: 1;
|
|
26
28
|
display: flex;
|
|
27
29
|
flex-direction: row;
|
|
28
|
-
padding: var(--
|
|
30
|
+
padding: var(--spacing-small);
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
background-color:
|
|
33
|
-
margin-right: var(--
|
|
33
|
+
md-icon {
|
|
34
|
+
background-color: var(--md-sys-color-primary, rgb(46 121 190));
|
|
35
|
+
margin-right: var(--spacing-small);
|
|
34
36
|
padding: 2px;
|
|
35
37
|
border-radius: 50%;
|
|
36
38
|
font-size: var(--fontsize-large);
|
|
37
|
-
color: var(--
|
|
39
|
+
color: var(--md-sys-color-on-primary, rgba(255,255,255,.9));
|
|
38
40
|
}
|
|
39
41
|
span,
|
|
40
42
|
select {
|
|
41
43
|
flex: 1;
|
|
42
|
-
color: var(--
|
|
44
|
+
color: var(--md-sys-color-on-primary-container, rgb(50 66 82));
|
|
43
45
|
font: bold 14px/20px var(--theme-font);
|
|
44
46
|
}
|
|
45
47
|
|
|
@@ -56,7 +58,7 @@ export class DomainSwitch extends connect(store)(LitElement) {
|
|
|
56
58
|
padding: 0 !important;
|
|
57
59
|
border-bottom: none;
|
|
58
60
|
}
|
|
59
|
-
:host([dark])
|
|
61
|
+
:host([dark]) md-icon {
|
|
60
62
|
background-color: var(--secondary-text-color);
|
|
61
63
|
margin: 1px 4px 0px 0px;
|
|
62
64
|
padding: 1px 2px;
|
|
@@ -65,12 +67,12 @@ export class DomainSwitch extends connect(store)(LitElement) {
|
|
|
65
67
|
}
|
|
66
68
|
:host([dark]) span,
|
|
67
69
|
:host([dark]) select {
|
|
68
|
-
color: var(--
|
|
70
|
+
color: var(--md-sys-color-on-primary);
|
|
69
71
|
font: bold 13px/13px var(--theme-font);
|
|
70
72
|
}
|
|
71
73
|
:host([dark]) option {
|
|
72
74
|
background-color: var(--primary-color, #585858);
|
|
73
|
-
color: var(--
|
|
75
|
+
color: var(--md-sys-color-on-primary, #fff);
|
|
74
76
|
}
|
|
75
77
|
:host([dark]) span {
|
|
76
78
|
line-height: 23px;
|
|
@@ -79,10 +81,10 @@ export class DomainSwitch extends connect(store)(LitElement) {
|
|
|
79
81
|
:host([rounded-corner]) {
|
|
80
82
|
height: 30px;
|
|
81
83
|
border-radius: 20px;
|
|
82
|
-
border: var(--border-
|
|
84
|
+
border: var(--border-dim-color);
|
|
83
85
|
}
|
|
84
86
|
:host([rounded-corner]) div {
|
|
85
|
-
padding: var(--
|
|
87
|
+
padding: var(--spacing-small) var(--spacing-medium);
|
|
86
88
|
}
|
|
87
89
|
`
|
|
88
90
|
]
|
|
@@ -90,6 +92,7 @@ export class DomainSwitch extends connect(store)(LitElement) {
|
|
|
90
92
|
@property({ type: Array }) domains: any[] = []
|
|
91
93
|
@property({ type: Object }) domain: any
|
|
92
94
|
@property({ type: String, attribute: true }) attrname: string = 'name'
|
|
95
|
+
@property({ type: String, attribute: true }) icon?: string
|
|
93
96
|
|
|
94
97
|
render() {
|
|
95
98
|
const domains = this.domains || []
|
|
@@ -98,7 +101,7 @@ export class DomainSwitch extends connect(store)(LitElement) {
|
|
|
98
101
|
|
|
99
102
|
return html`
|
|
100
103
|
<div>
|
|
101
|
-
|
|
104
|
+
${this.icon ? html`<md-icon>${this.icon}</md-icon>` : nothing}
|
|
102
105
|
${domains.length <= 1
|
|
103
106
|
? html` <span>${domains[0]?.[attrname] || domain.name}</span> `
|
|
104
107
|
: html`
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import '@things-factory/auth-ui'
|
|
2
|
-
|
|
3
1
|
import gql from 'graphql-tag'
|
|
4
2
|
import { css, html, LitElement } from 'lit'
|
|
5
3
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
@@ -13,14 +11,14 @@ class InviteCustomer extends localize(i18next)(LitElement) {
|
|
|
13
11
|
static styles = [
|
|
14
12
|
css`
|
|
15
13
|
input {
|
|
16
|
-
border: var(--border-
|
|
14
|
+
border: var(--border-dim-color);
|
|
17
15
|
border-radius: var(--border-radius);
|
|
18
16
|
margin: var(--input-margin);
|
|
19
17
|
padding: var(--input-padding);
|
|
20
18
|
min-width: 250px;
|
|
21
19
|
font: var(--input-font);
|
|
22
20
|
}
|
|
23
|
-
|
|
21
|
+
md-outlined-button {
|
|
24
22
|
margin: var(--input-margin);
|
|
25
23
|
}
|
|
26
24
|
@media screen and (max-width: 480px) {
|
|
@@ -39,12 +37,10 @@ class InviteCustomer extends localize(i18next)(LitElement) {
|
|
|
39
37
|
return html`
|
|
40
38
|
<div>
|
|
41
39
|
<input id="customer-name" required />
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
label=${String(i18next.t('label.invite customer'))}
|
|
47
|
-
></mwc-button>
|
|
40
|
+
<md-outlined-button @click=${this.invite.bind(this)}>
|
|
41
|
+
<md-icon slot="icon">group_add</md-icon>
|
|
42
|
+
${String(i18next.t('label.invite customer'))}
|
|
43
|
+
</md-outlined-button>
|
|
48
44
|
</div>
|
|
49
45
|
`
|
|
50
46
|
}
|
|
@@ -18,7 +18,7 @@ class InviteUser extends localize(i18next)(LitElement) {
|
|
|
18
18
|
input {
|
|
19
19
|
flex: 1;
|
|
20
20
|
|
|
21
|
-
border: var(--border-
|
|
21
|
+
border: var(--border-dim-color);
|
|
22
22
|
border-radius: var(--border-radius);
|
|
23
23
|
margin: var(--input-margin);
|
|
24
24
|
padding: var(--input-padding);
|
|
@@ -26,7 +26,7 @@ class InviteUser extends localize(i18next)(LitElement) {
|
|
|
26
26
|
font: var(--input-font);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
md-outlined-button {
|
|
30
30
|
margin: var(--input-margin);
|
|
31
31
|
}
|
|
32
32
|
`
|
|
@@ -36,12 +36,9 @@ class InviteUser extends localize(i18next)(LitElement) {
|
|
|
36
36
|
render() {
|
|
37
37
|
return html`
|
|
38
38
|
<input name="email" type="email" required name="invite-email" autocapitalize="off" />
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
icon="group_add"
|
|
43
|
-
label=${String(i18next.t('label.invite user'))}
|
|
44
|
-
></mwc-button>
|
|
39
|
+
<md-outlined-button @click=${this.invite.bind(this)}>
|
|
40
|
+
<md-icon slot="icon">group_add</md-icon>${String(i18next.t('label.invite user'))}
|
|
41
|
+
</md-outlined-button>
|
|
45
42
|
`
|
|
46
43
|
}
|
|
47
44
|
|
|
@@ -14,8 +14,8 @@ class MyLoginHistory extends LitElement {
|
|
|
14
14
|
:host {
|
|
15
15
|
display: flex;
|
|
16
16
|
flex-direction: column;
|
|
17
|
-
background-color: var(--
|
|
18
|
-
padding: var(--
|
|
17
|
+
background-color: var(--md-sys-color-background);
|
|
18
|
+
padding: var(--spacing-large);
|
|
19
19
|
overflow: auto;
|
|
20
20
|
}
|
|
21
21
|
ox-grist {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -15,8 +15,8 @@ class OwnershipTransferPopup extends localize(i18next)(LitElement) {
|
|
|
15
15
|
:host {
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-direction: column;
|
|
18
|
-
background-color: var(--
|
|
19
|
-
padding: var(--
|
|
18
|
+
background-color: var(--md-sys-color-background);
|
|
19
|
+
padding: var(--spacing-large);
|
|
20
20
|
overflow: auto;
|
|
21
21
|
}
|
|
22
22
|
.container {
|
|
@@ -25,7 +25,7 @@ class OwnershipTransferPopup extends localize(i18next)(LitElement) {
|
|
|
25
25
|
flex: 1;
|
|
26
26
|
}
|
|
27
27
|
input {
|
|
28
|
-
border: var(--border-
|
|
28
|
+
border: var(--border-dim-color);
|
|
29
29
|
border-radius: var(--border-radius);
|
|
30
30
|
margin: var(--input-margin);
|
|
31
31
|
padding: var(--input-padding);
|
|
@@ -36,8 +36,8 @@ class OwnershipTransferPopup extends localize(i18next)(LitElement) {
|
|
|
36
36
|
margin: auto;
|
|
37
37
|
display: flex;
|
|
38
38
|
}
|
|
39
|
-
.input-container
|
|
40
|
-
margin: auto 0px auto var(--
|
|
39
|
+
.input-container md-elevated-button {
|
|
40
|
+
margin: auto 0px auto var(--spacing-large);
|
|
41
41
|
}
|
|
42
42
|
`
|
|
43
43
|
]
|
|
@@ -52,7 +52,7 @@ class OwnershipTransferPopup extends localize(i18next)(LitElement) {
|
|
|
52
52
|
<div>${i18next.t('text.please enter the email of the user you want to transfer owner')}</div>
|
|
53
53
|
<div class="input-container">
|
|
54
54
|
<input name="email" />
|
|
55
|
-
<
|
|
55
|
+
<md-elevated-button @click=${this.transferOwnership}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
|
58
58
|
`
|
|
@@ -8,7 +8,7 @@ export class PartnerInfoCard extends LitElement {
|
|
|
8
8
|
static styles = [
|
|
9
9
|
css`
|
|
10
10
|
input {
|
|
11
|
-
border: var(--border-
|
|
11
|
+
border: var(--border-dim-color);
|
|
12
12
|
border-radius: var(--border-radius);
|
|
13
13
|
margin: var(--input-margin);
|
|
14
14
|
padding: var(--input-padding);
|
|
@@ -21,7 +21,7 @@ export class PartnerInfoCard extends LitElement {
|
|
|
21
21
|
display: flex;
|
|
22
22
|
max-height: 45vh;
|
|
23
23
|
flex-direction: row;
|
|
24
|
-
background-color: var(--
|
|
24
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
25
25
|
margin: 0;
|
|
26
26
|
padding: 0;
|
|
27
27
|
border-radius: var(--border-radius);
|
|
@@ -31,8 +31,8 @@ export class PartnerInfoCard extends LitElement {
|
|
|
31
31
|
[field-2column] {
|
|
32
32
|
overflow: auto;
|
|
33
33
|
flex: 1;
|
|
34
|
-
background-color: var(--
|
|
35
|
-
padding: var(--
|
|
34
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
35
|
+
padding: var(--spacing-medium);
|
|
36
36
|
border-radius: var(--border-radius);
|
|
37
37
|
display: grid;
|
|
38
38
|
grid-template-columns: 1fr 1fr;
|
|
@@ -43,14 +43,14 @@ export class PartnerInfoCard extends LitElement {
|
|
|
43
43
|
[field] {
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-direction: column;
|
|
46
|
-
padding-bottom: var(--
|
|
46
|
+
padding-bottom: var(--spacing-medium);
|
|
47
47
|
}
|
|
48
48
|
label {
|
|
49
49
|
display: flex;
|
|
50
50
|
flex-direction: column;
|
|
51
51
|
|
|
52
52
|
font: var(--label-font);
|
|
53
|
-
color: var(--label-color);
|
|
53
|
+
color: var(--label-color, var(--md-sys-color-on-surface));
|
|
54
54
|
text-transform: var(--label-text-transform);
|
|
55
55
|
}
|
|
56
56
|
@media screen and (max-width: 480px) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@material/
|
|
2
|
-
import '
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
2
|
+
import './role-selector.js'
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html, LitElement } from 'lit'
|
|
@@ -8,32 +8,27 @@ import { customElement, property, query } from 'lit/decorators.js'
|
|
|
8
8
|
import { client, gqlContext } from '@operato/graphql'
|
|
9
9
|
import { i18next, localize } from '@operato/i18n'
|
|
10
10
|
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
11
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
11
12
|
|
|
12
13
|
import { RoleSelector } from './role-selector'
|
|
13
14
|
|
|
14
15
|
@customElement('partner-role-editor')
|
|
15
16
|
class PartnerRoleEditor extends localize(i18next)(LitElement) {
|
|
16
17
|
static styles = [
|
|
18
|
+
ButtonContainerStyles,
|
|
17
19
|
css`
|
|
18
20
|
:host {
|
|
19
21
|
display: flex;
|
|
20
22
|
flex-direction: column;
|
|
21
23
|
|
|
22
|
-
border: 1px solid var(--
|
|
23
|
-
padding: var(--
|
|
24
|
+
border: 1px solid var(--md-sys-color-primary);
|
|
25
|
+
padding: var(--spacing-medium);
|
|
24
26
|
font: normal 15px var(--theme-font);
|
|
25
|
-
color: var(--
|
|
27
|
+
color: var(--md-sys-color-secondary);
|
|
26
28
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
background-color: rgba(var(--primary-color-rgb), 0.2);
|
|
31
|
-
}
|
|
32
|
-
mwc-button {
|
|
33
|
-
margin-right: var(--padding-narrow);
|
|
34
|
-
}
|
|
35
|
-
[danger] {
|
|
36
|
-
--mdc-theme-primary: var(--mdc-danger-button-primary-color);
|
|
29
|
+
|
|
30
|
+
md-elevated-button {
|
|
31
|
+
margin-right: var(--spacing-small);
|
|
37
32
|
}
|
|
38
33
|
`
|
|
39
34
|
]
|
|
@@ -51,14 +46,11 @@ class PartnerRoleEditor extends localize(i18next)(LitElement) {
|
|
|
51
46
|
return html`
|
|
52
47
|
<role-selector .roles="${roles}" .userRoles="${grantingRoles}"></role-selector>
|
|
53
48
|
|
|
54
|
-
<div
|
|
55
|
-
<
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
danger
|
|
60
|
-
label="${i18next.t('button.terminate contract')}"
|
|
61
|
-
></mwc-button>
|
|
49
|
+
<div class="button-container">
|
|
50
|
+
<md-elevated-button @click=${this.onSave}>${i18next.t('button.save')}</md-elevated-button>
|
|
51
|
+
<md-elevated-button @click=${this.onTerminateContract} danger
|
|
52
|
+
>${i18next.t('button.terminate contract')}</md-elevated-button
|
|
53
|
+
>
|
|
62
54
|
</div>
|
|
63
55
|
`
|
|
64
56
|
}
|