@operato/board 8.0.0-alpha.5 → 8.0.0-alpha.7
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 +40 -8
- package/dist/src/selector/ox-board-selector.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/src/selector/ox-board-selector.ts +41 -8
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@operato/board",
|
3
|
-
"version": "8.0.0-alpha.
|
3
|
+
"version": "8.0.0-alpha.7",
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
5
5
|
"author": "heartyoh",
|
6
6
|
"main": "dist/src/index.js",
|
@@ -95,16 +95,16 @@
|
|
95
95
|
"dependencies": {
|
96
96
|
"@material/web": "^2.0.0",
|
97
97
|
"@open-wc/scoped-elements": "^2.1.3",
|
98
|
-
"@operato/app": "^8.0.0-alpha.
|
99
|
-
"@operato/data-grist": "^8.0.0-alpha.
|
100
|
-
"@operato/font": "^8.0.0-alpha.
|
98
|
+
"@operato/app": "^8.0.0-alpha.6",
|
99
|
+
"@operato/data-grist": "^8.0.0-alpha.6",
|
100
|
+
"@operato/font": "^8.0.0-alpha.6",
|
101
101
|
"@operato/graphql": "^8.0.0-alpha.0",
|
102
102
|
"@operato/i18n": "^8.0.0-alpha.0",
|
103
103
|
"@operato/input": "^8.0.0-alpha.4",
|
104
104
|
"@operato/layout": "^8.0.0-alpha.4",
|
105
105
|
"@operato/markdown": "^8.0.0-alpha.4",
|
106
106
|
"@operato/popup": "^8.0.0-alpha.4",
|
107
|
-
"@operato/property-editor": "^8.0.0-alpha.
|
107
|
+
"@operato/property-editor": "^8.0.0-alpha.6",
|
108
108
|
"@operato/styles": "^8.0.0-alpha.4",
|
109
109
|
"@operato/utils": "^8.0.0-alpha.0",
|
110
110
|
"@polymer/paper-dropdown-menu": "^3.2.0",
|
@@ -155,5 +155,5 @@
|
|
155
155
|
"prettier --write"
|
156
156
|
]
|
157
157
|
},
|
158
|
-
"gitHead": "
|
158
|
+
"gitHead": "69bcec82b28333b750e85dd55d38f5ef113a07a8"
|
159
159
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import '@operato/input/ox-input-search.js'
|
1
2
|
import './ox-board-creation-card'
|
2
3
|
|
3
4
|
import gql from 'graphql-tag'
|
@@ -9,6 +10,7 @@ import { i18next, localize } from '@operato/i18n'
|
|
9
10
|
import { ScrollbarStyles } from '@operato/styles'
|
10
11
|
import InfiniteScrollable from '@operato/utils/mixins/infinite-scrollable.js'
|
11
12
|
import { InheritedValueType } from '@operato/shell'
|
13
|
+
import { adjustFilters } from '@operato/utils'
|
12
14
|
|
13
15
|
const FETCH_BOARD_LIST_GQL = gql`
|
14
16
|
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!], $inherited: InheritedValueType) {
|
@@ -97,7 +99,7 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
97
99
|
.card > .name {
|
98
100
|
color: var(--md-sys-color-on-secondary);
|
99
101
|
background-color: var(--md-sys-color-secondary);
|
100
|
-
opacity: 0.
|
102
|
+
opacity: 0.9;
|
101
103
|
margin-top: -35px;
|
102
104
|
width: 100%;
|
103
105
|
font-weight: bolder;
|
@@ -106,12 +108,11 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
106
108
|
}
|
107
109
|
|
108
110
|
.card > .description {
|
109
|
-
color: var(--md-sys-color-on-
|
110
|
-
background-color: var(--md-sys-color-
|
111
|
+
color: var(--md-sys-color-on-secondary);
|
112
|
+
background-color: var(--md-sys-color-secondary);
|
111
113
|
width: 100%;
|
112
|
-
min-height:
|
114
|
+
min-height: 16px;
|
113
115
|
font-size: 0.6rem;
|
114
|
-
color: #fff;
|
115
116
|
text-indent: 7px;
|
116
117
|
}
|
117
118
|
.card img {
|
@@ -120,12 +121,22 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
120
121
|
}
|
121
122
|
|
122
123
|
#filter {
|
124
|
+
display: flex;
|
125
|
+
align-items: center;
|
123
126
|
padding: var(--popup-content-padding);
|
124
127
|
color: var(--md-sys-color-on-surface-variant);
|
125
128
|
background-color: var(--md-sys-color-surface-variant);
|
126
129
|
box-shadow: var(--box-shadow);
|
127
130
|
}
|
128
131
|
|
132
|
+
#filter > ox-input-search {
|
133
|
+
margin-right: auto;
|
134
|
+
border: var(--md-sys-color-primary) 1px solid;
|
135
|
+
padding: var(--spacing-small) var(--spacing-small);
|
136
|
+
border-radius: 999px;
|
137
|
+
color: var(--md-sys-color-primary);
|
138
|
+
}
|
139
|
+
|
129
140
|
#filter > div {
|
130
141
|
float: right;
|
131
142
|
margin-left: 10px;
|
@@ -145,6 +156,7 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
145
156
|
@property({ type: Array }) groups: { id: string; name: string; description: string }[] = []
|
146
157
|
@property({ type: Array }) boards: any[] = []
|
147
158
|
@property({ type: String }) group?: string
|
159
|
+
@property({ type: String }) search?: string
|
148
160
|
@property({ type: String }) inherited?: InheritedValueType = InheritedValueType.Include
|
149
161
|
@property({ type: Boolean }) creatable: boolean = false
|
150
162
|
@property({ type: String }) value?: string
|
@@ -161,6 +173,11 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
161
173
|
render() {
|
162
174
|
return html`
|
163
175
|
<div id="filter">
|
176
|
+
<ox-input-search
|
177
|
+
@change=${(e: Event) => {
|
178
|
+
this.search = (e.currentTarget as any)?.value
|
179
|
+
}}
|
180
|
+
></ox-input-search>
|
164
181
|
<div>
|
165
182
|
<label for="group">Group</label>
|
166
183
|
<select
|
@@ -233,7 +250,7 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
233
250
|
}
|
234
251
|
|
235
252
|
async updated(changed: PropertyValues<this>) {
|
236
|
-
if (changed.has('group') || changed.has('inherited')) {
|
253
|
+
if (changed.has('group') || changed.has('inherited') || changed.has('search')) {
|
237
254
|
this.refreshBoards()
|
238
255
|
}
|
239
256
|
}
|
@@ -294,12 +311,29 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
294
311
|
page
|
295
312
|
}
|
296
313
|
|
297
|
-
if (this.group)
|
314
|
+
if (this.group) {
|
298
315
|
filters.push({
|
299
316
|
name: 'groupId',
|
300
317
|
operator: 'eq',
|
301
318
|
value: this.group
|
302
319
|
})
|
320
|
+
}
|
321
|
+
|
322
|
+
if (this.search) {
|
323
|
+
const value = `%${this.search.trim()}%`
|
324
|
+
|
325
|
+
filters.push({
|
326
|
+
name: 'name',
|
327
|
+
operator: 'search',
|
328
|
+
value: this.search
|
329
|
+
})
|
330
|
+
|
331
|
+
filters.push({
|
332
|
+
name: 'description',
|
333
|
+
operator: 'search',
|
334
|
+
value: this.search
|
335
|
+
})
|
336
|
+
}
|
303
337
|
|
304
338
|
var variables = {
|
305
339
|
filters,
|
@@ -310,7 +344,6 @@ export class BoardSelector extends InfiniteScrollable(localize(i18next)(LitEleme
|
|
310
344
|
|
311
345
|
var boardListResponse = await client.query({
|
312
346
|
query: FETCH_BOARD_LIST_GQL,
|
313
|
-
context: gqlContext(),
|
314
347
|
variables
|
315
348
|
})
|
316
349
|
|