@progress/kendo-react-grid 9.4.0-develop.2 → 9.4.0-develop.21
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/Grid.js +1 -1
- package/Grid.mjs +4 -5
- package/GridClientContextReader.js +2 -1
- package/GridClientContextReader.mjs +15 -14
- package/GridClientWrapper.js +2 -1
- package/GridClientWrapper.mjs +508 -421
- package/GridColumn.js +1 -1
- package/GridColumn.mjs +4 -5
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +342 -306
- package/GridSearchBox.js +8 -0
- package/GridSearchBox.mjs +35 -0
- package/GridState.js +2 -1
- package/GridState.mjs +79 -67
- package/GridToolbar.js +1 -1
- package/GridToolbar.mjs +5 -6
- package/GridWatermarkOverlay.js +2 -1
- package/GridWatermarkOverlay.mjs +2 -2
- package/NOTICE.txt +40 -51
- package/StatusBar.js +1 -1
- package/StatusBar.mjs +0 -1
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +0 -1
- package/VirtualScrollFixed.js +1 -1
- package/VirtualScrollFixed.mjs +9 -10
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +25 -23
- package/cells/GridDetailCell.js +1 -1
- package/cells/GridDetailCell.mjs +5 -6
- package/cells/GridDetailHierarchyCell.js +1 -1
- package/cells/GridDetailHierarchyCell.mjs +4 -5
- package/cells/GridEditCell.js +1 -1
- package/cells/GridEditCell.mjs +6 -7
- package/cells/GridFilterCell.js +2 -1
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +11 -12
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +7 -8
- package/cells/GridRowReorderCell.js +1 -1
- package/cells/GridRowReorderCell.mjs +3 -4
- package/cells/GridSelectionCell.js +1 -1
- package/cells/GridSelectionCell.mjs +12 -13
- package/cells/client/DetailCellContainer.js +2 -1
- package/cells/client/DetailCellContainer.mjs +2 -2
- package/cells/client/GridCellContainer.js +2 -1
- package/cells/client/GridEditCellContainer.js +2 -1
- package/cells/client/GridEditCellEditor.js +2 -1
- package/cells/client/GridEditCellEditor.mjs +14 -14
- package/cells/client/GridGroupCellContainer.js +2 -1
- package/cells/client/GridGroupCellContainer.mjs +39 -39
- package/cells/client/GridGroupCellToggle.js +2 -1
- package/cells/client/GridGroupCellToggle.mjs +3 -3
- package/cells/client/GridHierarchyCellContainer.js +2 -1
- package/cells/client/GridHierarchyCellToggle.js +2 -1
- package/cells/client/GridHierarchyCellToggle.mjs +15 -15
- package/cells/client/GridRowReorderContainer.js +2 -1
- package/cells/client/GridRowReorderContainer.mjs +14 -8
- package/cells/client/GridSelectionCellContainer.js +2 -1
- package/cells/client/GridSelectionCellInput.js +2 -1
- package/cells/client/GridSelectionCellInput.mjs +3 -3
- package/columnMenu/GridColumnMenuCheckboxFilter.js +2 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +56 -55
- package/columnMenu/GridColumnMenuColumnsChooser.js +9 -0
- package/columnMenu/GridColumnMenuColumnsChooser.mjs +82 -0
- package/columnMenu/GridColumnMenuColumnsList.js +2 -1
- package/columnMenu/GridColumnMenuColumnsList.mjs +16 -16
- package/columnMenu/GridColumnMenuFilter.js +2 -1
- package/columnMenu/GridColumnMenuFilterCell.js +2 -1
- package/columnMenu/GridColumnMenuFilterCell.mjs +3 -3
- package/columnMenu/GridColumnMenuFilterUI.js +2 -1
- package/columnMenu/GridColumnMenuGroup.js +2 -1
- package/columnMenu/GridColumnMenuGroup.mjs +5 -5
- package/columnMenu/GridColumnMenuItem.js +2 -1
- package/columnMenu/GridColumnMenuItem.mjs +2 -2
- package/columnMenu/GridColumnMenuItemContent.js +2 -1
- package/columnMenu/GridColumnMenuItemContent.mjs +4 -4
- package/columnMenu/GridColumnMenuItemGroup.js +2 -1
- package/columnMenu/GridColumnMenuItemGroup.mjs +4 -4
- package/columnMenu/GridColumnMenuSort.js +2 -1
- package/columnMenu/GridColumnMenuSort.mjs +8 -8
- package/columnMenu/GridColumnMenuWrapper.js +2 -1
- package/components/GridContainerElementContainer.js +2 -1
- package/components/GridCustomCellClientContainer.js +2 -1
- package/components/GridCustomCellClientContainer.mjs +2 -2
- package/components/GridDragClue.js +2 -1
- package/components/GridDragClue.mjs +5 -5
- package/components/GridDraggableRowsContainer.js +2 -1
- package/components/GridDropClue.js +2 -1
- package/components/GridDropClue.mjs +5 -5
- package/components/GridElementContainer.js +2 -1
- package/components/GridElementContainer.mjs +6 -6
- package/components/GridLoader.js +9 -0
- package/components/GridLoader.mjs +22 -0
- package/components/PagerContainer.js +2 -1
- package/components/PagerContainer.mjs +4 -4
- package/components/VirtualScrollHeightContainer.js +2 -1
- package/components/VirtualScrollHeightContainer.mjs +2 -2
- package/components/colGroup/GridColGroup.js +2 -1
- package/components/colGroup/GridColGroup.mjs +5 -5
- package/components/icons/reorder-row-svg.js +2 -1
- package/components/icons/reorder-row-svg.mjs +2 -2
- package/components/noRecords/GridNoRecords.js +2 -1
- package/components/noRecords/GridNoRecords.mjs +5 -5
- package/components/noRecords/GridNoRecordsContainer.js +2 -1
- package/components/noRecords/GridNoRecordsContainer.mjs +4 -4
- package/components/table/GridTable.js +2 -1
- package/components/table/GridTable.mjs +4 -4
- package/components/table/GridTableBody.js +2 -1
- package/components/table/GridTableBody.mjs +2 -2
- package/components/table/GridTableScrollable.js +2 -1
- package/components/table/GridTableScrollable.mjs +6 -6
- package/components/utils.js +1 -1
- package/components/utils.mjs +0 -1
- package/constants/index.js +1 -1
- package/constants/index.mjs +0 -1
- package/contextMenu/GridContextMenu.js +2 -1
- package/contextMenu/GridContextMenu.mjs +3 -3
- package/contextMenu/enums.js +1 -1
- package/contextMenu/enums.mjs +0 -1
- package/dist/cdn/js/kendo-react-grid.js +8 -1
- package/drag/ColumnDraggable.js +2 -1
- package/drag/ColumnDraggable.mjs +7 -7
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +0 -1
- package/drag/CommonDragLogic.js +1 -1
- package/drag/CommonDragLogic.mjs +0 -1
- package/drag/GroupingIndicator.js +2 -1
- package/drag/GroupingIndicator.mjs +11 -11
- package/filterCommon.js +1 -1
- package/filterCommon.mjs +4 -5
- package/footer/Footer.js +2 -1
- package/footer/FooterCell.js +1 -1
- package/footer/FooterCell.mjs +3 -4
- package/footer/FooterRow.js +1 -1
- package/footer/FooterRow.mjs +6 -7
- package/footer/client/FooterCellContainer.js +2 -1
- package/footer/client/FooterCellContainer.mjs +5 -5
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +41 -43
- package/header/GridHeaderCell.js +2 -1
- package/header/GridHeaderCell.mjs +4 -4
- package/header/GridHeaderSelectionCell.js +2 -1
- package/header/GroupPanel.js +2 -1
- package/header/Header.js +2 -1
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +33 -35
- package/header/client/GridFilterCellContainer.js +2 -1
- package/header/client/GridFilterCellContainer.mjs +7 -7
- package/header/client/GridFilterCellElementContainer.js +2 -1
- package/header/client/GridHeaderCellContainer.js +2 -1
- package/header/client/GridHeaderCellContainer.mjs +20 -18
- package/header/client/GridHeaderCellElementContainer.js +2 -1
- package/header/client/GridHeaderCellElementContainer.mjs +10 -10
- package/header/client/GridHeaderRowContainer.js +2 -1
- package/header/client/GridHeaderRowReorderCell.js +2 -1
- package/header/client/GridHeaderRowReorderCell.mjs +2 -2
- package/header/client/HeaderCellResizer.js +2 -1
- package/header/client/HeaderRowDraggable.js +2 -1
- package/index.d.mts +214 -8
- package/index.d.ts +214 -8
- package/index.js +1 -1
- package/index.mjs +71 -68
- package/messages/index.js +1 -1
- package/messages/index.mjs +38 -37
- package/messages/messagesMap.js +1 -1
- package/messages/messagesMap.mjs +2 -3
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +13 -12
- package/paging/GridPagerSettings.js +1 -1
- package/paging/GridPagerSettings.mjs +6 -7
- package/rows/GridDetailRow.js +1 -1
- package/rows/GridDetailRow.mjs +2 -3
- package/rows/GridRow.js +2 -1
- package/rows/GridRow.mjs +45 -45
- package/sortCommon.js +8 -0
- package/{interfaces/GridSortSettings.mjs → sortCommon.mjs} +0 -1
- package/utils/_clientModule.js +2 -1
- package/utils/_clientModule.mjs +2 -2
- package/utils/_serverModule.js +1 -1
- package/utils/_serverModule.mjs +0 -1
- package/utils/index.js +1 -1
- package/utils/index.mjs +138 -129
- package/interfaces/GridSortSettings.js +0 -8
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2025 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 t from "react";
|
|
10
|
+
import { TextBox as M, InputPrefix as I, Checkbox as p } from "@progress/kendo-react-inputs";
|
|
11
|
+
import { IconWrap as R } from "@progress/kendo-react-common";
|
|
12
|
+
import { searchIcon as j } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { Button as g } from "@progress/kendo-react-buttons";
|
|
14
|
+
import { useLocalization as z } from "@progress/kendo-react-intl";
|
|
15
|
+
import { filterSelectAll as E, messages as k, filterApplyButton as S, filterResetButton as b } from "../messages/index.mjs";
|
|
16
|
+
const F = (N) => {
|
|
17
|
+
const { columnsState: l, onCloseMenu: c, onColumnsStateChange: h } = N, u = z(), [i, y] = t.useState(""), C = l.reduce((e, n) => ({ ...e, [n.id || ""]: !n.hidden }), {}), [o, d] = t.useState(C), x = t.useMemo(
|
|
18
|
+
() => (l == null ? void 0 : l.filter((e) => {
|
|
19
|
+
var n;
|
|
20
|
+
return (n = e.title || e.field) == null ? void 0 : n.toLowerCase().includes(i.toLowerCase());
|
|
21
|
+
})) || [],
|
|
22
|
+
[l, i]
|
|
23
|
+
), s = t.useMemo(
|
|
24
|
+
() => Object.values(o).filter((e) => e).length,
|
|
25
|
+
[o]
|
|
26
|
+
), m = t.useMemo(() => s === (l == null ? void 0 : l.length), [l, s]), v = t.useCallback(
|
|
27
|
+
(e) => {
|
|
28
|
+
const a = ((r) => (r == null ? void 0 : r.map((f) => ({
|
|
29
|
+
...f,
|
|
30
|
+
hidden: !o[f.id || ""]
|
|
31
|
+
}))) || [])(l);
|
|
32
|
+
h && h(a), c == null || c.call(void 0);
|
|
33
|
+
},
|
|
34
|
+
[o, l, c]
|
|
35
|
+
), L = () => {
|
|
36
|
+
d(C);
|
|
37
|
+
}, w = t.useCallback(() => {
|
|
38
|
+
const e = { ...o };
|
|
39
|
+
Object.keys(e).forEach(
|
|
40
|
+
(n, a) => e[n] = m && a === 0 ? !0 : !m
|
|
41
|
+
), d(e);
|
|
42
|
+
}, [o, m]), B = t.useCallback(
|
|
43
|
+
(e, n) => {
|
|
44
|
+
const a = { ...o };
|
|
45
|
+
a[n || ""] = e, d(a);
|
|
46
|
+
},
|
|
47
|
+
[o]
|
|
48
|
+
), A = (e) => {
|
|
49
|
+
y(String(e.target.value));
|
|
50
|
+
};
|
|
51
|
+
return /* @__PURE__ */ t.createElement("form", { className: "k-filter-menu" }, /* @__PURE__ */ t.createElement("div", { className: "k-filter-menu-container" }, /* @__PURE__ */ t.createElement(
|
|
52
|
+
M,
|
|
53
|
+
{
|
|
54
|
+
className: "k-searchbox",
|
|
55
|
+
value: i,
|
|
56
|
+
onChange: A,
|
|
57
|
+
prefix: () => /* @__PURE__ */ t.createElement(I, null, /* @__PURE__ */ t.createElement(R, { name: "search", icon: j }))
|
|
58
|
+
}
|
|
59
|
+
), /* @__PURE__ */ t.createElement("ul", { className: "k-reset k-multicheck-wrap" }, !i && /* @__PURE__ */ t.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ t.createElement(
|
|
60
|
+
p,
|
|
61
|
+
{
|
|
62
|
+
checked: m,
|
|
63
|
+
onChange: w,
|
|
64
|
+
label: u.toLanguageString(E, k[E])
|
|
65
|
+
}
|
|
66
|
+
)), x.map((e, n) => /* @__PURE__ */ t.createElement("li", { key: e.id, className: "k-item" }, /* @__PURE__ */ t.createElement(
|
|
67
|
+
p,
|
|
68
|
+
{
|
|
69
|
+
disabled: o[e.id || ""] && s === 1,
|
|
70
|
+
checked: o[e.id || ""],
|
|
71
|
+
onChange: (a) => {
|
|
72
|
+
var r;
|
|
73
|
+
return B(!!((r = a.target.element) != null && r.checked), e.id);
|
|
74
|
+
},
|
|
75
|
+
label: e.title || e.field
|
|
76
|
+
}
|
|
77
|
+
)))), /* @__PURE__ */ t.createElement("div", { className: "k-filter-selected-items" }, s, " selected items"), /* @__PURE__ */ t.createElement("div", { className: "k-actions k-actions-start k-actions-horizontal" }, /* @__PURE__ */ t.createElement(g, { type: "button", themeColor: "primary", onClick: v }, u.toLanguageString(S, k[S])), /* @__PURE__ */ t.createElement(g, { type: "button", onClick: L }, u.toLanguageString(b, k[b])))));
|
|
78
|
+
};
|
|
79
|
+
F.displayName = "GridColumnMenuColumnsChooser";
|
|
80
|
+
export {
|
|
81
|
+
F as GridColumnMenuColumnsChooser
|
|
82
|
+
};
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),d=require("@progress/kendo-react-inputs"),x=require("@progress/kendo-react-common"),B=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-buttons"),L=require("@progress/kendo-react-intl"),o=require("../messages/index.js");function R(n){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const i in n)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(a,i,r.get?r:{enumerable:!0,get:()=>n[i]})}}return a.default=n,Object.freeze(a)}const t=R(N),h=n=>{const[a,i]=t.useState(""),r=n.columns.reduce((e,l)=>({...e,[l.id||""]:!!n.columnsState.find(s=>s.id===l.id)}),{}),[c,k]=t.useState(r),b=t.useMemo(()=>n.columns.filter(e=>{var l;return(l=e.title||e.field)==null?void 0:l.toLowerCase().includes(a.toLowerCase())}),[n.columns,a]),C=L.useLocalization(),S=t.useCallback(()=>{const e=n.columns.filter(l=>c[l.id||""]);n.onColumnsChange.call(void 0,e),n.onCloseMenu.call(void 0)},[c,n.columns,n.onColumnsChange,n.onCloseMenu]),E=()=>{k(r)},u=t.useMemo(()=>Object.values(c).filter(e=>e).length,[c]),m=t.useMemo(()=>u===n.columns.length,[n.columns,u]),y=t.useCallback(()=>{const e={...c};Object.keys(e).forEach((l,s)=>e[l]=m&&s===0?!0:!m),k(e)},[c,m]),v=t.useCallback((e,l)=>{const s={...c};s[l||""]=e,k(s)},[c]),M=e=>{i(String(e.target.value))};return t.createElement("form",{className:"k-filter-menu"},t.createElement("div",{className:"k-filter-menu-container"},t.createElement(d.TextBox,{className:"k-searchbox",value:a,onChange:M,prefix:()=>t.createElement(d.InputPrefix,null,t.createElement(x.IconWrap,{name:"search",icon:B.searchIcon}))}),t.createElement("ul",{className:"k-reset k-multicheck-wrap"},!a&&t.createElement("li",{className:"k-item k-check-all-wrap"},t.createElement(d.Checkbox,{checked:m,onChange:y,label:C.toLanguageString(o.filterSelectAll,o.messages[o.filterSelectAll])})),b.map((e,l)=>t.createElement("li",{key:e.id,className:"k-item"},t.createElement(d.Checkbox,{disabled:c[e.id||""]&&u===1,checked:c[e.id||""],onChange:s=>{var f;return v(!!((f=s.target.element)!=null&&f.checked),e.id)},label:e.title||e.field})))),t.createElement("div",{className:"k-filter-selected-items"},u," selected items"),t.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},t.createElement(g.Button,{type:"button",themeColor:"primary",onClick:S},C.toLanguageString(o.filterApplyButton,o.messages[o.filterApplyButton])),t.createElement(g.Button,{type:"button",onClick:E},C.toLanguageString(o.filterResetButton,o.messages[o.filterResetButton])))))};h.displayName="GridColumnMenuColumnsList";exports.GridColumnMenuColumnsList=h;
|
|
@@ -15,33 +15,33 @@ import { useLocalization as I } from "@progress/kendo-react-intl";
|
|
|
15
15
|
import { filterSelectAll as h, messages as u, filterApplyButton as g, filterResetButton as E } from "../messages/index.mjs";
|
|
16
16
|
const R = (l) => {
|
|
17
17
|
const [a, S] = t.useState(""), d = l.columns.reduce(
|
|
18
|
-
(e, n) => ({ ...e, [n.id || ""]: !!l.columnsState.find((
|
|
18
|
+
(e, n) => ({ ...e, [n.id || ""]: !!l.columnsState.find((c) => c.id === n.id) }),
|
|
19
19
|
{}
|
|
20
|
-
), [
|
|
20
|
+
), [o, m] = t.useState(d), b = t.useMemo(
|
|
21
21
|
() => l.columns.filter((e) => {
|
|
22
22
|
var n;
|
|
23
23
|
return (n = e.title || e.field) == null ? void 0 : n.toLowerCase().includes(a.toLowerCase());
|
|
24
24
|
}),
|
|
25
25
|
[l.columns, a]
|
|
26
26
|
), r = I(), N = t.useCallback(() => {
|
|
27
|
-
const e = l.columns.filter((n) =>
|
|
27
|
+
const e = l.columns.filter((n) => o[n.id || ""]);
|
|
28
28
|
l.onColumnsChange.call(void 0, e), l.onCloseMenu.call(void 0);
|
|
29
|
-
}, [
|
|
29
|
+
}, [o, l.columns, l.onColumnsChange, l.onCloseMenu]), x = () => {
|
|
30
30
|
m(d);
|
|
31
31
|
}, s = t.useMemo(
|
|
32
|
-
() => Object.values(
|
|
33
|
-
[
|
|
32
|
+
() => Object.values(o).filter((e) => e).length,
|
|
33
|
+
[o]
|
|
34
34
|
), i = t.useMemo(() => s === l.columns.length, [l.columns, s]), y = t.useCallback(() => {
|
|
35
|
-
const e = { ...
|
|
35
|
+
const e = { ...o };
|
|
36
36
|
Object.keys(e).forEach(
|
|
37
|
-
(n,
|
|
37
|
+
(n, c) => e[n] = i && c === 0 ? !0 : !i
|
|
38
38
|
), m(e);
|
|
39
|
-
}, [
|
|
39
|
+
}, [o, i]), L = t.useCallback(
|
|
40
40
|
(e, n) => {
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
const c = { ...o };
|
|
42
|
+
c[n || ""] = e, m(c);
|
|
43
43
|
},
|
|
44
|
-
[
|
|
44
|
+
[o]
|
|
45
45
|
), v = (e) => {
|
|
46
46
|
S(String(e.target.value));
|
|
47
47
|
};
|
|
@@ -63,11 +63,11 @@ const R = (l) => {
|
|
|
63
63
|
)), b.map((e, n) => /* @__PURE__ */ t.createElement("li", { key: e.id, className: "k-item" }, /* @__PURE__ */ t.createElement(
|
|
64
64
|
k,
|
|
65
65
|
{
|
|
66
|
-
disabled:
|
|
67
|
-
checked:
|
|
68
|
-
onChange: (
|
|
66
|
+
disabled: o[e.id || ""] && s === 1,
|
|
67
|
+
checked: o[e.id || ""],
|
|
68
|
+
onChange: (c) => {
|
|
69
69
|
var C;
|
|
70
|
-
return L(!!((C =
|
|
70
|
+
return L(!!((C = c.target.element) != null && C.checked), e.id);
|
|
71
71
|
},
|
|
72
72
|
label: e.title || e.field
|
|
73
73
|
}
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),L=require("@progress/kendo-data-query"),Y=require("./GridColumnMenuItem.js"),Z=require("./GridColumnMenuItemGroup.js"),$=require("./GridColumnMenuItemContent.js"),ee=require("@progress/kendo-react-intl"),i=require("../filterCommon.js"),c=require("../messages/index.js"),te=require("./GridColumnMenuFilterUI.js"),T=require("@progress/kendo-react-buttons"),re=require("@progress/kendo-svg-icons");function le(e){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const f in e)if(f!=="default"){const F=Object.getOwnPropertyDescriptor(e,f);Object.defineProperty(u,f,F.get?F:{enumerable:!0,get:()=>e[f]})}}return u.default=e,Object.freeze(u)}const l=le(X),I=e=>e||{filters:[],logic:"and"},v=(e,u)=>I(u).filters.filter(n=>L.isCompositeFilterDescriptor(n)?n.filters&&n.filters.length&&n.filters.length<=2&&!n.filters.find(C=>L.isCompositeFilterDescriptor(C)||C.field!==e):!1)[0]||null,ne=(e,u)=>!!v(e,u),ie=e=>{const u=l.useCallback(()=>{let t;if(e.column&&e.column.field){const a=i.getFilterType(e.column.filter),r=i.getDefaultOperator(e.filterOperators,a);t=v(e.column.field,e.filter),t=t?{...t,filters:t.filters.map(o=>({...o}))}:{logic:"and",filters:[{field:e.column.field,operator:r,value:i.IsUnaryFilter(r)?null:void 0},{field:e.column.field,operator:r,value:i.IsUnaryFilter(r)?null:void 0}]},t.filters.filter(o=>o.field===e.column.field).length===1&&t.filters.splice(1,0,{field:e.column.field,operator:r})}return t},[e.column]),[f,F]=l.useState(e.expanded||!1),[n,C]=l.useState(u()),S=()=>e.expanded!==void 0,_=()=>{const t=S(),a=!(t?e.expanded:f);e.onExpandChange&&e.onExpandChange(a),t||F(a)},j=t=>{p(0,t)},R=t=>{p(1,t)},p=(t,a)=>{const r=n.filters.map((o,s)=>s===t?{...o,value:a.value,operator:a.operator}:o);C({...n,filters:r})},V=t=>{C({...n,logic:t.target.value.operator})},w=t=>{if(t.preventDefault(),!e.onFilterChange)return;const a=e.column.field,r=I(e.filter),o=v(a,e.filter),s=r.filters.filter(g=>g!==o);s.length?e.onFilterChange({...r,filters:s},t):e.onFilterChange(null,t),e.onCloseMenu&&e.onCloseMenu()},b=()=>({...n,filters:n.filters.filter(t=>t.value!==void 0&&t.value!==null&&t.value!==""||t.value===null&&t.operator)}),N=t=>{if(t.preventDefault(),!e.onFilterChange)return;const a=e.column.field,r=I(e.filter),o=v(a,e.filter),s=b();let g=null;if(o&&s.filters.length>0){const M=r.filters.map(y=>y===o?s:y);g={...r,filters:M}}else if(s.filters.length===0){const M=r.filters.filter(y=>y!==o);M.length&&(g={...r,filters:M})}else g={...r,filters:[...r.filters,s]};e.onFilterChange(g,t),e.onCloseMenu&&e.onCloseMenu()},{column:h,filterUI:z,hideSecondFilter:x,filterOperators:A}=e,d=ee.useLocalization();if(!h||!h.field)return l.createElement("div",null);const G=i.getFilterType(h.filter),H=x!==void 0?x:i.defaultHideSecondFilter[G],m=n.filters,O=i.operatorMap(A[G],d),k=i.operatorMap(i.booleanFilterValues,d),Q={field:h.field,value:m[0].value,operator:m[0].operator,operators:O,booleanValues:k,onChange:j,filterType:G},J={field:h.field,value:m[1].value,operator:m[1].operator,operators:O,booleanValues:k,onChange:R,filterType:G},D=n.logic,q=i.operatorMap(i.filterLogicList,d),E={value:q.find(t=>t.operator===(D===null?"":D)),onChange:V,data:q},B=z,P={firstFilterProps:Q,secondFilterProps:J,logicData:E.data,logicValue:E.value,onLogicChange:E.onChange,hideSecondFilter:H},K=b().filters.length!==0||i.IsUnaryFilter(m[0].operator)||i.IsUnaryFilter(m[1].operator),W=S()?e.expanded:f,U=e.alwaysExpand;return l.createElement(Z.GridColumnMenuItemGroup,null,!U&&l.createElement(Y.GridColumnMenuItem,{title:d.toLanguageString(c.filterTitle,c.messages[c.filterTitle]),iconClass:"k-i-filter",svgIcon:re.filterIcon,onClick:_}),l.createElement($.GridColumnMenuItemContent,{show:U||!!W},l.createElement("form",{className:"k-filter-menu",onSubmit:N,onReset:w},l.createElement("div",{className:"k-filter-menu-container"},B?l.createElement(B,{...P}):l.createElement(te.GridColumnMenuFilterUI,{...P}),l.createElement("div",{className:"k-actions k-actions-stretched"},l.createElement(T.Button,{themeColor:"primary",disabled:!K},d.toLanguageString(c.filterSubmitButton,c.messages[c.filterSubmitButton])),l.createElement(T.Button,{type:"reset"},d.toLanguageString(c.filterClearButton,c.messages[c.filterClearButton])))))))};exports.GridColumnMenuFilter=ie;exports.filterGroupByField=v;exports.isColumnMenuFilterActive=ne;exports.rootFilterOrDefault=I;
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),d=require("@progress/kendo-react-dropdowns"),g=require("@progress/kendo-react-inputs"),h=require("@progress/kendo-react-dateinputs"),i=require("../filterCommon.js");function b(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const c=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(l,o,c.get?c:{enumerable:!0,get:()=>e[o]})}}return l.default=e,Object.freeze(l)}const a=b(f),D=e=>{const l=()=>{if(e.filterType==="boolean")return;const n=e.operators.find(r=>r.operator===e.operator)||null;return a.createElement(d.DropDownList,{value:n,onChange:c,data:e.operators,textField:"text"})},o=(n,r)=>{i.cellInputChange(n,r,e)},c=n=>{i.cellOperatorChange(n,e.value,e.onChange)},m=n=>{i.cellBoolDropdownChange(n,e.onChange)},C=(n,r,s)=>{switch(n){case"numeric":return a.createElement(g.NumericTextBox,{value:r,onChange:t=>{o(t.value,t.syntheticEvent)},rangeOnEnter:!1});case"date":return a.createElement(h.DatePicker,{value:r,onChange:t=>{o(t.value,t.syntheticEvent)}});case"boolean":{const t=u=>u==null;return a.createElement(d.DropDownList,{onChange:m,value:s.find(u=>u.operator===(t(r)?"":r)),data:s,textField:"text"})}default:return a.createElement(g.Input,{value:r||"",onChange:t=>{o(t.target.value,t.syntheticEvent)}})}};return a.createElement(a.Fragment,null,l(),C(e.filterType,e.value,e.booleanValues))};exports.GridColumnMenuFilterCell=D;
|
|
@@ -10,7 +10,7 @@ import * as o from "react";
|
|
|
10
10
|
import { DropDownList as i } from "@progress/kendo-react-dropdowns";
|
|
11
11
|
import { Input as C, NumericTextBox as d } from "@progress/kendo-react-inputs";
|
|
12
12
|
import { DatePicker as f } from "@progress/kendo-react-dateinputs";
|
|
13
|
-
import { cellOperatorChange as
|
|
13
|
+
import { cellOperatorChange as E, cellInputChange as s, cellBoolDropdownChange as v } from "../filterCommon.mjs";
|
|
14
14
|
const w = (e) => {
|
|
15
15
|
const u = () => {
|
|
16
16
|
if (e.filterType === "boolean")
|
|
@@ -18,9 +18,9 @@ const w = (e) => {
|
|
|
18
18
|
const n = e.operators.find((r) => r.operator === e.operator) || null;
|
|
19
19
|
return /* @__PURE__ */ o.createElement(i, { value: n, onChange: m, data: e.operators, textField: "text" });
|
|
20
20
|
}, l = (n, r) => {
|
|
21
|
-
|
|
21
|
+
s(n, r, e);
|
|
22
22
|
}, m = (n) => {
|
|
23
|
-
|
|
23
|
+
E(n, e.value, e.onChange);
|
|
24
24
|
}, h = (n) => {
|
|
25
25
|
v(n, e.onChange);
|
|
26
26
|
}, g = (n, r, c) => {
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),o=require("./GridColumnMenuFilterCell.js"),s=require("@progress/kendo-react-dropdowns");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=d(u),m=e=>{const{firstFilterProps:r,hideSecondFilter:n,secondFilterProps:l,logicData:i,logicValue:a,onLogicChange:c}=e;return t.createElement(t.Fragment,null,t.createElement(o.GridColumnMenuFilterCell,{...r}),!n&&t.createElement(t.Fragment,null,t.createElement(s.DropDownList,{data:i,value:a,onChange:c,className:"k-filter-and",textField:"text"}),t.createElement(o.GridColumnMenuFilterCell,{...l})))};exports.GridColumnMenuFilterUI=m;
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),C=require("@progress/kendo-react-intl"),G=require("./GridColumnMenuItemGroup.js"),p=require("./GridColumnMenuItem.js"),l=require("../messages/index.js"),a=require("@progress/kendo-svg-icons");function I(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,u.get?u:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const d=I(m),M=e=>{const o=t=>{if(t.preventDefault(),e.onGroupChange){if(!e.column.field)return;const r=(e.group||[]).slice(),s=r.findIndex(g=>g.field===e.column.field);s>-1?r.splice(s,1):r.push({field:e.column.field}),e.onGroupChange(r,t)}e.onCloseMenu&&e.onCloseMenu()},{group:n,column:u}=e,f=C.useLocalization(),i=!!(n&&u.field&&n.find(t=>t.field===u.field)),c=i?l.ungroupColumn:l.groupColumn;return d.createElement(G.GridColumnMenuItemGroup,null,d.createElement(p.GridColumnMenuItem,{title:f.toLanguageString(c,l.messages[c]),iconClass:i?"k-i-ungroup":"k-i-group",svgIcon:i?a.ungroupIcon:a.groupIcon,onClick:o}))};exports.GridColumnMenuGroup=M;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as m from "react";
|
|
10
|
-
import { useLocalization as
|
|
11
|
-
import { GridColumnMenuItemGroup as
|
|
10
|
+
import { useLocalization as g } from "@progress/kendo-react-intl";
|
|
11
|
+
import { GridColumnMenuItemGroup as s } from "./GridColumnMenuItemGroup.mjs";
|
|
12
12
|
import { GridColumnMenuItem as d } from "./GridColumnMenuItem.mjs";
|
|
13
13
|
import { messages as C, groupColumn as p, ungroupColumn as G } from "../messages/index.mjs";
|
|
14
14
|
import { groupIcon as I, ungroupIcon as M } from "@progress/kendo-svg-icons";
|
|
@@ -17,14 +17,14 @@ const L = (o) => {
|
|
|
17
17
|
if (n.preventDefault(), o.onGroupChange) {
|
|
18
18
|
if (!o.column.field)
|
|
19
19
|
return;
|
|
20
|
-
const e = (o.group || []).slice(), t = e.findIndex((
|
|
20
|
+
const e = (o.group || []).slice(), t = e.findIndex((a) => a.field === o.column.field);
|
|
21
21
|
t > -1 ? e.splice(t, 1) : e.push({
|
|
22
22
|
field: o.column.field
|
|
23
23
|
}), o.onGroupChange(e, n);
|
|
24
24
|
}
|
|
25
25
|
o.onCloseMenu && o.onCloseMenu();
|
|
26
|
-
}, { group: i, column: l } = o, f =
|
|
27
|
-
return /* @__PURE__ */ m.createElement(
|
|
26
|
+
}, { group: i, column: l } = o, f = g(), u = !!(i && l.field && i.find((n) => n.field === l.field)), r = u ? G : p;
|
|
27
|
+
return /* @__PURE__ */ m.createElement(s, null, /* @__PURE__ */ m.createElement(
|
|
28
28
|
d,
|
|
29
29
|
{
|
|
30
30
|
title: f.toLanguageString(r, C[r]),
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),o=require("@progress/kendo-react-common");function i(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const c=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,c.get?c:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const r=i(l),u=t=>{const{title:n,iconClass:e,svgIcon:c,selected:a}=t;return r.createElement("div",{onClick:t.onClick,className:`k-columnmenu-item ${a?"k-selected":""}`},(e||c)&&r.createElement(o.IconWrap,{name:e&&o.toIconName(e),icon:c}),n)};exports.GridColumnMenuItem=u;
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as c from "react";
|
|
10
|
-
import { IconWrap as l, toIconName as
|
|
10
|
+
import { IconWrap as l, toIconName as a } from "@progress/kendo-react-common";
|
|
11
11
|
const r = (t) => {
|
|
12
12
|
const { title: o, iconClass: e, svgIcon: n, selected: m } = t;
|
|
13
|
-
return /* @__PURE__ */ c.createElement("div", { onClick: t.onClick, className: `k-columnmenu-item ${m ? "k-selected" : ""}` }, (e || n) && /* @__PURE__ */ c.createElement(l, { name: e &&
|
|
13
|
+
return /* @__PURE__ */ c.createElement("div", { onClick: t.onClick, className: `k-columnmenu-item ${m ? "k-selected" : ""}` }, (e || n) && /* @__PURE__ */ c.createElement(l, { name: e && a(e), icon: n }), o);
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
r as GridColumnMenuItem
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),i=require("@progress/kendo-react-animation"),s=require("@progress/kendo-react-common");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=u(l),m=e=>{const{children:n,id:t,className:o,style:r,show:a}=e;return c.createElement("div",{id:t,className:s.classNames("k-columnmenu-item-content",o),style:r,tabIndex:0},c.createElement(i.Reveal,{style:{position:"relative",display:"block"}},a?n:null))};exports.GridColumnMenuItemContent=m;
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
import * as e from "react";
|
|
10
10
|
import { Reveal as a } from "@progress/kendo-react-animation";
|
|
11
11
|
import { classNames as r } from "@progress/kendo-react-common";
|
|
12
|
-
const
|
|
13
|
-
const { children: n, id:
|
|
14
|
-
return /* @__PURE__ */ e.createElement("div", { id:
|
|
12
|
+
const d = (t) => {
|
|
13
|
+
const { children: n, id: o, className: l, style: m, show: s } = t;
|
|
14
|
+
return /* @__PURE__ */ e.createElement("div", { id: o, className: r("k-columnmenu-item-content", l), style: m, tabIndex: 0 }, /* @__PURE__ */ e.createElement(a, { style: { position: "relative", display: "block" } }, s ? n : null));
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
d as GridColumnMenuItemContent
|
|
18
18
|
};
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),a=require("@progress/kendo-react-common");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=u(c),s=e=>{const{children:n,id:t,className:r,style:o}=e;return l.createElement("div",{id:t,className:a.classNames("k-columnmenu-item-wrapper",r),style:o},n)};exports.GridColumnMenuItemGroup=s;
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as a from "react";
|
|
10
|
-
import { classNames as
|
|
11
|
-
const
|
|
10
|
+
import { classNames as o } from "@progress/kendo-react-common";
|
|
11
|
+
const n = (e) => {
|
|
12
12
|
const { children: m, id: r, className: t, style: s } = e;
|
|
13
|
-
return /* @__PURE__ */ a.createElement("div", { id: r, className:
|
|
13
|
+
return /* @__PURE__ */ a.createElement("div", { id: r, className: o("k-columnmenu-item-wrapper", t), style: s }, m);
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
n as GridColumnMenuItemGroup
|
|
17
17
|
};
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),g=require("./GridColumnMenuItem.js"),j=require("./GridColumnMenuItemGroup.js"),C=require("../sortCommon.js"),y=require("@progress/kendo-react-intl"),c=require("../messages/index.js"),S=require("@progress/kendo-svg-icons");function R(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=R(O),M="asc",I="desc",D=(e,n)=>n?n.findIndex(t=>t.field===e):-1,b=(e,n)=>!!(n&&e>-1&&n[e].dir===M),k=(e,n)=>!!(n&&e>-1&&n[e].dir===I),_=(e,n)=>{const t=D(e,n);return k(t,n)||b(t,n)},z=e=>{const n=o=>{r(o,M),e.onCloseMenu&&e.onCloseMenu()},t=o=>{r(o,I),e.onCloseMenu&&e.onCloseMenu()},r=(o,q)=>{if(o.preventDefault(),!e.onSortChange)return;const{allowUnsort:A,mode:v}=C.normalize(e.sortable||!1,!1),d=(e.sort||[]).filter(i=>i.field===e.column.field)[0],m=C.sortSeqMap[A][d&&d.dir||""][q],f=v==="single"?[]:(e.sort||[]).filter(i=>i.field!==e.column.field);m!==""&&e.column.field&&f.push({field:e.column.field,dir:m}),e.onSortChange(f,o)},{sort:s,column:G}=e,u=D(G.field,s),a=y.useLocalization();return l.createElement(j.GridColumnMenuItemGroup,null,l.createElement(g.GridColumnMenuItem,{title:a.toLanguageString(c.sortAscending,c.messages[c.sortAscending]),iconClass:"k-i-sort-asc-sm",svgIcon:S.sortAscSmallIcon,selected:b(u,s),onClick:n}),l.createElement(g.GridColumnMenuItem,{title:a.toLanguageString(c.sortDescending,c.messages[c.sortDescending]),iconClass:"k-i-sort-desc-sm",svgIcon:S.sortDescSmallIcon,selected:k(u,s),onClick:t}))};exports.GridColumnMenuSort=z;exports.isColumnMenuSortActive=_;
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
9
|
+
import * as i from "react";
|
|
10
10
|
import { GridColumnMenuItem as f } from "./GridColumnMenuItem.mjs";
|
|
11
11
|
import { GridColumnMenuItemGroup as x } from "./GridColumnMenuItemGroup.mjs";
|
|
12
|
-
import { normalize as z, sortSeqMap as L } from "../
|
|
12
|
+
import { normalize as z, sortSeqMap as L } from "../sortCommon.mjs";
|
|
13
13
|
import { useLocalization as R } from "@progress/kendo-react-intl";
|
|
14
14
|
import { sortAscending as C, messages as g, sortDescending as S } from "../messages/index.mjs";
|
|
15
15
|
import { sortAscSmallIcon as w, sortDescSmallIcon as _ } from "@progress/kendo-svg-icons";
|
|
@@ -18,16 +18,16 @@ const D = "asc", I = "desc", M = (e, n) => n ? n.findIndex((o) => o.field === e)
|
|
|
18
18
|
return A(o, n) || k(o, n);
|
|
19
19
|
}, H = (e) => {
|
|
20
20
|
const n = (t) => {
|
|
21
|
-
|
|
21
|
+
l(t, D), e.onCloseMenu && e.onCloseMenu();
|
|
22
22
|
}, o = (t) => {
|
|
23
|
-
|
|
24
|
-
},
|
|
23
|
+
l(t, I), e.onCloseMenu && e.onCloseMenu();
|
|
24
|
+
}, l = (t, G) => {
|
|
25
25
|
if (t.preventDefault(), !e.onSortChange)
|
|
26
26
|
return;
|
|
27
|
-
const { allowUnsort: h, mode: v } = z(e.sortable || !1, !1), u = (e.sort || []).filter((
|
|
27
|
+
const { allowUnsort: h, mode: v } = z(e.sortable || !1, !1), u = (e.sort || []).filter((r) => r.field === e.column.field)[0], a = L[h][u && u.dir || ""][G], d = v === "single" ? [] : (e.sort || []).filter((r) => r.field !== e.column.field);
|
|
28
28
|
a !== "" && e.column.field && d.push({ field: e.column.field, dir: a }), e.onSortChange(d, t);
|
|
29
29
|
}, { sort: c, column: E } = e, s = M(E.field, c), m = R();
|
|
30
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ i.createElement(x, null, /* @__PURE__ */ i.createElement(
|
|
31
31
|
f,
|
|
32
32
|
{
|
|
33
33
|
title: m.toLanguageString(C, g[C]),
|
|
@@ -36,7 +36,7 @@ const D = "asc", I = "desc", M = (e, n) => n ? n.findIndex((o) => o.field === e)
|
|
|
36
36
|
selected: k(s, c),
|
|
37
37
|
onClick: n
|
|
38
38
|
}
|
|
39
|
-
), /* @__PURE__ */
|
|
39
|
+
), /* @__PURE__ */ i.createElement(
|
|
40
40
|
f,
|
|
41
41
|
{
|
|
42
42
|
title: m.toLanguageString(S, g[S]),
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),_=require("@progress/kendo-react-popup"),a=require("@progress/kendo-react-common"),j=require("@progress/kendo-svg-icons"),E=require("../messages/index.js"),z=require("@progress/kendo-react-intl");function A(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const u in n)if(u!=="default"){const l=Object.getOwnPropertyDescriptor(n,u);Object.defineProperty(r,u,l.get?l:{enumerable:!0,get:()=>n[u]})}}return r.default=n,Object.freeze(r)}const o=A(W),$=[".k-columnmenu-item-content",".k-filter-menu-container"].map(n=>a.TABBABLE_ELEMENTS.map(r=>`${n} ${r}`)),x=[[".k-tabstrip-items"],[".k-columnmenu-item"],...$],F=n=>{const[r,u]=o.useState(!1),l=o.useRef(null),i=o.useRef(null),s=o.useRef(null),m=o.useRef(0),{columnMenu:M,...v}=n,{column:k,columnMenuIcon:f,navigatable:w}=n,p=z.useLocalization(),b=k.title||k.field,y=b?`${b} `:"",C="#",D=e=>{const t=a.getActiveElement(document);clearTimeout(m.current),m.current=window.setTimeout(()=>{t&&e.relatedTarget!==l.current&&i.current&&!i.current.contains(t)&&d()})},S=()=>{clearTimeout(m.current)},T=e=>{e.preventDefault(),r&&n.onCloseMenu&&n.onCloseMenu(),u(!r)},d=()=>{n.onCloseMenu&&n.onCloseMenu(),u(!1),!n.navigatable&&l.current&&l.current.focus()},I=e=>{var t;if(e.keyCode===a.Keys.tab){const c=e.target,h=c&&((t=c.closest(".k-grid"))==null?void 0:t.getElementsByClassName("k-grid-content")[0]);h&&h.scrollWidth>h.clientWidth&&c.scrollIntoView({inline:"center"})}},g=o.useMemo(()=>n.show!==void 0?n.show:r,[n.show,r]),R=e=>{var t;(t=s.current)==null||t.triggerKeyboardEvent(e)},O=e=>{var t;(t=s.current)==null||t.triggerMouseEvent(e)},K=(e,t,c)=>{c.preventDefault(),c.shiftKey?t.focusPrevious(e):t.focusNext(e)},P=(e,t,c)=>{e&&e.click()},q=(e,t,c)=>{c.preventDefault(),d()},B=(e,t,c)=>{c.preventDefault(),t.focusElement(e)},N=e=>{!e.isAnchorClicked&&u(!1)};return o.useEffect(()=>(g&&i.current&&(s.current=new a.Navigation({tabIndex:0,root:i,selectors:x,keyboardEvents:{keydown:{Tab:K,Enter:P,Escape:q}},mouseEvents:{mousedown:B}}),s.current.focusElement(s.current.first,null)),()=>{s.current&&(s.current=null)}),[g]),o.createElement(o.Fragment,null,o.createElement("a",{className:"k-grid-header-menu k-grid-column-menu",ref:l,onClick:T,onKeyDown:I,href:C,tabIndex:w?-1:void 0,"aria-label":`${w?"":y}${p.toLanguageString(E.columnMenu,E.messages[E.columnMenu])}`},f?o.createElement(a.IconWrap,{name:f.name,icon:f}):o.createElement(a.IconWrap,{name:"more-vertical",icon:j.moreVerticalIcon})),o.createElement(_.Popup,{anchor:l.current,show:g,popupClass:"k-column-menu k-column-menu-popup k-grid-columnmenu-popup",onMouseDownOutside:N},o.createElement("div",{ref:i,onBlur:D,onFocus:S,onMouseDown:O,onKeyDown:R,style:{outline:"none"}},M&&o.createElement(M,{...v,onCloseMenu:d}))))};exports.GridColumnMenuWrapper=F;
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),i=require("../GridClientWrapper.js");function l(t){const n=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(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const o=l(c),a=t=>{const n=o.useContext(i.GridContext),{children:e}=t;return o.cloneElement(e,{...e==null?void 0:e.props,ref:n.containerElementRef,onScroll:n.scrollHandler})};exports.GridContainerElementContainer=a;
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),a=require("../GridClientWrapper.js");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const r=l(o),c=e=>{const t=r.useContext(a.GridContext);return t.isClient||e.isClient?e.children&&r.cloneElement(e.children,{onContextMenu:t.onContextMenu,onChange:t.itemChange,selectionChange:n=>{t.selectionChange({event:n,dataItem:e.dataItem,dataIndex:e.rowDataIndex,columnIndex:e.columnIndex})}}):e.children};exports.GridCustomCellClientContainer=c;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
10
|
import { GridContext as o } from "../GridClientWrapper.mjs";
|
|
11
|
-
const
|
|
11
|
+
const C = (e) => {
|
|
12
12
|
const n = t.useContext(o);
|
|
13
13
|
return n.isClient || e.isClient ? e.children && t.cloneElement(e.children, {
|
|
14
14
|
onContextMenu: n.onContextMenu,
|
|
@@ -24,5 +24,5 @@ const l = (e) => {
|
|
|
24
24
|
}) : e.children;
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
C as GridCustomCellClientContainer
|
|
28
28
|
};
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),a=require("@progress/kendo-react-data-tools"),u=require("../GridClientWrapper.js");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const o=i(c),l=e=>{const t=o.useContext(u.GridContext);return o.createElement(a.DragClue,{ref:t.dragLogicRef.current.refDragElementClue})};exports.GridDragClue=l;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
9
|
+
import * as r from "react";
|
|
10
10
|
import { DragClue as t } from "@progress/kendo-react-data-tools";
|
|
11
11
|
import { GridContext as o } from "../GridClientWrapper.mjs";
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */
|
|
12
|
+
const i = (n) => {
|
|
13
|
+
const e = r.useContext(o);
|
|
14
|
+
return /* @__PURE__ */ r.createElement(t, { ref: e.dragLogicRef.current.refDragElementClue });
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
i as GridDragClue
|
|
18
18
|
};
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),A=require("../GridClientWrapper.js"),y=require("@progress/kendo-react-common"),n=require("./utils.js"),L=require("react-dom"),m=require("@progress/kendo-svg-icons"),S={zIndex:"19000",position:"absolute",display:"none",visibility:"hidden"},x={zIndex:"20000",display:"flex",position:"fixed",visibility:"hidden",pointerEvents:"none"},X=R=>{const{rowReorderSettings:l,columns:w,unstyled:C}=R,{rowReorder:k,reorderRowDragTargetRef:u,reorderRowDropTargetRef:i,activeDragRowDataItemRef:d,tableBodyElementRef:T}=e.useContext(A.GridContext),[N,h]=e.useState(!1),[O,P]=e.useState(m.cancelIcon),b=e.useRef(null),f=e.useRef(null),c=e.useRef(null),I=e.useRef(null),p=e.useRef(!1),D=e.useRef(null),v=typeof l=="object"?l.enabled:l;e.useEffect(()=>{T.current=b.current},[]);const q=r=>{const t=r.originalEvent.target;t.closest(".k-drag-cell")&&(I.current=r.offsetY,p.current=!0,u.current=t.closest(".k-table-row"))},M=r=>{!p.current||!v||!d.current||(u.current&&(u.current.style.userSelect="none"),h(!0))},Y=r=>{if(!p.current&&!f.current)return;const{clientX:t,clientY:o}=r,a=I.current,g={x:t,y:o-a};f.current&&(f.current.style.left=`${g.x}px`,f.current.style.top=`${g.y}px`,f.current.style.visibility="visible"),F(r)},B=r=>{var o;if(!v||!d.current)return;h(!1);const t=Number((o=i.current)==null?void 0:o.getAttribute("absolute-row-index"));k(r,t,D.current),p.current=!1};y.useDraggable(b,{onPress:q,onDragStart:M,onDrag:Y,onDragEnd:B});const F=r=>{D.current=z(r),G()},G=()=>{var a;if(D.current===n.dropDirection.forbidden||!i.current){$();return}V();const r=n.getOffset(i.current);let t=r.top;const o=r.left+(((a=c.current)==null?void 0:a.offsetWidth)||0)/2;D.current===n.dropDirection.after&&(t+=i.current.offsetHeight),c.current&&(c.current.style.top=`${t}px`,c.current.style.left=`${o}px`,c.current.style.visibility="visible")},$=()=>{c.current&&(c.current.style.display="none")},V=()=>{c.current&&(c.current.style.display="")},j=()=>{if(d.current){if(l.dragClue)return typeof l.dragClue=="string"?l.dragClue:l.dragClue(d.current);{const r=w.find(o=>!o.hidden&&o.columnType==="data");return d.current[r.field]}}},z=r=>{if(i.current===u.current||!i.current||n.isDifferentParent(i.current,u.current))return n.dropDirection.forbidden;const t=i.current.getBoundingClientRect(),a=t.height/2,g=r.clientY,E=t.top;let s=null;g<E+a?s=n.dropDirection.before:g>=E+t.height-a&&(s=n.dropDirection.after),(s===n.dropDirection.before&&i.current===u.current.nextElementSibling||s===n.dropDirection.after&&i.current===u.current.previousElementSibling)&&(s=n.dropDirection.forbidden);const W=s===n.dropDirection.forbidden?m.cancelIcon:m.insertMiddleIcon;return P(W),s},H=e.useMemo(j,[d.current]);return e.createElement(e.Fragment,null,N&&L.createPortal(e.createElement(e.Fragment,null,e.createElement("div",{ref:c,style:S,className:y.classNames(C.rowReorder({dropIndicatorMain:!0,dropIndicatorDirection:!0}))},e.createElement("div",{className:"k-drop-hint-start"}),e.createElement("div",{className:"k-drop-hint-line"})),e.createElement("div",{ref:f,style:x,className:y.classNames(C.rowReorder({dragClueMain:!0,dragClueOperation:!0}))},e.createElement(y.SvgIcon,{className:"k-drag-status",icon:O}),H)),document.body),e.cloneElement(R.children,{ref:b}))};exports.GridReorderableRowsContainer=X;exports.dropIndicatorStyles=S;exports.hintClueStyles=x;
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),u=require("@progress/kendo-react-data-tools"),a=require("../GridClientWrapper.js");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const n=i(c),l=e=>{const t=n.useContext(a.GridContext);return n.createElement(u.DropClue,{ref:t.dragLogicRef.current.refDropElementClue})};exports.GridDropClue=l;
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
9
|
+
import * as r from "react";
|
|
10
10
|
import { DropClue as t } from "@progress/kendo-react-data-tools";
|
|
11
11
|
import { GridContext as o } from "../GridClientWrapper.mjs";
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */
|
|
12
|
+
const i = (n) => {
|
|
13
|
+
const e = r.useContext(o);
|
|
14
|
+
return /* @__PURE__ */ r.createElement(t, { ref: e.dragLogicRef.current.refDropElementClue });
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
i as GridDropClue
|
|
18
18
|
};
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
8
|
+
"use client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),i=require("../GridClientWrapper.js");function u(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const r=u(c),a=t=>{const n=r.useContext(i.GridContext),{children:e}=t;return r.cloneElement(e,{...e==null?void 0:e.props,ref:n.elementRef,onKeyDown:n.onKeyDown,onFocus:n.onFocus})};exports.GridElementContainer=a;
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
import * as n from "react";
|
|
10
10
|
import { GridContext as r } from "../GridClientWrapper.mjs";
|
|
11
11
|
const c = (t) => {
|
|
12
|
-
const
|
|
13
|
-
return n.cloneElement(
|
|
14
|
-
...
|
|
15
|
-
ref:
|
|
16
|
-
onKeyDown:
|
|
17
|
-
onFocus:
|
|
12
|
+
const e = n.useContext(r), { children: o } = t;
|
|
13
|
+
return n.cloneElement(o, {
|
|
14
|
+
...o == null ? void 0 : o.props,
|
|
15
|
+
ref: e.elementRef,
|
|
16
|
+
onKeyDown: e.onKeyDown,
|
|
17
|
+
onFocus: e.onFocus
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
export {
|