@ishibashi0112/spreadsheet-grid-core 1.0.2 → 1.2.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.
- package/dist/controllers/activeRowFollowController.cjs +1 -0
- package/dist/controllers/activeRowFollowController.d.ts +18 -0
- package/dist/controllers/activeRowFollowController.js +68 -0
- package/dist/controllers/autoHeightMeasurer.cjs +1 -1
- package/dist/controllers/autoHeightMeasurer.js +17 -17
- package/dist/controllers/clipboardController.cjs +1 -1
- package/dist/controllers/clipboardController.d.ts +4 -0
- package/dist/controllers/clipboardController.js +82 -54
- package/dist/controllers/columnAutosizeRunner.cjs +1 -1
- package/dist/controllers/columnAutosizeRunner.d.ts +1 -0
- package/dist/controllers/columnAutosizeRunner.js +17 -16
- package/dist/controllers/columnHeaderDragController.cjs +1 -1
- package/dist/controllers/columnHeaderDragController.js +169 -168
- package/dist/controllers/columnMenuController.cjs +1 -1
- package/dist/controllers/columnMenuController.js +71 -69
- package/dist/controllers/contextMenuController.cjs +1 -1
- package/dist/controllers/contextMenuController.d.ts +5 -1
- package/dist/controllers/contextMenuController.js +62 -40
- package/dist/controllers/editController.cjs +1 -1
- package/dist/controllers/editController.d.ts +1 -0
- package/dist/controllers/editController.js +106 -99
- package/dist/controllers/fillHandleController.cjs +1 -1
- package/dist/controllers/fillHandleController.d.ts +1 -0
- package/dist/controllers/fillHandleController.js +157 -157
- package/dist/controllers/filterPopoverController.cjs +1 -1
- package/dist/controllers/filterPopoverController.js +6 -6
- package/dist/controllers/findController.cjs +1 -1
- package/dist/controllers/findController.d.ts +1 -0
- package/dist/controllers/findController.js +16 -15
- package/dist/controllers/historyController.cjs +1 -1
- package/dist/controllers/historyController.d.ts +6 -0
- package/dist/controllers/historyController.js +79 -37
- package/dist/controllers/imeInputController.cjs +1 -1
- package/dist/controllers/imeInputController.js +65 -54
- package/dist/controllers/keyboardController.cjs +1 -1
- package/dist/controllers/keyboardController.d.ts +1 -0
- package/dist/controllers/keyboardController.js +46 -42
- package/dist/controllers/pointerInteractionsController.cjs +1 -1
- package/dist/controllers/pointerInteractionsController.d.ts +1 -0
- package/dist/controllers/pointerInteractionsController.js +172 -172
- package/dist/controllers/popoverSupport.cjs +1 -1
- package/dist/controllers/popoverSupport.d.ts +1 -0
- package/dist/controllers/popoverSupport.js +9 -4
- package/dist/controllers/rowDragController.cjs +1 -1
- package/dist/controllers/rowDragController.d.ts +2 -0
- package/dist/controllers/rowDragController.js +160 -146
- package/dist/controllers/scrollSyncController.cjs +1 -1
- package/dist/controllers/scrollSyncController.js +45 -43
- package/dist/controllers/serverSideRowModel.cjs +1 -1
- package/dist/controllers/serverSideRowModel.js +19 -19
- package/dist/controllers/toolPanelController.cjs +1 -1
- package/dist/controllers/toolPanelController.js +26 -14
- package/dist/controllers/tooltipController.cjs +1 -1
- package/dist/controllers/tooltipController.js +74 -72
- package/dist/controllers/viewportSyncController.cjs +1 -1
- package/dist/controllers/viewportSyncController.d.ts +4 -1
- package/dist/controllers/viewportSyncController.js +66 -28
- package/dist/engine/columnCommands.cjs +1 -1
- package/dist/engine/columnCommands.js +113 -113
- package/dist/engine/createGridEngine.cjs +3 -3
- package/dist/engine/createGridEngine.d.ts +2 -0
- package/dist/engine/createGridEngine.js +72 -70
- package/dist/engine/exportCommands.cjs +1 -1
- package/dist/engine/exportCommands.js +18 -9
- package/dist/engine/fullFeatures.cjs +1 -1
- package/dist/engine/fullFeatures.js +6 -6
- package/dist/engine/gridApi.cjs +6 -6
- package/dist/engine/gridApi.d.ts +8 -2
- package/dist/engine/gridApi.js +197 -187
- package/dist/engine/notifiers.cjs +1 -1
- package/dist/engine/notifiers.d.ts +4 -0
- package/dist/engine/notifiers.js +7 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +7 -6
- package/dist/locales/en.cjs +1 -1
- package/dist/locales/en.js +5 -0
- package/dist/logic/autoScrollGeometry.cjs +1 -1
- package/dist/logic/autoScrollGeometry.d.ts +2 -0
- package/dist/logic/autoScrollGeometry.js +3 -3
- package/dist/logic/editorValues.cjs +1 -1
- package/dist/logic/editorValues.js +37 -34
- package/dist/logic/exportCsv.cjs +3 -3
- package/dist/logic/exportCsv.d.ts +4 -1
- package/dist/logic/exportCsv.js +22 -20
- package/dist/logic/exportData.cjs +1 -1
- package/dist/logic/exportData.d.ts +4 -1
- package/dist/logic/exportData.js +40 -36
- package/dist/logic/filtering.cjs +1 -1
- package/dist/logic/filtering.d.ts +2 -1
- package/dist/logic/filtering.js +16 -3
- package/dist/logic/geometry.cjs +1 -1
- package/dist/logic/geometry.d.ts +2 -0
- package/dist/logic/geometry.js +41 -20
- package/dist/logic/gridState.cjs +1 -1
- package/dist/logic/gridState.d.ts +3 -2
- package/dist/logic/gridState.js +32 -23
- package/dist/logic/groupExport.cjs +1 -1
- package/dist/logic/groupExport.js +28 -27
- package/dist/logic/grouping.cjs +1 -1
- package/dist/logic/grouping.d.ts +1 -0
- package/dist/logic/grouping.js +52 -41
- package/dist/logic/historyRebase.cjs +1 -0
- package/dist/logic/historyRebase.d.ts +5 -0
- package/dist/logic/historyRebase.js +36 -0
- package/dist/logic/imeInput.cjs +1 -1
- package/dist/logic/imeInput.js +6 -4
- package/dist/logic/localeTextFeatures.cjs +1 -1
- package/dist/logic/localeTextFeatures.d.ts +8 -0
- package/dist/logic/localeTextFeatures.js +11 -5
- package/dist/logic/localeTextPopups.cjs +1 -1
- package/dist/logic/localeTextPopups.d.ts +1 -0
- package/dist/logic/localeTextPopups.js +1 -0
- package/dist/logic/pasteFill.cjs +1 -0
- package/dist/logic/pasteFill.d.ts +2 -0
- package/dist/logic/pasteFill.js +25 -0
- package/dist/logic/selectEditorState.cjs +1 -1
- package/dist/logic/selectEditorState.d.ts +4 -1
- package/dist/logic/selectEditorState.js +14 -14
- package/dist/logic/selectLabels.cjs +1 -0
- package/dist/logic/selectLabels.d.ts +3 -0
- package/dist/logic/selectLabels.js +41 -0
- package/dist/logic/selectionAggregates.cjs +1 -1
- package/dist/logic/selectionAggregates.js +2 -3
- package/dist/logic/validation.cjs +1 -1
- package/dist/logic/validation.d.ts +1 -1
- package/dist/logic/validation.js +21 -21
- package/dist/logic/valueParsers.cjs +1 -0
- package/dist/logic/valueParsers.d.ts +14 -0
- package/dist/logic/valueParsers.js +23 -0
- package/dist/model/gridActions.cjs +1 -1
- package/dist/model/gridActions.d.ts +13 -0
- package/dist/model/gridActions.js +11 -0
- package/dist/model/gridReducer.cjs +1 -1
- package/dist/model/gridReducer.js +128 -65
- package/dist/model/gridTypes.core.d.ts +345 -43
- package/dist/utils/clipboard.cjs +4 -4
- package/dist/utils/clipboard.d.ts +14 -2
- package/dist/utils/clipboard.js +101 -49
- package/dist/utils/gridVisibleBand.cjs +1 -0
- package/dist/utils/gridVisibleBand.d.ts +4 -0
- package/dist/utils/gridVisibleBand.js +24 -0
- package/dist/utils/popupContainer.cjs +1 -0
- package/dist/utils/popupContainer.d.ts +8 -0
- package/dist/utils/popupContainer.js +60 -0
- package/dist/utils/scrollBottom.cjs +1 -0
- package/dist/utils/scrollBottom.d.ts +1 -0
- package/dist/utils/scrollBottom.js +4 -0
- package/dist/utils/topAlignedInput.cjs +1 -0
- package/dist/utils/topAlignedInput.d.ts +3 -0
- package/dist/utils/topAlignedInput.js +23 -0
- package/package.json +1 -1
package/dist/logic/grouping.js
CHANGED
|
@@ -2,23 +2,34 @@ import { getCellValue as e } from "../utils/permissions.js";
|
|
|
2
2
|
import { compareSortValues as t } from "./sorting.js";
|
|
3
3
|
import { accumulateBuiltinAgg as n, createBuiltinAggAccumulator as r, finalizeBuiltinAgg as i, isBuiltinAggFuncName as a } from "./aggregation.js";
|
|
4
4
|
//#region src/logic/grouping.ts
|
|
5
|
-
var o = "(空白)", s =
|
|
5
|
+
var o = "(空白)", s = (e, t, n) => {
|
|
6
|
+
let r = e.groupLabel;
|
|
7
|
+
return typeof r == "function" ? r({
|
|
8
|
+
value: t,
|
|
9
|
+
row: n,
|
|
10
|
+
column: e
|
|
11
|
+
}) : r === "formatted" && e.valueFormatter ? e.valueFormatter({
|
|
12
|
+
value: t,
|
|
13
|
+
row: n,
|
|
14
|
+
column: e
|
|
15
|
+
}) : String(t);
|
|
16
|
+
}, c = "__ssg-group__:", l = "__ssg_group__", u = (e) => c + e.groupKey, d = (e) => e < 0, f = (e) => -e - 1, p = (e) => {
|
|
6
17
|
if (e == null || e === "") return "e";
|
|
7
18
|
let t = typeof e;
|
|
8
19
|
return `${t === "number" ? "n" : t === "boolean" ? "b" : t === "string" ? "s" : "o"}:${String(e)}`;
|
|
9
|
-
},
|
|
20
|
+
}, m = (e) => ({
|
|
10
21
|
groupColumns: e.filter((e) => e.rowGroup === !0),
|
|
11
22
|
aggColumns: e.filter((e) => e.aggFunc != null)
|
|
12
|
-
}),
|
|
13
|
-
let
|
|
14
|
-
let
|
|
15
|
-
return
|
|
23
|
+
}), h = (t, c, l, u, d) => {
|
|
24
|
+
let f = l.length, m = u.length, h = u.map((e) => typeof e.aggFunc == "function"), _ = h.includes(!0), v = [], y = /* @__PURE__ */ new Map(), b = 0, x = (e, t, n, i, a, c) => {
|
|
25
|
+
let l = `${t.key}\u0001${n}`, d = n === "e";
|
|
26
|
+
return b += 1, {
|
|
16
27
|
groupRow: {
|
|
17
28
|
kind: "group",
|
|
18
|
-
groupKey: e === null ?
|
|
29
|
+
groupKey: e === null ? l : `${e}\u001e${l}`,
|
|
19
30
|
columnKey: t.key,
|
|
20
|
-
value:
|
|
21
|
-
label:
|
|
31
|
+
value: d ? null : i,
|
|
32
|
+
label: d ? o : s(t, i, c),
|
|
22
33
|
level: a,
|
|
23
34
|
leafCount: 0,
|
|
24
35
|
aggregates: {}
|
|
@@ -26,48 +37,48 @@ var o = "(空白)", s = "__ssg-group__:", c = "__ssg_group__", l = (e) => s + e.
|
|
|
26
37
|
children: [],
|
|
27
38
|
childIndex: /* @__PURE__ */ new Map(),
|
|
28
39
|
leafSourceIndexes: [],
|
|
29
|
-
accumulators:
|
|
30
|
-
customValues:
|
|
40
|
+
accumulators: u.map(() => r()),
|
|
41
|
+
customValues: h.map((e) => e ? [] : null),
|
|
31
42
|
customRows: []
|
|
32
43
|
};
|
|
33
|
-
},
|
|
34
|
-
for (let r = 0; r <
|
|
35
|
-
let i =
|
|
36
|
-
if (
|
|
37
|
-
o = Array(
|
|
38
|
-
for (let t = 0; t <
|
|
44
|
+
}, S = c.length;
|
|
45
|
+
for (let r = 0; r < S; r += 1) {
|
|
46
|
+
let i = c[r], a = t[i], o = null;
|
|
47
|
+
if (m > 0) {
|
|
48
|
+
o = Array(m);
|
|
49
|
+
for (let t = 0; t < m; t += 1) o[t] = e(a, u[t]);
|
|
39
50
|
}
|
|
40
|
-
let
|
|
41
|
-
for (let t = 0; t <
|
|
42
|
-
let r =
|
|
43
|
-
if (
|
|
44
|
-
for (let e = 0; e <
|
|
45
|
-
n(
|
|
46
|
-
let t =
|
|
51
|
+
let s = v, d = y, h = null;
|
|
52
|
+
for (let t = 0; t < f; t += 1) {
|
|
53
|
+
let r = l[t], c = e(a, r), u = p(c), g = d.get(u);
|
|
54
|
+
if (g || (g = x(h, r, u, c, t, a), s.push(g), d.set(u, g)), g.groupRow.leafCount += 1, o !== null) {
|
|
55
|
+
for (let e = 0; e < m; e += 1) {
|
|
56
|
+
n(g.accumulators[e], o[e]);
|
|
57
|
+
let t = g.customValues[e];
|
|
47
58
|
t !== null && t.push(o[e]);
|
|
48
59
|
}
|
|
49
|
-
|
|
60
|
+
_ && g.customRows.push(a);
|
|
50
61
|
}
|
|
51
|
-
t ===
|
|
62
|
+
t === f - 1 && g.leafSourceIndexes.push(i), s = g.children, d = g.childIndex, h = g.groupRow.groupKey;
|
|
52
63
|
}
|
|
53
64
|
}
|
|
54
|
-
let
|
|
55
|
-
for (let t = 0; t <
|
|
56
|
-
let n =
|
|
57
|
-
|
|
65
|
+
let C = (e) => {
|
|
66
|
+
for (let t = 0; t < m; t += 1) {
|
|
67
|
+
let n = u[t];
|
|
68
|
+
h[t] ? e.groupRow.aggregates[n.key] = n.aggFunc({
|
|
58
69
|
values: e.customValues[t] ?? [],
|
|
59
70
|
rows: e.customRows,
|
|
60
71
|
column: n
|
|
61
72
|
}) : a(n.aggFunc) && (e.groupRow.aggregates[n.key] = i(n.aggFunc, e.accumulators[t]));
|
|
62
73
|
}
|
|
63
|
-
for (let t of e.children)
|
|
74
|
+
for (let t of e.children) C(t);
|
|
64
75
|
};
|
|
65
|
-
for (let e of
|
|
66
|
-
return
|
|
67
|
-
roots:
|
|
68
|
-
groupCount:
|
|
76
|
+
for (let e of v) C(e);
|
|
77
|
+
return d !== void 0 && d.length > 0 && m > 0 && g(v, 0, d, l, u), {
|
|
78
|
+
roots: v,
|
|
79
|
+
groupCount: b
|
|
69
80
|
};
|
|
70
|
-
},
|
|
81
|
+
}, g = (e, n, r, i, a) => {
|
|
71
82
|
if (e.length === 0) return;
|
|
72
83
|
let o = [];
|
|
73
84
|
for (let e of r) {
|
|
@@ -83,8 +94,8 @@ var o = "(空白)", s = "__ssg-group__:", c = "__ssg_group__", l = (e) => s + e.
|
|
|
83
94
|
if (a !== 0) return a;
|
|
84
95
|
}
|
|
85
96
|
return 0;
|
|
86
|
-
}), n + 1 < i.length) for (let t of e)
|
|
87
|
-
},
|
|
97
|
+
}), n + 1 < i.length) for (let t of e) g(t.children, n + 1, r, i, a);
|
|
98
|
+
}, _ = (e, t) => {
|
|
88
99
|
let n = [], r = [], i = (e) => {
|
|
89
100
|
if (r.push(e.groupRow), n.push(-r.length), !t.has(e.groupRow.groupKey)) {
|
|
90
101
|
if (e.children.length > 0) {
|
|
@@ -99,13 +110,13 @@ var o = "(空白)", s = "__ssg-group__:", c = "__ssg_group__", l = (e) => s + e.
|
|
|
99
110
|
displayOrder: Int32Array.from(n),
|
|
100
111
|
groups: r
|
|
101
112
|
};
|
|
102
|
-
},
|
|
113
|
+
}, v = (e) => {
|
|
103
114
|
let t = [], n = (e) => {
|
|
104
115
|
t.push(e.groupRow);
|
|
105
116
|
for (let t of e.children) n(t);
|
|
106
117
|
};
|
|
107
118
|
for (let t of e.roots) n(t);
|
|
108
119
|
return t;
|
|
109
|
-
},
|
|
120
|
+
}, y = (e) => v(e).map((e) => e.groupKey);
|
|
110
121
|
//#endregion
|
|
111
|
-
export {
|
|
122
|
+
export { l as GROUP_AUTO_COLUMN_KEY, o as GROUP_EMPTY_LABEL, c as GROUP_ROW_KEY_PREFIX, h as buildGroupTree, y as collectAllGroupKeys, v as collectAllGroupRows, m as collectGroupingColumns, _ as flattenGroupTree, f as groupIndexOfOrderValue, u as groupRowKey, d as isGroupOrderValue, s as resolveGroupLabel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=e=>typeof e==`object`&&!!e,t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n=(n,r,i)=>{if(i===r)return n;if(!e(n)||!e(r)||!e(i))return i;let a=null;for(let e of new Set([...Object.keys(n),...Object.keys(r)])){let o=t(r,e);t(n,e)===o&&Object.is(n[e],r[e])||t(i,e)!==o||!Object.is(i[e],r[e])||(a??=Array.isArray(i)?i.slice():{...i},t(n,e)?a[e]=n[e]:delete a[e])}return a??i},r=Symbol(`start`);function i(e,t,i,a){if(i===t)return e;let o=e=>{let t=new Map;return e.forEach((e,n)=>t.set(a(e,n),e)),t},s=o(e),c=o(t),l=o(i);if(s.size!==e.length||c.size!==t.length||l.size!==i.length)return e;let u=[...s.keys()],d=[...l.keys()],f=e=>s.has(e)&&!c.has(e)&&!l.has(e),p=u.filter(e=>c.has(e)),m=[...c.keys()].filter(e=>s.has(e)).some((e,t)=>!Object.is(p[t],e)),[h,g]=m?[u,d]:[d,u],_=m?e=>s.has(e)&&(l.has(e)||f(e)):e=>l.has(e)&&!(c.has(e)&&!s.has(e)),v=m?e=>!s.has(e)&&!c.has(e):f,y=new Map,b=r;for(let e of g)if(v(e)){let t=y.get(b);t?t.push(e):y.set(b,[e])}else _(e)&&(b=e);let x=[],S=e=>{if(e!==r){let t=l.get(e),r=s.get(e),i=c.get(e);x.push(l.has(e)?s.has(e)&&c.has(e)?n(r,i,t):t:r)}for(let t of y.get(e)??[])S(t)};S(r);for(let e of h)_(e)&&S(e);return x.length===i.length&&x.every((e,t)=>e===i[t])?i:x}exports.revertRowsChange=i;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/logic/historyRebase.ts
|
|
2
|
+
var e = (e) => typeof e == "object" && !!e, t = (e, t) => Object.prototype.hasOwnProperty.call(e, t), n = (n, r, i) => {
|
|
3
|
+
if (i === r) return n;
|
|
4
|
+
if (!e(n) || !e(r) || !e(i)) return i;
|
|
5
|
+
let a = null;
|
|
6
|
+
for (let e of /* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])) {
|
|
7
|
+
let o = t(r, e);
|
|
8
|
+
t(n, e) === o && Object.is(n[e], r[e]) || t(i, e) !== o || !Object.is(i[e], r[e]) || (a ??= Array.isArray(i) ? i.slice() : { ...i }, t(n, e) ? a[e] = n[e] : delete a[e]);
|
|
9
|
+
}
|
|
10
|
+
return a ?? i;
|
|
11
|
+
}, r = Symbol("start");
|
|
12
|
+
function i(e, t, i, a) {
|
|
13
|
+
if (i === t) return e;
|
|
14
|
+
let o = (e) => {
|
|
15
|
+
let t = /* @__PURE__ */ new Map();
|
|
16
|
+
return e.forEach((e, n) => t.set(a(e, n), e)), t;
|
|
17
|
+
}, s = o(e), c = o(t), l = o(i);
|
|
18
|
+
if (s.size !== e.length || c.size !== t.length || l.size !== i.length) return e;
|
|
19
|
+
let u = [...s.keys()], d = [...l.keys()], f = (e) => s.has(e) && !c.has(e) && !l.has(e), p = u.filter((e) => c.has(e)), m = [...c.keys()].filter((e) => s.has(e)).some((e, t) => !Object.is(p[t], e)), [h, g] = m ? [u, d] : [d, u], _ = m ? (e) => s.has(e) && (l.has(e) || f(e)) : (e) => l.has(e) && !(c.has(e) && !s.has(e)), v = m ? (e) => !s.has(e) && !c.has(e) : f, y = /* @__PURE__ */ new Map(), b = r;
|
|
20
|
+
for (let e of g) if (v(e)) {
|
|
21
|
+
let t = y.get(b);
|
|
22
|
+
t ? t.push(e) : y.set(b, [e]);
|
|
23
|
+
} else _(e) && (b = e);
|
|
24
|
+
let x = [], S = (e) => {
|
|
25
|
+
if (e !== r) {
|
|
26
|
+
let t = l.get(e), r = s.get(e), i = c.get(e);
|
|
27
|
+
x.push(l.has(e) ? s.has(e) && c.has(e) ? n(r, i, t) : t : r);
|
|
28
|
+
}
|
|
29
|
+
for (let t of y.get(e) ?? []) S(t);
|
|
30
|
+
};
|
|
31
|
+
S(r);
|
|
32
|
+
for (let e of h) _(e) && S(e);
|
|
33
|
+
return x.length === i.length && x.every((e, t) => e === i[t]) ? i : x;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { i as revertRowsChange };
|
package/dist/logic/imeInput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./detailRow.cjs"),n=require("./editorValues.cjs");var r=(n,r)=>{let{rowModel:i,columns:a,readOnly:o,canEditCell:s}=n;if(r.row<0||r.row>=i.getRowCount()||i.getGroupRow?.(r.row)||i.getLabelRow?.(r.row))return!1;let c=a[r.col];if(!c||t.isSyntheticColumnKey(c.key)
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./detailRow.cjs"),n=require("./editorValues.cjs");var r=(n,r)=>{let{rowModel:i,columns:a,readOnly:o,canEditCell:s}=n;if(r.row<0||r.row>=i.getRowCount()||i.getGroupRow?.(r.row)||i.getLabelRow?.(r.row))return!1;let c=a[r.col];if(!c||t.isSyntheticColumnKey(c.key))return!1;let l=c.editor;if(l!==void 0&&l.type!==`text`&&l.type!==`number`&&!(l.type===`custom`&&l.imeDirectInput===!0))return!1;let u=i.getRow(r.row);return u?e.isViewCellEditable({readOnly:o,canEditCell:s},i,r.row,r.col,u,c):!1},i=(e,t,r)=>{if(e[t.col]?.editor?.type===`number`){let e=n.normalizeNumberText(r);return n.toNumberInputText(r)??(n.isNumberInputPrefix(e)?e:null)}return r};exports.canStartImeEdit=r,exports.resolveImeEditText=i;
|
package/dist/logic/imeInput.js
CHANGED
|
@@ -6,12 +6,14 @@ var a = (n, r) => {
|
|
|
6
6
|
let { rowModel: i, columns: a, readOnly: o, canEditCell: s } = n;
|
|
7
7
|
if (r.row < 0 || r.row >= i.getRowCount() || i.getGroupRow?.(r.row) || i.getLabelRow?.(r.row)) return !1;
|
|
8
8
|
let c = a[r.col];
|
|
9
|
-
if (!c || t(c.key)
|
|
10
|
-
let l =
|
|
11
|
-
|
|
9
|
+
if (!c || t(c.key)) return !1;
|
|
10
|
+
let l = c.editor;
|
|
11
|
+
if (l !== void 0 && l.type !== "text" && l.type !== "number" && !(l.type === "custom" && l.imeDirectInput === !0)) return !1;
|
|
12
|
+
let u = i.getRow(r.row);
|
|
13
|
+
return u ? e({
|
|
12
14
|
readOnly: o,
|
|
13
15
|
canEditCell: s
|
|
14
|
-
}, i, r.row, r.col,
|
|
16
|
+
}, i, r.row, r.col, u, c) : !1;
|
|
15
17
|
}, o = (e, t, a) => {
|
|
16
18
|
if (e[t.col]?.editor?.type === "number") {
|
|
17
19
|
let e = r(a);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={aggregateAverage:`平均`,aggregateCount:`データの個数`,aggregateSum:`合計`,aggregateComputing:`集計中… {percent}%`,aggregatePartial:`読み込み済みの行のみ`},t={clearAll:`すべてクリア`,groupedColumnTitle:`{column}(グループ化中)`,filterHiddenColumn:`(非表示列)`,filterGroupedColumn:`(グループ化中)`,filterJumpUnavailable:`非表示列のためジャンプ編集できません(× でクリアは可能)`,filterEditUnderGroup:`グループの列の見出しの下で編集`,filterJump:`この列へジャンプして編集`,filterEditFor:`{column} のフィルターを編集`,filterClear:`この列のフィルターをクリア`,filterClearFor:`{column} のフィルターをクリア`,filterCurrentNone:`(なし)`,filterCurrentExcluded:`{count}件を除外中`,filterCurrentSelected:`{count}件を選択中`},n={expandGroup:`{group} を展開`,collapseGroup:`{group} を折りたたみ`,groupRowCount:`({count}件)`},r={dragRow:`ドラッグで行を移動`,dragRowDisabled:`ソート / フィルター適用中は行を並び替えできません`,dragRowLabel:`行 {row}`},i={scrollHintRow:`行 {row}`,scrollHintJump:`行 {row} へ`,scrollHintJumpSeparator:`・`,scrollHintTenThousands:`{value}万`},
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={aggregateAverage:`平均`,aggregateCount:`データの個数`,aggregateSum:`合計`,aggregateComputing:`集計中… {percent}%`,aggregatePartial:`読み込み済みの行のみ`},t={clearAll:`すべてクリア`,groupedColumnTitle:`{column}(グループ化中)`,filterHiddenColumn:`(非表示列)`,filterGroupedColumn:`(グループ化中)`,filterJumpUnavailable:`非表示列のためジャンプ編集できません(× でクリアは可能)`,filterEditUnderGroup:`グループの列の見出しの下で編集`,filterJump:`この列へジャンプして編集`,filterEditFor:`{column} のフィルターを編集`,filterClear:`この列のフィルターをクリア`,filterClearFor:`{column} のフィルターをクリア`,filterCurrentNone:`(なし)`,filterCurrentExcluded:`{count}件を除外中`,filterCurrentSelected:`{count}件を選択中`},n={expandGroup:`{group} を展開`,collapseGroup:`{group} を折りたたみ`,groupRowCount:`({count}件)`},r={dragRow:`ドラッグで行を移動`,dragRowDisabled:`ソート / フィルター適用中は行を並び替えできません`,dragRowLabel:`行 {row}`},i={pinnedTopRow:`上に固定 {row}`,pinnedBottomRow:`下に固定 {row}`},a={contextMenuCell:`セルのメニュー`,contextMenuRow:`行のメニュー`},o={scrollHintRow:`行 {row}`,scrollHintJump:`行 {row} へ`,scrollHintJumpSeparator:`・`,scrollHintTenThousands:`{value}万`},s={menuFilter:`フィルター…`,menuSortAscending:`昇順で並び替え`,menuSortDescending:`降順で並び替え`,menuManageSort:`並び替えを管理…`,menuManageFilters:`フィルターを管理…`,menuGroupBy:`この列でグループ化`,menuUngroup:`グループ化を外す`,menuPin:`列の固定`,menuPinNone:`固定しない`,menuPinLeft:`左に固定`,menuPinRight:`右に固定`,menuPinUnavailable:`この表では列の固定を変えられません`,menuAutosize:`この列の幅を自動調整`,menuAutosizeAll:`すべての列の幅を自動調整`,menuColumns:`列の表示`,menuResetColumns:`列のリセット`,menuResetUnavailable:`この表では列をリセットできません`},c={findLabel:`セル内検索`,findPlaceholder:`検索`,findInput:`検索文字列`,findSearching:`検索中…`,findNoResults:`0 件`,findPrevious:`前のヒットへ`,findPreviousHint:`前へ(Shift+Enter)`,findNext:`次のヒットへ`,findNextHint:`次へ(Enter)`,findClose:`検索を閉じる`,findCloseHint:`閉じる(Esc)`},l={fillOptions:`オートフィル オプション`,fillOptionsCurrent:`オートフィル オプション({kind})`,fillSeries:`連続データ`,fillCopy:`セルのコピー`},u={loadFailed:`行の取得に失敗しました({count} ブロック)`,dismissLoadError:`エラー通知を閉じる`,saveFailed:`変更の保存に失敗しました({count} 行)。値を元に戻しました`,dismissSaveError:`保存エラー通知を閉じる`};exports.DEFAULT_AGGREGATES_LOCALE_TEXT=e,exports.DEFAULT_COLUMN_MENU_LOCALE_TEXT=s,exports.DEFAULT_CONTEXT_MENU_LOCALE_TEXT=a,exports.DEFAULT_FILL_HANDLE_LOCALE_TEXT=l,exports.DEFAULT_FILTERING_LOCALE_TEXT=t,exports.DEFAULT_FIND_LOCALE_TEXT=c,exports.DEFAULT_GROUPING_LOCALE_TEXT=n,exports.DEFAULT_PINNED_ROWS_LOCALE_TEXT=i,exports.DEFAULT_ROW_DRAG_LOCALE_TEXT=r,exports.DEFAULT_SCROLL_HINT_LOCALE_TEXT=o,exports.DEFAULT_SERVER_SIDE_LOCALE_TEXT=u;
|
|
@@ -30,6 +30,14 @@ export declare const DEFAULT_ROW_DRAG_LOCALE_TEXT: {
|
|
|
30
30
|
dragRowDisabled: string;
|
|
31
31
|
dragRowLabel: string;
|
|
32
32
|
};
|
|
33
|
+
export declare const DEFAULT_PINNED_ROWS_LOCALE_TEXT: {
|
|
34
|
+
pinnedTopRow: string;
|
|
35
|
+
pinnedBottomRow: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const DEFAULT_CONTEXT_MENU_LOCALE_TEXT: {
|
|
38
|
+
contextMenuCell: string;
|
|
39
|
+
contextMenuRow: string;
|
|
40
|
+
};
|
|
33
41
|
export declare const DEFAULT_SCROLL_HINT_LOCALE_TEXT: {
|
|
34
42
|
scrollHintRow: string;
|
|
35
43
|
scrollHintJump: string;
|
|
@@ -28,11 +28,17 @@ var e = {
|
|
|
28
28
|
dragRowDisabled: "ソート / フィルター適用中は行を並び替えできません",
|
|
29
29
|
dragRowLabel: "行 {row}"
|
|
30
30
|
}, i = {
|
|
31
|
+
pinnedTopRow: "上に固定 {row}",
|
|
32
|
+
pinnedBottomRow: "下に固定 {row}"
|
|
33
|
+
}, a = {
|
|
34
|
+
contextMenuCell: "セルのメニュー",
|
|
35
|
+
contextMenuRow: "行のメニュー"
|
|
36
|
+
}, o = {
|
|
31
37
|
scrollHintRow: "行 {row}",
|
|
32
38
|
scrollHintJump: "行 {row} へ",
|
|
33
39
|
scrollHintJumpSeparator: "・",
|
|
34
40
|
scrollHintTenThousands: "{value}万"
|
|
35
|
-
},
|
|
41
|
+
}, s = {
|
|
36
42
|
menuFilter: "フィルター…",
|
|
37
43
|
menuSortAscending: "昇順で並び替え",
|
|
38
44
|
menuSortDescending: "降順で並び替え",
|
|
@@ -50,7 +56,7 @@ var e = {
|
|
|
50
56
|
menuColumns: "列の表示",
|
|
51
57
|
menuResetColumns: "列のリセット",
|
|
52
58
|
menuResetUnavailable: "この表では列をリセットできません"
|
|
53
|
-
},
|
|
59
|
+
}, c = {
|
|
54
60
|
findLabel: "セル内検索",
|
|
55
61
|
findPlaceholder: "検索",
|
|
56
62
|
findInput: "検索文字列",
|
|
@@ -62,16 +68,16 @@ var e = {
|
|
|
62
68
|
findNextHint: "次へ(Enter)",
|
|
63
69
|
findClose: "検索を閉じる",
|
|
64
70
|
findCloseHint: "閉じる(Esc)"
|
|
65
|
-
},
|
|
71
|
+
}, l = {
|
|
66
72
|
fillOptions: "オートフィル オプション",
|
|
67
73
|
fillOptionsCurrent: "オートフィル オプション({kind})",
|
|
68
74
|
fillSeries: "連続データ",
|
|
69
75
|
fillCopy: "セルのコピー"
|
|
70
|
-
},
|
|
76
|
+
}, u = {
|
|
71
77
|
loadFailed: "行の取得に失敗しました({count} ブロック)",
|
|
72
78
|
dismissLoadError: "エラー通知を閉じる",
|
|
73
79
|
saveFailed: "変更の保存に失敗しました({count} 行)。値を元に戻しました",
|
|
74
80
|
dismissSaveError: "保存エラー通知を閉じる"
|
|
75
81
|
};
|
|
76
82
|
//#endregion
|
|
77
|
-
export { e as DEFAULT_AGGREGATES_LOCALE_TEXT,
|
|
83
|
+
export { e as DEFAULT_AGGREGATES_LOCALE_TEXT, s as DEFAULT_COLUMN_MENU_LOCALE_TEXT, a as DEFAULT_CONTEXT_MENU_LOCALE_TEXT, l as DEFAULT_FILL_HANDLE_LOCALE_TEXT, t as DEFAULT_FILTERING_LOCALE_TEXT, c as DEFAULT_FIND_LOCALE_TEXT, n as DEFAULT_GROUPING_LOCALE_TEXT, i as DEFAULT_PINNED_ROWS_LOCALE_TEXT, r as DEFAULT_ROW_DRAG_LOCALE_TEXT, o as DEFAULT_SCROLL_HINT_LOCALE_TEXT, u as DEFAULT_SERVER_SIDE_LOCALE_TEXT };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./localeTextFeatures.cjs");var t={apply:`適用`,columnsPinnedLeft:`左固定`,columnsUnpinned:`固定なし`,columnsPinnedRight:`右固定`,columnsHideAll:`すべての列を非表示(先頭の列は残ります)`,columnsShowAll:`すべての列を表示`,columnsDragToReorder:`ドラッグして並べ替え`,columnsDragWithinSection:`ドラッグして並べ替え(同じセクション内のみ)`,columnsReorderUnavailable:`この表では列を並べ替えられません`,columnsReorderWhileSearching:`検索中は並べ替えできません`,columnsGroupedHint:`グループ化している列です(値は自動グループ列に出ます)`,columnsSearchPlaceholder:`検索...`,columnsNoMatches:`該当する列がありません`,columnsReset:`すべての列を初期状態に戻す`,columnsUnavailable:`この表では列の表示/非表示とリセットは使えません`,globalFilterTitle:`グローバルフィルター`,globalFilterRows:`"{text}" を含む行`,clearGlobalFilterTitle:`グローバルフィルターをクリア`,noColumnFilters:`適用中の列フィルターはありません`,addFilterLabel:`フィルターを追加する列を選択`,addFilter:`+ フィルターを追加…`,addFilterNone:`+ 追加できる列がありません`,sortPanelEmpty:`並び替えは設定されていません`,sortPanelDrag:`ドラッグして優先順位を変更`,sortPanelDisabled:`並び替えが無効です`,sortPanelNeedsTwo:`レベルが 2 件以上のとき並べ替えできます`,sortPanelAscending:`昇順`,sortPanelAscendingShort:`昇順`,sortPanelDescending:`降順`,sortPanelDescendingShort:`降順`,sortPanelRemove:`このレベルを削除`,sortPanelAllUsed:`すべての列が並び替えに使われています`,sortPanelAddHint:`並び替えの基準を追加します`,sortPanelAdd:`+ 基準を追加`,sortPanelClearHint:`すべての並び替えを解除します`,sortPanelReadOnly:`並び替えが無効のため編集できません`,operatorEquals:`に等しい`,operatorNotEquals:`に等しくない`,operatorGreaterThanOrEqual:`以上`,operatorGreaterThan:`より大きい`,operatorLessThanOrEqual:`以下`,operatorLessThan:`未満`,operatorBetween:`範囲`,operatorContains:`を含む`,operatorStartsWith:`で始まる`,operatorEndsWith:`で終わる`,operatorOnOrAfter:`以降`,operatorOnOrBefore:`以前`,operatorBlank:`空白`,operatorNotBlank:`空白でない`,filterTitle:`列フィルター: {column}`,filterCollecting:`候補を収集中… {percent}%`,filterOptionsLoading:`候補を取得中…`,filterOptionsLoadingShort:`取得中…`,filterOptionsFailed:`候補の取得に失敗しました`,filterOptionsFailedShort:`取得失敗`,filterOptionsTruncated:`(先頭のみ・打ち切り)`,filterSearchPlaceholder:`検索(Enter で確定)`,filterSelectAll:`(すべて選択)`,filterSelectAllResults:`(検索結果をすべて選択)`,filterNoOptionsSource:`候補が未指定です(serverSide では列に filterOptions などの候補供給が必要)`,filterNoMatches:`一致する候補がありません`,filterSelectedCount:`選択中: {selected} / {total} 件`,filterShownCount:`(表示中 {count} 件)`,filterMatchCount:`一致 {count} 件`,filterTotalCount:`全 {count} 件`,filterOptionCount:`候補数: {count}`,filterAll:`(すべて)`,filterConditionSection:`条件`,filterValuesSection:`値`,filterOperator:`条件の演算子`,filterValue:`条件の値`,filterValuePlaceholder:`値`,filterMin:`下限`,filterMax:`上限`,filterRangeSeparator:`〜`,filterNoValue:`この演算子は値入力を使いません`,filterDate:`条件の日付`,filterStartDate:`開始日`,filterEndDate:`終了日`,filterTextPlaceholder:`部分一致で絞り込み`,filterTextHint:`部分一致検索です`,filterCurrentValue:`現在値: {value}`,treeExpand:`展開する`,treeCollapse:`折りたたむ`,dateTreeYear:`{year} 年`,dateTreeMonth:`{month} 月`,dateTreeDay:`{day} 日`,calendarWeekdays:[`日`,`月`,`火`,`水`,`木`,`金`,`土`],calendarMonths:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],calendarTitle:`{year}年 {month}月`,calendarYear:`{year}年`,calendarOpen:`カレンダーを開く`,calendarClose:`カレンダーを閉じる`,calendarPrevious:`前へ`,calendarNext:`次へ`,calendarChangeView:`表示単位を切り替える`,calendarBack:`← 戻る`,calendarToday:`今日`},n=n=>({...t,...e.DEFAULT_FILTERING_LOCALE_TEXT,...n});exports.DEFAULT_POPUP_LOCALE_TEXT=t,exports.resolvePopupLocaleText=n;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./localeTextFeatures.cjs");var t={apply:`適用`,toolPanelLabel:`ツールパネル`,columnsPinnedLeft:`左固定`,columnsUnpinned:`固定なし`,columnsPinnedRight:`右固定`,columnsHideAll:`すべての列を非表示(先頭の列は残ります)`,columnsShowAll:`すべての列を表示`,columnsDragToReorder:`ドラッグして並べ替え`,columnsDragWithinSection:`ドラッグして並べ替え(同じセクション内のみ)`,columnsReorderUnavailable:`この表では列を並べ替えられません`,columnsReorderWhileSearching:`検索中は並べ替えできません`,columnsGroupedHint:`グループ化している列です(値は自動グループ列に出ます)`,columnsSearchPlaceholder:`検索...`,columnsNoMatches:`該当する列がありません`,columnsReset:`すべての列を初期状態に戻す`,columnsUnavailable:`この表では列の表示/非表示とリセットは使えません`,globalFilterTitle:`グローバルフィルター`,globalFilterRows:`"{text}" を含む行`,clearGlobalFilterTitle:`グローバルフィルターをクリア`,noColumnFilters:`適用中の列フィルターはありません`,addFilterLabel:`フィルターを追加する列を選択`,addFilter:`+ フィルターを追加…`,addFilterNone:`+ 追加できる列がありません`,sortPanelEmpty:`並び替えは設定されていません`,sortPanelDrag:`ドラッグして優先順位を変更`,sortPanelDisabled:`並び替えが無効です`,sortPanelNeedsTwo:`レベルが 2 件以上のとき並べ替えできます`,sortPanelAscending:`昇順`,sortPanelAscendingShort:`昇順`,sortPanelDescending:`降順`,sortPanelDescendingShort:`降順`,sortPanelRemove:`このレベルを削除`,sortPanelAllUsed:`すべての列が並び替えに使われています`,sortPanelAddHint:`並び替えの基準を追加します`,sortPanelAdd:`+ 基準を追加`,sortPanelClearHint:`すべての並び替えを解除します`,sortPanelReadOnly:`並び替えが無効のため編集できません`,operatorEquals:`に等しい`,operatorNotEquals:`に等しくない`,operatorGreaterThanOrEqual:`以上`,operatorGreaterThan:`より大きい`,operatorLessThanOrEqual:`以下`,operatorLessThan:`未満`,operatorBetween:`範囲`,operatorContains:`を含む`,operatorStartsWith:`で始まる`,operatorEndsWith:`で終わる`,operatorOnOrAfter:`以降`,operatorOnOrBefore:`以前`,operatorBlank:`空白`,operatorNotBlank:`空白でない`,filterTitle:`列フィルター: {column}`,filterCollecting:`候補を収集中… {percent}%`,filterOptionsLoading:`候補を取得中…`,filterOptionsLoadingShort:`取得中…`,filterOptionsFailed:`候補の取得に失敗しました`,filterOptionsFailedShort:`取得失敗`,filterOptionsTruncated:`(先頭のみ・打ち切り)`,filterSearchPlaceholder:`検索(Enter で確定)`,filterSelectAll:`(すべて選択)`,filterSelectAllResults:`(検索結果をすべて選択)`,filterNoOptionsSource:`候補が未指定です(serverSide では列に filterOptions などの候補供給が必要)`,filterNoMatches:`一致する候補がありません`,filterSelectedCount:`選択中: {selected} / {total} 件`,filterShownCount:`(表示中 {count} 件)`,filterMatchCount:`一致 {count} 件`,filterTotalCount:`全 {count} 件`,filterOptionCount:`候補数: {count}`,filterAll:`(すべて)`,filterConditionSection:`条件`,filterValuesSection:`値`,filterOperator:`条件の演算子`,filterValue:`条件の値`,filterValuePlaceholder:`値`,filterMin:`下限`,filterMax:`上限`,filterRangeSeparator:`〜`,filterNoValue:`この演算子は値入力を使いません`,filterDate:`条件の日付`,filterStartDate:`開始日`,filterEndDate:`終了日`,filterTextPlaceholder:`部分一致で絞り込み`,filterTextHint:`部分一致検索です`,filterCurrentValue:`現在値: {value}`,treeExpand:`展開する`,treeCollapse:`折りたたむ`,dateTreeYear:`{year} 年`,dateTreeMonth:`{month} 月`,dateTreeDay:`{day} 日`,calendarWeekdays:[`日`,`月`,`火`,`水`,`木`,`金`,`土`],calendarMonths:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],calendarTitle:`{year}年 {month}月`,calendarYear:`{year}年`,calendarOpen:`カレンダーを開く`,calendarClose:`カレンダーを閉じる`,calendarPrevious:`前へ`,calendarNext:`次へ`,calendarChangeView:`表示単位を切り替える`,calendarBack:`← 戻る`,calendarToday:`今日`},n=n=>({...t,...e.DEFAULT_FILTERING_LOCALE_TEXT,...n});exports.DEFAULT_POPUP_LOCALE_TEXT=t,exports.resolvePopupLocaleText=n;
|
|
@@ -3,6 +3,7 @@ import type { ResolvedGridLocaleText } from './localeText.js';
|
|
|
3
3
|
import { DEFAULT_FILTERING_LOCALE_TEXT } from './localeTextFeatures.js';
|
|
4
4
|
export declare const DEFAULT_POPUP_LOCALE_TEXT: {
|
|
5
5
|
apply: string;
|
|
6
|
+
toolPanelLabel: string;
|
|
6
7
|
columnsPinnedLeft: string;
|
|
7
8
|
columnsUnpinned: string;
|
|
8
9
|
columnsPinnedRight: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./detailRow.cjs"),t=require("../model/gridSelectors.cjs"),n=require("./labelRows.cjs");var r=(r,i,a,o,s)=>{if(i?.type!==`cell`||r.length===0)return null;let c=r[0]?.length??0;if(c===0||r.some(e=>e.length!==c))return null;let l=t.normalizeCellRange(i.range);if(!(a.row>=l.start.row&&a.row<=l.end.row&&a.col>=l.start.col&&a.col<=l.end.col))return null;let u=0;for(let t=l.start.col;t<=l.end.col;t+=1){let n=s[t];n!==void 0&&!e.isSyntheticColumnKey(n.key)&&(u+=1)}let d=r.length;if(u===0||u%c!==0)return null;let f=o.getRowCount(),p=Math.min(l.end.row,f-1),m=0;for(let e=l.start.row;e<=p;e+=1)n.isPasteSkippedRow(o,e)||(m+=1);if(m===0||m%d!==0||m===d&&u===c)return null;let h=r.map(e=>u===c?[...e]:Array.from({length:u},(t,n)=>e[n%c]??``));return Array.from({length:m},(e,t)=>h[t%d]??[])};exports.expandPasteMatrixToSelection=r;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { CellCoord, GridColumn, GridSelection, RowModel } from '../model/gridTypes.unbound.js';
|
|
2
|
+
export declare const expandPasteMatrixToSelection: <T>(matrix: readonly (readonly string[])[], selection: GridSelection, activeCell: CellCoord, rowModel: RowModel<T>, columns: readonly GridColumn<T>[]) => string[][] | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { isSyntheticColumnKey as e } from "./detailRow.js";
|
|
2
|
+
import { normalizeCellRange as t } from "../model/gridSelectors.js";
|
|
3
|
+
import { isPasteSkippedRow as n } from "./labelRows.js";
|
|
4
|
+
//#region src/logic/pasteFill.ts
|
|
5
|
+
var r = (r, i, a, o, s) => {
|
|
6
|
+
if (i?.type !== "cell" || r.length === 0) return null;
|
|
7
|
+
let c = r[0]?.length ?? 0;
|
|
8
|
+
if (c === 0 || r.some((e) => e.length !== c)) return null;
|
|
9
|
+
let l = t(i.range);
|
|
10
|
+
if (!(a.row >= l.start.row && a.row <= l.end.row && a.col >= l.start.col && a.col <= l.end.col)) return null;
|
|
11
|
+
let u = 0;
|
|
12
|
+
for (let t = l.start.col; t <= l.end.col; t += 1) {
|
|
13
|
+
let n = s[t];
|
|
14
|
+
n !== void 0 && !e(n.key) && (u += 1);
|
|
15
|
+
}
|
|
16
|
+
let d = r.length;
|
|
17
|
+
if (u === 0 || u % c !== 0) return null;
|
|
18
|
+
let f = o.getRowCount(), p = Math.min(l.end.row, f - 1), m = 0;
|
|
19
|
+
for (let e = l.start.row; e <= p; e += 1) n(o, e) || (m += 1);
|
|
20
|
+
if (m === 0 || m % d !== 0 || m === d && u === c) return null;
|
|
21
|
+
let h = r.map((e) => u === c ? [...e] : Array.from({ length: u }, (t, n) => e[n % c] ?? ""));
|
|
22
|
+
return Array.from({ length: m }, (e, t) => h[t % d] ?? []);
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as expandPasteMatrixToSelection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=180,t=28,n=4,r=
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=180,t=28,n=4,r=1,i=8,a=8,o=2,s=700,c=(e,t)=>{let n=String(t??``),r=e.findIndex(e=>e.value===n);return r>=0?r:0},l=(e,t,n)=>{if(n<=0)return 0;let r=e+t;return r<0?0:r>n-1?n-1:r},u=()=>({buffer:``,lastInputTime:0}),d=(e,t,n,r)=>{let i=(n-e.lastInputTime>700?``:e.buffer)+t.toLocaleLowerCase(),a=r.findIndex(e=>e.label.toLocaleLowerCase().startsWith(i));return{state:{buffer:i,lastInputTime:n},index:a>=0?a:null}},f=44,p=()=>typeof matchMedia==`function`&&matchMedia(`(pointer: coarse)`).matches?44:28,m=(e,t,n,r,s=28)=>{let c=Math.max(e.width,180),l=Math.max(a,n-c-a),u=Math.min(Math.max(e.left,a),l),d=Math.min(Math.max(t,1),i)*s+8+2,f=e.bottom+o;return{left:u,top:f+d<=r-a?f:Math.max(a,e.top-o-d),width:c,maxHeight:d}},h=/[\uFF01-\uFF5E]/g,g=e=>e.replace(h,e=>String.fromCharCode(e.charCodeAt(0)-65248)).replace(/\u3000/g,` `).toLocaleLowerCase(),_=(e,t)=>{let n=g(t).trim();if(n===``)return null;let r=e.map(e=>g(e.label)),i=r.findIndex(e=>e.startsWith(n));if(i>=0)return i;let a=r.findIndex(e=>e.includes(n));return a>=0?a:null};exports.SELECT_OPTION_ROW_HEIGHT=t,exports.SELECT_OPTION_ROW_HEIGHT_COARSE=f,exports.SELECT_POPOVER_BORDER_Y=r,exports.SELECT_POPOVER_MIN_WIDTH=e,exports.SELECT_POPOVER_PADDING_Y=n,exports.SELECT_TYPEAHEAD_RESET_MS=s,exports.computeSelectPopoverPlacement=m,exports.createTypeaheadState=u,exports.findOptionByComposedText=_,exports.moveHighlight=l,exports.resolveInitialHighlight=c,exports.resolveSelectOptionRowHeight=p,exports.typeaheadJump=d;
|
|
@@ -2,6 +2,7 @@ import type { GridSelectEditorOption } from '../model/gridTypes.unbound.js';
|
|
|
2
2
|
export declare const SELECT_POPOVER_MIN_WIDTH = 180;
|
|
3
3
|
export declare const SELECT_OPTION_ROW_HEIGHT = 28;
|
|
4
4
|
export declare const SELECT_POPOVER_PADDING_Y = 4;
|
|
5
|
+
export declare const SELECT_POPOVER_BORDER_Y = 1;
|
|
5
6
|
export declare const SELECT_TYPEAHEAD_RESET_MS = 700;
|
|
6
7
|
export declare const resolveInitialHighlight: (options: GridSelectEditorOption[], currentValue: unknown) => number;
|
|
7
8
|
export declare const moveHighlight: (current: number, delta: number, optionCount: number) => number;
|
|
@@ -20,10 +21,12 @@ export type SelectPopoverPlacement = {
|
|
|
20
21
|
width: number;
|
|
21
22
|
maxHeight: number;
|
|
22
23
|
};
|
|
24
|
+
export declare const SELECT_OPTION_ROW_HEIGHT_COARSE = 44;
|
|
25
|
+
export declare const resolveSelectOptionRowHeight: () => number;
|
|
23
26
|
export declare const computeSelectPopoverPlacement: (anchorRect: {
|
|
24
27
|
left: number;
|
|
25
28
|
top: number;
|
|
26
29
|
bottom: number;
|
|
27
30
|
width: number;
|
|
28
|
-
}, optionCount: number, viewportWidth: number, viewportHeight: number) => SelectPopoverPlacement;
|
|
31
|
+
}, optionCount: number, viewportWidth: number, viewportHeight: number, rowHeight?: number) => SelectPopoverPlacement;
|
|
29
32
|
export declare const findOptionByComposedText: (options: GridSelectEditorOption[], text: string) => number | null;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
//#region src/logic/selectEditorState.ts
|
|
2
|
-
var e = 180, t = 28, n = 4, r =
|
|
2
|
+
var e = 180, t = 28, n = 4, r = 1, i = 700, a = (e, t) => {
|
|
3
3
|
let n = String(t ?? ""), r = e.findIndex((e) => e.value === n);
|
|
4
4
|
return r >= 0 ? r : 0;
|
|
5
|
-
},
|
|
5
|
+
}, o = (e, t, n) => {
|
|
6
6
|
if (n <= 0) return 0;
|
|
7
7
|
let r = e + t;
|
|
8
8
|
return r < 0 ? 0 : r > n - 1 ? n - 1 : r;
|
|
9
|
-
},
|
|
9
|
+
}, s = () => ({
|
|
10
10
|
buffer: "",
|
|
11
11
|
lastInputTime: 0
|
|
12
|
-
}),
|
|
12
|
+
}), c = (e, t, n, r) => {
|
|
13
13
|
let i = (n - e.lastInputTime > 700 ? "" : e.buffer) + t.toLocaleLowerCase(), a = r.findIndex((e) => e.label.toLocaleLowerCase().startsWith(i));
|
|
14
14
|
return {
|
|
15
15
|
state: {
|
|
@@ -18,21 +18,21 @@ var e = 180, t = 28, n = 4, r = 700, i = (e, t) => {
|
|
|
18
18
|
},
|
|
19
19
|
index: a >= 0 ? a : null
|
|
20
20
|
};
|
|
21
|
-
},
|
|
22
|
-
let
|
|
21
|
+
}, l = 44, u = () => typeof matchMedia == "function" && matchMedia("(pointer: coarse)").matches ? 44 : 28, d = (e, t, n, r, i = 28) => {
|
|
22
|
+
let a = Math.max(e.width, 180), o = Math.max(8, n - a - 8), s = Math.min(Math.max(e.left, 8), o), c = Math.min(Math.max(t, 1), 8) * i + 8 + 2, l = e.bottom + 2;
|
|
23
23
|
return {
|
|
24
|
-
left:
|
|
25
|
-
top:
|
|
26
|
-
width:
|
|
27
|
-
maxHeight:
|
|
24
|
+
left: s,
|
|
25
|
+
top: l + c <= r - 8 ? l : Math.max(8, e.top - 2 - c),
|
|
26
|
+
width: a,
|
|
27
|
+
maxHeight: c
|
|
28
28
|
};
|
|
29
|
-
},
|
|
30
|
-
let n =
|
|
29
|
+
}, f = /[\uFF01-\uFF5E]/g, p = (e) => e.replace(f, (e) => String.fromCharCode(e.charCodeAt(0) - 65248)).replace(/\u3000/g, " ").toLocaleLowerCase(), m = (e, t) => {
|
|
30
|
+
let n = p(t).trim();
|
|
31
31
|
if (n === "") return null;
|
|
32
|
-
let r = e.map((e) =>
|
|
32
|
+
let r = e.map((e) => p(e.label)), i = r.findIndex((e) => e.startsWith(n));
|
|
33
33
|
if (i >= 0) return i;
|
|
34
34
|
let a = r.findIndex((e) => e.includes(n));
|
|
35
35
|
return a >= 0 ? a : null;
|
|
36
36
|
};
|
|
37
37
|
//#endregion
|
|
38
|
-
export { t as SELECT_OPTION_ROW_HEIGHT, e as SELECT_POPOVER_MIN_WIDTH, n as SELECT_POPOVER_PADDING_Y,
|
|
38
|
+
export { t as SELECT_OPTION_ROW_HEIGHT, l as SELECT_OPTION_ROW_HEIGHT_COARSE, r as SELECT_POPOVER_BORDER_Y, e as SELECT_POPOVER_MIN_WIDTH, n as SELECT_POPOVER_PADDING_Y, i as SELECT_TYPEAHEAD_RESET_MS, d as computeSelectPopoverPlacement, s as createTypeaheadState, m as findOptionByComposedText, o as moveHighlight, a as resolveInitialHighlight, u as resolveSelectOptionRowHeight, c as typeaheadJump };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=new WeakMap,t=t=>{let n=e.get(t);if(!n||n.size!==t.length){n={size:t.length,labelByValue:new Map,valueByLabel:new Map};for(let e of t){n.labelByValue.has(e.value)||n.labelByValue.set(e.value,e.label);let t=e.label.trim();t!==``&&!n.valueByLabel.has(t)&&n.valueByLabel.set(t,e.value)}e.set(t,n)}return n},n=(e,t)=>{let n=e.editor;if(n?.type!==`select`||n.clipboard!==`label`)return;if(typeof n.options!=`function`)return Array.isArray(n.options)?n.options:void 0;if(t===void 0)return;let r=n.options(t);return Array.isArray(r)?r:void 0},r=(e,r,i)=>{if(e.formatClipboardValue&&i!==void 0)return e.formatClipboardValue(r,i);let a=String(r??``),o=n(e,i);if(o===void 0)return a;let s=t(o).labelByValue.get(a);return s===void 0||s.trim()===``?a:s},i=e=>{let r=e.editor;if(!(r?.type!==`select`||r.clipboard!==`label`))return(r,i)=>{let a=n(e,i);if(a===void 0)return r;let o=t(a),s=r.trim(),c=o.valueByLabel.get(s);return c===void 0?o.labelByValue.has(r)?r:o.labelByValue.has(s)?s:r:c}};exports.formatCellClipboardText=r,exports.resolveSelectLabelParser=i;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { GridColumn } from '../model/gridTypes.unbound.js';
|
|
2
|
+
export declare const formatCellClipboardText: <T>(column: GridColumn<T>, value: unknown, row: T | undefined) => string;
|
|
3
|
+
export declare const resolveSelectLabelParser: <T>(column: GridColumn<T>) => ((raw: string, row: T) => unknown) | undefined;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/logic/selectLabels.ts
|
|
2
|
+
var e = /* @__PURE__ */ new WeakMap(), t = (t) => {
|
|
3
|
+
let n = e.get(t);
|
|
4
|
+
if (!n || n.size !== t.length) {
|
|
5
|
+
n = {
|
|
6
|
+
size: t.length,
|
|
7
|
+
labelByValue: /* @__PURE__ */ new Map(),
|
|
8
|
+
valueByLabel: /* @__PURE__ */ new Map()
|
|
9
|
+
};
|
|
10
|
+
for (let e of t) {
|
|
11
|
+
n.labelByValue.has(e.value) || n.labelByValue.set(e.value, e.label);
|
|
12
|
+
let t = e.label.trim();
|
|
13
|
+
t !== "" && !n.valueByLabel.has(t) && n.valueByLabel.set(t, e.value);
|
|
14
|
+
}
|
|
15
|
+
e.set(t, n);
|
|
16
|
+
}
|
|
17
|
+
return n;
|
|
18
|
+
}, n = (e, t) => {
|
|
19
|
+
let n = e.editor;
|
|
20
|
+
if (n?.type !== "select" || n.clipboard !== "label") return;
|
|
21
|
+
if (typeof n.options != "function") return Array.isArray(n.options) ? n.options : void 0;
|
|
22
|
+
if (t === void 0) return;
|
|
23
|
+
let r = n.options(t);
|
|
24
|
+
return Array.isArray(r) ? r : void 0;
|
|
25
|
+
}, r = (e, r, i) => {
|
|
26
|
+
if (e.formatClipboardValue && i !== void 0) return e.formatClipboardValue(r, i);
|
|
27
|
+
let a = String(r ?? ""), o = n(e, i);
|
|
28
|
+
if (o === void 0) return a;
|
|
29
|
+
let s = t(o).labelByValue.get(a);
|
|
30
|
+
return s === void 0 || s.trim() === "" ? a : s;
|
|
31
|
+
}, i = (e) => {
|
|
32
|
+
let r = e.editor;
|
|
33
|
+
if (!(r?.type !== "select" || r.clipboard !== "label")) return (r, i) => {
|
|
34
|
+
let a = n(e, i);
|
|
35
|
+
if (a === void 0) return r;
|
|
36
|
+
let o = t(a), s = r.trim(), c = o.valueByLabel.get(s);
|
|
37
|
+
return c === void 0 ? o.labelByValue.has(r) ? r : o.labelByValue.has(s) ? s : r : c;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { r as formatCellClipboardText, i as resolveSelectLabelParser };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./aggregation.cjs"),n=require("./detailRow.cjs"),r=require("./clearCells.cjs");var i=(e,t,i)=>{let a=r.resolveClearTarget(e,null,t,i.length);if(!a)return null;let o=i.slice(a.startCol,a.endCol+1).filter(e=>!n.isSyntheticColumnKey(e.key));return(a.endRow-a.startRow+1)*o.length<2?null:{startRow:a.startRow,endRow:a.endRow,columns:o}},a=(e,t)=>e.startRow===t.startRow&&e.endRow===t.endRow&&e.columns.length===t.columns.length&&e.columns.every((e,n)=>{let r=t.columns[n];return r!==void 0&&e.key===r.key&&e.getValue===r.getValue}),o=()=>{let e=null;return t=>t!==null&&e!==null&&a(e,t)?e:(e=t,t)},s=e=>(e.endRow-e.startRow+1)*e.columns.length,c=()=>({cellCount:0,count:0,numericCount:0,sum:0,min:1/0,max:-1/0,partial:!1}),l=(n,r,i,a)=>{let o=r.getRow(i);if(o===void 0){!r.getGroupRow?.(i)&&!r.getLabelRow?.(i)&&(n.partial=!0);return}for(let r of a){n.cellCount+=1;let i=e.getCellValue(o,r);if(i==null||i
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./aggregation.cjs"),n=require("./detailRow.cjs"),r=require("./clearCells.cjs");var i=(e,t,i)=>{let a=r.resolveClearTarget(e,null,t,i.length);if(!a)return null;let o=i.slice(a.startCol,a.endCol+1).filter(e=>!n.isSyntheticColumnKey(e.key));return(a.endRow-a.startRow+1)*o.length<2?null:{startRow:a.startRow,endRow:a.endRow,columns:o}},a=(e,t)=>e.startRow===t.startRow&&e.endRow===t.endRow&&e.columns.length===t.columns.length&&e.columns.every((e,n)=>{let r=t.columns[n];return r!==void 0&&e.key===r.key&&e.getValue===r.getValue&&e.selectionAggregate===r.selectionAggregate}),o=()=>{let e=null;return t=>t!==null&&e!==null&&a(e,t)?e:(e=t,t)},s=e=>(e.endRow-e.startRow+1)*e.columns.length,c=()=>({cellCount:0,count:0,numericCount:0,sum:0,min:1/0,max:-1/0,partial:!1}),l=(n,r,i,a)=>{let o=r.getRow(i);if(o===void 0){!r.getGroupRow?.(i)&&!r.getLabelRow?.(i)&&(n.partial=!0);return}for(let r of a){n.cellCount+=1;let i=e.getCellValue(o,r);if(i==null||i===``||(n.count+=1,r.selectionAggregate===!1))continue;let a=t.toAggregatableNumber(i);a!==void 0&&(n.numericCount+=1,n.sum+=a,a<n.min&&(n.min=a),a>n.max&&(n.max=a))}},u=e=>{let t=e.numericCount>0;return{status:`ready`,progress:1,cellCount:e.cellCount,count:e.count,numericCount:e.numericCount,sum:t?e.sum:void 0,average:t?e.sum/e.numericCount:void 0,min:t?e.min:void 0,max:t?e.max:void 0,partial:e.partial}},d=e=>({status:`computing`,progress:e,cellCount:0,count:0,numericCount:0,sum:void 0,average:void 0,min:void 0,max:void 0,partial:!1}),f=(e,t)=>{let n=c();for(let r=t.startRow;r<=t.endRow;r+=1)l(n,e,r,t.columns);return u(n)},p=4,m=.5/10**p,h=e=>{let t=Number.isInteger(e)?e:Number(e.toPrecision(15));return(Math.abs(t)<m?0:t).toLocaleString(void 0,{maximumFractionDigits:p})};exports.accumulateSelectionAggregateRow=l,exports.computeSelectionAggregates=f,exports.createComputingSelectionAggregates=d,exports.createSelectionAggregateAccumulator=c,exports.createSelectionAggregateTargetStabilizer=o,exports.estimateSelectionAggregateCells=s,exports.finalizeSelectionAggregates=u,exports.formatSelectionAggregateNumber=h,exports.isSameSelectionAggregateTarget=a,exports.resolveSelectionAggregateTarget=i;
|
|
@@ -14,7 +14,7 @@ var i = (e, t, i) => {
|
|
|
14
14
|
};
|
|
15
15
|
}, a = (e, t) => e.startRow === t.startRow && e.endRow === t.endRow && e.columns.length === t.columns.length && e.columns.every((e, n) => {
|
|
16
16
|
let r = t.columns[n];
|
|
17
|
-
return r !== void 0 && e.key === r.key && e.getValue === r.getValue;
|
|
17
|
+
return r !== void 0 && e.key === r.key && e.getValue === r.getValue && e.selectionAggregate === r.selectionAggregate;
|
|
18
18
|
}), o = () => {
|
|
19
19
|
let e = null;
|
|
20
20
|
return (t) => t !== null && e !== null && a(e, t) ? e : (e = t, t);
|
|
@@ -35,8 +35,7 @@ var i = (e, t, i) => {
|
|
|
35
35
|
for (let r of a) {
|
|
36
36
|
n.cellCount += 1;
|
|
37
37
|
let i = e(o, r);
|
|
38
|
-
if (i == null || i === "") continue;
|
|
39
|
-
n.count += 1;
|
|
38
|
+
if (i == null || i === "" || (n.count += 1, r.selectionAggregate === !1)) continue;
|
|
40
39
|
let a = t(i);
|
|
41
40
|
a !== void 0 && (n.numericCount += 1, n.sum += a, a < n.min && (n.min = a), a > n.max && (n.max = a));
|
|
42
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./editorValues.cjs"),n=require("./localeTextFilters.cjs"),r=require("./localeText.cjs");var i=r.DEFAULT_GRID_LOCALE_TEXT.invalidValue,a=(e,t=i)=>e===!0?{valid:!0,message:``}:e===!1?{valid:!1,message:t}:typeof e==`string`?{valid:!1,message:e||t}:{valid:!1,message:e.message||t},o=({editor:e})=>e?.type===`number`&&(e.min!=null||e.max!=null||e.integer)?e:void 0,s=(e,r,i)=>{let a=o(e);if(!a||r==null||typeof r==`string`&&!r.trim())return null;let{min:s,max:c}=a,l=typeof r==`string`?t.parseNumberText(r)??NaN:typeof r==`number`?r:NaN;return Number.isFinite(l)?a.integer&&!Number.isInteger(l)?i.enterInteger:s!=null&&l<s||c!=null&&l>c?c==null?n.formatLocaleText(i.enterMin,{min:s}):s==null?n.formatLocaleText(i.enterMax,{max:c}):n.formatLocaleText(i.enterRange,{min:s,max:c}):null:i.enterNumber},
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../utils/permissions.cjs"),t=require("./editorValues.cjs"),n=require("./localeTextFilters.cjs"),r=require("./localeText.cjs");var i=r.DEFAULT_GRID_LOCALE_TEXT.invalidValue,a=(e,t=i)=>e===!0?{valid:!0,message:``}:e===!1?{valid:!1,message:t}:typeof e==`string`?{valid:!1,message:e||t}:{valid:!1,message:e.message||t},o=({editor:e})=>e?.type===`number`&&(e.min!=null||e.max!=null||e.integer||e.strict)?e:void 0,s=({editor:e})=>e?.type===`date`&&e.strict===!0,c=(e,n,r)=>!s(e)||n==null||typeof n==`string`&&!n.trim()||(n instanceof Date||typeof n==`string`)&&t.toDateInputValue(n)!==``?null:r.enterDate,l=(e,r,i)=>{let a=o(e);if(!a||r==null||typeof r==`string`&&!r.trim())return null;let{min:s,max:c}=a,l=typeof r==`string`?t.parseNumberText(r)??NaN:typeof r==`number`?r:NaN;return Number.isFinite(l)?a.integer&&!Number.isInteger(l)?i.enterInteger:s!=null&&l<s||c!=null&&l>c?c==null?n.formatLocaleText(i.enterMin,{min:s}):s==null?n.formatLocaleText(i.enterMax,{max:c}):n.formatLocaleText(i.enterRange,{min:s,max:c}):null:i.enterNumber},u=e=>!!(e.validate||o(e)||s(e)),d=(e,t,n,i=r.DEFAULT_GRID_LOCALE_TEXT)=>{if(e.validate){let r=a(e.validate({value:n,row:t,column:e}),i.invalidValue);if(!r.valid)return r.message}return l(e,n,i)??c(e,n,i)},f=(e,t,n,r)=>{if((e.validationMode??`mark`)!==`reject`)return{action:`write`};let i=d(e,t,n,r);return i===null?{action:`write`}:{action:`reject`,message:i}},p=(t,n,r,i,a)=>{let o=n.filter(u);if(o.length===0)return[];let s=[];return t.forEach((t,n)=>{if(!i?.(t,n))for(let i of o){let o=d(i,t,e.getCellValue(t,i),a);o!==null&&s.push({rowKey:r(t,n)??n,sourceRowIndex:n,columnKey:i.key,message:o})}}),s};exports.DEFAULT_INVALID_MESSAGE=i,exports.decideCellWrite=f,exports.getInvalidMessage=d,exports.hasCellValidation=u,exports.normalizeValidationResult=a,exports.scanInvalidCells=p;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CellValidationResult, GridColumn, GridInvalidCell, GridRowKey } from '../model/gridTypes.unbound.js';
|
|
2
2
|
import type { GridLocaleText } from '../model/gridTypes.core.js';
|
|
3
|
-
export type ValidationLocaleText = Pick<GridLocaleText, 'invalidValue' | 'enterNumber' | 'enterInteger' | 'enterMin' | 'enterMax' | 'enterRange'>;
|
|
3
|
+
export type ValidationLocaleText = Pick<GridLocaleText, 'invalidValue' | 'enterNumber' | 'enterInteger' | 'enterMin' | 'enterMax' | 'enterRange' | 'enterDate'>;
|
|
4
4
|
export declare const DEFAULT_INVALID_MESSAGE: string;
|
|
5
5
|
export declare const normalizeValidationResult: (result: CellValidationResult, fallbackMessage?: string) => {
|
|
6
6
|
valid: boolean;
|