@operato/data-grist 10.29.30 → 10.29.31
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 +9 -0
- package/coverage/lcov-report/index.html +40 -40
- package/coverage/lcov-report/webpack/bootstrap.html +1 -1
- package/coverage/lcov-report/webpack/index.html +1 -1
- package/coverage/lcov-report/webpack/runtime/define property getters.html +1 -1
- package/coverage/lcov-report/webpack/runtime/global.html +1 -1
- package/coverage/lcov-report/webpack/runtime/hasOwnProperty shorthand.html +1 -1
- package/coverage/lcov-report/webpack/runtime/index.html +1 -1
- package/coverage/lcov-report/webpack/runtime/make namespace object.html +1 -1
- package/coverage/lcov.info +5503 -5487
- package/dist/src/filters/filter-checkbox.js +1 -1
- package/dist/src/filters/filter-checkbox.js.map +1 -1
- package/dist/src/filters/filters-form.js +1 -1
- package/dist/src/filters/filters-form.js.map +1 -1
- package/dist/test/filter-labels.test.js +28 -0
- package/dist/test/filter-labels.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/test/filter-labels.test.ts +31 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/data-grist",
|
|
3
|
-
"version": "10.29.
|
|
3
|
+
"version": "10.29.31",
|
|
4
4
|
"description": "User interface for grid (desktop) and list (mobile)",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"type": "module",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"prettier --write"
|
|
121
121
|
]
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "0b1246851e25dae823d204c352757c93585f6612"
|
|
124
124
|
}
|
|
@@ -65,4 +65,35 @@ describe('필터 라벨', () => {
|
|
|
65
65
|
expect(label!.querySelector('span')?.textContent?.trim()).to.equal(name)
|
|
66
66
|
}
|
|
67
67
|
})
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
* A header may draw more than its words - a help `?` beside them. The filter is not the header: it names the column
|
|
71
|
+
* by its words, or a press on that `?` would also tick the checkbox around it.
|
|
72
|
+
*/
|
|
73
|
+
it('names a filter by the header words when the header draws more', async () => {
|
|
74
|
+
const drawn = [
|
|
75
|
+
{ type: 'checkbox', name: 'flag', header: { text: 'flag', renderer: () => html`flag <button class="extra">?</button>` }, filter: true },
|
|
76
|
+
{ type: 'select', name: 'kind', header: { text: 'kind', renderer: () => html`kind <button class="extra">?</button>` }, record: { options: ['', 'A'] }, filter: true }
|
|
77
|
+
]
|
|
78
|
+
const el = (await fixture(html`
|
|
79
|
+
<ox-grist
|
|
80
|
+
style="height: 300px"
|
|
81
|
+
mode="GRID"
|
|
82
|
+
.config=${{ columns: drawn, pagination: { pages: [20] } }}
|
|
83
|
+
.fetchHandler=${async () => ({ page: 1, limit: 20, total: 0, records: [] })}
|
|
84
|
+
>
|
|
85
|
+
<div slot="headroom"><ox-filters-form without-search></ox-filters-form></div>
|
|
86
|
+
</ox-grist>
|
|
87
|
+
`)) as any
|
|
88
|
+
await settle()
|
|
89
|
+
|
|
90
|
+
const form = el.querySelector('ox-filters-form') as any
|
|
91
|
+
await form.updateComplete
|
|
92
|
+
const root = form.renderRoot as ShadowRoot
|
|
93
|
+
const deep = (node: ParentNode): boolean =>
|
|
94
|
+
Array.from(node.querySelectorAll('*')).some(one => one.matches('button.extra') || (!!one.shadowRoot && deep(one.shadowRoot)))
|
|
95
|
+
expect(deep(root), 'the header drawing is not in the filter form').to.equal(false)
|
|
96
|
+
expect(root.textContent).to.contain('flag')
|
|
97
|
+
expect(root.textContent).to.contain('kind')
|
|
98
|
+
})
|
|
68
99
|
})
|