@talentlytica/prodigy 1.4.1 → 1.6.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/CHANGELOG.md +56 -0
- package/dist/components/DataTable/DataTable.d.ts +10 -1
- package/dist/components/DataTable/labels.d.ts +18 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +4 -1
- package/dist/components/DateTimeRangePicker/DateTimeRangePicker.d.ts +4 -1
- package/dist/components/ProdigyLabels/ProdigyLabelsProvider.d.ts +21 -0
- package/dist/components/_shared/calendarLabels.d.ts +16 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/data-table.d.ts +1 -0
- package/dist/data-table.js +126 -125
- package/dist/index.js +285 -283
- package/dist/primitives-DYEZHr1L.js +23 -0
- package/package.json +1 -1
- package/dist/primitives-cJiG7HAD.js +0 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ActionIcon as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { IconCalendar as z, IconChevronLeft as B, IconChevronRight as V, IconX as H } from "@tabler/icons-react";
|
|
1
|
+
import { a as e, b as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _, x as v, y } from "./primitives-DYEZHr1L.js";
|
|
2
|
+
import { ActionIcon as b, ActionIcon as x, Alert as S, Alert as C, Anchor as w, Anchor as T, AppShell as E, Avatar as D, Avatar as O, Badge as k, Badge as A, Box as j, Breadcrumbs as M, Burger as N, Button as P, Button as F, Card as ee, Card as te, CloseButton as ne, ColorSwatch as re, Divider as ie, EmptyState as ae, FileButton as oe, FileInput as se, Group as I, Indicator as ce, Input as le, Loader as ue, LoadingOverlay as de, Menu as fe, Menu as pe, Modal as me, Modal as he, MultiSelect as ge, NavLink as _e, Notification as ve, NumberInput as ye, Paper as be, PasswordInput as xe, Pill as Se, Popover as Ce, Popover as L, Progress as we, Radio as Te, RingProgress as Ee, SegmentedControl as De, SegmentedControl as Oe, Select as ke, Select as R, Stepper as Ae, Switch as je, Table as Me, Tabs as Ne, TagsInput as Pe, Text as z, Textarea as Fe, ThemeIcon as Ie, Tooltip as Le, Tooltip as Re, UnstyledButton as B, VisuallyHidden as ze, createTheme as Be } from "@mantine/core";
|
|
3
|
+
import { useMemo as V, useState as H } from "react";
|
|
5
4
|
import { jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
6
|
-
|
|
5
|
+
import { IconCalendar as G, IconChevronLeft as K, IconChevronRight as q, IconX as J } from "@tabler/icons-react";
|
|
6
|
+
var Y = Be({
|
|
7
7
|
primaryColor: "primary",
|
|
8
8
|
primaryShade: 5,
|
|
9
9
|
colors: {
|
|
@@ -113,11 +113,11 @@ var G = Ve({
|
|
|
113
113
|
fontWeight: "700"
|
|
114
114
|
},
|
|
115
115
|
fontSizes: {
|
|
116
|
-
xs: "0.
|
|
117
|
-
sm: "0.
|
|
118
|
-
md: "
|
|
119
|
-
lg: "
|
|
120
|
-
xl: "1.
|
|
116
|
+
xs: "0.75rem",
|
|
117
|
+
sm: "0.875rem",
|
|
118
|
+
md: "1rem",
|
|
119
|
+
lg: "1.125rem",
|
|
120
|
+
xl: "1.25rem"
|
|
121
121
|
},
|
|
122
122
|
lineHeights: {
|
|
123
123
|
xs: "1.4",
|
|
@@ -149,7 +149,7 @@ var G = Ve({
|
|
|
149
149
|
cursorType: "pointer",
|
|
150
150
|
other: { appBackground: "#F7F7F7" },
|
|
151
151
|
components: {
|
|
152
|
-
Button:
|
|
152
|
+
Button: F.extend({
|
|
153
153
|
defaultProps: {
|
|
154
154
|
variant: "filled",
|
|
155
155
|
size: "sm",
|
|
@@ -158,8 +158,8 @@ var G = Ve({
|
|
|
158
158
|
styles: { label: { fontWeight: 700 } },
|
|
159
159
|
vars: (e, t) => t.variant === "subtle" ? { root: { "--button-color": `var(--mantine-color-${t.color || e.primaryColor}-5)` } } : { root: {} }
|
|
160
160
|
}),
|
|
161
|
-
Input:
|
|
162
|
-
Badge:
|
|
161
|
+
Input: le.extend({ defaultProps: { radius: "xl" } }),
|
|
162
|
+
Badge: A.extend({
|
|
163
163
|
defaultProps: {
|
|
164
164
|
variant: "light",
|
|
165
165
|
radius: "xl"
|
|
@@ -167,111 +167,132 @@ var G = Ve({
|
|
|
167
167
|
vars: (e, t) => t.variant === "light" ? { root: { "--badge-color": `var(--mantine-color-${t.color || e.primaryColor}-5)` } } : { root: {} },
|
|
168
168
|
styles: (e, t) => t.variant === "dot" ? { label: { color: `var(--mantine-color-${t.color || e.primaryColor}-5)` } } : {}
|
|
169
169
|
}),
|
|
170
|
-
Avatar:
|
|
171
|
-
Alert:
|
|
172
|
-
Anchor:
|
|
173
|
-
Card:
|
|
170
|
+
Avatar: O.extend({ defaultProps: { radius: 9999 } }),
|
|
171
|
+
Alert: C.extend({ defaultProps: { variant: "light" } }),
|
|
172
|
+
Anchor: T.extend({ defaultProps: { underline: "hover" } }),
|
|
173
|
+
Card: te.extend({ defaultProps: {
|
|
174
174
|
withBorder: !0,
|
|
175
175
|
shadow: "md",
|
|
176
176
|
radius: "md",
|
|
177
177
|
padding: "lg"
|
|
178
178
|
} }),
|
|
179
|
-
Tooltip:
|
|
180
|
-
ActionIcon:
|
|
179
|
+
Tooltip: Re.extend({ defaultProps: { withArrow: !0 } }),
|
|
180
|
+
ActionIcon: x.extend({ defaultProps: {
|
|
181
181
|
variant: "subtle",
|
|
182
182
|
color: "gray"
|
|
183
183
|
} }),
|
|
184
|
-
Menu:
|
|
184
|
+
Menu: pe.extend({ defaultProps: {
|
|
185
185
|
shadow: "md",
|
|
186
186
|
radius: "md"
|
|
187
187
|
} }),
|
|
188
|
-
Modal:
|
|
188
|
+
Modal: he.extend({ defaultProps: {
|
|
189
189
|
centered: !0,
|
|
190
190
|
radius: "md"
|
|
191
191
|
} }),
|
|
192
|
-
Table:
|
|
192
|
+
Table: Me.extend({ defaultProps: {
|
|
193
193
|
highlightOnHover: !0,
|
|
194
194
|
verticalSpacing: "sm",
|
|
195
195
|
horizontalSpacing: "md"
|
|
196
196
|
} }),
|
|
197
|
-
SegmentedControl:
|
|
198
|
-
Select:
|
|
197
|
+
SegmentedControl: Oe.extend({ defaultProps: { radius: "xl" } }),
|
|
198
|
+
Select: R.extend({ defaultProps: { checkIconPosition: "right" } })
|
|
199
199
|
}
|
|
200
|
-
}),
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
200
|
+
}), X = {
|
|
201
|
+
months: [
|
|
202
|
+
"January",
|
|
203
|
+
"February",
|
|
204
|
+
"March",
|
|
205
|
+
"April",
|
|
206
|
+
"May",
|
|
207
|
+
"June",
|
|
208
|
+
"July",
|
|
209
|
+
"August",
|
|
210
|
+
"September",
|
|
211
|
+
"October",
|
|
212
|
+
"November",
|
|
213
|
+
"December"
|
|
214
|
+
],
|
|
215
|
+
days: [
|
|
216
|
+
"Mo",
|
|
217
|
+
"Tu",
|
|
218
|
+
"We",
|
|
219
|
+
"Th",
|
|
220
|
+
"Fr",
|
|
221
|
+
"Sa",
|
|
222
|
+
"Su"
|
|
223
|
+
]
|
|
224
|
+
}, Z = /* @__PURE__ */ new Map();
|
|
225
|
+
function Ve(e) {
|
|
226
|
+
if (!e) return X;
|
|
227
|
+
let t = Z.get(e);
|
|
228
|
+
if (t) return t;
|
|
229
|
+
let n;
|
|
230
|
+
try {
|
|
231
|
+
let t = new Intl.DateTimeFormat(e, { month: "long" }), r = new Intl.DateTimeFormat(e, { weekday: "short" });
|
|
232
|
+
n = {
|
|
233
|
+
months: Array.from({ length: 12 }, (e, n) => t.format(new Date(2021, n, 1))),
|
|
234
|
+
days: Array.from({ length: 7 }, (e, t) => r.format(new Date(2021, 2, 1 + t)))
|
|
235
|
+
};
|
|
236
|
+
} catch {
|
|
237
|
+
n = X;
|
|
238
|
+
}
|
|
239
|
+
return Z.set(e, n), n;
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region src/components/DateTimePicker/DateTimePicker.tsx
|
|
243
|
+
function He(e, t) {
|
|
223
244
|
return new Date(e, t + 1, 0).getDate();
|
|
224
245
|
}
|
|
225
|
-
function
|
|
246
|
+
function Ue(e, t) {
|
|
226
247
|
let n = new Date(e, t, 1).getDay();
|
|
227
248
|
return n === 0 ? 6 : n - 1;
|
|
228
249
|
}
|
|
229
|
-
function
|
|
250
|
+
function We(e) {
|
|
230
251
|
return e === 5 || e === 6;
|
|
231
252
|
}
|
|
232
|
-
function
|
|
253
|
+
function Ge(e, t, n) {
|
|
233
254
|
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")}` : "";
|
|
234
255
|
}
|
|
235
|
-
function
|
|
236
|
-
let
|
|
237
|
-
for (let e =
|
|
238
|
-
day:
|
|
256
|
+
function Ke({ viewYear: e, viewMonth: t, selectedDate: n, dayNames: r, onSelect: i }) {
|
|
257
|
+
let a = He(e, t), o = Ue(e, t), s = He(e, t - 1), c = [];
|
|
258
|
+
for (let e = o - 1; e >= 0; e--) c.push({
|
|
259
|
+
day: s - e,
|
|
239
260
|
month: "prev"
|
|
240
261
|
});
|
|
241
|
-
for (let e = 1; e <=
|
|
262
|
+
for (let e = 1; e <= a; e++) c.push({
|
|
242
263
|
day: e,
|
|
243
264
|
month: "current"
|
|
244
265
|
});
|
|
245
|
-
let
|
|
246
|
-
for (let e = 1; e <=
|
|
266
|
+
let l = 42 - c.length;
|
|
267
|
+
for (let e = 1; e <= l; e++) c.push({
|
|
247
268
|
day: e,
|
|
248
269
|
month: "next"
|
|
249
270
|
});
|
|
250
|
-
let
|
|
251
|
-
return /* @__PURE__ */ W(
|
|
271
|
+
let u = /* @__PURE__ */ new Date(), d = new Date(u.getFullYear(), u.getMonth(), u.getDate()).getTime();
|
|
272
|
+
return /* @__PURE__ */ W(j, {
|
|
252
273
|
style: { width: 252 },
|
|
253
|
-
children: [/* @__PURE__ */ U(
|
|
274
|
+
children: [/* @__PURE__ */ U(j, {
|
|
254
275
|
style: {
|
|
255
276
|
display: "grid",
|
|
256
277
|
gridTemplateColumns: "repeat(7, 36px)",
|
|
257
278
|
marginBottom: 4
|
|
258
279
|
},
|
|
259
|
-
children:
|
|
280
|
+
children: r.map((e, t) => /* @__PURE__ */ U(z, {
|
|
260
281
|
fz: 10,
|
|
261
282
|
ta: "center",
|
|
262
283
|
c: t >= 5 ? "red.6" : "neutral.5",
|
|
263
284
|
style: { lineHeight: "28px" },
|
|
264
285
|
children: e
|
|
265
|
-
},
|
|
266
|
-
}), /* @__PURE__ */ U(
|
|
286
|
+
}, t))
|
|
287
|
+
}), /* @__PURE__ */ U(j, {
|
|
267
288
|
style: {
|
|
268
289
|
display: "grid",
|
|
269
290
|
gridTemplateColumns: "repeat(7, 36px)"
|
|
270
291
|
},
|
|
271
|
-
children:
|
|
272
|
-
let o = a % 7, s =
|
|
273
|
-
return /* @__PURE__ */ U(
|
|
274
|
-
onClick: () => !p && r
|
|
292
|
+
children: c.map((r, a) => {
|
|
293
|
+
let o = a % 7, s = r.month === "current", c = !!(s && n && n.getDate() === r.day && n.getMonth() === t && n.getFullYear() === e), l = s && u.getDate() === r.day && u.getMonth() === t && u.getFullYear() === e, f = s && new Date(e, t, r.day).getTime() < d, p = !s || f, m = We(o);
|
|
294
|
+
return /* @__PURE__ */ U(B, {
|
|
295
|
+
onClick: () => !p && i(r.day),
|
|
275
296
|
style: {
|
|
276
297
|
width: 36,
|
|
277
298
|
height: 36,
|
|
@@ -281,62 +302,62 @@ function qe({ viewYear: e, viewMonth: t, selectedDate: n, onSelect: r }) {
|
|
|
281
302
|
borderRadius: "50%",
|
|
282
303
|
background: c ? "var(--mantine-primary-color-5)" : "transparent",
|
|
283
304
|
cursor: p ? "not-allowed" : "pointer",
|
|
284
|
-
outline:
|
|
305
|
+
outline: l && !c ? "2px solid var(--mantine-primary-color-5)" : "none"
|
|
285
306
|
},
|
|
286
|
-
children: /* @__PURE__ */ U(
|
|
307
|
+
children: /* @__PURE__ */ U(z, {
|
|
287
308
|
fz: 13,
|
|
288
309
|
td: f ? "line-through" : void 0,
|
|
289
310
|
c: c ? "white" : p ? "neutral.3" : m ? "red.6" : "neutral.7",
|
|
290
|
-
children:
|
|
311
|
+
children: r.day
|
|
291
312
|
})
|
|
292
313
|
}, a);
|
|
293
314
|
})
|
|
294
315
|
})]
|
|
295
316
|
});
|
|
296
317
|
}
|
|
297
|
-
function
|
|
298
|
-
let r = e instanceof Date ? e : /* @__PURE__ */ new Date(), [
|
|
318
|
+
function qe({ value: e, onChange: t, placeholder: n = "Pilih tanggal & jam", labels: r }) {
|
|
319
|
+
let i = _(), a = r?.locale ?? i?.locale, o = r?.time ?? i?.time ?? "Jam", s = V(() => Ve(a), [a]), c = e instanceof Date ? e : /* @__PURE__ */ new Date(), [l, u] = H(!1), [d, f] = H(c.getFullYear()), [p, m] = H(c.getMonth()), [h, g] = H(e instanceof Date ? e : null), [v, y] = H(e instanceof Date ? e.getHours() : 0), [b, S] = H(e instanceof Date ? e.getMinutes() : 0), C = /* @__PURE__ */ new Date(), w = !!(h && h.getDate() === C.getDate() && h.getMonth() === C.getMonth() && h.getFullYear() === C.getFullYear()), T = Array.from({ length: 24 }, (e, t) => ({
|
|
299
320
|
value: String(t),
|
|
300
321
|
label: String(t).padStart(2, "0"),
|
|
301
|
-
disabled:
|
|
302
|
-
})),
|
|
322
|
+
disabled: w && t < C.getHours()
|
|
323
|
+
})), E = Array.from({ length: 60 }, (e, t) => ({
|
|
303
324
|
value: String(t),
|
|
304
325
|
label: String(t).padStart(2, "0"),
|
|
305
|
-
disabled:
|
|
306
|
-
})),
|
|
307
|
-
|
|
308
|
-
},
|
|
309
|
-
|
|
310
|
-
},
|
|
311
|
-
let n =
|
|
312
|
-
i.getDate() ===
|
|
313
|
-
let a = new Date(
|
|
314
|
-
|
|
315
|
-
},
|
|
326
|
+
disabled: w && v === C.getHours() && t < C.getMinutes()
|
|
327
|
+
})), D = () => {
|
|
328
|
+
p === 0 ? (m(11), f((e) => e - 1)) : m((e) => e - 1);
|
|
329
|
+
}, O = () => {
|
|
330
|
+
p === 11 ? (m(0), f((e) => e + 1)) : m((e) => e + 1);
|
|
331
|
+
}, k = (e) => {
|
|
332
|
+
let n = v, r = b, i = new Date(d, p, e);
|
|
333
|
+
i.getDate() === C.getDate() && i.getMonth() === C.getMonth() && i.getFullYear() === C.getFullYear() && (n < C.getHours() || n === C.getHours() && r < C.getMinutes()) && (n = C.getHours(), r = C.getMinutes(), y(n), S(r));
|
|
334
|
+
let a = new Date(d, p, e, n, r);
|
|
335
|
+
g(a), t?.(a);
|
|
336
|
+
}, A = (e) => {
|
|
316
337
|
let n = Number(e);
|
|
317
|
-
if (
|
|
318
|
-
let e = new Date(
|
|
319
|
-
e.setHours(n),
|
|
338
|
+
if (y(n), h) {
|
|
339
|
+
let e = new Date(h);
|
|
340
|
+
e.setHours(n), g(e), t?.(e);
|
|
320
341
|
}
|
|
321
|
-
},
|
|
342
|
+
}, M = (e) => {
|
|
322
343
|
let n = Number(e);
|
|
323
|
-
if (
|
|
324
|
-
let e = new Date(
|
|
325
|
-
e.setMinutes(n),
|
|
344
|
+
if (S(n), h) {
|
|
345
|
+
let e = new Date(h);
|
|
346
|
+
e.setMinutes(n), g(e), t?.(e);
|
|
326
347
|
}
|
|
327
|
-
},
|
|
328
|
-
e.stopPropagation(),
|
|
329
|
-
},
|
|
330
|
-
return /* @__PURE__ */ W(
|
|
331
|
-
opened:
|
|
332
|
-
onChange:
|
|
348
|
+
}, N = (e) => {
|
|
349
|
+
e.stopPropagation(), g(null), y(0), S(0), t?.(null);
|
|
350
|
+
}, P = Ge(h, v, b);
|
|
351
|
+
return /* @__PURE__ */ W(L, {
|
|
352
|
+
opened: l,
|
|
353
|
+
onChange: u,
|
|
333
354
|
position: "bottom-start",
|
|
334
355
|
offset: 4,
|
|
335
356
|
shadow: "md",
|
|
336
357
|
radius: "md",
|
|
337
358
|
trapFocus: !0,
|
|
338
|
-
children: [/* @__PURE__ */ U(
|
|
339
|
-
onClick: () =>
|
|
359
|
+
children: [/* @__PURE__ */ U(L.Target, { children: /* @__PURE__ */ W(j, {
|
|
360
|
+
onClick: () => u((e) => !e),
|
|
340
361
|
style: {
|
|
341
362
|
display: "flex",
|
|
342
363
|
alignItems: "center",
|
|
@@ -351,113 +372,114 @@ function q({ value: e, onChange: t, placeholder: n = "Pilih tanggal & jam" }) {
|
|
|
351
372
|
minWidth: 0
|
|
352
373
|
},
|
|
353
374
|
children: [
|
|
354
|
-
/* @__PURE__ */ U(
|
|
375
|
+
/* @__PURE__ */ U(G, {
|
|
355
376
|
size: 16,
|
|
356
377
|
color: "var(--mantine-color-gray-5)",
|
|
357
378
|
style: { flexShrink: 0 }
|
|
358
379
|
}),
|
|
359
|
-
/* @__PURE__ */ U(
|
|
380
|
+
/* @__PURE__ */ U(z, {
|
|
360
381
|
fz: 12,
|
|
361
|
-
c:
|
|
382
|
+
c: P ? "neutral.7" : "neutral.4",
|
|
362
383
|
style: {
|
|
363
384
|
flex: 1,
|
|
364
385
|
overflow: "hidden",
|
|
365
386
|
textOverflow: "ellipsis",
|
|
366
387
|
whiteSpace: "nowrap"
|
|
367
388
|
},
|
|
368
|
-
children:
|
|
389
|
+
children: P || n
|
|
369
390
|
}),
|
|
370
|
-
|
|
391
|
+
h && /* @__PURE__ */ U(j, {
|
|
371
392
|
component: "span",
|
|
372
|
-
onClick:
|
|
393
|
+
onClick: N,
|
|
373
394
|
style: {
|
|
374
395
|
display: "flex",
|
|
375
396
|
alignItems: "center",
|
|
376
397
|
flexShrink: 0
|
|
377
398
|
},
|
|
378
|
-
children: /* @__PURE__ */ U(
|
|
399
|
+
children: /* @__PURE__ */ U(J, {
|
|
379
400
|
size: 14,
|
|
380
401
|
color: "var(--mantine-color-gray-5)"
|
|
381
402
|
})
|
|
382
403
|
})
|
|
383
404
|
]
|
|
384
|
-
}) }), /* @__PURE__ */ W(
|
|
405
|
+
}) }), /* @__PURE__ */ W(L.Dropdown, {
|
|
385
406
|
p: "md",
|
|
386
407
|
style: { minWidth: 280 },
|
|
387
408
|
children: [
|
|
388
|
-
/* @__PURE__ */ W(
|
|
409
|
+
/* @__PURE__ */ W(I, {
|
|
389
410
|
justify: "space-between",
|
|
390
411
|
align: "center",
|
|
391
412
|
mb: 8,
|
|
392
413
|
children: [
|
|
393
|
-
/* @__PURE__ */ U(
|
|
414
|
+
/* @__PURE__ */ U(x, {
|
|
394
415
|
variant: "subtle",
|
|
395
416
|
color: "gray",
|
|
396
417
|
size: "sm",
|
|
397
|
-
onClick:
|
|
398
|
-
children: /* @__PURE__ */ U(
|
|
418
|
+
onClick: D,
|
|
419
|
+
children: /* @__PURE__ */ U(K, { size: 14 })
|
|
399
420
|
}),
|
|
400
|
-
/* @__PURE__ */ W(
|
|
421
|
+
/* @__PURE__ */ W(z, {
|
|
401
422
|
fz: 12,
|
|
402
423
|
fw: 700,
|
|
403
424
|
c: "neutral.7",
|
|
404
425
|
children: [
|
|
405
|
-
|
|
426
|
+
s.months[p],
|
|
406
427
|
" ",
|
|
407
|
-
|
|
428
|
+
d
|
|
408
429
|
]
|
|
409
430
|
}),
|
|
410
|
-
/* @__PURE__ */ U(
|
|
431
|
+
/* @__PURE__ */ U(x, {
|
|
411
432
|
variant: "subtle",
|
|
412
433
|
color: "gray",
|
|
413
434
|
size: "sm",
|
|
414
|
-
onClick:
|
|
415
|
-
children: /* @__PURE__ */ U(
|
|
435
|
+
onClick: O,
|
|
436
|
+
children: /* @__PURE__ */ U(q, { size: 14 })
|
|
416
437
|
})
|
|
417
438
|
]
|
|
418
439
|
}),
|
|
419
|
-
/* @__PURE__ */ U(
|
|
420
|
-
viewYear:
|
|
421
|
-
viewMonth:
|
|
422
|
-
selectedDate:
|
|
423
|
-
|
|
440
|
+
/* @__PURE__ */ U(Ke, {
|
|
441
|
+
viewYear: d,
|
|
442
|
+
viewMonth: p,
|
|
443
|
+
selectedDate: h,
|
|
444
|
+
dayNames: s.days,
|
|
445
|
+
onSelect: k
|
|
424
446
|
}),
|
|
425
|
-
/* @__PURE__ */ U(
|
|
447
|
+
/* @__PURE__ */ U(j, { style: {
|
|
426
448
|
height: 1,
|
|
427
449
|
background: "var(--mantine-color-gray-2)",
|
|
428
450
|
margin: "12px 0"
|
|
429
451
|
} }),
|
|
430
|
-
/* @__PURE__ */ W(
|
|
452
|
+
/* @__PURE__ */ W(I, {
|
|
431
453
|
gap: 8,
|
|
432
454
|
align: "center",
|
|
433
455
|
wrap: "nowrap",
|
|
434
456
|
children: [
|
|
435
|
-
/* @__PURE__ */ U(
|
|
457
|
+
/* @__PURE__ */ U(z, {
|
|
436
458
|
fz: 12,
|
|
437
459
|
c: "neutral.6",
|
|
438
460
|
style: { flexShrink: 0 },
|
|
439
|
-
children:
|
|
461
|
+
children: o
|
|
440
462
|
}),
|
|
441
|
-
/* @__PURE__ */ U(
|
|
463
|
+
/* @__PURE__ */ U(R, {
|
|
442
464
|
radius: "xl",
|
|
443
|
-
value: String(
|
|
444
|
-
onChange:
|
|
445
|
-
data:
|
|
465
|
+
value: String(v),
|
|
466
|
+
onChange: A,
|
|
467
|
+
data: T,
|
|
446
468
|
w: 72,
|
|
447
469
|
size: "xs",
|
|
448
470
|
searchable: !0
|
|
449
471
|
}),
|
|
450
|
-
/* @__PURE__ */ U(
|
|
472
|
+
/* @__PURE__ */ U(z, {
|
|
451
473
|
fz: 12,
|
|
452
474
|
c: "neutral.6",
|
|
453
475
|
style: { flexShrink: 0 },
|
|
454
476
|
children: "Menit"
|
|
455
477
|
}),
|
|
456
|
-
/* @__PURE__ */ U(
|
|
478
|
+
/* @__PURE__ */ U(R, {
|
|
457
479
|
radius: "xl",
|
|
458
|
-
value: String(
|
|
459
|
-
onChange:
|
|
460
|
-
data:
|
|
480
|
+
value: String(b),
|
|
481
|
+
onChange: M,
|
|
482
|
+
data: E,
|
|
461
483
|
w: 72,
|
|
462
484
|
size: "xs",
|
|
463
485
|
searchable: !0
|
|
@@ -470,29 +492,7 @@ function q({ value: e, onChange: t, placeholder: n = "Pilih tanggal & jam" }) {
|
|
|
470
492
|
}
|
|
471
493
|
//#endregion
|
|
472
494
|
//#region src/components/DateTimeRangePicker/DateTimeRangePicker.tsx
|
|
473
|
-
|
|
474
|
-
"January",
|
|
475
|
-
"February",
|
|
476
|
-
"March",
|
|
477
|
-
"April",
|
|
478
|
-
"May",
|
|
479
|
-
"June",
|
|
480
|
-
"July",
|
|
481
|
-
"August",
|
|
482
|
-
"September",
|
|
483
|
-
"October",
|
|
484
|
-
"November",
|
|
485
|
-
"December"
|
|
486
|
-
], Je = [
|
|
487
|
-
"Mo",
|
|
488
|
-
"Tu",
|
|
489
|
-
"We",
|
|
490
|
-
"Th",
|
|
491
|
-
"Fr",
|
|
492
|
-
"Sa",
|
|
493
|
-
"Su"
|
|
494
|
-
];
|
|
495
|
-
function Y(e, t) {
|
|
495
|
+
function Je(e, t) {
|
|
496
496
|
return new Date(e, t + 1, 0).getDate();
|
|
497
497
|
}
|
|
498
498
|
function Ye(e, t) {
|
|
@@ -502,54 +502,54 @@ function Ye(e, t) {
|
|
|
502
502
|
function Xe(e) {
|
|
503
503
|
return e === 5 || e === 6;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Q(e, t) {
|
|
506
506
|
return !e || !t ? !1 : e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function $(e, t, n) {
|
|
509
509
|
return new Date(e, t, n).setHours(0, 0, 0, 0);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Ze(e) {
|
|
512
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")}` : "";
|
|
513
513
|
}
|
|
514
|
-
function
|
|
515
|
-
let
|
|
516
|
-
for (let e =
|
|
517
|
-
day:
|
|
514
|
+
function Qe({ viewYear: e, viewMonth: t, start: n, end: r, dayNames: i, onSelect: a }) {
|
|
515
|
+
let o = Je(e, t), s = Ye(e, t), c = Je(e, t - 1), l = [];
|
|
516
|
+
for (let e = s - 1; e >= 0; e--) l.push({
|
|
517
|
+
day: c - e,
|
|
518
518
|
month: "prev"
|
|
519
519
|
});
|
|
520
|
-
for (let e = 1; e <=
|
|
520
|
+
for (let e = 1; e <= o; e++) l.push({
|
|
521
521
|
day: e,
|
|
522
522
|
month: "current"
|
|
523
523
|
});
|
|
524
|
-
let
|
|
525
|
-
for (let e = 1; e <=
|
|
524
|
+
let u = 42 - l.length;
|
|
525
|
+
for (let e = 1; e <= u; e++) l.push({
|
|
526
526
|
day: e,
|
|
527
527
|
month: "next"
|
|
528
528
|
});
|
|
529
|
-
let
|
|
530
|
-
return /* @__PURE__ */ W(
|
|
529
|
+
let d = /* @__PURE__ */ new Date(), f = new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime(), p = n ? $(n.getFullYear(), n.getMonth(), n.getDate()) : null, m = r ? $(r.getFullYear(), r.getMonth(), r.getDate()) : null;
|
|
530
|
+
return /* @__PURE__ */ W(j, {
|
|
531
531
|
style: { width: 252 },
|
|
532
|
-
children: [/* @__PURE__ */ U(
|
|
532
|
+
children: [/* @__PURE__ */ U(j, {
|
|
533
533
|
style: {
|
|
534
534
|
display: "grid",
|
|
535
535
|
gridTemplateColumns: "repeat(7, 36px)",
|
|
536
536
|
marginBottom: 4
|
|
537
537
|
},
|
|
538
|
-
children:
|
|
538
|
+
children: i.map((e, t) => /* @__PURE__ */ U(z, {
|
|
539
539
|
fz: 10,
|
|
540
540
|
ta: "center",
|
|
541
541
|
c: t >= 5 ? "red.6" : "neutral.5",
|
|
542
542
|
style: { lineHeight: "28px" },
|
|
543
543
|
children: e
|
|
544
|
-
},
|
|
545
|
-
}), /* @__PURE__ */ U(
|
|
544
|
+
}, t))
|
|
545
|
+
}), /* @__PURE__ */ U(j, {
|
|
546
546
|
style: {
|
|
547
547
|
display: "grid",
|
|
548
548
|
gridTemplateColumns: "repeat(7, 36px)"
|
|
549
549
|
},
|
|
550
|
-
children:
|
|
551
|
-
let s = o % 7, c =
|
|
552
|
-
return /* @__PURE__ */ U(
|
|
550
|
+
children: l.map((i, o) => {
|
|
551
|
+
let s = o % 7, c = i.month === "current", l = c ? $(e, t, i.day) : null, u = c ? new Date(e, t, i.day) : null, h = c && Q(u, n), g = c && Q(u, r), _ = h || g, v = !!(c && l !== null && p !== null && m !== null && l > p && l < m), y = c && d.getDate() === i.day && d.getMonth() === t && d.getFullYear() === e, b = c && l !== null && l < f, x = !c || b, S = Xe(s);
|
|
552
|
+
return /* @__PURE__ */ U(j, {
|
|
553
553
|
style: {
|
|
554
554
|
display: "flex",
|
|
555
555
|
alignItems: "center",
|
|
@@ -560,8 +560,8 @@ function $({ viewYear: e, viewMonth: t, start: n, end: r, onSelect: i }) {
|
|
|
560
560
|
borderTopRightRadius: g || v && s === 6 ? 999 : 0,
|
|
561
561
|
borderBottomRightRadius: g || v && s === 6 ? 999 : 0
|
|
562
562
|
},
|
|
563
|
-
children: /* @__PURE__ */ U(
|
|
564
|
-
onClick: () => !x &&
|
|
563
|
+
children: /* @__PURE__ */ U(B, {
|
|
564
|
+
onClick: () => !x && a(e, t, i.day),
|
|
565
565
|
style: {
|
|
566
566
|
width: 36,
|
|
567
567
|
height: 36,
|
|
@@ -573,11 +573,11 @@ function $({ viewYear: e, viewMonth: t, start: n, end: r, onSelect: i }) {
|
|
|
573
573
|
cursor: x ? "not-allowed" : "pointer",
|
|
574
574
|
outline: y && !_ ? "2px solid var(--mantine-primary-color-5)" : "none"
|
|
575
575
|
},
|
|
576
|
-
children: /* @__PURE__ */ U(
|
|
576
|
+
children: /* @__PURE__ */ U(z, {
|
|
577
577
|
fz: 13,
|
|
578
578
|
td: b ? "line-through" : void 0,
|
|
579
579
|
c: _ ? "white" : x ? "neutral.3" : S ? "red.6" : "neutral.7",
|
|
580
|
-
children:
|
|
580
|
+
children: i.day
|
|
581
581
|
})
|
|
582
582
|
})
|
|
583
583
|
}, o);
|
|
@@ -585,56 +585,56 @@ function $({ viewYear: e, viewMonth: t, start: n, end: r, onSelect: i }) {
|
|
|
585
585
|
})]
|
|
586
586
|
});
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
let r = e?.[0] instanceof Date ? e[0] : /* @__PURE__ */ new Date(), [
|
|
588
|
+
function $e({ value: e, onChange: t, placeholder: n = "Pilih periode", labels: r }) {
|
|
589
|
+
let i = _(), a = r?.locale ?? i?.locale, o = r?.start ?? i?.start ?? "Mulai", s = r?.end ?? i?.end ?? "Selesai", c = V(() => Ve(a), [a]), l = e?.[0] instanceof Date ? e[0] : /* @__PURE__ */ new Date(), [u, d] = H(!1), [f, p] = H(l.getFullYear()), [m, h] = H(l.getMonth()), [g, v] = H(e?.[0] instanceof Date ? e[0] : null), [y, b] = H(e?.[1] instanceof Date ? e[1] : null), S = m === 11 ? f + 1 : f, C = m === 11 ? 0 : m + 1, w = /* @__PURE__ */ new Date(), T = (e) => Array.from({ length: 24 }, (t, n) => ({
|
|
590
590
|
value: String(n),
|
|
591
591
|
label: String(n).padStart(2, "0"),
|
|
592
|
-
disabled:
|
|
593
|
-
})),
|
|
592
|
+
disabled: Q(e, w) && n < w.getHours()
|
|
593
|
+
})), E = (e) => Array.from({ length: 60 }, (t, n) => ({
|
|
594
594
|
value: String(n),
|
|
595
595
|
label: String(n).padStart(2, "0"),
|
|
596
|
-
disabled:
|
|
597
|
-
})),
|
|
598
|
-
|
|
599
|
-
},
|
|
600
|
-
|
|
601
|
-
},
|
|
602
|
-
if (!
|
|
603
|
-
let r =
|
|
604
|
-
|
|
596
|
+
disabled: Q(e, w) && e !== null && e.getHours() === w.getHours() && n < w.getMinutes()
|
|
597
|
+
})), D = () => {
|
|
598
|
+
m === 0 ? (h(11), p((e) => e - 1)) : h((e) => e - 1);
|
|
599
|
+
}, O = () => {
|
|
600
|
+
m === 11 ? (h(0), p((e) => e + 1)) : h((e) => e + 1);
|
|
601
|
+
}, k = (e, n) => t?.([e, n]), A = (e) => Q(e, w) && e.getTime() < w.getTime() ? new Date(w.getFullYear(), w.getMonth(), w.getDate(), w.getHours(), w.getMinutes()) : e, M = (e, t, n) => {
|
|
602
|
+
if (!g || g && y) {
|
|
603
|
+
let r = g?.getHours() ?? 0, i = g?.getMinutes() ?? 0, a = A(new Date(e, t, n, r, i));
|
|
604
|
+
v(a), b(null), k(a, null);
|
|
605
605
|
return;
|
|
606
606
|
}
|
|
607
|
-
if (new Date(e, t, n,
|
|
608
|
-
let r =
|
|
609
|
-
|
|
607
|
+
if (new Date(e, t, n, y?.getHours() ?? 0, y?.getMinutes() ?? 0).setHours(0, 0, 0, 0) < new Date(g).setHours(0, 0, 0, 0)) {
|
|
608
|
+
let r = A(new Date(e, t, n, g.getHours(), g.getMinutes()));
|
|
609
|
+
v(r), b(null), k(r, null);
|
|
610
610
|
return;
|
|
611
611
|
}
|
|
612
|
-
let r =
|
|
613
|
-
|
|
614
|
-
},
|
|
612
|
+
let r = A(new Date(e, t, n, y?.getHours() ?? 0, y?.getMinutes() ?? 0));
|
|
613
|
+
b(r), k(g, r);
|
|
614
|
+
}, N = (e, t, n) => {
|
|
615
615
|
let r = Number(n);
|
|
616
616
|
if (e === "start") {
|
|
617
|
-
if (!
|
|
618
|
-
let e = new Date(
|
|
619
|
-
t === "h" ? e.setHours(r) : e.setMinutes(r),
|
|
617
|
+
if (!g) return;
|
|
618
|
+
let e = new Date(g);
|
|
619
|
+
t === "h" ? e.setHours(r) : e.setMinutes(r), v(e), k(e, y);
|
|
620
620
|
} else {
|
|
621
|
-
if (!
|
|
622
|
-
let e = new Date(
|
|
623
|
-
t === "h" ? e.setHours(r) : e.setMinutes(r),
|
|
621
|
+
if (!y) return;
|
|
622
|
+
let e = new Date(y);
|
|
623
|
+
t === "h" ? e.setHours(r) : e.setMinutes(r), b(e), k(g, e);
|
|
624
624
|
}
|
|
625
|
-
},
|
|
626
|
-
e.stopPropagation(),
|
|
627
|
-
},
|
|
628
|
-
return /* @__PURE__ */ W(
|
|
629
|
-
opened:
|
|
630
|
-
onChange:
|
|
625
|
+
}, P = (e) => {
|
|
626
|
+
e.stopPropagation(), v(null), b(null), k(null, null);
|
|
627
|
+
}, F = g ? `${Ze(g)}${y ? ` - ${Ze(y)}` : ""}` : "";
|
|
628
|
+
return /* @__PURE__ */ W(L, {
|
|
629
|
+
opened: u,
|
|
630
|
+
onChange: d,
|
|
631
631
|
position: "bottom-start",
|
|
632
632
|
offset: 4,
|
|
633
633
|
shadow: "md",
|
|
634
634
|
radius: "md",
|
|
635
635
|
trapFocus: !0,
|
|
636
|
-
children: [/* @__PURE__ */ U(
|
|
637
|
-
onClick: () =>
|
|
636
|
+
children: [/* @__PURE__ */ U(L.Target, { children: /* @__PURE__ */ W(j, {
|
|
637
|
+
onClick: () => d((e) => !e),
|
|
638
638
|
style: {
|
|
639
639
|
display: "flex",
|
|
640
640
|
alignItems: "center",
|
|
@@ -649,189 +649,191 @@ function Ze({ value: e, onChange: t, placeholder: n = "Pilih periode" }) {
|
|
|
649
649
|
minWidth: 0
|
|
650
650
|
},
|
|
651
651
|
children: [
|
|
652
|
-
/* @__PURE__ */ U(
|
|
652
|
+
/* @__PURE__ */ U(G, {
|
|
653
653
|
size: 16,
|
|
654
654
|
color: "var(--mantine-color-gray-5)",
|
|
655
655
|
style: { flexShrink: 0 }
|
|
656
656
|
}),
|
|
657
|
-
/* @__PURE__ */ U(
|
|
657
|
+
/* @__PURE__ */ U(z, {
|
|
658
658
|
fz: 12,
|
|
659
|
-
c:
|
|
659
|
+
c: F ? "neutral.7" : "neutral.4",
|
|
660
660
|
style: {
|
|
661
661
|
flex: 1,
|
|
662
662
|
overflow: "hidden",
|
|
663
663
|
textOverflow: "ellipsis",
|
|
664
664
|
whiteSpace: "nowrap"
|
|
665
665
|
},
|
|
666
|
-
children:
|
|
666
|
+
children: F || n
|
|
667
667
|
}),
|
|
668
|
-
|
|
668
|
+
g && /* @__PURE__ */ U(j, {
|
|
669
669
|
component: "span",
|
|
670
|
-
onClick:
|
|
670
|
+
onClick: P,
|
|
671
671
|
style: {
|
|
672
672
|
display: "flex",
|
|
673
673
|
alignItems: "center",
|
|
674
674
|
flexShrink: 0
|
|
675
675
|
},
|
|
676
|
-
children: /* @__PURE__ */ U(
|
|
676
|
+
children: /* @__PURE__ */ U(J, {
|
|
677
677
|
size: 14,
|
|
678
678
|
color: "var(--mantine-color-gray-5)"
|
|
679
679
|
})
|
|
680
680
|
})
|
|
681
681
|
]
|
|
682
|
-
}) }), /* @__PURE__ */ W(
|
|
682
|
+
}) }), /* @__PURE__ */ W(L.Dropdown, {
|
|
683
683
|
p: "md",
|
|
684
684
|
children: [
|
|
685
|
-
/* @__PURE__ */ W(
|
|
685
|
+
/* @__PURE__ */ W(I, {
|
|
686
686
|
align: "flex-start",
|
|
687
687
|
gap: 24,
|
|
688
688
|
wrap: "nowrap",
|
|
689
|
-
children: [/* @__PURE__ */ W(
|
|
689
|
+
children: [/* @__PURE__ */ W(j, { children: [/* @__PURE__ */ W(I, {
|
|
690
690
|
justify: "space-between",
|
|
691
691
|
align: "center",
|
|
692
692
|
mb: 8,
|
|
693
693
|
children: [
|
|
694
|
-
/* @__PURE__ */ U(
|
|
694
|
+
/* @__PURE__ */ U(x, {
|
|
695
695
|
variant: "subtle",
|
|
696
696
|
color: "gray",
|
|
697
697
|
size: "sm",
|
|
698
|
-
onClick:
|
|
699
|
-
children: /* @__PURE__ */ U(
|
|
698
|
+
onClick: D,
|
|
699
|
+
children: /* @__PURE__ */ U(K, { size: 14 })
|
|
700
700
|
}),
|
|
701
|
-
/* @__PURE__ */ W(
|
|
701
|
+
/* @__PURE__ */ W(z, {
|
|
702
702
|
fz: 12,
|
|
703
703
|
fw: 700,
|
|
704
704
|
c: "neutral.7",
|
|
705
705
|
children: [
|
|
706
|
-
|
|
706
|
+
c.months[m],
|
|
707
707
|
" ",
|
|
708
|
-
|
|
708
|
+
f
|
|
709
709
|
]
|
|
710
710
|
}),
|
|
711
|
-
/* @__PURE__ */ U(
|
|
711
|
+
/* @__PURE__ */ U(j, { w: 22 })
|
|
712
712
|
]
|
|
713
|
-
}), /* @__PURE__ */ U(
|
|
714
|
-
viewYear:
|
|
715
|
-
viewMonth:
|
|
716
|
-
start:
|
|
717
|
-
end:
|
|
718
|
-
|
|
719
|
-
|
|
713
|
+
}), /* @__PURE__ */ U(Qe, {
|
|
714
|
+
viewYear: f,
|
|
715
|
+
viewMonth: m,
|
|
716
|
+
start: g,
|
|
717
|
+
end: y,
|
|
718
|
+
dayNames: c.days,
|
|
719
|
+
onSelect: M
|
|
720
|
+
})] }), /* @__PURE__ */ W(j, { children: [/* @__PURE__ */ W(I, {
|
|
720
721
|
justify: "space-between",
|
|
721
722
|
align: "center",
|
|
722
723
|
mb: 8,
|
|
723
724
|
children: [
|
|
724
|
-
/* @__PURE__ */ U(
|
|
725
|
-
/* @__PURE__ */ W(
|
|
725
|
+
/* @__PURE__ */ U(j, { w: 22 }),
|
|
726
|
+
/* @__PURE__ */ W(z, {
|
|
726
727
|
fz: 12,
|
|
727
728
|
fw: 700,
|
|
728
729
|
c: "neutral.7",
|
|
729
730
|
children: [
|
|
730
|
-
|
|
731
|
+
c.months[C],
|
|
731
732
|
" ",
|
|
732
|
-
|
|
733
|
+
S
|
|
733
734
|
]
|
|
734
735
|
}),
|
|
735
|
-
/* @__PURE__ */ U(
|
|
736
|
+
/* @__PURE__ */ U(x, {
|
|
736
737
|
variant: "subtle",
|
|
737
738
|
color: "gray",
|
|
738
739
|
size: "sm",
|
|
739
|
-
onClick:
|
|
740
|
-
children: /* @__PURE__ */ U(
|
|
740
|
+
onClick: O,
|
|
741
|
+
children: /* @__PURE__ */ U(q, { size: 14 })
|
|
741
742
|
})
|
|
742
743
|
]
|
|
743
|
-
}), /* @__PURE__ */ U(
|
|
744
|
-
viewYear:
|
|
745
|
-
viewMonth:
|
|
746
|
-
start:
|
|
747
|
-
end:
|
|
748
|
-
|
|
744
|
+
}), /* @__PURE__ */ U(Qe, {
|
|
745
|
+
viewYear: S,
|
|
746
|
+
viewMonth: C,
|
|
747
|
+
start: g,
|
|
748
|
+
end: y,
|
|
749
|
+
dayNames: c.days,
|
|
750
|
+
onSelect: M
|
|
749
751
|
})] })]
|
|
750
752
|
}),
|
|
751
|
-
/* @__PURE__ */ U(
|
|
753
|
+
/* @__PURE__ */ U(j, { style: {
|
|
752
754
|
height: 1,
|
|
753
755
|
background: "var(--mantine-color-gray-2)",
|
|
754
756
|
margin: "12px 0"
|
|
755
757
|
} }),
|
|
756
|
-
/* @__PURE__ */ W(
|
|
758
|
+
/* @__PURE__ */ W(I, {
|
|
757
759
|
justify: "space-between",
|
|
758
760
|
align: "center",
|
|
759
761
|
wrap: "nowrap",
|
|
760
|
-
children: [/* @__PURE__ */ W(
|
|
762
|
+
children: [/* @__PURE__ */ W(I, {
|
|
761
763
|
gap: 8,
|
|
762
764
|
align: "center",
|
|
763
765
|
wrap: "nowrap",
|
|
764
766
|
children: [
|
|
765
|
-
/* @__PURE__ */ U(
|
|
767
|
+
/* @__PURE__ */ U(z, {
|
|
766
768
|
fz: 12,
|
|
767
769
|
c: "neutral.6",
|
|
768
770
|
style: { flexShrink: 0 },
|
|
769
|
-
children:
|
|
771
|
+
children: o
|
|
770
772
|
}),
|
|
771
|
-
/* @__PURE__ */ U(
|
|
773
|
+
/* @__PURE__ */ U(R, {
|
|
772
774
|
radius: "xl",
|
|
773
|
-
value:
|
|
774
|
-
onChange: (e) =>
|
|
775
|
-
data:
|
|
775
|
+
value: g ? String(g.getHours()) : null,
|
|
776
|
+
onChange: (e) => N("start", "h", e),
|
|
777
|
+
data: T(g),
|
|
776
778
|
w: 68,
|
|
777
779
|
size: "xs",
|
|
778
780
|
searchable: !0,
|
|
779
|
-
disabled: !
|
|
781
|
+
disabled: !g,
|
|
780
782
|
placeholder: "--"
|
|
781
783
|
}),
|
|
782
|
-
/* @__PURE__ */ U(
|
|
784
|
+
/* @__PURE__ */ U(z, {
|
|
783
785
|
fz: 12,
|
|
784
786
|
c: "neutral.6",
|
|
785
787
|
children: ":"
|
|
786
788
|
}),
|
|
787
|
-
/* @__PURE__ */ U(
|
|
789
|
+
/* @__PURE__ */ U(R, {
|
|
788
790
|
radius: "xl",
|
|
789
|
-
value:
|
|
790
|
-
onChange: (e) =>
|
|
791
|
-
data:
|
|
791
|
+
value: g ? String(g.getMinutes()) : null,
|
|
792
|
+
onChange: (e) => N("start", "m", e),
|
|
793
|
+
data: E(g),
|
|
792
794
|
w: 68,
|
|
793
795
|
size: "xs",
|
|
794
796
|
searchable: !0,
|
|
795
|
-
disabled: !
|
|
797
|
+
disabled: !g,
|
|
796
798
|
placeholder: "--"
|
|
797
799
|
})
|
|
798
800
|
]
|
|
799
|
-
}), /* @__PURE__ */ W(
|
|
801
|
+
}), /* @__PURE__ */ W(I, {
|
|
800
802
|
gap: 8,
|
|
801
803
|
align: "center",
|
|
802
804
|
wrap: "nowrap",
|
|
803
805
|
children: [
|
|
804
|
-
/* @__PURE__ */ U(
|
|
806
|
+
/* @__PURE__ */ U(z, {
|
|
805
807
|
fz: 12,
|
|
806
808
|
c: "neutral.6",
|
|
807
809
|
style: { flexShrink: 0 },
|
|
808
|
-
children:
|
|
810
|
+
children: s
|
|
809
811
|
}),
|
|
810
|
-
/* @__PURE__ */ U(
|
|
812
|
+
/* @__PURE__ */ U(R, {
|
|
811
813
|
radius: "xl",
|
|
812
|
-
value:
|
|
813
|
-
onChange: (e) =>
|
|
814
|
-
data:
|
|
814
|
+
value: y ? String(y.getHours()) : null,
|
|
815
|
+
onChange: (e) => N("end", "h", e),
|
|
816
|
+
data: T(y),
|
|
815
817
|
w: 68,
|
|
816
818
|
size: "xs",
|
|
817
819
|
searchable: !0,
|
|
818
|
-
disabled: !
|
|
820
|
+
disabled: !y,
|
|
819
821
|
placeholder: "--"
|
|
820
822
|
}),
|
|
821
|
-
/* @__PURE__ */ U(
|
|
823
|
+
/* @__PURE__ */ U(z, {
|
|
822
824
|
fz: 12,
|
|
823
825
|
c: "neutral.6",
|
|
824
826
|
children: ":"
|
|
825
827
|
}),
|
|
826
|
-
/* @__PURE__ */ U(
|
|
828
|
+
/* @__PURE__ */ U(R, {
|
|
827
829
|
radius: "xl",
|
|
828
|
-
value:
|
|
829
|
-
onChange: (e) =>
|
|
830
|
-
data:
|
|
830
|
+
value: y ? String(y.getMinutes()) : null,
|
|
831
|
+
onChange: (e) => N("end", "m", e),
|
|
832
|
+
data: E(y),
|
|
831
833
|
w: 68,
|
|
832
834
|
size: "xs",
|
|
833
835
|
searchable: !0,
|
|
834
|
-
disabled: !
|
|
836
|
+
disabled: !y,
|
|
835
837
|
placeholder: "--"
|
|
836
838
|
})
|
|
837
839
|
]
|
|
@@ -842,4 +844,4 @@ function Ze({ value: e, onChange: t, placeholder: n = "Pilih periode" }) {
|
|
|
842
844
|
});
|
|
843
845
|
}
|
|
844
846
|
//#endregion
|
|
845
|
-
export {
|
|
847
|
+
export { b as ActionIcon, S as Alert, w as Anchor, E as AppShell, D as Avatar, k as Badge, h as Box, M as Breadcrumbs, N as Burger, P as Button, ee as Card, u as Center, y as Checkbox, ne as CloseButton, re as ColorSwatch, p as Container, qe as DateTimePicker, $e as DateTimeRangePicker, ie as Divider, ae as EmptyState, oe as FileButton, se as FileInput, s as Flex, e as Grid, d as Group, m as Image, ce as Indicator, ue as Loader, de as LoadingOverlay, fe as Menu, me as Modal, ge as MultiSelect, t as NativeSelect, _e as NavLink, ve as Notification, ye as NumberInput, o as Pagination, be as Paper, xe as PasswordInput, Se as Pill, Ce as Popover, a as ProdigyLabelsProvider, we as Progress, Te as Radio, Ee as RingProgress, n as ScrollArea, De as SegmentedControl, ke as Select, c as SimpleGrid, l as Skeleton, g as Stack, Ae as Stepper, je as Switch, f as Table, Ne as Tabs, Pe as TagsInput, r as Text, v as TextInput, Fe as Textarea, Ie as ThemeIcon, i as Title, Le as Tooltip, ze as VisuallyHidden, Y as kelolaTheme, Y as theme };
|