@progress/kendo-react-grid 13.2.0-develop.7 → 13.2.0-develop.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +89 -86
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +2 -2
- package/columnMenu/GridColumnMenuColumnsChooser.js +1 -1
- package/columnMenu/GridColumnMenuColumnsChooser.mjs +15 -15
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +46 -47
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +1 -2
- package/index.d.mts +183 -1
- package/index.d.ts +183 -1
- package/index.js +1 -1
- package/index.mjs +62 -59
- package/interfaces/GridAICommands.js +8 -0
- package/interfaces/GridAICommands.mjs +11 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -17
- package/toolbar-tools/GridToolbarAIAssistant.js +2 -2
- package/toolbar-tools/GridToolbarAIAssistant.mjs +145 -284
- package/utils/handleAIResponse.js +8 -0
- package/utils/handleAIResponse.mjs +165 -0
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),h=require("@progress/kendo-react-inputs"),z=require("@progress/kendo-react-common"),A=require("@progress/kendo-svg-icons"),B=require("@progress/kendo-react-buttons"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),h=require("@progress/kendo-react-inputs"),z=require("@progress/kendo-react-common"),A=require("@progress/kendo-svg-icons"),B=require("@progress/kendo-react-buttons"),_=require("@progress/kendo-react-intl"),l=require("../messages/index.js"),F=require("./GridColumnMenuItem.js"),V=require("./GridColumnMenuItemGroup.js"),W=require("./GridColumnMenuItemContent.js"),H=require("../utils/GridContext.js"),J=require("./adaptiveContent/GridAdaptiveColumnChooser.js");function K(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const c in n)if(c!=="default"){const u=Object.getOwnPropertyDescriptor(n,c);Object.defineProperty(o,c,u.get?u:{enumerable:!0,get:()=>n[c]})}}return o.default=n,Object.freeze(o)}const e=K(P),R=n=>{const{columnsState:o,onCloseMenu:c,onColumnsStateChange:u}=n,d=_.useLocalization(),f=e.useContext(H.GridContext),[m,L]=e.useState(""),[k,O]=e.useState(n.expanded||!1),[E,p]=e.useState(!1),S=o.reduce((t,a)=>({...t,[a.id||""]:!a.hidden}),{}),[r,x]=e.useState(S),b=e.useMemo(()=>(o==null?void 0:o.filter(t=>{var a;return(a=t.title||t.field)==null?void 0:a.toLowerCase().includes(m.toLowerCase())}))||[],[o,m]),C=e.useMemo(()=>Object.values(r).filter(t=>t).length,[r]),g=e.useMemo(()=>C===(o==null?void 0:o.length),[o,C]),M=e.useCallback(t=>{t.preventDefault();const s=(i=>(i==null?void 0:i.map(w=>({...w,hidden:!r[w.id||""]})))||[])(o);u&&u(s),c==null||c.call(void 0)},[r,o,c]),v=t=>{t.preventDefault(),x(S)},y=e.useCallback(()=>{const t={...r};Object.keys(t).forEach((a,s)=>t[a]=g&&s===0?!0:!g),x(t)},[r,g]),I=e.useCallback((t,a)=>{const s={...r};s[a||""]=t,x(s)},[r]),G=t=>{L(String(t.target.value))},j=e.useCallback(()=>{const t=q(),a=!(t?n.expanded:k);n.onExpandChange&&n.onExpandChange(a),p(!E),!t&&!f.mobileMode&&O(a)},[k]),T=()=>{p(!1)},D=()=>{p(!1),n.onCloseMenu&&n.onCloseMenu()},q=()=>n.expanded!==void 0,N=q()?n.expanded:k;return e.createElement(V.GridColumnMenuItemGroup,null,e.createElement("div",{className:"k-expander"},!(n.alwaysExpand&&!f.mobileMode)&&e.createElement(F.GridColumnMenuItem,{title:d.toLanguageString(l.adaptiveColumnMenuChooserTitle,l.messages[l.adaptiveColumnMenuChooserTitle]),iconClass:"k-i-filter",svgIcon:A.columnsIcon,expandable:!0,expanded:!!N,onClick:j})),f.mobileMode&&E?e.createElement(J.GridAdaptiveColumnChooser,{onBackView:T,handleClose:D,onApply:M,onReset:v,filter:m,onFilter:G,allSelected:g,onSelectAll:y,filtered:b,selectedColumns:r,checkedCount:C,onCheckChange:I}):e.createElement(W.GridColumnMenuItemContent,{show:(n.alwaysExpand||!!N)&&!f.mobileMode},e.createElement("form",{onSubmit:M,onReset:v,className:"k-filter-menu"},e.createElement("div",{className:"k-filter-menu-container"},e.createElement(h.TextBox,{className:"k-searchbox",value:m,onChange:G,prefix:()=>e.createElement(h.InputPrefix,null,e.createElement(z.IconWrap,{name:"search",icon:A.searchIcon}))}),e.createElement("ul",{className:"k-reset k-multicheck-wrap"},!m&&e.createElement("li",{className:"k-item k-check-all-wrap"},e.createElement(h.Checkbox,{checked:g,onChange:y,label:d.toLanguageString(l.filterSelectAll,l.messages[l.filterSelectAll])})),b.map((t,a)=>e.createElement("li",{key:t.id,className:"k-item"},e.createElement(h.Checkbox,{disabled:r[t.id||""]&&C===1,checked:r[t.id||""],onChange:s=>{var i;return I(!!((i=s.target.element)!=null&&i.checked),t.id)},label:t.title||t.field})))),e.createElement("div",{className:"k-filter-selected-items"},C," ",d.toLanguageString(l.columnMenuColumnChooserSelectedItems,l.messages[l.columnMenuColumnChooserSelectedItems])),e.createElement("div",{className:"k-actions k-actions-start k-actions-horizontal"},e.createElement(B.Button,{type:"submit",themeColor:"primary"},d.toLanguageString(l.filterApplyButton,l.messages[l.filterApplyButton])),e.createElement(B.Button,{type:"reset"},d.toLanguageString(l.filterResetButton,l.messages[l.filterResetButton])))))))};R.displayName="GridColumnMenuColumnsChooser";exports.GridColumnMenuColumnsChooser=R;
|
|
@@ -12,14 +12,14 @@ import { IconWrap as H } from "@progress/kendo-react-common";
|
|
|
12
12
|
import { columnsIcon as J, searchIcon as K } from "@progress/kendo-svg-icons";
|
|
13
13
|
import { Button as A } from "@progress/kendo-react-buttons";
|
|
14
14
|
import { useLocalization as Q } from "@progress/kendo-react-intl";
|
|
15
|
-
import { adaptiveColumnMenuChooserTitle as B, messages as u, filterSelectAll as
|
|
15
|
+
import { adaptiveColumnMenuChooserTitle as B, messages as u, filterSelectAll as R, columnMenuColumnChooserSelectedItems as j, filterApplyButton as z, filterResetButton as D } from "../messages/index.mjs";
|
|
16
16
|
import { GridColumnMenuItem as U } from "./GridColumnMenuItem.mjs";
|
|
17
17
|
import { GridColumnMenuItemGroup as X } from "./GridColumnMenuItemGroup.mjs";
|
|
18
18
|
import { GridColumnMenuItemContent as Y } from "./GridColumnMenuItemContent.mjs";
|
|
19
19
|
import { GridContext as Z } from "../utils/GridContext.mjs";
|
|
20
20
|
import { GridAdaptiveColumnChooser as _ } from "./adaptiveContent/GridAdaptiveColumnChooser.mjs";
|
|
21
21
|
const $ = (o) => {
|
|
22
|
-
const { columnsState: l, onCloseMenu: C, onColumnsStateChange: k } = o, i = Q(), f = e.useContext(Z), [s,
|
|
22
|
+
const { columnsState: l, onCloseMenu: C, onColumnsStateChange: k } = o, i = Q(), f = e.useContext(Z), [s, F] = e.useState(""), [h, O] = e.useState(o.expanded || !1), [E, g] = e.useState(!1), x = l.reduce((t, n) => ({ ...t, [n.id || ""]: !n.hidden }), {}), [a, p] = e.useState(x), S = e.useMemo(
|
|
23
23
|
() => (l == null ? void 0 : l.filter((t) => {
|
|
24
24
|
var n;
|
|
25
25
|
return (n = t.title || t.field) == null ? void 0 : n.toLowerCase().includes(s.toLowerCase());
|
|
@@ -52,15 +52,15 @@ const $ = (o) => {
|
|
|
52
52
|
},
|
|
53
53
|
[a]
|
|
54
54
|
), N = (t) => {
|
|
55
|
-
|
|
55
|
+
F(String(t.target.value));
|
|
56
56
|
}, T = e.useCallback(() => {
|
|
57
|
-
const t = w(), n = !(t ? o.expanded :
|
|
58
|
-
o.onExpandChange && o.onExpandChange(n),
|
|
59
|
-
}, [
|
|
60
|
-
|
|
57
|
+
const t = w(), n = !(t ? o.expanded : h);
|
|
58
|
+
o.onExpandChange && o.onExpandChange(n), g(!E), !t && !f.mobileMode && O(n);
|
|
59
|
+
}, [h]), V = () => {
|
|
60
|
+
g(!1);
|
|
61
61
|
}, P = () => {
|
|
62
|
-
|
|
63
|
-
}, w = () => o.expanded !== void 0, I = w() ? o.expanded :
|
|
62
|
+
g(!1), o.onCloseMenu && o.onCloseMenu();
|
|
63
|
+
}, w = () => o.expanded !== void 0, I = w() ? o.expanded : h;
|
|
64
64
|
return /* @__PURE__ */ e.createElement(X, null, /* @__PURE__ */ e.createElement("div", { className: "k-expander" }, !(o.alwaysExpand && !f.mobileMode) && /* @__PURE__ */ e.createElement(
|
|
65
65
|
U,
|
|
66
66
|
{
|
|
@@ -74,7 +74,7 @@ const $ = (o) => {
|
|
|
74
74
|
expanded: !!I,
|
|
75
75
|
onClick: T
|
|
76
76
|
}
|
|
77
|
-
)), f.mobileMode && E ? /* @__PURE__ */ e.createElement(
|
|
77
|
+
)), f.mobileMode && E ? /* @__PURE__ */ e.createElement(
|
|
78
78
|
_,
|
|
79
79
|
{
|
|
80
80
|
onBackView: V,
|
|
@@ -90,7 +90,7 @@ const $ = (o) => {
|
|
|
90
90
|
checkedCount: m,
|
|
91
91
|
onCheckChange: y
|
|
92
92
|
}
|
|
93
|
-
)
|
|
93
|
+
) : /* @__PURE__ */ e.createElement(Y, { show: (o.alwaysExpand || !!I) && !f.mobileMode }, /* @__PURE__ */ e.createElement("form", { onSubmit: b, onReset: v, className: "k-filter-menu" }, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu-container" }, /* @__PURE__ */ e.createElement(
|
|
94
94
|
W,
|
|
95
95
|
{
|
|
96
96
|
className: "k-searchbox",
|
|
@@ -103,7 +103,7 @@ const $ = (o) => {
|
|
|
103
103
|
{
|
|
104
104
|
checked: d,
|
|
105
105
|
onChange: M,
|
|
106
|
-
label: i.toLanguageString(
|
|
106
|
+
label: i.toLanguageString(R, u[R])
|
|
107
107
|
}
|
|
108
108
|
)), S.map((t, n) => /* @__PURE__ */ e.createElement("li", { key: t.id, className: "k-item" }, /* @__PURE__ */ e.createElement(
|
|
109
109
|
L,
|
|
@@ -117,9 +117,9 @@ const $ = (o) => {
|
|
|
117
117
|
label: t.title || t.field
|
|
118
118
|
}
|
|
119
119
|
)))), /* @__PURE__ */ e.createElement("div", { className: "k-filter-selected-items" }, m, " ", i.toLanguageString(
|
|
120
|
-
|
|
121
|
-
u[
|
|
122
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-start k-actions-horizontal" }, /* @__PURE__ */ e.createElement(A, { type: "submit", themeColor: "primary" }, i.toLanguageString(
|
|
120
|
+
j,
|
|
121
|
+
u[j]
|
|
122
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-start k-actions-horizontal" }, /* @__PURE__ */ e.createElement(A, { type: "submit", themeColor: "primary" }, i.toLanguageString(z, u[z])), /* @__PURE__ */ e.createElement(A, { type: "reset" }, i.toLanguageString(D, u[D])))))));
|
|
123
123
|
};
|
|
124
124
|
$.displayName = "GridColumnMenuColumnsChooser";
|
|
125
125
|
export {
|