@ctlyst.id/internal-ui 5.5.7 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +411 -349
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +162 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
@@ -4411,6 +4411,60 @@ import { useColorMode as useColorMode2 } from "@chakra-ui/system";
|
|
4411
4411
|
import * as Icon7 from "@ctlyst.id/internal-icon";
|
4412
4412
|
import ReactSelect, { components as componentRS } from "react-select";
|
4413
4413
|
|
4414
|
+
// src/components/select/components/menu-list-virtualized.tsx
|
4415
|
+
import { useVirtualizer } from "@tanstack/react-virtual";
|
4416
|
+
import { useRef as useRef3 } from "react";
|
4417
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
4418
|
+
var MenuListVirtualized = (props) => {
|
4419
|
+
const { children, estimateSize, overscan, ...virtualizerProps } = props;
|
4420
|
+
const childrenArr = Array.isArray(children) ? children : [children];
|
4421
|
+
const itemCount = childrenArr.length;
|
4422
|
+
const parentRef = useRef3(null);
|
4423
|
+
const rowVirtualizer = useVirtualizer({
|
4424
|
+
count: itemCount,
|
4425
|
+
getScrollElement: () => parentRef.current,
|
4426
|
+
estimateSize: estimateSize || (() => 42),
|
4427
|
+
overscan: overscan || 5,
|
4428
|
+
...virtualizerProps
|
4429
|
+
});
|
4430
|
+
return /* @__PURE__ */ jsx54(
|
4431
|
+
"div",
|
4432
|
+
{
|
4433
|
+
ref: parentRef,
|
4434
|
+
style: {
|
4435
|
+
height: `300px`,
|
4436
|
+
width: `100%`,
|
4437
|
+
overflow: "auto"
|
4438
|
+
},
|
4439
|
+
children: /* @__PURE__ */ jsx54(
|
4440
|
+
"div",
|
4441
|
+
{
|
4442
|
+
style: {
|
4443
|
+
height: `${rowVirtualizer.getTotalSize()}px`,
|
4444
|
+
width: "100%",
|
4445
|
+
position: "relative"
|
4446
|
+
},
|
4447
|
+
children: rowVirtualizer.getVirtualItems().map((virtualRow) => /* @__PURE__ */ jsx54(
|
4448
|
+
"div",
|
4449
|
+
{
|
4450
|
+
style: {
|
4451
|
+
position: "absolute",
|
4452
|
+
top: 0,
|
4453
|
+
left: 0,
|
4454
|
+
width: "100%",
|
4455
|
+
height: `${virtualRow.size}px`,
|
4456
|
+
transform: `translateY(${virtualRow.start}px)`
|
4457
|
+
},
|
4458
|
+
children: childrenArr[virtualRow.index]
|
4459
|
+
},
|
4460
|
+
virtualRow.index
|
4461
|
+
))
|
4462
|
+
}
|
4463
|
+
)
|
4464
|
+
}
|
4465
|
+
);
|
4466
|
+
};
|
4467
|
+
|
4414
4468
|
// src/config/theme/foundations/shadows.ts
|
4415
4469
|
import { theme } from "@chakra-ui/react";
|
4416
4470
|
var shadows = {
|
@@ -4783,22 +4837,22 @@ var themeSelect = (theme5) => {
|
|
4783
4837
|
};
|
4784
4838
|
|
4785
4839
|
// src/components/select/components/select.tsx
|
4786
|
-
import { jsx as
|
4840
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
4787
4841
|
function DropdownIndicator(props) {
|
4788
|
-
return /* @__PURE__ */
|
4842
|
+
return /* @__PURE__ */ jsx55(componentRS.DropdownIndicator, { ...props, children: /* @__PURE__ */ jsx55(Icon7.ChevronDown, { size: 4, color: "neutral.400" }) });
|
4789
4843
|
}
|
4790
4844
|
function ClearIndicator(props) {
|
4791
4845
|
const { hasValue } = props;
|
4792
|
-
return /* @__PURE__ */
|
4846
|
+
return /* @__PURE__ */ jsx55(componentRS.ClearIndicator, { ...props, children: /* @__PURE__ */ jsx55(Icon7.Close, { size: 4, color: hasValue ? "black.medium" : "neutral.400" }) });
|
4793
4847
|
}
|
4794
4848
|
function MultiValue(props) {
|
4795
|
-
return /* @__PURE__ */
|
4849
|
+
return /* @__PURE__ */ jsx55(componentRS.MultiValue, { ...props, children: /* @__PURE__ */ jsx55(Badge2, { pr: 0, variant: "neutral-light", children: props == null ? void 0 : props.data.label }) });
|
4796
4850
|
}
|
4797
4851
|
function MultiValueRemove(props) {
|
4798
|
-
return /* @__PURE__ */
|
4852
|
+
return /* @__PURE__ */ jsx55(componentRS.MultiValueRemove, { ...props, children: /* @__PURE__ */ jsx55(Flex11, { align: "center", justify: "center", children: /* @__PURE__ */ jsx55(Icon7.Close, { size: 2.5, color: "inherit" }) }) });
|
4799
4853
|
}
|
4800
4854
|
function NoOptionsMessage(props) {
|
4801
|
-
return /* @__PURE__ */
|
4855
|
+
return /* @__PURE__ */ jsx55(Center2, { textStyle: "text.xs", py: "1.5", color: "black.medium", children: (props == null ? void 0 : props.options.length) === 0 ? "Opsi tidak tersedia" : "Hasil tidak ditemukan" });
|
4802
4856
|
}
|
4803
4857
|
function Select2({
|
4804
4858
|
styles,
|
@@ -4806,8 +4860,9 @@ function Select2({
|
|
4806
4860
|
...rest
|
4807
4861
|
}) {
|
4808
4862
|
const { colorMode } = useColorMode2();
|
4809
|
-
const { components, value, onChange } = rest;
|
4810
|
-
|
4863
|
+
const { components, value, onChange, virtualized } = rest;
|
4864
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ jsx55(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
4865
|
+
return /* @__PURE__ */ jsx55(
|
4811
4866
|
ReactSelect,
|
4812
4867
|
{
|
4813
4868
|
"data-test-id": "",
|
@@ -4818,6 +4873,9 @@ function Select2({
|
|
4818
4873
|
MultiValue,
|
4819
4874
|
MultiValueRemove,
|
4820
4875
|
NoOptionsMessage,
|
4876
|
+
...virtualized ? {
|
4877
|
+
MenuList: renderMenuListVirtualized
|
4878
|
+
} : {},
|
4821
4879
|
...components
|
4822
4880
|
},
|
4823
4881
|
value,
|
@@ -4834,7 +4892,7 @@ var select_default = Select2;
|
|
4834
4892
|
// src/components/select/components/select-async.tsx
|
4835
4893
|
import { useColorMode as useColorMode3 } from "@chakra-ui/system";
|
4836
4894
|
import { AsyncPaginate } from "react-select-async-paginate";
|
4837
|
-
import { jsx as
|
4895
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
4838
4896
|
function SelectAsync({
|
4839
4897
|
styles,
|
4840
4898
|
isError = false,
|
@@ -4842,7 +4900,7 @@ function SelectAsync({
|
|
4842
4900
|
}) {
|
4843
4901
|
const { colorMode } = useColorMode3();
|
4844
4902
|
const { components } = rest;
|
4845
|
-
return /* @__PURE__ */
|
4903
|
+
return /* @__PURE__ */ jsx56(
|
4846
4904
|
AsyncPaginate,
|
4847
4905
|
{
|
4848
4906
|
classNamePrefix: "react-select",
|
@@ -4864,10 +4922,10 @@ var select_async_default = SelectAsync;
|
|
4864
4922
|
// src/components/select/components/select-async-creatable.tsx
|
4865
4923
|
import { useColorMode as useColorMode4 } from "@chakra-ui/system";
|
4866
4924
|
import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
4867
|
-
import { jsx as
|
4925
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
4868
4926
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
4869
4927
|
const { colorMode } = useColorMode4();
|
4870
|
-
return /* @__PURE__ */
|
4928
|
+
return /* @__PURE__ */ jsx57(
|
4871
4929
|
ReactSelectAsyncCreatable,
|
4872
4930
|
{
|
4873
4931
|
classNamePrefix: "react-select",
|
@@ -4887,10 +4945,10 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
4887
4945
|
// src/components/select/components/select-creatable.tsx
|
4888
4946
|
import { useColorMode as useColorMode5 } from "@chakra-ui/system";
|
4889
4947
|
import ReactSelectCreatable from "react-select/creatable";
|
4890
|
-
import { jsx as
|
4948
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
4891
4949
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
4892
4950
|
const { colorMode } = useColorMode5();
|
4893
|
-
return /* @__PURE__ */
|
4951
|
+
return /* @__PURE__ */ jsx58(
|
4894
4952
|
ReactSelectCreatable,
|
4895
4953
|
{
|
4896
4954
|
classNamePrefix: "react-select",
|
@@ -4911,7 +4969,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
4911
4969
|
import { Checkbox as Checkbox2, Flex as Flex12, Text as Text14 } from "@chakra-ui/react";
|
4912
4970
|
import { useColorMode as useColorMode6 } from "@chakra-ui/system";
|
4913
4971
|
import ReactSelect2, { components as ComponentRS } from "react-select";
|
4914
|
-
import { Fragment as Fragment8, jsx as
|
4972
|
+
import { Fragment as Fragment8, jsx as jsx59, jsxs as jsxs24 } from "react/jsx-runtime";
|
4915
4973
|
var CHECKBOX_STATE = {
|
4916
4974
|
UNCHECKED: 0,
|
4917
4975
|
INDETERMINATE: 1,
|
@@ -4959,7 +5017,7 @@ var InputOption = ({
|
|
4959
5017
|
style
|
4960
5018
|
};
|
4961
5019
|
return /* @__PURE__ */ jsxs24(Fragment8, { children: [
|
4962
|
-
/* @__PURE__ */
|
5020
|
+
/* @__PURE__ */ jsx59(
|
4963
5021
|
ComponentRS.Option,
|
4964
5022
|
{
|
4965
5023
|
isMulti: true,
|
@@ -4979,7 +5037,7 @@ var InputOption = ({
|
|
4979
5037
|
"data-test-id": "CT_component_select-checkbox_options",
|
4980
5038
|
cursor: isDisabled ? "not-allowed" : "default",
|
4981
5039
|
children: [
|
4982
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
5040
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx59(
|
4983
5041
|
Checkbox2,
|
4984
5042
|
{
|
4985
5043
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
@@ -4989,7 +5047,7 @@ var InputOption = ({
|
|
4989
5047
|
"data-test-id": "CT_component_select-checkbox_select-all-option",
|
4990
5048
|
isInvalid: false
|
4991
5049
|
}
|
4992
|
-
) : /* @__PURE__ */
|
5050
|
+
) : /* @__PURE__ */ jsx59(
|
4993
5051
|
Checkbox2,
|
4994
5052
|
{
|
4995
5053
|
pointerEvents: "none",
|
@@ -4998,13 +5056,13 @@ var InputOption = ({
|
|
4998
5056
|
isInvalid: false
|
4999
5057
|
}
|
5000
5058
|
),
|
5001
|
-
/* @__PURE__ */
|
5059
|
+
/* @__PURE__ */ jsx59(Text14, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
5002
5060
|
]
|
5003
5061
|
}
|
5004
5062
|
)
|
5005
5063
|
}
|
5006
5064
|
),
|
5007
|
-
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */
|
5065
|
+
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ jsx59("hr", {}) : null
|
5008
5066
|
] });
|
5009
5067
|
};
|
5010
5068
|
var SelectWithCheckboxBase = ({
|
@@ -5017,7 +5075,7 @@ var SelectWithCheckboxBase = ({
|
|
5017
5075
|
...rest
|
5018
5076
|
}) => {
|
5019
5077
|
const { colorMode } = useColorMode6();
|
5020
|
-
return /* @__PURE__ */
|
5078
|
+
return /* @__PURE__ */ jsx59(
|
5021
5079
|
ReactSelect2,
|
5022
5080
|
{
|
5023
5081
|
"data-test-id": "",
|
@@ -5036,8 +5094,9 @@ var SelectWithCheckboxBase = ({
|
|
5036
5094
|
);
|
5037
5095
|
};
|
5038
5096
|
var SelectCheckbox = (props) => {
|
5039
|
-
const { isMulti, options, value, components, ...rest } = props;
|
5097
|
+
const { isMulti, options, value, components, virtualized, ...rest } = props;
|
5040
5098
|
const selectValue = value || [];
|
5099
|
+
const renderMenuListVirtualized = (menuProps) => /* @__PURE__ */ jsx59(MenuListVirtualized, { ...menuProps, ...rest.virtualizerProps });
|
5041
5100
|
const defaultComponents = {
|
5042
5101
|
DropdownIndicator,
|
5043
5102
|
ClearIndicator,
|
@@ -5049,10 +5108,10 @@ var SelectCheckbox = (props) => {
|
|
5049
5108
|
const optionLength = (options == null ? void 0 : options.length) ? options.length - 1 : 0;
|
5050
5109
|
const selectedValue = isSelected ? CHECKBOX_STATE.CHECKED : CHECKBOX_STATE.UNCHECKED;
|
5051
5110
|
const checkedState = data.selectAllCheckbox ? getSelectAllCheckboxState(selectValue == null ? void 0 : selectValue.length, optionLength) : selectedValue;
|
5052
|
-
return /* @__PURE__ */
|
5111
|
+
return /* @__PURE__ */ jsx59(InputOption, { ...optionProps, checkedState });
|
5053
5112
|
}
|
5054
5113
|
};
|
5055
|
-
return /* @__PURE__ */
|
5114
|
+
return /* @__PURE__ */ jsx59(
|
5056
5115
|
SelectWithCheckboxBase,
|
5057
5116
|
{
|
5058
5117
|
"data-test-id": "",
|
@@ -5061,6 +5120,9 @@ var SelectCheckbox = (props) => {
|
|
5061
5120
|
value,
|
5062
5121
|
components: {
|
5063
5122
|
...defaultComponents,
|
5123
|
+
...virtualized ? {
|
5124
|
+
MenuList: renderMenuListVirtualized
|
5125
|
+
} : {},
|
5064
5126
|
...components
|
5065
5127
|
},
|
5066
5128
|
...rest
|
@@ -5072,10 +5134,10 @@ var select_with_checkbox_default = SelectCheckbox;
|
|
5072
5134
|
// src/components/sidebar/components/sidebar.tsx
|
5073
5135
|
import { Flex as Flex13 } from "@chakra-ui/react";
|
5074
5136
|
import { motion } from "framer-motion";
|
5075
|
-
import { jsx as
|
5137
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
5076
5138
|
var Sidebar = ({ isCollapse, children, ...props }) => {
|
5077
5139
|
const { width = "220px" } = props;
|
5078
|
-
return /* @__PURE__ */
|
5140
|
+
return /* @__PURE__ */ jsx60(
|
5079
5141
|
Flex13,
|
5080
5142
|
{
|
5081
5143
|
position: "relative",
|
@@ -5099,9 +5161,9 @@ Sidebar.displayName = "Sidebar";
|
|
5099
5161
|
import { Box as Box27, Flex as Flex14, Text as Text15 } from "@chakra-ui/react";
|
5100
5162
|
import { ArrowRight } from "@ctlyst.id/internal-icon";
|
5101
5163
|
import { AnimatePresence, motion as motion2 } from "framer-motion";
|
5102
|
-
import { jsx as
|
5164
|
+
import { jsx as jsx61, jsxs as jsxs25 } from "react/jsx-runtime";
|
5103
5165
|
var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
5104
|
-
return /* @__PURE__ */
|
5166
|
+
return /* @__PURE__ */ jsx61(
|
5105
5167
|
Box27,
|
5106
5168
|
{
|
5107
5169
|
px: "2",
|
@@ -5121,7 +5183,7 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5121
5183
|
onClick: () => setCollapse(!isCollapse),
|
5122
5184
|
cursor: "pointer",
|
5123
5185
|
children: [
|
5124
|
-
/* @__PURE__ */
|
5186
|
+
/* @__PURE__ */ jsx61(
|
5125
5187
|
Box27,
|
5126
5188
|
{
|
5127
5189
|
as: motion2.div,
|
@@ -5130,10 +5192,10 @@ var SidebarHeader = ({ isCollapse, setCollapse, title }) => {
|
|
5130
5192
|
animate: { rotate: isCollapse ? 0 : -180, x: isCollapse ? 8 : 0 },
|
5131
5193
|
transitionTimingFunction: "linear",
|
5132
5194
|
"aria-label": "toggle sidebar",
|
5133
|
-
children: /* @__PURE__ */
|
5195
|
+
children: /* @__PURE__ */ jsx61(ArrowRight, { size: 4, color: "inherit" })
|
5134
5196
|
}
|
5135
5197
|
),
|
5136
|
-
/* @__PURE__ */
|
5198
|
+
/* @__PURE__ */ jsx61(AnimatePresence, { children: !isCollapse && /* @__PURE__ */ jsx61(Box27, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx61(
|
5137
5199
|
Text15,
|
5138
5200
|
{
|
5139
5201
|
as: motion2.div,
|
@@ -5177,28 +5239,28 @@ import {
|
|
5177
5239
|
} from "@chakra-ui/react";
|
5178
5240
|
import * as Icon8 from "@ctlyst.id/internal-icon";
|
5179
5241
|
import { motion as motion3 } from "framer-motion";
|
5180
|
-
import { Fragment as Fragment9, jsx as
|
5242
|
+
import { Fragment as Fragment9, jsx as jsx62, jsxs as jsxs26 } from "react/jsx-runtime";
|
5181
5243
|
var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, setActive, active }) => {
|
5182
|
-
return /* @__PURE__ */
|
5244
|
+
return /* @__PURE__ */ jsx62(
|
5183
5245
|
Box28,
|
5184
5246
|
{
|
5185
5247
|
as: motion3.div,
|
5186
5248
|
transitionTimingFunction: "linear",
|
5187
5249
|
initial: { padding: "8px" },
|
5188
5250
|
animate: { padding: isCollapse ? "8px 16px" : "8px" },
|
5189
|
-
children: /* @__PURE__ */
|
5251
|
+
children: /* @__PURE__ */ jsx62(Accordion2, { index: menu.findIndex((item) => item.children.some((child) => child.navLink === active)), children: menu.map((item) => {
|
5190
5252
|
const isActive = active == null ? void 0 : active.includes(item.navLink);
|
5191
|
-
return /* @__PURE__ */
|
5253
|
+
return /* @__PURE__ */ jsx62(AccordionItem2, { mt: "4", children: ({ isExpanded }) => {
|
5192
5254
|
const isOpenOptions = isCollapse || !isCollapse && !isExpanded;
|
5193
5255
|
const noChild = !item.children.length;
|
5194
5256
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
5195
5257
|
return /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
5196
|
-
/* @__PURE__ */
|
5258
|
+
/* @__PURE__ */ jsx62(Popover6, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
5197
5259
|
const activeOption = isOpen ? "primary.50" : "white";
|
5198
5260
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
5199
5261
|
const activeParent = isActive ? backgroundColor : activeOption;
|
5200
5262
|
return /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
5201
|
-
/* @__PURE__ */
|
5263
|
+
/* @__PURE__ */ jsx62(PopoverTrigger6, { children: /* @__PURE__ */ jsx62(
|
5202
5264
|
AccordionButton2,
|
5203
5265
|
{
|
5204
5266
|
"data-test-id": `CTA_button-accordion-${item.title}`,
|
@@ -5217,7 +5279,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5217
5279
|
position: "relative",
|
5218
5280
|
...itemStyles,
|
5219
5281
|
children: [
|
5220
|
-
mappingIcon2 && /* @__PURE__ */
|
5282
|
+
mappingIcon2 && /* @__PURE__ */ jsx62(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5221
5283
|
!isCollapse && /* @__PURE__ */ jsxs26(
|
5222
5284
|
Box28,
|
5223
5285
|
{
|
@@ -5233,8 +5295,8 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5233
5295
|
animate: { opacity: 1, x: 0 },
|
5234
5296
|
exit: { opacity: 0, x: 16 },
|
5235
5297
|
children: [
|
5236
|
-
/* @__PURE__ */
|
5237
|
-
!!item.children.length && /* @__PURE__ */
|
5298
|
+
/* @__PURE__ */ jsx62(Box28, { h: "3.5", position: "relative", children: /* @__PURE__ */ jsx62(Text16, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) }),
|
5299
|
+
!!item.children.length && /* @__PURE__ */ jsx62(
|
5238
5300
|
Box28,
|
5239
5301
|
{
|
5240
5302
|
display: "flex",
|
@@ -5242,7 +5304,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5242
5304
|
as: motion3.div,
|
5243
5305
|
transitionTimingFunction: "linear",
|
5244
5306
|
animate: { transform: isExpanded ? "rotate(-180deg)" : "rotate(0)" },
|
5245
|
-
children: /* @__PURE__ */
|
5307
|
+
children: /* @__PURE__ */ jsx62(Icon8.ChevronDown, { size: 3 })
|
5246
5308
|
}
|
5247
5309
|
)
|
5248
5310
|
]
|
@@ -5255,12 +5317,12 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5255
5317
|
},
|
5256
5318
|
item.id
|
5257
5319
|
) }, item.id),
|
5258
|
-
isOpenOptions && /* @__PURE__ */
|
5259
|
-
/* @__PURE__ */
|
5320
|
+
isOpenOptions && /* @__PURE__ */ jsx62(Portal4, { children: item.children.length > 0 ? /* @__PURE__ */ jsxs26(PopoverContent6, { w: "176px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: [
|
5321
|
+
/* @__PURE__ */ jsx62(PopoverHeader2, { borderColor: "neutral.300", textStyle: "text.xs", p: "2", children: mappingIcon2 && /* @__PURE__ */ jsxs26(Box28, { display: "flex", alignItems: "center", children: [
|
5260
5322
|
mappingIcon2.get(item.icon || ""),
|
5261
|
-
/* @__PURE__ */
|
5323
|
+
/* @__PURE__ */ jsx62(Box28, { as: "span", ml: "2", children: item.title })
|
5262
5324
|
] }) }),
|
5263
|
-
!!item.children.length && /* @__PURE__ */
|
5325
|
+
!!item.children.length && /* @__PURE__ */ jsx62(PopoverBody4, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx62(
|
5264
5326
|
NavItem,
|
5265
5327
|
{
|
5266
5328
|
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
@@ -5276,7 +5338,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5276
5338
|
},
|
5277
5339
|
submenu.id
|
5278
5340
|
)) })
|
5279
|
-
] }) : isCollapse && /* @__PURE__ */
|
5341
|
+
] }) : isCollapse && /* @__PURE__ */ jsx62(PopoverContent6, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ jsx62(PopoverBody4, { py: "1", px: "0", children: /* @__PURE__ */ jsxs26(
|
5280
5342
|
NavItem,
|
5281
5343
|
{
|
5282
5344
|
"data-test-id": `CTA_Sidebar-popover-item-${item.id}`,
|
@@ -5289,22 +5351,22 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5289
5351
|
rounded: "none",
|
5290
5352
|
...itemStyles,
|
5291
5353
|
children: [
|
5292
|
-
mappingIcon2 && /* @__PURE__ */
|
5293
|
-
/* @__PURE__ */
|
5354
|
+
mappingIcon2 && /* @__PURE__ */ jsx62(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
5355
|
+
/* @__PURE__ */ jsx62(Box28, { h: "3.5", position: "relative", ml: "2", children: /* @__PURE__ */ jsx62(Text16, { textStyle: "text.xs", w: "max-content", position: "absolute", children: item.title }) })
|
5294
5356
|
]
|
5295
5357
|
},
|
5296
5358
|
item.id
|
5297
5359
|
) }) }) })
|
5298
5360
|
] });
|
5299
5361
|
} }, item.id),
|
5300
|
-
!isCollapse && /* @__PURE__ */
|
5362
|
+
!isCollapse && /* @__PURE__ */ jsx62(
|
5301
5363
|
Fade,
|
5302
5364
|
{
|
5303
5365
|
in: true,
|
5304
5366
|
transition: {
|
5305
5367
|
enter: { duration: 0.5 }
|
5306
5368
|
},
|
5307
|
-
children: /* @__PURE__ */
|
5369
|
+
children: /* @__PURE__ */ jsx62(AccordionPanel2, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx62(
|
5308
5370
|
NavItem,
|
5309
5371
|
{
|
5310
5372
|
mt: "1",
|
@@ -5336,7 +5398,7 @@ import { chakra as chakra6, Flex as Flex15, forwardRef as forwardRef11, omitThem
|
|
5336
5398
|
import { cx as cx10, dataAttr } from "@chakra-ui/shared-utils";
|
5337
5399
|
import { Check as Check2, Close as Close5 } from "@ctlyst.id/internal-icon";
|
5338
5400
|
import { useMemo as useMemo3 } from "react";
|
5339
|
-
import { jsx as
|
5401
|
+
import { jsx as jsx63, jsxs as jsxs27 } from "react/jsx-runtime";
|
5340
5402
|
var Switch = forwardRef11(function Switch2(props, ref) {
|
5341
5403
|
const styles = useMultiStyleConfig2("Switch", props);
|
5342
5404
|
const { spacing: spacing2 = "0.5rem", children, ...ownProps } = omitThemingProps2(props);
|
@@ -5388,13 +5450,13 @@ var Switch = forwardRef11(function Switch2(props, ref) {
|
|
5388
5450
|
className: cx10("chakra-switch", props.className),
|
5389
5451
|
__css: containerStyles,
|
5390
5452
|
children: [
|
5391
|
-
/* @__PURE__ */
|
5453
|
+
/* @__PURE__ */ jsx63("input", { "data-test-id": "", className: "chakra-switch__input", ...getInputProps({}, ref) }),
|
5392
5454
|
/* @__PURE__ */ jsxs27(chakra6.span, { ...getCheckboxProps(), className: "chakra-switch__track", pos: "relative", __css: trackStyles, children: [
|
5393
5455
|
/* @__PURE__ */ jsxs27(Flex15, { gap: 1, pos: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)", children: [
|
5394
|
-
/* @__PURE__ */
|
5395
|
-
/* @__PURE__ */
|
5456
|
+
/* @__PURE__ */ jsx63(Check2, { color: "white", size: getIconSize(props.size) }),
|
5457
|
+
/* @__PURE__ */ jsx63(Close5, { color: state.isDisabled ? "neutral.600" : "neutral.900", size: getIconSize(props.size) })
|
5396
5458
|
] }),
|
5397
|
-
/* @__PURE__ */
|
5459
|
+
/* @__PURE__ */ jsx63(
|
5398
5460
|
chakra6.span,
|
5399
5461
|
{
|
5400
5462
|
__css: styles.thumb,
|
@@ -5404,7 +5466,7 @@ var Switch = forwardRef11(function Switch2(props, ref) {
|
|
5404
5466
|
}
|
5405
5467
|
)
|
5406
5468
|
] }),
|
5407
|
-
children && /* @__PURE__ */
|
5469
|
+
children && /* @__PURE__ */ jsx63(
|
5408
5470
|
chakra6.span,
|
5409
5471
|
{
|
5410
5472
|
className: "chakra-switch__label",
|
@@ -5442,13 +5504,13 @@ import {
|
|
5442
5504
|
|
5443
5505
|
// src/components/tabs/components/tab.tsx
|
5444
5506
|
import { Button as Button6, Flex as Flex16, forwardRef as forwardRef12, useMultiStyleConfig as useMultiStyleConfig3, useTab } from "@chakra-ui/react";
|
5445
|
-
import { jsx as
|
5507
|
+
import { jsx as jsx64, jsxs as jsxs28 } from "react/jsx-runtime";
|
5446
5508
|
var Tab = forwardRef12((props, ref) => {
|
5447
5509
|
var _a, _b;
|
5448
5510
|
const tabProps = useTab({ ...props, ref });
|
5449
5511
|
const isSelected = !!tabProps["aria-selected"];
|
5450
5512
|
const styles = useMultiStyleConfig3("Tabs", tabProps);
|
5451
|
-
return /* @__PURE__ */
|
5513
|
+
return /* @__PURE__ */ jsx64(
|
5452
5514
|
Button6,
|
5453
5515
|
{
|
5454
5516
|
"data-test-id": props["data-test-id"],
|
@@ -5533,14 +5595,14 @@ import { marry } from "@zamiru/timescape";
|
|
5533
5595
|
import {
|
5534
5596
|
useEffect as useEffect2,
|
5535
5597
|
useLayoutEffect,
|
5536
|
-
useRef as
|
5598
|
+
useRef as useRef4,
|
5537
5599
|
useState as useState4
|
5538
5600
|
} from "react";
|
5539
5601
|
var useTimescape = (options = {}) => {
|
5540
5602
|
var _a;
|
5541
5603
|
const { date, onChangeDate, ...rest } = options;
|
5542
5604
|
const [manager] = useState4(() => new TimescapeManager(date, rest));
|
5543
|
-
const onChangeDateRef =
|
5605
|
+
const onChangeDateRef = useRef4(onChangeDate);
|
5544
5606
|
useLayoutEffect(() => {
|
5545
5607
|
onChangeDateRef.current = onChangeDate;
|
5546
5608
|
}, [onChangeDate]);
|
@@ -5604,7 +5666,7 @@ var useTimescape = (options = {}) => {
|
|
5604
5666
|
};
|
5605
5667
|
|
5606
5668
|
// src/components/time-input/components/index.tsx
|
5607
|
-
import { Fragment as Fragment10, jsx as
|
5669
|
+
import { Fragment as Fragment10, jsx as jsx65, jsxs as jsxs29 } from "react/jsx-runtime";
|
5608
5670
|
var timeDigitFormat = (number) => {
|
5609
5671
|
if (number.toString().length === 1) {
|
5610
5672
|
return `0${number}`;
|
@@ -5629,7 +5691,7 @@ var timeFromString = (timeString) => {
|
|
5629
5691
|
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5630
5692
|
};
|
5631
5693
|
var InputTimeArea = forwardRef13((props, ref) => {
|
5632
|
-
return /* @__PURE__ */
|
5694
|
+
return /* @__PURE__ */ jsx65(
|
5633
5695
|
Input3,
|
5634
5696
|
{
|
5635
5697
|
_focusWithin: {
|
@@ -5705,7 +5767,7 @@ var TimeInput2 = forwardRef13(
|
|
5705
5767
|
};
|
5706
5768
|
};
|
5707
5769
|
const { outlineColor, focusColor } = getProperties();
|
5708
|
-
return /* @__PURE__ */
|
5770
|
+
return /* @__PURE__ */ jsx65(Box29, { ...boxProps, ...rootProps, children: /* @__PURE__ */ jsx65(
|
5709
5771
|
field_default,
|
5710
5772
|
{
|
5711
5773
|
isError,
|
@@ -5714,7 +5776,7 @@ var TimeInput2 = forwardRef13(
|
|
5714
5776
|
errorMessage,
|
5715
5777
|
isDisabled,
|
5716
5778
|
isSuccess,
|
5717
|
-
children: /* @__PURE__ */
|
5779
|
+
children: /* @__PURE__ */ jsx65(
|
5718
5780
|
Box29,
|
5719
5781
|
{
|
5720
5782
|
transition: "all 0.15s",
|
@@ -5736,16 +5798,16 @@ var TimeInput2 = forwardRef13(
|
|
5736
5798
|
"data-test-id": `CT_Component_TimeInput${name ? `_${name}` : ""}`,
|
5737
5799
|
children: [
|
5738
5800
|
/* @__PURE__ */ jsxs29(Flex17, { gap: "1px", width: "100%", alignItems: "center", pl: 2, children: [
|
5739
|
-
/* @__PURE__ */
|
5740
|
-
/* @__PURE__ */
|
5741
|
-
/* @__PURE__ */
|
5801
|
+
/* @__PURE__ */ jsx65(InputTimeArea, { "data-test-id": "start-time", ...hoursProps }),
|
5802
|
+
/* @__PURE__ */ jsx65("span", { children: ":" }),
|
5803
|
+
/* @__PURE__ */ jsx65(InputTimeArea, { "data-test-id": "end-time", ...getInputProps("minutes") }),
|
5742
5804
|
seconds && /* @__PURE__ */ jsxs29(Fragment10, { children: [
|
5743
|
-
/* @__PURE__ */
|
5744
|
-
/* @__PURE__ */
|
5805
|
+
/* @__PURE__ */ jsx65("span", { children: ":" }),
|
5806
|
+
/* @__PURE__ */ jsx65(InputTimeArea, { ...getInputProps("seconds") })
|
5745
5807
|
] }),
|
5746
|
-
options.hour12 && /* @__PURE__ */
|
5808
|
+
options.hour12 && /* @__PURE__ */ jsx65(Input3, { p: 0, ...getInputProps("am/pm") })
|
5747
5809
|
] }),
|
5748
|
-
/* @__PURE__ */
|
5810
|
+
/* @__PURE__ */ jsx65(Clock, { color: "neutral.400", size: 4 }),
|
5749
5811
|
addOnRight
|
5750
5812
|
]
|
5751
5813
|
}
|
@@ -5764,9 +5826,9 @@ import { Bounce, toast } from "react-toastify";
|
|
5764
5826
|
|
5765
5827
|
// src/components/toast/components/styles.tsx
|
5766
5828
|
import { Global as Global2 } from "@emotion/react";
|
5767
|
-
import { jsx as
|
5829
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
5768
5830
|
var Styles2 = () => {
|
5769
|
-
return /* @__PURE__ */
|
5831
|
+
return /* @__PURE__ */ jsx66(
|
5770
5832
|
Global2,
|
5771
5833
|
{
|
5772
5834
|
styles: `
|
@@ -5801,10 +5863,10 @@ var Styles2 = () => {
|
|
5801
5863
|
var styles_default2 = Styles2;
|
5802
5864
|
|
5803
5865
|
// src/components/toast/components/toast.tsx
|
5804
|
-
import { Fragment as Fragment11, jsx as
|
5866
|
+
import { Fragment as Fragment11, jsx as jsx67, jsxs as jsxs30 } from "react/jsx-runtime";
|
5805
5867
|
var CustomCloseButton = (props) => {
|
5806
5868
|
const { closeToast } = props;
|
5807
|
-
return /* @__PURE__ */
|
5869
|
+
return /* @__PURE__ */ jsx67(Box30, { p: 2, mb: 1, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: () => closeToast(), children: /* @__PURE__ */ jsx67(Close6, { size: 4, color: "white" }) });
|
5808
5870
|
};
|
5809
5871
|
var DEFAULT_OPTIONS = {
|
5810
5872
|
position: "top-right",
|
@@ -5837,13 +5899,13 @@ var useToast = () => {
|
|
5837
5899
|
]);
|
5838
5900
|
const content = (icon, message, link) => {
|
5839
5901
|
return /* @__PURE__ */ jsxs30(Fragment11, { children: [
|
5840
|
-
/* @__PURE__ */
|
5902
|
+
/* @__PURE__ */ jsx67(styles_default2, {}),
|
5841
5903
|
/* @__PURE__ */ jsxs30(Flex18, { justifyContent: "space-between", alignItems: "center", gap: 4, mb: 1, flex: 1, children: [
|
5842
5904
|
/* @__PURE__ */ jsxs30(Flex18, { alignItems: "center", children: [
|
5843
|
-
icon && /* @__PURE__ */
|
5844
|
-
/* @__PURE__ */
|
5905
|
+
icon && /* @__PURE__ */ jsx67(chakra7.span, { mr: 2, w: 4, h: 4, children: renderIcon(icon, "default") }),
|
5906
|
+
/* @__PURE__ */ jsx67(chakra7.span, { noOfLines: 2, children: message })
|
5845
5907
|
] }),
|
5846
|
-
link && /* @__PURE__ */
|
5908
|
+
link && /* @__PURE__ */ jsx67(
|
5847
5909
|
Link6,
|
5848
5910
|
{
|
5849
5911
|
as: link.as,
|
@@ -6025,7 +6087,7 @@ var defaultOnHandleRejections = (fileRejection, config2, handleRejection) => {
|
|
6025
6087
|
};
|
6026
6088
|
|
6027
6089
|
// src/components/uploader/components/uploader.tsx
|
6028
|
-
import { Fragment as Fragment12, jsx as
|
6090
|
+
import { Fragment as Fragment12, jsx as jsx68, jsxs as jsxs31 } from "react/jsx-runtime";
|
6029
6091
|
var Uploader = ({
|
6030
6092
|
onHandleUploadFile,
|
6031
6093
|
onHandleRejections,
|
@@ -6158,20 +6220,20 @@ var Uploader = ({
|
|
6158
6220
|
});
|
6159
6221
|
const renderHelperText = () => {
|
6160
6222
|
if (Array.isArray(helperText)) {
|
6161
|
-
return /* @__PURE__ */
|
6223
|
+
return /* @__PURE__ */ jsx68(
|
6162
6224
|
UnorderedList2,
|
6163
6225
|
{
|
6164
6226
|
pl: 2,
|
6165
6227
|
fontSize: 12,
|
6166
6228
|
color: "black.medium",
|
6167
6229
|
"data-test-id": "CT_component_base-image-uploader_helperText",
|
6168
|
-
children: helperText.map((text2) => /* @__PURE__ */
|
6230
|
+
children: helperText.map((text2) => /* @__PURE__ */ jsx68(ListItem2, { children: text2 }, text2))
|
6169
6231
|
}
|
6170
6232
|
);
|
6171
6233
|
}
|
6172
6234
|
return helperText;
|
6173
6235
|
};
|
6174
|
-
const renderErrorText = (text2) => /* @__PURE__ */
|
6236
|
+
const renderErrorText = (text2) => /* @__PURE__ */ jsx68(Box31, { mb: 2, children: /* @__PURE__ */ jsx68(Text18, { textStyle: "text.xs", color: "danger.500", children: text2 }) });
|
6175
6237
|
const handleRemove = (e) => {
|
6176
6238
|
e.stopPropagation();
|
6177
6239
|
setFilePreview(void 0);
|
@@ -6205,8 +6267,8 @@ var Uploader = ({
|
|
6205
6267
|
return /* @__PURE__ */ jsxs31(FormControl4, { isRequired, children: [
|
6206
6268
|
label && typeof label === "string" ? (
|
6207
6269
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
6208
|
-
/* @__PURE__ */ jsxs31(FormLabel3, { requiredIndicator: /* @__PURE__ */
|
6209
|
-
isRequired && /* @__PURE__ */
|
6270
|
+
/* @__PURE__ */ jsxs31(FormLabel3, { requiredIndicator: /* @__PURE__ */ jsx68(Fragment12, {}), fontSize: "text.sm", children: [
|
6271
|
+
isRequired && /* @__PURE__ */ jsx68(RequiredIndicator2, { mr: 1, ml: 0 }),
|
6210
6272
|
label
|
6211
6273
|
] })
|
6212
6274
|
) : label,
|
@@ -6228,7 +6290,7 @@ var Uploader = ({
|
|
6228
6290
|
...props,
|
6229
6291
|
...getRootProps(),
|
6230
6292
|
children: [
|
6231
|
-
filePreview && isShowCloseButton && /* @__PURE__ */
|
6293
|
+
filePreview && isShowCloseButton && /* @__PURE__ */ jsx68(Box31, { position: "absolute", top: 1, right: 1, children: /* @__PURE__ */ jsx68(
|
6232
6294
|
Button7,
|
6233
6295
|
{
|
6234
6296
|
"data-test-id": `CT_component_base-image-uploader_remove-image${testId ? `_${testId}` : ""}`,
|
@@ -6243,17 +6305,17 @@ var Uploader = ({
|
|
6243
6305
|
border: "none",
|
6244
6306
|
zIndex: 1,
|
6245
6307
|
onClick: handleRemove,
|
6246
|
-
children: /* @__PURE__ */
|
6308
|
+
children: /* @__PURE__ */ jsx68(X, { size: 3, color: "white" })
|
6247
6309
|
}
|
6248
6310
|
) }),
|
6249
|
-
filePreview && /* @__PURE__ */
|
6311
|
+
filePreview && /* @__PURE__ */ jsx68(Box31, { w: "full", children: /* @__PURE__ */ jsx68(
|
6250
6312
|
Flex19,
|
6251
6313
|
{
|
6252
6314
|
position: "relative",
|
6253
6315
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6254
6316
|
justify: "center",
|
6255
6317
|
align: "center",
|
6256
|
-
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */
|
6318
|
+
children: filePreview.includes("blob") && acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ jsx68(
|
6257
6319
|
ChakraImage,
|
6258
6320
|
{
|
6259
6321
|
h: size2 === "lg" ? "120" : "100",
|
@@ -6261,13 +6323,13 @@ var Uploader = ({
|
|
6261
6323
|
alt: "uploader-preview",
|
6262
6324
|
objectFit: "contain"
|
6263
6325
|
}
|
6264
|
-
) : /* @__PURE__ */
|
6326
|
+
) : /* @__PURE__ */ jsx68(Text18, { noOfLines: 3, mx: 2, textAlign: "center", children: filePreview })
|
6265
6327
|
}
|
6266
6328
|
) }),
|
6267
|
-
!filePreview && /* @__PURE__ */
|
6268
|
-
size2 === "sm" && /* @__PURE__ */
|
6329
|
+
!filePreview && /* @__PURE__ */ jsx68(Fragment12, { children: isDragActive ? /* @__PURE__ */ jsx68(Text18, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ jsxs31(Flex19, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6330
|
+
size2 === "sm" && /* @__PURE__ */ jsx68(Plus, { size: 6, color }),
|
6269
6331
|
/* @__PURE__ */ jsxs31(Box31, { children: [
|
6270
|
-
!filePreview && /* @__PURE__ */
|
6332
|
+
!filePreview && /* @__PURE__ */ jsx68(
|
6271
6333
|
Heading2,
|
6272
6334
|
{
|
6273
6335
|
fontWeight: "400",
|
@@ -6277,20 +6339,20 @@ var Uploader = ({
|
|
6277
6339
|
children: uploadFileText && size2 === "lg" ? uploadFileText : "Upload"
|
6278
6340
|
}
|
6279
6341
|
),
|
6280
|
-
size2 === "lg" && /* @__PURE__ */
|
6342
|
+
size2 === "lg" && /* @__PURE__ */ jsx68(Text18, { fontSize: 12, children: filePreview ? dragReplaceText != null ? dragReplaceText : messages.dragReplace : dragInActiveText != null ? dragInActiveText : messages.dragInActive })
|
6281
6343
|
] })
|
6282
6344
|
] }) })
|
6283
6345
|
]
|
6284
6346
|
}
|
6285
6347
|
),
|
6286
|
-
/* @__PURE__ */
|
6348
|
+
/* @__PURE__ */ jsx68(
|
6287
6349
|
"input",
|
6288
6350
|
{
|
6289
6351
|
...getInputProps(),
|
6290
6352
|
"data-test-id": `CT_component_base-image-uploader_change-img${testId ? `_${testId}` : ""}`
|
6291
6353
|
}
|
6292
6354
|
),
|
6293
|
-
filePreview && !isSmall && /* @__PURE__ */
|
6355
|
+
filePreview && !isSmall && /* @__PURE__ */ jsx68(Flex19, { align: "center", justify: "center", my: 2, children: isShowReupload && /* @__PURE__ */ jsx68(
|
6294
6356
|
Button7,
|
6295
6357
|
{
|
6296
6358
|
"data-test-id": `CT_component_base-image-uploader_change-img-btn${testId ? `_${testId}` : ""}`,
|
@@ -8031,9 +8093,9 @@ import { useMemo as useMemo5 } from "react";
|
|
8031
8093
|
|
8032
8094
|
// src/provider/components/provider.tsx
|
8033
8095
|
import axios from "axios";
|
8034
|
-
import { createContext as createContext2, useContext, useEffect as useEffect5, useMemo as useMemo4, useRef as
|
8096
|
+
import { createContext as createContext2, useContext, useEffect as useEffect5, useMemo as useMemo4, useRef as useRef5 } from "react";
|
8035
8097
|
import { ToastContainer as ToastContainer2 } from "react-toastify";
|
8036
|
-
import { jsx as
|
8098
|
+
import { jsx as jsx69, jsxs as jsxs32 } from "react/jsx-runtime";
|
8037
8099
|
var ProviderContext = createContext2({
|
8038
8100
|
instance: void 0
|
8039
8101
|
});
|
@@ -8042,7 +8104,7 @@ var useInternalUI = () => {
|
|
8042
8104
|
return { instance };
|
8043
8105
|
};
|
8044
8106
|
var Provider = ({ children, config: config2, requestInterceptors, responseInterceptors }) => {
|
8045
|
-
const instanceRef =
|
8107
|
+
const instanceRef = useRef5(axios.create(config2));
|
8046
8108
|
useEffect5(() => {
|
8047
8109
|
requestInterceptors == null ? void 0 : requestInterceptors.forEach((interceptor) => {
|
8048
8110
|
instanceRef.current.interceptors.request.use(interceptor);
|
@@ -8053,7 +8115,7 @@ var Provider = ({ children, config: config2, requestInterceptors, responseInterc
|
|
8053
8115
|
}, [requestInterceptors, responseInterceptors]);
|
8054
8116
|
const provider = useMemo4(() => ({ instance: instanceRef.current }), []);
|
8055
8117
|
return /* @__PURE__ */ jsxs32(ProviderContext.Provider, { value: provider, children: [
|
8056
|
-
/* @__PURE__ */
|
8118
|
+
/* @__PURE__ */ jsx69(ToastContainer2, {}),
|
8057
8119
|
children
|
8058
8120
|
] });
|
8059
8121
|
};
|