@operato/data-grist 10.29.73 → 10.29.76

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.
Files changed (165) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/src/data-card/record-card.js +1 -1
  3. package/dist/src/data-card/record-card.js.map +1 -1
  4. package/dist/src/data-grid/data-grid-field.js +18 -0
  5. package/dist/src/data-grid/data-grid-field.js.map +1 -1
  6. package/dist/src/data-list/data-list-field.js +4 -1
  7. package/dist/src/data-list/data-list-field.js.map +1 -1
  8. package/dist/src/data-list/record-partial.js +15 -1
  9. package/dist/src/data-list/record-partial.js.map +1 -1
  10. package/dist/src/filters/filter-checkbox.js +1 -1
  11. package/dist/src/filters/filter-checkbox.js.map +1 -1
  12. package/dist/src/filters/filter-input-barcode.js +1 -1
  13. package/dist/src/filters/filter-input-barcode.js.map +1 -1
  14. package/dist/src/filters/filter-input.js +1 -1
  15. package/dist/src/filters/filter-input.js.map +1 -1
  16. package/dist/src/filters/filter-range-date.js +1 -1
  17. package/dist/src/filters/filter-range-date.js.map +1 -1
  18. package/dist/src/filters/filter-range-number.js +1 -1
  19. package/dist/src/filters/filter-range-number.js.map +1 -1
  20. package/dist/src/filters/filter-select-buttons.js +1 -1
  21. package/dist/src/filters/filter-select-buttons.js.map +1 -1
  22. package/dist/src/gutters/gutter-button.js +6 -1
  23. package/dist/src/gutters/gutter-button.js.map +1 -1
  24. package/dist/src/types.d.ts +1 -1
  25. package/dist/src/types.js.map +1 -1
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +9 -9
  28. package/test/cell-button-row-height.test.ts +63 -0
  29. package/test/group-heading.test.ts +23 -0
  30. package/test/office-density.test.ts +57 -0
  31. package/dist/test/accessible-name.test.d.ts +0 -2
  32. package/dist/test/accessible-name.test.js +0 -324
  33. package/dist/test/accessible-name.test.js.map +0 -1
  34. package/dist/test/accumulator-labels.test.d.ts +0 -1
  35. package/dist/test/accumulator-labels.test.js +0 -32
  36. package/dist/test/accumulator-labels.test.js.map +0 -1
  37. package/dist/test/address-intents.test.d.ts +0 -1
  38. package/dist/test/address-intents.test.js +0 -201
  39. package/dist/test/address-intents.test.js.map +0 -1
  40. package/dist/test/card-selector.test.d.ts +0 -1
  41. package/dist/test/card-selector.test.js +0 -58
  42. package/dist/test/card-selector.test.js.map +0 -1
  43. package/dist/test/card-thumb.test.d.ts +0 -1
  44. package/dist/test/card-thumb.test.js +0 -44
  45. package/dist/test/card-thumb.test.js.map +0 -1
  46. package/dist/test/card-totals-narrow.test.d.ts +0 -1
  47. package/dist/test/card-totals-narrow.test.js +0 -103
  48. package/dist/test/card-totals-narrow.test.js.map +0 -1
  49. package/dist/test/column-resize.test.d.ts +0 -1
  50. package/dist/test/column-resize.test.js +0 -153
  51. package/dist/test/column-resize.test.js.map +0 -1
  52. package/dist/test/control-heights.test.d.ts +0 -1
  53. package/dist/test/control-heights.test.js +0 -25
  54. package/dist/test/control-heights.test.js.map +0 -1
  55. package/dist/test/count-handler.test.d.ts +0 -1
  56. package/dist/test/count-handler.test.js +0 -56
  57. package/dist/test/count-handler.test.js.map +0 -1
  58. package/dist/test/create-paste-policy.test.d.ts +0 -1
  59. package/dist/test/create-paste-policy.test.js +0 -159
  60. package/dist/test/create-paste-policy.test.js.map +0 -1
  61. package/dist/test/data-integrity.test.d.ts +0 -1
  62. package/dist/test/data-integrity.test.js +0 -145
  63. package/dist/test/data-integrity.test.js.map +0 -1
  64. package/dist/test/destructive-actions.test.d.ts +0 -11
  65. package/dist/test/destructive-actions.test.js +0 -147
  66. package/dist/test/destructive-actions.test.js.map +0 -1
  67. package/dist/test/edit-lifecycle.test.d.ts +0 -2
  68. package/dist/test/edit-lifecycle.test.js +0 -270
  69. package/dist/test/edit-lifecycle.test.js.map +0 -1
  70. package/dist/test/edit-rebase.test.d.ts +0 -1
  71. package/dist/test/edit-rebase.test.js +0 -185
  72. package/dist/test/edit-rebase.test.js.map +0 -1
  73. package/dist/test/editor-commit.test.d.ts +0 -2
  74. package/dist/test/editor-commit.test.js +0 -68
  75. package/dist/test/editor-commit.test.js.map +0 -1
  76. package/dist/test/fetch-failure-state.test.d.ts +0 -1
  77. package/dist/test/fetch-failure-state.test.js +0 -129
  78. package/dist/test/fetch-failure-state.test.js.map +0 -1
  79. package/dist/test/field-contains-content.test.d.ts +0 -1
  80. package/dist/test/field-contains-content.test.js +0 -101
  81. package/dist/test/field-contains-content.test.js.map +0 -1
  82. package/dist/test/field-hint.test.d.ts +0 -2
  83. package/dist/test/field-hint.test.js +0 -54
  84. package/dist/test/field-hint.test.js.map +0 -1
  85. package/dist/test/filter-labels.test.d.ts +0 -2
  86. package/dist/test/filter-labels.test.js +0 -140
  87. package/dist/test/filter-labels.test.js.map +0 -1
  88. package/dist/test/filter-ownership.test.d.ts +0 -1
  89. package/dist/test/filter-ownership.test.js +0 -83
  90. package/dist/test/filter-ownership.test.js.map +0 -1
  91. package/dist/test/filter-select-buttons-count.test.d.ts +0 -1
  92. package/dist/test/filter-select-buttons-count.test.js +0 -35
  93. package/dist/test/filter-select-buttons-count.test.js.map +0 -1
  94. package/dist/test/filter-typing.test.d.ts +0 -2
  95. package/dist/test/filter-typing.test.js +0 -66
  96. package/dist/test/filter-typing.test.js.map +0 -1
  97. package/dist/test/filters-phone-wrap.test.d.ts +0 -1
  98. package/dist/test/filters-phone-wrap.test.js +0 -17
  99. package/dist/test/filters-phone-wrap.test.js.map +0 -1
  100. package/dist/test/first-click-stays.test.d.ts +0 -1
  101. package/dist/test/first-click-stays.test.js +0 -77
  102. package/dist/test/first-click-stays.test.js.map +0 -1
  103. package/dist/test/fixed-column-opaque.test.d.ts +0 -1
  104. package/dist/test/fixed-column-opaque.test.js +0 -134
  105. package/dist/test/fixed-column-opaque.test.js.map +0 -1
  106. package/dist/test/flexible-columns.test.d.ts +0 -1
  107. package/dist/test/flexible-columns.test.js +0 -134
  108. package/dist/test/flexible-columns.test.js.map +0 -1
  109. package/dist/test/grid-single-scroller.test.d.ts +0 -1
  110. package/dist/test/grid-single-scroller.test.js +0 -107
  111. package/dist/test/grid-single-scroller.test.js.map +0 -1
  112. package/dist/test/group-heading.test.d.ts +0 -1
  113. package/dist/test/group-heading.test.js +0 -187
  114. package/dist/test/group-heading.test.js.map +0 -1
  115. package/dist/test/latest-fetch-wins.test.d.ts +0 -1
  116. package/dist/test/latest-fetch-wins.test.js +0 -91
  117. package/dist/test/latest-fetch-wins.test.js.map +0 -1
  118. package/dist/test/list-defaults.test.d.ts +0 -2
  119. package/dist/test/list-defaults.test.js +0 -145
  120. package/dist/test/list-defaults.test.js.map +0 -1
  121. package/dist/test/list-records.test.d.ts +0 -1
  122. package/dist/test/list-records.test.js +0 -46
  123. package/dist/test/list-records.test.js.map +0 -1
  124. package/dist/test/page-errors.d.ts +0 -1
  125. package/dist/test/page-errors.js +0 -44
  126. package/dist/test/page-errors.js.map +0 -1
  127. package/dist/test/paste-integrity.test.d.ts +0 -1
  128. package/dist/test/paste-integrity.test.js +0 -163
  129. package/dist/test/paste-integrity.test.js.map +0 -1
  130. package/dist/test/record-card-height.test.d.ts +0 -1
  131. package/dist/test/record-card-height.test.js +0 -15
  132. package/dist/test/record-card-height.test.js.map +0 -1
  133. package/dist/test/record-view-popup-editor.test.d.ts +0 -1
  134. package/dist/test/record-view-popup-editor.test.js +0 -71
  135. package/dist/test/record-view-popup-editor.test.js.map +0 -1
  136. package/dist/test/renderer-date-calendar-day.test.d.ts +0 -1
  137. package/dist/test/renderer-date-calendar-day.test.js +0 -48
  138. package/dist/test/renderer-date-calendar-day.test.js.map +0 -1
  139. package/dist/test/request-generation.test.d.ts +0 -1
  140. package/dist/test/request-generation.test.js +0 -153
  141. package/dist/test/request-generation.test.js.map +0 -1
  142. package/dist/test/resubmit.test.d.ts +0 -1
  143. package/dist/test/resubmit.test.js +0 -83
  144. package/dist/test/resubmit.test.js.map +0 -1
  145. package/dist/test/row-hover-visible.test.d.ts +0 -1
  146. package/dist/test/row-hover-visible.test.js +0 -139
  147. package/dist/test/row-hover-visible.test.js.map +0 -1
  148. package/dist/test/search-term.test.d.ts +0 -1
  149. package/dist/test/search-term.test.js +0 -108
  150. package/dist/test/search-term.test.js.map +0 -1
  151. package/dist/test/searchable-select.test.d.ts +0 -1
  152. package/dist/test/searchable-select.test.js +0 -65
  153. package/dist/test/searchable-select.test.js.map +0 -1
  154. package/dist/test/select-empty-value.test.d.ts +0 -1
  155. package/dist/test/select-empty-value.test.js +0 -61
  156. package/dist/test/select-empty-value.test.js.map +0 -1
  157. package/dist/test/shift-range-select.test.d.ts +0 -1
  158. package/dist/test/shift-range-select.test.js +0 -100
  159. package/dist/test/shift-range-select.test.js.map +0 -1
  160. package/dist/test/sparkline-renderer.test.d.ts +0 -1
  161. package/dist/test/sparkline-renderer.test.js +0 -36
  162. package/dist/test/sparkline-renderer.test.js.map +0 -1
  163. package/dist/test/wheel-one-scroller.test.d.ts +0 -2
  164. package/dist/test/wheel-one-scroller.test.js +0 -275
  165. package/dist/test/wheel-one-scroller.test.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/data-grist",
3
- "version": "10.29.73",
3
+ "version": "10.29.76",
4
4
  "description": "User interface for grid (desktop) and list (mobile)",
5
5
  "author": "heartyoh",
6
6
  "type": "module",
@@ -82,15 +82,15 @@
82
82
  "@material/web": "^2.0.0",
83
83
  "@operato/headroom": "^10.29.1",
84
84
  "@operato/i18n": "^10.29.27",
85
- "@operato/input": "^10.29.73",
86
- "@operato/layout": "^10.29.73",
87
- "@operato/list-state": "^10.29.71",
88
- "@operato/p13n": "^10.29.72",
89
- "@operato/popup": "^10.29.72",
85
+ "@operato/input": "^10.29.76",
86
+ "@operato/layout": "^10.29.76",
87
+ "@operato/list-state": "^10.29.76",
88
+ "@operato/p13n": "^10.29.76",
89
+ "@operato/popup": "^10.29.76",
90
90
  "@operato/pull-to-refresh": "^10.29.23",
91
- "@operato/styles": "^10.29.71",
91
+ "@operato/styles": "^10.29.76",
92
92
  "@operato/time-calculator": "^10.29.1",
93
- "@operato/utils": "^10.29.71",
93
+ "@operato/utils": "^10.29.76",
94
94
  "i18next": "^24.2.1",
95
95
  "json5": "^2.2.0",
96
96
  "lit": "^3.1.2",
@@ -129,5 +129,5 @@
129
129
  "prettier --write"
130
130
  ]
131
131
  },
132
- "gitHead": "958a43105ddde23103172b1b87a5610bf29b79bf"
132
+ "gitHead": "08d33aec6fbe7c55cbb8e5018781a8500c792d4d"
133
133
  }
@@ -0,0 +1,63 @@
1
+ import { expect, fixture } from '@open-wc/testing'
2
+ import { html } from 'lit'
3
+
4
+ import '../src/data-grist.js'
5
+ import { DataGrist } from '../src/data-grist.js'
6
+ import { failOnPageErrors } from './page-errors.js'
7
+
8
+ /*
9
+ * A button a renderer returns in a grid cell never raises the row. The fields take the page's button look
10
+ * (ButtonStyles, 2026-11-06), and with it the page's 32px action height: the scenario list's 「발행」 button
11
+ * (a plain <button> styled inline) made every row taller than a text row (2026-11-09).
12
+ */
13
+
14
+ const records = [
15
+ { id: '1', what: 'teams-meetings' },
16
+ { id: '2', what: 'm365' }
17
+ ]
18
+
19
+ const idle = async (el: DataGrist) => {
20
+ while (!((await el.updateComplete) && (await el.grist.updateComplete)));
21
+ }
22
+
23
+ const rowHeight = async (act?: (value: any) => unknown) => {
24
+ const config = {
25
+ columns: [
26
+ { type: 'string', name: 'what', header: 'What' },
27
+ ...(act ? [{ type: 'string', name: 'act', header: '', width: 100, record: { editable: false, align: 'center', renderer: act } }] : [])
28
+ ],
29
+ rows: { appendable: false, editable: false, selectable: false }
30
+ }
31
+ const el = await fixture<DataGrist>(
32
+ html`<ox-grist style="display:flex;width:700px;height:400px" mode="GRID" .config=${config} .data=${{ records }}></ox-grist>`
33
+ )
34
+ await idle(el)
35
+ const root = (el.grist.renderRoot.querySelector('ox-grid-body') as any).renderRoot as ShadowRoot
36
+ const cell = Array.from(root.querySelectorAll('ox-grid-field')).find((one: any) => one.column?.name === 'what') as HTMLElement
37
+ return cell.getBoundingClientRect().height
38
+ }
39
+
40
+ describe('a button a renderer returns in a grid cell', () => {
41
+ failOnPageErrors()
42
+
43
+ const buttons: Record<string, () => unknown> = {
44
+ /* the scenario list's release button, as it is written there */
45
+ 'a plain button styled inline': () =>
46
+ html`<button
47
+ style="cursor:pointer;display:inline-flex;align-items:center;gap:3px;font:inherit;font-size:11px;border:none;border-radius:999px;padding:2px 11px;"
48
+ >
49
+ <md-icon style="font-size:15px;">publish</md-icon>Release
50
+ </button>`,
51
+ 'a plain button': () => html`<button>Open</button>`,
52
+ 'a quiet small button': () => html`<button quiet small>Open</button>`,
53
+ 'an icon-only button': () => html`<button icon-only><md-icon>open_in_new</md-icon></button>`
54
+ }
55
+
56
+ for (const [name, renderer] of Object.entries(buttons)) {
57
+ it(`keeps the row as high as a text row (${name})`, async () => {
58
+ const text = await rowHeight()
59
+ const withButton = await rowHeight(renderer)
60
+ expect(withButton, `a text row is ${text}px`).to.equal(text)
61
+ })
62
+ }
63
+ })
@@ -219,3 +219,26 @@ describe('an empty text detail on a card', () => {
219
219
  expect(summaryOf(cards[1]).getBoundingClientRect().width).to.be.above(0)
220
220
  })
221
221
  })
222
+
223
+ describe('a gutter button with its title', () => {
224
+ failOnPageErrors()
225
+
226
+ it("keeps the gutter's small filled look - the page button look is for a renderer's button", async () => {
227
+ const acting = {
228
+ ...config([]),
229
+ columns: [
230
+ { type: 'gutter', gutterName: 'button', icon: 'play_arrow', title: 'Start', iconOnly: false, width: 72 },
231
+ { type: 'string', name: 'what', header: 'What' }
232
+ ]
233
+ }
234
+ const el = await fixture<DataGrist>(html`<ox-grist style="display:flex;width:700px;height:400px" mode="GRID" .config=${acting} .data=${{ records }}></ox-grist>`)
235
+ await idle(el)
236
+ const root = (el.grist.renderRoot.querySelector('ox-grid-body') as any).renderRoot as ShadowRoot
237
+ const field = (Array.from(root.querySelectorAll('ox-grid-field')) as any[]).find(one => one.column?.gutterName === 'button')
238
+ const button = field.renderRoot.querySelector('button') as HTMLElement
239
+ const look = getComputedStyle(button)
240
+ expect(look.fontWeight, 'not the page button weight').to.not.equal('600')
241
+ expect(look.fontSize, "the gutter's 0.8rem").to.equal(`${0.8 * parseFloat(getComputedStyle(document.documentElement).fontSize)}px`)
242
+ expect(look.borderTopWidth, 'no page button border').to.equal('0px')
243
+ })
244
+ })
@@ -0,0 +1,57 @@
1
+ import { expect, fixture, html } from '@open-wc/testing'
2
+ import { setViewport } from '@web/test-runner-commands'
3
+ import '../src/data-grist.js'
4
+ import type { DataGrist } from '../src/data-grist.js'
5
+
6
+ const idle = async (el: DataGrist) => {
7
+ while (!((await el.updateComplete) && (await el.grist.updateComplete)));
8
+ await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)))
9
+ }
10
+
11
+ const rows = [{ id: 'one', title: '첫 업무', description: '긴 업무 설명을 충분한 너비로 읽을 수 있어야 합니다.' }]
12
+ const config = (button: boolean) => ({
13
+ columns: [
14
+ ...(button ? [{ type: 'gutter', gutterName: 'button', icon: 'edit', title: '상세', forList: true }] : []),
15
+ { type: 'string', name: 'title', header: '제목', width: 'minmax(220px, 1fr)' },
16
+ { type: 'string', name: 'description', header: '설명', width: 220 },
17
+ ...(button ? [{ type: 'string', name: 'action', header: '', width: 40, record: { renderer: () => html`<button class="icon" aria-label="열기">↗</button>` } }] : [])
18
+ ],
19
+ rows: { appendable: false, editable: false, selectable: false },
20
+ list: { fields: ['title'], details: ['description'] }
21
+ })
22
+
23
+ async function make(mode: string, button: boolean) {
24
+ const el = await fixture<DataGrist>(html`<ox-grist style="width:100%;height:240px;--grid-record-padding:4px 8px;--spacing-medium:8px;--spacing-small:4px;--spacing-tiny:2px;--cell-action-height:26px" .mode=${mode} .config=${config(button)} .data=${{records: rows}}></ox-grist>`)
25
+ await idle(el)
26
+ return el
27
+ }
28
+
29
+ describe('Office density regression', () => {
30
+ afterEach(async () => setViewport({ width: 800, height: 600 }))
31
+
32
+ it('an action gutter does not enlarge the grid row on desktop or phone', async () => {
33
+ for (const width of [1440, 375]) {
34
+ await setViewport({ width, height: 812 })
35
+ const plain = await make('GRID', false)
36
+ const action = await make('GRID', true)
37
+ const field = (el: DataGrist) => (el.grist.renderRoot.querySelector('ox-grid-body') as any).renderRoot.querySelector('ox-grid-field') as HTMLElement
38
+ expect(field(action).getBoundingClientRect().height).to.equal(field(plain).getBoundingClientRect().height)
39
+ expect(field(action).getBoundingClientRect().height).to.be.at.most(32)
40
+ const body = action.grist.renderRoot.querySelector('ox-grid-body') as any
41
+ const buttonCell = Array.from(body.renderRoot.querySelectorAll('ox-grid-field')).find((cell: any) => cell.renderRoot.querySelector('button.icon')) as any
42
+ expect(buttonCell.renderRoot.querySelector('button.icon').getBoundingClientRect().height).to.equal(26)
43
+ }
44
+ })
45
+
46
+ it('a phone list gives its text a full line and puts actions below it', async () => {
47
+ await setViewport({ width: 375, height: 812 })
48
+ const el = await make('LIST', true)
49
+ const row = el.grist.renderRoot.querySelector('ox-record-partial') as any
50
+ await row.updateComplete
51
+ const content = row.renderRoot.querySelector('[content]') as HTMLElement
52
+ const action = row.renderRoot.querySelector('ox-list-gutter') as HTMLElement
53
+ expect(content.getBoundingClientRect().width).to.be.above(320)
54
+ expect(action.getBoundingClientRect().top).to.be.at.least(content.getBoundingClientRect().bottom)
55
+ expect(row.scrollWidth).to.be.at.most(row.clientWidth)
56
+ })
57
+ })
@@ -1,2 +0,0 @@
1
- import '../src/data-grid/data-grid.js';
2
- import '../src/data-grid/data-grid-body.js';
@@ -1,324 +0,0 @@
1
- import { expect, fixture } from '@open-wc/testing';
2
- import { html } from 'lit';
3
- import '../src/data-grid/data-grid.js';
4
- import '../src/data-grid/data-grid-body.js';
5
- import { buildColumn } from '../src/configure/column-builder.js';
6
- import { columnText } from '../src/utils/column-text.js';
7
- import { ZERO_CONFIG, ZERO_DATA } from '../src/configure/zero-config.js';
8
- /**
9
- * Accessible names on the inputs inside the grid.
10
- *
11
- * ## Why this is tested
12
- *
13
- * Several inputs here had no name: the row-select checkboxes, the header filter boxes, and the IME
14
- * buffer that holds focus. Position carries the meaning for a sighted reader — a narrow leftmost
15
- * column means row select, a box under a header name filters that column — but position is a
16
- * picture, not a relationship, so nothing of it reaches a screen reader.
17
- *
18
- * ## What has to hold
19
- *
20
- * The name has one source. Editing `header` must change what is announced, which means callers
21
- * cannot spell the name out again. `columnText()` is that source.
22
- *
23
- * `buildColumn` turns a string header into `() => header`, and that function returns a lit template
24
- * the name cannot be read back out of. The name was disappearing right there.
25
- */
26
- describe('column name has one source', () => {
27
- it('keeps the plain text after a string header becomes a function', () => {
28
- const column = buildColumn({ type: 'string', name: 'palletId', header: '파렛트 번호' });
29
- expect(columnText(column)).to.equal('파렛트 번호');
30
- });
31
- it('keeps it when the string arrives as header.renderer', () => {
32
- const column = buildColumn({ type: 'string', name: 'palletId', header: { renderer: '파렛트 번호' } });
33
- expect(columnText(column)).to.equal('파렛트 번호');
34
- });
35
- it('lets label: true inherit the header name', () => {
36
- const column = buildColumn({ type: 'string', name: 'palletId', header: '파렛트 번호', label: true });
37
- expect(columnText(column)).to.equal('파렛트 번호');
38
- });
39
- it('falls back to column.name when the header is drawn by a function', () => {
40
- const column = buildColumn({ type: 'string', name: 'palletId', header: { renderer: () => html `<i>x</i>` } });
41
- expect(columnText(column)).to.equal('palletId');
42
- });
43
- it('invents no name when there is no column', () => {
44
- expect(columnText(undefined)).to.equal('');
45
- expect(columnText(null)).to.equal('');
46
- });
47
- });
48
- describe('row-select boxes are named', () => {
49
- const columns = [
50
- { type: 'gutter', gutterName: 'row-selector', name: '__selected__', multiple: true },
51
- { type: 'string', name: 'palletId', header: '파렛트 번호' }
52
- ].map(buildColumn);
53
- it('says which row each checkbox selects', async () => {
54
- const body = await fixture(html `
55
- <ox-grid-body
56
- .config=${{ ...ZERO_CONFIG, columns }}
57
- .columns=${columns}
58
- .data=${{ ...ZERO_DATA, records: [{ palletId: 'P-0001' }, { palletId: 'P-0002' }] }}
59
- ></ox-grid-body>
60
- `);
61
- await body.updateComplete;
62
- /* The checkboxes live one shadow root deeper, inside each ox-grid-field. */
63
- const fields = Array.from(body.renderRoot.querySelectorAll('ox-grid-field'));
64
- await Promise.all(fields.map(field => field.updateComplete));
65
- const boxes = fields.flatMap(field => { var _a; return Array.from(((_a = field.renderRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('input[type=checkbox], input[type=radio]')) || []); });
66
- expect(boxes.length, 'found no row-select box').to.be.greaterThan(0);
67
- boxes.forEach(box => expect(box.getAttribute('aria-label'), 'an unnamed checkbox is left').to.be.a('string').and.not.equal(''));
68
- });
69
- });
70
- describe('IME buffer names the cell it stands in for', () => {
71
- const columns = [
72
- { type: 'string', name: 'palletId', header: '파렛트 번호' },
73
- { type: 'string', name: 'location', header: '보관 위치' }
74
- ].map(buildColumn);
75
- async function bodyFocusedAt(column) {
76
- const body = await fixture(html `
77
- <ox-grid-body
78
- .config=${{ ...ZERO_CONFIG, columns }}
79
- .columns=${columns}
80
- .data=${{ ...ZERO_DATA, records: [{ palletId: 'P-0001', location: 'A-01' }] }}
81
- .focused=${{ row: 0, column }}
82
- ></ox-grid-body>
83
- `);
84
- await body.updateComplete;
85
- return body.renderRoot.querySelector('#ime-buffer');
86
- }
87
- it('reads the first column while focus sits there', async () => {
88
- expect((await bodyFocusedAt(0)).getAttribute('aria-label')).to.contain('파렛트 번호');
89
- });
90
- it('changes what it reads when focus moves a column over', async () => {
91
- expect((await bodyFocusedAt(1)).getAttribute('aria-label')).to.contain('보관 위치');
92
- });
93
- it('stays visible to assistive tech — it is where focus lands', async () => {
94
- expect((await bodyFocusedAt(0)).getAttribute('aria-hidden')).to.be.null;
95
- });
96
- });
97
- /**
98
- * Table semantics.
99
- *
100
- * ## Why this is tested
101
- *
102
- * The grid is drawn with CSS grid: cells sit flat and there is no row element. Rows are a picture
103
- * made of equal offsetTop, so a screen reader saw a pile of inputs rather than a table — no "this
104
- * is a table", no "row 3 column 3", no "40 rows in all".
105
- *
106
- * Adding row wrappers can break two things at once:
107
- *
108
- * ```
109
- * semantics grid / row / columnheader / gridcell have to nest correctly
110
- * layout display: contents must generate no box; if it does, the columns collapse
111
- * ```
112
- *
113
- * The second one is why geometry is asserted: cells in a row must step right, and rows must step
114
- * down.
115
- */
116
- describe('grid declares itself a grid', () => {
117
- /* ox-grid takes already-compiled columns; compiling them is ox-grist's job. */
118
- const columns = [
119
- { type: 'gutter', gutterName: 'row-selector', name: '__selected__', multiple: true },
120
- { type: 'string', name: 'palletId', header: '파렛트 번호', sortable: true },
121
- { type: 'string', name: 'location', header: '보관 위치', sortable: true }
122
- ].map(buildColumn);
123
- async function grid(overrides = {}) {
124
- const el = await fixture(html `
125
- <ox-grid
126
- aria-label="입고 대기 목록"
127
- .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
128
- .data=${{
129
- page: 1,
130
- limit: 20,
131
- total: 40,
132
- records: [
133
- { palletId: 'P-0001', location: 'A-01' },
134
- { palletId: 'P-0002', location: 'A-02' }
135
- ],
136
- ...overrides
137
- }}
138
- ></ox-grid>
139
- `);
140
- await el.updateComplete;
141
- const header = el.renderRoot.querySelector('ox-grid-header');
142
- const body = el.renderRoot.querySelector('ox-grid-body');
143
- await (header === null || header === void 0 ? void 0 : header.updateComplete);
144
- await (body === null || body === void 0 ? void 0 : body.updateComplete);
145
- return { el, header, body };
146
- }
147
- it('nests grid, row and cell', async () => {
148
- const { el, header, body } = await grid();
149
- const grid_ = el.renderRoot.querySelector('[role=grid]');
150
- expect(grid_, 'no role=grid').to.exist;
151
- expect(header.getAttribute('role')).to.equal('rowgroup');
152
- expect(body.getAttribute('role')).to.equal('rowgroup');
153
- expect(header.renderRoot.querySelectorAll('[role=row]').length).to.equal(1);
154
- expect(body.renderRoot.querySelectorAll('[role=row]').length).to.equal(2);
155
- expect(header.renderRoot.querySelectorAll('[role=columnheader]').length).to.equal(3);
156
- });
157
- it('counts the whole table, not the page on screen', async () => {
158
- const { el } = await grid();
159
- const grid_ = el.renderRoot.querySelector('[role=grid]');
160
- /* One header row plus 40 records. Two rows drawn is still a 40-row table. */
161
- expect(grid_.getAttribute('aria-rowcount')).to.equal('41');
162
- expect(grid_.getAttribute('aria-colcount')).to.equal('3');
163
- expect(grid_.getAttribute('aria-label')).to.equal('입고 대기 목록');
164
- });
165
- it('numbers page 2 from row 22, not back at 1', async () => {
166
- const { body } = await grid({ page: 2 });
167
- const rows = Array.from(body.renderRoot.querySelectorAll('[role=row]'));
168
- /* One header row plus 20 records on page 1. */
169
- expect(rows[0].getAttribute('aria-rowindex')).to.equal('22');
170
- expect(rows[1].getAttribute('aria-rowindex')).to.equal('23');
171
- });
172
- it('numbers columns and leaves the width filler uncounted', async () => {
173
- const { body } = await grid();
174
- const row = body.renderRoot.querySelector('[role=row]');
175
- const cells = Array.from(row.querySelectorAll('[role=gridcell]'));
176
- expect(cells.map(cell => cell.getAttribute('aria-colindex'))).to.deep.equal(['1', '2', '3']);
177
- expect(row.querySelectorAll('[role=presentation]').length, 'the filler was counted as a cell').to.equal(1);
178
- });
179
- it('states sort direction in text, not only as an arrow', async () => {
180
- const el = await fixture(html `
181
- <ox-grid
182
- .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
183
- .sorters=${[{ name: 'palletId', desc: true }]}
184
- .data=${{ records: [{ palletId: 'P-0001', location: 'A-01' }] }}
185
- ></ox-grid>
186
- `);
187
- await el.updateComplete;
188
- const header = el.renderRoot.querySelector('ox-grid-header');
189
- await header.updateComplete;
190
- const headers = Array.from(header.renderRoot.querySelectorAll('[role=columnheader]'));
191
- const sorts = headers.map(cell => cell.getAttribute('aria-sort'));
192
- /* A gutter cannot be sorted; claiming otherwise announces a control that is not there. */
193
- expect(sorts[0]).to.be.null;
194
- expect(sorts[1], 'sorted descending').to.equal('descending');
195
- expect(sorts[2], 'sortable but not currently sorted').to.equal('none');
196
- });
197
- it('keeps the layout — a row wrapper that generates a box collapses the grid', async () => {
198
- const { body } = await grid();
199
- const rows = Array.from(body.renderRoot.querySelectorAll('[role=row]'));
200
- const first = Array.from(rows[0].children);
201
- expect(getComputedStyle(rows[0]).display).to.equal('contents');
202
- /* Cells step right; stacked at one x means the columns are gone. */
203
- const lefts = first.map(cell => cell.offsetLeft);
204
- expect(new Set(lefts).size, 'cells stacked at the same x').to.be.greaterThan(1);
205
- lefts.slice(1).forEach((left, index) => expect(left).to.be.greaterThan(lefts[index]));
206
- /* Rows step down. */
207
- const firstTop = rows[0].children[0].offsetTop;
208
- const secondTop = rows[1].children[0].offsetTop;
209
- expect(secondTop, 'two rows at the same y').to.be.greaterThan(firstTop);
210
- });
211
- });
212
- /**
213
- * Grouped headers.
214
- *
215
- * The header becomes two rows and ungrouped columns span both (`.span-both`). Placement runs
216
- * through CSS `grid-row` / `grid-column`, which makes this the riskiest spot for a row wrapper.
217
- */
218
- describe('grouped header spans two rows', () => {
219
- const columns = [
220
- { type: 'string', name: 'palletId', header: '파렛트 번호' },
221
- { type: 'string', name: 'width', header: { renderer: '폭', group: '치수' } },
222
- { type: 'string', name: 'height', header: { renderer: '높이', group: '치수' } }
223
- ].map(buildColumn);
224
- async function grouped() {
225
- const el = await fixture(html `
226
- <ox-grid
227
- .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
228
- .data=${{ total: 1, records: [{ palletId: 'P-0001', width: '1200', height: '900' }] }}
229
- ></ox-grid>
230
- `);
231
- await el.updateComplete;
232
- const header = el.renderRoot.querySelector('ox-grid-header');
233
- const body = el.renderRoot.querySelector('ox-grid-body');
234
- await header.updateComplete;
235
- await body.updateComplete;
236
- return { el, header, body };
237
- }
238
- it('counts two header rows so the body starts at row 3', async () => {
239
- const { el, header, body } = await grouped();
240
- expect(header.renderRoot.querySelectorAll('[role=row]').length).to.equal(2);
241
- /* Two header rows plus one record. */
242
- expect(el.renderRoot.querySelector('[role=grid]').getAttribute('aria-rowcount')).to.equal('3');
243
- const rows = Array.from(body.renderRoot.querySelectorAll('[role=row]'));
244
- expect(rows[0].getAttribute('aria-rowindex')).to.equal('3');
245
- });
246
- it('says how many columns a group covers', async () => {
247
- const { header } = await grouped();
248
- const cells = Array.from(header.renderRoot.querySelectorAll('[role=columnheader]'));
249
- const first = cells[0];
250
- const group = cells.find(cell => cell.getAttribute('aria-colspan'));
251
- /* An ungrouped column spans both header rows. */
252
- expect(first.getAttribute('aria-rowspan')).to.equal('2');
253
- expect(first.getAttribute('aria-colindex')).to.equal('1');
254
- /* The group header covers columns 2 and 3. */
255
- expect(group, 'found no group header').to.exist;
256
- expect(group.getAttribute('aria-colindex')).to.equal('2');
257
- expect(group.getAttribute('aria-colspan')).to.equal('2');
258
- });
259
- it('keeps two-row header placement — group sits above its leaf columns', async () => {
260
- const { header } = await grouped();
261
- const cells = Array.from(header.renderRoot.querySelectorAll('[role=columnheader]'));
262
- const group = cells.find(cell => cell.getAttribute('aria-colspan'));
263
- const leaf = cells.find(cell => !cell.getAttribute('aria-colspan') && cell !== cells[0]);
264
- expect(leaf.offsetTop, 'group header and its leaf column at the same height').to.be.greaterThan(group.offsetTop);
265
- expect(group.offsetWidth, 'group header does not cover two columns').to.be.greaterThan(leaf.offsetWidth);
266
- });
267
- });
268
- /**
269
- * The grid wrapper must not disturb the surrounding layout.
270
- *
271
- * `role=grid` admits only rows, so the settings-button slot and the pager moved outside the
272
- * wrapper. Two things then depend on this structure:
273
- *
274
- * ```
275
- * column layout the host is a flex column. The wrapper is itself a flex column (it is the one
276
- * scroller that header and body share), so the body still takes the height
277
- * left under the header
278
- * sibling selector "show the settings button on header hover" is an adjacent-sibling rule, so
279
- * the button has to sit directly after the wrapper
280
- * ```
281
- */
282
- describe('grid wrapper stays out of the layout', () => {
283
- const columns = [
284
- { type: 'string', name: 'palletId', header: '파렛트 번호' },
285
- { type: 'string', name: 'location', header: '보관 위치' }
286
- ].map(buildColumn);
287
- it('places the settings button after the grid, not inside it', async () => {
288
- const el = await fixture(html `
289
- <ox-grid
290
- .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
291
- .data=${{ total: 1, records: [{ palletId: 'P-0001', location: 'A-01' }] }}
292
- ></ox-grid>
293
- `);
294
- await el.updateComplete;
295
- const grid = el.renderRoot.querySelector('[role=grid]');
296
- const setting = el.renderRoot.querySelector('div[setting]');
297
- expect(setting, 'no settings slot').to.exist;
298
- expect(grid.contains(setting), 'settings button inside the grid breaks table reading').to.be.false;
299
- expect(grid.nextElementSibling, 'adjacent-sibling rule no longer holds').to.equal(setting);
300
- });
301
- it('lays header and body out as a column that fills the host', async () => {
302
- const el = await fixture(html `
303
- <div style="height: 300px; display: flex">
304
- <ox-grid
305
- style="flex: 1"
306
- .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}
307
- .data=${{ total: 1, records: [{ palletId: 'P-0001', location: 'A-01' }] }}
308
- ></ox-grid>
309
- </div>
310
- `);
311
- const grid = el.querySelector('ox-grid');
312
- await grid.updateComplete;
313
- const wrapper = grid.renderRoot.querySelector('[role=grid]');
314
- const header = grid.renderRoot.querySelector('ox-grid-header');
315
- const body = grid.renderRoot.querySelector('ox-grid-body');
316
- expect(getComputedStyle(wrapper).display).to.equal('flex');
317
- expect(getComputedStyle(wrapper).flexDirection).to.equal('column');
318
- /* The body takes the remaining height; a wrapper with a box shrinks it to header height. */
319
- expect(body.offsetHeight, 'body does not take the remaining height').to.be.greaterThan(100);
320
- expect(body.offsetTop, 'body is not below the header').to.be.greaterThan(0);
321
- expect(header.offsetTop).to.equal(0);
322
- });
323
- });
324
- //# sourceMappingURL=accessible-name.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accessible-name.test.js","sourceRoot":"","sources":["../../test/accessible-name.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE1B,OAAO,+BAA+B,CAAA;AACtC,OAAO,oCAAoC,CAAA;AAC3C,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,SAAS,EAAE,8BAA8B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;QAC3E,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACtC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { expect, fixture } from '@open-wc/testing'\nimport { html } from 'lit'\n\nimport '../src/data-grid/data-grid.js'\nimport '../src/data-grid/data-grid-body.js'\nimport { buildColumn } from '../src/configure/column-builder.js'\nimport { columnText } from '../src/utils/column-text.js'\nimport { ZERO_CONFIG, ZERO_DATA } from '../src/configure/zero-config.js'\n\n/**\n * Accessible names on the inputs inside the grid.\n *\n * ## Why this is tested\n *\n * Several inputs here had no name: the row-select checkboxes, the header filter boxes, and the IME\n * buffer that holds focus. Position carries the meaning for a sighted reader — a narrow leftmost\n * column means row select, a box under a header name filters that column — but position is a\n * picture, not a relationship, so nothing of it reaches a screen reader.\n *\n * ## What has to hold\n *\n * The name has one source. Editing `header` must change what is announced, which means callers\n * cannot spell the name out again. `columnText()` is that source.\n *\n * `buildColumn` turns a string header into `() => header`, and that function returns a lit template\n * the name cannot be read back out of. The name was disappearing right there.\n */\n\ndescribe('column name has one source', () => {\n it('keeps the plain text after a string header becomes a function', () => {\n const column = buildColumn({ type: 'string', name: 'palletId', header: '파렛트 번호' })\n\n expect(columnText(column)).to.equal('파렛트 번호')\n })\n\n it('keeps it when the string arrives as header.renderer', () => {\n const column = buildColumn({ type: 'string', name: 'palletId', header: { renderer: '파렛트 번호' } })\n\n expect(columnText(column)).to.equal('파렛트 번호')\n })\n\n it('lets label: true inherit the header name', () => {\n const column = buildColumn({ type: 'string', name: 'palletId', header: '파렛트 번호', label: true })\n\n expect(columnText(column)).to.equal('파렛트 번호')\n })\n\n it('falls back to column.name when the header is drawn by a function', () => {\n const column = buildColumn({ type: 'string', name: 'palletId', header: { renderer: () => html`<i>x</i>` } })\n\n expect(columnText(column)).to.equal('palletId')\n })\n\n it('invents no name when there is no column', () => {\n expect(columnText(undefined)).to.equal('')\n expect(columnText(null)).to.equal('')\n })\n})\n\ndescribe('row-select boxes are named', () => {\n const columns = [\n { type: 'gutter', gutterName: 'row-selector', name: '__selected__', multiple: true },\n { type: 'string', name: 'palletId', header: '파렛트 번호' }\n ].map(buildColumn)\n\n it('says which row each checkbox selects', async () => {\n const body: any = await fixture(html`\n <ox-grid-body\n .config=${{ ...ZERO_CONFIG, columns }}\n .columns=${columns}\n .data=${{ ...ZERO_DATA, records: [{ palletId: 'P-0001' }, { palletId: 'P-0002' }] }}\n ></ox-grid-body>\n `)\n\n await body.updateComplete\n\n /* The checkboxes live one shadow root deeper, inside each ox-grid-field. */\n const fields = Array.from(body.renderRoot.querySelectorAll('ox-grid-field')) as any[]\n\n await Promise.all(fields.map(field => field.updateComplete))\n\n const boxes = fields.flatMap(field =>\n Array.from(field.renderRoot?.querySelectorAll('input[type=checkbox], input[type=radio]') || [])\n ) as HTMLInputElement[]\n\n expect(boxes.length, 'found no row-select box').to.be.greaterThan(0)\n boxes.forEach(box =>\n expect(box.getAttribute('aria-label'), 'an unnamed checkbox is left').to.be.a('string').and.not.equal('')\n )\n })\n})\n\ndescribe('IME buffer names the cell it stands in for', () => {\n const columns = [\n { type: 'string', name: 'palletId', header: '파렛트 번호' },\n { type: 'string', name: 'location', header: '보관 위치' }\n ].map(buildColumn)\n\n async function bodyFocusedAt(column: number) {\n const body: any = await fixture(html`\n <ox-grid-body\n .config=${{ ...ZERO_CONFIG, columns }}\n .columns=${columns}\n .data=${{ ...ZERO_DATA, records: [{ palletId: 'P-0001', location: 'A-01' }] }}\n .focused=${{ row: 0, column }}\n ></ox-grid-body>\n `)\n\n await body.updateComplete\n\n return body.renderRoot.querySelector('#ime-buffer') as HTMLInputElement\n }\n\n it('reads the first column while focus sits there', async () => {\n expect((await bodyFocusedAt(0)).getAttribute('aria-label')).to.contain('파렛트 번호')\n })\n\n it('changes what it reads when focus moves a column over', async () => {\n expect((await bodyFocusedAt(1)).getAttribute('aria-label')).to.contain('보관 위치')\n })\n\n it('stays visible to assistive tech — it is where focus lands', async () => {\n expect((await bodyFocusedAt(0)).getAttribute('aria-hidden')).to.be.null\n })\n})\n\n/**\n * Table semantics.\n *\n * ## Why this is tested\n *\n * The grid is drawn with CSS grid: cells sit flat and there is no row element. Rows are a picture\n * made of equal offsetTop, so a screen reader saw a pile of inputs rather than a table — no \"this\n * is a table\", no \"row 3 column 3\", no \"40 rows in all\".\n *\n * Adding row wrappers can break two things at once:\n *\n * ```\n * semantics grid / row / columnheader / gridcell have to nest correctly\n * layout display: contents must generate no box; if it does, the columns collapse\n * ```\n *\n * The second one is why geometry is asserted: cells in a row must step right, and rows must step\n * down.\n */\ndescribe('grid declares itself a grid', () => {\n /* ox-grid takes already-compiled columns; compiling them is ox-grist's job. */\n const columns = [\n { type: 'gutter', gutterName: 'row-selector', name: '__selected__', multiple: true },\n { type: 'string', name: 'palletId', header: '파렛트 번호', sortable: true },\n { type: 'string', name: 'location', header: '보관 위치', sortable: true }\n ].map(buildColumn)\n\n async function grid(overrides: any = {}) {\n const el: any = await fixture(html`\n <ox-grid\n aria-label=\"입고 대기 목록\"\n .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}\n .data=${{\n page: 1,\n limit: 20,\n total: 40,\n records: [\n { palletId: 'P-0001', location: 'A-01' },\n { palletId: 'P-0002', location: 'A-02' }\n ],\n ...overrides\n }}\n ></ox-grid>\n `)\n\n await el.updateComplete\n\n const header = el.renderRoot.querySelector('ox-grid-header')\n const body = el.renderRoot.querySelector('ox-grid-body')\n\n await header?.updateComplete\n await body?.updateComplete\n\n return { el, header, body }\n }\n\n it('nests grid, row and cell', async () => {\n const { el, header, body } = await grid()\n\n const grid_ = el.renderRoot.querySelector('[role=grid]')\n\n expect(grid_, 'no role=grid').to.exist\n expect(header.getAttribute('role')).to.equal('rowgroup')\n expect(body.getAttribute('role')).to.equal('rowgroup')\n\n expect(header.renderRoot.querySelectorAll('[role=row]').length).to.equal(1)\n expect(body.renderRoot.querySelectorAll('[role=row]').length).to.equal(2)\n expect(header.renderRoot.querySelectorAll('[role=columnheader]').length).to.equal(3)\n })\n\n it('counts the whole table, not the page on screen', async () => {\n const { el } = await grid()\n\n const grid_ = el.renderRoot.querySelector('[role=grid]')\n\n /* One header row plus 40 records. Two rows drawn is still a 40-row table. */\n expect(grid_.getAttribute('aria-rowcount')).to.equal('41')\n expect(grid_.getAttribute('aria-colcount')).to.equal('3')\n expect(grid_.getAttribute('aria-label')).to.equal('입고 대기 목록')\n })\n\n it('numbers page 2 from row 22, not back at 1', async () => {\n const { body } = await grid({ page: 2 })\n\n const rows = Array.from(body.renderRoot.querySelectorAll('[role=row]')) as HTMLElement[]\n\n /* One header row plus 20 records on page 1. */\n expect(rows[0].getAttribute('aria-rowindex')).to.equal('22')\n expect(rows[1].getAttribute('aria-rowindex')).to.equal('23')\n })\n\n it('numbers columns and leaves the width filler uncounted', async () => {\n const { body } = await grid()\n\n const row = body.renderRoot.querySelector('[role=row]') as HTMLElement\n const cells = Array.from(row.querySelectorAll('[role=gridcell]')) as HTMLElement[]\n\n expect(cells.map(cell => cell.getAttribute('aria-colindex'))).to.deep.equal(['1', '2', '3'])\n expect(row.querySelectorAll('[role=presentation]').length, 'the filler was counted as a cell').to.equal(1)\n })\n\n it('states sort direction in text, not only as an arrow', async () => {\n const el: any = await fixture(html`\n <ox-grid\n .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}\n .sorters=${[{ name: 'palletId', desc: true }]}\n .data=${{ records: [{ palletId: 'P-0001', location: 'A-01' }] }}\n ></ox-grid>\n `)\n\n await el.updateComplete\n\n const header = el.renderRoot.querySelector('ox-grid-header')\n await header.updateComplete\n\n const headers = Array.from(header.renderRoot.querySelectorAll('[role=columnheader]')) as HTMLElement[]\n const sorts = headers.map(cell => cell.getAttribute('aria-sort'))\n\n /* A gutter cannot be sorted; claiming otherwise announces a control that is not there. */\n expect(sorts[0]).to.be.null\n expect(sorts[1], 'sorted descending').to.equal('descending')\n expect(sorts[2], 'sortable but not currently sorted').to.equal('none')\n })\n\n it('keeps the layout — a row wrapper that generates a box collapses the grid', async () => {\n const { body } = await grid()\n\n const rows = Array.from(body.renderRoot.querySelectorAll('[role=row]')) as HTMLElement[]\n const first = Array.from(rows[0].children) as HTMLElement[]\n\n expect(getComputedStyle(rows[0]).display).to.equal('contents')\n\n /* Cells step right; stacked at one x means the columns are gone. */\n const lefts = first.map(cell => cell.offsetLeft)\n expect(new Set(lefts).size, 'cells stacked at the same x').to.be.greaterThan(1)\n lefts.slice(1).forEach((left, index) => expect(left).to.be.greaterThan(lefts[index]))\n\n /* Rows step down. */\n const firstTop = (rows[0].children[0] as HTMLElement).offsetTop\n const secondTop = (rows[1].children[0] as HTMLElement).offsetTop\n expect(secondTop, 'two rows at the same y').to.be.greaterThan(firstTop)\n })\n})\n\n/**\n * Grouped headers.\n *\n * The header becomes two rows and ungrouped columns span both (`.span-both`). Placement runs\n * through CSS `grid-row` / `grid-column`, which makes this the riskiest spot for a row wrapper.\n */\ndescribe('grouped header spans two rows', () => {\n const columns = [\n { type: 'string', name: 'palletId', header: '파렛트 번호' },\n { type: 'string', name: 'width', header: { renderer: '폭', group: '치수' } },\n { type: 'string', name: 'height', header: { renderer: '높이', group: '치수' } }\n ].map(buildColumn)\n\n async function grouped() {\n const el: any = await fixture(html`\n <ox-grid\n .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}\n .data=${{ total: 1, records: [{ palletId: 'P-0001', width: '1200', height: '900' }] }}\n ></ox-grid>\n `)\n\n await el.updateComplete\n\n const header = el.renderRoot.querySelector('ox-grid-header')\n const body = el.renderRoot.querySelector('ox-grid-body')\n\n await header.updateComplete\n await body.updateComplete\n\n return { el, header, body }\n }\n\n it('counts two header rows so the body starts at row 3', async () => {\n const { el, header, body } = await grouped()\n\n expect(header.renderRoot.querySelectorAll('[role=row]').length).to.equal(2)\n\n /* Two header rows plus one record. */\n expect(el.renderRoot.querySelector('[role=grid]').getAttribute('aria-rowcount')).to.equal('3')\n\n const rows = Array.from(body.renderRoot.querySelectorAll('[role=row]')) as HTMLElement[]\n expect(rows[0].getAttribute('aria-rowindex')).to.equal('3')\n })\n\n it('says how many columns a group covers', async () => {\n const { header } = await grouped()\n\n const cells = Array.from(header.renderRoot.querySelectorAll('[role=columnheader]')) as HTMLElement[]\n const first = cells[0]\n const group = cells.find(cell => cell.getAttribute('aria-colspan'))\n\n /* An ungrouped column spans both header rows. */\n expect(first.getAttribute('aria-rowspan')).to.equal('2')\n expect(first.getAttribute('aria-colindex')).to.equal('1')\n\n /* The group header covers columns 2 and 3. */\n expect(group, 'found no group header').to.exist\n expect(group!.getAttribute('aria-colindex')).to.equal('2')\n expect(group!.getAttribute('aria-colspan')).to.equal('2')\n })\n\n it('keeps two-row header placement — group sits above its leaf columns', async () => {\n const { header } = await grouped()\n\n const cells = Array.from(header.renderRoot.querySelectorAll('[role=columnheader]')) as HTMLElement[]\n const group = cells.find(cell => cell.getAttribute('aria-colspan'))!\n const leaf = cells.find(cell => !cell.getAttribute('aria-colspan') && cell !== cells[0])!\n\n expect(leaf.offsetTop, 'group header and its leaf column at the same height').to.be.greaterThan(group.offsetTop)\n expect(group.offsetWidth, 'group header does not cover two columns').to.be.greaterThan(leaf.offsetWidth)\n })\n})\n\n/**\n * The grid wrapper must not disturb the surrounding layout.\n *\n * `role=grid` admits only rows, so the settings-button slot and the pager moved outside the\n * wrapper. Two things then depend on this structure:\n *\n * ```\n * column layout the host is a flex column. The wrapper is itself a flex column (it is the one\n * scroller that header and body share), so the body still takes the height\n * left under the header\n * sibling selector \"show the settings button on header hover\" is an adjacent-sibling rule, so\n * the button has to sit directly after the wrapper\n * ```\n */\ndescribe('grid wrapper stays out of the layout', () => {\n const columns = [\n { type: 'string', name: 'palletId', header: '파렛트 번호' },\n { type: 'string', name: 'location', header: '보관 위치' }\n ].map(buildColumn)\n\n it('places the settings button after the grid, not inside it', async () => {\n const el: any = await fixture(html`\n <ox-grid\n .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}\n .data=${{ total: 1, records: [{ palletId: 'P-0001', location: 'A-01' }] }}\n ></ox-grid>\n `)\n\n await el.updateComplete\n\n const grid = el.renderRoot.querySelector('[role=grid]') as HTMLElement\n const setting = el.renderRoot.querySelector('div[setting]') as HTMLElement\n\n expect(setting, 'no settings slot').to.exist\n expect(grid.contains(setting), 'settings button inside the grid breaks table reading').to.be.false\n expect(grid.nextElementSibling, 'adjacent-sibling rule no longer holds').to.equal(setting)\n })\n\n it('lays header and body out as a column that fills the host', async () => {\n const el: any = await fixture(html`\n <div style=\"height: 300px; display: flex\">\n <ox-grid\n style=\"flex: 1\"\n .config=${{ ...ZERO_CONFIG, columns, rows: { ...ZERO_CONFIG.rows } }}\n .data=${{ total: 1, records: [{ palletId: 'P-0001', location: 'A-01' }] }}\n ></ox-grid>\n </div>\n `)\n\n const grid = el.querySelector('ox-grid') as any\n await grid.updateComplete\n\n const wrapper = grid.renderRoot.querySelector('[role=grid]') as HTMLElement\n const header = grid.renderRoot.querySelector('ox-grid-header') as HTMLElement\n const body = grid.renderRoot.querySelector('ox-grid-body') as HTMLElement\n\n expect(getComputedStyle(wrapper).display).to.equal('flex')\n expect(getComputedStyle(wrapper).flexDirection).to.equal('column')\n\n /* The body takes the remaining height; a wrapper with a box shrinks it to header height. */\n expect(body.offsetHeight, 'body does not take the remaining height').to.be.greaterThan(100)\n expect(body.offsetTop, 'body is not below the header').to.be.greaterThan(0)\n expect(header.offsetTop).to.equal(0)\n })\n})\n"]}
@@ -1 +0,0 @@
1
- export {};
@@ -1,32 +0,0 @@
1
- import { expect } from '@open-wc/testing';
2
- /**
3
- * The summary row tags a column with its accumulator's name - `label.accumulator_${type}`.
4
- *
5
- * max and min were swapped in all five locales: a column summed with `max` (Math.max) was tagged
6
- * "min" / 「최소」. The words are written out here per locale, so a swap in any one of them fails.
7
- */
8
- const EXPECTED = {
9
- en: { max: 'max', min: 'min' },
10
- ko: { max: '최대', min: '최소' },
11
- ja: { max: '最大', min: '最小' },
12
- zh: { max: '最大', min: '最小' },
13
- ms: { max: 'Maksimum', min: 'Minimum' }
14
- };
15
- async function translations(locale) {
16
- const response = await fetch(new URL(`../../translations/${locale}.json`, import.meta.url));
17
- expect(response.ok, `${locale}.json is served`).to.equal(true);
18
- return response.json();
19
- }
20
- describe('accumulator labels', () => {
21
- for (const [locale, words] of Object.entries(EXPECTED)) {
22
- it(`${locale}: max is the largest, min the smallest`, async () => {
23
- const t = await translations(locale);
24
- expect(t['label.accumulator_max']).to.equal(words.max);
25
- expect(t['label.accumulator_min']).to.equal(words.min);
26
- });
27
- }
28
- it('ko: count is 개수', async () => {
29
- expect((await translations('ko'))['label.accumulator_count']).to.equal('개수');
30
- });
31
- });
32
- //# sourceMappingURL=accumulator-labels.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accumulator-labels.test.js","sourceRoot":"","sources":["../../test/accumulator-labels.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC;;;;;GAKG;AAEH,MAAM,QAAQ,GAAiD;IAC7D,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE;IAC9B,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE;IAC5B,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE;IAC5B,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE;IAC5B,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE;CACxC,CAAA;AAED,KAAK,UAAU,YAAY,CAAC,MAAc;IACxC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,GAAG,CAAC,sBAAsB,MAAM,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IAC3F,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,MAAM,iBAAiB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC9D,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAA;AACxB,CAAC;AAED,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvD,EAAE,CAAC,GAAG,MAAM,wCAAwC,EAAE,KAAK,IAAI,EAAE;YAC/D,MAAM,CAAC,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,CAAA;YACpC,MAAM,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACtD,MAAM,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACxD,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,EAAE,CAAC,iBAAiB,EAAE,KAAK,IAAI,EAAE;QAC/B,MAAM,CAAC,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC9E,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { expect } from '@open-wc/testing'\n\n/**\n * The summary row tags a column with its accumulator's name - `label.accumulator_${type}`.\n *\n * max and min were swapped in all five locales: a column summed with `max` (Math.max) was tagged\n * \"min\" / 「최소」. The words are written out here per locale, so a swap in any one of them fails.\n */\n\nconst EXPECTED: Record<string, { max: string; min: string }> = {\n en: { max: 'max', min: 'min' },\n ko: { max: '최대', min: '최소' },\n ja: { max: '最大', min: '最小' },\n zh: { max: '最大', min: '最小' },\n ms: { max: 'Maksimum', min: 'Minimum' }\n}\n\nasync function translations(locale: string): Promise<Record<string, string>> {\n const response = await fetch(new URL(`../../translations/${locale}.json`, import.meta.url))\n expect(response.ok, `${locale}.json is served`).to.equal(true)\n return response.json()\n}\n\ndescribe('accumulator labels', () => {\n for (const [locale, words] of Object.entries(EXPECTED)) {\n it(`${locale}: max is the largest, min the smallest`, async () => {\n const t = await translations(locale)\n expect(t['label.accumulator_max']).to.equal(words.max)\n expect(t['label.accumulator_min']).to.equal(words.min)\n })\n }\n\n it('ko: count is 개수', async () => {\n expect((await translations('ko'))['label.accumulator_count']).to.equal('개수')\n })\n})\n"]}
@@ -1 +0,0 @@
1
- import '../src/data-grist.js';