@progress/kendo-vue-scheduler 10.0.0-develop.1 → 10.0.1-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/dist/cdn/js/kendo-vue-scheduler.js +1 -1
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +31 -28
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/slots/SchedulerEditSlot.js +1 -1
- package/slots/SchedulerEditSlot.mjs +5 -5
package/hooks/useSlotExpand.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 c=require("../views/common/utils.js"),H=require("../constants/main.js"),a=require("@progress/kendo-vue-common"),T=6,O=(t,B,i)=>{let m=0;const u=e=>e.nodeType===8?e.parentElement:e.nodeType===3?e.nextElementSibling:e,f=e=>{const o=t.$props.slotStyle;o&&Object.prototype.hasOwnProperty.call(o,"minHeight")&&(e.style.minHeight=o.minHeight)},S=()=>{if(!t)return;const e=u(t.$el);e&&(f(e),m=e.clientHeight)},y=()=>{if(!i||!t)return;const e=u(t.$el);if(!e||!t.bv.items.length)return;const o=c.getPadding(e);let g=0;const s=t.cSlot.items.filter(n=>n.refTo),h=t.$props.itemsPerSlot,d=h!==void 0?s.filter((n,r)=>r<h):s;d.forEach(n=>{const r=t.bv.items.find(E=>E.uid===n.uid);if(!r)return;const{height:b}=c.getRect(r.getElement());g+=b});let l=a.isObject(i)&&i.offsetBottom?i.offsetBottom:0;if(l>0){const n=e.querySelector(".k-more-events");if(n){const r=parseFloat(window.getComputedStyle(n).bottom)||0;l=n.offsetHeight+r+T}}let p=d.length*H.BORDER_WIDTH*2+g-(o||0)+(a.isObject(i)&&i.offsetTop?i.offsetTop:0)+l;s.length?p>m-o&&c.setRect(e,{height:p},!0):e&&f(e)};S(),y()};exports.useSlotExpand=O;
|
package/hooks/useSlotExpand.mjs
CHANGED
|
@@ -5,49 +5,52 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { getPadding as
|
|
9
|
-
import { BORDER_WIDTH as
|
|
10
|
-
import { isObject as
|
|
11
|
-
const
|
|
8
|
+
import { getPadding as E, getRect as T, setRect as b } from "../views/common/utils.mjs";
|
|
9
|
+
import { BORDER_WIDTH as O } from "../constants/main.mjs";
|
|
10
|
+
import { isObject as d } from "@progress/kendo-vue-common";
|
|
11
|
+
const B = 6, v = (e, x, i) => {
|
|
12
12
|
let l = 0;
|
|
13
|
-
const
|
|
13
|
+
const f = (t) => t.nodeType === 8 ? t.parentElement : t.nodeType === 3 ? t.nextElementSibling : t, c = (t) => {
|
|
14
|
+
const o = e.$props.slotStyle;
|
|
15
|
+
o && Object.prototype.hasOwnProperty.call(o, "minHeight") && (t.style.minHeight = o.minHeight);
|
|
16
|
+
}, a = () => {
|
|
14
17
|
if (!e)
|
|
15
18
|
return;
|
|
16
|
-
const t =
|
|
17
|
-
t && (t
|
|
19
|
+
const t = f(e.$el);
|
|
20
|
+
t && (c(t), l = t.clientHeight);
|
|
18
21
|
}, S = () => {
|
|
19
|
-
if (!
|
|
22
|
+
if (!i || !e)
|
|
20
23
|
return;
|
|
21
|
-
const t =
|
|
24
|
+
const t = f(e.$el);
|
|
22
25
|
if (!t || !e.bv.items.length)
|
|
23
26
|
return;
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
const
|
|
27
|
-
g.forEach((
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
27
|
+
const o = E(t);
|
|
28
|
+
let p = 0;
|
|
29
|
+
const s = e.cSlot.items.filter((n) => n.refTo), h = e.$props.itemsPerSlot, g = h !== void 0 ? s.filter((n, r) => r < h) : s;
|
|
30
|
+
g.forEach((n) => {
|
|
31
|
+
const r = e.bv.items.find((H) => H.uid === n.uid);
|
|
32
|
+
if (!r)
|
|
30
33
|
return;
|
|
31
34
|
const {
|
|
32
35
|
height: y
|
|
33
|
-
} =
|
|
34
|
-
|
|
36
|
+
} = T(r.getElement());
|
|
37
|
+
p += y;
|
|
35
38
|
});
|
|
36
|
-
let
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
const
|
|
41
|
-
|
|
39
|
+
let m = d(i) && i.offsetBottom ? i.offsetBottom : 0;
|
|
40
|
+
if (m > 0) {
|
|
41
|
+
const n = t.querySelector(".k-more-events");
|
|
42
|
+
if (n) {
|
|
43
|
+
const r = parseFloat(window.getComputedStyle(n).bottom) || 0;
|
|
44
|
+
m = n.offsetHeight + r + B;
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
|
-
let u = g.length *
|
|
45
|
-
|
|
47
|
+
let u = g.length * O * 2 + p - (o || 0) + (d(i) && i.offsetTop ? i.offsetTop : 0) + m;
|
|
48
|
+
s.length ? u > l - o && b(t, {
|
|
46
49
|
height: u
|
|
47
|
-
}, !0) : t && (t
|
|
50
|
+
}, !0) : t && c(t);
|
|
48
51
|
};
|
|
49
|
-
|
|
52
|
+
a(), S();
|
|
50
53
|
};
|
|
51
54
|
export {
|
|
52
|
-
|
|
55
|
+
v as useSlotExpand
|
|
53
56
|
};
|
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={name:"@progress/kendo-vue-scheduler",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-scheduler",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1788866997,version:"10.0.1-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "10.0.
|
|
13
|
+
publishDate: 1788866997,
|
|
14
|
+
version: "10.0.1-develop.1",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-scheduler",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1-develop.1",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"@progress/kendo-date-math": "^1.5.13",
|
|
28
28
|
"@progress/kendo-drawing": "^1.20.1",
|
|
29
29
|
"@progress/kendo-licensing": "^1.7.2",
|
|
30
|
-
"@progress/kendo-vue-common": "10.0.
|
|
31
|
-
"@progress/kendo-vue-buttons": "10.0.
|
|
32
|
-
"@progress/kendo-vue-dateinputs": "10.0.
|
|
33
|
-
"@progress/kendo-vue-dialogs": "10.0.
|
|
34
|
-
"@progress/kendo-vue-dropdowns": "10.0.
|
|
35
|
-
"@progress/kendo-vue-form": "10.0.
|
|
36
|
-
"@progress/kendo-vue-inputs": "10.0.
|
|
37
|
-
"@progress/kendo-vue-intl": "10.0.
|
|
38
|
-
"@progress/kendo-vue-popup": "10.0.
|
|
39
|
-
"@progress/kendo-vue-tooltip": "10.0.
|
|
30
|
+
"@progress/kendo-vue-common": "10.0.1-develop.1",
|
|
31
|
+
"@progress/kendo-vue-buttons": "10.0.1-develop.1",
|
|
32
|
+
"@progress/kendo-vue-dateinputs": "10.0.1-develop.1",
|
|
33
|
+
"@progress/kendo-vue-dialogs": "10.0.1-develop.1",
|
|
34
|
+
"@progress/kendo-vue-dropdowns": "10.0.1-develop.1",
|
|
35
|
+
"@progress/kendo-vue-form": "10.0.1-develop.1",
|
|
36
|
+
"@progress/kendo-vue-inputs": "10.0.1-develop.1",
|
|
37
|
+
"@progress/kendo-vue-intl": "10.0.1-develop.1",
|
|
38
|
+
"@progress/kendo-vue-popup": "10.0.1-develop.1",
|
|
39
|
+
"@progress/kendo-vue-tooltip": "10.0.1-develop.1",
|
|
40
40
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
41
41
|
"vue": "^3.0.2"
|
|
42
42
|
},
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"package": {
|
|
62
62
|
"productName": "Kendo UI for Vue",
|
|
63
63
|
"productCode": "KENDOUIVUE",
|
|
64
|
-
"publishDate":
|
|
64
|
+
"publishDate": 1788866997,
|
|
65
65
|
"licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=vue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -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"),i=require("@progress/kendo-vue-common"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),i=require("@progress/kendo-vue-common"),x=require("../constants/main.js"),s=require("../utils/main.js"),T=require("./SchedulerViewSlot.js"),w=require("../hooks/use-slots-selection.js"),A=require("../hooks/use-items-selection.js"),$=require("../hooks/use-items-focus.js"),r=require("../hooks/use-slots-focus.js"),N=require("../hooks/useEditable.js"),F=require("../hooks/useSlotExpand.js");function j(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!n.isVNode(e)}const _=n.defineComponent({name:"KendoSchedulerEditSlot",inheritAttrs:!1,props:{role:String,tabIndex:{type:Number,default:void 0},className:String,form:Object,formItem:Object,refTo:[Function,Object],items:Array,row:Number,group:Object,range:Object,isWorkDay:{type:Boolean,default:!0},isWorkHour:{type:Boolean,default:!0},selected:Boolean,col:Number,index:Number,start:Date,end:Date,zonedStart:Object,zonedEnd:Object,isAllDay:Boolean,expandable:[Boolean,Object],slotRender:[String,Function,Object],viewSlot:[String,Function,Object],navDay:Boolean,editable:[Object,Boolean],itemsPerSlot:Number,onDataaction:Function},created(){this.slot=null,this.editableSlot=null},mounted(){const e=this;this.$nextTick(function(){F.useSlotExpand(e,e.ks.scheduler.$el,e.$props.expandable)})},updated(){const e=this;this.$nextTick(function(){F.useSlotExpand(e,e.ks.scheduler.$el,e.$props.expandable)})},provide(){return{ksEditFormSubmit:this.handleEditFormSubmit,ksEditFormCancel:this.handleEditFormCancel,ksEditFormClose:this.handleEditFormClose}},inject:{bv:{default:null},ks:{default:null},dispatchSelectedItems:{default:null},dispatchFocusedItems:{default:null},dispatchFocusedSlots:{default:null},dispatchSelectedSlots:{default:null},ksSlots:{default:{}}},data(){return{currentFormItem:null}},computed:{cSlot(){return this.ksSlots.cSlots?this.ksSlots.cSlots[this.index]:{}},currentTabIndex(){const e=this.bv.slots.length&&s.compareSlots(this.bv.slots[0].cSlot,this.cSlot);return this.$props.tabIndex!==void 0?this.$props.tabIndex===null?void 0:this.$props.tabIndex:this.bv.selectedSlots.length===0&&e&&this.cSlot.items.length===0?0:void 0},computedEditable(){return N.useEditable(this.$props.editable)},compFormItem(){return this.formItem!==void 0?this.formItem:this.currentFormItem}},render(){const e=i.getDefaultSlots(this),{role:t,viewSlot:o,form:l,formItem:q,items:a,row:I,group:y,range:g,isWorkDay:d,isWorkHour:c,col:k,index:u,start:D,end:C,zonedStart:h,zonedEnd:m,navDay:S,itemsPerSlot:p,className:O}=this.$props,b=this.bv.selectedSlots.some(v=>s.compareSlots(v.cSlot,this.cSlot));let f;const E=n.createVNode(T.SchedulerViewSlot,{role:t,className:O,slotRender:this.$props.slotRender,isAllDay:this.isAllDay,expandable:this.expandable,editable:this.editable,items:a,row:I,group:y,range:g,isWorkDay:d,isWorkHour:c,col:k,index:u,start:D,end:C,zonedStart:h,zonedEnd:m,selected:b,navDay:S,itemsPerSlot:p,tabIndex:this.currentTabIndex,formItem:this.compFormItem,onFocus:this.handleFocus,onDoubleclick:this.handleDoubleClick,onKeydown:this.handleKeyDown,onShowmoreitems:this.handleShowMoreItemsClick},j(e)?e:{default:()=>[e]});return f=i.getTemplate.call(this,{h:n.h,template:this.$props.viewSlot,defaultRendering:E,defaultSlots:e,additionalProps:{...this.cSlot,isAllDay:this.cSlot.isAllDay,expandable:this.expandable,editable:this.editable,items:a,row:this.cSlot.row,group:this.cSlot.group,range:this.cSlot.range,isWorkDay:d,isWorkHour:c,col:this.cSlot.col,index:u,start:this.cSlot.start,end:this.cSlot.end,zonedStart:h,zonedEnd:m,selected:b,navDay:S,itemsPerSlot:p,tabIndex:this.currentTabIndex},additionalListeners:{focus:this.handleFocus,doubleclick:this.handleDoubleClick,keydown:this.handleKeyDown,showmoreitems:this.handleShowMoreItemsClick}}),f},methods:{handleShowMoreItemsClick(e){this.$emit("showmoreitems",e)},createDataItemFromSlot(){const e={};if(s.setField(e,this.ks.fields.start,new Date(this.cSlot.start.getTime())),s.setField(e,this.ks.fields.end,new Date(this.cSlot.end.getTime())),s.setField(e,this.ks.fields.isAllDay,this.cSlot.isAllDay),this.cSlot.group.resources.length)for(let t=0;t<this.cSlot.group.resources.length;t++){const o=this.cSlot.group.resources[t];if(s.isGroupped(this.cSlot.group.resources)){const l=s.getField(this.cSlot.group.resources[t],o.valueField);s.setField(e,o.field,o.multiple?[l]:l)}else s.setField(e,o.field,o.multiple?[]:void 0)}return e},handleFocus(e){this.computedEditable.select&&this.dispatchSelectedSlots({type:w.SLOTS_SELECT_ACTION.select,slot:this},e.event),this.$emit("focus",e)},handleDoubleClick(e){if(this.computedEditable.add){const t=this.createDataItemFromSlot();this.setFormItem(t,e)}this.$emit("doubleclick",e)},handleKeyDown(e){let t,o,l;switch(e.event.keyCode){case i.Keys.left:if(!this.bv.slots)return;e.event.preventDefault(),this.dispatchFocusedSlots({type:r.SLOTS_FOCUS_ACTION.left,slot:this},e.event);break;case i.Keys.right:if(!this.bv.slots)return;e.event.preventDefault(),this.dispatchFocusedSlots({type:r.SLOTS_FOCUS_ACTION.right,slot:this},e.event);break;case i.Keys.up:if(!this.bv.slots)return;e.event.preventDefault(),this.dispatchFocusedSlots({type:r.SLOTS_FOCUS_ACTION.up,slot:this},e.event);break;case i.Keys.down:if(!this.bv.slots)return;e.event.preventDefault(),this.dispatchFocusedSlots({type:r.SLOTS_FOCUS_ACTION.down,slot:this},e.event);break;case i.Keys.enter:if(!this.bv.slots||!this.computedEditable.add)return;l=this.createDataItemFromSlot(),this.setFormItem(l);break;case i.Keys.tab:o=s.findFirstItem(e.target),t=o?s.findCurrentItem(o,this.bv.items,!1):s.getSortedSlots(this.bv.items,this.ignoreIsAllDay)[0],this.dispatchFocusedItems({type:$.ITEMS_FOCUS_ACTION.current,item:t},e.event),this.dispatchSelectedItems({type:A.ITEMS_SELECT_ACTION.select,item:t},e);break}t&&e.event.preventDefault()},handleEditFormSubmit(e){this.$emit("dataaction",{type:x.DATA_ACTION.create,series:!1,dataItem:e.value},e),this.setFormItem(null,e.event)},handleEditFormCancel(e){this.setFormItem(null,e.event)},handleEditFormClose(e){this.setFormItem(null,e)},handleFormItemChange(e,t){this.setFormItem&&this.setFormItem(e,t)},setFormItem(e,t){this.currentFormItem=e,this.$emit("formitemchange",t)}}});exports.SchedulerEditSlot=_;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { defineComponent as C, createVNode as O, h as T, isVNode as $ } from "vue";
|
|
9
9
|
import { Keys as i, getDefaultSlots as A, getTemplate as j } from "@progress/kendo-vue-common";
|
|
10
10
|
import { DATA_ACTION as N } from "../constants/main.mjs";
|
|
11
|
-
import { findFirstItem as _, findCurrentItem as z, getSortedSlots as
|
|
11
|
+
import { findFirstItem as _, findCurrentItem as z, getSortedSlots as W, setField as l, isGroupped as B, getField as R, compareSlots as b } from "../utils/main.mjs";
|
|
12
12
|
import { SchedulerViewSlot as K } from "./SchedulerViewSlot.mjs";
|
|
13
13
|
import { SLOTS_SELECT_ACTION as L } from "../hooks/use-slots-selection.mjs";
|
|
14
14
|
import { ITEMS_SELECT_ACTION as M } from "../hooks/use-items-selection.mjs";
|
|
@@ -181,7 +181,7 @@ const it = /* @__PURE__ */ C({
|
|
|
181
181
|
});
|
|
182
182
|
return f = j.call(this, {
|
|
183
183
|
h: T,
|
|
184
|
-
template: this.$props.
|
|
184
|
+
template: this.$props.viewSlot,
|
|
185
185
|
defaultRendering: v,
|
|
186
186
|
defaultSlots: t,
|
|
187
187
|
additionalProps: {
|
|
@@ -223,8 +223,8 @@ const it = /* @__PURE__ */ C({
|
|
|
223
223
|
if (l(t, this.ks.fields.start, new Date(this.cSlot.start.getTime())), l(t, this.ks.fields.end, new Date(this.cSlot.end.getTime())), l(t, this.ks.fields.isAllDay, this.cSlot.isAllDay), this.cSlot.group.resources.length)
|
|
224
224
|
for (let e = 0; e < this.cSlot.group.resources.length; e++) {
|
|
225
225
|
const s = this.cSlot.group.resources[e];
|
|
226
|
-
if (
|
|
227
|
-
const o =
|
|
226
|
+
if (B(this.cSlot.group.resources)) {
|
|
227
|
+
const o = R(this.cSlot.group.resources[e], s.valueField);
|
|
228
228
|
l(t, s.field, s.multiple ? [o] : o);
|
|
229
229
|
} else
|
|
230
230
|
l(t, s.field, s.multiple ? [] : void 0);
|
|
@@ -285,7 +285,7 @@ const it = /* @__PURE__ */ C({
|
|
|
285
285
|
o = this.createDataItemFromSlot(), this.setFormItem(o);
|
|
286
286
|
break;
|
|
287
287
|
case i.tab:
|
|
288
|
-
s = _(t.target), e = s ? z(s, this.bv.items, !1) :
|
|
288
|
+
s = _(t.target), e = s ? z(s, this.bv.items, !1) : W(this.bv.items, this.ignoreIsAllDay)[0], this.dispatchFocusedItems({
|
|
289
289
|
type: P.current,
|
|
290
290
|
item: e
|
|
291
291
|
}, t.event), this.dispatchSelectedItems({
|