@things-factory/auth-ui 4.0.23 → 4.0.27

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.
@@ -1,7 +1,8 @@
1
- import { i18next } from '@things-factory/i18n-base'
2
- import { html } from 'lit'
1
+ import { generatePasswordPatternHelp, generatePasswordPatternRegExp } from '../../utils/password-rule'
2
+
3
3
  import { AbstractSign } from '../../components/abstract-sign'
4
- import { generatePasswordPatternRegExp, generatePasswordPatternHelp } from '../../utils/password-rule'
4
+ import { html } from 'lit'
5
+ import { i18next } from '@things-factory/i18n-base'
5
6
 
6
7
  export class AuthSignup extends AbstractSign {
7
8
  get pageName() {
@@ -16,21 +17,8 @@ export class AuthSignup extends AbstractSign {
16
17
  const email = this.data?.email || ''
17
18
 
18
19
  return html`
19
- <input id="name" type="hidden" name="name" />
20
- <input id="email" type="hidden" name="email" .value=${email} />
21
- <input id="password" type="hidden" name="password" />
22
-
23
20
  <div class="field">
24
- <mwc-textfield
25
- name="name"
26
- type="text"
27
- label=${i18next.t('field.name')}
28
- required
29
- @input=${e => {
30
- var nameInput = this.renderRoot.querySelector('#name')
31
- nameInput.value = e.target.value
32
- }}
33
- ></mwc-textfield>
21
+ <mwc-textfield name="name" type="text" label=${i18next.t('field.name')} required></mwc-textfield>
34
22
  </div>
35
23
  <div class="field">
36
24
  <mwc-textfield
@@ -39,10 +27,6 @@ export class AuthSignup extends AbstractSign {
39
27
  label=${i18next.t('field.email')}
40
28
  required
41
29
  .value=${email}
42
- @input=${e => {
43
- var emailInput = this.renderRoot.querySelector('#email')
44
- emailInput.value = e.target.value
45
- }}
46
30
  ></mwc-textfield>
47
31
  </div>
48
32
  <div class="field">
@@ -55,12 +39,9 @@ export class AuthSignup extends AbstractSign {
55
39
  helperPersistent
56
40
  required
57
41
  @input=${e => {
58
- var confirmPasswordEl = this.renderRoot.querySelector('#confirm-password')
59
- var password = this.renderRoot.querySelector('#password')
60
42
  var val = e.target.value
61
- password.value = val
62
- confirmPasswordEl.pattern = val.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '[$&]')
63
- confirmPasswordEl.requestUpdate()
43
+ var confirmPass = this.renderRoot.querySelector('#confirm-password')
44
+ confirmPass.setAttribute('pattern', val.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '[$&]'))
64
45
  }}
65
46
  ></mwc-textfield>
66
47
  </div>
@@ -3,7 +3,7 @@ import { PageView, client, navigate, store } from '@things-factory/shell'
3
3
  import { parseJwt, sleep } from '@things-factory/utils'
4
4
 
5
5
  import Clipboard from 'clipboard'
6
- import { asyncReplace } from 'lit-html/directives/async-replace'
6
+ import { asyncReplace } from 'lit/directives/async-replace.js'
7
7
  import { connect } from 'pwa-helpers/connect-mixin.js'
8
8
  import gql from 'graphql-tag'
9
9
 
@@ -319,7 +319,7 @@ class AppBinding extends connect(store)(PageView) {
319
319
  async fetchAppBinding() {
320
320
  const response = await client.query({
321
321
  query: gql`
322
- query($id: String!) {
322
+ query ($id: String!) {
323
323
  appBinding(id: $id) {
324
324
  id
325
325
  name
@@ -353,7 +353,7 @@ class AppBinding extends connect(store)(PageView) {
353
353
 
354
354
  const response = await client.mutate({
355
355
  mutation: gql`
356
- mutation($id: String!) {
356
+ mutation ($id: String!) {
357
357
  deleteAppBinding(id: $id)
358
358
  }
359
359
  `,
@@ -378,7 +378,7 @@ class AppBinding extends connect(store)(PageView) {
378
378
 
379
379
  const response = await client.mutate({
380
380
  mutation: gql`
381
- mutation($id: String!) {
381
+ mutation ($id: String!) {
382
382
  renewApplicationAccessToken(id: $id) {
383
383
  accessToken
384
384
  refreshToken
@@ -1,11 +1,11 @@
1
- import { html, css, LitElement } from 'lit'
2
- import { asyncReplace } from 'lit-html/directives/async-replace'
3
- import gql from 'graphql-tag'
4
- import Clipboard from 'clipboard'
1
+ import { PageView, client, navigate, store } from '@things-factory/shell'
2
+ import { css, html } from 'lit'
3
+ import { parseJwt, sleep } from '@things-factory/utils'
5
4
 
5
+ import Clipboard from 'clipboard'
6
+ import { asyncReplace } from 'lit/directives/async-replace.js'
6
7
  import { connect } from 'pwa-helpers/connect-mixin.js'
7
- import { client, store, navigate, PageView } from '@things-factory/shell'
8
- import { sleep, parseJwt } from '@things-factory/utils'
8
+ import gql from 'graphql-tag'
9
9
 
10
10
  class Appliance extends connect(store)(PageView) {
11
11
  static get styles() {
@@ -248,7 +248,7 @@ class Appliance extends connect(store)(PageView) {
248
248
  async fetchAppliance() {
249
249
  const response = await client.query({
250
250
  query: gql`
251
- query($id: String!) {
251
+ query ($id: String!) {
252
252
  appliance(id: $id) {
253
253
  id
254
254
  name
@@ -284,7 +284,7 @@ class Appliance extends connect(store)(PageView) {
284
284
 
285
285
  const response = await client.mutate({
286
286
  mutation: gql`
287
- mutation($id: String!, $patch: AppliancePatch!) {
287
+ mutation ($id: String!, $patch: AppliancePatch!) {
288
288
  updateAppliance(id: $id, patch: $patch) {
289
289
  id
290
290
  name
@@ -318,7 +318,7 @@ class Appliance extends connect(store)(PageView) {
318
318
 
319
319
  const response = await client.mutate({
320
320
  mutation: gql`
321
- mutation($id: String!) {
321
+ mutation ($id: String!) {
322
322
  deleteAppliance(id: $id)
323
323
  }
324
324
  `,
@@ -341,7 +341,7 @@ class Appliance extends connect(store)(PageView) {
341
341
 
342
342
  const response = await client.mutate({
343
343
  mutation: gql`
344
- mutation($id: String!) {
344
+ mutation ($id: String!) {
345
345
  generateApplianceSecret(id: $id) {
346
346
  id
347
347
  name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/auth-ui",
3
- "version": "4.0.23",
3
+ "version": "4.0.27",
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.2.50",
34
- "@operato/lottie-player": "^0.2.50",
35
- "@things-factory/auth-base": "^4.0.23",
36
- "@things-factory/i18n-base": "^4.0.23",
37
- "@things-factory/i18n-ui": "^4.0.23",
38
- "@things-factory/layout-ui": "^4.0.23",
39
- "@things-factory/more-base": "^4.0.23",
33
+ "@operato/data-grist": "^0.3.2",
34
+ "@operato/lottie-player": "^0.3.2",
35
+ "@things-factory/auth-base": "^4.0.27",
36
+ "@things-factory/i18n-base": "^4.0.27",
37
+ "@things-factory/i18n-ui": "^4.0.27",
38
+ "@things-factory/layout-ui": "^4.0.27",
39
+ "@things-factory/more-base": "^4.0.27",
40
40
  "clipboard": "^2.0.6"
41
41
  },
42
- "gitHead": "49ba662dea1d349e9608a9a58c8fcfbc1310a5d6"
42
+ "gitHead": "276eaface2890c8f229ce6c9f64cde9c6b1e0083"
43
43
  }