@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
|
@@ -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 y=require("react"),s=require("@progress/kendo-react-data-tools"),g=require("../../GridClientWrapper.js"),x=require("@progress/kendo-react-common");function I(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const d=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,d.get?d:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=I(y),b=e=>{var u;const{cellProps:t}=e,n=o.useContext(g.GridContext),d=s.useTableKeyboardNavigation(t.id),m=o.useCallback(l=>{l.isDefaultPrevented()||l.keyCode===x.Keys.enter&&(n!=null&&n.itemChange)&&(l.preventDefault(),n.itemChange({dataItem:t.dataItem,dataIndex:t.dataIndex,syntheticEvent:l,field:void 0,value:!t.expanded}),n==null||n.dispatchGroupExpand({type:s.GROUP_EXPAND_ACTION.TOGGLE,group:t.group},l))},[n,t.dataItem,t.dataIndex,t.expanded,t.group]),C=e.addKeyDownHandler?{onKeyDown:m}:{},r=o.useCallback(l=>{n!=null&&n.onContextMenu&&n.onContextMenu.call(void 0,l,t.dataItem,t.field)},[n,t.dataItem,t.field]),f=n.getCellPositionStyle(t.columnPosition),P={style:{...(u=e.tdProps)==null?void 0:u.style,...f}},a={...d,...C,onContextMenu:r,...P},c={onContextMenu:n.onContextMenu,onChange:n.itemChange,selectionChange:l=>{n.selectionChange({event:l,dataItem:t.dataItem,dataIndex:t.rowDataIndex,columnIndex:t.columnIndex})}};if(e.isCustom)return n.isClient||e.isClient?o.cloneElement(e.children,{tdProps:e.tdProps?{...e.tdProps,...a}:null,td2Props:e.td2Props?{...e.td2Props,onContextMenu:r}:null,...c}):o.cloneElement(e.children,{...a});const i=e.renderSecondCell?o.createElement("td",{...e.td2Props,onContextMenu:r}):null;if(t.render){let l=null;return e.renderFirstCell&&(e.renderSecondCell?l=o.createElement(o.Fragment,null,o.createElement("td",{...e.tdProps,...a},e.content),e.renderSecondCell&&i):l=o.createElement("td",{...e.tdProps,...a},e.content)),t.render.call(void 0,l,{...t,...c})}return o.createElement(o.Fragment,null,e.children&&o.cloneElement(e.children,{...a}),i)};exports.GridGroupCellContainer=b;
|
|
@@ -6,79 +6,79 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
9
|
+
import * as o from "react";
|
|
10
10
|
import { useTableKeyboardNavigation as f, GROUP_EXPAND_ACTION as x } from "@progress/kendo-react-data-tools";
|
|
11
11
|
import { GridContext as I } from "../../GridClientWrapper.mjs";
|
|
12
12
|
import { Keys as y } from "@progress/kendo-react-common";
|
|
13
|
-
const D = (
|
|
13
|
+
const D = (e) => {
|
|
14
14
|
var c;
|
|
15
|
-
const { cellProps:
|
|
16
|
-
(
|
|
17
|
-
|
|
18
|
-
dataItem:
|
|
19
|
-
dataIndex:
|
|
20
|
-
syntheticEvent:
|
|
15
|
+
const { cellProps: n } = e, t = o.useContext(I), u = f(n.id), m = o.useCallback(
|
|
16
|
+
(l) => {
|
|
17
|
+
l.isDefaultPrevented() || l.keyCode === y.enter && (t != null && t.itemChange) && (l.preventDefault(), t.itemChange({
|
|
18
|
+
dataItem: n.dataItem,
|
|
19
|
+
dataIndex: n.dataIndex,
|
|
20
|
+
syntheticEvent: l,
|
|
21
21
|
field: void 0,
|
|
22
|
-
value: !
|
|
22
|
+
value: !n.expanded
|
|
23
23
|
}), t == null || t.dispatchGroupExpand(
|
|
24
24
|
{
|
|
25
25
|
type: x.TOGGLE,
|
|
26
|
-
group:
|
|
26
|
+
group: n.group
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
l
|
|
29
29
|
));
|
|
30
30
|
},
|
|
31
|
-
[t,
|
|
32
|
-
),
|
|
33
|
-
onKeyDown:
|
|
34
|
-
} : {}, d =
|
|
35
|
-
(
|
|
36
|
-
t != null && t.onContextMenu && t.onContextMenu.call(void 0,
|
|
31
|
+
[t, n.dataItem, n.dataIndex, n.expanded, n.group]
|
|
32
|
+
), s = e.addKeyDownHandler ? {
|
|
33
|
+
onKeyDown: m
|
|
34
|
+
} : {}, d = o.useCallback(
|
|
35
|
+
(l) => {
|
|
36
|
+
t != null && t.onContextMenu && t.onContextMenu.call(void 0, l, n.dataItem, n.field);
|
|
37
37
|
},
|
|
38
|
-
[t,
|
|
39
|
-
), C = t.getCellPositionStyle(
|
|
40
|
-
style: { ...(c =
|
|
38
|
+
[t, n.dataItem, n.field]
|
|
39
|
+
), C = t.getCellPositionStyle(n.columnPosition), P = {
|
|
40
|
+
style: { ...(c = e.tdProps) == null ? void 0 : c.style, ...C }
|
|
41
41
|
}, a = {
|
|
42
42
|
...u,
|
|
43
|
-
...
|
|
43
|
+
...s,
|
|
44
44
|
onContextMenu: d,
|
|
45
45
|
...P
|
|
46
46
|
}, r = {
|
|
47
47
|
onContextMenu: t.onContextMenu,
|
|
48
48
|
onChange: t.itemChange,
|
|
49
|
-
selectionChange: (
|
|
49
|
+
selectionChange: (l) => {
|
|
50
50
|
t.selectionChange({
|
|
51
|
-
event:
|
|
52
|
-
dataItem:
|
|
53
|
-
dataIndex:
|
|
54
|
-
columnIndex:
|
|
51
|
+
event: l,
|
|
52
|
+
dataItem: n.dataItem,
|
|
53
|
+
dataIndex: n.rowDataIndex,
|
|
54
|
+
columnIndex: n.columnIndex
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
if (
|
|
59
|
-
return t.isClient ||
|
|
58
|
+
if (e.isCustom)
|
|
59
|
+
return t.isClient || e.isClient ? o.cloneElement(e.children, {
|
|
60
60
|
// pass down to tdProps for client templates
|
|
61
|
-
tdProps:
|
|
62
|
-
...
|
|
61
|
+
tdProps: e.tdProps ? {
|
|
62
|
+
...e.tdProps,
|
|
63
63
|
...a
|
|
64
64
|
} : null,
|
|
65
|
-
td2Props:
|
|
66
|
-
...
|
|
65
|
+
td2Props: e.td2Props ? {
|
|
66
|
+
...e.td2Props,
|
|
67
67
|
onContextMenu: d
|
|
68
68
|
} : null,
|
|
69
69
|
...r
|
|
70
|
-
}) :
|
|
70
|
+
}) : o.cloneElement(e.children, {
|
|
71
71
|
...a
|
|
72
72
|
});
|
|
73
|
-
const i =
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
return e.render.call(void 0,
|
|
77
|
-
...
|
|
73
|
+
const i = e.renderSecondCell ? /* @__PURE__ */ o.createElement("td", { ...e.td2Props, onContextMenu: d }) : null;
|
|
74
|
+
if (n.render) {
|
|
75
|
+
let l = null;
|
|
76
|
+
return e.renderFirstCell && (e.renderSecondCell ? l = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("td", { ...e.tdProps, ...a }, e.content), e.renderSecondCell && i) : l = /* @__PURE__ */ o.createElement("td", { ...e.tdProps, ...a }, e.content)), n.render.call(void 0, l, {
|
|
77
|
+
...n,
|
|
78
78
|
...r
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, e.children && o.cloneElement(e.children, {
|
|
82
82
|
...a
|
|
83
83
|
}), i);
|
|
84
84
|
};
|
|
@@ -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 s=require("react"),g=require("../../GridClientWrapper.js"),f=require("@progress/kendo-react-common"),o=require("@progress/kendo-svg-icons"),m=require("@progress/kendo-react-intl"),r=require("../../messages/index.js"),p=require("@progress/kendo-react-data-tools");function I(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const c=I(s),b=t=>{const e=c.useContext(g.GridContext),a=m.useLocalization(),n=t.expanded?r.groupCollapse:r.groupExpand,u=a.toLanguageString(n,r.messages[n]),l=e.dir==="rtl";return c.createElement("a",{onClick:i=>{var d;i.preventDefault(),e!=null&&e.itemChange&&e.itemChange({dataItem:t.dataItem,dataIndex:t.dataIndex,syntheticEvent:i,field:void 0,value:!t.expanded}),(d=e==null?void 0:e.dispatchGroupExpand)==null||d.call(e,{type:p.GROUP_EXPAND_ACTION.TOGGLE,group:t.group})},href:"#",tabIndex:-1,"aria-label":u},c.createElement(f.IconWrap,{name:t.expanded?"caret-alt-down":l?"caret-alt-left":"caret-alt-right",icon:t.expanded?o.caretAltDownIcon:l?o.caretAltLeftIcon:o.caretAltRightIcon}))};exports.GridGroupCellToggle=b;
|
|
@@ -14,7 +14,7 @@ import { useLocalization as u } from "@progress/kendo-react-intl";
|
|
|
14
14
|
import { groupCollapse as g, groupExpand as I, messages as h } from "../../messages/index.mjs";
|
|
15
15
|
import { GROUP_EXPAND_ACTION as x } from "@progress/kendo-react-data-tools";
|
|
16
16
|
const b = (t) => {
|
|
17
|
-
const e = a.useContext(m), l = u(),
|
|
17
|
+
const e = a.useContext(m), l = u(), o = t.expanded ? g : I, i = l.toLanguageString(o, h[o]), n = e.dir === "rtl";
|
|
18
18
|
return (
|
|
19
19
|
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
20
20
|
/* @__PURE__ */ a.createElement(
|
|
@@ -40,8 +40,8 @@ const b = (t) => {
|
|
|
40
40
|
/* @__PURE__ */ a.createElement(
|
|
41
41
|
d,
|
|
42
42
|
{
|
|
43
|
-
name: t.expanded ? "caret-alt-down" :
|
|
44
|
-
icon: t.expanded ? s :
|
|
43
|
+
name: t.expanded ? "caret-alt-down" : n ? "caret-alt-left" : "caret-alt-right",
|
|
44
|
+
icon: t.expanded ? s : n ? f : p
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
)
|
|
@@ -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 s=require("react"),m=require("@progress/kendo-react-data-tools"),f=require("../../GridClientWrapper.js"),C=require("@progress/kendo-react-common");function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const r=g(s),y=t=>{const{cellProps:e}=t,n=r.useContext(f.GridContext),a=m.useTableKeyboardNavigation(e.id),l=t.expanded,c=r.useCallback(o=>{o.isDefaultPrevented()||o.keyCode===C.Keys.enter&&(n!=null&&n.itemChange)&&(o.preventDefault(),n.itemChange({dataItem:e.dataItem,dataIndex:e.dataIndex,syntheticEvent:o,field:e.field,value:!l}))},[e.dataItem,e.dataIndex,e.field,n,l]),u=e.rowType!=="groupHeader"&&e.rowType!=="groupFooter"?{onKeyDown:c}:{},i={...a,...u},d={onContextMenu:n.onContextMenu,onChange:n.itemChange,selectionChange:o=>{n.selectionChange({event:o,dataItem:e.dataItem,dataIndex:e.rowDataIndex,columnIndex:e.columnIndex})}};if(t.isCustom)return n.isClient||t.isClient?r.cloneElement(t.children,{tdProps:{...t.tdProps,...i},...d}):r.cloneElement(t.children,{...i});if(e.render){const o=e.rowType!=="groupHeader"?r.createElement("td",{...t.tdProps,...i},t.content):null;return e.render.call(void 0,o,{...e,...d})}return t.children&&r.cloneElement(t.children,{...i})};exports.GridHierarchyCellContainer=y;
|
|
@@ -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 s=require("react"),u=require("../../GridClientWrapper.js"),m=require("@progress/kendo-react-common"),l=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),c=require("../../messages/index.js"),f=require("@progress/kendo-react-data-tools");function I(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const o=I(s),b=t=>{const e=o.useContext(u.GridContext),n=g.useLocalization(),a=t.expanded,i=a?c.detailCollapse:c.detailExpand,d=n.toLanguageString(i,c.messages[i]);return o.createElement("a",{onClick:r=>{r.preventDefault(),e!=null&&e.itemChange&&e.itemChange({dataItem:t.dataItem,dataIndex:t.dataIndex,syntheticEvent:r,field:t.field,value:!a,_expand:!0}),t.dataItem[e.dataItemKey]!==void 0&&(e==null||e.dispatchDetailExpand({type:f.DETAIL_EXPAND_ACTION.TOGGLE,id:t.dataItem[e.dataItemKey]}))},"aria-label":d,href:"#",tabIndex:-1},o.createElement(m.IconWrap,{name:a?"minus":"plus",icon:a?l.minusIcon:l.plusIcon}))};exports.GridHierarchyCellToggle=b;
|
|
@@ -7,37 +7,37 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as n from "react";
|
|
10
|
-
import { GridContext as
|
|
11
|
-
import { IconWrap as
|
|
12
|
-
import { minusIcon as
|
|
13
|
-
import { useLocalization as
|
|
14
|
-
import { messages as
|
|
10
|
+
import { GridContext as l } from "../../GridClientWrapper.mjs";
|
|
11
|
+
import { IconWrap as r } from "@progress/kendo-react-common";
|
|
12
|
+
import { minusIcon as c, plusIcon as s } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { useLocalization as I } from "@progress/kendo-react-intl";
|
|
14
|
+
import { messages as f, detailCollapse as u, detailExpand as p } from "../../messages/index.mjs";
|
|
15
15
|
import { DETAIL_EXPAND_ACTION as x } from "@progress/kendo-react-data-tools";
|
|
16
|
-
const
|
|
17
|
-
const e = n.useContext(
|
|
16
|
+
const D = (a) => {
|
|
17
|
+
const e = n.useContext(l), o = I(), t = a.expanded, i = t ? u : p, d = o.toLanguageString(i, f[i]);
|
|
18
18
|
return /* @__PURE__ */ n.createElement(
|
|
19
19
|
"a",
|
|
20
20
|
{
|
|
21
|
-
onClick: (
|
|
22
|
-
|
|
21
|
+
onClick: (m) => {
|
|
22
|
+
m.preventDefault(), e != null && e.itemChange && e.itemChange({
|
|
23
23
|
dataItem: a.dataItem,
|
|
24
24
|
dataIndex: a.dataIndex,
|
|
25
|
-
syntheticEvent:
|
|
25
|
+
syntheticEvent: m,
|
|
26
26
|
field: a.field,
|
|
27
27
|
value: !t,
|
|
28
28
|
_expand: !0
|
|
29
|
-
}), e == null || e.dispatchDetailExpand({
|
|
29
|
+
}), a.dataItem[e.dataItemKey] !== void 0 && (e == null || e.dispatchDetailExpand({
|
|
30
30
|
type: x.TOGGLE,
|
|
31
31
|
id: a.dataItem[e.dataItemKey]
|
|
32
|
-
});
|
|
32
|
+
}));
|
|
33
33
|
},
|
|
34
|
-
"aria-label":
|
|
34
|
+
"aria-label": d,
|
|
35
35
|
href: "#",
|
|
36
36
|
tabIndex: -1
|
|
37
37
|
},
|
|
38
|
-
/* @__PURE__ */ n.createElement(
|
|
38
|
+
/* @__PURE__ */ n.createElement(r, { name: t ? "minus" : "plus", icon: t ? c : s })
|
|
39
39
|
);
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
D as GridHierarchyCellToggle
|
|
43
43
|
};
|
|
@@ -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 t=require("react"),m=require("@progress/kendo-react-intl"),w=require("@progress/kendo-react-data-tools"),f=require("../../GridClientWrapper.js"),n=require("../../messages/index.js"),q=a=>{const{cellProps:o,rowReorderable:i,children:r}=a,{id:l,dataItem:c}=o,s=m.useLocalization(),e=t.useContext(f.GridContext),d=w.useTableKeyboardNavigation(l),u=i,R=s.toLanguageString(n.gridRowReorderAriaLabel,n.messages[n.gridRowReorderAriaLabel]),g=()=>u?e.activeDragRowDataItemRef.current=c:null,b=t.useCallback(C=>{e!=null&&e.onContextMenu&&e.onContextMenu.call(void 0,C,o.dataItem,o.field)},[e,o.dataItem,o.field]);return r&&t.cloneElement(r,{"aria-label":R,...d,onMouseDown:g,onContextMenu:b})};exports.GridRowReorderCellContainer=q;
|
|
@@ -6,17 +6,23 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import
|
|
10
|
-
import { useLocalization as
|
|
11
|
-
import { useTableKeyboardNavigation as
|
|
12
|
-
import { GridContext as
|
|
13
|
-
import { gridRowReorderAriaLabel as
|
|
9
|
+
import t from "react";
|
|
10
|
+
import { useLocalization as b } from "@progress/kendo-react-intl";
|
|
11
|
+
import { useTableKeyboardNavigation as p } from "@progress/kendo-react-data-tools";
|
|
12
|
+
import { GridContext as C } from "../../GridClientWrapper.mjs";
|
|
13
|
+
import { gridRowReorderAriaLabel as a, messages as w } from "../../messages/index.mjs";
|
|
14
14
|
const L = (r) => {
|
|
15
|
-
const { cellProps:
|
|
16
|
-
|
|
15
|
+
const { cellProps: e, rowReorderable: i, children: n } = r, { id: l, dataItem: s } = e, c = b(), o = t.useContext(C), m = p(l), d = i, u = c.toLanguageString(a, w[a]), f = () => d ? o.activeDragRowDataItemRef.current = s : null, R = t.useCallback(
|
|
16
|
+
(g) => {
|
|
17
|
+
o != null && o.onContextMenu && o.onContextMenu.call(void 0, g, e.dataItem, e.field);
|
|
18
|
+
},
|
|
19
|
+
[o, e.dataItem, e.field]
|
|
20
|
+
);
|
|
21
|
+
return n && t.cloneElement(n, {
|
|
17
22
|
"aria-label": u,
|
|
18
23
|
...m,
|
|
19
|
-
onMouseDown:
|
|
24
|
+
onMouseDown: f,
|
|
25
|
+
onContextMenu: R
|
|
20
26
|
});
|
|
21
27
|
};
|
|
22
28
|
export {
|
|
@@ -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"),m=require("@progress/kendo-react-data-tools"),f=require("../../GridClientWrapper.js");function g(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 o=g(C),P=e=>{var a;const{cellProps:t}=e,n=o.useContext(f.GridContext),r=m.useTableKeyboardNavigation(t.id),d={onContextMenu:o.useCallback(l=>{n!=null&&n.onContextMenu&&n.onContextMenu.call(void 0,l,t.dataItem,t.field)},[n,t.dataItem,t.field])},s=n.getCellPositionStyle(t.columnPosition),u={style:{...(a=e.tdProps)==null?void 0:a.style,...s}},i={...r,...d,...u},c={onContextMenu:n.onContextMenu,onChange:n.itemChange,selectionChange:l=>{n.selectionChange({event:l,dataItem:t.dataItem,dataIndex:t.rowDataIndex,columnIndex:t.columnIndex})}};if(e.isCustom)return n.isClient||e.isClient?o.cloneElement(e.children,{tdProps:{...e.tdProps,...i},...c}):o.cloneElement(e.children,{...i});if(t.render){const l=t.rowType!=="groupHeader"?o.createElement("td",{...e.tdProps,...i},e.content):null;return t.render.call(void 0,l,{...t,...c})}return e.children&&o.cloneElement(e.children,{...i})};exports.GridSelectionCellContainer=P;
|
|
@@ -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"),b=require("../../GridClientWrapper.js"),i=require("@progress/kendo-react-common"),I=require("@progress/kendo-react-intl"),o=require("../../messages/index.js");function g(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=g(m),k=e=>{var r;const t=c.useContext(b.GridContext),n=i.useId(),a=I.useLocalization(),l=(r=e.isSelected)!=null?r:i.getNestedValue(e.field,e.dataItem),d=typeof l=="boolean"&&l,u=c.useCallback(s=>{t==null||t.selectionChange({event:s,dataItem:e.dataItem,dataIndex:e.rowDataIndex,columnIndex:e.columnIndex})},[t,e.columnIndex,e.rowDataIndex,e.dataItem]);return c.createElement("span",{className:"k-checkbox-wrap"},c.createElement("input",{id:n,tabIndex:-1,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":a.toLanguageString(o.selectRow,o.messages[o.selectRow]),"aria-checked":d,checked:d,onChange:u}))};exports.GridSelectionCellInput=k;
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as a from "react";
|
|
10
|
-
import { GridContext as
|
|
11
|
-
import { useId as
|
|
10
|
+
import { GridContext as r } from "../../GridClientWrapper.mjs";
|
|
11
|
+
import { useId as u, getNestedValue as I } from "@progress/kendo-react-common";
|
|
12
12
|
import { useLocalization as x } from "@progress/kendo-react-intl";
|
|
13
13
|
import { selectRow as d, messages as k } from "../../messages/index.mjs";
|
|
14
14
|
const C = (e) => {
|
|
15
15
|
var o;
|
|
16
|
-
const t = a.useContext(
|
|
16
|
+
const t = a.useContext(r), l = u(), m = x(), n = (o = e.isSelected) != null ? o : I(e.field, e.dataItem), c = typeof n == "boolean" && n, i = a.useCallback(
|
|
17
17
|
(s) => {
|
|
18
18
|
t == null || t.selectionChange({
|
|
19
19
|
event: 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 J=require("react"),K=require("./GridColumnMenuItem.js"),U=require("./GridColumnMenuItemGroup.js"),X=require("./GridColumnMenuItemContent.js"),b=require("@progress/kendo-react-inputs"),Y=require("@progress/kendo-react-intl"),r=require("../messages/index.js"),D=require("@progress/kendo-data-query"),G=require("@progress/kendo-react-common"),v=require("@progress/kendo-react-buttons"),L=require("../utils/index.js"),F=require("@progress/kendo-svg-icons");function Z(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const m in e)if(m!=="default"){const f=Object.getOwnPropertyDescriptor(e,m);Object.defineProperty(s,m,f.get?f:{enumerable:!0,get:()=>e[m]})}}return s.default=e,Object.freeze(s)}const l=Z(J),p=(e,s)=>e.length!==s.length?!1:e.every((m,f)=>m===s[f]),ee={uniqueData:!0},te=e=>{const{uniqueData:s=ee.uniqueData}=e,m=()=>{const t=e.column.field;return S().filters.findIndex(i=>i.filters&&i.filters.length>0&&i.filters[0].field===t)},f=(t,n)=>{const c=e.column.field||"",i=t.map(o=>L.getNestedValue(c,o));return n?i.filter((o,u)=>i.indexOf(o)===u):i},S=()=>e.filter?G.clone(e.filter):{filters:[],logic:"and"},a=l.useRef(m()),[I,P]=l.useState(e.expanded||!1),[B,q]=l.useState(""),[h,C]=l.useState(f(e.data,s)||[]),[R,w]=l.useState(f(e.data,!1)||[]),[d,V]=l.useState(S());l.useEffect(()=>{const t=e.column.field||"",n=e.data.map(c=>L.getNestedValue(t,c));p(n,R)||(C(n),w(n))},[e.column,e.data]);const y=()=>e.expanded!==void 0,j=()=>{const t=y(),n=!(t?e.expanded:I);e.onExpandChange&&e.onExpandChange(n),t||P(n)},N=t=>{const n=e.searchBoxFilterOperator?e.searchBoxFilterOperator:"startswith",c={logic:"and",filters:[{field:e.column.field,operator:n,value:t.target.value,ignoreCase:!0}]};q(t.target.value),C(f(D.filterBy(e.data||[],c),s))},A=()=>{const t=e.searchBoxFilterOperator?e.searchBoxFilterOperator:"startswith",n={logic:"and",filters:[{field:e.column.field,operator:t,value:"",ignoreCase:!0}]};q(""),C(f(D.filterBy(e.data||[],n),s))},T=t=>{if(t.preventDefault(),!e.onFilterChange)return;const n=d||null;n!==null&&n.filters.length>0?(a.current>=0&&n.filters.splice(a.current,1),e.onFilterChange(n,t)):e.onFilterChange(null,t),e.onCloseMenu&&e.onCloseMenu()},z=t=>{if(t.preventDefault(),!e.onFilterChange)return;const n=d||null;e.onFilterChange(n,t),e.onCloseMenu&&e.onCloseMenu()},M=(t,n)=>{const c=e.column.field||"",i={...d},o=[...d.filters];let u=[];if(a.current!==-1&&i.filters[a.current].filters&&n!=="all"&&(u=i.filters[a.current].filters),t.value&&n==="all")h.forEach(E=>{u.push({field:c,operator:"eq",value:E})});else if(t.value)u.push({field:c,operator:"eq",value:n});else if(d){const E=u.findIndex(H=>H.value===n);u.splice(E,1)}i.logic="and",a.current!==-1?o[a.current]={logic:"or",filters:u}:o.push({logic:"or",filters:u}),(!t.value&&n==="all"||u.length===0)&&o.splice(a.current,1),i.filters=o,V(i)},_=()=>{let t=!1;if(d){const n=[...d.filters];return a.current===-1?!1:(t=h.every(c=>a.current!==-1&&n[a.current].filters?n[a.current].filters.findIndex(o=>o.value===c)>=0:!1),t)}return t},g=Y.useLocalization(),{column:x}=e;if(!x||!x.field)return l.createElement("div",null);const Q=y()?e.expanded:I,k=[];if(d){const t=[...d.filters];a.current=t.findIndex(n=>n.filters&&n.filters.length>0?n.filters[0].field===x.field:!1),a.current!==-1&&t[a.current].filters.length>0&&t[a.current].filters.forEach(n=>{n.field===e.column.field&&k.push(n.value)})}const W=g.toLanguageString(r.filterClearButton,r.messages[r.filterClearButton]),$=e.searchBox?l.createElement(e.searchBox,{value:B,onChange:N}):l.createElement("div",{className:"k-searchbox k-textbox k-input k-input-md k-input-solid"},l.createElement(G.IconWrap,{className:"k-input-icon",name:"search",icon:F.searchIcon}),l.createElement(b.Input,{className:"k-input-inner",type:"text",placeholder:g.toLanguageString(r.searchPlaceholder,r.messages[r.searchPlaceholder]),value:B,onChange:t=>N(t.nativeEvent)}),l.createElement(v.Button,{type:"button",rounded:null,className:"k-input-button",onClick:A,icon:"x","aria-label":W,svgIcon:F.xIcon})),O=k.filter((t,n)=>k.indexOf(t)===n);return l.createElement(U.GridColumnMenuItemGroup,null,l.createElement(K.GridColumnMenuItem,{title:g.toLanguageString(r.filterTitle,r.messages[r.filterTitle]),iconClass:"k-i-filter",svgIcon:F.filterIcon,onClick:j}),l.createElement(X.GridColumnMenuItemContent,{show:!!Q},l.createElement("form",{className:"k-filter-menu",onSubmit:z,onReset:T},l.createElement("div",{className:"k-filter-menu-container"},$,l.createElement("ul",{className:"k-reset k-multicheck-wrap"},l.createElement("li",{className:"k-item k-check-all-wrap"},l.createElement(b.Checkbox,{label:g.toLanguageString(r.filterCheckAll,r.messages[r.filterCheckAll]),onChange:t=>M(t,"all"),checked:_()})),h.map((t,n)=>l.createElement("li",{className:"k-item",key:n},l.createElement(b.Checkbox,{label:String(t),onChange:c=>M(c,t),checked:O.includes(t)})))),l.createElement("div",{className:"k-filter-selected-items"},O.length+" "+g.toLanguageString(r.filterSelectedItems,r.messages[r.filterSelectedItems])),l.createElement("div",{className:"k-actions k-hstack k-justify-content-stretch"},l.createElement(v.Button,{themeColor:"primary",type:"submit"},g.toLanguageString(r.filterSubmitButton,r.messages[r.filterSubmitButton])),l.createElement(v.Button,{className:"k-button",type:"reset"},g.toLanguageString(r.filterClearButton,r.messages[r.filterClearButton])))))))};exports.GridColumnMenuCheckboxFilter=te;
|
|
@@ -7,48 +7,48 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as l from "react";
|
|
10
|
-
import { GridColumnMenuItem as
|
|
11
|
-
import { GridColumnMenuItemGroup as
|
|
12
|
-
import { GridColumnMenuItemContent as
|
|
13
|
-
import { Input as
|
|
14
|
-
import { useLocalization as
|
|
15
|
-
import {
|
|
10
|
+
import { GridColumnMenuItem as _ } from "./GridColumnMenuItem.mjs";
|
|
11
|
+
import { GridColumnMenuItemGroup as $ } from "./GridColumnMenuItemGroup.mjs";
|
|
12
|
+
import { GridColumnMenuItemContent as p } from "./GridColumnMenuItemContent.mjs";
|
|
13
|
+
import { Input as ee, Checkbox as M } from "@progress/kendo-react-inputs";
|
|
14
|
+
import { useLocalization as te } from "@progress/kendo-react-intl";
|
|
15
|
+
import { filterClearButton as h, messages as f, searchPlaceholder as O, filterTitle as q, filterCheckAll as w, filterSelectedItems as V, filterSubmitButton as G } from "../messages/index.mjs";
|
|
16
16
|
import { filterBy as P } from "@progress/kendo-data-query";
|
|
17
|
-
import { IconWrap as
|
|
18
|
-
import { Button as
|
|
19
|
-
import { getNestedValue as
|
|
20
|
-
import { searchIcon as
|
|
21
|
-
const
|
|
17
|
+
import { IconWrap as ne, clone as le } from "@progress/kendo-react-common";
|
|
18
|
+
import { Button as v } from "@progress/kendo-react-buttons";
|
|
19
|
+
import { getNestedValue as A } from "../utils/index.mjs";
|
|
20
|
+
import { searchIcon as re, xIcon as ae, filterIcon as ie } from "@progress/kendo-svg-icons";
|
|
21
|
+
const ce = (e, d) => e.length !== d.length ? !1 : e.every((g, m) => g === d[m]), oe = {
|
|
22
22
|
uniqueData: !0
|
|
23
|
-
},
|
|
24
|
-
const { uniqueData:
|
|
23
|
+
}, Fe = (e) => {
|
|
24
|
+
const { uniqueData: d = oe.uniqueData } = e, g = () => {
|
|
25
25
|
const t = e.column.field;
|
|
26
|
-
return
|
|
26
|
+
return S().filters.findIndex(
|
|
27
27
|
(a) => a.filters && a.filters.length > 0 && a.filters[0].field === t
|
|
28
28
|
);
|
|
29
|
-
},
|
|
30
|
-
const i = e.column.field || "", a = t.map((c) =>
|
|
29
|
+
}, m = (t, n) => {
|
|
30
|
+
const i = e.column.field || "", a = t.map((c) => A(i, c));
|
|
31
31
|
return n ? a.filter((c, o) => a.indexOf(c) === o) : a;
|
|
32
|
-
},
|
|
32
|
+
}, S = () => e.filter ? le(e.filter) : { filters: [], logic: "and" }, r = l.useRef(g()), [I, R] = l.useState(e.expanded || !1), [b, B] = l.useState(""), [x, C] = l.useState(m(e.data, d) || []), [z, j] = l.useState(m(e.data, !1) || []), [s, T] = l.useState(S());
|
|
33
33
|
l.useEffect(() => {
|
|
34
|
-
const t = e.column.field || "", n = e.data.map((i) =>
|
|
35
|
-
|
|
34
|
+
const t = e.column.field || "", n = e.data.map((i) => A(t, i));
|
|
35
|
+
ce(n, z) || (C(n), j(n));
|
|
36
36
|
}, [e.column, e.data]);
|
|
37
37
|
const N = () => e.expanded !== void 0, W = () => {
|
|
38
|
-
const t = N(), n = !(t ? e.expanded :
|
|
39
|
-
e.onExpandChange && e.onExpandChange(n), t ||
|
|
40
|
-
},
|
|
38
|
+
const t = N(), n = !(t ? e.expanded : I);
|
|
39
|
+
e.onExpandChange && e.onExpandChange(n), t || R(n);
|
|
40
|
+
}, D = (t) => {
|
|
41
41
|
const n = e.searchBoxFilterOperator ? e.searchBoxFilterOperator : "startswith", i = {
|
|
42
42
|
logic: "and",
|
|
43
43
|
filters: [{ field: e.column.field, operator: n, value: t.target.value, ignoreCase: !0 }]
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
B(t.target.value), C(m(P(e.data || [], i), d));
|
|
46
46
|
}, H = () => {
|
|
47
47
|
const t = e.searchBoxFilterOperator ? e.searchBoxFilterOperator : "startswith", n = {
|
|
48
48
|
logic: "and",
|
|
49
49
|
filters: [{ field: e.column.field, operator: t, value: "", ignoreCase: !0 }]
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
B(""), C(m(P(e.data || [], n), d));
|
|
52
52
|
}, J = (t) => {
|
|
53
53
|
if (t.preventDefault(), !e.onFilterChange)
|
|
54
54
|
return;
|
|
@@ -59,18 +59,18 @@ const ie = (e, u) => e.length !== u.length ? !1 : e.every((h, f) => h === u[f]),
|
|
|
59
59
|
return;
|
|
60
60
|
const n = s || null;
|
|
61
61
|
e.onFilterChange(n, t), e.onCloseMenu && e.onCloseMenu();
|
|
62
|
-
},
|
|
62
|
+
}, y = (t, n) => {
|
|
63
63
|
const i = e.column.field || "", a = { ...s }, c = [...s.filters];
|
|
64
64
|
let o = [];
|
|
65
65
|
if (r.current !== -1 && a.filters[r.current].filters && n !== "all" && (o = a.filters[r.current].filters), t.value && n === "all")
|
|
66
|
-
|
|
67
|
-
o.push({ field: i, operator: "eq", value:
|
|
66
|
+
x.forEach((F) => {
|
|
67
|
+
o.push({ field: i, operator: "eq", value: F });
|
|
68
68
|
});
|
|
69
69
|
else if (t.value)
|
|
70
70
|
o.push({ field: i, operator: "eq", value: n });
|
|
71
71
|
else if (s) {
|
|
72
|
-
const
|
|
73
|
-
o.splice(
|
|
72
|
+
const F = o.findIndex((Z) => Z.value === n);
|
|
73
|
+
o.splice(F, 1);
|
|
74
74
|
}
|
|
75
75
|
a.logic = "and", r.current !== -1 ? c[r.current] = {
|
|
76
76
|
logic: "or",
|
|
@@ -83,65 +83,66 @@ const ie = (e, u) => e.length !== u.length ? !1 : e.every((h, f) => h === u[f]),
|
|
|
83
83
|
let t = !1;
|
|
84
84
|
if (s) {
|
|
85
85
|
const n = [...s.filters];
|
|
86
|
-
return r.current === -1 ? !1 : (t =
|
|
86
|
+
return r.current === -1 ? !1 : (t = x.every((i) => r.current !== -1 && n[r.current].filters ? n[r.current].filters.findIndex(
|
|
87
87
|
(c) => c.value === i
|
|
88
88
|
) >= 0 : !1), t);
|
|
89
89
|
}
|
|
90
90
|
return t;
|
|
91
|
-
},
|
|
92
|
-
if (!
|
|
91
|
+
}, u = te(), { column: k } = e;
|
|
92
|
+
if (!k || !k.field)
|
|
93
93
|
return /* @__PURE__ */ l.createElement("div", null);
|
|
94
|
-
const U = N() ? e.expanded :
|
|
94
|
+
const U = N() ? e.expanded : I, E = [];
|
|
95
95
|
if (s) {
|
|
96
96
|
const t = [...s.filters];
|
|
97
|
-
r.current = t.findIndex((n) => n.filters && n.filters.length > 0 ? n.filters[0].field ===
|
|
98
|
-
n.field === e.column.field &&
|
|
97
|
+
r.current = t.findIndex((n) => n.filters && n.filters.length > 0 ? n.filters[0].field === k.field : !1), r.current !== -1 && t[r.current].filters.length > 0 && t[r.current].filters.forEach((n) => {
|
|
98
|
+
n.field === e.column.field && E.push(n.value);
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
const X = e.searchBox ? /* @__PURE__ */ l.createElement(e.searchBox, { value:
|
|
102
|
-
|
|
101
|
+
const X = u.toLanguageString(h, f[h]), Y = e.searchBox ? /* @__PURE__ */ l.createElement(e.searchBox, { value: b, onChange: D }) : /* @__PURE__ */ l.createElement("div", { className: "k-searchbox k-textbox k-input k-input-md k-input-solid" }, /* @__PURE__ */ l.createElement(ne, { className: "k-input-icon", name: "search", icon: re }), /* @__PURE__ */ l.createElement(
|
|
102
|
+
ee,
|
|
103
103
|
{
|
|
104
104
|
className: "k-input-inner",
|
|
105
105
|
type: "text",
|
|
106
|
-
placeholder:
|
|
107
|
-
value:
|
|
108
|
-
onChange: (t) =>
|
|
106
|
+
placeholder: u.toLanguageString(O, f[O]),
|
|
107
|
+
value: b,
|
|
108
|
+
onChange: (t) => D(t.nativeEvent)
|
|
109
109
|
}
|
|
110
110
|
), /* @__PURE__ */ l.createElement(
|
|
111
|
-
|
|
111
|
+
v,
|
|
112
112
|
{
|
|
113
113
|
type: "button",
|
|
114
114
|
rounded: null,
|
|
115
115
|
className: "k-input-button",
|
|
116
116
|
onClick: H,
|
|
117
117
|
icon: "x",
|
|
118
|
-
|
|
118
|
+
"aria-label": X,
|
|
119
|
+
svgIcon: ae
|
|
119
120
|
}
|
|
120
|
-
)),
|
|
121
|
-
return /* @__PURE__ */ l.createElement(
|
|
122
|
-
|
|
121
|
+
)), L = E.filter((t, n) => E.indexOf(t) === n);
|
|
122
|
+
return /* @__PURE__ */ l.createElement($, null, /* @__PURE__ */ l.createElement(
|
|
123
|
+
_,
|
|
123
124
|
{
|
|
124
|
-
title:
|
|
125
|
+
title: u.toLanguageString(q, f[q]),
|
|
125
126
|
iconClass: "k-i-filter",
|
|
126
|
-
svgIcon:
|
|
127
|
+
svgIcon: ie,
|
|
127
128
|
onClick: W
|
|
128
129
|
}
|
|
129
|
-
), /* @__PURE__ */ l.createElement(
|
|
130
|
+
), /* @__PURE__ */ l.createElement(p, { show: !!U }, /* @__PURE__ */ l.createElement("form", { className: "k-filter-menu", onSubmit: K, onReset: J }, /* @__PURE__ */ l.createElement("div", { className: "k-filter-menu-container" }, Y, /* @__PURE__ */ l.createElement("ul", { className: "k-reset k-multicheck-wrap" }, /* @__PURE__ */ l.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ l.createElement(
|
|
130
131
|
M,
|
|
131
132
|
{
|
|
132
|
-
label:
|
|
133
|
-
onChange: (t) =>
|
|
133
|
+
label: u.toLanguageString(w, f[w]),
|
|
134
|
+
onChange: (t) => y(t, "all"),
|
|
134
135
|
checked: Q()
|
|
135
136
|
}
|
|
136
|
-
)),
|
|
137
|
+
)), x.map((t, n) => /* @__PURE__ */ l.createElement("li", { className: "k-item", key: n }, /* @__PURE__ */ l.createElement(
|
|
137
138
|
M,
|
|
138
139
|
{
|
|
139
140
|
label: String(t),
|
|
140
|
-
onChange: (i) =>
|
|
141
|
-
checked:
|
|
141
|
+
onChange: (i) => y(i, t),
|
|
142
|
+
checked: L.includes(t)
|
|
142
143
|
}
|
|
143
|
-
)))), /* @__PURE__ */ l.createElement("div", { className: "k-filter-selected-items" },
|
|
144
|
+
)))), /* @__PURE__ */ l.createElement("div", { className: "k-filter-selected-items" }, L.length + " " + u.toLanguageString(V, f[V])), /* @__PURE__ */ l.createElement("div", { className: "k-actions k-hstack k-justify-content-stretch" }, /* @__PURE__ */ l.createElement(v, { themeColor: "primary", type: "submit" }, u.toLanguageString(G, f[G])), /* @__PURE__ */ l.createElement(v, { className: "k-button", type: "reset" }, u.toLanguageString(h, f[h])))))));
|
|
144
145
|
};
|
|
145
146
|
export {
|
|
146
|
-
|
|
147
|
+
Fe as GridColumnMenuCheckboxFilter
|
|
147
148
|
};
|
|
@@ -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"),g=require("@progress/kendo-react-inputs"),j=require("@progress/kendo-react-common"),q=require("@progress/kendo-svg-icons"),b=require("@progress/kendo-react-buttons"),M=require("@progress/kendo-react-intl"),r=require("../messages/index.js");function w(s){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const c in s)if(c!=="default"){const u=Object.getOwnPropertyDescriptor(s,c);Object.defineProperty(n,c,u.get?u:{enumerable:!0,get:()=>s[c]})}}return n.default=s,Object.freeze(n)}const t=w(O),S=s=>{const{columnsState:n,onCloseMenu:c,onColumnsStateChange:u}=s,f=M.useLocalization(),[m,E]=t.useState(""),h=n.reduce((e,l)=>({...e,[l.id||""]:!l.hidden}),{}),[o,C]=t.useState(h),y=t.useMemo(()=>(n==null?void 0:n.filter(e=>{var l;return(l=e.title||e.field)==null?void 0:l.toLowerCase().includes(m.toLowerCase())}))||[],[n,m]),d=t.useMemo(()=>Object.values(o).filter(e=>e).length,[o]),k=t.useMemo(()=>d===(n==null?void 0:n.length),[n,d]),N=t.useCallback(e=>{const a=(i=>(i==null?void 0:i.map(p=>({...p,hidden:!o[p.id||""]})))||[])(n);u&&u(a),c==null||c.call(void 0)},[o,n,c]),v=()=>{C(h)},B=t.useCallback(()=>{const e={...o};Object.keys(e).forEach((l,a)=>e[l]=k&&a===0?!0:!k),C(e)},[o,k]),R=t.useCallback((e,l)=>{const a={...o};a[l||""]=e,C(a)},[o]),x=e=>{E(String(e.target.value))};return t.createElement("form",{className:"k-filter-menu"},t.createElement("div",{className:"k-filter-menu-container"},t.createElement(g.TextBox,{className:"k-searchbox",value:m,onChange:x,prefix:()=>t.createElement(g.InputPrefix,null,t.createElement(j.IconWrap,{name:"search",icon:q.searchIcon}))}),t.createElement("ul",{className:"k-reset k-multicheck-wrap"},!m&&t.createElement("li",{className:"k-item k-check-all-wrap"},t.createElement(g.Checkbox,{checked:k,onChange:B,label:f.toLanguageString(r.filterSelectAll,r.messages[r.filterSelectAll])})),y.map((e,l)=>t.createElement("li",{key:e.id,className:"k-item"},t.createElement(g.Checkbox,{disabled:o[e.id||""]&&d===1,checked:o[e.id||""],onChange:a=>{var i;return R(!!((i=a.target.element)!=null&&i.checked),e.id)},label:e.title||e.field})))),t.createElement("div",{className:"k-filter-selected-items"},d," selected items"),t.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},t.createElement(b.Button,{type:"button",themeColor:"primary",onClick:N},f.toLanguageString(r.filterApplyButton,r.messages[r.filterApplyButton])),t.createElement(b.Button,{type:"button",onClick:v},f.toLanguageString(r.filterResetButton,r.messages[r.filterResetButton])))))};S.displayName="GridColumnMenuColumnsChooser";exports.GridColumnMenuColumnsChooser=S;
|