spotlibs-components 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components/atoms → atoms}/icons/index.mjs +2 -2
- package/dist/{components/index.d.mts → index.d.mts} +1 -1
- package/dist/{components/index.mjs → index.mjs} +490 -678
- package/dist/index.mjs.map +1 -0
- package/dist/{components/mui → mui}/index.mjs +1 -1
- package/dist/{types-BkrxwBFm.d.mts → types-D1akE7ak.d.mts} +87 -149
- package/dist/types.d.mts +4 -0
- package/dist/utils/index.d.mts +104 -184
- package/package.json +3 -2
- package/src/utils/admin-kuota-nasional/constant.d.ts +23 -0
- package/src/utils/asset.d.ts +1 -0
- package/src/utils/booleanUtils.d.ts +2 -0
- package/src/utils/briguna-digital/constant.d.ts +2 -0
- package/src/utils/compress.d.ts +2 -0
- package/src/utils/compressImage.d.ts +6 -0
- package/src/utils/constants.d.ts +5 -0
- package/src/utils/cookies.d.ts +19 -0
- package/src/utils/crypto.d.ts +5 -0
- package/src/utils/decodeString.d.ts +1 -0
- package/src/utils/disableFormElements.d.ts +5 -0
- package/src/utils/excelUtils.d.ts +25 -0
- package/src/utils/exception.d.ts +19 -0
- package/src/utils/formatString.d.ts +25 -0
- package/src/utils/formatters/account.d.ts +2 -0
- package/src/utils/formatters/currency.d.ts +20 -0
- package/src/utils/formatters/date.d.ts +12 -0
- package/src/utils/formatters/index.d.ts +47 -0
- package/src/utils/formatters/string.d.ts +6 -0
- package/src/utils/generateImportExcel.d.ts +35 -0
- package/src/utils/generateTimestamp.d.ts +1 -0
- package/src/utils/handleApiError.d.ts +1 -0
- package/src/utils/index.d.ts +104 -0
- package/src/utils/json.d.ts +4 -0
- package/src/utils/localStorage.d.ts +1 -0
- package/src/utils/logger.d.ts +4 -0
- package/src/utils/schema/globalSchema.d.ts +8 -0
- package/src/utils/signature.d.ts +10 -0
- package/src/utils/specifics/korporasi/prakarsaKorporasiUtils.d.ts +5 -0
- package/src/utils/specifics/mikro/validationMaintenanceAgunanUtils.d.ts +2 -0
- package/src/utils/status.d.ts +37 -0
- package/src/utils/stringUtils.d.ts +22 -0
- package/src/utils/tipeBank.d.ts +3 -0
- package/dist/components/index.mjs.map +0 -1
- package/dist/components/types.d.mts +0 -4
- /package/dist/{components/atoms → atoms}/icons/index.d.mts +0 -0
- /package/dist/{components/atoms → atoms}/icons/index.mjs.map +0 -0
- /package/dist/{components/mui → mui}/index.d.mts +0 -0
- /package/dist/{components/mui → mui}/index.mjs.map +0 -0
- /package/dist/{components/types.mjs → types.mjs} +0 -0
- /package/dist/{components/types.mjs.map → types.mjs.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { __spreadValues, __spreadProps, __objRest } from '
|
|
2
|
+
import { Thumblock, IconFilePDF, IconFileCSV, IconFileJPG } from './chunk-F6KSEYVB.mjs';
|
|
3
|
+
export { AnalisisRisikoKreditNasabahIcon, AppendixIcon, BgBuilding, BgPerson, ChecklistDokumenPaketKreditIcon, CreditRiskRatingIcon, DefaultAvatarIcon, DefaultImageIcon, DokumenPenjagaanIcon, EmptyDataIcon, FilePdfIcon, IconFileCSV, IconFileDocx, IconFileDrive, IconFileJPG, IconFilePDF, IconFileXls, IconOnProcess, InformasiKursIcon, InformasiNasabahIcon, InformationIcon, MatriksRiskDanMitigationIcon, NoInternetConnectionIcon, NotulenRapatPraKomiteIcon, OfferingLetterIcon, PengajuanDanFasilitasKreditIcon, ProfitabilitasDanHubunganNasabahIcon, RekeningEscrowIcon, RekeningOprasionalIcon, RekeningTujuanIcon, RekomendasiPutusanIcon, RingkasanEksekutifIcon, ThumbDialogConfirm, ThumbDialogSuccess, ThumbDialogWarning, ThumbDialogWarningV2, ThumbModalError, ThumbOnProgress, ThumbSendFailed, ThumbSendSuccess, Thumblock } from './chunk-F6KSEYVB.mjs';
|
|
4
|
+
import { errorState, callAsset } from './chunk-UFE7HFT2.mjs';
|
|
5
|
+
import { __spreadValues, __spreadProps, __objRest } from './chunk-YOSPWY5K.mjs';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import React4, { useMemo, useState, useCallback, isValidElement, createElement, useEffect, useRef, Fragment as Fragment$1, useId } from 'react';
|
|
8
8
|
import KeyboardArrowRightRaw from '@mui/icons-material/KeyboardArrowRight';
|
|
@@ -12,17 +12,14 @@ import AlertRaw from '@mui/material/Alert';
|
|
|
12
12
|
import AlertTitleRaw from '@mui/material/AlertTitle';
|
|
13
13
|
import BoxRaw from '@mui/material/Box';
|
|
14
14
|
import MuiTypographyRaw from '@mui/material/Typography';
|
|
15
|
-
import { IconSquareCheckFilled, IconSquare, IconSquareMinusFilled, IconArrowsUpDown, IconArrowUp, IconArrowDown, IconAlertCircle,
|
|
15
|
+
import { IconSquareCheckFilled, IconSquare, IconSquareMinusFilled, IconArrowsUpDown, IconArrowUp, IconArrowDown, IconAlertCircle, IconCalendarWeekFilled, IconUpload as IconUpload$1, IconAlertTriangle, IconInfoCircle, IconCircleCheck, IconXboxXFilled, IconTrash as IconTrash$1 } from '@tabler/icons-react';
|
|
16
16
|
import ButtonBaseRaw from '@mui/material/ButtonBase';
|
|
17
|
-
import SkeletonRaw from '@mui/material/Skeleton';
|
|
18
|
-
import SwitchRaw from '@mui/material/Switch';
|
|
19
|
-
import { styled } from '@mui/material/styles';
|
|
20
17
|
import MuiCardRaw from '@mui/material/Card';
|
|
21
18
|
import CollapseRaw from '@mui/material/Collapse';
|
|
22
19
|
import KeyboardArrowDownIconRaw from '@mui/icons-material/KeyboardArrowDown';
|
|
23
20
|
import KeyboardArrowUpIconRaw from '@mui/icons-material/KeyboardArrowUp';
|
|
24
|
-
import
|
|
25
|
-
import
|
|
21
|
+
import SwitchRaw from '@mui/material/Switch';
|
|
22
|
+
import { styled } from '@mui/material/styles';
|
|
26
23
|
import MuiCheckboxRaw from '@mui/material/Checkbox';
|
|
27
24
|
import FormControlLabelRaw from '@mui/material/FormControlLabel';
|
|
28
25
|
import FormGroupRaw from '@mui/material/FormGroup';
|
|
@@ -2245,18 +2242,18 @@ var Radius = {
|
|
|
2245
2242
|
radius_4: "16px",
|
|
2246
2243
|
radius_x: "999px"
|
|
2247
2244
|
};
|
|
2248
|
-
var RadiusToken = (
|
|
2249
|
-
var
|
|
2245
|
+
var RadiusToken = (_a107) => {
|
|
2246
|
+
var _b107 = _a107, {
|
|
2250
2247
|
radius = "radius_0",
|
|
2251
2248
|
children,
|
|
2252
2249
|
sx = {}
|
|
2253
|
-
} =
|
|
2250
|
+
} = _b107, rest = __objRest(_b107, [
|
|
2254
2251
|
"radius",
|
|
2255
2252
|
"children",
|
|
2256
2253
|
"sx"
|
|
2257
2254
|
]);
|
|
2258
|
-
var
|
|
2259
|
-
const borderRadius = (
|
|
2255
|
+
var _a108;
|
|
2256
|
+
const borderRadius = (_a108 = Radius[radius]) != null ? _a108 : Radius.radius_0;
|
|
2260
2257
|
return /* @__PURE__ */ jsx(
|
|
2261
2258
|
Box,
|
|
2262
2259
|
__spreadProps(__spreadValues({
|
|
@@ -2397,12 +2394,12 @@ var VariantStyles = {
|
|
|
2397
2394
|
fontWeight: 400
|
|
2398
2395
|
}
|
|
2399
2396
|
};
|
|
2400
|
-
var BaseTypography = (
|
|
2401
|
-
var
|
|
2397
|
+
var BaseTypography = (_a107) => {
|
|
2398
|
+
var _b107 = _a107, {
|
|
2402
2399
|
variant = "body1_regular.default",
|
|
2403
2400
|
children,
|
|
2404
2401
|
sx
|
|
2405
|
-
} =
|
|
2402
|
+
} = _b107, props = __objRest(_b107, [
|
|
2406
2403
|
"variant",
|
|
2407
2404
|
"children",
|
|
2408
2405
|
"sx"
|
|
@@ -2470,17 +2467,17 @@ var CONTENT_SPACING_TOKENS = {
|
|
|
2470
2467
|
}
|
|
2471
2468
|
};
|
|
2472
2469
|
var resolveSpacingValue = (value, tokens) => {
|
|
2473
|
-
var
|
|
2470
|
+
var _a107;
|
|
2474
2471
|
if (typeof value === "number") return `${value}px`;
|
|
2475
|
-
if (typeof value === "string") return (
|
|
2472
|
+
if (typeof value === "string") return (_a107 = tokens[value]) != null ? _a107 : value;
|
|
2476
2473
|
return 0;
|
|
2477
2474
|
};
|
|
2478
|
-
var Spacing = (
|
|
2479
|
-
var
|
|
2475
|
+
var Spacing = (_a107) => {
|
|
2476
|
+
var _b107 = _a107, {
|
|
2480
2477
|
size = "spacing2",
|
|
2481
2478
|
axis = "vertical",
|
|
2482
2479
|
sx = {}
|
|
2483
|
-
} =
|
|
2480
|
+
} = _b107, rest = __objRest(_b107, [
|
|
2484
2481
|
"size",
|
|
2485
2482
|
"axis",
|
|
2486
2483
|
"sx"
|
|
@@ -2494,22 +2491,22 @@ var Spacing = (_a112) => {
|
|
|
2494
2491
|
}, rest)
|
|
2495
2492
|
);
|
|
2496
2493
|
};
|
|
2497
|
-
var ContentSpacing = (
|
|
2498
|
-
var
|
|
2494
|
+
var ContentSpacing = (_a107) => {
|
|
2495
|
+
var _b107 = _a107, {
|
|
2499
2496
|
size = "spacing_2",
|
|
2500
2497
|
breakpoint = "web",
|
|
2501
2498
|
children,
|
|
2502
2499
|
sx = {}
|
|
2503
|
-
} =
|
|
2500
|
+
} = _b107, rest = __objRest(_b107, [
|
|
2504
2501
|
"size",
|
|
2505
2502
|
"breakpoint",
|
|
2506
2503
|
"children",
|
|
2507
2504
|
"sx"
|
|
2508
2505
|
]);
|
|
2509
|
-
var
|
|
2506
|
+
var _a108;
|
|
2510
2507
|
const token = typeof size === "string" ? CONTENT_SPACING_TOKENS[size] : size;
|
|
2511
2508
|
if (!token) return null;
|
|
2512
|
-
const value = (
|
|
2509
|
+
const value = (_a108 = token[breakpoint]) != null ? _a108 : token.web;
|
|
2513
2510
|
return /* @__PURE__ */ jsx(
|
|
2514
2511
|
Box2,
|
|
2515
2512
|
__spreadProps(__spreadValues({
|
|
@@ -2555,8 +2552,8 @@ var ALERT_CONFIG = {
|
|
|
2555
2552
|
defaultIcon: IconAlertTriangle
|
|
2556
2553
|
}
|
|
2557
2554
|
};
|
|
2558
|
-
var BaseAlert = (
|
|
2559
|
-
var
|
|
2555
|
+
var BaseAlert = (_a107) => {
|
|
2556
|
+
var _b107 = _a107, {
|
|
2560
2557
|
variant = "default",
|
|
2561
2558
|
type = "standard",
|
|
2562
2559
|
title,
|
|
@@ -2566,7 +2563,7 @@ var BaseAlert = (_a112) => {
|
|
|
2566
2563
|
sx = {},
|
|
2567
2564
|
onClose,
|
|
2568
2565
|
childrenSx = {}
|
|
2569
|
-
} =
|
|
2566
|
+
} = _b107, props = __objRest(_b107, [
|
|
2570
2567
|
"variant",
|
|
2571
2568
|
"type",
|
|
2572
2569
|
"title",
|
|
@@ -2577,8 +2574,8 @@ var BaseAlert = (_a112) => {
|
|
|
2577
2574
|
"onClose",
|
|
2578
2575
|
"childrenSx"
|
|
2579
2576
|
]);
|
|
2580
|
-
var
|
|
2581
|
-
const config = (
|
|
2577
|
+
var _a108;
|
|
2578
|
+
const config = (_a108 = ALERT_CONFIG[variant]) != null ? _a108 : ALERT_CONFIG.default;
|
|
2582
2579
|
const hasChildrenSx = Object.keys(childrenSx).length > 0;
|
|
2583
2580
|
const renderIcon = useMemo(() => {
|
|
2584
2581
|
if (!icon) return false;
|
|
@@ -2643,12 +2640,12 @@ var Shadow = {
|
|
|
2643
2640
|
surface: "#FFFFFF"
|
|
2644
2641
|
}
|
|
2645
2642
|
};
|
|
2646
|
-
var ShadowToken = (
|
|
2647
|
-
var
|
|
2643
|
+
var ShadowToken = (_a107) => {
|
|
2644
|
+
var _b107 = _a107, {
|
|
2648
2645
|
level = "elevation_0",
|
|
2649
2646
|
children,
|
|
2650
2647
|
sx = {}
|
|
2651
|
-
} =
|
|
2648
|
+
} = _b107, rest = __objRest(_b107, [
|
|
2652
2649
|
"level",
|
|
2653
2650
|
"children",
|
|
2654
2651
|
"sx"
|
|
@@ -2740,8 +2737,8 @@ function getHoverColor(primitiveKey) {
|
|
|
2740
2737
|
const hoverKey = `${prefix}_${nextLevel}`;
|
|
2741
2738
|
return PrimitiveColor[hoverKey] || PrimitiveColor[primitiveKey];
|
|
2742
2739
|
}
|
|
2743
|
-
var BaseButton = (
|
|
2744
|
-
var
|
|
2740
|
+
var BaseButton = (_a107) => {
|
|
2741
|
+
var _b107 = _a107, {
|
|
2745
2742
|
onClick = () => {
|
|
2746
2743
|
},
|
|
2747
2744
|
children = null,
|
|
@@ -2754,7 +2751,7 @@ var BaseButton = (_a112) => {
|
|
|
2754
2751
|
endIcon = null,
|
|
2755
2752
|
width = "100%",
|
|
2756
2753
|
sx = {}
|
|
2757
|
-
} =
|
|
2754
|
+
} = _b107, rest = __objRest(_b107, [
|
|
2758
2755
|
"onClick",
|
|
2759
2756
|
"children",
|
|
2760
2757
|
"variant",
|
|
@@ -2774,36 +2771,36 @@ var BaseButton = (_a112) => {
|
|
|
2774
2771
|
const customColorValue = useCustom ? PrimitiveColor[customColor] : null;
|
|
2775
2772
|
const customHoverValue = useCustom ? getHoverColor(customColor) : null;
|
|
2776
2773
|
const getBackgroundColor = () => {
|
|
2777
|
-
var
|
|
2774
|
+
var _a108;
|
|
2778
2775
|
if (disabled) return isFill ? DISABLED_BG : "transparent";
|
|
2779
2776
|
if (useCustom) return isFill ? customColorValue : "transparent";
|
|
2780
|
-
if (isFill) return ((
|
|
2777
|
+
if (isFill) return ((_a108 = FILL_COLORS[color]) == null ? void 0 : _a108.bg) || FILL_COLORS.primary.bg;
|
|
2781
2778
|
return "transparent";
|
|
2782
2779
|
};
|
|
2783
2780
|
const getTextColor = () => {
|
|
2784
|
-
var
|
|
2781
|
+
var _a108, _b108;
|
|
2785
2782
|
if (disabled) return DISABLED_TEXT;
|
|
2786
2783
|
if (isFill) return WHITE;
|
|
2787
2784
|
if (useCustom) return customColorValue;
|
|
2788
|
-
if (isOutline) return ((
|
|
2789
|
-
if (isText) return ((
|
|
2785
|
+
if (isOutline) return ((_a108 = OUTLINE_COLORS[color]) == null ? void 0 : _a108.text) || OUTLINE_COLORS.primary.text;
|
|
2786
|
+
if (isText) return ((_b108 = OUTLINE_COLORS[color]) == null ? void 0 : _b108.text) || OUTLINE_COLORS.primary.text;
|
|
2790
2787
|
return DerivedColor.color_text_default;
|
|
2791
2788
|
};
|
|
2792
2789
|
const getBorderColor = () => {
|
|
2793
|
-
var
|
|
2790
|
+
var _a108;
|
|
2794
2791
|
if (!isOutline) return "none";
|
|
2795
2792
|
if (disabled) return `1.5px solid ${DISABLED_BG}`;
|
|
2796
2793
|
if (useCustom) return `1.5px solid ${customColorValue}`;
|
|
2797
|
-
return `1.5px solid ${((
|
|
2794
|
+
return `1.5px solid ${((_a108 = OUTLINE_COLORS[color]) == null ? void 0 : _a108.border) || OUTLINE_COLORS.primary.border}`;
|
|
2798
2795
|
};
|
|
2799
2796
|
const getHoverBg = () => {
|
|
2800
|
-
var
|
|
2797
|
+
var _a108, _b108;
|
|
2801
2798
|
if (disabled) return void 0;
|
|
2802
2799
|
if (useCustom) {
|
|
2803
2800
|
return isFill ? customHoverValue : customColorValue + "1A";
|
|
2804
2801
|
}
|
|
2805
|
-
if (isFill) return ((
|
|
2806
|
-
if (isOutline) return ((
|
|
2802
|
+
if (isFill) return ((_a108 = FILL_COLORS[color]) == null ? void 0 : _a108.hover) || FILL_COLORS.primary.hover;
|
|
2803
|
+
if (isOutline) return ((_b108 = OUTLINE_COLORS[color]) == null ? void 0 : _b108.hoverBg) || OUTLINE_COLORS.primary.hoverBg;
|
|
2807
2804
|
return void 0;
|
|
2808
2805
|
};
|
|
2809
2806
|
const getRadius = () => {
|
|
@@ -2885,200 +2882,17 @@ var BaseButton = (_a112) => {
|
|
|
2885
2882
|
);
|
|
2886
2883
|
};
|
|
2887
2884
|
var _a13, _b13;
|
|
2888
|
-
var
|
|
2885
|
+
var MuiCard = (_b13 = (_a13 = MuiCardRaw) == null ? void 0 : _a13.default) != null ? _b13 : MuiCardRaw;
|
|
2889
2886
|
var _a14, _b14;
|
|
2890
2887
|
var Box6 = (_b14 = (_a14 = BoxRaw) == null ? void 0 : _a14.default) != null ? _b14 : BoxRaw;
|
|
2891
|
-
var BaseSkeleton = (_a112) => {
|
|
2892
|
-
var _b112 = _a112, {
|
|
2893
|
-
variant = "rectangular",
|
|
2894
|
-
animation = "pulse",
|
|
2895
|
-
width,
|
|
2896
|
-
height,
|
|
2897
|
-
count = 1,
|
|
2898
|
-
gap = SpacingToken.spacing2,
|
|
2899
|
-
sx = {}
|
|
2900
|
-
} = _b112, rest = __objRest(_b112, [
|
|
2901
|
-
"variant",
|
|
2902
|
-
"animation",
|
|
2903
|
-
"width",
|
|
2904
|
-
"height",
|
|
2905
|
-
"count",
|
|
2906
|
-
"gap",
|
|
2907
|
-
"sx"
|
|
2908
|
-
]);
|
|
2909
|
-
const getRadius = () => {
|
|
2910
|
-
switch (variant) {
|
|
2911
|
-
case "circular":
|
|
2912
|
-
return "50%";
|
|
2913
|
-
case "rounded":
|
|
2914
|
-
return Radius.radius_2;
|
|
2915
|
-
case "text":
|
|
2916
|
-
case "rectangular":
|
|
2917
|
-
default:
|
|
2918
|
-
return Radius.radius_0;
|
|
2919
|
-
}
|
|
2920
|
-
};
|
|
2921
|
-
const getDefaultHeight = () => {
|
|
2922
|
-
switch (variant) {
|
|
2923
|
-
case "text":
|
|
2924
|
-
return "1.2em";
|
|
2925
|
-
case "circular":
|
|
2926
|
-
return width || 40;
|
|
2927
|
-
case "rectangular":
|
|
2928
|
-
case "rounded":
|
|
2929
|
-
return height || 60;
|
|
2930
|
-
default:
|
|
2931
|
-
return height;
|
|
2932
|
-
}
|
|
2933
|
-
};
|
|
2934
|
-
const getDefaultWidth = () => {
|
|
2935
|
-
switch (variant) {
|
|
2936
|
-
case "circular":
|
|
2937
|
-
return height || 40;
|
|
2938
|
-
case "text":
|
|
2939
|
-
return "100%";
|
|
2940
|
-
case "rectangular":
|
|
2941
|
-
case "rounded":
|
|
2942
|
-
return width || "100%";
|
|
2943
|
-
default:
|
|
2944
|
-
return width;
|
|
2945
|
-
}
|
|
2946
|
-
};
|
|
2947
|
-
const skeletonProps = __spreadValues({
|
|
2948
|
-
variant: variant === "rounded" ? "rectangular" : variant,
|
|
2949
|
-
animation: animation === "none" ? false : animation,
|
|
2950
|
-
width: getDefaultWidth(),
|
|
2951
|
-
height: getDefaultHeight(),
|
|
2952
|
-
sx: __spreadValues({
|
|
2953
|
-
borderRadius: getRadius()
|
|
2954
|
-
}, sx)
|
|
2955
|
-
}, rest);
|
|
2956
|
-
if (count <= 1) {
|
|
2957
|
-
return /* @__PURE__ */ jsx(Skeleton, __spreadValues({}, skeletonProps));
|
|
2958
|
-
}
|
|
2959
|
-
return /* @__PURE__ */ jsx(Box6, { sx: { display: "flex", flexDirection: "column", gap }, children: Array.from({ length: count }).map((_, index) => /* @__PURE__ */ jsx(Skeleton, __spreadValues({}, skeletonProps), index)) });
|
|
2960
|
-
};
|
|
2961
2888
|
var _a15, _b15;
|
|
2962
|
-
var
|
|
2963
|
-
var AntSwitch = styled(Switch)(({ theme }) => ({
|
|
2964
|
-
width: "34px",
|
|
2965
|
-
height: "18px",
|
|
2966
|
-
padding: 0,
|
|
2967
|
-
display: "flex",
|
|
2968
|
-
"&:active": {
|
|
2969
|
-
"& .MuiSwitch-thumb": { width: 15 },
|
|
2970
|
-
"& .MuiSwitch-switchBase.Mui-checked": {
|
|
2971
|
-
transform: "translateX(9px)"
|
|
2972
|
-
}
|
|
2973
|
-
},
|
|
2974
|
-
"& .MuiSwitch-switchBase": {
|
|
2975
|
-
padding: SpacingToken.spacing1,
|
|
2976
|
-
"&.Mui-checked": {
|
|
2977
|
-
transform: "translateX(16px)",
|
|
2978
|
-
color: DerivedColor.color_bg_surface,
|
|
2979
|
-
"& + .MuiSwitch-track": {
|
|
2980
|
-
opacity: 1,
|
|
2981
|
-
backgroundColor: DerivedColor.color_bg_brand_primary
|
|
2982
|
-
}
|
|
2983
|
-
}
|
|
2984
|
-
},
|
|
2985
|
-
"& .MuiSwitch-thumb": {
|
|
2986
|
-
boxShadow: "0 2px 4px 0 rgb(0 35 11 / 20%)",
|
|
2987
|
-
width: "10px",
|
|
2988
|
-
height: "10px",
|
|
2989
|
-
borderRadius: Radius.radius_x,
|
|
2990
|
-
transition: theme.transitions.create(["width"], { duration: 200 }),
|
|
2991
|
-
backgroundColor: DerivedColor.color_bg_surface
|
|
2992
|
-
},
|
|
2993
|
-
"& .MuiSwitch-track": {
|
|
2994
|
-
borderRadius: Radius.radius_x,
|
|
2995
|
-
opacity: 1,
|
|
2996
|
-
backgroundColor: theme.palette.mode === "dark" ? DerivedColor.color_text_disabled : DerivedColor.color_text_placeholder,
|
|
2997
|
-
boxSizing: "border-box"
|
|
2998
|
-
}
|
|
2999
|
-
}));
|
|
3000
|
-
var BaseSwitch = ({
|
|
3001
|
-
status = false,
|
|
3002
|
-
label,
|
|
3003
|
-
labelPlacement = "end",
|
|
3004
|
-
// start | end | top | bottom
|
|
3005
|
-
isDisabled = false,
|
|
3006
|
-
onChange
|
|
3007
|
-
}) => {
|
|
3008
|
-
const [checked, setChecked] = useState(status);
|
|
3009
|
-
useEffect(() => {
|
|
3010
|
-
setChecked(status);
|
|
3011
|
-
}, [status]);
|
|
3012
|
-
const handleChange = (event) => {
|
|
3013
|
-
setChecked(event.target.checked);
|
|
3014
|
-
onChange == null ? void 0 : onChange(event);
|
|
3015
|
-
};
|
|
3016
|
-
const layoutMap = {
|
|
3017
|
-
start: {
|
|
3018
|
-
gridAutoFlow: "column dense",
|
|
3019
|
-
direction: "rtl"
|
|
3020
|
-
},
|
|
3021
|
-
end: {
|
|
3022
|
-
gridAutoFlow: "column",
|
|
3023
|
-
direction: "ltr"
|
|
3024
|
-
},
|
|
3025
|
-
top: {
|
|
3026
|
-
gridAutoFlow: "row",
|
|
3027
|
-
direction: "ltr"
|
|
3028
|
-
},
|
|
3029
|
-
bottom: {
|
|
3030
|
-
gridAutoFlow: "row dense",
|
|
3031
|
-
direction: "rtl"
|
|
3032
|
-
}
|
|
3033
|
-
};
|
|
3034
|
-
const layout = layoutMap[labelPlacement] || layoutMap.end;
|
|
3035
|
-
return /* @__PURE__ */ jsxs(
|
|
3036
|
-
"div",
|
|
3037
|
-
{
|
|
3038
|
-
style: {
|
|
3039
|
-
display: "grid",
|
|
3040
|
-
gap: SpacingToken.spacing2,
|
|
3041
|
-
alignItems: "center",
|
|
3042
|
-
justifyItems: "start",
|
|
3043
|
-
gridAutoFlow: layout.gridAutoFlow,
|
|
3044
|
-
direction: layout.direction
|
|
3045
|
-
},
|
|
3046
|
-
children: [
|
|
3047
|
-
/* @__PURE__ */ jsx(
|
|
3048
|
-
AntSwitch,
|
|
3049
|
-
{
|
|
3050
|
-
checked,
|
|
3051
|
-
onChange: handleChange,
|
|
3052
|
-
disabled: isDisabled,
|
|
3053
|
-
inputProps: { "aria-label": "controlled" }
|
|
3054
|
-
}
|
|
3055
|
-
),
|
|
3056
|
-
label ? /* @__PURE__ */ jsx(
|
|
3057
|
-
"p",
|
|
3058
|
-
{
|
|
3059
|
-
style: __spreadProps(__spreadValues({}, VariantStyles.body1_regular), {
|
|
3060
|
-
color: isDisabled ? DerivedColor.color_text_placeholder : DerivedColor.color_text_default,
|
|
3061
|
-
margin: 0
|
|
3062
|
-
}),
|
|
3063
|
-
children: label
|
|
3064
|
-
}
|
|
3065
|
-
) : null
|
|
3066
|
-
]
|
|
3067
|
-
}
|
|
3068
|
-
);
|
|
3069
|
-
};
|
|
2889
|
+
var Collapse = (_b15 = (_a15 = CollapseRaw) == null ? void 0 : _a15.default) != null ? _b15 : CollapseRaw;
|
|
3070
2890
|
var _a16, _b16;
|
|
3071
|
-
var
|
|
2891
|
+
var IconButton2 = (_b16 = (_a16 = IconButtonRaw) == null ? void 0 : _a16.default) != null ? _b16 : IconButtonRaw;
|
|
3072
2892
|
var _a17, _b17;
|
|
3073
|
-
var
|
|
2893
|
+
var KeyboardArrowDownIcon = (_b17 = (_a17 = KeyboardArrowDownIconRaw) == null ? void 0 : _a17.default) != null ? _b17 : KeyboardArrowDownIconRaw;
|
|
3074
2894
|
var _a18, _b18;
|
|
3075
|
-
var
|
|
3076
|
-
var _a19, _b19;
|
|
3077
|
-
var IconButton2 = (_b19 = (_a19 = IconButtonRaw) == null ? void 0 : _a19.default) != null ? _b19 : IconButtonRaw;
|
|
3078
|
-
var _a20, _b20;
|
|
3079
|
-
var KeyboardArrowDownIcon = (_b20 = (_a20 = KeyboardArrowDownIconRaw) == null ? void 0 : _a20.default) != null ? _b20 : KeyboardArrowDownIconRaw;
|
|
3080
|
-
var _a21, _b21;
|
|
3081
|
-
var KeyboardArrowUpIcon = (_b21 = (_a21 = KeyboardArrowUpIconRaw) == null ? void 0 : _a21.default) != null ? _b21 : KeyboardArrowUpIconRaw;
|
|
2895
|
+
var KeyboardArrowUpIcon = (_b18 = (_a18 = KeyboardArrowUpIconRaw) == null ? void 0 : _a18.default) != null ? _b18 : KeyboardArrowUpIconRaw;
|
|
3082
2896
|
var HEADER_COLORS = {
|
|
3083
2897
|
primary: DerivedColor.color_bg_brand_primary,
|
|
3084
2898
|
secondary: DerivedColor.color_bg_brand_secondary,
|
|
@@ -3086,8 +2900,8 @@ var HEADER_COLORS = {
|
|
|
3086
2900
|
warning: DerivedColor.color_bg_warning,
|
|
3087
2901
|
danger: DerivedColor.color_bg_danger
|
|
3088
2902
|
};
|
|
3089
|
-
var BaseCard = (
|
|
3090
|
-
var
|
|
2903
|
+
var BaseCard = (_a107) => {
|
|
2904
|
+
var _b107 = _a107, {
|
|
3091
2905
|
variant = "default",
|
|
3092
2906
|
children = null,
|
|
3093
2907
|
color = "primary",
|
|
@@ -3102,10 +2916,8 @@ var BaseCard = (_a112) => {
|
|
|
3102
2916
|
showStartIcon = false,
|
|
3103
2917
|
showEndIcon = false,
|
|
3104
2918
|
footer = null,
|
|
3105
|
-
isWatermark = false,
|
|
3106
|
-
watermarkText = "",
|
|
3107
2919
|
sx = {}
|
|
3108
|
-
} =
|
|
2920
|
+
} = _b107, rest = __objRest(_b107, [
|
|
3109
2921
|
"variant",
|
|
3110
2922
|
"children",
|
|
3111
2923
|
"color",
|
|
@@ -3120,8 +2932,6 @@ var BaseCard = (_a112) => {
|
|
|
3120
2932
|
"showStartIcon",
|
|
3121
2933
|
"showEndIcon",
|
|
3122
2934
|
"footer",
|
|
3123
|
-
"isWatermark",
|
|
3124
|
-
"watermarkText",
|
|
3125
2935
|
"sx"
|
|
3126
2936
|
]);
|
|
3127
2937
|
const [open, setOpen] = useState(true);
|
|
@@ -3137,13 +2947,12 @@ var BaseCard = (_a112) => {
|
|
|
3137
2947
|
borderRadius: Radius.radius_2,
|
|
3138
2948
|
backgroundColor: cardBg,
|
|
3139
2949
|
border: `1px solid ${borderColor}`,
|
|
3140
|
-
overflow: "
|
|
2950
|
+
overflow: "visible",
|
|
3141
2951
|
boxShadow: "none",
|
|
3142
|
-
padding: SpacingToken.spacing4
|
|
3143
|
-
position: "relative"
|
|
2952
|
+
padding: SpacingToken.spacing4
|
|
3144
2953
|
}, sx)
|
|
3145
2954
|
}, rest), {
|
|
3146
|
-
children
|
|
2955
|
+
children
|
|
3147
2956
|
})
|
|
3148
2957
|
);
|
|
3149
2958
|
}
|
|
@@ -3160,7 +2969,7 @@ var BaseCard = (_a112) => {
|
|
|
3160
2969
|
}, rest), {
|
|
3161
2970
|
children: [
|
|
3162
2971
|
/* @__PURE__ */ jsxs(
|
|
3163
|
-
|
|
2972
|
+
Box6,
|
|
3164
2973
|
{
|
|
3165
2974
|
onClick: () => isCollapsible && setOpen(!open),
|
|
3166
2975
|
sx: {
|
|
@@ -3174,11 +2983,11 @@ var BaseCard = (_a112) => {
|
|
|
3174
2983
|
borderTopRightRadius: Radius.radius_2
|
|
3175
2984
|
},
|
|
3176
2985
|
children: [
|
|
3177
|
-
/* @__PURE__ */ jsxs(
|
|
3178
|
-
showStartIcon && startIcon && /* @__PURE__ */ jsx(
|
|
3179
|
-
/* @__PURE__ */ jsxs(
|
|
2986
|
+
/* @__PURE__ */ jsxs(Box6, { sx: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
2987
|
+
showStartIcon && startIcon && /* @__PURE__ */ jsx(Box6, { sx: { display: "flex", alignItems: "center", lineHeight: 0 }, children: startIcon }),
|
|
2988
|
+
/* @__PURE__ */ jsxs(Box6, { children: [
|
|
3180
2989
|
/* @__PURE__ */ jsx(
|
|
3181
|
-
|
|
2990
|
+
Box6,
|
|
3182
2991
|
{
|
|
3183
2992
|
component: "span",
|
|
3184
2993
|
sx: {
|
|
@@ -3191,7 +3000,7 @@ var BaseCard = (_a112) => {
|
|
|
3191
3000
|
}
|
|
3192
3001
|
),
|
|
3193
3002
|
showSubtitle && subtitle && /* @__PURE__ */ jsx(
|
|
3194
|
-
|
|
3003
|
+
Box6,
|
|
3195
3004
|
{
|
|
3196
3005
|
component: "span",
|
|
3197
3006
|
sx: {
|
|
@@ -3206,8 +3015,8 @@ var BaseCard = (_a112) => {
|
|
|
3206
3015
|
)
|
|
3207
3016
|
] })
|
|
3208
3017
|
] }),
|
|
3209
|
-
/* @__PURE__ */ jsxs(
|
|
3210
|
-
showEndIcon && endIcon && /* @__PURE__ */ jsx(
|
|
3018
|
+
/* @__PURE__ */ jsxs(Box6, { sx: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3019
|
+
showEndIcon && endIcon && /* @__PURE__ */ jsx(Box6, { sx: { display: "flex", alignItems: "center", lineHeight: 0 }, children: endIcon }),
|
|
3211
3020
|
isCollapsible && /* @__PURE__ */ jsx(
|
|
3212
3021
|
IconButton2,
|
|
3213
3022
|
{
|
|
@@ -3225,13 +3034,13 @@ var BaseCard = (_a112) => {
|
|
|
3225
3034
|
}
|
|
3226
3035
|
),
|
|
3227
3036
|
/* @__PURE__ */ jsx(Collapse, { in: !isCollapsible || open, timeout: 300, children: /* @__PURE__ */ jsx(
|
|
3228
|
-
|
|
3037
|
+
Box6,
|
|
3229
3038
|
{
|
|
3230
3039
|
sx: {
|
|
3231
3040
|
padding: SpacingToken.spacing4,
|
|
3232
3041
|
backgroundColor: cardBg
|
|
3233
3042
|
},
|
|
3234
|
-
children
|
|
3043
|
+
children
|
|
3235
3044
|
}
|
|
3236
3045
|
) })
|
|
3237
3046
|
]
|
|
@@ -3251,7 +3060,7 @@ var BaseCard = (_a112) => {
|
|
|
3251
3060
|
}, rest), {
|
|
3252
3061
|
children: [
|
|
3253
3062
|
/* @__PURE__ */ jsxs(
|
|
3254
|
-
|
|
3063
|
+
Box6,
|
|
3255
3064
|
{
|
|
3256
3065
|
onClick: () => isCollapsible && setOpen(!open),
|
|
3257
3066
|
sx: {
|
|
@@ -3265,11 +3074,11 @@ var BaseCard = (_a112) => {
|
|
|
3265
3074
|
borderTopRightRadius: Radius.radius_2
|
|
3266
3075
|
},
|
|
3267
3076
|
children: [
|
|
3268
|
-
/* @__PURE__ */ jsxs(
|
|
3269
|
-
showStartIcon && startIcon && /* @__PURE__ */ jsx(
|
|
3270
|
-
/* @__PURE__ */ jsxs(
|
|
3077
|
+
/* @__PURE__ */ jsxs(Box6, { sx: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3078
|
+
showStartIcon && startIcon && /* @__PURE__ */ jsx(Box6, { sx: { display: "flex", alignItems: "center", lineHeight: 0 }, children: startIcon }),
|
|
3079
|
+
/* @__PURE__ */ jsxs(Box6, { children: [
|
|
3271
3080
|
/* @__PURE__ */ jsx(
|
|
3272
|
-
|
|
3081
|
+
Box6,
|
|
3273
3082
|
{
|
|
3274
3083
|
component: "span",
|
|
3275
3084
|
sx: {
|
|
@@ -3282,7 +3091,7 @@ var BaseCard = (_a112) => {
|
|
|
3282
3091
|
}
|
|
3283
3092
|
),
|
|
3284
3093
|
showSubtitle && subtitle && /* @__PURE__ */ jsx(
|
|
3285
|
-
|
|
3094
|
+
Box6,
|
|
3286
3095
|
{
|
|
3287
3096
|
component: "span",
|
|
3288
3097
|
sx: {
|
|
@@ -3297,8 +3106,8 @@ var BaseCard = (_a112) => {
|
|
|
3297
3106
|
)
|
|
3298
3107
|
] })
|
|
3299
3108
|
] }),
|
|
3300
|
-
/* @__PURE__ */ jsxs(
|
|
3301
|
-
showEndIcon && endIcon && /* @__PURE__ */ jsx(
|
|
3109
|
+
/* @__PURE__ */ jsxs(Box6, { sx: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3110
|
+
showEndIcon && endIcon && /* @__PURE__ */ jsx(Box6, { sx: { display: "flex", alignItems: "center", lineHeight: 0 }, children: endIcon }),
|
|
3302
3111
|
isCollapsible && /* @__PURE__ */ jsx(
|
|
3303
3112
|
IconButton2,
|
|
3304
3113
|
{
|
|
@@ -3316,17 +3125,17 @@ var BaseCard = (_a112) => {
|
|
|
3316
3125
|
}
|
|
3317
3126
|
),
|
|
3318
3127
|
/* @__PURE__ */ jsx(Collapse, { in: !isCollapsible || open, timeout: 300, children: /* @__PURE__ */ jsx(
|
|
3319
|
-
|
|
3128
|
+
Box6,
|
|
3320
3129
|
{
|
|
3321
3130
|
sx: {
|
|
3322
3131
|
padding: SpacingToken.spacing4,
|
|
3323
3132
|
backgroundColor: cardBg
|
|
3324
3133
|
},
|
|
3325
|
-
children
|
|
3134
|
+
children
|
|
3326
3135
|
}
|
|
3327
3136
|
) }),
|
|
3328
3137
|
footer && /* @__PURE__ */ jsx(
|
|
3329
|
-
|
|
3138
|
+
Box6,
|
|
3330
3139
|
{
|
|
3331
3140
|
sx: {
|
|
3332
3141
|
padding: SpacingToken.spacing4,
|
|
@@ -3356,120 +3165,123 @@ var BaseCard = (_a112) => {
|
|
|
3356
3165
|
})
|
|
3357
3166
|
);
|
|
3358
3167
|
};
|
|
3359
|
-
var
|
|
3360
|
-
var
|
|
3361
|
-
var
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
bg: PrimitiveColor.color_red_100,
|
|
3372
|
-
text: PrimitiveColor.color_red_700
|
|
3168
|
+
var _a19, _b19;
|
|
3169
|
+
var Switch = (_b19 = (_a19 = SwitchRaw) == null ? void 0 : _a19.default) != null ? _b19 : SwitchRaw;
|
|
3170
|
+
var AntSwitch = styled(Switch)(({ theme }) => ({
|
|
3171
|
+
width: "34px",
|
|
3172
|
+
height: "18px",
|
|
3173
|
+
padding: 0,
|
|
3174
|
+
display: "flex",
|
|
3175
|
+
"&:active": {
|
|
3176
|
+
"& .MuiSwitch-thumb": { width: 15 },
|
|
3177
|
+
"& .MuiSwitch-switchBase.Mui-checked": {
|
|
3178
|
+
transform: "translateX(9px)"
|
|
3179
|
+
}
|
|
3373
3180
|
},
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3181
|
+
"& .MuiSwitch-switchBase": {
|
|
3182
|
+
padding: SpacingToken.spacing1,
|
|
3183
|
+
"&.Mui-checked": {
|
|
3184
|
+
transform: "translateX(16px)",
|
|
3185
|
+
color: DerivedColor.color_bg_surface,
|
|
3186
|
+
"& + .MuiSwitch-track": {
|
|
3187
|
+
opacity: 1,
|
|
3188
|
+
backgroundColor: DerivedColor.color_bg_brand_primary
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3377
3191
|
},
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3192
|
+
"& .MuiSwitch-thumb": {
|
|
3193
|
+
boxShadow: "0 2px 4px 0 rgb(0 35 11 / 20%)",
|
|
3194
|
+
width: "10px",
|
|
3195
|
+
height: "10px",
|
|
3196
|
+
borderRadius: Radius.radius_x,
|
|
3197
|
+
transition: theme.transitions.create(["width"], { duration: 200 }),
|
|
3198
|
+
backgroundColor: DerivedColor.color_bg_surface
|
|
3381
3199
|
},
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3200
|
+
"& .MuiSwitch-track": {
|
|
3201
|
+
borderRadius: Radius.radius_x,
|
|
3202
|
+
opacity: 1,
|
|
3203
|
+
backgroundColor: theme.palette.mode === "dark" ? DerivedColor.color_text_disabled : DerivedColor.color_text_placeholder,
|
|
3204
|
+
boxSizing: "border-box"
|
|
3385
3205
|
}
|
|
3386
|
-
};
|
|
3387
|
-
var
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
}
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
"& .MuiAlert-action": {
|
|
3456
|
-
pt: 0
|
|
3457
|
-
}
|
|
3458
|
-
}, sx),
|
|
3459
|
-
children: message
|
|
3460
|
-
}
|
|
3461
|
-
)
|
|
3462
|
-
})
|
|
3206
|
+
}));
|
|
3207
|
+
var BaseSwitch = ({
|
|
3208
|
+
status = false,
|
|
3209
|
+
label,
|
|
3210
|
+
labelPlacement = "end",
|
|
3211
|
+
// start | end | top | bottom
|
|
3212
|
+
isDisabled = false,
|
|
3213
|
+
onChange
|
|
3214
|
+
}) => {
|
|
3215
|
+
const [checked, setChecked] = useState(status);
|
|
3216
|
+
useEffect(() => {
|
|
3217
|
+
setChecked(status);
|
|
3218
|
+
}, [status]);
|
|
3219
|
+
const handleChange = (event) => {
|
|
3220
|
+
setChecked(event.target.checked);
|
|
3221
|
+
onChange == null ? void 0 : onChange(event);
|
|
3222
|
+
};
|
|
3223
|
+
const layoutMap = {
|
|
3224
|
+
start: {
|
|
3225
|
+
gridAutoFlow: "column dense",
|
|
3226
|
+
direction: "rtl"
|
|
3227
|
+
},
|
|
3228
|
+
end: {
|
|
3229
|
+
gridAutoFlow: "column",
|
|
3230
|
+
direction: "ltr"
|
|
3231
|
+
},
|
|
3232
|
+
top: {
|
|
3233
|
+
gridAutoFlow: "row",
|
|
3234
|
+
direction: "ltr"
|
|
3235
|
+
},
|
|
3236
|
+
bottom: {
|
|
3237
|
+
gridAutoFlow: "row dense",
|
|
3238
|
+
direction: "rtl"
|
|
3239
|
+
}
|
|
3240
|
+
};
|
|
3241
|
+
const layout = layoutMap[labelPlacement] || layoutMap.end;
|
|
3242
|
+
return /* @__PURE__ */ jsxs(
|
|
3243
|
+
"div",
|
|
3244
|
+
{
|
|
3245
|
+
style: {
|
|
3246
|
+
display: "grid",
|
|
3247
|
+
gap: SpacingToken.spacing2,
|
|
3248
|
+
alignItems: "center",
|
|
3249
|
+
justifyItems: "start",
|
|
3250
|
+
gridAutoFlow: layout.gridAutoFlow,
|
|
3251
|
+
direction: layout.direction
|
|
3252
|
+
},
|
|
3253
|
+
children: [
|
|
3254
|
+
/* @__PURE__ */ jsx(
|
|
3255
|
+
AntSwitch,
|
|
3256
|
+
{
|
|
3257
|
+
checked,
|
|
3258
|
+
onChange: handleChange,
|
|
3259
|
+
disabled: isDisabled,
|
|
3260
|
+
inputProps: { "aria-label": "controlled" }
|
|
3261
|
+
}
|
|
3262
|
+
),
|
|
3263
|
+
label ? /* @__PURE__ */ jsx(
|
|
3264
|
+
"p",
|
|
3265
|
+
{
|
|
3266
|
+
style: __spreadProps(__spreadValues({}, VariantStyles.body1_regular), {
|
|
3267
|
+
color: isDisabled ? DerivedColor.color_text_placeholder : DerivedColor.color_text_default,
|
|
3268
|
+
margin: 0
|
|
3269
|
+
}),
|
|
3270
|
+
children: label
|
|
3271
|
+
}
|
|
3272
|
+
) : null
|
|
3273
|
+
]
|
|
3274
|
+
}
|
|
3463
3275
|
);
|
|
3464
3276
|
};
|
|
3465
|
-
var
|
|
3466
|
-
var MuiCheckbox = (
|
|
3467
|
-
var
|
|
3468
|
-
var FormControlLabel = (
|
|
3469
|
-
var
|
|
3470
|
-
var FormGroup = (
|
|
3471
|
-
var BaseCheckbox = (
|
|
3472
|
-
var
|
|
3277
|
+
var _a20, _b20;
|
|
3278
|
+
var MuiCheckbox = (_b20 = (_a20 = MuiCheckboxRaw) == null ? void 0 : _a20.default) != null ? _b20 : MuiCheckboxRaw;
|
|
3279
|
+
var _a21, _b21;
|
|
3280
|
+
var FormControlLabel = (_b21 = (_a21 = FormControlLabelRaw) == null ? void 0 : _a21.default) != null ? _b21 : FormControlLabelRaw;
|
|
3281
|
+
var _a22, _b22;
|
|
3282
|
+
var FormGroup = (_b22 = (_a22 = FormGroupRaw) == null ? void 0 : _a22.default) != null ? _b22 : FormGroupRaw;
|
|
3283
|
+
var BaseCheckbox = (_a107) => {
|
|
3284
|
+
var _b107 = _a107, {
|
|
3473
3285
|
checked,
|
|
3474
3286
|
onChange,
|
|
3475
3287
|
options,
|
|
@@ -3478,7 +3290,7 @@ var BaseCheckbox = (_a112) => {
|
|
|
3478
3290
|
labelPlacement = "end",
|
|
3479
3291
|
isHorizontal = false,
|
|
3480
3292
|
sx
|
|
3481
|
-
} =
|
|
3293
|
+
} = _b107, restProps = __objRest(_b107, [
|
|
3482
3294
|
"checked",
|
|
3483
3295
|
"onChange",
|
|
3484
3296
|
"options",
|
|
@@ -3503,7 +3315,7 @@ var BaseCheckbox = (_a112) => {
|
|
|
3503
3315
|
};
|
|
3504
3316
|
if (isGroup) {
|
|
3505
3317
|
return /* @__PURE__ */ jsx(FormGroup, { row: isHorizontal, sx: { gap: isHorizontal ? 2 : 0 }, children: options.map((option) => {
|
|
3506
|
-
var
|
|
3318
|
+
var _a108, _b108;
|
|
3507
3319
|
return /* @__PURE__ */ jsx(
|
|
3508
3320
|
FormControlLabel,
|
|
3509
3321
|
{
|
|
@@ -3515,8 +3327,8 @@ var BaseCheckbox = (_a112) => {
|
|
|
3515
3327
|
checked: (checked || []).includes(option.value),
|
|
3516
3328
|
onChange: (e) => handleGroupChange(option.value, e.target.checked),
|
|
3517
3329
|
icon: /* @__PURE__ */ jsx(IconSquare, { size: 22, color: DerivedColor.color_border_default }),
|
|
3518
|
-
checkedIcon: /* @__PURE__ */ jsx(IconSquareCheckFilled, { size: 22, color: ((
|
|
3519
|
-
disabled: (
|
|
3330
|
+
checkedIcon: /* @__PURE__ */ jsx(IconSquareCheckFilled, { size: 22, color: ((_a108 = option.disabled) != null ? _a108 : disabled) ? DerivedColor.color_bg_disabled : DerivedColor.color_bg_brand_primary }),
|
|
3331
|
+
disabled: (_b108 = option.disabled) != null ? _b108 : disabled,
|
|
3520
3332
|
sx: __spreadValues({
|
|
3521
3333
|
":hover": { backgroundColor: "#C0DBF1" }
|
|
3522
3334
|
}, sx)
|
|
@@ -3548,28 +3360,28 @@ var BaseCheckbox = (_a112) => {
|
|
|
3548
3360
|
}
|
|
3549
3361
|
);
|
|
3550
3362
|
};
|
|
3363
|
+
var _a23, _b23;
|
|
3364
|
+
var Box7 = (_b23 = (_a23 = BoxRaw) == null ? void 0 : _a23.default) != null ? _b23 : BoxRaw;
|
|
3365
|
+
var _a24, _b24;
|
|
3366
|
+
var Checkbox = (_b24 = (_a24 = MuiCheckboxRaw) == null ? void 0 : _a24.default) != null ? _b24 : MuiCheckboxRaw;
|
|
3367
|
+
var _a25, _b25;
|
|
3368
|
+
var CircularProgress = (_b25 = (_a25 = CircularProgressRaw) == null ? void 0 : _a25.default) != null ? _b25 : CircularProgressRaw;
|
|
3369
|
+
var _a26, _b26;
|
|
3370
|
+
var Paper = (_b26 = (_a26 = PaperRaw) == null ? void 0 : _a26.default) != null ? _b26 : PaperRaw;
|
|
3371
|
+
var _a27, _b27;
|
|
3372
|
+
var Table = (_b27 = (_a27 = TableRaw) == null ? void 0 : _a27.default) != null ? _b27 : TableRaw;
|
|
3551
3373
|
var _a28, _b28;
|
|
3552
|
-
var
|
|
3374
|
+
var TableBody = (_b28 = (_a28 = TableBodyRaw) == null ? void 0 : _a28.default) != null ? _b28 : TableBodyRaw;
|
|
3553
3375
|
var _a29, _b29;
|
|
3554
|
-
var
|
|
3376
|
+
var TableCell = (_b29 = (_a29 = TableCellRaw) == null ? void 0 : _a29.default) != null ? _b29 : TableCellRaw;
|
|
3555
3377
|
var _a30, _b30;
|
|
3556
|
-
var
|
|
3378
|
+
var TableContainer = (_b30 = (_a30 = TableContainerRaw) == null ? void 0 : _a30.default) != null ? _b30 : TableContainerRaw;
|
|
3557
3379
|
var _a31, _b31;
|
|
3558
|
-
var
|
|
3380
|
+
var TableHead = (_b31 = (_a31 = TableHeadRaw) == null ? void 0 : _a31.default) != null ? _b31 : TableHeadRaw;
|
|
3559
3381
|
var _a32, _b32;
|
|
3560
|
-
var
|
|
3382
|
+
var TablePagination = (_b32 = (_a32 = TablePaginationRaw) == null ? void 0 : _a32.default) != null ? _b32 : TablePaginationRaw;
|
|
3561
3383
|
var _a33, _b33;
|
|
3562
|
-
var
|
|
3563
|
-
var _a34, _b34;
|
|
3564
|
-
var TableCell = (_b34 = (_a34 = TableCellRaw) == null ? void 0 : _a34.default) != null ? _b34 : TableCellRaw;
|
|
3565
|
-
var _a35, _b35;
|
|
3566
|
-
var TableContainer = (_b35 = (_a35 = TableContainerRaw) == null ? void 0 : _a35.default) != null ? _b35 : TableContainerRaw;
|
|
3567
|
-
var _a36, _b36;
|
|
3568
|
-
var TableHead = (_b36 = (_a36 = TableHeadRaw) == null ? void 0 : _a36.default) != null ? _b36 : TableHeadRaw;
|
|
3569
|
-
var _a37, _b37;
|
|
3570
|
-
var TablePagination = (_b37 = (_a37 = TablePaginationRaw) == null ? void 0 : _a37.default) != null ? _b37 : TablePaginationRaw;
|
|
3571
|
-
var _a38, _b38;
|
|
3572
|
-
var TableRow = (_b38 = (_a38 = TableRowRaw) == null ? void 0 : _a38.default) != null ? _b38 : TableRowRaw;
|
|
3384
|
+
var TableRow = (_b33 = (_a33 = TableRowRaw) == null ? void 0 : _a33.default) != null ? _b33 : TableRowRaw;
|
|
3573
3385
|
var DEFAULT_COLUMN_WIDTH = 160;
|
|
3574
3386
|
var HEADER_ROW_HEIGHT = 48;
|
|
3575
3387
|
var SELECTION_COLUMN_WIDTH = 56;
|
|
@@ -3603,13 +3415,13 @@ var compareValue = (a, b) => {
|
|
|
3603
3415
|
});
|
|
3604
3416
|
};
|
|
3605
3417
|
var getColumnWidth = (column) => {
|
|
3606
|
-
var
|
|
3607
|
-
return Number((
|
|
3418
|
+
var _a107, _b107;
|
|
3419
|
+
return Number((_b107 = (_a107 = column.width) != null ? _a107 : column.minWidth) != null ? _b107 : DEFAULT_COLUMN_WIDTH);
|
|
3608
3420
|
};
|
|
3609
3421
|
var getStickyLeft = (widths, index) => widths.slice(0, index).reduce((sum, width) => sum + width, 0);
|
|
3610
3422
|
var getStickyRight = (widths, index) => widths.slice(index + 1).reduce((sum, width) => sum + width, 0);
|
|
3611
3423
|
var normalizeColumn = (column, index, sortingEnabled) => {
|
|
3612
|
-
var
|
|
3424
|
+
var _a107, _b107, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
3613
3425
|
if (typeof column === "string") {
|
|
3614
3426
|
return {
|
|
3615
3427
|
id: getLastPathSegment(column) || `column-${index}`,
|
|
@@ -3622,7 +3434,7 @@ var normalizeColumn = (column, index, sortingEnabled) => {
|
|
|
3622
3434
|
headerAlign: "center"
|
|
3623
3435
|
};
|
|
3624
3436
|
}
|
|
3625
|
-
const accessorKey = (_c = (
|
|
3437
|
+
const accessorKey = (_c = (_b107 = (_a107 = column.accessorKey) != null ? _a107 : column.key) != null ? _b107 : column.field) != null ? _c : column.id;
|
|
3626
3438
|
const id2 = (_e = (_d = column.id) != null ? _d : getLastPathSegment(accessorKey)) != null ? _e : `column-${index}`;
|
|
3627
3439
|
return __spreadProps(__spreadValues({
|
|
3628
3440
|
width: DEFAULT_COLUMN_WIDTH,
|
|
@@ -3642,12 +3454,12 @@ var normalizeHeaderRows = (header, columns) => {
|
|
|
3642
3454
|
}
|
|
3643
3455
|
return [
|
|
3644
3456
|
columns.map((column) => {
|
|
3645
|
-
var
|
|
3457
|
+
var _a107, _b107;
|
|
3646
3458
|
return {
|
|
3647
3459
|
id: column.id,
|
|
3648
3460
|
key: column.id,
|
|
3649
3461
|
label: column.header,
|
|
3650
|
-
align: (
|
|
3462
|
+
align: (_b107 = (_a107 = column.headerAlign) != null ? _a107 : column.align) != null ? _b107 : "center",
|
|
3651
3463
|
rowSpan: 1
|
|
3652
3464
|
};
|
|
3653
3465
|
})
|
|
@@ -3656,13 +3468,13 @@ var normalizeHeaderRows = (header, columns) => {
|
|
|
3656
3468
|
var buildHeaderLayout = (headerRows) => {
|
|
3657
3469
|
const occupied = [];
|
|
3658
3470
|
return headerRows.map((row, rowIndex) => {
|
|
3659
|
-
var
|
|
3660
|
-
(
|
|
3471
|
+
var _a107;
|
|
3472
|
+
(_a107 = occupied[rowIndex]) != null ? _a107 : occupied[rowIndex] = [];
|
|
3661
3473
|
let pointer = 0;
|
|
3662
3474
|
return row.map((cell, cellIndex) => {
|
|
3663
|
-
var
|
|
3475
|
+
var _a108, _b107, _c, _d, _e, _f, _g;
|
|
3664
3476
|
while (occupied[rowIndex][pointer]) pointer += 1;
|
|
3665
|
-
const colSpan = (
|
|
3477
|
+
const colSpan = (_b107 = (_a108 = cell.colSpan) != null ? _a108 : cell.colspan) != null ? _b107 : 1;
|
|
3666
3478
|
const rowSpan = (_d = (_c = cell.rowSpan) != null ? _c : cell.rowspan) != null ? _d : 1;
|
|
3667
3479
|
const start = pointer;
|
|
3668
3480
|
for (let r = rowIndex; r < rowIndex + rowSpan; r += 1) {
|
|
@@ -3698,8 +3510,8 @@ var renderSortIcon = (sortKey, sortState) => {
|
|
|
3698
3510
|
return sortState.direction === "asc" ? /* @__PURE__ */ jsx(IconArrowUp, { size: 16, color: activeColor }) : /* @__PURE__ */ jsx(IconArrowDown, { size: 16, color: activeColor });
|
|
3699
3511
|
};
|
|
3700
3512
|
var getSortField = (column) => {
|
|
3701
|
-
var
|
|
3702
|
-
return (_c = (
|
|
3513
|
+
var _a107, _b107, _c;
|
|
3514
|
+
return (_c = (_b107 = (_a107 = column.sortField) != null ? _a107 : column.accessorKey) != null ? _b107 : column.key) != null ? _c : column.id;
|
|
3703
3515
|
};
|
|
3704
3516
|
var BaseDatatable = ({
|
|
3705
3517
|
columns = EMPTY_ARRAY,
|
|
@@ -3720,7 +3532,7 @@ var BaseDatatable = ({
|
|
|
3720
3532
|
containerSx = EMPTY_OBJECT,
|
|
3721
3533
|
tableSx = EMPTY_OBJECT
|
|
3722
3534
|
}) => {
|
|
3723
|
-
var
|
|
3535
|
+
var _a107, _b107, _c, _d, _e;
|
|
3724
3536
|
const featureConfig = useMemo(
|
|
3725
3537
|
() => __spreadValues({
|
|
3726
3538
|
sorting: false,
|
|
@@ -3768,7 +3580,7 @@ var BaseDatatable = ({
|
|
|
3768
3580
|
const [internalSelectedIds, setInternalSelectedIds] = useState(
|
|
3769
3581
|
selectionConfig.defaultSelectedRowIds
|
|
3770
3582
|
);
|
|
3771
|
-
const [internalPage, setInternalPage] = useState((
|
|
3583
|
+
const [internalPage, setInternalPage] = useState((_a107 = paginationConfig.page) != null ? _a107 : 0);
|
|
3772
3584
|
const [internalRowsPerPage, setInternalRowsPerPage] = useState(
|
|
3773
3585
|
paginationConfig.rowsPerPage
|
|
3774
3586
|
);
|
|
@@ -3777,7 +3589,7 @@ var BaseDatatable = ({
|
|
|
3777
3589
|
const isRowSelectable = selectionConfig.isRowSelectable;
|
|
3778
3590
|
const selectionPosition = selectionConfig.position;
|
|
3779
3591
|
const selectedIds = controlledSelectedIds != null ? controlledSelectedIds : internalSelectedIds;
|
|
3780
|
-
const sortState = (
|
|
3592
|
+
const sortState = (_b107 = featureConfig.sortState) != null ? _b107 : internalSortState;
|
|
3781
3593
|
const currentPage = (_c = pagination.page) != null ? _c : internalPage;
|
|
3782
3594
|
const currentRowsPerPage = (_d = pagination.rowsPerPage) != null ? _d : internalRowsPerPage;
|
|
3783
3595
|
const isHeaderInteractive = typeof featureConfig.headerInteractive === "boolean" ? featureConfig.headerInteractive : featureConfig.sorting;
|
|
@@ -3814,8 +3626,8 @@ var BaseDatatable = ({
|
|
|
3814
3626
|
);
|
|
3815
3627
|
const resolveRowId = useCallback(
|
|
3816
3628
|
(row, rowIndex) => {
|
|
3817
|
-
var
|
|
3818
|
-
return (
|
|
3629
|
+
var _a108, _b108;
|
|
3630
|
+
return (_b108 = (_a108 = getRowId == null ? void 0 : getRowId(row, rowIndex)) != null ? _a108 : row == null ? void 0 : row.id) != null ? _b108 : rowIndex;
|
|
3819
3631
|
},
|
|
3820
3632
|
[getRowId]
|
|
3821
3633
|
);
|
|
@@ -3938,17 +3750,17 @@ var BaseDatatable = ({
|
|
|
3938
3750
|
]);
|
|
3939
3751
|
const handlePaginationPageChange = useCallback(
|
|
3940
3752
|
(event, nextPage) => {
|
|
3941
|
-
var
|
|
3753
|
+
var _a108;
|
|
3942
3754
|
if (pagination.page === void 0) {
|
|
3943
3755
|
setInternalPage(nextPage);
|
|
3944
3756
|
}
|
|
3945
|
-
(
|
|
3757
|
+
(_a108 = paginationConfig.onPageChange) == null ? void 0 : _a108.call(paginationConfig, event, nextPage);
|
|
3946
3758
|
},
|
|
3947
3759
|
[pagination.page, paginationConfig]
|
|
3948
3760
|
);
|
|
3949
3761
|
const handleRowsPerPageChange = useCallback(
|
|
3950
3762
|
(event) => {
|
|
3951
|
-
var
|
|
3763
|
+
var _a108;
|
|
3952
3764
|
const nextRowsPerPage = Number(event.target.value);
|
|
3953
3765
|
if (pagination.rowsPerPage === void 0) {
|
|
3954
3766
|
setInternalRowsPerPage(nextRowsPerPage);
|
|
@@ -3956,15 +3768,15 @@ var BaseDatatable = ({
|
|
|
3956
3768
|
if (pagination.page === void 0) {
|
|
3957
3769
|
setInternalPage(0);
|
|
3958
3770
|
}
|
|
3959
|
-
(
|
|
3771
|
+
(_a108 = paginationConfig.onRowsPerPageChange) == null ? void 0 : _a108.call(paginationConfig, event, nextRowsPerPage);
|
|
3960
3772
|
},
|
|
3961
3773
|
[pagination.page, pagination.rowsPerPage, paginationConfig]
|
|
3962
3774
|
);
|
|
3963
3775
|
const handleSort = useCallback(
|
|
3964
3776
|
(cell) => {
|
|
3965
|
-
var
|
|
3777
|
+
var _a108, _b108, _c2, _d2, _e2, _f;
|
|
3966
3778
|
if (!featureConfig.sorting) return;
|
|
3967
|
-
if (((
|
|
3779
|
+
if (((_a108 = cell.colSpan) != null ? _a108 : 1) > 1 || ((_b108 = cell.rowSpan) != null ? _b108 : 1) > 1) return;
|
|
3968
3780
|
const sortKey = (_d2 = (_c2 = cell.sortKey) != null ? _c2 : cell.key) != null ? _d2 : cell.id;
|
|
3969
3781
|
const targetColumn = normalizedColumns.find((column) => column.id === sortKey);
|
|
3970
3782
|
if (!(targetColumn == null ? void 0 : targetColumn.sortable)) return;
|
|
@@ -4011,8 +3823,8 @@ var BaseDatatable = ({
|
|
|
4011
3823
|
);
|
|
4012
3824
|
const renderBodyCell = useCallback(
|
|
4013
3825
|
(column, row, rowIndex, columnIndex, rowId, rowActive, cellOverrides = EMPTY_OBJECT) => {
|
|
4014
|
-
var
|
|
4015
|
-
const resolvedColumn = column.isSelection || column.id === selectionColumn.id ? selectionColumn : (
|
|
3826
|
+
var _a108, _b108, _c2, _d2, _e2;
|
|
3827
|
+
const resolvedColumn = column.isSelection || column.id === selectionColumn.id ? selectionColumn : (_a108 = visibleColumns.find((item) => item.id === column.id)) != null ? _a108 : column;
|
|
4016
3828
|
if (resolvedColumn.isSelection) {
|
|
4017
3829
|
const isSelectable = isRowSelectable ? isRowSelectable(row, rowIndex) : true;
|
|
4018
3830
|
return /* @__PURE__ */ jsx(
|
|
@@ -4035,7 +3847,7 @@ var BaseDatatable = ({
|
|
|
4035
3847
|
boxShadow: selectionPosition === "left" && columnIndex === stickyLeftCount - 1 ? `2px 0 6px ${COLORS.stickyShadow}` : selectionPosition === "right" && columnIndex === visibleColumns.length - stickyRightCount ? `-2px 0 6px ${COLORS.stickyShadow}` : "none"
|
|
4036
3848
|
}, cellOverrides.sx),
|
|
4037
3849
|
children: /* @__PURE__ */ jsx(
|
|
4038
|
-
|
|
3850
|
+
Box7,
|
|
4039
3851
|
{
|
|
4040
3852
|
sx: {
|
|
4041
3853
|
display: "flex",
|
|
@@ -4068,7 +3880,7 @@ var BaseDatatable = ({
|
|
|
4068
3880
|
return /* @__PURE__ */ jsx(
|
|
4069
3881
|
TableCell,
|
|
4070
3882
|
{
|
|
4071
|
-
align: (
|
|
3883
|
+
align: (_b108 = resolvedColumn.align) != null ? _b108 : "left",
|
|
4072
3884
|
rowSpan: cellOverrides.rowSpan,
|
|
4073
3885
|
colSpan: cellOverrides.colSpan,
|
|
4074
3886
|
sx: __spreadValues(__spreadValues({
|
|
@@ -4142,8 +3954,8 @@ var BaseDatatable = ({
|
|
|
4142
3954
|
}, tableSx),
|
|
4143
3955
|
children: [
|
|
4144
3956
|
/* @__PURE__ */ jsx(TableHead, { children: rowsForHeader.map((row, rowIndex) => /* @__PURE__ */ jsx(TableRow, { children: row.map((cell) => {
|
|
4145
|
-
var
|
|
4146
|
-
const sortKey = (
|
|
3957
|
+
var _a108, _b108, _c2, _d2, _e2, _f, _g, _h, _i;
|
|
3958
|
+
const sortKey = (_b108 = (_a108 = cell.sortKey) != null ? _a108 : cell.key) != null ? _b108 : cell.id;
|
|
4147
3959
|
const targetColumn = normalizedColumns.find((column) => column.id === sortKey);
|
|
4148
3960
|
const isSortable = featureConfig.sorting && ((_c2 = cell.colSpan) != null ? _c2 : 1) === 1 && ((_d2 = cell.rowSpan) != null ? _d2 : 1) === 1 && (targetColumn == null ? void 0 : targetColumn.sortable);
|
|
4149
3961
|
const shouldStickLeft = cell.sticky === "left" || cell.end < stickyLeftCount;
|
|
@@ -4184,7 +3996,7 @@ var BaseDatatable = ({
|
|
|
4184
3996
|
} : void 0
|
|
4185
3997
|
}),
|
|
4186
3998
|
children: /* @__PURE__ */ jsxs(
|
|
4187
|
-
|
|
3999
|
+
Box7,
|
|
4188
4000
|
{
|
|
4189
4001
|
sx: {
|
|
4190
4002
|
display: "flex",
|
|
@@ -4203,7 +4015,7 @@ var BaseDatatable = ({
|
|
|
4203
4015
|
);
|
|
4204
4016
|
}) }, `header-${rowIndex}`)) }),
|
|
4205
4017
|
/* @__PURE__ */ jsx(TableBody, { children: loading ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { align: "center", colSpan: visibleColumns.length, children: /* @__PURE__ */ jsxs(
|
|
4206
|
-
|
|
4018
|
+
Box7,
|
|
4207
4019
|
{
|
|
4208
4020
|
sx: {
|
|
4209
4021
|
minHeight: 120,
|
|
@@ -4317,26 +4129,26 @@ BaseDatatable.propTypes = {
|
|
|
4317
4129
|
tableSx: PropTypes3.object
|
|
4318
4130
|
};
|
|
4319
4131
|
React4.memo(BaseDatatable);
|
|
4132
|
+
var _a34, _b34;
|
|
4133
|
+
var TextField = (_b34 = (_a34 = TextFieldRaw) == null ? void 0 : _a34.default) != null ? _b34 : TextFieldRaw;
|
|
4134
|
+
var _a35, _b35;
|
|
4135
|
+
var Box8 = (_b35 = (_a35 = BoxRaw) == null ? void 0 : _a35.default) != null ? _b35 : BoxRaw;
|
|
4136
|
+
var _a36, _b36;
|
|
4137
|
+
var Popover = (_b36 = (_a36 = PopoverRaw) == null ? void 0 : _a36.default) != null ? _b36 : PopoverRaw;
|
|
4138
|
+
var _a37, _b37;
|
|
4139
|
+
var InputAdornment = (_b37 = (_a37 = InputAdornmentRaw) == null ? void 0 : _a37.default) != null ? _b37 : InputAdornmentRaw;
|
|
4140
|
+
var _a38, _b38;
|
|
4141
|
+
var IconButton3 = (_b38 = (_a38 = IconButtonRaw) == null ? void 0 : _a38.default) != null ? _b38 : IconButtonRaw;
|
|
4320
4142
|
var _a39, _b39;
|
|
4321
|
-
var
|
|
4143
|
+
var Typography = (_b39 = (_a39 = MuiTypographyRaw) == null ? void 0 : _a39.default) != null ? _b39 : MuiTypographyRaw;
|
|
4322
4144
|
var _a40, _b40;
|
|
4323
|
-
var
|
|
4145
|
+
var DatePicker = (_b40 = (_a40 = DatePicker$1) == null ? void 0 : _a40.default) != null ? _b40 : DatePicker$1;
|
|
4324
4146
|
var _a41, _b41;
|
|
4325
|
-
var
|
|
4147
|
+
var DateTimePicker = (_b41 = (_a41 = DateTimePicker$1) == null ? void 0 : _a41.default) != null ? _b41 : DateTimePicker$1;
|
|
4326
4148
|
var _a42, _b42;
|
|
4327
|
-
var
|
|
4328
|
-
var
|
|
4329
|
-
var
|
|
4330
|
-
var _a44, _b44;
|
|
4331
|
-
var Typography = (_b44 = (_a44 = MuiTypographyRaw) == null ? void 0 : _a44.default) != null ? _b44 : MuiTypographyRaw;
|
|
4332
|
-
var _a45, _b45;
|
|
4333
|
-
var DatePicker = (_b45 = (_a45 = DatePicker$1) == null ? void 0 : _a45.default) != null ? _b45 : DatePicker$1;
|
|
4334
|
-
var _a46, _b46;
|
|
4335
|
-
var DateTimePicker = (_b46 = (_a46 = DateTimePicker$1) == null ? void 0 : _a46.default) != null ? _b46 : DateTimePicker$1;
|
|
4336
|
-
var _a47, _b47;
|
|
4337
|
-
var TimePicker = (_b47 = (_a47 = TimePicker$1) == null ? void 0 : _a47.default) != null ? _b47 : TimePicker$1;
|
|
4338
|
-
var BaseDatePicker = (_a112) => {
|
|
4339
|
-
var _b112 = _a112, {
|
|
4149
|
+
var TimePicker = (_b42 = (_a42 = TimePicker$1) == null ? void 0 : _a42.default) != null ? _b42 : TimePicker$1;
|
|
4150
|
+
var BaseDatePicker = (_a107) => {
|
|
4151
|
+
var _b107 = _a107, {
|
|
4340
4152
|
type = "single",
|
|
4341
4153
|
name,
|
|
4342
4154
|
control,
|
|
@@ -4354,7 +4166,7 @@ var BaseDatePicker = (_a112) => {
|
|
|
4354
4166
|
sx = {},
|
|
4355
4167
|
onChange: onChangeCustom = () => {
|
|
4356
4168
|
}
|
|
4357
|
-
} =
|
|
4169
|
+
} = _b107, props = __objRest(_b107, [
|
|
4358
4170
|
"type",
|
|
4359
4171
|
"name",
|
|
4360
4172
|
"control",
|
|
@@ -4372,13 +4184,13 @@ var BaseDatePicker = (_a112) => {
|
|
|
4372
4184
|
"sx",
|
|
4373
4185
|
"onChange"
|
|
4374
4186
|
]);
|
|
4375
|
-
var
|
|
4187
|
+
var _a108, _b108, _c, _d, _e, _f;
|
|
4376
4188
|
const { field, formState } = useController({
|
|
4377
4189
|
name,
|
|
4378
4190
|
control,
|
|
4379
4191
|
defaultValue
|
|
4380
4192
|
});
|
|
4381
|
-
const errorMessage = (_c = (
|
|
4193
|
+
const errorMessage = (_c = (_b108 = (_a108 = formState.errors) == null ? void 0 : _a108[name]) == null ? void 0 : _b108.message) == null ? void 0 : _c.toString();
|
|
4382
4194
|
const [open, setOpen] = useState(false);
|
|
4383
4195
|
const inputRef = useRef(null);
|
|
4384
4196
|
const [rangeValue, setRangeValue] = useState(
|
|
@@ -4445,13 +4257,13 @@ var BaseDatePicker = (_a112) => {
|
|
|
4445
4257
|
}, [type, format]);
|
|
4446
4258
|
const LabelSection = () => {
|
|
4447
4259
|
if (!title && !subtitle) return null;
|
|
4448
|
-
return /* @__PURE__ */ jsxs(
|
|
4260
|
+
return /* @__PURE__ */ jsxs(Box8, { sx: { display: "flex", gap: SpacingToken.spacing2, px: SpacingToken.spacing2, mb: "4px" }, children: [
|
|
4449
4261
|
title && /* @__PURE__ */ jsx(Typography, { variant: "body2", sx: { fontWeight: 600, color: DerivedColor.color_text_default }, children: title }),
|
|
4450
4262
|
subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body2", sx: { color: DerivedColor.color_text_subtle }, children: subtitle })
|
|
4451
4263
|
] });
|
|
4452
4264
|
};
|
|
4453
4265
|
if (type === "range") {
|
|
4454
|
-
return /* @__PURE__ */ jsxs(
|
|
4266
|
+
return /* @__PURE__ */ jsxs(Box8, { sx, children: [
|
|
4455
4267
|
/* @__PURE__ */ jsx(LabelSection, {}),
|
|
4456
4268
|
/* @__PURE__ */ jsx(
|
|
4457
4269
|
TextField,
|
|
@@ -4474,7 +4286,7 @@ var BaseDatePicker = (_a112) => {
|
|
|
4474
4286
|
InputProps: {
|
|
4475
4287
|
readOnly: true,
|
|
4476
4288
|
endAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
|
|
4477
|
-
|
|
4289
|
+
IconButton3,
|
|
4478
4290
|
{
|
|
4479
4291
|
size: "small",
|
|
4480
4292
|
onClick: (e) => {
|
|
@@ -4519,7 +4331,7 @@ var BaseDatePicker = (_a112) => {
|
|
|
4519
4331
|
] });
|
|
4520
4332
|
}
|
|
4521
4333
|
const PickerComponent = (_e = pickerConfig.component) != null ? _e : DatePicker;
|
|
4522
|
-
return /* @__PURE__ */ jsxs(
|
|
4334
|
+
return /* @__PURE__ */ jsxs(Box8, { sx, children: [
|
|
4523
4335
|
/* @__PURE__ */ jsx(LabelSection, {}),
|
|
4524
4336
|
/* @__PURE__ */ jsx(
|
|
4525
4337
|
PickerComponent,
|
|
@@ -4538,7 +4350,7 @@ var BaseDatePicker = (_a112) => {
|
|
|
4538
4350
|
disableOpenPicker: openBy === "field",
|
|
4539
4351
|
components: {
|
|
4540
4352
|
OpenPickerIcon: () => /* @__PURE__ */ jsx(
|
|
4541
|
-
|
|
4353
|
+
IconButton3,
|
|
4542
4354
|
{
|
|
4543
4355
|
size: "small",
|
|
4544
4356
|
onClick: (e) => {
|
|
@@ -4556,7 +4368,7 @@ var BaseDatePicker = (_a112) => {
|
|
|
4556
4368
|
onChangeCustom(newValue);
|
|
4557
4369
|
},
|
|
4558
4370
|
renderInput: (params) => {
|
|
4559
|
-
var
|
|
4371
|
+
var _a109;
|
|
4560
4372
|
return /* @__PURE__ */ jsx(
|
|
4561
4373
|
TextField,
|
|
4562
4374
|
__spreadProps(__spreadValues({}, params), {
|
|
@@ -4595,7 +4407,7 @@ var BaseDatePicker = (_a112) => {
|
|
|
4595
4407
|
InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
|
|
4596
4408
|
endAdornment: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4597
4409
|
clearable && field.value && /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
|
|
4598
|
-
|
|
4410
|
+
IconButton3,
|
|
4599
4411
|
{
|
|
4600
4412
|
size: "small",
|
|
4601
4413
|
onClick: handleClear,
|
|
@@ -4603,7 +4415,7 @@ var BaseDatePicker = (_a112) => {
|
|
|
4603
4415
|
children: /* @__PURE__ */ jsx(CloseIconRaw, { fontSize: "small" })
|
|
4604
4416
|
}
|
|
4605
4417
|
) }),
|
|
4606
|
-
(
|
|
4418
|
+
(_a109 = params.InputProps) == null ? void 0 : _a109.endAdornment
|
|
4607
4419
|
] })
|
|
4608
4420
|
})
|
|
4609
4421
|
})
|
|
@@ -4613,12 +4425,12 @@ var BaseDatePicker = (_a112) => {
|
|
|
4613
4425
|
)
|
|
4614
4426
|
] });
|
|
4615
4427
|
};
|
|
4616
|
-
var
|
|
4617
|
-
var
|
|
4618
|
-
var
|
|
4619
|
-
var Chip = (
|
|
4620
|
-
var
|
|
4621
|
-
var Typography2 = (
|
|
4428
|
+
var _a43, _b43;
|
|
4429
|
+
var Box9 = (_b43 = (_a43 = BoxRaw) == null ? void 0 : _a43.default) != null ? _b43 : BoxRaw;
|
|
4430
|
+
var _a44, _b44;
|
|
4431
|
+
var Chip = (_b44 = (_a44 = ChipRaw) == null ? void 0 : _a44.default) != null ? _b44 : ChipRaw;
|
|
4432
|
+
var _a45, _b45;
|
|
4433
|
+
var Typography2 = (_b45 = (_a45 = MuiTypographyRaw) == null ? void 0 : _a45.default) != null ? _b45 : MuiTypographyRaw;
|
|
4622
4434
|
var CheckboxOption = (props) => {
|
|
4623
4435
|
const { isSelected, label, selectOption, data } = props;
|
|
4624
4436
|
const handleChange = () => {
|
|
@@ -4634,8 +4446,8 @@ var CheckboxOption = (props) => {
|
|
|
4634
4446
|
}
|
|
4635
4447
|
) }));
|
|
4636
4448
|
};
|
|
4637
|
-
var BaseDropdown = (
|
|
4638
|
-
var
|
|
4449
|
+
var BaseDropdown = (_a107) => {
|
|
4450
|
+
var _b107 = _a107, {
|
|
4639
4451
|
name = "",
|
|
4640
4452
|
control,
|
|
4641
4453
|
options = [],
|
|
@@ -4659,7 +4471,7 @@ var BaseDropdown = (_a112) => {
|
|
|
4659
4471
|
],
|
|
4660
4472
|
variant = "select",
|
|
4661
4473
|
sx = {}
|
|
4662
|
-
} =
|
|
4474
|
+
} = _b107, props = __objRest(_b107, [
|
|
4663
4475
|
"name",
|
|
4664
4476
|
"control",
|
|
4665
4477
|
"options",
|
|
@@ -4678,14 +4490,14 @@ var BaseDropdown = (_a112) => {
|
|
|
4678
4490
|
"variant",
|
|
4679
4491
|
"sx"
|
|
4680
4492
|
]);
|
|
4681
|
-
var
|
|
4493
|
+
var _a108;
|
|
4682
4494
|
const { field, formState } = useController({
|
|
4683
4495
|
name,
|
|
4684
4496
|
control,
|
|
4685
4497
|
defaultValue: defaultValue != null ? defaultValue : variant === "checkbox" || isMulti ? [] : null
|
|
4686
4498
|
});
|
|
4687
4499
|
const SelectComponent = loadOptions ? AsyncSelect : Select;
|
|
4688
|
-
const hasError = !!((
|
|
4500
|
+
const hasError = !!((_a108 = formState.errors) == null ? void 0 : _a108[name]);
|
|
4689
4501
|
const selectedValues = Array.isArray(field.value) ? field.value : field.value ? [field.value] : [];
|
|
4690
4502
|
const isCheckboxMode = variant === "checkbox";
|
|
4691
4503
|
const selectAllChecked = showSelectAll && selectedValues.length === options.length && options.length > 0;
|
|
@@ -4694,9 +4506,9 @@ var BaseDropdown = (_a112) => {
|
|
|
4694
4506
|
field.onChange(checked ? options : []);
|
|
4695
4507
|
};
|
|
4696
4508
|
const handleChange = (val) => {
|
|
4697
|
-
var
|
|
4509
|
+
var _a109;
|
|
4698
4510
|
field.onChange(val);
|
|
4699
|
-
(
|
|
4511
|
+
(_a109 = props.onChange) == null ? void 0 : _a109.call(props, val);
|
|
4700
4512
|
};
|
|
4701
4513
|
const customStyles = {
|
|
4702
4514
|
control: (base, state) => __spreadValues(__spreadProps(__spreadValues({}, base), {
|
|
@@ -4722,7 +4534,7 @@ var BaseDropdown = (_a112) => {
|
|
|
4722
4534
|
})
|
|
4723
4535
|
};
|
|
4724
4536
|
return /* @__PURE__ */ jsxs(
|
|
4725
|
-
|
|
4537
|
+
Box9,
|
|
4726
4538
|
{
|
|
4727
4539
|
sx: __spreadValues({
|
|
4728
4540
|
width: 356,
|
|
@@ -4731,8 +4543,8 @@ var BaseDropdown = (_a112) => {
|
|
|
4731
4543
|
gap: SpacingToken.spacing2
|
|
4732
4544
|
}, sx),
|
|
4733
4545
|
children: [
|
|
4734
|
-
(title || subtitle || showSelectAll) && /* @__PURE__ */ jsxs(
|
|
4735
|
-
/* @__PURE__ */ jsxs(
|
|
4546
|
+
(title || subtitle || showSelectAll) && /* @__PURE__ */ jsxs(Box9, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
4547
|
+
/* @__PURE__ */ jsxs(Box9, { sx: { display: "flex", alignItems: "center", gap: SpacingToken.spacing2 }, children: [
|
|
4736
4548
|
title && /* @__PURE__ */ jsx(Typography2, { variant: "body2", sx: { fontWeight: 600, color: DerivedColor.color_text_default }, children: title }),
|
|
4737
4549
|
subtitle && /* @__PURE__ */ jsx(Typography2, { variant: "body2", sx: { color: DerivedColor.color_text_subtle }, children: subtitle })
|
|
4738
4550
|
] }),
|
|
@@ -4771,7 +4583,7 @@ var BaseDropdown = (_a112) => {
|
|
|
4771
4583
|
}
|
|
4772
4584
|
})
|
|
4773
4585
|
),
|
|
4774
|
-
showChip && isMulti && !isCheckboxMode && /* @__PURE__ */ jsx(
|
|
4586
|
+
showChip && isMulti && !isCheckboxMode && /* @__PURE__ */ jsx(Box9, { sx: { display: "flex", flexWrap: "wrap", gap: 1, mt: 1 }, children: selectedValues.map((option) => /* @__PURE__ */ jsx(
|
|
4775
4587
|
Chip,
|
|
4776
4588
|
{
|
|
4777
4589
|
label: option.label,
|
|
@@ -4801,8 +4613,8 @@ var BaseDropdown = (_a112) => {
|
|
|
4801
4613
|
}
|
|
4802
4614
|
);
|
|
4803
4615
|
};
|
|
4804
|
-
var
|
|
4805
|
-
var
|
|
4616
|
+
var _a46, _b46;
|
|
4617
|
+
var Box10 = (_b46 = (_a46 = BoxRaw) == null ? void 0 : _a46.default) != null ? _b46 : BoxRaw;
|
|
4806
4618
|
var BaseDropzone = ({
|
|
4807
4619
|
autoUpload = false,
|
|
4808
4620
|
settings = {
|
|
@@ -4854,7 +4666,7 @@ var BaseDropzone = ({
|
|
|
4854
4666
|
processedCount++;
|
|
4855
4667
|
if (processedCount === acceptedFiles.length) {
|
|
4856
4668
|
setFiles((prevFiles) => {
|
|
4857
|
-
var
|
|
4669
|
+
var _a107;
|
|
4858
4670
|
let updated;
|
|
4859
4671
|
if (settings.maxFiles === 1) {
|
|
4860
4672
|
updated = tempFiles.slice(0, 1);
|
|
@@ -4865,7 +4677,7 @@ var BaseDropzone = ({
|
|
|
4865
4677
|
);
|
|
4866
4678
|
}
|
|
4867
4679
|
if (autoUpload) {
|
|
4868
|
-
(
|
|
4680
|
+
(_a107 = callbacks == null ? void 0 : callbacks.uploadFile) == null ? void 0 : _a107.call(callbacks, updated);
|
|
4869
4681
|
}
|
|
4870
4682
|
return updated;
|
|
4871
4683
|
});
|
|
@@ -4874,8 +4686,8 @@ var BaseDropzone = ({
|
|
|
4874
4686
|
});
|
|
4875
4687
|
};
|
|
4876
4688
|
const handleRejected = (rejections) => {
|
|
4877
|
-
var
|
|
4878
|
-
const error = (_c = (
|
|
4689
|
+
var _a107, _b107, _c;
|
|
4690
|
+
const error = (_c = (_b107 = (_a107 = rejections == null ? void 0 : rejections[0]) == null ? void 0 : _a107.errors) == null ? void 0 : _b107[0]) == null ? void 0 : _c.code;
|
|
4879
4691
|
if (error === "file-too-large") {
|
|
4880
4692
|
setErrorMessage(
|
|
4881
4693
|
"Ukuran file terlalu besar. Maksimal " + settings.maxSize + "MB."
|
|
@@ -4889,12 +4701,12 @@ var BaseDropzone = ({
|
|
|
4889
4701
|
}
|
|
4890
4702
|
};
|
|
4891
4703
|
const removeFile = (index) => {
|
|
4892
|
-
var
|
|
4704
|
+
var _a107, _b107;
|
|
4893
4705
|
const removedFile = files[index];
|
|
4894
4706
|
const updated = files.filter((_, i) => i !== index);
|
|
4895
4707
|
setFiles(updated);
|
|
4896
|
-
(
|
|
4897
|
-
(
|
|
4708
|
+
(_a107 = callbacks == null ? void 0 : callbacks.removeFile) == null ? void 0 : _a107.call(callbacks, removedFile == null ? void 0 : removedFile.originName);
|
|
4709
|
+
(_b107 = callbacks == null ? void 0 : callbacks.uploadFile) == null ? void 0 : _b107.call(callbacks, updated);
|
|
4898
4710
|
};
|
|
4899
4711
|
useEffect(() => {
|
|
4900
4712
|
if (callbacks == null ? void 0 : callbacks.customError) {
|
|
@@ -4902,19 +4714,19 @@ var BaseDropzone = ({
|
|
|
4902
4714
|
}
|
|
4903
4715
|
}, [callbacks == null ? void 0 : callbacks.customError]);
|
|
4904
4716
|
const renderFileIcon = (file) => {
|
|
4905
|
-
var
|
|
4906
|
-
if ((
|
|
4907
|
-
if ((
|
|
4717
|
+
var _a107, _b107, _c;
|
|
4718
|
+
if ((_a107 = file.type) == null ? void 0 : _a107.includes("pdf")) return /* @__PURE__ */ jsx(IconFilePDF, {});
|
|
4719
|
+
if ((_b107 = file.type) == null ? void 0 : _b107.includes("csv")) return /* @__PURE__ */ jsx(IconFileCSV, {});
|
|
4908
4720
|
if ((_c = file.type) == null ? void 0 : _c.includes("image")) return /* @__PURE__ */ jsx(IconFileJPG, {});
|
|
4909
4721
|
return /* @__PURE__ */ jsx(IconFileJPG, {});
|
|
4910
4722
|
};
|
|
4911
4723
|
const PreviewGrid = () => /* @__PURE__ */ jsx(
|
|
4912
|
-
|
|
4724
|
+
Box10,
|
|
4913
4725
|
{
|
|
4914
4726
|
sx: { width: "100%", display: "flex", gap: 2, mt: 3, flexWrap: "wrap" },
|
|
4915
|
-
children: files.map((file, index) => /* @__PURE__ */ jsxs(
|
|
4727
|
+
children: files.map((file, index) => /* @__PURE__ */ jsxs(Box10, { sx: { position: "relative", width: 75 }, children: [
|
|
4916
4728
|
/* @__PURE__ */ jsx(
|
|
4917
|
-
|
|
4729
|
+
Box10,
|
|
4918
4730
|
{
|
|
4919
4731
|
sx: {
|
|
4920
4732
|
position: "absolute",
|
|
@@ -4928,7 +4740,7 @@ var BaseDropzone = ({
|
|
|
4928
4740
|
),
|
|
4929
4741
|
renderFileIcon(file),
|
|
4930
4742
|
/* @__PURE__ */ jsx(
|
|
4931
|
-
|
|
4743
|
+
Box10,
|
|
4932
4744
|
{
|
|
4933
4745
|
sx: __spreadProps(__spreadValues({}, VariantStyles.caption_regular), {
|
|
4934
4746
|
mt: 1,
|
|
@@ -4942,8 +4754,8 @@ var BaseDropzone = ({
|
|
|
4942
4754
|
] }, index))
|
|
4943
4755
|
}
|
|
4944
4756
|
);
|
|
4945
|
-
const PreviewList = () => /* @__PURE__ */ jsx(
|
|
4946
|
-
|
|
4757
|
+
const PreviewList = () => /* @__PURE__ */ jsx(Box10, { sx: { mt: 3 }, children: files.map((file, index) => /* @__PURE__ */ jsxs(
|
|
4758
|
+
Box10,
|
|
4947
4759
|
{
|
|
4948
4760
|
sx: {
|
|
4949
4761
|
display: "flex",
|
|
@@ -4955,10 +4767,10 @@ var BaseDropzone = ({
|
|
|
4955
4767
|
mb: 2
|
|
4956
4768
|
},
|
|
4957
4769
|
children: [
|
|
4958
|
-
/* @__PURE__ */ jsxs(
|
|
4770
|
+
/* @__PURE__ */ jsxs(Box10, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
|
|
4959
4771
|
renderFileIcon(file),
|
|
4960
4772
|
/* @__PURE__ */ jsx(
|
|
4961
|
-
|
|
4773
|
+
Box10,
|
|
4962
4774
|
{
|
|
4963
4775
|
sx: __spreadProps(__spreadValues({}, VariantStyles.body2_regular), {
|
|
4964
4776
|
maxWidth: 260,
|
|
@@ -4970,14 +4782,14 @@ var BaseDropzone = ({
|
|
|
4970
4782
|
}
|
|
4971
4783
|
)
|
|
4972
4784
|
] }),
|
|
4973
|
-
/* @__PURE__ */ jsx(
|
|
4785
|
+
/* @__PURE__ */ jsx(Box10, { sx: { cursor: "pointer" }, onClick: () => removeFile(index), children: /* @__PURE__ */ jsx(IconTrash$1, { size: 20, color: PrimitiveColor.color_red_500 }) })
|
|
4974
4786
|
]
|
|
4975
4787
|
},
|
|
4976
4788
|
index
|
|
4977
4789
|
)) });
|
|
4978
|
-
return /* @__PURE__ */ jsxs(
|
|
4790
|
+
return /* @__PURE__ */ jsxs(Box10, { children: [
|
|
4979
4791
|
labels.title && /* @__PURE__ */ jsx(
|
|
4980
|
-
|
|
4792
|
+
Box10,
|
|
4981
4793
|
{
|
|
4982
4794
|
sx: __spreadProps(__spreadValues({}, VariantStyles.body2_semibold), {
|
|
4983
4795
|
mb: 2,
|
|
@@ -4987,7 +4799,7 @@ var BaseDropzone = ({
|
|
|
4987
4799
|
}
|
|
4988
4800
|
),
|
|
4989
4801
|
/* @__PURE__ */ jsx(
|
|
4990
|
-
|
|
4802
|
+
Box10,
|
|
4991
4803
|
{
|
|
4992
4804
|
sx: {
|
|
4993
4805
|
border: `2px ${files.length ? "solid" : "dashed"} ${isError ? PrimitiveColor.color_red_500 : files.length ? PrimitiveColor.color_blue_cakrawala_500 : PrimitiveColor.color_neutral_300}`,
|
|
@@ -5005,7 +4817,7 @@ var BaseDropzone = ({
|
|
|
5005
4817
|
accept: settings.allowedExtensions,
|
|
5006
4818
|
multiple: !isSingle,
|
|
5007
4819
|
children: ({ getRootProps, getInputProps }) => /* @__PURE__ */ jsxs(
|
|
5008
|
-
|
|
4820
|
+
Box10,
|
|
5009
4821
|
__spreadProps(__spreadValues({}, getRootProps()), {
|
|
5010
4822
|
sx: {
|
|
5011
4823
|
cursor: "pointer",
|
|
@@ -5019,9 +4831,9 @@ var BaseDropzone = ({
|
|
|
5019
4831
|
children: [
|
|
5020
4832
|
/* @__PURE__ */ jsx("input", __spreadValues({}, getInputProps())),
|
|
5021
4833
|
/* @__PURE__ */ jsx(IconUpload$1, { size: 32, color: DerivedColor.color_icon_brand_primary }),
|
|
5022
|
-
/* @__PURE__ */ jsx(
|
|
4834
|
+
/* @__PURE__ */ jsx(Box10, { sx: __spreadProps(__spreadValues({}, VariantStyles.header1_semibold), { mt: 1 }), children: labels.dropzoneTitle }),
|
|
5023
4835
|
/* @__PURE__ */ jsx(
|
|
5024
|
-
|
|
4836
|
+
Box10,
|
|
5025
4837
|
{
|
|
5026
4838
|
sx: __spreadProps(__spreadValues({}, VariantStyles.body1_regular), {
|
|
5027
4839
|
color: PrimitiveColor.color_neutral_600,
|
|
@@ -5040,7 +4852,7 @@ var BaseDropzone = ({
|
|
|
5040
4852
|
}
|
|
5041
4853
|
),
|
|
5042
4854
|
labels.allowedFileLabel && /* @__PURE__ */ jsx(
|
|
5043
|
-
|
|
4855
|
+
Box10,
|
|
5044
4856
|
{
|
|
5045
4857
|
sx: __spreadProps(__spreadValues({}, VariantStyles.caption_regular), {
|
|
5046
4858
|
color: PrimitiveColor.color_neutral_600,
|
|
@@ -5060,7 +4872,7 @@ var BaseDropzone = ({
|
|
|
5060
4872
|
),
|
|
5061
4873
|
files.length > 0 && (settings.previewType === "list" ? /* @__PURE__ */ jsx(PreviewList, {}) : /* @__PURE__ */ jsx(PreviewGrid, {})),
|
|
5062
4874
|
isError && /* @__PURE__ */ jsxs(
|
|
5063
|
-
|
|
4875
|
+
Box10,
|
|
5064
4876
|
{
|
|
5065
4877
|
sx: __spreadValues({
|
|
5066
4878
|
display: "flex",
|
|
@@ -5077,18 +4889,18 @@ var BaseDropzone = ({
|
|
|
5077
4889
|
)
|
|
5078
4890
|
] });
|
|
5079
4891
|
};
|
|
5080
|
-
var
|
|
5081
|
-
var Radio = (
|
|
5082
|
-
var
|
|
5083
|
-
var RadioGroup = (
|
|
5084
|
-
var
|
|
5085
|
-
var FormControlLabel2 = (
|
|
5086
|
-
var
|
|
5087
|
-
var FormControl = (
|
|
5088
|
-
var
|
|
5089
|
-
var
|
|
5090
|
-
var BaseRadioButton = (
|
|
5091
|
-
var
|
|
4892
|
+
var _a47, _b47;
|
|
4893
|
+
var Radio = (_b47 = (_a47 = RadioRaw) == null ? void 0 : _a47.default) != null ? _b47 : RadioRaw;
|
|
4894
|
+
var _a48, _b48;
|
|
4895
|
+
var RadioGroup = (_b48 = (_a48 = RadioGroupRaw) == null ? void 0 : _a48.default) != null ? _b48 : RadioGroupRaw;
|
|
4896
|
+
var _a49, _b49;
|
|
4897
|
+
var FormControlLabel2 = (_b49 = (_a49 = FormControlLabelRaw) == null ? void 0 : _a49.default) != null ? _b49 : FormControlLabelRaw;
|
|
4898
|
+
var _a50, _b50;
|
|
4899
|
+
var FormControl = (_b50 = (_a50 = FormControlRaw) == null ? void 0 : _a50.default) != null ? _b50 : FormControlRaw;
|
|
4900
|
+
var _a51, _b51;
|
|
4901
|
+
var Box11 = (_b51 = (_a51 = BoxRaw) == null ? void 0 : _a51.default) != null ? _b51 : BoxRaw;
|
|
4902
|
+
var BaseRadioButton = (_a107) => {
|
|
4903
|
+
var _b107 = _a107, {
|
|
5092
4904
|
name = "",
|
|
5093
4905
|
control = null,
|
|
5094
4906
|
defaultValue,
|
|
@@ -5101,7 +4913,7 @@ var BaseRadioButton = (_a112) => {
|
|
|
5101
4913
|
isDisabled: isDisabled,
|
|
5102
4914
|
useErrorStateHelper: useErrorStateHelper = false,
|
|
5103
4915
|
sx: sx = {}
|
|
5104
|
-
} =
|
|
4916
|
+
} = _b107, restProps = __objRest(_b107, [
|
|
5105
4917
|
"name",
|
|
5106
4918
|
"control",
|
|
5107
4919
|
"defaultValue",
|
|
@@ -5121,10 +4933,10 @@ var BaseRadioButton = (_a112) => {
|
|
|
5121
4933
|
/* ================= SX ================= */
|
|
5122
4934
|
"sx"
|
|
5123
4935
|
]);
|
|
5124
|
-
var
|
|
4936
|
+
var _a108, _b108, _c, _d, _e, _f;
|
|
5125
4937
|
const { field, formState } = useController({ control, name, defaultValue });
|
|
5126
4938
|
const errorObject = useErrorStateHelper ? errorState(name, formState.errors) : null;
|
|
5127
|
-
const errorMessage = ((
|
|
4939
|
+
const errorMessage = ((_a108 = errorObject == null ? void 0 : errorObject.message) == null ? void 0 : _a108.toString()) || ((_c = (_b108 = formState.errors) == null ? void 0 : _b108[name]) == null ? void 0 : _c.message);
|
|
5128
4940
|
const radioColor = ((_d = PrimitiveColor) == null ? void 0 : _d[radioColorToken]) || PrimitiveColor.color_blue_cakrawala_500;
|
|
5129
4941
|
const gapValue = (_e = SpacingToken) == null ? void 0 : _e.spacing0;
|
|
5130
4942
|
const isHorizontal = orientation === "horizontal";
|
|
@@ -5137,7 +4949,7 @@ var BaseRadioButton = (_a112) => {
|
|
|
5137
4949
|
py: SpacingToken.spacing0,
|
|
5138
4950
|
borderRadius: Radius.radius_2
|
|
5139
4951
|
};
|
|
5140
|
-
return /* @__PURE__ */ jsx(
|
|
4952
|
+
return /* @__PURE__ */ jsx(Box11, { sx, children: /* @__PURE__ */ jsxs(FormControl, { error: !!((_f = formState.errors) == null ? void 0 : _f[name]), children: [
|
|
5141
4953
|
label && /* @__PURE__ */ jsx(
|
|
5142
4954
|
BaseTypography,
|
|
5143
4955
|
{
|
|
@@ -5185,28 +4997,28 @@ var BaseRadioButton = (_a112) => {
|
|
|
5185
4997
|
errorMessage && /* @__PURE__ */ jsx(BaseTypography, { variant: errorVariant, sx: { mt: gapValue }, children: errorMessage })
|
|
5186
4998
|
] }) });
|
|
5187
4999
|
};
|
|
5000
|
+
var _a52, _b52;
|
|
5001
|
+
var Check = (_b52 = (_a52 = CheckRaw) == null ? void 0 : _a52.default) != null ? _b52 : CheckRaw;
|
|
5002
|
+
var _a53, _b53;
|
|
5003
|
+
var CheckIcon = (_b53 = (_a53 = CheckRaw) == null ? void 0 : _a53.default) != null ? _b53 : CheckRaw;
|
|
5004
|
+
var _a54, _b54;
|
|
5005
|
+
var StepLabel = (_b54 = (_a54 = StepLabelRaw) == null ? void 0 : _a54.default) != null ? _b54 : StepLabelRaw;
|
|
5006
|
+
var _a55, _b55;
|
|
5007
|
+
var StepConnector = (_b55 = (_a55 = StepConnectorRaw) == null ? void 0 : _a55.default) != null ? _b55 : StepConnectorRaw;
|
|
5008
|
+
var _a56, _b56;
|
|
5009
|
+
var Step = (_b56 = (_a56 = StepRaw) == null ? void 0 : _a56.default) != null ? _b56 : StepRaw;
|
|
5188
5010
|
var _a57, _b57;
|
|
5189
|
-
var
|
|
5011
|
+
var Stepper = (_b57 = (_a57 = StepperRaw) == null ? void 0 : _a57.default) != null ? _b57 : StepperRaw;
|
|
5190
5012
|
var _a58, _b58;
|
|
5191
|
-
var
|
|
5013
|
+
var Stack = (_b58 = (_a58 = StackRaw) == null ? void 0 : _a58.default) != null ? _b58 : StackRaw;
|
|
5192
5014
|
var _a59, _b59;
|
|
5193
|
-
var
|
|
5015
|
+
var Box12 = (_b59 = (_a59 = BoxRaw) == null ? void 0 : _a59.default) != null ? _b59 : BoxRaw;
|
|
5194
5016
|
var _a60, _b60;
|
|
5195
|
-
var
|
|
5017
|
+
var Typography3 = (_b60 = (_a60 = MuiTypographyRaw) == null ? void 0 : _a60.default) != null ? _b60 : MuiTypographyRaw;
|
|
5196
5018
|
var _a61, _b61;
|
|
5197
|
-
var
|
|
5019
|
+
var Button = (_b61 = (_a61 = ButtonRaw) == null ? void 0 : _a61.default) != null ? _b61 : ButtonRaw;
|
|
5198
5020
|
var _a62, _b62;
|
|
5199
|
-
var
|
|
5200
|
-
var _a63, _b63;
|
|
5201
|
-
var Stack = (_b63 = (_a63 = StackRaw) == null ? void 0 : _a63.default) != null ? _b63 : StackRaw;
|
|
5202
|
-
var _a64, _b64;
|
|
5203
|
-
var Box13 = (_b64 = (_a64 = BoxRaw) == null ? void 0 : _a64.default) != null ? _b64 : BoxRaw;
|
|
5204
|
-
var _a65, _b65;
|
|
5205
|
-
var Typography3 = (_b65 = (_a65 = MuiTypographyRaw) == null ? void 0 : _a65.default) != null ? _b65 : MuiTypographyRaw;
|
|
5206
|
-
var _a66, _b66;
|
|
5207
|
-
var Button = (_b66 = (_a66 = ButtonRaw) == null ? void 0 : _a66.default) != null ? _b66 : ButtonRaw;
|
|
5208
|
-
var _a67, _b67;
|
|
5209
|
-
var Tooltip = (_b67 = (_a67 = TooltipRaw) == null ? void 0 : _a67.default) != null ? _b67 : TooltipRaw;
|
|
5021
|
+
var Tooltip = (_b62 = (_a62 = TooltipRaw) == null ? void 0 : _a62.default) != null ? _b62 : TooltipRaw;
|
|
5210
5022
|
var CustomStepLabel = styled(StepLabel)(({ orientation }) => __spreadValues(__spreadProps(__spreadValues({}, orientation === "vertical" && {
|
|
5211
5023
|
alignItems: "flex-start",
|
|
5212
5024
|
"& .MuiStepLabel-labelContainer": {
|
|
@@ -5325,8 +5137,8 @@ var CustomProcessIcon = styled(CheckIcon)({
|
|
|
5325
5137
|
justifyContent: "center",
|
|
5326
5138
|
alignItems: "center"
|
|
5327
5139
|
});
|
|
5328
|
-
var HtmlTooltip = styled((
|
|
5329
|
-
var
|
|
5140
|
+
var HtmlTooltip = styled((_a107) => {
|
|
5141
|
+
var _b107 = _a107, { className } = _b107, props = __objRest(_b107, ["className"]);
|
|
5330
5142
|
return /* @__PURE__ */ jsx(Tooltip, __spreadProps(__spreadValues({}, props), { classes: { popper: className } }));
|
|
5331
5143
|
})(() => ({
|
|
5332
5144
|
[`& .${tooltipClasses.tooltip}`]: {
|
|
@@ -5354,7 +5166,7 @@ var BaseStepper = ({
|
|
|
5354
5166
|
connector: /* @__PURE__ */ jsx(ColorlibConnector, { orientation }),
|
|
5355
5167
|
orientation,
|
|
5356
5168
|
children: steps == null ? void 0 : steps.map((step, index) => {
|
|
5357
|
-
var
|
|
5169
|
+
var _a107;
|
|
5358
5170
|
return /* @__PURE__ */ jsx(Step, { children: /* @__PURE__ */ jsx(
|
|
5359
5171
|
StepLabel,
|
|
5360
5172
|
{
|
|
@@ -5364,9 +5176,9 @@ var BaseStepper = ({
|
|
|
5364
5176
|
{
|
|
5365
5177
|
title: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
5366
5178
|
/* @__PURE__ */ jsx(Typography3, { color: "inherit", children: step == null ? void 0 : step.title }),
|
|
5367
|
-
(
|
|
5368
|
-
(list == null ? void 0 : list.is_done) === 1 ? /* @__PURE__ */ jsx(
|
|
5369
|
-
/* @__PURE__ */ jsx(
|
|
5179
|
+
(_a107 = step == null ? void 0 : step.sublist) == null ? void 0 : _a107.map((list, subIndex) => /* @__PURE__ */ jsx(Box12, { sx: { display: "grid", gap: 1, mt: 0.5 }, children: /* @__PURE__ */ jsxs(Box12, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: [
|
|
5180
|
+
(list == null ? void 0 : list.is_done) === 1 ? /* @__PURE__ */ jsx(Box12, { sx: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx(CustomCheckIcon, {}) }) : /* @__PURE__ */ jsx(Box12, { sx: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx(CustomProcessIcon, {}) }),
|
|
5181
|
+
/* @__PURE__ */ jsx(Box12, { children: list == null ? void 0 : list.sublist_title })
|
|
5370
5182
|
] }) }, subIndex))
|
|
5371
5183
|
] }),
|
|
5372
5184
|
children: /* @__PURE__ */ jsx(
|
|
@@ -5389,7 +5201,7 @@ var BaseStepper = ({
|
|
|
5389
5201
|
}
|
|
5390
5202
|
) });
|
|
5391
5203
|
}
|
|
5392
|
-
return /* @__PURE__ */ jsx(
|
|
5204
|
+
return /* @__PURE__ */ jsx(Box12, { sx: __spreadValues({ width: "100%" }, sx), children: /* @__PURE__ */ jsx(
|
|
5393
5205
|
Stepper,
|
|
5394
5206
|
{
|
|
5395
5207
|
activeStep,
|
|
@@ -5403,7 +5215,7 @@ var BaseStepper = ({
|
|
|
5403
5215
|
if (isActive) statusColor = PrimitiveColor.color_blue_cakrawala_500;
|
|
5404
5216
|
if (isCompleted) statusColor = PrimitiveColor.color_green_500;
|
|
5405
5217
|
return /* @__PURE__ */ jsx(Step, { children: /* @__PURE__ */ jsx(CustomStepLabel, { orientation, children: /* @__PURE__ */ jsxs(
|
|
5406
|
-
|
|
5218
|
+
Box12,
|
|
5407
5219
|
{
|
|
5408
5220
|
sx: {
|
|
5409
5221
|
display: "flex",
|
|
@@ -5440,16 +5252,16 @@ BaseStepper.propTypes = {
|
|
|
5440
5252
|
variant: PropTypes3.oneOf(["simple", "dashboard"]),
|
|
5441
5253
|
sx: PropTypes3.object
|
|
5442
5254
|
};
|
|
5443
|
-
var
|
|
5444
|
-
var InputAdornment2 = (
|
|
5445
|
-
var
|
|
5446
|
-
var TextField2 = (
|
|
5447
|
-
var
|
|
5448
|
-
var
|
|
5449
|
-
var
|
|
5450
|
-
var Typography4 = (
|
|
5451
|
-
var BaseTextField = (
|
|
5452
|
-
var
|
|
5255
|
+
var _a63, _b63;
|
|
5256
|
+
var InputAdornment2 = (_b63 = (_a63 = InputAdornmentRaw) == null ? void 0 : _a63.default) != null ? _b63 : InputAdornmentRaw;
|
|
5257
|
+
var _a64, _b64;
|
|
5258
|
+
var TextField2 = (_b64 = (_a64 = TextFieldRaw) == null ? void 0 : _a64.default) != null ? _b64 : TextFieldRaw;
|
|
5259
|
+
var _a65, _b65;
|
|
5260
|
+
var Box13 = (_b65 = (_a65 = BoxRaw) == null ? void 0 : _a65.default) != null ? _b65 : BoxRaw;
|
|
5261
|
+
var _a66, _b66;
|
|
5262
|
+
var Typography4 = (_b66 = (_a66 = MuiTypographyRaw) == null ? void 0 : _a66.default) != null ? _b66 : MuiTypographyRaw;
|
|
5263
|
+
var BaseTextField = (_a107) => {
|
|
5264
|
+
var _b107 = _a107, {
|
|
5453
5265
|
name = "",
|
|
5454
5266
|
control = null,
|
|
5455
5267
|
defaultValue,
|
|
@@ -5470,7 +5282,7 @@ var BaseTextField = (_a112) => {
|
|
|
5470
5282
|
InputProps: externalInputProps,
|
|
5471
5283
|
inputProps: externalInputPropsLower,
|
|
5472
5284
|
sx = {}
|
|
5473
|
-
} =
|
|
5285
|
+
} = _b107, props = __objRest(_b107, [
|
|
5474
5286
|
"name",
|
|
5475
5287
|
"control",
|
|
5476
5288
|
"defaultValue",
|
|
@@ -5492,7 +5304,7 @@ var BaseTextField = (_a112) => {
|
|
|
5492
5304
|
"inputProps",
|
|
5493
5305
|
"sx"
|
|
5494
5306
|
]);
|
|
5495
|
-
var
|
|
5307
|
+
var _a108, _b108, _c, _d, _e, _f;
|
|
5496
5308
|
const { field, formState } = useController({ control, name, defaultValue });
|
|
5497
5309
|
const inputRef = useRef(null);
|
|
5498
5310
|
const hasMask = !!textMask;
|
|
@@ -5585,12 +5397,12 @@ var BaseTextField = (_a112) => {
|
|
|
5585
5397
|
return new RegExp(`^[${allowedPattern}\\s]+$`);
|
|
5586
5398
|
};
|
|
5587
5399
|
const handleKeyDown = (e) => {
|
|
5588
|
-
var
|
|
5400
|
+
var _a109, _b109, _c2;
|
|
5589
5401
|
if (hasMask) {
|
|
5590
5402
|
const input = e.target;
|
|
5591
5403
|
const value = input.value || "";
|
|
5592
|
-
const selectionStart = (
|
|
5593
|
-
const selectionEnd = (
|
|
5404
|
+
const selectionStart = (_a109 = input.selectionStart) != null ? _a109 : value.length;
|
|
5405
|
+
const selectionEnd = (_b109 = input.selectionEnd) != null ? _b109 : value.length;
|
|
5594
5406
|
const allowedKeys2 = [
|
|
5595
5407
|
"Tab",
|
|
5596
5408
|
"Backspace",
|
|
@@ -5736,7 +5548,7 @@ var BaseTextField = (_a112) => {
|
|
|
5736
5548
|
}
|
|
5737
5549
|
};
|
|
5738
5550
|
const handlePaste = (e) => {
|
|
5739
|
-
var
|
|
5551
|
+
var _a109, _b109;
|
|
5740
5552
|
if (hasMask) {
|
|
5741
5553
|
if (isCantPaste) {
|
|
5742
5554
|
e.preventDefault();
|
|
@@ -5745,8 +5557,8 @@ var BaseTextField = (_a112) => {
|
|
|
5745
5557
|
const pastedData2 = e.clipboardData.getData("Text") || "";
|
|
5746
5558
|
const cleaned = sanitizeRaw(pastedData2);
|
|
5747
5559
|
const input = e.target;
|
|
5748
|
-
const selectionStart2 = (
|
|
5749
|
-
const selectionEnd2 = (
|
|
5560
|
+
const selectionStart2 = (_a109 = input.selectionStart) != null ? _a109 : 0;
|
|
5561
|
+
const selectionEnd2 = (_b109 = input.selectionEnd) != null ? _b109 : 0;
|
|
5750
5562
|
const currentRaw = sanitizeRaw(field.value).slice(0, maskSlots);
|
|
5751
5563
|
let rawArr = currentRaw.split("");
|
|
5752
5564
|
const xStart = (textMask.slice(0, selectionStart2).match(/x/gi) || []).length;
|
|
@@ -5819,15 +5631,15 @@ var BaseTextField = (_a112) => {
|
|
|
5819
5631
|
setDisplayValue(newDisplay);
|
|
5820
5632
|
field.onChange(raw);
|
|
5821
5633
|
requestAnimationFrame(() => {
|
|
5822
|
-
var
|
|
5634
|
+
var _a109;
|
|
5823
5635
|
try {
|
|
5824
5636
|
const caret = computeCaretFromRawLen(raw.length, textMask);
|
|
5825
|
-
(
|
|
5637
|
+
(_a109 = inputRef.current) == null ? void 0 : _a109.setSelectionRange(caret, caret);
|
|
5826
5638
|
} catch (e2) {
|
|
5827
5639
|
}
|
|
5828
5640
|
});
|
|
5829
5641
|
};
|
|
5830
|
-
return /* @__PURE__ */ jsxs(
|
|
5642
|
+
return /* @__PURE__ */ jsxs(Box13, { sx, children: [
|
|
5831
5643
|
props.title && /* @__PURE__ */ jsx(
|
|
5832
5644
|
Typography4,
|
|
5833
5645
|
{
|
|
@@ -5842,10 +5654,10 @@ var BaseTextField = (_a112) => {
|
|
|
5842
5654
|
id: props.id || `field-${name}`,
|
|
5843
5655
|
variant: "outlined",
|
|
5844
5656
|
fullWidth: true,
|
|
5845
|
-
error: !!((
|
|
5657
|
+
error: !!((_a108 = formState.errors) == null ? void 0 : _a108[name]),
|
|
5846
5658
|
helperText: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5847
|
-
/* @__PURE__ */ jsx(
|
|
5848
|
-
maxLength && showCountHelper && /* @__PURE__ */ jsxs(
|
|
5659
|
+
/* @__PURE__ */ jsx(Box13, { component: "span", children: ((_c = (_b108 = formState.errors) == null ? void 0 : _b108[name]) == null ? void 0 : _c.message) || (maxLength && showLength ? `Maksimal ${maxLength} Karakter` : "") }),
|
|
5660
|
+
maxLength && showCountHelper && /* @__PURE__ */ jsxs(Box13, { component: "span", sx: { ml: "auto" }, children: [
|
|
5849
5661
|
((_d = field.value) == null ? void 0 : _d.length) || 0,
|
|
5850
5662
|
"/",
|
|
5851
5663
|
maxLength
|
|
@@ -5895,18 +5707,18 @@ var BaseTextField = (_a112) => {
|
|
|
5895
5707
|
)
|
|
5896
5708
|
] });
|
|
5897
5709
|
};
|
|
5710
|
+
var _a67, _b67;
|
|
5711
|
+
var Box14 = (_b67 = (_a67 = BoxRaw) == null ? void 0 : _a67.default) != null ? _b67 : BoxRaw;
|
|
5712
|
+
var _a68, _b68;
|
|
5713
|
+
var Button2 = (_b68 = (_a68 = ButtonRaw) == null ? void 0 : _a68.default) != null ? _b68 : ButtonRaw;
|
|
5714
|
+
var _a69, _b69;
|
|
5715
|
+
var Input = (_b69 = (_a69 = InputRaw) == null ? void 0 : _a69.default) != null ? _b69 : InputRaw;
|
|
5716
|
+
var _a70, _b70;
|
|
5717
|
+
var TextField3 = (_b70 = (_a70 = TextFieldRaw) == null ? void 0 : _a70.default) != null ? _b70 : TextFieldRaw;
|
|
5718
|
+
var _a71, _b71;
|
|
5719
|
+
var Typography5 = (_b71 = (_a71 = MuiTypographyRaw) == null ? void 0 : _a71.default) != null ? _b71 : MuiTypographyRaw;
|
|
5898
5720
|
var _a72, _b72;
|
|
5899
|
-
var
|
|
5900
|
-
var _a73, _b73;
|
|
5901
|
-
var Button2 = (_b73 = (_a73 = ButtonRaw) == null ? void 0 : _a73.default) != null ? _b73 : ButtonRaw;
|
|
5902
|
-
var _a74, _b74;
|
|
5903
|
-
var Input = (_b74 = (_a74 = InputRaw) == null ? void 0 : _a74.default) != null ? _b74 : InputRaw;
|
|
5904
|
-
var _a75, _b75;
|
|
5905
|
-
var TextField3 = (_b75 = (_a75 = TextFieldRaw) == null ? void 0 : _a75.default) != null ? _b75 : TextFieldRaw;
|
|
5906
|
-
var _a76, _b76;
|
|
5907
|
-
var Typography5 = (_b76 = (_a76 = MuiTypographyRaw) == null ? void 0 : _a76.default) != null ? _b76 : MuiTypographyRaw;
|
|
5908
|
-
var _a77, _b77;
|
|
5909
|
-
var UploadFile = (_b77 = (_a77 = UploadFileRaw) == null ? void 0 : _a77.default) != null ? _b77 : UploadFileRaw;
|
|
5721
|
+
var UploadFile = (_b72 = (_a72 = UploadFileRaw) == null ? void 0 : _a72.default) != null ? _b72 : UploadFileRaw;
|
|
5910
5722
|
var TextFieldUpload = ({
|
|
5911
5723
|
name = "upload",
|
|
5912
5724
|
control,
|
|
@@ -5932,14 +5744,14 @@ var TextFieldUpload = ({
|
|
|
5932
5744
|
const [fileSizeError, setFileSizeError] = useState(false);
|
|
5933
5745
|
const [unsupportedFile, setUnsupportedFile] = useState(false);
|
|
5934
5746
|
const handleFileChange = (event) => {
|
|
5935
|
-
var
|
|
5936
|
-
const file = (
|
|
5747
|
+
var _a107, _b107;
|
|
5748
|
+
const file = (_a107 = event.target.files) == null ? void 0 : _a107[0];
|
|
5937
5749
|
if (!file) {
|
|
5938
5750
|
field.onChange("");
|
|
5939
5751
|
uploadFile == null ? void 0 : uploadFile("", null);
|
|
5940
5752
|
return;
|
|
5941
5753
|
}
|
|
5942
|
-
const extension = (
|
|
5754
|
+
const extension = (_b107 = file.name.split(".").pop()) == null ? void 0 : _b107.toLowerCase();
|
|
5943
5755
|
const acceptedExtensions = accept ? accept.split(",").map((ext) => ext.trim().toLowerCase()) : [];
|
|
5944
5756
|
if (acceptedExtensions.length > 0 && !acceptedExtensions.includes(`.${extension}`)) {
|
|
5945
5757
|
setUnsupportedFile(true);
|
|
@@ -5963,8 +5775,8 @@ var TextFieldUpload = ({
|
|
|
5963
5775
|
const borderColor = isError ? PrimitiveColor.color_red_500 : isSuccess ? PrimitiveColor.color_blue_cakrawala_500 : PrimitiveColor.color_neutral_300;
|
|
5964
5776
|
const helperText = fileSizeError ? `Ukuran file melebihi ${maxSize} MB` : unsupportedFile ? "Format file tidak didukung" : `Format ${accept || "-"} ukuran maks. ${maxSize} MB`;
|
|
5965
5777
|
const handleButtonClick = () => {
|
|
5966
|
-
var
|
|
5967
|
-
(
|
|
5778
|
+
var _a107;
|
|
5779
|
+
(_a107 = inputRef.current) == null ? void 0 : _a107.click();
|
|
5968
5780
|
};
|
|
5969
5781
|
const uploadButton = /* @__PURE__ */ jsx(
|
|
5970
5782
|
Button2,
|
|
@@ -6003,7 +5815,7 @@ var TextFieldUpload = ({
|
|
|
6003
5815
|
)
|
|
6004
5816
|
}
|
|
6005
5817
|
);
|
|
6006
|
-
return /* @__PURE__ */ jsxs(
|
|
5818
|
+
return /* @__PURE__ */ jsxs(Box14, { width: "100%", children: [
|
|
6007
5819
|
title && /* @__PURE__ */ jsx(
|
|
6008
5820
|
Typography5,
|
|
6009
5821
|
{
|
|
@@ -6014,8 +5826,8 @@ var TextFieldUpload = ({
|
|
|
6014
5826
|
children: title
|
|
6015
5827
|
}
|
|
6016
5828
|
),
|
|
6017
|
-
/* @__PURE__ */ jsxs(
|
|
6018
|
-
/* @__PURE__ */ jsxs(
|
|
5829
|
+
/* @__PURE__ */ jsxs(Box14, { width: "100%", children: [
|
|
5830
|
+
/* @__PURE__ */ jsxs(Box14, { display: "flex", width: "100%", children: [
|
|
6019
5831
|
buttonPosition === "start" && uploadButton,
|
|
6020
5832
|
/* @__PURE__ */ jsx(
|
|
6021
5833
|
TextField3,
|
|
@@ -6054,7 +5866,7 @@ var TextFieldUpload = ({
|
|
|
6054
5866
|
buttonPosition === "end" && uploadButton
|
|
6055
5867
|
] }),
|
|
6056
5868
|
/* @__PURE__ */ jsxs(
|
|
6057
|
-
|
|
5869
|
+
Box14,
|
|
6058
5870
|
{
|
|
6059
5871
|
display: "flex",
|
|
6060
5872
|
alignItems: "center",
|
|
@@ -6094,13 +5906,13 @@ function Editor(props) {
|
|
|
6094
5906
|
useEffect(() => {
|
|
6095
5907
|
let cancelled = false;
|
|
6096
5908
|
async function load() {
|
|
6097
|
-
var
|
|
5909
|
+
var _a107, _b107, _c, _d, _e, _f, _g;
|
|
6098
5910
|
const alreadyLoaded = typeof window !== "undefined" && window.tinymce;
|
|
6099
5911
|
if (!alreadyLoaded) {
|
|
6100
5912
|
try {
|
|
6101
5913
|
const tinymceModule = await import('tinymce/tinymce');
|
|
6102
5914
|
if (typeof window !== "undefined" && !window.tinymce) {
|
|
6103
|
-
const core = (
|
|
5915
|
+
const core = (_a107 = tinymceModule.default) != null ? _a107 : tinymceModule;
|
|
6104
5916
|
if (core && typeof core === "object" && core.tinymce) {
|
|
6105
5917
|
window.tinymce = core.tinymce;
|
|
6106
5918
|
} else {
|
|
@@ -6152,7 +5964,7 @@ function Editor(props) {
|
|
|
6152
5964
|
import('tinymce/skins/content/default/content.min.css'),
|
|
6153
5965
|
import('tinymce/skins/ui/oxide/content.min.css')
|
|
6154
5966
|
]);
|
|
6155
|
-
const skinCss = (
|
|
5967
|
+
const skinCss = (_b107 = skinMod == null ? void 0 : skinMod.default) != null ? _b107 : "";
|
|
6156
5968
|
const contentCss = (_c = contentMod == null ? void 0 : contentMod.default) != null ? _c : "";
|
|
6157
5969
|
const oxideContentCss = (_d = oxideContentMod == null ? void 0 : oxideContentMod.default) != null ? _d : "";
|
|
6158
5970
|
const combinedCss = [skinCss, contentCss, oxideContentCss].filter(Boolean).join("\n");
|
|
@@ -6192,16 +6004,16 @@ function Editor(props) {
|
|
|
6192
6004
|
}
|
|
6193
6005
|
return /* @__PURE__ */ jsx(TinyEditor, __spreadValues({}, props));
|
|
6194
6006
|
}
|
|
6195
|
-
var
|
|
6196
|
-
var InputAdornment3 = (
|
|
6197
|
-
var
|
|
6198
|
-
var TextField4 = (
|
|
6199
|
-
var
|
|
6200
|
-
var
|
|
6201
|
-
var
|
|
6202
|
-
var Typography6 = (
|
|
6203
|
-
var BaseTextArea = (
|
|
6204
|
-
var
|
|
6007
|
+
var _a73, _b73;
|
|
6008
|
+
var InputAdornment3 = (_b73 = (_a73 = InputAdornmentRaw) == null ? void 0 : _a73.default) != null ? _b73 : InputAdornmentRaw;
|
|
6009
|
+
var _a74, _b74;
|
|
6010
|
+
var TextField4 = (_b74 = (_a74 = TextFieldRaw) == null ? void 0 : _a74.default) != null ? _b74 : TextFieldRaw;
|
|
6011
|
+
var _a75, _b75;
|
|
6012
|
+
var Box15 = (_b75 = (_a75 = BoxRaw) == null ? void 0 : _a75.default) != null ? _b75 : BoxRaw;
|
|
6013
|
+
var _a76, _b76;
|
|
6014
|
+
var Typography6 = (_b76 = (_a76 = MuiTypographyRaw) == null ? void 0 : _a76.default) != null ? _b76 : MuiTypographyRaw;
|
|
6015
|
+
var BaseTextArea = (_a107) => {
|
|
6016
|
+
var _b107 = _a107, {
|
|
6205
6017
|
name = "",
|
|
6206
6018
|
control = null,
|
|
6207
6019
|
defaultValue = "",
|
|
@@ -6215,7 +6027,7 @@ var BaseTextArea = (_a112) => {
|
|
|
6215
6027
|
init,
|
|
6216
6028
|
handleImageUpload,
|
|
6217
6029
|
sx = {}
|
|
6218
|
-
} =
|
|
6030
|
+
} = _b107, props = __objRest(_b107, [
|
|
6219
6031
|
"name",
|
|
6220
6032
|
"control",
|
|
6221
6033
|
"defaultValue",
|
|
@@ -6230,8 +6042,8 @@ var BaseTextArea = (_a112) => {
|
|
|
6230
6042
|
"handleImageUpload",
|
|
6231
6043
|
"sx"
|
|
6232
6044
|
]);
|
|
6233
|
-
var
|
|
6234
|
-
const computedMaxLength = (
|
|
6045
|
+
var _a108, _b108, _c, _d, _e, _f, _g;
|
|
6046
|
+
const computedMaxLength = (_b108 = exactLength != null ? exactLength : maxLength) != null ? _b108 : (_a108 = rules == null ? void 0 : rules.maxLength) == null ? void 0 : _a108.value;
|
|
6235
6047
|
const { field, fieldState } = useController({
|
|
6236
6048
|
control,
|
|
6237
6049
|
name,
|
|
@@ -6288,7 +6100,7 @@ var BaseTextArea = (_a112) => {
|
|
|
6288
6100
|
const editorId = (_e = props.id) != null ? _e : `textarea-${name}-${uniqueSuffix}`;
|
|
6289
6101
|
const wrapperId = `editor-wrap-${uniqueSuffix}`;
|
|
6290
6102
|
if (useRichText) {
|
|
6291
|
-
return /* @__PURE__ */ jsxs(
|
|
6103
|
+
return /* @__PURE__ */ jsxs(Box15, { id: wrapperId, sx, children: [
|
|
6292
6104
|
title && /* @__PURE__ */ jsxs(
|
|
6293
6105
|
Typography6,
|
|
6294
6106
|
{
|
|
@@ -6297,7 +6109,7 @@ var BaseTextArea = (_a112) => {
|
|
|
6297
6109
|
children: [
|
|
6298
6110
|
title,
|
|
6299
6111
|
" ",
|
|
6300
|
-
hasError && /* @__PURE__ */ jsxs(
|
|
6112
|
+
hasError && /* @__PURE__ */ jsxs(Box15, { component: "small", sx: { color: PrimitiveColor.color_red_500 }, children: [
|
|
6301
6113
|
"*",
|
|
6302
6114
|
errorMessage
|
|
6303
6115
|
] })
|
|
@@ -6397,7 +6209,7 @@ var BaseTextArea = (_a112) => {
|
|
|
6397
6209
|
] });
|
|
6398
6210
|
}
|
|
6399
6211
|
return /* @__PURE__ */ jsxs(
|
|
6400
|
-
|
|
6212
|
+
Box15,
|
|
6401
6213
|
{
|
|
6402
6214
|
sx: __spreadValues({
|
|
6403
6215
|
display: "flex",
|
|
@@ -6437,20 +6249,20 @@ var BaseTextArea = (_a112) => {
|
|
|
6437
6249
|
}
|
|
6438
6250
|
);
|
|
6439
6251
|
};
|
|
6252
|
+
var _a77, _b77;
|
|
6253
|
+
var CloseIcon2 = (_b77 = (_a77 = CloseIconRaw) == null ? void 0 : _a77.default) != null ? _b77 : CloseIconRaw;
|
|
6254
|
+
var _a78, _b78;
|
|
6255
|
+
var Dialog = (_b78 = (_a78 = DialogRaw) == null ? void 0 : _a78.default) != null ? _b78 : DialogRaw;
|
|
6256
|
+
var _a79, _b79;
|
|
6257
|
+
var DialogTitle = (_b79 = (_a79 = DialogTitleRaw) == null ? void 0 : _a79.default) != null ? _b79 : DialogTitleRaw;
|
|
6258
|
+
var _a80, _b80;
|
|
6259
|
+
var DialogContent = (_b80 = (_a80 = DialogContentRaw) == null ? void 0 : _a80.default) != null ? _b80 : DialogContentRaw;
|
|
6260
|
+
var _a81, _b81;
|
|
6261
|
+
var DialogActions = (_b81 = (_a81 = DialogActionsRaw) == null ? void 0 : _a81.default) != null ? _b81 : DialogActionsRaw;
|
|
6440
6262
|
var _a82, _b82;
|
|
6441
|
-
var
|
|
6442
|
-
var
|
|
6443
|
-
var
|
|
6444
|
-
var _a84, _b84;
|
|
6445
|
-
var DialogTitle = (_b84 = (_a84 = DialogTitleRaw) == null ? void 0 : _a84.default) != null ? _b84 : DialogTitleRaw;
|
|
6446
|
-
var _a85, _b85;
|
|
6447
|
-
var DialogContent = (_b85 = (_a85 = DialogContentRaw) == null ? void 0 : _a85.default) != null ? _b85 : DialogContentRaw;
|
|
6448
|
-
var _a86, _b86;
|
|
6449
|
-
var DialogActions = (_b86 = (_a86 = DialogActionsRaw) == null ? void 0 : _a86.default) != null ? _b86 : DialogActionsRaw;
|
|
6450
|
-
var _a87, _b87;
|
|
6451
|
-
var IconButton5 = (_b87 = (_a87 = IconButtonRaw) == null ? void 0 : _a87.default) != null ? _b87 : IconButtonRaw;
|
|
6452
|
-
var BaseModal = (_a112) => {
|
|
6453
|
-
var _b112 = _a112, {
|
|
6263
|
+
var IconButton4 = (_b82 = (_a82 = IconButtonRaw) == null ? void 0 : _a82.default) != null ? _b82 : IconButtonRaw;
|
|
6264
|
+
var BaseModal = (_a107) => {
|
|
6265
|
+
var _b107 = _a107, {
|
|
6454
6266
|
open,
|
|
6455
6267
|
onClose,
|
|
6456
6268
|
onConfirm,
|
|
@@ -6473,7 +6285,7 @@ var BaseModal = (_a112) => {
|
|
|
6473
6285
|
align = "center",
|
|
6474
6286
|
modalWidth = "w-[350px]",
|
|
6475
6287
|
showCloseIcon = true
|
|
6476
|
-
} =
|
|
6288
|
+
} = _b107, props = __objRest(_b107, [
|
|
6477
6289
|
"open",
|
|
6478
6290
|
"onClose",
|
|
6479
6291
|
"onConfirm",
|
|
@@ -6535,7 +6347,7 @@ var BaseModal = (_a112) => {
|
|
|
6535
6347
|
PaperProps: { className: modalWidth },
|
|
6536
6348
|
children: [
|
|
6537
6349
|
(title || showCloseIcon) && /* @__PURE__ */ jsx(DialogTitle, { sx: { p: SpacingToken.spacing4 }, children: showCloseIcon && /* @__PURE__ */ jsx(
|
|
6538
|
-
|
|
6350
|
+
IconButton4,
|
|
6539
6351
|
{
|
|
6540
6352
|
"aria-label": "close",
|
|
6541
6353
|
onClick: onClose,
|
|
@@ -6627,42 +6439,42 @@ BaseModal.propTypes = {
|
|
|
6627
6439
|
modalWidth: PropTypes3.string,
|
|
6628
6440
|
showCloseIcon: PropTypes3.bool
|
|
6629
6441
|
};
|
|
6442
|
+
var _a83, _b83;
|
|
6443
|
+
var CloseIcon3 = (_b83 = (_a83 = CloseIconRaw) == null ? void 0 : _a83.default) != null ? _b83 : CloseIconRaw;
|
|
6444
|
+
var _a84, _b84;
|
|
6445
|
+
var CheckIcon2 = (_b84 = (_a84 = CheckRaw) == null ? void 0 : _a84.default) != null ? _b84 : CheckRaw;
|
|
6446
|
+
var _a85, _b85;
|
|
6447
|
+
var FailedIcon = (_b85 = (_a85 = CloseIconRaw) == null ? void 0 : _a85.default) != null ? _b85 : CloseIconRaw;
|
|
6448
|
+
var _a86, _b86;
|
|
6449
|
+
var InfoIcon = (_b86 = (_a86 = InfoIconRaw) == null ? void 0 : _a86.default) != null ? _b86 : InfoIconRaw;
|
|
6450
|
+
var _a87, _b87;
|
|
6451
|
+
var Dialog2 = (_b87 = (_a87 = DialogRaw) == null ? void 0 : _a87.default) != null ? _b87 : DialogRaw;
|
|
6630
6452
|
var _a88, _b88;
|
|
6631
|
-
var
|
|
6453
|
+
var DialogTitle2 = (_b88 = (_a88 = DialogTitleRaw) == null ? void 0 : _a88.default) != null ? _b88 : DialogTitleRaw;
|
|
6632
6454
|
var _a89, _b89;
|
|
6633
|
-
var
|
|
6455
|
+
var DialogContent2 = (_b89 = (_a89 = DialogContentRaw) == null ? void 0 : _a89.default) != null ? _b89 : DialogContentRaw;
|
|
6634
6456
|
var _a90, _b90;
|
|
6635
|
-
var
|
|
6457
|
+
var DialogActions2 = (_b90 = (_a90 = DialogActionsRaw) == null ? void 0 : _a90.default) != null ? _b90 : DialogActionsRaw;
|
|
6636
6458
|
var _a91, _b91;
|
|
6637
|
-
var
|
|
6459
|
+
var IconButton5 = (_b91 = (_a91 = IconButtonRaw) == null ? void 0 : _a91.default) != null ? _b91 : IconButtonRaw;
|
|
6638
6460
|
var _a92, _b92;
|
|
6639
|
-
var
|
|
6461
|
+
var Typography7 = (_b92 = (_a92 = MuiTypographyRaw) == null ? void 0 : _a92.default) != null ? _b92 : MuiTypographyRaw;
|
|
6640
6462
|
var _a93, _b93;
|
|
6641
|
-
var
|
|
6463
|
+
var Box16 = (_b93 = (_a93 = BoxRaw) == null ? void 0 : _a93.default) != null ? _b93 : BoxRaw;
|
|
6642
6464
|
var _a94, _b94;
|
|
6643
|
-
var
|
|
6465
|
+
var Stepper2 = (_b94 = (_a94 = StepperRaw) == null ? void 0 : _a94.default) != null ? _b94 : StepperRaw;
|
|
6644
6466
|
var _a95, _b95;
|
|
6645
|
-
var
|
|
6467
|
+
var Step2 = (_b95 = (_a95 = StepRaw) == null ? void 0 : _a95.default) != null ? _b95 : StepRaw;
|
|
6646
6468
|
var _a96, _b96;
|
|
6647
|
-
var
|
|
6469
|
+
var StepLabel2 = (_b96 = (_a96 = StepLabelRaw) == null ? void 0 : _a96.default) != null ? _b96 : StepLabelRaw;
|
|
6648
6470
|
var _a97, _b97;
|
|
6649
|
-
var
|
|
6471
|
+
var StepContent = (_b97 = (_a97 = StepContentRaw) == null ? void 0 : _a97.default) != null ? _b97 : StepContentRaw;
|
|
6650
6472
|
var _a98, _b98;
|
|
6651
|
-
var
|
|
6473
|
+
var Tooltip2 = (_b98 = (_a98 = TooltipRaw) == null ? void 0 : _a98.default) != null ? _b98 : TooltipRaw;
|
|
6652
6474
|
var _a99, _b99;
|
|
6653
|
-
var
|
|
6654
|
-
var
|
|
6655
|
-
var
|
|
6656
|
-
var _a101, _b101;
|
|
6657
|
-
var StepLabel2 = (_b101 = (_a101 = StepLabelRaw) == null ? void 0 : _a101.default) != null ? _b101 : StepLabelRaw;
|
|
6658
|
-
var _a102, _b102;
|
|
6659
|
-
var StepContent = (_b102 = (_a102 = StepContentRaw) == null ? void 0 : _a102.default) != null ? _b102 : StepContentRaw;
|
|
6660
|
-
var _a103, _b103;
|
|
6661
|
-
var Tooltip2 = (_b103 = (_a103 = TooltipRaw) == null ? void 0 : _a103.default) != null ? _b103 : TooltipRaw;
|
|
6662
|
-
var _a104, _b104;
|
|
6663
|
-
var CircularProgress2 = (_b104 = (_a104 = CircularProgressRaw) == null ? void 0 : _a104.default) != null ? _b104 : CircularProgressRaw;
|
|
6664
|
-
var HtmlTooltip2 = styled((_a112) => {
|
|
6665
|
-
var _b112 = _a112, { className } = _b112, props = __objRest(_b112, ["className"]);
|
|
6475
|
+
var CircularProgress2 = (_b99 = (_a99 = CircularProgressRaw) == null ? void 0 : _a99.default) != null ? _b99 : CircularProgressRaw;
|
|
6476
|
+
var HtmlTooltip2 = styled((_a107) => {
|
|
6477
|
+
var _b107 = _a107, { className } = _b107, props = __objRest(_b107, ["className"]);
|
|
6666
6478
|
return /* @__PURE__ */ jsx(Tooltip2, __spreadProps(__spreadValues({}, props), { classes: { popper: className } }));
|
|
6667
6479
|
})(({ theme }) => ({
|
|
6668
6480
|
[`& .${tooltipClasses.tooltip}`]: {
|
|
@@ -6709,8 +6521,8 @@ var StepIconWrapper = styled("div")(({ ownerState }) => __spreadValues({
|
|
|
6709
6521
|
justifyContent: "center",
|
|
6710
6522
|
minHeight: ICON_SIZE
|
|
6711
6523
|
}, ownerState.active && { backgroundColor: "transparent" }));
|
|
6712
|
-
var BaseModalStepper = (
|
|
6713
|
-
var
|
|
6524
|
+
var BaseModalStepper = (_a107) => {
|
|
6525
|
+
var _b107 = _a107, {
|
|
6714
6526
|
open,
|
|
6715
6527
|
onClose,
|
|
6716
6528
|
title = "",
|
|
@@ -6721,7 +6533,7 @@ var BaseModalStepper = (_a112) => {
|
|
|
6721
6533
|
showFooter = true,
|
|
6722
6534
|
children,
|
|
6723
6535
|
modalWidth = "max-w-md"
|
|
6724
|
-
} =
|
|
6536
|
+
} = _b107, props = __objRest(_b107, [
|
|
6725
6537
|
"open",
|
|
6726
6538
|
"onClose",
|
|
6727
6539
|
"title",
|
|
@@ -6786,14 +6598,14 @@ var BaseModalStepper = (_a112) => {
|
|
|
6786
6598
|
icon: PropTypes3.node
|
|
6787
6599
|
};
|
|
6788
6600
|
useEffect(() => {
|
|
6789
|
-
var
|
|
6601
|
+
var _a108;
|
|
6790
6602
|
if (!open) {
|
|
6791
6603
|
setActiveStep(0);
|
|
6792
6604
|
return;
|
|
6793
6605
|
}
|
|
6794
6606
|
if (stepper.length === 0) return;
|
|
6795
6607
|
const incrementStep = () => setActiveStep((prev) => prev < stepper.length ? prev + 1 : prev);
|
|
6796
|
-
const delay = activeStep > 0 ? ((
|
|
6608
|
+
const delay = activeStep > 0 ? ((_a108 = stepper[activeStep - 1]) == null ? void 0 : _a108.responseTime) || 800 : 800;
|
|
6797
6609
|
const timer = setTimeout(incrementStep, delay);
|
|
6798
6610
|
return () => clearTimeout(timer);
|
|
6799
6611
|
}, [activeStep, stepper, open]);
|
|
@@ -6843,7 +6655,7 @@ var BaseModalStepper = (_a112) => {
|
|
|
6843
6655
|
/* @__PURE__ */ jsxs(DialogTitle2, { sx: { textAlign: "center", pt: 4 }, children: [
|
|
6844
6656
|
title && /* @__PURE__ */ jsx(Typography7, { style: VariantStyles.header1_bold, children: title }),
|
|
6845
6657
|
/* @__PURE__ */ jsx(
|
|
6846
|
-
|
|
6658
|
+
IconButton5,
|
|
6847
6659
|
{
|
|
6848
6660
|
"aria-label": "close",
|
|
6849
6661
|
onClick: onClose,
|
|
@@ -6859,7 +6671,7 @@ var BaseModalStepper = (_a112) => {
|
|
|
6859
6671
|
] }),
|
|
6860
6672
|
/* @__PURE__ */ jsxs(DialogContent2, { sx: { px: 4, pb: 3 }, children: [
|
|
6861
6673
|
children ? children : /* @__PURE__ */ jsxs(
|
|
6862
|
-
|
|
6674
|
+
Box16,
|
|
6863
6675
|
{
|
|
6864
6676
|
sx: {
|
|
6865
6677
|
display: "flex",
|
|
@@ -6884,7 +6696,7 @@ var BaseModalStepper = (_a112) => {
|
|
|
6884
6696
|
]
|
|
6885
6697
|
}
|
|
6886
6698
|
),
|
|
6887
|
-
/* @__PURE__ */ jsx(
|
|
6699
|
+
/* @__PURE__ */ jsx(Box16, { sx: { width: "100%", maxWidth: 500 }, children: /* @__PURE__ */ jsx(Stepper2, { activeStep, orientation: "vertical", children: stepper.map((step) => /* @__PURE__ */ jsxs(Step2, { children: [
|
|
6888
6700
|
/* @__PURE__ */ jsx(StepLabel2, { StepIconComponent: ColorlibStepIcon2, children: step.label }),
|
|
6889
6701
|
/* @__PURE__ */ jsx(StepContent, { children: /* @__PURE__ */ jsx(Typography7, { sx: { fontSize: 14 }, children: step.description }) })
|
|
6890
6702
|
] }, step.label)) }) })
|
|
@@ -6924,25 +6736,25 @@ BaseModalStepper.propTypes = {
|
|
|
6924
6736
|
};
|
|
6925
6737
|
var Countdown = dynamic(
|
|
6926
6738
|
() => import('react-countdown').then((mod) => {
|
|
6927
|
-
var
|
|
6928
|
-
return (
|
|
6739
|
+
var _a107;
|
|
6740
|
+
return (_a107 = mod.default) != null ? _a107 : mod;
|
|
6929
6741
|
}),
|
|
6930
6742
|
{ ssr: false }
|
|
6931
6743
|
);
|
|
6744
|
+
var _a100, _b100;
|
|
6745
|
+
var CloseIcon4 = (_b100 = (_a100 = CloseIconRaw) == null ? void 0 : _a100.default) != null ? _b100 : CloseIconRaw;
|
|
6746
|
+
var _a101, _b101;
|
|
6747
|
+
var Dialog3 = (_b101 = (_a101 = DialogRaw) == null ? void 0 : _a101.default) != null ? _b101 : DialogRaw;
|
|
6748
|
+
var _a102, _b102;
|
|
6749
|
+
var DialogContent3 = (_b102 = (_a102 = DialogContentRaw) == null ? void 0 : _a102.default) != null ? _b102 : DialogContentRaw;
|
|
6750
|
+
var _a103, _b103;
|
|
6751
|
+
var DialogTitle3 = (_b103 = (_a103 = DialogTitleRaw) == null ? void 0 : _a103.default) != null ? _b103 : DialogTitleRaw;
|
|
6752
|
+
var _a104, _b104;
|
|
6753
|
+
var IconButton6 = (_b104 = (_a104 = IconButtonRaw) == null ? void 0 : _a104.default) != null ? _b104 : IconButtonRaw;
|
|
6932
6754
|
var _a105, _b105;
|
|
6933
|
-
var
|
|
6755
|
+
var Box17 = (_b105 = (_a105 = BoxRaw) == null ? void 0 : _a105.default) != null ? _b105 : BoxRaw;
|
|
6934
6756
|
var _a106, _b106;
|
|
6935
|
-
var
|
|
6936
|
-
var _a107, _b107;
|
|
6937
|
-
var DialogContent3 = (_b107 = (_a107 = DialogContentRaw) == null ? void 0 : _a107.default) != null ? _b107 : DialogContentRaw;
|
|
6938
|
-
var _a108, _b108;
|
|
6939
|
-
var DialogTitle3 = (_b108 = (_a108 = DialogTitleRaw) == null ? void 0 : _a108.default) != null ? _b108 : DialogTitleRaw;
|
|
6940
|
-
var _a109, _b109;
|
|
6941
|
-
var IconButton7 = (_b109 = (_a109 = IconButtonRaw) == null ? void 0 : _a109.default) != null ? _b109 : IconButtonRaw;
|
|
6942
|
-
var _a110, _b110;
|
|
6943
|
-
var Box18 = (_b110 = (_a110 = BoxRaw) == null ? void 0 : _a110.default) != null ? _b110 : BoxRaw;
|
|
6944
|
-
var _a111, _b111;
|
|
6945
|
-
var Typography8 = (_b111 = (_a111 = MuiTypographyRaw) == null ? void 0 : _a111.default) != null ? _b111 : MuiTypographyRaw;
|
|
6757
|
+
var Typography8 = (_b106 = (_a106 = MuiTypographyRaw) == null ? void 0 : _a106.default) != null ? _b106 : MuiTypographyRaw;
|
|
6946
6758
|
var otpInputBase = {
|
|
6947
6759
|
height: 40,
|
|
6948
6760
|
width: 30,
|
|
@@ -6973,7 +6785,7 @@ var NativeOTPInput = ({ value, onChange, numInputs, hasError }) => {
|
|
|
6973
6785
|
const digits = value.split("");
|
|
6974
6786
|
const handleChange = useCallback(
|
|
6975
6787
|
(index, e) => {
|
|
6976
|
-
var
|
|
6788
|
+
var _a107;
|
|
6977
6789
|
const val = e.target.value;
|
|
6978
6790
|
if (!/^\d*$/.test(val)) return;
|
|
6979
6791
|
const newDigits = [...digits];
|
|
@@ -6982,20 +6794,20 @@ var NativeOTPInput = ({ value, onChange, numInputs, hasError }) => {
|
|
|
6982
6794
|
const newValue = newDigits.join("");
|
|
6983
6795
|
onChange(newValue.slice(0, numInputs));
|
|
6984
6796
|
if (val && index < numInputs - 1) {
|
|
6985
|
-
(
|
|
6797
|
+
(_a107 = inputRefs.current[index + 1]) == null ? void 0 : _a107.focus();
|
|
6986
6798
|
}
|
|
6987
6799
|
},
|
|
6988
6800
|
[digits, numInputs, onChange]
|
|
6989
6801
|
);
|
|
6990
6802
|
const handleKeyDown = useCallback(
|
|
6991
6803
|
(index, e) => {
|
|
6992
|
-
var
|
|
6804
|
+
var _a107, _b107, _c;
|
|
6993
6805
|
if (e.key === "Backspace" && !digits[index] && index > 0) {
|
|
6994
|
-
(
|
|
6806
|
+
(_a107 = inputRefs.current[index - 1]) == null ? void 0 : _a107.focus();
|
|
6995
6807
|
}
|
|
6996
6808
|
if (e.key === "ArrowLeft" && index > 0) {
|
|
6997
6809
|
e.preventDefault();
|
|
6998
|
-
(
|
|
6810
|
+
(_b107 = inputRefs.current[index - 1]) == null ? void 0 : _b107.focus();
|
|
6999
6811
|
}
|
|
7000
6812
|
if (e.key === "ArrowRight" && index < numInputs - 1) {
|
|
7001
6813
|
e.preventDefault();
|
|
@@ -7006,20 +6818,20 @@ var NativeOTPInput = ({ value, onChange, numInputs, hasError }) => {
|
|
|
7006
6818
|
);
|
|
7007
6819
|
const handlePaste = useCallback(
|
|
7008
6820
|
(e) => {
|
|
7009
|
-
var
|
|
6821
|
+
var _a107;
|
|
7010
6822
|
e.preventDefault();
|
|
7011
6823
|
const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, numInputs);
|
|
7012
6824
|
if (!pasted) return;
|
|
7013
6825
|
onChange(pasted);
|
|
7014
6826
|
const nextIdx = Math.min(pasted.length, numInputs - 1);
|
|
7015
|
-
(
|
|
6827
|
+
(_a107 = inputRefs.current[nextIdx]) == null ? void 0 : _a107.focus();
|
|
7016
6828
|
},
|
|
7017
6829
|
[numInputs, onChange]
|
|
7018
6830
|
);
|
|
7019
6831
|
useEffect(() => {
|
|
7020
6832
|
const timer = setTimeout(() => {
|
|
7021
|
-
var
|
|
7022
|
-
return (
|
|
6833
|
+
var _a107;
|
|
6834
|
+
return (_a107 = inputRefs.current[0]) == null ? void 0 : _a107.focus();
|
|
7023
6835
|
}, 100);
|
|
7024
6836
|
return () => clearTimeout(timer);
|
|
7025
6837
|
}, []);
|
|
@@ -7106,7 +6918,7 @@ var BaseModalOTP = ({
|
|
|
7106
6918
|
},
|
|
7107
6919
|
children: [
|
|
7108
6920
|
/* @__PURE__ */ jsx(DialogTitle3, { sx: { p: 0 }, children: /* @__PURE__ */ jsx(
|
|
7109
|
-
|
|
6921
|
+
IconButton6,
|
|
7110
6922
|
{
|
|
7111
6923
|
onClick: handleClose,
|
|
7112
6924
|
sx: {
|
|
@@ -7118,7 +6930,7 @@ var BaseModalOTP = ({
|
|
|
7118
6930
|
}
|
|
7119
6931
|
) }),
|
|
7120
6932
|
/* @__PURE__ */ jsx(DialogContent3, { sx: { p: 0 }, children: /* @__PURE__ */ jsxs(
|
|
7121
|
-
|
|
6933
|
+
Box17,
|
|
7122
6934
|
{
|
|
7123
6935
|
display: "flex",
|
|
7124
6936
|
flexDirection: "column",
|
|
@@ -7149,7 +6961,7 @@ var BaseModalOTP = ({
|
|
|
7149
6961
|
]
|
|
7150
6962
|
}
|
|
7151
6963
|
),
|
|
7152
|
-
/* @__PURE__ */ jsx(
|
|
6964
|
+
/* @__PURE__ */ jsx(Box17, { width: "100%", display: "flex", justifyContent: "center", children: /* @__PURE__ */ jsxs(
|
|
7153
6965
|
"form",
|
|
7154
6966
|
{
|
|
7155
6967
|
autoComplete: "off",
|
|
@@ -7236,6 +7048,6 @@ var BaseModalOTP = ({
|
|
|
7236
7048
|
);
|
|
7237
7049
|
};
|
|
7238
7050
|
|
|
7239
|
-
export { ArrowFrameOutlineDownIcon, ArrowFrameOutlineLeftIcon, ArrowFrameOutlineRightIcon, ArrowFrameOutlineUpIcon, ArrowLeft, ArrowRight, ArrowStandardDownIcon, ArrowStandardLeftIcon, ArrowStandardRightIcon, ArrowStandardUpIcon, ArrowStandardUpRightIcon, ArrowUpDown, AuctionHammerIcon, BaseAlert, BaseButton, BaseCard, BaseCheckbox, BaseDatatable, BaseDatePicker, BaseDropdown, BaseDropzone, BaseModal, BaseModalOTP, BaseModalStepper, BaseRadioButton,
|
|
7051
|
+
export { ArrowFrameOutlineDownIcon, ArrowFrameOutlineLeftIcon, ArrowFrameOutlineRightIcon, ArrowFrameOutlineUpIcon, ArrowLeft, ArrowRight, ArrowStandardDownIcon, ArrowStandardLeftIcon, ArrowStandardRightIcon, ArrowStandardUpIcon, ArrowStandardUpRightIcon, ArrowUpDown, AuctionHammerIcon, BaseAlert, BaseButton, BaseCard, BaseCheckbox, BaseDatatable, BaseDatePicker, BaseDropdown, BaseDropzone, BaseModal, BaseModalOTP, BaseModalStepper, BaseRadioButton, BaseStepper, BaseSwitch, BaseTextArea, BaseTextField, BaseTypography, CONTENT_SPACING_TOKENS, CalculatorIcon, CapsLockOn, CashIcon, CheckboxBorder, CheckboxChecked, ChecklistGreen, CircleCheck, CircleCross, CommentBuble, ContentSpacing, Dashboard, DerivedColor, DocumentNotFound, DownloadDocumentIcon, DownloadIconLarge, DownloadIconSmall, FileOutlineCustom, GenerateDocumentIcon, HandstopSign, HomeAssetIcon, IconAdd, IconBiometricScan, IconBrokenImage, IconCalendar, IconCardOrange, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconConfeti, IconCross, IconCrossLine, IconDeleteBin, IconDocument, IconDocumentAdd, IconDocumentAddOutline, IconDocumentSleve, IconDownloadOutline, IconDuplicate, IconEdit, IconExclamation, IconFile, IconFileOutline, IconFileSleve, IconFingerScan, IconGradingRounded, IconHomeOutlined, IconImage, IconInfo, IconInfoBgPutih, IconInfoHover, IconListDocument, IconModalClose, IconMoney, IconMoneyOne, IconMoneyTwo, IconNoData, IconPeople, IconPeopleGroup, IconPhone, IconPlus, IconProgress, IconRecycle, IconReset, IconSave, IconSaveOutlined, IconSearch, IconSendBlue, IconSendOrange, IconSendWhite, IconSendWhiteFull, IconShuffle, IconTrash, IconTrashOutline, IconUpload, IconUser, IconUserScan, IconVerification, IconWallet, IconWarningTriangle, LoaderIcon, LogoutIcon, MaximizeIcon, MinimizeIcon, MoneyIcon, NotFoundIcon, PersonIcon, PrimitiveColor, Radius, radius_default as RadiusToken, RefreshIcon, ReloadIcon, ServerSidePaginationActions, Shadow, shadow_default as ShadowToken, spacing_default as Spacing, SpacingToken, StepOnProgress, SuffleIcon, TargetDartIcon, TextFieldUpload, ThumbsUp, UploadIcon, UsersIcon, VariantStyles };
|
|
7240
7052
|
//# sourceMappingURL=index.mjs.map
|
|
7241
7053
|
//# sourceMappingURL=index.mjs.map
|