@progress/kendo-react-grid 15.0.1-develop.9 → 15.1.0-develop.10
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/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +411 -407
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +305 -290
- package/VirtualScroll.d.ts +4 -0
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +32 -27
- package/cells/groupcell/useGroupCellClientTdProps.js +1 -1
- package/cells/groupcell/useGroupCellClientTdProps.mjs +7 -7
- package/cells/hierarchycell/GridHierarchyCellToggle.js +1 -1
- package/cells/hierarchycell/GridHierarchyCellToggle.mjs +15 -15
- package/cells/selectioncell/GridSelectionCell.js +1 -1
- package/cells/selectioncell/GridSelectionCell.mjs +29 -8
- package/cells/selectioncell/GridSelectionCellInput.d.ts +6 -2
- package/cells/selectioncell/GridSelectionCellInput.js +1 -1
- package/cells/selectioncell/GridSelectionCellInput.mjs +16 -25
- package/cells/selectioncell/GridSelectionCellServer.js +1 -1
- package/cells/selectioncell/GridSelectionCellServer.mjs +18 -16
- package/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/columnMenu/GridColumnMenuWrapper.mjs +118 -82
- package/components/GridEditDialog.js +1 -1
- package/components/GridEditDialog.mjs +19 -19
- package/components/VirtualScrollOverlay.d.ts +12 -0
- package/components/VirtualScrollOverlay.js +16 -0
- package/components/VirtualScrollOverlay.mjs +65 -0
- package/components/noRecords/GridNoRecordsContainer.js +1 -1
- package/components/noRecords/GridNoRecordsContainer.mjs +10 -9
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +84 -84
- package/getRowContents.js +1 -1
- package/getRowContents.mjs +12 -12
- package/index.d.mts +2 -1
- package/index.d.ts +2 -1
- package/interfaces/GridProps.d.ts +2 -1
- package/interfaces/GridScrollableSettings.d.ts +33 -0
- package/interfaces/VirtualScrollInterface.d.ts +2 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -17
- package/toolbar-tools/GridToolbarColumnsChooser.js +1 -1
- package/toolbar-tools/GridToolbarColumnsChooser.mjs +33 -33
- package/toolbar-tools/GridToolbarFilter.js +1 -1
- package/toolbar-tools/GridToolbarFilter.mjs +207 -194
- package/toolbar-tools/GridToolbarSort.js +1 -1
- package/toolbar-tools/GridToolbarSort.mjs +84 -101
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.js +1 -1
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.mjs +50 -46
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.d.ts +0 -1
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.js +1 -1
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.mjs +10 -19
- package/utils/index.js +1 -1
- package/utils/index.mjs +161 -161
|
@@ -6,125 +6,161 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { Popup as
|
|
11
|
-
import { useDocument as
|
|
12
|
-
import { moreVerticalIcon as
|
|
13
|
-
import { columnMenu as
|
|
14
|
-
import { useLocalization as
|
|
15
|
-
import { GridContext as
|
|
16
|
-
import { GridColumnMenuAdaptiveProvider as
|
|
17
|
-
import { GridAdaptiveColumnMenu as
|
|
18
|
-
import
|
|
19
|
-
const
|
|
20
|
-
var
|
|
21
|
-
const
|
|
22
|
-
const e =
|
|
23
|
-
clearTimeout(
|
|
24
|
-
!
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { Popup as X } from "@progress/kendo-react-popup";
|
|
11
|
+
import { useDocument as Y, Navigation as Z, classNames as O, IconWrap as L, FOCUSABLE_ELEMENTS as j, getActiveElement as ee } from "@progress/kendo-react-common";
|
|
12
|
+
import { moreVerticalIcon as ne } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { columnMenu as x, messages as te } from "../messages/index.mjs";
|
|
14
|
+
import { useLocalization as oe } from "@progress/kendo-react-intl";
|
|
15
|
+
import { GridContext as re } from "../utils/GridContext.mjs";
|
|
16
|
+
import { GridColumnMenuAdaptiveProvider as ce } from "./adaptiveContext/GridColumnMenuAdaptiveContext.mjs";
|
|
17
|
+
import { GridAdaptiveColumnMenu as se } from "./adaptiveContent/GridAdaptiveColumnMenu.mjs";
|
|
18
|
+
import le from "react-dom";
|
|
19
|
+
const ue = [".k-columnmenu-item-content", ".k-filter-menu-container"].map((r) => j.map((l) => `${r} ${l}`)), ie = [[".k-columnmenu-item"], ...ue], Me = (r) => {
|
|
20
|
+
var D;
|
|
21
|
+
const l = t.useContext(re), [h, g] = t.useState(!1), u = t.useRef(null), f = t.useRef(null), i = t.useRef(null), v = t.useRef(0), G = Y(u), { columnMenu: d, ...p } = r, { column: a, columnMenuIcon: C, navigatable: w } = r, N = oe(), y = a.title || a.field, B = y ? `${y} ` : "", F = "#", I = (n) => {
|
|
22
|
+
const e = ee(document);
|
|
23
|
+
clearTimeout(v.current), v.current = window.setTimeout(() => {
|
|
24
|
+
!l.mobileMode && e && n.relatedTarget !== u.current && f.current && !f.current.contains(e) && E();
|
|
25
25
|
});
|
|
26
|
-
},
|
|
27
|
-
clearTimeout(
|
|
28
|
-
},
|
|
29
|
-
n.preventDefault(),
|
|
30
|
-
},
|
|
31
|
-
r.onCloseMenu && r.onCloseMenu(),
|
|
32
|
-
},
|
|
26
|
+
}, K = () => {
|
|
27
|
+
clearTimeout(v.current);
|
|
28
|
+
}, z = (n) => {
|
|
29
|
+
n.preventDefault(), h && r.onCloseMenu && r.onCloseMenu(), g(!h);
|
|
30
|
+
}, E = () => {
|
|
31
|
+
r.onCloseMenu && r.onCloseMenu(), g(!1), !r.navigatable && u.current && u.current.focus();
|
|
32
|
+
}, P = (n) => {
|
|
33
33
|
var e;
|
|
34
34
|
if (n.key === "Tab") {
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const o = n.target, s = o && ((e = o.closest(".k-grid")) == null ? void 0 : e.getElementsByClassName("k-grid-content")[0]);
|
|
36
|
+
s && s.scrollWidth > s.clientWidth && o.scrollIntoView({ inline: "center" });
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, m = t.useMemo(() => r.show !== void 0 ? r.show : h, [r.show, h]);
|
|
39
|
+
t.useEffect(() => {
|
|
40
|
+
var R;
|
|
41
|
+
if (!m || !u.current)
|
|
42
|
+
return;
|
|
43
|
+
const n = u.current, e = n.closest(".k-grid-header-wrap"), o = [];
|
|
44
|
+
let s = n.closest(".k-grid");
|
|
45
|
+
for (; s; ) {
|
|
46
|
+
const c = (R = s.parentElement) == null ? void 0 : R.closest(".k-grid-content, .k-virtual-content");
|
|
47
|
+
if (c)
|
|
48
|
+
o.push(c), s = c.closest(".k-grid");
|
|
49
|
+
else
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
const k = () => {
|
|
53
|
+
g(!1), r.onCloseMenu && r.onCloseMenu();
|
|
54
|
+
}, A = () => {
|
|
55
|
+
k();
|
|
56
|
+
}, S = () => {
|
|
57
|
+
const c = n.getBoundingClientRect();
|
|
58
|
+
for (const Q of o) {
|
|
59
|
+
const T = Q.getBoundingClientRect();
|
|
60
|
+
if (c.bottom < T.top || c.top > T.bottom) {
|
|
61
|
+
k();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return e && e.addEventListener("scroll", A), o.forEach((c) => {
|
|
67
|
+
c.addEventListener("scroll", S);
|
|
68
|
+
}), () => {
|
|
69
|
+
e && e.removeEventListener("scroll", A), o.forEach((c) => {
|
|
70
|
+
c.removeEventListener("scroll", S);
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
}, [m]);
|
|
74
|
+
const W = (n) => {
|
|
39
75
|
var e;
|
|
40
|
-
(e =
|
|
41
|
-
},
|
|
76
|
+
(e = i.current) == null || e.triggerKeyboardEvent(n);
|
|
77
|
+
}, $ = (n) => {
|
|
42
78
|
var e;
|
|
43
|
-
(e =
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
n && (
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
},
|
|
79
|
+
(e = i.current) == null || e.triggerMouseEvent(n);
|
|
80
|
+
}, V = (n, e, o) => {
|
|
81
|
+
o.preventDefault(), o.shiftKey ? e.focusPrevious(n) : e.focusNext(n);
|
|
82
|
+
}, H = (n, e, o) => {
|
|
83
|
+
n && (o.preventDefault(), n.click());
|
|
84
|
+
}, _ = (n, e, o) => {
|
|
85
|
+
o.preventDefault(), E();
|
|
86
|
+
}, U = (n, e, o) => {
|
|
51
87
|
e.focusElement(n);
|
|
52
|
-
},
|
|
53
|
-
!n.isAnchorClicked &&
|
|
54
|
-
},
|
|
88
|
+
}, q = (n) => {
|
|
89
|
+
!n.isAnchorClicked && g(!1);
|
|
90
|
+
}, M = t.useCallback(
|
|
55
91
|
(n, e) => {
|
|
56
|
-
const
|
|
92
|
+
const o = [];
|
|
57
93
|
if (!e || typeof e != "object")
|
|
58
94
|
return !1;
|
|
59
95
|
if (Array.isArray(e.filters)) {
|
|
60
|
-
for (const
|
|
61
|
-
if (
|
|
96
|
+
for (const s of e.filters)
|
|
97
|
+
if (M(n, s))
|
|
62
98
|
return !0;
|
|
63
99
|
}
|
|
64
|
-
return "field" in e && typeof e.field == "string" &&
|
|
100
|
+
return "field" in e && typeof e.field == "string" && o.push(e.field), o.includes(n);
|
|
65
101
|
},
|
|
66
102
|
[]
|
|
67
|
-
),
|
|
68
|
-
return
|
|
103
|
+
), b = t.useCallback((n, e) => !e || !Array.isArray(e) ? !1 : e.some((o) => o.field === n), []), J = t.useMemo(() => a.field && (M(a.field, l.filter) || b(a.field, l.group)), [a.field, l.filter, l.group, M, b]);
|
|
104
|
+
return t.useEffect(() => (m && f.current && (i.current = new Z({
|
|
69
105
|
tabIndex: 0,
|
|
70
|
-
root:
|
|
71
|
-
selectors:
|
|
106
|
+
root: f,
|
|
107
|
+
selectors: ie,
|
|
72
108
|
keyboardEvents: {
|
|
73
|
-
keydown: { Tab:
|
|
109
|
+
keydown: { Tab: V, Enter: H, Escape: _ }
|
|
74
110
|
},
|
|
75
|
-
mouseEvents: { mousedown:
|
|
76
|
-
}),
|
|
77
|
-
|
|
78
|
-
}), [
|
|
111
|
+
mouseEvents: { mousedown: U }
|
|
112
|
+
}), i.current.focusElement(i.current.first, null)), () => {
|
|
113
|
+
i.current && (i.current = null);
|
|
114
|
+
}), [m]), /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
79
115
|
"a",
|
|
80
116
|
{
|
|
81
|
-
className:
|
|
82
|
-
"k-active":
|
|
117
|
+
className: O("k-grid-header-menu k-grid-column-menu", {
|
|
118
|
+
"k-active": J
|
|
83
119
|
}),
|
|
84
120
|
ref: u,
|
|
85
|
-
onClick:
|
|
86
|
-
onKeyDown:
|
|
87
|
-
href:
|
|
88
|
-
tabIndex:
|
|
89
|
-
"aria-label": `${
|
|
90
|
-
|
|
91
|
-
|
|
121
|
+
onClick: z,
|
|
122
|
+
onKeyDown: P,
|
|
123
|
+
href: F,
|
|
124
|
+
tabIndex: w ? -1 : void 0,
|
|
125
|
+
"aria-label": `${w ? "" : B}${N.toLanguageString(
|
|
126
|
+
x,
|
|
127
|
+
te[x]
|
|
92
128
|
)}`
|
|
93
129
|
},
|
|
94
|
-
|
|
95
|
-
), /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
|
|
130
|
+
C ? /* @__PURE__ */ t.createElement(L, { name: C.name, icon: C }) : /* @__PURE__ */ t.createElement(L, { name: "more-vertical", icon: ne })
|
|
131
|
+
), /* @__PURE__ */ t.createElement(ce, null, l.mobileMode ? /* @__PURE__ */ t.createElement(t.Fragment, null, le.createPortal(
|
|
132
|
+
/* @__PURE__ */ t.createElement(
|
|
133
|
+
se,
|
|
98
134
|
{
|
|
99
|
-
computedShow:
|
|
100
|
-
ColumnMenu:
|
|
101
|
-
closeMenu:
|
|
135
|
+
computedShow: m,
|
|
136
|
+
ColumnMenu: d,
|
|
137
|
+
closeMenu: E
|
|
102
138
|
},
|
|
103
|
-
|
|
139
|
+
d && /* @__PURE__ */ t.createElement(d, { ...p, onCloseMenu: E })
|
|
104
140
|
),
|
|
105
|
-
(
|
|
106
|
-
)) : /* @__PURE__ */
|
|
107
|
-
|
|
141
|
+
(D = G()) == null ? void 0 : D.body
|
|
142
|
+
)) : /* @__PURE__ */ t.createElement(
|
|
143
|
+
X,
|
|
108
144
|
{
|
|
109
145
|
anchor: u.current,
|
|
110
|
-
show:
|
|
146
|
+
show: m,
|
|
111
147
|
popupClass: "k-grid-columnmenu-popup",
|
|
112
|
-
onMouseDownOutside:
|
|
148
|
+
onMouseDownOutside: q
|
|
113
149
|
},
|
|
114
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ t.createElement(
|
|
115
151
|
"div",
|
|
116
152
|
{
|
|
117
|
-
ref:
|
|
118
|
-
onBlur:
|
|
119
|
-
onFocus:
|
|
120
|
-
onMouseDown:
|
|
121
|
-
onKeyDown:
|
|
153
|
+
ref: f,
|
|
154
|
+
onBlur: I,
|
|
155
|
+
onFocus: K,
|
|
156
|
+
onMouseDown: $,
|
|
157
|
+
onKeyDown: W,
|
|
122
158
|
className: "k-column-menu k-column-menu-md"
|
|
123
159
|
},
|
|
124
|
-
|
|
160
|
+
d && /* @__PURE__ */ t.createElement(d, { ...p, onCloseMenu: E })
|
|
125
161
|
)
|
|
126
162
|
)));
|
|
127
163
|
};
|
|
128
164
|
export {
|
|
129
|
-
|
|
165
|
+
Me as GridColumnMenuWrapper
|
|
130
166
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),x=require("react-dom"),I=require("@progress/kendo-react-layout"),u=require("@progress/kendo-react-buttons"),r=require("@progress/kendo-react-labels"),M=require("@progress/kendo-react-intl"),_=require("@progress/kendo-react-dateinputs"),O=require("@progress/kendo-react-common"),E=require("@progress/kendo-svg-icons"),D=require("@progress/kendo-react-inputs"),C=require("@progress/kendo-react-data-tools"),B=require("@progress/kendo-react-dialogs"),c=require("@progress/kendo-react-form"),w=require("../utils/GridContext.js"),o=require("../messages/index.js");function z(n){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),x=require("react-dom"),I=require("@progress/kendo-react-layout"),u=require("@progress/kendo-react-buttons"),r=require("@progress/kendo-react-labels"),M=require("@progress/kendo-react-intl"),_=require("@progress/kendo-react-dateinputs"),O=require("@progress/kendo-react-common"),E=require("@progress/kendo-svg-icons"),D=require("@progress/kendo-react-inputs"),C=require("@progress/kendo-react-data-tools"),B=require("@progress/kendo-react-dialogs"),c=require("@progress/kendo-react-form"),w=require("../utils/GridContext.js"),o=require("../messages/index.js");function z(n){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const l=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(d,i,l.get?l:{enumerable:!0,get:()=>n[i]})}}return d.default=n,Object.freeze(d)}const e=z(q),A=n=>{var h;const d=M.useLocalization(),i=O.useAdaptiveModeContext(),l=e.useContext(w.GridContext),g=(a,t)=>{l.onDialogEditSubmit&&l.onDialogEditSubmit({dataItem:a,syntheticEvent:t})},m=a=>{l.onDialogEditCancel&&l.onDialogEditCancel({syntheticEvent:a})},N=a=>{const{validationMessage:t,visited:P,id:f,valid:V,editor:F,value:b,label:k,...S}=a,T=l.mobileMode?"large":"medium";switch(F){case"numeric":return e.createElement(e.Fragment,null,e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":"),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(D.NumericTextBox,{...S,size:T,value:b,[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)));case"date":return e.createElement(e.Fragment,null,e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":"),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(_.DatePicker,{valid:!0,...S,value:b,adaptive:l.mobileMode,size:T,[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)));case"boolean":return e.createElement("div",{className:"k-form-field-wrap"},e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,": ",e.createElement(D.Checkbox,{...S,size:T,value:b,[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)));default:return e.createElement(e.Fragment,null,e.createElement(r.Label,{editorId:f,className:"k-form-label"},k,":"),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(D.TextBox,{...S,size:T,value:b||"",[C.TABLE_PREVENT_SELECTION_ELEMENT]:!0}),t&&e.createElement(r.Error,null,t)))}},p=d.toLanguageString(o.editDialogTitle,o.messages[o.editDialogTitle]),L=d.toLanguageString(o.editDialogSaveButtonTitle,o.messages[o.editDialogSaveButtonTitle]),y=d.toLanguageString(o.editDialogCancelButtonTitle,o.messages[o.editDialogCancelButtonTitle]),R={animation:!0,navigatable:!1,navigatableElements:[],expand:!0,title:l.adpativeTitle||p,suffixActions:e.createElement(u.Button,{svgIcon:E.xIcon,onClick:m,fillMode:"flat"}),animationStyles:i&&l.adaptiveColumnMenuRef<=i.small?{top:0,width:"100%",height:"100%"}:void 0,className:"k-adaptive-actionsheet",position:i&&l.adaptiveColumnMenuRef<=i.small?"fullscreen":void 0},{customEditDialog:v}=n,s=(h=n.columns)==null?void 0:h.filter(a=>a.editable);return e.createElement(e.Fragment,null,x.createPortal(e.createElement(e.Fragment,null,l.mobileMode?e.createElement(e.Fragment,null,v?e.createElement(v,{columns:n.columns,dataItem:n.dataItem,onSubmit:g,onCancel:m}):e.createElement(c.Form,{initialValues:n.dataItem,onSubmit:g,id:"kendo-grid-edit-dialog",render:a=>e.createElement(I.ActionSheet,{...R},e.createElement(I.ActionSheetContent,null,e.createElement(c.FormElement,null,s==null?void 0:s.map(t=>e.createElement(c.FieldWrapper,{key:t.field},e.createElement(c.Field,{name:t.field,id:t.field,editor:t.editor,component:N,label:t.title||t.field,validator:t.validator}))))),e.createElement(I.ActionSheetFooter,null,e.createElement(u.Button,{onClick:m,type:"reset",icon:"cancel",size:"large",svgIcon:E.cancelIcon},y),e.createElement(u.Button,{type:"submit",themeColor:"primary",size:"large",disabled:!a.allowSubmit||!a.valid,onClick:a.onSubmit,icon:"save",svgIcon:E.saveIcon},L)))})):v?e.createElement(v,{columns:n.columns,dataItem:n.dataItem,onSubmit:g,onCancel:m}):e.createElement(c.Form,{initialValues:n.dataItem,onSubmit:g,id:"kendo-grid-edit-dialog",render:a=>e.createElement(B.Dialog,{title:p,width:450,onClose:t=>m(t.syntheticEvent)},e.createElement(c.FormElement,null,s==null?void 0:s.map(t=>e.createElement(c.FieldWrapper,{key:t.field},e.createElement(c.Field,{name:t.field,id:t.field,editor:t.editor,component:N,label:t.title||t.field,validator:t.validator})))),e.createElement(B.DialogActionsBar,{layout:"start"},e.createElement(u.Button,{type:"submit",themeColor:"primary",disabled:!a.allowSubmit||!a.valid,onClick:a.onSubmit,icon:"save",svgIcon:E.saveIcon},L),e.createElement(u.Button,{onClick:m,type:"reset",icon:"cancel",svgIcon:E.cancelIcon},y)))})),document.body))};exports.GridEditDialog=A;
|
|
@@ -21,14 +21,14 @@ import { Dialog as Q, DialogActionsBar as U } from "@progress/kendo-react-dialog
|
|
|
21
21
|
import { Form as T, FormElement as F, FieldWrapper as M, Field as w } from "@progress/kendo-react-form";
|
|
22
22
|
import { GridContext as X } from "../utils/GridContext.mjs";
|
|
23
23
|
import { editDialogTitle as z, messages as S, editDialogSaveButtonTitle as B, editDialogCancelButtonTitle as L } from "../messages/index.mjs";
|
|
24
|
-
const ue = (
|
|
24
|
+
const ue = (i) => {
|
|
25
25
|
var y;
|
|
26
|
-
const C = W(), m = q(),
|
|
27
|
-
|
|
26
|
+
const C = W(), m = q(), l = e.useContext(X), c = (a, t) => {
|
|
27
|
+
l.onDialogEditSubmit && l.onDialogEditSubmit({ dataItem: a, syntheticEvent: t });
|
|
28
28
|
}, n = (a) => {
|
|
29
|
-
|
|
29
|
+
l.onDialogEditCancel && l.onDialogEditCancel({ syntheticEvent: a });
|
|
30
30
|
}, k = (a) => {
|
|
31
|
-
const { validationMessage: t, visited: Y, id: s, valid: Z, editor: R, value: E, label: u, ...f } = a, g =
|
|
31
|
+
const { validationMessage: t, visited: Y, id: s, valid: Z, editor: R, value: E, label: u, ...f } = a, g = l.mobileMode ? "large" : "medium";
|
|
32
32
|
switch (R) {
|
|
33
33
|
case "numeric":
|
|
34
34
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(v, { editorId: s, className: "k-form-label" }, u, ":"), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
|
|
@@ -47,7 +47,7 @@ const ue = (l) => {
|
|
|
47
47
|
valid: !0,
|
|
48
48
|
...f,
|
|
49
49
|
value: E,
|
|
50
|
-
adaptive:
|
|
50
|
+
adaptive: l.mobileMode,
|
|
51
51
|
size: g,
|
|
52
52
|
[p]: !0
|
|
53
53
|
}
|
|
@@ -84,28 +84,28 @@ const ue = (l) => {
|
|
|
84
84
|
navigatable: !1,
|
|
85
85
|
navigatableElements: [],
|
|
86
86
|
expand: !0,
|
|
87
|
-
title:
|
|
87
|
+
title: l.adpativeTitle || I,
|
|
88
88
|
suffixActions: /* @__PURE__ */ e.createElement(r, { svgIcon: H, onClick: n, fillMode: "flat" }),
|
|
89
|
-
animationStyles: m &&
|
|
89
|
+
animationStyles: m && l.adaptiveColumnMenuRef <= m.small ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
90
90
|
className: "k-adaptive-actionsheet",
|
|
91
|
-
position: m &&
|
|
92
|
-
}, { customEditDialog: d } =
|
|
91
|
+
position: m && l.adaptiveColumnMenuRef <= m.small ? "fullscreen" : void 0
|
|
92
|
+
}, { customEditDialog: d } = i, o = (y = i.columns) == null ? void 0 : y.filter((a) => a.editable);
|
|
93
93
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, O.createPortal(
|
|
94
94
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
95
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
95
|
+
/* @__PURE__ */ e.createElement(e.Fragment, null, l.mobileMode ? (
|
|
96
96
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
97
97
|
/* @__PURE__ */ e.createElement(e.Fragment, null, d ? /* @__PURE__ */ e.createElement(
|
|
98
98
|
d,
|
|
99
99
|
{
|
|
100
|
-
columns:
|
|
101
|
-
dataItem:
|
|
100
|
+
columns: i.columns,
|
|
101
|
+
dataItem: i.dataItem,
|
|
102
102
|
onSubmit: c,
|
|
103
103
|
onCancel: n
|
|
104
104
|
}
|
|
105
105
|
) : /* @__PURE__ */ e.createElement(
|
|
106
106
|
T,
|
|
107
107
|
{
|
|
108
|
-
initialValues:
|
|
108
|
+
initialValues: i.dataItem,
|
|
109
109
|
onSubmit: c,
|
|
110
110
|
id: "kendo-grid-edit-dialog",
|
|
111
111
|
render: (a) => /* @__PURE__ */ e.createElement(V, { ...A }, /* @__PURE__ */ e.createElement(_, null, /* @__PURE__ */ e.createElement(F, null, o == null ? void 0 : o.map((t) => /* @__PURE__ */ e.createElement(M, { key: t.field }, /* @__PURE__ */ e.createElement(
|
|
@@ -116,7 +116,7 @@ const ue = (l) => {
|
|
|
116
116
|
editor: t.editor,
|
|
117
117
|
component: k,
|
|
118
118
|
label: t.title || t.field,
|
|
119
|
-
validator: t
|
|
119
|
+
validator: t.validator
|
|
120
120
|
}
|
|
121
121
|
))))), /* @__PURE__ */ e.createElement(G, null, /* @__PURE__ */ e.createElement(
|
|
122
122
|
r,
|
|
@@ -146,15 +146,15 @@ const ue = (l) => {
|
|
|
146
146
|
) : d ? /* @__PURE__ */ e.createElement(
|
|
147
147
|
d,
|
|
148
148
|
{
|
|
149
|
-
columns:
|
|
150
|
-
dataItem:
|
|
149
|
+
columns: i.columns,
|
|
150
|
+
dataItem: i.dataItem,
|
|
151
151
|
onSubmit: c,
|
|
152
152
|
onCancel: n
|
|
153
153
|
}
|
|
154
154
|
) : /* @__PURE__ */ e.createElement(
|
|
155
155
|
T,
|
|
156
156
|
{
|
|
157
|
-
initialValues:
|
|
157
|
+
initialValues: i.dataItem,
|
|
158
158
|
onSubmit: c,
|
|
159
159
|
id: "kendo-grid-edit-dialog",
|
|
160
160
|
render: (a) => /* @__PURE__ */ e.createElement(
|
|
@@ -172,7 +172,7 @@ const ue = (l) => {
|
|
|
172
172
|
editor: t.editor,
|
|
173
173
|
component: k,
|
|
174
174
|
label: t.title || t.field,
|
|
175
|
-
validator: t
|
|
175
|
+
validator: t.validator
|
|
176
176
|
}
|
|
177
177
|
)))),
|
|
178
178
|
/* @__PURE__ */ e.createElement(U, { layout: "start" }, /* @__PURE__ */ e.createElement(
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const VirtualScrollOverlay: () => React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),g=require("../utils/GridContext.js");function p(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const l in r)if(l!=="default"){const t=Object.getOwnPropertyDescriptor(r,l);Object.defineProperty(o,l,t.get?t:{enumerable:!0,get:()=>r[l]})}}return o.default=r,Object.freeze(o)}const e=p(f),v=`
|
|
10
|
+
.k-grid-content--hide-scrollbar::-webkit-scrollbar { display: none; }
|
|
11
|
+
|
|
12
|
+
.k-grid-scrollbar-overlay::-webkit-scrollbar { width: 17px; }
|
|
13
|
+
.k-grid-scrollbar-overlay::-webkit-scrollbar-track { background: transparent; }
|
|
14
|
+
.k-grid-scrollbar-overlay::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border: 4px solid transparent; background-clip: content-box; border-radius: 8px; min-height: 40px; }
|
|
15
|
+
.k-grid-scrollbar-overlay::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.4); border: 4px solid transparent; background-clip: content-box; border-radius: 8px; }
|
|
16
|
+
`,k=()=>{const r=e.useContext(g.GridContext),[o,l]=e.useState(!1),t=e.useRef(null),a=e.useCallback(()=>{l(!0),t.current!==null&&clearTimeout(t.current),t.current=setTimeout(()=>l(!1),1e3)},[]);e.useEffect(()=>(r.scrollbarShowCallbackRef&&(r.scrollbarShowCallbackRef.current=a),()=>{r.scrollbarShowCallbackRef&&(r.scrollbarShowCallbackRef.current=null),t.current!==null&&clearTimeout(t.current)}),[r.scrollbarShowCallbackRef,a]),e.useEffect(()=>{const n=()=>{r.vScrollDraggingRef&&(r.vScrollDraggingRef.current=!1)};return document.addEventListener("pointerup",n),()=>document.removeEventListener("pointerup",n)},[r.vScrollDraggingRef]);const b=()=>{r.vScrollDraggingRef&&(r.vScrollDraggingRef.current=!0)},d=n=>{var i,s,u;const c=(i=r.scrollbarContainerRef)==null?void 0:i.current;c&&((u=(s=r.vsRef)==null?void 0:s.current)==null||u.scrollToPosition(c.scrollTop,n,!0))};return e.createElement(e.Fragment,null,e.createElement("style",null,v),e.createElement("div",{ref:r.scrollbarContainerRef,onScroll:d,onMouseEnter:a,onPointerDown:b,className:"k-grid-scrollbar-overlay",style:{position:"absolute",right:0,top:0,bottom:0,width:"17px",overflowY:"scroll",overflowX:"hidden",zIndex:1,opacity:o?1:0,transition:"opacity 0.3s",scrollbarWidth:"auto",scrollbarColor:"rgba(0,0,0,0.25) transparent"}},e.createElement("div",{ref:r.scrollbarSpacerRef})))};exports.VirtualScrollOverlay=k;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { GridContext as f } from "../utils/GridContext.mjs";
|
|
11
|
+
const g = `
|
|
12
|
+
.k-grid-content--hide-scrollbar::-webkit-scrollbar { display: none; }
|
|
13
|
+
|
|
14
|
+
.k-grid-scrollbar-overlay::-webkit-scrollbar { width: 17px; }
|
|
15
|
+
.k-grid-scrollbar-overlay::-webkit-scrollbar-track { background: transparent; }
|
|
16
|
+
.k-grid-scrollbar-overlay::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border: 4px solid transparent; background-clip: content-box; border-radius: 8px; min-height: 40px; }
|
|
17
|
+
.k-grid-scrollbar-overlay::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.4); border: 4px solid transparent; background-clip: content-box; border-radius: 8px; }
|
|
18
|
+
`, v = () => {
|
|
19
|
+
const r = e.useContext(f), [b, a] = e.useState(!1), l = e.useRef(null), t = e.useCallback(() => {
|
|
20
|
+
a(!0), l.current !== null && clearTimeout(l.current), l.current = setTimeout(() => a(!1), 1e3);
|
|
21
|
+
}, []);
|
|
22
|
+
e.useEffect(() => (r.scrollbarShowCallbackRef && (r.scrollbarShowCallbackRef.current = t), () => {
|
|
23
|
+
r.scrollbarShowCallbackRef && (r.scrollbarShowCallbackRef.current = null), l.current !== null && clearTimeout(l.current);
|
|
24
|
+
}), [r.scrollbarShowCallbackRef, t]), e.useEffect(() => {
|
|
25
|
+
const o = () => {
|
|
26
|
+
r.vScrollDraggingRef && (r.vScrollDraggingRef.current = !1);
|
|
27
|
+
};
|
|
28
|
+
return document.addEventListener("pointerup", o), () => document.removeEventListener("pointerup", o);
|
|
29
|
+
}, [r.vScrollDraggingRef]);
|
|
30
|
+
const u = () => {
|
|
31
|
+
r.vScrollDraggingRef && (r.vScrollDraggingRef.current = !0);
|
|
32
|
+
}, d = (o) => {
|
|
33
|
+
var c, i, s;
|
|
34
|
+
const n = (c = r.scrollbarContainerRef) == null ? void 0 : c.current;
|
|
35
|
+
n && ((s = (i = r.vsRef) == null ? void 0 : i.current) == null || s.scrollToPosition(n.scrollTop, o, !0));
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("style", null, g), /* @__PURE__ */ e.createElement(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
ref: r.scrollbarContainerRef,
|
|
41
|
+
onScroll: d,
|
|
42
|
+
onMouseEnter: t,
|
|
43
|
+
onPointerDown: u,
|
|
44
|
+
className: "k-grid-scrollbar-overlay",
|
|
45
|
+
style: {
|
|
46
|
+
position: "absolute",
|
|
47
|
+
right: 0,
|
|
48
|
+
top: 0,
|
|
49
|
+
bottom: 0,
|
|
50
|
+
width: "17px",
|
|
51
|
+
overflowY: "scroll",
|
|
52
|
+
overflowX: "hidden",
|
|
53
|
+
zIndex: 1,
|
|
54
|
+
opacity: b ? 1 : 0,
|
|
55
|
+
transition: "opacity 0.3s",
|
|
56
|
+
scrollbarWidth: "auto",
|
|
57
|
+
scrollbarColor: "rgba(0,0,0,0.25) transparent"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
/* @__PURE__ */ e.createElement("div", { ref: r.scrollbarSpacerRef })
|
|
61
|
+
));
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
v as VirtualScrollOverlay
|
|
65
|
+
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),a=require("@progress/kendo-react-data-tools"),n=require("@progress/kendo-react-common"),l=require("../../utils/GridContext.js");function u(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),a=require("@progress/kendo-react-data-tools"),n=require("@progress/kendo-react-common"),l=require("../../utils/GridContext.js");function u(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const s=u(d),i=t=>{const o=s.useContext(l.GridContext),e=o.headerRef.current,r=e&&e.table()&&e.table().clientWidth,c=n.uGrid;return s.createElement("div",{key:"no-records",className:n.classNames(c.noRecords({})),style:{width:r}},s.createElement("div",{className:n.classNames(c.noRecordsTemplate({})),style:{minHeight:"4em",height:"auto"},[a.KEYBOARD_NAV_DATA_ID]:a.tableKeyboardNavigationTools.generateNavigatableId("no-records",a.tableKeyboardNavigationTools.getIdPrefix(o.navigationStateRef))},t.children))};i.displayName="KendoReactGridNoRecordsContainer";exports.GridNoRecordsContainer=i;
|
|
@@ -7,21 +7,22 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
|
-
import { KEYBOARD_NAV_DATA_ID as
|
|
11
|
-
import { classNames as
|
|
10
|
+
import { KEYBOARD_NAV_DATA_ID as d, tableKeyboardNavigationTools as a } from "@progress/kendo-react-data-tools";
|
|
11
|
+
import { classNames as i, uGrid as c } from "@progress/kendo-react-common";
|
|
12
12
|
import { GridContext as l } from "../../utils/GridContext.mjs";
|
|
13
|
-
const m = (
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */ t.createElement("div", { key: "no-records", className:
|
|
13
|
+
const m = (n) => {
|
|
14
|
+
const o = t.useContext(l), e = o.headerRef.current, s = e && e.table() && e.table().clientWidth, r = c;
|
|
15
|
+
return /* @__PURE__ */ t.createElement("div", { key: "no-records", className: i(r.noRecords({})), style: { width: s } }, /* @__PURE__ */ t.createElement(
|
|
16
16
|
"div",
|
|
17
17
|
{
|
|
18
|
-
className:
|
|
19
|
-
|
|
18
|
+
className: i(r.noRecordsTemplate({})),
|
|
19
|
+
style: { minHeight: "4em", height: "auto" },
|
|
20
|
+
[d]: a.generateNavigatableId(
|
|
20
21
|
"no-records",
|
|
21
|
-
a.getIdPrefix(
|
|
22
|
+
a.getIdPrefix(o.navigationStateRef)
|
|
22
23
|
)
|
|
23
24
|
},
|
|
24
|
-
|
|
25
|
+
n.children
|
|
25
26
|
));
|
|
26
27
|
};
|
|
27
28
|
m.displayName = "KendoReactGridNoRecordsContainer";
|