@progress/kendo-react-layout 13.4.0-develop.2 → 13.4.0-develop.4
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/card/Avatar.js +1 -1
- package/card/Avatar.mjs +1 -2
- package/card/interfaces/AvatarProps.d.ts +2 -1
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/tilelayout/InternalTile.d.ts +5 -81
- package/tilelayout/InternalTile.js +1 -1
- package/tilelayout/InternalTile.mjs +194 -209
- package/tilelayout/ResizeHandlers.d.ts +3 -5
- package/tilelayout/ResizeHandlers.js +1 -1
- package/tilelayout/ResizeHandlers.mjs +38 -41
- package/tilelayout/TileLayout.d.ts +24 -69
- package/tilelayout/TileLayout.js +1 -1
- package/tilelayout/TileLayout.mjs +101 -97
- package/tilelayout/interfaces/index.d.ts +2 -2
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-layout",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-layout",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1770362819,version:"13.4.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -8,6 +8,6 @@ export const packageMetadata = Object.freeze({
|
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
10
|
publishDate: 0,
|
|
11
|
-
version: '13.4.0-develop.
|
|
11
|
+
version: '13.4.0-develop.4',
|
|
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-layout",
|
|
3
|
-
"version": "13.4.0-develop.
|
|
3
|
+
"version": "13.4.0-develop.4",
|
|
4
4
|
"description": "React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-react-animation": "13.4.0-develop.
|
|
30
|
-
"@progress/kendo-react-buttons": "13.4.0-develop.
|
|
31
|
-
"@progress/kendo-react-common": "13.4.0-develop.
|
|
32
|
-
"@progress/kendo-react-intl": "13.4.0-develop.
|
|
33
|
-
"@progress/kendo-react-popup": "13.4.0-develop.
|
|
34
|
-
"@progress/kendo-react-progressbars": "13.4.0-develop.
|
|
29
|
+
"@progress/kendo-react-animation": "13.4.0-develop.4",
|
|
30
|
+
"@progress/kendo-react-buttons": "13.4.0-develop.4",
|
|
31
|
+
"@progress/kendo-react-common": "13.4.0-develop.4",
|
|
32
|
+
"@progress/kendo-react-intl": "13.4.0-develop.4",
|
|
33
|
+
"@progress/kendo-react-popup": "13.4.0-develop.4",
|
|
34
|
+
"@progress/kendo-react-progressbars": "13.4.0-develop.4",
|
|
35
35
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
36
36
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
37
37
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"package": {
|
|
77
77
|
"productName": "KendoReact",
|
|
78
78
|
"productCode": "KENDOUIREACT",
|
|
79
|
-
"publishDate":
|
|
79
|
+
"publishDate": 1770362819,
|
|
80
80
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
81
81
|
}
|
|
82
82
|
},
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { default as PropTypes } from 'prop-types';
|
|
9
8
|
import { TileStrictPosition, TileLayoutItem } from './interfaces/index.js';
|
|
10
9
|
import * as React from 'react';
|
|
11
10
|
/**
|
|
@@ -30,83 +29,8 @@ export interface InternalTileState {
|
|
|
30
29
|
/**
|
|
31
30
|
* @hidden
|
|
32
31
|
*/
|
|
33
|
-
export declare
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
defaultPosition: PropTypes.Validator<object>;
|
|
39
|
-
style: PropTypes.Requireable<object>;
|
|
40
|
-
className: PropTypes.Requireable<string>;
|
|
41
|
-
hintStyle: PropTypes.Requireable<object>;
|
|
42
|
-
hintClassName: PropTypes.Requireable<string>;
|
|
43
|
-
header: PropTypes.Requireable<any>;
|
|
44
|
-
body: PropTypes.Requireable<any>;
|
|
45
|
-
item: PropTypes.Requireable<any>;
|
|
46
|
-
resizable: PropTypes.Requireable<string | boolean>;
|
|
47
|
-
reorderable: PropTypes.Requireable<boolean>;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* @hidden
|
|
51
|
-
*/
|
|
52
|
-
static displayName: string;
|
|
53
|
-
/**
|
|
54
|
-
* @hidden
|
|
55
|
-
*/
|
|
56
|
-
static defaultProps: {
|
|
57
|
-
resizable: boolean;
|
|
58
|
-
reorderable: boolean;
|
|
59
|
-
};
|
|
60
|
-
protected get reorderable(): boolean;
|
|
61
|
-
state: {
|
|
62
|
-
rtl: boolean;
|
|
63
|
-
visibleHint: boolean;
|
|
64
|
-
};
|
|
65
|
-
oldSize: {};
|
|
66
|
-
draggable: {
|
|
67
|
-
element: HTMLElement | null;
|
|
68
|
-
} | null;
|
|
69
|
-
dragging: boolean;
|
|
70
|
-
resizing: boolean;
|
|
71
|
-
element: HTMLElement | null;
|
|
72
|
-
hintElement: HTMLElement | null;
|
|
73
|
-
get dragElement(): HTMLElement | null | undefined;
|
|
74
|
-
ignoreDrag: boolean;
|
|
75
|
-
pressOffset: {
|
|
76
|
-
x: number;
|
|
77
|
-
y: number;
|
|
78
|
-
};
|
|
79
|
-
pressXY: {
|
|
80
|
-
x: number;
|
|
81
|
-
y: number;
|
|
82
|
-
};
|
|
83
|
-
currentTranslate: {
|
|
84
|
-
x: number;
|
|
85
|
-
y: number;
|
|
86
|
-
};
|
|
87
|
-
preventDataOps: any;
|
|
88
|
-
handleResize: (e: any, q: {
|
|
89
|
-
end: boolean;
|
|
90
|
-
direction: any;
|
|
91
|
-
}) => void;
|
|
92
|
-
handlePress: (e: any) => void;
|
|
93
|
-
handleDrag: (e: any) => void;
|
|
94
|
-
handleRelease: () => void;
|
|
95
|
-
handleMouseDown: () => void;
|
|
96
|
-
handleMouseUp: () => void;
|
|
97
|
-
componentDidMount(): void;
|
|
98
|
-
render(): React.JSX.Element;
|
|
99
|
-
/**
|
|
100
|
-
* @hidden
|
|
101
|
-
*/
|
|
102
|
-
getSnapshotBeforeUpdate(_: any): null;
|
|
103
|
-
/**
|
|
104
|
-
* @hidden
|
|
105
|
-
*/
|
|
106
|
-
setInitialHintPosition(): void;
|
|
107
|
-
calcNewHintPosition: () => void;
|
|
108
|
-
/**
|
|
109
|
-
* @hidden
|
|
110
|
-
*/
|
|
111
|
-
componentDidUpdate(prevProps: any): void;
|
|
112
|
-
}
|
|
32
|
+
export declare const InternalTile: React.FC<InternalTileProps> & {
|
|
33
|
+
propTypes?: any;
|
|
34
|
+
displayName?: string;
|
|
35
|
+
defaultProps?: Partial<InternalTileProps>;
|
|
36
|
+
};
|
|
@@ -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 G=require("react"),o=require("prop-types"),C=require("@progress/kendo-react-common"),J=require("./ResizeHandlers.js");function Q(t){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const v in t)if(v!=="default"){const c=Object.getOwnPropertyDescriptor(t,v);Object.defineProperty(m,v,c.get?c:{enumerable:!0,get:()=>t[v]})}}return m.default=t,Object.freeze(m)}const n=Q(G),Y=200,M={resizable:!0,reorderable:!0},D=t=>{var B,X;const m=(B=t.reorderable)!=null?B:M.reorderable,v=(X=t.resizable)!=null?X:M.resizable,c=n.useRef(null),s=n.useRef(null),z=n.useRef(null),w=n.useRef({}),T=n.useRef(!1),N=n.useRef(!1),$=n.useRef(!1),L=n.useRef({x:0,y:0}),P=n.useRef({x:0,y:0}),u=n.useRef({x:0,y:0}),S=n.useRef(void 0),x=n.useRef(t),[b,j]=n.useState(!1),[H,I]=n.useState(!1),d=n.useCallback(()=>z.current?z.current.element:void 0,[]),E=n.useCallback(()=>{if(c.current&&s.current){const e=c.current.getBoundingClientRect();s.current.style.top=e.top+"px",s.current.style.left=e.left+"px",s.current.style.height=c.current.offsetHeight+"px",s.current.style.width=c.current.offsetWidth+"px"}},[]),p=n.useCallback(()=>{E()},[E]),F=n.useCallback(()=>{setTimeout(()=>{E()},100)},[E]),A=n.useCallback(()=>{const e=d();if(!e||!s.current)return;const r=e.getBoundingClientRect(),i=r.top+u.current.y,a=r.left+u.current.x;s.current.style.top=`${i}px`,s.current.style.left=`${a}px`,s.current.style.display="block"},[d]),O=n.useCallback(()=>{T.current=N.current=!1,u.current={x:0,y:0},c.current&&s.current&&(c.current.style.zIndex="1",s.current.classList.remove("k-layout-item-hint-resize"),I(!1));const e=d();e&&(e.style.transform="translate(0px, 0px)",e.style.transition=`transform ${Y}ms cubic-bezier(0.2, 0, 0, 1) 0s`,e.style.marginRight="0px",e.style.marginLeft="0px",e.style.height="100%",e.classList.remove("k-cursor-grabbing"),m&&e.classList.add("k-cursor-move")),t.onRelease()},[t,m,d]),U=n.useCallback((e,r)=>{if(r.end){O();return}if(!c.current||!s.current)return;const i=e.clientX,a=e.clientY;N.current=!0;const f=(r.direction!=="ns"?i-P.current.x:0)*(b?-1:1),l=r.direction!=="ew"?a-P.current.y:0,R=d();if(R&&(b?R.style.marginLeft=-f+"px":R.style.marginRight=-f+"px",R.style.height=`calc(100% + ${l}px)`),s.current.classList.add("k-layout-item-hint-resize"),S.current)return;let g=0,y=0;const k=c.current.getBoundingClientRect();f>k.width/t.defaultPosition.colSpan/3&&(g=1),f<-k.width/t.defaultPosition.colSpan/1.25&&(g=-1),l>k.height/t.defaultPosition.rowSpan/3&&(y=1),l<-k.height/t.defaultPosition.rowSpan/1.25&&(y=-1),(g!==0||y!==0)&&t.update(t.index,0,0,y,g)},[b,t,O,d]),q=n.useCallback(e=>{var a;const r=d();if(!r)return;if(P.current={x:e.event.clientX,y:e.event.clientY},$.current=!1,(a=t.ignoreDrag)!=null&&a.call(t,e.event.originalEvent)){$.current=!0;return}c.current&&(c.current.style.zIndex="10",I(!0)),r.classList.remove("k-cursor-move"),r.classList.add("k-cursor-grabbing");const i=r.getBoundingClientRect();L.current={x:e.event.clientX-i.x,y:e.event.clientY-i.y},t.onPress()},[t,d]),W=n.useCallback(e=>{var R;if($.current)return;const r=d();if(e.event.originalEvent.defaultPrevented||!r)return;T.current=!0,e.event.originalEvent.preventDefault();const i=r.getBoundingClientRect();if(u.current={x:e.event.clientX-i.x-L.current.x+u.current.x,y:e.event.clientY-i.y-L.current.y+u.current.y},r.style.transform=`translate(${u.current.x}px, ${u.current.y}px)`,r.style.transition="transform 0s",S.current)return;let a=0,f=0;u.current.y>.7*i.height/t.defaultPosition.rowSpan&&(f=1),u.current.y<.7*-i.height/t.defaultPosition.rowSpan&&(f=-1),u.current.x>.7*i.width/t.defaultPosition.colSpan&&(a=1),u.current.x<.7*-i.width/t.defaultPosition.colSpan&&(a=-1),t.update(t.index,f,b?-a:a,0,0);const l=(R=c.current)==null?void 0:R.closest(".k-tilelayout");if(l&&s.current){const g=l.getBoundingClientRect(),y=C.getScrollbarWidth()||50;e.event.clientX<g.left-y||e.event.clientX>g.right-y||e.event.clientY<g.top||e.event.clientY>g.bottom?s.current.style.display="none":s.current.style.display="block"}},[t,b,d]);n.useEffect(()=>{c.current&&(getComputedStyle(c.current).direction==="rtl"&&j(!0),s.current&&(s.current.style.height=c.current.offsetHeight+"px",s.current.style.width=c.current.offsetWidth+"px"))},[]),n.useLayoutEffect(()=>{const e=d();if(!e)return;const r=e.getBoundingClientRect(),i=w.current;if(!(i!=null&&i.width)){w.current=r,x.current=t;return}if(N.current){const l=r.width-i.width;if(b){const y=parseFloat(e.style.marginLeft||"0");e.style.marginLeft=y-l+"px"}else{const y=parseFloat(e.style.marginRight||"0");e.style.marginRight=y+l+"px"}P.current.x+=b?-l:l;const R=r.height-i.height,g=parseFloat(e.style.height.substring(12));e.style.height=`calc(100% + ${g+R}px)`,P.current.y+=R}const a=i.left-r.left,f=i.top-r.top;if(a===0&&f===0){w.current=r,x.current=t;return}if(T.current){(x.current.defaultPosition.order!==t.defaultPosition.order||x.current.defaultPosition.col!==t.defaultPosition.col)&&(u.current.x=0,u.current.y=0,e.style.transform="",A()),w.current=r,x.current=t;return}if(Math.abs(f)<15&&Math.abs(a)<15){w.current=r,x.current=t;return}requestAnimationFrame(()=>{const l=c.current;l&&(l.style.transform=`translate(${a}px, ${f}px)`,l.style.transition="transform 0s",requestAnimationFrame(()=>{l.style.transform="",l.style.transition=`transform ${Y}ms cubic-bezier(0.2, 0, 0, 1) 0s`}))}),w.current=r,x.current=t}),C.canUseDOM&&clearTimeout&&typeof clearTimeout=="function"&&(clearTimeout(S.current),S.current=window.setTimeout(()=>{S.current=void 0},200));const h=t.defaultPosition,_={gridColumnStart:h.col,gridColumnEnd:`span ${h.colSpan}`,gridRowStart:h.row,gridRowEnd:`span ${h.rowSpan}`,outline:"none",order:h.order,display:"block",...t.hintStyle},K={gridColumnStart:h.col,gridColumnEnd:`span ${h.colSpan}`,gridRowStart:h.row,gridRowEnd:`span ${h.rowSpan}`,order:h.order},V=n.createElement("div",{role:"listitem",tabIndex:0,"aria-labelledby":typeof t.header=="string"?t.header:`tile-${t.index}`,"aria-keyshortcuts":"Enter",className:C.classNames("k-tilelayout-item k-card",{"k-cursor-move":m},t.className),style:{height:"100%",...K,...t.style},onMouseDown:p,onMouseUp:F},t.children,n.createElement(J.ResizeHandlers,{onPress:q,onResize:U,resizable:v,rtl:b}));return n.createElement(n.Fragment,null,H&&n.createElement("div",{ref:e=>{s.current=e},style:{position:"fixed",..._},className:C.classNames("k-layout-item-hint",t.hintClassName)}),n.createElement(C.Draggable,{ref:e=>{z.current=e,c.current=e?e.element:null},onDrag:m?W:void 0,onRelease:m?O:void 0,onPress:m?q:void 0},V))};D.propTypes={update:o.func.isRequired,index:o.number.isRequired,defaultPosition:o.object.isRequired,ignoreDrag:o.func,onPress:o.func.isRequired,onRelease:o.func.isRequired,children:o.node,style:o.object,className:o.string,hintStyle:o.object,hintClassName:o.string,header:o.any,body:o.any,item:o.any,resizable:o.oneOf(["horizontal","vertical",!0,!1]),reorderable:o.bool};D.displayName="KendoTileLayoutItem";D.defaultProps=M;exports.InternalTile=D;
|