@things-factory/auth-ui 4.0.43 → 4.0.44
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,4 +1,6 @@
|
|
|
1
|
-
import '@operato/data-grist'
|
|
1
|
+
import '@operato/data-grist/ox-grist.js'
|
|
2
|
+
import '@operato/data-grist/ox-filters-form.js'
|
|
3
|
+
import '@operato/data-grist/ox-sorters-control.js'
|
|
2
4
|
import '../../components/create-domain-popup'
|
|
3
5
|
|
|
4
6
|
import gql from 'graphql-tag'
|
|
@@ -7,7 +9,7 @@ import { connect } from 'pwa-helpers/connect-mixin'
|
|
|
7
9
|
|
|
8
10
|
import { i18next, localize } from '@operato/i18n'
|
|
9
11
|
import { openPopup } from '@operato/layout'
|
|
10
|
-
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
|
12
|
+
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
11
13
|
import { isMobileDevice } from '@operato/utils'
|
|
12
14
|
import { client, PageView, store } from '@things-factory/shell'
|
|
13
15
|
|
|
@@ -15,12 +17,14 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
|
|
|
15
17
|
static get properties() {
|
|
16
18
|
return {
|
|
17
19
|
active: String,
|
|
18
|
-
config: Object
|
|
20
|
+
config: Object,
|
|
21
|
+
mode: String
|
|
19
22
|
}
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
static get styles() {
|
|
23
26
|
return [
|
|
27
|
+
CommonGristStyles,
|
|
24
28
|
ScrollbarStyles,
|
|
25
29
|
css`
|
|
26
30
|
:host {
|
|
@@ -29,25 +33,16 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
|
|
|
29
33
|
|
|
30
34
|
overflow: hidden;
|
|
31
35
|
}
|
|
32
|
-
|
|
33
|
-
ox-grist {
|
|
34
|
-
overflow-y: auto;
|
|
35
|
-
flex: 1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
#filters {
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: row;
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
#filters > * {
|
|
45
|
-
padding: var(--padding-default) var(--padding-wide);
|
|
46
|
-
}
|
|
47
36
|
`
|
|
48
37
|
]
|
|
49
38
|
}
|
|
50
39
|
|
|
40
|
+
constructor() {
|
|
41
|
+
super()
|
|
42
|
+
|
|
43
|
+
this.mode = isMobileDevice() ? 'LIST' : 'GRID'
|
|
44
|
+
}
|
|
45
|
+
|
|
51
46
|
get context() {
|
|
52
47
|
return {
|
|
53
48
|
title: i18next.t('text.domain management'),
|
|
@@ -56,11 +51,6 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
|
|
|
56
51
|
title: i18next.t('button.save'),
|
|
57
52
|
action: this.onUpdateDomains.bind(this),
|
|
58
53
|
...CommonButtonStyles.save
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
title: i18next.t('button.add'),
|
|
62
|
-
action: this.onCreateDomain.bind(this),
|
|
63
|
-
...CommonButtonStyles.add
|
|
64
54
|
}
|
|
65
55
|
]
|
|
66
56
|
}
|
|
@@ -68,13 +58,39 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
|
|
|
68
58
|
|
|
69
59
|
render() {
|
|
70
60
|
return html`
|
|
71
|
-
<ox-grist
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
<
|
|
61
|
+
<ox-grist .mode=${this.mode} .config=${this.config} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
62
|
+
<div slot="headroom">
|
|
63
|
+
<div id="filters">
|
|
64
|
+
<ox-filters-form></ox-filters-form>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div id="sorters">
|
|
68
|
+
<mwc-icon
|
|
69
|
+
@click=${e => {
|
|
70
|
+
const target = e.currentTarget
|
|
71
|
+
this.renderRoot.querySelector('#sorter-control').open({
|
|
72
|
+
right: 0,
|
|
73
|
+
top: target.offsetTop + target.offsetHeight
|
|
74
|
+
})
|
|
75
|
+
}}
|
|
76
|
+
>sort</mwc-icon
|
|
77
|
+
>
|
|
78
|
+
<ox-popup id="sorter-control">
|
|
79
|
+
<ox-sorters-control> </ox-sorters-control>
|
|
80
|
+
</ox-popup>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<div id="modes">
|
|
84
|
+
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${this.mode == 'GRID'}>grid_on</mwc-icon>
|
|
85
|
+
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${this.mode == 'LIST'}
|
|
86
|
+
>format_list_bulleted</mwc-icon
|
|
87
|
+
>
|
|
88
|
+
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${this.mode == 'CARD'}>apps</mwc-icon>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div id="add">
|
|
92
|
+
<button><mwc-icon @click=${this.onCreateDomain.bind(this)}>add</mwc-icon></button>
|
|
93
|
+
</div>
|
|
78
94
|
</div>
|
|
79
95
|
</ox-grist>
|
|
80
96
|
`
|
|
@@ -112,6 +128,7 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
|
|
|
112
128
|
editable: false
|
|
113
129
|
},
|
|
114
130
|
filter: 'search',
|
|
131
|
+
sortable: true,
|
|
115
132
|
width: 200
|
|
116
133
|
},
|
|
117
134
|
{
|
|
@@ -140,6 +157,7 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
|
|
|
140
157
|
header: i18next.t('field.type'),
|
|
141
158
|
record: {
|
|
142
159
|
editable: true,
|
|
160
|
+
mandatory: true,
|
|
143
161
|
options: []
|
|
144
162
|
},
|
|
145
163
|
width: 70
|
|
@@ -222,6 +240,7 @@ export class DomainManagement extends connect(store)(localize(i18next)(PageView)
|
|
|
222
240
|
})
|
|
223
241
|
|
|
224
242
|
if (!response.errors) {
|
|
243
|
+
this.dataGrist.fetch()
|
|
225
244
|
return this.showToast(i18next.t('text.updated_successfully'))
|
|
226
245
|
}
|
|
227
246
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/auth-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.44",
|
|
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.
|
|
34
|
-
"@operato/i18n": "^0.3.
|
|
35
|
-
"@operato/layout": "^0.3.
|
|
36
|
-
"@operato/lottie-player": "^0.3.
|
|
37
|
-
"@things-factory/auth-base": "^4.0.
|
|
38
|
-
"@things-factory/i18n-base": "^4.0.
|
|
39
|
-
"@things-factory/more-base": "^4.0.
|
|
33
|
+
"@operato/data-grist": "^0.3.27",
|
|
34
|
+
"@operato/i18n": "^0.3.27",
|
|
35
|
+
"@operato/layout": "^0.3.27",
|
|
36
|
+
"@operato/lottie-player": "^0.3.27",
|
|
37
|
+
"@things-factory/auth-base": "^4.0.44",
|
|
38
|
+
"@things-factory/i18n-base": "^4.0.44",
|
|
39
|
+
"@things-factory/more-base": "^4.0.44",
|
|
40
40
|
"clipboard": "^2.0.6"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "286a037443bfb38c65db964dbfa6c5f2d141d9ac"
|
|
43
43
|
}
|