@progress/kendo-react-layout 9.5.0-develop.6 → 10.0.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/actionsheet/ActionSheet.js +1 -1
- package/actionsheet/ActionSheet.mjs +8 -10
- package/appbar/AppBar.js +1 -1
- package/appbar/AppBar.mjs +12 -14
- package/bottomnavigation/BottomNavigation.js +1 -1
- package/bottomnavigation/BottomNavigation.mjs +30 -32
- package/bottomnavigation/BottomNavigationItem.js +1 -1
- package/bottomnavigation/BottomNavigationItem.mjs +28 -30
- package/breadcrumb/Breadcrumb.js +1 -1
- package/breadcrumb/Breadcrumb.mjs +25 -27
- package/breadcrumb/BreadcrumbDelimiter.js +1 -1
- package/breadcrumb/BreadcrumbDelimiter.mjs +14 -16
- package/breadcrumb/BreadcrumbLink.js +1 -1
- package/breadcrumb/BreadcrumbLink.mjs +25 -27
- package/breadcrumb/BreadcrumbListItem.js +1 -1
- package/breadcrumb/BreadcrumbListItem.mjs +12 -14
- package/breadcrumb/BreadcrumbOrderedList.js +1 -1
- package/breadcrumb/BreadcrumbOrderedList.mjs +25 -27
- package/card/Avatar.js +1 -1
- package/card/Avatar.mjs +16 -17
- package/card/Card.js +1 -1
- package/card/Card.mjs +7 -9
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/drawer/Drawer.mjs +34 -36
- package/drawer/DrawerNavigation.js +1 -1
- package/drawer/DrawerNavigation.mjs +60 -64
- package/expansionpanel/ExpansionPanel.js +1 -1
- package/expansionpanel/ExpansionPanel.mjs +45 -47
- package/gridlayout/GridLayout.js +1 -1
- package/gridlayout/GridLayout.mjs +19 -21
- package/gridlayout/GridLayoutItem.js +1 -1
- package/gridlayout/GridLayoutItem.mjs +6 -8
- package/index.d.mts +1 -4
- package/index.d.ts +1 -4
- package/menu/components/Menu.js +1 -1
- package/menu/components/Menu.mjs +25 -26
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/panelbar/PanelBar.js +1 -1
- package/panelbar/PanelBar.mjs +46 -48
- package/splitter/Splitter.js +1 -1
- package/splitter/Splitter.mjs +64 -63
- package/stacklayout/StackLayout.js +1 -1
- package/stacklayout/StackLayout.mjs +4 -6
- package/stepper/Stepper.js +1 -1
- package/stepper/Stepper.mjs +35 -37
- package/tabstrip/TabStrip.js +1 -1
- package/tabstrip/TabStrip.mjs +31 -33
- package/tilelayout/TileLayout.js +1 -1
- package/tilelayout/TileLayout.mjs +47 -48
- package/timeline/Timeline.js +1 -1
- package/timeline/Timeline.mjs +21 -19
package/tabstrip/TabStrip.mjs
CHANGED
|
@@ -5,22 +5,21 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as d from "react";
|
|
9
9
|
import r from "prop-types";
|
|
10
|
-
import { TabStripNavigation as
|
|
11
|
-
import { TabStripContent as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
const p = class p extends c.Component {
|
|
10
|
+
import { TabStripNavigation as f } from "./TabStripNavigation.mjs";
|
|
11
|
+
import { TabStripContent as S } from "./TabStripContent.mjs";
|
|
12
|
+
import { Navigation as g, classNames as v, kendoThemeMaps as x } from "@progress/kendo-react-common";
|
|
13
|
+
const p = class p extends d.Component {
|
|
15
14
|
constructor(l) {
|
|
16
|
-
super(l), this.tabStripRef =
|
|
15
|
+
super(l), this.tabStripRef = d.createRef(), this.itemsNavRef = d.createRef(), this.onScroll = () => {
|
|
17
16
|
const i = this.horizontalScroll(), o = this.itemsNavRef.current;
|
|
18
17
|
if (!o)
|
|
19
18
|
return;
|
|
20
|
-
const e = o.scrollLeft, t = o.clientWidth, n = o.scrollWidth, s = o.scrollTop,
|
|
21
|
-
let
|
|
22
|
-
const
|
|
23
|
-
|
|
19
|
+
const e = o.scrollLeft, t = o.clientWidth, n = o.scrollWidth, s = o.scrollTop, c = o.scrollHeight, h = o.clientHeight;
|
|
20
|
+
let a = null;
|
|
21
|
+
const m = i ? n > t : c > h, b = this.props.dir === "rtl";
|
|
22
|
+
m ? i ? e + t === n || (b && t - e) === n ? a = "end" : e === 0 || b && -e === 0 ? a = "start" : e > 0 && e + t < n || -e > 0 && t - e < n ? a = "middle" : a = null : c - (s + h) === 0 ? a = "bottom" : s === 0 ? a = "top" : s > 0 && c - (s + h) > 0 ? a = "middle" : a = null : a = null, this.setState({ containerScrollPosition: a });
|
|
24
23
|
}, this.handleResize = () => {
|
|
25
24
|
this.onScroll();
|
|
26
25
|
}, this.onSelect = (i) => {
|
|
@@ -33,11 +32,11 @@ const p = class p extends c.Component {
|
|
|
33
32
|
const o = this.children();
|
|
34
33
|
o && o[i].props.disabled || this.onSelect(i);
|
|
35
34
|
}, this.renderContent = (i) => {
|
|
36
|
-
const { selected: o, children: e, tabContentStyle: t } = i, n =
|
|
37
|
-
return o < n && o > -1 ? /* @__PURE__ */
|
|
38
|
-
},
|
|
35
|
+
const { selected: o, children: e, tabContentStyle: t } = i, n = d.Children.count(e);
|
|
36
|
+
return o < n && o > -1 ? /* @__PURE__ */ d.createElement(S, { index: o, ...i, style: t }) : null;
|
|
37
|
+
}, this.state = {
|
|
39
38
|
containerScrollPosition: null
|
|
40
|
-
}, this.itemsNavRef =
|
|
39
|
+
}, this.itemsNavRef = d.createRef();
|
|
41
40
|
}
|
|
42
41
|
get contentPanelId() {
|
|
43
42
|
return this.props.id + "-content-panel-id";
|
|
@@ -49,7 +48,7 @@ const p = class p extends c.Component {
|
|
|
49
48
|
componentDidMount() {
|
|
50
49
|
var o;
|
|
51
50
|
const l = this.tabStripRef.current, i = l && getComputedStyle(l).direction === "rtl" || !1;
|
|
52
|
-
l && (this.navigation = new
|
|
51
|
+
l && (this.navigation = new g({
|
|
53
52
|
tabIndex: 0,
|
|
54
53
|
root: this.tabStripRef,
|
|
55
54
|
rovingTabIndex: !0,
|
|
@@ -59,23 +58,23 @@ const p = class p extends c.Component {
|
|
|
59
58
|
keydown: {
|
|
60
59
|
ArrowLeft: (e, t, n) => {
|
|
61
60
|
n.preventDefault();
|
|
62
|
-
const s = t.elements.indexOf(e),
|
|
63
|
-
i ? (t.focusNext(e), this.onKeyboardSelect(
|
|
61
|
+
const s = t.elements.indexOf(e), c = s !== 0 ? s - 1 : t.elements.length - 1, h = s !== t.elements.length - 1 ? s + 1 : 0;
|
|
62
|
+
i ? (t.focusNext(e), this.onKeyboardSelect(h)) : (t.focusPrevious(e), this.onKeyboardSelect(c));
|
|
64
63
|
},
|
|
65
64
|
ArrowRight: (e, t, n) => {
|
|
66
65
|
n.preventDefault();
|
|
67
|
-
const s = t.elements.indexOf(e),
|
|
68
|
-
i ? (t.focusPrevious(e), this.onKeyboardSelect(
|
|
66
|
+
const s = t.elements.indexOf(e), c = s !== 0 ? s - 1 : t.elements.length - 1, h = s !== t.elements.length - 1 ? s + 1 : 0;
|
|
67
|
+
i ? (t.focusPrevious(e), this.onKeyboardSelect(c)) : (t.focusNext(e), this.onKeyboardSelect(h));
|
|
69
68
|
},
|
|
70
69
|
ArrowDown: (e, t, n) => {
|
|
71
70
|
n.preventDefault();
|
|
72
|
-
const s = t.elements.indexOf(e),
|
|
73
|
-
t.focusNext(e), this.onKeyboardSelect(
|
|
71
|
+
const s = t.elements.indexOf(e), c = s !== t.elements.length - 1 ? s + 1 : 0;
|
|
72
|
+
t.focusNext(e), this.onKeyboardSelect(c);
|
|
74
73
|
},
|
|
75
74
|
ArrowUp: (e, t, n) => {
|
|
76
75
|
n.preventDefault();
|
|
77
|
-
const s = t.elements.indexOf(e),
|
|
78
|
-
t.focusPrevious(e), this.onKeyboardSelect(
|
|
76
|
+
const s = t.elements.indexOf(e), c = s !== 0 ? s - 1 : t.elements.length - 1;
|
|
77
|
+
t.focusPrevious(e), this.onKeyboardSelect(c);
|
|
79
78
|
},
|
|
80
79
|
Home: (e, t, n) => {
|
|
81
80
|
n.preventDefault(), t.focusElement(t.first, e), this.onKeyboardSelect(0);
|
|
@@ -85,7 +84,7 @@ const p = class p extends c.Component {
|
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
|
-
}), (o = this.navigation) == null || o.initializeRovingTab(this.props.selected), this.onScroll(), this.resizeObserver = new ResizeObserver(() => this.onScroll()), this.tabStripRef.current && this.resizeObserver.observe(this.tabStripRef.current));
|
|
87
|
+
}), (o = this.navigation) == null || o.initializeRovingTab(this.props.selected), this.onScroll(), this.resizeObserver = window.ResizeObserver && new ResizeObserver(() => this.onScroll()), this.tabStripRef.current && this.resizeObserver && this.resizeObserver.observe(this.tabStripRef.current));
|
|
89
88
|
}
|
|
90
89
|
/** @hidden */
|
|
91
90
|
componentWillUnmount() {
|
|
@@ -111,10 +110,10 @@ const p = class p extends c.Component {
|
|
|
111
110
|
onScroll: this.onScroll,
|
|
112
111
|
containerScrollPosition: this.state.containerScrollPosition,
|
|
113
112
|
scrollButtons: this.props.scrollButtons === "hidden" || this.state.containerScrollPosition === null && this.props.scrollButtons === "auto" ? "hidden" : "visible"
|
|
114
|
-
}, { scrollable: i, scrollButtons: o, size: e, tabPosition: t, tabIndex: n } = l, s = t === "bottom",
|
|
113
|
+
}, { scrollable: i, scrollButtons: o, size: e, tabPosition: t, tabIndex: n } = l, s = t === "bottom", c = v(
|
|
115
114
|
"k-tabstrip k-pos-relative",
|
|
116
115
|
{
|
|
117
|
-
[`k-tabstrip-${
|
|
116
|
+
[`k-tabstrip-${x.sizeMap[e] || e}`]: e,
|
|
118
117
|
"k-tabstrip-left": t === "left",
|
|
119
118
|
"k-tabstrip-right": t === "right",
|
|
120
119
|
"k-tabstrip-bottom": t === "bottom",
|
|
@@ -126,25 +125,24 @@ const p = class p extends c.Component {
|
|
|
126
125
|
},
|
|
127
126
|
this.props.className
|
|
128
127
|
);
|
|
129
|
-
return /* @__PURE__ */
|
|
128
|
+
return /* @__PURE__ */ d.createElement(
|
|
130
129
|
"div",
|
|
131
130
|
{
|
|
132
131
|
id: this.props.id,
|
|
133
132
|
ref: this.tabStripRef,
|
|
134
133
|
dir: this.props.dir,
|
|
135
|
-
className:
|
|
134
|
+
className: c,
|
|
136
135
|
style: this.props.style,
|
|
137
136
|
onScroll: this.onScroll,
|
|
138
137
|
onResize: this.handleResize
|
|
139
138
|
},
|
|
140
|
-
!s && /* @__PURE__ */
|
|
139
|
+
!s && /* @__PURE__ */ d.createElement(f, { ...l, tabIndex: n }),
|
|
141
140
|
this.renderContent(l),
|
|
142
|
-
s && /* @__PURE__ */
|
|
143
|
-
this.showLicenseWatermark && /* @__PURE__ */ c.createElement(P, null)
|
|
141
|
+
s && /* @__PURE__ */ d.createElement(f, { ...l, tabIndex: n })
|
|
144
142
|
);
|
|
145
143
|
}
|
|
146
144
|
children() {
|
|
147
|
-
return
|
|
145
|
+
return d.Children.toArray(this.props.children).filter((l) => l);
|
|
148
146
|
}
|
|
149
147
|
};
|
|
150
148
|
p.propTypes = {
|
package/tilelayout/TileLayout.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 w=require("react"),t=require("prop-types"),y=require("@progress/kendo-react-common"),S=require("./InternalTile.js");function k(d){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const s in d)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(d,s);Object.defineProperty(o,s,n.get?n:{enumerable:!0,get:()=>d[s]})}}return o.default=d,Object.freeze(o)}const a=k(w),N={column:"k-grid-flow-col",row:"k-grid-flow-row","column dense":"k-grid-flow-col-dense","row dense":"k-grid-flow-row-dense",unset:"k-grid-flow-unset"},h=class h extends a.Component{constructor(){super(...arguments),this._element=null,this.state={positions:(this.props.items||[]).map((o,s)=>Object.assign({order:s,rowSpan:1,colSpan:1},o.defaultPosition))},this.focus=()=>{this._element&&this._element.focus()},this.update=(o,s,n,r=0,l=0)=>{if(s===0&&n===0&&!l&&!r)return;let c=!1;const p=this.state.positions.map(f=>Object.assign({},f)),i=p[o],m=p.find(f=>f.order===i.order+s);m&&m!==i&&(i.order+=s,m.order+=-s,c=!0);const g=i.col+n;n!==0&&g>=1&&g+i.colSpan<=(this.props.columns||3)+1&&(i.col=g,c=!0);const e=i.colSpan+l;l&&e>=1&&e+i.col<=(this.props.columns||3)+1&&(i.colSpan=e,c=!0);const u=i.rowSpan+r;r&&u>=1&&(i.rowSpan=u,c=!0),c&&(this.setState({positions:p}),y.dispatchEvent(this.props.onReposition,{},this,{value:p}))}}get element(){return this._element}static getDerivedStateFromProps(o,s){return o.positions?{positions:o.positions.map((n,r)=>Object.assign({order:r,rowSpan:1,colSpan:1},n))}:o.items&&(!s.positions||o.items.length!==s.positions.length)?{positions:o.items.map((n,r)=>Object.assign({order:r,rowSpan:1,colSpan:1},n.defaultPosition))}:null}render(){const{className:o,columns:s=3,columnWidth:n="1fr",gap:r,rowHeight:l="1fr",style:c,autoFlow:p="column",items:i=[]}=this.props,m=r?`${typeof r.rows=="number"?r.rows+"px":r.rows} ${typeof r.columns=="number"?r.columns+"px":r.columns}`:16,g={gridTemplateColumns:`repeat(${s}, minmax(0px, ${typeof n=="number"?n+"px":n}))`,gridAutoRows:`minmax(0px, ${typeof l=="number"?l+"px":l})`,gap:m,padding:m,...c};return a.createElement("div",{ref:e=>{this._element=e},dir:this.props.dir,className:y.classNames("k-tilelayout k-pos-relative",N[p],o),style:g,id:this.props.id,children:i.map((e,u)=>a.createElement(a.Fragment,{key:this.props.dataItemKey?y.getter(this.props.dataItemKey)(e):u},a.createElement(S.InternalTile,{update:this.update,defaultPosition:this.state.positions[u],index:u,resizable:e.resizable,reorderable:e.reorderable,style:e.style,className:e.className,hintClassName:e.hintClassName,hintStyle:e.hintStyle,ignoreDrag:this.props.ignoreDrag},e.item?e.item:a.createElement(a.Fragment,null,a.createElement("div",{className:"k-tilelayout-item-header k-card-header"},a.isValidElement(e.header)?e.header:a.createElement("h5",{className:"k-card-title"},e.header)),a.createElement("div",{className:"k-tilelayout-item-body k-card-body"},e.body)))))})}};h.propTypes={id:t.string,style:t.object,className:t.string,dir:t.string,gap:t.object,columns:t.number,columnWidth:t.oneOfType([t.number,t.string]),rowHeight:t.oneOfType([t.number,t.string]),dataItemKey:t.string,items:t.array,positions:t.array,autoFlow:t.oneOf(["column","row","column dense","row dense","unset"]),onReposition:t.func,ignoreDrag:t.func},h.displayName="KendoTileLayout";let b=h;exports.TileLayout=b;
|
|
@@ -5,38 +5,37 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as a from "react";
|
|
9
9
|
import t from "prop-types";
|
|
10
|
-
import { dispatchEvent as
|
|
11
|
-
import { InternalTile as
|
|
12
|
-
|
|
13
|
-
const O = {
|
|
10
|
+
import { dispatchEvent as y, classNames as w, getter as b } from "@progress/kendo-react-common";
|
|
11
|
+
import { InternalTile as S } from "./InternalTile.mjs";
|
|
12
|
+
const k = {
|
|
14
13
|
column: "k-grid-flow-col",
|
|
15
14
|
row: "k-grid-flow-row",
|
|
16
15
|
"column dense": "k-grid-flow-col-dense",
|
|
17
16
|
"row dense": "k-grid-flow-row-dense",
|
|
18
17
|
unset: "k-grid-flow-unset"
|
|
19
|
-
}, h = class h extends
|
|
20
|
-
constructor(
|
|
21
|
-
super(
|
|
18
|
+
}, h = class h extends a.Component {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments), this._element = null, this.state = {
|
|
22
21
|
positions: (this.props.items || []).map(
|
|
23
|
-
(
|
|
22
|
+
(r, n) => Object.assign({ order: n, rowSpan: 1, colSpan: 1 }, r.defaultPosition)
|
|
24
23
|
)
|
|
25
|
-
}, this.
|
|
24
|
+
}, this.focus = () => {
|
|
26
25
|
this._element && this._element.focus();
|
|
27
|
-
}, this.update = (
|
|
28
|
-
if (
|
|
26
|
+
}, this.update = (r, n, i, s = 0, l = 0) => {
|
|
27
|
+
if (n === 0 && i === 0 && !l && !s)
|
|
29
28
|
return;
|
|
30
29
|
let m = !1;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
}
|
|
30
|
+
const p = this.state.positions.map((g) => Object.assign({}, g)), o = p[r], c = p.find((g) => g.order === o.order + n);
|
|
31
|
+
c && c !== o && (o.order += n, c.order += -n, m = !0);
|
|
32
|
+
const d = o.col + i;
|
|
33
|
+
i !== 0 && d >= 1 && d + o.colSpan <= (this.props.columns || 3) + 1 && (o.col = d, m = !0);
|
|
34
|
+
const e = o.colSpan + l;
|
|
35
|
+
l && e >= 1 && e + o.col <= (this.props.columns || 3) + 1 && (o.colSpan = e, m = !0);
|
|
36
|
+
const u = o.rowSpan + s;
|
|
37
|
+
s && u >= 1 && (o.rowSpan = u, m = !0), m && (this.setState({ positions: p }), y(this.props.onReposition, {}, this, { value: p }));
|
|
38
|
+
};
|
|
40
39
|
}
|
|
41
40
|
/**
|
|
42
41
|
* Gets the HTML element of the TileLayout component.
|
|
@@ -47,48 +46,48 @@ const O = {
|
|
|
47
46
|
/**
|
|
48
47
|
* @hidden
|
|
49
48
|
*/
|
|
50
|
-
static getDerivedStateFromProps(
|
|
51
|
-
return
|
|
52
|
-
positions:
|
|
53
|
-
} :
|
|
54
|
-
positions:
|
|
55
|
-
(
|
|
49
|
+
static getDerivedStateFromProps(r, n) {
|
|
50
|
+
return r.positions ? {
|
|
51
|
+
positions: r.positions.map((i, s) => Object.assign({ order: s, rowSpan: 1, colSpan: 1 }, i))
|
|
52
|
+
} : r.items && (!n.positions || r.items.length !== n.positions.length) ? {
|
|
53
|
+
positions: r.items.map(
|
|
54
|
+
(i, s) => Object.assign({ order: s, rowSpan: 1, colSpan: 1 }, i.defaultPosition)
|
|
56
55
|
)
|
|
57
56
|
} : null;
|
|
58
57
|
}
|
|
59
58
|
render() {
|
|
60
59
|
const {
|
|
61
|
-
className:
|
|
62
|
-
columns:
|
|
63
|
-
columnWidth:
|
|
60
|
+
className: r,
|
|
61
|
+
columns: n = 3,
|
|
62
|
+
columnWidth: i = "1fr",
|
|
64
63
|
gap: s,
|
|
65
64
|
rowHeight: l = "1fr",
|
|
66
|
-
style:
|
|
67
|
-
autoFlow:
|
|
68
|
-
items:
|
|
69
|
-
} = this.props,
|
|
70
|
-
gridTemplateColumns: `repeat(${
|
|
65
|
+
style: m,
|
|
66
|
+
autoFlow: p = "column",
|
|
67
|
+
items: o = []
|
|
68
|
+
} = this.props, c = s ? `${typeof s.rows == "number" ? s.rows + "px" : s.rows} ${typeof s.columns == "number" ? s.columns + "px" : s.columns}` : 16, d = {
|
|
69
|
+
gridTemplateColumns: `repeat(${n}, minmax(0px, ${typeof i == "number" ? i + "px" : i}))`,
|
|
71
70
|
gridAutoRows: `minmax(0px, ${typeof l == "number" ? l + "px" : l})`,
|
|
72
|
-
gap:
|
|
73
|
-
padding:
|
|
74
|
-
...
|
|
71
|
+
gap: c,
|
|
72
|
+
padding: c,
|
|
73
|
+
...m
|
|
75
74
|
};
|
|
76
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ a.createElement(
|
|
77
76
|
"div",
|
|
78
77
|
{
|
|
79
78
|
ref: (e) => {
|
|
80
79
|
this._element = e;
|
|
81
80
|
},
|
|
82
81
|
dir: this.props.dir,
|
|
83
|
-
className:
|
|
82
|
+
className: w("k-tilelayout k-pos-relative", k[p], r),
|
|
84
83
|
style: d,
|
|
85
84
|
id: this.props.id,
|
|
86
|
-
children:
|
|
87
|
-
|
|
85
|
+
children: o.map((e, u) => /* @__PURE__ */ a.createElement(a.Fragment, { key: this.props.dataItemKey ? b(this.props.dataItemKey)(e) : u }, /* @__PURE__ */ a.createElement(
|
|
86
|
+
S,
|
|
88
87
|
{
|
|
89
88
|
update: this.update,
|
|
90
|
-
defaultPosition: this.state.positions[
|
|
91
|
-
index:
|
|
89
|
+
defaultPosition: this.state.positions[u],
|
|
90
|
+
index: u,
|
|
92
91
|
resizable: e.resizable,
|
|
93
92
|
reorderable: e.reorderable,
|
|
94
93
|
style: e.style,
|
|
@@ -97,8 +96,8 @@ const O = {
|
|
|
97
96
|
hintStyle: e.hintStyle,
|
|
98
97
|
ignoreDrag: this.props.ignoreDrag
|
|
99
98
|
},
|
|
100
|
-
e.item ? e.item : /* @__PURE__ */
|
|
101
|
-
)
|
|
99
|
+
e.item ? e.item : /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", { className: "k-tilelayout-item-header k-card-header" }, a.isValidElement(e.header) ? e.header : /* @__PURE__ */ a.createElement("h5", { className: "k-card-title" }, e.header)), /* @__PURE__ */ a.createElement("div", { className: "k-tilelayout-item-body k-card-body" }, e.body))
|
|
100
|
+
)))
|
|
102
101
|
}
|
|
103
102
|
);
|
|
104
103
|
}
|
|
@@ -119,7 +118,7 @@ h.propTypes = {
|
|
|
119
118
|
onReposition: t.func,
|
|
120
119
|
ignoreDrag: t.func
|
|
121
120
|
}, h.displayName = "KendoTileLayout";
|
|
122
|
-
let
|
|
121
|
+
let f = h;
|
|
123
122
|
export {
|
|
124
|
-
|
|
123
|
+
f as TileLayout
|
|
125
124
|
};
|
package/timeline/Timeline.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 v=require("react"),T=require("prop-types"),o=require("@progress/kendo-react-common"),M=require("./TimelineHorizontal.js"),h=require("./TimelineVertical.js"),E=require("../package-metadata.js");function O(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return n.default=e,Object.freeze(n)}const t=O(v),f=e=>{const n=!o.validatePackage(E.packageMetadata,{component:"Timeline"}),a={alterMode:!1,collapsibleEvents:!1,dateFormat:"MMM dd, yyyy",...e},{collapsibleEvents:i,transitionDuration:c,className:k,alterMode:s,navigatable:m,horizontal:r,events:u,dateFormat:d,onChange:g,onActionClick:p}=a,[b,y]=t.useState(),l=t.useRef(null);return t.useEffect(()=>{l.current&&y(l.current.offsetWidth)},[]),t.createElement("div",{ref:l,className:o.classNames("k-timeline",{"k-timeline-collapsible":i,"k-timeline-vertical":!r,"k-timeline-alternating":s,"k-timeline-horizontal":r},k),style:{width:`${b}px`}},r?t.createElement(M.TimelineHorizontal,{navigatable:m,eventsData:u,dateFormat:d,transitionDuration:c,onActionClick:p}):t.createElement(h.TimelineVertical,{navigatable:m,eventsData:u,dateFormat:d,alterMode:s,collapsibleEvents:i,transitionDuration:c,onChange:g,onActionClick:p}),n&&t.createElement(o.WatermarkOverlay,null))};f.propTypes={className:T.string};exports.Timeline=f;
|
package/timeline/Timeline.mjs
CHANGED
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import
|
|
10
|
-
import { classNames as
|
|
11
|
-
import { TimelineHorizontal as
|
|
12
|
-
import { TimelineVertical as
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
import h from "prop-types";
|
|
10
|
+
import { validatePackage as y, classNames as E, WatermarkOverlay as T } from "@progress/kendo-react-common";
|
|
11
|
+
import { TimelineHorizontal as g } from "./TimelineHorizontal.mjs";
|
|
12
|
+
import { TimelineVertical as M } from "./TimelineVertical.mjs";
|
|
13
|
+
import { packageMetadata as W } from "../package-metadata.mjs";
|
|
14
|
+
const b = (c) => {
|
|
15
|
+
const p = !y(W, { component: "Timeline" }), f = {
|
|
15
16
|
alterMode: !1,
|
|
16
17
|
collapsibleEvents: !1,
|
|
17
18
|
dateFormat: "MMM dd, yyyy",
|
|
@@ -19,22 +20,22 @@ const T = (c) => {
|
|
|
19
20
|
}, {
|
|
20
21
|
collapsibleEvents: i,
|
|
21
22
|
transitionDuration: r,
|
|
22
|
-
className:
|
|
23
|
+
className: d,
|
|
23
24
|
alterMode: n,
|
|
24
25
|
navigatable: l,
|
|
25
26
|
horizontal: t,
|
|
26
27
|
events: o,
|
|
27
28
|
dateFormat: s,
|
|
28
|
-
onChange:
|
|
29
|
+
onChange: k,
|
|
29
30
|
onActionClick: m
|
|
30
|
-
} =
|
|
31
|
+
} = f, [v, u] = e.useState(), a = e.useRef(null);
|
|
31
32
|
return e.useEffect(() => {
|
|
32
33
|
a.current && u(a.current.offsetWidth);
|
|
33
34
|
}, []), /* @__PURE__ */ e.createElement(
|
|
34
35
|
"div",
|
|
35
36
|
{
|
|
36
37
|
ref: a,
|
|
37
|
-
className:
|
|
38
|
+
className: E(
|
|
38
39
|
"k-timeline",
|
|
39
40
|
{
|
|
40
41
|
"k-timeline-collapsible": i,
|
|
@@ -42,12 +43,12 @@ const T = (c) => {
|
|
|
42
43
|
"k-timeline-alternating": n,
|
|
43
44
|
"k-timeline-horizontal": t
|
|
44
45
|
},
|
|
45
|
-
|
|
46
|
+
d
|
|
46
47
|
),
|
|
47
|
-
style: { width: `${
|
|
48
|
+
style: { width: `${v}px` }
|
|
48
49
|
},
|
|
49
50
|
t ? /* @__PURE__ */ e.createElement(
|
|
50
|
-
|
|
51
|
+
g,
|
|
51
52
|
{
|
|
52
53
|
navigatable: l,
|
|
53
54
|
eventsData: o,
|
|
@@ -56,7 +57,7 @@ const T = (c) => {
|
|
|
56
57
|
onActionClick: m
|
|
57
58
|
}
|
|
58
59
|
) : /* @__PURE__ */ e.createElement(
|
|
59
|
-
|
|
60
|
+
M,
|
|
60
61
|
{
|
|
61
62
|
navigatable: l,
|
|
62
63
|
eventsData: o,
|
|
@@ -64,15 +65,16 @@ const T = (c) => {
|
|
|
64
65
|
alterMode: n,
|
|
65
66
|
collapsibleEvents: i,
|
|
66
67
|
transitionDuration: r,
|
|
67
|
-
onChange:
|
|
68
|
+
onChange: k,
|
|
68
69
|
onActionClick: m
|
|
69
70
|
}
|
|
70
|
-
)
|
|
71
|
+
),
|
|
72
|
+
p && /* @__PURE__ */ e.createElement(T, null)
|
|
71
73
|
);
|
|
72
74
|
};
|
|
73
|
-
|
|
74
|
-
className:
|
|
75
|
+
b.propTypes = {
|
|
76
|
+
className: h.string
|
|
75
77
|
};
|
|
76
78
|
export {
|
|
77
|
-
|
|
79
|
+
b as Timeline
|
|
78
80
|
};
|