@operato/data-grist 10.8.1 → 10.9.0

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 (40) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/src/data-card/data-card.d.ts +6 -0
  3. package/dist/src/data-card/data-card.js +12 -3
  4. package/dist/src/data-card/data-card.js.map +1 -1
  5. package/dist/src/data-grid/data-grid-body.d.ts +7 -0
  6. package/dist/src/data-grid/data-grid-body.js +15 -0
  7. package/dist/src/data-grid/data-grid-body.js.map +1 -1
  8. package/dist/src/data-grid/data-grid-field.d.ts +21 -0
  9. package/dist/src/data-grid/data-grid-field.js +311 -4
  10. package/dist/src/data-grid/data-grid-field.js.map +1 -1
  11. package/dist/src/data-grid/data-grid-header.js +16 -28
  12. package/dist/src/data-grid/data-grid-header.js.map +1 -1
  13. package/dist/src/data-grid/data-grid.d.ts +6 -0
  14. package/dist/src/data-grid/data-grid.js +9 -18
  15. package/dist/src/data-grid/data-grid.js.map +1 -1
  16. package/dist/src/data-grist.d.ts +25 -0
  17. package/dist/src/data-grist.js +74 -2
  18. package/dist/src/data-grist.js.map +1 -1
  19. package/dist/src/data-list/data-list.d.ts +6 -0
  20. package/dist/src/data-list/data-list.js +12 -3
  21. package/dist/src/data-list/data-list.js.map +1 -1
  22. package/dist/src/editors/ox-grist-editor-json5.d.ts +1 -0
  23. package/dist/src/editors/ox-grist-editor-json5.js +2 -0
  24. package/dist/src/editors/ox-grist-editor-json5.js.map +1 -1
  25. package/dist/src/editors/ox-grist-editor.d.ts +14 -0
  26. package/dist/src/editors/ox-grist-editor.js +36 -0
  27. package/dist/src/editors/ox-grist-editor.js.map +1 -1
  28. package/dist/src/editors/registry.d.ts +10 -0
  29. package/dist/src/editors/registry.js +16 -0
  30. package/dist/src/editors/registry.js.map +1 -1
  31. package/dist/test/row-hover-visible.test.js +26 -14
  32. package/dist/test/row-hover-visible.test.js.map +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +6 -6
  35. package/test/row-hover-visible.test.ts +30 -14
  36. package/translations/en.json +12 -10
  37. package/translations/ja.json +11 -9
  38. package/translations/ko.json +12 -10
  39. package/translations/ms.json +11 -9
  40. package/translations/zh.json +11 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/data-grist",
3
- "version": "10.8.1",
3
+ "version": "10.9.0",
4
4
  "description": "User interface for grid (desktop) and list (mobile)",
5
5
  "author": "heartyoh",
6
6
  "type": "module",
@@ -69,11 +69,11 @@
69
69
  "dependencies": {
70
70
  "@material/web": "^2.0.0",
71
71
  "@operato/headroom": "^10.0.0",
72
- "@operato/input": "^10.8.1",
73
- "@operato/p13n": "^10.8.1",
74
- "@operato/popup": "^10.8.1",
72
+ "@operato/input": "^10.9.0",
73
+ "@operato/p13n": "^10.9.0",
74
+ "@operato/popup": "^10.9.0",
75
75
  "@operato/pull-to-refresh": "^10.0.0",
76
- "@operato/styles": "^10.8.1",
76
+ "@operato/styles": "^10.9.0",
77
77
  "@operato/time-calculator": "^10.0.0",
78
78
  "@operato/utils": "^10.7.0",
79
79
  "i18next": "^24.2.1",
@@ -114,5 +114,5 @@
114
114
  "prettier --write"
115
115
  ]
116
116
  },
117
- "gitHead": "fab8f4d2205af38c407507213746ccca0210efa5"
117
+ "gitHead": "5282356a0fbf7601a1bd023cf65ba5dc60986337"
118
118
  }
@@ -1,5 +1,4 @@
1
- import { expect, fixture } from '@open-wc/testing'
2
- import { html } from 'lit'
1
+ import { expect } from '@open-wc/testing'
3
2
 
4
3
  import { DataGrist } from '../src/data-grist.js'
5
4
  import { DataGrid } from '../src/data-grid/data-grid.js'
@@ -72,15 +71,32 @@ const 대비 = (a: string, b: string) => {
72
71
  return (x + 0.05) / (y + 0.05)
73
72
  }
74
73
 
75
- /** 그 팔레트에서 선언값이 실제로 무슨 색이 되는지 — 브라우저에게 계산시킨다. */
76
- async function 칠해보다(값: string, 팔레트: { 줄: string; 잉크: string; 사다리: string }) {
77
- const probe = (await fixture(html`
78
- <div
79
- style="${팔레트.사다리} --grid-record-background-color:${팔레트.줄}; --grid-record-color:${팔레트.잉크}; background-color:${값};"
80
- ></div>
81
- `)) as HTMLElement
74
+ /**
75
+ * 팔레트에서 선언값이 실제로 무슨 색이 되는지 브라우저에게 계산시킨다.
76
+ *
77
+ * ── 기다리지 않는다 (2026-09-05) ──────────────────────────────────────────
78
+ * 전에는 fixture() 로 세우고 await 했다. 잴 것은 div 하나의 계산된 색뿐이라 렌더링을 기다릴
79
+ * 이유가 없는데, 그 await 가 mocha 의 2초 문턱에 걸려 **기계가 바쁠 때만 붉어졌다** —
80
+ * 빌드와 웹팩이 함께 돌던 동안 어두운 팔레트 두 건이 시간초과로 넘어갔고, 혼자 돌리면 초록이었다.
81
+ * 색 판정은 한 번도 실패한 적이 없다.
82
+ *
83
+ * 붙이고 재고 떼는 것으로 충분하다. 기다림이 없으니 부하와 무관하게 같은 답이 나온다.
84
+ */
85
+ function 칠해보다(값: string, 팔레트: { 줄: string; 잉크: string; 사다리: string }) {
86
+ const probe = document.createElement('div')
82
87
 
83
- return getComputedStyle(probe).backgroundColor
88
+ probe.setAttribute(
89
+ 'style',
90
+ `${팔레트.사다리} --grid-record-background-color:${팔레트.줄}; --grid-record-color:${팔레트.잉크}; background-color:${값};`
91
+ )
92
+
93
+ document.body.appendChild(probe)
94
+
95
+ try {
96
+ return getComputedStyle(probe).backgroundColor
97
+ } finally {
98
+ probe.remove()
99
+ }
84
100
  }
85
101
 
86
102
  /**
@@ -120,8 +136,8 @@ describe('마우스가 지나는 줄이 보인다', () => {
120
136
  })
121
137
 
122
138
  Object.entries(팔레트들).forEach(([이름, 팔레트]) => {
123
- it(`${이름} 팔레트에서 줄과 띠가 갈린다`, async () => {
124
- const 띠 = await 칠해보다(값!, 팔레트)
139
+ it(`${이름} 팔레트에서 줄과 띠가 갈린다`, () => {
140
+ const 띠 = 칠해보다(값!, 팔레트)
125
141
  const 벌어짐 = 대비(띠, 팔레트.줄)
126
142
 
127
143
  expect(
@@ -130,8 +146,8 @@ describe('마우스가 지나는 줄이 보인다', () => {
130
146
  ).to.be.greaterThan(최소분리)
131
147
  })
132
148
 
133
- it(`${이름} 팔레트에서 띠가 줄을 덮지 않는다 — 옅어야 한다`, async () => {
134
- const 띠 = await 칠해보다(값!, 팔레트)
149
+ it(`${이름} 팔레트에서 띠가 줄을 덮지 않는다 — 옅어야 한다`, () => {
150
+ const 띠 = 칠해보다(값!, 팔레트)
135
151
 
136
152
  expect(대비(띠, 팔레트.줄), '고른 줄과 같은 무게가 되면 무엇이 골라졌는지 흐려진다').to.be.lessThan(1.6)
137
153
  })
@@ -1,20 +1,22 @@
1
1
  {
2
- "button.save": "save",
3
2
  "button.delete": "delete",
4
- "label.accumulator_sum": "sum",
3
+ "button.save": "save",
5
4
  "label.accumulator_avg": "avg",
6
5
  "label.accumulator_count": "cnt",
7
6
  "label.accumulator_max": "min",
8
7
  "label.accumulator_min": "max",
9
- "text.validation-reason.MANDATORY": "mandatory",
10
- "text.validation-reason.FORMAT": "invalid format",
11
- "text.validation-reason.RANGE": "out of range",
12
- "text.validation-reason.UNIQUE": "duplicate value",
8
+ "label.accumulator_sum": "sum",
9
+ "text.grid-clear-search": "clear the search or filters to see everything",
10
+ "text.grid-no-records": "nothing to show",
11
+ "text.grid-nothing-found": "nothing found",
12
+ "text.grid-open-editor": "press to edit",
13
+ "text.grid-total-records": "{total} in total",
14
+ "text.input-secret-hide": "hide",
13
15
  "text.input-secret-placeholder": "enter secret information",
14
16
  "text.input-secret-show": "show",
15
- "text.input-secret-hide": "hide",
16
17
  "text.input-secret-toggle": "show/hide",
17
- "text.grid-no-records": "nothing to show",
18
- "text.grid-total-records": "{total} in total",
19
- "text.grid-column-editable": "editable"
18
+ "text.validation-reason.FORMAT": "invalid format",
19
+ "text.validation-reason.MANDATORY": "mandatory",
20
+ "text.validation-reason.RANGE": "out of range",
21
+ "text.validation-reason.UNIQUE": "duplicate value"
20
22
  }
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "button.delete": "削除",
3
3
  "button.save": "保存",
4
- "label.accumulator_sum": "合計",
5
4
  "label.accumulator_avg": "平均",
6
5
  "label.accumulator_count": "カウント",
7
6
  "label.accumulator_max": "最小",
8
7
  "label.accumulator_min": "最大",
9
- "text.validation-reason.MANDATORY": "必須",
10
- "text.validation-reason.FORMAT": "形式が正しくありません",
11
- "text.validation-reason.RANGE": "範囲外",
12
- "text.validation-reason.UNIQUE": "重複",
8
+ "label.accumulator_sum": "合計",
9
+ "text.grid-clear-search": "検索語やフィルターを消すと全体が表示されます",
10
+ "text.grid-no-records": "まだ何もありません",
11
+ "text.grid-nothing-found": "見つかりませんでした",
12
+ "text.grid-open-editor": "押して編集します",
13
+ "text.grid-total-records": "全 {total} 件",
14
+ "text.input-secret-hide": "非表示",
13
15
  "text.input-secret-placeholder": "機密情報を入力",
14
16
  "text.input-secret-show": "表示",
15
- "text.input-secret-hide": "非表示",
16
17
  "text.input-secret-toggle": "表示/非表示",
17
- "text.grid-no-records": "該当するものがありません",
18
- "text.grid-total-records": "全 {total} 件",
19
- "text.grid-column-editable": "編集できる列"
18
+ "text.validation-reason.FORMAT": "形式が正しくありません",
19
+ "text.validation-reason.MANDATORY": "必須",
20
+ "text.validation-reason.RANGE": "範囲外",
21
+ "text.validation-reason.UNIQUE": "重複"
20
22
  }
@@ -1,21 +1,23 @@
1
1
  {
2
2
  "button.delete": "삭제",
3
3
  "button.save": "저장",
4
- "label.accumulator_sum": "합계",
5
4
  "label.accumulator_avg": "평균",
6
5
  "label.accumulator_count": "계수",
7
6
  "label.accumulator_max": "최소",
8
7
  "label.accumulator_min": "최대",
9
- "text.validation-reason.MANDATORY": "필수 입력 항목입니다.",
10
- "text.validation-reason.FORMAT": "잘못된 형식입니다.",
11
- "text.validation-reason.RANGE": "범위를 벗어났습니다.",
12
- "text.validation-reason.UNIQUE": "중복된 값입니다.",
8
+ "label.accumulator_sum": "합계",
9
+ "label.filter": "필터",
10
+ "text.grid-clear-search": "검색어나 필터를 지우면 전체가 보입니다",
11
+ "text.grid-no-records": "아직 아무것도 없습니다",
12
+ "text.grid-nothing-found": "찾는 것이 없습니다",
13
+ "text.grid-open-editor": "눌러서 고칩니다",
14
+ "text.grid-total-records": "모두 {total}건",
15
+ "text.input-secret-hide": "숨기기",
13
16
  "text.input-secret-placeholder": "보안 정보 입력",
14
17
  "text.input-secret-show": "보기",
15
- "text.input-secret-hide": "숨기기",
16
18
  "text.input-secret-toggle": "보기/숨기기",
17
- "label.filter": "필터",
18
- "text.grid-no-records": "해당하는 것이 없습니다",
19
- "text.grid-total-records": "모두 {total}건",
20
- "text.grid-column-editable": "고칠 수 있는 칸"
19
+ "text.validation-reason.FORMAT": "잘못된 형식입니다.",
20
+ "text.validation-reason.MANDATORY": "필수 입력 항목입니다.",
21
+ "text.validation-reason.RANGE": "범위를 벗어났습니다.",
22
+ "text.validation-reason.UNIQUE": "중복된 값입니다."
21
23
  }
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "button.delete": "padam",
3
3
  "button.save": "simpan",
4
- "label.accumulator_sum": "Jumlah",
5
4
  "label.accumulator_avg": "Purata",
6
5
  "label.accumulator_count": "Kiraan",
7
6
  "label.accumulator_max": "Minimum",
8
7
  "label.accumulator_min": "Maksimum",
9
- "text.validation-reason.MANDATORY": "wajib",
10
- "text.validation-reason.FORMAT": "format tidak sah",
11
- "text.validation-reason.RANGE": "diluar jangka",
12
- "text.validation-reason.UNIQUE": "nilai duplikat",
8
+ "label.accumulator_sum": "Jumlah",
9
+ "text.grid-clear-search": "kosongkan carian atau penapis untuk melihat semua",
10
+ "text.grid-no-records": "tiada apa-apa untuk dipaparkan",
11
+ "text.grid-nothing-found": "tiada apa-apa dijumpai",
12
+ "text.grid-open-editor": "tekan untuk mengedit",
13
+ "text.grid-total-records": "{total} kesemuanya",
14
+ "text.input-secret-hide": "Sembunyi",
13
15
  "text.input-secret-placeholder": "Masukkan maklumat rahsia",
14
16
  "text.input-secret-show": "Tunjuk",
15
- "text.input-secret-hide": "Sembunyi",
16
17
  "text.input-secret-toggle": "Tunjuk/Sembunyi",
17
- "text.grid-no-records": "tiada apa-apa untuk dipaparkan",
18
- "text.grid-total-records": "{total} kesemuanya",
19
- "text.grid-column-editable": "boleh diedit"
18
+ "text.validation-reason.FORMAT": "format tidak sah",
19
+ "text.validation-reason.MANDATORY": "wajib",
20
+ "text.validation-reason.RANGE": "diluar jangka",
21
+ "text.validation-reason.UNIQUE": "nilai duplikat"
20
22
  }
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "button.delete": "删除",
3
3
  "button.save": "保存",
4
- "label.accumulator_sum": "总和",
5
4
  "label.accumulator_avg": "平均",
6
5
  "label.accumulator_count": "计数",
7
6
  "label.accumulator_max": "最小",
8
7
  "label.accumulator_min": "最大",
9
- "text.validation-reason.MANDATORY": "必填",
10
- "text.validation-reason.FORMAT": "格式不正确",
11
- "text.validation-reason.RANGE": "超出范围",
12
- "text.validation-reason.UNIQUE": "重复值",
8
+ "label.accumulator_sum": "总和",
9
+ "text.grid-clear-search": "清除搜索或筛选即可查看全部",
10
+ "text.grid-no-records": "还没有任何记录",
11
+ "text.grid-nothing-found": "没有找到",
12
+ "text.grid-open-editor": "点击进行编辑",
13
+ "text.grid-total-records": "共 {total} 条",
14
+ "text.input-secret-hide": "隐藏",
13
15
  "text.input-secret-placeholder": "输入机密信息",
14
16
  "text.input-secret-show": "显示",
15
- "text.input-secret-hide": "隐藏",
16
17
  "text.input-secret-toggle": "显示/隐藏",
17
- "text.grid-no-records": "没有符合条件的记录",
18
- "text.grid-total-records": "共 {total} 条",
19
- "text.grid-column-editable": "可编辑"
18
+ "text.validation-reason.FORMAT": "格式不正确",
19
+ "text.validation-reason.MANDATORY": "必填",
20
+ "text.validation-reason.RANGE": "超出范围",
21
+ "text.validation-reason.UNIQUE": "重复值"
20
22
  }