@things-factory/auth-ui 4.0.39 → 4.0.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.
Files changed (37) hide show
  1. package/assets/images/image-api.png +0 -0
  2. package/client/bootstrap.js +7 -5
  3. package/client/components/abstract-auth-page.js +10 -10
  4. package/client/components/abstract-password-reset.js +8 -6
  5. package/client/components/change-password.js +2 -3
  6. package/client/components/contact-us.js +3 -3
  7. package/client/components/create-domain-popup.js +4 -4
  8. package/client/components/create-role.js +4 -4
  9. package/client/components/create-user.js +2 -2
  10. package/client/components/delete-user-popup.js +8 -8
  11. package/client/components/invite-customer.js +4 -4
  12. package/client/components/invite-user.js +4 -4
  13. package/client/components/my-login-history.js +1 -1
  14. package/client/components/ownership-transfer-popup.js +4 -4
  15. package/client/components/partner-info-card.js +2 -2
  16. package/client/components/partner-role-editor.js +4 -4
  17. package/client/components/profile-component.js +8 -8
  18. package/client/components/role-edit-form.js +3 -2
  19. package/client/components/role-privilege-editor.js +7 -7
  20. package/client/components/user-role-editor.js +8 -8
  21. package/client/entries/auth/activate.js +5 -5
  22. package/client/entries/auth/checkin.js +1 -1
  23. package/client/entries/auth/forgot-password.js +6 -5
  24. package/client/entries/auth/result.js +1 -1
  25. package/client/entries/auth/signin.js +0 -4
  26. package/client/entries/auth/signup.js +6 -5
  27. package/client/entries/oauth2/oauth2-decision-page.js +4 -4
  28. package/client/entries/public/home.js +1 -1
  29. package/client/index.js +10 -8
  30. package/client/pages/application/register.js +5 -5
  31. package/client/pages/domain/domain-management.js +5 -11
  32. package/client/pages/partner/partner-management.js +4 -4
  33. package/client/pages/profile.js +1 -2
  34. package/client/pages/role/role-management.js +4 -4
  35. package/client/pages/user/user-management.js +3 -3
  36. package/client/utils/password-rule.js +1 -1
  37. package/package.json +9 -9
Binary file
@@ -1,10 +1,12 @@
1
1
  import '@material/mwc-icon'
2
+ import '@operato/i18n'
3
+
4
+ import { html } from 'lit-html'
5
+
6
+ import { TOOL_POSITION } from '@operato/layout'
2
7
  import { auth } from '@things-factory/auth-base'
3
- import '@things-factory/i18n-base'
4
8
  import { ADD_MORENDA } from '@things-factory/more-base'
5
- import { TOOL_POSITION } from '@things-factory/layout-base'
6
9
  import { navigate, store } from '@things-factory/shell'
7
- import { html } from 'lit-html'
8
10
 
9
11
  export default function bootstrap() {
10
12
  /* add user profile morenda */
@@ -12,7 +14,7 @@ export default function bootstrap() {
12
14
  type: ADD_MORENDA,
13
15
  morenda: {
14
16
  icon: html` <mwc-icon>account_circle</mwc-icon> `,
15
- name: html` <i18n-msg msgid="text.auth profile"></i18n-msg> `,
17
+ name: html` <ox-i18n msgid="text.auth profile"></ox-i18n> `,
16
18
  position: TOOL_POSITION.FRONT_END,
17
19
  action: () => {
18
20
  navigate('profile')
@@ -25,7 +27,7 @@ export default function bootstrap() {
25
27
  type: ADD_MORENDA,
26
28
  morenda: {
27
29
  icon: html` <mwc-icon>exit_to_app</mwc-icon> `,
28
- name: html` <i18n-msg msgid="field.sign out"></i18n-msg> `,
30
+ name: html` <ox-i18n msgid="field.sign out"></ox-i18n> `,
29
31
  position: TOOL_POSITION.FRONT_END,
30
32
  action: () => {
31
33
  auth.signout()
@@ -3,14 +3,14 @@ import '@material/mwc-icon'
3
3
  import '@material/mwc-icon-button'
4
4
  import '@material/mwc-textfield'
5
5
  import '@operato/lottie-player'
6
- import '@things-factory/i18n-ui/client/components/i18n-selector'
7
- import '@things-factory/layout-ui/client/layouts/snack-bar'
6
+ import '@operato/i18n/ox-i18n-selector.js'
7
+ import '@operato/layout/ox-snack-bar.js'
8
8
 
9
9
  import { css, html, LitElement } from 'lit'
10
10
 
11
+ import { i18next, localize } from '@operato/i18n'
11
12
  import { ScrollbarStyles } from '@operato/styles'
12
13
  import { isSafari } from '@operato/utils'
13
- import { i18next, localize } from '@things-factory/i18n-base'
14
14
 
15
15
  import { AUTH_STYLE_SIGN } from '../auth-style-sign'
16
16
 
@@ -85,7 +85,7 @@ export class AbstractAuthPage extends localize(i18next)(LitElement) {
85
85
  </div>
86
86
 
87
87
  <div class="auth-form">
88
- <h3><i18n-msg msgid="title.${this.pageName}"></i18n-msg></h3>
88
+ <h3><ox-i18n msgid="title.${this.pageName}"></ox-i18n></h3>
89
89
 
90
90
  <form
91
91
  id="form"
@@ -100,7 +100,7 @@ export class AbstractAuthPage extends localize(i18next)(LitElement) {
100
100
  ${this.links}
101
101
  <div id="locale-area">
102
102
  <label for="locale-selector"><mwc-icon>language</mwc-icon></label>
103
- <i18n-selector
103
+ <ox-i18n-selector
104
104
  id="locale-selector"
105
105
  value=${i18next.language || 'en-US'}
106
106
  @change=${e => {
@@ -109,13 +109,13 @@ export class AbstractAuthPage extends localize(i18next)(LitElement) {
109
109
 
110
110
  i18next.changeLanguage(locale)
111
111
  }}
112
- ></i18n-selector>
112
+ ></ox-i18n-selector>
113
113
  </div>
114
114
  </div>
115
115
  </div>
116
116
 
117
117
  <mwc-icon-button home icon="home" @click=${e => (window.location.href = '/')}></mwc-icon-button>
118
- <snack-bar id="snackbar" level="error" .message=${this.message}></snack-bar>
118
+ <ox-snack-bar id="snackbar" level="error" .message=${this.message}></ox-snack-bar>
119
119
 
120
120
  ${isSafari()
121
121
  ? html``
@@ -175,7 +175,7 @@ export class AbstractAuthPage extends localize(i18next)(LitElement) {
175
175
  </div>
176
176
 
177
177
  <mwc-button class="ui" type="submit" raised @click=${e => this._onSubmit(e)}>
178
- <i18n-msg msgid="field.${this.pageName}"> </i18n-msg>
178
+ <ox-i18n msgid="field.${this.pageName}"> </ox-i18n>
179
179
  </mwc-button>
180
180
  `
181
181
  }
@@ -183,10 +183,10 @@ export class AbstractAuthPage extends localize(i18next)(LitElement) {
183
183
  get links() {
184
184
  return html`
185
185
  <a class="link" href="/auth/signup">
186
- <mwc-button icon="add_task"><i18n-msg msgid="field.sign up"></i18n-msg></mwc-button>
186
+ <mwc-button icon="add_task"><ox-i18n msgid="field.sign up"></ox-i18n></mwc-button>
187
187
  </a>
188
188
  <a class="link" href="/auth/forgot-password">
189
- <mwc-button icon="lock_open"><i18n-msg msgid="field.forgot-password"></i18n-msg></mwc-button>
189
+ <mwc-button icon="lock_open"><ox-i18n msgid="field.forgot-password"></ox-i18n></mwc-button>
190
190
  </a>
191
191
  `
192
192
  }
@@ -2,11 +2,13 @@ import '@material/mwc-button'
2
2
  import '@material/mwc-textfield'
3
3
  import '@operato/lottie-player'
4
4
  import '../components/profile-component'
5
+ import '@operato/i18n/ox-i18n-selector.js'
6
+ import '@operato/layout/ox-snack-bar.js'
5
7
 
6
8
  import { css, html } from 'lit'
7
9
 
10
+ import { i18next } from '@operato/i18n'
8
11
  import { isSafari } from '@operato/utils'
9
- import { i18next } from '@things-factory/i18n-base'
10
12
 
11
13
  import { AUTH_STYLE_SIGN } from '../auth-style-sign'
12
14
  import { generatePasswordPatternHelp, generatePasswordPatternRegExp } from '../utils/password-rule'
@@ -66,7 +68,7 @@ export class AbstractPasswordReset extends AbstractAuthPage {
66
68
  </div>
67
69
 
68
70
  <div class="auth-form">
69
- <h3><i18n-msg msgid="title.${this.title}"></i18n-msg></h3>
71
+ <h3><ox-i18n msgid="title.${this.title}"></ox-i18n></h3>
70
72
  <form
71
73
  id="form"
72
74
  action="${this.actionUrl}"
@@ -104,12 +106,12 @@ export class AbstractPasswordReset extends AbstractAuthPage {
104
106
  </div>
105
107
 
106
108
  <mwc-button id="submit-button" type="submit" raised @click=${e => this._onSubmit(e)}>
107
- <i18n-msg msgid="${this.submitButtonLabel}"></i18n-msg>
109
+ <ox-i18n msgid="${this.submitButtonLabel}"></ox-i18n>
108
110
  </mwc-button>
109
111
 
110
112
  <div id="locale-area">
111
113
  <label for="locale-selector"><mwc-icon>language</mwc-icon></label>
112
- <i18n-selector
114
+ <ox-i18n-selector
113
115
  id="locale-selector"
114
116
  value=${i18next.language || 'en-US'}
115
117
  @change=${e => {
@@ -118,12 +120,12 @@ export class AbstractPasswordReset extends AbstractAuthPage {
118
120
 
119
121
  i18next.changeLanguage(locale)
120
122
  }}
121
- ></i18n-selector>
123
+ ></ox-i18n-selector>
122
124
  </div>
123
125
  </form>
124
126
  </div>
125
127
  </div>
126
- <snack-bar id="snackbar" level="error" .message=${this.message}></snack-bar>
128
+ <ox-snack-bar id="snackbar" level="error" .message=${this.message}></ox-snack-bar>
127
129
 
128
130
  ${isSafari()
129
131
  ? html``
@@ -1,7 +1,6 @@
1
- import { LitElement, css, html } from 'lit'
2
- import { i18next, localize } from '@things-factory/i18n-base'
1
+ import { css, html, LitElement } from 'lit'
3
2
 
4
- import { CustomAlert } from '@things-factory/shell'
3
+ import { i18next, localize } from '@operato/i18n'
5
4
  import { auth } from '@things-factory/auth-base'
6
5
 
7
6
  export class ChangePassword extends localize(i18next)(LitElement) {
@@ -2,11 +2,11 @@ import '@material/mwc-textarea'
2
2
  import '@material/mwc-textfield'
3
3
  import '@material/mwc-button'
4
4
  import '@material/mwc-dialog'
5
- import '@things-factory/i18n-base'
5
+ import '@operato/i18n'
6
6
 
7
- import { LitElement, css, html } from 'lit'
8
- import { i18next, localize } from '@things-factory/i18n-base'
7
+ import { css, html, LitElement } from 'lit'
9
8
 
9
+ import { i18next, localize } from '@operato/i18n'
10
10
  import { auth } from '@things-factory/auth-base'
11
11
 
12
12
  export class ContactUs extends localize(i18next)(LitElement) {
@@ -1,10 +1,10 @@
1
1
  import '@material/mwc-button'
2
2
 
3
- import { CustomAlert, client } from '@things-factory/shell'
4
- import { LitElement, css, html } from 'lit'
5
- import { i18next, localize } from '@things-factory/i18n-base'
6
-
7
3
  import gql from 'graphql-tag'
4
+ import { css, html, LitElement } from 'lit'
5
+
6
+ import { i18next, localize } from '@operato/i18n'
7
+ import { client, CustomAlert } from '@things-factory/shell'
8
8
 
9
9
  class CreateDomainPopup extends localize(i18next)(LitElement) {
10
10
  static get properties() {
@@ -1,8 +1,8 @@
1
- import { CustomAlert, client, gqlContext } from '@things-factory/shell'
2
- import { LitElement, css, html } from 'lit'
3
- import { i18next, localize } from '@things-factory/i18n-base'
4
-
5
1
  import gql from 'graphql-tag'
2
+ import { css, html, LitElement } from 'lit'
3
+
4
+ import { i18next, localize } from '@operato/i18n'
5
+ import { client, CustomAlert, gqlContext } from '@things-factory/shell'
6
6
 
7
7
  class CreateRole extends localize(i18next)(LitElement) {
8
8
  static get styles() {
@@ -1,6 +1,6 @@
1
- import { LitElement, css, html } from 'lit'
1
+ import { css, html, LitElement } from 'lit'
2
2
 
3
- import { i18next } from '@things-factory/i18n-base'
3
+ import { i18next } from '@operato/i18n'
4
4
 
5
5
  class CreateUser extends LitElement {
6
6
  static get styles() {
@@ -1,8 +1,8 @@
1
- import { LitElement, css, html } from 'lit'
2
- import { i18next, localize } from '@things-factory/i18n-base'
1
+ import { css, html, LitElement } from 'lit'
3
2
 
3
+ import { i18next, localize } from '@operato/i18n'
4
+ import { notify } from '@operato/layout'
4
5
  import { auth } from '@things-factory/auth-base'
5
- import { notify } from '@things-factory/layout-base'
6
6
 
7
7
  export class DeleteUserPopup extends localize(i18next)(LitElement) {
8
8
  static get styles() {
@@ -69,17 +69,17 @@ export class DeleteUserPopup extends localize(i18next)(LitElement) {
69
69
 
70
70
  render() {
71
71
  return html`
72
- <h1><i18n-msg msgid="label.delete account"></i18n-msg></h1>
73
- <span><i18n-msg msgid="text.delete account warning message"></i18n-msg></span>
72
+ <h1><ox-i18n msgid="label.delete account"></ox-i18n></h1>
73
+ <span><ox-i18n msgid="text.delete account warning message"></ox-i18n></span>
74
74
  <form @submit=${e => this.submit(e)}>
75
75
  <div class="field">
76
- <label for="email"><i18n-msg msgid="label.email"></i18n-msg></label>
76
+ <label for="email"><ox-i18n msgid="label.email"></ox-i18n></label>
77
77
  <input id="email" type="email" name="email" required />
78
- <label for="password"><i18n-msg msgid="label.password"></i18n-msg></label>
78
+ <label for="password"><ox-i18n msgid="label.password"></ox-i18n></label>
79
79
  <input id="password" type="password" name="password" required />
80
80
  </div>
81
81
 
82
- <button class="ui button" type="submit"><i18n-msg msgid="label.delete account"></i18n-msg></button>
82
+ <button class="ui button" type="submit"><ox-i18n msgid="label.delete account"></ox-i18n></button>
83
83
  </form>
84
84
  `
85
85
  }
@@ -1,10 +1,10 @@
1
1
  import '@things-factory/auth-ui'
2
2
 
3
- import { CustomAlert, client, gqlContext } from '@things-factory/shell'
4
- import { LitElement, css, html } from 'lit'
5
- import { i18next, localize } from '@things-factory/i18n-base'
6
-
7
3
  import gql from 'graphql-tag'
4
+ import { css, html, LitElement } from 'lit'
5
+
6
+ import { i18next, localize } from '@operato/i18n'
7
+ import { client, CustomAlert, gqlContext } from '@things-factory/shell'
8
8
 
9
9
  class InviteCustomer extends localize(i18next)(LitElement) {
10
10
  static get styles() {
@@ -1,10 +1,10 @@
1
1
  import './user-role-editor'
2
2
 
3
- import { CustomAlert, client, gqlContext } from '@things-factory/shell'
4
- import { LitElement, css, html } from 'lit'
5
- import { i18next, localize } from '@things-factory/i18n-base'
6
-
7
3
  import gql from 'graphql-tag'
4
+ import { css, html, LitElement } from 'lit'
5
+
6
+ import { i18next, localize } from '@operato/i18n'
7
+ import { client, CustomAlert, gqlContext } from '@things-factory/shell'
8
8
 
9
9
  class InviteUser extends localize(i18next)(LitElement) {
10
10
  static get styles() {
@@ -3,8 +3,8 @@ import '@operato/data-grist'
3
3
  import gql from 'graphql-tag'
4
4
  import { css, html, LitElement } from 'lit'
5
5
 
6
+ import { i18next } from '@operato/i18n'
6
7
  import { isMobileDevice } from '@operato/utils'
7
- import { i18next } from '@things-factory/i18n-base'
8
8
  import { client } from '@things-factory/shell'
9
9
 
10
10
  class MyLoginHistory extends LitElement {
@@ -1,10 +1,10 @@
1
1
  import '@material/mwc-button'
2
2
 
3
- import { CustomAlert, client, gqlContext } from '@things-factory/shell'
4
- import { LitElement, css, html } from 'lit'
5
- import { i18next, localize } from '@things-factory/i18n-base'
6
-
7
3
  import gql from 'graphql-tag'
4
+ import { css, html, LitElement } from 'lit'
5
+
6
+ import { i18next, localize } from '@operato/i18n'
7
+ import { client, CustomAlert, gqlContext } from '@things-factory/shell'
8
8
 
9
9
  class OwnershipTransferPopup extends localize(i18next)(LitElement) {
10
10
  static get properties() {
@@ -1,6 +1,6 @@
1
- import { LitElement, css, html } from 'lit'
1
+ import { css, html, LitElement } from 'lit'
2
2
 
3
- import { i18next } from '@things-factory/i18n-base'
3
+ import { i18next } from '@operato/i18n'
4
4
 
5
5
  export class PartnerInfoCard extends LitElement {
6
6
  static get styles() {
@@ -1,11 +1,11 @@
1
1
  import '@material/mwc-icon'
2
2
  import '@things-factory/auth-ui'
3
3
 
4
- import { CustomAlert, client, gqlContext } from '@things-factory/shell'
5
- import { LitElement, css, html } from 'lit'
6
- import { i18next, localize } from '@things-factory/i18n-base'
7
-
8
4
  import gql from 'graphql-tag'
5
+ import { css, html, LitElement } from 'lit'
6
+
7
+ import { i18next, localize } from '@operato/i18n'
8
+ import { client, CustomAlert, gqlContext } from '@things-factory/shell'
9
9
 
10
10
  class PartnerRoleEditor extends localize(i18next)(LitElement) {
11
11
  static get styles() {
@@ -1,12 +1,12 @@
1
- import '@things-factory/i18n-ui/client/components/i18n-selector'
1
+ import '@operato/i18n/ox-i18n-selector.js'
2
2
  import './change-password'
3
3
  import './delete-user-popup'
4
4
  import './my-login-history'
5
5
 
6
- import { LitElement, css, html } from 'lit'
7
- import { i18next, localize } from '@things-factory/i18n-base'
8
- import { notify, openPopup } from '@things-factory/layout-base'
6
+ import { css, html, LitElement } from 'lit'
9
7
 
8
+ import { i18next, localize } from '@operato/i18n'
9
+ import { notify, openPopup } from '@operato/layout'
10
10
  import { auth } from '@things-factory/auth-base'
11
11
 
12
12
  export class ProfileComponent extends localize(i18next)(LitElement) {
@@ -126,18 +126,18 @@ export class ProfileComponent extends localize(i18next)(LitElement) {
126
126
  <div class="wrap">
127
127
  <div class="user">${this.email || ''}</div>
128
128
 
129
- <label for="name"><i18n-msg slot="title" msgid="label.name"></i18n-msg></label>
129
+ <label for="name"><ox-i18n slot="title" msgid="label.name"></ox-i18n></label>
130
130
  <input id="name" @change=${e => this.onNameChanged(e.target.value)} .value=${this.name || ''} />
131
131
 
132
132
  <hr />
133
133
 
134
- <label for="locale"><i18n-msg slot="title" msgid="label.language"></i18n-msg></label>
135
- <i18n-selector id="locale" @change=${e => this.onLocaleChanged(e.detail)}></i18n-selector>
134
+ <label for="locale"><ox-i18n slot="title" msgid="label.language"></ox-i18n></label>
135
+ <ox-i18n-selector id="locale" @change=${e => this.onLocaleChanged(e.detail)}></ox-i18n-selector>
136
136
 
137
137
  <hr />
138
138
 
139
139
  <label for="change-password">
140
- <i18n-msg msgid="label.password"></i18n-msg>
140
+ <ox-i18n msgid="label.password"></ox-i18n>
141
141
  </label>
142
142
 
143
143
  <change-password id="change-password"></change-password>
@@ -1,5 +1,6 @@
1
- import { LitElement, css, html } from 'lit'
2
- import { i18next, localize } from '@things-factory/i18n-base'
1
+ import { css, html, LitElement } from 'lit'
2
+
3
+ import { i18next, localize } from '@operato/i18n'
3
4
 
4
5
  class RoleEditForm extends localize(i18next)(LitElement) {
5
6
  static get properties() {
@@ -1,8 +1,8 @@
1
- import { CustomAlert, client, gqlContext } from '@things-factory/shell'
2
- import { LitElement, css, html } from 'lit'
3
- import { i18next, localize } from '@things-factory/i18n-base'
4
-
5
1
  import gql from 'graphql-tag'
2
+ import { css, html, LitElement } from 'lit'
3
+
4
+ import { i18next, localize } from '@operato/i18n'
5
+ import { client, CustomAlert, gqlContext } from '@things-factory/shell'
6
6
 
7
7
  class RolePrivilegeEditor extends localize(i18next)(LitElement) {
8
8
  static get styles() {
@@ -151,7 +151,7 @@ class RolePrivilegeEditor extends localize(i18next)(LitElement) {
151
151
  if (this.role) {
152
152
  const response = await client.mutate({
153
153
  mutation: gql`
154
- mutation($id: String!, $patch: RolePatch!) {
154
+ mutation ($id: String!, $patch: RolePatch!) {
155
155
  updateRole(id: $id, patch: $patch) {
156
156
  id
157
157
  name
@@ -186,7 +186,7 @@ class RolePrivilegeEditor extends localize(i18next)(LitElement) {
186
186
 
187
187
  const response = await client.mutate({
188
188
  mutation: gql`
189
- mutation($id: String!) {
189
+ mutation ($id: String!) {
190
190
  deleteRole(id: $id)
191
191
  }
192
192
  `,
@@ -228,7 +228,7 @@ class RolePrivilegeEditor extends localize(i18next)(LitElement) {
228
228
  async fetchPrivilegesOnRole(name) {
229
229
  const response = await client.query({
230
230
  query: gql`
231
- query($name: String!) {
231
+ query ($name: String!) {
232
232
  role(name: $name) {
233
233
  id
234
234
  name
@@ -1,13 +1,13 @@
1
1
  import './ownership-transfer-popup'
2
2
  import './role-selector'
3
3
 
4
- import { CustomAlert, client, gqlContext, store } from '@things-factory/shell'
5
- import { LitElement, css, html } from 'lit'
6
-
7
- import { connect } from 'pwa-helpers/connect-mixin'
8
4
  import gql from 'graphql-tag'
9
- import { i18next } from '@things-factory/i18n-base'
10
- import { openPopup } from '@things-factory/layout-base'
5
+ import { css, html, LitElement } from 'lit'
6
+ import { connect } from 'pwa-helpers/connect-mixin'
7
+
8
+ import { i18next } from '@operato/i18n'
9
+ import { openPopup } from '@operato/layout'
10
+ import { client, CustomAlert, gqlContext, store } from '@things-factory/shell'
11
11
 
12
12
  class UserRoleEditor extends connect(store)(LitElement) {
13
13
  static get styles() {
@@ -240,7 +240,7 @@ class UserRoleEditor extends connect(store)(LitElement) {
240
240
  async fetchRolesOnUser(email) {
241
241
  const response = await client.query({
242
242
  query: gql`
243
- query($email: String!) {
243
+ query ($email: String!) {
244
244
  user(email: $email) {
245
245
  id
246
246
  name
@@ -319,7 +319,7 @@ class UserRoleEditor extends connect(store)(LitElement) {
319
319
  if (user?.id) {
320
320
  const response = await client.mutate({
321
321
  mutation: gql`
322
- mutation($userId: String!, $availableRoles: [ObjectRef!]!, $selectedRoles: [ObjectRef!]!) {
322
+ mutation ($userId: String!, $availableRoles: [ObjectRef!]!, $selectedRoles: [ObjectRef!]!) {
323
323
  updateUserRoles(userId: $userId, availableRoles: $availableRoles, selectedRoles: $selectedRoles) {
324
324
  id
325
325
  name
@@ -1,10 +1,10 @@
1
1
  import '@material/mwc-button'
2
- import '@things-factory/layout-ui/client/layouts/snack-bar'
2
+ import '@operato/layout/ox-snack-bar.js'
3
3
  import '@operato/lottie-player'
4
4
 
5
5
  import { css, html, LitElement } from 'lit'
6
6
 
7
- import { i18next, localize } from '@things-factory/i18n-base'
7
+ import { i18next, localize } from '@operato/i18n'
8
8
 
9
9
  export class AuthActivate extends localize(i18next)(LitElement) {
10
10
  static get styles() {
@@ -119,7 +119,7 @@ export class AuthActivate extends localize(i18next)(LitElement) {
119
119
  <span class="welcome-msg">${description}</span>
120
120
  </div>
121
121
 
122
- <h1><i18n-msg msgid="text.your account is not activated"></i18n-msg></h1>
122
+ <h1><ox-i18n msgid="text.your account is not activated"></ox-i18n></h1>
123
123
 
124
124
  <!--description message container-->
125
125
  <p></p>
@@ -134,7 +134,7 @@ export class AuthActivate extends localize(i18next)(LitElement) {
134
134
  hidden
135
135
  >
136
136
  <input name="email" type="hidden" .value=${this.email || ''} required />
137
- <button id="submit-button" type="submit"><i18n-msg msgid="label.change password"></i18n-msg></button>
137
+ <button id="submit-button" type="submit"><ox-i18n msgid="label.change password"></ox-i18n></button>
138
138
  </form>
139
139
 
140
140
  <div id="button-area">
@@ -161,7 +161,7 @@ export class AuthActivate extends localize(i18next)(LitElement) {
161
161
  </div>
162
162
  <!--lottie animation end-->
163
163
  </div>
164
- <snack-bar id="snackbar"></snack-bar>
164
+ <ox-snack-bar id="snackbar"></ox-snack-bar>
165
165
  `
166
166
  }
167
167
 
@@ -4,9 +4,9 @@ import '@operato/lottie-player'
4
4
 
5
5
  import { css, html, LitElement } from 'lit'
6
6
 
7
+ import { i18next, localize } from '@operato/i18n'
7
8
  import { ScrollbarStyles } from '@operato/styles'
8
9
  import { isSafari } from '@operato/utils'
9
- import { i18next, localize } from '@things-factory/i18n-base'
10
10
 
11
11
  import { AUTH_STYLE_SIGN } from '../../auth-style-sign'
12
12
 
@@ -1,10 +1,11 @@
1
1
  import '@material/mwc-button'
2
- import '@things-factory/layout-ui/client/layouts/snack-bar'
3
2
  import '../../components/profile-component'
4
3
 
5
- import { AbstractAuthPage } from '../../components/abstract-auth-page'
6
4
  import { html } from 'lit'
7
- import { i18next } from '@things-factory/i18n-base'
5
+
6
+ import { i18next } from '@operato/i18n'
7
+
8
+ import { AbstractAuthPage } from '../../components/abstract-auth-page'
8
9
 
9
10
  export class ForgotPassword extends AbstractAuthPage {
10
11
  get pageName() {
@@ -34,7 +35,7 @@ export class ForgotPassword extends AbstractAuthPage {
34
35
  ></mwc-textfield>
35
36
  </div>
36
37
  <mwc-button id="submit-button" class="ui button" type="submit" raised @click=${e => this._onSubmit(e)}>
37
- <i18n-msg msgid="button.submit"></i18n-msg>
38
+ <ox-i18n msgid="button.submit"></ox-i18n>
38
39
  </mwc-button>
39
40
  `
40
41
  }
@@ -42,7 +43,7 @@ export class ForgotPassword extends AbstractAuthPage {
42
43
  get links() {
43
44
  return html`
44
45
  <a class="link" href="/auth/signin">
45
- <mwc-button><i18n-msg msgid="field.sign in"></i18n-msg></mwc-button>
46
+ <mwc-button><ox-i18n msgid="field.sign in"></ox-i18n></mwc-button>
46
47
  </a>
47
48
  `
48
49
  }
@@ -4,8 +4,8 @@ import '@operato/lottie-player'
4
4
 
5
5
  import { css, html, LitElement } from 'lit'
6
6
 
7
+ import { i18next, localize } from '@operato/i18n'
7
8
  import { isSafari } from '@operato/utils'
8
- import { i18next, localize } from '@things-factory/i18n-base'
9
9
 
10
10
  export class AuthResult extends localize(i18next)(LitElement) {
11
11
  static get styles() {
@@ -1,7 +1,3 @@
1
- import '@material/mwc-button'
2
- import '@material/mwc-icon'
3
- import '@material/mwc-textfield'
4
- import '@things-factory/i18n-ui/client/components/i18n-selector'
5
1
  import { AbstractSign } from '../../components/abstract-sign'
6
2
 
7
3
  export class AuthSignin extends AbstractSign {
@@ -1,8 +1,9 @@
1
- import { generatePasswordPatternHelp, generatePasswordPatternRegExp } from '../../utils/password-rule'
1
+ import { html } from 'lit'
2
+
3
+ import { i18next } from '@operato/i18n'
2
4
 
3
5
  import { AbstractSign } from '../../components/abstract-sign'
4
- import { html } from 'lit'
5
- import { i18next } from '@things-factory/i18n-base'
6
+ import { generatePasswordPatternHelp, generatePasswordPatternRegExp } from '../../utils/password-rule'
6
7
 
7
8
  export class AuthSignup extends AbstractSign {
8
9
  get pageName() {
@@ -56,7 +57,7 @@ export class AuthSignup extends AbstractSign {
56
57
  ></mwc-textfield>
57
58
  </div>
58
59
  <mwc-button class="ui button" raised @click=${e => this._onSubmit(e)}>
59
- <i18n-msg msgid="field.${this.pageName}"></i18n-msg>
60
+ <ox-i18n msgid="field.${this.pageName}"></ox-i18n>
60
61
  </mwc-button>
61
62
  `
62
63
  }
@@ -69,7 +70,7 @@ export class AuthSignup extends AbstractSign {
69
70
  get links() {
70
71
  return html`
71
72
  <a class="link" href="/auth/signin">
72
- <mwc-button><i18n-msg msgid="field.sign in"></i18n-msg></mwc-button>
73
+ <mwc-button><ox-i18n msgid="field.sign in"></ox-i18n></mwc-button>
73
74
  </a>
74
75
  `
75
76
  }
@@ -1,11 +1,11 @@
1
1
  import '@material/mwc-button'
2
2
  import '../../components/role-selector'
3
3
 
4
- import { CustomAlert, client } from '@things-factory/shell'
5
- import { LitElement, css, html } from 'lit'
6
-
7
4
  import gql from 'graphql-tag'
8
- import { i18next } from '@things-factory/i18n-base'
5
+ import { css, html, LitElement } from 'lit'
6
+
7
+ import { i18next } from '@operato/i18n'
8
+ import { client, CustomAlert } from '@things-factory/shell'
9
9
 
10
10
  class OAuth2DecisionPage extends LitElement {
11
11
  static get styles() {
@@ -3,7 +3,7 @@ import '@material/mwc-button'
3
3
 
4
4
  import { css, html, LitElement } from 'lit'
5
5
 
6
- import { i18next, localize } from '@things-factory/i18n-base'
6
+ import { i18next, localize } from '@operato/i18n'
7
7
 
8
8
  export class HomePage extends localize(i18next)(LitElement) {
9
9
  static get styles() {
package/client/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import '@material/mwc-icon'
2
- import '@things-factory/i18n-base'
2
+ import '@operato/i18n'
3
+
4
+ import { html } from 'lit-html'
5
+
3
6
  import { ADD_MORENDA } from '@things-factory/more-base'
4
7
  import { navigate, store } from '@things-factory/shell'
5
- import { html } from 'lit-html'
6
8
 
7
9
  export * from './components/role-selector'
8
10
  export * from './components/domain-switch'
@@ -14,7 +16,7 @@ export function setAuthManagementMenus(credential) {
14
16
  type: ADD_MORENDA,
15
17
  morenda: {
16
18
  icon: html` <mwc-icon>how_to_reg</mwc-icon> `,
17
- name: html` <i18n-msg msgid="text.role_management"></i18n-msg> `,
19
+ name: html` <ox-i18n msgid="text.role_management"></ox-i18n> `,
18
20
  action: () => {
19
21
  navigate('roles')
20
22
  }
@@ -25,7 +27,7 @@ export function setAuthManagementMenus(credential) {
25
27
  type: ADD_MORENDA,
26
28
  morenda: {
27
29
  icon: html` <mwc-icon>devices</mwc-icon> `,
28
- name: html` <i18n-msg msgid="text.appliance"></i18n-msg> `,
30
+ name: html` <ox-i18n msgid="text.appliance"></ox-i18n> `,
29
31
  action: () => {
30
32
  navigate('appliance-home')
31
33
  }
@@ -36,7 +38,7 @@ export function setAuthManagementMenus(credential) {
36
38
  type: ADD_MORENDA,
37
39
  morenda: {
38
40
  icon: html` <mwc-icon>apps</mwc-icon> `,
39
- name: html` <i18n-msg msgid="text.application management"></i18n-msg> `,
41
+ name: html` <ox-i18n msgid="text.application management"></ox-i18n> `,
40
42
  action: () => {
41
43
  navigate('applications')
42
44
  }
@@ -47,7 +49,7 @@ export function setAuthManagementMenus(credential) {
47
49
  type: ADD_MORENDA,
48
50
  morenda: {
49
51
  icon: html` <mwc-icon>people</mwc-icon> `,
50
- name: html` <i18n-msg msgid="text.user management"></i18n-msg> `,
52
+ name: html` <ox-i18n msgid="text.user management"></ox-i18n> `,
51
53
  action: () => {
52
54
  navigate('users')
53
55
  }
@@ -60,11 +62,11 @@ export function setAuthManagementMenus(credential) {
60
62
  type: ADD_MORENDA,
61
63
  morenda: {
62
64
  icon: html` <mwc-icon>business</mwc-icon> `,
63
- name: html` <i18n-msg msgid="text.domain management"></i18n-msg> `,
65
+ name: html` <ox-i18n msgid="text.domain management"></ox-i18n> `,
64
66
  action: () => {
65
67
  navigate('domains')
66
68
  }
67
69
  }
68
70
  })
69
71
  }
70
- }
72
+ }
@@ -1,8 +1,8 @@
1
- import { LitElement, css, html } from 'lit'
2
- import { PageView, client, navigate, store } from '@things-factory/shell'
3
-
4
- import { connect } from 'pwa-helpers/connect-mixin.js'
5
1
  import gql from 'graphql-tag'
2
+ import { css, html } from 'lit'
3
+ import { connect } from 'pwa-helpers/connect-mixin.js'
4
+
5
+ import { client, navigate, PageView, store } from '@things-factory/shell'
6
6
 
7
7
  class ApplicationRegister extends connect(store)(PageView) {
8
8
  static get styles() {
@@ -185,7 +185,7 @@ class ApplicationRegister extends connect(store)(PageView) {
185
185
 
186
186
  const response = await client.mutate({
187
187
  mutation: gql`
188
- mutation($application: NewApplication!) {
188
+ mutation ($application: NewApplication!) {
189
189
  createApplication(application: $application) {
190
190
  id
191
191
  }
@@ -5,10 +5,10 @@ import gql from 'graphql-tag'
5
5
  import { css, html } from 'lit'
6
6
  import { connect } from 'pwa-helpers/connect-mixin'
7
7
 
8
+ import { i18next, localize } from '@operato/i18n'
9
+ import { openPopup } from '@operato/layout'
8
10
  import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
9
11
  import { isMobileDevice } from '@operato/utils'
10
- import { i18next, localize } from '@things-factory/i18n-base'
11
- import { openPopup } from '@things-factory/layout-base'
12
12
  import { client, PageView, store } from '@things-factory/shell'
13
13
 
14
14
  export class DomainManagement extends connect(store)(localize(i18next)(PageView)) {
@@ -74,16 +74,12 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
74
74
  .fetchHandler="${this.fetchHandler.bind(this)}"
75
75
  >
76
76
  <div id="filters" slot="headroom">
77
- <ox-filters-form @change=${e => this.dataGrist.fetch()}></ox-filters-form>
77
+ <ox-filters-form></ox-filters-form>
78
78
  </div>
79
79
  </ox-grist>
80
80
  `
81
81
  }
82
82
 
83
- get searchForm() {
84
- return this.renderRoot.querySelector('ox-filters-form')
85
- }
86
-
87
83
  get dataGrist() {
88
84
  return this.renderRoot.querySelector('ox-grist')
89
85
  }
@@ -170,9 +166,7 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
170
166
  }
171
167
  }
172
168
 
173
- async fetchHandler({ page, limit, sorters = [] }) {
174
- const filters = (await this.searchForm.getQueryFilters()) || []
175
-
169
+ async fetchHandler({ page, limit, sortings = [], filters = [] }) {
176
170
  const response = await client.query({
177
171
  query: gql`
178
172
  query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
@@ -192,7 +186,7 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
192
186
  variables: {
193
187
  filters,
194
188
  pagination: { page, limit },
195
- sortings: sorters
189
+ sortings
196
190
  }
197
191
  })
198
192
 
@@ -3,12 +3,12 @@ import '../../components/partner-info-card'
3
3
  import '../../components/partner-role-editor'
4
4
  import '../../components/invite-customer'
5
5
 
6
- import { PageView, client, gqlContext, store } from '@things-factory/shell'
6
+ import gql from 'graphql-tag'
7
7
  import { css, html } from 'lit'
8
-
9
8
  import { connect } from 'pwa-helpers/connect-mixin.js'
10
- import gql from 'graphql-tag'
11
- import { i18next } from '@things-factory/i18n-base'
9
+
10
+ import { i18next } from '@operato/i18n'
11
+ import { client, gqlContext, PageView, store } from '@things-factory/shell'
12
12
 
13
13
  class PartnerManagement extends connect(store)(PageView) {
14
14
  static get styles() {
@@ -1,10 +1,9 @@
1
- import '@things-factory/i18n-ui/client/components/i18n-selector'
2
1
  import '../components/profile-component'
3
2
 
4
3
  import { css, html } from 'lit'
5
4
 
5
+ import { i18next, localize } from '@operato/i18n'
6
6
  import { ScrollbarStyles } from '@operato/styles'
7
- import { i18next, localize } from '@things-factory/i18n-base'
8
7
  import { PageView } from '@things-factory/shell'
9
8
 
10
9
  export class AuthProfile extends localize(i18next)(PageView) {
@@ -3,12 +3,12 @@ import '../../components/create-role'
3
3
  import '../../components/role-edit-form'
4
4
  import '../../components/role-privilege-editor'
5
5
 
6
- import { PageView, client, gqlContext, store } from '@things-factory/shell'
6
+ import gql from 'graphql-tag'
7
7
  import { css, html } from 'lit'
8
-
9
8
  import { connect } from 'pwa-helpers/connect-mixin.js'
10
- import gql from 'graphql-tag'
11
- import { i18next } from '@things-factory/i18n-base'
9
+
10
+ import { i18next } from '@operato/i18n'
11
+ import { client, gqlContext, PageView, store } from '@things-factory/shell'
12
12
 
13
13
  class RoleManagement extends connect(store)(PageView) {
14
14
  static get styles() {
@@ -4,11 +4,11 @@ import '../../components/ownership-transfer-popup'
4
4
  import '../../components/user-role-editor'
5
5
  import '../../components/create-user'
6
6
 
7
- import { CustomAlert, PageView, client, gqlContext } from '@things-factory/shell'
7
+ import gql from 'graphql-tag'
8
8
  import { css, html } from 'lit'
9
9
 
10
- import gql from 'graphql-tag'
11
- import { i18next } from '@things-factory/i18n-base'
10
+ import { i18next } from '@operato/i18n'
11
+ import { client, CustomAlert, gqlContext, PageView } from '@things-factory/shell'
12
12
 
13
13
  class UserManagement extends PageView {
14
14
  static get styles() {
@@ -1,4 +1,4 @@
1
- import { i18next } from '@things-factory/i18n-base'
1
+ import { i18next } from '@operato/i18n'
2
2
 
3
3
  export { generatePasswordPatternRegExp } from '@operato/utils'
4
4
  export function generatePasswordPatternHelp({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/auth-ui",
3
- "version": "4.0.39",
3
+ "version": "4.0.43",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -30,14 +30,14 @@
30
30
  "@material/mwc-icon-button": "^0.25.3",
31
31
  "@material/mwc-textarea": "^0.25.3",
32
32
  "@material/mwc-textfield": "^0.25.3",
33
- "@operato/data-grist": "^0.3.19",
34
- "@operato/lottie-player": "^0.3.19",
35
- "@things-factory/auth-base": "^4.0.39",
36
- "@things-factory/i18n-base": "^4.0.39",
37
- "@things-factory/i18n-ui": "^4.0.39",
38
- "@things-factory/layout-ui": "^4.0.39",
39
- "@things-factory/more-base": "^4.0.39",
33
+ "@operato/data-grist": "^0.3.26",
34
+ "@operato/i18n": "^0.3.26",
35
+ "@operato/layout": "^0.3.26",
36
+ "@operato/lottie-player": "^0.3.26",
37
+ "@things-factory/auth-base": "^4.0.43",
38
+ "@things-factory/i18n-base": "^4.0.43",
39
+ "@things-factory/more-base": "^4.0.43",
40
40
  "clipboard": "^2.0.6"
41
41
  },
42
- "gitHead": "a4f93ea85a26cf70ae0aa2fcd298aa59b55dd039"
42
+ "gitHead": "8f2a8008eb61b6efd266412be267186c5059fab6"
43
43
  }