react-big-schedule 3.0.0 → 3.0.2
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/LICENSE +20 -20
- package/README.md +79 -78
- package/dist/af-d261e868.mjs +39 -0
- package/dist/am-224a9385.mjs +39 -0
- package/dist/ar-dz-91081f8c.mjs +41 -0
- package/dist/ar-f5c171ed.mjs +47 -0
- package/dist/ar-iq-35005b0c.mjs +41 -0
- package/dist/ar-kw-1a9a82be.mjs +41 -0
- package/dist/ar-ly-11c752c5.mjs +41 -0
- package/dist/ar-ma-7e359427.mjs +41 -0
- package/dist/ar-sa-29446434.mjs +41 -0
- package/dist/ar-tn-63e67ef5.mjs +41 -0
- package/dist/ar_EG-b98e6d11.mjs +235 -0
- package/dist/az-bfd231b5.mjs +39 -0
- package/dist/az_AZ-263b31eb.mjs +212 -0
- package/dist/be-d70c00f9.mjs +39 -0
- package/dist/bg-e99bbe0b.mjs +43 -0
- package/dist/bg_BG-b1adcb56.mjs +210 -0
- package/dist/bi-9f01c3c6.mjs +39 -0
- package/dist/bm-8bf4bc50.mjs +39 -0
- package/dist/bn-bd-abdb28cb.mjs +50 -0
- package/dist/bn-d871a0e3.mjs +47 -0
- package/dist/bn_BD-f7dac38c.mjs +253 -0
- package/dist/bo-7b71a483.mjs +39 -0
- package/dist/br-f179db70.mjs +63 -0
- package/dist/bs-c8ed7148.mjs +39 -0
- package/dist/by_BY-1679b3e6.mjs +256 -0
- package/dist/ca-232f44f2.mjs +39 -0
- package/dist/ca_ES-76318eea.mjs +239 -0
- package/dist/context-1dd2fa5f.mjs +26 -0
- package/dist/context-8a360554.mjs +13 -0
- package/dist/cs-0b32023f.mjs +70 -0
- package/dist/cs_CZ-97ef6de0.mjs +246 -0
- package/dist/cv-4792f0ee.mjs +39 -0
- package/dist/cy-96c8b119.mjs +39 -0
- package/dist/da-d928f274.mjs +39 -0
- package/dist/da_DK-adbed59d.mjs +171 -0
- package/dist/de-34f06a9a.mjs +44 -0
- package/dist/de-at-84562d2e.mjs +44 -0
- package/dist/de-ch-79a3153c.mjs +44 -0
- package/dist/de_DE-6a461f9f.mjs +251 -0
- package/dist/dv-0ee272b1.mjs +39 -0
- package/dist/el-637c2b50.mjs +39 -0
- package/dist/el_GR-68dee4cf.mjs +160 -0
- package/dist/en-6cc074f6.mjs +36 -0
- package/dist/en-au-1ed9ed33.mjs +39 -0
- package/dist/en-ca-7742e9f1.mjs +39 -0
- package/dist/en-gb-2f274ed7.mjs +40 -0
- package/dist/en-ie-c281d009.mjs +39 -0
- package/dist/en-il-48c6e4fe.mjs +39 -0
- package/dist/en-in-f336c1e3.mjs +40 -0
- package/dist/en-nz-296ee938.mjs +40 -0
- package/dist/en-sg-903fc3e4.mjs +39 -0
- package/dist/en-tt-88f14f96.mjs +40 -0
- package/dist/en_GB-75e0bc3a.mjs +254 -0
- package/dist/en_US-375111a8.mjs +150 -0
- package/dist/en_US-4b7d1df0.mjs +104 -0
- package/dist/en_US-9c29aede.mjs +26 -0
- package/dist/eo-0b9df0e3.mjs +39 -0
- package/dist/es-7d03b704.mjs +39 -0
- package/dist/es-do-fdb84224.mjs +39 -0
- package/dist/es-mx-ce5288a0.mjs +39 -0
- package/dist/es-pr-14324bdd.mjs +39 -0
- package/dist/es-us-0d104bbf.mjs +39 -0
- package/dist/es_ES-31262a5e.mjs +246 -0
- package/dist/et-9f30f713.mjs +44 -0
- package/dist/et_EE-65ea7c61.mjs +246 -0
- package/dist/eu-63a1f76f.mjs +39 -0
- package/dist/eu_ES-fe711360.mjs +247 -0
- package/dist/fa-335d0b96.mjs +39 -0
- package/dist/fa_IR-f4ec27d2.mjs +264 -0
- package/dist/fi-7cdd9168.mjs +44 -0
- package/dist/fi_FI-f6329731.mjs +170 -0
- package/dist/fo-d0d95c1e.mjs +39 -0
- package/dist/fr-b01e251f.mjs +39 -0
- package/dist/fr-ca-2522539f.mjs +39 -0
- package/dist/fr-ch-8325ee1a.mjs +39 -0
- package/dist/fr_BE-aef6539f.mjs +251 -0
- package/dist/fr_CA-37c7b413.mjs +251 -0
- package/dist/fr_FR-48f19dd9.mjs +256 -0
- package/dist/fy-6cda26ac.mjs +39 -0
- package/dist/ga-68a1e399.mjs +39 -0
- package/dist/ga_IE-5ec8b77f.mjs +246 -0
- package/dist/gd-4bbf5b25.mjs +39 -0
- package/dist/gl-a19274c1.mjs +39 -0
- package/dist/gl_ES-17e2d32c.mjs +225 -0
- package/dist/gom-latn-f93ac68e.mjs +39 -0
- package/dist/gu-8e00d26e.mjs +39 -0
- package/dist/he-967823cc.mjs +43 -0
- package/dist/he_IL-6c32cc63.mjs +232 -0
- package/dist/hi-7b32a906.mjs +39 -0
- package/dist/hi_IN-0def1590.mjs +253 -0
- package/dist/hr-bff12c96.mjs +43 -0
- package/dist/hr_HR-dca450bc.mjs +252 -0
- package/dist/ht-e11b7e11.mjs +39 -0
- package/dist/hu-3912d17e.mjs +61 -0
- package/dist/hu_HU-2a468eb4.mjs +183 -0
- package/dist/hy-am-fd69fa6c.mjs +39 -0
- package/dist/hy_AM-8e18b243.mjs +139 -0
- package/dist/id-7c760e03.mjs +39 -0
- package/dist/id_ID-f248c4e1.mjs +162 -0
- package/dist/index-43e0371a.mjs +3517 -0
- package/dist/index-de6ac5bf.mjs +146 -0
- package/dist/interopRequireDefault-40f894e3.mjs +13 -0
- package/dist/is-82659783.mjs +47 -0
- package/dist/is_IS-73b44a2e.mjs +160 -0
- package/dist/it-93f75775.mjs +39 -0
- package/dist/it-ch-29efc9de.mjs +39 -0
- package/dist/it_IT-587663e7.mjs +246 -0
- package/dist/ja-86ef23e1.mjs +41 -0
- package/dist/ja_JP-1743b656.mjs +218 -0
- package/dist/jv-224d9b1d.mjs +39 -0
- package/dist/ka-721a02b5.mjs +39 -0
- package/dist/ka_GE-d2308856.mjs +253 -0
- package/dist/kk-e2839ef0.mjs +39 -0
- package/dist/kk_KZ-561eb4ac.mjs +246 -0
- package/dist/km-14365cf0.mjs +39 -0
- package/dist/km_KH-65703a5f.mjs +227 -0
- package/dist/kmr_IQ-5df997a4.mjs +74 -0
- package/dist/kmr_IQ-bac5b8e4.mjs +94 -0
- package/dist/kn-82c95118.mjs +39 -0
- package/dist/kn_IN-eba4018b.mjs +168 -0
- package/dist/ko-5398e502.mjs +41 -0
- package/dist/ko_KR-524ec2f0.mjs +253 -0
- package/dist/ku-6b4bd046.mjs +49 -0
- package/dist/ku_IQ-579f0d0c.mjs +74 -0
- package/dist/ky-1ca6ed9a.mjs +39 -0
- package/dist/lb-4f29287e.mjs +39 -0
- package/dist/lo-dae0cc3b.mjs +39 -0
- package/dist/lt-ea27df14.mjs +43 -0
- package/dist/lt_LT-18b40ce0.mjs +268 -0
- package/dist/lv-ab1def34.mjs +39 -0
- package/dist/lv_LV-fedfeff2.mjs +160 -0
- package/dist/me-8e72569e.mjs +39 -0
- package/dist/mi-3fb45ec8.mjs +39 -0
- package/dist/mk-bddf86ba.mjs +39 -0
- package/dist/mk_MK-efcd1a6f.mjs +175 -0
- package/dist/ml-50b80bc9.mjs +39 -0
- package/dist/ml_IN-53289144.mjs +253 -0
- package/dist/mn-2abf6e3b.mjs +39 -0
- package/dist/mn_MN-127b1682.mjs +161 -0
- package/dist/mr-25647ba3.mjs +39 -0
- package/dist/ms-4c2217c7.mjs +39 -0
- package/dist/ms-my-92424001.mjs +39 -0
- package/dist/ms_MY-d3ecc3f8.mjs +180 -0
- package/dist/mt-95691ec8.mjs +39 -0
- package/dist/my-fc6697f1.mjs +39 -0
- package/dist/my_MM-134e5333.mjs +263 -0
- package/dist/nb-78379e4d.mjs +39 -0
- package/dist/nb_NO-c9ce8913.mjs +246 -0
- package/dist/ne-5ddd3770.mjs +41 -0
- package/dist/ne_NP-162c9907.mjs +74 -0
- package/dist/nl-95719c81.mjs +39 -0
- package/dist/nl-be-6116f7c9.mjs +39 -0
- package/dist/nl_BE-5c93d4a1.mjs +252 -0
- package/dist/nl_NL-aafa5544.mjs +252 -0
- package/dist/nn-d59580f8.mjs +39 -0
- package/dist/oc-lnc-fa0a2b7e.mjs +39 -0
- package/dist/pa-in-8abb143a.mjs +39 -0
- package/dist/pl-06dff6ac.mjs +64 -0
- package/dist/pl_PL-5fb01a59.mjs +246 -0
- package/dist/pt-9e9c44c6.mjs +39 -0
- package/dist/pt-br-a6963bc9.mjs +39 -0
- package/dist/pt_BR-afea5687.mjs +253 -0
- package/dist/pt_PT-314d036e.mjs +276 -0
- package/dist/react-big-schedule.mjs +22 -0
- package/dist/react-big-schedule.umd.js +27 -0
- package/dist/rn-946efba1.mjs +39 -0
- package/dist/ro-d42ba627.mjs +39 -0
- package/dist/ro_RO-caadbaad.mjs +245 -0
- package/dist/ru-4126f173.mjs +54 -0
- package/dist/ru_RU-8ec475f7.mjs +263 -0
- package/dist/rw-e740777f.mjs +39 -0
- package/dist/sd-11783e2c.mjs +39 -0
- package/dist/se-58da0b5f.mjs +39 -0
- package/dist/si-f96c77bd.mjs +39 -0
- package/dist/si_LK-6aacaae3.mjs +256 -0
- package/dist/sk-eaba50c0.mjs +70 -0
- package/dist/sk_SK-aad910db.mjs +246 -0
- package/dist/sl-71d74522.mjs +39 -0
- package/dist/sl_SI-181bde7f.mjs +153 -0
- package/dist/sq-0d44db9f.mjs +39 -0
- package/dist/sr-cyrl-0ffe0ac0.mjs +47 -0
- package/dist/sr-e5d508f2.mjs +47 -0
- package/dist/sr_RS-b5ecb652.mjs +251 -0
- package/dist/ss-3ee6f856.mjs +39 -0
- package/dist/style.css +252 -0
- package/dist/sv-ba3d24d6.mjs +40 -0
- package/dist/sv-fi-69261db0.mjs +40 -0
- package/dist/sv_SE-1f34fed5.mjs +262 -0
- package/dist/sw-5d6791a1.mjs +39 -0
- package/dist/ta-8a5b67bb.mjs +39 -0
- package/dist/ta_IN-7209d0ef.mjs +252 -0
- package/dist/te-6343a062.mjs +39 -0
- package/dist/tet-1a4c9268.mjs +39 -0
- package/dist/tg-bf7a37d6.mjs +39 -0
- package/dist/th-947f17a9.mjs +39 -0
- package/dist/th_TH-73aa7524.mjs +262 -0
- package/dist/tk-f316e5b8.mjs +39 -0
- package/dist/tk_TK-2b5d3c28.mjs +251 -0
- package/dist/tl-ph-d46c43fd.mjs +39 -0
- package/dist/tlh-d54937b2.mjs +39 -0
- package/dist/tr-442d0b9f.mjs +39 -0
- package/dist/tr_TR-8930f026.mjs +250 -0
- package/dist/tzl-a7cbf6fe.mjs +39 -0
- package/dist/tzm-dff395a0.mjs +39 -0
- package/dist/tzm-latn-3b0bc64f.mjs +39 -0
- package/dist/ug-cn-24b140a5.mjs +39 -0
- package/dist/uk-f47f1749.mjs +48 -0
- package/dist/uk_UA-bbccc34f.mjs +255 -0
- package/dist/ur-647fe763.mjs +39 -0
- package/dist/ur_PK-4f63e64a.mjs +253 -0
- package/dist/useLocale-5d628ddd.mjs +26 -0
- package/dist/useLocale-e3a8c1ca.mjs +70 -0
- package/dist/uz-050fa6f0.mjs +39 -0
- package/dist/uz-latn-a7dc7079.mjs +39 -0
- package/dist/vi-37dd582c.mjs +39 -0
- package/dist/vi_VN-e51f09f8.mjs +265 -0
- package/dist/x-pseudo-7d79a6b5.mjs +39 -0
- package/dist/yo-728fb497.mjs +39 -0
- package/dist/zh-758e83c7.mjs +42 -0
- package/dist/zh-cn-cdbbd79a.mjs +42 -0
- package/dist/zh-hk-2d4717c5.mjs +39 -0
- package/dist/zh-tw-db64f0c1.mjs +42 -0
- package/dist/zh_CN-cba2b5e1.mjs +268 -0
- package/dist/zh_HK-e6888c1f.mjs +161 -0
- package/dist/zh_TW-917988fe.mjs +162 -0
- package/dist/zh_TW-dc97c96e.mjs +103 -0
- package/package.json +79 -84
- package/dist/react-big-schedule-index.mjs +0 -3072
|
@@ -1,3072 +0,0 @@
|
|
|
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 = {};
|
|
16
|
-
/**
|
|
17
|
-
* @license React
|
|
18
|
-
* react-jsx-runtime.production.min.js
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/
|
|
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;
|
|
42
|
-
}
|
|
43
|
-
var Re = {};
|
|
44
|
-
/**
|
|
45
|
-
* @license React
|
|
46
|
-
* react-jsx-runtime.development.js
|
|
47
|
-
*
|
|
48
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
49
|
-
*
|
|
50
|
-
* This source code is licensed under the MIT license found in the
|
|
51
|
-
* LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/
|
|
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")
|
|
59
|
-
return null;
|
|
60
|
-
var E = D && a[D] || a[g];
|
|
61
|
-
return typeof E == "function" ? E : null;
|
|
62
|
-
}
|
|
63
|
-
var T = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
64
|
-
function b(a) {
|
|
65
|
-
{
|
|
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);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
function k(a, E, I) {
|
|
72
|
-
{
|
|
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);
|
|
77
|
-
});
|
|
78
|
-
K.unshift("Warning: " + E), Function.prototype.apply.call(console[a], console, K);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
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
|
|
85
|
-
// types supported by any Flight configuration anywhere since
|
|
86
|
-
// we don't know which Flight build this will end up being used
|
|
87
|
-
// with.
|
|
88
|
-
a.$$typeof === W || a.getModuleId !== void 0));
|
|
89
|
-
}
|
|
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;
|
|
96
|
-
}
|
|
97
|
-
function Z(a) {
|
|
98
|
-
return a.displayName || "Context";
|
|
99
|
-
}
|
|
100
|
-
function S(a) {
|
|
101
|
-
if (a == null)
|
|
102
|
-
return null;
|
|
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:
|
|
109
|
-
return "Fragment";
|
|
110
|
-
case e:
|
|
111
|
-
return "Portal";
|
|
112
|
-
case n:
|
|
113
|
-
return "Profiler";
|
|
114
|
-
case r:
|
|
115
|
-
return "StrictMode";
|
|
116
|
-
case u:
|
|
117
|
-
return "Suspense";
|
|
118
|
-
case c:
|
|
119
|
-
return "SuspenseList";
|
|
120
|
-
}
|
|
121
|
-
if (typeof a == "object")
|
|
122
|
-
switch (a.$$typeof) {
|
|
123
|
-
case o:
|
|
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;
|
|
136
|
-
try {
|
|
137
|
-
return S(B(K));
|
|
138
|
-
} catch {
|
|
139
|
-
return null;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
var x = Object.assign, y = 0, j, m, M, _, F, Q, J;
|
|
146
|
-
function ee() {
|
|
147
|
-
}
|
|
148
|
-
ee.__reactDisabledLog = !0;
|
|
149
|
-
function ae() {
|
|
150
|
-
{
|
|
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 = {
|
|
154
|
-
configurable: !0,
|
|
155
|
-
enumerable: !0,
|
|
156
|
-
value: ee,
|
|
157
|
-
writable: !0
|
|
158
|
-
};
|
|
159
|
-
Object.defineProperties(console, {
|
|
160
|
-
info: a,
|
|
161
|
-
log: a,
|
|
162
|
-
warn: a,
|
|
163
|
-
error: a,
|
|
164
|
-
group: a,
|
|
165
|
-
groupCollapsed: a,
|
|
166
|
-
groupEnd: a
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
y++;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
function ne() {
|
|
173
|
-
{
|
|
174
|
-
if (y--, y === 0) {
|
|
175
|
-
var a = {
|
|
176
|
-
configurable: !0,
|
|
177
|
-
enumerable: !0,
|
|
178
|
-
writable: !0
|
|
179
|
-
};
|
|
180
|
-
Object.defineProperties(console, {
|
|
181
|
-
log: x({}, a, {
|
|
182
|
-
value: j
|
|
183
|
-
}),
|
|
184
|
-
info: x({}, a, {
|
|
185
|
-
value: m
|
|
186
|
-
}),
|
|
187
|
-
warn: x({}, a, {
|
|
188
|
-
value: M
|
|
189
|
-
}),
|
|
190
|
-
error: x({}, a, {
|
|
191
|
-
value: _
|
|
192
|
-
}),
|
|
193
|
-
group: x({}, a, {
|
|
194
|
-
value: F
|
|
195
|
-
}),
|
|
196
|
-
groupCollapsed: x({}, a, {
|
|
197
|
-
value: Q
|
|
198
|
-
}),
|
|
199
|
-
groupEnd: x({}, a, {
|
|
200
|
-
value: J
|
|
201
|
-
})
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
y < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
var le = T.ReactCurrentDispatcher, he;
|
|
208
|
-
function ue(a, E, I) {
|
|
209
|
-
{
|
|
210
|
-
if (he === void 0)
|
|
211
|
-
try {
|
|
212
|
-
throw Error();
|
|
213
|
-
} catch (G) {
|
|
214
|
-
var L = G.stack.trim().match(/\n( *(at )?)/);
|
|
215
|
-
he = L && L[1] || "";
|
|
216
|
-
}
|
|
217
|
-
return `
|
|
218
|
-
` + he + a;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
var re = !1, oe;
|
|
222
|
-
{
|
|
223
|
-
var xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
224
|
-
oe = new xe();
|
|
225
|
-
}
|
|
226
|
-
function De(a, E) {
|
|
227
|
-
if (!a || re)
|
|
228
|
-
return "";
|
|
229
|
-
{
|
|
230
|
-
var I = oe.get(a);
|
|
231
|
-
if (I !== void 0)
|
|
232
|
-
return I;
|
|
233
|
-
}
|
|
234
|
-
var L;
|
|
235
|
-
re = !0;
|
|
236
|
-
var G = Error.prepareStackTrace;
|
|
237
|
-
Error.prepareStackTrace = void 0;
|
|
238
|
-
var K;
|
|
239
|
-
K = le.current, le.current = null, ae();
|
|
240
|
-
try {
|
|
241
|
-
if (E) {
|
|
242
|
-
var B = function() {
|
|
243
|
-
throw Error();
|
|
244
|
-
};
|
|
245
|
-
if (Object.defineProperty(B.prototype, "props", {
|
|
246
|
-
set: function() {
|
|
247
|
-
throw Error();
|
|
248
|
-
}
|
|
249
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
250
|
-
try {
|
|
251
|
-
Reflect.construct(B, []);
|
|
252
|
-
} catch (fe) {
|
|
253
|
-
L = fe;
|
|
254
|
-
}
|
|
255
|
-
Reflect.construct(a, [], B);
|
|
256
|
-
} else {
|
|
257
|
-
try {
|
|
258
|
-
B.call();
|
|
259
|
-
} catch (fe) {
|
|
260
|
-
L = fe;
|
|
261
|
-
}
|
|
262
|
-
a.call(B.prototype);
|
|
263
|
-
}
|
|
264
|
-
} else {
|
|
265
|
-
try {
|
|
266
|
-
throw Error();
|
|
267
|
-
} catch (fe) {
|
|
268
|
-
L = fe;
|
|
269
|
-
}
|
|
270
|
-
a();
|
|
271
|
-
}
|
|
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)
|
|
281
|
-
do
|
|
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;
|
|
286
|
-
}
|
|
287
|
-
while (te >= 1 && se >= 0);
|
|
288
|
-
break;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
} finally {
|
|
292
|
-
re = !1, le.current = K, ne(), Error.prepareStackTrace = G;
|
|
293
|
-
}
|
|
294
|
-
var Ee = a ? a.displayName || a.name : "", nt = Ee ? ue(Ee) : "";
|
|
295
|
-
return typeof a == "function" && oe.set(a, nt), nt;
|
|
296
|
-
}
|
|
297
|
-
function jt(a, E, I) {
|
|
298
|
-
return De(a, !1);
|
|
299
|
-
}
|
|
300
|
-
function It(a) {
|
|
301
|
-
var E = a.prototype;
|
|
302
|
-
return !!(E && E.isReactComponent);
|
|
303
|
-
}
|
|
304
|
-
function je(a, E, I) {
|
|
305
|
-
if (a == null)
|
|
306
|
-
return "";
|
|
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");
|
|
314
|
-
case c:
|
|
315
|
-
return ue("SuspenseList");
|
|
316
|
-
}
|
|
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;
|
|
325
|
-
try {
|
|
326
|
-
return je(K(G), E, I);
|
|
327
|
-
} catch {
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
return "";
|
|
332
|
-
}
|
|
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);
|
|
338
|
-
} else
|
|
339
|
-
Ue.setExtraStackFrame(null);
|
|
340
|
-
}
|
|
341
|
-
function Mt(a, E, I, L, G) {
|
|
342
|
-
{
|
|
343
|
-
var K = Function.call.bind(Ie);
|
|
344
|
-
for (var B in a)
|
|
345
|
-
if (K(a, B)) {
|
|
346
|
-
var q = void 0;
|
|
347
|
-
try {
|
|
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;
|
|
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;
|
|
355
|
-
}
|
|
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));
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
var kt = Array.isArray;
|
|
361
|
-
function He(a) {
|
|
362
|
-
return kt(a);
|
|
363
|
-
}
|
|
364
|
-
function Wt(a) {
|
|
365
|
-
{
|
|
366
|
-
var E = typeof Symbol == "function" && Symbol.toStringTag, I = E && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
367
|
-
return I;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
function _t(a) {
|
|
371
|
-
try {
|
|
372
|
-
return Xe(a), !1;
|
|
373
|
-
} catch {
|
|
374
|
-
return !0;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
function Xe(a) {
|
|
378
|
-
return "" + a;
|
|
379
|
-
}
|
|
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);
|
|
383
|
-
}
|
|
384
|
-
var Ce = T.ReactCurrentOwner, Ot = {
|
|
385
|
-
key: !0,
|
|
386
|
-
ref: !0,
|
|
387
|
-
__self: !0,
|
|
388
|
-
__source: !0
|
|
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)
|
|
395
|
-
return !1;
|
|
396
|
-
}
|
|
397
|
-
return a.ref !== void 0;
|
|
398
|
-
}
|
|
399
|
-
function $t(a) {
|
|
400
|
-
if (Ie.call(a, "key")) {
|
|
401
|
-
var E = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
402
|
-
if (E && E.isReactWarning)
|
|
403
|
-
return !1;
|
|
404
|
-
}
|
|
405
|
-
return a.key !== void 0;
|
|
406
|
-
}
|
|
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);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
function Lt(a, E) {
|
|
414
|
-
{
|
|
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));
|
|
417
|
-
};
|
|
418
|
-
I.isReactWarning = !0, Object.defineProperty(a, "key", {
|
|
419
|
-
get: I,
|
|
420
|
-
configurable: !0
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
function Nt(a, E) {
|
|
425
|
-
{
|
|
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));
|
|
428
|
-
};
|
|
429
|
-
I.isReactWarning = !0, Object.defineProperty(a, "ref", {
|
|
430
|
-
get: I,
|
|
431
|
-
configurable: !0
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
var At = function(a, E, I, L, G, K, B) {
|
|
436
|
-
var q = {
|
|
437
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
438
|
-
$$typeof: t,
|
|
439
|
-
// Built-in properties that belong on the element
|
|
440
|
-
type: a,
|
|
441
|
-
key: E,
|
|
442
|
-
ref: I,
|
|
443
|
-
props: B,
|
|
444
|
-
// Record the component responsible for creating this element.
|
|
445
|
-
_owner: K
|
|
446
|
-
};
|
|
447
|
-
return q._store = {}, Object.defineProperty(q._store, "validated", {
|
|
448
|
-
configurable: !1,
|
|
449
|
-
enumerable: !1,
|
|
450
|
-
writable: !0,
|
|
451
|
-
value: !1
|
|
452
|
-
}), Object.defineProperty(q, "_self", {
|
|
453
|
-
configurable: !1,
|
|
454
|
-
enumerable: !1,
|
|
455
|
-
writable: !1,
|
|
456
|
-
value: L
|
|
457
|
-
}), Object.defineProperty(q, "_source", {
|
|
458
|
-
configurable: !1,
|
|
459
|
-
enumerable: !1,
|
|
460
|
-
writable: !1,
|
|
461
|
-
value: G
|
|
462
|
-
}), Object.freeze && (Object.freeze(q.props), Object.freeze(q)), q;
|
|
463
|
-
};
|
|
464
|
-
function Yt(a, E, I, L, G) {
|
|
465
|
-
{
|
|
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]);
|
|
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);
|
|
478
|
-
}
|
|
479
|
-
return At(a, q, ie, G, L, Ce.current, B);
|
|
480
|
-
}
|
|
481
|
-
}
|
|
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);
|
|
487
|
-
} else
|
|
488
|
-
Ze.setExtraStackFrame(null);
|
|
489
|
-
}
|
|
490
|
-
var Le;
|
|
491
|
-
Le = !1;
|
|
492
|
-
function Ne(a) {
|
|
493
|
-
return typeof a == "object" && a !== null && a.$$typeof === t;
|
|
494
|
-
}
|
|
495
|
-
function Ke() {
|
|
496
|
-
{
|
|
497
|
-
if (Pe.current) {
|
|
498
|
-
var a = S(Pe.current.type);
|
|
499
|
-
if (a)
|
|
500
|
-
return `
|
|
501
|
-
|
|
502
|
-
Check the render method of \`` + a + "`.";
|
|
503
|
-
}
|
|
504
|
-
return "";
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
function zt(a) {
|
|
508
|
-
{
|
|
509
|
-
if (a !== void 0) {
|
|
510
|
-
var E = a.fileName.replace(/^.*[\\\/]/, ""), I = a.lineNumber;
|
|
511
|
-
return `
|
|
512
|
-
|
|
513
|
-
Check your code at ` + E + ":" + I + ".";
|
|
514
|
-
}
|
|
515
|
-
return "";
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
var et = {};
|
|
519
|
-
function Ft(a) {
|
|
520
|
-
{
|
|
521
|
-
var E = Ke();
|
|
522
|
-
if (!E) {
|
|
523
|
-
var I = typeof a == "string" ? a : a.displayName || a.name;
|
|
524
|
-
I && (E = `
|
|
525
|
-
|
|
526
|
-
Check the top-level render call using <` + I + ">.");
|
|
527
|
-
}
|
|
528
|
-
return E;
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
function tt(a, E) {
|
|
532
|
-
{
|
|
533
|
-
if (!a._store || a._store.validated || a.key != null)
|
|
534
|
-
return;
|
|
535
|
-
a._store.validated = !0;
|
|
536
|
-
var I = Ft(E);
|
|
537
|
-
if (et[I])
|
|
538
|
-
return;
|
|
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);
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
function st(a, E) {
|
|
545
|
-
{
|
|
546
|
-
if (typeof a != "object")
|
|
547
|
-
return;
|
|
548
|
-
if (He(a))
|
|
549
|
-
for (var I = 0; I < a.length; I++) {
|
|
550
|
-
var L = a[I];
|
|
551
|
-
Ne(L) && tt(L, E);
|
|
552
|
-
}
|
|
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);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
function qt(a) {
|
|
564
|
-
{
|
|
565
|
-
var E = a.type;
|
|
566
|
-
if (E == null || typeof E == "string")
|
|
567
|
-
return;
|
|
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.
|
|
572
|
-
// Inner props are checked in the reconciler.
|
|
573
|
-
E.$$typeof === f))
|
|
574
|
-
I = E.propTypes;
|
|
575
|
-
else
|
|
576
|
-
return;
|
|
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");
|
|
584
|
-
}
|
|
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.");
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
function Bt(a) {
|
|
589
|
-
{
|
|
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);
|
|
594
|
-
break;
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
a.ref !== null && (ye(a), b("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
function rt(a, E, I, L, G, K) {
|
|
601
|
-
{
|
|
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);
|
|
610
|
-
}
|
|
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);
|
|
622
|
-
} else
|
|
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.");
|
|
624
|
-
else
|
|
625
|
-
st(ce, a);
|
|
626
|
-
}
|
|
627
|
-
return a === s ? Bt(se) : qt(se), se;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
function Vt(a, E, I) {
|
|
631
|
-
return rt(a, E, I, !0);
|
|
632
|
-
}
|
|
633
|
-
function Ut(a, E, I) {
|
|
634
|
-
return rt(a, E, I, !1);
|
|
635
|
-
}
|
|
636
|
-
var Xt = Ut, Gt = Vt;
|
|
637
|
-
Re.Fragment = s, Re.jsx = Xt, Re.jsxs = Gt;
|
|
638
|
-
}()), Re;
|
|
639
|
-
}
|
|
640
|
-
process.env.NODE_ENV === "production" ? Ye.exports = cs() : Ye.exports = ds();
|
|
641
|
-
var d = Ye.exports;
|
|
642
|
-
const qe = ({
|
|
643
|
-
schedulerData: R,
|
|
644
|
-
eventItem: t,
|
|
645
|
-
title: 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}` }) })
|
|
664
|
-
] }),
|
|
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 }) })
|
|
668
|
-
] }),
|
|
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
|
-
] })
|
|
686
|
-
] });
|
|
687
|
-
};
|
|
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 {
|
|
704
|
-
constructor(e) {
|
|
705
|
-
super(e);
|
|
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())
|
|
710
|
-
return;
|
|
711
|
-
e.stopPropagation();
|
|
712
|
-
let o = 0;
|
|
713
|
-
if (this.supportTouch) {
|
|
714
|
-
if (e.changedTouches.length == 0)
|
|
715
|
-
return;
|
|
716
|
-
o = e.changedTouches[0].pageX;
|
|
717
|
-
} else {
|
|
718
|
-
if (e.buttons !== void 0 && e.buttons !== 1)
|
|
719
|
-
return;
|
|
720
|
-
o = e.clientX;
|
|
721
|
-
}
|
|
722
|
-
this.setState({
|
|
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() {
|
|
725
|
-
return !1;
|
|
726
|
-
}, document.ondragstart = function() {
|
|
727
|
-
return !1;
|
|
728
|
-
};
|
|
729
|
-
});
|
|
730
|
-
P(this, "doStartDrag", (e) => {
|
|
731
|
-
e.stopPropagation();
|
|
732
|
-
let s = 0;
|
|
733
|
-
if (this.supportTouch) {
|
|
734
|
-
if (e.changedTouches.length == 0)
|
|
735
|
-
return;
|
|
736
|
-
s = e.changedTouches[0].pageX;
|
|
737
|
-
} else
|
|
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 });
|
|
744
|
-
});
|
|
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)
|
|
749
|
-
return;
|
|
750
|
-
let h = 0;
|
|
751
|
-
if (this.supportTouch) {
|
|
752
|
-
if (e.changedTouches.length == 0) {
|
|
753
|
-
this.setState({
|
|
754
|
-
left: r,
|
|
755
|
-
top: n,
|
|
756
|
-
width: s
|
|
757
|
-
});
|
|
758
|
-
return;
|
|
759
|
-
}
|
|
760
|
-
h = e.changedTouches[0].pageX;
|
|
761
|
-
} else
|
|
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;
|
|
772
|
-
for (; ; ) {
|
|
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);
|
|
777
|
-
break;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
} else {
|
|
781
|
-
let y = 0, j = 0;
|
|
782
|
-
for (; ; ) {
|
|
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);
|
|
787
|
-
break;
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
}
|
|
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);
|
|
798
|
-
}
|
|
799
|
-
});
|
|
800
|
-
}
|
|
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);
|
|
806
|
-
});
|
|
807
|
-
P(this, "cancelStartDrag", (e) => {
|
|
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;
|
|
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
|
|
814
|
-
});
|
|
815
|
-
});
|
|
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())
|
|
820
|
-
return;
|
|
821
|
-
e.stopPropagation();
|
|
822
|
-
let o = 0;
|
|
823
|
-
if (this.supportTouch) {
|
|
824
|
-
if (e.changedTouches.length == 0)
|
|
825
|
-
return;
|
|
826
|
-
o = e.changedTouches[0].pageX;
|
|
827
|
-
} else {
|
|
828
|
-
if (e.buttons !== void 0 && e.buttons !== 1)
|
|
829
|
-
return;
|
|
830
|
-
o = e.clientX;
|
|
831
|
-
}
|
|
832
|
-
this.setState({
|
|
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() {
|
|
835
|
-
return !1;
|
|
836
|
-
}, document.ondragstart = function() {
|
|
837
|
-
return !1;
|
|
838
|
-
};
|
|
839
|
-
});
|
|
840
|
-
P(this, "doEndDrag", (e) => {
|
|
841
|
-
e.stopPropagation();
|
|
842
|
-
let s = 0;
|
|
843
|
-
if (this.supportTouch) {
|
|
844
|
-
if (e.changedTouches.length == 0)
|
|
845
|
-
return;
|
|
846
|
-
s = e.changedTouches[0].pageX;
|
|
847
|
-
} else
|
|
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 });
|
|
854
|
-
});
|
|
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)
|
|
859
|
-
return;
|
|
860
|
-
let h = 0;
|
|
861
|
-
if (this.supportTouch) {
|
|
862
|
-
if (e.changedTouches.length == 0) {
|
|
863
|
-
this.setState({
|
|
864
|
-
left: r,
|
|
865
|
-
top: n,
|
|
866
|
-
width: s
|
|
867
|
-
});
|
|
868
|
-
return;
|
|
869
|
-
}
|
|
870
|
-
h = e.changedTouches[0].pageX;
|
|
871
|
-
} else
|
|
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;
|
|
882
|
-
for (; ; ) {
|
|
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);
|
|
887
|
-
break;
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
} else {
|
|
891
|
-
let j = 0, m = 0;
|
|
892
|
-
for (; ; ) {
|
|
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);
|
|
897
|
-
break;
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
}
|
|
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);
|
|
908
|
-
}
|
|
909
|
-
});
|
|
910
|
-
}
|
|
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);
|
|
916
|
-
});
|
|
917
|
-
P(this, "cancelEndDrag", (e) => {
|
|
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;
|
|
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
|
|
924
|
-
});
|
|
925
|
-
});
|
|
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
|
-
});
|
|
933
|
-
});
|
|
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);
|
|
937
|
-
});
|
|
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);
|
|
941
|
-
});
|
|
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;
|
|
946
|
-
this.state = {
|
|
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
|
-
}
|
|
965
|
-
componentDidMount() {
|
|
966
|
-
this._isMounted = !0, this.supportTouch = "ontouchstart" in window, this.subscribeResizeEvent(this.props);
|
|
967
|
-
}
|
|
968
|
-
render() {
|
|
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(
|
|
980
|
-
"a",
|
|
981
|
-
{
|
|
982
|
-
className: "timeline-event",
|
|
983
|
-
ref: this.eventItemRef,
|
|
984
|
-
onMouseMove: A ? this.handleMouseMove : void 0,
|
|
985
|
-
style: { left: D, width: g, top: w },
|
|
986
|
-
onClick: () => {
|
|
987
|
-
i && i(o, e);
|
|
988
|
-
},
|
|
989
|
-
children: [
|
|
990
|
-
X,
|
|
991
|
-
W,
|
|
992
|
-
C
|
|
993
|
-
]
|
|
994
|
-
}
|
|
995
|
-
);
|
|
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
|
-
);
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
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
|
|
1054
|
-
});
|
|
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) => {
|
|
1060
|
-
if (!e.didDrop())
|
|
1061
|
-
return;
|
|
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);
|
|
1073
|
-
}
|
|
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);
|
|
1078
|
-
}
|
|
1079
|
-
k = "Move";
|
|
1080
|
-
}
|
|
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);
|
|
1088
|
-
}
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
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");
|
|
1094
|
-
} else
|
|
1095
|
-
A ? r !== void 0 && r(i, f, D, g, w, T) : n !== void 0 && n(i, D, g, w, T, h, f);
|
|
1096
|
-
},
|
|
1097
|
-
canDrag: (t) => {
|
|
1098
|
-
const { schedulerData: e, resourceEvents: s } = t, r = this.resolveDragObjFunc(t);
|
|
1099
|
-
if (e._isResizing())
|
|
1100
|
-
return !1;
|
|
1101
|
-
const { config: n } = e;
|
|
1102
|
-
return n.movable && (s == null || !s.groupOnly) && (r.movable == null || r.movable !== !1);
|
|
1103
|
-
}
|
|
1104
|
-
}));
|
|
1105
|
-
P(this, "getDragCollect", (t, e) => ({
|
|
1106
|
-
connectDragSource: t.dragSource(),
|
|
1107
|
-
isDragging: e.isDragging(),
|
|
1108
|
-
connectDragPreview: t.dragPreview()
|
|
1109
|
-
}));
|
|
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;
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
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;
|
|
1118
|
-
return { x: t, y: e };
|
|
1119
|
-
}
|
|
1120
|
-
class us {
|
|
1121
|
-
constructor(t, e) {
|
|
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));
|
|
1130
|
-
}
|
|
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
|
|
1140
|
-
};
|
|
1141
|
-
},
|
|
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);
|
|
1151
|
-
}
|
|
1152
|
-
const w = e.getClientOffset();
|
|
1153
|
-
let T = Math.floor((w.x - v.x) / D);
|
|
1154
|
-
if (!n.headerItems[T])
|
|
1155
|
-
return;
|
|
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);
|
|
1166
|
-
}
|
|
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);
|
|
1171
|
-
}
|
|
1172
|
-
H = "Move";
|
|
1173
|
-
}
|
|
1174
|
-
i && i(r, A, $, b, k, H, h, f);
|
|
1175
|
-
},
|
|
1176
|
-
canDrop: (t, e) => {
|
|
1177
|
-
const { schedulerData: s, resourceEvents: r } = t, n = e.getItem();
|
|
1178
|
-
if (s._isResizing())
|
|
1179
|
-
return !1;
|
|
1180
|
-
const { config: i } = s;
|
|
1181
|
-
return i.movable && !r.groupOnly && (n.movable == null || n.movable !== !1);
|
|
1182
|
-
}
|
|
1183
|
-
}));
|
|
1184
|
-
P(this, "getDropCollect", (t, e) => ({
|
|
1185
|
-
connectDropTarget: t.dropTarget(),
|
|
1186
|
-
isOver: e.isOver()
|
|
1187
|
-
}));
|
|
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);
|
|
1192
|
-
}), this.DecoratedComponent = e;
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
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);
|
|
1212
|
-
}
|
|
1213
|
-
const T = {
|
|
1214
|
-
height: h.rowHeight,
|
|
1215
|
-
backgroundColor: h.groupOnly ? R.config.groupOnlySlotColor : void 0
|
|
1216
|
-
};
|
|
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);
|
|
1223
|
-
});
|
|
1224
|
-
return /* @__PURE__ */ d.jsx("div", { style: { paddingBottom: o }, children: /* @__PURE__ */ d.jsx("table", { className: "resource-table", children: /* @__PURE__ */ d.jsx("tbody", { children: f }) }) });
|
|
1225
|
-
};
|
|
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);
|
|
1258
|
-
}
|
|
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);
|
|
1287
|
-
});
|
|
1288
|
-
return /* @__PURE__ */ d.jsx("tr", { style: { height: u }, children: c }, o);
|
|
1289
|
-
});
|
|
1290
|
-
return /* @__PURE__ */ d.jsx("tbody", { children: i });
|
|
1291
|
-
}
|
|
1292
|
-
gt.propTypes = {
|
|
1293
|
-
schedulerData: p.object.isRequired
|
|
1294
|
-
};
|
|
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
|
|
1307
|
-
};
|
|
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 } : {}
|
|
1319
|
-
};
|
|
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
|
|
1328
|
-
};
|
|
1329
|
-
const Dt = ({ left: R, width: t, schedulerData: e }) => {
|
|
1330
|
-
const { config: s } = e, r = {
|
|
1331
|
-
left: R,
|
|
1332
|
-
width: t,
|
|
1333
|
-
top: 0,
|
|
1334
|
-
bottom: 0,
|
|
1335
|
-
backgroundColor: s.selectedAreaColor
|
|
1336
|
-
};
|
|
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
|
|
1343
|
-
};
|
|
1344
|
-
class yt extends We {
|
|
1345
|
-
constructor(e) {
|
|
1346
|
-
super(e);
|
|
1347
|
-
P(this, "initDrag", (e) => {
|
|
1348
|
-
const { isSelecting: s } = this.state;
|
|
1349
|
-
if (s || (e.srcElement || e.target) !== this.eventContainer)
|
|
1350
|
-
return;
|
|
1351
|
-
e.stopPropagation();
|
|
1352
|
-
const { resourceEvents: r } = this.props;
|
|
1353
|
-
if (r.groupOnly)
|
|
1354
|
-
return;
|
|
1355
|
-
let n = 0;
|
|
1356
|
-
if (this.supportTouch) {
|
|
1357
|
-
if (e.changedTouches.length == 0)
|
|
1358
|
-
return;
|
|
1359
|
-
n = e.changedTouches[0].pageX;
|
|
1360
|
-
} else {
|
|
1361
|
-
if (e.buttons !== void 0 && e.buttons !== 1)
|
|
1362
|
-
return;
|
|
1363
|
-
n = e.clientX;
|
|
1364
|
-
}
|
|
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;
|
|
1367
|
-
this.setState({
|
|
1368
|
-
startX: u,
|
|
1369
|
-
left: f,
|
|
1370
|
-
leftIndex: c,
|
|
1371
|
-
width: v,
|
|
1372
|
-
rightIndex: h,
|
|
1373
|
-
isSelecting: !0
|
|
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() {
|
|
1375
|
-
return !1;
|
|
1376
|
-
}, document.ondragstart = function() {
|
|
1377
|
-
return !1;
|
|
1378
|
-
};
|
|
1379
|
-
});
|
|
1380
|
-
P(this, "doDrag", (e) => {
|
|
1381
|
-
e.stopPropagation();
|
|
1382
|
-
let s = 0;
|
|
1383
|
-
if (this.supportTouch) {
|
|
1384
|
-
if (e.changedTouches.length == 0)
|
|
1385
|
-
return;
|
|
1386
|
-
s = e.changedTouches[0].pageX;
|
|
1387
|
-
} else
|
|
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;
|
|
1395
|
-
this.setState({
|
|
1396
|
-
leftIndex: c,
|
|
1397
|
-
left: f,
|
|
1398
|
-
rightIndex: h,
|
|
1399
|
-
width: v,
|
|
1400
|
-
isSelecting: !0
|
|
1401
|
-
});
|
|
1402
|
-
});
|
|
1403
|
-
P(this, "stopDrag", (e) => {
|
|
1404
|
-
e.stopPropagation();
|
|
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;
|
|
1410
|
-
this.setState({
|
|
1411
|
-
startX: 0,
|
|
1412
|
-
leftIndex: 0,
|
|
1413
|
-
left: 0,
|
|
1414
|
-
rightIndex: 0,
|
|
1415
|
-
width: 0,
|
|
1416
|
-
isSelecting: !1
|
|
1417
|
-
});
|
|
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);
|
|
1425
|
-
}
|
|
1426
|
-
});
|
|
1427
|
-
}
|
|
1428
|
-
if (T) {
|
|
1429
|
-
const { conflictOccurred: b } = this.props;
|
|
1430
|
-
b != null ? b(
|
|
1431
|
-
s,
|
|
1432
|
-
"New",
|
|
1433
|
-
{
|
|
1434
|
-
id: void 0,
|
|
1435
|
-
start: v,
|
|
1436
|
-
end: D,
|
|
1437
|
-
slotId: g,
|
|
1438
|
-
slotName: w,
|
|
1439
|
-
title: void 0
|
|
1440
|
-
},
|
|
1441
|
-
pe.EVENT,
|
|
1442
|
-
g,
|
|
1443
|
-
w,
|
|
1444
|
-
v,
|
|
1445
|
-
D
|
|
1446
|
-
) : console.log("Conflict occurred, set conflictOccurred func in Scheduler to handle it");
|
|
1447
|
-
} else
|
|
1448
|
-
r != null && r(s, g, w, v, D);
|
|
1449
|
-
});
|
|
1450
|
-
P(this, "cancelDrag", (e) => {
|
|
1451
|
-
e.stopPropagation();
|
|
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({
|
|
1454
|
-
startX: 0,
|
|
1455
|
-
leftIndex: 0,
|
|
1456
|
-
left: 0,
|
|
1457
|
-
rightIndex: 0,
|
|
1458
|
-
width: 0,
|
|
1459
|
-
isSelecting: !1
|
|
1460
|
-
}));
|
|
1461
|
-
});
|
|
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({
|
|
1472
|
-
headerItem: e,
|
|
1473
|
-
left: u,
|
|
1474
|
-
top: f,
|
|
1475
|
-
height: h
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
});
|
|
1480
|
-
P(this, "eventContainerRef", (e) => {
|
|
1481
|
-
this.eventContainer = e;
|
|
1482
|
-
});
|
|
1483
|
-
this.state = {
|
|
1484
|
-
isSelecting: !1,
|
|
1485
|
-
left: 0,
|
|
1486
|
-
width: 0
|
|
1487
|
-
}, this.supportTouch = !1;
|
|
1488
|
-
}
|
|
1489
|
-
componentDidMount() {
|
|
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));
|
|
1492
|
-
}
|
|
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)));
|
|
1495
|
-
}
|
|
1496
|
-
render() {
|
|
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,
|
|
1508
|
-
{
|
|
1509
|
-
...this.props,
|
|
1510
|
-
key: C.eventItem.id,
|
|
1511
|
-
eventItem: C.eventItem,
|
|
1512
|
-
isStart: j,
|
|
1513
|
-
isEnd: m,
|
|
1514
|
-
isInPopover: !1,
|
|
1515
|
-
left: M,
|
|
1516
|
-
width: _,
|
|
1517
|
-
top: F,
|
|
1518
|
-
leftIndex: H,
|
|
1519
|
-
rightIndex: H + C.span
|
|
1520
|
-
}
|
|
1521
|
-
);
|
|
1522
|
-
k.push(Q);
|
|
1523
|
-
}
|
|
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);
|
|
1539
|
-
}
|
|
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);
|
|
1543
|
-
}
|
|
1544
|
-
}
|
|
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 }) });
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
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
|
|
1571
|
-
});
|
|
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 });
|
|
1579
|
-
}
|
|
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
|
|
1592
|
-
};
|
|
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 }) })
|
|
1612
|
-
] });
|
|
1613
|
-
}
|
|
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
|
|
1625
|
-
};
|
|
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 })
|
|
1632
|
-
] }) }),
|
|
1633
|
-
/* @__PURE__ */ d.jsx("tbody", { children: l })
|
|
1634
|
-
] }) }) });
|
|
1635
|
-
}
|
|
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
|
|
1645
|
-
};
|
|
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,
|
|
1652
|
-
{
|
|
1653
|
-
...R,
|
|
1654
|
-
key: k.eventItem.id,
|
|
1655
|
-
eventItem: k.eventItem,
|
|
1656
|
-
leftIndex: 0,
|
|
1657
|
-
isInPopover: !0,
|
|
1658
|
-
isStart: N,
|
|
1659
|
-
isEnd: z,
|
|
1660
|
-
rightIndex: 1,
|
|
1661
|
-
left: 10,
|
|
1662
|
-
width: 138,
|
|
1663
|
-
top: W
|
|
1664
|
-
}
|
|
1665
|
-
);
|
|
1666
|
-
}
|
|
1667
|
-
return null;
|
|
1668
|
-
});
|
|
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, {}) }) })
|
|
1673
|
-
] }),
|
|
1674
|
-
b == null ? void 0 : b.filter(Boolean)
|
|
1675
|
-
] });
|
|
1676
|
-
}
|
|
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
|
|
1692
|
-
};
|
|
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 = {
|
|
2030
|
-
schedulerWidth: "100%",
|
|
2031
|
-
besidesWidth: 20,
|
|
2032
|
-
schedulerMaxHeight: 0,
|
|
2033
|
-
tableHeaderHeight: 40,
|
|
2034
|
-
schedulerContentHeight: "500px",
|
|
2035
|
-
responsiveByParent: !1,
|
|
2036
|
-
agendaResourceTableWidth: 160,
|
|
2037
|
-
agendaMaxEventWidth: 100,
|
|
2038
|
-
dayResourceTableWidth: 160,
|
|
2039
|
-
weekResourceTableWidth: "16%",
|
|
2040
|
-
monthResourceTableWidth: 160,
|
|
2041
|
-
quarterResourceTableWidth: 160,
|
|
2042
|
-
yearResourceTableWidth: 160,
|
|
2043
|
-
customResourceTableWidth: 160,
|
|
2044
|
-
dayCellWidth: 30,
|
|
2045
|
-
weekCellWidth: "12%",
|
|
2046
|
-
monthCellWidth: 80,
|
|
2047
|
-
quarterCellWidth: 80,
|
|
2048
|
-
yearCellWidth: 80,
|
|
2049
|
-
customCellWidth: 80,
|
|
2050
|
-
dayMaxEvents: 99,
|
|
2051
|
-
weekMaxEvents: 99,
|
|
2052
|
-
monthMaxEvents: 99,
|
|
2053
|
-
quarterMaxEvents: 99,
|
|
2054
|
-
yearMaxEvents: 99,
|
|
2055
|
-
customMaxEvents: 99,
|
|
2056
|
-
eventItemPopoverTrigger: "hover",
|
|
2057
|
-
eventItemPopoverPlacement: "bottomLeft",
|
|
2058
|
-
eventItemPopoverWidth: 300,
|
|
2059
|
-
eventItemHeight: 22,
|
|
2060
|
-
eventItemLineHeight: 24,
|
|
2061
|
-
nonAgendaSlotMinHeight: 0,
|
|
2062
|
-
dayStartFrom: 0,
|
|
2063
|
-
dayStopTo: 23,
|
|
2064
|
-
defaultEventBgColor: "#80C5F6",
|
|
2065
|
-
selectedAreaColor: "#7EC2F3",
|
|
2066
|
-
nonWorkingTimeHeadColor: "#999999",
|
|
2067
|
-
nonWorkingTimeHeadBgColor: "#fff0f6",
|
|
2068
|
-
nonWorkingTimeBodyBgColor: "#fff0f6",
|
|
2069
|
-
summaryColor: "#666",
|
|
2070
|
-
summaryPos: me.TopRight,
|
|
2071
|
-
groupOnlySlotColor: "#F8F8F8",
|
|
2072
|
-
startResizable: !0,
|
|
2073
|
-
endResizable: !0,
|
|
2074
|
-
movable: !0,
|
|
2075
|
-
creatable: !0,
|
|
2076
|
-
crossResourceMove: !0,
|
|
2077
|
-
checkConflict: !1,
|
|
2078
|
-
scrollToSpecialDayjsEnabled: !0,
|
|
2079
|
-
eventItemPopoverEnabled: !0,
|
|
2080
|
-
eventItemPopoverShowColor: !0,
|
|
2081
|
-
calendarPopoverEnabled: !0,
|
|
2082
|
-
recurringEventsEnabled: !0,
|
|
2083
|
-
viewChangeSpinEnabled: !0,
|
|
2084
|
-
dateChangeSpinEnabled: !0,
|
|
2085
|
-
headerEnabled: !0,
|
|
2086
|
-
resourceViewEnabled: !0,
|
|
2087
|
-
displayWeekend: !0,
|
|
2088
|
-
relativeMove: !0,
|
|
2089
|
-
defaultExpanded: !0,
|
|
2090
|
-
dragAndDropEnabled: !0,
|
|
2091
|
-
schedulerHeaderEventsFuncsTimeoutMs: 100,
|
|
2092
|
-
resourceName: "Resource Name",
|
|
2093
|
-
taskName: "Task Name",
|
|
2094
|
-
agendaViewHeader: "Agenda",
|
|
2095
|
-
addMorePopoverHeaderFormat: "MMM D, YYYY dddd",
|
|
2096
|
-
eventItemPopoverDateFormat: "MMM D",
|
|
2097
|
-
nonAgendaDayCellHeaderFormat: "ha",
|
|
2098
|
-
nonAgendaWeekCellHeaderFormat: "ww/YYYY",
|
|
2099
|
-
nonAgendaMonthCellHeaderFormat: "MMM YYYY",
|
|
2100
|
-
nonAgendaYearCellHeaderFormat: "YYYY",
|
|
2101
|
-
nonAgendaOtherCellHeaderFormat: "ddd M/D",
|
|
2102
|
-
minuteStep: 30,
|
|
2103
|
-
views: [
|
|
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 }
|
|
2109
|
-
]
|
|
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 = {
|
|
2130
|
-
getSummaryFunc: void 0,
|
|
2131
|
-
getCustomDateFunc: void 0,
|
|
2132
|
-
getNonAgendaViewBodyCellBgColorFunc: void 0,
|
|
2133
|
-
getScrollSpecialDayjsFunc: bs,
|
|
2134
|
-
getDateLabelFunc: Es,
|
|
2135
|
-
getEventTextFunc: ws,
|
|
2136
|
-
isNonWorkingTimeFunc: xs
|
|
2137
|
-
};
|
|
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
|
-
});
|
|
2158
|
-
}
|
|
2159
|
-
setResources(t) {
|
|
2160
|
-
this._validateResource(t), this.resources = Array.from(new Set(t)), this._createRenderData(), this.setScrollToSpecialDayjs(!0);
|
|
2161
|
-
}
|
|
2162
|
-
setEventGroupsAutoGenerated(t) {
|
|
2163
|
-
this.eventGroupsAutoGenerated = t;
|
|
2164
|
-
}
|
|
2165
|
-
//optional
|
|
2166
|
-
setEventGroups(t) {
|
|
2167
|
-
this._validateEventGroups(t), this.eventGroups = Array.from(new Set(t)), this.eventGroupsAutoGenerated = !1, this._createRenderData(), this.setScrollToSpecialDayjs(!0);
|
|
2168
|
-
}
|
|
2169
|
-
setMinuteStep(t) {
|
|
2170
|
-
this.config.minuteStep !== t && (this._validateMinuteStep(t), this.config.minuteStep = t, this._createHeaders(), this._createRenderData());
|
|
2171
|
-
}
|
|
2172
|
-
setBesidesWidth(t) {
|
|
2173
|
-
t >= 0 && (this.config.besidesWidth = t);
|
|
2174
|
-
}
|
|
2175
|
-
getMinuteStepsInHour() {
|
|
2176
|
-
return 60 / this.config.minuteStep;
|
|
2177
|
-
}
|
|
2178
|
-
addResource(t) {
|
|
2179
|
-
this.resources.filter((s) => s.id === t.id).length === 0 && (this.resources.push(t), this._createRenderData());
|
|
2180
|
-
}
|
|
2181
|
-
addEventGroup(t) {
|
|
2182
|
-
this.eventGroups.filter((s) => s.id === t.id).length === 0 && (this.eventGroups.push(t), this._createRenderData());
|
|
2183
|
-
}
|
|
2184
|
-
removeEventGroupById(t) {
|
|
2185
|
-
let e = -1;
|
|
2186
|
-
this.eventGroups.forEach((s, r) => {
|
|
2187
|
-
s.id === t && (e = r);
|
|
2188
|
-
}), e !== -1 && this.eventGroups.splice(e, 1);
|
|
2189
|
-
}
|
|
2190
|
-
containsEventGroupId(t) {
|
|
2191
|
-
let e = -1;
|
|
2192
|
-
return this.eventGroups.forEach((s, r) => {
|
|
2193
|
-
s.id === t && (e = r);
|
|
2194
|
-
}), e !== -1;
|
|
2195
|
-
}
|
|
2196
|
-
setEvents(t) {
|
|
2197
|
-
this._validateEvents(t), this.events = Array.from(t), this.eventGroupsAutoGenerated && this._generateEventGroups(), this.config.recurringEventsEnabled && this._handleRecurringEvents(), this._createRenderData();
|
|
2198
|
-
}
|
|
2199
|
-
setScrollToSpecialDayjs(t) {
|
|
2200
|
-
this.config.scrollToSpecialDayjsEnabled && (this.scrollToSpecialDayjs = t);
|
|
2201
|
-
}
|
|
2202
|
-
prev() {
|
|
2203
|
-
this._resolveDate(-1), this.events = [], this._createHeaders(), this._createRenderData();
|
|
2204
|
-
}
|
|
2205
|
-
next() {
|
|
2206
|
-
this._resolveDate(1), this.events = [], this._createHeaders(), this._createRenderData();
|
|
2207
|
-
}
|
|
2208
|
-
setDate(t = ve(/* @__PURE__ */ new Date())) {
|
|
2209
|
-
this._resolveDate(0, t), this.events = [], this._createHeaders(), this._createRenderData();
|
|
2210
|
-
}
|
|
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);
|
|
2216
|
-
else {
|
|
2217
|
-
if (this.viewType < 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"));
|
|
2219
|
-
else {
|
|
2220
|
-
let n = this.localeDayjs(new Date(this.startDate)), i = this.localeDayjs(new Date(this.endDate)).add(1, "days");
|
|
2221
|
-
if (this.selectDate !== void 0) {
|
|
2222
|
-
let l = this.localeDayjs(new Date(this.selectDate));
|
|
2223
|
-
l >= n && l < i && (r = this.selectDate);
|
|
2224
|
-
}
|
|
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"));
|
|
2227
|
-
}
|
|
2228
|
-
this.viewType = t;
|
|
2229
|
-
}
|
|
2230
|
-
this._shouldReloadViewType = !1, this.events = [], this._createHeaders(), this._createRenderData(), this.setScrollToSpecialDayjs(!0);
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
setSchedulerMaxHeight(t) {
|
|
2234
|
-
this.config.schedulerMaxHeight = t;
|
|
2235
|
-
}
|
|
2236
|
-
isSchedulerResponsive() {
|
|
2237
|
-
return !!this.config.schedulerWidth.endsWith && this.config.schedulerWidth.endsWith("%");
|
|
2238
|
-
}
|
|
2239
|
-
toggleExpandStatus(t) {
|
|
2240
|
-
let e = !1, s = -1, r = !1, n = /* @__PURE__ */ new Map();
|
|
2241
|
-
this.renderData.forEach((i) => {
|
|
2242
|
-
if (e === !1)
|
|
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
|
|
2246
|
-
}));
|
|
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
|
|
2252
|
-
});
|
|
2253
|
-
} else
|
|
2254
|
-
e = !1;
|
|
2255
|
-
});
|
|
2256
|
-
}
|
|
2257
|
-
isResourceViewResponsive() {
|
|
2258
|
-
let t = this.getResourceTableConfigWidth();
|
|
2259
|
-
return !!t.endsWith && t.endsWith("%");
|
|
2260
|
-
}
|
|
2261
|
-
isContentViewResponsive() {
|
|
2262
|
-
let t = this.getContentCellConfigWidth();
|
|
2263
|
-
return !!t.endsWith && t.endsWith("%");
|
|
2264
|
-
}
|
|
2265
|
-
getSchedulerWidth() {
|
|
2266
|
-
let t = this.documentWidth - this.config.besidesWidth > 0 ? this.documentWidth - this.config.besidesWidth : 0;
|
|
2267
|
-
return this.isSchedulerResponsive() ? parseInt(t * Number(this.config.schedulerWidth.slice(0, -1)) / 100) : this.config.schedulerWidth;
|
|
2268
|
-
}
|
|
2269
|
-
getResourceTableWidth() {
|
|
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;
|
|
2272
|
-
}
|
|
2273
|
-
getContentCellWidth() {
|
|
2274
|
-
let t = this.getContentCellConfigWidth(), e = this.getSchedulerWidth();
|
|
2275
|
-
return this.isContentViewResponsive() ? parseInt(e * Number(t.slice(0, -1)) / 100) : t;
|
|
2276
|
-
}
|
|
2277
|
-
getContentTableWidth() {
|
|
2278
|
-
return this.headers.length * this.getContentCellWidth();
|
|
2279
|
-
}
|
|
2280
|
-
getScrollToSpecialDayjs() {
|
|
2281
|
-
return this.config.scrollToSpecialDayjsEnabled ? this.scrollToSpecialDayjs : !1;
|
|
2282
|
-
}
|
|
2283
|
-
getSlots() {
|
|
2284
|
-
return this.isEventPerspective ? this.eventGroups : this.resources;
|
|
2285
|
-
}
|
|
2286
|
-
getSlotById(t) {
|
|
2287
|
-
let e = this.getSlots(), s;
|
|
2288
|
-
return e.forEach((r) => {
|
|
2289
|
-
r.id === t && (s = r);
|
|
2290
|
-
}), s;
|
|
2291
|
-
}
|
|
2292
|
-
getResourceById(t) {
|
|
2293
|
-
let e;
|
|
2294
|
-
return this.resources.forEach((s) => {
|
|
2295
|
-
s.id === t && (e = s);
|
|
2296
|
-
}), e;
|
|
2297
|
-
}
|
|
2298
|
-
getTableHeaderHeight() {
|
|
2299
|
-
return this.config.tableHeaderHeight;
|
|
2300
|
-
}
|
|
2301
|
-
getSchedulerContentDesiredHeight() {
|
|
2302
|
-
let t = 0;
|
|
2303
|
-
return this.renderData.forEach((e) => {
|
|
2304
|
-
e.render && (t += e.rowHeight);
|
|
2305
|
-
}), t;
|
|
2306
|
-
}
|
|
2307
|
-
getCellMaxEvents() {
|
|
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
|
-
};
|
|
2327
|
-
}
|
|
2328
|
-
getDateLabel() {
|
|
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;
|
|
2331
|
-
}
|
|
2332
|
-
addEvent(t) {
|
|
2333
|
-
this._attachEvent(t), this.eventGroupsAutoGenerated && this._generateEventGroups(), this._createRenderData();
|
|
2334
|
-
}
|
|
2335
|
-
updateEventStart(t, e) {
|
|
2336
|
-
this._detachEvent(t), t.start = e, this._attachEvent(t), this._createRenderData();
|
|
2337
|
-
}
|
|
2338
|
-
updateEventEnd(t, e) {
|
|
2339
|
-
t.end = e, this._createRenderData();
|
|
2340
|
-
}
|
|
2341
|
-
swapEvent(t, e) {
|
|
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();
|
|
2347
|
-
}
|
|
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();
|
|
2350
|
-
}
|
|
2351
|
-
isEventInTimeWindow(t, e, s, r) {
|
|
2352
|
-
return t < r && e > s;
|
|
2353
|
-
}
|
|
2354
|
-
removeEvent(t) {
|
|
2355
|
-
let e = this.events.indexOf(t);
|
|
2356
|
-
e !== -1 && (this.events.splice(e, 1), this._createRenderData());
|
|
2357
|
-
}
|
|
2358
|
-
removeEventById(t) {
|
|
2359
|
-
let e = -1;
|
|
2360
|
-
this.events.forEach((s, r) => {
|
|
2361
|
-
s.id === t && (e = r);
|
|
2362
|
-
}), e !== -1 && (this.events.splice(e, 1), this._createRenderData());
|
|
2363
|
-
}
|
|
2364
|
-
getResourceTableConfigWidth() {
|
|
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;
|
|
2366
|
-
}
|
|
2367
|
-
getContentCellConfigWidth() {
|
|
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;
|
|
2369
|
-
}
|
|
2370
|
-
_setDocumentWidth(t) {
|
|
2371
|
-
t >= 0 && (this.documentWidth = t);
|
|
2372
|
-
}
|
|
2373
|
-
_detachEvent(t) {
|
|
2374
|
-
let e = this.events.indexOf(t);
|
|
2375
|
-
e !== -1 && this.events.splice(e, 1);
|
|
2376
|
-
}
|
|
2377
|
-
_attachEvent(t) {
|
|
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);
|
|
2382
|
-
}), this.events.splice(e, 0, t);
|
|
2383
|
-
}
|
|
2384
|
-
_handleRecurringEvents() {
|
|
2385
|
-
let t = this.events.filter((e) => !!e.rrule);
|
|
2386
|
-
t.forEach((e) => {
|
|
2387
|
-
this._detachEvent(e);
|
|
2388
|
-
}), t.forEach((e) => {
|
|
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;
|
|
2395
|
-
}
|
|
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);
|
|
2408
|
-
});
|
|
2409
|
-
});
|
|
2410
|
-
}
|
|
2411
|
-
_resolveDate(t, e = void 0) {
|
|
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)
|
|
2423
|
-
if (this.behaviors.getCustomDateFunc != null) {
|
|
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);
|
|
2426
|
-
} else
|
|
2427
|
-
throw new Error("This is custom view type, set behaviors.getCustomDateFunc func to resolve the time window(startDate and endDate) yourself");
|
|
2428
|
-
}
|
|
2429
|
-
_createHeaders() {
|
|
2430
|
-
let t = [], e = this.localeDayjs(new Date(this.startDate)), s = this.localeDayjs(new Date(this.endDate)), r = e;
|
|
2431
|
-
if (this.showAgenda)
|
|
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");
|
|
2439
|
-
continue;
|
|
2440
|
-
}
|
|
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 });
|
|
2448
|
-
}
|
|
2449
|
-
r = r.add(this.config.minuteStep, "minutes");
|
|
2450
|
-
}
|
|
2451
|
-
}
|
|
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 });
|
|
2458
|
-
}
|
|
2459
|
-
r = r.add(1, "days");
|
|
2460
|
-
}
|
|
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");
|
|
2465
|
-
}
|
|
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");
|
|
2470
|
-
}
|
|
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");
|
|
2475
|
-
}
|
|
2476
|
-
this.headers = t;
|
|
2477
|
-
}
|
|
2478
|
-
_createInitHeaderEvents(t) {
|
|
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);
|
|
2480
|
-
return {
|
|
2481
|
-
time: t.time,
|
|
2482
|
-
nonWorkingTime: t.nonWorkingTime,
|
|
2483
|
-
start: s,
|
|
2484
|
-
end: r,
|
|
2485
|
-
count: 0,
|
|
2486
|
-
addMore: 0,
|
|
2487
|
-
addMoreIndex: 0,
|
|
2488
|
-
events: [, , ,]
|
|
2489
|
-
};
|
|
2490
|
-
}
|
|
2491
|
-
_createHeaderEvent(t, e, s) {
|
|
2492
|
-
return {
|
|
2493
|
-
render: t,
|
|
2494
|
-
span: e,
|
|
2495
|
-
eventItem: s
|
|
2496
|
-
};
|
|
2497
|
-
}
|
|
2498
|
-
_getEventSlotId(t) {
|
|
2499
|
-
return this.isEventPerspective ? this._getEventGroupId(t) : t.resourceId;
|
|
2500
|
-
}
|
|
2501
|
-
_getEventGroupId(t) {
|
|
2502
|
-
return t.groupId ? t.groupId.toString() : t.id.toString();
|
|
2503
|
-
}
|
|
2504
|
-
_getEventGroupName(t) {
|
|
2505
|
-
return t.groupName ? t.groupName : t.title;
|
|
2506
|
-
}
|
|
2507
|
-
_generateEventGroups() {
|
|
2508
|
-
let t = [], e = /* @__PURE__ */ new Set();
|
|
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));
|
|
2516
|
-
}), this.eventGroups = t;
|
|
2517
|
-
}
|
|
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,
|
|
2526
|
-
hasSummary: !1,
|
|
2527
|
-
rowMaxCount: 0,
|
|
2528
|
-
rowHeight: this.config.nonAgendaSlotMinHeight !== 0 ? this.config.nonAgendaSlotMinHeight : this.config.eventItemLineHeight + 2,
|
|
2529
|
-
headerItems: v,
|
|
2530
|
-
indent: 0,
|
|
2531
|
-
hasChildren: !1,
|
|
2532
|
-
expanded: !0,
|
|
2533
|
-
render: !0
|
|
2534
|
-
}, g = h.id, w;
|
|
2535
|
-
o.has(g) ? (w = o.get(g), w.data = D) : (w = {
|
|
2536
|
-
data: D,
|
|
2537
|
-
children: []
|
|
2538
|
-
}, o.set(g, w));
|
|
2539
|
-
let T = h.parentId;
|
|
2540
|
-
if (!T || T === g)
|
|
2541
|
-
i.push(w);
|
|
2542
|
-
else {
|
|
2543
|
-
let b;
|
|
2544
|
-
o.has(T) ? b = o.get(T) : (b = {
|
|
2545
|
-
data: void 0,
|
|
2546
|
-
children: []
|
|
2547
|
-
}, o.set(T, b)), b.children.push(w);
|
|
2548
|
-
}
|
|
2549
|
-
});
|
|
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) {
|
|
2560
|
-
if (this.showAgenda)
|
|
2561
|
-
return 1;
|
|
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);
|
|
2599
|
-
}
|
|
2600
|
-
return o;
|
|
2601
|
-
}
|
|
2602
|
-
_validateResource(t) {
|
|
2603
|
-
if (Object.prototype.toString.call(t) !== "[object Array]")
|
|
2604
|
-
throw new Error("Resources should be Array object");
|
|
2605
|
-
t.forEach((e, s) => {
|
|
2606
|
-
if (e == null)
|
|
2607
|
-
throw console.error(`Resource undefined: ${s}`), new Error(`Resource undefined: ${s}`);
|
|
2608
|
-
if (e.id == null || e.name == null)
|
|
2609
|
-
throw console.error("Resource property missed", s, e), new Error(`Resource property undefined: ${s}`);
|
|
2610
|
-
});
|
|
2611
|
-
}
|
|
2612
|
-
_validateEventGroups(t) {
|
|
2613
|
-
if (Object.prototype.toString.call(t) !== "[object Array]")
|
|
2614
|
-
throw new Error("Event groups should be Array object");
|
|
2615
|
-
t.forEach((e, s) => {
|
|
2616
|
-
if (e == null)
|
|
2617
|
-
throw console.error(`Event group undefined: ${s}`), new Error(`Event group undefined: ${s}`);
|
|
2618
|
-
if (e.id == null || e.name == null)
|
|
2619
|
-
throw console.error("Event group property missed", s, e), new Error(`Event group property undefined: ${s}`);
|
|
2620
|
-
});
|
|
2621
|
-
}
|
|
2622
|
-
_validateEvents(t) {
|
|
2623
|
-
if (Object.prototype.toString.call(t) !== "[object Array]")
|
|
2624
|
-
throw new Error("Events should be Array object");
|
|
2625
|
-
t.forEach((e, s) => {
|
|
2626
|
-
if (e == null)
|
|
2627
|
-
throw console.error(`Event undefined: ${s}`), new Error(`Event undefined: ${s}`);
|
|
2628
|
-
if (e.id == null || e.resourceId == null || e.title == null || e.start == null || e.end == null)
|
|
2629
|
-
throw console.error("Event property missed", s, e), new Error(`Event property undefined: ${s}`);
|
|
2630
|
-
});
|
|
2631
|
-
}
|
|
2632
|
-
_validateMinuteStep(t) {
|
|
2633
|
-
if (60 % t !== 0)
|
|
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");
|
|
2635
|
-
}
|
|
2636
|
-
_compare(t, e) {
|
|
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;
|
|
2642
|
-
}
|
|
2643
|
-
_createRenderData() {
|
|
2644
|
-
let t = this._createInitRenderData(this.isEventPerspective, this.eventGroups, this.resources, this.headers), e = this.getCellMaxEvents();
|
|
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);
|
|
2657
|
-
}
|
|
2658
|
-
if (c === -1) {
|
|
2659
|
-
let w = 0;
|
|
2660
|
-
for (; f.events[w] !== void 0; )
|
|
2661
|
-
w++;
|
|
2662
|
-
c = w;
|
|
2663
|
-
}
|
|
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);
|
|
2668
|
-
}
|
|
2669
|
-
f.events[c] = this._createHeaderEvent(g, o, r);
|
|
2670
|
-
}
|
|
2671
|
-
});
|
|
2672
|
-
}
|
|
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);
|
|
2681
|
-
}
|
|
2682
|
-
if (this.behaviors.getSummaryFunc !== void 0) {
|
|
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);
|
|
2687
|
-
}
|
|
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);
|
|
2691
|
-
}
|
|
2692
|
-
}), this.renderData = t;
|
|
2693
|
-
}
|
|
2694
|
-
_startResizing() {
|
|
2695
|
-
this.resizing = !0;
|
|
2696
|
-
}
|
|
2697
|
-
_stopResizing() {
|
|
2698
|
-
this.resizing = !1;
|
|
2699
|
-
}
|
|
2700
|
-
_isResizing() {
|
|
2701
|
-
return this.resizing;
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
const $s = {
|
|
2705
|
-
resources: [
|
|
2706
|
-
{ id: "r0", name: "Resource0", groupOnly: !0 },
|
|
2707
|
-
{ id: "r1", name: "Resource1", parentId: "r0" },
|
|
2708
|
-
{ id: "r2", name: "Resource2", parentId: "r3" },
|
|
2709
|
-
{ id: "r3", name: "Resource3", parentId: "r1" },
|
|
2710
|
-
{ id: "r4", name: "Resource4" },
|
|
2711
|
-
{ id: "r5", name: "Resource5" },
|
|
2712
|
-
{ id: "r6", name: "Resource6" },
|
|
2713
|
-
{ id: "r7", name: "Resource7" }
|
|
2714
|
-
],
|
|
2715
|
-
events: [
|
|
2716
|
-
{ id: 1, start: "2022-12-18 09:30:00", end: "2022-12-19 23:30:00", resourceId: "r1", title: "I am finished", bgColor: "#D9D9D9", showPopover: !1 },
|
|
2717
|
-
{ id: 2, start: "2022-12-18 12:30:00", end: "2022-12-26 23:30:00", resourceId: "r2", title: "I am not resizable", resizable: !1 },
|
|
2718
|
-
{ id: 3, start: "2022-12-19 12:30:00", end: "2022-12-20 23:30:00", resourceId: "r3", title: "I am not movable", movable: !1 },
|
|
2719
|
-
{ id: 4, start: "2022-12-19 14:30:00", end: "2022-12-20 23:30:00", resourceId: "r4", title: "I am not start-resizable", startResizable: !1 },
|
|
2720
|
-
{ id: 5, start: "2022-12-19 15:30:00", end: "2022-12-20 23:30:00", resourceId: "r5", title: "I am not end-resizable", endResizable: !1 },
|
|
2721
|
-
{ id: 6, start: "2022-12-19 15:35:00", end: "2022-12-19 23:30:00", resourceId: "r6", title: "I am normal" },
|
|
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" },
|
|
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" },
|
|
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" },
|
|
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" },
|
|
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" },
|
|
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" },
|
|
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" },
|
|
2729
|
-
{ id: 14, start: "2022-12-23 18:30:00", end: "2022-12-27 23:30:00", resourceId: "r1", title: "R1 has many tasks 6" }
|
|
2730
|
-
],
|
|
2731
|
-
eventsForTaskView: [
|
|
2732
|
-
{ id: 1, start: "2022-12-18 09:30:00", end: "2022-12-18 23:30:00", resourceId: "r1", title: "I am finished", bgColor: "#D9D9D9", groupId: 1, groupName: "Task1" },
|
|
2733
|
-
{ id: 2, start: "2022-12-18 12:30:00", end: "2022-12-26 23:30:00", resourceId: "r2", title: "I am not resizable", resizable: !1, groupId: 2, groupName: "Task2" },
|
|
2734
|
-
{ id: 3, start: "2022-12-19 12:30:00", end: "2022-12-20 23:30:00", resourceId: "r3", title: "I am not movable", movable: !1, groupId: 3, groupName: "Task3" },
|
|
2735
|
-
{ id: 7, start: "2022-12-19 15:40:00", end: "2022-12-20 23:30:00", resourceId: "r7", title: "I am exceptional", bgColor: "#FA9E95", groupId: 4, groupName: "Task4" },
|
|
2736
|
-
{ id: 4, start: "2022-12-20 14:30:00", end: "2022-12-21 23:30:00", resourceId: "r4", title: "I am not start-resizable", startResizable: !1, groupId: 1, groupName: "Task1" },
|
|
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" },
|
|
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" },
|
|
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" },
|
|
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
|
-
},
|
|
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" },
|
|
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" },
|
|
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" }
|
|
2755
|
-
],
|
|
2756
|
-
eventsForCustomEventStyle: [
|
|
2757
|
-
{ id: 1, start: "2022-12-18 09:30:00", end: "2022-12-19 23:30:00", resourceId: "r1", title: "I am finished", bgColor: "#D9D9D9", type: 1 },
|
|
2758
|
-
{ id: 2, start: "2022-12-18 12:30:00", end: "2022-12-26 23:30:00", resourceId: "r2", title: "I am not resizable", resizable: !1, type: 2 },
|
|
2759
|
-
{ id: 3, start: "2022-12-19 12:30:00", end: "2022-12-20 23:30:00", resourceId: "r3", title: "I am not movable", movable: !1, type: 3 },
|
|
2760
|
-
{ id: 4, start: "2022-12-19 14:30:00", end: "2022-12-20 23:30:00", resourceId: "r4", title: "I am not start-resizable", startResizable: !1, type: 1 },
|
|
2761
|
-
{ id: 5, start: "2022-12-19 15:30:00", end: "2022-12-20 23:30:00", resourceId: "r5", title: "I am not end-resizable", endResizable: !1, type: 2 },
|
|
2762
|
-
{ id: 6, start: "2022-12-19 15:35:00", end: "2022-12-19 23:30:00", resourceId: "r6", title: "I am normal", type: 3 },
|
|
2763
|
-
{ id: 7, start: "2022-12-19 15:40:00", end: "2022-12-20 23:30:00", resourceId: "r7", title: "I am exceptional", bgColor: "#FA9E95", type: 1 },
|
|
2764
|
-
{ 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", type: 2 },
|
|
2765
|
-
{ id: 9, start: "2022-12-19 16:30:00", end: "2022-12-27 23:30:00", resourceId: "r1", title: "R1 has many tasks 1", type: 3 },
|
|
2766
|
-
{ id: 10, start: "2022-12-20 18:30:00", end: "2022-12-20 23:30:00", resourceId: "r1", title: "R1 has many tasks 2", type: 1 },
|
|
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 },
|
|
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 }
|
|
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
|
-
] });
|
|
2813
|
-
};
|
|
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 {
|
|
2825
|
-
constructor(e) {
|
|
2826
|
-
super(e);
|
|
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 });
|
|
2830
|
-
});
|
|
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);
|
|
2837
|
-
});
|
|
2838
|
-
P(this, "schedulerHeadRef", (e) => {
|
|
2839
|
-
this.schedulerHead = e;
|
|
2840
|
-
});
|
|
2841
|
-
P(this, "onSchedulerHeadMouseOver", () => {
|
|
2842
|
-
this.currentArea = 2;
|
|
2843
|
-
});
|
|
2844
|
-
P(this, "onSchedulerHeadMouseOut", () => {
|
|
2845
|
-
this.currentArea = -1;
|
|
2846
|
-
});
|
|
2847
|
-
P(this, "onSchedulerHeadScroll", (e, s) => {
|
|
2848
|
-
(this.currentArea === 2 || this.currentArea === -1) && this.schedulerContent.scrollLeft != this.schedulerHead.scrollLeft && (this.schedulerContent.scrollLeft = this.schedulerHead.scrollLeft);
|
|
2849
|
-
});
|
|
2850
|
-
P(this, "schedulerResourceRef", (e) => {
|
|
2851
|
-
this.schedulerResource = e;
|
|
2852
|
-
});
|
|
2853
|
-
P(this, "onSchedulerResourceMouseOver", () => {
|
|
2854
|
-
this.currentArea = 1;
|
|
2855
|
-
});
|
|
2856
|
-
P(this, "onSchedulerResourceMouseOut", () => {
|
|
2857
|
-
this.currentArea = -1;
|
|
2858
|
-
});
|
|
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);
|
|
2861
|
-
});
|
|
2862
|
-
P(this, "schedulerContentRef", (e) => {
|
|
2863
|
-
this.schedulerContent = e;
|
|
2864
|
-
});
|
|
2865
|
-
P(this, "schedulerContentBgTableRef", (e) => {
|
|
2866
|
-
this.schedulerContentBgTable = e;
|
|
2867
|
-
});
|
|
2868
|
-
P(this, "onSchedulerContentMouseOver", () => {
|
|
2869
|
-
this.currentArea = 0;
|
|
2870
|
-
});
|
|
2871
|
-
P(this, "onSchedulerContentMouseOut", () => {
|
|
2872
|
-
this.currentArea = -1;
|
|
2873
|
-
});
|
|
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;
|
|
2878
|
-
});
|
|
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 });
|
|
2883
|
-
});
|
|
2884
|
-
P(this, "goNext", () => {
|
|
2885
|
-
const { nextClick: e, schedulerData: s } = this.props;
|
|
2886
|
-
e(s);
|
|
2887
|
-
});
|
|
2888
|
-
P(this, "goBack", () => {
|
|
2889
|
-
const { prevClick: e, schedulerData: s } = this.props;
|
|
2890
|
-
e(s);
|
|
2891
|
-
});
|
|
2892
|
-
P(this, "onSelect", (e) => {
|
|
2893
|
-
const { onSelectDate: s, schedulerData: r } = this.props;
|
|
2894
|
-
s(r, e);
|
|
2895
|
-
});
|
|
2896
|
-
const { schedulerData: s, dndSources: r, parentRef: n } = e;
|
|
2897
|
-
let i = [];
|
|
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 = {
|
|
2901
|
-
dndContext: o,
|
|
2902
|
-
contentScrollbarHeight: 17,
|
|
2903
|
-
contentScrollbarWidth: 17,
|
|
2904
|
-
resourceScrollbarHeight: 17,
|
|
2905
|
-
resourceScrollbarWidth: 17,
|
|
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));
|
|
2921
|
-
}
|
|
2922
|
-
componentDidUpdate(e, s) {
|
|
2923
|
-
this.resolveScrollbarSize();
|
|
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);
|
|
2933
|
-
}
|
|
2934
|
-
}
|
|
2935
|
-
}
|
|
2936
|
-
render() {
|
|
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 });
|
|
2941
|
-
else {
|
|
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",
|
|
2945
|
-
margin: "0px",
|
|
2946
|
-
position: "relative",
|
|
2947
|
-
height: N,
|
|
2948
|
-
paddingBottom: W
|
|
2949
|
-
}, X = {
|
|
2950
|
-
height: N,
|
|
2951
|
-
overflowX: "auto",
|
|
2952
|
-
overflowY: "auto",
|
|
2953
|
-
width: h + H - 2,
|
|
2954
|
-
margin: `0px -${A}px 0px 0px`
|
|
2955
|
-
};
|
|
2956
|
-
l.schedulerMaxHeight > 0 && (C = {
|
|
2957
|
-
...C,
|
|
2958
|
-
maxHeight: l.schedulerMaxHeight - l.tableHeaderHeight
|
|
2959
|
-
}, X = {
|
|
2960
|
-
...X,
|
|
2961
|
-
maxHeight: l.schedulerMaxHeight - l.tableHeaderHeight
|
|
2962
|
-
});
|
|
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(
|
|
2968
|
-
"div",
|
|
2969
|
-
{
|
|
2970
|
-
style: X,
|
|
2971
|
-
ref: this.schedulerResourceRef,
|
|
2972
|
-
onMouseOver: this.onSchedulerResourceMouseOver,
|
|
2973
|
-
onMouseOut: this.onSchedulerResourceMouseOut,
|
|
2974
|
-
onScroll: this.onSchedulerResourceScroll,
|
|
2975
|
-
children: /* @__PURE__ */ d.jsx(ft, { ...this.props, contentScrollbarHeight: z })
|
|
2976
|
-
}
|
|
2977
|
-
)
|
|
2978
|
-
] }) }),
|
|
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(
|
|
2981
|
-
"div",
|
|
2982
|
-
{
|
|
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 }) }) })
|
|
2989
|
-
}
|
|
2990
|
-
) }),
|
|
2991
|
-
/* @__PURE__ */ d.jsx(
|
|
2992
|
-
"div",
|
|
2993
|
-
{
|
|
2994
|
-
style: C,
|
|
2995
|
-
ref: this.schedulerContentRef,
|
|
2996
|
-
onMouseOver: this.onSchedulerContentMouseOver,
|
|
2997
|
-
onMouseOut: this.onSchedulerContentMouseOut,
|
|
2998
|
-
onScroll: this.onSchedulerContentScroll,
|
|
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 }) }) })
|
|
3002
|
-
] })
|
|
3003
|
-
}
|
|
3004
|
-
)
|
|
3005
|
-
] }) })
|
|
3006
|
-
] });
|
|
3007
|
-
}
|
|
3008
|
-
let f = /* @__PURE__ */ d.jsx("div", {});
|
|
3009
|
-
return l.headerEnabled && (f = /* @__PURE__ */ d.jsx(
|
|
3010
|
-
Tt,
|
|
3011
|
-
{
|
|
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
|
|
3019
|
-
}
|
|
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
|
-
] });
|
|
3024
|
-
}
|
|
3025
|
-
}
|
|
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
|
|
3058
|
-
});
|
|
3059
|
-
export {
|
|
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
|
|
3072
|
-
};
|