react-big-schedule 2.0.0 → 3.0.0
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/react-big-schedule-index.mjs +2067 -1631
- package/package.json +5 -4
- package/dist/style.css +0 -1
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
var Qt = Object.defineProperty;
|
|
2
|
+
var Jt = (R, t, e) => t in R ? Qt(R, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[t] = e;
|
|
3
|
+
var P = (R, t, e) => (Jt(R, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
import ze, { Component as We, createElement as be, useState as ke } from "react";
|
|
5
|
+
import p, { PropTypes as Y } from "prop-types";
|
|
6
|
+
import { Row as we, Col as de, Popover as Fe, Radio as ut, Calendar as Zt, Space as it, Spin as at } from "antd";
|
|
7
|
+
import { DragSource as Kt, DropTarget as es, DndProvider as ts } from "react-dnd";
|
|
8
|
+
import { MinusSquareOutlined as ss, PlusSquareOutlined as rs, CloseOutlined as ns, LeftOutlined as is, RightOutlined as as } from "@ant-design/icons";
|
|
9
|
+
import { rrulestr as Ae, RRuleSet as os } from "rrule";
|
|
10
|
+
import { HTML5Backend as ls } from "react-dnd-html5-backend";
|
|
11
|
+
var _e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
12
|
+
function Oe(R) {
|
|
13
|
+
return R && R.__esModule && Object.prototype.hasOwnProperty.call(R, "default") ? R.default : R;
|
|
14
|
+
}
|
|
15
|
+
var Ye = { exports: {} }, Se = {};
|
|
13
16
|
/**
|
|
14
17
|
* @license React
|
|
15
18
|
* react-jsx-runtime.production.min.js
|
|
@@ -19,25 +22,25 @@ var We = { exports: {} }, me = {};
|
|
|
19
22
|
* This source code is licensed under the MIT license found in the
|
|
20
23
|
* LICENSE file in the root directory of this source tree.
|
|
21
24
|
*/
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
if (
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
function o
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
for (
|
|
32
|
-
|
|
33
|
-
if (
|
|
34
|
-
for (
|
|
35
|
-
|
|
36
|
-
return { $$typeof: t, type:
|
|
37
|
-
}
|
|
38
|
-
return
|
|
25
|
+
var ot;
|
|
26
|
+
function cs() {
|
|
27
|
+
if (ot)
|
|
28
|
+
return Se;
|
|
29
|
+
ot = 1;
|
|
30
|
+
var R = ze, t = Symbol.for("react.element"), e = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, r = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
31
|
+
function i(o, l, u) {
|
|
32
|
+
var c, f = {}, h = null, v = null;
|
|
33
|
+
u !== void 0 && (h = "" + u), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (v = l.ref);
|
|
34
|
+
for (c in l)
|
|
35
|
+
s.call(l, c) && !n.hasOwnProperty(c) && (f[c] = l[c]);
|
|
36
|
+
if (o && o.defaultProps)
|
|
37
|
+
for (c in l = o.defaultProps, l)
|
|
38
|
+
f[c] === void 0 && (f[c] = l[c]);
|
|
39
|
+
return { $$typeof: t, type: o, key: h, ref: v, props: f, _owner: r.current };
|
|
40
|
+
}
|
|
41
|
+
return Se.Fragment = e, Se.jsx = i, Se.jsxs = i, Se;
|
|
39
42
|
}
|
|
40
|
-
var
|
|
43
|
+
var Re = {};
|
|
41
44
|
/**
|
|
42
45
|
* @license React
|
|
43
46
|
* react-jsx-runtime.development.js
|
|
@@ -47,91 +50,91 @@ var ge = {};
|
|
|
47
50
|
* This source code is licensed under the MIT license found in the
|
|
48
51
|
* LICENSE file in the root directory of this source tree.
|
|
49
52
|
*/
|
|
50
|
-
var
|
|
51
|
-
function
|
|
52
|
-
return
|
|
53
|
-
var
|
|
54
|
-
function
|
|
55
|
-
if (
|
|
53
|
+
var lt;
|
|
54
|
+
function ds() {
|
|
55
|
+
return lt || (lt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
|
+
var R = ze, t = Symbol.for("react.element"), e = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), n = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), o = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), D = Symbol.iterator, g = "@@iterator";
|
|
57
|
+
function w(a) {
|
|
58
|
+
if (a === null || typeof a != "object")
|
|
56
59
|
return null;
|
|
57
|
-
var
|
|
58
|
-
return typeof
|
|
60
|
+
var E = D && a[D] || a[g];
|
|
61
|
+
return typeof E == "function" ? E : null;
|
|
59
62
|
}
|
|
60
|
-
var
|
|
61
|
-
function
|
|
63
|
+
var T = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
64
|
+
function b(a) {
|
|
62
65
|
{
|
|
63
|
-
for (var
|
|
64
|
-
|
|
65
|
-
k("error",
|
|
66
|
+
for (var E = arguments.length, I = new Array(E > 1 ? E - 1 : 0), L = 1; L < E; L++)
|
|
67
|
+
I[L - 1] = arguments[L];
|
|
68
|
+
k("error", a, I);
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
|
-
function k(
|
|
71
|
+
function k(a, E, I) {
|
|
69
72
|
{
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
var
|
|
73
|
-
return String(
|
|
73
|
+
var L = T.ReactDebugCurrentFrame, G = L.getStackAddendum();
|
|
74
|
+
G !== "" && (E += "%s", I = I.concat([G]));
|
|
75
|
+
var K = I.map(function(B) {
|
|
76
|
+
return String(B);
|
|
74
77
|
});
|
|
75
|
-
|
|
78
|
+
K.unshift("Warning: " + E), Function.prototype.apply.call(console[a], console, K);
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
function
|
|
81
|
-
return !!(typeof
|
|
81
|
+
var A = !1, $ = !1, H = !1, N = !1, z = !1, W;
|
|
82
|
+
W = Symbol.for("react.module.reference");
|
|
83
|
+
function C(a) {
|
|
84
|
+
return !!(typeof a == "string" || typeof a == "function" || a === s || a === n || z || a === r || a === u || a === c || N || a === v || A || $ || H || typeof a == "object" && a !== null && (a.$$typeof === h || a.$$typeof === f || a.$$typeof === i || a.$$typeof === o || a.$$typeof === l || // This needs to include all possible module reference object
|
|
82
85
|
// types supported by any Flight configuration anywhere since
|
|
83
86
|
// we don't know which Flight build this will end up being used
|
|
84
87
|
// with.
|
|
85
|
-
|
|
88
|
+
a.$$typeof === W || a.getModuleId !== void 0));
|
|
86
89
|
}
|
|
87
|
-
function
|
|
88
|
-
var
|
|
89
|
-
if (
|
|
90
|
-
return
|
|
91
|
-
var
|
|
92
|
-
return
|
|
90
|
+
function X(a, E, I) {
|
|
91
|
+
var L = a.displayName;
|
|
92
|
+
if (L)
|
|
93
|
+
return L;
|
|
94
|
+
var G = E.displayName || E.name || "";
|
|
95
|
+
return G !== "" ? I + "(" + G + ")" : I;
|
|
93
96
|
}
|
|
94
|
-
function
|
|
95
|
-
return
|
|
97
|
+
function Z(a) {
|
|
98
|
+
return a.displayName || "Context";
|
|
96
99
|
}
|
|
97
|
-
function
|
|
98
|
-
if (
|
|
100
|
+
function S(a) {
|
|
101
|
+
if (a == null)
|
|
99
102
|
return null;
|
|
100
|
-
if (typeof
|
|
101
|
-
return
|
|
102
|
-
if (typeof
|
|
103
|
-
return
|
|
104
|
-
switch (
|
|
105
|
-
case
|
|
103
|
+
if (typeof a.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
|
|
104
|
+
return a.displayName || a.name || null;
|
|
105
|
+
if (typeof a == "string")
|
|
106
|
+
return a;
|
|
107
|
+
switch (a) {
|
|
108
|
+
case s:
|
|
106
109
|
return "Fragment";
|
|
107
110
|
case e:
|
|
108
111
|
return "Portal";
|
|
109
|
-
case i:
|
|
110
|
-
return "Profiler";
|
|
111
112
|
case n:
|
|
113
|
+
return "Profiler";
|
|
114
|
+
case r:
|
|
112
115
|
return "StrictMode";
|
|
113
|
-
case
|
|
116
|
+
case u:
|
|
114
117
|
return "Suspense";
|
|
115
|
-
case
|
|
118
|
+
case c:
|
|
116
119
|
return "SuspenseList";
|
|
117
120
|
}
|
|
118
|
-
if (typeof
|
|
119
|
-
switch (
|
|
120
|
-
case a:
|
|
121
|
-
var g = s;
|
|
122
|
-
return Q(g) + ".Consumer";
|
|
121
|
+
if (typeof a == "object")
|
|
122
|
+
switch (a.$$typeof) {
|
|
123
123
|
case o:
|
|
124
|
-
var
|
|
125
|
-
return
|
|
126
|
-
case
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
return
|
|
131
|
-
case f:
|
|
132
|
-
var
|
|
124
|
+
var E = a;
|
|
125
|
+
return Z(E) + ".Consumer";
|
|
126
|
+
case i:
|
|
127
|
+
var I = a;
|
|
128
|
+
return Z(I._context) + ".Provider";
|
|
129
|
+
case l:
|
|
130
|
+
return X(a, a.render, "ForwardRef");
|
|
131
|
+
case f:
|
|
132
|
+
var L = a.displayName || null;
|
|
133
|
+
return L !== null ? L : S(a.type) || "Memo";
|
|
134
|
+
case h: {
|
|
135
|
+
var G = a, K = G._payload, B = G._init;
|
|
133
136
|
try {
|
|
134
|
-
return
|
|
137
|
+
return S(B(K));
|
|
135
138
|
} catch {
|
|
136
139
|
return null;
|
|
137
140
|
}
|
|
@@ -139,1228 +142,1271 @@ function nr() {
|
|
|
139
142
|
}
|
|
140
143
|
return null;
|
|
141
144
|
}
|
|
142
|
-
var
|
|
143
|
-
function
|
|
145
|
+
var x = Object.assign, y = 0, j, m, M, _, F, Q, J;
|
|
146
|
+
function ee() {
|
|
144
147
|
}
|
|
145
|
-
|
|
146
|
-
function
|
|
148
|
+
ee.__reactDisabledLog = !0;
|
|
149
|
+
function ae() {
|
|
147
150
|
{
|
|
148
|
-
if (
|
|
149
|
-
|
|
150
|
-
var
|
|
151
|
+
if (y === 0) {
|
|
152
|
+
j = console.log, m = console.info, M = console.warn, _ = console.error, F = console.group, Q = console.groupCollapsed, J = console.groupEnd;
|
|
153
|
+
var a = {
|
|
151
154
|
configurable: !0,
|
|
152
155
|
enumerable: !0,
|
|
153
|
-
value:
|
|
156
|
+
value: ee,
|
|
154
157
|
writable: !0
|
|
155
158
|
};
|
|
156
159
|
Object.defineProperties(console, {
|
|
157
|
-
info:
|
|
158
|
-
log:
|
|
159
|
-
warn:
|
|
160
|
-
error:
|
|
161
|
-
group:
|
|
162
|
-
groupCollapsed:
|
|
163
|
-
groupEnd:
|
|
160
|
+
info: a,
|
|
161
|
+
log: a,
|
|
162
|
+
warn: a,
|
|
163
|
+
error: a,
|
|
164
|
+
group: a,
|
|
165
|
+
groupCollapsed: a,
|
|
166
|
+
groupEnd: a
|
|
164
167
|
});
|
|
165
168
|
}
|
|
166
|
-
|
|
169
|
+
y++;
|
|
167
170
|
}
|
|
168
171
|
}
|
|
169
|
-
function
|
|
172
|
+
function ne() {
|
|
170
173
|
{
|
|
171
|
-
if (
|
|
172
|
-
var
|
|
174
|
+
if (y--, y === 0) {
|
|
175
|
+
var a = {
|
|
173
176
|
configurable: !0,
|
|
174
177
|
enumerable: !0,
|
|
175
178
|
writable: !0
|
|
176
179
|
};
|
|
177
180
|
Object.defineProperties(console, {
|
|
178
|
-
log:
|
|
179
|
-
value:
|
|
181
|
+
log: x({}, a, {
|
|
182
|
+
value: j
|
|
180
183
|
}),
|
|
181
|
-
info:
|
|
182
|
-
value:
|
|
184
|
+
info: x({}, a, {
|
|
185
|
+
value: m
|
|
183
186
|
}),
|
|
184
|
-
warn:
|
|
185
|
-
value:
|
|
187
|
+
warn: x({}, a, {
|
|
188
|
+
value: M
|
|
186
189
|
}),
|
|
187
|
-
error:
|
|
188
|
-
value:
|
|
190
|
+
error: x({}, a, {
|
|
191
|
+
value: _
|
|
189
192
|
}),
|
|
190
|
-
group:
|
|
191
|
-
value:
|
|
193
|
+
group: x({}, a, {
|
|
194
|
+
value: F
|
|
192
195
|
}),
|
|
193
|
-
groupCollapsed:
|
|
194
|
-
value:
|
|
196
|
+
groupCollapsed: x({}, a, {
|
|
197
|
+
value: Q
|
|
195
198
|
}),
|
|
196
|
-
groupEnd:
|
|
197
|
-
value:
|
|
199
|
+
groupEnd: x({}, a, {
|
|
200
|
+
value: J
|
|
198
201
|
})
|
|
199
202
|
});
|
|
200
203
|
}
|
|
201
|
-
|
|
204
|
+
y < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
202
205
|
}
|
|
203
206
|
}
|
|
204
|
-
var
|
|
205
|
-
function
|
|
207
|
+
var le = T.ReactCurrentDispatcher, he;
|
|
208
|
+
function ue(a, E, I) {
|
|
206
209
|
{
|
|
207
|
-
if (
|
|
210
|
+
if (he === void 0)
|
|
208
211
|
try {
|
|
209
212
|
throw Error();
|
|
210
|
-
} catch (
|
|
211
|
-
var
|
|
212
|
-
|
|
213
|
+
} catch (G) {
|
|
214
|
+
var L = G.stack.trim().match(/\n( *(at )?)/);
|
|
215
|
+
he = L && L[1] || "";
|
|
213
216
|
}
|
|
214
217
|
return `
|
|
215
|
-
` +
|
|
218
|
+
` + he + a;
|
|
216
219
|
}
|
|
217
220
|
}
|
|
218
|
-
var
|
|
221
|
+
var re = !1, oe;
|
|
219
222
|
{
|
|
220
|
-
var
|
|
221
|
-
|
|
223
|
+
var xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
224
|
+
oe = new xe();
|
|
222
225
|
}
|
|
223
|
-
function
|
|
224
|
-
if (!
|
|
226
|
+
function De(a, E) {
|
|
227
|
+
if (!a || re)
|
|
225
228
|
return "";
|
|
226
229
|
{
|
|
227
|
-
var
|
|
228
|
-
if (
|
|
229
|
-
return
|
|
230
|
+
var I = oe.get(a);
|
|
231
|
+
if (I !== void 0)
|
|
232
|
+
return I;
|
|
230
233
|
}
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
var
|
|
234
|
+
var L;
|
|
235
|
+
re = !0;
|
|
236
|
+
var G = Error.prepareStackTrace;
|
|
234
237
|
Error.prepareStackTrace = void 0;
|
|
235
|
-
var
|
|
236
|
-
|
|
238
|
+
var K;
|
|
239
|
+
K = le.current, le.current = null, ae();
|
|
237
240
|
try {
|
|
238
|
-
if (
|
|
239
|
-
var
|
|
241
|
+
if (E) {
|
|
242
|
+
var B = function() {
|
|
240
243
|
throw Error();
|
|
241
244
|
};
|
|
242
|
-
if (Object.defineProperty(
|
|
245
|
+
if (Object.defineProperty(B.prototype, "props", {
|
|
243
246
|
set: function() {
|
|
244
247
|
throw Error();
|
|
245
248
|
}
|
|
246
249
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
247
250
|
try {
|
|
248
|
-
Reflect.construct(
|
|
249
|
-
} catch (
|
|
250
|
-
|
|
251
|
+
Reflect.construct(B, []);
|
|
252
|
+
} catch (fe) {
|
|
253
|
+
L = fe;
|
|
251
254
|
}
|
|
252
|
-
Reflect.construct(
|
|
255
|
+
Reflect.construct(a, [], B);
|
|
253
256
|
} else {
|
|
254
257
|
try {
|
|
255
|
-
|
|
256
|
-
} catch (
|
|
257
|
-
|
|
258
|
+
B.call();
|
|
259
|
+
} catch (fe) {
|
|
260
|
+
L = fe;
|
|
258
261
|
}
|
|
259
|
-
|
|
262
|
+
a.call(B.prototype);
|
|
260
263
|
}
|
|
261
264
|
} else {
|
|
262
265
|
try {
|
|
263
266
|
throw Error();
|
|
264
|
-
} catch (
|
|
265
|
-
|
|
267
|
+
} catch (fe) {
|
|
268
|
+
L = fe;
|
|
266
269
|
}
|
|
267
|
-
|
|
270
|
+
a();
|
|
268
271
|
}
|
|
269
|
-
} catch (
|
|
270
|
-
if (
|
|
271
|
-
for (var
|
|
272
|
-
`),
|
|
273
|
-
`),
|
|
274
|
-
|
|
275
|
-
for (;
|
|
276
|
-
if (
|
|
277
|
-
if (
|
|
272
|
+
} catch (fe) {
|
|
273
|
+
if (fe && L && typeof fe.stack == "string") {
|
|
274
|
+
for (var q = fe.stack.split(`
|
|
275
|
+
`), ie = L.stack.split(`
|
|
276
|
+
`), te = q.length - 1, se = ie.length - 1; te >= 1 && se >= 0 && q[te] !== ie[se]; )
|
|
277
|
+
se--;
|
|
278
|
+
for (; te >= 1 && se >= 0; te--, se--)
|
|
279
|
+
if (q[te] !== ie[se]) {
|
|
280
|
+
if (te !== 1 || se !== 1)
|
|
278
281
|
do
|
|
279
|
-
if (
|
|
280
|
-
var
|
|
281
|
-
` +
|
|
282
|
-
return
|
|
282
|
+
if (te--, se--, se < 0 || q[te] !== ie[se]) {
|
|
283
|
+
var ce = `
|
|
284
|
+
` + q[te].replace(" at new ", " at ");
|
|
285
|
+
return a.displayName && ce.includes("<anonymous>") && (ce = ce.replace("<anonymous>", a.displayName)), typeof a == "function" && oe.set(a, ce), ce;
|
|
283
286
|
}
|
|
284
|
-
while (
|
|
287
|
+
while (te >= 1 && se >= 0);
|
|
285
288
|
break;
|
|
286
289
|
}
|
|
287
290
|
}
|
|
288
291
|
} finally {
|
|
289
|
-
|
|
292
|
+
re = !1, le.current = K, ne(), Error.prepareStackTrace = G;
|
|
290
293
|
}
|
|
291
|
-
var
|
|
292
|
-
return typeof
|
|
294
|
+
var Ee = a ? a.displayName || a.name : "", nt = Ee ? ue(Ee) : "";
|
|
295
|
+
return typeof a == "function" && oe.set(a, nt), nt;
|
|
293
296
|
}
|
|
294
|
-
function
|
|
295
|
-
return
|
|
297
|
+
function jt(a, E, I) {
|
|
298
|
+
return De(a, !1);
|
|
296
299
|
}
|
|
297
|
-
function
|
|
298
|
-
var
|
|
299
|
-
return !!(
|
|
300
|
+
function It(a) {
|
|
301
|
+
var E = a.prototype;
|
|
302
|
+
return !!(E && E.isReactComponent);
|
|
300
303
|
}
|
|
301
|
-
function
|
|
302
|
-
if (
|
|
304
|
+
function je(a, E, I) {
|
|
305
|
+
if (a == null)
|
|
303
306
|
return "";
|
|
304
|
-
if (typeof
|
|
305
|
-
return
|
|
306
|
-
if (typeof
|
|
307
|
-
return
|
|
308
|
-
switch (
|
|
307
|
+
if (typeof a == "function")
|
|
308
|
+
return De(a, It(a));
|
|
309
|
+
if (typeof a == "string")
|
|
310
|
+
return ue(a);
|
|
311
|
+
switch (a) {
|
|
312
|
+
case u:
|
|
313
|
+
return ue("Suspense");
|
|
309
314
|
case c:
|
|
310
|
-
return
|
|
311
|
-
case h:
|
|
312
|
-
return ve("SuspenseList");
|
|
315
|
+
return ue("SuspenseList");
|
|
313
316
|
}
|
|
314
|
-
if (typeof
|
|
315
|
-
switch (
|
|
316
|
-
case
|
|
317
|
-
return
|
|
318
|
-
case
|
|
319
|
-
return
|
|
320
|
-
case
|
|
321
|
-
var
|
|
317
|
+
if (typeof a == "object")
|
|
318
|
+
switch (a.$$typeof) {
|
|
319
|
+
case l:
|
|
320
|
+
return jt(a.render);
|
|
321
|
+
case f:
|
|
322
|
+
return je(a.type, E, I);
|
|
323
|
+
case h: {
|
|
324
|
+
var L = a, G = L._payload, K = L._init;
|
|
322
325
|
try {
|
|
323
|
-
return
|
|
326
|
+
return je(K(G), E, I);
|
|
324
327
|
} catch {
|
|
325
328
|
}
|
|
326
329
|
}
|
|
327
330
|
}
|
|
328
331
|
return "";
|
|
329
332
|
}
|
|
330
|
-
var
|
|
331
|
-
function
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
334
|
-
|
|
333
|
+
var Ie = Object.prototype.hasOwnProperty, Ve = {}, Ue = T.ReactDebugCurrentFrame;
|
|
334
|
+
function Me(a) {
|
|
335
|
+
if (a) {
|
|
336
|
+
var E = a._owner, I = je(a.type, a._source, E ? E.type : null);
|
|
337
|
+
Ue.setExtraStackFrame(I);
|
|
335
338
|
} else
|
|
336
|
-
|
|
339
|
+
Ue.setExtraStackFrame(null);
|
|
337
340
|
}
|
|
338
|
-
function
|
|
341
|
+
function Mt(a, E, I, L, G) {
|
|
339
342
|
{
|
|
340
|
-
var
|
|
341
|
-
for (var
|
|
342
|
-
if (
|
|
343
|
-
var
|
|
343
|
+
var K = Function.call.bind(Ie);
|
|
344
|
+
for (var B in a)
|
|
345
|
+
if (K(a, B)) {
|
|
346
|
+
var q = void 0;
|
|
344
347
|
try {
|
|
345
|
-
if (typeof
|
|
346
|
-
var
|
|
347
|
-
throw
|
|
348
|
+
if (typeof a[B] != "function") {
|
|
349
|
+
var ie = Error((L || "React class") + ": " + I + " type `" + B + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[B] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
350
|
+
throw ie.name = "Invariant Violation", ie;
|
|
348
351
|
}
|
|
349
|
-
|
|
350
|
-
} catch (
|
|
351
|
-
|
|
352
|
+
q = a[B](E, B, L, I, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
353
|
+
} catch (te) {
|
|
354
|
+
q = te;
|
|
352
355
|
}
|
|
353
|
-
|
|
356
|
+
q && !(q instanceof Error) && (Me(G), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", L || "React class", I, B, typeof q), Me(null)), q instanceof Error && !(q.message in Ve) && (Ve[q.message] = !0, Me(G), b("Failed %s type: %s", I, q.message), Me(null));
|
|
354
357
|
}
|
|
355
358
|
}
|
|
356
359
|
}
|
|
357
|
-
var
|
|
358
|
-
function
|
|
359
|
-
return
|
|
360
|
+
var kt = Array.isArray;
|
|
361
|
+
function He(a) {
|
|
362
|
+
return kt(a);
|
|
360
363
|
}
|
|
361
|
-
function
|
|
364
|
+
function Wt(a) {
|
|
362
365
|
{
|
|
363
|
-
var
|
|
364
|
-
return
|
|
366
|
+
var E = typeof Symbol == "function" && Symbol.toStringTag, I = E && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
367
|
+
return I;
|
|
365
368
|
}
|
|
366
369
|
}
|
|
367
|
-
function
|
|
370
|
+
function _t(a) {
|
|
368
371
|
try {
|
|
369
|
-
return
|
|
372
|
+
return Xe(a), !1;
|
|
370
373
|
} catch {
|
|
371
374
|
return !0;
|
|
372
375
|
}
|
|
373
376
|
}
|
|
374
|
-
function
|
|
375
|
-
return "" +
|
|
377
|
+
function Xe(a) {
|
|
378
|
+
return "" + a;
|
|
376
379
|
}
|
|
377
|
-
function
|
|
378
|
-
if (
|
|
379
|
-
return
|
|
380
|
+
function Ge(a) {
|
|
381
|
+
if (_t(a))
|
|
382
|
+
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Wt(a)), Xe(a);
|
|
380
383
|
}
|
|
381
|
-
var
|
|
384
|
+
var Ce = T.ReactCurrentOwner, Ot = {
|
|
382
385
|
key: !0,
|
|
383
386
|
ref: !0,
|
|
384
387
|
__self: !0,
|
|
385
388
|
__source: !0
|
|
386
|
-
},
|
|
387
|
-
|
|
388
|
-
function
|
|
389
|
-
if (
|
|
390
|
-
var
|
|
391
|
-
if (
|
|
389
|
+
}, Qe, Je, $e;
|
|
390
|
+
$e = {};
|
|
391
|
+
function Ht(a) {
|
|
392
|
+
if (Ie.call(a, "ref")) {
|
|
393
|
+
var E = Object.getOwnPropertyDescriptor(a, "ref").get;
|
|
394
|
+
if (E && E.isReactWarning)
|
|
392
395
|
return !1;
|
|
393
396
|
}
|
|
394
|
-
return
|
|
397
|
+
return a.ref !== void 0;
|
|
395
398
|
}
|
|
396
|
-
function
|
|
397
|
-
if (
|
|
398
|
-
var
|
|
399
|
-
if (
|
|
399
|
+
function $t(a) {
|
|
400
|
+
if (Ie.call(a, "key")) {
|
|
401
|
+
var E = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
402
|
+
if (E && E.isReactWarning)
|
|
400
403
|
return !1;
|
|
401
404
|
}
|
|
402
|
-
return
|
|
405
|
+
return a.key !== void 0;
|
|
403
406
|
}
|
|
404
|
-
function
|
|
405
|
-
if (typeof
|
|
406
|
-
var
|
|
407
|
-
|
|
407
|
+
function Pt(a, E) {
|
|
408
|
+
if (typeof a.ref == "string" && Ce.current && E && Ce.current.stateNode !== E) {
|
|
409
|
+
var I = S(Ce.current.type);
|
|
410
|
+
$e[I] || (b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', S(Ce.current.type), a.ref), $e[I] = !0);
|
|
408
411
|
}
|
|
409
412
|
}
|
|
410
|
-
function
|
|
413
|
+
function Lt(a, E) {
|
|
411
414
|
{
|
|
412
|
-
var
|
|
413
|
-
|
|
415
|
+
var I = function() {
|
|
416
|
+
Qe || (Qe = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", E));
|
|
414
417
|
};
|
|
415
|
-
|
|
416
|
-
get:
|
|
418
|
+
I.isReactWarning = !0, Object.defineProperty(a, "key", {
|
|
419
|
+
get: I,
|
|
417
420
|
configurable: !0
|
|
418
421
|
});
|
|
419
422
|
}
|
|
420
423
|
}
|
|
421
|
-
function
|
|
424
|
+
function Nt(a, E) {
|
|
422
425
|
{
|
|
423
|
-
var
|
|
424
|
-
|
|
426
|
+
var I = function() {
|
|
427
|
+
Je || (Je = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", E));
|
|
425
428
|
};
|
|
426
|
-
|
|
427
|
-
get:
|
|
429
|
+
I.isReactWarning = !0, Object.defineProperty(a, "ref", {
|
|
430
|
+
get: I,
|
|
428
431
|
configurable: !0
|
|
429
432
|
});
|
|
430
433
|
}
|
|
431
434
|
}
|
|
432
|
-
var
|
|
433
|
-
var
|
|
435
|
+
var At = function(a, E, I, L, G, K, B) {
|
|
436
|
+
var q = {
|
|
434
437
|
// This tag allows us to uniquely identify this as a React Element
|
|
435
438
|
$$typeof: t,
|
|
436
439
|
// Built-in properties that belong on the element
|
|
437
|
-
type:
|
|
438
|
-
key:
|
|
439
|
-
ref:
|
|
440
|
-
props:
|
|
440
|
+
type: a,
|
|
441
|
+
key: E,
|
|
442
|
+
ref: I,
|
|
443
|
+
props: B,
|
|
441
444
|
// Record the component responsible for creating this element.
|
|
442
|
-
_owner:
|
|
445
|
+
_owner: K
|
|
443
446
|
};
|
|
444
|
-
return
|
|
447
|
+
return q._store = {}, Object.defineProperty(q._store, "validated", {
|
|
445
448
|
configurable: !1,
|
|
446
449
|
enumerable: !1,
|
|
447
450
|
writable: !0,
|
|
448
451
|
value: !1
|
|
449
|
-
}), Object.defineProperty(
|
|
452
|
+
}), Object.defineProperty(q, "_self", {
|
|
450
453
|
configurable: !1,
|
|
451
454
|
enumerable: !1,
|
|
452
455
|
writable: !1,
|
|
453
|
-
value:
|
|
454
|
-
}), Object.defineProperty(
|
|
456
|
+
value: L
|
|
457
|
+
}), Object.defineProperty(q, "_source", {
|
|
455
458
|
configurable: !1,
|
|
456
459
|
enumerable: !1,
|
|
457
460
|
writable: !1,
|
|
458
|
-
value:
|
|
459
|
-
}), Object.freeze && (Object.freeze(
|
|
461
|
+
value: G
|
|
462
|
+
}), Object.freeze && (Object.freeze(q.props), Object.freeze(q)), q;
|
|
460
463
|
};
|
|
461
|
-
function
|
|
464
|
+
function Yt(a, E, I, L, G) {
|
|
462
465
|
{
|
|
463
|
-
var
|
|
464
|
-
|
|
465
|
-
for (
|
|
466
|
-
|
|
467
|
-
if (
|
|
468
|
-
var
|
|
469
|
-
for (
|
|
470
|
-
|
|
466
|
+
var K, B = {}, q = null, ie = null;
|
|
467
|
+
I !== void 0 && (Ge(I), q = "" + I), $t(E) && (Ge(E.key), q = "" + E.key), Ht(E) && (ie = E.ref, Pt(E, G));
|
|
468
|
+
for (K in E)
|
|
469
|
+
Ie.call(E, K) && !Ot.hasOwnProperty(K) && (B[K] = E[K]);
|
|
470
|
+
if (a && a.defaultProps) {
|
|
471
|
+
var te = a.defaultProps;
|
|
472
|
+
for (K in te)
|
|
473
|
+
B[K] === void 0 && (B[K] = te[K]);
|
|
471
474
|
}
|
|
472
|
-
if (
|
|
473
|
-
var
|
|
474
|
-
|
|
475
|
+
if (q || ie) {
|
|
476
|
+
var se = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
477
|
+
q && Lt(B, se), ie && Nt(B, se);
|
|
475
478
|
}
|
|
476
|
-
return
|
|
479
|
+
return At(a, q, ie, G, L, Ce.current, B);
|
|
477
480
|
}
|
|
478
481
|
}
|
|
479
|
-
var
|
|
480
|
-
function
|
|
481
|
-
if (
|
|
482
|
-
var
|
|
483
|
-
|
|
482
|
+
var Pe = T.ReactCurrentOwner, Ze = T.ReactDebugCurrentFrame;
|
|
483
|
+
function ye(a) {
|
|
484
|
+
if (a) {
|
|
485
|
+
var E = a._owner, I = je(a.type, a._source, E ? E.type : null);
|
|
486
|
+
Ze.setExtraStackFrame(I);
|
|
484
487
|
} else
|
|
485
|
-
|
|
488
|
+
Ze.setExtraStackFrame(null);
|
|
486
489
|
}
|
|
487
|
-
var
|
|
488
|
-
|
|
489
|
-
function
|
|
490
|
-
return typeof
|
|
490
|
+
var Le;
|
|
491
|
+
Le = !1;
|
|
492
|
+
function Ne(a) {
|
|
493
|
+
return typeof a == "object" && a !== null && a.$$typeof === t;
|
|
491
494
|
}
|
|
492
|
-
function
|
|
495
|
+
function Ke() {
|
|
493
496
|
{
|
|
494
|
-
if (
|
|
495
|
-
var
|
|
496
|
-
if (
|
|
497
|
+
if (Pe.current) {
|
|
498
|
+
var a = S(Pe.current.type);
|
|
499
|
+
if (a)
|
|
497
500
|
return `
|
|
498
501
|
|
|
499
|
-
Check the render method of \`` +
|
|
502
|
+
Check the render method of \`` + a + "`.";
|
|
500
503
|
}
|
|
501
504
|
return "";
|
|
502
505
|
}
|
|
503
506
|
}
|
|
504
|
-
function
|
|
507
|
+
function zt(a) {
|
|
505
508
|
{
|
|
506
|
-
if (
|
|
507
|
-
var
|
|
509
|
+
if (a !== void 0) {
|
|
510
|
+
var E = a.fileName.replace(/^.*[\\\/]/, ""), I = a.lineNumber;
|
|
508
511
|
return `
|
|
509
512
|
|
|
510
|
-
Check your code at ` +
|
|
513
|
+
Check your code at ` + E + ":" + I + ".";
|
|
511
514
|
}
|
|
512
515
|
return "";
|
|
513
516
|
}
|
|
514
517
|
}
|
|
515
|
-
var
|
|
516
|
-
function
|
|
518
|
+
var et = {};
|
|
519
|
+
function Ft(a) {
|
|
517
520
|
{
|
|
518
|
-
var
|
|
519
|
-
if (!
|
|
520
|
-
var
|
|
521
|
-
|
|
521
|
+
var E = Ke();
|
|
522
|
+
if (!E) {
|
|
523
|
+
var I = typeof a == "string" ? a : a.displayName || a.name;
|
|
524
|
+
I && (E = `
|
|
522
525
|
|
|
523
|
-
Check the top-level render call using <` +
|
|
526
|
+
Check the top-level render call using <` + I + ">.");
|
|
524
527
|
}
|
|
525
|
-
return
|
|
528
|
+
return E;
|
|
526
529
|
}
|
|
527
530
|
}
|
|
528
|
-
function
|
|
531
|
+
function tt(a, E) {
|
|
529
532
|
{
|
|
530
|
-
if (!
|
|
533
|
+
if (!a._store || a._store.validated || a.key != null)
|
|
531
534
|
return;
|
|
532
|
-
|
|
533
|
-
var
|
|
534
|
-
if (
|
|
535
|
+
a._store.validated = !0;
|
|
536
|
+
var I = Ft(E);
|
|
537
|
+
if (et[I])
|
|
535
538
|
return;
|
|
536
|
-
|
|
537
|
-
var
|
|
538
|
-
|
|
539
|
+
et[I] = !0;
|
|
540
|
+
var L = "";
|
|
541
|
+
a && a._owner && a._owner !== Pe.current && (L = " It was passed a child from " + S(a._owner.type) + "."), ye(a), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', I, L), ye(null);
|
|
539
542
|
}
|
|
540
543
|
}
|
|
541
|
-
function
|
|
544
|
+
function st(a, E) {
|
|
542
545
|
{
|
|
543
|
-
if (typeof
|
|
546
|
+
if (typeof a != "object")
|
|
544
547
|
return;
|
|
545
|
-
if (
|
|
546
|
-
for (var
|
|
547
|
-
var
|
|
548
|
-
|
|
548
|
+
if (He(a))
|
|
549
|
+
for (var I = 0; I < a.length; I++) {
|
|
550
|
+
var L = a[I];
|
|
551
|
+
Ne(L) && tt(L, E);
|
|
549
552
|
}
|
|
550
|
-
else if (
|
|
551
|
-
|
|
552
|
-
else if (
|
|
553
|
-
var
|
|
554
|
-
if (typeof
|
|
555
|
-
for (var
|
|
556
|
-
|
|
553
|
+
else if (Ne(a))
|
|
554
|
+
a._store && (a._store.validated = !0);
|
|
555
|
+
else if (a) {
|
|
556
|
+
var G = w(a);
|
|
557
|
+
if (typeof G == "function" && G !== a.entries)
|
|
558
|
+
for (var K = G.call(a), B; !(B = K.next()).done; )
|
|
559
|
+
Ne(B.value) && tt(B.value, E);
|
|
557
560
|
}
|
|
558
561
|
}
|
|
559
562
|
}
|
|
560
|
-
function
|
|
563
|
+
function qt(a) {
|
|
561
564
|
{
|
|
562
|
-
var
|
|
563
|
-
if (
|
|
565
|
+
var E = a.type;
|
|
566
|
+
if (E == null || typeof E == "string")
|
|
564
567
|
return;
|
|
565
|
-
var
|
|
566
|
-
if (typeof
|
|
567
|
-
|
|
568
|
-
else if (typeof
|
|
568
|
+
var I;
|
|
569
|
+
if (typeof E == "function")
|
|
570
|
+
I = E.propTypes;
|
|
571
|
+
else if (typeof E == "object" && (E.$$typeof === l || // Note: Memo only checks outer props here.
|
|
569
572
|
// Inner props are checked in the reconciler.
|
|
570
|
-
|
|
571
|
-
|
|
573
|
+
E.$$typeof === f))
|
|
574
|
+
I = E.propTypes;
|
|
572
575
|
else
|
|
573
576
|
return;
|
|
574
|
-
if (
|
|
575
|
-
var
|
|
576
|
-
|
|
577
|
-
} else if (
|
|
578
|
-
|
|
579
|
-
var
|
|
580
|
-
|
|
577
|
+
if (I) {
|
|
578
|
+
var L = S(E);
|
|
579
|
+
Mt(I, a.props, "prop", L, a);
|
|
580
|
+
} else if (E.PropTypes !== void 0 && !Le) {
|
|
581
|
+
Le = !0;
|
|
582
|
+
var G = S(E);
|
|
583
|
+
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", G || "Unknown");
|
|
581
584
|
}
|
|
582
|
-
typeof
|
|
585
|
+
typeof E.getDefaultProps == "function" && !E.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
583
586
|
}
|
|
584
587
|
}
|
|
585
|
-
function
|
|
588
|
+
function Bt(a) {
|
|
586
589
|
{
|
|
587
|
-
for (var
|
|
588
|
-
var
|
|
589
|
-
if (
|
|
590
|
-
|
|
590
|
+
for (var E = Object.keys(a.props), I = 0; I < E.length; I++) {
|
|
591
|
+
var L = E[I];
|
|
592
|
+
if (L !== "children" && L !== "key") {
|
|
593
|
+
ye(a), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", L), ye(null);
|
|
591
594
|
break;
|
|
592
595
|
}
|
|
593
596
|
}
|
|
594
|
-
|
|
597
|
+
a.ref !== null && (ye(a), b("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
|
|
595
598
|
}
|
|
596
599
|
}
|
|
597
|
-
function
|
|
600
|
+
function rt(a, E, I, L, G, K) {
|
|
598
601
|
{
|
|
599
|
-
var
|
|
600
|
-
if (!
|
|
601
|
-
var
|
|
602
|
-
(
|
|
603
|
-
var
|
|
604
|
-
|
|
605
|
-
var
|
|
606
|
-
|
|
602
|
+
var B = C(a);
|
|
603
|
+
if (!B) {
|
|
604
|
+
var q = "";
|
|
605
|
+
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (q += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
606
|
+
var ie = zt(G);
|
|
607
|
+
ie ? q += ie : q += Ke();
|
|
608
|
+
var te;
|
|
609
|
+
a === null ? te = "null" : He(a) ? te = "array" : a !== void 0 && a.$$typeof === t ? (te = "<" + (S(a.type) || "Unknown") + " />", q = " Did you accidentally export a JSX literal instead of a component?") : te = typeof a, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", te, q);
|
|
607
610
|
}
|
|
608
|
-
var
|
|
609
|
-
if (
|
|
610
|
-
return
|
|
611
|
-
if (
|
|
612
|
-
var
|
|
613
|
-
if (
|
|
614
|
-
if (
|
|
615
|
-
if (
|
|
616
|
-
for (var
|
|
617
|
-
|
|
618
|
-
Object.freeze && Object.freeze(
|
|
611
|
+
var se = Yt(a, E, I, G, K);
|
|
612
|
+
if (se == null)
|
|
613
|
+
return se;
|
|
614
|
+
if (B) {
|
|
615
|
+
var ce = E.children;
|
|
616
|
+
if (ce !== void 0)
|
|
617
|
+
if (L)
|
|
618
|
+
if (He(ce)) {
|
|
619
|
+
for (var Ee = 0; Ee < ce.length; Ee++)
|
|
620
|
+
st(ce[Ee], a);
|
|
621
|
+
Object.freeze && Object.freeze(ce);
|
|
619
622
|
} else
|
|
620
|
-
|
|
623
|
+
b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
621
624
|
else
|
|
622
|
-
|
|
625
|
+
st(ce, a);
|
|
623
626
|
}
|
|
624
|
-
return
|
|
627
|
+
return a === s ? Bt(se) : qt(se), se;
|
|
625
628
|
}
|
|
626
629
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
630
|
+
function Vt(a, E, I) {
|
|
631
|
+
return rt(a, E, I, !0);
|
|
629
632
|
}
|
|
630
|
-
function
|
|
631
|
-
return
|
|
633
|
+
function Ut(a, E, I) {
|
|
634
|
+
return rt(a, E, I, !1);
|
|
632
635
|
}
|
|
633
|
-
var
|
|
634
|
-
|
|
635
|
-
}()),
|
|
636
|
+
var Xt = Ut, Gt = Vt;
|
|
637
|
+
Re.Fragment = s, Re.jsx = Xt, Re.jsxs = Gt;
|
|
638
|
+
}()), Re;
|
|
636
639
|
}
|
|
637
|
-
process.env.NODE_ENV === "production" ?
|
|
638
|
-
var
|
|
639
|
-
|
|
640
|
-
schedulerData:
|
|
640
|
+
process.env.NODE_ENV === "production" ? Ye.exports = cs() : Ye.exports = ds();
|
|
641
|
+
var d = Ye.exports;
|
|
642
|
+
const qe = ({
|
|
643
|
+
schedulerData: R,
|
|
641
644
|
eventItem: t,
|
|
642
645
|
title: e,
|
|
643
|
-
startTime:
|
|
644
|
-
endTime:
|
|
645
|
-
statusColor:
|
|
646
|
-
subtitleGetter:
|
|
647
|
-
viewEventClick:
|
|
648
|
-
viewEventText:
|
|
649
|
-
viewEvent2Click:
|
|
650
|
-
viewEvent2Text:
|
|
651
|
-
eventItemPopoverTemplateResolver:
|
|
652
|
-
}) {
|
|
653
|
-
const {
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */ l.jsx(ee, { span: 22, className: "overflow-text", children: /* @__PURE__ */ l.jsx("span", { className: "header2-text", title: D, children: D }) })
|
|
662
|
-
] }));
|
|
663
|
-
}
|
|
664
|
-
let x = /* @__PURE__ */ l.jsx("div", {});
|
|
665
|
-
if (d !== void 0 && a !== void 0 && (t.clickable1 == null || t.clickable1)) {
|
|
666
|
-
let D = /* @__PURE__ */ l.jsx(ee, { span: 22, children: /* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer" }, onClick: () => a(b, t), children: d }) });
|
|
667
|
-
h !== void 0 && c !== void 0 && (t.clickable2 == null || t.clickable2) && (D = /* @__PURE__ */ l.jsxs(ee, { span: 22, children: [
|
|
668
|
-
/* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer" }, onClick: () => a(b, t), children: d }),
|
|
669
|
-
/* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer", marginLeft: "16px" }, onClick: () => c(b, t), children: h })
|
|
670
|
-
] })), x = /* @__PURE__ */ l.jsxs(ue, { align: "middle", children: [
|
|
671
|
-
/* @__PURE__ */ l.jsx(ee, { span: 2, children: /* @__PURE__ */ l.jsx("div", {}) }),
|
|
672
|
-
D
|
|
673
|
-
] });
|
|
674
|
-
} else if (h !== void 0 && c !== void 0 && (t.clickable2 == null || t.clickable2)) {
|
|
675
|
-
let D = /* @__PURE__ */ l.jsx(ee, { span: 22, children: /* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer" }, onClick: () => c(b, t), children: h }) });
|
|
676
|
-
x = /* @__PURE__ */ l.jsxs(ue, { align: "middle", children: [
|
|
677
|
-
/* @__PURE__ */ l.jsx(ee, { span: 2, children: /* @__PURE__ */ l.jsx("div", {}) }),
|
|
678
|
-
D
|
|
679
|
-
] });
|
|
680
|
-
}
|
|
681
|
-
const v = m.eventItemPopoverDateFormat, k = m.eventItemPopoverShowColor ? /* @__PURE__ */ l.jsx(ee, { span: 2, children: /* @__PURE__ */ l.jsx("div", { className: "status-dot", style: { backgroundColor: i } }) }) : /* @__PURE__ */ l.jsx(l.Fragment, {}), T = /* @__PURE__ */ l.jsxs(ee, { span: 22, children: [
|
|
682
|
-
/* @__PURE__ */ l.jsx("span", { className: "header1-text", children: E.format("HH:mm") }),
|
|
683
|
-
v && /* @__PURE__ */ l.jsx("span", { className: "help-text", style: { marginLeft: "8px" }, children: E.format(v) }),
|
|
684
|
-
/* @__PURE__ */ l.jsx("span", { className: "header2-text", style: { marginLeft: "8px" }, children: "-" }),
|
|
685
|
-
/* @__PURE__ */ l.jsx("span", { className: "header1-text", style: { marginLeft: "8px" }, children: R.format("HH:mm") }),
|
|
686
|
-
v && /* @__PURE__ */ l.jsx("span", { className: "help-text", style: { marginLeft: "8px" }, children: R.format(v) })
|
|
687
|
-
] });
|
|
688
|
-
return /* @__PURE__ */ l.jsxs("div", { style: { width: "300px" }, children: [
|
|
689
|
-
/* @__PURE__ */ l.jsxs(ue, { align: "middle", children: [
|
|
690
|
-
k,
|
|
691
|
-
/* @__PURE__ */ l.jsx(ee, { span: 22, className: "overflow-text", children: /* @__PURE__ */ l.jsx("span", { className: "header2-text", title: e, children: e }) })
|
|
646
|
+
startTime: s,
|
|
647
|
+
endTime: r,
|
|
648
|
+
statusColor: n,
|
|
649
|
+
subtitleGetter: i,
|
|
650
|
+
viewEventClick: o,
|
|
651
|
+
viewEventText: l,
|
|
652
|
+
viewEvent2Click: u,
|
|
653
|
+
viewEvent2Text: c,
|
|
654
|
+
eventItemPopoverTemplateResolver: f
|
|
655
|
+
}) => {
|
|
656
|
+
const { localeDayjs: h, config: v } = R, D = h(new Date(s)), g = h(new Date(r));
|
|
657
|
+
if (f)
|
|
658
|
+
return f(R, t, e, D, g, n);
|
|
659
|
+
const w = i ? i(R, t) : null, T = l && o && (t.clickable1 === void 0 || t.clickable1), b = c && u && (t.clickable2 === void 0 || t.clickable2), k = () => /* @__PURE__ */ d.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer" }, onClick: () => o(R, t), children: l }), A = () => /* @__PURE__ */ d.jsx("span", { className: "header2-text", style: { color: "#108EE9", cursor: "pointer", marginLeft: "16px" }, onClick: () => u(R, t), children: c });
|
|
660
|
+
return /* @__PURE__ */ d.jsxs("div", { style: { width: v.eventItemPopoverWidth }, children: [
|
|
661
|
+
/* @__PURE__ */ d.jsxs(we, { type: "flex", align: "middle", children: [
|
|
662
|
+
v.eventItemPopoverShowColor && /* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("div", { className: "status-dot", style: { backgroundColor: n } }) }),
|
|
663
|
+
/* @__PURE__ */ d.jsx(de, { span: 22, className: "overflow-text", children: /* @__PURE__ */ d.jsx("span", { className: "header2-text", title: e, children: `${e}` }) })
|
|
692
664
|
] }),
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
T
|
|
665
|
+
w && /* @__PURE__ */ d.jsxs(we, { type: "flex", align: "middle", children: [
|
|
666
|
+
/* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("div", {}) }),
|
|
667
|
+
/* @__PURE__ */ d.jsx(de, { span: 22, className: "overflow-text", children: /* @__PURE__ */ d.jsx("span", { className: "header2-text", title: w, children: w }) })
|
|
697
668
|
] }),
|
|
698
|
-
|
|
669
|
+
/* @__PURE__ */ d.jsxs(we, { type: "flex", align: "middle", children: [
|
|
670
|
+
/* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("div", {}) }),
|
|
671
|
+
/* @__PURE__ */ d.jsxs(de, { span: 22, children: [
|
|
672
|
+
/* @__PURE__ */ d.jsx("span", { className: "header1-text", children: D.format("HH:mm") }),
|
|
673
|
+
v.eventItemPopoverDateFormat && /* @__PURE__ */ d.jsx("span", { className: "help-text", style: { marginLeft: "8px" }, children: D.format(v.eventItemPopoverDateFormat) }),
|
|
674
|
+
/* @__PURE__ */ d.jsx("span", { className: "header2-text", style: { marginLeft: "8px" }, children: "-" }),
|
|
675
|
+
/* @__PURE__ */ d.jsx("span", { className: "header1-text", style: { marginLeft: "8px" }, children: g.format("HH:mm") }),
|
|
676
|
+
v.eventItemPopoverDateFormat && /* @__PURE__ */ d.jsx("span", { className: "help-text", style: { marginLeft: "8px" }, children: g.format(v.eventItemPopoverDateFormat) })
|
|
677
|
+
] })
|
|
678
|
+
] }),
|
|
679
|
+
(T || b) && /* @__PURE__ */ d.jsxs(we, { type: "flex", align: "middle", children: [
|
|
680
|
+
/* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("div", {}) }),
|
|
681
|
+
/* @__PURE__ */ d.jsxs(de, { span: 22, children: [
|
|
682
|
+
T && k(),
|
|
683
|
+
b && A()
|
|
684
|
+
] })
|
|
685
|
+
] })
|
|
699
686
|
] });
|
|
700
|
-
}
|
|
701
|
-
Oe.propTypes = {
|
|
702
|
-
schedulerData: u.object.isRequired,
|
|
703
|
-
eventItem: u.object.isRequired,
|
|
704
|
-
title: u.string.isRequired,
|
|
705
|
-
startTime: u.string.isRequired,
|
|
706
|
-
endTime: u.string.isRequired,
|
|
707
|
-
statusColor: u.string.isRequired,
|
|
708
|
-
subtitleGetter: u.func,
|
|
709
|
-
viewEventClick: u.func,
|
|
710
|
-
viewEventText: u.string,
|
|
711
|
-
viewEvent2Click: u.func,
|
|
712
|
-
viewEvent2Text: u.string,
|
|
713
|
-
eventItemPopoverTemplateResolver: u.func
|
|
714
687
|
};
|
|
715
|
-
|
|
716
|
-
|
|
688
|
+
qe.propTypes = {
|
|
689
|
+
schedulerData: p.object.isRequired,
|
|
690
|
+
eventItem: p.object.isRequired,
|
|
691
|
+
title: p.string.isRequired,
|
|
692
|
+
startTime: p.string.isRequired,
|
|
693
|
+
endTime: p.string.isRequired,
|
|
694
|
+
statusColor: p.string.isRequired,
|
|
695
|
+
subtitleGetter: p.func,
|
|
696
|
+
viewEventClick: p.func,
|
|
697
|
+
viewEventText: p.string,
|
|
698
|
+
viewEvent2Click: p.func,
|
|
699
|
+
viewEvent2Text: p.string,
|
|
700
|
+
eventItemPopoverTemplateResolver: p.func
|
|
701
|
+
};
|
|
702
|
+
const ge = "YYYY-MM-DD", V = "YYYY-MM-DD HH:mm:ss", O = { Day: 0, Week: 1, Month: 2, Quarter: 3, Year: 4, Custom: 5, Custom1: 6, Custom2: 7 }, U = { Day: 0, Hour: 1, Week: 2, Month: 3, Year: 4 }, me = { Top: 0, TopRight: 1, TopLeft: 2, Bottom: 3, BottomRight: 4, BottomLeft: 5 }, pe = { EVENT: "event" };
|
|
703
|
+
class Be extends We {
|
|
717
704
|
constructor(e) {
|
|
718
705
|
super(e);
|
|
719
|
-
|
|
720
|
-
const { schedulerData:
|
|
721
|
-
let
|
|
722
|
-
if (
|
|
706
|
+
P(this, "initStartDrag", (e) => {
|
|
707
|
+
const { schedulerData: s, eventItem: r } = this.props;
|
|
708
|
+
let n = s._getEventSlotId(r), i = s.getSlotById(n);
|
|
709
|
+
if (i && i.groupOnly || s._isResizing())
|
|
723
710
|
return;
|
|
724
711
|
e.stopPropagation();
|
|
725
|
-
let
|
|
726
|
-
if (
|
|
712
|
+
let o = 0;
|
|
713
|
+
if (this.supportTouch) {
|
|
727
714
|
if (e.changedTouches.length == 0)
|
|
728
715
|
return;
|
|
729
|
-
|
|
716
|
+
o = e.changedTouches[0].pageX;
|
|
730
717
|
} else {
|
|
731
718
|
if (e.buttons !== void 0 && e.buttons !== 1)
|
|
732
719
|
return;
|
|
733
|
-
|
|
720
|
+
o = e.clientX;
|
|
734
721
|
}
|
|
735
722
|
this.setState({
|
|
736
|
-
startX:
|
|
737
|
-
}),
|
|
723
|
+
startX: o
|
|
724
|
+
}), s._startResizing(), this.supportTouch ? (this.startResizer.addEventListener("touchmove", this.doStartDrag, !1), this.startResizer.addEventListener("touchend", this.stopStartDrag, !1), this.startResizer.addEventListener("touchcancel", this.cancelStartDrag, !1)) : (document.documentElement.addEventListener("mousemove", this.doStartDrag, !1), document.documentElement.addEventListener("mouseup", this.stopStartDrag, !1)), document.onselectstart = function() {
|
|
738
725
|
return !1;
|
|
739
726
|
}, document.ondragstart = function() {
|
|
740
727
|
return !1;
|
|
741
728
|
};
|
|
742
729
|
});
|
|
743
|
-
|
|
730
|
+
P(this, "doStartDrag", (e) => {
|
|
744
731
|
e.stopPropagation();
|
|
745
|
-
let
|
|
746
|
-
if (
|
|
732
|
+
let s = 0;
|
|
733
|
+
if (this.supportTouch) {
|
|
747
734
|
if (e.changedTouches.length == 0)
|
|
748
735
|
return;
|
|
749
|
-
|
|
736
|
+
s = e.changedTouches[0].pageX;
|
|
750
737
|
} else
|
|
751
|
-
|
|
752
|
-
const { left:
|
|
753
|
-
let
|
|
754
|
-
const { startX:
|
|
755
|
-
let
|
|
756
|
-
|
|
738
|
+
s = e.clientX;
|
|
739
|
+
const { left: r, width: n, leftIndex: i, rightIndex: o, schedulerData: l } = this.props;
|
|
740
|
+
let u = l.getContentCellWidth(), c = i > 0 ? 5 : 6, f = u - c, h = o * u - c;
|
|
741
|
+
const { startX: v } = this.state;
|
|
742
|
+
let D = r + s - v, g = n + v - s;
|
|
743
|
+
g < f ? (g = f, D = (o - 1) * u + (o - 1 > 0 ? 2 : 3)) : g > h && (g = h, D = 3), this.setState({ left: D, width: g });
|
|
757
744
|
});
|
|
758
|
-
|
|
759
|
-
e.stopPropagation(),
|
|
760
|
-
const { width:
|
|
761
|
-
if (
|
|
745
|
+
P(this, "stopStartDrag", (e) => {
|
|
746
|
+
e.stopPropagation(), this.supportTouch ? (this.startResizer.removeEventListener("touchmove", this.doStartDrag, !1), this.startResizer.removeEventListener("touchend", this.stopStartDrag, !1), this.startResizer.removeEventListener("touchcancel", this.cancelStartDrag, !1)) : (document.documentElement.removeEventListener("mousemove", this.doStartDrag, !1), document.documentElement.removeEventListener("mouseup", this.stopStartDrag, !1)), document.onselectstart = null, document.ondragstart = null;
|
|
747
|
+
const { width: s, left: r, top: n, leftIndex: i, rightIndex: o, schedulerData: l, eventItem: u, updateEventStart: c, conflictOccurred: f } = this.props;
|
|
748
|
+
if (l._stopResizing(), this.state.width === s)
|
|
762
749
|
return;
|
|
763
|
-
let
|
|
764
|
-
if (
|
|
750
|
+
let h = 0;
|
|
751
|
+
if (this.supportTouch) {
|
|
765
752
|
if (e.changedTouches.length == 0) {
|
|
766
753
|
this.setState({
|
|
767
|
-
left:
|
|
768
|
-
top:
|
|
769
|
-
width:
|
|
754
|
+
left: r,
|
|
755
|
+
top: n,
|
|
756
|
+
width: s
|
|
770
757
|
});
|
|
771
758
|
return;
|
|
772
759
|
}
|
|
773
|
-
|
|
760
|
+
h = e.changedTouches[0].pageX;
|
|
774
761
|
} else
|
|
775
|
-
|
|
776
|
-
const { cellUnit:
|
|
777
|
-
let
|
|
778
|
-
const { startX:
|
|
779
|
-
let
|
|
780
|
-
|
|
781
|
-
let
|
|
782
|
-
if (
|
|
783
|
-
if (
|
|
784
|
-
let
|
|
762
|
+
h = e.clientX;
|
|
763
|
+
const { cellUnit: v, events: D, config: g, localeDayjs: w } = l;
|
|
764
|
+
let T = l.getContentCellWidth(), b = i > 0 ? 5 : 6, k = T - b, A = o * T - b;
|
|
765
|
+
const { startX: $ } = this.state;
|
|
766
|
+
let H = s + $ - h, N = h - $, z = N < 0 ? -1 : N === 0 ? 0 : 1, W = (z > 0 ? Math.floor(Math.abs(N) / T) : Math.ceil(Math.abs(N) / T)) * z;
|
|
767
|
+
H < k ? W = o - i - 1 : H > A && (W = -i);
|
|
768
|
+
let C = w(new Date(u.start)).add(v === U.Hour ? W * g.minuteStep : W, v === U.Hour ? "minutes" : "days").format(V);
|
|
769
|
+
if (W !== 0 && v !== U.Hour && g.displayWeekend === !1)
|
|
770
|
+
if (W > 0) {
|
|
771
|
+
let y = 0, j = 0;
|
|
785
772
|
for (; ; ) {
|
|
786
|
-
|
|
787
|
-
let
|
|
788
|
-
if (
|
|
789
|
-
|
|
773
|
+
j++;
|
|
774
|
+
let m = w(new Date(u.start)).add(j, "days"), M = m.weekday();
|
|
775
|
+
if (M !== 0 && M !== 6 && (y++, y === W)) {
|
|
776
|
+
C = m.format(V);
|
|
790
777
|
break;
|
|
791
778
|
}
|
|
792
779
|
}
|
|
793
780
|
} else {
|
|
794
|
-
let
|
|
781
|
+
let y = 0, j = 0;
|
|
795
782
|
for (; ; ) {
|
|
796
|
-
|
|
797
|
-
let
|
|
798
|
-
if (
|
|
799
|
-
|
|
783
|
+
j--;
|
|
784
|
+
let m = w(new Date(u.start)).add(j, "days"), M = m.weekday();
|
|
785
|
+
if (M !== 0 && M !== 6 && (y--, y === W)) {
|
|
786
|
+
C = m.format(V);
|
|
800
787
|
break;
|
|
801
788
|
}
|
|
802
789
|
}
|
|
803
790
|
}
|
|
804
|
-
let
|
|
805
|
-
if (
|
|
806
|
-
let
|
|
807
|
-
|
|
808
|
-
if (
|
|
809
|
-
let
|
|
810
|
-
(
|
|
791
|
+
let X = !1, Z = l._getEventSlotId(u), S, x = l.getSlotById(Z);
|
|
792
|
+
if (x && (S = x.name), g.checkConflict) {
|
|
793
|
+
let y = w(new Date(C)), j = w(new Date(u.end));
|
|
794
|
+
D.forEach((m) => {
|
|
795
|
+
if (l._getEventSlotId(m) === Z && m.id !== u.id) {
|
|
796
|
+
let M = w(new Date(m.start)), _ = w(new Date(m.end));
|
|
797
|
+
(y >= M && y < _ || j > M && j <= _ || M >= y && M < j || _ > y && _ <= j) && (X = !0);
|
|
811
798
|
}
|
|
812
799
|
});
|
|
813
800
|
}
|
|
814
|
-
|
|
815
|
-
left:
|
|
816
|
-
top:
|
|
817
|
-
width:
|
|
818
|
-
}),
|
|
801
|
+
X ? (this.setState({
|
|
802
|
+
left: r,
|
|
803
|
+
top: n,
|
|
804
|
+
width: s
|
|
805
|
+
}), f != null ? f(l, "StartResize", u, pe.EVENT, Z, S, C, u.end) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it"), this.subscribeResizeEvent(this.props)) : c != null && c(l, u, C);
|
|
819
806
|
});
|
|
820
|
-
|
|
807
|
+
P(this, "cancelStartDrag", (e) => {
|
|
821
808
|
e.stopPropagation(), this.startResizer.removeEventListener("touchmove", this.doStartDrag, !1), this.startResizer.removeEventListener("touchend", this.stopStartDrag, !1), this.startResizer.removeEventListener("touchcancel", this.cancelStartDrag, !1), document.onselectstart = null, document.ondragstart = null;
|
|
822
|
-
const { schedulerData:
|
|
823
|
-
|
|
824
|
-
left:
|
|
825
|
-
top:
|
|
826
|
-
width:
|
|
809
|
+
const { schedulerData: s, left: r, top: n, width: i } = this.props;
|
|
810
|
+
s._stopResizing(), this.setState({
|
|
811
|
+
left: r,
|
|
812
|
+
top: n,
|
|
813
|
+
width: i
|
|
827
814
|
});
|
|
828
815
|
});
|
|
829
|
-
|
|
830
|
-
const { schedulerData:
|
|
831
|
-
let
|
|
832
|
-
if (
|
|
816
|
+
P(this, "initEndDrag", (e) => {
|
|
817
|
+
const { schedulerData: s, eventItem: r } = this.props;
|
|
818
|
+
let n = s._getEventSlotId(r), i = s.getSlotById(n);
|
|
819
|
+
if (i && i.groupOnly || s._isResizing())
|
|
833
820
|
return;
|
|
834
821
|
e.stopPropagation();
|
|
835
|
-
let
|
|
836
|
-
if (
|
|
822
|
+
let o = 0;
|
|
823
|
+
if (this.supportTouch) {
|
|
837
824
|
if (e.changedTouches.length == 0)
|
|
838
825
|
return;
|
|
839
|
-
|
|
826
|
+
o = e.changedTouches[0].pageX;
|
|
840
827
|
} else {
|
|
841
828
|
if (e.buttons !== void 0 && e.buttons !== 1)
|
|
842
829
|
return;
|
|
843
|
-
|
|
830
|
+
o = e.clientX;
|
|
844
831
|
}
|
|
845
832
|
this.setState({
|
|
846
|
-
endX:
|
|
847
|
-
}),
|
|
833
|
+
endX: o
|
|
834
|
+
}), s._startResizing(), this.supportTouch ? (this.endResizer.addEventListener("touchmove", this.doEndDrag, !1), this.endResizer.addEventListener("touchend", this.stopEndDrag, !1), this.endResizer.addEventListener("touchcancel", this.cancelEndDrag, !1)) : (document.documentElement.addEventListener("mousemove", this.doEndDrag, !1), document.documentElement.addEventListener("mouseup", this.stopEndDrag, !1)), document.onselectstart = function() {
|
|
848
835
|
return !1;
|
|
849
836
|
}, document.ondragstart = function() {
|
|
850
837
|
return !1;
|
|
851
838
|
};
|
|
852
839
|
});
|
|
853
|
-
|
|
840
|
+
P(this, "doEndDrag", (e) => {
|
|
854
841
|
e.stopPropagation();
|
|
855
|
-
let
|
|
856
|
-
if (
|
|
842
|
+
let s = 0;
|
|
843
|
+
if (this.supportTouch) {
|
|
857
844
|
if (e.changedTouches.length == 0)
|
|
858
845
|
return;
|
|
859
|
-
|
|
846
|
+
s = e.changedTouches[0].pageX;
|
|
860
847
|
} else
|
|
861
|
-
|
|
862
|
-
const { width:
|
|
863
|
-
let
|
|
864
|
-
const { endX:
|
|
865
|
-
let
|
|
866
|
-
|
|
848
|
+
s = e.clientX;
|
|
849
|
+
const { width: r, leftIndex: n, schedulerData: i } = this.props, { headers: o } = i;
|
|
850
|
+
let l = i.getContentCellWidth(), u = n > 0 ? 5 : 6, c = l - u, f = (o.length - n) * l - u;
|
|
851
|
+
const { endX: h } = this.state;
|
|
852
|
+
let v = r + s - h;
|
|
853
|
+
v < c ? v = c : v > f && (v = f), this.setState({ width: v });
|
|
867
854
|
});
|
|
868
|
-
|
|
869
|
-
e.stopPropagation(),
|
|
870
|
-
const { width:
|
|
871
|
-
if (
|
|
855
|
+
P(this, "stopEndDrag", (e) => {
|
|
856
|
+
e.stopPropagation(), this.supportTouch ? (this.endResizer.removeEventListener("touchmove", this.doEndDrag, !1), this.endResizer.removeEventListener("touchend", this.stopEndDrag, !1), this.endResizer.removeEventListener("touchcancel", this.cancelEndDrag, !1)) : (document.documentElement.removeEventListener("mousemove", this.doEndDrag, !1), document.documentElement.removeEventListener("mouseup", this.stopEndDrag, !1)), document.onselectstart = null, document.ondragstart = null;
|
|
857
|
+
const { width: s, left: r, top: n, leftIndex: i, rightIndex: o, schedulerData: l, eventItem: u, updateEventEnd: c, conflictOccurred: f } = this.props;
|
|
858
|
+
if (l._stopResizing(), this.state.width === s)
|
|
872
859
|
return;
|
|
873
|
-
let
|
|
874
|
-
if (
|
|
860
|
+
let h = 0;
|
|
861
|
+
if (this.supportTouch) {
|
|
875
862
|
if (e.changedTouches.length == 0) {
|
|
876
863
|
this.setState({
|
|
877
|
-
left:
|
|
878
|
-
top:
|
|
879
|
-
width:
|
|
864
|
+
left: r,
|
|
865
|
+
top: n,
|
|
866
|
+
width: s
|
|
880
867
|
});
|
|
881
868
|
return;
|
|
882
869
|
}
|
|
883
|
-
|
|
870
|
+
h = e.changedTouches[0].pageX;
|
|
884
871
|
} else
|
|
885
|
-
|
|
886
|
-
const { headers:
|
|
887
|
-
let
|
|
888
|
-
const { endX:
|
|
889
|
-
let N =
|
|
890
|
-
N <
|
|
891
|
-
let
|
|
892
|
-
if (
|
|
893
|
-
if (
|
|
894
|
-
let
|
|
872
|
+
h = e.clientX;
|
|
873
|
+
const { headers: v, cellUnit: D, events: g, config: w, localeDayjs: T } = l;
|
|
874
|
+
let b = l.getContentCellWidth(), k = i > 0 ? 5 : 6, A = b - k, $ = (v.length - i) * b - k;
|
|
875
|
+
const { endX: H } = this.state;
|
|
876
|
+
let N = s + h - H, z = N - s, W = z < 0 ? -1 : z === 0 ? 0 : 1, C = (W < 0 ? Math.floor(Math.abs(z) / b) : Math.ceil(Math.abs(z) / b)) * W;
|
|
877
|
+
N < A ? C = i - o + 1 : N > $ && (C = v.length - o);
|
|
878
|
+
let X = T(new Date(u.end)).add(D === U.Hour ? C * w.minuteStep : C, D === U.Hour ? "minutes" : "days").format(V);
|
|
879
|
+
if (C !== 0 && D !== U.Hour && w.displayWeekend === !1)
|
|
880
|
+
if (C > 0) {
|
|
881
|
+
let j = 0, m = 0;
|
|
895
882
|
for (; ; ) {
|
|
896
|
-
|
|
897
|
-
let
|
|
898
|
-
if (
|
|
899
|
-
|
|
883
|
+
m++;
|
|
884
|
+
let M = T(new Date(u.end)).add(m, "days"), _ = M.weekday();
|
|
885
|
+
if (_ !== 0 && _ !== 6 && (j++, j === C)) {
|
|
886
|
+
X = M.format(V);
|
|
900
887
|
break;
|
|
901
888
|
}
|
|
902
889
|
}
|
|
903
890
|
} else {
|
|
904
|
-
let
|
|
891
|
+
let j = 0, m = 0;
|
|
905
892
|
for (; ; ) {
|
|
906
|
-
|
|
907
|
-
let
|
|
908
|
-
if (
|
|
909
|
-
|
|
893
|
+
m--;
|
|
894
|
+
let M = T(new Date(u.end)).add(m, "days"), _ = M.weekday();
|
|
895
|
+
if (_ !== 0 && _ !== 6 && (j--, j === C)) {
|
|
896
|
+
X = M.format(V);
|
|
910
897
|
break;
|
|
911
898
|
}
|
|
912
899
|
}
|
|
913
900
|
}
|
|
914
|
-
let
|
|
915
|
-
if (
|
|
916
|
-
let
|
|
917
|
-
|
|
918
|
-
if (
|
|
919
|
-
let
|
|
920
|
-
(
|
|
901
|
+
let Z = !1, S = l._getEventSlotId(u), x, y = l.getSlotById(S);
|
|
902
|
+
if (y && (x = y.name), w.checkConflict) {
|
|
903
|
+
let j = T(new Date(u.start)), m = T(new Date(X));
|
|
904
|
+
g.forEach((M) => {
|
|
905
|
+
if (l._getEventSlotId(M) === S && M.id !== u.id) {
|
|
906
|
+
let _ = T(new Date(M.start)), F = T(new Date(M.end));
|
|
907
|
+
(j >= _ && j < F || m > _ && m <= F || _ >= j && _ < m || F > j && F <= m) && (Z = !0);
|
|
921
908
|
}
|
|
922
909
|
});
|
|
923
910
|
}
|
|
924
|
-
|
|
925
|
-
left:
|
|
926
|
-
top:
|
|
927
|
-
width:
|
|
928
|
-
}),
|
|
911
|
+
Z ? (this.setState({
|
|
912
|
+
left: r,
|
|
913
|
+
top: n,
|
|
914
|
+
width: s
|
|
915
|
+
}), f != null ? f(l, "EndResize", u, pe.EVENT, S, x, u.start, X) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it"), this.subscribeResizeEvent(this.props)) : c != null && c(l, u, X);
|
|
929
916
|
});
|
|
930
|
-
|
|
917
|
+
P(this, "cancelEndDrag", (e) => {
|
|
931
918
|
e.stopPropagation(), this.endResizer.removeEventListener("touchmove", this.doEndDrag, !1), this.endResizer.removeEventListener("touchend", this.stopEndDrag, !1), this.endResizer.removeEventListener("touchcancel", this.cancelEndDrag, !1), document.onselectstart = null, document.ondragstart = null;
|
|
932
|
-
const { schedulerData:
|
|
933
|
-
|
|
934
|
-
left:
|
|
935
|
-
top:
|
|
936
|
-
width:
|
|
919
|
+
const { schedulerData: s, left: r, top: n, width: i } = this.props;
|
|
920
|
+
s._stopResizing(), this.setState({
|
|
921
|
+
left: r,
|
|
922
|
+
top: n,
|
|
923
|
+
width: i
|
|
937
924
|
});
|
|
938
925
|
});
|
|
939
|
-
|
|
940
|
-
const
|
|
941
|
-
|
|
926
|
+
P(this, "handleMouseMove", (e) => {
|
|
927
|
+
const s = this.eventItemRef.current.getBoundingClientRect();
|
|
928
|
+
this.setState({
|
|
929
|
+
contentMousePosX: e.clientX,
|
|
930
|
+
eventItemLeftRect: s.left,
|
|
931
|
+
eventItemRightRect: s.right
|
|
932
|
+
});
|
|
942
933
|
});
|
|
943
|
-
|
|
944
|
-
const { eventItem:
|
|
945
|
-
return
|
|
934
|
+
P(this, "startResizable", (e) => {
|
|
935
|
+
const { eventItem: s, isInPopover: r, schedulerData: n } = e, { config: i } = n;
|
|
936
|
+
return i.startResizable === !0 && r === !1 && (s.resizable == null || s.resizable !== !1) && (s.startResizable == null || s.startResizable !== !1);
|
|
946
937
|
});
|
|
947
|
-
|
|
948
|
-
|
|
938
|
+
P(this, "endResizable", (e) => {
|
|
939
|
+
const { eventItem: s, isInPopover: r, schedulerData: n } = e, { config: i } = n;
|
|
940
|
+
return i.endResizable === !0 && r === !1 && (s.resizable == null || s.resizable !== !1) && (s.endResizable == null || s.endResizable !== !1);
|
|
949
941
|
});
|
|
950
|
-
|
|
942
|
+
P(this, "subscribeResizeEvent", (e) => {
|
|
943
|
+
this.startResizer != null && (this.supportTouch || (this.startResizer.removeEventListener("mousedown", this.initStartDrag, !1), this.startResizable(e) && this.startResizer.addEventListener("mousedown", this.initStartDrag, !1))), this.endResizer != null && (this.supportTouch || (this.endResizer.removeEventListener("mousedown", this.initEndDrag, !1), this.endResizable(e) && this.endResizer.addEventListener("mousedown", this.initEndDrag, !1)));
|
|
944
|
+
});
|
|
945
|
+
const { left: s, top: r, width: n } = e;
|
|
951
946
|
this.state = {
|
|
952
|
-
left:
|
|
953
|
-
top:
|
|
954
|
-
width:
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
width: i
|
|
963
|
-
|
|
947
|
+
left: s,
|
|
948
|
+
top: r,
|
|
949
|
+
width: n,
|
|
950
|
+
contentMousePosX: 0,
|
|
951
|
+
eventItemLeftRect: 0,
|
|
952
|
+
eventItemRightRect: 0
|
|
953
|
+
}, this.startResizer = null, this.endResizer = null, this.supportTouch = !1, this.eventItemRef = ze.createRef(), this._isMounted = !1;
|
|
954
|
+
}
|
|
955
|
+
componentDidUpdate(e, s) {
|
|
956
|
+
if (e !== this.props) {
|
|
957
|
+
const { left: r, top: n, width: i } = this.props;
|
|
958
|
+
this.setState({
|
|
959
|
+
left: r,
|
|
960
|
+
top: n,
|
|
961
|
+
width: i
|
|
962
|
+
}), this.subscribeResizeEvent(this.props);
|
|
963
|
+
}
|
|
964
964
|
}
|
|
965
965
|
componentDidMount() {
|
|
966
|
-
this.subscribeResizeEvent(this.props);
|
|
966
|
+
this._isMounted = !0, this.supportTouch = "ontouchstart" in window, this.subscribeResizeEvent(this.props);
|
|
967
967
|
}
|
|
968
968
|
render() {
|
|
969
|
-
const { eventItem: e, isStart:
|
|
970
|
-
let
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
969
|
+
const { eventItem: e, isStart: s, isEnd: r, isInPopover: n, eventItemClick: i, schedulerData: o, isDragging: l, connectDragSource: u, connectDragPreview: c, eventItemTemplateResolver: f } = this.props, { config: h, localeDayjs: v } = o, { left: D, width: g, top: w } = this.state;
|
|
970
|
+
let T = s ? r ? "round-all" : "round-head" : r ? "round-tail" : "round-none", b = h.defaultEventBgColor;
|
|
971
|
+
const k = h.eventItemPopoverPlacement, A = /(top|bottom)(Right|Left)MousePosition/.test(k);
|
|
972
|
+
e.bgColor && (b = e.bgColor);
|
|
973
|
+
let $ = o.behaviors.getEventTextFunc(o, e), H = /* @__PURE__ */ d.jsx(qe, { ...this.props, eventItem: e, title: e.title, startTime: e.start, endTime: e.end, statusColor: b }), N = v(new Date(e.start)), z = n ? `${N.format("HH:mm")} ${$}` : $, W = /* @__PURE__ */ d.jsx("div", {});
|
|
974
|
+
this.startResizable(this.props) && (W = /* @__PURE__ */ d.jsx("div", { className: "event-resizer event-start-resizer", ref: (m) => this.startResizer = m }));
|
|
975
|
+
let C = /* @__PURE__ */ d.jsx("div", {});
|
|
976
|
+
this.endResizable(this.props) && (C = /* @__PURE__ */ d.jsx("div", { className: "event-resizer event-end-resizer", ref: (m) => this.endResizer = m }));
|
|
977
|
+
let X = /* @__PURE__ */ d.jsx("div", { className: T + " event-item", style: { height: h.eventItemHeight, backgroundColor: b }, children: /* @__PURE__ */ d.jsx("span", { style: { marginLeft: "10px", lineHeight: `${h.eventItemHeight}px` }, children: z }) }, e.id);
|
|
978
|
+
f != null && (X = f(o, e, b, s, r, "event-item", h.eventItemHeight, void 0));
|
|
979
|
+
let Z = /* @__PURE__ */ d.jsxs(
|
|
979
980
|
"a",
|
|
980
981
|
{
|
|
981
982
|
className: "timeline-event",
|
|
982
|
-
|
|
983
|
+
ref: this.eventItemRef,
|
|
984
|
+
onMouseMove: A ? this.handleMouseMove : void 0,
|
|
985
|
+
style: { left: D, width: g, top: w },
|
|
983
986
|
onClick: () => {
|
|
984
|
-
|
|
987
|
+
i && i(o, e);
|
|
985
988
|
},
|
|
986
989
|
children: [
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
+
X,
|
|
991
|
+
W,
|
|
992
|
+
C
|
|
990
993
|
]
|
|
991
994
|
}
|
|
992
995
|
);
|
|
993
|
-
|
|
996
|
+
const S = () => {
|
|
997
|
+
let m = 0, M = "";
|
|
998
|
+
if (A) {
|
|
999
|
+
const _ = k.includes("Left"), F = this.state.contentMousePosX, Q = h.eventItemPopoverWidth, J = this.state.eventItemLeftRect, ee = this.state.eventItemRightRect;
|
|
1000
|
+
let ae = _ ? J : ee, ne = _ ? 1 : -1;
|
|
1001
|
+
M = k.replace("MousePosition", "");
|
|
1002
|
+
const le = 10;
|
|
1003
|
+
_ && this._isMounted ? F + Q + le > window.innerWidth && (M = `${k.replace(/(Right|Left).*/, "")}Right`, ae = ee, ne = -1) : F - Q - le < 0 && (M = `${k.replace(/(Right|Left).*/, "")}Left`, ae = J, ne = 1), m = F - ae - 20 * ne;
|
|
1004
|
+
}
|
|
1005
|
+
return {
|
|
1006
|
+
popoverOffsetX: m,
|
|
1007
|
+
mousePositionPlacement: M
|
|
1008
|
+
};
|
|
1009
|
+
}, { popoverOffsetX: x, mousePositionPlacement: y } = S(), j = h.dragAndDropEnabled ? c(u(Z)) : Z;
|
|
1010
|
+
return l ? null : o._isResizing() || h.eventItemPopoverEnabled == !1 || e.showPopover == !1 ? /* @__PURE__ */ d.jsx("div", { children: j }) : /* @__PURE__ */ d.jsx(
|
|
1011
|
+
Fe,
|
|
1012
|
+
{
|
|
1013
|
+
transitionName: A ? "" : void 0,
|
|
1014
|
+
align: A ? {
|
|
1015
|
+
offset: [x, k.includes("top") ? -10 : 10],
|
|
1016
|
+
overflow: {
|
|
1017
|
+
// shiftX: true,
|
|
1018
|
+
// shiftY: true,
|
|
1019
|
+
}
|
|
1020
|
+
} : void 0,
|
|
1021
|
+
placement: A ? y : k,
|
|
1022
|
+
content: H,
|
|
1023
|
+
trigger: h.eventItemPopoverTrigger,
|
|
1024
|
+
children: j
|
|
1025
|
+
}
|
|
1026
|
+
);
|
|
994
1027
|
}
|
|
995
1028
|
}
|
|
996
|
-
|
|
997
|
-
schedulerData:
|
|
998
|
-
eventItem:
|
|
999
|
-
isStart:
|
|
1000
|
-
isEnd:
|
|
1001
|
-
left:
|
|
1002
|
-
width:
|
|
1003
|
-
top:
|
|
1004
|
-
isInPopover:
|
|
1005
|
-
leftIndex:
|
|
1006
|
-
rightIndex:
|
|
1007
|
-
isDragging:
|
|
1008
|
-
connectDragSource:
|
|
1009
|
-
connectDragPreview:
|
|
1010
|
-
updateEventStart:
|
|
1011
|
-
updateEventEnd:
|
|
1012
|
-
moveEvent:
|
|
1013
|
-
subtitleGetter:
|
|
1014
|
-
eventItemClick:
|
|
1015
|
-
viewEventClick:
|
|
1016
|
-
viewEventText:
|
|
1017
|
-
viewEvent2Click:
|
|
1018
|
-
viewEvent2Text:
|
|
1019
|
-
conflictOccurred:
|
|
1020
|
-
eventItemTemplateResolver:
|
|
1029
|
+
P(Be, "propTypes", {
|
|
1030
|
+
schedulerData: Y.object.isRequired,
|
|
1031
|
+
eventItem: Y.object.isRequired,
|
|
1032
|
+
isStart: Y.bool.isRequired,
|
|
1033
|
+
isEnd: Y.bool.isRequired,
|
|
1034
|
+
left: Y.number.isRequired,
|
|
1035
|
+
width: Y.number.isRequired,
|
|
1036
|
+
top: Y.number.isRequired,
|
|
1037
|
+
isInPopover: Y.bool.isRequired,
|
|
1038
|
+
leftIndex: Y.number.isRequired,
|
|
1039
|
+
rightIndex: Y.number.isRequired,
|
|
1040
|
+
isDragging: Y.bool,
|
|
1041
|
+
connectDragSource: Y.func,
|
|
1042
|
+
connectDragPreview: Y.func,
|
|
1043
|
+
updateEventStart: Y.func,
|
|
1044
|
+
updateEventEnd: Y.func,
|
|
1045
|
+
moveEvent: Y.func,
|
|
1046
|
+
subtitleGetter: Y.func,
|
|
1047
|
+
eventItemClick: Y.func,
|
|
1048
|
+
viewEventClick: Y.func,
|
|
1049
|
+
viewEventText: Y.string,
|
|
1050
|
+
viewEvent2Click: Y.func,
|
|
1051
|
+
viewEvent2Text: Y.string,
|
|
1052
|
+
conflictOccurred: Y.func,
|
|
1053
|
+
eventItemTemplateResolver: Y.func
|
|
1021
1054
|
});
|
|
1022
|
-
class
|
|
1023
|
-
constructor(t, e, r =
|
|
1024
|
-
|
|
1025
|
-
beginDrag: (t, e,
|
|
1026
|
-
endDrag: (t, e,
|
|
1055
|
+
class ht {
|
|
1056
|
+
constructor(t, e, s, r = pe.EVENT) {
|
|
1057
|
+
P(this, "getDragSpec", () => ({
|
|
1058
|
+
beginDrag: (t, e, s) => this.resolveDragObjFunc(t),
|
|
1059
|
+
endDrag: (t, e, s) => {
|
|
1027
1060
|
if (!e.didDrop())
|
|
1028
1061
|
return;
|
|
1029
|
-
const { moveEvent:
|
|
1030
|
-
let
|
|
1031
|
-
|
|
1032
|
-
let k = "New",
|
|
1033
|
-
if (
|
|
1034
|
-
const
|
|
1035
|
-
if (
|
|
1036
|
-
|
|
1037
|
-
else if (
|
|
1038
|
-
let N =
|
|
1039
|
-
|
|
1062
|
+
const { moveEvent: r, newEvent: n, schedulerData: i } = t, { events: o, config: l, viewType: u, localeDayjs: c } = i, f = e.getItem(), h = e.getItemType(), v = e.getDropResult();
|
|
1063
|
+
let D = v.slotId, g = v.slotName, w = v.start, T = v.end, b = v.initialStart;
|
|
1064
|
+
v.initialEnd;
|
|
1065
|
+
let k = "New", A = h === pe.EVENT;
|
|
1066
|
+
if (A) {
|
|
1067
|
+
const H = f;
|
|
1068
|
+
if (l.relativeMove)
|
|
1069
|
+
w = c(H.start).add(c(w).diff(c(new Date(b))), "ms").format(V);
|
|
1070
|
+
else if (u !== O.Day) {
|
|
1071
|
+
let N = c(w);
|
|
1072
|
+
w = c(H.start).year(N.year()).month(N.month()).date(N.date()).format(V);
|
|
1040
1073
|
}
|
|
1041
|
-
if (
|
|
1042
|
-
|
|
1043
|
-
let N =
|
|
1044
|
-
N && (
|
|
1074
|
+
if (T = c(w).add(c(H.end).diff(c(H.start)), "ms").format(V), l.crossResourceMove === !1) {
|
|
1075
|
+
D = i._getEventSlotId(f), g = void 0;
|
|
1076
|
+
let N = i.getSlotById(D);
|
|
1077
|
+
N && (g = N.name);
|
|
1045
1078
|
}
|
|
1046
1079
|
k = "Move";
|
|
1047
1080
|
}
|
|
1048
|
-
let
|
|
1049
|
-
if (
|
|
1050
|
-
let
|
|
1051
|
-
|
|
1052
|
-
if (
|
|
1053
|
-
let
|
|
1054
|
-
(
|
|
1081
|
+
let $ = !1;
|
|
1082
|
+
if (l.checkConflict) {
|
|
1083
|
+
let H = c(w), N = c(T);
|
|
1084
|
+
o.forEach((z) => {
|
|
1085
|
+
if (i._getEventSlotId(z) === D && (!A || z.id !== f.id)) {
|
|
1086
|
+
let W = c(z.start), C = c(z.end);
|
|
1087
|
+
(H >= W && H < C || N > W && N <= C || W >= H && W < N || C > H && C <= N) && ($ = !0);
|
|
1055
1088
|
}
|
|
1056
1089
|
});
|
|
1057
1090
|
}
|
|
1058
|
-
if (
|
|
1059
|
-
const { conflictOccurred:
|
|
1060
|
-
|
|
1091
|
+
if ($) {
|
|
1092
|
+
const { conflictOccurred: H } = t;
|
|
1093
|
+
H != null ? H(i, k, f, h, D, g, w, T) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it");
|
|
1061
1094
|
} else
|
|
1062
|
-
|
|
1095
|
+
A ? r !== void 0 && r(i, f, D, g, w, T) : n !== void 0 && n(i, D, g, w, T, h, f);
|
|
1063
1096
|
},
|
|
1064
1097
|
canDrag: (t) => {
|
|
1065
|
-
const { schedulerData: e, resourceEvents:
|
|
1098
|
+
const { schedulerData: e, resourceEvents: s } = t, r = this.resolveDragObjFunc(t);
|
|
1066
1099
|
if (e._isResizing())
|
|
1067
1100
|
return !1;
|
|
1068
|
-
const { config:
|
|
1069
|
-
return
|
|
1101
|
+
const { config: n } = e;
|
|
1102
|
+
return n.movable && (s == null || !s.groupOnly) && (r.movable == null || r.movable !== !1);
|
|
1070
1103
|
}
|
|
1071
1104
|
}));
|
|
1072
|
-
|
|
1105
|
+
P(this, "getDragCollect", (t, e) => ({
|
|
1073
1106
|
connectDragSource: t.dragSource(),
|
|
1074
1107
|
isDragging: e.isDragging(),
|
|
1075
1108
|
connectDragPreview: t.dragPreview()
|
|
1076
1109
|
}));
|
|
1077
|
-
|
|
1078
|
-
this.resolveDragObjFunc = t, this.DecoratedComponent = e, this.dndType = r, this.dragSource =
|
|
1110
|
+
P(this, "getDragSource", () => this.dragSource);
|
|
1111
|
+
this.resolveDragObjFunc = t, this.DecoratedComponent = e, this.dndType = r, this.dragSource = s ? Kt(this.dndType, this.getDragSpec(), this.getDragCollect)(this.DecoratedComponent) : this.DecoratedComponent;
|
|
1079
1112
|
}
|
|
1080
1113
|
}
|
|
1081
|
-
function
|
|
1082
|
-
let t = 0, e = 0,
|
|
1083
|
-
for (;
|
|
1084
|
-
t +=
|
|
1114
|
+
function Te(R) {
|
|
1115
|
+
let t = 0, e = 0, s = R;
|
|
1116
|
+
for (; s; )
|
|
1117
|
+
t += s.offsetLeft - s.scrollLeft, e += s.offsetTop - s.scrollTop, s = s.offsetParent;
|
|
1085
1118
|
return { x: t, y: e };
|
|
1086
1119
|
}
|
|
1087
|
-
class
|
|
1120
|
+
class us {
|
|
1088
1121
|
constructor(t, e) {
|
|
1089
|
-
|
|
1090
|
-
drop: (t, e,
|
|
1091
|
-
const { schedulerData:
|
|
1092
|
-
let
|
|
1093
|
-
if (
|
|
1094
|
-
const
|
|
1095
|
-
let
|
|
1096
|
-
|
|
1122
|
+
P(this, "getDropSpec", () => ({
|
|
1123
|
+
drop: (t, e, s) => {
|
|
1124
|
+
const { schedulerData: r, resourceEvents: n } = t, { cellUnit: i, localeDayjs: o } = r, l = e.getItemType(), u = Te(s.eventContainer);
|
|
1125
|
+
let c = r.getContentCellWidth(), f = null, h = null;
|
|
1126
|
+
if (l === pe.EVENT) {
|
|
1127
|
+
const T = e.getInitialClientOffset();
|
|
1128
|
+
let b = Math.floor((T.x - u.x) / c);
|
|
1129
|
+
f = n.headerItems[b].start, h = n.headerItems[b].end, i !== U.Hour && (h = o(new Date(n.headerItems[b].start)).hour(23).minute(59).second(59).format(V));
|
|
1097
1130
|
}
|
|
1098
|
-
const
|
|
1099
|
-
let
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
end: C,
|
|
1108
|
-
initialStart: p,
|
|
1109
|
-
initialEnd: f
|
|
1131
|
+
const v = e.getClientOffset();
|
|
1132
|
+
let D = Math.floor((v.x - u.x) / c), g = n.headerItems[D].start, w = n.headerItems[D].end;
|
|
1133
|
+
return i !== U.Hour && (w = o(new Date(n.headerItems[D].start)).hour(23).minute(59).second(59).format(V)), {
|
|
1134
|
+
slotId: n.slotId,
|
|
1135
|
+
slotName: n.slotName,
|
|
1136
|
+
start: g,
|
|
1137
|
+
end: w,
|
|
1138
|
+
initialStart: f,
|
|
1139
|
+
initialEnd: h
|
|
1110
1140
|
};
|
|
1111
1141
|
},
|
|
1112
|
-
hover: (t, e,
|
|
1113
|
-
const { schedulerData:
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1142
|
+
hover: (t, e, s) => {
|
|
1143
|
+
const { schedulerData: r, resourceEvents: n, movingEvent: i } = t, { cellUnit: o, config: l, viewType: u, localeDayjs: c } = r;
|
|
1144
|
+
this.config = l;
|
|
1145
|
+
const f = e.getItem(), h = e.getItemType(), v = Te(s.eventContainer);
|
|
1146
|
+
let D = r.getContentCellWidth(), g = null;
|
|
1147
|
+
if (h === pe.EVENT) {
|
|
1148
|
+
const z = e.getInitialClientOffset();
|
|
1149
|
+
let W = Math.floor((z.x - v.x) / D);
|
|
1150
|
+
g = n.headerItems[W].start, n.headerItems[W].end, o !== U.Hour && c(new Date(n.headerItems[W].start)).hour(23).minute(59).second(59).format(V);
|
|
1119
1151
|
}
|
|
1120
|
-
const
|
|
1121
|
-
let
|
|
1122
|
-
if (!
|
|
1152
|
+
const w = e.getClientOffset();
|
|
1153
|
+
let T = Math.floor((w.x - v.x) / D);
|
|
1154
|
+
if (!n.headerItems[T])
|
|
1123
1155
|
return;
|
|
1124
|
-
let
|
|
1125
|
-
|
|
1126
|
-
let
|
|
1127
|
-
if (
|
|
1128
|
-
const
|
|
1129
|
-
if (
|
|
1130
|
-
|
|
1131
|
-
else if (
|
|
1132
|
-
let
|
|
1133
|
-
|
|
1156
|
+
let b = n.headerItems[T].start, k = n.headerItems[T].end;
|
|
1157
|
+
o !== U.Hour && (k = c(new Date(n.headerItems[T].start)).hour(23).minute(59).second(59).format(V));
|
|
1158
|
+
let A = n.slotId, $ = n.slotName, H = "New";
|
|
1159
|
+
if (h === pe.EVENT) {
|
|
1160
|
+
const z = f;
|
|
1161
|
+
if (l.relativeMove)
|
|
1162
|
+
b = c(z.start).add(c(b).diff(c(new Date(g))), "ms").format(V);
|
|
1163
|
+
else if (u !== O.Day) {
|
|
1164
|
+
let W = c(b);
|
|
1165
|
+
b = c(z.start).year(W.year()).month(W.month()).date(W.date()).format(V);
|
|
1134
1166
|
}
|
|
1135
|
-
if (k =
|
|
1136
|
-
|
|
1137
|
-
let
|
|
1138
|
-
|
|
1167
|
+
if (k = c(b).add(c(z.end).diff(c(z.start)), "ms").format(V), l.crossResourceMove === !1) {
|
|
1168
|
+
A = r._getEventSlotId(f), $ = void 0;
|
|
1169
|
+
let W = r.getSlotById(A);
|
|
1170
|
+
W && ($ = W.name);
|
|
1139
1171
|
}
|
|
1140
|
-
|
|
1172
|
+
H = "Move";
|
|
1141
1173
|
}
|
|
1142
|
-
|
|
1174
|
+
i && i(r, A, $, b, k, H, h, f);
|
|
1143
1175
|
},
|
|
1144
1176
|
canDrop: (t, e) => {
|
|
1145
|
-
const { schedulerData:
|
|
1146
|
-
if (
|
|
1177
|
+
const { schedulerData: s, resourceEvents: r } = t, n = e.getItem();
|
|
1178
|
+
if (s._isResizing())
|
|
1147
1179
|
return !1;
|
|
1148
|
-
const { config:
|
|
1149
|
-
return
|
|
1180
|
+
const { config: i } = s;
|
|
1181
|
+
return i.movable && !r.groupOnly && (n.movable == null || n.movable !== !1);
|
|
1150
1182
|
}
|
|
1151
1183
|
}));
|
|
1152
|
-
|
|
1184
|
+
P(this, "getDropCollect", (t, e) => ({
|
|
1153
1185
|
connectDropTarget: t.dropTarget(),
|
|
1154
1186
|
isOver: e.isOver()
|
|
1155
1187
|
}));
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
this.sourceMap = /* @__PURE__ */ new Map(), t.forEach((
|
|
1159
|
-
this.sourceMap.set(
|
|
1188
|
+
P(this, "getDropTarget", (t) => t ? es([...this.sourceMap.keys()], this.getDropSpec(), this.getDropCollect)(this.DecoratedComponent) : this.DecoratedComponent);
|
|
1189
|
+
P(this, "getDndSource", (t = pe.EVENT) => this.sourceMap.get(t));
|
|
1190
|
+
this.sourceMap = /* @__PURE__ */ new Map(), t.forEach((s) => {
|
|
1191
|
+
this.sourceMap.set(s.dndType, s);
|
|
1160
1192
|
}), this.DecoratedComponent = e;
|
|
1161
1193
|
}
|
|
1162
1194
|
}
|
|
1163
|
-
|
|
1164
|
-
const { renderData:
|
|
1165
|
-
|
|
1166
|
-
},
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
const
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
] })
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1195
|
+
const ft = ({ schedulerData: R, contentScrollbarHeight: t, slotClickedFunc: e, slotItemTemplateResolver: s, toggleExpandFunc: r }) => {
|
|
1196
|
+
const { renderData: n } = R, i = R.getResourceTableWidth() - 2, o = t, l = n.filter((h) => h.render), u = (h) => {
|
|
1197
|
+
r && r(R, h.slotId);
|
|
1198
|
+
}, c = (h, v) => {
|
|
1199
|
+
let D = /* @__PURE__ */ d.jsx("span", { className: "expander-space" }, `es${h.indent}`);
|
|
1200
|
+
h.hasChildren && (D = h.expanded ? /* @__PURE__ */ d.jsx(ss, { style: {}, className: "", onClick: () => u(h) }, `es${h.indent}`) : /* @__PURE__ */ d.jsx(rs, { style: {}, className: "", onClick: () => u(h) }, `es${h.indent}`)), v.push(D);
|
|
1201
|
+
const g = e ? /* @__PURE__ */ d.jsxs("span", { className: "slot-cell", children: [
|
|
1202
|
+
v,
|
|
1203
|
+
/* @__PURE__ */ d.jsx("a", { style: { cursor: "pointer" }, className: "slot-text", onClick: () => e(R, h), children: h.slotName })
|
|
1204
|
+
] }) : /* @__PURE__ */ d.jsxs("span", { className: "slot-cell", children: [
|
|
1205
|
+
v,
|
|
1206
|
+
/* @__PURE__ */ d.jsx("span", { className: "slot-text", style: { cursor: e === void 0 ? void 0 : "pointer" }, children: h.slotName })
|
|
1207
|
+
] });
|
|
1208
|
+
let w = /* @__PURE__ */ d.jsx("div", { title: h.slotName, className: "overflow-text header2-text", style: { textAlign: "left" }, children: g });
|
|
1209
|
+
if (s) {
|
|
1210
|
+
const b = s(R, h, e, i, "overflow-text header2-text");
|
|
1211
|
+
b && (w = b);
|
|
1179
1212
|
}
|
|
1180
|
-
const
|
|
1181
|
-
height:
|
|
1182
|
-
backgroundColor:
|
|
1213
|
+
const T = {
|
|
1214
|
+
height: h.rowHeight,
|
|
1215
|
+
backgroundColor: h.groupOnly ? R.config.groupOnlySlotColor : void 0
|
|
1183
1216
|
};
|
|
1184
|
-
return /* @__PURE__ */
|
|
1185
|
-
}, f =
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
contentScrollbarHeight: u.number.isRequired,
|
|
1191
|
-
slotClickedFunc: u.func,
|
|
1192
|
-
slotItemTemplateResolver: u.func,
|
|
1193
|
-
toggleExpandFunc: u.func
|
|
1194
|
-
};
|
|
1195
|
-
function lt({ schedulerData: b, nonAgendaCellHeaderTemplateResolver: t }) {
|
|
1196
|
-
const { headers: e, cellUnit: r, config: n, localeMoment: i } = b, o = b.getTableHeaderHeight(), a = b.getContentCellWidth(), d = b.getMinuteStepsInHour(), c = typeof t == "function" ? t : null, h = e.map((p, f) => {
|
|
1197
|
-
if (r === O.Hour && f % d !== 0)
|
|
1198
|
-
return /* @__PURE__ */ l.jsx(l.Fragment, {});
|
|
1199
|
-
const { time: m, nonWorkingTime: E } = p, R = i(m);
|
|
1200
|
-
let C = {};
|
|
1201
|
-
r === O.Hour ? (C = E ? { width: a * d, color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : { width: a * d }, f === e.length - d && (C = E ? { color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadColor } : {})) : (C = E ? { width: a, color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : { width: a }, f === e.length - 1 && (C = p.nonWorkingTime ? { color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : {}));
|
|
1202
|
-
let x;
|
|
1203
|
-
switch (r) {
|
|
1204
|
-
case O.Hour:
|
|
1205
|
-
x = n.nonAgendaDayCellHeaderFormat;
|
|
1206
|
-
break;
|
|
1207
|
-
case O.Week:
|
|
1208
|
-
x = n.nonAgendaWeekCellHeaderFormat;
|
|
1209
|
-
break;
|
|
1210
|
-
case O.Month:
|
|
1211
|
-
x = n.nonAgendaMonthCellHeaderFormat;
|
|
1212
|
-
break;
|
|
1213
|
-
case O.Year:
|
|
1214
|
-
x = n.nonAgendaYearCellHeaderFormat;
|
|
1215
|
-
break;
|
|
1216
|
-
default:
|
|
1217
|
-
x = n.nonAgendaOtherCellHeaderFormat;
|
|
1218
|
-
break;
|
|
1219
|
-
}
|
|
1220
|
-
const v = x.split("|").map((D) => R.format(D)), k = v.map((D, j) => /* @__PURE__ */ l.jsx("div", { children: D }, j));
|
|
1221
|
-
return c ? c(b, p, v, C) : /* @__PURE__ */ l.jsx("th", { className: "header3-text", style: C, children: /* @__PURE__ */ l.jsx("div", { children: k }) }, m);
|
|
1217
|
+
return /* @__PURE__ */ d.jsx("tr", { children: /* @__PURE__ */ d.jsx("td", { "data-resource-id": h.slotId, style: T, children: w }) }, h.slotId);
|
|
1218
|
+
}, f = l.map((h) => {
|
|
1219
|
+
const v = [];
|
|
1220
|
+
for (let D = 0; D < h.indent; D++)
|
|
1221
|
+
v.push(/* @__PURE__ */ d.jsx("span", { className: "expander-space" }, `es${D}`));
|
|
1222
|
+
return c(h, v);
|
|
1222
1223
|
});
|
|
1223
|
-
return /* @__PURE__ */
|
|
1224
|
-
}
|
|
1225
|
-
lt.propTypes = {
|
|
1226
|
-
schedulerData: u.object.isRequired,
|
|
1227
|
-
nonAgendaCellHeaderTemplateResolver: u.func
|
|
1224
|
+
return /* @__PURE__ */ d.jsx("div", { style: { paddingBottom: o }, children: /* @__PURE__ */ d.jsx("table", { className: "resource-table", children: /* @__PURE__ */ d.jsx("tbody", { children: f }) }) });
|
|
1228
1225
|
};
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1226
|
+
ft.propTypes = {
|
|
1227
|
+
schedulerData: p.object.isRequired,
|
|
1228
|
+
contentScrollbarHeight: p.number.isRequired,
|
|
1229
|
+
slotClickedFunc: p.func,
|
|
1230
|
+
slotItemTemplateResolver: p.func,
|
|
1231
|
+
toggleExpandFunc: p.func
|
|
1232
|
+
};
|
|
1233
|
+
class pt extends We {
|
|
1234
|
+
constructor(t) {
|
|
1235
|
+
super(t);
|
|
1236
|
+
}
|
|
1237
|
+
render() {
|
|
1238
|
+
const { schedulerData: t, nonAgendaCellHeaderTemplateResolver: e } = this.props, { headers: s, cellUnit: r, config: n, localeDayjs: i } = t;
|
|
1239
|
+
let o = t.getTableHeaderHeight(), l = t.getContentCellWidth(), u = t.getMinuteStepsInHour(), c = [], f = {};
|
|
1240
|
+
return r === U.Hour ? s.forEach((h, v) => {
|
|
1241
|
+
if (v % u === 0) {
|
|
1242
|
+
let D = i(new Date(h.time));
|
|
1243
|
+
D.isSame(/* @__PURE__ */ new Date(), "hour"), f = h.nonWorkingTime ? {
|
|
1244
|
+
width: l * u,
|
|
1245
|
+
color: n.nonWorkingTimeHeadColor,
|
|
1246
|
+
backgroundColor: n.nonWorkingTimeHeadBgColor
|
|
1247
|
+
} : {
|
|
1248
|
+
width: l * u
|
|
1249
|
+
}, v === s.length - u && (f = h.nonWorkingTime ? { color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : {});
|
|
1250
|
+
let g = n.nonAgendaDayCellHeaderFormat.split("|").map((T) => D.format(T)), w;
|
|
1251
|
+
if (typeof e == "function")
|
|
1252
|
+
w = e(t, h, g, f);
|
|
1253
|
+
else {
|
|
1254
|
+
const T = g.map((b, k) => /* @__PURE__ */ d.jsx("div", { children: b }, k));
|
|
1255
|
+
w = /* @__PURE__ */ d.jsx("th", { className: "header3-text", style: f, children: /* @__PURE__ */ d.jsx("div", { children: T }) }, h.time);
|
|
1256
|
+
}
|
|
1257
|
+
c.push(w);
|
|
1238
1258
|
}
|
|
1239
|
-
|
|
1259
|
+
}) : c = s.map((h, v) => {
|
|
1260
|
+
let D = i(new Date(h.time));
|
|
1261
|
+
f = h.nonWorkingTime ? {
|
|
1262
|
+
width: l,
|
|
1263
|
+
color: n.nonWorkingTimeHeadColor,
|
|
1264
|
+
backgroundColor: n.nonWorkingTimeHeadBgColor
|
|
1265
|
+
} : { width: l }, v === s.length - 1 && (f = h.nonWorkingTime ? { color: n.nonWorkingTimeHeadColor, backgroundColor: n.nonWorkingTimeHeadBgColor } : {});
|
|
1266
|
+
let w = (r === U.Week ? n.nonAgendaWeekCellHeaderFormat : r === U.Month ? n.nonAgendaMonthCellHeaderFormat : r === U.Year ? n.nonAgendaYearCellHeaderFormat : n.nonAgendaOtherCellHeaderFormat).split("|").map((b) => D.format(b));
|
|
1267
|
+
if (typeof e == "function")
|
|
1268
|
+
return e(t, h, w, f);
|
|
1269
|
+
const T = w.map((b, k) => /* @__PURE__ */ d.jsx("div", { children: b }, k));
|
|
1270
|
+
return /* @__PURE__ */ d.jsx("th", { className: "header3-text", style: f, children: /* @__PURE__ */ d.jsx("div", { children: T }) }, h.time);
|
|
1271
|
+
}), /* @__PURE__ */ d.jsx("thead", { children: /* @__PURE__ */ d.jsx("tr", { style: { height: o }, children: c }) });
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
P(pt, "propTypes", {
|
|
1275
|
+
schedulerData: Y.object.isRequired,
|
|
1276
|
+
nonAgendaCellHeaderTemplateResolver: Y.func
|
|
1277
|
+
});
|
|
1278
|
+
function gt({ schedulerData: R }) {
|
|
1279
|
+
const { renderData: t, headers: e, config: s, behaviors: r } = R, n = R.getContentCellWidth(), i = t.filter((o) => o.render).map(({ slotId: o, groupOnly: l, rowHeight: u }) => {
|
|
1280
|
+
const c = e.map((f, h) => {
|
|
1281
|
+
const v = `${o}_${f.time}`, D = h === e.length - 1 ? {} : { width: n };
|
|
1282
|
+
if (f.nonWorkingTime && (D.backgroundColor = s.nonWorkingTimeBodyBgColor), l && (D.backgroundColor = s.groupOnlySlotColor), r.getNonAgendaViewBodyCellBgColorFunc) {
|
|
1283
|
+
const g = r.getNonAgendaViewBodyCellBgColorFunc(R, o, f);
|
|
1284
|
+
g && (D.backgroundColor = g);
|
|
1285
|
+
}
|
|
1286
|
+
return /* @__PURE__ */ d.jsx("td", { style: D, children: /* @__PURE__ */ d.jsx("div", {}) }, v);
|
|
1240
1287
|
});
|
|
1241
|
-
return /* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ d.jsx("tr", { style: { height: u }, children: c }, o);
|
|
1242
1289
|
});
|
|
1243
|
-
return /* @__PURE__ */
|
|
1290
|
+
return /* @__PURE__ */ d.jsx("tbody", { children: i });
|
|
1244
1291
|
}
|
|
1245
|
-
|
|
1246
|
-
schedulerData:
|
|
1292
|
+
gt.propTypes = {
|
|
1293
|
+
schedulerData: p.object.isRequired
|
|
1247
1294
|
};
|
|
1248
|
-
|
|
1249
|
-
const { config:
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
headerItem: u.object.isRequired
|
|
1295
|
+
const vt = ({ schedulerData: R, number: t, left: e, width: s, top: r, clickAction: n, headerItem: i }) => {
|
|
1296
|
+
const { config: o } = R, l = `+${t} more`;
|
|
1297
|
+
return /* @__PURE__ */ d.jsx("a", { className: "timeline-event", style: { left: e, width: s, top: r }, onClick: () => n(i), children: /* @__PURE__ */ d.jsx("div", { style: { height: o.eventItemHeight, color: "#999", textAlign: "center" }, children: l }) });
|
|
1298
|
+
};
|
|
1299
|
+
vt.propTypes = {
|
|
1300
|
+
schedulerData: p.object.isRequired,
|
|
1301
|
+
number: p.number.isRequired,
|
|
1302
|
+
left: p.number.isRequired,
|
|
1303
|
+
width: p.number.isRequired,
|
|
1304
|
+
top: p.number.isRequired,
|
|
1305
|
+
clickAction: p.func.isRequired,
|
|
1306
|
+
headerItem: p.object.isRequired
|
|
1261
1307
|
};
|
|
1262
|
-
|
|
1263
|
-
const { config:
|
|
1264
|
-
let
|
|
1265
|
-
|
|
1266
|
-
const
|
|
1267
|
-
height:
|
|
1268
|
-
color:
|
|
1269
|
-
textAlign:
|
|
1270
|
-
|
|
1271
|
-
|
|
1308
|
+
const mt = ({ schedulerData: R, summary: t, left: e, width: s, top: r }) => {
|
|
1309
|
+
const { config: n } = R, i = t.color !== void 0 ? t.color : n.summaryColor;
|
|
1310
|
+
let o = "center";
|
|
1311
|
+
n.summaryPos === me.TopRight || n.summaryPos === me.BottomRight ? o = "right" : (n.summaryPos === me.TopLeft || n.summaryPos === me.BottomLeft) && (o = "left");
|
|
1312
|
+
const l = {
|
|
1313
|
+
height: n.eventItemHeight,
|
|
1314
|
+
color: i,
|
|
1315
|
+
textAlign: o,
|
|
1316
|
+
marginLeft: "6px",
|
|
1317
|
+
marginRight: "6px",
|
|
1318
|
+
...t.fontSize !== void 0 ? { fontSize: t.fontSize } : {}
|
|
1272
1319
|
};
|
|
1273
|
-
return /* @__PURE__ */
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
schedulerData:
|
|
1277
|
-
summary:
|
|
1278
|
-
left:
|
|
1279
|
-
width:
|
|
1280
|
-
top:
|
|
1320
|
+
return /* @__PURE__ */ d.jsx("a", { className: "timeline-event header2-text", style: { left: e, width: s, top: r, cursor: "default" }, children: /* @__PURE__ */ d.jsx("div", { style: l, children: t.text }) });
|
|
1321
|
+
};
|
|
1322
|
+
mt.propTypes = {
|
|
1323
|
+
schedulerData: p.object.isRequired,
|
|
1324
|
+
summary: p.object.isRequired,
|
|
1325
|
+
left: p.number.isRequired,
|
|
1326
|
+
width: p.number.isRequired,
|
|
1327
|
+
top: p.number.isRequired
|
|
1281
1328
|
};
|
|
1282
|
-
|
|
1283
|
-
const { config:
|
|
1284
|
-
left:
|
|
1329
|
+
const Dt = ({ left: R, width: t, schedulerData: e }) => {
|
|
1330
|
+
const { config: s } = e, r = {
|
|
1331
|
+
left: R,
|
|
1285
1332
|
width: t,
|
|
1286
1333
|
top: 0,
|
|
1287
1334
|
bottom: 0,
|
|
1288
|
-
backgroundColor:
|
|
1335
|
+
backgroundColor: s.selectedAreaColor
|
|
1289
1336
|
};
|
|
1290
|
-
return /* @__PURE__ */
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
schedulerData:
|
|
1294
|
-
left:
|
|
1295
|
-
width:
|
|
1337
|
+
return /* @__PURE__ */ d.jsx("div", { className: "selected-area", style: r });
|
|
1338
|
+
};
|
|
1339
|
+
Dt.propTypes = {
|
|
1340
|
+
schedulerData: p.object.isRequired,
|
|
1341
|
+
left: p.number.isRequired,
|
|
1342
|
+
width: p.number.isRequired
|
|
1296
1343
|
};
|
|
1297
|
-
|
|
1298
|
-
class ft extends _e {
|
|
1344
|
+
class yt extends We {
|
|
1299
1345
|
constructor(e) {
|
|
1300
1346
|
super(e);
|
|
1301
|
-
|
|
1302
|
-
const { isSelecting:
|
|
1303
|
-
if (
|
|
1347
|
+
P(this, "initDrag", (e) => {
|
|
1348
|
+
const { isSelecting: s } = this.state;
|
|
1349
|
+
if (s || (e.srcElement || e.target) !== this.eventContainer)
|
|
1304
1350
|
return;
|
|
1305
1351
|
e.stopPropagation();
|
|
1306
|
-
const { resourceEvents:
|
|
1307
|
-
if (
|
|
1352
|
+
const { resourceEvents: r } = this.props;
|
|
1353
|
+
if (r.groupOnly)
|
|
1308
1354
|
return;
|
|
1309
|
-
let
|
|
1310
|
-
if (
|
|
1355
|
+
let n = 0;
|
|
1356
|
+
if (this.supportTouch) {
|
|
1311
1357
|
if (e.changedTouches.length == 0)
|
|
1312
1358
|
return;
|
|
1313
|
-
|
|
1359
|
+
n = e.changedTouches[0].pageX;
|
|
1314
1360
|
} else {
|
|
1315
1361
|
if (e.buttons !== void 0 && e.buttons !== 1)
|
|
1316
1362
|
return;
|
|
1317
|
-
|
|
1363
|
+
n = e.clientX;
|
|
1318
1364
|
}
|
|
1319
|
-
const { schedulerData:
|
|
1320
|
-
let
|
|
1365
|
+
const { schedulerData: i } = this.props;
|
|
1366
|
+
let o = i.getContentCellWidth(), l = Te(this.eventContainer), u = n - l.x, c = Math.floor(u / o), f = c * o, h = Math.ceil(u / o), v = (h - c) * o;
|
|
1321
1367
|
this.setState({
|
|
1322
|
-
startX:
|
|
1323
|
-
left:
|
|
1324
|
-
leftIndex:
|
|
1325
|
-
width:
|
|
1326
|
-
rightIndex:
|
|
1368
|
+
startX: u,
|
|
1369
|
+
left: f,
|
|
1370
|
+
leftIndex: c,
|
|
1371
|
+
width: v,
|
|
1372
|
+
rightIndex: h,
|
|
1327
1373
|
isSelecting: !0
|
|
1328
|
-
}),
|
|
1374
|
+
}), this.supportTouch ? (document.documentElement.addEventListener("touchmove", this.doDrag, !1), document.documentElement.addEventListener("touchend", this.stopDrag, !1), document.documentElement.addEventListener("touchcancel", this.cancelDrag, !1)) : (document.documentElement.addEventListener("mousemove", this.doDrag, !1), document.documentElement.addEventListener("mouseup", this.stopDrag, !1)), document.onselectstart = function() {
|
|
1329
1375
|
return !1;
|
|
1330
1376
|
}, document.ondragstart = function() {
|
|
1331
1377
|
return !1;
|
|
1332
1378
|
};
|
|
1333
1379
|
});
|
|
1334
|
-
|
|
1380
|
+
P(this, "doDrag", (e) => {
|
|
1335
1381
|
e.stopPropagation();
|
|
1336
|
-
let
|
|
1337
|
-
if (
|
|
1382
|
+
let s = 0;
|
|
1383
|
+
if (this.supportTouch) {
|
|
1338
1384
|
if (e.changedTouches.length == 0)
|
|
1339
1385
|
return;
|
|
1340
|
-
|
|
1386
|
+
s = e.changedTouches[0].pageX;
|
|
1341
1387
|
} else
|
|
1342
|
-
|
|
1343
|
-
const { startX:
|
|
1344
|
-
let
|
|
1345
|
-
|
|
1346
|
-
let
|
|
1347
|
-
|
|
1348
|
-
let
|
|
1388
|
+
s = e.clientX;
|
|
1389
|
+
const { startX: r } = this.state, { schedulerData: n } = this.props, { headers: i } = n;
|
|
1390
|
+
let o = n.getContentCellWidth(), l = Te(this.eventContainer), u = s - l.x, c = Math.floor(Math.min(r, u) / o);
|
|
1391
|
+
c = c < 0 ? 0 : c;
|
|
1392
|
+
let f = c * o, h = Math.ceil(Math.max(r, u) / o);
|
|
1393
|
+
h = h > i.length ? i.length : h;
|
|
1394
|
+
let v = (h - c) * o;
|
|
1349
1395
|
this.setState({
|
|
1350
|
-
leftIndex:
|
|
1351
|
-
left:
|
|
1352
|
-
rightIndex:
|
|
1353
|
-
width:
|
|
1396
|
+
leftIndex: c,
|
|
1397
|
+
left: f,
|
|
1398
|
+
rightIndex: h,
|
|
1399
|
+
width: v,
|
|
1354
1400
|
isSelecting: !0
|
|
1355
1401
|
});
|
|
1356
1402
|
});
|
|
1357
|
-
|
|
1403
|
+
P(this, "stopDrag", (e) => {
|
|
1358
1404
|
e.stopPropagation();
|
|
1359
|
-
const { schedulerData:
|
|
1360
|
-
|
|
1361
|
-
let
|
|
1362
|
-
|
|
1363
|
-
let
|
|
1405
|
+
const { schedulerData: s, newEvent: r, resourceEvents: n } = this.props, { headers: i, events: o, config: l, cellUnit: u, localeDayjs: c } = s, { leftIndex: f, rightIndex: h } = this.state;
|
|
1406
|
+
this.supportTouch ? (document.documentElement.removeEventListener("touchmove", this.doDrag, !1), document.documentElement.removeEventListener("touchend", this.stopDrag, !1), document.documentElement.removeEventListener("touchcancel", this.cancelDrag, !1)) : (document.documentElement.removeEventListener("mousemove", this.doDrag, !1), document.documentElement.removeEventListener("mouseup", this.stopDrag, !1)), document.onselectstart = null, document.ondragstart = null;
|
|
1407
|
+
let v = i[f].time, D = n.headerItems[h - 1].end;
|
|
1408
|
+
u !== U.Hour && (D = c(new Date(n.headerItems[h - 1].start)).hour(23).minute(59).second(59).format(V));
|
|
1409
|
+
let g = n.slotId, w = n.slotName;
|
|
1364
1410
|
this.setState({
|
|
1365
1411
|
startX: 0,
|
|
1366
1412
|
leftIndex: 0,
|
|
@@ -1369,42 +1415,42 @@ class ft extends _e {
|
|
|
1369
1415
|
width: 0,
|
|
1370
1416
|
isSelecting: !1
|
|
1371
1417
|
});
|
|
1372
|
-
let
|
|
1373
|
-
if (
|
|
1374
|
-
let
|
|
1375
|
-
|
|
1376
|
-
if (
|
|
1377
|
-
let
|
|
1378
|
-
(
|
|
1418
|
+
let T = !1;
|
|
1419
|
+
if (l.checkConflict) {
|
|
1420
|
+
let b = c(new Date(v)), k = c(D);
|
|
1421
|
+
o.forEach((A) => {
|
|
1422
|
+
if (s._getEventSlotId(A) === g) {
|
|
1423
|
+
let $ = c(A.start), H = c(A.end);
|
|
1424
|
+
(b >= $ && b < H || k > $ && k <= H || $ >= b && $ < k || H > b && H <= k) && (T = !0);
|
|
1379
1425
|
}
|
|
1380
1426
|
});
|
|
1381
1427
|
}
|
|
1382
|
-
if (
|
|
1383
|
-
const { conflictOccurred:
|
|
1384
|
-
|
|
1385
|
-
|
|
1428
|
+
if (T) {
|
|
1429
|
+
const { conflictOccurred: b } = this.props;
|
|
1430
|
+
b != null ? b(
|
|
1431
|
+
s,
|
|
1386
1432
|
"New",
|
|
1387
1433
|
{
|
|
1388
1434
|
id: void 0,
|
|
1389
|
-
start:
|
|
1390
|
-
end:
|
|
1391
|
-
slotId:
|
|
1392
|
-
slotName:
|
|
1435
|
+
start: v,
|
|
1436
|
+
end: D,
|
|
1437
|
+
slotId: g,
|
|
1438
|
+
slotName: w,
|
|
1393
1439
|
title: void 0
|
|
1394
1440
|
},
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1441
|
+
pe.EVENT,
|
|
1442
|
+
g,
|
|
1443
|
+
w,
|
|
1444
|
+
v,
|
|
1445
|
+
D
|
|
1400
1446
|
) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it");
|
|
1401
1447
|
} else
|
|
1402
|
-
|
|
1448
|
+
r != null && r(s, g, w, v, D);
|
|
1403
1449
|
});
|
|
1404
|
-
|
|
1450
|
+
P(this, "cancelDrag", (e) => {
|
|
1405
1451
|
e.stopPropagation();
|
|
1406
|
-
const { isSelecting:
|
|
1407
|
-
|
|
1452
|
+
const { isSelecting: s } = this.state;
|
|
1453
|
+
s && (document.documentElement.removeEventListener("touchmove", this.doDrag, !1), document.documentElement.removeEventListener("touchend", this.stopDrag, !1), document.documentElement.removeEventListener("touchcancel", this.cancelDrag, !1), document.onselectstart = null, document.ondragstart = null, this.setState({
|
|
1408
1454
|
startX: 0,
|
|
1409
1455
|
leftIndex: 0,
|
|
1410
1456
|
left: 0,
|
|
@@ -1413,236 +1459,580 @@ class ft extends _e {
|
|
|
1413
1459
|
isSelecting: !1
|
|
1414
1460
|
}));
|
|
1415
1461
|
});
|
|
1416
|
-
|
|
1417
|
-
const { onSetAddMoreState:
|
|
1418
|
-
if (
|
|
1419
|
-
const { config:
|
|
1420
|
-
let
|
|
1421
|
-
if (
|
|
1422
|
-
let
|
|
1423
|
-
|
|
1424
|
-
let
|
|
1425
|
-
|
|
1462
|
+
P(this, "onAddMoreClick", (e) => {
|
|
1463
|
+
const { onSetAddMoreState: s, resourceEvents: r, schedulerData: n } = this.props;
|
|
1464
|
+
if (s) {
|
|
1465
|
+
const { config: i } = n;
|
|
1466
|
+
let o = n.getContentCellWidth(), l = r.headerItems.indexOf(e);
|
|
1467
|
+
if (l !== -1) {
|
|
1468
|
+
let u = l * (o - 1), c = Te(this.eventContainer);
|
|
1469
|
+
u = u + c.x;
|
|
1470
|
+
let f = c.y, h = (e.count + 1) * i.eventItemLineHeight + 20;
|
|
1471
|
+
s({
|
|
1426
1472
|
headerItem: e,
|
|
1427
|
-
left:
|
|
1428
|
-
top:
|
|
1429
|
-
height:
|
|
1473
|
+
left: u,
|
|
1474
|
+
top: f,
|
|
1475
|
+
height: h
|
|
1430
1476
|
});
|
|
1431
1477
|
}
|
|
1432
1478
|
}
|
|
1433
1479
|
});
|
|
1434
|
-
|
|
1480
|
+
P(this, "eventContainerRef", (e) => {
|
|
1435
1481
|
this.eventContainer = e;
|
|
1436
1482
|
});
|
|
1437
1483
|
this.state = {
|
|
1438
1484
|
isSelecting: !1,
|
|
1439
1485
|
left: 0,
|
|
1440
1486
|
width: 0
|
|
1441
|
-
};
|
|
1487
|
+
}, this.supportTouch = !1;
|
|
1442
1488
|
}
|
|
1443
1489
|
componentDidMount() {
|
|
1444
|
-
const { schedulerData: e } = this.props, { config:
|
|
1445
|
-
|
|
1490
|
+
const { schedulerData: e } = this.props, { config: s } = e;
|
|
1491
|
+
this.supportTouch = "ontouchstart" in window, s.creatable === !0 && (this.supportTouch || this.eventContainer.addEventListener("mousedown", this.initDrag, !1));
|
|
1446
1492
|
}
|
|
1447
|
-
|
|
1448
|
-
|
|
1493
|
+
componentDidUpdate(e, s) {
|
|
1494
|
+
e !== this.props && (this.supportTouch || this.eventContainer.removeEventListener("mousedown", this.initDrag, !1), this.props.schedulerData.config.creatable && (this.supportTouch || this.eventContainer.addEventListener("mousedown", this.initDrag, !1)));
|
|
1449
1495
|
}
|
|
1450
1496
|
render() {
|
|
1451
|
-
const { resourceEvents: e, schedulerData:
|
|
1452
|
-
let
|
|
1453
|
-
|
|
1454
|
-
if (
|
|
1455
|
-
let
|
|
1456
|
-
if (
|
|
1457
|
-
if (
|
|
1458
|
-
let
|
|
1459
|
-
|
|
1460
|
-
let
|
|
1461
|
-
|
|
1497
|
+
const { resourceEvents: e, schedulerData: s, connectDropTarget: r, dndSource: n } = this.props, { cellUnit: i, startDate: o, endDate: l, config: u, localeDayjs: c } = s, { isSelecting: f, left: h, width: v } = this.state;
|
|
1498
|
+
let D = s.getContentCellWidth(), g = s.getCellMaxEvents(), w = s.getContentTableWidth(), T = n.getDragSource(), b = f ? /* @__PURE__ */ d.jsx(Dt, { ...this.props, left: h, width: v }) : /* @__PURE__ */ d.jsx("div", {}), k = [];
|
|
1499
|
+
e.headerItems.forEach(($, H) => {
|
|
1500
|
+
if ($.count > 0 || $.summary != null) {
|
|
1501
|
+
let N = u.summaryPos === me.TopRight || u.summaryPos === me.Top || u.summaryPos === me.TopLeft, z = e.hasSummary && N ? 1 + u.eventItemLineHeight : 1, W = $.addMore === 0 ? g : $.addMoreIndex;
|
|
1502
|
+
if ($.events.forEach((C, X) => {
|
|
1503
|
+
if (X < W && C !== void 0 && C.render) {
|
|
1504
|
+
let Z = c(new Date(o)), S = c(l).add(1, "days");
|
|
1505
|
+
i === U.Hour && (Z = c(new Date(o)).add(u.dayStartFrom, "hours"), S = c(l).add(u.dayStopTo + 1, "hours"));
|
|
1506
|
+
let x = c(C.eventItem.start), y = c(C.eventItem.end), j = x >= Z, m = y <= S, M = H * D + (H > 0 ? 2 : 3), _ = C.span * D - (H > 0 ? 5 : 6) > 0 ? C.span * D - (H > 0 ? 5 : 6) : 0, F = z + X * u.eventItemLineHeight, Q = /* @__PURE__ */ be(
|
|
1507
|
+
T,
|
|
1462
1508
|
{
|
|
1463
1509
|
...this.props,
|
|
1464
|
-
key:
|
|
1465
|
-
eventItem:
|
|
1466
|
-
isStart:
|
|
1467
|
-
isEnd:
|
|
1510
|
+
key: C.eventItem.id,
|
|
1511
|
+
eventItem: C.eventItem,
|
|
1512
|
+
isStart: j,
|
|
1513
|
+
isEnd: m,
|
|
1468
1514
|
isInPopover: !1,
|
|
1469
|
-
left:
|
|
1470
|
-
width:
|
|
1471
|
-
top:
|
|
1472
|
-
leftIndex:
|
|
1473
|
-
rightIndex:
|
|
1515
|
+
left: M,
|
|
1516
|
+
width: _,
|
|
1517
|
+
top: F,
|
|
1518
|
+
leftIndex: H,
|
|
1519
|
+
rightIndex: H + C.span
|
|
1474
1520
|
}
|
|
1475
1521
|
);
|
|
1476
|
-
k.push(
|
|
1522
|
+
k.push(Q);
|
|
1477
1523
|
}
|
|
1478
|
-
}),
|
|
1479
|
-
let
|
|
1480
|
-
|
|
1524
|
+
}), $.addMore > 0) {
|
|
1525
|
+
let C = H * D + (H > 0 ? 2 : 3), X = D - (H > 0 ? 5 : 6), Z = z + $.addMoreIndex * u.eventItemLineHeight, S = /* @__PURE__ */ be(
|
|
1526
|
+
vt,
|
|
1527
|
+
{
|
|
1528
|
+
...this.props,
|
|
1529
|
+
key: $.time,
|
|
1530
|
+
headerItem: $,
|
|
1531
|
+
number: $.addMore,
|
|
1532
|
+
left: C,
|
|
1533
|
+
width: X,
|
|
1534
|
+
top: Z,
|
|
1535
|
+
clickAction: this.onAddMoreClick
|
|
1536
|
+
}
|
|
1537
|
+
);
|
|
1538
|
+
k.push(S);
|
|
1481
1539
|
}
|
|
1482
|
-
if (
|
|
1483
|
-
let
|
|
1484
|
-
k.push(
|
|
1540
|
+
if ($.summary != null) {
|
|
1541
|
+
let C = N ? 1 : e.rowHeight - u.eventItemLineHeight + 1, X = H * D + (H > 0 ? 2 : 3), Z = D - (H > 0 ? 5 : 6), S = `${e.slotId}_${$.time}`, x = /* @__PURE__ */ d.jsx(mt, { schedulerData: s, summary: $.summary, left: X, width: Z, top: C }, S);
|
|
1542
|
+
k.push(x);
|
|
1485
1543
|
}
|
|
1486
1544
|
}
|
|
1487
|
-
})
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
) }) });
|
|
1545
|
+
});
|
|
1546
|
+
const A = /* @__PURE__ */ d.jsxs("div", { ref: this.eventContainerRef, className: "event-container", style: { height: e.rowHeight }, children: [
|
|
1547
|
+
b,
|
|
1548
|
+
k
|
|
1549
|
+
] });
|
|
1550
|
+
return /* @__PURE__ */ d.jsx("tr", { children: /* @__PURE__ */ d.jsx("td", { style: { width: w }, children: u.dragAndDropEnabled ? r(A) : A }) });
|
|
1493
1551
|
}
|
|
1494
1552
|
}
|
|
1495
|
-
|
|
1496
|
-
resourceEvents:
|
|
1497
|
-
schedulerData:
|
|
1498
|
-
dndSource:
|
|
1499
|
-
onSetAddMoreState:
|
|
1500
|
-
updateEventStart:
|
|
1501
|
-
updateEventEnd:
|
|
1502
|
-
moveEvent:
|
|
1503
|
-
movingEvent:
|
|
1504
|
-
conflictOccurred:
|
|
1505
|
-
subtitleGetter:
|
|
1506
|
-
eventItemClick:
|
|
1507
|
-
viewEventClick:
|
|
1508
|
-
viewEventText:
|
|
1509
|
-
viewEvent2Click:
|
|
1510
|
-
viewEvent2Text:
|
|
1511
|
-
newEvent:
|
|
1512
|
-
eventItemTemplateResolver:
|
|
1553
|
+
P(yt, "propTypes", {
|
|
1554
|
+
resourceEvents: Y.object.isRequired,
|
|
1555
|
+
schedulerData: Y.object.isRequired,
|
|
1556
|
+
dndSource: Y.object.isRequired,
|
|
1557
|
+
onSetAddMoreState: Y.func,
|
|
1558
|
+
updateEventStart: Y.func,
|
|
1559
|
+
updateEventEnd: Y.func,
|
|
1560
|
+
moveEvent: Y.func,
|
|
1561
|
+
movingEvent: Y.func,
|
|
1562
|
+
conflictOccurred: Y.func,
|
|
1563
|
+
subtitleGetter: Y.func,
|
|
1564
|
+
eventItemClick: Y.func,
|
|
1565
|
+
viewEventClick: Y.func,
|
|
1566
|
+
viewEventText: Y.string,
|
|
1567
|
+
viewEvent2Click: Y.func,
|
|
1568
|
+
viewEvent2Text: Y.string,
|
|
1569
|
+
newEvent: Y.func,
|
|
1570
|
+
eventItemTemplateResolver: Y.func
|
|
1513
1571
|
});
|
|
1514
|
-
function
|
|
1515
|
-
const { eventItem: t, isStart: e, isEnd:
|
|
1516
|
-
let
|
|
1517
|
-
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
let R = /* @__PURE__ */ l.jsx(Oe, { ...b, title: t.title, startTime: t.start, endTime: t.end, statusColor: h });
|
|
1522
|
-
return a.eventItemPopoverEnabled ? /* @__PURE__ */ l.jsx(He, { placement: "bottomLeft", content: R, trigger: "hover", children: E }) : /* @__PURE__ */ l.jsx("span", { children: E });
|
|
1572
|
+
function Et(R) {
|
|
1573
|
+
const { eventItem: t, isStart: e, isEnd: s, eventItemClick: r, schedulerData: n, eventItemTemplateResolver: i } = R, { config: o, behaviors: l } = n, u = e ? s ? "round-all" : "round-head" : s ? "round-tail" : "round-none", c = t.bgColor || o.defaultEventBgColor, f = l.getEventTextFunc(n, t);
|
|
1574
|
+
let h = /* @__PURE__ */ d.jsx("div", { className: `${u} event-item`, style: { height: o.eventItemHeight, maxWidth: o.agendaMaxEventWidth, backgroundColor: c }, children: /* @__PURE__ */ d.jsx("span", { style: { marginLeft: "10px", lineHeight: `${o.eventItemHeight}px` }, children: f }) }, t.id);
|
|
1575
|
+
i && (h = i(n, t, c, e, s, "event-item", o.eventItemHeight, o.agendaMaxEventWidth));
|
|
1576
|
+
const v = () => r == null ? void 0 : r(n, t), D = /* @__PURE__ */ d.jsx("a", { className: "day-event", onClick: v, children: h });
|
|
1577
|
+
let g = /* @__PURE__ */ d.jsx(qe, { ...R, title: t.title, startTime: t.start, endTime: t.end, statusColor: c });
|
|
1578
|
+
return o.eventItemPopoverEnabled ? /* @__PURE__ */ d.jsx(Fe, { placement: "bottomLeft", content: g, trigger: "hover", children: D }) : /* @__PURE__ */ d.jsx("span", { children: D });
|
|
1523
1579
|
}
|
|
1524
|
-
|
|
1525
|
-
schedulerData:
|
|
1526
|
-
eventItem:
|
|
1527
|
-
isStart:
|
|
1528
|
-
isEnd:
|
|
1529
|
-
subtitleGetter:
|
|
1530
|
-
eventItemClick:
|
|
1531
|
-
viewEventClick:
|
|
1532
|
-
viewEventText:
|
|
1533
|
-
viewEvent2Click:
|
|
1534
|
-
viewEvent2Text:
|
|
1535
|
-
eventItemTemplateResolver:
|
|
1580
|
+
Et.propTypes = {
|
|
1581
|
+
schedulerData: p.object.isRequired,
|
|
1582
|
+
eventItem: p.object.isRequired,
|
|
1583
|
+
isStart: p.bool.isRequired,
|
|
1584
|
+
isEnd: p.bool.isRequired,
|
|
1585
|
+
subtitleGetter: p.func,
|
|
1586
|
+
eventItemClick: p.func,
|
|
1587
|
+
viewEventClick: p.func,
|
|
1588
|
+
viewEventText: p.string,
|
|
1589
|
+
viewEvent2Click: p.func,
|
|
1590
|
+
viewEvent2Text: p.string,
|
|
1591
|
+
eventItemTemplateResolver: p.func
|
|
1536
1592
|
};
|
|
1537
|
-
function
|
|
1538
|
-
const { schedulerData: t, resourceEvents: e, slotClickedFunc:
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
});
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
/* @__PURE__ */
|
|
1556
|
-
/* @__PURE__ */ l.jsx("td", { children: /* @__PURE__ */ l.jsx("div", { className: "day-event-container", children: C }) })
|
|
1593
|
+
function wt(R) {
|
|
1594
|
+
const { schedulerData: t, resourceEvents: e, slotClickedFunc: s, slotItemTemplateResolver: r } = R, { startDate: n, endDate: i, config: o, localeDayjs: l } = t, u = t.getResourceTableWidth() - 2, c = [];
|
|
1595
|
+
for (const v of e.headerItems) {
|
|
1596
|
+
const D = l(new Date(n)), g = l(i).add(1, "days"), w = l(new Date(v.start)), T = l(new Date(v.end));
|
|
1597
|
+
if (D === w && g === T)
|
|
1598
|
+
for (const b of v.events) {
|
|
1599
|
+
const k = l(new Date(n)), A = l(i).add(1, "days"), $ = l(b.eventItem.start), H = l(b.eventItem.end), N = $ >= k, z = H < A, W = /* @__PURE__ */ be(Et, { ...R, key: b.eventItem.id, eventItem: b.eventItem, isStart: N, isEnd: z });
|
|
1600
|
+
c.push(W);
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
const f = s ? /* @__PURE__ */ d.jsx("a", { onClick: () => s(t, e), children: e.slotName }) : /* @__PURE__ */ d.jsx("span", { children: e.slotName });
|
|
1604
|
+
let h = /* @__PURE__ */ d.jsx("div", { style: { width: u }, title: e.slotName, className: "overflow-text header2-text", children: f });
|
|
1605
|
+
if (r) {
|
|
1606
|
+
const v = r(t, e, s, u, "overflow-text header2-text");
|
|
1607
|
+
v && (h = v);
|
|
1608
|
+
}
|
|
1609
|
+
return /* @__PURE__ */ d.jsxs("tr", { style: { minHeight: o.eventItemLineHeight + 2 }, children: [
|
|
1610
|
+
/* @__PURE__ */ d.jsx("td", { "data-resource-id": e.slotId, children: h }),
|
|
1611
|
+
/* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsx("div", { className: "day-event-container", children: c }) })
|
|
1557
1612
|
] });
|
|
1558
1613
|
}
|
|
1559
|
-
|
|
1560
|
-
schedulerData:
|
|
1561
|
-
resourceEvents:
|
|
1562
|
-
subtitleGetter:
|
|
1563
|
-
eventItemClick:
|
|
1564
|
-
viewEventClick:
|
|
1565
|
-
viewEventText:
|
|
1566
|
-
viewEvent2Click:
|
|
1567
|
-
viewEvent2Text:
|
|
1568
|
-
slotClickedFunc:
|
|
1569
|
-
slotItemTemplateResolver:
|
|
1614
|
+
wt.propTypes = {
|
|
1615
|
+
schedulerData: p.object.isRequired,
|
|
1616
|
+
resourceEvents: p.object.isRequired,
|
|
1617
|
+
subtitleGetter: p.func,
|
|
1618
|
+
eventItemClick: p.func,
|
|
1619
|
+
viewEventClick: p.func,
|
|
1620
|
+
viewEventText: p.string,
|
|
1621
|
+
viewEvent2Click: p.func,
|
|
1622
|
+
viewEvent2Text: p.string,
|
|
1623
|
+
slotClickedFunc: p.func,
|
|
1624
|
+
slotItemTemplateResolver: p.func
|
|
1570
1625
|
};
|
|
1571
|
-
function
|
|
1572
|
-
const { schedulerData: t } =
|
|
1573
|
-
return /* @__PURE__ */
|
|
1574
|
-
/* @__PURE__ */
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
/* @__PURE__ */
|
|
1626
|
+
function bt(R) {
|
|
1627
|
+
const { schedulerData: t } = R, { config: e, renderData: s } = t, r = t.getResourceTableWidth(), n = t.getTableHeaderHeight(), i = t.isEventPerspective ? e.taskName : e.resourceName, o = e.agendaViewHeader, l = s.map((u) => /* @__PURE__ */ be(wt, { ...R, resourceEvents: u, key: u.slotId }));
|
|
1628
|
+
return /* @__PURE__ */ d.jsx("tr", { children: /* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsxs("table", { className: "scheduler-table", children: [
|
|
1629
|
+
/* @__PURE__ */ d.jsx("thead", { children: /* @__PURE__ */ d.jsxs("tr", { style: { height: n }, children: [
|
|
1630
|
+
/* @__PURE__ */ d.jsx("th", { style: { width: r }, className: "header3-text", children: i }),
|
|
1631
|
+
/* @__PURE__ */ d.jsx("th", { className: "header3-text", children: o })
|
|
1577
1632
|
] }) }),
|
|
1578
|
-
/* @__PURE__ */
|
|
1633
|
+
/* @__PURE__ */ d.jsx("tbody", { children: l })
|
|
1579
1634
|
] }) }) });
|
|
1580
1635
|
}
|
|
1581
|
-
|
|
1582
|
-
schedulerData:
|
|
1583
|
-
subtitleGetter:
|
|
1584
|
-
eventItemClick:
|
|
1585
|
-
viewEventClick:
|
|
1586
|
-
viewEventText:
|
|
1587
|
-
viewEvent2Click:
|
|
1588
|
-
viewEvent2Text:
|
|
1589
|
-
slotClickedFunc:
|
|
1636
|
+
bt.propTypes = {
|
|
1637
|
+
schedulerData: p.object.isRequired,
|
|
1638
|
+
subtitleGetter: p.func,
|
|
1639
|
+
eventItemClick: p.func,
|
|
1640
|
+
viewEventClick: p.func,
|
|
1641
|
+
viewEventText: p.string,
|
|
1642
|
+
viewEvent2Click: p.func,
|
|
1643
|
+
viewEvent2Text: p.string,
|
|
1644
|
+
slotClickedFunc: p.func
|
|
1590
1645
|
};
|
|
1591
|
-
function
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
let D = c(T.eventItem.start), j = c(T.eventItem.end), N = D >= R, A = j < C, S = 10, _ = 138, q = 12 + x * d.eventItemLineHeight;
|
|
1598
|
-
return /* @__PURE__ */ he(
|
|
1599
|
-
v,
|
|
1646
|
+
function hs(R) {
|
|
1647
|
+
const { schedulerData: t, headerItem: e, left: s, top: r, height: n, closeAction: i } = R, { config: o, localeDayjs: l } = t, { time: u, start: c, end: f, events: h } = e, [v] = ke(new ht((k) => k.eventItem, Be, t.config.dragAndDropEnabled)), D = l(new Date(u)).format(o.addMorePopoverHeaderFormat), g = l(new Date(c)), w = l(f), T = v.getDragSource(), b = h.map((k, A) => {
|
|
1648
|
+
if (k !== void 0) {
|
|
1649
|
+
const $ = l(k.eventItem.start), H = l(k.eventItem.end), N = $ >= g, z = H < w, W = 12 + (A + 1) * o.eventItemLineHeight;
|
|
1650
|
+
return /* @__PURE__ */ be(
|
|
1651
|
+
T,
|
|
1600
1652
|
{
|
|
1601
|
-
...
|
|
1602
|
-
key:
|
|
1603
|
-
eventItem:
|
|
1653
|
+
...R,
|
|
1654
|
+
key: k.eventItem.id,
|
|
1655
|
+
eventItem: k.eventItem,
|
|
1604
1656
|
leftIndex: 0,
|
|
1605
1657
|
isInPopover: !0,
|
|
1606
1658
|
isStart: N,
|
|
1607
|
-
isEnd:
|
|
1659
|
+
isEnd: z,
|
|
1608
1660
|
rightIndex: 1,
|
|
1609
|
-
left:
|
|
1610
|
-
width:
|
|
1611
|
-
top:
|
|
1661
|
+
left: 10,
|
|
1662
|
+
width: 138,
|
|
1663
|
+
top: W
|
|
1612
1664
|
}
|
|
1613
1665
|
);
|
|
1614
1666
|
}
|
|
1615
1667
|
return null;
|
|
1616
1668
|
});
|
|
1617
|
-
return /* @__PURE__ */
|
|
1618
|
-
/* @__PURE__ */
|
|
1619
|
-
/* @__PURE__ */
|
|
1620
|
-
/* @__PURE__ */
|
|
1669
|
+
return /* @__PURE__ */ d.jsxs("div", { className: "add-more-popover-overlay", style: { left: s, top: r, height: n, width: "170px" }, children: [
|
|
1670
|
+
/* @__PURE__ */ d.jsxs(we, { justify: "space-between", align: "middle", children: [
|
|
1671
|
+
/* @__PURE__ */ d.jsx(de, { span: 22, children: /* @__PURE__ */ d.jsx("span", { className: "base-text", children: D }) }),
|
|
1672
|
+
/* @__PURE__ */ d.jsx(de, { span: 2, children: /* @__PURE__ */ d.jsx("span", { onClick: () => i(void 0), children: /* @__PURE__ */ d.jsx(ns, {}) }) })
|
|
1621
1673
|
] }),
|
|
1622
|
-
|
|
1674
|
+
b == null ? void 0 : b.filter(Boolean)
|
|
1623
1675
|
] });
|
|
1624
1676
|
}
|
|
1625
|
-
|
|
1626
|
-
schedulerData:
|
|
1627
|
-
headerItem:
|
|
1628
|
-
left:
|
|
1629
|
-
top:
|
|
1630
|
-
height:
|
|
1631
|
-
closeAction:
|
|
1632
|
-
subtitleGetter:
|
|
1633
|
-
moveEvent:
|
|
1634
|
-
eventItemClick:
|
|
1635
|
-
viewEventClick:
|
|
1636
|
-
viewEventText:
|
|
1637
|
-
viewEvent2Click:
|
|
1638
|
-
viewEvent2Text:
|
|
1639
|
-
eventItemTemplateResolver:
|
|
1677
|
+
hs.propTypes = {
|
|
1678
|
+
schedulerData: p.object.isRequired,
|
|
1679
|
+
headerItem: p.object.isRequired,
|
|
1680
|
+
left: p.number.isRequired,
|
|
1681
|
+
top: p.number.isRequired,
|
|
1682
|
+
height: p.number.isRequired,
|
|
1683
|
+
closeAction: p.func.isRequired,
|
|
1684
|
+
subtitleGetter: p.func,
|
|
1685
|
+
moveEvent: p.func,
|
|
1686
|
+
eventItemClick: p.func,
|
|
1687
|
+
viewEventClick: p.func,
|
|
1688
|
+
viewEventText: p.string,
|
|
1689
|
+
viewEvent2Click: p.func,
|
|
1690
|
+
viewEvent2Text: p.string,
|
|
1691
|
+
eventItemTemplateResolver: p.func
|
|
1640
1692
|
};
|
|
1641
|
-
|
|
1693
|
+
var xt = { exports: {} };
|
|
1694
|
+
(function(R, t) {
|
|
1695
|
+
(function(e, s) {
|
|
1696
|
+
R.exports = s();
|
|
1697
|
+
})(_e, function() {
|
|
1698
|
+
var e = 1e3, s = 6e4, r = 36e5, n = "millisecond", i = "second", o = "minute", l = "hour", u = "day", c = "week", f = "month", h = "quarter", v = "year", D = "date", g = "Invalid Date", w = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, b = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(S) {
|
|
1699
|
+
var x = ["th", "st", "nd", "rd"], y = S % 100;
|
|
1700
|
+
return "[" + S + (x[(y - 20) % 10] || x[y] || x[0]) + "]";
|
|
1701
|
+
} }, k = function(S, x, y) {
|
|
1702
|
+
var j = String(S);
|
|
1703
|
+
return !j || j.length >= x ? S : "" + Array(x + 1 - j.length).join(y) + S;
|
|
1704
|
+
}, A = { s: k, z: function(S) {
|
|
1705
|
+
var x = -S.utcOffset(), y = Math.abs(x), j = Math.floor(y / 60), m = y % 60;
|
|
1706
|
+
return (x <= 0 ? "+" : "-") + k(j, 2, "0") + ":" + k(m, 2, "0");
|
|
1707
|
+
}, m: function S(x, y) {
|
|
1708
|
+
if (x.date() < y.date())
|
|
1709
|
+
return -S(y, x);
|
|
1710
|
+
var j = 12 * (y.year() - x.year()) + (y.month() - x.month()), m = x.clone().add(j, f), M = y - m < 0, _ = x.clone().add(j + (M ? -1 : 1), f);
|
|
1711
|
+
return +(-(j + (y - m) / (M ? m - _ : _ - m)) || 0);
|
|
1712
|
+
}, a: function(S) {
|
|
1713
|
+
return S < 0 ? Math.ceil(S) || 0 : Math.floor(S);
|
|
1714
|
+
}, p: function(S) {
|
|
1715
|
+
return { M: f, y: v, w: c, d: u, D, h: l, m: o, s: i, ms: n, Q: h }[S] || String(S || "").toLowerCase().replace(/s$/, "");
|
|
1716
|
+
}, u: function(S) {
|
|
1717
|
+
return S === void 0;
|
|
1718
|
+
} }, $ = "en", H = {};
|
|
1719
|
+
H[$] = b;
|
|
1720
|
+
var N = function(S) {
|
|
1721
|
+
return S instanceof X;
|
|
1722
|
+
}, z = function S(x, y, j) {
|
|
1723
|
+
var m;
|
|
1724
|
+
if (!x)
|
|
1725
|
+
return $;
|
|
1726
|
+
if (typeof x == "string") {
|
|
1727
|
+
var M = x.toLowerCase();
|
|
1728
|
+
H[M] && (m = M), y && (H[M] = y, m = M);
|
|
1729
|
+
var _ = x.split("-");
|
|
1730
|
+
if (!m && _.length > 1)
|
|
1731
|
+
return S(_[0]);
|
|
1732
|
+
} else {
|
|
1733
|
+
var F = x.name;
|
|
1734
|
+
H[F] = x, m = F;
|
|
1735
|
+
}
|
|
1736
|
+
return !j && m && ($ = m), m || !j && $;
|
|
1737
|
+
}, W = function(S, x) {
|
|
1738
|
+
if (N(S))
|
|
1739
|
+
return S.clone();
|
|
1740
|
+
var y = typeof x == "object" ? x : {};
|
|
1741
|
+
return y.date = S, y.args = arguments, new X(y);
|
|
1742
|
+
}, C = A;
|
|
1743
|
+
C.l = z, C.i = N, C.w = function(S, x) {
|
|
1744
|
+
return W(S, { locale: x.$L, utc: x.$u, x: x.$x, $offset: x.$offset });
|
|
1745
|
+
};
|
|
1746
|
+
var X = function() {
|
|
1747
|
+
function S(y) {
|
|
1748
|
+
this.$L = z(y.locale, null, !0), this.parse(y);
|
|
1749
|
+
}
|
|
1750
|
+
var x = S.prototype;
|
|
1751
|
+
return x.parse = function(y) {
|
|
1752
|
+
this.$d = function(j) {
|
|
1753
|
+
var m = j.date, M = j.utc;
|
|
1754
|
+
if (m === null)
|
|
1755
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1756
|
+
if (C.u(m))
|
|
1757
|
+
return /* @__PURE__ */ new Date();
|
|
1758
|
+
if (m instanceof Date)
|
|
1759
|
+
return new Date(m);
|
|
1760
|
+
if (typeof m == "string" && !/Z$/i.test(m)) {
|
|
1761
|
+
var _ = m.match(w);
|
|
1762
|
+
if (_) {
|
|
1763
|
+
var F = _[2] - 1 || 0, Q = (_[7] || "0").substring(0, 3);
|
|
1764
|
+
return M ? new Date(Date.UTC(_[1], F, _[3] || 1, _[4] || 0, _[5] || 0, _[6] || 0, Q)) : new Date(_[1], F, _[3] || 1, _[4] || 0, _[5] || 0, _[6] || 0, Q);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
return new Date(m);
|
|
1768
|
+
}(y), this.$x = y.x || {}, this.init();
|
|
1769
|
+
}, x.init = function() {
|
|
1770
|
+
var y = this.$d;
|
|
1771
|
+
this.$y = y.getFullYear(), this.$M = y.getMonth(), this.$D = y.getDate(), this.$W = y.getDay(), this.$H = y.getHours(), this.$m = y.getMinutes(), this.$s = y.getSeconds(), this.$ms = y.getMilliseconds();
|
|
1772
|
+
}, x.$utils = function() {
|
|
1773
|
+
return C;
|
|
1774
|
+
}, x.isValid = function() {
|
|
1775
|
+
return this.$d.toString() !== g;
|
|
1776
|
+
}, x.isSame = function(y, j) {
|
|
1777
|
+
var m = W(y);
|
|
1778
|
+
return this.startOf(j) <= m && m <= this.endOf(j);
|
|
1779
|
+
}, x.isAfter = function(y, j) {
|
|
1780
|
+
return W(y) < this.startOf(j);
|
|
1781
|
+
}, x.isBefore = function(y, j) {
|
|
1782
|
+
return this.endOf(j) < W(y);
|
|
1783
|
+
}, x.$g = function(y, j, m) {
|
|
1784
|
+
return C.u(y) ? this[j] : this.set(m, y);
|
|
1785
|
+
}, x.unix = function() {
|
|
1786
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
1787
|
+
}, x.valueOf = function() {
|
|
1788
|
+
return this.$d.getTime();
|
|
1789
|
+
}, x.startOf = function(y, j) {
|
|
1790
|
+
var m = this, M = !!C.u(j) || j, _ = C.p(y), F = function(ue, re) {
|
|
1791
|
+
var oe = C.w(m.$u ? Date.UTC(m.$y, re, ue) : new Date(m.$y, re, ue), m);
|
|
1792
|
+
return M ? oe : oe.endOf(u);
|
|
1793
|
+
}, Q = function(ue, re) {
|
|
1794
|
+
return C.w(m.toDate()[ue].apply(m.toDate("s"), (M ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(re)), m);
|
|
1795
|
+
}, J = this.$W, ee = this.$M, ae = this.$D, ne = "set" + (this.$u ? "UTC" : "");
|
|
1796
|
+
switch (_) {
|
|
1797
|
+
case v:
|
|
1798
|
+
return M ? F(1, 0) : F(31, 11);
|
|
1799
|
+
case f:
|
|
1800
|
+
return M ? F(1, ee) : F(0, ee + 1);
|
|
1801
|
+
case c:
|
|
1802
|
+
var le = this.$locale().weekStart || 0, he = (J < le ? J + 7 : J) - le;
|
|
1803
|
+
return F(M ? ae - he : ae + (6 - he), ee);
|
|
1804
|
+
case u:
|
|
1805
|
+
case D:
|
|
1806
|
+
return Q(ne + "Hours", 0);
|
|
1807
|
+
case l:
|
|
1808
|
+
return Q(ne + "Minutes", 1);
|
|
1809
|
+
case o:
|
|
1810
|
+
return Q(ne + "Seconds", 2);
|
|
1811
|
+
case i:
|
|
1812
|
+
return Q(ne + "Milliseconds", 3);
|
|
1813
|
+
default:
|
|
1814
|
+
return this.clone();
|
|
1815
|
+
}
|
|
1816
|
+
}, x.endOf = function(y) {
|
|
1817
|
+
return this.startOf(y, !1);
|
|
1818
|
+
}, x.$set = function(y, j) {
|
|
1819
|
+
var m, M = C.p(y), _ = "set" + (this.$u ? "UTC" : ""), F = (m = {}, m[u] = _ + "Date", m[D] = _ + "Date", m[f] = _ + "Month", m[v] = _ + "FullYear", m[l] = _ + "Hours", m[o] = _ + "Minutes", m[i] = _ + "Seconds", m[n] = _ + "Milliseconds", m)[M], Q = M === u ? this.$D + (j - this.$W) : j;
|
|
1820
|
+
if (M === f || M === v) {
|
|
1821
|
+
var J = this.clone().set(D, 1);
|
|
1822
|
+
J.$d[F](Q), J.init(), this.$d = J.set(D, Math.min(this.$D, J.daysInMonth())).$d;
|
|
1823
|
+
} else
|
|
1824
|
+
F && this.$d[F](Q);
|
|
1825
|
+
return this.init(), this;
|
|
1826
|
+
}, x.set = function(y, j) {
|
|
1827
|
+
return this.clone().$set(y, j);
|
|
1828
|
+
}, x.get = function(y) {
|
|
1829
|
+
return this[C.p(y)]();
|
|
1830
|
+
}, x.add = function(y, j) {
|
|
1831
|
+
var m, M = this;
|
|
1832
|
+
y = Number(y);
|
|
1833
|
+
var _ = C.p(j), F = function(ee) {
|
|
1834
|
+
var ae = W(M);
|
|
1835
|
+
return C.w(ae.date(ae.date() + Math.round(ee * y)), M);
|
|
1836
|
+
};
|
|
1837
|
+
if (_ === f)
|
|
1838
|
+
return this.set(f, this.$M + y);
|
|
1839
|
+
if (_ === v)
|
|
1840
|
+
return this.set(v, this.$y + y);
|
|
1841
|
+
if (_ === u)
|
|
1842
|
+
return F(1);
|
|
1843
|
+
if (_ === c)
|
|
1844
|
+
return F(7);
|
|
1845
|
+
var Q = (m = {}, m[o] = s, m[l] = r, m[i] = e, m)[_] || 1, J = this.$d.getTime() + y * Q;
|
|
1846
|
+
return C.w(J, this);
|
|
1847
|
+
}, x.subtract = function(y, j) {
|
|
1848
|
+
return this.add(-1 * y, j);
|
|
1849
|
+
}, x.format = function(y) {
|
|
1850
|
+
var j = this, m = this.$locale();
|
|
1851
|
+
if (!this.isValid())
|
|
1852
|
+
return m.invalidDate || g;
|
|
1853
|
+
var M = y || "YYYY-MM-DDTHH:mm:ssZ", _ = C.z(this), F = this.$H, Q = this.$m, J = this.$M, ee = m.weekdays, ae = m.months, ne = function(re, oe, xe, De) {
|
|
1854
|
+
return re && (re[oe] || re(j, M)) || xe[oe].slice(0, De);
|
|
1855
|
+
}, le = function(re) {
|
|
1856
|
+
return C.s(F % 12 || 12, re, "0");
|
|
1857
|
+
}, he = m.meridiem || function(re, oe, xe) {
|
|
1858
|
+
var De = re < 12 ? "AM" : "PM";
|
|
1859
|
+
return xe ? De.toLowerCase() : De;
|
|
1860
|
+
}, ue = { YY: String(this.$y).slice(-2), YYYY: C.s(this.$y, 4, "0"), M: J + 1, MM: C.s(J + 1, 2, "0"), MMM: ne(m.monthsShort, J, ae, 3), MMMM: ne(ae, J), D: this.$D, DD: C.s(this.$D, 2, "0"), d: String(this.$W), dd: ne(m.weekdaysMin, this.$W, ee, 2), ddd: ne(m.weekdaysShort, this.$W, ee, 3), dddd: ee[this.$W], H: String(F), HH: C.s(F, 2, "0"), h: le(1), hh: le(2), a: he(F, Q, !0), A: he(F, Q, !1), m: String(Q), mm: C.s(Q, 2, "0"), s: String(this.$s), ss: C.s(this.$s, 2, "0"), SSS: C.s(this.$ms, 3, "0"), Z: _ };
|
|
1861
|
+
return M.replace(T, function(re, oe) {
|
|
1862
|
+
return oe || ue[re] || _.replace(":", "");
|
|
1863
|
+
});
|
|
1864
|
+
}, x.utcOffset = function() {
|
|
1865
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1866
|
+
}, x.diff = function(y, j, m) {
|
|
1867
|
+
var M, _ = C.p(j), F = W(y), Q = (F.utcOffset() - this.utcOffset()) * s, J = this - F, ee = C.m(this, F);
|
|
1868
|
+
return ee = (M = {}, M[v] = ee / 12, M[f] = ee, M[h] = ee / 3, M[c] = (J - Q) / 6048e5, M[u] = (J - Q) / 864e5, M[l] = J / r, M[o] = J / s, M[i] = J / e, M)[_] || J, m ? ee : C.a(ee);
|
|
1869
|
+
}, x.daysInMonth = function() {
|
|
1870
|
+
return this.endOf(f).$D;
|
|
1871
|
+
}, x.$locale = function() {
|
|
1872
|
+
return H[this.$L];
|
|
1873
|
+
}, x.locale = function(y, j) {
|
|
1874
|
+
if (!y)
|
|
1875
|
+
return this.$L;
|
|
1876
|
+
var m = this.clone(), M = z(y, j, !0);
|
|
1877
|
+
return M && (m.$L = M), m;
|
|
1878
|
+
}, x.clone = function() {
|
|
1879
|
+
return C.w(this.$d, this);
|
|
1880
|
+
}, x.toDate = function() {
|
|
1881
|
+
return new Date(this.valueOf());
|
|
1882
|
+
}, x.toJSON = function() {
|
|
1883
|
+
return this.isValid() ? this.toISOString() : null;
|
|
1884
|
+
}, x.toISOString = function() {
|
|
1885
|
+
return this.$d.toISOString();
|
|
1886
|
+
}, x.toString = function() {
|
|
1887
|
+
return this.$d.toUTCString();
|
|
1888
|
+
}, S;
|
|
1889
|
+
}(), Z = X.prototype;
|
|
1890
|
+
return W.prototype = Z, [["$ms", n], ["$s", i], ["$m", o], ["$H", l], ["$W", u], ["$M", f], ["$y", v], ["$D", D]].forEach(function(S) {
|
|
1891
|
+
Z[S[1]] = function(x) {
|
|
1892
|
+
return this.$g(x, S[0], S[1]);
|
|
1893
|
+
};
|
|
1894
|
+
}), W.extend = function(S, x) {
|
|
1895
|
+
return S.$i || (S(x, X, W), S.$i = !0), W;
|
|
1896
|
+
}, W.locale = z, W.isDayjs = N, W.unix = function(S) {
|
|
1897
|
+
return W(1e3 * S);
|
|
1898
|
+
}, W.en = H[$], W.Ls = H, W.p = {}, W;
|
|
1899
|
+
});
|
|
1900
|
+
})(xt);
|
|
1901
|
+
var fs = xt.exports;
|
|
1902
|
+
const ve = /* @__PURE__ */ Oe(fs);
|
|
1903
|
+
var Ct = { exports: {} };
|
|
1904
|
+
(function(R, t) {
|
|
1905
|
+
(function(e, s) {
|
|
1906
|
+
R.exports = s();
|
|
1907
|
+
})(_e, function() {
|
|
1908
|
+
var e = "month", s = "quarter";
|
|
1909
|
+
return function(r, n) {
|
|
1910
|
+
var i = n.prototype;
|
|
1911
|
+
i.quarter = function(u) {
|
|
1912
|
+
return this.$utils().u(u) ? Math.ceil((this.month() + 1) / 3) : this.month(this.month() % 3 + 3 * (u - 1));
|
|
1913
|
+
};
|
|
1914
|
+
var o = i.add;
|
|
1915
|
+
i.add = function(u, c) {
|
|
1916
|
+
return u = Number(u), this.$utils().p(c) === s ? this.add(3 * u, e) : o.bind(this)(u, c);
|
|
1917
|
+
};
|
|
1918
|
+
var l = i.startOf;
|
|
1919
|
+
i.startOf = function(u, c) {
|
|
1920
|
+
var f = this.$utils(), h = !!f.u(c) || c;
|
|
1921
|
+
if (f.p(u) === s) {
|
|
1922
|
+
var v = this.quarter() - 1;
|
|
1923
|
+
return h ? this.month(3 * v).startOf(e).startOf("day") : this.month(3 * v + 2).endOf(e).endOf("day");
|
|
1924
|
+
}
|
|
1925
|
+
return l.bind(this)(u, c);
|
|
1926
|
+
};
|
|
1927
|
+
};
|
|
1928
|
+
});
|
|
1929
|
+
})(Ct);
|
|
1930
|
+
var ps = Ct.exports;
|
|
1931
|
+
const gs = /* @__PURE__ */ Oe(ps);
|
|
1932
|
+
var St = { exports: {} };
|
|
1933
|
+
(function(R, t) {
|
|
1934
|
+
(function(e, s) {
|
|
1935
|
+
R.exports = s();
|
|
1936
|
+
})(_e, function() {
|
|
1937
|
+
var e = "minute", s = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
|
|
1938
|
+
return function(n, i, o) {
|
|
1939
|
+
var l = i.prototype;
|
|
1940
|
+
o.utc = function(g) {
|
|
1941
|
+
var w = { date: g, utc: !0, args: arguments };
|
|
1942
|
+
return new i(w);
|
|
1943
|
+
}, l.utc = function(g) {
|
|
1944
|
+
var w = o(this.toDate(), { locale: this.$L, utc: !0 });
|
|
1945
|
+
return g ? w.add(this.utcOffset(), e) : w;
|
|
1946
|
+
}, l.local = function() {
|
|
1947
|
+
return o(this.toDate(), { locale: this.$L, utc: !1 });
|
|
1948
|
+
};
|
|
1949
|
+
var u = l.parse;
|
|
1950
|
+
l.parse = function(g) {
|
|
1951
|
+
g.utc && (this.$u = !0), this.$utils().u(g.$offset) || (this.$offset = g.$offset), u.call(this, g);
|
|
1952
|
+
};
|
|
1953
|
+
var c = l.init;
|
|
1954
|
+
l.init = function() {
|
|
1955
|
+
if (this.$u) {
|
|
1956
|
+
var g = this.$d;
|
|
1957
|
+
this.$y = g.getUTCFullYear(), this.$M = g.getUTCMonth(), this.$D = g.getUTCDate(), this.$W = g.getUTCDay(), this.$H = g.getUTCHours(), this.$m = g.getUTCMinutes(), this.$s = g.getUTCSeconds(), this.$ms = g.getUTCMilliseconds();
|
|
1958
|
+
} else
|
|
1959
|
+
c.call(this);
|
|
1960
|
+
};
|
|
1961
|
+
var f = l.utcOffset;
|
|
1962
|
+
l.utcOffset = function(g, w) {
|
|
1963
|
+
var T = this.$utils().u;
|
|
1964
|
+
if (T(g))
|
|
1965
|
+
return this.$u ? 0 : T(this.$offset) ? f.call(this) : this.$offset;
|
|
1966
|
+
if (typeof g == "string" && (g = function($) {
|
|
1967
|
+
$ === void 0 && ($ = "");
|
|
1968
|
+
var H = $.match(s);
|
|
1969
|
+
if (!H)
|
|
1970
|
+
return null;
|
|
1971
|
+
var N = ("" + H[0]).match(r) || ["-", 0, 0], z = N[0], W = 60 * +N[1] + +N[2];
|
|
1972
|
+
return W === 0 ? 0 : z === "+" ? W : -W;
|
|
1973
|
+
}(g), g === null))
|
|
1974
|
+
return this;
|
|
1975
|
+
var b = Math.abs(g) <= 16 ? 60 * g : g, k = this;
|
|
1976
|
+
if (w)
|
|
1977
|
+
return k.$offset = b, k.$u = g === 0, k;
|
|
1978
|
+
if (g !== 0) {
|
|
1979
|
+
var A = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
1980
|
+
(k = this.local().add(b + A, e)).$offset = b, k.$x.$localOffset = A;
|
|
1981
|
+
} else
|
|
1982
|
+
k = this.utc();
|
|
1983
|
+
return k;
|
|
1984
|
+
};
|
|
1985
|
+
var h = l.format;
|
|
1986
|
+
l.format = function(g) {
|
|
1987
|
+
var w = g || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
1988
|
+
return h.call(this, w);
|
|
1989
|
+
}, l.valueOf = function() {
|
|
1990
|
+
var g = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
1991
|
+
return this.$d.valueOf() - 6e4 * g;
|
|
1992
|
+
}, l.isUTC = function() {
|
|
1993
|
+
return !!this.$u;
|
|
1994
|
+
}, l.toISOString = function() {
|
|
1995
|
+
return this.toDate().toISOString();
|
|
1996
|
+
}, l.toString = function() {
|
|
1997
|
+
return this.toDate().toUTCString();
|
|
1998
|
+
};
|
|
1999
|
+
var v = l.toDate;
|
|
2000
|
+
l.toDate = function(g) {
|
|
2001
|
+
return g === "s" && this.$offset ? o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : v.call(this);
|
|
2002
|
+
};
|
|
2003
|
+
var D = l.diff;
|
|
2004
|
+
l.diff = function(g, w, T) {
|
|
2005
|
+
if (g && this.$u === g.$u)
|
|
2006
|
+
return D.call(this, g, w, T);
|
|
2007
|
+
var b = this.local(), k = o(g).local();
|
|
2008
|
+
return D.call(b, k, w, T);
|
|
2009
|
+
};
|
|
2010
|
+
};
|
|
2011
|
+
});
|
|
2012
|
+
})(St);
|
|
2013
|
+
var vs = St.exports;
|
|
2014
|
+
const ms = /* @__PURE__ */ Oe(vs);
|
|
2015
|
+
var Rt = { exports: {} };
|
|
2016
|
+
(function(R, t) {
|
|
2017
|
+
(function(e, s) {
|
|
2018
|
+
R.exports = s();
|
|
2019
|
+
})(_e, function() {
|
|
2020
|
+
return function(e, s) {
|
|
2021
|
+
s.prototype.weekday = function(r) {
|
|
2022
|
+
var n = this.$locale().weekStart || 0, i = this.$W, o = (i < n ? i + 7 : i) - n;
|
|
2023
|
+
return this.$utils().u(r) ? o : this.subtract(o, "day").add(r, "day");
|
|
2024
|
+
};
|
|
2025
|
+
};
|
|
2026
|
+
});
|
|
2027
|
+
})(Rt);
|
|
2028
|
+
var Ds = Rt.exports;
|
|
2029
|
+
const ys = /* @__PURE__ */ Oe(Ds), ct = {
|
|
1642
2030
|
schedulerWidth: "100%",
|
|
1643
2031
|
besidesWidth: 20,
|
|
1644
2032
|
schedulerMaxHeight: 0,
|
|
1645
2033
|
tableHeaderHeight: 40,
|
|
2034
|
+
schedulerContentHeight: "500px",
|
|
2035
|
+
responsiveByParent: !1,
|
|
1646
2036
|
agendaResourceTableWidth: 160,
|
|
1647
2037
|
agendaMaxEventWidth: 100,
|
|
1648
2038
|
dayResourceTableWidth: 160,
|
|
@@ -1663,6 +2053,9 @@ const rt = {
|
|
|
1663
2053
|
quarterMaxEvents: 99,
|
|
1664
2054
|
yearMaxEvents: 99,
|
|
1665
2055
|
customMaxEvents: 99,
|
|
2056
|
+
eventItemPopoverTrigger: "hover",
|
|
2057
|
+
eventItemPopoverPlacement: "bottomLeft",
|
|
2058
|
+
eventItemPopoverWidth: 300,
|
|
1666
2059
|
eventItemHeight: 22,
|
|
1667
2060
|
eventItemLineHeight: 24,
|
|
1668
2061
|
nonAgendaSlotMinHeight: 0,
|
|
@@ -1674,7 +2067,7 @@ const rt = {
|
|
|
1674
2067
|
nonWorkingTimeHeadBgColor: "#fff0f6",
|
|
1675
2068
|
nonWorkingTimeBodyBgColor: "#fff0f6",
|
|
1676
2069
|
summaryColor: "#666",
|
|
1677
|
-
summaryPos:
|
|
2070
|
+
summaryPos: me.TopRight,
|
|
1678
2071
|
groupOnlySlotColor: "#F8F8F8",
|
|
1679
2072
|
startResizable: !0,
|
|
1680
2073
|
endResizable: !0,
|
|
@@ -1682,15 +2075,20 @@ const rt = {
|
|
|
1682
2075
|
creatable: !0,
|
|
1683
2076
|
crossResourceMove: !0,
|
|
1684
2077
|
checkConflict: !1,
|
|
1685
|
-
|
|
2078
|
+
scrollToSpecialDayjsEnabled: !0,
|
|
1686
2079
|
eventItemPopoverEnabled: !0,
|
|
1687
2080
|
eventItemPopoverShowColor: !0,
|
|
1688
2081
|
calendarPopoverEnabled: !0,
|
|
1689
2082
|
recurringEventsEnabled: !0,
|
|
2083
|
+
viewChangeSpinEnabled: !0,
|
|
2084
|
+
dateChangeSpinEnabled: !0,
|
|
1690
2085
|
headerEnabled: !0,
|
|
2086
|
+
resourceViewEnabled: !0,
|
|
1691
2087
|
displayWeekend: !0,
|
|
1692
2088
|
relativeMove: !0,
|
|
1693
2089
|
defaultExpanded: !0,
|
|
2090
|
+
dragAndDropEnabled: !0,
|
|
2091
|
+
schedulerHeaderEventsFuncsTimeoutMs: 100,
|
|
1694
2092
|
resourceName: "Resource Name",
|
|
1695
2093
|
taskName: "Task Name",
|
|
1696
2094
|
agendaViewHeader: "Agenda",
|
|
@@ -1703,76 +2101,70 @@ const rt = {
|
|
|
1703
2101
|
nonAgendaOtherCellHeaderFormat: "ddd M/D",
|
|
1704
2102
|
minuteStep: 30,
|
|
1705
2103
|
views: [
|
|
1706
|
-
{ viewName: "Day", viewType:
|
|
1707
|
-
{ viewName: "Week", viewType:
|
|
1708
|
-
{ viewName: "Month", viewType:
|
|
1709
|
-
{ viewName: "Quarter", viewType:
|
|
1710
|
-
{ viewName: "Year", viewType:
|
|
2104
|
+
{ viewName: "Day", viewType: O.Day, showAgenda: !1, isEventPerspective: !1 },
|
|
2105
|
+
{ viewName: "Week", viewType: O.Week, showAgenda: !1, isEventPerspective: !1 },
|
|
2106
|
+
{ viewName: "Month", viewType: O.Month, showAgenda: !1, isEventPerspective: !1 },
|
|
2107
|
+
{ viewName: "Quarter", viewType: O.Quarter, showAgenda: !1, isEventPerspective: !1 },
|
|
2108
|
+
{ viewName: "Year", viewType: O.Year, showAgenda: !1, isEventPerspective: !1 }
|
|
1711
2109
|
]
|
|
1712
|
-
},
|
|
1713
|
-
const n =
|
|
1714
|
-
let o;
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
o = n.format("MMM D, YYYY");
|
|
1733
|
-
}
|
|
1734
|
-
return o;
|
|
1735
|
-
}, ar = (b, t) => {
|
|
1736
|
-
if (!b.isEventPerspective)
|
|
1737
|
-
return t.title;
|
|
1738
|
-
const e = b.resources.find((r) => r.id === t.resourceId);
|
|
1739
|
-
return e ? e.name : t.title;
|
|
1740
|
-
}, lr = (b, t, e) => b.localeMoment(), dr = (b, t) => {
|
|
1741
|
-
const { localeMoment: e, cellUnit: r } = b;
|
|
1742
|
-
if (r === O.Hour) {
|
|
1743
|
-
const i = e(t).hour();
|
|
1744
|
-
return i < 9 || i > 18;
|
|
1745
|
-
}
|
|
1746
|
-
const n = e(t).weekday();
|
|
1747
|
-
return n === 0 || n === 6;
|
|
1748
|
-
}, nt = {
|
|
2110
|
+
}, Es = (R, t, e, s) => {
|
|
2111
|
+
const { localeDayjs: r } = R, n = r(new Date(e)), i = r(s);
|
|
2112
|
+
let o = "";
|
|
2113
|
+
return t === O.Week || n !== i && (t === O.Custom || t === O.Custom1 || t === O.Custom2) ? (o = `${n.format("MMM D")}-${i.format("D, YYYY")}`, n.month() !== i.month() && (o = `${n.format("MMM D")}-${i.format("MMM D, YYYY")}`), n.year() !== i.year() && (o = `${n.format("MMM D, YYYY")}-${i.format("MMM D, YYYY")}`)) : t === O.Month ? o = n.format("MMMM YYYY") : t === O.Quarter ? o = `${n.format("MMM D")}-${i.format("MMM D, YYYY")}` : t === O.Year ? o = n.format("YYYY") : o = n.format("MMM D, YYYY"), o;
|
|
2114
|
+
}, ws = (R, t) => {
|
|
2115
|
+
var e;
|
|
2116
|
+
return R.isEventPerspective && ((e = R.resources.find((s) => s.id === t.resourceId)) == null ? void 0 : e.name) || t.title;
|
|
2117
|
+
}, bs = (R) => {
|
|
2118
|
+
const { localeDayjs: t } = R;
|
|
2119
|
+
return t(/* @__PURE__ */ new Date());
|
|
2120
|
+
}, xs = (R, t) => {
|
|
2121
|
+
const { localeDayjs: e, cellUnit: s } = R;
|
|
2122
|
+
if (s === U.Hour) {
|
|
2123
|
+
const r = e(new Date(t)).hour();
|
|
2124
|
+
return r < 9 || r > 18;
|
|
2125
|
+
} else {
|
|
2126
|
+
const r = e(new Date(t)).weekday();
|
|
2127
|
+
return r === 0 || r === 6;
|
|
2128
|
+
}
|
|
2129
|
+
}, dt = {
|
|
1749
2130
|
getSummaryFunc: void 0,
|
|
1750
2131
|
getCustomDateFunc: void 0,
|
|
1751
2132
|
getNonAgendaViewBodyCellBgColorFunc: void 0,
|
|
1752
|
-
|
|
1753
|
-
getDateLabelFunc:
|
|
1754
|
-
getEventTextFunc:
|
|
1755
|
-
isNonWorkingTimeFunc:
|
|
1756
|
-
// getNonAgendaViewBodyCellBgColorFunc: getNonAgendaViewBodyCellBgColor,
|
|
1757
|
-
//getCustomDateFunc: getCustomDate,
|
|
1758
|
-
//getSummaryFunc: getSummary,
|
|
2133
|
+
getScrollSpecialDayjsFunc: bs,
|
|
2134
|
+
getDateLabelFunc: Es,
|
|
2135
|
+
getEventTextFunc: ws,
|
|
2136
|
+
isNonWorkingTimeFunc: xs
|
|
1759
2137
|
};
|
|
1760
|
-
class
|
|
1761
|
-
constructor(t =
|
|
1762
|
-
this.resources = [], this.events = [], this.eventGroups = [], this.eventGroupsAutoGenerated = !0, this.viewType = e, this.cellUnit = e ===
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
|
|
2138
|
+
class Hs {
|
|
2139
|
+
constructor(t = ve(), e = O.Week, s = !1, r = !1, n = void 0, i = void 0) {
|
|
2140
|
+
this.resources = [], this.events = [], this.eventGroups = [], this.eventGroupsAutoGenerated = !0, this.viewType = e, this.cellUnit = e === O.Day ? U.Hour : U.Day, this.showAgenda = s, this.isEventPerspective = r, this.resizing = !1, this.scrollToSpecialDayjs = !1, this.documentWidth = 0, this._shouldReloadViewType = !1, this.calendarPopoverLocale = void 0, ve.extend(gs), ve.extend(ys), ve.extend(ms), this.localeDayjs = ve, this.config = n == null ? ct : { ...ct, ...n }, this._validateMinuteStep(this.config.minuteStep), this.behaviors = i == null ? dt : { ...dt, ...i }, this._resolveDate(0, t), this._createHeaders(), this._createRenderData();
|
|
2141
|
+
}
|
|
2142
|
+
setSchedulerLocale(t, e) {
|
|
2143
|
+
if (!t)
|
|
2144
|
+
return;
|
|
2145
|
+
let s = t;
|
|
2146
|
+
typeof t == "string" && import(`dayjs/locale/${t}.js`).then((r) => {
|
|
2147
|
+
s = r.default, e && Object.entries(e).forEach(([n, i]) => s[n] = i);
|
|
2148
|
+
}).catch((r) => {
|
|
2149
|
+
console.error("Error loading locale:", r);
|
|
2150
|
+
}), this.localeDayjs.locale(s), this._shouldReloadViewType = !0, this.setViewType(this.viewType, this.showAgenda, this.isEventPerspective);
|
|
2151
|
+
}
|
|
2152
|
+
setCalendarPopoverLocale(t) {
|
|
2153
|
+
t && typeof t == "string" && import(`antd/locale/${t}.js`).then((e) => {
|
|
2154
|
+
this.calendarPopoverLocale = e.default || Locale;
|
|
2155
|
+
}).catch((e) => {
|
|
2156
|
+
console.error("Error loading locale:", e);
|
|
2157
|
+
});
|
|
1766
2158
|
}
|
|
1767
2159
|
setResources(t) {
|
|
1768
|
-
this._validateResource(t), this.resources = Array.from(new Set(t)), this._createRenderData(), this.
|
|
2160
|
+
this._validateResource(t), this.resources = Array.from(new Set(t)), this._createRenderData(), this.setScrollToSpecialDayjs(!0);
|
|
1769
2161
|
}
|
|
1770
2162
|
setEventGroupsAutoGenerated(t) {
|
|
1771
2163
|
this.eventGroupsAutoGenerated = t;
|
|
1772
2164
|
}
|
|
1773
2165
|
//optional
|
|
1774
2166
|
setEventGroups(t) {
|
|
1775
|
-
this._validateEventGroups(t), this.eventGroups = Array.from(new Set(t)), this.eventGroupsAutoGenerated = !1, this._createRenderData(), this.
|
|
2167
|
+
this._validateEventGroups(t), this.eventGroups = Array.from(new Set(t)), this.eventGroupsAutoGenerated = !1, this._createRenderData(), this.setScrollToSpecialDayjs(!0);
|
|
1776
2168
|
}
|
|
1777
2169
|
setMinuteStep(t) {
|
|
1778
2170
|
this.config.minuteStep !== t && (this._validateMinuteStep(t), this.config.minuteStep = t, this._createHeaders(), this._createRenderData());
|
|
@@ -1784,28 +2176,28 @@ class Cr {
|
|
|
1784
2176
|
return 60 / this.config.minuteStep;
|
|
1785
2177
|
}
|
|
1786
2178
|
addResource(t) {
|
|
1787
|
-
this.resources.filter((
|
|
2179
|
+
this.resources.filter((s) => s.id === t.id).length === 0 && (this.resources.push(t), this._createRenderData());
|
|
1788
2180
|
}
|
|
1789
2181
|
addEventGroup(t) {
|
|
1790
|
-
this.eventGroups.filter((
|
|
2182
|
+
this.eventGroups.filter((s) => s.id === t.id).length === 0 && (this.eventGroups.push(t), this._createRenderData());
|
|
1791
2183
|
}
|
|
1792
2184
|
removeEventGroupById(t) {
|
|
1793
2185
|
let e = -1;
|
|
1794
|
-
this.eventGroups.forEach((
|
|
1795
|
-
|
|
2186
|
+
this.eventGroups.forEach((s, r) => {
|
|
2187
|
+
s.id === t && (e = r);
|
|
1796
2188
|
}), e !== -1 && this.eventGroups.splice(e, 1);
|
|
1797
2189
|
}
|
|
1798
2190
|
containsEventGroupId(t) {
|
|
1799
2191
|
let e = -1;
|
|
1800
|
-
return this.eventGroups.forEach((
|
|
1801
|
-
|
|
2192
|
+
return this.eventGroups.forEach((s, r) => {
|
|
2193
|
+
s.id === t && (e = r);
|
|
1802
2194
|
}), e !== -1;
|
|
1803
2195
|
}
|
|
1804
2196
|
setEvents(t) {
|
|
1805
2197
|
this._validateEvents(t), this.events = Array.from(t), this.eventGroupsAutoGenerated && this._generateEventGroups(), this.config.recurringEventsEnabled && this._handleRecurringEvents(), this._createRenderData();
|
|
1806
2198
|
}
|
|
1807
|
-
|
|
1808
|
-
this.config.
|
|
2199
|
+
setScrollToSpecialDayjs(t) {
|
|
2200
|
+
this.config.scrollToSpecialDayjsEnabled && (this.scrollToSpecialDayjs = t);
|
|
1809
2201
|
}
|
|
1810
2202
|
prev() {
|
|
1811
2203
|
this._resolveDate(-1), this.events = [], this._createHeaders(), this._createRenderData();
|
|
@@ -1813,29 +2205,29 @@ class Cr {
|
|
|
1813
2205
|
next() {
|
|
1814
2206
|
this._resolveDate(1), this.events = [], this._createHeaders(), this._createRenderData();
|
|
1815
2207
|
}
|
|
1816
|
-
setDate(t =
|
|
2208
|
+
setDate(t = ve(/* @__PURE__ */ new Date())) {
|
|
1817
2209
|
this._resolveDate(0, t), this.events = [], this._createHeaders(), this._createRenderData();
|
|
1818
2210
|
}
|
|
1819
|
-
setViewType(t =
|
|
1820
|
-
if (this.showAgenda = e, this.isEventPerspective =
|
|
1821
|
-
let
|
|
1822
|
-
if (t ===
|
|
1823
|
-
this.viewType = t, this._resolveDate(0,
|
|
2211
|
+
setViewType(t = O.Week, e = !1, s = !1) {
|
|
2212
|
+
if (this.showAgenda = e, this.isEventPerspective = s, this.cellUnit = U.Day, this.viewType !== t || this._shouldReloadViewType) {
|
|
2213
|
+
let r = this.startDate;
|
|
2214
|
+
if (t === O.Custom || t === O.Custom1 || t === O.Custom2)
|
|
2215
|
+
this.viewType = t, this._resolveDate(0, r);
|
|
1824
2216
|
else {
|
|
1825
2217
|
if (this.viewType < t)
|
|
1826
|
-
t ===
|
|
2218
|
+
t === O.Week ? (this.startDate = this.localeDayjs(new Date(r)).startOf("week"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("week")) : t === O.Month ? (this.startDate = this.localeDayjs(new Date(r)).startOf("month"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("month")) : t === O.Quarter ? (this.startDate = this.localeDayjs(new Date(r)).startOf("quarter"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("quarter")) : t === O.Year && (this.startDate = this.localeDayjs(new Date(r)).startOf("year"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("year"));
|
|
1827
2219
|
else {
|
|
1828
|
-
let
|
|
2220
|
+
let n = this.localeDayjs(new Date(this.startDate)), i = this.localeDayjs(new Date(this.endDate)).add(1, "days");
|
|
1829
2221
|
if (this.selectDate !== void 0) {
|
|
1830
|
-
let
|
|
1831
|
-
|
|
2222
|
+
let l = this.localeDayjs(new Date(this.selectDate));
|
|
2223
|
+
l >= n && l < i && (r = this.selectDate);
|
|
1832
2224
|
}
|
|
1833
|
-
let
|
|
1834
|
-
|
|
2225
|
+
let o = this.localeDayjs();
|
|
2226
|
+
o >= n && o < i && (r = o.startOf("day")), t === O.Day ? (this.startDate = r, this.endDate = this.startDate, this.cellUnit = U.Hour) : t === O.Week ? (this.startDate = this.localeDayjs(new Date(r)).startOf("week"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("week")) : t === O.Month ? (this.startDate = this.localeDayjs(new Date(r)).startOf("month"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("month")) : t === O.Quarter && (this.startDate = this.localeDayjs(new Date(r)).startOf("quarter"), this.endDate = this.localeDayjs(new Date(this.startDate)).endOf("quarter"));
|
|
1835
2227
|
}
|
|
1836
2228
|
this.viewType = t;
|
|
1837
2229
|
}
|
|
1838
|
-
this.events = [], this._createHeaders(), this._createRenderData(), this.
|
|
2230
|
+
this._shouldReloadViewType = !1, this.events = [], this._createHeaders(), this._createRenderData(), this.setScrollToSpecialDayjs(!0);
|
|
1839
2231
|
}
|
|
1840
2232
|
}
|
|
1841
2233
|
setSchedulerMaxHeight(t) {
|
|
@@ -1845,18 +2237,18 @@ class Cr {
|
|
|
1845
2237
|
return !!this.config.schedulerWidth.endsWith && this.config.schedulerWidth.endsWith("%");
|
|
1846
2238
|
}
|
|
1847
2239
|
toggleExpandStatus(t) {
|
|
1848
|
-
let e = !1,
|
|
1849
|
-
this.renderData.forEach((
|
|
2240
|
+
let e = !1, s = -1, r = !1, n = /* @__PURE__ */ new Map();
|
|
2241
|
+
this.renderData.forEach((i) => {
|
|
1850
2242
|
if (e === !1)
|
|
1851
|
-
|
|
1852
|
-
expanded:
|
|
1853
|
-
render:
|
|
2243
|
+
i.slotId === t && i.hasChildren && (e = !0, r = !i.expanded, i.expanded = r, s = i.indent, n.set(i.indent, {
|
|
2244
|
+
expanded: i.expanded,
|
|
2245
|
+
render: i.render
|
|
1854
2246
|
}));
|
|
1855
|
-
else if (
|
|
1856
|
-
let
|
|
1857
|
-
|
|
1858
|
-
expanded:
|
|
1859
|
-
render:
|
|
2247
|
+
else if (i.indent > s) {
|
|
2248
|
+
let o = n.get(i.indent - 1);
|
|
2249
|
+
i.render = o.expanded && o.render, i.hasChildren && n.set(i.indent, {
|
|
2250
|
+
expanded: i.expanded,
|
|
2251
|
+
render: i.render
|
|
1860
2252
|
});
|
|
1861
2253
|
} else
|
|
1862
2254
|
e = !1;
|
|
@@ -1875,8 +2267,8 @@ class Cr {
|
|
|
1875
2267
|
return this.isSchedulerResponsive() ? parseInt(t * Number(this.config.schedulerWidth.slice(0, -1)) / 100) : this.config.schedulerWidth;
|
|
1876
2268
|
}
|
|
1877
2269
|
getResourceTableWidth() {
|
|
1878
|
-
let t = this.getResourceTableConfigWidth(), e = this.getSchedulerWidth(),
|
|
1879
|
-
return this.isSchedulerResponsive() && this.getContentTableWidth() +
|
|
2270
|
+
let t = this.getResourceTableConfigWidth(), e = this.getSchedulerWidth(), s = this.isResourceViewResponsive() ? parseInt(e * Number(t.slice(0, -1)) / 100) : t;
|
|
2271
|
+
return this.isSchedulerResponsive() && this.getContentTableWidth() + s < e && (s = e - this.getContentTableWidth()), s;
|
|
1880
2272
|
}
|
|
1881
2273
|
getContentCellWidth() {
|
|
1882
2274
|
let t = this.getContentCellConfigWidth(), e = this.getSchedulerWidth();
|
|
@@ -1885,22 +2277,22 @@ class Cr {
|
|
|
1885
2277
|
getContentTableWidth() {
|
|
1886
2278
|
return this.headers.length * this.getContentCellWidth();
|
|
1887
2279
|
}
|
|
1888
|
-
|
|
1889
|
-
return this.config.
|
|
2280
|
+
getScrollToSpecialDayjs() {
|
|
2281
|
+
return this.config.scrollToSpecialDayjsEnabled ? this.scrollToSpecialDayjs : !1;
|
|
1890
2282
|
}
|
|
1891
2283
|
getSlots() {
|
|
1892
2284
|
return this.isEventPerspective ? this.eventGroups : this.resources;
|
|
1893
2285
|
}
|
|
1894
2286
|
getSlotById(t) {
|
|
1895
|
-
let e = this.getSlots(),
|
|
1896
|
-
return e.forEach((
|
|
1897
|
-
|
|
1898
|
-
}),
|
|
2287
|
+
let e = this.getSlots(), s;
|
|
2288
|
+
return e.forEach((r) => {
|
|
2289
|
+
r.id === t && (s = r);
|
|
2290
|
+
}), s;
|
|
1899
2291
|
}
|
|
1900
2292
|
getResourceById(t) {
|
|
1901
2293
|
let e;
|
|
1902
|
-
return this.resources.forEach((
|
|
1903
|
-
|
|
2294
|
+
return this.resources.forEach((s) => {
|
|
2295
|
+
s.id === t && (e = s);
|
|
1904
2296
|
}), e;
|
|
1905
2297
|
}
|
|
1906
2298
|
getTableHeaderHeight() {
|
|
@@ -1913,11 +2305,29 @@ class Cr {
|
|
|
1913
2305
|
}), t;
|
|
1914
2306
|
}
|
|
1915
2307
|
getCellMaxEvents() {
|
|
1916
|
-
return this.viewType ===
|
|
2308
|
+
return this.viewType === O.Week ? this.config.weekMaxEvents : this.viewType === O.Day ? this.config.dayMaxEvents : this.viewType === O.Month ? this.config.monthMaxEvents : this.viewType === O.Year ? this.config.yearMaxEvents : this.viewType === O.Quarter ? this.config.quarterMaxEvents : this.config.customMaxEvents;
|
|
2309
|
+
}
|
|
2310
|
+
getCalendarPopoverLocale() {
|
|
2311
|
+
return this.calendarPopoverLocale;
|
|
2312
|
+
}
|
|
2313
|
+
getSelectedDate() {
|
|
2314
|
+
return this.selectDate.format(ge);
|
|
2315
|
+
}
|
|
2316
|
+
getViewStartDate() {
|
|
2317
|
+
return this.startDate;
|
|
2318
|
+
}
|
|
2319
|
+
getViewEndDate() {
|
|
2320
|
+
return this.endDate;
|
|
2321
|
+
}
|
|
2322
|
+
getViewDates() {
|
|
2323
|
+
return {
|
|
2324
|
+
startDate: this.startDate,
|
|
2325
|
+
endDate: this.endDate
|
|
2326
|
+
};
|
|
1917
2327
|
}
|
|
1918
2328
|
getDateLabel() {
|
|
1919
|
-
let t = this.
|
|
1920
|
-
return t != e && (
|
|
2329
|
+
let t = this.localeDayjs(new Date(this.startDate)), e = this.localeDayjs(new Date(this.endDate)), s = t.format("LL");
|
|
2330
|
+
return t != e && (s = `${t.format("LL")}-${e.format("LL")}`), this.behaviors.getDateLabelFunc && (s = this.behaviors.getDateLabelFunc(this, this.viewType, this.startDate, this.endDate)), s;
|
|
1921
2331
|
}
|
|
1922
2332
|
addEvent(t) {
|
|
1923
2333
|
this._attachEvent(t), this.eventGroupsAutoGenerated && this._generateEventGroups(), this._createRenderData();
|
|
@@ -1929,14 +2339,17 @@ class Cr {
|
|
|
1929
2339
|
t.end = e, this._createRenderData();
|
|
1930
2340
|
}
|
|
1931
2341
|
swapEvent(t, e) {
|
|
1932
|
-
|
|
1933
|
-
|
|
2342
|
+
this.isEventPerspective ? ([t.groupId, e.groupId] = [e.groupId, t.groupId], [t.groupName, e.groupName] = [e.groupName, t.groupName]) : [t.resourceId, e.resourceId] = [e.resourceId, t.resourceId], [t.start, e.start] = [e.start, t.start], [t.end, e.end] = [e.end, t.end], this._detachEvent(t), this._detachEvent(e), this._attachEvent(t), this._attachEvent(e), this._createRenderData();
|
|
2343
|
+
}
|
|
2344
|
+
swapEvent2(t, e) {
|
|
2345
|
+
var s = Object.assign({}, t), r = Object.assign({}, e);
|
|
2346
|
+
this._detachEvent(t), this._detachEvent(e), this.isEventPerspective ? (s.groupId = e.groupId, s.groupName = e.groupName, r.groupId = t.groupId, r.groupName = t.groupName) : (s.resourceId = e.resourceId, r.resourceId = t.resourceId), s.end = e.end, s.start = e.start, r.end = t.end, r.start = t.start, this._attachEvent(s), this._attachEvent(r), this._createRenderData();
|
|
1934
2347
|
}
|
|
1935
|
-
moveEvent(t, e, r, n
|
|
1936
|
-
this._detachEvent(t), this.isEventPerspective ? (t.groupId = e, t.groupName =
|
|
2348
|
+
moveEvent(t, e, s, r, n) {
|
|
2349
|
+
this._detachEvent(t), this.isEventPerspective ? (t.groupId = e, t.groupName = s) : t.resourceId = e, t.end = n, t.start = r, this._attachEvent(t), this._createRenderData();
|
|
1937
2350
|
}
|
|
1938
|
-
isEventInTimeWindow(t, e,
|
|
1939
|
-
return t <
|
|
2351
|
+
isEventInTimeWindow(t, e, s, r) {
|
|
2352
|
+
return t < r && e > s;
|
|
1940
2353
|
}
|
|
1941
2354
|
removeEvent(t) {
|
|
1942
2355
|
let e = this.events.indexOf(t);
|
|
@@ -1944,15 +2357,15 @@ class Cr {
|
|
|
1944
2357
|
}
|
|
1945
2358
|
removeEventById(t) {
|
|
1946
2359
|
let e = -1;
|
|
1947
|
-
this.events.forEach((
|
|
1948
|
-
|
|
2360
|
+
this.events.forEach((s, r) => {
|
|
2361
|
+
s.id === t && (e = r);
|
|
1949
2362
|
}), e !== -1 && (this.events.splice(e, 1), this._createRenderData());
|
|
1950
2363
|
}
|
|
1951
2364
|
getResourceTableConfigWidth() {
|
|
1952
|
-
return this.showAgenda ? this.config.agendaResourceTableWidth : this.viewType ===
|
|
2365
|
+
return this.showAgenda ? this.config.agendaResourceTableWidth : this.viewType === O.Week ? this.config.weekResourceTableWidth : this.viewType === O.Day ? this.config.dayResourceTableWidth : this.viewType === O.Month ? this.config.monthResourceTableWidth : this.viewType === O.Year ? this.config.yearResourceTableWidth : this.viewType === O.Quarter ? this.config.quarterResourceTableWidth : this.config.customResourceTableWidth;
|
|
1953
2366
|
}
|
|
1954
2367
|
getContentCellConfigWidth() {
|
|
1955
|
-
return this.viewType ===
|
|
2368
|
+
return this.viewType === O.Week ? this.config.weekCellWidth : this.viewType === O.Day ? this.config.dayCellWidth : this.viewType === O.Month ? this.config.monthCellWidth : this.viewType === O.Year ? this.config.yearCellWidth : this.viewType === O.Quarter ? this.config.quarterCellWidth : this.config.customCellWidth;
|
|
1956
2369
|
}
|
|
1957
2370
|
_setDocumentWidth(t) {
|
|
1958
2371
|
t >= 0 && (this.documentWidth = t);
|
|
@@ -1962,10 +2375,10 @@ class Cr {
|
|
|
1962
2375
|
e !== -1 && this.events.splice(e, 1);
|
|
1963
2376
|
}
|
|
1964
2377
|
_attachEvent(t) {
|
|
1965
|
-
let e = 0,
|
|
1966
|
-
this.events.forEach((
|
|
1967
|
-
let
|
|
1968
|
-
|
|
2378
|
+
let e = 0, s = this.localeDayjs(new Date(t.start));
|
|
2379
|
+
this.events.forEach((r, n) => {
|
|
2380
|
+
let i = this.localeDayjs(new Date(r.start));
|
|
2381
|
+
s >= i && (e = n + 1);
|
|
1969
2382
|
}), this.events.splice(e, 0, t);
|
|
1970
2383
|
}
|
|
1971
2384
|
_handleRecurringEvents() {
|
|
@@ -1973,112 +2386,113 @@ class Cr {
|
|
|
1973
2386
|
t.forEach((e) => {
|
|
1974
2387
|
this._detachEvent(e);
|
|
1975
2388
|
}), t.forEach((e) => {
|
|
1976
|
-
let
|
|
1977
|
-
if (
|
|
1978
|
-
const f = new
|
|
1979
|
-
f.rrule(
|
|
1980
|
-
f.exdate(this.
|
|
1981
|
-
}),
|
|
2389
|
+
let s = this.startDate, r = this.endDate.add(1, "days"), n = this.localeDayjs(new Date(e.start)), i = this.localeDayjs(new Date(e.end)), o = Ae(e.rrule), l, u = o.origOptions.until || r.toDate();
|
|
2390
|
+
if (o.origOptions.dtstart && (l = this.localeDayjs(new Date(o.origOptions.dtstart))), r < u && (o.origOptions.until = r.toDate()), o = Ae(o.toString()), e.exdates || e.exrule) {
|
|
2391
|
+
const f = new os();
|
|
2392
|
+
f.rrule(o), e.exrule && f.exrule(Ae(e.exrule)), e.exdates && e.exdates.forEach((h) => {
|
|
2393
|
+
f.exdate(this.localeDayjs(h).toDate());
|
|
2394
|
+
}), o = f;
|
|
1982
2395
|
}
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
this.
|
|
2396
|
+
o.between(new Date(s), new Date(r)).forEach((f, h) => {
|
|
2397
|
+
const v = {
|
|
2398
|
+
...e,
|
|
2399
|
+
recurringEventId: e.id,
|
|
2400
|
+
recurringEventStart: e.start,
|
|
2401
|
+
recurringEventEnd: e.end,
|
|
2402
|
+
id: `${e.id}-${h}`,
|
|
2403
|
+
start: o.origOptions.tzid ? this.localeDayjs.utc(f).utcOffset(this.localeDayjs((/* @__PURE__ */ new Date()).utcOffset)(), !0).format(V) : this.localeDayjs(new Date(f)).format(V),
|
|
2404
|
+
end: o.origOptions.tzid ? this.localeDayjs.utc(f).utcOffset(this.localeDayjs((/* @__PURE__ */ new Date()).utcOffset)(), !0).add(i.diff(n), "ms").add(this.localeDayjs(new Date(u)).utcOffset() - this.localeDayjs(new Date(e.start)).utcOffset(), "m").format(V) : this.localeDayjs(new Date(f)).add(i.diff(n), "ms").format(V)
|
|
2405
|
+
};
|
|
2406
|
+
let D = this.localeDayjs(v.start), g = this.localeDayjs(v.end);
|
|
2407
|
+
this.isEventInTimeWindow(D, g, s, r) && (!l || D >= l) && this._attachEvent(v);
|
|
1994
2408
|
});
|
|
1995
2409
|
});
|
|
1996
2410
|
}
|
|
1997
2411
|
_resolveDate(t, e = void 0) {
|
|
1998
|
-
if (e != null && (this.selectDate = this.
|
|
1999
|
-
this.startDate = e != null ? this.
|
|
2000
|
-
else if (this.viewType ===
|
|
2001
|
-
this.startDate = e != null ? this.selectDate : this.
|
|
2002
|
-
else if (this.viewType ===
|
|
2003
|
-
this.startDate = e != null ? this.
|
|
2004
|
-
else if (this.viewType ===
|
|
2005
|
-
this.startDate = e != null ? this.
|
|
2006
|
-
else if (this.viewType ===
|
|
2007
|
-
this.startDate = e != null ? this.
|
|
2008
|
-
else if (this.viewType ===
|
|
2412
|
+
if (e != null && (this.selectDate = this.localeDayjs(e)), this.viewType === O.Week)
|
|
2413
|
+
this.startDate = e != null ? this.localeDayjs(e).startOf("week") : this.localeDayjs(this.startDate).add(t, "weeks"), this.endDate = this.localeDayjs(this.startDate).endOf("week");
|
|
2414
|
+
else if (this.viewType === O.Day)
|
|
2415
|
+
this.startDate = e != null ? this.selectDate : this.localeDayjs(this.startDate).add(t, "days"), this.endDate = this.startDate;
|
|
2416
|
+
else if (this.viewType === O.Month)
|
|
2417
|
+
this.startDate = e != null ? this.localeDayjs(e).startOf("month") : this.localeDayjs(this.startDate).add(t, "months"), this.endDate = this.localeDayjs(this.startDate).endOf("month");
|
|
2418
|
+
else if (this.viewType === O.Quarter)
|
|
2419
|
+
this.startDate = e != null ? this.localeDayjs(e).startOf("quarter") : this.localeDayjs(this.startDate).add(t, "quarters"), this.endDate = this.localeDayjs(this.startDate).endOf("quarter");
|
|
2420
|
+
else if (this.viewType === O.Year)
|
|
2421
|
+
this.startDate = e != null ? this.localeDayjs(e).startOf("year") : this.localeDayjs(this.startDate).add(t, "years"), this.endDate = this.localeDayjs(this.startDate).endOf("year");
|
|
2422
|
+
else if (this.viewType === O.Custom || this.viewType === O.Custom1 || this.viewType === O.Custom2)
|
|
2009
2423
|
if (this.behaviors.getCustomDateFunc != null) {
|
|
2010
|
-
let
|
|
2011
|
-
this.startDate =
|
|
2424
|
+
let s = this.behaviors.getCustomDateFunc(this, t, e);
|
|
2425
|
+
this.startDate = this.localeDayjs(s.startDate), this.endDate = this.localeDayjs(s.endDate), s.cellUnit && (this.cellUnit = s.cellUnit);
|
|
2012
2426
|
} else
|
|
2013
2427
|
throw new Error("This is custom view type, set behaviors.getCustomDateFunc func to resolve the time window(startDate and endDate) yourself");
|
|
2014
2428
|
}
|
|
2015
2429
|
_createHeaders() {
|
|
2016
|
-
let t = [], e = this.
|
|
2430
|
+
let t = [], e = this.localeDayjs(new Date(this.startDate)), s = this.localeDayjs(new Date(this.endDate)), r = e;
|
|
2017
2431
|
if (this.showAgenda)
|
|
2018
|
-
t.push({ time:
|
|
2019
|
-
else if (this.cellUnit ===
|
|
2020
|
-
e
|
|
2021
|
-
let
|
|
2022
|
-
for (;
|
|
2023
|
-
if (
|
|
2024
|
-
|
|
2432
|
+
t.push({ time: r.format(V), nonWorkingTime: !1 });
|
|
2433
|
+
else if (this.cellUnit === U.Hour) {
|
|
2434
|
+
e.hour() == 0 && (e = e.add(this.config.dayStartFrom, "hours")), s.hour() == 0 && (s = s.add(this.config.dayStopTo, "hours")), r = e;
|
|
2435
|
+
let n = -1;
|
|
2436
|
+
for (; r >= e && r <= s; ) {
|
|
2437
|
+
if (r.hour() == n) {
|
|
2438
|
+
r = r.add(1, "hours");
|
|
2025
2439
|
continue;
|
|
2026
2440
|
}
|
|
2027
|
-
|
|
2028
|
-
let
|
|
2029
|
-
for (let
|
|
2030
|
-
let
|
|
2031
|
-
if (
|
|
2032
|
-
let
|
|
2033
|
-
t.push({ time:
|
|
2441
|
+
n = r.hour();
|
|
2442
|
+
let i = this.getMinuteStepsInHour();
|
|
2443
|
+
for (let o = 0; o < i; o++) {
|
|
2444
|
+
let l = r.hour();
|
|
2445
|
+
if (l >= this.config.dayStartFrom && l <= this.config.dayStopTo) {
|
|
2446
|
+
let u = r.format(V), c = this.behaviors.isNonWorkingTimeFunc(this, u);
|
|
2447
|
+
t.push({ time: u, nonWorkingTime: c });
|
|
2034
2448
|
}
|
|
2035
|
-
|
|
2449
|
+
r = r.add(this.config.minuteStep, "minutes");
|
|
2036
2450
|
}
|
|
2037
2451
|
}
|
|
2038
|
-
} else if (this.cellUnit ===
|
|
2039
|
-
for (;
|
|
2040
|
-
let
|
|
2041
|
-
if (this.config.displayWeekend ||
|
|
2042
|
-
let
|
|
2043
|
-
t.push({ time:
|
|
2452
|
+
} else if (this.cellUnit === U.Day)
|
|
2453
|
+
for (; r >= e && r <= s; ) {
|
|
2454
|
+
let n = r.format(V), i = r.weekday();
|
|
2455
|
+
if (this.config.displayWeekend || i !== 0 && i !== 6) {
|
|
2456
|
+
let o = this.behaviors.isNonWorkingTimeFunc(this, n);
|
|
2457
|
+
t.push({ time: n, nonWorkingTime: o });
|
|
2044
2458
|
}
|
|
2045
|
-
|
|
2459
|
+
r = r.add(1, "days");
|
|
2046
2460
|
}
|
|
2047
|
-
else if (this.cellUnit ===
|
|
2048
|
-
for (;
|
|
2049
|
-
let
|
|
2050
|
-
t.push({ time:
|
|
2461
|
+
else if (this.cellUnit === U.Week)
|
|
2462
|
+
for (; r >= e && r <= s; ) {
|
|
2463
|
+
let n = r.format(ge);
|
|
2464
|
+
t.push({ time: n }), r = r.add(1, "weeks").startOf("week");
|
|
2051
2465
|
}
|
|
2052
|
-
else if (this.cellUnit ===
|
|
2053
|
-
for (;
|
|
2054
|
-
let
|
|
2055
|
-
t.push({ time:
|
|
2466
|
+
else if (this.cellUnit === U.Month)
|
|
2467
|
+
for (; r >= e && r <= s; ) {
|
|
2468
|
+
let n = r.format(ge);
|
|
2469
|
+
t.push({ time: n }), r = r.add(1, "months").startOf("month");
|
|
2056
2470
|
}
|
|
2057
|
-
else if (this.cellUnit ===
|
|
2058
|
-
for (;
|
|
2059
|
-
let
|
|
2060
|
-
t.push({ time:
|
|
2471
|
+
else if (this.cellUnit === U.Year)
|
|
2472
|
+
for (; r >= e && r <= s; ) {
|
|
2473
|
+
let n = r.format(ge);
|
|
2474
|
+
t.push({ time: n }), r = r.add(1, "years").startOf("year");
|
|
2061
2475
|
}
|
|
2062
2476
|
this.headers = t;
|
|
2063
2477
|
}
|
|
2064
2478
|
_createInitHeaderEvents(t) {
|
|
2065
|
-
let e = this.
|
|
2479
|
+
let e = this.localeDayjs(new Date(t.time)), s = e.format(V), r = this.showAgenda ? this.viewType === O.Week ? e.add(1, "weeks").format(V) : this.viewType === O.Day ? e.add(1, "days").format(V) : this.viewType === O.Month ? e.add(1, "months").format(V) : this.viewType === O.Year ? e.add(1, "years").format(V) : this.viewType === O.Quarter ? e.add(1, "quarters").format(V) : this.localeDayjs(new Date(this.endDate)).add(1, "days").format(V) : this.cellUnit === U.Hour ? e.add(this.config.minuteStep, "minutes").format(V) : this.cellUnit === U.Year ? e.add(1, "years").format(ge) : this.cellUnit === U.Month ? e.add(1, "months").format(ge) : this.cellUnit === U.Week ? e.add(1, "weeks").format(ge) : e.add(1, "days").format(V);
|
|
2066
2480
|
return {
|
|
2067
2481
|
time: t.time,
|
|
2068
2482
|
nonWorkingTime: t.nonWorkingTime,
|
|
2069
|
-
start:
|
|
2070
|
-
end:
|
|
2483
|
+
start: s,
|
|
2484
|
+
end: r,
|
|
2071
2485
|
count: 0,
|
|
2072
2486
|
addMore: 0,
|
|
2073
2487
|
addMoreIndex: 0,
|
|
2074
2488
|
events: [, , ,]
|
|
2075
2489
|
};
|
|
2076
2490
|
}
|
|
2077
|
-
_createHeaderEvent(t, e,
|
|
2491
|
+
_createHeaderEvent(t, e, s) {
|
|
2078
2492
|
return {
|
|
2079
2493
|
render: t,
|
|
2080
2494
|
span: e,
|
|
2081
|
-
eventItem:
|
|
2495
|
+
eventItem: s
|
|
2082
2496
|
};
|
|
2083
2497
|
}
|
|
2084
2498
|
_getEventSlotId(t) {
|
|
@@ -2092,94 +2506,127 @@ class Cr {
|
|
|
2092
2506
|
}
|
|
2093
2507
|
_generateEventGroups() {
|
|
2094
2508
|
let t = [], e = /* @__PURE__ */ new Set();
|
|
2095
|
-
this.events.forEach((
|
|
2096
|
-
let
|
|
2097
|
-
e.has(
|
|
2098
|
-
id:
|
|
2099
|
-
name:
|
|
2100
|
-
state:
|
|
2101
|
-
}), e.add(
|
|
2509
|
+
this.events.forEach((s) => {
|
|
2510
|
+
let r = this._getEventGroupId(s), n = this._getEventGroupName(s);
|
|
2511
|
+
e.has(r) || (t.push({
|
|
2512
|
+
id: r,
|
|
2513
|
+
name: n,
|
|
2514
|
+
state: s
|
|
2515
|
+
}), e.add(r));
|
|
2102
2516
|
}), this.eventGroups = t;
|
|
2103
2517
|
}
|
|
2104
|
-
_createInitRenderData(t, e,
|
|
2105
|
-
let
|
|
2106
|
-
|
|
2107
|
-
let
|
|
2108
|
-
slotId:
|
|
2109
|
-
slotName:
|
|
2110
|
-
parentId:
|
|
2111
|
-
groupOnly:
|
|
2518
|
+
_createInitRenderData(t, e, s, r) {
|
|
2519
|
+
let n = t ? e : s, i = [], o = /* @__PURE__ */ new Map();
|
|
2520
|
+
n.forEach((h) => {
|
|
2521
|
+
let v = r.map((b) => this._createInitHeaderEvents(b)), D = {
|
|
2522
|
+
slotId: h.id,
|
|
2523
|
+
slotName: h.name,
|
|
2524
|
+
parentId: h.parentId,
|
|
2525
|
+
groupOnly: h.groupOnly,
|
|
2112
2526
|
hasSummary: !1,
|
|
2113
2527
|
rowMaxCount: 0,
|
|
2114
2528
|
rowHeight: this.config.nonAgendaSlotMinHeight !== 0 ? this.config.nonAgendaSlotMinHeight : this.config.eventItemLineHeight + 2,
|
|
2115
|
-
headerItems:
|
|
2529
|
+
headerItems: v,
|
|
2116
2530
|
indent: 0,
|
|
2117
2531
|
hasChildren: !1,
|
|
2118
2532
|
expanded: !0,
|
|
2119
2533
|
render: !0
|
|
2120
|
-
},
|
|
2121
|
-
|
|
2122
|
-
data:
|
|
2534
|
+
}, g = h.id, w;
|
|
2535
|
+
o.has(g) ? (w = o.get(g), w.data = D) : (w = {
|
|
2536
|
+
data: D,
|
|
2123
2537
|
children: []
|
|
2124
|
-
},
|
|
2125
|
-
let
|
|
2126
|
-
if (!
|
|
2127
|
-
|
|
2538
|
+
}, o.set(g, w));
|
|
2539
|
+
let T = h.parentId;
|
|
2540
|
+
if (!T || T === g)
|
|
2541
|
+
i.push(w);
|
|
2128
2542
|
else {
|
|
2129
|
-
let
|
|
2130
|
-
|
|
2543
|
+
let b;
|
|
2544
|
+
o.has(T) ? b = o.get(T) : (b = {
|
|
2131
2545
|
data: void 0,
|
|
2132
2546
|
children: []
|
|
2133
|
-
},
|
|
2547
|
+
}, o.set(T, b)), b.children.push(w);
|
|
2134
2548
|
}
|
|
2135
2549
|
});
|
|
2136
|
-
let
|
|
2137
|
-
for (
|
|
2138
|
-
|
|
2139
|
-
let
|
|
2140
|
-
for (;
|
|
2141
|
-
for (
|
|
2142
|
-
|
|
2143
|
-
return
|
|
2144
|
-
}
|
|
2145
|
-
_getSpan(t, e,
|
|
2550
|
+
let l = [], u;
|
|
2551
|
+
for (u = i.length - 1; u >= 0; u--)
|
|
2552
|
+
l.push(i[u]);
|
|
2553
|
+
let c = [], f;
|
|
2554
|
+
for (; l.length > 0; )
|
|
2555
|
+
for (f = l.pop(), f.data.indent > 0 && (f.data.render = this.config.defaultExpanded), f.children.length > 0 && (f.data.hasChildren = !0, f.data.expanded = this.config.defaultExpanded), c.push(f.data), u = f.children.length - 1; u >= 0; u--)
|
|
2556
|
+
f.children[u].data.indent = f.data.indent + 1, l.push(f.children[u]);
|
|
2557
|
+
return c;
|
|
2558
|
+
}
|
|
2559
|
+
_getSpan(t, e, s) {
|
|
2146
2560
|
if (this.showAgenda)
|
|
2147
2561
|
return 1;
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2562
|
+
const r = (c, f, h) => {
|
|
2563
|
+
if ((h === "days" || h === "day") && c.getDate() === f.getDate() && c.getMonth() === f.getMonth())
|
|
2564
|
+
return 1;
|
|
2565
|
+
let v;
|
|
2566
|
+
switch (h) {
|
|
2567
|
+
case "days":
|
|
2568
|
+
case "day":
|
|
2569
|
+
v = 1e3 * 60 * 60 * 24;
|
|
2570
|
+
break;
|
|
2571
|
+
case "minutes":
|
|
2572
|
+
case "minute":
|
|
2573
|
+
v = 1e3 * 60;
|
|
2574
|
+
break;
|
|
2575
|
+
default:
|
|
2576
|
+
return 0;
|
|
2577
|
+
}
|
|
2578
|
+
const D = c.getTime(), w = (f.getTime() - D) / v;
|
|
2579
|
+
return w < 0 ? 0 : w;
|
|
2580
|
+
};
|
|
2581
|
+
let n = new Date(t), i = new Date(e), o = 0, l = new Date(this.startDate), u = new Date(this.endDate);
|
|
2582
|
+
if (this.viewType === O.Day) {
|
|
2583
|
+
if (s.length > 0) {
|
|
2584
|
+
const c = new Date(s[0].time);
|
|
2585
|
+
c.getDate() > n.getDate() && c.getDate() < i.getDate() ? o = 1440 / this.config.minuteStep : c.getDate() > n.getDate() && c.getDate() === i.getDate() ? o = Math.ceil(r(c, i, "minutes") / this.config.minuteStep) : c.getDate() === n.getDate() && c.getDate() < i.getDate() ? (c.setHours(23, 59, 59), o = Math.ceil(r(n, c, "minutes") / this.config.minuteStep)) : (c.getDate() === n.getDate() && c.getDate() === i.getDate() || i.getDate() === n.getDate()) && (o = Math.ceil(r(n, i, "minutes") / this.config.minuteStep));
|
|
2586
|
+
}
|
|
2587
|
+
} else if (this.viewType === O.Week) {
|
|
2588
|
+
const c = l < n ? n : l;
|
|
2589
|
+
o = Math.ceil(r(c, i, "days"));
|
|
2590
|
+
} else if (this.viewType === O.Month) {
|
|
2591
|
+
const c = n.getMonth() === i.getMonth() ? i : ve(n).endOf("month").toDate();
|
|
2592
|
+
o = Math.ceil(r(n, c, "days"));
|
|
2593
|
+
} else if (this.viewType === O.Quarter || this.viewType === O.Year)
|
|
2594
|
+
o = Math.ceil(r(n, i, "days"));
|
|
2595
|
+
else {
|
|
2596
|
+
l.setHours(0, 0, 0, 0), u.setHours(23, 59, 59), this.cellUnit === U.Day && (i.setHours(23, 59, 59), n.setHours(0, 0, 0, 0));
|
|
2597
|
+
const c = this.cellUnit === U.Day ? "days" : "minutes", f = this.cellUnit === U.Day ? 1 : this.config.minuteStep;
|
|
2598
|
+
l >= n && i <= u ? o = Math.ceil(r(l, i, c) / f) : l > n && i > u ? o = Math.ceil(r(l, u, c) / f) : l <= n && i >= u ? o = Math.ceil(r(n, u, c) / f) : o = Math.ceil(r(n, i, c) / f);
|
|
2152
2599
|
}
|
|
2153
2600
|
return o;
|
|
2154
2601
|
}
|
|
2155
2602
|
_validateResource(t) {
|
|
2156
2603
|
if (Object.prototype.toString.call(t) !== "[object Array]")
|
|
2157
2604
|
throw new Error("Resources should be Array object");
|
|
2158
|
-
t.forEach((e,
|
|
2605
|
+
t.forEach((e, s) => {
|
|
2159
2606
|
if (e == null)
|
|
2160
|
-
throw console.error(`Resource undefined: ${
|
|
2607
|
+
throw console.error(`Resource undefined: ${s}`), new Error(`Resource undefined: ${s}`);
|
|
2161
2608
|
if (e.id == null || e.name == null)
|
|
2162
|
-
throw console.error("Resource property missed",
|
|
2609
|
+
throw console.error("Resource property missed", s, e), new Error(`Resource property undefined: ${s}`);
|
|
2163
2610
|
});
|
|
2164
2611
|
}
|
|
2165
2612
|
_validateEventGroups(t) {
|
|
2166
2613
|
if (Object.prototype.toString.call(t) !== "[object Array]")
|
|
2167
2614
|
throw new Error("Event groups should be Array object");
|
|
2168
|
-
t.forEach((e,
|
|
2615
|
+
t.forEach((e, s) => {
|
|
2169
2616
|
if (e == null)
|
|
2170
|
-
throw console.error(`Event group undefined: ${
|
|
2617
|
+
throw console.error(`Event group undefined: ${s}`), new Error(`Event group undefined: ${s}`);
|
|
2171
2618
|
if (e.id == null || e.name == null)
|
|
2172
|
-
throw console.error("Event group property missed",
|
|
2619
|
+
throw console.error("Event group property missed", s, e), new Error(`Event group property undefined: ${s}`);
|
|
2173
2620
|
});
|
|
2174
2621
|
}
|
|
2175
2622
|
_validateEvents(t) {
|
|
2176
2623
|
if (Object.prototype.toString.call(t) !== "[object Array]")
|
|
2177
2624
|
throw new Error("Events should be Array object");
|
|
2178
|
-
t.forEach((e,
|
|
2625
|
+
t.forEach((e, s) => {
|
|
2179
2626
|
if (e == null)
|
|
2180
|
-
throw console.error(`Event undefined: ${
|
|
2627
|
+
throw console.error(`Event undefined: ${s}`), new Error(`Event undefined: ${s}`);
|
|
2181
2628
|
if (e.id == null || e.resourceId == null || e.title == null || e.start == null || e.end == null)
|
|
2182
|
-
throw console.error("Event property missed",
|
|
2629
|
+
throw console.error("Event property missed", s, e), new Error(`Event property undefined: ${s}`);
|
|
2183
2630
|
});
|
|
2184
2631
|
}
|
|
2185
2632
|
_validateMinuteStep(t) {
|
|
@@ -2187,60 +2634,60 @@ class Cr {
|
|
|
2187
2634
|
throw console.error("Minute step is not set properly - 60 minutes must be divisible without remainder by this number"), new Error("Minute step is not set properly - 60 minutes must be divisible without remainder by this number");
|
|
2188
2635
|
}
|
|
2189
2636
|
_compare(t, e) {
|
|
2190
|
-
let
|
|
2191
|
-
if (
|
|
2192
|
-
return
|
|
2193
|
-
let
|
|
2194
|
-
return
|
|
2637
|
+
let s = this.localeDayjs(t.start), r = this.localeDayjs(e.start);
|
|
2638
|
+
if (s !== r)
|
|
2639
|
+
return s < r ? -1 : 1;
|
|
2640
|
+
let n = this.localeDayjs(t.end), i = this.localeDayjs(e.end);
|
|
2641
|
+
return n !== i ? n < i ? -1 : 1 : t.id < e.id ? -1 : 1;
|
|
2195
2642
|
}
|
|
2196
2643
|
_createRenderData() {
|
|
2197
2644
|
let t = this._createInitRenderData(this.isEventPerspective, this.eventGroups, this.resources, this.headers), e = this.getCellMaxEvents();
|
|
2198
|
-
const
|
|
2199
|
-
this.events.forEach((
|
|
2200
|
-
let
|
|
2201
|
-
if (
|
|
2202
|
-
let
|
|
2203
|
-
|
|
2204
|
-
let
|
|
2205
|
-
if (
|
|
2206
|
-
if (
|
|
2207
|
-
|
|
2208
|
-
let
|
|
2209
|
-
|
|
2645
|
+
const s = 30;
|
|
2646
|
+
this.events.forEach((r) => {
|
|
2647
|
+
let n = t.filter((i) => i.slotId === this._getEventSlotId(r));
|
|
2648
|
+
if (n.length > 0) {
|
|
2649
|
+
let i = n[0], o = this._getSpan(r.start, r.end, this.headers), l = new Date(r.start), u = new Date(r.end), c = -1;
|
|
2650
|
+
i.headerItems.forEach((f, h) => {
|
|
2651
|
+
let v = new Date(f.start);
|
|
2652
|
+
if (new Date(f.end) > l && v < u) {
|
|
2653
|
+
if (f.count = f.count + 1, f.count > i.rowMaxCount) {
|
|
2654
|
+
i.rowMaxCount = f.count;
|
|
2655
|
+
let T = (e <= s && i.rowMaxCount > e ? e : i.rowMaxCount) * this.config.eventItemLineHeight + (this.config.creatable && this.config.checkConflict === !1 ? 20 : 2);
|
|
2656
|
+
T > i.rowHeight && (i.rowHeight = T);
|
|
2210
2657
|
}
|
|
2211
|
-
if (
|
|
2212
|
-
let
|
|
2213
|
-
for (;
|
|
2214
|
-
|
|
2215
|
-
|
|
2658
|
+
if (c === -1) {
|
|
2659
|
+
let w = 0;
|
|
2660
|
+
for (; f.events[w] !== void 0; )
|
|
2661
|
+
w++;
|
|
2662
|
+
c = w;
|
|
2216
2663
|
}
|
|
2217
|
-
let
|
|
2218
|
-
if (
|
|
2219
|
-
let
|
|
2220
|
-
(
|
|
2664
|
+
let g = v <= l || h === 0;
|
|
2665
|
+
if (g === !1) {
|
|
2666
|
+
let w = i.headerItems[h - 1], T = new Date(w.start);
|
|
2667
|
+
(new Date(w.end) <= l || T >= u) && (g = !0);
|
|
2221
2668
|
}
|
|
2222
|
-
|
|
2669
|
+
f.events[c] = this._createHeaderEvent(g, o, r);
|
|
2223
2670
|
}
|
|
2224
2671
|
});
|
|
2225
2672
|
}
|
|
2226
|
-
}), (e <=
|
|
2227
|
-
let
|
|
2228
|
-
if (
|
|
2229
|
-
if (e <=
|
|
2230
|
-
let
|
|
2231
|
-
for (;
|
|
2232
|
-
|
|
2233
|
-
|
|
2673
|
+
}), (e <= s || this.behaviors.getSummaryFunc !== void 0) && t.forEach((r) => {
|
|
2674
|
+
let n = !1;
|
|
2675
|
+
if (r.headerItems.forEach((i) => {
|
|
2676
|
+
if (e <= s) {
|
|
2677
|
+
let o = 0, l = 0, u = 0;
|
|
2678
|
+
for (; u < e - 1; )
|
|
2679
|
+
i.events[u] !== void 0 && (o++, l = u + 1), u++;
|
|
2680
|
+
i.events[u] !== void 0 ? o + 1 < i.count && (i.addMore = i.count - o, i.addMoreIndex = l) : o < i.count && (i.addMore = i.count - o, i.addMoreIndex = l);
|
|
2234
2681
|
}
|
|
2235
2682
|
if (this.behaviors.getSummaryFunc !== void 0) {
|
|
2236
|
-
let
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
}),
|
|
2683
|
+
let o = [];
|
|
2684
|
+
i.events.forEach((l) => {
|
|
2685
|
+
l && l.eventItem && o.push(l.eventItem);
|
|
2686
|
+
}), i.summary = this.behaviors.getSummaryFunc(this, o, r.slotId, r.slotName, i.start, i.end), i.summary && i.summary.text != null && (n = !0);
|
|
2240
2687
|
}
|
|
2241
|
-
}),
|
|
2242
|
-
let
|
|
2243
|
-
|
|
2688
|
+
}), r.hasSummary = n, n) {
|
|
2689
|
+
let o = ((e <= s && r.rowMaxCount > e ? e : r.rowMaxCount) + 1) * this.config.eventItemLineHeight + (this.config.creatable && this.config.checkConflict === !1 ? 20 : 2);
|
|
2690
|
+
o > r.rowHeight && (r.rowHeight = o);
|
|
2244
2691
|
}
|
|
2245
2692
|
}), this.renderData = t;
|
|
2246
2693
|
}
|
|
@@ -2254,7 +2701,7 @@ class Cr {
|
|
|
2254
2701
|
return this.resizing;
|
|
2255
2702
|
}
|
|
2256
2703
|
}
|
|
2257
|
-
const
|
|
2704
|
+
const $s = {
|
|
2258
2705
|
resources: [
|
|
2259
2706
|
{ id: "r0", name: "Resource0", groupOnly: !0 },
|
|
2260
2707
|
{ id: "r1", name: "Resource1", parentId: "r0" },
|
|
@@ -2275,7 +2722,7 @@ const Rr = {
|
|
|
2275
2722
|
{ id: 7, start: "2022-12-19 15:40:00", end: "2022-12-20 23:30:00", resourceId: "r7", title: "I am exceptional", bgColor: "#FA9E95" },
|
|
2276
2723
|
{ id: 8, start: "2022-12-19 15:50:00", end: "2022-12-19 23:30:00", resourceId: "r1", title: "I am locked", movable: !1, resizable: !1, bgColor: "red" },
|
|
2277
2724
|
{ id: 9, start: "2022-12-19 16:30:00", end: "2022-12-27 23:30:00", resourceId: "r1", title: "R1 has many tasks 1" },
|
|
2278
|
-
{ id: 10, start: "2022-12-19 17:30:00", end: "2022-12-19 23:30:00", resourceId: "r1", title: "R1 has recurring tasks every week on Tuesday, Friday", bgColor: "#f759ab" },
|
|
2725
|
+
{ id: 10, start: "2022-12-19 17:30:00", end: "2022-12-19 23:30:00", resourceId: "r1", title: "R1 has recurring tasks every week on Tuesday, Friday", rrule: "FREQ=WEEKLY;DTSTART=20221219T013000Z;BYDAY=TU,FR", bgColor: "#f759ab" },
|
|
2279
2726
|
{ id: 11, start: "2022-12-19 18:30:00", end: "2022-12-20 23:30:00", resourceId: "r1", title: "R1 has many tasks 3" },
|
|
2280
2727
|
{ id: 12, start: "2022-12-20 18:30:00", end: "2022-12-20 23:30:00", resourceId: "r1", title: "R1 has many tasks 4" },
|
|
2281
2728
|
{ id: 13, start: "2022-12-21 18:30:00", end: "2022-12-24 23:30:00", resourceId: "r1", title: "R1 has many tasks 5" },
|
|
@@ -2290,9 +2737,20 @@ const Rr = {
|
|
|
2290
2737
|
{ id: 5, start: "2022-12-21 15:30:00", end: "2022-12-22 23:30:00", resourceId: "r5", title: "I am not end-resizable", endResizable: !1, groupId: 3, groupName: "Task3" },
|
|
2291
2738
|
{ id: 9, start: "2022-12-21 16:30:00", end: "2022-12-21 23:30:00", resourceId: "r1", title: "R1 has many tasks", groupId: 4, groupName: "Task4" },
|
|
2292
2739
|
{ id: 6, start: "2022-12-22 15:35:00", end: "2022-12-23 23:30:00", resourceId: "r6", title: "I am normal", groupId: 1, groupName: "Task1" },
|
|
2293
|
-
{
|
|
2740
|
+
{
|
|
2741
|
+
id: 8,
|
|
2742
|
+
start: "2022-12-25 15:50:00",
|
|
2743
|
+
end: "2022-12-26 23:30:00",
|
|
2744
|
+
resourceId: "r1",
|
|
2745
|
+
title: "I am locked",
|
|
2746
|
+
movable: !1,
|
|
2747
|
+
resizable: !1,
|
|
2748
|
+
bgColor: "red",
|
|
2749
|
+
groupId: 1,
|
|
2750
|
+
groupName: "Task1"
|
|
2751
|
+
},
|
|
2294
2752
|
{ id: 10, start: "2022-12-26 18:30:00", end: "2022-12-26 23:30:00", resourceId: "r2", title: "R2 has many tasks", groupId: 4, groupName: "Task4" },
|
|
2295
|
-
{ id: 11, start: "2022-12-27 18:30:00", end: "2022-12-27 23:30:00", resourceId: "
|
|
2753
|
+
{ id: 11, start: "2022-12-27 18:30:00", end: "2022-12-27 23:30:00", resourceId: "r4", title: "R4 has many tasks", groupId: 4, groupName: "Task4" },
|
|
2296
2754
|
{ id: 12, start: "2022-12-28 18:30:00", end: "2022-12-28 23:30:00", resourceId: "r6", title: "R6 has many tasks", groupId: 3, groupName: "Task3" }
|
|
2297
2755
|
],
|
|
2298
2756
|
eventsForCustomEventStyle: [
|
|
@@ -2309,328 +2767,306 @@ const Rr = {
|
|
|
2309
2767
|
{ id: 11, start: "2022-12-21 18:30:00", end: "2022-12-22 23:30:00", resourceId: "r1", title: "R1 has many tasks 3", type: 2 },
|
|
2310
2768
|
{ id: 12, start: "2022-12-23 18:30:00", end: "2022-12-27 23:30:00", resourceId: "r1", title: "R1 has many tasks 4", type: 3 }
|
|
2311
2769
|
]
|
|
2770
|
+
}, Cs = ut.Button, Ss = ut.Group, Tt = ({ onViewChange: R, goNext: t, goBack: e, onSelectDate: s, schedulerData: r, leftCustomHeader: n, rightCustomHeader: i }) => {
|
|
2771
|
+
var z, W;
|
|
2772
|
+
const [o, l] = ke(!1), [u, c] = ke(!1), [f, h] = ke(!1), { viewType: v, showAgenda: D, isEventPerspective: g, config: w } = r, T = r.getDateLabel(), b = r.getSelectedDate(), k = (W = (z = r.getCalendarPopoverLocale()) == null ? void 0 : z.default) == null ? void 0 : W.Calendar, A = `${v}${D ? 1 : 0}${g ? 1 : 0}`, $ = (C, X, Z = void 0) => {
|
|
2773
|
+
const { config: S } = r;
|
|
2774
|
+
X ? S.viewChangeSpinEnabled && l(!0) : S.dateChangeSpinEnabled && c(!0);
|
|
2775
|
+
const x = () => {
|
|
2776
|
+
Z !== void 0 ? C(Z) : C(), X ? S.viewChangeSpinEnabled && l(!1) : S.dateChangeSpinEnabled && c(!1);
|
|
2777
|
+
};
|
|
2778
|
+
S.viewChangeSpinEnabled || S.dateChangeSpinEnabled ? setTimeout(x, S.schedulerHeaderEventsFuncsTimeoutMs) : x();
|
|
2779
|
+
}, H = /* @__PURE__ */ d.jsx("div", { className: "popover-calendar", children: /* @__PURE__ */ d.jsx(
|
|
2780
|
+
Zt,
|
|
2781
|
+
{
|
|
2782
|
+
locale: k,
|
|
2783
|
+
defaultValue: ve(b),
|
|
2784
|
+
fullscreen: !1,
|
|
2785
|
+
onSelect: (C) => {
|
|
2786
|
+
h(!1), $(s, !1, C.format(ge));
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2789
|
+
) }), N = w.views.map((C) => /* @__PURE__ */ d.jsx(
|
|
2790
|
+
Cs,
|
|
2791
|
+
{
|
|
2792
|
+
value: `${C.viewType}${C.showAgenda ? 1 : 0}${C.isEventPerspective ? 1 : 0}`,
|
|
2793
|
+
children: /* @__PURE__ */ d.jsx("span", { style: { margin: "0px 8px" }, children: C.viewName })
|
|
2794
|
+
},
|
|
2795
|
+
`${C.viewType}${C.showAgenda ? 1 : 0}${C.isEventPerspective ? 1 : 0}`
|
|
2796
|
+
));
|
|
2797
|
+
return /* @__PURE__ */ d.jsxs(we, { gutter: [10, 10], type: "flex", align: "middle", justify: "space-between", style: { marginBottom: "24px" }, children: [
|
|
2798
|
+
n,
|
|
2799
|
+
/* @__PURE__ */ d.jsx(de, { children: /* @__PURE__ */ d.jsx("div", { className: "header2-text", children: /* @__PURE__ */ d.jsxs(it, { children: [
|
|
2800
|
+
/* @__PURE__ */ d.jsxs("div", { children: [
|
|
2801
|
+
/* @__PURE__ */ d.jsx(is, { type: "left", style: { marginRight: "8px" }, className: "icon-nav", onClick: () => $(e, !1) }),
|
|
2802
|
+
w.calendarPopoverEnabled ? /* @__PURE__ */ d.jsx(Fe, { content: H, placement: "bottomLeft", trigger: "click", open: f, onOpenChange: h, children: /* @__PURE__ */ d.jsx("span", { className: "header2-text-label", style: { cursor: "pointer" }, children: T }) }) : /* @__PURE__ */ d.jsx("span", { className: "header2-text-label", children: T }),
|
|
2803
|
+
/* @__PURE__ */ d.jsx(as, { type: "right", style: { marginLeft: "8px" }, className: "icon-nav", onClick: () => $(t, !1) })
|
|
2804
|
+
] }),
|
|
2805
|
+
/* @__PURE__ */ d.jsx(at, { spinning: u })
|
|
2806
|
+
] }) }) }),
|
|
2807
|
+
/* @__PURE__ */ d.jsx(de, { children: /* @__PURE__ */ d.jsxs(it, { children: [
|
|
2808
|
+
/* @__PURE__ */ d.jsx(at, { spinning: o }),
|
|
2809
|
+
/* @__PURE__ */ d.jsx(Ss, { buttonStyle: "solid", defaultValue: A, size: "default", onChange: (C) => $(R, !0, C), children: N })
|
|
2810
|
+
] }) }),
|
|
2811
|
+
i
|
|
2812
|
+
] });
|
|
2312
2813
|
};
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2814
|
+
Tt.propTypes = {
|
|
2815
|
+
onViewChange: p.func.isRequired,
|
|
2816
|
+
goNext: p.func.isRequired,
|
|
2817
|
+
goBack: p.func.isRequired,
|
|
2818
|
+
onSelectDate: p.func.isRequired,
|
|
2819
|
+
schedulerData: p.object.isRequired,
|
|
2820
|
+
leftCustomHeader: p.object,
|
|
2821
|
+
rightCustomHeader: p.object
|
|
2822
|
+
};
|
|
2823
|
+
const Ps = (R) => (t) => /* @__PURE__ */ d.jsx(ts, { backend: ls, children: /* @__PURE__ */ d.jsx(R, { ...t }) });
|
|
2824
|
+
class Rs extends We {
|
|
2318
2825
|
constructor(e) {
|
|
2319
2826
|
super(e);
|
|
2320
|
-
|
|
2321
|
-
const { schedulerData:
|
|
2322
|
-
|
|
2323
|
-
documentWidth: document.documentElement.clientWidth,
|
|
2324
|
-
documentHeight: document.documentElement.clientHeight
|
|
2325
|
-
});
|
|
2827
|
+
P(this, "onWindowResize", (e) => {
|
|
2828
|
+
const { schedulerData: s } = this.props;
|
|
2829
|
+
s._setDocumentWidth(document.documentElement.clientWidth), this.setState({ documentWidth: document.documentElement.clientWidth, documentHeight: document.documentElement.clientHeight });
|
|
2326
2830
|
});
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
let
|
|
2330
|
-
this.schedulerContent && (
|
|
2331
|
-
let
|
|
2332
|
-
|
|
2333
|
-
...d,
|
|
2334
|
-
contentScrollbarHeight: r
|
|
2335
|
-
}, c = !0), n != this.state.contentScrollbarWidth && (d = { ...d, contentScrollbarWidth: n }, c = !0), a != this.state.contentHeight && (d = { ...d, contentHeight: a }, c = !0), i != this.state.resourceScrollbarHeight && (d = {
|
|
2336
|
-
...d,
|
|
2337
|
-
resourceScrollbarHeight: i
|
|
2338
|
-
}, c = !0), o != this.state.resourceScrollbarWidth && (d = {
|
|
2339
|
-
...d,
|
|
2340
|
-
resourceScrollbarWidth: o
|
|
2341
|
-
}, c = !0), c && this.setState(d);
|
|
2831
|
+
P(this, "resolveScrollbarSize", () => {
|
|
2832
|
+
this.props;
|
|
2833
|
+
let e = 17, s = 17, r = 17, n = 17;
|
|
2834
|
+
this.schedulerContent && (e = this.schedulerContent.offsetHeight - this.schedulerContent.clientHeight, s = this.schedulerContent.offsetWidth - this.schedulerContent.clientWidth), this.schedulerResource && (r = this.schedulerResource.offsetHeight - this.schedulerResource.clientHeight, n = this.schedulerResource.offsetWidth - this.schedulerResource.clientWidth);
|
|
2835
|
+
let i = {}, o = !1;
|
|
2836
|
+
e != this.state.contentScrollbarHeight && (i = { ...i, contentScrollbarHeight: e }, o = !0), s != this.state.contentScrollbarWidth && (i = { ...i, contentScrollbarWidth: s }, o = !0), r != this.state.resourceScrollbarHeight && (i = { ...i, resourceScrollbarHeight: r }, o = !0), n != this.state.resourceScrollbarWidth && (i = { ...i, resourceScrollbarWidth: n }, o = !0), o && this.setState(i);
|
|
2342
2837
|
});
|
|
2343
|
-
|
|
2838
|
+
P(this, "schedulerHeadRef", (e) => {
|
|
2344
2839
|
this.schedulerHead = e;
|
|
2345
2840
|
});
|
|
2346
|
-
|
|
2841
|
+
P(this, "onSchedulerHeadMouseOver", () => {
|
|
2347
2842
|
this.currentArea = 2;
|
|
2348
2843
|
});
|
|
2349
|
-
|
|
2844
|
+
P(this, "onSchedulerHeadMouseOut", () => {
|
|
2350
2845
|
this.currentArea = -1;
|
|
2351
2846
|
});
|
|
2352
|
-
|
|
2847
|
+
P(this, "onSchedulerHeadScroll", (e, s) => {
|
|
2353
2848
|
(this.currentArea === 2 || this.currentArea === -1) && this.schedulerContent.scrollLeft != this.schedulerHead.scrollLeft && (this.schedulerContent.scrollLeft = this.schedulerHead.scrollLeft);
|
|
2354
2849
|
});
|
|
2355
|
-
|
|
2850
|
+
P(this, "schedulerResourceRef", (e) => {
|
|
2356
2851
|
this.schedulerResource = e;
|
|
2357
2852
|
});
|
|
2358
|
-
|
|
2853
|
+
P(this, "onSchedulerResourceMouseOver", () => {
|
|
2359
2854
|
this.currentArea = 1;
|
|
2360
2855
|
});
|
|
2361
|
-
|
|
2856
|
+
P(this, "onSchedulerResourceMouseOut", () => {
|
|
2362
2857
|
this.currentArea = -1;
|
|
2363
2858
|
});
|
|
2364
|
-
|
|
2365
|
-
(this.currentArea === 1 || this.currentArea === -1) && this.schedulerContent.scrollTop != this.schedulerResource.scrollTop && (this.schedulerContent.scrollTop = this.schedulerResource.scrollTop);
|
|
2859
|
+
P(this, "onSchedulerResourceScroll", (e, s) => {
|
|
2860
|
+
this.schedulerResource && (this.currentArea === 1 || this.currentArea === -1) && this.schedulerContent.scrollTop != this.schedulerResource.scrollTop && (this.schedulerContent.scrollTop = this.schedulerResource.scrollTop);
|
|
2366
2861
|
});
|
|
2367
|
-
|
|
2862
|
+
P(this, "schedulerContentRef", (e) => {
|
|
2368
2863
|
this.schedulerContent = e;
|
|
2369
2864
|
});
|
|
2370
|
-
|
|
2865
|
+
P(this, "schedulerContentBgTableRef", (e) => {
|
|
2371
2866
|
this.schedulerContentBgTable = e;
|
|
2372
2867
|
});
|
|
2373
|
-
|
|
2868
|
+
P(this, "onSchedulerContentMouseOver", () => {
|
|
2374
2869
|
this.currentArea = 0;
|
|
2375
2870
|
});
|
|
2376
|
-
|
|
2871
|
+
P(this, "onSchedulerContentMouseOut", () => {
|
|
2377
2872
|
this.currentArea = -1;
|
|
2378
2873
|
});
|
|
2379
|
-
|
|
2380
|
-
(this.currentArea === 0 || this.currentArea === -1) && (this.schedulerHead.scrollLeft != this.schedulerContent.scrollLeft && (this.schedulerHead.scrollLeft = this.schedulerContent.scrollLeft), this.schedulerResource.scrollTop != this.schedulerContent.scrollTop && (this.schedulerResource.scrollTop = this.schedulerContent.scrollTop));
|
|
2381
|
-
const { schedulerData:
|
|
2382
|
-
this.schedulerContent.scrollLeft !==
|
|
2383
|
-
scrollLeft: this.schedulerContent.scrollLeft,
|
|
2384
|
-
scrollTop: this.schedulerContent.scrollTop
|
|
2385
|
-
});
|
|
2874
|
+
P(this, "onSchedulerContentScroll", (e, s) => {
|
|
2875
|
+
this.schedulerResource && (this.currentArea === 0 || this.currentArea === -1) && (this.schedulerHead.scrollLeft != this.schedulerContent.scrollLeft && (this.schedulerHead.scrollLeft = this.schedulerContent.scrollLeft), this.schedulerResource.scrollTop != this.schedulerContent.scrollTop && (this.schedulerResource.scrollTop = this.schedulerContent.scrollTop));
|
|
2876
|
+
const { schedulerData: r, onScrollLeft: n, onScrollRight: i, onScrollTop: o, onScrollBottom: l } = this.props;
|
|
2877
|
+
this.schedulerContent.scrollLeft !== this.scrollLeft ? (this.schedulerContent.scrollLeft === 0 && n != null && n(r, this.schedulerContent, this.schedulerContent.scrollWidth - this.schedulerContent.clientWidth), Math.round(this.schedulerContent.scrollLeft) === this.schedulerContent.scrollWidth - this.schedulerContent.clientWidth && i != null && i(r, this.schedulerContent, this.schedulerContent.scrollWidth - this.schedulerContent.clientWidth)) : this.schedulerContent.scrollTop !== this.scrollTop && (this.schedulerContent.scrollTop === 0 && o != null && o(r, this.schedulerContent, this.schedulerContent.scrollHeight - this.schedulerContent.clientHeight), Math.round(this.schedulerContent.scrollTop) === this.schedulerContent.scrollHeight - this.schedulerContent.clientHeight && l != null && l(r, this.schedulerContent, this.schedulerContent.scrollHeight - this.schedulerContent.clientHeight)), this.scrollLeft = this.schedulerContent.scrollLeft, this.scrollTop = this.schedulerContent.scrollTop;
|
|
2386
2878
|
});
|
|
2387
|
-
|
|
2388
|
-
const { onViewChange:
|
|
2389
|
-
let
|
|
2390
|
-
r
|
|
2391
|
-
viewType: i,
|
|
2392
|
-
showAgenda: o,
|
|
2393
|
-
isEventPerspective: a
|
|
2394
|
-
});
|
|
2879
|
+
P(this, "onViewChange", (e) => {
|
|
2880
|
+
const { onViewChange: s, schedulerData: r } = this.props;
|
|
2881
|
+
let n = parseInt(e.target.value.charAt(0)), i = e.target.value.charAt(1) === "1", o = e.target.value.charAt(2) === "1";
|
|
2882
|
+
s(r, { viewType: n, showAgenda: i, isEventPerspective: o }), this.setState({ ...this.state, spinning: !1 });
|
|
2395
2883
|
});
|
|
2396
|
-
|
|
2397
|
-
const { nextClick: e, schedulerData:
|
|
2398
|
-
e(
|
|
2884
|
+
P(this, "goNext", () => {
|
|
2885
|
+
const { nextClick: e, schedulerData: s } = this.props;
|
|
2886
|
+
e(s);
|
|
2399
2887
|
});
|
|
2400
|
-
|
|
2401
|
-
const { prevClick: e, schedulerData:
|
|
2402
|
-
e(
|
|
2888
|
+
P(this, "goBack", () => {
|
|
2889
|
+
const { prevClick: e, schedulerData: s } = this.props;
|
|
2890
|
+
e(s);
|
|
2403
2891
|
});
|
|
2404
|
-
|
|
2405
|
-
|
|
2892
|
+
P(this, "onSelect", (e) => {
|
|
2893
|
+
const { onSelectDate: s, schedulerData: r } = this.props;
|
|
2894
|
+
s(r, e);
|
|
2406
2895
|
});
|
|
2407
|
-
|
|
2408
|
-
this.setState({
|
|
2409
|
-
visible: !1
|
|
2410
|
-
});
|
|
2411
|
-
const { onSelectDate: r, schedulerData: n } = this.props;
|
|
2412
|
-
r(n, e);
|
|
2413
|
-
});
|
|
2414
|
-
const { schedulerData: r, dndSources: n } = e;
|
|
2896
|
+
const { schedulerData: s, dndSources: r, parentRef: n } = e;
|
|
2415
2897
|
let i = [];
|
|
2416
|
-
i.push(new
|
|
2417
|
-
let o = new
|
|
2418
|
-
this.currentArea = -1,
|
|
2419
|
-
visible: !1,
|
|
2898
|
+
i.push(new ht((l) => l.eventItem, Be, s.config.dragAndDropEnabled)), r != null && r.length > 0 && (i = [...i, ...r]);
|
|
2899
|
+
let o = new us(i, yt);
|
|
2900
|
+
this.currentArea = -1, this.state = {
|
|
2420
2901
|
dndContext: o,
|
|
2421
|
-
contentHeight: r.getSchedulerContentDesiredHeight(),
|
|
2422
2902
|
contentScrollbarHeight: 17,
|
|
2423
2903
|
contentScrollbarWidth: 17,
|
|
2424
2904
|
resourceScrollbarHeight: 17,
|
|
2425
2905
|
resourceScrollbarWidth: 17,
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2906
|
+
documentWidth: 0,
|
|
2907
|
+
documentHeight: 0
|
|
2908
|
+
}, this.scrollLeft = 0, this.scrollTop = 0, (s.isSchedulerResponsive() && !s.config.responsiveByParent || n === void 0) && (s._setDocumentWidth(document.documentElement.clientWidth), window.onresize = this.onWindowResize);
|
|
2909
|
+
}
|
|
2910
|
+
componentDidMount(e, s) {
|
|
2911
|
+
const { schedulerData: r, parentRef: n } = this.props;
|
|
2912
|
+
this.resolveScrollbarSize(), n !== void 0 && r.config.responsiveByParent && n.current && (r._setDocumentWidth(n.current.offsetWidth), this.ulObserver = new ResizeObserver((i, o) => {
|
|
2913
|
+
if (n.current) {
|
|
2914
|
+
const l = n.current.offsetWidth, u = n.current.offsetHeight;
|
|
2915
|
+
r._setDocumentWidth(l), this.setState({
|
|
2916
|
+
documentWidth: l,
|
|
2917
|
+
documentHeight: u
|
|
2918
|
+
});
|
|
2919
|
+
}
|
|
2920
|
+
}), this.ulObserver.observe(n.current));
|
|
2434
2921
|
}
|
|
2435
|
-
componentDidUpdate(e,
|
|
2922
|
+
componentDidUpdate(e, s) {
|
|
2436
2923
|
this.resolveScrollbarSize();
|
|
2437
|
-
const { schedulerData:
|
|
2438
|
-
if (
|
|
2439
|
-
let
|
|
2440
|
-
if (
|
|
2441
|
-
let
|
|
2442
|
-
|
|
2443
|
-
let
|
|
2444
|
-
|
|
2445
|
-
}), this.schedulerContent.scrollLeft = (
|
|
2924
|
+
const { schedulerData: r } = this.props, { localeDayjs: n, behaviors: i } = r;
|
|
2925
|
+
if (r.getScrollToSpecialDayjs() && i.getScrollSpecialDayjsFunc && this.schedulerContent && this.schedulerContent.scrollWidth > this.schedulerContent.clientWidth) {
|
|
2926
|
+
let o = n(new Date(r.startDate)).startOf("day"), l = n(new Date(r.endDate)).endOf("day"), u = i.getScrollSpecialDayjsFunc(r, o, l);
|
|
2927
|
+
if (u >= o && u <= l) {
|
|
2928
|
+
let c = 0;
|
|
2929
|
+
r.headers.forEach((f) => {
|
|
2930
|
+
let h = n(new Date(f.time));
|
|
2931
|
+
u >= h && c++;
|
|
2932
|
+
}), this.schedulerContent.scrollLeft = (c - 1) * r.getContentCellWidth(), r.setScrollToSpecialDayjs(!1);
|
|
2446
2933
|
}
|
|
2447
2934
|
}
|
|
2448
2935
|
}
|
|
2449
2936
|
render() {
|
|
2450
|
-
const { schedulerData: e, leftCustomHeader:
|
|
2451
|
-
let
|
|
2452
|
-
if (
|
|
2453
|
-
|
|
2937
|
+
const { schedulerData: e, leftCustomHeader: s, rightCustomHeader: r } = this.props, { viewType: n, renderData: i, showAgenda: o, config: l } = e, u = e.getSchedulerWidth();
|
|
2938
|
+
let c = /* @__PURE__ */ d.jsx("tr", {});
|
|
2939
|
+
if (o)
|
|
2940
|
+
c = /* @__PURE__ */ d.jsx(bt, { ...this.props });
|
|
2454
2941
|
else {
|
|
2455
|
-
let
|
|
2456
|
-
|
|
2942
|
+
let h = e.getResourceTableWidth(), v = u - (l.resourceViewEnabled ? h : 0), D = e.getContentTableWidth() - 1, g = this.state.dndContext.getDropTarget(l.dragAndDropEnabled), w = this.state.dndContext.getDndSource(), b = i.filter((S) => S.render).map((S) => /* @__PURE__ */ be(g, { ...this.props, key: S.slotId, resourceEvents: S, dndSource: w })), k = this.state.contentScrollbarHeight, A = this.state.contentScrollbarWidth, $ = this.state.resourceScrollbarHeight, H = this.state.resourceScrollbarWidth, N = l.schedulerContentHeight, z = $ === 0 ? k : 0, W = k === 0 ? $ : 0, C = {
|
|
2943
|
+
overflowX: n === O.Week ? "hidden" : "auto",
|
|
2944
|
+
overflowY: "auto",
|
|
2457
2945
|
margin: "0px",
|
|
2458
2946
|
position: "relative",
|
|
2459
|
-
|
|
2460
|
-
|
|
2947
|
+
height: N,
|
|
2948
|
+
paddingBottom: W
|
|
2949
|
+
}, X = {
|
|
2950
|
+
height: N,
|
|
2461
2951
|
overflowX: "auto",
|
|
2462
2952
|
overflowY: "auto",
|
|
2463
|
-
width:
|
|
2464
|
-
margin: `0px -${
|
|
2953
|
+
width: h + H - 2,
|
|
2954
|
+
margin: `0px -${A}px 0px 0px`
|
|
2465
2955
|
};
|
|
2466
|
-
|
|
2467
|
-
...
|
|
2468
|
-
maxHeight:
|
|
2469
|
-
},
|
|
2470
|
-
...
|
|
2471
|
-
maxHeight:
|
|
2956
|
+
l.schedulerMaxHeight > 0 && (C = {
|
|
2957
|
+
...C,
|
|
2958
|
+
maxHeight: l.schedulerMaxHeight - l.tableHeaderHeight
|
|
2959
|
+
}, X = {
|
|
2960
|
+
...X,
|
|
2961
|
+
maxHeight: l.schedulerMaxHeight - l.tableHeaderHeight
|
|
2472
2962
|
});
|
|
2473
|
-
let
|
|
2474
|
-
|
|
2475
|
-
/* @__PURE__ */
|
|
2476
|
-
/* @__PURE__ */ l.jsx(
|
|
2477
|
-
|
|
2478
|
-
{
|
|
2479
|
-
style: {
|
|
2480
|
-
overflow: "hidden",
|
|
2481
|
-
borderBottom: "1px solid #e9e9e9",
|
|
2482
|
-
height: c.tableHeaderHeight
|
|
2483
|
-
},
|
|
2484
|
-
children: /* @__PURE__ */ l.jsx(
|
|
2485
|
-
"div",
|
|
2486
|
-
{
|
|
2487
|
-
style: {
|
|
2488
|
-
overflowX: "scroll",
|
|
2489
|
-
overflowY: "hidden",
|
|
2490
|
-
margin: `0px 0px -${S}px`
|
|
2491
|
-
},
|
|
2492
|
-
children: /* @__PURE__ */ l.jsx("table", { className: "resource-table", children: /* @__PURE__ */ l.jsx("thead", { children: /* @__PURE__ */ l.jsx("tr", { style: { height: c.tableHeaderHeight }, children: /* @__PURE__ */ l.jsx("th", { className: "header3-text", children: $ }) }) }) })
|
|
2493
|
-
}
|
|
2494
|
-
)
|
|
2495
|
-
}
|
|
2496
|
-
),
|
|
2497
|
-
/* @__PURE__ */ l.jsx(
|
|
2963
|
+
let Z = e.isEventPerspective ? l.taskName : l.resourceName;
|
|
2964
|
+
c = /* @__PURE__ */ d.jsxs("tr", { children: [
|
|
2965
|
+
/* @__PURE__ */ d.jsx("td", { style: { display: l.resourceViewEnabled ? void 0 : "none", width: h, verticalAlign: "top" }, children: /* @__PURE__ */ d.jsxs("div", { className: "resource-view", children: [
|
|
2966
|
+
/* @__PURE__ */ d.jsx("div", { style: { overflow: "hidden", borderBottom: "1px solid #e9e9e9", height: l.tableHeaderHeight }, children: /* @__PURE__ */ d.jsx("div", { style: { overflowX: "scroll", overflowY: "hidden", margin: `0px 0px -${k}px` }, children: /* @__PURE__ */ d.jsx("table", { className: "resource-table", children: /* @__PURE__ */ d.jsx("thead", { children: /* @__PURE__ */ d.jsx("tr", { style: { height: l.tableHeaderHeight }, children: /* @__PURE__ */ d.jsx("th", { className: "header3-text", children: Z }) }) }) }) }) }),
|
|
2967
|
+
/* @__PURE__ */ d.jsx(
|
|
2498
2968
|
"div",
|
|
2499
2969
|
{
|
|
2500
|
-
style:
|
|
2970
|
+
style: X,
|
|
2501
2971
|
ref: this.schedulerResourceRef,
|
|
2502
2972
|
onMouseOver: this.onSchedulerResourceMouseOver,
|
|
2503
2973
|
onMouseOut: this.onSchedulerResourceMouseOut,
|
|
2504
2974
|
onScroll: this.onSchedulerResourceScroll,
|
|
2505
|
-
children: /* @__PURE__ */
|
|
2975
|
+
children: /* @__PURE__ */ d.jsx(ft, { ...this.props, contentScrollbarHeight: z })
|
|
2506
2976
|
}
|
|
2507
2977
|
)
|
|
2508
2978
|
] }) }),
|
|
2509
|
-
/* @__PURE__ */
|
|
2510
|
-
/* @__PURE__ */ l.jsx(
|
|
2979
|
+
/* @__PURE__ */ d.jsx("td", { children: /* @__PURE__ */ d.jsxs("div", { className: "scheduler-view", style: { width: v, verticalAlign: "top" }, children: [
|
|
2980
|
+
/* @__PURE__ */ d.jsx("div", { style: { overflow: "hidden", borderBottom: "1px solid #e9e9e9", height: l.tableHeaderHeight }, children: /* @__PURE__ */ d.jsx(
|
|
2511
2981
|
"div",
|
|
2512
2982
|
{
|
|
2513
|
-
style: {
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
children: /* @__PURE__ */
|
|
2519
|
-
"div",
|
|
2520
|
-
{
|
|
2521
|
-
style: {
|
|
2522
|
-
overflowX: "scroll",
|
|
2523
|
-
overflowY: "hidden",
|
|
2524
|
-
margin: `0px 0px -${S}px`
|
|
2525
|
-
},
|
|
2526
|
-
ref: this.schedulerHeadRef,
|
|
2527
|
-
onMouseOver: this.onSchedulerHeadMouseOver,
|
|
2528
|
-
onMouseOut: this.onSchedulerHeadMouseOut,
|
|
2529
|
-
onScroll: this.onSchedulerHeadScroll,
|
|
2530
|
-
children: /* @__PURE__ */ l.jsx(
|
|
2531
|
-
"div",
|
|
2532
|
-
{
|
|
2533
|
-
style: {
|
|
2534
|
-
paddingRight: `${_}px`,
|
|
2535
|
-
width: T + _
|
|
2536
|
-
},
|
|
2537
|
-
children: /* @__PURE__ */ l.jsx("table", { className: "scheduler-bg-table", children: /* @__PURE__ */ l.jsx(lt, { ...this.props }) })
|
|
2538
|
-
}
|
|
2539
|
-
)
|
|
2540
|
-
}
|
|
2541
|
-
)
|
|
2983
|
+
style: { overflowX: "scroll", overflowY: "hidden", margin: `0px 0px -${k}px` },
|
|
2984
|
+
ref: this.schedulerHeadRef,
|
|
2985
|
+
onMouseOver: this.onSchedulerHeadMouseOver,
|
|
2986
|
+
onMouseOut: this.onSchedulerHeadMouseOut,
|
|
2987
|
+
onScroll: this.onSchedulerHeadScroll,
|
|
2988
|
+
children: /* @__PURE__ */ d.jsx("div", { style: { paddingRight: `${A}px`, width: D + A }, children: /* @__PURE__ */ d.jsx("table", { className: "scheduler-bg-table", children: /* @__PURE__ */ d.jsx(pt, { ...this.props }) }) })
|
|
2542
2989
|
}
|
|
2543
|
-
),
|
|
2544
|
-
/* @__PURE__ */
|
|
2990
|
+
) }),
|
|
2991
|
+
/* @__PURE__ */ d.jsx(
|
|
2545
2992
|
"div",
|
|
2546
2993
|
{
|
|
2547
|
-
style:
|
|
2994
|
+
style: C,
|
|
2548
2995
|
ref: this.schedulerContentRef,
|
|
2549
2996
|
onMouseOver: this.onSchedulerContentMouseOver,
|
|
2550
2997
|
onMouseOut: this.onSchedulerContentMouseOut,
|
|
2551
2998
|
onScroll: this.onSchedulerContentScroll,
|
|
2552
|
-
children: /* @__PURE__ */
|
|
2553
|
-
/* @__PURE__ */
|
|
2554
|
-
/* @__PURE__ */
|
|
2999
|
+
children: /* @__PURE__ */ d.jsxs("div", { style: { width: D }, children: [
|
|
3000
|
+
/* @__PURE__ */ d.jsx("div", { className: "scheduler-content", children: /* @__PURE__ */ d.jsx("table", { className: "scheduler-content-table", children: /* @__PURE__ */ d.jsx("tbody", { children: b }) }) }),
|
|
3001
|
+
/* @__PURE__ */ d.jsx("div", { className: "scheduler-bg", children: /* @__PURE__ */ d.jsx("table", { className: "scheduler-bg-table", style: { width: D }, ref: this.schedulerContentBgTableRef, children: /* @__PURE__ */ d.jsx(gt, { ...this.props }) }) })
|
|
2555
3002
|
] })
|
|
2556
3003
|
}
|
|
2557
3004
|
)
|
|
2558
3005
|
] }) })
|
|
2559
3006
|
] });
|
|
2560
3007
|
}
|
|
2561
|
-
let
|
|
2562
|
-
return
|
|
2563
|
-
|
|
3008
|
+
let f = /* @__PURE__ */ d.jsx("div", {});
|
|
3009
|
+
return l.headerEnabled && (f = /* @__PURE__ */ d.jsx(
|
|
3010
|
+
Tt,
|
|
2564
3011
|
{
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
r,
|
|
2573
|
-
/* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs("div", { className: "header2-text", children: [
|
|
2574
|
-
/* @__PURE__ */ l.jsx(Ut, { style: { marginRight: "8px" }, className: "icon-nav", onClick: this.goBack }),
|
|
2575
|
-
p ? /* @__PURE__ */ l.jsx(He, { content: C, placement: "bottom", trigger: "click", open: this.state.visible, onOpenChange: this.handleVisibleChange, children: /* @__PURE__ */ l.jsx("span", { className: "header2-text-label", style: { cursor: "pointer" }, children: f }) }) : /* @__PURE__ */ l.jsx("span", { className: "header2-text-label", children: f }),
|
|
2576
|
-
/* @__PURE__ */ l.jsx(Xt, { style: { marginLeft: "8px" }, className: "icon-nav", onClick: this.goNext })
|
|
2577
|
-
] }) }),
|
|
2578
|
-
/* @__PURE__ */ l.jsx("div", { children: /* @__PURE__ */ l.jsxs(ur, { defaultValue: m, size: "default", onChange: this.onViewChange, children: [
|
|
2579
|
-
E,
|
|
2580
|
-
"xx"
|
|
2581
|
-
] }) }),
|
|
2582
|
-
n
|
|
2583
|
-
]
|
|
3012
|
+
onViewChange: this.onViewChange,
|
|
3013
|
+
schedulerData: e,
|
|
3014
|
+
onSelectDate: this.onSelect,
|
|
3015
|
+
goNext: this.goNext,
|
|
3016
|
+
goBack: this.goBack,
|
|
3017
|
+
rightCustomHeader: r,
|
|
3018
|
+
leftCustomHeader: s
|
|
2584
3019
|
}
|
|
2585
|
-
)), /* @__PURE__ */
|
|
2586
|
-
/* @__PURE__ */
|
|
2587
|
-
/* @__PURE__ */
|
|
2588
|
-
] })
|
|
3020
|
+
)), /* @__PURE__ */ d.jsxs("table", { id: "RBS-Scheduler-root", className: "scheduler", style: { width: `${u}px` }, children: [
|
|
3021
|
+
/* @__PURE__ */ d.jsx("thead", { children: /* @__PURE__ */ d.jsx("tr", { children: /* @__PURE__ */ d.jsx("td", { colSpan: "2", children: f }) }) }),
|
|
3022
|
+
/* @__PURE__ */ d.jsx("tbody", { children: c })
|
|
3023
|
+
] });
|
|
2589
3024
|
}
|
|
2590
3025
|
}
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
3026
|
+
P(Rs, "propTypes", {
|
|
3027
|
+
parentRef: p.object,
|
|
3028
|
+
schedulerData: p.object.isRequired,
|
|
3029
|
+
prevClick: p.func.isRequired,
|
|
3030
|
+
nextClick: p.func.isRequired,
|
|
3031
|
+
onViewChange: p.func.isRequired,
|
|
3032
|
+
onSelectDate: p.func.isRequired,
|
|
3033
|
+
onSetAddMoreState: p.func,
|
|
3034
|
+
updateEventStart: p.func,
|
|
3035
|
+
updateEventEnd: p.func,
|
|
3036
|
+
moveEvent: p.func,
|
|
3037
|
+
movingEvent: p.func,
|
|
3038
|
+
leftCustomHeader: p.object,
|
|
3039
|
+
rightCustomHeader: p.object,
|
|
3040
|
+
newEvent: p.func,
|
|
3041
|
+
subtitleGetter: p.func,
|
|
3042
|
+
eventItemClick: p.func,
|
|
3043
|
+
viewEventClick: p.func,
|
|
3044
|
+
viewEventText: p.string,
|
|
3045
|
+
viewEvent2Click: p.func,
|
|
3046
|
+
viewEvent2Text: p.string,
|
|
3047
|
+
conflictOccurred: p.func,
|
|
3048
|
+
eventItemTemplateResolver: p.func,
|
|
3049
|
+
dndSources: p.array,
|
|
3050
|
+
slotClickedFunc: p.func,
|
|
3051
|
+
toggleExpandFunc: p.func,
|
|
3052
|
+
slotItemTemplateResolver: p.func,
|
|
3053
|
+
nonAgendaCellHeaderTemplateResolver: p.func,
|
|
3054
|
+
onScrollLeft: p.func,
|
|
3055
|
+
onScrollRight: p.func,
|
|
3056
|
+
onScrollTop: p.func,
|
|
3057
|
+
onScrollBottom: p.func
|
|
2622
3058
|
});
|
|
2623
3059
|
export {
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
3060
|
+
hs as AddMorePopover,
|
|
3061
|
+
U as CellUnit,
|
|
3062
|
+
V as DATETIME_FORMAT,
|
|
3063
|
+
ge as DATE_FORMAT,
|
|
3064
|
+
$s as DemoData,
|
|
3065
|
+
us as DnDContext,
|
|
3066
|
+
ht as DnDSource,
|
|
3067
|
+
Rs as Scheduler,
|
|
3068
|
+
Hs as SchedulerData,
|
|
3069
|
+
me as SummaryPos,
|
|
3070
|
+
O as ViewType,
|
|
3071
|
+
Ps as wrapperFun
|
|
2636
3072
|
};
|