@progress/kendo-vue-layout 7.0.0-develop.4 → 7.0.0-develop.6
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/dist/cdn/js/kendo-vue-layout.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/drawer/Drawer.mjs +21 -20
- package/drawer/DrawerNavigation.js +1 -1
- package/drawer/DrawerNavigation.mjs +28 -25
- package/index.d.mts +6 -0
- package/index.d.ts +6 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -9
- package/panelbar/PanelBar.js +1 -1
- package/panelbar/PanelBar.mjs +44 -42
- package/tabstrip/TabStrip.js +1 -1
- package/tabstrip/TabStrip.mjs +49 -46
- package/tilelayout/TileLayout.js +1 -1
- package/tilelayout/TileLayout.mjs +62 -59
package/tabstrip/TabStrip.mjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { TabStripNavigation as
|
|
8
|
+
import { defineComponent as f, createVNode as n, h as T } from "vue";
|
|
9
|
+
import { TabStripNavigation as l } from "./TabStripNavigation.mjs";
|
|
10
10
|
import { TabStripContent as k } from "./TabStripContent.mjs";
|
|
11
|
-
import { classNames as v, kendoThemeMaps as y, WatermarkOverlay as S, Keys as
|
|
12
|
-
import { packageMetadata as
|
|
13
|
-
const
|
|
11
|
+
import { classNames as v, kendoThemeMaps as y, WatermarkOverlay as S, Keys as s, validatePackage as w, shouldShowValidationUI as x, getLicenseMessage as N, templateRendering as h, getListeners as d, getDefaultSlots as $ } from "@progress/kendo-vue-common";
|
|
12
|
+
import { packageMetadata as r } from "../package-metadata.mjs";
|
|
13
|
+
const C = /* @__PURE__ */ f({
|
|
14
14
|
name: "KendoTabStrip",
|
|
15
15
|
emits: {
|
|
16
16
|
select: null
|
|
@@ -44,13 +44,14 @@ const R = /* @__PURE__ */ g({
|
|
|
44
44
|
return {
|
|
45
45
|
currentShowAll: !0,
|
|
46
46
|
currentTabs: [],
|
|
47
|
-
showLicenseWatermark: !1
|
|
47
|
+
showLicenseWatermark: !1,
|
|
48
|
+
licenseMessage: void 0
|
|
48
49
|
};
|
|
49
50
|
},
|
|
50
51
|
computed: {
|
|
51
52
|
compTabs() {
|
|
52
53
|
return this.tabs !== void 0 ? this.tabs.map(function(t) {
|
|
53
|
-
const e =
|
|
54
|
+
const e = h.call(this, t.content, d.call(this)), a = h.call(this, t.titleRender, d.call(this));
|
|
54
55
|
return {
|
|
55
56
|
...t,
|
|
56
57
|
content: e,
|
|
@@ -68,13 +69,13 @@ const R = /* @__PURE__ */ g({
|
|
|
68
69
|
},
|
|
69
70
|
created() {
|
|
70
71
|
this.keyBinding = {
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
}, w(
|
|
72
|
+
[s.left]: () => this.prevNavigatableTab(),
|
|
73
|
+
[s.right]: () => this.nextNavigatableTab(),
|
|
74
|
+
[s.down]: () => this.nextNavigatableTab(),
|
|
75
|
+
[s.up]: () => this.prevNavigatableTab(),
|
|
76
|
+
[s.home]: () => 0,
|
|
77
|
+
[s.end]: () => this.compTabs.length - 1
|
|
78
|
+
}, w(r), this.showLicenseWatermark = x(r), this.licenseMessage = N(r);
|
|
78
79
|
},
|
|
79
80
|
watch: {
|
|
80
81
|
selected(t, e) {
|
|
@@ -85,7 +86,7 @@ const R = /* @__PURE__ */ g({
|
|
|
85
86
|
},
|
|
86
87
|
methods: {
|
|
87
88
|
addRenderTitle(t, e) {
|
|
88
|
-
const a = this.compTabs.findIndex((
|
|
89
|
+
const a = this.compTabs.findIndex((i) => i.tabId === t);
|
|
89
90
|
this.compTabs[a].titleRender = e;
|
|
90
91
|
},
|
|
91
92
|
addTab(t) {
|
|
@@ -103,23 +104,23 @@ const R = /* @__PURE__ */ g({
|
|
|
103
104
|
onKeyDown(t) {
|
|
104
105
|
let e;
|
|
105
106
|
switch (t.keyCode) {
|
|
106
|
-
case
|
|
107
|
-
e = this.keyBinding[this.invertKeys(
|
|
107
|
+
case s.left:
|
|
108
|
+
e = this.keyBinding[this.invertKeys(s.left, s.right)];
|
|
108
109
|
break;
|
|
109
|
-
case
|
|
110
|
-
e = this.keyBinding[this.invertKeys(
|
|
110
|
+
case s.right:
|
|
111
|
+
e = this.keyBinding[this.invertKeys(s.right, s.left)];
|
|
111
112
|
break;
|
|
112
|
-
case
|
|
113
|
-
e = this.keyBinding[
|
|
113
|
+
case s.up:
|
|
114
|
+
e = this.keyBinding[s.up];
|
|
114
115
|
break;
|
|
115
|
-
case
|
|
116
|
-
e = this.keyBinding[
|
|
116
|
+
case s.down:
|
|
117
|
+
e = this.keyBinding[s.down];
|
|
117
118
|
break;
|
|
118
|
-
case
|
|
119
|
-
e = this.keyBinding[
|
|
119
|
+
case s.home:
|
|
120
|
+
e = this.keyBinding[s.home];
|
|
120
121
|
break;
|
|
121
|
-
case
|
|
122
|
-
e = this.keyBinding[
|
|
122
|
+
case s.end:
|
|
123
|
+
e = this.keyBinding[s.end];
|
|
123
124
|
break;
|
|
124
125
|
}
|
|
125
126
|
e && (t.preventDefault(), this.onSelect(e()));
|
|
@@ -150,10 +151,10 @@ const R = /* @__PURE__ */ g({
|
|
|
150
151
|
if (a < 0)
|
|
151
152
|
return this.lastNavigatableTab();
|
|
152
153
|
if (t)
|
|
153
|
-
for (let
|
|
154
|
-
if (!this.compTabs[
|
|
155
|
-
return
|
|
156
|
-
if (
|
|
154
|
+
for (let i = a; i > -1; i--) {
|
|
155
|
+
if (!this.compTabs[i].disabled)
|
|
156
|
+
return i;
|
|
157
|
+
if (i === 0)
|
|
157
158
|
return this.lastNavigatableTab();
|
|
158
159
|
}
|
|
159
160
|
},
|
|
@@ -164,10 +165,10 @@ const R = /* @__PURE__ */ g({
|
|
|
164
165
|
if (a >= t)
|
|
165
166
|
return this.firstNavigatableTab();
|
|
166
167
|
if (t)
|
|
167
|
-
for (let
|
|
168
|
-
if (!this.compTabs[
|
|
169
|
-
return
|
|
170
|
-
if (
|
|
168
|
+
for (let i = a; i < t; i++) {
|
|
169
|
+
if (!this.compTabs[i].disabled)
|
|
170
|
+
return i;
|
|
171
|
+
if (i + 1 === t)
|
|
171
172
|
return this.firstNavigatableTab();
|
|
172
173
|
}
|
|
173
174
|
}
|
|
@@ -177,38 +178,40 @@ const R = /* @__PURE__ */ g({
|
|
|
177
178
|
tabPosition: t,
|
|
178
179
|
size: e,
|
|
179
180
|
tabIndex: a = 0
|
|
180
|
-
} = this.$props,
|
|
181
|
+
} = this.$props, i = t === "bottom", c = v("k-widget", "k-pos-relative", "k-tabstrip", {
|
|
181
182
|
[`k-tabstrip-${y.sizeMap[e] || e}`]: e,
|
|
182
183
|
"k-tabstrip-left": t === "left",
|
|
183
184
|
"k-tabstrip-right": t === "right",
|
|
184
185
|
"k-tabstrip-bottom": t === "bottom",
|
|
185
186
|
"k-tabstrip-top": t === "top"
|
|
186
|
-
}), b = this.showLicenseWatermark ? n(S,
|
|
187
|
+
}), b = this.showLicenseWatermark ? n(S, {
|
|
188
|
+
message: this.licenseMessage
|
|
189
|
+
}, null) : null, p = function(m) {
|
|
187
190
|
const {
|
|
188
|
-
selected:
|
|
189
|
-
} = m,
|
|
190
|
-
index:
|
|
191
|
+
selected: o
|
|
192
|
+
} = m, g = $(this), u = {
|
|
193
|
+
index: o,
|
|
191
194
|
animation: this.$props.animation,
|
|
192
195
|
tabs: this.compTabs,
|
|
193
196
|
hasTabs: this.tabs !== void 0,
|
|
194
|
-
selected:
|
|
197
|
+
selected: o,
|
|
195
198
|
showAll: this.currentShowAll
|
|
196
199
|
};
|
|
197
200
|
return T(k, {
|
|
198
|
-
...
|
|
199
|
-
},
|
|
201
|
+
...u
|
|
202
|
+
}, g);
|
|
200
203
|
};
|
|
201
204
|
return n("div", {
|
|
202
205
|
dir: this.$props.dir,
|
|
203
206
|
class: c
|
|
204
|
-
}, [!
|
|
207
|
+
}, [!i && n(l, {
|
|
205
208
|
tabs: this.compTabs,
|
|
206
209
|
selected: this.$props.selected,
|
|
207
210
|
tabAlignment: this.$props.tabAlignment,
|
|
208
211
|
onSelect: this.onSelect,
|
|
209
212
|
onKeydown: this.onKeyDown,
|
|
210
213
|
tabIndex: a
|
|
211
|
-
}, null), p.call(this, this.$props),
|
|
214
|
+
}, null), p.call(this, this.$props), i && n(l, {
|
|
212
215
|
tabs: this.compTabs,
|
|
213
216
|
tabAlignment: this.$props.tabAlignment,
|
|
214
217
|
selected: this.$props.selected,
|
|
@@ -219,5 +222,5 @@ const R = /* @__PURE__ */ g({
|
|
|
219
222
|
}
|
|
220
223
|
});
|
|
221
224
|
export {
|
|
222
|
-
|
|
225
|
+
C as TabStrip
|
|
223
226
|
};
|
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 n=require("vue"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("@progress/kendo-vue-common"),f=require("../package-metadata.js"),k=require("./Tile.js"),S={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"},$=n.defineComponent({name:"KendoTileLayout",props:{id:String,dir:String,gap:Object,columns:Number,columnWidth:[Number,String],rowHeight:[Number,String],dataItemKey:String,items:Array,positions:Array,autoFlow:{type:String,default:"column",validator:function(t){return["column","row","column dense","row dense","unset"].includes(t)}},ignoreDrag:Function},created(){o.validatePackage(f.packageMetadata),this.showLicenseWatermark=o.shouldShowValidationUI(f.packageMetadata),this.licenseMessage=o.getLicenseMessage(f.packageMetadata)},data(){return{currentPositions:[],showLicenseWatermark:!1,licenseMessage:void 0}},computed:{compPositions(){return this.positions?this.positions.map((t,s)=>Object.assign({order:s,rowSpan:1,colSpan:1},t)):this.items&&this.currentPositions.length?this.currentPositions.map((t,s)=>Object.assign({order:s,rowSpan:1,colSpan:1},t)):(this.$props.items||[]).map((t,s)=>Object.assign({order:s,rowSpan:1,colSpan:1},t.defaultPosition))},wrapperClass(){const{autoFlow:t}=this.$props;return{"k-tilelayout":!0,"k-pos-relative":!0,[S[t]]:!0}}},render(){const{columns:t=3,columnWidth:s="1fr",gap:r,rowHeight:i="1fr",items:p=[]}=this.$props,h=r?`${typeof r.rows=="number"?r.rows+"px":r.rows} ${typeof r.columns=="number"?r.columns+"px":r.columns}`:16,l={gridTemplateColumns:`repeat(${t}, minmax(0px, ${typeof s=="number"?s+"px":s}))`,gridAutoRows:`minmax(0px, ${typeof i=="number"?i+"px":i})`,gap:h,padding:h},c=this.showLicenseWatermark?n.createVNode(o.WatermarkOverlay,{message:this.licenseMessage},null):null;return n.createVNode("div",{dir:this.$props.dir,class:this.wrapperClass,style:l,id:this.$props.id,role:"list"},[p.map(function(e,a){const d=e&&e.id||o.guid(),u=o.templateRendering.call(this,e.item,o.getListeners.call(this)),g=o.getTemplate.call(this,{h:n.h,template:u,defaultRendering:null,additionalProps:{tile:e,index:a}}),m=o.templateRendering.call(this,e.header,o.getListeners.call(this)),y=o.getTemplate.call(this,{h:n.h,template:m,defaultRendering:null,additionalProps:{tile:e,index:a,id:d,headerText:e.headerText}}),b=o.templateRendering.call(this,e.body,o.getListeners.call(this)),w=o.getTemplate.call(this,{h:n.h,template:b,defaultRendering:null,additionalProps:{tile:e,index:a,bodyText:e.bodyText}});return n.createVNode(k.Tile,{key:this.$props.dataItemKey?o.getter(this.$props.dataItemKey)(e):a,onUpdate:this.updateHandle,defaultPosition:this.compPositions[a],index:a,resizable:e.resizable,reorderable:e.reorderable,style:e.style,class:e.class,tile:e,hintClass:e.hintClass,hintStyle:e.hintStyle,ignoreDrag:this.$props.ignoreDrag,"aria-describedby":d,"tab-index":e.tabIndex},{default:()=>[e.item?g:[n.createVNode("div",{class:"k-tilelayout-item-header k-card-header"},[e.header?y:n.createVNode("h5",{class:"k-card-title",id:d},[e.headerText])]),n.createVNode("div",{class:"k-tilelayout-item-body k-card-body"},[e.body?w:e.bodyText])]]})},this),c])},methods:{focus(){this.$el&&this.$el.focus()},updateHandle(t,s,r,i=0,p=0,h){if(s===0&&r===0&&!p&&!i)return;let l=!1;const c=this.compPositions.map(m=>Object.assign({},m)),e=c[t],a=c.find(m=>m.order===e.order+s);a&&a!==e&&(e.order+=s,a.order+=-s,l=!0);const d=e.col+r;r!==0&&d>=1&&d+e.colSpan<=(this.$props.columns||3)+1&&(e.col=d,l=!0);const u=e.colSpan+p;p&&u>=1&&u+e.col<=(this.$props.columns||3)+1&&(e.colSpan=u,l=!0);const g=e.rowSpan+i;i&&g>=1&&(e.rowSpan=g,l=!0),l&&(this.currentPositions=c,h&&this.$emit("tileresize",{value:c,index:t,rowSpan:i,colSpan:p}),this.$emit("reposition",{value:c,index:t,row:s,col:r}))}}});exports.TileLayout=$;
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as P, createVNode as p, h as g } from "vue";
|
|
9
|
-
import { WatermarkOverlay as T, guid as x, templateRendering as f, getListeners as y, getTemplate as w, getter as
|
|
9
|
+
import { WatermarkOverlay as T, guid as x, templateRendering as f, getListeners as y, getTemplate as w, getter as L, validatePackage as v, shouldShowValidationUI as W, getLicenseMessage as C } from "@progress/kendo-vue-common";
|
|
10
10
|
import { packageMetadata as b } from "../package-metadata.mjs";
|
|
11
|
-
import { Tile as
|
|
12
|
-
const
|
|
11
|
+
import { Tile as I } from "./Tile.mjs";
|
|
12
|
+
const j = {
|
|
13
13
|
column: "k-grid-flow-col",
|
|
14
14
|
row: "k-grid-flow-row",
|
|
15
15
|
"column dense": "k-grid-flow-col-dense",
|
|
@@ -30,120 +30,123 @@ const I = {
|
|
|
30
30
|
autoFlow: {
|
|
31
31
|
type: String,
|
|
32
32
|
default: "column",
|
|
33
|
-
validator: function(
|
|
34
|
-
return ["column", "row", "column dense", "row dense", "unset"].includes(
|
|
33
|
+
validator: function(t) {
|
|
34
|
+
return ["column", "row", "column dense", "row dense", "unset"].includes(t);
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
ignoreDrag: Function
|
|
38
38
|
},
|
|
39
39
|
created() {
|
|
40
|
-
|
|
40
|
+
v(b), this.showLicenseWatermark = W(b), this.licenseMessage = C(b);
|
|
41
41
|
},
|
|
42
42
|
data() {
|
|
43
43
|
return {
|
|
44
44
|
currentPositions: [],
|
|
45
|
-
showLicenseWatermark: !1
|
|
45
|
+
showLicenseWatermark: !1,
|
|
46
|
+
licenseMessage: void 0
|
|
46
47
|
};
|
|
47
48
|
},
|
|
48
49
|
computed: {
|
|
49
50
|
compPositions() {
|
|
50
|
-
return this.positions ? this.positions.map((
|
|
51
|
-
order:
|
|
51
|
+
return this.positions ? this.positions.map((t, s) => Object.assign({
|
|
52
|
+
order: s,
|
|
52
53
|
rowSpan: 1,
|
|
53
54
|
colSpan: 1
|
|
54
|
-
},
|
|
55
|
-
order:
|
|
55
|
+
}, t)) : this.items && this.currentPositions.length ? this.currentPositions.map((t, s) => Object.assign({
|
|
56
|
+
order: s,
|
|
56
57
|
rowSpan: 1,
|
|
57
58
|
colSpan: 1
|
|
58
|
-
},
|
|
59
|
-
order:
|
|
59
|
+
}, t)) : (this.$props.items || []).map((t, s) => Object.assign({
|
|
60
|
+
order: s,
|
|
60
61
|
rowSpan: 1,
|
|
61
62
|
colSpan: 1
|
|
62
|
-
},
|
|
63
|
+
}, t.defaultPosition));
|
|
63
64
|
},
|
|
64
65
|
wrapperClass() {
|
|
65
66
|
const {
|
|
66
|
-
autoFlow:
|
|
67
|
+
autoFlow: t
|
|
67
68
|
} = this.$props;
|
|
68
69
|
return {
|
|
69
70
|
"k-tilelayout": !0,
|
|
70
71
|
"k-pos-relative": !0,
|
|
71
|
-
[
|
|
72
|
+
[j[t]]: !0
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
},
|
|
75
76
|
render() {
|
|
76
77
|
const {
|
|
77
|
-
columns:
|
|
78
|
-
columnWidth:
|
|
79
|
-
gap:
|
|
78
|
+
columns: t = 3,
|
|
79
|
+
columnWidth: s = "1fr",
|
|
80
|
+
gap: o,
|
|
80
81
|
rowHeight: i = "1fr",
|
|
81
82
|
items: c = []
|
|
82
|
-
} = this.$props, m =
|
|
83
|
-
gridTemplateColumns: `repeat(${
|
|
83
|
+
} = this.$props, m = o ? `${typeof o.rows == "number" ? o.rows + "px" : o.rows} ${typeof o.columns == "number" ? o.columns + "px" : o.columns}` : 16, n = {
|
|
84
|
+
gridTemplateColumns: `repeat(${t}, minmax(0px, ${typeof s == "number" ? s + "px" : s}))`,
|
|
84
85
|
gridAutoRows: `minmax(0px, ${typeof i == "number" ? i + "px" : i})`,
|
|
85
86
|
gap: m,
|
|
86
87
|
padding: m
|
|
87
|
-
}, a = this.showLicenseWatermark ? p(T,
|
|
88
|
+
}, a = this.showLicenseWatermark ? p(T, {
|
|
89
|
+
message: this.licenseMessage
|
|
90
|
+
}, null) : null;
|
|
88
91
|
return p("div", {
|
|
89
92
|
dir: this.$props.dir,
|
|
90
93
|
class: this.wrapperClass,
|
|
91
94
|
style: n,
|
|
92
95
|
id: this.$props.id,
|
|
93
96
|
role: "list"
|
|
94
|
-
}, [c.map(function(
|
|
95
|
-
const l =
|
|
97
|
+
}, [c.map(function(e, r) {
|
|
98
|
+
const l = e && e.id || x(), d = f.call(this, e.item, y.call(this)), h = w.call(this, {
|
|
96
99
|
h: g,
|
|
97
100
|
template: d,
|
|
98
101
|
defaultRendering: null,
|
|
99
102
|
additionalProps: {
|
|
100
|
-
tile:
|
|
103
|
+
tile: e,
|
|
101
104
|
index: r
|
|
102
105
|
}
|
|
103
|
-
}), u = f.call(this,
|
|
106
|
+
}), u = f.call(this, e.header, y.call(this)), S = w.call(this, {
|
|
104
107
|
h: g,
|
|
105
108
|
template: u,
|
|
106
109
|
defaultRendering: null,
|
|
107
110
|
additionalProps: {
|
|
108
|
-
tile:
|
|
111
|
+
tile: e,
|
|
109
112
|
index: r,
|
|
110
113
|
id: l,
|
|
111
|
-
headerText:
|
|
114
|
+
headerText: e.headerText
|
|
112
115
|
}
|
|
113
|
-
}), k = f.call(this,
|
|
116
|
+
}), k = f.call(this, e.body, y.call(this)), $ = w.call(this, {
|
|
114
117
|
h: g,
|
|
115
118
|
template: k,
|
|
116
119
|
defaultRendering: null,
|
|
117
120
|
additionalProps: {
|
|
118
|
-
tile:
|
|
121
|
+
tile: e,
|
|
119
122
|
index: r,
|
|
120
|
-
bodyText:
|
|
123
|
+
bodyText: e.bodyText
|
|
121
124
|
}
|
|
122
125
|
});
|
|
123
|
-
return p(
|
|
124
|
-
key: this.$props.dataItemKey ?
|
|
126
|
+
return p(I, {
|
|
127
|
+
key: this.$props.dataItemKey ? L(this.$props.dataItemKey)(e) : r,
|
|
125
128
|
onUpdate: this.updateHandle,
|
|
126
129
|
defaultPosition: this.compPositions[r],
|
|
127
130
|
index: r,
|
|
128
|
-
resizable:
|
|
129
|
-
reorderable:
|
|
130
|
-
style:
|
|
131
|
-
class:
|
|
132
|
-
tile:
|
|
133
|
-
hintClass:
|
|
134
|
-
hintStyle:
|
|
131
|
+
resizable: e.resizable,
|
|
132
|
+
reorderable: e.reorderable,
|
|
133
|
+
style: e.style,
|
|
134
|
+
class: e.class,
|
|
135
|
+
tile: e,
|
|
136
|
+
hintClass: e.hintClass,
|
|
137
|
+
hintStyle: e.hintStyle,
|
|
135
138
|
ignoreDrag: this.$props.ignoreDrag,
|
|
136
139
|
"aria-describedby": l,
|
|
137
|
-
"tab-index":
|
|
140
|
+
"tab-index": e.tabIndex
|
|
138
141
|
}, {
|
|
139
|
-
default: () => [
|
|
142
|
+
default: () => [e.item ? h : [p("div", {
|
|
140
143
|
class: "k-tilelayout-item-header k-card-header"
|
|
141
|
-
}, [
|
|
144
|
+
}, [e.header ? S : p("h5", {
|
|
142
145
|
class: "k-card-title",
|
|
143
146
|
id: l
|
|
144
|
-
}, [
|
|
147
|
+
}, [e.headerText])]), p("div", {
|
|
145
148
|
class: "k-tilelayout-item-body k-card-body"
|
|
146
|
-
}, [
|
|
149
|
+
}, [e.body ? $ : e.bodyText])]]
|
|
147
150
|
});
|
|
148
151
|
}, this), a]);
|
|
149
152
|
},
|
|
@@ -151,27 +154,27 @@ const I = {
|
|
|
151
154
|
focus() {
|
|
152
155
|
this.$el && this.$el.focus();
|
|
153
156
|
},
|
|
154
|
-
updateHandle(
|
|
155
|
-
if (
|
|
157
|
+
updateHandle(t, s, o, i = 0, c = 0, m) {
|
|
158
|
+
if (s === 0 && o === 0 && !c && !i)
|
|
156
159
|
return;
|
|
157
160
|
let n = !1;
|
|
158
|
-
const a = this.compPositions.map((u) => Object.assign({}, u)),
|
|
159
|
-
r && r !==
|
|
160
|
-
const l =
|
|
161
|
-
|
|
162
|
-
const d =
|
|
163
|
-
c && d >= 1 && d +
|
|
164
|
-
const h =
|
|
165
|
-
i && h >= 1 && (
|
|
161
|
+
const a = this.compPositions.map((u) => Object.assign({}, u)), e = a[t], r = a.find((u) => u.order === e.order + s);
|
|
162
|
+
r && r !== e && (e.order += s, r.order += -s, n = !0);
|
|
163
|
+
const l = e.col + o;
|
|
164
|
+
o !== 0 && l >= 1 && l + e.colSpan <= (this.$props.columns || 3) + 1 && (e.col = l, n = !0);
|
|
165
|
+
const d = e.colSpan + c;
|
|
166
|
+
c && d >= 1 && d + e.col <= (this.$props.columns || 3) + 1 && (e.colSpan = d, n = !0);
|
|
167
|
+
const h = e.rowSpan + i;
|
|
168
|
+
i && h >= 1 && (e.rowSpan = h, n = !0), n && (this.currentPositions = a, m && this.$emit("tileresize", {
|
|
166
169
|
value: a,
|
|
167
|
-
index:
|
|
170
|
+
index: t,
|
|
168
171
|
rowSpan: i,
|
|
169
172
|
colSpan: c
|
|
170
173
|
}), this.$emit("reposition", {
|
|
171
174
|
value: a,
|
|
172
|
-
index:
|
|
173
|
-
row:
|
|
174
|
-
col:
|
|
175
|
+
index: t,
|
|
176
|
+
row: s,
|
|
177
|
+
col: o
|
|
175
178
|
}));
|
|
176
179
|
}
|
|
177
180
|
}
|