@things-factory/auth-ui 4.0.25 → 4.0.30

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.
@@ -13,6 +13,7 @@ import { ScrollbarStyles } from '@things-factory/styles'
13
13
 
14
14
  import { AUTH_STYLE_SIGN } from '../auth-style-sign'
15
15
 
16
+ const isSafari = !navigator.userAgent.match(/chrome|chromium|crios/i) && navigator.userAgent.match(/safari/i)
16
17
  export class AbstractAuthPage extends localize(i18next)(LitElement) {
17
18
  static get styles() {
18
19
  return [
@@ -113,14 +114,16 @@ export class AbstractAuthPage extends localize(i18next)(LitElement) {
113
114
  </div>
114
115
  </div>
115
116
 
116
- <mwc-icon-button home icon="home" @click=${e => (window.location = '/')}></mwc-icon-button>
117
+ <mwc-icon-button home icon="home" @click=${e => (window.location.href = '/')}></mwc-icon-button>
117
118
  <snack-bar id="snackbar" level="error" .message=${this.message}></snack-bar>
118
119
 
119
- <!--lottie animation begin-->
120
- <div class="lottie-container">
121
- <lottie-player autoplay loop src="../../assets/images/background-animation.json"></lottie-player>
122
- </div>
123
- <!--lottie animation end-->
120
+ ${isSafari
121
+ ? html``
122
+ : html`
123
+ <div class="lottie-container">
124
+ <lottie-player autoplay loop src="../../assets/images/background-animation.json"></lottie-player>
125
+ </div>
126
+ `}
124
127
  </div>
125
128
  `
126
129
  }
@@ -11,6 +11,8 @@ import { AUTH_STYLE_SIGN } from '../auth-style-sign'
11
11
  import { generatePasswordPatternHelp, generatePasswordPatternRegExp } from '../utils/password-rule'
12
12
  import { AbstractAuthPage } from './abstract-auth-page'
13
13
 
14
+ const isSafari = !navigator.userAgent.match(/chrome|chromium|crios/i) && navigator.userAgent.match(/safari/i)
15
+
14
16
  export class AbstractPasswordReset extends AbstractAuthPage {
15
17
  static get styles() {
16
18
  return [
@@ -124,11 +126,13 @@ export class AbstractPasswordReset extends AbstractAuthPage {
124
126
  </div>
125
127
  <snack-bar id="snackbar" level="error" .message=${this.message}></snack-bar>
126
128
 
127
- <!--lottie animation begin-->
128
- <div class="lottie-container">
129
- <lottie-player autoplay loop src="../../assets/images/background-animation.json"></lottie-player>
130
- </div>
131
- <!--lottie animation end-->
129
+ ${isSafari
130
+ ? html``
131
+ : html`
132
+ <div class="lottie-container">
133
+ <lottie-player autoplay loop src="../../assets/images/background-animation.json"></lottie-player>
134
+ </div>
135
+ `}
132
136
  `
133
137
  }
134
138
 
@@ -6,6 +6,8 @@ import { css, html, LitElement } from 'lit'
6
6
 
7
7
  import { i18next, localize } from '@things-factory/i18n-base'
8
8
 
9
+ const isSafari = !navigator.userAgent.match(/chrome|chromium|crios/i) && navigator.userAgent.match(/safari/i)
10
+
9
11
  export class AuthActivate extends localize(i18next)(LitElement) {
10
12
  static get styles() {
11
13
  return [
@@ -9,6 +9,8 @@ import { ScrollbarStyles } from '@things-factory/styles'
9
9
 
10
10
  import { AUTH_STYLE_SIGN } from '../../auth-style-sign'
11
11
 
12
+ const isSafari = !navigator.userAgent.match(/chrome|chromium|crios/i) && navigator.userAgent.match(/safari/i)
13
+
12
14
  export class AuthCheckIn extends localize(i18next)(LitElement) {
13
15
  static get properties() {
14
16
  return {
@@ -139,11 +141,13 @@ export class AuthCheckIn extends localize(i18next)(LitElement) {
139
141
  : ''}
140
142
  </div>
141
143
 
142
- <!--lottie animation begin-->
143
- <div class="lottie-container">
144
- <lottie-player autoplay loop src="../../assets/images/background-animation.json"></lottie-player>
145
- </div>
146
- <!--lottie animation end-->
144
+ ${isSafari
145
+ ? html``
146
+ : html`
147
+ <div class="lottie-container">
148
+ <lottie-player autoplay loop src="../../assets/images/background-animation.json"></lottie-player>
149
+ </div>
150
+ `}
147
151
  </div>
148
152
  </div>
149
153
  `
@@ -6,6 +6,8 @@ import { css, html, LitElement } from 'lit'
6
6
 
7
7
  import { i18next, localize } from '@things-factory/i18n-base'
8
8
 
9
+ const isSafari = !navigator.userAgent.match(/chrome|chromium|crios/i) && navigator.userAgent.match(/safari/i)
10
+
9
11
  export class AuthResult extends localize(i18next)(LitElement) {
10
12
  static get styles() {
11
13
  return [
@@ -161,11 +163,13 @@ export class AuthResult extends localize(i18next)(LitElement) {
161
163
  ></mwc-button>
162
164
  </div>
163
165
 
164
- <!--lottie animation begin-->
165
- <div class="lottie-container">
166
- <lottie-player autoplay loop src="../../assets/images/background-animation.json"></lottie-player>
167
- </div>
168
- <!--lottie animation end-->
166
+ ${isSafari
167
+ ? html``
168
+ : html`
169
+ <div class="lottie-container">
170
+ <lottie-player autoplay loop src="../../assets/images/background-animation.json"></lottie-player>
171
+ </div>
172
+ `}
169
173
  </div>
170
174
  `
171
175
  }
@@ -1,7 +1,8 @@
1
1
  import '@material/mwc-icon-button'
2
2
  import '@material/mwc-button'
3
3
 
4
- import { LitElement, css, html } from 'lit'
4
+ import { css, html, LitElement } from 'lit'
5
+
5
6
  import { i18next, localize } from '@things-factory/i18n-base'
6
7
 
7
8
  export class HomePage extends localize(i18next)(LitElement) {
@@ -178,8 +179,8 @@ export class HomePage extends localize(i18next)(LitElement) {
178
179
  const explanation2 = this.explanation2 || 'Everything you need to go from where you are, to where you want to be.'
179
180
 
180
181
  return html`
181
- <mwc-icon-button home icon="home" @click=${e => (window.location = '/')}></mwc-icon-button>
182
- <mwc-button signin dense @click=${e => (window.location = '/auth/signin')}>sign in</mwc-button>
182
+ <mwc-icon-button home icon="home" @click=${e => (window.location.href = '/')}></mwc-icon-button>
183
+ <mwc-button signin dense @click=${e => (window.location.href = '/auth/signin')}>sign in</mwc-button>
183
184
 
184
185
  <div message>
185
186
  <strong>${tagline}</strong> ${explanation1} <br />
@@ -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.25",
3
+ "version": "4.0.30",
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.52",
34
- "@operato/lottie-player": "^0.2.52",
35
- "@things-factory/auth-base": "^4.0.25",
36
- "@things-factory/i18n-base": "^4.0.25",
37
- "@things-factory/i18n-ui": "^4.0.25",
38
- "@things-factory/layout-ui": "^4.0.25",
39
- "@things-factory/more-base": "^4.0.25",
33
+ "@operato/data-grist": "^0.3.7",
34
+ "@operato/lottie-player": "^0.3.7",
35
+ "@things-factory/auth-base": "^4.0.30",
36
+ "@things-factory/i18n-base": "^4.0.30",
37
+ "@things-factory/i18n-ui": "^4.0.30",
38
+ "@things-factory/layout-ui": "^4.0.30",
39
+ "@things-factory/more-base": "^4.0.30",
40
40
  "clipboard": "^2.0.6"
41
41
  },
42
- "gitHead": "9c44141d651dab7b4a9c0f0b6fecb8d6937d116f"
42
+ "gitHead": "4ab590326e3fc60d113fb438e90eefee708f1f19"
43
43
  }