@object-ui/plugin-calendar 0.3.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +21 -0
- package/CHANGELOG.md +15 -0
- package/dist/index.js +539 -560
- package/dist/index.umd.cjs +2 -2
- package/dist/src/CalendarView.d.ts +3 -1
- package/dist/src/CalendarView.d.ts.map +1 -1
- package/dist/src/ObjectCalendar.d.ts +15 -1
- package/dist/src/ObjectCalendar.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +10 -9
- package/src/CalendarView.test.tsx +118 -0
- package/src/CalendarView.tsx +95 -30
- package/src/ObjectCalendar.msw.test.tsx +100 -0
- package/src/ObjectCalendar.tsx +113 -149
- package/src/calendar-view-renderer.tsx +32 -76
- package/src/index.tsx +16 -3
- package/src/registration.test.tsx +25 -0
- package/test/setup.ts +32 -0
- package/vite.config.ts +6 -0
- package/vitest.config.ts +13 -0
- package/vitest.setup.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,621 +1,463 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { ComponentRegistry as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import * as z from "react";
|
|
2
|
+
import ce, { useState as A, useMemo as Z, useEffect as le, useCallback as ge } from "react";
|
|
3
|
+
import { ComponentRegistry as ee } from "@object-ui/core";
|
|
4
|
+
import { useSchemaContext as xe } from "@object-ui/react";
|
|
5
|
+
import { ChevronLeftIcon as be, ChevronRightIcon as De, CalendarIcon as ye, PlusIcon as ve } from "lucide-react";
|
|
6
|
+
import { Button as V, Popover as he, PopoverTrigger as je, cn as S, PopoverContent as we, Calendar as Ee, Select as Ne, SelectTrigger as Fe, SelectValue as Se, SelectContent as _e, SelectItem as K } from "@object-ui/components";
|
|
7
|
+
var H = { exports: {} }, L = {};
|
|
8
|
+
var oe;
|
|
9
|
+
function ke() {
|
|
10
|
+
if (oe) return L;
|
|
11
|
+
oe = 1;
|
|
12
|
+
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
13
|
+
function o(f, u, s) {
|
|
14
|
+
var m = null;
|
|
15
|
+
if (s !== void 0 && (m = "" + s), u.key !== void 0 && (m = "" + u.key), "key" in u) {
|
|
16
|
+
s = {};
|
|
17
|
+
for (var a in u)
|
|
18
|
+
a !== "key" && (s[a] = u[a]);
|
|
19
|
+
} else s = u;
|
|
20
|
+
return u = s.ref, {
|
|
21
|
+
$$typeof: e,
|
|
22
|
+
type: f,
|
|
23
|
+
key: m,
|
|
24
|
+
ref: u !== void 0 ? u : null,
|
|
25
|
+
props: s
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
|
-
return
|
|
28
|
+
return L.Fragment = n, L.jsx = o, L.jsxs = o, L;
|
|
28
29
|
}
|
|
29
|
-
var
|
|
30
|
+
var Y = {};
|
|
30
31
|
var ie;
|
|
31
|
-
function
|
|
32
|
+
function Ce() {
|
|
32
33
|
return ie || (ie = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
33
|
-
function t
|
|
34
|
-
if (
|
|
35
|
-
if (typeof
|
|
36
|
-
return
|
|
37
|
-
if (typeof
|
|
38
|
-
switch (
|
|
39
|
-
case
|
|
34
|
+
function e(t) {
|
|
35
|
+
if (t == null) return null;
|
|
36
|
+
if (typeof t == "function")
|
|
37
|
+
return t.$$typeof === E ? null : t.displayName || t.name || null;
|
|
38
|
+
if (typeof t == "string") return t;
|
|
39
|
+
switch (t) {
|
|
40
|
+
case _:
|
|
40
41
|
return "Fragment";
|
|
41
|
-
case
|
|
42
|
+
case $:
|
|
42
43
|
return "Profiler";
|
|
43
|
-
case
|
|
44
|
+
case M:
|
|
44
45
|
return "StrictMode";
|
|
45
|
-
case
|
|
46
|
+
case k:
|
|
46
47
|
return "Suspense";
|
|
47
|
-
case
|
|
48
|
+
case J:
|
|
48
49
|
return "SuspenseList";
|
|
49
|
-
case
|
|
50
|
+
case F:
|
|
50
51
|
return "Activity";
|
|
51
52
|
}
|
|
52
|
-
if (typeof
|
|
53
|
-
switch (typeof
|
|
53
|
+
if (typeof t == "object")
|
|
54
|
+
switch (typeof t.tag == "number" && console.error(
|
|
54
55
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
55
|
-
),
|
|
56
|
-
case M:
|
|
57
|
-
return "Portal";
|
|
56
|
+
), t.$$typeof) {
|
|
58
57
|
case P:
|
|
59
|
-
return
|
|
60
|
-
case
|
|
61
|
-
return
|
|
62
|
-
case
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return
|
|
67
|
-
case
|
|
68
|
-
|
|
58
|
+
return "Portal";
|
|
59
|
+
case l:
|
|
60
|
+
return t.displayName || "Context";
|
|
61
|
+
case I:
|
|
62
|
+
return (t._context.displayName || "Context") + ".Consumer";
|
|
63
|
+
case N:
|
|
64
|
+
var i = t.render;
|
|
65
|
+
return t = t.displayName, t || (t = i.displayName || i.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
|
66
|
+
case G:
|
|
67
|
+
return i = t.displayName || null, i !== null ? i : e(t.type) || "Memo";
|
|
68
|
+
case g:
|
|
69
|
+
i = t._payload, t = t._init;
|
|
69
70
|
try {
|
|
70
|
-
return t(
|
|
71
|
+
return e(t(i));
|
|
71
72
|
} catch {
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
return null;
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
return "" +
|
|
77
|
+
function n(t) {
|
|
78
|
+
return "" + t;
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function o(t) {
|
|
80
81
|
try {
|
|
81
|
-
|
|
82
|
-
var
|
|
82
|
+
n(t);
|
|
83
|
+
var i = !1;
|
|
83
84
|
} catch {
|
|
84
|
-
|
|
85
|
+
i = !0;
|
|
85
86
|
}
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
var
|
|
89
|
-
return
|
|
90
|
-
|
|
87
|
+
if (i) {
|
|
88
|
+
i = console;
|
|
89
|
+
var x = i.error, D = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
90
|
+
return x.call(
|
|
91
|
+
i,
|
|
91
92
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
92
|
-
|
|
93
|
-
),
|
|
93
|
+
D
|
|
94
|
+
), n(t);
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
-
if (
|
|
98
|
-
if (typeof
|
|
97
|
+
function f(t) {
|
|
98
|
+
if (t === _) return "<>";
|
|
99
|
+
if (typeof t == "object" && t !== null && t.$$typeof === g)
|
|
99
100
|
return "<...>";
|
|
100
101
|
try {
|
|
101
|
-
var
|
|
102
|
-
return
|
|
102
|
+
var i = e(t);
|
|
103
|
+
return i ? "<" + i + ">" : "<...>";
|
|
103
104
|
} catch {
|
|
104
105
|
return "<...>";
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
-
var
|
|
109
|
-
return
|
|
108
|
+
function u() {
|
|
109
|
+
var t = w.A;
|
|
110
|
+
return t === null ? null : t.getOwner();
|
|
110
111
|
}
|
|
111
|
-
function
|
|
112
|
+
function s() {
|
|
112
113
|
return Error("react-stack-top-frame");
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
-
if (
|
|
116
|
-
var
|
|
117
|
-
if (
|
|
115
|
+
function m(t) {
|
|
116
|
+
if (v.call(t, "key")) {
|
|
117
|
+
var i = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
118
|
+
if (i && i.isReactWarning) return !1;
|
|
118
119
|
}
|
|
119
|
-
return
|
|
120
|
+
return t.key !== void 0;
|
|
120
121
|
}
|
|
121
|
-
function a(
|
|
122
|
-
function
|
|
123
|
-
|
|
122
|
+
function a(t, i) {
|
|
123
|
+
function x() {
|
|
124
|
+
T || (T = !0, console.error(
|
|
124
125
|
"%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://react.dev/link/special-props)",
|
|
125
|
-
|
|
126
|
+
i
|
|
126
127
|
));
|
|
127
128
|
}
|
|
128
|
-
|
|
129
|
-
get:
|
|
129
|
+
x.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
130
|
+
get: x,
|
|
130
131
|
configurable: !0
|
|
131
132
|
});
|
|
132
133
|
}
|
|
133
|
-
function
|
|
134
|
-
var
|
|
135
|
-
return
|
|
134
|
+
function d() {
|
|
135
|
+
var t = e(this.type);
|
|
136
|
+
return W[t] || (W[t] = !0, console.error(
|
|
136
137
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
137
|
-
)),
|
|
138
|
+
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
-
var y =
|
|
141
|
-
return
|
|
142
|
-
$$typeof:
|
|
143
|
-
type:
|
|
144
|
-
key:
|
|
145
|
-
props:
|
|
146
|
-
_owner:
|
|
147
|
-
}, (y !== void 0 ? y : null) !== null ? Object.defineProperty(
|
|
140
|
+
function c(t, i, x, D, q, B) {
|
|
141
|
+
var y = x.ref;
|
|
142
|
+
return t = {
|
|
143
|
+
$$typeof: O,
|
|
144
|
+
type: t,
|
|
145
|
+
key: i,
|
|
146
|
+
props: x,
|
|
147
|
+
_owner: D
|
|
148
|
+
}, (y !== void 0 ? y : null) !== null ? Object.defineProperty(t, "ref", {
|
|
148
149
|
enumerable: !1,
|
|
149
|
-
get:
|
|
150
|
-
}) : Object.defineProperty(
|
|
150
|
+
get: d
|
|
151
|
+
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
151
152
|
configurable: !1,
|
|
152
153
|
enumerable: !1,
|
|
153
154
|
writable: !0,
|
|
154
155
|
value: 0
|
|
155
|
-
}), Object.defineProperty(
|
|
156
|
+
}), Object.defineProperty(t, "_debugInfo", {
|
|
156
157
|
configurable: !1,
|
|
157
158
|
enumerable: !1,
|
|
158
159
|
writable: !0,
|
|
159
160
|
value: null
|
|
160
|
-
}), Object.defineProperty(
|
|
161
|
+
}), Object.defineProperty(t, "_debugStack", {
|
|
161
162
|
configurable: !1,
|
|
162
163
|
enumerable: !1,
|
|
163
164
|
writable: !0,
|
|
164
165
|
value: q
|
|
165
|
-
}), Object.defineProperty(
|
|
166
|
+
}), Object.defineProperty(t, "_debugTask", {
|
|
166
167
|
configurable: !1,
|
|
167
168
|
enumerable: !1,
|
|
168
169
|
writable: !0,
|
|
169
170
|
value: B
|
|
170
|
-
}), Object.freeze && (Object.freeze(
|
|
171
|
+
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
171
172
|
}
|
|
172
|
-
function
|
|
173
|
-
var y =
|
|
173
|
+
function b(t, i, x, D, q, B) {
|
|
174
|
+
var y = i.children;
|
|
174
175
|
if (y !== void 0)
|
|
175
|
-
if (
|
|
176
|
-
if (
|
|
177
|
-
for (
|
|
178
|
-
|
|
176
|
+
if (D)
|
|
177
|
+
if (X(y)) {
|
|
178
|
+
for (D = 0; D < y.length; D++)
|
|
179
|
+
h(y[D]);
|
|
179
180
|
Object.freeze && Object.freeze(y);
|
|
180
181
|
} else
|
|
181
182
|
console.error(
|
|
182
183
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
183
184
|
);
|
|
184
|
-
else
|
|
185
|
-
if (
|
|
186
|
-
y = t
|
|
187
|
-
var
|
|
188
|
-
return
|
|
185
|
+
else h(y);
|
|
186
|
+
if (v.call(i, "key")) {
|
|
187
|
+
y = e(t);
|
|
188
|
+
var R = Object.keys(i).filter(function(pe) {
|
|
189
|
+
return pe !== "key";
|
|
189
190
|
});
|
|
190
|
-
|
|
191
|
+
D = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", ne[y + D] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
191
192
|
`A props object containing a "key" prop is being spread into JSX:
|
|
192
193
|
let props = %s;
|
|
193
194
|
<%s {...props} />
|
|
194
195
|
React keys must be passed directly to JSX without using spread:
|
|
195
196
|
let props = %s;
|
|
196
197
|
<%s key={someKey} {...props} />`,
|
|
197
|
-
|
|
198
|
+
D,
|
|
198
199
|
y,
|
|
199
|
-
|
|
200
|
+
R,
|
|
200
201
|
y
|
|
201
|
-
),
|
|
202
|
+
), ne[y + D] = !0);
|
|
202
203
|
}
|
|
203
|
-
if (y = null,
|
|
204
|
-
|
|
205
|
-
for (var Q in
|
|
206
|
-
Q !== "key" && (
|
|
207
|
-
} else
|
|
204
|
+
if (y = null, x !== void 0 && (o(x), y = "" + x), m(i) && (o(i.key), y = "" + i.key), "key" in i) {
|
|
205
|
+
x = {};
|
|
206
|
+
for (var Q in i)
|
|
207
|
+
Q !== "key" && (x[Q] = i[Q]);
|
|
208
|
+
} else x = i;
|
|
208
209
|
return y && a(
|
|
209
|
-
|
|
210
|
-
typeof
|
|
211
|
-
),
|
|
212
|
-
|
|
210
|
+
x,
|
|
211
|
+
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
212
|
+
), c(
|
|
213
|
+
t,
|
|
213
214
|
y,
|
|
214
|
-
|
|
215
|
-
|
|
215
|
+
x,
|
|
216
|
+
u(),
|
|
216
217
|
q,
|
|
217
218
|
B
|
|
218
219
|
);
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
221
|
+
function h(t) {
|
|
222
|
+
p(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === g && (t._payload.status === "fulfilled" ? p(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
|
|
222
223
|
}
|
|
223
|
-
function
|
|
224
|
-
return typeof
|
|
224
|
+
function p(t) {
|
|
225
|
+
return typeof t == "object" && t !== null && t.$$typeof === O;
|
|
225
226
|
}
|
|
226
|
-
var
|
|
227
|
+
var j = ce, O = /* @__PURE__ */ Symbol.for("react.transitional.element"), P = /* @__PURE__ */ Symbol.for("react.portal"), _ = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), $ = /* @__PURE__ */ Symbol.for("react.profiler"), I = /* @__PURE__ */ Symbol.for("react.consumer"), l = /* @__PURE__ */ Symbol.for("react.context"), N = /* @__PURE__ */ Symbol.for("react.forward_ref"), k = /* @__PURE__ */ Symbol.for("react.suspense"), J = /* @__PURE__ */ Symbol.for("react.suspense_list"), G = /* @__PURE__ */ Symbol.for("react.memo"), g = /* @__PURE__ */ Symbol.for("react.lazy"), F = /* @__PURE__ */ Symbol.for("react.activity"), E = /* @__PURE__ */ Symbol.for("react.client.reference"), w = j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, v = Object.prototype.hasOwnProperty, X = Array.isArray, C = console.createTask ? console.createTask : function() {
|
|
227
228
|
return null;
|
|
228
229
|
};
|
|
229
|
-
|
|
230
|
-
react_stack_bottom_frame: function(
|
|
231
|
-
return
|
|
230
|
+
j = {
|
|
231
|
+
react_stack_bottom_frame: function(t) {
|
|
232
|
+
return t();
|
|
232
233
|
}
|
|
233
234
|
};
|
|
234
|
-
var
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
)(),
|
|
238
|
-
|
|
239
|
-
var
|
|
240
|
-
return
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
235
|
+
var T, W = {}, U = j.react_stack_bottom_frame.bind(
|
|
236
|
+
j,
|
|
237
|
+
s
|
|
238
|
+
)(), ae = C(f(s)), ne = {};
|
|
239
|
+
Y.Fragment = _, Y.jsx = function(t, i, x) {
|
|
240
|
+
var D = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
241
|
+
return b(
|
|
242
|
+
t,
|
|
243
|
+
i,
|
|
244
|
+
x,
|
|
244
245
|
!1,
|
|
245
|
-
|
|
246
|
-
|
|
246
|
+
D ? Error("react-stack-top-frame") : U,
|
|
247
|
+
D ? C(f(t)) : ae
|
|
247
248
|
);
|
|
248
|
-
},
|
|
249
|
-
var
|
|
250
|
-
return
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
249
|
+
}, Y.jsxs = function(t, i, x) {
|
|
250
|
+
var D = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
251
|
+
return b(
|
|
252
|
+
t,
|
|
253
|
+
i,
|
|
254
|
+
x,
|
|
254
255
|
!0,
|
|
255
|
-
|
|
256
|
-
|
|
256
|
+
D ? Error("react-stack-top-frame") : U,
|
|
257
|
+
D ? C(f(t)) : ae
|
|
257
258
|
);
|
|
258
259
|
};
|
|
259
|
-
})()),
|
|
260
|
-
}
|
|
261
|
-
var ce;
|
|
262
|
-
function we() {
|
|
263
|
-
return ce || (ce = 1, process.env.NODE_ENV === "production" ? z.exports = ve() : z.exports = ye()), z.exports;
|
|
264
|
-
}
|
|
265
|
-
var r = we();
|
|
266
|
-
function je(t) {
|
|
267
|
-
return t.data ? t.data : t.staticData ? {
|
|
268
|
-
provider: "value",
|
|
269
|
-
items: t.staticData
|
|
270
|
-
} : t.objectName ? {
|
|
271
|
-
provider: "object",
|
|
272
|
-
object: t.objectName
|
|
273
|
-
} : null;
|
|
274
|
-
}
|
|
275
|
-
function Ne(t) {
|
|
276
|
-
if (t) {
|
|
277
|
-
if (typeof t == "string") {
|
|
278
|
-
const o = t.split(" "), n = o[0], m = o[1]?.toLowerCase() === "desc" ? "desc" : "asc";
|
|
279
|
-
return { [n]: m };
|
|
280
|
-
}
|
|
281
|
-
if (Array.isArray(t))
|
|
282
|
-
return t.reduce((o, n) => (n.field && n.order && (o[n.field] = n.order), o), {});
|
|
283
|
-
}
|
|
260
|
+
})()), Y;
|
|
284
261
|
}
|
|
285
|
-
|
|
286
|
-
|
|
262
|
+
var se;
|
|
263
|
+
function Te() {
|
|
264
|
+
return se || (se = 1, process.env.NODE_ENV === "production" ? H.exports = ke() : H.exports = Ce()), H.exports;
|
|
287
265
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
if (!o)
|
|
304
|
-
throw new Error("DataSource required for object/api providers");
|
|
305
|
-
if (i?.provider === "object") {
|
|
306
|
-
const p = i.object, x = await o.find(p, {
|
|
307
|
-
$filter: t.filter,
|
|
308
|
-
$orderby: Ne(t.sort)
|
|
309
|
-
});
|
|
310
|
-
f(x?.data || []);
|
|
311
|
-
} else i?.provider === "api" && (console.warn("API provider not yet implemented for ObjectCalendar"), f([]));
|
|
312
|
-
l(!1);
|
|
313
|
-
} catch (p) {
|
|
314
|
-
s(p), l(!1);
|
|
315
|
-
}
|
|
316
|
-
})();
|
|
317
|
-
}, [i, o, R, t.filter, t.sort]), ne(() => {
|
|
318
|
-
!R && o && (async () => {
|
|
319
|
-
try {
|
|
320
|
-
if (!o) return;
|
|
321
|
-
const p = i?.provider === "object" ? i.object : t.objectName;
|
|
322
|
-
if (!p) return;
|
|
323
|
-
const x = await o.getObjectSchema(p);
|
|
324
|
-
j(x);
|
|
325
|
-
} catch (p) {
|
|
326
|
-
console.error("Failed to fetch object schema:", p);
|
|
327
|
-
}
|
|
328
|
-
})();
|
|
329
|
-
}, [t.objectName, o, R, i]);
|
|
330
|
-
const P = oe(() => {
|
|
331
|
-
if (!E || !c.length)
|
|
332
|
-
return [];
|
|
333
|
-
const { startDateField: D, endDateField: p, titleField: x, colorField: N } = E;
|
|
334
|
-
return c.map((h, k) => {
|
|
335
|
-
const _ = h[D], A = p ? h[p] : null, U = h[x] || "Untitled", J = N ? h[N] : void 0;
|
|
336
|
-
return {
|
|
337
|
-
id: h.id || h._id || `event-${k}`,
|
|
338
|
-
title: U,
|
|
339
|
-
start: _ ? new Date(_) : /* @__PURE__ */ new Date(),
|
|
340
|
-
end: A ? new Date(A) : void 0,
|
|
341
|
-
color: J,
|
|
342
|
-
allDay: !A,
|
|
343
|
-
// If no end date, treat as all-day event
|
|
344
|
-
data: h
|
|
345
|
-
};
|
|
346
|
-
}).filter((h) => !isNaN(h.start.getTime()));
|
|
347
|
-
}, [c, E]), F = oe(() => {
|
|
348
|
-
const D = w.getFullYear(), p = w.getMonth(), x = new Date(D, p, 1), N = new Date(x);
|
|
349
|
-
N.setDate(N.getDate() - N.getDay());
|
|
350
|
-
const h = [], k = new Date(N);
|
|
351
|
-
for (let _ = 0; _ < 42; _++)
|
|
352
|
-
h.push(new Date(k)), k.setDate(k.getDate() + 1);
|
|
353
|
-
return h;
|
|
354
|
-
}, [w]), G = le((D) => P.filter((p) => {
|
|
355
|
-
const x = new Date(p.start);
|
|
356
|
-
x.setHours(0, 0, 0, 0);
|
|
357
|
-
const N = p.end ? new Date(p.end) : x;
|
|
358
|
-
N.setHours(23, 59, 59, 999);
|
|
359
|
-
const h = new Date(D);
|
|
360
|
-
return h.setHours(0, 0, 0, 0), h >= x && h <= N;
|
|
361
|
-
}), [P]), H = le((D) => {
|
|
362
|
-
C((p) => {
|
|
363
|
-
const x = new Date(p);
|
|
364
|
-
return x.setMonth(x.getMonth() + (D === "next" ? 1 : -1)), x;
|
|
365
|
-
});
|
|
366
|
-
}, []);
|
|
367
|
-
if (a)
|
|
368
|
-
return /* @__PURE__ */ r.jsx("div", { className: n, children: /* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-center h-96", children: /* @__PURE__ */ r.jsx("div", { className: "text-muted-foreground", children: "Loading calendar..." }) }) });
|
|
369
|
-
if (u)
|
|
370
|
-
return /* @__PURE__ */ r.jsx("div", { className: n, children: /* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-center h-96", children: /* @__PURE__ */ r.jsxs("div", { className: "text-destructive", children: [
|
|
371
|
-
"Error: ",
|
|
372
|
-
u.message
|
|
373
|
-
] }) }) });
|
|
374
|
-
if (!E)
|
|
375
|
-
return /* @__PURE__ */ r.jsx("div", { className: n, children: /* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-center h-96", children: /* @__PURE__ */ r.jsx("div", { className: "text-muted-foreground", children: "Calendar configuration required. Please specify startDateField and titleField." }) }) });
|
|
376
|
-
const X = [
|
|
377
|
-
"January",
|
|
378
|
-
"February",
|
|
379
|
-
"March",
|
|
380
|
-
"April",
|
|
381
|
-
"May",
|
|
382
|
-
"June",
|
|
383
|
-
"July",
|
|
384
|
-
"August",
|
|
385
|
-
"September",
|
|
386
|
-
"October",
|
|
387
|
-
"November",
|
|
388
|
-
"December"
|
|
389
|
-
], Y = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
390
|
-
return /* @__PURE__ */ r.jsx("div", { className: n, children: /* @__PURE__ */ r.jsxs("div", { className: "border rounded-lg bg-background", children: [
|
|
391
|
-
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between p-4 border-b", children: [
|
|
392
|
-
/* @__PURE__ */ r.jsxs("h2", { className: "text-xl font-semibold", children: [
|
|
393
|
-
X[w.getMonth()],
|
|
394
|
-
" ",
|
|
395
|
-
w.getFullYear()
|
|
396
|
-
] }),
|
|
397
|
-
/* @__PURE__ */ r.jsxs("div", { className: "flex gap-2", children: [
|
|
398
|
-
/* @__PURE__ */ r.jsx(
|
|
399
|
-
"button",
|
|
400
|
-
{
|
|
401
|
-
onClick: () => H("prev"),
|
|
402
|
-
className: "px-3 py-1 border rounded hover:bg-muted",
|
|
403
|
-
children: "Previous"
|
|
404
|
-
}
|
|
405
|
-
),
|
|
406
|
-
/* @__PURE__ */ r.jsx(
|
|
407
|
-
"button",
|
|
408
|
-
{
|
|
409
|
-
onClick: () => C(/* @__PURE__ */ new Date()),
|
|
410
|
-
className: "px-3 py-1 border rounded hover:bg-muted",
|
|
411
|
-
children: "Today"
|
|
412
|
-
}
|
|
413
|
-
),
|
|
414
|
-
/* @__PURE__ */ r.jsx(
|
|
415
|
-
"button",
|
|
416
|
-
{
|
|
417
|
-
onClick: () => H("next"),
|
|
418
|
-
className: "px-3 py-1 border rounded hover:bg-muted",
|
|
419
|
-
children: "Next"
|
|
420
|
-
}
|
|
421
|
-
)
|
|
422
|
-
] })
|
|
423
|
-
] }),
|
|
424
|
-
/* @__PURE__ */ r.jsxs("div", { className: "p-4", children: [
|
|
425
|
-
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 gap-px mb-px", children: Y.map((D) => /* @__PURE__ */ r.jsx(
|
|
426
|
-
"div",
|
|
427
|
-
{
|
|
428
|
-
className: "text-center text-sm font-medium text-muted-foreground py-2",
|
|
429
|
-
children: D
|
|
430
|
-
},
|
|
431
|
-
D
|
|
432
|
-
)) }),
|
|
433
|
-
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 gap-px bg-border", children: F.map((D, p) => {
|
|
434
|
-
const x = G(D), N = D.getMonth() === w.getMonth(), h = D.getDate() === (/* @__PURE__ */ new Date()).getDate() && D.getMonth() === (/* @__PURE__ */ new Date()).getMonth() && D.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear();
|
|
435
|
-
return /* @__PURE__ */ r.jsxs(
|
|
436
|
-
"div",
|
|
437
|
-
{
|
|
438
|
-
className: `min-h-24 bg-background p-2 ${N ? "" : "text-muted-foreground bg-muted/30"} ${h ? "ring-2 ring-primary" : ""}`,
|
|
439
|
-
onClick: () => g?.(D),
|
|
440
|
-
children: [
|
|
441
|
-
/* @__PURE__ */ r.jsx("div", { className: "text-sm font-medium mb-1", children: D.getDate() }),
|
|
442
|
-
/* @__PURE__ */ r.jsxs("div", { className: "space-y-1", children: [
|
|
443
|
-
x.slice(0, 3).map((k) => /* @__PURE__ */ r.jsx(
|
|
444
|
-
"div",
|
|
445
|
-
{
|
|
446
|
-
className: "text-xs px-1 py-0.5 rounded bg-primary/10 hover:bg-primary/20 cursor-pointer truncate",
|
|
447
|
-
onClick: (_) => {
|
|
448
|
-
_.stopPropagation(), m?.(k.data);
|
|
449
|
-
},
|
|
450
|
-
style: k.color ? { borderLeft: `3px solid ${k.color}` } : void 0,
|
|
451
|
-
children: k.title
|
|
452
|
-
},
|
|
453
|
-
k.id
|
|
454
|
-
)),
|
|
455
|
-
x.length > 3 && /* @__PURE__ */ r.jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
456
|
-
"+",
|
|
457
|
-
x.length - 3,
|
|
458
|
-
" more"
|
|
459
|
-
] })
|
|
460
|
-
] })
|
|
461
|
-
]
|
|
462
|
-
},
|
|
463
|
-
p
|
|
464
|
-
);
|
|
465
|
-
}) })
|
|
466
|
-
] })
|
|
467
|
-
] }) });
|
|
468
|
-
}, ee = "bg-blue-500 text-white";
|
|
469
|
-
function Se({
|
|
470
|
-
events: t = [],
|
|
471
|
-
view: o = "month",
|
|
472
|
-
currentDate: n = /* @__PURE__ */ new Date(),
|
|
473
|
-
onEventClick: m,
|
|
474
|
-
onDateClick: g,
|
|
475
|
-
onViewChange: c,
|
|
476
|
-
onNavigate: f,
|
|
477
|
-
className: a
|
|
266
|
+
var r = Te();
|
|
267
|
+
const te = "bg-blue-500 text-white";
|
|
268
|
+
function de({
|
|
269
|
+
events: e = [],
|
|
270
|
+
view: n = "month",
|
|
271
|
+
currentDate: o = /* @__PURE__ */ new Date(),
|
|
272
|
+
locale: f = "default",
|
|
273
|
+
onEventClick: u,
|
|
274
|
+
onDateClick: s,
|
|
275
|
+
onViewChange: m,
|
|
276
|
+
onNavigate: a,
|
|
277
|
+
onAddClick: d,
|
|
278
|
+
className: c
|
|
478
279
|
}) {
|
|
479
|
-
const [
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
},
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
},
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
280
|
+
const [b, h] = z.useState(n), [p, j] = z.useState(o);
|
|
281
|
+
z.useEffect(() => {
|
|
282
|
+
j(o);
|
|
283
|
+
}, [o]), z.useEffect(() => {
|
|
284
|
+
h(n);
|
|
285
|
+
}, [n]);
|
|
286
|
+
const O = () => {
|
|
287
|
+
const l = new Date(p);
|
|
288
|
+
b === "month" ? l.setMonth(l.getMonth() - 1) : b === "week" ? l.setDate(l.getDate() - 7) : l.setDate(l.getDate() - 1), j(l), a?.(l);
|
|
289
|
+
}, P = () => {
|
|
290
|
+
const l = new Date(p);
|
|
291
|
+
b === "month" ? l.setMonth(l.getMonth() + 1) : b === "week" ? l.setDate(l.getDate() + 7) : l.setDate(l.getDate() + 1), j(l), a?.(l);
|
|
292
|
+
}, _ = () => {
|
|
293
|
+
const l = /* @__PURE__ */ new Date();
|
|
294
|
+
j(l), a?.(l);
|
|
295
|
+
}, M = (l) => {
|
|
296
|
+
h(l), m?.(l);
|
|
297
|
+
}, $ = () => {
|
|
298
|
+
if (b === "month")
|
|
299
|
+
return p.toLocaleDateString(f, {
|
|
493
300
|
month: "long",
|
|
494
301
|
year: "numeric"
|
|
495
302
|
});
|
|
496
|
-
if (
|
|
497
|
-
const
|
|
498
|
-
return
|
|
303
|
+
if (b === "week") {
|
|
304
|
+
const l = ue(p), N = new Date(l);
|
|
305
|
+
return N.setDate(N.getDate() + 6), `${l.toLocaleDateString(f, {
|
|
499
306
|
month: "short",
|
|
500
307
|
day: "numeric"
|
|
501
|
-
})} - ${
|
|
308
|
+
})} - ${N.toLocaleDateString(f, {
|
|
502
309
|
month: "short",
|
|
503
310
|
day: "numeric",
|
|
504
311
|
year: "numeric"
|
|
505
312
|
})}`;
|
|
506
313
|
} else
|
|
507
|
-
return
|
|
314
|
+
return p.toLocaleDateString(f, {
|
|
508
315
|
weekday: "long",
|
|
509
316
|
month: "long",
|
|
510
317
|
day: "numeric",
|
|
511
318
|
year: "numeric"
|
|
512
319
|
});
|
|
320
|
+
}, I = (l) => {
|
|
321
|
+
l && (j(l), a?.(l));
|
|
513
322
|
};
|
|
514
|
-
return /* @__PURE__ */ r.jsxs("div", { className:
|
|
323
|
+
return /* @__PURE__ */ r.jsxs("div", { className: S("flex flex-col h-full bg-background", c), children: [
|
|
515
324
|
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-between p-4 border-b", children: [
|
|
516
|
-
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-
|
|
517
|
-
/* @__PURE__ */ r.
|
|
518
|
-
|
|
325
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
326
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center bg-muted/50 rounded-lg p-1 gap-1", children: [
|
|
327
|
+
/* @__PURE__ */ r.jsx(V, { variant: "ghost", size: "sm", onClick: _, className: "h-8", children: "Today" }),
|
|
328
|
+
/* @__PURE__ */ r.jsx("div", { className: "h-4 w-px bg-border mx-1" }),
|
|
519
329
|
/* @__PURE__ */ r.jsx(
|
|
520
|
-
|
|
330
|
+
V,
|
|
521
331
|
{
|
|
522
332
|
variant: "ghost",
|
|
523
333
|
size: "icon",
|
|
524
|
-
onClick:
|
|
334
|
+
onClick: O,
|
|
525
335
|
className: "h-8 w-8",
|
|
526
|
-
children: /* @__PURE__ */ r.jsx(
|
|
336
|
+
children: /* @__PURE__ */ r.jsx(be, { className: "h-4 w-4" })
|
|
527
337
|
}
|
|
528
338
|
),
|
|
529
339
|
/* @__PURE__ */ r.jsx(
|
|
530
|
-
|
|
340
|
+
V,
|
|
531
341
|
{
|
|
532
342
|
variant: "ghost",
|
|
533
343
|
size: "icon",
|
|
534
|
-
onClick:
|
|
344
|
+
onClick: P,
|
|
535
345
|
className: "h-8 w-8",
|
|
536
|
-
children: /* @__PURE__ */ r.jsx(
|
|
346
|
+
children: /* @__PURE__ */ r.jsx(De, { className: "h-4 w-4" })
|
|
537
347
|
}
|
|
538
348
|
)
|
|
539
349
|
] }),
|
|
540
|
-
/* @__PURE__ */ r.jsx("h2", { className: "text-lg font-semibold ml-2", children: T() })
|
|
541
|
-
] }),
|
|
542
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ r.jsxs(xe, { value: l, onValueChange: M, children: [
|
|
543
|
-
/* @__PURE__ */ r.jsx(De, { className: "w-32", children: /* @__PURE__ */ r.jsx(be, {}) }),
|
|
544
350
|
/* @__PURE__ */ r.jsxs(he, { children: [
|
|
545
|
-
/* @__PURE__ */ r.jsx(
|
|
546
|
-
|
|
547
|
-
|
|
351
|
+
/* @__PURE__ */ r.jsx(je, { asChild: !0, children: /* @__PURE__ */ r.jsxs(
|
|
352
|
+
V,
|
|
353
|
+
{
|
|
354
|
+
variant: "ghost",
|
|
355
|
+
className: S(
|
|
356
|
+
"text-xl font-semibold h-auto px-3 py-1 hover:bg-muted/50 transition-colors",
|
|
357
|
+
"flex items-center gap-2"
|
|
358
|
+
),
|
|
359
|
+
children: [
|
|
360
|
+
/* @__PURE__ */ r.jsx(ye, { className: "h-5 w-5 text-muted-foreground" }),
|
|
361
|
+
/* @__PURE__ */ r.jsx("span", { children: $() })
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
) }),
|
|
365
|
+
/* @__PURE__ */ r.jsx(we, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ r.jsx(
|
|
366
|
+
Ee,
|
|
367
|
+
{
|
|
368
|
+
mode: "single",
|
|
369
|
+
selected: p,
|
|
370
|
+
onSelect: I,
|
|
371
|
+
initialFocus: !0,
|
|
372
|
+
fromYear: 2e3,
|
|
373
|
+
toYear: 2050
|
|
374
|
+
}
|
|
375
|
+
) })
|
|
376
|
+
] })
|
|
377
|
+
] }),
|
|
378
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
379
|
+
/* @__PURE__ */ r.jsxs(Ne, { value: b, onValueChange: M, children: [
|
|
380
|
+
/* @__PURE__ */ r.jsx(Fe, { className: "w-32 bg-background", children: /* @__PURE__ */ r.jsx(Se, {}) }),
|
|
381
|
+
/* @__PURE__ */ r.jsxs(_e, { children: [
|
|
382
|
+
/* @__PURE__ */ r.jsx(K, { value: "day", children: "Day" }),
|
|
383
|
+
/* @__PURE__ */ r.jsx(K, { value: "week", children: "Week" }),
|
|
384
|
+
/* @__PURE__ */ r.jsx(K, { value: "month", children: "Month" })
|
|
385
|
+
] })
|
|
386
|
+
] }),
|
|
387
|
+
d && /* @__PURE__ */ r.jsxs(V, { onClick: d, size: "sm", className: "gap-1", children: [
|
|
388
|
+
/* @__PURE__ */ r.jsx(ve, { className: "h-4 w-4" }),
|
|
389
|
+
"New"
|
|
548
390
|
] })
|
|
549
|
-
] })
|
|
391
|
+
] })
|
|
550
392
|
] }),
|
|
551
393
|
/* @__PURE__ */ r.jsxs("div", { className: "flex-1 overflow-auto", children: [
|
|
552
|
-
|
|
553
|
-
|
|
394
|
+
b === "month" && /* @__PURE__ */ r.jsx(
|
|
395
|
+
Ae,
|
|
554
396
|
{
|
|
555
|
-
date:
|
|
556
|
-
events:
|
|
557
|
-
onEventClick:
|
|
558
|
-
onDateClick:
|
|
397
|
+
date: p,
|
|
398
|
+
events: e,
|
|
399
|
+
onEventClick: u,
|
|
400
|
+
onDateClick: s
|
|
559
401
|
}
|
|
560
402
|
),
|
|
561
|
-
|
|
562
|
-
|
|
403
|
+
b === "week" && /* @__PURE__ */ r.jsx(
|
|
404
|
+
Oe,
|
|
563
405
|
{
|
|
564
|
-
date:
|
|
565
|
-
events:
|
|
566
|
-
onEventClick:
|
|
567
|
-
onDateClick:
|
|
406
|
+
date: p,
|
|
407
|
+
events: e,
|
|
408
|
+
onEventClick: u,
|
|
409
|
+
onDateClick: s
|
|
568
410
|
}
|
|
569
411
|
),
|
|
570
|
-
|
|
571
|
-
|
|
412
|
+
b === "day" && /* @__PURE__ */ r.jsx(
|
|
413
|
+
Pe,
|
|
572
414
|
{
|
|
573
|
-
date:
|
|
574
|
-
events:
|
|
575
|
-
onEventClick:
|
|
415
|
+
date: p,
|
|
416
|
+
events: e,
|
|
417
|
+
onEventClick: u
|
|
576
418
|
}
|
|
577
419
|
)
|
|
578
420
|
] })
|
|
579
421
|
] });
|
|
580
422
|
}
|
|
581
|
-
function ue(
|
|
582
|
-
const
|
|
583
|
-
return
|
|
423
|
+
function ue(e) {
|
|
424
|
+
const n = new Date(e), o = n.getDay(), f = n.getDate() - o;
|
|
425
|
+
return n.setDate(f), n;
|
|
584
426
|
}
|
|
585
|
-
function
|
|
586
|
-
const
|
|
587
|
-
for (let
|
|
588
|
-
const
|
|
589
|
-
|
|
427
|
+
function Re(e) {
|
|
428
|
+
const n = e.getFullYear(), o = e.getMonth(), f = new Date(n, o, 1), u = new Date(n, o + 1, 0), s = f.getDay(), m = [];
|
|
429
|
+
for (let d = s - 1; d >= 0; d--) {
|
|
430
|
+
const c = new Date(f.getTime());
|
|
431
|
+
c.setDate(c.getDate() - (d + 1)), m.push(c);
|
|
590
432
|
}
|
|
591
|
-
for (let
|
|
592
|
-
|
|
593
|
-
const a = 42 -
|
|
594
|
-
for (let
|
|
595
|
-
const
|
|
596
|
-
|
|
433
|
+
for (let d = 1; d <= u.getDate(); d++)
|
|
434
|
+
m.push(new Date(n, o, d));
|
|
435
|
+
const a = 42 - m.length;
|
|
436
|
+
for (let d = 1; d <= a; d++) {
|
|
437
|
+
const c = new Date(u.getTime());
|
|
438
|
+
c.setDate(c.getDate() + d), m.push(c);
|
|
597
439
|
}
|
|
598
|
-
return
|
|
440
|
+
return m;
|
|
599
441
|
}
|
|
600
|
-
function fe(
|
|
601
|
-
return
|
|
442
|
+
function fe(e, n) {
|
|
443
|
+
return e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth() && e.getDate() === n.getDate();
|
|
602
444
|
}
|
|
603
|
-
function
|
|
604
|
-
return
|
|
605
|
-
const
|
|
606
|
-
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
const a = new Date(
|
|
445
|
+
function re(e, n) {
|
|
446
|
+
return n.filter((o) => {
|
|
447
|
+
const f = new Date(o.start), u = o.end ? new Date(o.end) : new Date(f), s = new Date(e);
|
|
448
|
+
s.setHours(0, 0, 0, 0);
|
|
449
|
+
const m = new Date(e);
|
|
450
|
+
m.setHours(23, 59, 59, 999);
|
|
451
|
+
const a = new Date(f);
|
|
610
452
|
a.setHours(0, 0, 0, 0);
|
|
611
|
-
const
|
|
612
|
-
return
|
|
453
|
+
const d = new Date(u);
|
|
454
|
+
return d.setHours(23, 59, 59, 999), s <= d && m >= a;
|
|
613
455
|
});
|
|
614
456
|
}
|
|
615
|
-
function
|
|
616
|
-
const
|
|
457
|
+
function Ae({ date: e, events: n, onEventClick: o, onDateClick: f }) {
|
|
458
|
+
const u = Re(e), s = /* @__PURE__ */ new Date(), m = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
617
459
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col h-full", children: [
|
|
618
|
-
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 border-b", children:
|
|
460
|
+
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 border-b", children: m.map((a) => /* @__PURE__ */ r.jsx(
|
|
619
461
|
"div",
|
|
620
462
|
{
|
|
621
463
|
className: "p-2 text-center text-sm font-medium text-muted-foreground border-r last:border-r-0",
|
|
@@ -623,76 +465,76 @@ function _e({ date: t, events: o, onEventClick: n, onDateClick: m }) {
|
|
|
623
465
|
},
|
|
624
466
|
a
|
|
625
467
|
)) }),
|
|
626
|
-
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 flex-1 auto-rows-fr", children:
|
|
627
|
-
const
|
|
468
|
+
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 flex-1 auto-rows-fr", children: u.map((a, d) => {
|
|
469
|
+
const c = re(a, n), b = a.getMonth() === e.getMonth(), h = fe(a, s);
|
|
628
470
|
return /* @__PURE__ */ r.jsxs(
|
|
629
471
|
"div",
|
|
630
472
|
{
|
|
631
|
-
className:
|
|
473
|
+
className: S(
|
|
632
474
|
"border-b border-r last:border-r-0 p-2 min-h-[100px] cursor-pointer hover:bg-accent/50",
|
|
633
|
-
!
|
|
475
|
+
!b && "bg-muted/30 text-muted-foreground"
|
|
634
476
|
),
|
|
635
|
-
onClick: () =>
|
|
477
|
+
onClick: () => f?.(a),
|
|
636
478
|
children: [
|
|
637
479
|
/* @__PURE__ */ r.jsx(
|
|
638
480
|
"div",
|
|
639
481
|
{
|
|
640
|
-
className:
|
|
482
|
+
className: S(
|
|
641
483
|
"text-sm font-medium mb-1",
|
|
642
|
-
|
|
484
|
+
h && "inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground h-6 w-6"
|
|
643
485
|
),
|
|
644
486
|
children: a.getDate()
|
|
645
487
|
}
|
|
646
488
|
),
|
|
647
489
|
/* @__PURE__ */ r.jsxs("div", { className: "space-y-1", children: [
|
|
648
|
-
|
|
490
|
+
c.slice(0, 3).map((p) => /* @__PURE__ */ r.jsx(
|
|
649
491
|
"div",
|
|
650
492
|
{
|
|
651
|
-
className:
|
|
493
|
+
className: S(
|
|
652
494
|
"text-xs px-2 py-1 rounded truncate cursor-pointer hover:opacity-80",
|
|
653
|
-
|
|
495
|
+
p.color || te
|
|
654
496
|
),
|
|
655
|
-
style:
|
|
656
|
-
onClick: (
|
|
657
|
-
|
|
497
|
+
style: p.color && p.color.startsWith("#") ? { backgroundColor: p.color } : void 0,
|
|
498
|
+
onClick: (j) => {
|
|
499
|
+
j.stopPropagation(), o?.(p);
|
|
658
500
|
},
|
|
659
|
-
children:
|
|
501
|
+
children: p.title
|
|
660
502
|
},
|
|
661
|
-
|
|
503
|
+
p.id
|
|
662
504
|
)),
|
|
663
|
-
|
|
505
|
+
c.length > 3 && /* @__PURE__ */ r.jsxs("div", { className: "text-xs text-muted-foreground px-2", children: [
|
|
664
506
|
"+",
|
|
665
|
-
|
|
507
|
+
c.length - 3,
|
|
666
508
|
" more"
|
|
667
509
|
] })
|
|
668
510
|
] })
|
|
669
511
|
]
|
|
670
512
|
},
|
|
671
|
-
|
|
513
|
+
d
|
|
672
514
|
);
|
|
673
515
|
}) })
|
|
674
516
|
] });
|
|
675
517
|
}
|
|
676
|
-
function
|
|
677
|
-
const
|
|
678
|
-
const
|
|
679
|
-
return
|
|
680
|
-
}),
|
|
518
|
+
function Oe({ date: e, events: n, onEventClick: o, onDateClick: f }) {
|
|
519
|
+
const u = ue(e), s = Array.from({ length: 7 }, (a, d) => {
|
|
520
|
+
const c = new Date(u);
|
|
521
|
+
return c.setDate(c.getDate() + d), c;
|
|
522
|
+
}), m = /* @__PURE__ */ new Date();
|
|
681
523
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col h-full", children: [
|
|
682
|
-
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 border-b", children:
|
|
683
|
-
const
|
|
524
|
+
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 border-b", children: s.map((a) => {
|
|
525
|
+
const d = fe(a, m);
|
|
684
526
|
return /* @__PURE__ */ r.jsxs(
|
|
685
527
|
"div",
|
|
686
528
|
{
|
|
687
529
|
className: "p-3 text-center border-r last:border-r-0",
|
|
688
530
|
children: [
|
|
689
|
-
/* @__PURE__ */ r.jsx("div", { className: "text-sm font-medium text-muted-foreground", children: a.toLocaleDateString(
|
|
531
|
+
/* @__PURE__ */ r.jsx("div", { className: "text-sm font-medium text-muted-foreground", children: a.toLocaleDateString(locale, { weekday: "short" }) }),
|
|
690
532
|
/* @__PURE__ */ r.jsx(
|
|
691
533
|
"div",
|
|
692
534
|
{
|
|
693
|
-
className:
|
|
535
|
+
className: S(
|
|
694
536
|
"text-lg font-semibold mt-1",
|
|
695
|
-
|
|
537
|
+
d && "inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground h-8 w-8"
|
|
696
538
|
),
|
|
697
539
|
children: a.getDate()
|
|
698
540
|
}
|
|
@@ -702,33 +544,33 @@ function Te({ date: t, events: o, onEventClick: n, onDateClick: m }) {
|
|
|
702
544
|
a.toISOString()
|
|
703
545
|
);
|
|
704
546
|
}) }),
|
|
705
|
-
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 flex-1", children:
|
|
706
|
-
const
|
|
547
|
+
/* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-7 flex-1", children: s.map((a) => {
|
|
548
|
+
const d = re(a, n);
|
|
707
549
|
return /* @__PURE__ */ r.jsx(
|
|
708
550
|
"div",
|
|
709
551
|
{
|
|
710
552
|
className: "border-r last:border-r-0 p-2 min-h-[400px] cursor-pointer hover:bg-accent/50",
|
|
711
|
-
onClick: () =>
|
|
712
|
-
children: /* @__PURE__ */ r.jsx("div", { className: "space-y-2", children:
|
|
553
|
+
onClick: () => f?.(a),
|
|
554
|
+
children: /* @__PURE__ */ r.jsx("div", { className: "space-y-2", children: d.map((c) => /* @__PURE__ */ r.jsxs(
|
|
713
555
|
"div",
|
|
714
556
|
{
|
|
715
|
-
className:
|
|
557
|
+
className: S(
|
|
716
558
|
"text-sm px-3 py-2 rounded cursor-pointer hover:opacity-80",
|
|
717
|
-
|
|
559
|
+
c.color || te
|
|
718
560
|
),
|
|
719
|
-
style:
|
|
720
|
-
onClick: (
|
|
721
|
-
|
|
561
|
+
style: c.color && c.color.startsWith("#") ? { backgroundColor: c.color } : void 0,
|
|
562
|
+
onClick: (b) => {
|
|
563
|
+
b.stopPropagation(), o?.(c);
|
|
722
564
|
},
|
|
723
565
|
children: [
|
|
724
|
-
/* @__PURE__ */ r.jsx("div", { className: "font-medium", children:
|
|
725
|
-
!
|
|
566
|
+
/* @__PURE__ */ r.jsx("div", { className: "font-medium", children: c.title }),
|
|
567
|
+
!c.allDay && /* @__PURE__ */ r.jsx("div", { className: "text-xs opacity-90 mt-1", children: c.start.toLocaleTimeString("default", {
|
|
726
568
|
hour: "numeric",
|
|
727
569
|
minute: "2-digit"
|
|
728
570
|
}) })
|
|
729
571
|
]
|
|
730
572
|
},
|
|
731
|
-
|
|
573
|
+
c.id
|
|
732
574
|
)) })
|
|
733
575
|
},
|
|
734
576
|
a.toISOString()
|
|
@@ -736,21 +578,21 @@ function Te({ date: t, events: o, onEventClick: n, onDateClick: m }) {
|
|
|
736
578
|
}) })
|
|
737
579
|
] });
|
|
738
580
|
}
|
|
739
|
-
function
|
|
740
|
-
const
|
|
741
|
-
return /* @__PURE__ */ r.jsx("div", { className: "flex flex-col h-full", children: /* @__PURE__ */ r.jsx("div", { className: "flex-1 overflow-auto", children:
|
|
742
|
-
const
|
|
581
|
+
function Pe({ date: e, events: n, onEventClick: o }) {
|
|
582
|
+
const f = re(e, n), u = Array.from({ length: 24 }, (s, m) => m);
|
|
583
|
+
return /* @__PURE__ */ r.jsx("div", { className: "flex flex-col h-full", children: /* @__PURE__ */ r.jsx("div", { className: "flex-1 overflow-auto", children: u.map((s) => {
|
|
584
|
+
const m = f.filter((a) => a.allDay ? s === 0 : a.start.getHours() === s);
|
|
743
585
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex border-b min-h-[60px]", children: [
|
|
744
|
-
/* @__PURE__ */ r.jsx("div", { className: "w-20 p-2 text-sm text-muted-foreground border-r", children:
|
|
745
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex-1 p-2 space-y-2", children:
|
|
586
|
+
/* @__PURE__ */ r.jsx("div", { className: "w-20 p-2 text-sm text-muted-foreground border-r", children: s === 0 ? "12 AM" : s < 12 ? `${s} AM` : s === 12 ? "12 PM" : `${s - 12} PM` }),
|
|
587
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex-1 p-2 space-y-2", children: m.map((a) => /* @__PURE__ */ r.jsxs(
|
|
746
588
|
"div",
|
|
747
589
|
{
|
|
748
|
-
className:
|
|
590
|
+
className: S(
|
|
749
591
|
"px-3 py-2 rounded cursor-pointer hover:opacity-80",
|
|
750
|
-
a.color ||
|
|
592
|
+
a.color || te
|
|
751
593
|
),
|
|
752
594
|
style: a.color && a.color.startsWith("#") ? { backgroundColor: a.color } : void 0,
|
|
753
|
-
onClick: () =>
|
|
595
|
+
onClick: () => o?.(a),
|
|
754
596
|
children: [
|
|
755
597
|
/* @__PURE__ */ r.jsx("div", { className: "font-medium", children: a.title }),
|
|
756
598
|
!a.allDay && /* @__PURE__ */ r.jsxs("div", { className: "text-xs opacity-90 mt-1", children: [
|
|
@@ -767,61 +609,184 @@ function Fe({ date: t, events: o, onEventClick: n }) {
|
|
|
767
609
|
},
|
|
768
610
|
a.id
|
|
769
611
|
)) })
|
|
770
|
-
] },
|
|
612
|
+
] }, s);
|
|
771
613
|
}) }) });
|
|
772
614
|
}
|
|
773
|
-
|
|
615
|
+
function Me(e) {
|
|
616
|
+
return "data" in e && e.data ? e.data : "staticData" in e && e.staticData ? {
|
|
617
|
+
provider: "value",
|
|
618
|
+
items: e.staticData
|
|
619
|
+
} : e.objectName ? {
|
|
620
|
+
provider: "object",
|
|
621
|
+
object: e.objectName
|
|
622
|
+
} : null;
|
|
623
|
+
}
|
|
624
|
+
function Ie(e) {
|
|
625
|
+
if (e) {
|
|
626
|
+
if (typeof e == "string") {
|
|
627
|
+
const n = e.split(" "), o = n[0], f = n[1]?.toLowerCase() === "desc" ? "desc" : "asc";
|
|
628
|
+
return { [o]: f };
|
|
629
|
+
}
|
|
630
|
+
if (Array.isArray(e))
|
|
631
|
+
return e.reduce((n, o) => (o.field && o.order && (n[o.field] = o.order), n), {});
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
function Ve(e) {
|
|
635
|
+
return "filter" in e && e.filter && typeof e.filter == "object" && "calendar" in e.filter ? e.filter.calendar : e.calendar ? e.calendar : e.startDateField || e.dateField ? {
|
|
636
|
+
startDateField: e.startDateField || e.dateField,
|
|
637
|
+
endDateField: e.endDateField || e.endField,
|
|
638
|
+
titleField: e.titleField || "name",
|
|
639
|
+
colorField: e.colorField,
|
|
640
|
+
allDayField: e.allDayField
|
|
641
|
+
} : null;
|
|
642
|
+
}
|
|
643
|
+
const Le = ({
|
|
644
|
+
schema: e,
|
|
645
|
+
dataSource: n,
|
|
646
|
+
className: o,
|
|
647
|
+
onEventClick: f,
|
|
648
|
+
onDateClick: u,
|
|
649
|
+
onNavigate: s,
|
|
650
|
+
onViewChange: m,
|
|
651
|
+
...a
|
|
652
|
+
}) => {
|
|
653
|
+
const [d, c] = A([]), [b, h] = A(!0), [p, j] = A(null), [O, P] = A(null), [_, M] = A(/* @__PURE__ */ new Date()), [$, I] = A("month"), l = Z(() => Me(e), [
|
|
654
|
+
e.data,
|
|
655
|
+
e.staticData,
|
|
656
|
+
e.objectName
|
|
657
|
+
]), N = Z(() => Ve(e), [
|
|
658
|
+
e.filter,
|
|
659
|
+
e.calendar,
|
|
660
|
+
e.dateField,
|
|
661
|
+
e.endField,
|
|
662
|
+
e.titleField,
|
|
663
|
+
e.colorField
|
|
664
|
+
]), k = l?.provider === "value";
|
|
665
|
+
le(() => {
|
|
666
|
+
let g = !0;
|
|
667
|
+
return (async () => {
|
|
668
|
+
try {
|
|
669
|
+
if (!g) return;
|
|
670
|
+
if (h(!0), k && l?.provider === "value") {
|
|
671
|
+
g && (c(l.items), h(!1));
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
if (e.data || a.data) {
|
|
675
|
+
const E = e.data || a.data;
|
|
676
|
+
if (Array.isArray(E)) {
|
|
677
|
+
c(E), h(!1);
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
if (!n)
|
|
682
|
+
throw new Error("DataSource required for object/api providers");
|
|
683
|
+
if (l?.provider === "object") {
|
|
684
|
+
const E = l.object, w = await n.find(E, {
|
|
685
|
+
$filter: e.filter,
|
|
686
|
+
$orderby: Ie(e.sort)
|
|
687
|
+
});
|
|
688
|
+
let v = [];
|
|
689
|
+
Array.isArray(w) ? v = w : w && typeof w == "object" && (Array.isArray(w.data) ? v = w.data : Array.isArray(w.value) && (v = w.value)), g && c(v);
|
|
690
|
+
} else l?.provider === "api" && (console.warn("API provider not yet implemented for ObjectCalendar"), g && c([]));
|
|
691
|
+
g && h(!1);
|
|
692
|
+
} catch (E) {
|
|
693
|
+
console.error("[ObjectCalendar] Error fetching data:", E), g && (j(E), h(!1));
|
|
694
|
+
}
|
|
695
|
+
})(), () => {
|
|
696
|
+
g = !1;
|
|
697
|
+
};
|
|
698
|
+
}, [l, n, k, e.filter, e.sort]), le(() => {
|
|
699
|
+
!k && n && (async () => {
|
|
700
|
+
try {
|
|
701
|
+
if (!n) return;
|
|
702
|
+
const F = l?.provider === "object" ? l.object : e.objectName;
|
|
703
|
+
if (!F) return;
|
|
704
|
+
const E = await n.getObjectSchema(F);
|
|
705
|
+
P(E);
|
|
706
|
+
} catch (F) {
|
|
707
|
+
console.error("Failed to fetch object schema:", F);
|
|
708
|
+
}
|
|
709
|
+
})();
|
|
710
|
+
}, [e.objectName, n, k, l]);
|
|
711
|
+
const J = Z(() => {
|
|
712
|
+
if (!N || !d.length)
|
|
713
|
+
return [];
|
|
714
|
+
const { startDateField: g, endDateField: F, titleField: E, colorField: w } = N;
|
|
715
|
+
return d.map((v, X) => {
|
|
716
|
+
const C = v[g], T = F ? v[F] : null, W = v[E] || "Untitled", U = w ? v[w] : void 0;
|
|
717
|
+
return {
|
|
718
|
+
id: v.id || v._id || `event-${X}`,
|
|
719
|
+
title: W,
|
|
720
|
+
start: C ? new Date(C) : /* @__PURE__ */ new Date(),
|
|
721
|
+
end: T ? new Date(T) : void 0,
|
|
722
|
+
color: U,
|
|
723
|
+
allDay: !T,
|
|
724
|
+
// If no end date, treat as all-day event
|
|
725
|
+
data: v
|
|
726
|
+
};
|
|
727
|
+
}).filter((v) => !isNaN(v.start.getTime()));
|
|
728
|
+
}, [d, N]), G = ge(() => {
|
|
729
|
+
u?.(/* @__PURE__ */ new Date());
|
|
730
|
+
}, [u]);
|
|
731
|
+
return b ? /* @__PURE__ */ r.jsx("div", { className: o, children: /* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-center h-96", children: /* @__PURE__ */ r.jsx("div", { className: "text-muted-foreground", children: "Loading calendar..." }) }) }) : p ? /* @__PURE__ */ r.jsx("div", { className: o, children: /* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-center h-96", children: /* @__PURE__ */ r.jsxs("div", { className: "text-destructive", children: [
|
|
732
|
+
"Error: ",
|
|
733
|
+
p.message
|
|
734
|
+
] }) }) }) : N ? /* @__PURE__ */ r.jsx("div", { className: o, children: /* @__PURE__ */ r.jsx("div", { className: "border rounded-lg bg-background h-[calc(100vh-200px)] min-h-[600px]", children: /* @__PURE__ */ r.jsx(
|
|
735
|
+
de,
|
|
736
|
+
{
|
|
737
|
+
events: J,
|
|
738
|
+
currentDate: _,
|
|
739
|
+
view: e.defaultView || "month",
|
|
740
|
+
onEventClick: (g) => f?.(g.data),
|
|
741
|
+
onDateClick: u,
|
|
742
|
+
onNavigate: (g) => {
|
|
743
|
+
M(g), s?.(g);
|
|
744
|
+
},
|
|
745
|
+
onViewChange: (g) => {
|
|
746
|
+
I(g), m?.(g);
|
|
747
|
+
},
|
|
748
|
+
onAddClick: G
|
|
749
|
+
}
|
|
750
|
+
) }) }) : /* @__PURE__ */ r.jsx("div", { className: o, children: /* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-center h-96", children: /* @__PURE__ */ r.jsx("div", { className: "text-muted-foreground", children: "Calendar configuration required. Please specify startDateField and titleField." }) }) });
|
|
751
|
+
};
|
|
752
|
+
ee.register(
|
|
774
753
|
"calendar-view",
|
|
775
|
-
({ schema:
|
|
776
|
-
const
|
|
777
|
-
const
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
data: s
|
|
754
|
+
({ schema: e, className: n, onAction: o, ...f }) => {
|
|
755
|
+
const u = ce.useMemo(() => !e.data || !Array.isArray(e.data) ? [] : e.data.map((a, d) => {
|
|
756
|
+
const c = e.titleField || "title", b = e.startDateField || "start", h = e.endDateField || "end", p = e.colorField || "color", j = e.allDayField || "allDay";
|
|
757
|
+
return {
|
|
758
|
+
id: a._id || a.id || d,
|
|
759
|
+
title: a[c] || "Untitled Event",
|
|
760
|
+
start: new Date(a[b]),
|
|
761
|
+
end: a[h] ? new Date(a[h]) : void 0,
|
|
762
|
+
allDay: a[j],
|
|
763
|
+
color: a[p],
|
|
764
|
+
data: a
|
|
787
765
|
};
|
|
788
|
-
}), [
|
|
789
|
-
|
|
790
|
-
type: "
|
|
791
|
-
payload:
|
|
792
|
-
})
|
|
793
|
-
},
|
|
794
|
-
|
|
795
|
-
type: "
|
|
796
|
-
payload: {
|
|
797
|
-
})
|
|
798
|
-
}
|
|
799
|
-
n && n({
|
|
800
|
-
type: "view_change",
|
|
801
|
-
payload: { view: s }
|
|
802
|
-
}), t.onViewChange && t.onViewChange(s);
|
|
803
|
-
}, [n, t]), l = L.useCallback((s) => {
|
|
804
|
-
n && n({
|
|
805
|
-
type: "navigate",
|
|
806
|
-
payload: { date: s }
|
|
807
|
-
}), t.onNavigate && t.onNavigate(s);
|
|
808
|
-
}, [n, t]), u = t.view && ["month", "week", "day"].includes(t.view) ? t.view : "month";
|
|
766
|
+
}), [e.data, e.titleField, e.startDateField, e.endDateField, e.colorField, e.allDayField]), s = (a) => {
|
|
767
|
+
e.onEventClick && o?.({
|
|
768
|
+
type: "event-click",
|
|
769
|
+
payload: a
|
|
770
|
+
});
|
|
771
|
+
}, m = () => {
|
|
772
|
+
o?.({
|
|
773
|
+
type: "create",
|
|
774
|
+
payload: {}
|
|
775
|
+
});
|
|
776
|
+
};
|
|
809
777
|
return /* @__PURE__ */ r.jsx(
|
|
810
|
-
|
|
778
|
+
de,
|
|
811
779
|
{
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
onViewChange: a,
|
|
818
|
-
onNavigate: l,
|
|
819
|
-
className: o,
|
|
820
|
-
...m
|
|
780
|
+
className: n,
|
|
781
|
+
events: u,
|
|
782
|
+
onEventClick: s,
|
|
783
|
+
onAddClick: m,
|
|
784
|
+
...f
|
|
821
785
|
}
|
|
822
786
|
);
|
|
823
787
|
},
|
|
824
788
|
{
|
|
789
|
+
namespace: "plugin-calendar",
|
|
825
790
|
label: "Calendar View",
|
|
826
791
|
inputs: [
|
|
827
792
|
{
|
|
@@ -931,16 +896,30 @@ de.register(
|
|
|
931
896
|
}
|
|
932
897
|
}
|
|
933
898
|
);
|
|
934
|
-
const
|
|
935
|
-
|
|
899
|
+
const me = ({ schema: e }) => {
|
|
900
|
+
const { dataSource: n } = xe();
|
|
901
|
+
return /* @__PURE__ */ r.jsx(Le, { schema: e, dataSource: n });
|
|
902
|
+
};
|
|
903
|
+
ee.register("object-calendar", me, {
|
|
904
|
+
namespace: "plugin-calendar",
|
|
936
905
|
label: "Object Calendar",
|
|
937
|
-
category: "
|
|
906
|
+
category: "view",
|
|
907
|
+
inputs: [
|
|
908
|
+
{ name: "objectName", type: "string", label: "Object Name", required: !0 },
|
|
909
|
+
{ name: "calendar", type: "object", label: "Calendar Config", description: "startDateField, endDateField, titleField, colorField" }
|
|
910
|
+
]
|
|
911
|
+
});
|
|
912
|
+
ee.register("calendar", me, {
|
|
913
|
+
namespace: "view",
|
|
914
|
+
label: "Calendar View",
|
|
915
|
+
category: "view",
|
|
938
916
|
inputs: [
|
|
939
917
|
{ name: "objectName", type: "string", label: "Object Name", required: !0 },
|
|
940
918
|
{ name: "calendar", type: "object", label: "Calendar Config", description: "startDateField, endDateField, titleField, colorField" }
|
|
941
919
|
]
|
|
942
920
|
});
|
|
943
921
|
export {
|
|
944
|
-
|
|
945
|
-
|
|
922
|
+
de as CalendarView,
|
|
923
|
+
Le as ObjectCalendar,
|
|
924
|
+
me as ObjectCalendarRenderer
|
|
946
925
|
};
|