@progress/kendo-react-grid 11.0.0-develop.9 → 11.0.1-develop.1
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/BasePDFExport.js +8 -0
- package/BasePDFExport.mjs +52 -0
- package/Grid.js +1 -1
- package/Grid.mjs +13 -18
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +300 -288
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +387 -429
- package/GridPdfExportButton.js +8 -0
- package/GridPdfExportButton.mjs +35 -0
- package/GridSearchBox.js +1 -1
- package/GridSearchBox.mjs +1 -1
- package/GridToolbar.js +1 -1
- package/GridToolbar.mjs +15 -20
- package/StatusBar.js +1 -1
- package/StatusBar.mjs +23 -23
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +46 -46
- package/cells/datacell/GridCell.js +1 -1
- package/cells/datacell/GridCell.mjs +9 -15
- package/cells/datacell/GridCellServerContainer.js +1 -1
- package/cells/datacell/GridCellServerContainer.mjs +1 -1
- package/cells/datacell/useCellClientTdProps.js +1 -1
- package/cells/datacell/useCellClientTdProps.mjs +1 -1
- package/cells/editcell/GridEditCell.js +1 -1
- package/cells/editcell/GridEditCell.mjs +7 -13
- package/cells/editcell/GridEditCellEditor.js +1 -1
- package/cells/editcell/GridEditCellEditor.mjs +1 -1
- package/cells/editcell/GridEditCellServerContainer.js +1 -1
- package/cells/editcell/GridEditCellServerContainer.mjs +1 -1
- package/cells/groupcell/GridGroupCell.js +1 -1
- package/cells/groupcell/GridGroupCell.mjs +8 -10
- package/cells/groupcell/GridGroupCellServerContainer.js +1 -1
- package/cells/groupcell/GridGroupCellServerContainer.mjs +1 -1
- package/cells/groupcell/GridGroupCellToggle.js +1 -1
- package/cells/groupcell/GridGroupCellToggle.mjs +1 -1
- package/cells/groupcell/useGroupCellClientTdProps.js +1 -1
- package/cells/groupcell/useGroupCellClientTdProps.mjs +1 -1
- package/cells/hierarchycell/GridHierarchyCell.js +1 -1
- package/cells/hierarchycell/GridHierarchyCell.mjs +8 -14
- package/cells/hierarchycell/GridHierarchyCellServerContainer.js +1 -1
- package/cells/hierarchycell/GridHierarchyCellServerContainer.mjs +1 -1
- package/cells/hierarchycell/GridHierarchyCellToggle.js +1 -1
- package/cells/hierarchycell/GridHierarchyCellToggle.mjs +1 -1
- package/cells/hierarchycell/useHierarchyCellClientTdProps.js +1 -1
- package/cells/hierarchycell/useHierarchyCellClientTdProps.mjs +15 -18
- package/cells/hooks.js +1 -1
- package/cells/hooks.mjs +1 -1
- package/cells/rowreordercell/useRowReorderCellClientTdProps.js +1 -1
- package/cells/rowreordercell/useRowReorderCellClientTdProps.mjs +1 -1
- package/cells/selectioncell/GridSelectionCell.js +1 -1
- package/cells/selectioncell/GridSelectionCell.mjs +7 -13
- package/cells/selectioncell/GridSelectionCellInput.js +1 -1
- package/cells/selectioncell/GridSelectionCellInput.mjs +1 -1
- package/cells/selectioncell/GridSelectionCellServerContainer.js +1 -1
- package/cells/selectioncell/GridSelectionCellServerContainer.mjs +1 -1
- package/codemods/v11/cell-render.js +9 -0
- package/codemods/v11/column-cell.js +9 -0
- package/codemods/v11/column-filter-cell.js +9 -0
- package/codemods/v11/column-footer-cell.js +9 -0
- package/codemods/v11/column-header-cell.js +9 -0
- package/codemods/v11/detail-expand-state.js +9 -0
- package/codemods/v11/edit-state.js +9 -0
- package/codemods/v11/filter-cell-render.js +9 -0
- package/codemods/v11/group-expand-state.js +9 -0
- package/codemods/v11/header-cell-render.js +9 -0
- package/codemods/v11/index.js +9 -0
- package/codemods/v11/row-render.js +9 -0
- package/codemods/v11/selection-state.js +9 -0
- package/codemods/v11/utils.js +9 -0
- package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +3 -2
- package/columnMenu/GridColumnMenuColumnsChooser.js +1 -1
- package/columnMenu/GridColumnMenuColumnsChooser.mjs +1 -1
- package/columnMenu/GridColumnMenuFilter.js +1 -1
- package/columnMenu/GridColumnMenuFilter.mjs +1 -1
- package/columnMenu/GridColumnMenuFilterCell.js +1 -1
- package/columnMenu/GridColumnMenuFilterCell.mjs +35 -28
- package/columnMenu/GridColumnMenuFilterUI.js +1 -1
- package/columnMenu/GridColumnMenuFilterUI.mjs +1 -1
- package/columnMenu/GridColumnMenuItem.js +1 -1
- package/columnMenu/GridColumnMenuItem.mjs +1 -1
- package/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/columnMenu/GridColumnMenuWrapper.mjs +62 -49
- package/columnMenu/adaptiveContent/GridAdaptiveCheckboxFilter.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveCheckboxFilter.mjs +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnChooser.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnChooser.mjs +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnMenu.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnMenu.mjs +2 -2
- package/columnMenu/adaptiveContent/GridAdaptiveFilterMenu.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveFilterMenu.mjs +1 -1
- package/components/GridContainerElementContainer.js +1 -1
- package/components/GridContainerElementContainer.mjs +1 -1
- package/components/GridDragClue.js +1 -1
- package/components/GridDragClue.mjs +1 -1
- package/components/GridDraggableRowsContainer.js +1 -1
- package/components/GridDraggableRowsContainer.mjs +1 -1
- package/components/GridDropClue.js +1 -1
- package/components/GridDropClue.mjs +1 -1
- package/components/GridEditDialog.js +1 -1
- package/components/GridEditDialog.mjs +1 -1
- package/components/GridElementContainer.js +1 -1
- package/components/GridElementContainer.mjs +1 -1
- package/components/PagerContainer.js +1 -1
- package/components/PagerContainer.mjs +1 -1
- package/components/VirtualScrollHeightContainer.js +1 -1
- package/components/VirtualScrollHeightContainer.mjs +1 -1
- package/components/colGroup/GridColGroup.js +1 -1
- package/components/colGroup/GridColGroup.mjs +1 -1
- package/components/noRecords/GridNoRecordsContainer.js +1 -1
- package/components/noRecords/GridNoRecordsContainer.mjs +1 -1
- package/components/table/GridTable.js +1 -1
- package/components/table/GridTable.mjs +1 -1
- package/components/table/GridTableBody.js +1 -1
- package/components/table/GridTableBody.mjs +1 -1
- package/components/table/GridTableScrollable.js +1 -1
- package/components/table/GridTableScrollable.mjs +1 -1
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +1 -1
- package/footer/FooterCell.js +1 -1
- package/footer/FooterCell.mjs +14 -14
- package/footer/client/FooterCellContainer.js +1 -1
- package/footer/client/FooterCellContainer.mjs +1 -1
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +42 -46
- package/header/GridHeaderCell.js +1 -1
- package/header/GridHeaderCell.mjs +11 -11
- package/header/GridHeaderSelectionCell.js +1 -1
- package/header/GridHeaderSelectionCell.mjs +14 -14
- package/header/GroupPanel.js +1 -1
- package/header/GroupPanel.mjs +1 -1
- package/header/Header.js +1 -1
- package/header/Header.mjs +1 -1
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +19 -20
- package/header/client/GridFilterCellContainer.js +1 -1
- package/header/client/GridFilterCellContainer.mjs +11 -12
- package/header/client/GridFilterCellElementContainer.js +1 -1
- package/header/client/GridFilterCellElementContainer.mjs +1 -1
- package/header/client/GridHeaderCellContainer.js +1 -1
- package/header/client/GridHeaderCellContainer.mjs +7 -8
- package/header/client/GridHeaderCellElementContainer.js +1 -1
- package/header/client/GridHeaderCellElementContainer.mjs +1 -1
- package/header/client/GridHeaderRowContainer.js +1 -1
- package/header/client/GridHeaderRowContainer.mjs +1 -1
- package/header/client/HeaderCellResizer.js +1 -1
- package/header/client/HeaderCellResizer.mjs +1 -1
- package/header/client/HeaderRowDraggable.js +1 -1
- package/header/client/HeaderRowDraggable.mjs +1 -1
- package/index.d.mts +293 -186
- package/index.d.ts +293 -186
- package/index.js +1 -1
- package/index.mjs +81 -71
- package/messages/index.js +1 -1
- package/messages/index.mjs +94 -76
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +77 -21
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +32 -33
- package/toolbar-tools/GridToolbarCheckboxFilter.js +8 -0
- package/toolbar-tools/GridToolbarCheckboxFilter.mjs +312 -0
- package/toolbar-tools/GridToolbarColumnsChooser.js +8 -0
- package/toolbar-tools/GridToolbarColumnsChooser.mjs +178 -0
- package/toolbar-tools/GridToolbarFilter.js +8 -0
- package/toolbar-tools/GridToolbarFilter.mjs +276 -0
- package/toolbar-tools/GridToolbarSort.js +8 -0
- package/toolbar-tools/GridToolbarSort.mjs +146 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarCheckboxFilter.js +9 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarCheckboxFilter.mjs +114 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarColumnChooser.js +9 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarColumnChooser.mjs +89 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.js +9 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.mjs +98 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.js +9 -0
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.mjs +68 -0
- package/toolbar-tools/adaptiveContext/GridToolbarAdaptiveContext.js +9 -0
- package/toolbar-tools/adaptiveContext/GridToolbarAdaptiveContext.mjs +17 -0
- package/utils/GridContext.js +9 -0
- package/{codemods/index.js → utils/GridContext.mjs} +6 -1
- package/utils/index.js +1 -1
- package/utils/index.mjs +145 -148
- package/utils/premium.js +1 -1
- package/utils/premium.mjs +26 -25
- package/utils/virtualColumns.js +1 -1
- package/utils/virtualColumns.mjs +13 -7
- package/components/GridCustomCellClientContainer.js +0 -9
- package/components/GridCustomCellClientContainer.mjs +0 -34
|
@@ -0,0 +1,89 @@
|
|
|
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 e from "react";
|
|
10
|
+
import { GridContext as x } from "../../utils/GridContext.mjs";
|
|
11
|
+
import { xIcon as b, searchIcon as A } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { adaptiveColumnMenuChooserTitle as m, messages as l, adaptiveColumnMenuChooserSubTitle as r, filterSelectAll as s, columnMenuColumnChooserSelectedItems as d, filterResetButton as u, filterApplyButton as h } from "../../messages/index.mjs";
|
|
13
|
+
import { Button as N } from "@progress/kendo-react-buttons";
|
|
14
|
+
import { useLocalization as p } from "@progress/kendo-react-intl";
|
|
15
|
+
import { TextBox as M, Checkbox as g, InputPrefix as y } from "@progress/kendo-react-inputs";
|
|
16
|
+
import { ActionSheet as L, ActionSheetView as R, ActionSheetHeader as T, ActionSheetContent as w, ActionSheetFooter as B } from "@progress/kendo-react-layout";
|
|
17
|
+
import { useAdaptiveModeContext as I, IconWrap as z } from "@progress/kendo-react-common";
|
|
18
|
+
import { GridActionSheetFooterContent as G } from "../../columnMenu/adaptiveContent/GridActionSheetFooter.mjs";
|
|
19
|
+
import { GridToolbarAdaptiveContext as F } from "../adaptiveContext/GridToolbarAdaptiveContext.mjs";
|
|
20
|
+
const U = (t) => {
|
|
21
|
+
const o = e.useContext(x), { actionSheetRef: f } = e.useContext(F), i = I(), n = p(), C = {
|
|
22
|
+
animation: !0,
|
|
23
|
+
navigatable: !1,
|
|
24
|
+
navigatableElements: [],
|
|
25
|
+
expand: t.computedShow,
|
|
26
|
+
animationStyles: i && o.adaptiveColumnMenuRef <= i.small ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
27
|
+
className: "k-adaptive-actionsheet",
|
|
28
|
+
position: i && o.adaptiveColumnMenuRef <= i.small ? "fullscreen" : void 0
|
|
29
|
+
}, k = n.toLanguageString(
|
|
30
|
+
m,
|
|
31
|
+
l[m]
|
|
32
|
+
), v = n.toLanguageString(
|
|
33
|
+
r,
|
|
34
|
+
l[r]
|
|
35
|
+
), E = () => /* @__PURE__ */ e.createElement(y, null, /* @__PURE__ */ e.createElement(z, { name: "search", icon: A }));
|
|
36
|
+
return /* @__PURE__ */ e.createElement(
|
|
37
|
+
L,
|
|
38
|
+
{
|
|
39
|
+
...C,
|
|
40
|
+
ref: f,
|
|
41
|
+
style: { "--kendo-actionsheet-view-current": 1 },
|
|
42
|
+
onClose: t.onClose
|
|
43
|
+
},
|
|
44
|
+
/* @__PURE__ */ e.createElement(R, null, /* @__PURE__ */ e.createElement(T, null, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, k), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-subtitle k-text-center" }, v)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(N, { type: "button", svgIcon: b, onClick: t.onClose, fillMode: "flat" })))), /* @__PURE__ */ e.createElement(w, null, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu" }, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu-container" }, /* @__PURE__ */ e.createElement(
|
|
45
|
+
M,
|
|
46
|
+
{
|
|
47
|
+
size: o.mobileMode ? "large" : "medium",
|
|
48
|
+
className: "k-searchbox",
|
|
49
|
+
value: t.filter,
|
|
50
|
+
onChange: t.onFilter,
|
|
51
|
+
prefix: E
|
|
52
|
+
}
|
|
53
|
+
), /* @__PURE__ */ e.createElement("ul", { className: "k-reset k-multicheck-wrap" }, !t.filter && /* @__PURE__ */ e.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ e.createElement(
|
|
54
|
+
g,
|
|
55
|
+
{
|
|
56
|
+
size: o.mobileMode ? "large" : "medium",
|
|
57
|
+
checked: t.allSelected,
|
|
58
|
+
onChange: t.onSelectAll,
|
|
59
|
+
label: n.toLanguageString(s, l[s])
|
|
60
|
+
}
|
|
61
|
+
)), t.filtered.map((a, P) => /* @__PURE__ */ e.createElement("li", { key: a.id, className: "k-item" }, /* @__PURE__ */ e.createElement(
|
|
62
|
+
g,
|
|
63
|
+
{
|
|
64
|
+
size: o.mobileMode ? "large" : "medium",
|
|
65
|
+
disabled: t.selectedColumns[a.id || ""] && t.checkedCount === 1,
|
|
66
|
+
checked: t.selectedColumns[a.id || ""],
|
|
67
|
+
onChange: (S) => {
|
|
68
|
+
var c;
|
|
69
|
+
return t.onCheckChange(!!((c = S.target.element) != null && c.checked), a.id);
|
|
70
|
+
},
|
|
71
|
+
label: a.title || a.field
|
|
72
|
+
}
|
|
73
|
+
)))), /* @__PURE__ */ e.createElement("div", { className: "k-filter-selected-items" }, t.checkedCount, " ", n.toLanguageString(
|
|
74
|
+
d,
|
|
75
|
+
l[d]
|
|
76
|
+
))))), /* @__PURE__ */ e.createElement(B, null, /* @__PURE__ */ e.createElement(
|
|
77
|
+
G,
|
|
78
|
+
{
|
|
79
|
+
onApply: t.onApply,
|
|
80
|
+
onReset: t.onReset,
|
|
81
|
+
resetMessage: n.toLanguageString(u, l[u]),
|
|
82
|
+
submitMessage: n.toLanguageString(h, l[h])
|
|
83
|
+
}
|
|
84
|
+
)))
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
export {
|
|
88
|
+
U as GridAdaptiveToolbarColumnChooser
|
|
89
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),a=require("@progress/kendo-react-layout"),A=require("@progress/kendo-react-common"),b=require("../../utils/GridContext.js"),s=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-svg-icons"),x=require("../adaptiveContext/GridToolbarAdaptiveContext.js"),N=require("@progress/kendo-react-intl"),n=require("../../messages/index.js"),M=require("../../columnMenu/GridColumnMenuItemGroup.js"),y=require("../../columnMenu/GridColumnMenuFilterUI.js"),G=require("../../columnMenu/GridColumnMenuItem.js"),w=require("../../columnMenu/adaptiveContent/GridActionSheetFooter.js"),B=t=>{const o=e.useContext(b.GridContext),{actionSheetRef:m,firstViewRef:k,secondViewRef:C}=e.useContext(x.GridToolbarAdaptiveContext),r=A.useAdaptiveModeContext(),c=N.useLocalization(),[d,E]=e.useState(""),g=o.dir==="rtl"?l.chevronRightIcon:l.chevronLeftIcon,v=c.toLanguageString(n.adaptiveColumnMenuFilterTitle,n.messages[n.adaptiveColumnMenuFilterTitle]),S={animation:!0,navigatable:!1,navigatableElements:[],expand:t.computedShow,animationStyles:r&&o.adaptiveColumnMenuRef<=r.small?{top:0,width:"100%",height:"100%"}:void 0,className:"k-adaptive-actionsheet",position:r&&o.adaptiveColumnMenuRef<=r.small?"fullscreen":void 0},I=()=>{t.onBackView&&t.onBackView(),o!=null&&o.mobileMode&&m.current.element.style.setProperty("--kendo-actionsheet-view-current",1)};return e.createElement(a.ActionSheet,{...S,ref:m,style:{"--kendo-actionsheet-view-current":1},onClose:t.onClose},e.createElement(a.ActionSheetView,{className:"k-actionsheet-view-animated",ref:k,style:{transitionDuration:"500ms",transitionProperty:"transform"}},e.createElement(a.ActionSheetHeader,null,e.createElement("div",{className:"k-actionsheet-titlebar-group"},e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},v)),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(s.Button,{svgIcon:l.xIcon,onClick:t.onClose,fillMode:"flat"})))),e.createElement(a.ActionSheetContent,null,e.createElement("div",{className:"k-column-menu k-column-menu-lg"},t.filtered.map(i=>{var f,h;return e.createElement(M.GridColumnMenuItemGroup,{key:i.id},e.createElement("div",{className:"k-expander"},e.createElement(G.GridColumnMenuItem,{title:t.renderTitle(i),expandable:!0,expanded:!!((h=(f=t.expandState)==null?void 0:f.find(u=>u.column.field===i.field))!=null&&h.expanded),onClick:u=>(m.current.element.style.setProperty("--kendo-actionsheet-view-current",2),E(i.field),t.onFilterExpand(u,i))})))}))),e.createElement(a.ActionSheetFooter,null,e.createElement("div",{className:"k-actions k-actions-stretched k-actions-horizontal k-column-menu-footer"},e.createElement(s.Button,{svgIcon:l.filterClearIcon,onClick:t.handleClearAllFilters,size:"large"},c.toLanguageString(n.filterClearAllButton,n.messages[n.filterClearAllButton]))))),e.createElement(a.ActionSheetView,{className:"k-actionsheet-view-animated",ref:C,style:{transitionDuration:"500ms",transitionProperty:"transform"}},e.createElement(a.ActionSheetHeader,null,e.createElement("div",{className:"k-actionsheet-titlebar-group"},e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(s.Button,{type:"button",onClick:I,svgIcon:g,fillMode:"flat"})),e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},v+(d?` ${d}`:""))),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(s.Button,{type:"button",svgIcon:l.xIcon,onClick:t.onClose,fillMode:"flat"})))),e.createElement(a.ActionSheetContent,null,e.createElement("form",{className:"k-filter-menu",onSubmit:t.submit,onReset:t.clear},e.createElement("div",{className:"k-filter-menu-container"},t.FilterUI?e.createElement(t.FilterUI,{...t.filterUIProps}):e.createElement(y.GridColumnMenuFilterUI,{...t.filterUIProps})))),e.createElement(a.ActionSheetFooter,null,e.createElement(w.GridActionSheetFooterContent,{onApply:t.submit,onReset:t.clear,submitMessage:c.toLanguageString(n.filterSubmitButton,n.messages[n.filterSubmitButton]),resetMessage:c.toLanguageString(n.filterClearButton,n.messages[n.filterClearButton])}))))};exports.GridAdaptiveToolbarFilter=B;
|
|
@@ -0,0 +1,98 @@
|
|
|
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 e from "react";
|
|
10
|
+
import { ActionSheet as p, ActionSheetView as v, ActionSheetHeader as h, ActionSheetContent as E, ActionSheetFooter as k } from "@progress/kendo-react-layout";
|
|
11
|
+
import { useAdaptiveModeContext as F } from "@progress/kendo-react-common";
|
|
12
|
+
import { GridContext as R } from "../../utils/GridContext.mjs";
|
|
13
|
+
import { Button as l } from "@progress/kendo-react-buttons";
|
|
14
|
+
import { chevronRightIcon as G, chevronLeftIcon as B, xIcon as C, filterClearIcon as P } from "@progress/kendo-svg-icons";
|
|
15
|
+
import { GridToolbarAdaptiveContext as L } from "../adaptiveContext/GridToolbarAdaptiveContext.mjs";
|
|
16
|
+
import { useLocalization as V } from "@progress/kendo-react-intl";
|
|
17
|
+
import { adaptiveColumnMenuFilterTitle as g, messages as r, filterClearAllButton as S, filterSubmitButton as N, filterClearButton as x } from "../../messages/index.mjs";
|
|
18
|
+
import { GridColumnMenuItemGroup as T } from "../../columnMenu/GridColumnMenuItemGroup.mjs";
|
|
19
|
+
import { GridColumnMenuFilterUI as U } from "../../columnMenu/GridColumnMenuFilterUI.mjs";
|
|
20
|
+
import { GridColumnMenuItem as z } from "../../columnMenu/GridColumnMenuItem.mjs";
|
|
21
|
+
import { GridActionSheetFooterContent as D } from "../../columnMenu/adaptiveContent/GridActionSheetFooter.mjs";
|
|
22
|
+
const te = (t) => {
|
|
23
|
+
const n = e.useContext(R), { actionSheetRef: c, firstViewRef: I, secondViewRef: b } = e.useContext(L), o = F(), i = V(), [s, w] = e.useState(""), y = n.dir === "rtl" ? G : B, u = i.toLanguageString(
|
|
24
|
+
g,
|
|
25
|
+
r[g]
|
|
26
|
+
), A = {
|
|
27
|
+
animation: !0,
|
|
28
|
+
navigatable: !1,
|
|
29
|
+
navigatableElements: [],
|
|
30
|
+
expand: t.computedShow,
|
|
31
|
+
animationStyles: o && n.adaptiveColumnMenuRef <= o.small ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
32
|
+
className: "k-adaptive-actionsheet",
|
|
33
|
+
position: o && n.adaptiveColumnMenuRef <= o.small ? "fullscreen" : void 0
|
|
34
|
+
}, M = () => {
|
|
35
|
+
t.onBackView && t.onBackView(), n != null && n.mobileMode && c.current.element.style.setProperty("--kendo-actionsheet-view-current", 1);
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ e.createElement(
|
|
38
|
+
p,
|
|
39
|
+
{
|
|
40
|
+
...A,
|
|
41
|
+
ref: c,
|
|
42
|
+
style: { "--kendo-actionsheet-view-current": 1 },
|
|
43
|
+
onClose: t.onClose
|
|
44
|
+
},
|
|
45
|
+
/* @__PURE__ */ e.createElement(
|
|
46
|
+
v,
|
|
47
|
+
{
|
|
48
|
+
className: "k-actionsheet-view-animated",
|
|
49
|
+
ref: I,
|
|
50
|
+
style: {
|
|
51
|
+
transitionDuration: "500ms",
|
|
52
|
+
transitionProperty: "transform"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
/* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, u)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(l, { svgIcon: C, onClick: t.onClose, fillMode: "flat" })))),
|
|
56
|
+
/* @__PURE__ */ e.createElement(E, null, /* @__PURE__ */ e.createElement("div", { className: "k-column-menu k-column-menu-lg" }, t.filtered.map((a) => {
|
|
57
|
+
var d, f;
|
|
58
|
+
return /* @__PURE__ */ e.createElement(T, { key: a.id }, /* @__PURE__ */ e.createElement("div", { className: "k-expander" }, /* @__PURE__ */ e.createElement(
|
|
59
|
+
z,
|
|
60
|
+
{
|
|
61
|
+
title: t.renderTitle(a),
|
|
62
|
+
expandable: !0,
|
|
63
|
+
expanded: !!((f = (d = t.expandState) == null ? void 0 : d.find(
|
|
64
|
+
(m) => m.column.field === a.field
|
|
65
|
+
)) != null && f.expanded),
|
|
66
|
+
onClick: (m) => (c.current.element.style.setProperty("--kendo-actionsheet-view-current", 2), w(a.field), t.onFilterExpand(m, a))
|
|
67
|
+
}
|
|
68
|
+
)));
|
|
69
|
+
}))),
|
|
70
|
+
/* @__PURE__ */ e.createElement(k, null, /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-stretched k-actions-horizontal k-column-menu-footer" }, /* @__PURE__ */ e.createElement(l, { svgIcon: P, onClick: t.handleClearAllFilters, size: "large" }, i.toLanguageString(S, r[S]))))
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ e.createElement(
|
|
73
|
+
v,
|
|
74
|
+
{
|
|
75
|
+
className: "k-actionsheet-view-animated",
|
|
76
|
+
ref: b,
|
|
77
|
+
style: {
|
|
78
|
+
transitionDuration: "500ms",
|
|
79
|
+
transitionProperty: "transform"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
/* @__PURE__ */ e.createElement(h, null, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(l, { type: "button", onClick: M, svgIcon: y, fillMode: "flat" })), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, u + (s ? ` ${s}` : ""))), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(l, { type: "button", svgIcon: C, onClick: t.onClose, fillMode: "flat" })))),
|
|
83
|
+
/* @__PURE__ */ e.createElement(E, null, /* @__PURE__ */ e.createElement("form", { className: "k-filter-menu", onSubmit: t.submit, onReset: t.clear }, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu-container" }, t.FilterUI ? /* @__PURE__ */ e.createElement(t.FilterUI, { ...t.filterUIProps }) : /* @__PURE__ */ e.createElement(U, { ...t.filterUIProps })))),
|
|
84
|
+
/* @__PURE__ */ e.createElement(k, null, /* @__PURE__ */ e.createElement(
|
|
85
|
+
D,
|
|
86
|
+
{
|
|
87
|
+
onApply: t.submit,
|
|
88
|
+
onReset: t.clear,
|
|
89
|
+
submitMessage: i.toLanguageString(N, r[N]),
|
|
90
|
+
resetMessage: i.toLanguageString(x, r[x])
|
|
91
|
+
}
|
|
92
|
+
))
|
|
93
|
+
)
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
te as GridAdaptiveToolbarFilter
|
|
98
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("@progress/kendo-svg-icons"),n=require("../../messages/index.js"),c=require("@progress/kendo-react-buttons"),v=require("@progress/kendo-react-intl"),o=require("@progress/kendo-react-layout"),g=require("../../columnMenu/GridColumnMenuItem.js"),h=require("../../columnMenu/GridColumnMenuItemGroup.js"),k=require("../../utils/GridContext.js"),S=require("../adaptiveContext/GridToolbarAdaptiveContext.js"),E=require("@progress/kendo-react-common"),b=t=>{const s=e.useContext(k.GridContext),{actionSheetRef:u}=e.useContext(S.GridToolbarAdaptiveContext),a=E.useAdaptiveModeContext(),i=v.useLocalization(),d={animation:!0,navigatable:!1,navigatableElements:[],expand:t.computedShow,animationStyles:a&&s.adaptiveColumnMenuRef<=a.small?{top:0,width:"100%",height:"100%"}:void 0,className:"k-adaptive-actionsheet",position:a&&s.adaptiveColumnMenuRef<=a.small?"fullscreen":void 0},m=i.toLanguageString(n.adaptiveToolbarSortTitle,n.messages[n.adaptiveToolbarSortTitle]);return e.createElement(o.ActionSheet,{...d,ref:u,style:{"--kendo-actionsheet-view-current":1},onClose:t.onClose},e.createElement(o.ActionSheetView,null,e.createElement(o.ActionSheetHeader,null,e.createElement("div",{className:"k-actionsheet-titlebar-group"},e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},m)),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(c.Button,{type:"button",svgIcon:r.checkIcon,themeColor:"primary",onClick:t.onClose,fillMode:"flat"})))),e.createElement(o.ActionSheetContent,null,e.createElement("div",{className:"k-column-menu k-column-menu-lg"},e.createElement(h.GridColumnMenuItemGroup,null,t.filtered.map(l=>e.createElement(g.GridColumnMenuItem,{key:l.id,title:t.renderTitle(l),onClick:C=>t.handleSorting(C,l)}))))),e.createElement(o.ActionSheetFooter,null,e.createElement("div",{className:"k-actions k-actions-stretched"},e.createElement(c.Button,{svgIcon:r.xIcon,onClick:t.onClear,size:"large",disabled:t.isDisabledButton},i.toLanguageString(n.sortClearButton,n.messages[n.sortClearButton])),e.createElement(c.Button,{svgIcon:r.checkIcon,themeColor:"primary",size:"large",onClick:t.onClose},i.toLanguageString(n.sortApplyButton,n.messages[n.sortApplyButton]))))))};exports.GridAdaptiveToolbarSort=b;
|
|
@@ -0,0 +1,68 @@
|
|
|
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 e from "react";
|
|
10
|
+
import { checkIcon as m, xIcon as f } from "@progress/kendo-svg-icons";
|
|
11
|
+
import { adaptiveToolbarSortTitle as c, messages as i, sortClearButton as s, sortApplyButton as d } from "../../messages/index.mjs";
|
|
12
|
+
import { Button as l } from "@progress/kendo-react-buttons";
|
|
13
|
+
import { useLocalization as h } from "@progress/kendo-react-intl";
|
|
14
|
+
import { ActionSheet as p, ActionSheetView as E, ActionSheetHeader as k, ActionSheetContent as S, ActionSheetFooter as x } from "@progress/kendo-react-layout";
|
|
15
|
+
import { GridColumnMenuItem as b } from "../../columnMenu/GridColumnMenuItem.mjs";
|
|
16
|
+
import { GridColumnMenuItemGroup as A } from "../../columnMenu/GridColumnMenuItemGroup.mjs";
|
|
17
|
+
import { GridContext as y } from "../../utils/GridContext.mjs";
|
|
18
|
+
import { GridToolbarAdaptiveContext as I } from "../adaptiveContext/GridToolbarAdaptiveContext.mjs";
|
|
19
|
+
import { useAdaptiveModeContext as N } from "@progress/kendo-react-common";
|
|
20
|
+
const H = (t) => {
|
|
21
|
+
const r = e.useContext(y), { actionSheetRef: u } = e.useContext(I), o = N(), n = h(), C = {
|
|
22
|
+
animation: !0,
|
|
23
|
+
navigatable: !1,
|
|
24
|
+
navigatableElements: [],
|
|
25
|
+
expand: t.computedShow,
|
|
26
|
+
animationStyles: o && r.adaptiveColumnMenuRef <= o.small ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
27
|
+
className: "k-adaptive-actionsheet",
|
|
28
|
+
position: o && r.adaptiveColumnMenuRef <= o.small ? "fullscreen" : void 0
|
|
29
|
+
}, v = n.toLanguageString(c, i[c]);
|
|
30
|
+
return /* @__PURE__ */ e.createElement(
|
|
31
|
+
p,
|
|
32
|
+
{
|
|
33
|
+
...C,
|
|
34
|
+
ref: u,
|
|
35
|
+
style: { "--kendo-actionsheet-view-current": 1 },
|
|
36
|
+
onClose: t.onClose
|
|
37
|
+
},
|
|
38
|
+
/* @__PURE__ */ e.createElement(E, null, /* @__PURE__ */ e.createElement(k, null, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, v)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(
|
|
39
|
+
l,
|
|
40
|
+
{
|
|
41
|
+
type: "button",
|
|
42
|
+
svgIcon: m,
|
|
43
|
+
themeColor: "primary",
|
|
44
|
+
onClick: t.onClose,
|
|
45
|
+
fillMode: "flat"
|
|
46
|
+
}
|
|
47
|
+
)))), /* @__PURE__ */ e.createElement(S, null, /* @__PURE__ */ e.createElement("div", { className: "k-column-menu k-column-menu-lg" }, /* @__PURE__ */ e.createElement(A, null, t.filtered.map((a) => /* @__PURE__ */ e.createElement(
|
|
48
|
+
b,
|
|
49
|
+
{
|
|
50
|
+
key: a.id,
|
|
51
|
+
title: t.renderTitle(a),
|
|
52
|
+
onClick: (g) => t.handleSorting(g, a)
|
|
53
|
+
}
|
|
54
|
+
))))), /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ e.createElement(
|
|
55
|
+
l,
|
|
56
|
+
{
|
|
57
|
+
svgIcon: f,
|
|
58
|
+
onClick: t.onClear,
|
|
59
|
+
size: "large",
|
|
60
|
+
disabled: t.isDisabledButton
|
|
61
|
+
},
|
|
62
|
+
n.toLanguageString(s, i[s])
|
|
63
|
+
), /* @__PURE__ */ e.createElement(l, { svgIcon: m, themeColor: "primary", size: "large", onClick: t.onClose }, n.toLanguageString(d, i[d])))))
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
H as GridAdaptiveToolbarSort
|
|
68
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(void 0),l=o=>{const r=e.useRef(null),i=e.useRef(null),n=e.useRef(null),d=e.useMemo(()=>({actionSheetRef:r,firstViewRef:i,secondViewRef:n}),[]);return e.createElement(t.Provider,{value:d},o.children)};exports.GridToolbarAdaptiveContext=t;exports.GridToolbarAdaptiveProvider=l;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 e from "react";
|
|
10
|
+
const s = e.createContext(void 0), l = (t) => {
|
|
11
|
+
const o = e.useRef(null), r = e.useRef(null), n = e.useRef(null), i = e.useMemo(() => ({ actionSheetRef: o, firstViewRef: r, secondViewRef: n }), []);
|
|
12
|
+
return /* @__PURE__ */ e.createElement(s.Provider, { value: i }, t.children);
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
s as GridToolbarAdaptiveContext,
|
|
16
|
+
l as GridToolbarAdaptiveProvider
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react");function c(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=c(o),i=a.createContext(void 0);exports.GridContext=i;
|
|
@@ -5,4 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use
|
|
8
|
+
"use client";
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
const o = t.createContext(void 0);
|
|
11
|
+
export {
|
|
12
|
+
o as GridContext
|
|
13
|
+
};
|
package/utils/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),w=require("../GridColumn.js"),S=require("@progress/kendo-data-query"),I=require("@progress/kendo-react-data-tools"),G=require("./_serverModule.js"),O=require("./_clientModule.js"),c=require("../contextMenu/enums.js"),T=require("@progress/kendo-react-common");function j(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const y=j(A);function H(e,t){const n=(e!=null?e:"").split(".");let r=t;return n.forEach(d=>{r=r?r[d]:void 0}),r}function v(e,t,n,r,d,l,a,i,o,s=0,f){var u;let g=s;for(let h=0;h<t.length;h++){let x;if(!d||t[h].value===void 0||t[h].items===void 0){e[e.length]={dataIndex:r.index,dataItem:t[h],rowType:"data",level:s,group:f,expanded:(u=o?!!(l!=null&&l[S.getter(o)(t[h])]):!1)!=null?u:!1},r.index++;continue}else{let m;f!=null&&f.parents?m=[{field:f.field,value:f.value},...f.parents]:f?m=[f]:m=[],x={field:t[h].field,value:t[h].value,parents:m}}g=Math.max(g,s+1);let C=!1;const M=I.findGroupExpand(a||[],x);M?C=M.expanded!==!1:C=i!==!1,e[e.length]={dataIndex:-1,dataItem:t[h],level:s,group:x,rowType:"groupHeader",expanded:C},C&&(x.expanded=C,g=Math.max(v(e,t[h].items,n,r,d,l,a,i,o,s+1,x),g)),(n==="always"||C&&n==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[h],rowType:"groupFooter",level:s,expanded:C})}return g}const q=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1;function k(e,t){const n=[[]];let r=0;for(let a=e.length-1;a>=0;a--)r=Math.max(r,e[a].depth),e[a].headerColSpan=e[a].headerColSpan||1,e[a].children.length>0&&(e[a].headerColSpan=e[a].children.reduce((i,o)=>o.hidden?i:i+o.headerColSpan,0));const d=[];let l=1;return e.forEach((a,i)=>{n[a.depth]=n[a.depth]||[];let o=!1;n[a.depth].length===0&&(l<=1?l=1+(a.children.length>0?0:r-a.depth):(l--,o=!0)),a.rowSpan=1+(a.children.length>0?0:r-a.depth),a.kFirst=o,a.index=n[a.depth].length,n[a.depth].push(i),a.ariaColumnIndex=d[a.depth]?d[a.depth]+1:1;for(let s=a.depth;s<a.depth+a.rowSpan;s++)d[s]=(d[s]||0)+a.headerColSpan}),I.updateLeft(n,e,t),I.updateRight(n,e,t),n}function N(e,t,n,r=0,d=!1){const l=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.forEach((i,o)=>{i=i.props?i.props:i;const s=i.id?i.id:I.tableKeyboardNavigationTools.generateNavigatableId(`${n.prevId++}`,n.idPrefix,"column"),f=T.canUseDOM&&i.media&&window.matchMedia?!window.matchMedia(i.media).matches:!1,g=d||f||i.hidden,u=t==null?void 0:t.find(x=>x.id===s),h=N(i.children,(u==null?void 0:u.children)||[],n,r+1,g);l.push(Object.assign({depth:r},w.gridDefaultProps,h.length?{cell:()=>null,filterCell:()=>null}:{},i,{id:s,declarationIndex:l.length,children:h,headerColSpan:0,rowSpan:0,columnType:i.columnType||"data",colSpan:i.colSpan||1,isAccessible:!0,hidden:g,left:null,right:null,rowSpannable:i.rowSpannable},u?{width:u.width,orderIndex:u.orderIndex}:{}))});const a=(i,o)=>i.orderIndex===o.orderIndex?i.declarationIndex-o.declarationIndex:(i.orderIndex||0)-(o.orderIndex||0);if(l.sort(a),r===0){const i=[],o=(s,f)=>s.forEach(g=>{g.parentIndex=f,o(g.children,i.push(g)-1)});return o(l,-1),i}return l}const b=e=>Array.isArray(e)?e:e?e.data:[];function B(e,t,n,r){const d=b(e),l=[];if(d.length>0){let a=d[0];if(t)for(let o=0;o<t.length;o++)a=a.items&&a.items[0];Object.getOwnPropertyNames(a).forEach(o=>{o!==n.column&&l.push(Object.assign({id:I.tableKeyboardNavigationTools.generateNavigatableId(`${r.prevId++}`,r.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},w.gridDefaultProps,{field:o}))})}return l}const _=(e,t)=>{var r;let n=e[t.parentIndex];for(;n;){if((r=n.cells)!=null&&r.footerCell)return!0;n=e[n.parentIndex]}return!1},$=e=>e.filter(t=>{var n;return _(e,t)?!1:!!((n=t.cells)!=null&&n.footerCell)||!(t.children&&t.children.length>0)}),z=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,V=(e,t)=>t&&t.filter(n=>n.field===e).length>0,p=e=>(e.sort((t,n)=>t.declarationIndex-n.declarationIndex),e.map(t=>{const{declarationIndex:n,parentIndex:r,depth:d,headerColSpan:l,rowSpan:a,index:i,kFirst:o,children:s,...f}=t;return s.length?{children:p(s),...f}:f})),D=e=>{const{cells:t,rowSpannable:n,defaultCell:r,...d}=e;return e.children.length?{...d,children:e.children.map(D)}:d},R=e=>({id:e.id,field:e.field,title:e.title,width:e.width,hidden:!1,children:e.children?E(e.children):null}),E=e=>e.map(R),L=e=>{const t=[],n=r=>r==null?void 0:r.forEach(d=>{t.push(d),n(d.children)});return n(e),t},P=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),W=17895697,K=e=>{let t=[];return e.sortable&&(t=t.concat([c.GridContextMenuItemNames.sortAsc,c.GridContextMenuItemNames.sortDesc])),e.pdf&&(t.length&&(t=t.concat([c.GridContextMenuItemNames.separator])),t=t.concat([c.GridContextMenuItemNames.exportPDF])),t},Q=e=>{let t=[];return e.clipboard&&(t=t.concat([c.GridContextMenuItemNames.copySelection,c.GridContextMenuItemNames.copySelectionNoHeaders,c.GridContextMenuItemNames.paste])),e.editable&&(t.length&&(t=t.concat([c.GridContextMenuItemNames.separator])),t=t.concat([c.GridContextMenuItemNames.create,c.GridContextMenuItemNames.edit,c.GridContextMenuItemNames.delete])),e.selectable&&(t.length&&(t=t.concat([c.GridContextMenuItemNames.separator])),t=t.concat([c.GridContextMenuItemNames.select])),e.rowReorderable&&(t.length&&(t=t.concat([c.GridContextMenuItemNames.separator])),t=t.concat([c.GridContextMenuItemNames.reorderRow])),e.pdf&&(t.length&&(t=t.concat([c.GridContextMenuItemNames.separator])),t=t.concat([c.GridContextMenuItemNames.exportPDF])),t},U=(e,t)=>{if(!(!e&&!t))return t?e?{...e,...t,select:{...e.select||{},...t.select||{}},hierarchy:{...e.hierarchy||{},...t.hierarchy||{}},group:{...e.group||{},...t.group||{}},edit:{...e.edit||{},...t.edit||{}}}:t:e},J=e=>{var n;return typeof e=="object"?(n=e.enabled)!=null?n:!0:e!=null?e:!1},X=()=>G.ServerFragment===O.ClientFragment,Y=e=>!!(e&&e.$$typeof===Symbol.for("react.client.reference")),Z=e=>({id:e.id,ariaColumnIndex:e.ariaColumnIndex,isSelected:e.isSelected,isInEdit:e.isInEdit,isSorted:e.isSorted,isAlt:e.isAlt,expanded:e.expanded,className:e.className,style:e.style,field:e.field,dataItem:e.dataItem,format:e.format,colSpan:e.colSpan,dataIndex:e.dataIndex,columnIndex:e.columnIndex,columnsCount:e.columnsCount,rowType:e.rowType,level:e.level,editor:e.editor,locked:e.locked,isRtl:e.isRtl,rowDataIndex:e.rowDataIndex,columnPosition:e.columnPosition,group:e.group}),ee=e=>{var r,d;const t=typeof e=="object"?(r=e.enabled)!=null?r:!0:e!=null?e:!1,n=typeof e=="object"?(d=e.valueGetter)!=null?d:(l,a)=>S.getter(a)(l):(l,a)=>S.getter(a)(l);return{enabled:t,valueGetter:n}},F=e=>{var t;return y.isValidElement(e)?e:(t=y.Children.toArray(e))==null?void 0:t[0]},te=(e,t)=>{const n=F(e);return n?y.cloneElement(n,t):null},ne=e=>{let t=0;if(e){const n=e.insertRow(0),r=n.insertCell(0);r.textContent=" ",t=n.getBoundingClientRect().height,e.deleteRow(0)}return t};exports.autoGenerateColumns=B;exports.calcRowHeight=ne;exports.clientColumn=D;exports.cloneReactElement=te;exports.firefox=P;exports.firefoxMaxHeight=W;exports.flatData=v;exports.footerColumns=$;exports.getClientCellProps=Z;exports.getColSpan=q;exports.getColumnState=R;exports.getColumnWidth=z;exports.getColumnsState=E;exports.getDataAsArray=b;exports.getDefaultBodyContextMenuItems=Q;exports.getDefaultHeadContextMenuItems=K;exports.getFlatColumnsState=L;exports.getNestedValue=H;exports.getReactElement=F;exports.getRowSpanOptions=ee;exports.isClient=X;exports.isClientReference=Y;exports.isRowReorderEnabled=J;exports.isSorted=V;exports.mapColumns=k;exports.readColumns=N;exports.resolveCells=U;exports.sanitizeColumns=p;
|