@operato/board 1.2.50 → 1.2.52
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.
- package/CHANGELOG.md +17 -0
- package/dist/src/selector/ox-board-selector.d.ts +2 -0
- package/dist/src/selector/ox-board-selector.js +47 -18
- package/dist/src/selector/ox-board-selector.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/selector/ox-board-selector.ts +46 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/board",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.52",
|
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -88,16 +88,16 @@
|
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@open-wc/scoped-elements": "^2.0.0-next.6",
|
|
91
|
-
"@operato/app": "^1.2.
|
|
92
|
-
"@operato/data-grist": "^1.2.
|
|
93
|
-
"@operato/font": "^1.2.
|
|
91
|
+
"@operato/app": "^1.2.52",
|
|
92
|
+
"@operato/data-grist": "^1.2.52",
|
|
93
|
+
"@operato/font": "^1.2.52",
|
|
94
94
|
"@operato/graphql": "^1.2.46",
|
|
95
|
-
"@operato/i18n": "^1.2.
|
|
96
|
-
"@operato/input": "^1.2.
|
|
95
|
+
"@operato/i18n": "^1.2.52",
|
|
96
|
+
"@operato/input": "^1.2.52",
|
|
97
97
|
"@operato/layout": "^1.2.49",
|
|
98
98
|
"@operato/markdown": "^1.2.35",
|
|
99
99
|
"@operato/popup": "^1.2.38",
|
|
100
|
-
"@operato/property-editor": "^1.2.
|
|
100
|
+
"@operato/property-editor": "^1.2.52",
|
|
101
101
|
"@operato/styles": "^1.2.35",
|
|
102
102
|
"@operato/utils": "^1.2.35",
|
|
103
103
|
"@polymer/paper-dropdown-menu": "^3.2.0",
|
|
@@ -148,5 +148,5 @@
|
|
|
148
148
|
"prettier --write"
|
|
149
149
|
]
|
|
150
150
|
},
|
|
151
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "e74565a4341831efce940fbac74ffb036289620a"
|
|
152
152
|
}
|
|
@@ -8,11 +8,11 @@ import { buildArgs, client, gqlContext } from '@operato/graphql'
|
|
|
8
8
|
import { i18next, localize } from '@operato/i18n'
|
|
9
9
|
import { ScrollbarStyles } from '@operato/styles'
|
|
10
10
|
import InfiniteScrollable from '@operato/utils/mixins/infinite-scrollable.js'
|
|
11
|
+
import { InheritedValueType } from '@operato/shell'
|
|
11
12
|
|
|
12
|
-
const FETCH_BOARD_LIST_GQL =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
boards(${buildArgs(listParam)}) {
|
|
13
|
+
const FETCH_BOARD_LIST_GQL = gql`
|
|
14
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!], $inherited: InheritedValueType) {
|
|
15
|
+
boards(filters: $filters, pagination: $pagination, sortings: $sortings, inherited: $inherited) {
|
|
16
16
|
items {
|
|
17
17
|
id
|
|
18
18
|
name
|
|
@@ -23,7 +23,6 @@ const FETCH_BOARD_LIST_GQL = (listParam: any) => {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
`
|
|
26
|
-
}
|
|
27
26
|
|
|
28
27
|
const FETCH_BOARD_GROUP_LIST_GQL = gql`
|
|
29
28
|
{
|
|
@@ -124,13 +123,17 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
|
124
123
|
box-shadow: var(--box-shadow);
|
|
125
124
|
}
|
|
126
125
|
|
|
126
|
+
#filter > div {
|
|
127
|
+
float: right;
|
|
128
|
+
margin-left: 10px;
|
|
129
|
+
}
|
|
130
|
+
|
|
127
131
|
#filter * {
|
|
128
132
|
font-size: 15px;
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
select {
|
|
132
136
|
text-transform: capitalize;
|
|
133
|
-
float: right;
|
|
134
137
|
}
|
|
135
138
|
`
|
|
136
139
|
]
|
|
@@ -139,6 +142,7 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
|
139
142
|
@property({ type: Array }) groups: { id: string; name: string; description: string }[] = []
|
|
140
143
|
@property({ type: Array }) boards: any[] = []
|
|
141
144
|
@property({ type: String }) group?: string
|
|
145
|
+
@property({ type: String }) inherited?: InheritedValueType = InheritedValueType.Include
|
|
142
146
|
@property({ type: Boolean }) creatable: boolean = false
|
|
143
147
|
@property({ type: String }) value?: string
|
|
144
148
|
|
|
@@ -154,15 +158,34 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
|
154
158
|
render() {
|
|
155
159
|
return html`
|
|
156
160
|
<div id="filter">
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
<div>
|
|
162
|
+
<label for="group">Group</label>
|
|
163
|
+
<select
|
|
164
|
+
id="group"
|
|
165
|
+
@change=${(e: Event) => {
|
|
166
|
+
this.group = (e.currentTarget as any)?.value
|
|
167
|
+
this.requestUpdate()
|
|
168
|
+
}}
|
|
169
|
+
>
|
|
170
|
+
<option value="">${i18next.t('label.all')}</option>
|
|
171
|
+
${this.groups.map(group => html` <option value=${group.id}>${group.description}</option> `)}
|
|
172
|
+
</select>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
<div>
|
|
176
|
+
<label for="inherited">Inherited</label>
|
|
177
|
+
<select
|
|
178
|
+
id="inherited"
|
|
179
|
+
@change=${(e: Event) => {
|
|
180
|
+
this.inherited = (e.currentTarget as any)?.value
|
|
181
|
+
this.requestUpdate()
|
|
182
|
+
}}
|
|
183
|
+
>
|
|
184
|
+
<option value="Include">Include</option>
|
|
185
|
+
<option value="Only">Only</option>
|
|
186
|
+
<option value="None">None</option>
|
|
187
|
+
</select>
|
|
188
|
+
</div>
|
|
166
189
|
</div>
|
|
167
190
|
|
|
168
191
|
<div
|
|
@@ -207,7 +230,7 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
|
207
230
|
}
|
|
208
231
|
|
|
209
232
|
async updated(changed: PropertyValues<this>) {
|
|
210
|
-
if (changed.has('group')) {
|
|
233
|
+
if (changed.has('group') || changed.has('inherited')) {
|
|
211
234
|
this.refreshBoards()
|
|
212
235
|
}
|
|
213
236
|
}
|
|
@@ -275,14 +298,17 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
|
275
298
|
value: this.group
|
|
276
299
|
})
|
|
277
300
|
|
|
278
|
-
var
|
|
301
|
+
var variables = {
|
|
279
302
|
filters,
|
|
280
303
|
sortings,
|
|
281
|
-
pagination
|
|
304
|
+
pagination,
|
|
305
|
+
inherited: this.inherited || InheritedValueType.Include
|
|
282
306
|
}
|
|
307
|
+
|
|
283
308
|
var boardListResponse = await client.query({
|
|
284
|
-
query: FETCH_BOARD_LIST_GQL
|
|
285
|
-
context: gqlContext()
|
|
309
|
+
query: FETCH_BOARD_LIST_GQL,
|
|
310
|
+
context: gqlContext(),
|
|
311
|
+
variables
|
|
286
312
|
})
|
|
287
313
|
|
|
288
314
|
if (!boardListResponse || !boardListResponse.data) return []
|