@things-factory/auth-ui 5.0.0-alpha.5 → 5.0.0-alpha.50

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.
@@ -89,7 +89,8 @@ export class ChangePassword extends localize(i18next)(LitElement) {
89
89
  let params = {}
90
90
  for (const [key, value] of formData.entries()) {
91
91
  if (!value) {
92
- return this.showToast(i18next.t('error.value is empty', { value: key }))
92
+ const placeholder = this.form.querySelector(`[name=${key}]`)?.placeholder
93
+ return this.showToast(i18next.t('error.value is empty', { value: placeholder || key }))
93
94
  }
94
95
  params[key] = value
95
96
  }
@@ -49,6 +49,9 @@ class CreateDomainPopup extends localize(i18next)(LitElement) {
49
49
  [field] {
50
50
  grid-column: span 2;
51
51
  }
52
+ [buttons] {
53
+ margin-top: auto;
54
+ }
52
55
  `
53
56
  ]
54
57
  }
@@ -68,7 +71,7 @@ class CreateDomainPopup extends localize(i18next)(LitElement) {
68
71
  <label>${i18next.t('label.description')}<input type="text" name="description" /></label>
69
72
  </div>
70
73
 
71
- <div>
74
+ <div buttons>
72
75
  <mwc-button raised @click=${e => this.onCreateDomain()}>${i18next.t('button.create')}</mwc-button>
73
76
  </div>
74
77
  `
@@ -5,6 +5,7 @@ import '../../components/create-domain-popup'
5
5
 
6
6
  import gql from 'graphql-tag'
7
7
  import { css, html } from 'lit'
8
+ import moment from 'moment-timezone'
8
9
  import { connect } from 'pwa-helpers/connect-mixin'
9
10
 
10
11
  import { i18next, localize } from '@operato/i18n'
@@ -13,6 +14,9 @@ import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato
13
14
  import { isMobileDevice } from '@operato/utils'
14
15
  import { client, PageView, store } from '@things-factory/shell'
15
16
 
17
+ const DEFAULT_TZ = Intl.DateTimeFormat().resolvedOptions().timeZone
18
+ const TIMEZONE_OPTIONS = ['', DEFAULT_TZ, ...moment.tz.names().filter(tz => tz !== DEFAULT_TZ)]
19
+
16
20
  export class DomainManagement extends connect(store)(localize(i18next)(PageView)) {
17
21
  static get properties() {
18
22
  return {
@@ -40,7 +44,7 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
40
44
  constructor() {
41
45
  super()
42
46
 
43
- this.mode = isMobileDevice() ? 'LIST' : 'GRID'
47
+ this.mode = isMobileDevice() ? 'CARD' : 'GRID'
44
48
  }
45
49
 
46
50
  get context() {
@@ -162,6 +166,16 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
162
166
  },
163
167
  width: 70
164
168
  },
169
+ {
170
+ type: 'select',
171
+ name: 'timezone',
172
+ header: i18next.t('field.timezone'),
173
+ record: {
174
+ editable: true,
175
+ options: TIMEZONE_OPTIONS
176
+ },
177
+ width: 120
178
+ },
165
179
  {
166
180
  type: 'datetime',
167
181
  name: 'updatedAt',
@@ -195,6 +209,7 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
195
209
  description
196
210
  subdomain
197
211
  extType
212
+ timezone
198
213
  updatedAt
199
214
  }
200
215
  total
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/auth-ui",
3
- "version": "5.0.0-alpha.5",
3
+ "version": "5.0.0-alpha.50",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -30,14 +30,15 @@
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": "1.0.0-alpha.4",
34
- "@operato/i18n": "1.0.0-alpha.4",
35
- "@operato/layout": "1.0.0-alpha.4",
36
- "@operato/lottie-player": "1.0.0-alpha.4",
37
- "@things-factory/auth-base": "^5.0.0-alpha.5",
38
- "@things-factory/i18n-base": "^5.0.0-alpha.5",
39
- "@things-factory/more-base": "^5.0.0-alpha.5",
40
- "clipboard": "^2.0.6"
33
+ "@operato/data-grist": "1.0.0-beta.20",
34
+ "@operato/i18n": "1.0.0-beta.20",
35
+ "@operato/layout": "1.0.0-beta.20",
36
+ "@operato/lottie-player": "1.0.0-beta.20",
37
+ "@things-factory/auth-base": "^5.0.0-alpha.50",
38
+ "@things-factory/i18n-base": "^5.0.0-alpha.50",
39
+ "@things-factory/more-base": "^5.0.0-alpha.50",
40
+ "clipboard": "^2.0.6",
41
+ "moment-timezone": "^0.5.34"
41
42
  },
42
- "gitHead": "379449b7be7b3d8220f1cac9ab684b812117edfd"
43
+ "gitHead": "ba819c6d9ddf60319283f620b80c9737e7486a91"
43
44
  }