@progress/kendo-react-grid 7.2.4-develop.3 → 7.3.0-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/Grid.js +8 -0
- package/Grid.mjs +1111 -0
- package/GridColumn.js +8 -0
- package/GridColumn.mjs +53 -0
- package/GridNoRecords.js +8 -0
- package/GridNoRecords.mjs +25 -0
- package/GridToolbar.js +8 -0
- package/GridToolbar.mjs +39 -0
- package/StatusBar.js +8 -0
- package/StatusBar.mjs +53 -0
- package/VirtualScroll.js +8 -0
- package/VirtualScroll.mjs +128 -0
- package/VirtualScrollFixed.js +8 -0
- package/VirtualScrollFixed.mjs +86 -0
- package/cells/GridCell.js +8 -0
- package/cells/GridCell.mjs +57 -0
- package/cells/GridDetailCell.js +8 -0
- package/cells/GridDetailCell.mjs +30 -0
- package/cells/GridDetailHierarchyCell.js +8 -0
- package/cells/GridDetailHierarchyCell.mjs +17 -0
- package/cells/GridEditCell.js +8 -0
- package/cells/GridEditCell.mjs +172 -0
- package/cells/GridFilterCell.js +8 -0
- package/cells/GridFilterCell.mjs +145 -0
- package/cells/GridGroupCell.js +8 -0
- package/cells/GridGroupCell.mjs +115 -0
- package/cells/GridHierarchyCell.js +8 -0
- package/cells/GridHierarchyCell.mjs +84 -0
- package/cells/GridSelectionCell.js +8 -0
- package/cells/GridSelectionCell.mjs +54 -0
- package/columnMenu/GridColumnMenuCheckboxFilter.js +8 -0
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +199 -0
- package/columnMenu/GridColumnMenuColumnsList.js +8 -0
- package/columnMenu/GridColumnMenuColumnsList.mjs +60 -0
- package/columnMenu/GridColumnMenuFilter.js +8 -0
- package/columnMenu/GridColumnMenuFilter.mjs +188 -0
- package/columnMenu/GridColumnMenuFilterCell.js +8 -0
- package/columnMenu/GridColumnMenuFilterCell.mjs +96 -0
- package/columnMenu/GridColumnMenuFilterUI.js +8 -0
- package/columnMenu/GridColumnMenuFilterUI.mjs +36 -0
- package/columnMenu/GridColumnMenuGroup.js +8 -0
- package/columnMenu/GridColumnMenuGroup.mjs +50 -0
- package/columnMenu/GridColumnMenuItem.js +8 -0
- package/columnMenu/GridColumnMenuItem.mjs +22 -0
- package/columnMenu/GridColumnMenuItemContent.js +8 -0
- package/columnMenu/GridColumnMenuItemContent.mjs +30 -0
- package/columnMenu/GridColumnMenuItemGroup.js +8 -0
- package/columnMenu/GridColumnMenuItemGroup.mjs +30 -0
- package/columnMenu/GridColumnMenuSort.js +8 -0
- package/columnMenu/GridColumnMenuSort.mjs +75 -0
- package/columnMenu/GridColumnMenuWrapper.js +8 -0
- package/columnMenu/GridColumnMenuWrapper.mjs +91 -0
- package/constants/index.js +8 -0
- package/constants/index.mjs +15 -0
- package/dist/cdn/js/kendo-react-grid.js +8 -5
- package/drag/ColumnDraggable.js +8 -0
- package/drag/ColumnDraggable.mjs +43 -0
- package/drag/ColumnResize.js +8 -0
- package/drag/ColumnResize.mjs +128 -0
- package/drag/CommonDragLogic.js +8 -0
- package/drag/CommonDragLogic.mjs +104 -0
- package/drag/GroupingIndicator.js +8 -0
- package/drag/GroupingIndicator.mjs +91 -0
- package/filterCommon.js +8 -0
- package/filterCommon.mjs +103 -0
- package/footer/Footer.js +8 -0
- package/footer/Footer.mjs +76 -0
- package/footer/FooterRow.js +8 -0
- package/footer/FooterRow.mjs +46 -0
- package/header/FilterRow.js +8 -0
- package/header/FilterRow.mjs +96 -0
- package/header/GridHeaderCell.js +8 -0
- package/header/GridHeaderCell.mjs +38 -0
- package/header/GridHeaderSelectionCell.js +8 -0
- package/header/GridHeaderSelectionCell.mjs +44 -0
- package/header/GroupPanel.js +8 -0
- package/header/GroupPanel.mjs +60 -0
- package/header/Header.js +8 -0
- package/header/Header.mjs +107 -0
- package/header/HeaderRow.js +8 -0
- package/header/HeaderRow.mjs +155 -0
- package/index.d.mts +2777 -5
- package/index.d.ts +2777 -57
- package/index.js +8 -5
- package/index.mjs +89 -3845
- package/interfaces/GridSortSettings.js +8 -0
- package/interfaces/GridSortSettings.mjs +12 -0
- package/messages/index.js +8 -0
- package/messages/index.mjs +107 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +10 -10
- package/paging/GridPagerSettings.js +8 -0
- package/paging/GridPagerSettings.mjs +28 -0
- package/rows/GridDetailRow.js +8 -0
- package/rows/GridDetailRow.mjs +20 -0
- package/rows/GridRow.js +8 -0
- package/rows/GridRow.mjs +51 -0
- package/utils/index.js +8 -0
- package/utils/index.mjs +180 -0
- package/Grid.d.ts +0 -267
- package/GridColumn.d.ts +0 -28
- package/GridNoRecords.d.ts +0 -40
- package/GridToolbar.d.ts +0 -54
- package/ScrollMode.d.ts +0 -5
- package/StatusBar.d.ts +0 -51
- package/VirtualScroll.d.ts +0 -51
- package/VirtualScrollFixed.d.ts +0 -53
- package/cells/GridCell.d.ts +0 -6
- package/cells/GridDetailCell.d.ts +0 -18
- package/cells/GridDetailHierarchyCell.d.ts +0 -10
- package/cells/GridEditCell.d.ts +0 -9
- package/cells/GridFilterCell.d.ts +0 -20
- package/cells/GridGroupCell.d.ts +0 -9
- package/cells/GridHierarchyCell.d.ts +0 -9
- package/cells/GridSelectionCell.d.ts +0 -9
- package/columnMenu/GridColumnMenuCheckboxFilter.d.ts +0 -122
- package/columnMenu/GridColumnMenuColumnsList.d.ts +0 -31
- package/columnMenu/GridColumnMenuFilter.d.ts +0 -165
- package/columnMenu/GridColumnMenuFilterCell.d.ts +0 -37
- package/columnMenu/GridColumnMenuFilterUI.d.ts +0 -12
- package/columnMenu/GridColumnMenuGroup.d.ts +0 -77
- package/columnMenu/GridColumnMenuItem.d.ts +0 -40
- package/columnMenu/GridColumnMenuItemContent.d.ts +0 -24
- package/columnMenu/GridColumnMenuItemGroup.d.ts +0 -20
- package/columnMenu/GridColumnMenuSort.d.ts +0 -89
- package/columnMenu/GridColumnMenuWrapper.d.ts +0 -49
- package/constants/index.d.ts +0 -10
- package/drag/ColumnDraggable.d.ts +0 -38
- package/drag/ColumnResize.d.ts +0 -37
- package/drag/CommonDragLogic.d.ts +0 -44
- package/drag/GroupingIndicator.d.ts +0 -41
- package/filterCommon.d.ts +0 -73
- package/footer/Footer.d.ts +0 -38
- package/footer/FooterRow.d.ts +0 -25
- package/header/FilterRow.d.ts +0 -38
- package/header/GridHeaderCell.d.ts +0 -56
- package/header/GridHeaderSelectionCell.d.ts +0 -10
- package/header/GroupPanel.d.ts +0 -26
- package/header/Header.d.ts +0 -46
- package/header/HeaderRow.d.ts +0 -51
- package/interfaces/GridCellProps.d.ts +0 -73
- package/interfaces/GridCellsSettings.d.ts +0 -115
- package/interfaces/GridColumnMenuBaseProps.d.ts +0 -18
- package/interfaces/GridColumnMenuColumnProps.d.ts +0 -29
- package/interfaces/GridColumnMenuFilterBaseProps.d.ts +0 -28
- package/interfaces/GridColumnMenuFilterUIProps.d.ts +0 -35
- package/interfaces/GridColumnMenuGroupBaseProps.d.ts +0 -23
- package/interfaces/GridColumnMenuProps.d.ts +0 -12
- package/interfaces/GridColumnMenuSortBaseProps.d.ts +0 -24
- package/interfaces/GridColumnProps.d.ts +0 -92
- package/interfaces/GridDetailRowProps.d.ts +0 -17
- package/interfaces/GridFilterCellProps.d.ts +0 -68
- package/interfaces/GridFilterOperator.d.ts +0 -10
- package/interfaces/GridFilterOperators.d.ts +0 -53
- package/interfaces/GridFooterCellProps.d.ts +0 -26
- package/interfaces/GridGroupableSettings.d.ts +0 -17
- package/interfaces/GridHeaderCellProps.d.ts +0 -24
- package/interfaces/GridNoRecordsProps.d.ts +0 -13
- package/interfaces/GridProps.d.ts +0 -333
- package/interfaces/GridRowProps.d.ts +0 -67
- package/interfaces/GridRowType.d.ts +0 -13
- package/interfaces/GridSelectableSettings.d.ts +0 -22
- package/interfaces/GridSortSettings.d.ts +0 -17
- package/interfaces/GridToolbarProps.d.ts +0 -37
- package/interfaces/VirtualScrollInterface.d.ts +0 -31
- package/interfaces/events.d.ts +0 -232
- package/messages/index.d.ts +0 -199
- package/package-metadata.d.ts +0 -9
- package/paging/GridPagerSettings.d.ts +0 -71
- package/paging/Page.d.ts +0 -17
- package/rows/GridDetailRow.d.ts +0 -55
- package/rows/GridRow.d.ts +0 -15
- package/utils/index.d.ts +0 -73
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { provideLocalizationService as u, registerForIntl as l, registerForLocalization as c } from "@progress/kendo-react-intl";
|
|
11
|
+
import { GridColumnMenuItemGroup as m } from "./GridColumnMenuItemGroup.mjs";
|
|
12
|
+
import { GridColumnMenuItem as a } from "./GridColumnMenuItem.mjs";
|
|
13
|
+
import { messages as f, groupColumn as g, ungroupColumn as d } from "../messages/index.mjs";
|
|
14
|
+
import { groupIcon as C, ungroupIcon as h } from "@progress/kendo-svg-icons";
|
|
15
|
+
class s extends t.Component {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.onGroupClick = (n) => {
|
|
18
|
+
if (n.preventDefault(), this.props.onGroupChange) {
|
|
19
|
+
const { column: o } = this.props;
|
|
20
|
+
if (!o.field)
|
|
21
|
+
return;
|
|
22
|
+
const e = (this.props.group || []).slice(), r = e.findIndex((i) => i.field === o.field);
|
|
23
|
+
r > -1 ? e.splice(r, 1) : e.push({
|
|
24
|
+
field: o.field
|
|
25
|
+
}), this.props.onGroupChange(e, n);
|
|
26
|
+
}
|
|
27
|
+
this.props.onCloseMenu && this.props.onCloseMenu();
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @hidden
|
|
32
|
+
*/
|
|
33
|
+
render() {
|
|
34
|
+
const { group: n, column: o } = this.props, e = u(this), r = !!(n && o.field && n.find((p) => p.field === o.field)), i = r ? d : g;
|
|
35
|
+
return /* @__PURE__ */ t.createElement(m, null, /* @__PURE__ */ t.createElement(
|
|
36
|
+
a,
|
|
37
|
+
{
|
|
38
|
+
title: e.toLanguageString(i, f[i]),
|
|
39
|
+
iconClass: r ? "k-i-ungroup" : "k-i-group",
|
|
40
|
+
svgIcon: r ? h : C,
|
|
41
|
+
onClick: this.onGroupClick
|
|
42
|
+
}
|
|
43
|
+
));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
l(s);
|
|
47
|
+
c(s);
|
|
48
|
+
export {
|
|
49
|
+
s as GridColumnMenuGroup
|
|
50
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),r=require("@progress/kendo-react-common");function a(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const c=a(l);class i extends c.Component{render(){const{title:n,iconClass:e,svgIcon:o,selected:s}=this.props;return c.createElement("div",{onClick:this.props.onClick,className:`k-columnmenu-item ${s?"k-selected":""}`},(e||o)&&c.createElement(r.IconWrap,{name:e&&r.toIconName(e),icon:o}),n)}}exports.GridColumnMenuItem=i;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { IconWrap as s, toIconName as m } from "@progress/kendo-react-common";
|
|
11
|
+
class l extends t.Component {
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
render() {
|
|
16
|
+
const { title: o, iconClass: e, svgIcon: n, selected: c } = this.props;
|
|
17
|
+
return /* @__PURE__ */ t.createElement("div", { onClick: this.props.onClick, className: `k-columnmenu-item ${c ? "k-selected" : ""}` }, (e || n) && /* @__PURE__ */ t.createElement(s, { name: e && m(e), icon: n }), o);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
l as GridColumnMenuItem
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),c=require("@progress/kendo-react-animation"),i=require("@progress/kendo-react-common");function l(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=l(s);class a extends o.Component{render(){return o.createElement("div",{id:this.props.id,className:i.classNames("k-columnmenu-item-content",this.props.className),style:this.props.style},o.createElement(c.Reveal,{style:{position:"relative",display:"block"}},this.props.show?this.props.children:null))}}exports.GridColumnMenuItemContent=a;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { Reveal as t } from "@progress/kendo-react-animation";
|
|
11
|
+
import { classNames as s } from "@progress/kendo-react-common";
|
|
12
|
+
class l extends e.Component {
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
render() {
|
|
17
|
+
return /* @__PURE__ */ e.createElement(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
id: this.props.id,
|
|
21
|
+
className: s("k-columnmenu-item-content", this.props.className),
|
|
22
|
+
style: this.props.style
|
|
23
|
+
},
|
|
24
|
+
/* @__PURE__ */ e.createElement(t, { style: { position: "relative", display: "block" } }, this.props.show ? this.props.children : null)
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
l as GridColumnMenuItemContent
|
|
30
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@progress/kendo-react-common"),c=require("react");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const o=a(c);class i extends o.Component{render(){const{children:t}=this.props;return o.createElement("div",{id:this.props.id,className:s.classNames("k-columnmenu-item-wrapper",this.props.className),style:this.props.style},t)}}exports.GridColumnMenuItemGroup=i;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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 { classNames as r } from "@progress/kendo-react-common";
|
|
10
|
+
import * as e from "react";
|
|
11
|
+
class p extends e.Component {
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
render() {
|
|
16
|
+
const { children: s } = this.props;
|
|
17
|
+
return /* @__PURE__ */ e.createElement(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
id: this.props.id,
|
|
21
|
+
className: r("k-columnmenu-item-wrapper", this.props.className),
|
|
22
|
+
style: this.props.style
|
|
23
|
+
},
|
|
24
|
+
s
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
p as GridColumnMenuItemGroup
|
|
30
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),g=require("./GridColumnMenuItem.js"),q=require("./GridColumnMenuItemGroup.js"),A=require("../interfaces/GridSortSettings.js"),a=require("@progress/kendo-react-intl"),o=require("../messages/index.js"),m=require("@progress/kendo-svg-icons");function G(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const i=G(v),I="asc",D="desc",O={true:{asc:{asc:"",desc:"desc"},desc:{asc:"asc",desc:""},"":{asc:"asc",desc:"desc"}},false:{asc:{asc:"asc",desc:"desc"},desc:{asc:"asc",desc:"desc"},"":{asc:"asc",desc:"desc"}}},S=(t,e)=>e?e.findIndex(s=>s.field===t):-1,h=(t,e)=>!!(e&&t>-1&&e[t].dir===I),C=(t,e)=>!!(e&&t>-1&&e[t].dir===D),d=class d extends i.Component{constructor(){super(...arguments),this.onAscClick=e=>{this.onSort(e,I),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onDescClick=e=>{this.onSort(e,D),this.props.onCloseMenu&&this.props.onCloseMenu()},this.onSort=(e,s)=>{if(e.preventDefault(),!this.props.onSortChange)return;const{column:n,sortable:r,sort:k}=this.props,{allowUnsort:M,mode:b}=A.normalize(r||!1,!1),u=(k||[]).filter(l=>l.field===n.field)[0],p=O[M][u&&u.dir||""][s],f=b==="single"?[]:(this.props.sort||[]).filter(l=>l.field!==n.field);p!==""&&n.field&&f.push({field:n.field,dir:p}),this.props.onSortChange(f,e)}}render(){const{sort:e,column:s}=this.props,n=S(s.field,e),r=a.provideLocalizationService(this);return i.createElement(q.GridColumnMenuItemGroup,null,i.createElement(g.GridColumnMenuItem,{title:r.toLanguageString(o.sortAscending,o.messages[o.sortAscending]),iconClass:"k-i-sort-asc-sm",svgIcon:m.sortAscSmallIcon,selected:h(n,e),onClick:this.onAscClick}),i.createElement(g.GridColumnMenuItem,{title:r.toLanguageString(o.sortDescending,o.messages[o.sortDescending]),iconClass:"k-i-sort-desc-sm",svgIcon:m.sortDescSmallIcon,selected:C(n,e),onClick:this.onDescClick}))}};d.active=(e,s)=>{const n=S(e,s);return C(n,s)||h(n,s)};let c=d;a.registerForIntl(c);a.registerForLocalization(c);exports.GridColumnMenuSort=c;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as r from "react";
|
|
10
|
+
import { GridColumnMenuItem as m } from "./GridColumnMenuItem.mjs";
|
|
11
|
+
import { GridColumnMenuItemGroup as M } from "./GridColumnMenuItemGroup.mjs";
|
|
12
|
+
import { normalize as x } from "../interfaces/GridSortSettings.mjs";
|
|
13
|
+
import { provideLocalizationService as z, registerForIntl as E, registerForLocalization as L } from "@progress/kendo-react-intl";
|
|
14
|
+
import { sortAscending as f, messages as u, sortDescending as h } from "../messages/index.mjs";
|
|
15
|
+
import { sortAscSmallIcon as R, sortDescSmallIcon as w } from "@progress/kendo-svg-icons";
|
|
16
|
+
const D = "asc", I = "desc", F = {
|
|
17
|
+
true: {
|
|
18
|
+
asc: { asc: "", desc: "desc" },
|
|
19
|
+
desc: { asc: "asc", desc: "" },
|
|
20
|
+
"": { asc: "asc", desc: "desc" }
|
|
21
|
+
},
|
|
22
|
+
false: {
|
|
23
|
+
asc: { asc: "asc", desc: "desc" },
|
|
24
|
+
desc: { asc: "asc", desc: "desc" },
|
|
25
|
+
"": { asc: "asc", desc: "desc" }
|
|
26
|
+
}
|
|
27
|
+
}, g = (o, s) => s ? s.findIndex((t) => t.field === o) : -1, C = (o, s) => !!(s && o > -1 && s[o].dir === D), S = (o, s) => !!(s && o > -1 && s[o].dir === I), l = class l extends r.Component {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments), this.onAscClick = (s) => {
|
|
30
|
+
this.onSort(s, D), this.props.onCloseMenu && this.props.onCloseMenu();
|
|
31
|
+
}, this.onDescClick = (s) => {
|
|
32
|
+
this.onSort(s, I), this.props.onCloseMenu && this.props.onCloseMenu();
|
|
33
|
+
}, this.onSort = (s, t) => {
|
|
34
|
+
if (s.preventDefault(), !this.props.onSortChange)
|
|
35
|
+
return;
|
|
36
|
+
const { column: e, sortable: c, sort: k } = this.props, { allowUnsort: v, mode: A } = x(c || !1, !1), a = (k || []).filter((i) => i.field === e.field)[0], d = F[v][a && a.dir || ""][t], p = A === "single" ? [] : (this.props.sort || []).filter((i) => i.field !== e.field);
|
|
37
|
+
d !== "" && e.field && p.push({ field: e.field, dir: d }), this.props.onSortChange(p, s);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
render() {
|
|
44
|
+
const { sort: s, column: t } = this.props, e = g(t.field, s), c = z(this);
|
|
45
|
+
return /* @__PURE__ */ r.createElement(M, null, /* @__PURE__ */ r.createElement(
|
|
46
|
+
m,
|
|
47
|
+
{
|
|
48
|
+
title: c.toLanguageString(f, u[f]),
|
|
49
|
+
iconClass: "k-i-sort-asc-sm",
|
|
50
|
+
svgIcon: R,
|
|
51
|
+
selected: C(e, s),
|
|
52
|
+
onClick: this.onAscClick
|
|
53
|
+
}
|
|
54
|
+
), /* @__PURE__ */ r.createElement(
|
|
55
|
+
m,
|
|
56
|
+
{
|
|
57
|
+
title: c.toLanguageString(h, u[h]),
|
|
58
|
+
iconClass: "k-i-sort-desc-sm",
|
|
59
|
+
svgIcon: w,
|
|
60
|
+
selected: S(e, s),
|
|
61
|
+
onClick: this.onDescClick
|
|
62
|
+
}
|
|
63
|
+
));
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
l.active = (s, t) => {
|
|
67
|
+
const e = g(s, t);
|
|
68
|
+
return S(e, t) || C(e, t);
|
|
69
|
+
};
|
|
70
|
+
let n = l;
|
|
71
|
+
E(n);
|
|
72
|
+
L(n);
|
|
73
|
+
export {
|
|
74
|
+
n as GridColumnMenuSort
|
|
75
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),m=require("@progress/kendo-react-popup"),u=require("@progress/kendo-react-common"),p=require("@progress/kendo-svg-icons"),c=require("../messages/index.js"),d=require("@progress/kendo-react-intl");function f(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>s[t]})}}return e.default=s,Object.freeze(e)}const n=f(h);class g extends n.Component{constructor(){super(...arguments),this.state={show:!1},this._anchor=null,this._content=null,this.blurTimeout=void 0,this.willBlur=!1,this.blur=()=>{if(this.willBlur){this.willBlur=!1;return}clearTimeout(this.blurTimeout),this.blurTimeout=window.setTimeout(()=>{this.closeMenu()})},this.focus=()=>{clearTimeout(this.blurTimeout)},this.anchorClick=e=>{e.preventDefault(),this.state.show&&this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!this.state.show},()=>this.state.show&&this._content&&this._content.focus())},this.closeMenu=()=>{this.props.onCloseMenu&&this.props.onCloseMenu(),this.setState({show:!1})},this.onAnchorMouseDown=e=>{this.willBlur=this.state.show&&e.currentTarget===this._anchor},this.onAnchorKeyDown=e=>{var t;if(e.keyCode===u.Keys.tab){const o=e.target,r=o&&((t=o.closest(".k-grid"))==null?void 0:t.getElementsByClassName("k-grid-content")[0]);r&&r.scrollWidth>r.clientWidth&&o.scrollIntoView({inline:"center"})}}}render(){const{columnMenu:e,...t}=this.props,{column:o}=this.props,r=d.provideLocalizationService(this),i=o.title||o.field,a=i?`${i} `:"";return n.createElement(n.Fragment,null,n.createElement("a",{className:"k-grid-header-menu k-grid-column-menu",ref:l=>this._anchor=l,onClick:this.anchorClick,onMouseDown:this.onAnchorMouseDown,onKeyDown:this.onAnchorKeyDown,href:"#","aria-label":`${a}${r.toLanguageString(c.columnMenu,c.messages[c.columnMenu])}`},n.createElement(u.IconWrap,{name:"filter",icon:p.filterIcon})),n.createElement(m.Popup,{anchor:this._anchor,show:this.state.show,popupClass:"k-column-menu k-column-menu-popup k-grid-columnmenu-popup"},n.createElement("div",{ref:l=>this._content=l,tabIndex:0,onBlur:this.blur,onFocus:this.focus,style:{outline:"none"}},e&&n.createElement(e,{...t,onCloseMenu:this.closeMenu}))))}}exports.GridColumnMenuWrapper=g;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { Popup as h } from "@progress/kendo-react-popup";
|
|
11
|
+
import { Keys as u, IconWrap as a } from "@progress/kendo-react-common";
|
|
12
|
+
import { filterIcon as m } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { columnMenu as l, messages as p } from "../messages/index.mjs";
|
|
14
|
+
import { provideLocalizationService as f } from "@progress/kendo-react-intl";
|
|
15
|
+
class k extends t.Component {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.state = {
|
|
18
|
+
show: !1
|
|
19
|
+
}, this._anchor = null, this._content = null, this.blurTimeout = void 0, this.willBlur = !1, this.blur = () => {
|
|
20
|
+
if (this.willBlur) {
|
|
21
|
+
this.willBlur = !1;
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
clearTimeout(this.blurTimeout), this.blurTimeout = window.setTimeout(() => {
|
|
25
|
+
this.closeMenu();
|
|
26
|
+
});
|
|
27
|
+
}, this.focus = () => {
|
|
28
|
+
clearTimeout(this.blurTimeout);
|
|
29
|
+
}, this.anchorClick = (e) => {
|
|
30
|
+
e.preventDefault(), this.state.show && this.props.onCloseMenu && this.props.onCloseMenu(), this.setState(
|
|
31
|
+
{
|
|
32
|
+
show: !this.state.show
|
|
33
|
+
},
|
|
34
|
+
() => this.state.show && this._content && this._content.focus()
|
|
35
|
+
);
|
|
36
|
+
}, this.closeMenu = () => {
|
|
37
|
+
this.props.onCloseMenu && this.props.onCloseMenu(), this.setState({ show: !1 });
|
|
38
|
+
}, this.onAnchorMouseDown = (e) => {
|
|
39
|
+
this.willBlur = this.state.show && e.currentTarget === this._anchor;
|
|
40
|
+
}, this.onAnchorKeyDown = (e) => {
|
|
41
|
+
var n;
|
|
42
|
+
if (e.keyCode === u.tab) {
|
|
43
|
+
const o = e.target, s = o && ((n = o.closest(".k-grid")) == null ? void 0 : n.getElementsByClassName("k-grid-content")[0]);
|
|
44
|
+
s && s.scrollWidth > s.clientWidth && o.scrollIntoView({ inline: "center" });
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
const { columnMenu: e, ...n } = this.props, { column: o } = this.props, s = f(this), i = o.title || o.field, c = i ? `${i} ` : "";
|
|
50
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
51
|
+
"a",
|
|
52
|
+
{
|
|
53
|
+
className: "k-grid-header-menu k-grid-column-menu",
|
|
54
|
+
ref: (r) => this._anchor = r,
|
|
55
|
+
onClick: this.anchorClick,
|
|
56
|
+
onMouseDown: this.onAnchorMouseDown,
|
|
57
|
+
onKeyDown: this.onAnchorKeyDown,
|
|
58
|
+
href: "#",
|
|
59
|
+
"aria-label": `${c}${s.toLanguageString(l, p[l])}`
|
|
60
|
+
},
|
|
61
|
+
/* @__PURE__ */ t.createElement(a, { name: "filter", icon: m })
|
|
62
|
+
), /* @__PURE__ */ t.createElement(
|
|
63
|
+
h,
|
|
64
|
+
{
|
|
65
|
+
anchor: this._anchor,
|
|
66
|
+
show: this.state.show,
|
|
67
|
+
popupClass: "k-column-menu k-column-menu-popup k-grid-columnmenu-popup"
|
|
68
|
+
},
|
|
69
|
+
/* @__PURE__ */ t.createElement(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
ref: (r) => this._content = r,
|
|
73
|
+
tabIndex: 0,
|
|
74
|
+
onBlur: this.blur,
|
|
75
|
+
onFocus: this.focus,
|
|
76
|
+
style: { outline: "none" }
|
|
77
|
+
},
|
|
78
|
+
e && /* @__PURE__ */ t.createElement(
|
|
79
|
+
e,
|
|
80
|
+
{
|
|
81
|
+
...n,
|
|
82
|
+
onCloseMenu: this.closeMenu
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
)
|
|
86
|
+
));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
k as GridColumnMenuWrapper
|
|
91
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@progress/kendo-react-data-tools"),T=E.TABLE_ROW_INDEX_ATTRIBUTE,_=E.TABLE_COL_INDEX_ATTRIBUTE,I=E.TABLE_PREVENT_SELECTION_ELEMENT;exports.GRID_COL_INDEX_ATTRIBUTE=_;exports.GRID_PREVENT_SELECTION_ELEMENT=I;exports.GRID_ROW_INDEX_ATTRIBUTE=T;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 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 { TABLE_ROW_INDEX_ATTRIBUTE as E, TABLE_COL_INDEX_ATTRIBUTE as T, TABLE_PREVENT_SELECTION_ELEMENT as _ } from "@progress/kendo-react-data-tools";
|
|
10
|
+
const R = E, N = T, L = _;
|
|
11
|
+
export {
|
|
12
|
+
N as GRID_COL_INDEX_ATTRIBUTE,
|
|
13
|
+
L as GRID_PREVENT_SELECTION_ELEMENT,
|
|
14
|
+
R as GRID_ROW_INDEX_ATTRIBUTE
|
|
15
|
+
};
|