@progress/kendo-react-listview 14.5.0-develop.13 → 14.5.0-develop.14
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/ListView.js +1 -1
- package/ListView.mjs +21 -21
- package/dist/cdn/js/kendo-react-listview.js +1 -1
- package/interfaces/ListViewProps.d.ts +6 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +3 -3
package/ListView.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 I=require("react"),o=require("@progress/kendo-react-common"),y=require("./package-metadata.js");function O(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const l in a)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(a,l);Object.defineProperty(r,l,d.get?d:{enumerable:!0,get:()=>a[l]})}}return r.default=a,Object.freeze(r)}const s=O(I),c="k-focus",C=s.forwardRef((a,r)=>{const l=!o.validatePackage(y.packageMetadata,{component:"ListView"}),d=o.getLicenseMessage(y.packageMetadata),{data:M=[],item:f,footer:v,header:g,className:R,style:S,onScroll:b,navigatable:w}=a,k=s.useRef(null),m=s.useRef(null),p=s.useCallback(()=>({onScroll:b,props:a,context:{},state:{},refs:{}}),[]);s.useImperativeHandle(m,p),s.useImperativeHandle(r,()=>m.current),o.useWebMcpRegister("listview",m,a,a.webMcp);const D=s.useCallback(e=>o.dispatchEvent(b,e,p(),void 0),[]),E=(e,t,n)=>{n.preventDefault(),t.focusNext(e),t.next(e).classList.add(c),t.previous(e).classList.remove(c)},L=(e,t,n)=>{n.preventDefault(),t.focusPrevious(e),t.next(e).classList.remove(c),t.previous(e).classList.add(c)},i=s.useMemo(()=>new o.Navigation({root:k,selectors:[".k-listview-item"],rovingTabIndex:!0,keyboardEvents:{keydown:{ArrowDown:E,ArrowRight:E,ArrowUp:L,ArrowLeft:L,Home:(e,t,n)=>{n.preventDefault();const u=t.first;u&&t.focusElement(u,e)},End:(e,t,n)=>{n.preventDefault();const u=t.last;u&&t.focusElement(u,e)},Tab:(e,t,n)=>{t.removeFocusClass(e)}}},tabIndex:0,focusClass:c}),[]),N=s.useCallback(i.triggerKeyboardEvent.bind(i),[]),h=s.useCallback(e=>{e.nativeEvent.target.classList.add(c),i.elements.forEach(t=>{t!==e.nativeEvent.target&&t.classList.remove(c)})},[]);return s.useEffect(()=>{if(w)return i.initializeRovingTab(),()=>i.removeFocusListener()},[]),s.createElement("div",{className:o.classNames("k-listview",R),style:S,onKeyDown:e=>w&&N(e),onClick:h},g?s.createElement(g,null):null,s.createElement("div",{role:"list",className:"k-listview-content",onScroll:D,ref:k},f&&M.map((e,t)=>s.createElement(f,{dataItem:e,index:t,key:t}))),v?s.createElement(v,null):null,l&&s.createElement(o.WatermarkOverlay,{message:d}))});C.displayName="KendoReactListView";exports.ListView=C;
|
package/ListView.mjs
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as s from "react";
|
|
9
|
-
import { validatePackage as
|
|
10
|
-
import { packageMetadata as
|
|
11
|
-
const o = "k-focus", K = s.forwardRef((r,
|
|
12
|
-
const g = !
|
|
9
|
+
import { validatePackage as x, getLicenseMessage as D, useWebMcpRegister as M, dispatchEvent as S, Navigation as A, classNames as H, WatermarkOverlay as F } from "@progress/kendo-react-common";
|
|
10
|
+
import { packageMetadata as p } from "./package-metadata.mjs";
|
|
11
|
+
const o = "k-focus", K = s.forwardRef((r, b) => {
|
|
12
|
+
const g = !x(p, { component: "ListView" }), L = D(p), { data: y = [], item: c, footer: m, header: u, className: C, style: h, onScroll: v, navigatable: d } = r, f = s.useRef(null), i = s.useRef(null), w = s.useCallback(
|
|
13
13
|
() => ({
|
|
14
|
-
onScroll:
|
|
14
|
+
onScroll: v,
|
|
15
15
|
props: r,
|
|
16
16
|
context: {},
|
|
17
17
|
state: {},
|
|
@@ -19,25 +19,25 @@ const o = "k-focus", K = s.forwardRef((r, L) => {
|
|
|
19
19
|
}),
|
|
20
20
|
[]
|
|
21
21
|
);
|
|
22
|
-
s.useImperativeHandle(
|
|
22
|
+
s.useImperativeHandle(i, w), s.useImperativeHandle(b, () => i.current), M("listview", i, r, r.webMcp);
|
|
23
23
|
const I = s.useCallback(
|
|
24
|
-
(e) => S(
|
|
24
|
+
(e) => S(v, e, w(), void 0),
|
|
25
25
|
[]
|
|
26
|
-
),
|
|
26
|
+
), k = (e, t, a) => {
|
|
27
27
|
a.preventDefault(), t.focusNext(e), t.next(e).classList.add(o), t.previous(e).classList.remove(o);
|
|
28
|
-
},
|
|
28
|
+
}, E = (e, t, a) => {
|
|
29
29
|
a.preventDefault(), t.focusPrevious(e), t.next(e).classList.remove(o), t.previous(e).classList.add(o);
|
|
30
30
|
}, n = s.useMemo(
|
|
31
31
|
() => new A({
|
|
32
|
-
root:
|
|
32
|
+
root: f,
|
|
33
33
|
selectors: [".k-listview-item"],
|
|
34
34
|
rovingTabIndex: !0,
|
|
35
35
|
keyboardEvents: {
|
|
36
36
|
keydown: {
|
|
37
|
-
ArrowDown:
|
|
38
|
-
ArrowRight:
|
|
39
|
-
ArrowUp:
|
|
40
|
-
ArrowLeft:
|
|
37
|
+
ArrowDown: k,
|
|
38
|
+
ArrowRight: k,
|
|
39
|
+
ArrowUp: E,
|
|
40
|
+
ArrowLeft: E,
|
|
41
41
|
Home: (e, t, a) => {
|
|
42
42
|
a.preventDefault();
|
|
43
43
|
const l = t.first;
|
|
@@ -57,26 +57,26 @@ const o = "k-focus", K = s.forwardRef((r, L) => {
|
|
|
57
57
|
focusClass: o
|
|
58
58
|
}),
|
|
59
59
|
[]
|
|
60
|
-
), N = s.useCallback(n.triggerKeyboardEvent.bind(n), []),
|
|
60
|
+
), N = s.useCallback(n.triggerKeyboardEvent.bind(n), []), R = s.useCallback((e) => {
|
|
61
61
|
e.nativeEvent.target.classList.add(o), n.elements.forEach((t) => {
|
|
62
62
|
t !== e.nativeEvent.target && t.classList.remove(o);
|
|
63
63
|
});
|
|
64
64
|
}, []);
|
|
65
65
|
return s.useEffect(() => {
|
|
66
|
-
if (
|
|
66
|
+
if (d)
|
|
67
67
|
return n.initializeRovingTab(), () => n.removeFocusListener();
|
|
68
68
|
}, []), /* @__PURE__ */ s.createElement(
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
71
|
className: H("k-listview", C),
|
|
72
72
|
style: h,
|
|
73
|
-
onKeyDown: (e) =>
|
|
74
|
-
onClick:
|
|
73
|
+
onKeyDown: (e) => d && N(e),
|
|
74
|
+
onClick: R
|
|
75
75
|
},
|
|
76
|
+
u ? /* @__PURE__ */ s.createElement(u, null) : null,
|
|
77
|
+
/* @__PURE__ */ s.createElement("div", { role: "list", className: "k-listview-content", onScroll: I, ref: f }, c && y.map((e, t) => /* @__PURE__ */ s.createElement(c, { dataItem: e, index: t, key: t }))),
|
|
76
78
|
m ? /* @__PURE__ */ s.createElement(m, null) : null,
|
|
77
|
-
|
|
78
|
-
i ? /* @__PURE__ */ s.createElement(i, null) : null,
|
|
79
|
-
g && /* @__PURE__ */ s.createElement(F, { message: b })
|
|
79
|
+
g && /* @__PURE__ */ s.createElement(F, { message: L })
|
|
80
80
|
);
|
|
81
81
|
});
|
|
82
82
|
K.displayName = "KendoReactListView";
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-common")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactListview={},e.React,e.KendoReactCommon)}(this,function(e,t,s){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if("default"!==s){var a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,a.get?a:{enumerable:!0,get:function(){return e[s]}})}}),t.default=e,Object.freeze(t)}var r=a(t);const n=Object.freeze({name:"@progress/kendo-react-listview",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.5.0-develop.
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@progress/kendo-react-common")):"function"==typeof define&&define.amd?define(["exports","react","@progress/kendo-react-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactListview={},e.React,e.KendoReactCommon)}(this,function(e,t,s){"use strict";function a(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if("default"!==s){var a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,a.get?a:{enumerable:!0,get:function(){return e[s]}})}}),t.default=e,Object.freeze(t)}var r=a(t);const n=Object.freeze({name:"@progress/kendo-react-listview",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"14.5.0-develop.14",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),l="k-focus",o=r.forwardRef((e,t)=>{const a=!s.validatePackage(n,{component:"ListView"}),o=s.getLicenseMessage(n),{data:i=[],item:c,footer:d,header:m,className:u,style:f,onScroll:v,navigatable:p}=e,w=r.useRef(null),b=r.useRef(null),E=r.useCallback(()=>({onScroll:v,props:e,context:{},state:{},refs:{}}),[]);r.useImperativeHandle(b,E),r.useImperativeHandle(t,()=>b.current),s.useWebMcpRegister("listview",b,e,e.webMcp);const g=r.useCallback(e=>s.dispatchEvent(v,e,E(),void 0),[]),k=(e,t,s)=>{s.preventDefault(),t.focusNext(e),t.next(e).classList.add(l),t.previous(e).classList.remove(l)},y=(e,t,s)=>{s.preventDefault(),t.focusPrevious(e),t.next(e).classList.remove(l),t.previous(e).classList.add(l)},N=r.useMemo(()=>new s.Navigation({root:w,selectors:[".k-listview-item"],rovingTabIndex:!0,keyboardEvents:{keydown:{ArrowDown:k,ArrowRight:k,ArrowUp:y,ArrowLeft:y,Home:(e,t,s)=>{s.preventDefault();const a=t.first;a&&t.focusElement(a,e)},End:(e,t,s)=>{s.preventDefault();const a=t.last;a&&t.focusElement(a,e)},Tab:(e,t,s)=>{t.removeFocusClass(e)}}},tabIndex:0,focusClass:l}),[]),L=r.useCallback(N.triggerKeyboardEvent.bind(N),[]),h=r.useCallback(e=>{e.nativeEvent.target.classList.add(l),N.elements.forEach(t=>{t!==e.nativeEvent.target&&t.classList.remove(l)})},[]);return r.useEffect(()=>{if(p)return N.initializeRovingTab(),()=>N.removeFocusListener()},[]),r.createElement("div",{className:s.classNames("k-listview",u),style:f,onKeyDown:e=>p&&L(e),onClick:h},m?r.createElement(m,null):null,r.createElement("div",{role:"list",className:"k-listview-content",onScroll:g,ref:w},c&&i.map((e,t)=>r.createElement(c,{dataItem:e,index:t,key:t}))),d?r.createElement(d,null):null,a&&r.createElement(s.WatermarkOverlay,{message:o}))});o.displayName="KendoReactListView";e.ListView=o,e.ListViewFooter=e=>r.createElement("div",{className:s.classNames("k-listview-footer",e.className),style:e.style},e.children),e.ListViewHeader=e=>r.createElement("div",{className:s.classNames("k-listview-header",e.className),style:e.style},e.children),e.ListViewItemWrapper=e=>{const{children:t,style:a,className:n}=e;return r.createElement("div",{role:"listitem",style:a,className:s.classNames("k-listview-item",n)},t)}});
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { ListViewEvent } from '../events';
|
|
9
9
|
import { ListViewItemProps } from './ListViewItemProps';
|
|
10
|
+
import { WebMcpProps } from '@progress/kendo-react-common';
|
|
10
11
|
/**
|
|
11
12
|
* Represents the props of the [KendoReact ListView component](https://www.telerik.com/kendo-react-ui/components/listview).
|
|
12
13
|
*/
|
|
@@ -92,4 +93,9 @@ export interface ListViewProps {
|
|
|
92
93
|
* ```
|
|
93
94
|
*/
|
|
94
95
|
navigatable?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Enables Web MCP tool registration for this component.
|
|
98
|
+
* Requires a parent `WebMcpProvider` from `@progress/kendo-react-webmcp`.
|
|
99
|
+
*/
|
|
100
|
+
webMcp?: boolean | WebMcpProps;
|
|
95
101
|
}
|
package/package-metadata.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 e=Object.freeze({name:"@progress/kendo-react-listview",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-listview",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1778746033,version:"14.5.0-develop.14",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '14.5.0-develop.
|
|
10
|
+
publishDate: 1778746033,
|
|
11
|
+
version: '14.5.0-develop.14',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-listview",
|
|
3
|
-
"version": "14.5.0-develop.
|
|
3
|
+
"version": "14.5.0-develop.14",
|
|
4
4
|
"description": "React ListView enables you to display a custom layout of data items. KendoReact ListView package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-react-common": "14.5.0-develop.
|
|
29
|
+
"@progress/kendo-react-common": "14.5.0-develop.14",
|
|
30
30
|
"react": "^18.0.0 || ^19.0.0",
|
|
31
31
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
32
32
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"package": {
|
|
52
52
|
"productName": "KendoReact",
|
|
53
53
|
"productCode": "KENDOUIREACT",
|
|
54
|
-
"publishDate":
|
|
54
|
+
"publishDate": 1778746033,
|
|
55
55
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
56
56
|
}
|
|
57
57
|
},
|