@ishibashi0112/spreadsheet-grid-core 1.0.1 → 1.0.2

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 (103) hide show
  1. package/dist/controllers/autoHeightMeasurer.cjs +1 -1
  2. package/dist/controllers/autoHeightMeasurer.js +4 -2
  3. package/dist/controllers/clipboardController.cjs +1 -2
  4. package/dist/controllers/clipboardController.js +26 -26
  5. package/dist/controllers/columnAutosizeRunner.cjs +1 -1
  6. package/dist/controllers/columnAutosizeRunner.d.ts +2 -1
  7. package/dist/controllers/columnAutosizeRunner.js +11 -10
  8. package/dist/controllers/columnHeaderDragController.cjs +1 -1
  9. package/dist/controllers/columnHeaderDragController.js +176 -171
  10. package/dist/controllers/columnMenuController.cjs +1 -1
  11. package/dist/controllers/columnMenuController.js +1 -1
  12. package/dist/controllers/editController.cjs +1 -1
  13. package/dist/controllers/editController.js +78 -78
  14. package/dist/controllers/escapeClaimController.cjs +1 -1
  15. package/dist/controllers/escapeClaimController.d.ts +1 -0
  16. package/dist/controllers/escapeClaimController.js +11 -5
  17. package/dist/controllers/fillHandleController.cjs +1 -1
  18. package/dist/controllers/fillHandleController.js +141 -140
  19. package/dist/controllers/filterPopoverController.cjs +1 -1
  20. package/dist/controllers/filterPopoverController.js +81 -77
  21. package/dist/controllers/findController.cjs +1 -1
  22. package/dist/controllers/findController.d.ts +1 -0
  23. package/dist/controllers/findController.js +36 -29
  24. package/dist/controllers/keyboardController.cjs +1 -1
  25. package/dist/controllers/keyboardController.js +112 -116
  26. package/dist/controllers/popoverSupport.cjs +1 -1
  27. package/dist/controllers/popoverSupport.js +10 -5
  28. package/dist/controllers/rowDragController.cjs +1 -1
  29. package/dist/controllers/rowDragController.js +128 -127
  30. package/dist/controllers/rowEnterController.cjs +1 -1
  31. package/dist/controllers/rowEnterController.d.ts +1 -0
  32. package/dist/controllers/rowEnterController.js +47 -42
  33. package/dist/controllers/tooltipController.cjs +1 -1
  34. package/dist/controllers/tooltipController.js +64 -47
  35. package/dist/controllers/viewportSyncController.cjs +1 -1
  36. package/dist/controllers/viewportSyncController.d.ts +1 -0
  37. package/dist/controllers/viewportSyncController.js +29 -8
  38. package/dist/engine/filterPopoverCommands.cjs +1 -1
  39. package/dist/engine/filterPopoverCommands.d.ts +2 -0
  40. package/dist/engine/filterPopoverCommands.js +15 -15
  41. package/dist/engine/fullFeatures.cjs +1 -1
  42. package/dist/engine/fullFeatures.js +17 -17
  43. package/dist/engine/gridApi.cjs +2 -2
  44. package/dist/engine/gridApi.d.ts +1 -0
  45. package/dist/engine/gridApi.js +11 -11
  46. package/dist/engine/rowSelectionCommands.cjs +1 -1
  47. package/dist/engine/rowSelectionCommands.d.ts +1 -0
  48. package/dist/engine/rowSelectionCommands.js +21 -12
  49. package/dist/locales/en.cjs +1 -1
  50. package/dist/locales/en.js +7 -4
  51. package/dist/logic/columnAutosize.cjs +1 -1
  52. package/dist/logic/columnAutosize.d.ts +8 -2
  53. package/dist/logic/columnAutosize.js +102 -87
  54. package/dist/logic/detailRow.cjs +1 -1
  55. package/dist/logic/detailRow.d.ts +4 -0
  56. package/dist/logic/detailRow.js +18 -15
  57. package/dist/logic/editorValues.cjs +1 -1
  58. package/dist/logic/editorValues.d.ts +1 -0
  59. package/dist/logic/editorValues.js +29 -29
  60. package/dist/logic/filterSummary.cjs +1 -1
  61. package/dist/logic/filterSummary.js +9 -2
  62. package/dist/logic/find.cjs +1 -1
  63. package/dist/logic/find.d.ts +4 -3
  64. package/dist/logic/find.js +27 -13
  65. package/dist/logic/gridAsk.cjs +2 -2
  66. package/dist/logic/gridAsk.d.ts +7 -7
  67. package/dist/logic/gridAsk.js +140 -122
  68. package/dist/logic/gridAskLocaleText.cjs +1 -1
  69. package/dist/logic/gridAskLocaleText.d.ts +2 -0
  70. package/dist/logic/gridAskLocaleText.js +1 -0
  71. package/dist/logic/gridState.d.ts +2 -2
  72. package/dist/logic/localeText.cjs +1 -1
  73. package/dist/logic/localeText.d.ts +2 -0
  74. package/dist/logic/localeText.js +1 -0
  75. package/dist/logic/localeTextFeatures.cjs +1 -1
  76. package/dist/logic/localeTextFeatures.js +2 -2
  77. package/dist/logic/localeTextFilters.cjs +1 -1
  78. package/dist/logic/localeTextFilters.d.ts +1 -0
  79. package/dist/logic/localeTextFilters.js +1 -0
  80. package/dist/logic/localeTextPopups.cjs +1 -1
  81. package/dist/logic/localeTextPopups.js +2 -2
  82. package/dist/logic/numberFilterCondition.cjs +1 -1
  83. package/dist/logic/numberFilterCondition.d.ts +1 -1
  84. package/dist/logic/numberFilterCondition.js +5 -5
  85. package/dist/logic/scrollTargets.cjs +1 -1
  86. package/dist/logic/scrollTargets.js +2 -2
  87. package/dist/logic/selectEditorState.cjs +1 -1
  88. package/dist/logic/selectEditorState.d.ts +1 -0
  89. package/dist/logic/selectEditorState.js +8 -1
  90. package/dist/logic/valueFormatters.d.ts +5 -5
  91. package/dist/logic/verticalGeometry.cjs +1 -1
  92. package/dist/logic/verticalGeometry.d.ts +1 -0
  93. package/dist/logic/verticalGeometry.js +12 -8
  94. package/dist/model/gridActions.cjs +1 -1
  95. package/dist/model/gridActions.d.ts +2 -1
  96. package/dist/model/gridActions.js +3 -2
  97. package/dist/model/gridReducer.cjs +1 -1
  98. package/dist/model/gridReducer.js +145 -62
  99. package/dist/model/gridTypes.core.d.ts +319 -298
  100. package/dist/utils/clipboard.cjs +3 -5
  101. package/dist/utils/clipboard.d.ts +1 -0
  102. package/dist/utils/clipboard.js +25 -22
  103. package/package.json +1 -1
@@ -145,7 +145,7 @@ var p = [
145
145
  if (!t) return [];
146
146
  let n = j(e, t.mode === "exclude" ? "notIn" : "in", { values: t.values.slice(0, x) });
147
147
  return t.values.length > x && (n.more = t.values.length - x), [n];
148
- }, te = (e, t) => {
148
+ }, I = (e, t) => {
149
149
  switch (t.kind) {
150
150
  case "text":
151
151
  case "date": return [j(e, "contains", { value: t.value })];
@@ -157,10 +157,10 @@ var p = [
157
157
  case "dateSet": return [...t.condition ? P(e, t.condition) : [], ...F(e, t.set)];
158
158
  case "custom": return [];
159
159
  }
160
- }, I = (e) => {
160
+ }, L = (e) => {
161
161
  let t = { ...e };
162
162
  return delete t.visible, t;
163
- }, L = (e) => (e ?? []).filter((e) => e.visible === !1).map((e) => e.key), R = [
163
+ }, R = (e) => (e ?? []).filter((e) => e.visible === !1).map((e) => e.key), z = [
164
164
  "You set how a data table is viewed, from one request by its user. You choose filters (which rows to show), the sort order, a quick text search and hidden columns. You never see or change the data.",
165
165
  "- Use only the listed columns (by key) and, for each column, only its listed ops. A column without ops cannot be filtered.",
166
166
  "- A filter is {column, op, value, values, to}. Comparison ops (=, !=, >, >=, <, <=) and contains, equals, startsWith, endsWith, onOrAfter, onOrBefore, notEquals use \"value\". \"between\" uses \"value\" (from) and \"to\"; both ends are included. \"in\" (show only these values) and \"notIn\" (hide these values) use \"values\"; pick from the column's listed values when it has them (a list ending in \"more (not listed)\" is cut short). \"\" in values stands for blank cells. \"preset\" puts one of the column's preset ids in \"value\". blank, notBlank and clear use none of them. Unused fields are null.",
@@ -172,7 +172,7 @@ var p = [
172
172
  "- sort lists columns in priority order; null keeps the current sort in refine mode. search is a word to find in any column; use it only when no column fits. In refine mode null keeps the current search; \"\" clears it.",
173
173
  "- Change filters, the sort, the search and hidden columns only when the prompt says it is allowed. hide and show list column keys.",
174
174
  "- If any part of the request cannot be done with these columns and ops, do the rest and say briefly what you could not do in \"unsupported\", in the language of the request. Otherwise unsupported is null. Never invent a column."
175
- ].join("\n"), ne = [
175
+ ].join("\n"), B = [
176
176
  "Sun",
177
177
  "Mon",
178
178
  "Tue",
@@ -180,17 +180,17 @@ var p = [
180
180
  "Thu",
181
181
  "Fri",
182
182
  "Sat"
183
- ], re = (e) => {
183
+ ], te = (e) => {
184
184
  let t = e.slice(0, _).map((e) => e.label && e.label !== e.value ? `${JSON.stringify(e.value)} (${e.label})` : JSON.stringify(e.value)), n = e.length - t.length;
185
185
  return n > 0 ? `${t.join(", ")} and ${n} more (not listed)` : t.join(", ");
186
- }, ie = (e) => {
186
+ }, ne = (e) => {
187
187
  let t = `- ${e.key} ${JSON.stringify(e.title)}${e.hint ? ` (${e.hint})` : ""}`;
188
188
  if (e.filterType === null) return `${t}: no ops.`;
189
189
  let n = `${t}: ${g[e.filterType]}.`, r = e.filterType === "select" ? e.options?.filter((e) => e.value !== "") : e.options;
190
- r && r.length > 0 && (n += ` values: ${re(r)}.`);
190
+ r && r.length > 0 && (n += ` values: ${te(r)}.`);
191
191
  let i = e.ops.map((t) => t === "preset" ? `preset (${e.presets.map((e) => `${e.id} = ${e.label}`).join(", ")})` : t);
192
192
  return `${n} ops: ${i.join(", ")}`;
193
- }, ae = (e) => {
193
+ }, re = (e) => {
194
194
  let t = e.length > 0 && e.length <= S ? {
195
195
  type: "string",
196
196
  enum: e
@@ -266,17 +266,17 @@ var p = [
266
266
  unsupported: n
267
267
  }
268
268
  };
269
- }, oe = (e, t, n) => {
269
+ }, ie = (e, t, n) => {
270
270
  let i = k(n, t), a = A(n.allowFilter, !0), o = A(n.allowSort, !0), s = A(n.allowSearch, !0), c = A(n.allowColumnVisibility, !1), l = n.now ?? /* @__PURE__ */ new Date(), u = new Set(i.map((e) => e.key)), d = new Set(i.filter((e) => e.filterType !== null).map((e) => e.key)), f = {};
271
- return a && (f.filters = Object.entries(t.filters.columnFilters).filter(([e]) => d.has(e)).flatMap(([e, t]) => te(e, t))), o && (f.sort = t.sort.filter((e) => u.has(e.columnKey)).map((e) => ({
271
+ return a && (f.filters = Object.entries(t.filters.columnFilters).filter(([e]) => d.has(e)).flatMap(([e, t]) => I(e, t))), o && (f.sort = t.sort.filter((e) => u.has(e.columnKey)).map((e) => ({
272
272
  column: e.columnKey,
273
273
  direction: e.direction
274
- }))), s && (f.search = t.filters.globalText === "" ? null : t.filters.globalText), c && (f.hidden = L(t.columns).filter((e) => u.has(e))), {
275
- system: R,
274
+ }))), s && (f.search = t.filters.globalText === "" ? null : t.filters.globalText), c && (f.hidden = R(t.columns).filter((e) => u.has(e))), {
275
+ system: z,
276
276
  prompt: [
277
- `Today: ${r(l)} (${ne[l.getDay()]})`,
277
+ `Today: ${r(l)} (${B[l.getDay()]})`,
278
278
  "Columns:",
279
- ...i.map(ie),
279
+ ...i.map(ne),
280
280
  `Filters: ${a ? "allowed (by each column's ops)" : "not allowed"}.`,
281
281
  `Sort: ${o ? "allowed (any column above)" : "not allowed"}.`,
282
282
  `Search: ${s ? "allowed" : "not allowed"}.`,
@@ -284,56 +284,56 @@ var p = [
284
284
  `Current view: ${JSON.stringify(f)}`,
285
285
  `Request: ${e.trim()}`
286
286
  ].join("\n"),
287
- schema: ae(i.map((e) => e.key)),
287
+ schema: re(i.map((e) => e.key)),
288
288
  text: e.trim()
289
289
  };
290
- }, z = (e) => ({ value: e }), B = (e) => ({ error: e }), V = (e) => typeof e == "string" ? e : typeof e == "number" && Number.isFinite(e) ? String(e) : "", H = (e) => V(e).trim(), U = (t) => typeof t == "number" ? Number.isFinite(t) ? t : null : typeof t == "string" && t.length <= v ? e(t) : null, W = (e, t) => {
291
- let n = H(e);
290
+ }, V = (e) => ({ value: e }), H = (e) => ({ error: e }), U = (e) => typeof e == "string" ? e : typeof e == "number" && Number.isFinite(e) ? String(e) : "", W = (e) => U(e).trim(), G = (t) => typeof t == "number" ? Number.isFinite(t) ? t : null : typeof t == "string" && t.length <= v ? e(t) : null, K = (e, t) => {
291
+ let n = W(e);
292
292
  return n === "" ? t.emptyText : n.length > w ? `${n.slice(0, w)}…` : n;
293
- }, G = (e, n) => t(n.quote, { text: W(e, n) }), se = (e, n) => {
294
- let r = e.slice(0, 5).map((e) => G(e, n)).join(n.quoteSeparator);
293
+ }, q = (e, n) => t(n.quote, { text: K(e, n) }), ae = (e, n) => {
294
+ let r = e.slice(0, 5).map((e) => q(e, n)).join(n.quoteSeparator);
295
295
  return e.length > 5 ? t(n.andMore, {
296
296
  items: r,
297
297
  count: e.length - 5
298
298
  }) : r;
299
- }, K = (e, n) => t(n.quote, { text: H(e) === "" ? n.unnamed : W(e, n) }), q = (e) => t(e.textTooLong, { limit: v }), J = (e, n, r) => t(r.columnReason, {
299
+ }, J = (e, n) => t(n.quote, { text: W(e) === "" ? n.unnamed : K(e, n) }), Y = (e) => t(e.textTooLong, { limit: v }), X = (e, n, r) => t(r.columnReason, {
300
300
  column: e,
301
301
  reason: n
302
- }), Y = (e, n, r) => {
303
- if (e === "blank" || e === "notBlank") return z({ mode: e });
302
+ }), Z = (e, n, r) => {
303
+ if (e === "blank" || e === "notBlank") return V({ mode: e });
304
304
  if (e === "between") {
305
- let e = U(n.value), t = U(n.to);
306
- return e === null || t === null ? B(r.noNumberRange) : z({
305
+ let e = G(n.value), t = G(n.to);
306
+ return e === null || t === null ? H(r.noNumberRange) : V({
307
307
  mode: "range",
308
308
  min: Math.min(e, t),
309
309
  max: Math.max(e, t)
310
310
  });
311
311
  }
312
- let i = U(n.value);
313
- return i === null ? B(t(r.notNumber, { value: G(n.value, r) })) : z({
312
+ let i = G(n.value);
313
+ return i === null ? H(t(r.notNumber, { value: q(n.value, r) })) : V({
314
314
  mode: "comparison",
315
315
  operator: e,
316
316
  value: i
317
317
  });
318
- }, ce = (e, t, n) => {
319
- if (e === "blank" || e === "notBlank") return z({ mode: e });
320
- let r = H(t.value);
321
- return r === "" ? B(n.noText) : r.length > v ? B(q(n)) : z({
318
+ }, oe = (e, t, n) => {
319
+ if (e === "blank" || e === "notBlank") return V({ mode: e });
320
+ let r = W(t.value);
321
+ return r === "" ? H(n.noText) : r.length > v ? H(Y(n)) : V({
322
322
  mode: e,
323
323
  value: r
324
324
  });
325
- }, le = (e, n, r, a) => {
326
- if (n === "blank" || n === "notBlank") return z({ mode: n });
325
+ }, se = (e, n, r, a) => {
326
+ if (n === "blank" || n === "notBlank") return V({ mode: n });
327
327
  if (n === "preset") {
328
- let n = H(r.value), i = e.presets.find((e) => e.id === n || e.label === n);
329
- return i ? z({
328
+ let n = W(r.value), i = e.presets.find((e) => e.id === n || e.label === n);
329
+ return i ? V({
330
330
  mode: "preset",
331
331
  preset: i.id
332
- }) : B(t(a.unknownPeriod, { value: G(r.value, a) }));
332
+ }) : H(t(a.unknownPeriod, { value: q(r.value, a) }));
333
333
  }
334
334
  if (n === "between") {
335
- let e = i(H(r.value)), t = i(H(r.to));
336
- return e === null || t === null ? B(a.noDateRange) : z(e <= t ? {
335
+ let e = i(W(r.value)), t = i(W(r.to));
336
+ return e === null || t === null ? H(a.noDateRange) : V(e <= t ? {
337
337
  mode: "range",
338
338
  from: e,
339
339
  to: t
@@ -343,29 +343,29 @@ var p = [
343
343
  to: e
344
344
  });
345
345
  }
346
- let o = i(H(r.value));
347
- return o === null ? B(t(a.notDate, { value: G(r.value, a) })) : z({
346
+ let o = i(W(r.value));
347
+ return o === null ? H(t(a.notDate, { value: q(r.value, a) })) : V({
348
348
  mode: n,
349
349
  value: o
350
350
  });
351
- }, X = (e, t) => {
351
+ }, Q = (e, t) => {
352
352
  let n = e.find((e) => e.value === t);
353
353
  if (n) return n.value;
354
354
  let r = e.find((e) => e.label === t);
355
355
  if (r) return r.value;
356
356
  let i = t.trim().toLowerCase(), a = e.find((e) => e.value.trim().toLowerCase() === i || e.label.trim().toLowerCase() === i);
357
357
  return a ? a.value : null;
358
- }, ue = (e) => e === void 0 ? null : e.kind === "set" ? {
358
+ }, ce = (e) => e === void 0 ? null : e.kind === "set" ? {
359
359
  mode: e.mode === "exclude" ? "exclude" : "include",
360
360
  values: e.values
361
361
  } : (e.kind === "numberSet" || e.kind === "textSet" || e.kind === "dateSet") && e.set ? {
362
362
  mode: e.set.mode === "exclude" ? "exclude" : "include",
363
363
  values: e.set.values
364
- } : null, Z = (n, r, a, o) => {
364
+ } : null, le = (n, r, a, o) => {
365
365
  let { t: s } = o;
366
- if (!Array.isArray(r)) return B(s.noValues);
367
- let c = ue(o.original), l = new Set(c?.values ?? []);
368
- r.length > b && o.dropped.push(J(n.title, t(s.tooManyValues, {
366
+ if (!Array.isArray(r)) return H(s.noValues);
367
+ let c = ce(o.original), l = new Set(c?.values ?? []);
368
+ r.length > b && o.dropped.push(X(n.title, t(s.tooManyValues, {
369
369
  limit: b,
370
370
  count: r.length - b
371
371
  }), s));
@@ -375,7 +375,7 @@ var p = [
375
375
  f += 1;
376
376
  continue;
377
377
  }
378
- let r = V(t);
378
+ let r = U(t);
379
379
  if (l.has(r)) {
380
380
  u.add(r);
381
381
  continue;
@@ -387,7 +387,7 @@ var p = [
387
387
  }
388
388
  let o = a;
389
389
  if (a === "" || l.has(a)) o = a;
390
- else if (n.options) o = X(n.options, r);
390
+ else if (n.options) o = Q(n.options, r);
391
391
  else if (n.filterType === "dateSet") o = i(a) ?? a;
392
392
  else if (n.filterType === "numberSet") {
393
393
  let t = e(a);
@@ -395,60 +395,60 @@ var p = [
395
395
  }
396
396
  o === null ? d.push(r) : u.add(o);
397
397
  }
398
- if (d.length > 0 && o.dropped.push(J(n.title, t(s.notInOptions, { values: se(d, s) }), s)), p > 0 && o.dropped.push(J(n.title, t(s.valuesTooLong, {
398
+ if (d.length > 0 && o.dropped.push(X(n.title, t(s.notInOptions, { values: ae(d, s) }), s)), p > 0 && o.dropped.push(X(n.title, t(s.valuesTooLong, {
399
399
  limit: y,
400
400
  count: p
401
- }), s)), f > 0 && o.dropped.push(J(n.title, t(s.unreadableValues, { count: f }), s)), u.size === 0) return B(s.noSelectableValues);
402
- if (c === null || c.mode !== a) return z([...u]);
401
+ }), s)), f > 0 && o.dropped.push(X(n.title, t(s.unreadableValues, { count: f }), s)), u.size === 0) return H(s.noSelectableValues);
402
+ if (c === null || c.mode !== a) return V([...u]);
403
403
  if (c.values.length > x && !o.cleared) {
404
404
  let e = c.values.slice(0, x);
405
405
  if (o.refine || e.every((e) => u.has(e))) for (let e of c.values.slice(x)) u.add(e);
406
406
  }
407
- return u.size === c.values.length && c.values.every((e) => u.has(e)) ? z([...c.values]) : z([...u]);
408
- }, de = (e, n, r, i) => {
407
+ return u.size === c.values.length && c.values.every((e) => u.has(e)) ? V([...c.values]) : V([...u]);
408
+ }, ue = (e, n, r, i) => {
409
409
  let c = e.filterType, { original: l, t: u } = i;
410
410
  switch (c) {
411
411
  case "text":
412
412
  case "date": {
413
- let e = H(r.value);
414
- return e === "" ? B(u.noText) : (l?.kind === "text" || l?.kind === "date") && l.kind === c && l.value.trim() === e ? z({
413
+ let e = W(r.value);
414
+ return e === "" ? H(u.noText) : (l?.kind === "text" || l?.kind === "date") && l.kind === c && l.value.trim() === e ? V({
415
415
  kind: c,
416
416
  value: l.value
417
- }) : e.length > v ? B(q(u)) : z({
417
+ }) : e.length > v ? H(Y(u)) : V({
418
418
  kind: c,
419
419
  value: e
420
420
  });
421
421
  }
422
422
  case "select": {
423
- let n = V(r.value);
424
- if (n.trim() === "") return B(u.noValues);
425
- if (l?.kind === "select" && (l.value === n || l.value === n.trim())) return z({
423
+ let n = U(r.value);
424
+ if (n.trim() === "") return H(u.noValues);
425
+ if (l?.kind === "select" && (l.value === n || l.value === n.trim())) return V({
426
426
  kind: "select",
427
427
  value: l.value
428
428
  });
429
- let i = e.options ? X(e.options, n) : n.trim();
430
- return i === null ? B(t(u.notAnOption, { value: G(n, u) })) : i === "" ? B(t(u.cannotFilterBy, { value: G(n, u) })) : i.length > y ? B(t(u.valueTooLong, { limit: y })) : z({
429
+ let i = e.options ? Q(e.options, n) : n.trim();
430
+ return i === null ? H(t(u.notAnOption, { value: q(n, u) })) : i === "" ? H(t(u.cannotFilterBy, { value: q(n, u) })) : i.length > y ? H(t(u.valueTooLong, { limit: y })) : V({
431
431
  kind: "select",
432
432
  value: i
433
433
  });
434
434
  }
435
435
  case "set": {
436
- let t = n === "notIn" ? "exclude" : "include", a = Z(e, r.values, t, i);
437
- return "error" in a ? a : z({
436
+ let t = n === "notIn" ? "exclude" : "include", a = le(e, r.values, t, i);
437
+ return "error" in a ? a : V({
438
438
  kind: "set",
439
439
  mode: t,
440
440
  values: a.value
441
441
  });
442
442
  }
443
443
  case "number": {
444
- let e = Y(n, r, u);
444
+ let e = Z(n, r, u);
445
445
  return "error" in e ? e : l?.kind === "number" && s({
446
446
  kind: "number",
447
447
  raw: l.raw,
448
448
  parsed: e.value
449
- }, l) ? z(o(l)) : z({
449
+ }, l) ? V(o(l)) : V({
450
450
  kind: "number",
451
- raw: a(e.value),
451
+ raw: a(e.value, String, u),
452
452
  parsed: e.value
453
453
  });
454
454
  }
@@ -459,31 +459,31 @@ var p = [
459
459
  set: null
460
460
  };
461
461
  if (n === "in" || n === "notIn") {
462
- if (i.fixed.has("set")) return B(u.oneSelection);
463
- let t = n === "notIn" ? "exclude" : "include", o = Z(e, r.values, t, i);
462
+ if (i.fixed.has("set")) return H(u.oneSelection);
463
+ let t = n === "notIn" ? "exclude" : "include", o = le(e, r.values, t, i);
464
464
  return "error" in o ? o : (a.set = {
465
465
  mode: t,
466
466
  values: o.value
467
- }, z(a));
467
+ }, V(a));
468
468
  }
469
- if (i.fixed.has("condition")) return B(u.oneCondition);
469
+ if (i.fixed.has("condition")) return H(u.oneCondition);
470
470
  if (a.kind === "numberSet") {
471
- let e = Y(n, r, u);
471
+ let e = Z(n, r, u);
472
472
  if ("error" in e) return e;
473
473
  a.condition = e.value;
474
474
  } else if (a.kind === "textSet") {
475
- let e = ce(n, r, u);
475
+ let e = oe(n, r, u);
476
476
  if ("error" in e) return e;
477
477
  a.condition = e.value;
478
478
  } else {
479
- let t = le(e, n, r, u);
479
+ let t = se(e, n, r, u);
480
480
  if ("error" in t) return t;
481
481
  a.condition = t.value;
482
482
  }
483
- return z(a);
483
+ return V(a);
484
484
  }
485
485
  }
486
- }, fe = (e) => {
486
+ }, de = (e) => {
487
487
  if (typeof e != "string") return e;
488
488
  let t = e.trim().replace(/^```(?:json)?\s*/i, "").replace(/\s*```$/, "");
489
489
  try {
@@ -497,16 +497,16 @@ var p = [
497
497
  return;
498
498
  }
499
499
  }
500
- }, Q = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : null, pe = (e) => {
501
- let t = H(e).toLowerCase();
500
+ }, $ = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : null, fe = (e) => {
501
+ let t = W(e).toLowerCase();
502
502
  return t === "asc" || t === "ascending" ? "asc" : t === "desc" || t === "descending" ? "desc" : null;
503
- }, $ = (e, t, n) => l(e, t.filter((e) => n(e.columnKey))) ? t.map((e) => ({ ...e })) : [...e, ...t.filter((e) => !n(e.columnKey)).map((e) => ({ ...e }))], me = (e, n) => e.length > C ? [...e.slice(0, C - 1), t(n.moreReasons, { count: e.length - C + 1 })] : e, he = (e, n, r) => {
504
- let i = f(r.localeText), a = fe(e);
503
+ }, pe = (e, t, n) => l(e, t.filter((e) => n(e.columnKey))) ? t.map((e) => ({ ...e })) : [...e, ...t.filter((e) => !n(e.columnKey)).map((e) => ({ ...e }))], me = (e, n) => e.length > C ? [...e.slice(0, C - 1), t(n.moreReasons, { count: e.length - C + 1 })] : e, he = (e, n, r) => {
504
+ let i = f(r.localeText), a = de(e);
505
505
  if (a === void 0) return {
506
506
  ok: !1,
507
507
  message: i.readError
508
508
  };
509
- let s = Q(a), c = s?.mode, l = s?.filters;
509
+ let s = $(a), c = s?.mode, l = s?.filters;
510
510
  if (!s || c !== void 0 && c !== "replace" && c !== "refine" || l !== void 0 && !Array.isArray(l) || l === void 0 && c === void 0) return {
511
511
  ok: !1,
512
512
  message: i.shapeError
@@ -514,55 +514,55 @@ var p = [
514
514
  let u = Array.isArray(l) ? l : [], d = k(r, n), p = new Map(d.map((e) => [e.key, e])), m = /* @__PURE__ */ new Map();
515
515
  for (let e of d) m.set(e.title, m.has(e.title) ? null : e);
516
516
  let h = (e) => {
517
- let t = H(e);
517
+ let t = W(e);
518
518
  return p.get(t) ?? m.get(t) ?? void 0;
519
- }, g = A(r.allowFilter, !0), _ = A(r.allowSort, !0), y = A(r.allowSearch, !0), b = A(r.allowColumnVisibility, !1), x = c === "refine", S = [], C = /* @__PURE__ */ new Map();
519
+ }, g = A(r.allowFilter, !0), _ = A(r.allowSort, !0), y = A(r.allowSearch, !0), b = A(r.allowColumnVisibility, !1), x = c === "refine", S = [], C = !1, w = /* @__PURE__ */ new Map();
520
520
  for (let [e, t] of Object.entries(n.filters.columnFilters)) {
521
521
  let n = p.get(e);
522
- (x || !n || n.filterType === null) && C.set(e, o(t));
522
+ (x || !n || n.filterType === null) && w.set(e, o(t));
523
523
  }
524
- let w = (e) => p.has(e), T = x || !_ ? n.sort.map((e) => ({ ...e })) : $([], n.sort, w), E = x || !y ? n.filters.globalText : "";
524
+ let T = (e) => p.has(e), E = x || !_ ? n.sort.map((e) => ({ ...e })) : pe([], n.sort, T), D = x || !y ? n.filters.globalText : "";
525
525
  if (!g) u.length > 0 && S.push(i.filtersLocked);
526
526
  else {
527
527
  let e = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), o = 0;
528
528
  for (let s of u) {
529
- let c = Q(s);
529
+ let c = $(s);
530
530
  if (!c) {
531
531
  o += 1;
532
532
  continue;
533
533
  }
534
534
  let l = h(c.column);
535
535
  if (!l) {
536
- S.push(t(i.noSuchColumn, { column: K(c.column, i) }));
536
+ S.push(t(i.noSuchColumn, { column: J(c.column, i) }));
537
537
  continue;
538
538
  }
539
539
  let u = typeof c.op == "string" ? c.op.trim() : "";
540
540
  if (l.filterType === null) {
541
- S.push(J(l.title, i.notFilterable, i));
541
+ S.push(X(l.title, i.notFilterable, i));
542
542
  continue;
543
543
  }
544
544
  if (u === "") {
545
- S.push(J(l.title, i.noOperator, i));
545
+ S.push(X(l.title, i.noOperator, i));
546
546
  continue;
547
547
  }
548
548
  let d = u;
549
549
  if (!l.ops.includes(d)) {
550
- let e = Object.prototype.hasOwnProperty.call(i.operatorLabels, d) ? i.operatorLabels[d] : W(c.op, i);
551
- S.push(J(l.title, t(i.operatorUnavailable, { operator: t(i.quote, { text: e }) }), i));
550
+ let e = Object.prototype.hasOwnProperty.call(i.operatorLabels, d) ? i.operatorLabels[d] : K(c.op, i);
551
+ S.push(X(l.title, t(i.operatorUnavailable, { operator: t(i.quote, { text: e }) }), i));
552
552
  continue;
553
553
  }
554
554
  if (d === "clear") {
555
- C.delete(l.key), e.delete(l.key), a.delete(l.key), r.add(l.key);
555
+ w.delete(l.key), e.delete(l.key), a.delete(l.key), r.add(l.key), C = !0;
556
556
  continue;
557
557
  }
558
558
  let f = l.filterType === "numberSet" || l.filterType === "textSet" || l.filterType === "dateSet";
559
559
  if (e.has(l.key) && !f) {
560
- S.push(J(l.title, i.oneCondition, i));
560
+ S.push(X(l.title, i.oneCondition, i));
561
561
  continue;
562
562
  }
563
- let p = a.get(l.key) ?? /* @__PURE__ */ new Set(), m = de(l, d, c, {
563
+ let p = a.get(l.key) ?? /* @__PURE__ */ new Set(), m = ue(l, d, c, {
564
564
  original: O(n.filters.columnFilters, l.key),
565
- base: C.get(l.key),
565
+ base: w.get(l.key),
566
566
  fixed: p,
567
567
  refine: x,
568
568
  cleared: r.has(l.key),
@@ -570,27 +570,28 @@ var p = [
570
570
  t: i
571
571
  });
572
572
  if ("error" in m) {
573
- S.push(J(l.title, m.error, i));
573
+ S.push(X(l.title, m.error, i));
574
574
  continue;
575
575
  }
576
- C.set(l.key, m.value), e.add(l.key), f && (p.add(d === "in" || d === "notIn" ? "set" : "condition"), a.set(l.key, p));
576
+ w.set(l.key, m.value), e.add(l.key), C = !0, f && (p.add(d === "in" || d === "notIn" ? "set" : "condition"), a.set(l.key, p));
577
577
  }
578
578
  o > 0 && S.push(t(i.unreadableFilters, { count: o }));
579
579
  }
580
- if (Array.isArray(s.sort)) if (!_) s.sort.length > 0 && S.push(i.sortLocked);
580
+ if (s.sort !== void 0 && s.sort !== null && !Array.isArray(s.sort)) S.push(i.sortUnreadable);
581
+ else if (Array.isArray(s.sort)) if (!_) s.sort.length > 0 && S.push(i.sortLocked);
581
582
  else {
582
583
  let e = [];
583
584
  for (let n of s.sort) {
584
- let r = Q(n), a = r ? h(r.column) : void 0;
585
+ let r = $(n), a = r ? h(r.column) : void 0;
585
586
  if (!r || !a) {
586
- S.push(t(i.sortNoSuchColumn, { column: K(r?.column, i) }));
587
+ S.push(t(i.sortNoSuchColumn, { column: J(r?.column, i) }));
587
588
  continue;
588
589
  }
589
- let o = pe(r.direction);
590
+ let o = fe(r.direction);
590
591
  if (o === null) {
591
592
  S.push(t(i.sortBadDirection, {
592
593
  column: a.title,
593
- direction: G(r.direction, i)
594
+ direction: q(r.direction, i)
594
595
  }));
595
596
  continue;
596
597
  }
@@ -599,46 +600,63 @@ var p = [
599
600
  direction: o
600
601
  });
601
602
  }
602
- x && s.sort.length > 0 && e.length === 0 || (T = $(e, n.sort, w));
603
+ x && s.sort.length > 0 && e.length === 0 || (E = pe(e, n.sort, T)), e.length > 0 && (C = !0);
603
604
  }
604
605
  if (s.search !== void 0 && s.search !== null && typeof s.search != "string") S.push(i.searchUnreadable);
605
606
  else if (typeof s.search == "string") {
606
607
  let e = s.search.trim(), r = n.filters.globalText;
607
- y ? e !== "" && e === r.trim() ? E = r : e.length > v ? S.push(t(i.searchTooLong, { limit: v })) : E = e : e !== "" && e !== r.trim() && S.push(i.searchLocked);
608
+ y ? e !== "" && e === r.trim() ? (D = r, C = !0) : e.length > v ? S.push(t(i.searchTooLong, { limit: v })) : (D = e, C ||= e !== "") : e !== "" && e !== r.trim() && S.push(i.searchLocked);
608
609
  }
609
- let D = n.columns?.map((e) => ({ ...e })), j = Array.isArray(s.hide) ? s.hide.filter((e) => H(e) !== "") : [], M = Array.isArray(s.show) ? s.show.filter((e) => H(e) !== "") : [], N = (Array.isArray(s.hide) ? s.hide.length - j.length : 0) + (Array.isArray(s.show) ? s.show.length - M.length : 0);
610
- if (N > 0 && S.push(t(i.unreadableColumns, { count: N })), j.length > 0 || M.length > 0) if (!b || !D) S.push(i.columnsLocked);
610
+ let j = n.columns?.map((e) => ({ ...e })), M = Array.isArray(s.hide) ? s.hide.filter((e) => W(e) !== "") : [], N = Array.isArray(s.show) ? s.show.filter((e) => W(e) !== "") : [], P = (e, t) => Array.isArray(e) ? e.length - t.length : e == null ? 0 : 1, F = P(s.hide, M) + P(s.show, N);
611
+ if (F > 0 && S.push(t(i.unreadableColumns, { count: F })), M.length > 0 || N.length > 0) if (!b || !j) S.push(i.columnsLocked);
611
612
  else {
612
- let e = new Set(D.map((e) => e.key)), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
613
- for (let [a, o] of [[M, n], [j, r]]) for (let n of a) {
613
+ let e = new Set(j.map((e) => e.key)), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
614
+ for (let [a, o] of [[N, n], [M, r]]) for (let n of a) {
614
615
  let r = h(n);
615
- r && e.has(r.key) ? o.add(r.key) : S.push(t(i.noSuchColumn, { column: K(n, i) }));
616
+ r && e.has(r.key) ? o.add(r.key) : S.push(t(i.noSuchColumn, { column: J(n, i) }));
616
617
  }
617
- let a = D.map((e) => r.has(e.key) ? {
618
+ let a = j.map((e) => r.has(e.key) ? {
618
619
  ...e,
619
620
  visible: !1
620
- } : n.has(e.key) && e.visible === !1 ? I(e) : e);
621
- a.length > 0 && a.every((e) => e.visible === !1) ? S.push(i.cannotHideAll) : D = a;
621
+ } : n.has(e.key) && e.visible === !1 ? L(e) : e);
622
+ a.length > 0 && a.every((e) => e.visible === !1) ? S.push(i.cannotHideAll) : (j = a, C = C || r.size > 0 || n.size > 0);
622
623
  }
623
- let P = typeof s.unsupported == "string" && s.unsupported.trim() !== "" ? s.unsupported.trim().slice(0, ee) : null, F = {
624
+ let I = typeof s.unsupported == "string" && s.unsupported.trim() !== "" ? s.unsupported.trim().slice(0, ee) : null, R = (e) => e != null && !(Array.isArray(e) && e.length === 0) && !(typeof e == "string" && e.trim() === ""), z = u.length > 0 || R(s.sort) || R(s.search) || R(s.hide) || R(s.show);
625
+ if (!x && !C && (z ? S.length > 0 : I !== null)) return {
626
+ ok: !0,
627
+ state: {
628
+ version: n.version,
629
+ columnWidths: { ...n.columnWidths },
630
+ filters: {
631
+ globalText: n.filters.globalText,
632
+ columnFilters: Object.fromEntries(Object.entries(n.filters.columnFilters).map(([e, t]) => [e, o(t)]))
633
+ },
634
+ sort: n.sort.map((e) => ({ ...e })),
635
+ columns: n.columns?.map((e) => ({ ...e }))
636
+ },
637
+ changed: !1,
638
+ dropped: me(S, i),
639
+ unsupported: I
640
+ };
641
+ let B = {
624
642
  version: n.version,
625
643
  columnWidths: { ...n.columnWidths },
626
644
  filters: {
627
- globalText: E,
628
- columnFilters: Object.fromEntries(C)
645
+ globalText: D,
646
+ columnFilters: Object.fromEntries(w)
629
647
  },
630
- sort: T,
631
- columns: D
648
+ sort: E,
649
+ columns: j
632
650
  };
633
651
  return {
634
652
  ok: !0,
635
- state: F,
636
- changed: !_e(F, n),
653
+ state: B,
654
+ changed: !_e(B, n),
637
655
  dropped: me(S, i),
638
- unsupported: P
656
+ unsupported: I
639
657
  };
640
658
  }, ge = (e, t) => {
641
- let n = L(e).sort(), r = L(t).sort();
659
+ let n = R(e).sort(), r = R(t).sort();
642
660
  return n.length === r.length && n.every((e, t) => e === r[t]);
643
661
  }, _e = (e, t) => c(e.filters, t.filters) && l(e.sort, t.sort) && ge(e.columns, t.columns), ve = (e, t) => !ge(e.columns, t.columns), ye = (e, n) => {
644
662
  let r = f(n.localeText), i = new Map(n.columns.map((e) => [e.key, e])), a = (e) => i.get(e)?.title || e, o = [];
@@ -662,7 +680,7 @@ var p = [
662
680
  id: "q",
663
681
  label: r.itemSearch,
664
682
  text: t(r.quote, { text: e.filters.globalText })
665
- }), A(n.allowColumnVisibility, !1)) for (let t of L(e.columns)) o.push({
683
+ }), A(n.allowColumnVisibility, !1)) for (let t of R(e.columns)) o.push({
666
684
  id: `h:${t}`,
667
685
  label: r.itemHidden,
668
686
  text: a(t)
@@ -675,7 +693,7 @@ var p = [
675
693
  else if (t === "q") r = "";
676
694
  else if (t.startsWith("h:")) {
677
695
  let e = t.slice(2);
678
- a = a?.map((t) => t.key === e ? I(t) : t);
696
+ a = a?.map((t) => t.key === e ? L(t) : t);
679
697
  }
680
698
  return {
681
699
  ...e,
@@ -688,4 +706,4 @@ var p = [
688
706
  };
689
707
  };
690
708
  //#endregion
691
- export { oe as createGridAskRequest, ye as describeGridAskView, R as gridAskSystemPrompt, ve as isGridAskColumnsChanged, _e as isSameGridAskView, he as readGridAskAnswer, be as removeGridAskItem };
709
+ export { ie as createGridAskRequest, ye as describeGridAskView, z as gridAskSystemPrompt, ve as isGridAskColumnsChanged, _e as isSameGridAskView, he as readGridAskAnswer, be as removeGridAskItem };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={...require("./localeTextFilters.cjs").DEFAULT_FILTER_LOCALE_TEXT,placeholder:`ことばで絞り込み・並べ替え(例: 今月の分を金額の高い順に)`,label:`ことばで絞り込み`,submit:`聞く`,stop:`止める`,examples:`例:`,thinking:`考えています…`,escHint:`Esc でも止まります`,retry:`もう一度`,appliedTitle:`反映した条件`,undo:`元に戻す`,close:`閉じる`,removeItem:`{label} {text} を外す`,allRemoved:`条件はすべて外れています。`,unchanged:`変える条件はありませんでした。`,undone:`元に戻しました。`,droppedTitle:`使えなかった部分`,fromAi:`AI から: {text}`,askFailed:`AI に聞けませんでした。もう一度試してください。`,noGrid:`表が見つかりませんでした。表が出てから、もう一度試してください。`,changedNotice:`表の条件が変わったので、ここからは変えられません。表のフィルターや並びで直してください。`,itemSort:`並び`,itemSortEntry:`{column} {direction}`,ascending:`昇順`,descending:`降順`,itemSearch:`検索`,itemHidden:`隠した列`,quote:`「{text}」`,quoteSeparator:``,emptyText:`(空)`,unnamed:`(名前なし)`,andMore:`{items}ほか {count} 件`,moreReasons:`ほか {count} 件`,columnReason:`{column}: {reason}`,readError:`AI の答えを読めませんでした。言い方を変えて、もう一度試してください。`,shapeError:`AI の答えが表への指示になっていませんでした。言い方を変えてください。`,filtersLocked:`列の条件は変えない設定です`,noSuchColumn:`{column}という列はありません`,notFilterable:`この列では絞り込めません`,noOperator:`条件の種類がありません`,operatorUnavailable:`この列では{operator}の条件は使えません`,oneCondition:`条件は 1 列に 1 つまでです`,oneSelection:`値の選択は 1 列に 1 つまでです`,unreadableFilters:`読めない条件({count} 件)は使えません`,noNumberRange:`範囲の両端の数がありません`,notNumber:`{value}は数として読めません`,noText:`探す文字がありません`,textTooLong:`探す文字は {limit} 字までです`,unknownPeriod:`{value}という期間は使えません`,noDateRange:`範囲の両端の日付がありません`,notDate:`{value}は日付として読めません`,noValues:`選ぶ値がありません`,noSelectableValues:`選べる値がありません`,tooManyValues:`選べる値は {limit} 件までです({count} 件は使いませんでした)`,notInOptions:`{values}は候補にありません`,notAnOption:`{value}は候補にありません`,cannotFilterBy:`{value}では絞り込めません`,valueTooLong:`{limit} 字を超える値は使えません`,valuesTooLong:`{limit} 字を超える値({count} 件)は使えません`,unreadableValues:`値として読めないもの({count} 件)は使えません`,sortLocked:`並びは変えない設定です`,sortNoSuchColumn:`並び: {column}という列はありません`,sortBadDirection:`並び: {column} の向き{direction}は使えません`,searchUnreadable:`検索の文字を読めませんでした`,searchLocked:`検索の文字は変えない設定です`,searchTooLong:`検索の文字は {limit} 字までです`,columnsLocked:`列の表示は変えない設定です`,unreadableColumns:`読めない列の指定({count} 件)は使えません`,cannotHideAll:`すべての列は隠せません`,operatorLabels:{"=":`に等しい`,"!=":`に等しくない`,">":`より大きい`,">=":`以上`,"<":`未満`,"<=":`以下`,between:`範囲`,contains:`を含む`,equals:`に等しい`,startsWith:`で始まる`,endsWith:`で終わる`,onOrAfter:`以降`,onOrBefore:`以前`,notEquals:`に等しくない`,preset:`今日・今月など`,blank:`空白`,notBlank:`空白でない`,in:`値を選ぶ`,notIn:`値を除く`,clear:`外す`}},t=t=>{if(!t)return e;let n={...e};for(let e of Object.keys(t))t[e]!=null&&(n[e]=t[e]);return n};exports.DEFAULT_GRID_ASK_LOCALE_TEXT=e,exports.resolveGridAskLocaleText=t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={...require("./localeTextFilters.cjs").DEFAULT_FILTER_LOCALE_TEXT,placeholder:`ことばで絞り込み・並べ替え(例: 今月の分を金額の高い順に)`,label:`ことばで絞り込み`,submit:`聞く`,stop:`止める`,examples:`例:`,thinking:`考えています…`,escHint:`Esc でも止まります`,retry:`もう一度`,appliedTitle:`反映した条件`,undo:`元に戻す`,close:`閉じる`,removeItem:`{label} {text} を外す`,allRemoved:`条件はすべて外れています。`,unchanged:`変える条件はありませんでした。`,undone:`元に戻しました。`,droppedTitle:`使えなかった部分`,fromAi:`AI から: {text}`,askFailed:`AI に聞けませんでした。もう一度試してください。`,noGrid:`表が見つかりませんでした。表が出てから、もう一度試してください。`,changedNotice:`表の条件が変わったので、ここからは変えられません。表のフィルターや並びで直してください。`,itemSort:`並び`,itemSortEntry:`{column} {direction}`,ascending:`昇順`,descending:`降順`,itemSearch:`検索`,itemHidden:`隠した列`,quote:`「{text}」`,quoteSeparator:``,emptyText:`(空)`,unnamed:`(名前なし)`,andMore:`{items}ほか {count} 件`,moreReasons:`ほか {count} 件`,columnReason:`{column}: {reason}`,readError:`AI の答えを読めませんでした。言い方を変えて、もう一度試してください。`,shapeError:`AI の答えが表への指示になっていませんでした。言い方を変えてください。`,filtersLocked:`列の条件は変えない設定です`,noSuchColumn:`{column}という列はありません`,notFilterable:`この列では絞り込めません`,noOperator:`条件の種類がありません`,operatorUnavailable:`この列では{operator}の条件は使えません`,oneCondition:`条件は 1 列に 1 つまでです`,oneSelection:`値の選択は 1 列に 1 つまでです`,unreadableFilters:`読めない条件({count} 件)は使えません`,noNumberRange:`範囲の両端の数がありません`,notNumber:`{value}は数として読めません`,noText:`探す文字がありません`,textTooLong:`探す文字は {limit} 字までです`,unknownPeriod:`{value}という期間は使えません`,noDateRange:`範囲の両端の日付がありません`,notDate:`{value}は日付として読めません`,noValues:`選ぶ値がありません`,noSelectableValues:`選べる値がありません`,tooManyValues:`選べる値は {limit} 件までです({count} 件は使いませんでした)`,notInOptions:`{values}は候補にありません`,notAnOption:`{value}は候補にありません`,cannotFilterBy:`{value}では絞り込めません`,valueTooLong:`{limit} 字を超える値は使えません`,valuesTooLong:`{limit} 字を超える値({count} 件)は使えません`,unreadableValues:`値として読めないもの({count} 件)は使えません`,sortLocked:`並びは変えない設定です`,sortNoSuchColumn:`並び: {column}という列はありません`,sortBadDirection:`並び: {column} の向き{direction}は使えません`,sortUnreadable:`並びを読めませんでした`,searchUnreadable:`検索の文字を読めませんでした`,searchLocked:`検索の文字は変えない設定です`,searchTooLong:`検索の文字は {limit} 字までです`,columnsLocked:`列の表示は変えない設定です`,unreadableColumns:`読めない列の指定({count} 件)は使えません`,cannotHideAll:`すべての列は隠せません`,operatorLabels:{"=":`に等しい`,"!=":`に等しくない`,">":`より大きい`,">=":`以上`,"<":`未満`,"<=":`以下`,between:`範囲`,contains:`を含む`,equals:`に等しい`,startsWith:`で始まる`,endsWith:`で終わる`,onOrAfter:`以降`,onOrBefore:`以前`,notEquals:`に等しくない`,preset:`今日・今月など`,blank:`空白`,notBlank:`空白でない`,in:`値を選ぶ`,notIn:`値を除く`,clear:`外す`}},t=t=>{if(!t)return e;let n={...e};for(let e of Object.keys(t))t[e]!=null&&(n[e]=t[e]);return n};exports.DEFAULT_GRID_ASK_LOCALE_TEXT=e,exports.resolveGridAskLocaleText=t;
@@ -183,6 +183,8 @@ export type GridAskLocaleText = Pick<GridLocaleText, FilterLocaleTextKey> & {
183
183
  column: string;
184
184
  direction: string;
185
185
  }>;
186
+ /** 並びが読めない(配列でない)。既定 `並びを読めませんでした`、英語 `Couldn't read the sort order`。 */
187
+ sortUnreadable: string;
186
188
  /** 検索の文字が読めない。既定 `検索の文字を読めませんでした`、英語 `Couldn't read the search text`。 */
187
189
  searchUnreadable: string;
188
190
  /** `allowSearch: false` のとき。既定 `検索の文字は変えない設定です`、英語 `The search text is locked`。 */
@@ -64,6 +64,7 @@ var t = {
64
64
  sortLocked: "並びは変えない設定です",
65
65
  sortNoSuchColumn: "並び: {column}という列はありません",
66
66
  sortBadDirection: "並び: {column} の向き{direction}は使えません",
67
+ sortUnreadable: "並びを読めませんでした",
67
68
  searchUnreadable: "検索の文字を読めませんでした",
68
69
  searchLocked: "検索の文字は変えない設定です",
69
70
  searchTooLong: "検索の文字は {limit} 字までです",
@@ -22,8 +22,8 @@ export declare const dropUnknownColumnKeys: (patch: NormalizedGridStatePatch, kn
22
22
  export declare const applyColumnState: <T>(currentColumns: GridColumn<T>[], savedColumnState: GridColumnState[], savedWidths: Record<string, number>) => GridColumn<T>[];
23
23
  export declare const restoreColumnsFromState: <C extends {
24
24
  key: string;
25
- visible?: boolean;
26
- pinned?: GridColumnPinned;
25
+ visible?: boolean | undefined;
26
+ pinned?: GridColumnPinned | undefined;
27
27
  }>(columns: readonly C[], state: unknown) => C[];
28
28
  export declare const isSameColumnFilterValue: (a: ColumnFilterValue, b: ColumnFilterValue) => boolean;
29
29
  export declare const isSameFilterState: (a: GridFilterState, b: GridFilterState) => boolean;
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./localeTextFilters.cjs");var t={...e.DEFAULT_FILTER_LOCALE_TEXT,rowCount:`行 {shown} / {total}`,columnCount:`列 {shown} / {total}`,filterSummary:`絞り込み: {value}`,filterGlobal:`「{text}」`,filterColumns:`{count} 列`,sortSummary:`並び替え: {value}`,sortEntry:`{column}({direction})`,sortAscending:`昇順`,sortDescending:`降順`,activeCell:`セル {cell}`,selection:`範囲 {range}`,selectionSize:`{cells} セル / {rows} 行`,selectedColumns:`{count} 列`,detailColumnName:`詳細`,rowDragColumnName:`移動`,none:`なし`,listSeparator:`、`,globalFilterPlaceholder:`グローバルフィルター`,globalFilterLabel:`表全体を検索`,clearGlobalFilter:`フィルターをクリア`,toggleFilterPanel:`フィルター管理パネルを開閉`,clear:`クリア`,close:`閉じる`,retry:`再試行`,noOptions:`候補がありません`,noRows:`表示する行がありません`,noMatchingRows:`一致する行がありません`,selectAllRows:`すべての行を選択`,selectRow:`行 {row} を選択`,sortedAscending:`昇順で並び替え中`,sortedDescending:`降順で並び替え中`,sortPriority:` (優先度 {priority})`,columnFiltered:`フィルター適用中`,dragColumn:`ドラッグで列を移動`,columnMenu:`列メニュー`,columnMenuFor:`{column} の列メニュー`,showDetails:`詳細を開く`,hideDetails:`詳細を閉じる`,editCell:`{column} を編集`,cellInput:`セルへの入力`,sizingColumns:`列幅を計算中…`,applyingFilter:`適用中 {percent}%`,resetColumnsHint:`すべての列の幅・固定・表示・並び順・グループ化を初期状態に戻します`,toolPanelFilters:`フィルター`,toolPanelSort:`並び替え`,toolPanelColumns:`列`,invalidValue:`入力値が不正です`,enterNumber:`数値で入力してください`,enterInteger:`整数で入力してください`,enterMin:`{min} 以上で入力してください`,enterMax:`{max} 以下で入力してください`,enterRange:`{min}〜{max} で入力してください`,saveFailedCell:`保存に失敗しました。値を戻しました`,totalRowLabel:`合計`,totalAverage:`平均`,totalMin:`最小`,totalMax:`最大`,totalCount:`個数`,exportSubtotal:`{label} 小計`},n=(e=t)=>{let n,a=e;return t=>t===n||i(t,n)?(n=t,a):(n=t,a=t===void 0?e:{...e,...r(t)},a)},r=e=>{let t={};for(let n of Object.keys(e)){let r=e[n];(typeof r==`string`||typeof r==`function`||Array.isArray(r))&&(t[n]=r)}return t},i=(e,t)=>{if(e===void 0||t===void 0)return e===t;let n=Object.keys(e);return n.length===Object.keys(t).length?n.every(n=>a(e[n],t[n])):!1},a=(e,t)=>e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>e===t[n]);exports.DEFAULT_GRID_LOCALE_TEXT=t,exports.createLocaleTextResolver=n,exports.formatLocaleText=e.formatLocaleText,exports.withoutUndefined=r;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./localeTextFilters.cjs");var t={...e.DEFAULT_FILTER_LOCALE_TEXT,rowCount:`行 {shown} / {total}`,columnCount:`列 {shown} / {total}`,filterSummary:`絞り込み: {value}`,filterGlobal:`「{text}」`,filterColumns:`{count} 列`,sortSummary:`並び替え: {value}`,sortEntry:`{column}({direction})`,sortAscending:`昇順`,sortDescending:`降順`,activeCell:`セル {cell}`,selection:`範囲 {range}`,selectionSize:`{cells} セル / {rows} 行`,selectedColumns:`{count} 列`,detailColumnName:`詳細`,rowDragColumnName:`移動`,none:`なし`,listSeparator:`、`,globalFilterPlaceholder:`グローバルフィルター`,globalFilterLabel:`表全体を検索`,clearGlobalFilter:`フィルターをクリア`,toggleFilterPanel:`フィルター管理パネルを開閉`,clear:`クリア`,close:`閉じる`,retry:`再試行`,noOptions:`候補がありません`,noRows:`表示する行がありません`,noMatchingRows:`一致する行がありません`,selectAllRows:`すべての行を選択`,selectRow:`行 {row} を選択`,sortedAscending:`昇順で並び替え中`,sortedDescending:`降順で並び替え中`,sortPriority:` (優先度 {priority})`,columnFiltered:`フィルター適用中`,dragColumn:`ドラッグで列を移動`,columnMenu:`列メニュー`,columnMenuFor:`{column} の列メニュー`,showDetails:`詳細を開く`,hideDetails:`詳細を閉じる`,editCell:`{column} を編集`,cellInput:`セルへの入力`,sizingColumns:`列幅を計算中…`,applyingFilter:`適用中 {percent}%`,resetColumnsHint:`すべての列の幅・固定・表示・並び順・グループ化を初期状態に戻します`,toolPanelFilters:`フィルター`,toolPanelSort:`並び替え`,toolPanelColumns:`列`,invalidValue:`入力値が不正です`,enterNumber:`数値で入力してください`,enterInteger:`整数で入力してください`,enterMin:`{min} 以上で入力してください`,enterMax:`{max} 以下で入力してください`,enterRange:`{min}〜{max} で入力してください`,enterDate:`日付で入力してください(例: 2026/3/15)`,saveFailedCell:`保存に失敗しました。値を戻しました`,totalRowLabel:`合計`,totalAverage:`平均`,totalMin:`最小`,totalMax:`最大`,totalCount:`個数`,exportSubtotal:`{label} 小計`},n=(e=t)=>{let n,a=e;return t=>t===n||i(t,n)?(n=t,a):(n=t,a=t===void 0?e:{...e,...r(t)},a)},r=e=>{let t={};for(let n of Object.keys(e)){let r=e[n];(typeof r==`string`||typeof r==`function`||Array.isArray(r))&&(t[n]=r)}return t},i=(e,t)=>{if(e===void 0||t===void 0)return e===t;let n=Object.keys(e);return n.length===Object.keys(t).length?n.every(n=>a(e[n],t[n])):!1},a=(e,t)=>e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>e===t[n]);exports.DEFAULT_GRID_LOCALE_TEXT=t,exports.createLocaleTextResolver=n,exports.formatLocaleText=e.formatLocaleText,exports.withoutUndefined=r;