@progress/kendo-vue-scheduler 10.2.0-develop.16 → 10.2.0-develop.18
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/codemods/v11/index.js +8 -0
- package/codemods/v11/scheduler-data-action-prop-rename.js +12 -0
- package/codemods/v11/scheduler-default-behavior-changes.js +12 -0
- package/codemods/v11/scheduler-event-rendering-changes.js +14 -0
- package/components/EventOverviewPopover.js +1 -1
- package/components/EventOverviewPopover.mjs +67 -67
- package/components/SchedulerQuickCreateForm.js +1 -1
- package/components/SchedulerQuickCreateForm.mjs +6 -6
- package/dist/cdn/js/kendo-vue-scheduler.js +1 -1
- package/editors/SchedulerFormEditor.d.ts +79 -52
- package/editors/SchedulerFormEditor.js +1 -1
- package/editors/SchedulerFormEditor.mjs +145 -143
- package/hooks/useRecurrenceSummary.d.ts +1 -1
- package/hooks/useRecurrenceSummary.js +1 -1
- package/hooks/useRecurrenceSummary.mjs +6 -2
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +33 -13
- package/utils/main.d.ts +1 -1
- package/utils/main.js +1 -1
- package/utils/main.mjs +161 -161
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-scheduler",
|
|
3
|
-
"version": "10.2.0-develop.
|
|
3
|
+
"version": "10.2.0-develop.18",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"@progress/kendo-date-math": "^1.5.13",
|
|
28
28
|
"@progress/kendo-drawing": "^1.20.1",
|
|
29
29
|
"@progress/kendo-licensing": "^1.13.0",
|
|
30
|
-
"@progress/kendo-vue-common": "10.2.0-develop.
|
|
31
|
-
"@progress/kendo-vue-buttons": "10.2.0-develop.
|
|
32
|
-
"@progress/kendo-vue-dateinputs": "10.2.0-develop.
|
|
33
|
-
"@progress/kendo-vue-dialogs": "10.2.0-develop.
|
|
34
|
-
"@progress/kendo-vue-dropdowns": "10.2.0-develop.
|
|
35
|
-
"@progress/kendo-vue-form": "10.2.0-develop.
|
|
36
|
-
"@progress/kendo-vue-inputs": "10.2.0-develop.
|
|
37
|
-
"@progress/kendo-vue-intl": "10.2.0-develop.
|
|
38
|
-
"@progress/kendo-vue-labels": "10.2.0-develop.
|
|
39
|
-
"@progress/kendo-vue-popup": "10.2.0-develop.
|
|
40
|
-
"@progress/kendo-vue-tooltip": "10.2.0-develop.
|
|
30
|
+
"@progress/kendo-vue-common": "10.2.0-develop.18",
|
|
31
|
+
"@progress/kendo-vue-buttons": "10.2.0-develop.18",
|
|
32
|
+
"@progress/kendo-vue-dateinputs": "10.2.0-develop.18",
|
|
33
|
+
"@progress/kendo-vue-dialogs": "10.2.0-develop.18",
|
|
34
|
+
"@progress/kendo-vue-dropdowns": "10.2.0-develop.18",
|
|
35
|
+
"@progress/kendo-vue-form": "10.2.0-develop.18",
|
|
36
|
+
"@progress/kendo-vue-inputs": "10.2.0-develop.18",
|
|
37
|
+
"@progress/kendo-vue-intl": "10.2.0-develop.18",
|
|
38
|
+
"@progress/kendo-vue-labels": "10.2.0-develop.18",
|
|
39
|
+
"@progress/kendo-vue-popup": "10.2.0-develop.18",
|
|
40
|
+
"@progress/kendo-vue-tooltip": "10.2.0-develop.18",
|
|
41
41
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
42
42
|
"vue": "^3.0.2"
|
|
43
43
|
},
|
|
@@ -116,13 +116,33 @@
|
|
|
116
116
|
"prompt": false,
|
|
117
117
|
"instructionsOnly": false
|
|
118
118
|
}
|
|
119
|
+
],
|
|
120
|
+
"11": [
|
|
121
|
+
{
|
|
122
|
+
"description": "Flags files affected by the Scheduler event resource color applied through the --kendo-scheduler-event-color variable and the new drag hint and all-day event rendering.",
|
|
123
|
+
"file": "codemods/v11/scheduler-event-rendering-changes",
|
|
124
|
+
"prompt": false,
|
|
125
|
+
"instructionsOnly": true
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"description": "Flags files affected by the new Scheduler eventOverview and quickCreate popovers (enabled by default), the recurring series exception handling and the removed k-scheduler-mobile class.",
|
|
129
|
+
"file": "codemods/v11/scheduler-default-behavior-changes",
|
|
130
|
+
"prompt": false,
|
|
131
|
+
"instructionsOnly": true
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"description": "Flags files that may use the renamed onDataaction callback that the Scheduler passes to its views (now onDataAction), for example custom views.",
|
|
135
|
+
"file": "codemods/v11/scheduler-data-action-prop-rename",
|
|
136
|
+
"prompt": false,
|
|
137
|
+
"instructionsOnly": true
|
|
138
|
+
}
|
|
119
139
|
]
|
|
120
140
|
}
|
|
121
141
|
},
|
|
122
142
|
"package": {
|
|
123
143
|
"productName": "Kendo UI for Vue",
|
|
124
144
|
"productCode": "KENDOUIVUE",
|
|
125
|
-
"publishDate":
|
|
145
|
+
"publishDate": 1793978224,
|
|
126
146
|
"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"
|
|
127
147
|
}
|
|
128
148
|
},
|
package/utils/main.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export declare const isGroupped: (resources: any) => boolean;
|
|
|
58
58
|
*/
|
|
59
59
|
export declare function formatEventTime(intl: IntlService, start: Date, end: Date, isAllDay: boolean, allDayText?: string): string;
|
|
60
60
|
/** @hidden */
|
|
61
|
-
export declare function formatEventSummary(intl: IntlService, start: Date, end: Date, isAllDay: boolean, allDayText: string): string;
|
|
61
|
+
export declare function formatEventSummary(intl: IntlService, start: Date, end: Date, isAllDay: boolean, allDayText: string, timezone?: string): string;
|
|
62
62
|
/**
|
|
63
63
|
* @hidden
|
|
64
64
|
* TODO Move to date-math
|
package/utils/main.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("vue"),m=require("@progress/kendo-date-math"),v=require("../views/common/utils.js"),M=require("@progress/kendo-vue-common"),z=require("@progress/kendo-data-query");var F=(e=>(e[e.add=0]="add",e[e.remove=1]="remove",e))(F||{});const S=new WeakMap,R=e=>{if(!e||typeof document=="undefined"||!document.body||!document.defaultView)return e;const t=document;let r=S.get(t);r||(r=new Map,S.set(t,r),queueMicrotask(()=>S.delete(t)));const s=r.get(e);if(s!==void 0)return s;const n=t.createElement("span");n.className="k-event",Object.assign(n.style,{position:"fixed",visibility:"hidden",pointerEvents:"none",width:"0",height:"0"}),n.style.setProperty("--kendo-scheduler-event-color",e),t.body.append(n);try{const o=t.defaultView.getComputedStyle(n).backgroundColor;return r.set(e,o),o}finally{n.remove()}},B=()=>{const e=I.ref(!1);return I.onMounted(()=>{e.value=!0}),t=>e.value?R(t):t},q=e=>e[0],G=e=>e[e.length-1],N=(e,t,r)=>{const s=m.ZonedDate.fromLocalDate(e,r),n=t.getTime()>e.getTime()?new Date(t.getTime()-1):t,o=m.ZonedDate.fromLocalDate(n,r);return m.getDate(s).getTime()!==m.getDate(o).getTime()},Y=(e,t)=>{var r;return((r=e.range)==null?void 0:r.isAllDay)===!0&&!e.isAllDay&&t.dataset.slotAllday==="true"},O=(e,t,...r)=>{var i;const[s,n]=r,o=s===void 0?[]:[s],c=a=>{var d,u;e.$emit("dataaction",a,...o),(u=(d=e.$props).onDataAction)==null||u.call(d,a,...o),n==null||n()};(i=e.confirmCustomEvents)!=null&&i.call(e,t,c)||c(t)},Z=(e,t)=>{const r=l(e,t.recurrenceId);return r!=null?r:l(e,t.id)},U=(e,t,r)=>e.filter(s=>{const n=l(s,t.recurrenceId);return n!=null&&n===r&&!l(s,t.recurrenceRule)}),V=(e,t)=>{const r=M.clone(e);return p(r,t.recurrenceId,null),p(r,t.recurrenceRule,null),p(r,t.originalStart,null),r},j=e=>{const t=new Set;return e.forEach(r=>{t.add(r.field)}),t.size===e.length};function _(e,t,r,s,n="all day"){const o={skeleton:"yMMMMEEEEdhm"},c={skeleton:"yMMMMEEEEd"},i="t",a=t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()&&t.getDate()===r.getDate();if(s){const d=r.getHours()===0&&r.getMinutes()===0&&r.getSeconds()===0&&r.getTime()-t.getTime()===864e5;return a||d?`${e.formatDate(t,c)} (${n})`:`${e.formatDate(t,c)} to ${e.formatDate(r,c)} (${n})`}return a?`${e.formatDate(t,o)}–${e.formatDate(r,i)}`:`${e.formatDate(t,o)}-${e.formatDate(r,o)}`}function Q(e,t,r,s,n,o){const c={skeleton:"MMMMd"},i="t",a=m.ZonedDate.fromLocalDate(t,o),d=m.ZonedDate.fromLocalDate(r,o),u=d.getHours()===0&&d.getMinutes()===0&&d.getSeconds()===0&&d.getMilliseconds()===0,g=r>t&&u?d.addDays(-1):d,x=a.getFullYear()===g.getFullYear()&&a.getMonth()===g.getMonth()&&a.getDate()===g.getDate(),f=e.formatDate(a,c);if(s)return x?`${f}, ${n}`:`${f} - ${e.formatDate(g,c)}, ${n}`;const T=e.formatDate(a,i),E=e.formatDate(d,i);return x?`${f}, ${T} - ${E}`:`${f}, ${T} - ${e.formatDate(d,c)}, ${E}`}const k=(e,t,r,s=0)=>{if(s===r)return null;let n=null;const o=document.elementFromPoint(e,t);if(!o)return n;if(o.getAttribute("data-slot")==="true")return o;{const i=o.style.pointerEvents;o.style.pointerEvents="none",n=k(e,t,r,s+1),o.style.pointerEvents=i}return n},l=(e,t)=>M.getter(t)(e),p=(e,t,r)=>{if(t)return M.setter(t)(e,r)},W=e=>e!=null;function J(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}const K=(e,t,r)=>{const s=b(e,t)?l(e,t.id):l(e,t.recurrenceId);return r.find(n=>l(n,t.id)===s)},b=(e,t)=>{const r=l(e,t.id),s=l(e,t.recurrenceId),n=l(e,t.recurrenceRule);return!!(r&&n&&s==null)},$=(e,t)=>Math.max(e.getTime(),t.getTime()),A=(e,t)=>Math.min(e.getTime(),t.getTime()),D=(e,t,r,s,n=!1)=>n?$(t,s)-A(e,r)<=t.getTime()-e.getTime()+(s.getTime()-r.getTime()):$(t,s)-A(e,r)<t.getTime()-e.getTime()+(s.getTime()-r.getTime()),C={id:"id",start:"start",startTimezone:"startTimezone",originalStart:"originalStart",end:"end",endTimezone:"endTimezone",isAllDay:"isAllDay",title:"title",description:"description",recurrenceRule:"recurrenceRule",recurrenceId:"recurrenceId",recurrenceExceptions:"recurrenceExceptions",readonly:"readonly"},L=e=>({fields:{...C,...e}}),X=(e,t,r)=>(t.getHours()<e.getHours()||t.getHours()===e.getHours()&&t.getMinutes()<=e.getMinutes())&&(e.getHours()<r.getHours()||r.getHours()===e.getHours()&&e.getMinutes()<r.getMinutes()),ee=(e,t)=>{const r=v.toGroupResources(e,t),s=v.toFlatGroupResources(r);return s.length===1?[{index:0,resources:(t||[]).reduce((n,o)=>[...n,...o.data.map(c=>({...c,field:o.field,valueField:o.valueField,colorField:o.colorField,multiple:o.multiple}))],[])}]:s.map((n,o)=>({index:o,resources:n}))},H=e=>e==null,te=e=>H(e)||e.trim&&e.trim().length===0,y=e=>{let t=0;const r=e.slice();return r.sort((s,n)=>s-n).forEach((s,n)=>{r[n]===n&&(t=n+1)}),t},re=(e,t,r,s=!1)=>{let n;return r.forEach(o=>{const c=[];t.sort((a,d)=>a.$props.start.getTime()-d.$props.start.getTime()).forEach(a=>{if((s||a.$props.isAllDay===o.cSlot.isAllDay)&&a.$props.range.index===o.cSlot.range.index&&a.$props.group.index===o.cSlot.group.index&&D(a.$props.start,a.$props.end,o.cSlot.start,o.cSlot.end)){const u=y(c);a===e&&n===void 0&&(n=u),c.splice(u,0,u)}})}),n},ne=(e,t)=>{const r=new Set;return t.forEach(n=>{n._order!==void 0&&n._order!==null&&r.add(n._order)}),y(Array.from(r))},oe=(e,t,r=!1)=>{e.forEach(n=>{n.order=null}),t.forEach(n=>{const o=n.cSlot?n.cSlot:n;o.items.splice(0,o.items.length)});const s=[...e].sort((n,o)=>n.start.getTime()-o.start.getTime());t.forEach(n=>{const o=n.cSlot?n.cSlot:n,c=[];s.forEach(i=>{if((r||i.isAllDay===o.isAllDay)&&i.range.index===o.range.index&&(i.range.isAllDay===void 0||o.range.isAllDay===void 0||i.range.isAllDay===o.range.isAllDay)&&i.group.index===o.group.index&&D(i.start,i.end,o.start,o.end)){if(i.order!==null&&i.order!==void 0)c.includes(i.order)||(c.push(i.order),c.sort((d,u)=>d-u));else{const d=y(c);i.order=d,c.push(d),c.sort((u,g)=>u-g)}o.items.push(i)}})})},se=(e,t,r=!1)=>{e.forEach(s=>s.slots.splice(0,s.slots.length)),e.forEach(s=>{t.forEach(n=>{const o=n.cSlot?n.cSlot:n;(r||s.isAllDay===o.isAllDay)&&s.range.index===o.range.index&&(s.range.isAllDay===void 0||o.range.isAllDay===void 0||s.range.isAllDay===o.range.isAllDay)&&s.group.index===o.group.index&&D(s.start,s.end,o.start,o.end)&&s.slots.push(n)})})},ce=function(e){return e.props.items.find(r=>r.order===0)||e.props.items[0]},w=(e,t,r)=>!!(e.uid===t.uid&&(e.occurrenceId===void 0||e.occurrenceId===t.occurrenceId)&&e.group.index===t.group.index&&e.range.index===t.range.index&&(r||e.isAllDay===t.isAllDay)),P=(e,t)=>{const r=e.filter(n=>n.element!==null);return z.orderBy(r,[{field:"group.index",dir:"asc"},{field:"range.index",dir:"asc"},t?{field:""}:{field:"isAllDay",dir:"desc"},{field:"start",dir:"asc"}])},ie=(e,t)=>e.start.getTime()===t.start.getTime()&&e.end.getTime()===t.end.getTime()&&e.index===t.index&&e.group.index===t.group.index&&e.range.index===t.range.index&&e.isAllDay===t.isAllDay,h=(e,t,r=!1)=>{const s=e,n=P(t,r);return{currentIndex:n.findIndex(c=>w(c,s,r)),sorted:n}},ae=(e,t,r=!1)=>{if(!e||!t)return null;const{currentIndex:s,sorted:n}=h(e,t,r)||{};return n[s]},de=(e,t,r=!1,s=!1)=>{const{currentIndex:n,sorted:o}=h(e,t,r);return o[n+(s?-1:1)]},ue=(e,t)=>(e.order||0)-(t.order||0);exports.COLLECTION_ACTION=F;exports.calculateOrder=re;exports.calculateProportionalOrder=ne;exports.compareItems=w;exports.compareSlots=ie;exports.crossesDayBoundary=N;exports.defaultModelFields=C;exports.emitDataAction=O;exports.findCurrentItem=ae;exports.findFirstItem=ce;exports.findMaster=K;exports.findMissing=y;exports.findNextItem=de;exports.findSeriesExceptions=U;exports.first=q;exports.formatEventSummary=Q;exports.formatEventTime=_;exports.getCurrentItemIndex=h;exports.getField=l;exports.getModelFields=L;exports.getSchedulerResourceColor=R;exports.getSeriesMasterId=Z;exports.getSortedSlots=P;exports.intersects=D;exports.isBlank=H;exports.isGroupped=j;exports.isInTimeRange=X;exports.isMaster=b;exports.isNullOrEmptyString=te;exports.isPresent=W;exports.isTimedItemOnDaySlot=Y;exports.last=G;exports.mapItemsToSlots=se;exports.mapSlotsToItems=oe;exports.orderSort=ue;exports.setField=p;exports.slotDive=k;exports.toSchedulerGroups=ee;exports.toStandaloneEvent=V;exports.toUTCDateTime=J;exports.useSchedulerResourceColor=B;
|
package/utils/main.mjs
CHANGED
|
@@ -5,96 +5,96 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { ref as
|
|
9
|
-
import {
|
|
10
|
-
import { toGroupResources as
|
|
11
|
-
import { setter as
|
|
12
|
-
import { orderBy as
|
|
13
|
-
var
|
|
14
|
-
const
|
|
8
|
+
import { ref as A, onMounted as I } from "vue";
|
|
9
|
+
import { ZonedDate as m, getDate as E } from "@progress/kendo-date-math";
|
|
10
|
+
import { toGroupResources as F, toFlatGroupResources as R } from "../views/common/utils.mjs";
|
|
11
|
+
import { setter as H, getter as b, clone as k } from "@progress/kendo-vue-common";
|
|
12
|
+
import { orderBy as w } from "@progress/kendo-data-query";
|
|
13
|
+
var z = /* @__PURE__ */ ((e) => (e[e.add = 0] = "add", e[e.remove = 1] = "remove", e))(z || {});
|
|
14
|
+
const p = /* @__PURE__ */ new WeakMap(), B = (e) => {
|
|
15
15
|
if (!e || typeof document == "undefined" || !document.body || !document.defaultView)
|
|
16
16
|
return e;
|
|
17
17
|
const t = document;
|
|
18
|
-
let r =
|
|
19
|
-
r || (r = /* @__PURE__ */ new Map(),
|
|
18
|
+
let r = p.get(t);
|
|
19
|
+
r || (r = /* @__PURE__ */ new Map(), p.set(t, r), queueMicrotask(() => p.delete(t)));
|
|
20
20
|
const s = r.get(e);
|
|
21
21
|
if (s !== void 0)
|
|
22
22
|
return s;
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const n = t.createElement("span");
|
|
24
|
+
n.className = "k-event", Object.assign(n.style, { position: "fixed", visibility: "hidden", pointerEvents: "none", width: "0", height: "0" }), n.style.setProperty("--kendo-scheduler-event-color", e), t.body.append(n);
|
|
25
25
|
try {
|
|
26
|
-
const
|
|
27
|
-
return r.set(e,
|
|
26
|
+
const o = t.defaultView.getComputedStyle(n).backgroundColor;
|
|
27
|
+
return r.set(e, o), o;
|
|
28
28
|
} finally {
|
|
29
|
-
|
|
29
|
+
n.remove();
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
const e =
|
|
33
|
-
return
|
|
31
|
+
}, _ = () => {
|
|
32
|
+
const e = A(!1);
|
|
33
|
+
return I(() => {
|
|
34
34
|
e.value = !0;
|
|
35
|
-
}), (t) => e.value ?
|
|
36
|
-
},
|
|
37
|
-
const s =
|
|
38
|
-
return
|
|
39
|
-
},
|
|
35
|
+
}), (t) => e.value ? B(t) : t;
|
|
36
|
+
}, J = (e) => e[0], K = (e) => e[e.length - 1], Q = (e, t, r) => {
|
|
37
|
+
const s = m.fromLocalDate(e, r), n = t.getTime() > e.getTime() ? new Date(t.getTime() - 1) : t, o = m.fromLocalDate(n, r);
|
|
38
|
+
return E(s).getTime() !== E(o).getTime();
|
|
39
|
+
}, X = (e, t) => {
|
|
40
40
|
var r;
|
|
41
41
|
return ((r = e.range) == null ? void 0 : r.isAllDay) === !0 && !e.isAllDay && t.dataset.slotAllday === "true";
|
|
42
|
-
},
|
|
42
|
+
}, L = (e, t, ...r) => {
|
|
43
43
|
var i;
|
|
44
|
-
const [s,
|
|
45
|
-
var
|
|
46
|
-
e.$emit("dataaction",
|
|
44
|
+
const [s, n] = r, o = s === void 0 ? [] : [s], c = (a) => {
|
|
45
|
+
var u, d;
|
|
46
|
+
e.$emit("dataaction", a, ...o), (d = (u = e.$props).onDataAction) == null || d.call(u, a, ...o), n == null || n();
|
|
47
47
|
};
|
|
48
48
|
(i = e.confirmCustomEvents) != null && i.call(e, t, c) || c(t);
|
|
49
|
-
},
|
|
49
|
+
}, O = (e, t) => {
|
|
50
50
|
const r = l(e, t.recurrenceId);
|
|
51
51
|
return r != null ? r : l(e, t.id);
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
return
|
|
55
|
-
}),
|
|
56
|
-
const r =
|
|
57
|
-
return
|
|
58
|
-
},
|
|
52
|
+
}, ee = (e, t, r) => e.filter((s) => {
|
|
53
|
+
const n = l(s, t.recurrenceId);
|
|
54
|
+
return n != null && n === r && !l(s, t.recurrenceRule);
|
|
55
|
+
}), te = (e, t) => {
|
|
56
|
+
const r = k(e);
|
|
57
|
+
return D(r, t.recurrenceId, null), D(r, t.recurrenceRule, null), D(r, t.originalStart, null), r;
|
|
58
|
+
}, re = (e) => {
|
|
59
59
|
const t = /* @__PURE__ */ new Set();
|
|
60
60
|
return e.forEach((r) => {
|
|
61
61
|
t.add(r.field);
|
|
62
62
|
}), t.size === e.length;
|
|
63
63
|
};
|
|
64
|
-
function
|
|
65
|
-
const
|
|
64
|
+
function ne(e, t, r, s, n = "all day") {
|
|
65
|
+
const o = { skeleton: "yMMMMEEEEdhm" }, c = { skeleton: "yMMMMEEEEd" }, i = "t", a = t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
|
|
66
66
|
if (s) {
|
|
67
|
-
const
|
|
68
|
-
return
|
|
67
|
+
const u = r.getHours() === 0 && r.getMinutes() === 0 && r.getSeconds() === 0 && r.getTime() - t.getTime() === 864e5;
|
|
68
|
+
return a || u ? `${e.formatDate(t, c)} (${n})` : `${e.formatDate(t, c)} to ${e.formatDate(r, c)} (${n})`;
|
|
69
69
|
}
|
|
70
|
-
return
|
|
70
|
+
return a ? `${e.formatDate(t, o)}–${e.formatDate(r, i)}` : `${e.formatDate(t, o)}-${e.formatDate(r, o)}`;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
const
|
|
72
|
+
function oe(e, t, r, s, n, o) {
|
|
73
|
+
const c = { skeleton: "MMMMd" }, i = "t", a = m.fromLocalDate(t, o), u = m.fromLocalDate(r, o), d = u.getHours() === 0 && u.getMinutes() === 0 && u.getSeconds() === 0 && u.getMilliseconds() === 0, g = r > t && d ? u.addDays(-1) : u, M = a.getFullYear() === g.getFullYear() && a.getMonth() === g.getMonth() && a.getDate() === g.getDate(), f = e.formatDate(a, c);
|
|
74
74
|
if (s)
|
|
75
|
-
return
|
|
76
|
-
const
|
|
77
|
-
return
|
|
75
|
+
return M ? `${f}, ${n}` : `${f} - ${e.formatDate(g, c)}, ${n}`;
|
|
76
|
+
const S = e.formatDate(a, i), x = e.formatDate(u, i);
|
|
77
|
+
return M ? `${f}, ${S} - ${x}` : `${f}, ${S} - ${e.formatDate(u, c)}, ${x}`;
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const P = (e, t, r, s = 0) => {
|
|
80
80
|
if (s === r)
|
|
81
81
|
return null;
|
|
82
|
-
let
|
|
83
|
-
const
|
|
84
|
-
if (!
|
|
85
|
-
return o;
|
|
86
|
-
if (n.getAttribute("data-slot") === "true")
|
|
82
|
+
let n = null;
|
|
83
|
+
const o = document.elementFromPoint(e, t);
|
|
84
|
+
if (!o)
|
|
87
85
|
return n;
|
|
86
|
+
if (o.getAttribute("data-slot") === "true")
|
|
87
|
+
return o;
|
|
88
88
|
{
|
|
89
|
-
const i =
|
|
90
|
-
|
|
89
|
+
const i = o.style.pointerEvents;
|
|
90
|
+
o.style.pointerEvents = "none", n = P(e, t, r, s + 1), o.style.pointerEvents = i;
|
|
91
91
|
}
|
|
92
|
-
return
|
|
93
|
-
}, l = (e, t) =>
|
|
92
|
+
return n;
|
|
93
|
+
}, l = (e, t) => b(t)(e), D = (e, t, r) => {
|
|
94
94
|
if (t)
|
|
95
|
-
return
|
|
96
|
-
},
|
|
97
|
-
function
|
|
95
|
+
return H(t)(e, r);
|
|
96
|
+
}, se = (e) => e != null;
|
|
97
|
+
function ce(e) {
|
|
98
98
|
return new Date(Date.UTC(
|
|
99
99
|
e.getFullYear(),
|
|
100
100
|
e.getMonth(),
|
|
@@ -105,13 +105,13 @@ function oe(e) {
|
|
|
105
105
|
e.getMilliseconds()
|
|
106
106
|
));
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
const s =
|
|
110
|
-
return r.find((
|
|
111
|
-
},
|
|
112
|
-
const r = l(e, t.id), s = l(e, t.recurrenceId),
|
|
113
|
-
return !!(r &&
|
|
114
|
-
},
|
|
108
|
+
const ie = (e, t, r) => {
|
|
109
|
+
const s = Y(e, t) ? l(e, t.id) : l(e, t.recurrenceId);
|
|
110
|
+
return r.find((n) => l(n, t.id) === s);
|
|
111
|
+
}, Y = (e, t) => {
|
|
112
|
+
const r = l(e, t.id), s = l(e, t.recurrenceId), n = l(e, t.recurrenceRule);
|
|
113
|
+
return !!(r && n && s == null);
|
|
114
|
+
}, $ = (e, t) => Math.max(e.getTime(), t.getTime()), v = (e, t) => Math.min(e.getTime(), t.getTime()), y = (e, t, r, s, n = !1) => n ? $(t, s) - v(e, r) <= t.getTime() - e.getTime() + (s.getTime() - r.getTime()) : $(t, s) - v(e, r) < t.getTime() - e.getTime() + (s.getTime() - r.getTime()), G = {
|
|
115
115
|
id: "id",
|
|
116
116
|
start: "start",
|
|
117
117
|
startTimezone: "startTimezone",
|
|
@@ -125,81 +125,81 @@ const ne = (e, t, r) => {
|
|
|
125
125
|
recurrenceId: "recurrenceId",
|
|
126
126
|
recurrenceExceptions: "recurrenceExceptions",
|
|
127
127
|
readonly: "readonly"
|
|
128
|
-
},
|
|
129
|
-
const r =
|
|
128
|
+
}, ae = (e) => ({ fields: { ...G, ...e } }), ue = (e, t, r) => (t.getHours() < e.getHours() || t.getHours() === e.getHours() && t.getMinutes() <= e.getMinutes()) && (e.getHours() < r.getHours() || r.getHours() === e.getHours() && e.getMinutes() < r.getMinutes()), de = (e, t) => {
|
|
129
|
+
const r = F(e, t), s = R(r);
|
|
130
130
|
return s.length === 1 ? [{
|
|
131
131
|
index: 0,
|
|
132
132
|
// resources: []
|
|
133
133
|
resources: (t || []).reduce(
|
|
134
|
-
(
|
|
134
|
+
(n, o) => [...n, ...o.data.map((c) => ({
|
|
135
135
|
...c,
|
|
136
|
-
field:
|
|
137
|
-
valueField:
|
|
138
|
-
colorField:
|
|
139
|
-
multiple:
|
|
136
|
+
field: o.field,
|
|
137
|
+
valueField: o.valueField,
|
|
138
|
+
colorField: o.colorField,
|
|
139
|
+
multiple: o.multiple
|
|
140
140
|
}))],
|
|
141
141
|
[]
|
|
142
142
|
)
|
|
143
|
-
}] : s.map((
|
|
144
|
-
index:
|
|
145
|
-
resources:
|
|
143
|
+
}] : s.map((n, o) => ({
|
|
144
|
+
index: o,
|
|
145
|
+
resources: n
|
|
146
146
|
}));
|
|
147
|
-
},
|
|
147
|
+
}, C = (e) => e == null, le = (e) => C(e) || e.trim && e.trim().length === 0, h = (e) => {
|
|
148
148
|
let t = 0;
|
|
149
149
|
const r = e.slice();
|
|
150
|
-
return r.sort((s,
|
|
151
|
-
r[
|
|
150
|
+
return r.sort((s, n) => s - n).forEach((s, n) => {
|
|
151
|
+
r[n] === n && (t = n + 1);
|
|
152
152
|
}), t;
|
|
153
|
-
},
|
|
154
|
-
let
|
|
155
|
-
return r.forEach((
|
|
153
|
+
}, ge = (e, t, r, s = !1) => {
|
|
154
|
+
let n;
|
|
155
|
+
return r.forEach((o) => {
|
|
156
156
|
const c = [];
|
|
157
|
-
t.sort((
|
|
158
|
-
if ((s ||
|
|
159
|
-
const d =
|
|
160
|
-
|
|
157
|
+
t.sort((a, u) => a.$props.start.getTime() - u.$props.start.getTime()).forEach((a) => {
|
|
158
|
+
if ((s || a.$props.isAllDay === o.cSlot.isAllDay) && a.$props.range.index === o.cSlot.range.index && a.$props.group.index === o.cSlot.group.index && y(a.$props.start, a.$props.end, o.cSlot.start, o.cSlot.end)) {
|
|
159
|
+
const d = h(c);
|
|
160
|
+
a === e && n === void 0 && (n = d), c.splice(d, 0, d);
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
|
-
}),
|
|
164
|
-
},
|
|
163
|
+
}), n;
|
|
164
|
+
}, fe = (e, t) => {
|
|
165
165
|
const r = /* @__PURE__ */ new Set();
|
|
166
|
-
return t.forEach((
|
|
167
|
-
|
|
168
|
-
}),
|
|
169
|
-
},
|
|
170
|
-
e.forEach((
|
|
171
|
-
|
|
172
|
-
}), t.forEach((
|
|
173
|
-
const
|
|
174
|
-
|
|
166
|
+
return t.forEach((n) => {
|
|
167
|
+
n._order !== void 0 && n._order !== null && r.add(n._order);
|
|
168
|
+
}), h(Array.from(r));
|
|
169
|
+
}, me = (e, t, r = !1) => {
|
|
170
|
+
e.forEach((n) => {
|
|
171
|
+
n.order = null;
|
|
172
|
+
}), t.forEach((n) => {
|
|
173
|
+
const o = n.cSlot ? n.cSlot : n;
|
|
174
|
+
o.items.splice(0, o.items.length);
|
|
175
175
|
});
|
|
176
|
-
const s = [...e].sort((
|
|
177
|
-
t.forEach((
|
|
178
|
-
const
|
|
176
|
+
const s = [...e].sort((n, o) => n.start.getTime() - o.start.getTime());
|
|
177
|
+
t.forEach((n) => {
|
|
178
|
+
const o = n.cSlot ? n.cSlot : n, c = [];
|
|
179
179
|
s.forEach((i) => {
|
|
180
|
-
if ((r || i.isAllDay ===
|
|
180
|
+
if ((r || i.isAllDay === o.isAllDay) && i.range.index === o.range.index && (i.range.isAllDay === void 0 || o.range.isAllDay === void 0 || i.range.isAllDay === o.range.isAllDay) && i.group.index === o.group.index && y(i.start, i.end, o.start, o.end)) {
|
|
181
181
|
if (i.order !== null && i.order !== void 0)
|
|
182
|
-
c.includes(i.order) || (c.push(i.order), c.sort((
|
|
182
|
+
c.includes(i.order) || (c.push(i.order), c.sort((u, d) => u - d));
|
|
183
183
|
else {
|
|
184
|
-
const
|
|
185
|
-
i.order =
|
|
184
|
+
const u = h(c);
|
|
185
|
+
i.order = u, c.push(u), c.sort((d, g) => d - g);
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
o.items.push(i);
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
190
|
});
|
|
191
|
-
},
|
|
191
|
+
}, pe = (e, t, r = !1) => {
|
|
192
192
|
e.forEach((s) => s.slots.splice(0, s.slots.length)), e.forEach((s) => {
|
|
193
|
-
t.forEach((
|
|
194
|
-
const
|
|
195
|
-
(r || s.isAllDay ===
|
|
193
|
+
t.forEach((n) => {
|
|
194
|
+
const o = n.cSlot ? n.cSlot : n;
|
|
195
|
+
(r || s.isAllDay === o.isAllDay) && s.range.index === o.range.index && (s.range.isAllDay === void 0 || o.range.isAllDay === void 0 || s.range.isAllDay === o.range.isAllDay) && s.group.index === o.group.index && y(s.start, s.end, o.start, o.end) && s.slots.push(n);
|
|
196
196
|
});
|
|
197
197
|
});
|
|
198
|
-
},
|
|
198
|
+
}, De = function(e) {
|
|
199
199
|
return e.props.items.find((r) => r.order === 0) || e.props.items[0];
|
|
200
|
-
},
|
|
201
|
-
const r = e.filter((
|
|
202
|
-
return
|
|
200
|
+
}, U = (e, t, r) => !!(e.uid === t.uid && (e.occurrenceId === void 0 || e.occurrenceId === t.occurrenceId) && e.group.index === t.group.index && e.range.index === t.range.index && (r || e.isAllDay === t.isAllDay)), V = (e, t) => {
|
|
201
|
+
const r = e.filter((n) => n.element !== null);
|
|
202
|
+
return w(
|
|
203
203
|
r,
|
|
204
204
|
[
|
|
205
205
|
{ field: "group.index", dir: "asc" },
|
|
@@ -208,61 +208,61 @@ const ne = (e, t, r) => {
|
|
|
208
208
|
{ field: "start", dir: "asc" }
|
|
209
209
|
]
|
|
210
210
|
);
|
|
211
|
-
},
|
|
212
|
-
const s = e,
|
|
211
|
+
}, ye = (e, t) => e.start.getTime() === t.start.getTime() && e.end.getTime() === t.end.getTime() && e.index === t.index && e.group.index === t.group.index && e.range.index === t.range.index && e.isAllDay === t.isAllDay, T = (e, t, r = !1) => {
|
|
212
|
+
const s = e, n = V(t, r);
|
|
213
213
|
return {
|
|
214
|
-
currentIndex:
|
|
215
|
-
sorted:
|
|
214
|
+
currentIndex: n.findIndex((c) => U(c, s, r)),
|
|
215
|
+
sorted: n
|
|
216
216
|
};
|
|
217
|
-
},
|
|
217
|
+
}, he = (e, t, r = !1) => {
|
|
218
218
|
if (!e || !t)
|
|
219
219
|
return null;
|
|
220
|
-
const { currentIndex: s, sorted:
|
|
221
|
-
return
|
|
222
|
-
},
|
|
223
|
-
const { currentIndex:
|
|
224
|
-
return n
|
|
225
|
-
},
|
|
220
|
+
const { currentIndex: s, sorted: n } = T(e, t, r) || {};
|
|
221
|
+
return n[s];
|
|
222
|
+
}, Me = (e, t, r = !1, s = !1) => {
|
|
223
|
+
const { currentIndex: n, sorted: o } = T(e, t, r);
|
|
224
|
+
return o[n + (s ? -1 : 1)];
|
|
225
|
+
}, Se = (e, t) => (e.order || 0) - (t.order || 0);
|
|
226
226
|
export {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
227
|
+
z as COLLECTION_ACTION,
|
|
228
|
+
ge as calculateOrder,
|
|
229
|
+
fe as calculateProportionalOrder,
|
|
230
|
+
U as compareItems,
|
|
231
|
+
ye as compareSlots,
|
|
232
|
+
Q as crossesDayBoundary,
|
|
233
|
+
G as defaultModelFields,
|
|
234
|
+
L as emitDataAction,
|
|
235
|
+
he as findCurrentItem,
|
|
236
|
+
De as findFirstItem,
|
|
237
|
+
ie as findMaster,
|
|
238
|
+
h as findMissing,
|
|
239
|
+
Me as findNextItem,
|
|
240
|
+
ee as findSeriesExceptions,
|
|
241
|
+
J as first,
|
|
242
|
+
oe as formatEventSummary,
|
|
243
|
+
ne as formatEventTime,
|
|
244
|
+
T as getCurrentItemIndex,
|
|
245
245
|
l as getField,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
ae as getModelFields,
|
|
247
|
+
B as getSchedulerResourceColor,
|
|
248
|
+
O as getSeriesMasterId,
|
|
249
|
+
V as getSortedSlots,
|
|
250
250
|
y as intersects,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
251
|
+
C as isBlank,
|
|
252
|
+
re as isGroupped,
|
|
253
|
+
ue as isInTimeRange,
|
|
254
|
+
Y as isMaster,
|
|
255
|
+
le as isNullOrEmptyString,
|
|
256
|
+
se as isPresent,
|
|
257
|
+
X as isTimedItemOnDaySlot,
|
|
258
|
+
K as last,
|
|
259
|
+
pe as mapItemsToSlots,
|
|
260
|
+
me as mapSlotsToItems,
|
|
261
|
+
Se as orderSort,
|
|
262
|
+
D as setField,
|
|
263
|
+
P as slotDive,
|
|
264
|
+
de as toSchedulerGroups,
|
|
265
|
+
te as toStandaloneEvent,
|
|
266
|
+
ce as toUTCDateTime,
|
|
267
|
+
_ as useSchedulerResourceColor
|
|
268
268
|
};
|