@talentlytica/prodigy 1.1.1 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/carousel.d.ts +1 -0
- package/dist/carousel.js +2 -0
- package/dist/charts.d.ts +2 -0
- package/dist/charts.js +2 -0
- package/dist/components/Select/Select.d.ts +3 -0
- package/dist/components/index.d.ts +0 -8
- package/dist/data-table.d.ts +1 -0
- package/dist/data-table.js +63 -0
- package/dist/dates.d.ts +1 -0
- package/dist/dates.js +9 -0
- package/dist/dropzone.d.ts +1 -0
- package/dist/dropzone.js +2 -0
- package/dist/index.js +223 -334
- package/dist/notifications.d.ts +1 -0
- package/dist/notifications.js +2 -0
- package/dist/primitives-BiEY8qsh.js +2 -0
- package/dist/rte.d.ts +1 -0
- package/dist/rte.js +43 -0
- package/dist/themes/kelola.d.ts +8 -8
- package/package.json +41 -1
package/dist/index.js
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { useEditor as Je } from "@tiptap/react";
|
|
8
|
-
import Ye from "@tiptap/starter-kit";
|
|
9
|
-
import { Link as Xe, RichTextEditor as q } from "@mantine/tiptap";
|
|
10
|
-
import { Notifications as Ze, notifications as Qe } from "@mantine/notifications";
|
|
11
|
-
import { flexRender as J, getCoreRowModel as $e, getFilteredRowModel as et, getPaginationRowModel as tt, getSortedRowModel as nt, useReactTable as rt } from "@tanstack/react-table";
|
|
12
|
-
import { Carousel as it } from "@mantine/carousel";
|
|
13
|
-
import { BarChart as at, DonutChart as ot } from "@mantine/charts";
|
|
14
|
-
var Y = ze({
|
|
1
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./primitives-BiEY8qsh.js";
|
|
2
|
+
import { ActionIcon as h, ActionIcon as g, Alert as _, Alert as v, Anchor as y, Anchor as b, AppShell as x, Avatar as S, Avatar as C, Badge as w, Badge as T, Box as E, Breadcrumbs as D, Burger as O, Button as ee, Button as te, Card as ne, Card as re, Checkbox as ie, CloseButton as ae, ColorSwatch as oe, Divider as se, EmptyState as ce, FileButton as le, FileInput as ue, Group as k, Indicator as de, Input as fe, Loader as pe, LoadingOverlay as me, Menu as he, Menu as ge, Modal as _e, Modal as ve, MultiSelect as ye, NativeSelect as be, NavLink as A, Notification as j, NumberInput as M, Paper as N, PasswordInput as xe, Pill as Se, Popover as Ce, Popover as P, Progress as we, Radio as Te, RingProgress as Ee, SegmentedControl as De, SegmentedControl as Oe, Select as ke, Select as F, Skeleton as Ae, Stepper as je, Switch as Me, Table as Ne, Tabs as Pe, TagsInput as Fe, Text as I, Textarea as Ie, ThemeIcon as Le, Tooltip as Re, Tooltip as ze, UnstyledButton as L, VisuallyHidden as Be, createTheme as Ve } from "@mantine/core";
|
|
3
|
+
import { useState as R } from "react";
|
|
4
|
+
import { IconCalendar as z, IconChevronLeft as B, IconChevronRight as V, IconX as H } from "@tabler/icons-react";
|
|
5
|
+
import { jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
6
|
+
var G = Ve({
|
|
15
7
|
primaryColor: "primary",
|
|
16
8
|
primaryShade: 5,
|
|
17
9
|
colors: {
|
|
@@ -157,7 +149,7 @@ var Y = ze({
|
|
|
157
149
|
cursorType: "pointer",
|
|
158
150
|
other: { appBackground: "#F7F7F7" },
|
|
159
151
|
components: {
|
|
160
|
-
Button:
|
|
152
|
+
Button: te.extend({
|
|
161
153
|
defaultProps: {
|
|
162
154
|
variant: "filled",
|
|
163
155
|
size: "sm",
|
|
@@ -166,8 +158,8 @@ var Y = ze({
|
|
|
166
158
|
styles: { label: { fontWeight: 700 } },
|
|
167
159
|
vars: (e, t) => t.variant === "subtle" ? { root: { "--button-color": `var(--mantine-color-${t.color || e.primaryColor}-5)` } } : { root: {} }
|
|
168
160
|
}),
|
|
169
|
-
Input:
|
|
170
|
-
Badge:
|
|
161
|
+
Input: fe.extend({ defaultProps: { radius: "xl" } }),
|
|
162
|
+
Badge: T.extend({
|
|
171
163
|
defaultProps: {
|
|
172
164
|
variant: "light",
|
|
173
165
|
radius: "xl"
|
|
@@ -175,45 +167,37 @@ var Y = ze({
|
|
|
175
167
|
vars: (e, t) => t.variant === "light" ? { root: { "--badge-color": `var(--mantine-color-${t.color || e.primaryColor}-5)` } } : { root: {} },
|
|
176
168
|
styles: (e, t) => t.variant === "dot" ? { label: { color: `var(--mantine-color-${t.color || e.primaryColor}-5)` } } : {}
|
|
177
169
|
}),
|
|
178
|
-
Avatar:
|
|
179
|
-
Alert:
|
|
180
|
-
Anchor:
|
|
181
|
-
Card:
|
|
170
|
+
Avatar: C.extend({ defaultProps: { radius: 9999 } }),
|
|
171
|
+
Alert: v.extend({ defaultProps: { variant: "light" } }),
|
|
172
|
+
Anchor: b.extend({ defaultProps: { underline: "hover" } }),
|
|
173
|
+
Card: re.extend({ defaultProps: {
|
|
182
174
|
withBorder: !0,
|
|
183
175
|
shadow: "md",
|
|
184
176
|
radius: "md",
|
|
185
177
|
padding: "lg"
|
|
186
178
|
} }),
|
|
187
|
-
Tooltip:
|
|
188
|
-
ActionIcon:
|
|
179
|
+
Tooltip: ze.extend({ defaultProps: { withArrow: !0 } }),
|
|
180
|
+
ActionIcon: g.extend({ defaultProps: {
|
|
189
181
|
variant: "subtle",
|
|
190
182
|
color: "gray"
|
|
191
183
|
} }),
|
|
192
|
-
Menu:
|
|
184
|
+
Menu: ge.extend({ defaultProps: {
|
|
193
185
|
shadow: "md",
|
|
194
186
|
radius: "md"
|
|
195
187
|
} }),
|
|
196
|
-
Modal:
|
|
188
|
+
Modal: ve.extend({ defaultProps: {
|
|
197
189
|
centered: !0,
|
|
198
190
|
radius: "md"
|
|
199
191
|
} }),
|
|
200
|
-
Table:
|
|
192
|
+
Table: Ne.extend({ defaultProps: {
|
|
201
193
|
highlightOnHover: !0,
|
|
202
194
|
verticalSpacing: "sm",
|
|
203
195
|
horizontalSpacing: "md"
|
|
204
196
|
} }),
|
|
205
|
-
SegmentedControl:
|
|
197
|
+
SegmentedControl: Oe.extend({ defaultProps: { radius: "xl" } }),
|
|
198
|
+
Select: F.extend({ defaultProps: { checkIconPosition: "right" } })
|
|
206
199
|
}
|
|
207
|
-
})
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region src/components/DatePickerInput/DatePickerInput.tsx
|
|
210
|
-
function st(e) {
|
|
211
|
-
let { withTime: t, ...n } = e;
|
|
212
|
-
return B(t ? Ve : Be, { ...n });
|
|
213
|
-
}
|
|
214
|
-
//#endregion
|
|
215
|
-
//#region src/components/DateTimePicker/DateTimePicker.tsx
|
|
216
|
-
var ct = [
|
|
200
|
+
}), He = [
|
|
217
201
|
"January",
|
|
218
202
|
"February",
|
|
219
203
|
"March",
|
|
@@ -226,7 +210,7 @@ var ct = [
|
|
|
226
210
|
"October",
|
|
227
211
|
"November",
|
|
228
212
|
"December"
|
|
229
|
-
],
|
|
213
|
+
], Ue = [
|
|
230
214
|
"Mo",
|
|
231
215
|
"Tu",
|
|
232
216
|
"We",
|
|
@@ -235,21 +219,21 @@ var ct = [
|
|
|
235
219
|
"Sa",
|
|
236
220
|
"Su"
|
|
237
221
|
];
|
|
238
|
-
function
|
|
222
|
+
function K(e, t) {
|
|
239
223
|
return new Date(e, t + 1, 0).getDate();
|
|
240
224
|
}
|
|
241
|
-
function
|
|
225
|
+
function We(e, t) {
|
|
242
226
|
let n = new Date(e, t, 1).getDay();
|
|
243
227
|
return n === 0 ? 6 : n - 1;
|
|
244
228
|
}
|
|
245
|
-
function
|
|
229
|
+
function Ge(e) {
|
|
246
230
|
return e === 5 || e === 6;
|
|
247
231
|
}
|
|
248
|
-
function
|
|
232
|
+
function Ke(e, t, n) {
|
|
249
233
|
return e ? `${e.getDate().toString().padStart(2, "0")}/${(e.getMonth() + 1).toString().padStart(2, "0")}/${e.getFullYear()} ${t.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}` : "";
|
|
250
234
|
}
|
|
251
|
-
function
|
|
252
|
-
let i =
|
|
235
|
+
function qe({ viewYear: e, viewMonth: t, selectedDate: n, onSelect: r }) {
|
|
236
|
+
let i = K(e, t), a = We(e, t), o = K(e, t - 1), s = [];
|
|
253
237
|
for (let e = a - 1; e >= 0; e--) s.push({
|
|
254
238
|
day: o - e,
|
|
255
239
|
month: "prev"
|
|
@@ -264,29 +248,29 @@ function mt({ viewYear: e, viewMonth: t, selectedDate: n, onSelect: r }) {
|
|
|
264
248
|
month: "next"
|
|
265
249
|
});
|
|
266
250
|
let l = /* @__PURE__ */ new Date(), u = new Date(l.getFullYear(), l.getMonth(), l.getDate()).getTime();
|
|
267
|
-
return /* @__PURE__ */
|
|
251
|
+
return /* @__PURE__ */ W(E, {
|
|
268
252
|
style: { width: 252 },
|
|
269
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ U(E, {
|
|
270
254
|
style: {
|
|
271
255
|
display: "grid",
|
|
272
256
|
gridTemplateColumns: "repeat(7, 36px)",
|
|
273
257
|
marginBottom: 4
|
|
274
258
|
},
|
|
275
|
-
children:
|
|
259
|
+
children: Ue.map((e, t) => /* @__PURE__ */ U(I, {
|
|
276
260
|
fz: 10,
|
|
277
261
|
ta: "center",
|
|
278
262
|
c: t >= 5 ? "red.6" : "neutral.5",
|
|
279
263
|
style: { lineHeight: "28px" },
|
|
280
264
|
children: e
|
|
281
265
|
}, e))
|
|
282
|
-
}), /* @__PURE__ */
|
|
266
|
+
}), /* @__PURE__ */ U(E, {
|
|
283
267
|
style: {
|
|
284
268
|
display: "grid",
|
|
285
269
|
gridTemplateColumns: "repeat(7, 36px)"
|
|
286
270
|
},
|
|
287
271
|
children: s.map((i, a) => {
|
|
288
|
-
let o = a % 7, s = i.month === "current", c = !!(s && n && n.getDate() === i.day && n.getMonth() === t && n.getFullYear() === e), d = s && l.getDate() === i.day && l.getMonth() === t && l.getFullYear() === e, f = s && new Date(e, t, i.day).getTime() < u, p = !s || f, m =
|
|
289
|
-
return /* @__PURE__ */
|
|
272
|
+
let o = a % 7, s = i.month === "current", c = !!(s && n && n.getDate() === i.day && n.getMonth() === t && n.getFullYear() === e), d = s && l.getDate() === i.day && l.getMonth() === t && l.getFullYear() === e, f = s && new Date(e, t, i.day).getTime() < u, p = !s || f, m = Ge(o);
|
|
273
|
+
return /* @__PURE__ */ U(L, {
|
|
290
274
|
onClick: () => !p && r(i.day),
|
|
291
275
|
style: {
|
|
292
276
|
width: 36,
|
|
@@ -299,7 +283,7 @@ function mt({ viewYear: e, viewMonth: t, selectedDate: n, onSelect: r }) {
|
|
|
299
283
|
cursor: p ? "not-allowed" : "pointer",
|
|
300
284
|
outline: d && !c ? "2px solid var(--mantine-primary-color-5)" : "none"
|
|
301
285
|
},
|
|
302
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ U(I, {
|
|
303
287
|
fz: 13,
|
|
304
288
|
td: f ? "line-through" : void 0,
|
|
305
289
|
c: c ? "white" : p ? "neutral.3" : m ? "red.6" : "neutral.7",
|
|
@@ -310,49 +294,49 @@ function mt({ viewYear: e, viewMonth: t, selectedDate: n, onSelect: r }) {
|
|
|
310
294
|
})]
|
|
311
295
|
});
|
|
312
296
|
}
|
|
313
|
-
function
|
|
314
|
-
let
|
|
297
|
+
function q({ value: e, onChange: t, placeholder: n = "Pilih tanggal & jam" }) {
|
|
298
|
+
let r = e instanceof Date ? e : /* @__PURE__ */ new Date(), [i, a] = R(!1), [o, s] = R(r.getFullYear()), [c, l] = R(r.getMonth()), [u, d] = R(e instanceof Date ? e : null), [f, p] = R(e instanceof Date ? e.getHours() : 0), [m, h] = R(e instanceof Date ? e.getMinutes() : 0), _ = /* @__PURE__ */ new Date(), v = !!(u && u.getDate() === _.getDate() && u.getMonth() === _.getMonth() && u.getFullYear() === _.getFullYear()), y = Array.from({ length: 24 }, (e, t) => ({
|
|
315
299
|
value: String(t),
|
|
316
300
|
label: String(t).padStart(2, "0"),
|
|
317
|
-
disabled:
|
|
318
|
-
})),
|
|
301
|
+
disabled: v && t < _.getHours()
|
|
302
|
+
})), b = Array.from({ length: 60 }, (e, t) => ({
|
|
319
303
|
value: String(t),
|
|
320
304
|
label: String(t).padStart(2, "0"),
|
|
321
|
-
disabled:
|
|
322
|
-
})),
|
|
323
|
-
|
|
324
|
-
},
|
|
325
|
-
|
|
305
|
+
disabled: v && f === _.getHours() && t < _.getMinutes()
|
|
306
|
+
})), x = () => {
|
|
307
|
+
c === 0 ? (l(11), s((e) => e - 1)) : l((e) => e - 1);
|
|
308
|
+
}, S = () => {
|
|
309
|
+
c === 11 ? (l(0), s((e) => e + 1)) : l((e) => e + 1);
|
|
310
|
+
}, C = (e) => {
|
|
311
|
+
let n = f, r = m, i = new Date(o, c, e);
|
|
312
|
+
i.getDate() === _.getDate() && i.getMonth() === _.getMonth() && i.getFullYear() === _.getFullYear() && (n < _.getHours() || n === _.getHours() && r < _.getMinutes()) && (n = _.getHours(), r = _.getMinutes(), p(n), h(r));
|
|
313
|
+
let a = new Date(o, c, e, n, r);
|
|
314
|
+
d(a), t?.(a);
|
|
326
315
|
}, w = (e) => {
|
|
327
|
-
let
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}, T = (e) => {
|
|
332
|
-
let t = Number(e);
|
|
333
|
-
if (h(t), d) {
|
|
334
|
-
let e = new Date(d);
|
|
335
|
-
e.setHours(t), p(e), n?.(e);
|
|
316
|
+
let n = Number(e);
|
|
317
|
+
if (p(n), u) {
|
|
318
|
+
let e = new Date(u);
|
|
319
|
+
e.setHours(n), d(e), t?.(e);
|
|
336
320
|
}
|
|
337
|
-
},
|
|
338
|
-
let
|
|
339
|
-
if (
|
|
340
|
-
let e = new Date(
|
|
341
|
-
e.setMinutes(
|
|
321
|
+
}, T = (e) => {
|
|
322
|
+
let n = Number(e);
|
|
323
|
+
if (h(n), u) {
|
|
324
|
+
let e = new Date(u);
|
|
325
|
+
e.setMinutes(n), d(e), t?.(e);
|
|
342
326
|
}
|
|
343
327
|
}, D = (e) => {
|
|
344
|
-
e.stopPropagation(),
|
|
345
|
-
}, O =
|
|
346
|
-
return /* @__PURE__ */
|
|
347
|
-
opened:
|
|
348
|
-
onChange:
|
|
328
|
+
e.stopPropagation(), d(null), p(0), h(0), t?.(null);
|
|
329
|
+
}, O = Ke(u, f, m);
|
|
330
|
+
return /* @__PURE__ */ W(P, {
|
|
331
|
+
opened: i,
|
|
332
|
+
onChange: a,
|
|
349
333
|
position: "bottom-start",
|
|
350
334
|
offset: 4,
|
|
351
335
|
shadow: "md",
|
|
352
336
|
radius: "md",
|
|
353
337
|
trapFocus: !0,
|
|
354
|
-
children: [/* @__PURE__ */
|
|
355
|
-
onClick: () =>
|
|
338
|
+
children: [/* @__PURE__ */ U(P.Target, { children: /* @__PURE__ */ W(E, {
|
|
339
|
+
onClick: () => a((e) => !e),
|
|
356
340
|
style: {
|
|
357
341
|
display: "flex",
|
|
358
342
|
alignItems: "center",
|
|
@@ -367,12 +351,12 @@ function ht({ value: e, onChange: n, placeholder: r = "Pilih tanggal & jam" }) {
|
|
|
367
351
|
minWidth: 0
|
|
368
352
|
},
|
|
369
353
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ U(z, {
|
|
371
355
|
size: 16,
|
|
372
356
|
color: "var(--mantine-color-gray-5)",
|
|
373
357
|
style: { flexShrink: 0 }
|
|
374
358
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ U(I, {
|
|
376
360
|
fz: 12,
|
|
377
361
|
c: O ? "neutral.7" : "neutral.4",
|
|
378
362
|
style: {
|
|
@@ -381,9 +365,9 @@ function ht({ value: e, onChange: n, placeholder: r = "Pilih tanggal & jam" }) {
|
|
|
381
365
|
textOverflow: "ellipsis",
|
|
382
366
|
whiteSpace: "nowrap"
|
|
383
367
|
},
|
|
384
|
-
children: O ||
|
|
368
|
+
children: O || n
|
|
385
369
|
}),
|
|
386
|
-
|
|
370
|
+
u && /* @__PURE__ */ U(E, {
|
|
387
371
|
component: "span",
|
|
388
372
|
onClick: D,
|
|
389
373
|
style: {
|
|
@@ -391,89 +375,89 @@ function ht({ value: e, onChange: n, placeholder: r = "Pilih tanggal & jam" }) {
|
|
|
391
375
|
alignItems: "center",
|
|
392
376
|
flexShrink: 0
|
|
393
377
|
},
|
|
394
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ U(H, {
|
|
395
379
|
size: 14,
|
|
396
380
|
color: "var(--mantine-color-gray-5)"
|
|
397
381
|
})
|
|
398
382
|
})
|
|
399
383
|
]
|
|
400
|
-
}) }), /* @__PURE__ */
|
|
384
|
+
}) }), /* @__PURE__ */ W(P.Dropdown, {
|
|
401
385
|
p: "md",
|
|
402
386
|
style: { minWidth: 280 },
|
|
403
387
|
children: [
|
|
404
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ W(k, {
|
|
405
389
|
justify: "space-between",
|
|
406
390
|
align: "center",
|
|
407
391
|
mb: 8,
|
|
408
392
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ U(g, {
|
|
410
394
|
variant: "subtle",
|
|
411
395
|
color: "gray",
|
|
412
396
|
size: "sm",
|
|
413
|
-
onClick:
|
|
414
|
-
children: /* @__PURE__ */ B
|
|
397
|
+
onClick: x,
|
|
398
|
+
children: /* @__PURE__ */ U(B, { size: 14 })
|
|
415
399
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ W(I, {
|
|
417
401
|
fz: 12,
|
|
418
402
|
fw: 700,
|
|
419
403
|
c: "neutral.7",
|
|
420
404
|
children: [
|
|
421
|
-
|
|
405
|
+
He[c],
|
|
422
406
|
" ",
|
|
423
|
-
|
|
407
|
+
o
|
|
424
408
|
]
|
|
425
409
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ U(g, {
|
|
427
411
|
variant: "subtle",
|
|
428
412
|
color: "gray",
|
|
429
413
|
size: "sm",
|
|
430
|
-
onClick:
|
|
431
|
-
children: /* @__PURE__ */
|
|
414
|
+
onClick: S,
|
|
415
|
+
children: /* @__PURE__ */ U(V, { size: 14 })
|
|
432
416
|
})
|
|
433
417
|
]
|
|
434
418
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
viewYear:
|
|
437
|
-
viewMonth:
|
|
438
|
-
selectedDate:
|
|
439
|
-
onSelect:
|
|
419
|
+
/* @__PURE__ */ U(qe, {
|
|
420
|
+
viewYear: o,
|
|
421
|
+
viewMonth: c,
|
|
422
|
+
selectedDate: u,
|
|
423
|
+
onSelect: C
|
|
440
424
|
}),
|
|
441
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ U(E, { style: {
|
|
442
426
|
height: 1,
|
|
443
427
|
background: "var(--mantine-color-gray-2)",
|
|
444
428
|
margin: "12px 0"
|
|
445
429
|
} }),
|
|
446
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ W(k, {
|
|
447
431
|
gap: 8,
|
|
448
432
|
align: "center",
|
|
449
433
|
wrap: "nowrap",
|
|
450
434
|
children: [
|
|
451
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ U(I, {
|
|
452
436
|
fz: 12,
|
|
453
437
|
c: "neutral.6",
|
|
454
438
|
style: { flexShrink: 0 },
|
|
455
439
|
children: "Jam"
|
|
456
440
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ U(F, {
|
|
458
442
|
radius: "xl",
|
|
459
|
-
value: String(
|
|
460
|
-
onChange:
|
|
461
|
-
data:
|
|
443
|
+
value: String(f),
|
|
444
|
+
onChange: w,
|
|
445
|
+
data: y,
|
|
462
446
|
w: 72,
|
|
463
447
|
size: "xs",
|
|
464
448
|
searchable: !0
|
|
465
449
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ U(I, {
|
|
467
451
|
fz: 12,
|
|
468
452
|
c: "neutral.6",
|
|
469
453
|
style: { flexShrink: 0 },
|
|
470
454
|
children: "Menit"
|
|
471
455
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ U(F, {
|
|
473
457
|
radius: "xl",
|
|
474
|
-
value: String(
|
|
475
|
-
onChange:
|
|
476
|
-
data:
|
|
458
|
+
value: String(m),
|
|
459
|
+
onChange: T,
|
|
460
|
+
data: b,
|
|
477
461
|
w: 72,
|
|
478
462
|
size: "xs",
|
|
479
463
|
searchable: !0
|
|
@@ -486,7 +470,7 @@ function ht({ value: e, onChange: n, placeholder: r = "Pilih tanggal & jam" }) {
|
|
|
486
470
|
}
|
|
487
471
|
//#endregion
|
|
488
472
|
//#region src/components/DateTimeRangePicker/DateTimeRangePicker.tsx
|
|
489
|
-
var
|
|
473
|
+
var J = [
|
|
490
474
|
"January",
|
|
491
475
|
"February",
|
|
492
476
|
"March",
|
|
@@ -499,7 +483,7 @@ var X = [
|
|
|
499
483
|
"October",
|
|
500
484
|
"November",
|
|
501
485
|
"December"
|
|
502
|
-
],
|
|
486
|
+
], Je = [
|
|
503
487
|
"Mo",
|
|
504
488
|
"Tu",
|
|
505
489
|
"We",
|
|
@@ -508,27 +492,27 @@ var X = [
|
|
|
508
492
|
"Sa",
|
|
509
493
|
"Su"
|
|
510
494
|
];
|
|
511
|
-
function
|
|
495
|
+
function Y(e, t) {
|
|
512
496
|
return new Date(e, t + 1, 0).getDate();
|
|
513
497
|
}
|
|
514
|
-
function
|
|
498
|
+
function Ye(e, t) {
|
|
515
499
|
let n = new Date(e, t, 1).getDay();
|
|
516
500
|
return n === 0 ? 6 : n - 1;
|
|
517
501
|
}
|
|
518
|
-
function
|
|
502
|
+
function Xe(e) {
|
|
519
503
|
return e === 5 || e === 6;
|
|
520
504
|
}
|
|
521
|
-
function
|
|
505
|
+
function X(e, t) {
|
|
522
506
|
return !e || !t ? !1 : e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
|
|
523
507
|
}
|
|
524
|
-
function
|
|
508
|
+
function Z(e, t, n) {
|
|
525
509
|
return new Date(e, t, n).setHours(0, 0, 0, 0);
|
|
526
510
|
}
|
|
527
|
-
function
|
|
511
|
+
function Q(e) {
|
|
528
512
|
return e ? `${e.getDate().toString().padStart(2, "0")}/${(e.getMonth() + 1).toString().padStart(2, "0")}/${e.getFullYear()} ${e.getHours().toString().padStart(2, "0")}:${e.getMinutes().toString().padStart(2, "0")}` : "";
|
|
529
513
|
}
|
|
530
514
|
function $({ viewYear: e, viewMonth: t, start: n, end: r, onSelect: i }) {
|
|
531
|
-
let a =
|
|
515
|
+
let a = Y(e, t), o = Ye(e, t), s = Y(e, t - 1), c = [];
|
|
532
516
|
for (let e = o - 1; e >= 0; e--) c.push({
|
|
533
517
|
day: s - e,
|
|
534
518
|
month: "prev"
|
|
@@ -542,42 +526,42 @@ function $({ viewYear: e, viewMonth: t, start: n, end: r, onSelect: i }) {
|
|
|
542
526
|
day: e,
|
|
543
527
|
month: "next"
|
|
544
528
|
});
|
|
545
|
-
let u = /* @__PURE__ */ new Date(), d = new Date(u.getFullYear(), u.getMonth(), u.getDate()).getTime(),
|
|
546
|
-
return /* @__PURE__ */
|
|
529
|
+
let u = /* @__PURE__ */ new Date(), d = new Date(u.getFullYear(), u.getMonth(), u.getDate()).getTime(), f = n ? Z(n.getFullYear(), n.getMonth(), n.getDate()) : null, p = r ? Z(r.getFullYear(), r.getMonth(), r.getDate()) : null;
|
|
530
|
+
return /* @__PURE__ */ W(E, {
|
|
547
531
|
style: { width: 252 },
|
|
548
|
-
children: [/* @__PURE__ */
|
|
532
|
+
children: [/* @__PURE__ */ U(E, {
|
|
549
533
|
style: {
|
|
550
534
|
display: "grid",
|
|
551
535
|
gridTemplateColumns: "repeat(7, 36px)",
|
|
552
536
|
marginBottom: 4
|
|
553
537
|
},
|
|
554
|
-
children:
|
|
538
|
+
children: Je.map((e, t) => /* @__PURE__ */ U(I, {
|
|
555
539
|
fz: 10,
|
|
556
540
|
ta: "center",
|
|
557
541
|
c: t >= 5 ? "red.6" : "neutral.5",
|
|
558
542
|
style: { lineHeight: "28px" },
|
|
559
543
|
children: e
|
|
560
544
|
}, e))
|
|
561
|
-
}), /* @__PURE__ */
|
|
545
|
+
}), /* @__PURE__ */ U(E, {
|
|
562
546
|
style: {
|
|
563
547
|
display: "grid",
|
|
564
548
|
gridTemplateColumns: "repeat(7, 36px)"
|
|
565
549
|
},
|
|
566
550
|
children: c.map((a, o) => {
|
|
567
|
-
let s = o % 7, c = a.month === "current", l = c ?
|
|
568
|
-
return /* @__PURE__ */
|
|
551
|
+
let s = o % 7, c = a.month === "current", l = c ? Z(e, t, a.day) : null, m = c ? new Date(e, t, a.day) : null, h = c && X(m, n), g = c && X(m, r), _ = h || g, v = !!(c && l !== null && f !== null && p !== null && l > f && l < p), y = c && u.getDate() === a.day && u.getMonth() === t && u.getFullYear() === e, b = c && l !== null && l < d, x = !c || b, S = Xe(s);
|
|
552
|
+
return /* @__PURE__ */ U(E, {
|
|
569
553
|
style: {
|
|
570
554
|
display: "flex",
|
|
571
555
|
alignItems: "center",
|
|
572
556
|
justifyContent: "center",
|
|
573
|
-
background:
|
|
574
|
-
borderTopLeftRadius:
|
|
575
|
-
borderBottomLeftRadius:
|
|
576
|
-
borderTopRightRadius:
|
|
577
|
-
borderBottomRightRadius:
|
|
557
|
+
background: v ? "var(--mantine-color-primary-1)" : "transparent",
|
|
558
|
+
borderTopLeftRadius: h || v && s === 0 ? 999 : 0,
|
|
559
|
+
borderBottomLeftRadius: h || v && s === 0 ? 999 : 0,
|
|
560
|
+
borderTopRightRadius: g || v && s === 6 ? 999 : 0,
|
|
561
|
+
borderBottomRightRadius: g || v && s === 6 ? 999 : 0
|
|
578
562
|
},
|
|
579
|
-
children: /* @__PURE__ */
|
|
580
|
-
onClick: () => !
|
|
563
|
+
children: /* @__PURE__ */ U(L, {
|
|
564
|
+
onClick: () => !x && i(e, t, a.day),
|
|
581
565
|
style: {
|
|
582
566
|
width: 36,
|
|
583
567
|
height: 36,
|
|
@@ -585,14 +569,14 @@ function $({ viewYear: e, viewMonth: t, start: n, end: r, onSelect: i }) {
|
|
|
585
569
|
alignItems: "center",
|
|
586
570
|
justifyContent: "center",
|
|
587
571
|
borderRadius: "50%",
|
|
588
|
-
background:
|
|
589
|
-
cursor:
|
|
590
|
-
outline:
|
|
572
|
+
background: _ ? "var(--mantine-primary-color-5)" : "transparent",
|
|
573
|
+
cursor: x ? "not-allowed" : "pointer",
|
|
574
|
+
outline: y && !_ ? "2px solid var(--mantine-primary-color-5)" : "none"
|
|
591
575
|
},
|
|
592
|
-
children: /* @__PURE__ */
|
|
576
|
+
children: /* @__PURE__ */ U(I, {
|
|
593
577
|
fz: 13,
|
|
594
|
-
td:
|
|
595
|
-
c:
|
|
578
|
+
td: b ? "line-through" : void 0,
|
|
579
|
+
c: _ ? "white" : x ? "neutral.3" : S ? "red.6" : "neutral.7",
|
|
596
580
|
children: a.day
|
|
597
581
|
})
|
|
598
582
|
})
|
|
@@ -601,56 +585,56 @@ function $({ viewYear: e, viewMonth: t, start: n, end: r, onSelect: i }) {
|
|
|
601
585
|
})]
|
|
602
586
|
});
|
|
603
587
|
}
|
|
604
|
-
function
|
|
605
|
-
let
|
|
588
|
+
function Ze({ value: e, onChange: t, placeholder: n = "Pilih periode" }) {
|
|
589
|
+
let r = e?.[0] instanceof Date ? e[0] : /* @__PURE__ */ new Date(), [i, a] = R(!1), [o, s] = R(r.getFullYear()), [c, l] = R(r.getMonth()), [u, d] = R(e?.[0] instanceof Date ? e[0] : null), [f, p] = R(e?.[1] instanceof Date ? e[1] : null), m = c === 11 ? o + 1 : o, h = c === 11 ? 0 : c + 1, _ = /* @__PURE__ */ new Date(), v = (e) => Array.from({ length: 24 }, (t, n) => ({
|
|
606
590
|
value: String(n),
|
|
607
591
|
label: String(n).padStart(2, "0"),
|
|
608
|
-
disabled:
|
|
609
|
-
})),
|
|
592
|
+
disabled: X(e, _) && n < _.getHours()
|
|
593
|
+
})), y = (e) => Array.from({ length: 60 }, (t, n) => ({
|
|
610
594
|
value: String(n),
|
|
611
595
|
label: String(n).padStart(2, "0"),
|
|
612
|
-
disabled:
|
|
613
|
-
})),
|
|
614
|
-
|
|
615
|
-
},
|
|
616
|
-
|
|
617
|
-
},
|
|
618
|
-
if (!
|
|
619
|
-
let r =
|
|
620
|
-
|
|
596
|
+
disabled: X(e, _) && e !== null && e.getHours() === _.getHours() && n < _.getMinutes()
|
|
597
|
+
})), b = () => {
|
|
598
|
+
c === 0 ? (l(11), s((e) => e - 1)) : l((e) => e - 1);
|
|
599
|
+
}, x = () => {
|
|
600
|
+
c === 11 ? (l(0), s((e) => e + 1)) : l((e) => e + 1);
|
|
601
|
+
}, S = (e, n) => t?.([e, n]), C = (e) => X(e, _) && e.getTime() < _.getTime() ? new Date(_.getFullYear(), _.getMonth(), _.getDate(), _.getHours(), _.getMinutes()) : e, w = (e, t, n) => {
|
|
602
|
+
if (!u || u && f) {
|
|
603
|
+
let r = u?.getHours() ?? 0, i = u?.getMinutes() ?? 0, a = C(new Date(e, t, n, r, i));
|
|
604
|
+
d(a), p(null), S(a, null);
|
|
621
605
|
return;
|
|
622
606
|
}
|
|
623
|
-
if (new Date(e, t, n,
|
|
624
|
-
let r =
|
|
625
|
-
|
|
607
|
+
if (new Date(e, t, n, f?.getHours() ?? 0, f?.getMinutes() ?? 0).setHours(0, 0, 0, 0) < new Date(u).setHours(0, 0, 0, 0)) {
|
|
608
|
+
let r = C(new Date(e, t, n, u.getHours(), u.getMinutes()));
|
|
609
|
+
d(r), p(null), S(r, null);
|
|
626
610
|
return;
|
|
627
611
|
}
|
|
628
|
-
let r =
|
|
629
|
-
|
|
630
|
-
},
|
|
612
|
+
let r = C(new Date(e, t, n, f?.getHours() ?? 0, f?.getMinutes() ?? 0));
|
|
613
|
+
p(r), S(u, r);
|
|
614
|
+
}, T = (e, t, n) => {
|
|
631
615
|
let r = Number(n);
|
|
632
616
|
if (e === "start") {
|
|
633
|
-
if (!
|
|
634
|
-
let e = new Date(
|
|
635
|
-
t === "h" ? e.setHours(r) : e.setMinutes(r),
|
|
617
|
+
if (!u) return;
|
|
618
|
+
let e = new Date(u);
|
|
619
|
+
t === "h" ? e.setHours(r) : e.setMinutes(r), d(e), S(e, f);
|
|
636
620
|
} else {
|
|
637
|
-
if (!
|
|
638
|
-
let e = new Date(
|
|
639
|
-
t === "h" ? e.setHours(r) : e.setMinutes(r),
|
|
621
|
+
if (!f) return;
|
|
622
|
+
let e = new Date(f);
|
|
623
|
+
t === "h" ? e.setHours(r) : e.setMinutes(r), p(e), S(u, e);
|
|
640
624
|
}
|
|
641
625
|
}, D = (e) => {
|
|
642
|
-
e.stopPropagation(),
|
|
643
|
-
}, O =
|
|
644
|
-
return /* @__PURE__ */
|
|
645
|
-
opened:
|
|
646
|
-
onChange:
|
|
626
|
+
e.stopPropagation(), d(null), p(null), S(null, null);
|
|
627
|
+
}, O = u ? `${Q(u)}${f ? ` - ${Q(f)}` : ""}` : "";
|
|
628
|
+
return /* @__PURE__ */ W(P, {
|
|
629
|
+
opened: i,
|
|
630
|
+
onChange: a,
|
|
647
631
|
position: "bottom-start",
|
|
648
632
|
offset: 4,
|
|
649
633
|
shadow: "md",
|
|
650
634
|
radius: "md",
|
|
651
635
|
trapFocus: !0,
|
|
652
|
-
children: [/* @__PURE__ */
|
|
653
|
-
onClick: () =>
|
|
636
|
+
children: [/* @__PURE__ */ U(P.Target, { children: /* @__PURE__ */ W(E, {
|
|
637
|
+
onClick: () => a((e) => !e),
|
|
654
638
|
style: {
|
|
655
639
|
display: "flex",
|
|
656
640
|
alignItems: "center",
|
|
@@ -665,12 +649,12 @@ function xt({ value: e, onChange: n, placeholder: r = "Pilih periode" }) {
|
|
|
665
649
|
minWidth: 0
|
|
666
650
|
},
|
|
667
651
|
children: [
|
|
668
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ U(z, {
|
|
669
653
|
size: 16,
|
|
670
654
|
color: "var(--mantine-color-gray-5)",
|
|
671
655
|
style: { flexShrink: 0 }
|
|
672
656
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ U(I, {
|
|
674
658
|
fz: 12,
|
|
675
659
|
c: O ? "neutral.7" : "neutral.4",
|
|
676
660
|
style: {
|
|
@@ -679,9 +663,9 @@ function xt({ value: e, onChange: n, placeholder: r = "Pilih periode" }) {
|
|
|
679
663
|
textOverflow: "ellipsis",
|
|
680
664
|
whiteSpace: "nowrap"
|
|
681
665
|
},
|
|
682
|
-
children: O ||
|
|
666
|
+
children: O || n
|
|
683
667
|
}),
|
|
684
|
-
|
|
668
|
+
u && /* @__PURE__ */ U(E, {
|
|
685
669
|
component: "span",
|
|
686
670
|
onClick: D,
|
|
687
671
|
style: {
|
|
@@ -689,165 +673,165 @@ function xt({ value: e, onChange: n, placeholder: r = "Pilih periode" }) {
|
|
|
689
673
|
alignItems: "center",
|
|
690
674
|
flexShrink: 0
|
|
691
675
|
},
|
|
692
|
-
children: /* @__PURE__ */
|
|
676
|
+
children: /* @__PURE__ */ U(H, {
|
|
693
677
|
size: 14,
|
|
694
678
|
color: "var(--mantine-color-gray-5)"
|
|
695
679
|
})
|
|
696
680
|
})
|
|
697
681
|
]
|
|
698
|
-
}) }), /* @__PURE__ */
|
|
682
|
+
}) }), /* @__PURE__ */ W(P.Dropdown, {
|
|
699
683
|
p: "md",
|
|
700
684
|
children: [
|
|
701
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ W(k, {
|
|
702
686
|
align: "flex-start",
|
|
703
687
|
gap: 24,
|
|
704
688
|
wrap: "nowrap",
|
|
705
|
-
children: [/* @__PURE__ */
|
|
689
|
+
children: [/* @__PURE__ */ W(E, { children: [/* @__PURE__ */ W(k, {
|
|
706
690
|
justify: "space-between",
|
|
707
691
|
align: "center",
|
|
708
692
|
mb: 8,
|
|
709
693
|
children: [
|
|
710
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ U(g, {
|
|
711
695
|
variant: "subtle",
|
|
712
696
|
color: "gray",
|
|
713
697
|
size: "sm",
|
|
714
|
-
onClick:
|
|
715
|
-
children: /* @__PURE__ */ B
|
|
698
|
+
onClick: b,
|
|
699
|
+
children: /* @__PURE__ */ U(B, { size: 14 })
|
|
716
700
|
}),
|
|
717
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ W(I, {
|
|
718
702
|
fz: 12,
|
|
719
703
|
fw: 700,
|
|
720
704
|
c: "neutral.7",
|
|
721
705
|
children: [
|
|
722
|
-
|
|
706
|
+
J[c],
|
|
723
707
|
" ",
|
|
724
|
-
|
|
708
|
+
o
|
|
725
709
|
]
|
|
726
710
|
}),
|
|
727
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ U(E, { w: 22 })
|
|
728
712
|
]
|
|
729
|
-
}), /* @__PURE__ */
|
|
730
|
-
viewYear:
|
|
731
|
-
viewMonth:
|
|
732
|
-
start:
|
|
733
|
-
end:
|
|
734
|
-
onSelect:
|
|
735
|
-
})] }), /* @__PURE__ */
|
|
713
|
+
}), /* @__PURE__ */ U($, {
|
|
714
|
+
viewYear: o,
|
|
715
|
+
viewMonth: c,
|
|
716
|
+
start: u,
|
|
717
|
+
end: f,
|
|
718
|
+
onSelect: w
|
|
719
|
+
})] }), /* @__PURE__ */ W(E, { children: [/* @__PURE__ */ W(k, {
|
|
736
720
|
justify: "space-between",
|
|
737
721
|
align: "center",
|
|
738
722
|
mb: 8,
|
|
739
723
|
children: [
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ U(E, { w: 22 }),
|
|
725
|
+
/* @__PURE__ */ W(I, {
|
|
742
726
|
fz: 12,
|
|
743
727
|
fw: 700,
|
|
744
728
|
c: "neutral.7",
|
|
745
729
|
children: [
|
|
746
|
-
|
|
730
|
+
J[h],
|
|
747
731
|
" ",
|
|
748
|
-
|
|
732
|
+
m
|
|
749
733
|
]
|
|
750
734
|
}),
|
|
751
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ U(g, {
|
|
752
736
|
variant: "subtle",
|
|
753
737
|
color: "gray",
|
|
754
738
|
size: "sm",
|
|
755
|
-
onClick:
|
|
756
|
-
children: /* @__PURE__ */
|
|
739
|
+
onClick: x,
|
|
740
|
+
children: /* @__PURE__ */ U(V, { size: 14 })
|
|
757
741
|
})
|
|
758
742
|
]
|
|
759
|
-
}), /* @__PURE__ */
|
|
760
|
-
viewYear:
|
|
761
|
-
viewMonth:
|
|
762
|
-
start:
|
|
763
|
-
end:
|
|
764
|
-
onSelect:
|
|
743
|
+
}), /* @__PURE__ */ U($, {
|
|
744
|
+
viewYear: m,
|
|
745
|
+
viewMonth: h,
|
|
746
|
+
start: u,
|
|
747
|
+
end: f,
|
|
748
|
+
onSelect: w
|
|
765
749
|
})] })]
|
|
766
750
|
}),
|
|
767
|
-
/* @__PURE__ */
|
|
751
|
+
/* @__PURE__ */ U(E, { style: {
|
|
768
752
|
height: 1,
|
|
769
753
|
background: "var(--mantine-color-gray-2)",
|
|
770
754
|
margin: "12px 0"
|
|
771
755
|
} }),
|
|
772
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ W(k, {
|
|
773
757
|
justify: "space-between",
|
|
774
758
|
align: "center",
|
|
775
759
|
wrap: "nowrap",
|
|
776
|
-
children: [/* @__PURE__ */
|
|
760
|
+
children: [/* @__PURE__ */ W(k, {
|
|
777
761
|
gap: 8,
|
|
778
762
|
align: "center",
|
|
779
763
|
wrap: "nowrap",
|
|
780
764
|
children: [
|
|
781
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ U(I, {
|
|
782
766
|
fz: 12,
|
|
783
767
|
c: "neutral.6",
|
|
784
768
|
style: { flexShrink: 0 },
|
|
785
769
|
children: "Mulai"
|
|
786
770
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ U(F, {
|
|
788
772
|
radius: "xl",
|
|
789
|
-
value:
|
|
790
|
-
onChange: (e) =>
|
|
791
|
-
data:
|
|
773
|
+
value: u ? String(u.getHours()) : null,
|
|
774
|
+
onChange: (e) => T("start", "h", e),
|
|
775
|
+
data: v(u),
|
|
792
776
|
w: 68,
|
|
793
777
|
size: "xs",
|
|
794
778
|
searchable: !0,
|
|
795
|
-
disabled: !
|
|
779
|
+
disabled: !u,
|
|
796
780
|
placeholder: "--"
|
|
797
781
|
}),
|
|
798
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ U(I, {
|
|
799
783
|
fz: 12,
|
|
800
784
|
c: "neutral.6",
|
|
801
785
|
children: ":"
|
|
802
786
|
}),
|
|
803
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ U(F, {
|
|
804
788
|
radius: "xl",
|
|
805
|
-
value:
|
|
806
|
-
onChange: (e) =>
|
|
807
|
-
data:
|
|
789
|
+
value: u ? String(u.getMinutes()) : null,
|
|
790
|
+
onChange: (e) => T("start", "m", e),
|
|
791
|
+
data: y(u),
|
|
808
792
|
w: 68,
|
|
809
793
|
size: "xs",
|
|
810
794
|
searchable: !0,
|
|
811
|
-
disabled: !
|
|
795
|
+
disabled: !u,
|
|
812
796
|
placeholder: "--"
|
|
813
797
|
})
|
|
814
798
|
]
|
|
815
|
-
}), /* @__PURE__ */
|
|
799
|
+
}), /* @__PURE__ */ W(k, {
|
|
816
800
|
gap: 8,
|
|
817
801
|
align: "center",
|
|
818
802
|
wrap: "nowrap",
|
|
819
803
|
children: [
|
|
820
|
-
/* @__PURE__ */
|
|
804
|
+
/* @__PURE__ */ U(I, {
|
|
821
805
|
fz: 12,
|
|
822
806
|
c: "neutral.6",
|
|
823
807
|
style: { flexShrink: 0 },
|
|
824
808
|
children: "Selesai"
|
|
825
809
|
}),
|
|
826
|
-
/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ U(F, {
|
|
827
811
|
radius: "xl",
|
|
828
|
-
value:
|
|
829
|
-
onChange: (e) =>
|
|
830
|
-
data:
|
|
812
|
+
value: f ? String(f.getHours()) : null,
|
|
813
|
+
onChange: (e) => T("end", "h", e),
|
|
814
|
+
data: v(f),
|
|
831
815
|
w: 68,
|
|
832
816
|
size: "xs",
|
|
833
817
|
searchable: !0,
|
|
834
|
-
disabled: !
|
|
818
|
+
disabled: !f,
|
|
835
819
|
placeholder: "--"
|
|
836
820
|
}),
|
|
837
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ U(I, {
|
|
838
822
|
fz: 12,
|
|
839
823
|
c: "neutral.6",
|
|
840
824
|
children: ":"
|
|
841
825
|
}),
|
|
842
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ U(F, {
|
|
843
827
|
radius: "xl",
|
|
844
|
-
value:
|
|
845
|
-
onChange: (e) =>
|
|
846
|
-
data:
|
|
828
|
+
value: f ? String(f.getMinutes()) : null,
|
|
829
|
+
onChange: (e) => T("end", "m", e),
|
|
830
|
+
data: y(f),
|
|
847
831
|
w: 68,
|
|
848
832
|
size: "xs",
|
|
849
833
|
searchable: !0,
|
|
850
|
-
disabled: !
|
|
834
|
+
disabled: !f,
|
|
851
835
|
placeholder: "--"
|
|
852
836
|
})
|
|
853
837
|
]
|
|
@@ -858,99 +842,4 @@ function xt({ value: e, onChange: n, placeholder: r = "Pilih periode" }) {
|
|
|
858
842
|
});
|
|
859
843
|
}
|
|
860
844
|
//#endregion
|
|
861
|
-
|
|
862
|
-
function St({ content: e = "", onChange: t, editable: n = !0, ...r }) {
|
|
863
|
-
let i = Je({
|
|
864
|
-
extensions: [Ye.configure({ link: !1 }), Xe],
|
|
865
|
-
content: e,
|
|
866
|
-
editable: n,
|
|
867
|
-
immediatelyRender: !1,
|
|
868
|
-
onUpdate: ({ editor: e }) => t?.(e.getHTML())
|
|
869
|
-
});
|
|
870
|
-
return He(() => {
|
|
871
|
-
i?.setEditable(n);
|
|
872
|
-
}, [i, n]), /* @__PURE__ */ V(q, {
|
|
873
|
-
editor: i,
|
|
874
|
-
...r,
|
|
875
|
-
children: [/* @__PURE__ */ V(q.Toolbar, {
|
|
876
|
-
sticky: !0,
|
|
877
|
-
children: [
|
|
878
|
-
/* @__PURE__ */ V(q.ControlsGroup, { children: [
|
|
879
|
-
/* @__PURE__ */ B(q.Bold, {}),
|
|
880
|
-
/* @__PURE__ */ B(q.Italic, {}),
|
|
881
|
-
/* @__PURE__ */ B(q.Underline, {}),
|
|
882
|
-
/* @__PURE__ */ B(q.Strikethrough, {}),
|
|
883
|
-
/* @__PURE__ */ B(q.ClearFormatting, {})
|
|
884
|
-
] }),
|
|
885
|
-
/* @__PURE__ */ V(q.ControlsGroup, { children: [
|
|
886
|
-
/* @__PURE__ */ B(q.H1, {}),
|
|
887
|
-
/* @__PURE__ */ B(q.H2, {}),
|
|
888
|
-
/* @__PURE__ */ B(q.H3, {})
|
|
889
|
-
] }),
|
|
890
|
-
/* @__PURE__ */ V(q.ControlsGroup, { children: [/* @__PURE__ */ B(q.BulletList, {}), /* @__PURE__ */ B(q.OrderedList, {})] }),
|
|
891
|
-
/* @__PURE__ */ V(q.ControlsGroup, { children: [/* @__PURE__ */ B(q.Link, {}), /* @__PURE__ */ B(q.Unlink, {})] }),
|
|
892
|
-
/* @__PURE__ */ V(q.ControlsGroup, { children: [/* @__PURE__ */ B(q.Undo, {}), /* @__PURE__ */ B(q.Redo, {})] })
|
|
893
|
-
]
|
|
894
|
-
}), /* @__PURE__ */ B(q.Content, {})]
|
|
895
|
-
});
|
|
896
|
-
}
|
|
897
|
-
//#endregion
|
|
898
|
-
//#region src/components/DataTable/DataTable.tsx
|
|
899
|
-
function Ct({ data: e, columns: t, searchPlaceholder: n = "Cari...", pageSize: r = 10, emptyLabel: i = "Belum ada data" }) {
|
|
900
|
-
let a = rt({
|
|
901
|
-
data: e,
|
|
902
|
-
columns: t,
|
|
903
|
-
getCoreRowModel: $e(),
|
|
904
|
-
getSortedRowModel: nt(),
|
|
905
|
-
getFilteredRowModel: et(),
|
|
906
|
-
getPaginationRowModel: tt(),
|
|
907
|
-
initialState: { pagination: {
|
|
908
|
-
pageSize: r,
|
|
909
|
-
pageIndex: 0
|
|
910
|
-
} }
|
|
911
|
-
}), o = a.getRowModel().rows, s = {
|
|
912
|
-
asc: /* @__PURE__ */ B(We, { size: 14 }),
|
|
913
|
-
desc: /* @__PURE__ */ B(Ue, { size: 14 })
|
|
914
|
-
};
|
|
915
|
-
return /* @__PURE__ */ V(P, {
|
|
916
|
-
gap: "sm",
|
|
917
|
-
children: [
|
|
918
|
-
n !== void 0 && /* @__PURE__ */ B(R, {
|
|
919
|
-
placeholder: n,
|
|
920
|
-
leftSection: /* @__PURE__ */ B(Ge, { size: 16 }),
|
|
921
|
-
value: a.getState().globalFilter ?? "",
|
|
922
|
-
onChange: (e) => a.setGlobalFilter(e.currentTarget.value)
|
|
923
|
-
}),
|
|
924
|
-
/* @__PURE__ */ V(F, { children: [/* @__PURE__ */ B(F.Thead, { children: a.getHeaderGroups().map((e) => /* @__PURE__ */ B(F.Tr, { children: e.headers.map((e) => /* @__PURE__ */ B(F.Th, {
|
|
925
|
-
onClick: e.column.getToggleSortingHandler(),
|
|
926
|
-
style: { cursor: e.column.getCanSort() ? "pointer" : void 0 },
|
|
927
|
-
children: /* @__PURE__ */ V(k, {
|
|
928
|
-
gap: 4,
|
|
929
|
-
wrap: "nowrap",
|
|
930
|
-
children: [e.isPlaceholder ? null : J(e.column.columnDef.header, e.getContext()), e.column.getCanSort() && (s[e.column.getIsSorted()] ?? /* @__PURE__ */ B(Ke, {
|
|
931
|
-
size: 14,
|
|
932
|
-
opacity: .4
|
|
933
|
-
}))]
|
|
934
|
-
})
|
|
935
|
-
}, e.id)) }, e.id)) }), /* @__PURE__ */ B(F.Tbody, { children: o.length === 0 ? /* @__PURE__ */ B(F.Tr, { children: /* @__PURE__ */ B(F.Td, {
|
|
936
|
-
colSpan: t.length,
|
|
937
|
-
children: /* @__PURE__ */ B(I, {
|
|
938
|
-
ta: "center",
|
|
939
|
-
c: "dimmed",
|
|
940
|
-
py: "md",
|
|
941
|
-
children: i
|
|
942
|
-
})
|
|
943
|
-
}) }) : o.map((e) => /* @__PURE__ */ B(F.Tr, { children: e.getVisibleCells().map((e) => /* @__PURE__ */ B(F.Td, { children: J(e.column.columnDef.cell, e.getContext()) }, e.id)) }, e.id)) })] }),
|
|
944
|
-
a.getPageCount() > 1 && /* @__PURE__ */ B(k, {
|
|
945
|
-
justify: "flex-end",
|
|
946
|
-
children: /* @__PURE__ */ B(j, {
|
|
947
|
-
total: a.getPageCount(),
|
|
948
|
-
value: a.getState().pagination.pageIndex + 1,
|
|
949
|
-
onChange: (e) => a.setPageIndex(e - 1)
|
|
950
|
-
})
|
|
951
|
-
})
|
|
952
|
-
]
|
|
953
|
-
});
|
|
954
|
-
}
|
|
955
|
-
//#endregion
|
|
956
|
-
export { e as ActionIcon, n as Alert, i as Anchor, o as AppShell, s as Avatar, l as Badge, at as BarChart, d as Box, p as Breadcrumbs, m as Burger, h as Button, _ as Card, it as Carousel, y as Center, b as Checkbox, x as CloseButton, S as ColorSwatch, C as Container, Ct as DataTable, st as DatePickerInput, ht as DateTimePicker, xt as DateTimeRangePicker, w as Divider, ot as DonutChart, qe as Dropzone, T as EmptyState, E as FileButton, D as FileInput, O as Flex, ee as Grid, k as Group, te as Image, ne as Indicator, ie as Loader, ae as LoadingOverlay, oe as Menu, ce as Modal, ue as MultiSelect, de as NativeSelect, fe as NavLink, pe as Notification, Ze as Notifications, me as NumberInput, j as Pagination, he as Paper, ge as PasswordInput, _e as Pill, ve as Popover, ye as Progress, be as Radio, St as RichTextEditor, xe as RingProgress, Se as ScrollArea, Ce as SegmentedControl, Te as Select, Ee as SimpleGrid, De as Skeleton, P as Stack, Oe as Stepper, ke as Switch, F as Table, je as Tabs, Me as TagsInput, I as Text, R as TextInput, Ne as Textarea, Pe as ThemeIcon, Fe as Title, Ie as Tooltip, Re as VisuallyHidden, Y as kelolaTheme, Y as theme, Qe as notifications };
|
|
845
|
+
export { h as ActionIcon, _ as Alert, y as Anchor, x as AppShell, S as Avatar, w as Badge, p as Box, D as Breadcrumbs, O as Burger, ee as Button, ne as Card, c as Center, ie as Checkbox, ae as CloseButton, oe as ColorSwatch, d as Container, q as DateTimePicker, Ze as DateTimeRangePicker, se as Divider, ce as EmptyState, le as FileButton, ue as FileInput, a as Flex, e as Grid, l as Group, f as Image, de as Indicator, pe as Loader, me as LoadingOverlay, he as Menu, _e as Modal, ye as MultiSelect, be as NativeSelect, A as NavLink, j as Notification, M as NumberInput, s as Pagination, N as Paper, xe as PasswordInput, Se as Pill, Ce as Popover, we as Progress, Te as Radio, Ee as RingProgress, t as ScrollArea, De as SegmentedControl, ke as Select, o as SimpleGrid, Ae as Skeleton, m as Stack, je as Stepper, Me as Switch, u as Table, Pe as Tabs, Fe as TagsInput, n as Text, i as TextInput, Ie as Textarea, Le as ThemeIcon, r as Title, Re as Tooltip, Be as VisuallyHidden, G as kelolaTheme, G as theme };
|