@connectif/ui-components 5.2.2 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/components/input/categorized-picker/CategorizedPicker.d.ts +14 -0
- package/dist/components/input/categorized-picker/CategorizedPickerCategoryPanel.d.ts +12 -0
- package/dist/components/input/categorized-picker/CategorizedPickerEmptyCategoryPanel.d.ts +7 -0
- package/dist/components/input/categorized-picker/CategorizedPickerGroupItem.d.ts +14 -0
- package/dist/components/input/categorized-picker/CategorizedPickerItem.d.ts +12 -0
- package/dist/components/input/categorized-picker/CategorizedPickerOptionItem.d.ts +14 -0
- package/dist/components/input/categorized-picker/CategorizedPickerSubcategoryItem.d.ts +11 -0
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/scrollable/Carousel.d.ts +2 -1
- package/dist/index.js +944 -602
- package/dist/models/CategorizedPicker.d.ts +35 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/components/input/CategorizedPicker.d.ts +0 -21
package/dist/index.js
CHANGED
|
@@ -97,7 +97,7 @@ var require_react_is_development = __commonJS({
|
|
|
97
97
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
98
98
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
99
99
|
var ForwardRef2 = REACT_FORWARD_REF_TYPE;
|
|
100
|
-
var
|
|
100
|
+
var Fragment43 = REACT_FRAGMENT_TYPE;
|
|
101
101
|
var Lazy = REACT_LAZY_TYPE;
|
|
102
102
|
var Memo2 = REACT_MEMO_TYPE;
|
|
103
103
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -156,7 +156,7 @@ var require_react_is_development = __commonJS({
|
|
|
156
156
|
exports.ContextProvider = ContextProvider;
|
|
157
157
|
exports.Element = Element2;
|
|
158
158
|
exports.ForwardRef = ForwardRef2;
|
|
159
|
-
exports.Fragment =
|
|
159
|
+
exports.Fragment = Fragment43;
|
|
160
160
|
exports.Lazy = Lazy;
|
|
161
161
|
exports.Memo = Memo2;
|
|
162
162
|
exports.Portal = Portal;
|
|
@@ -12107,6 +12107,7 @@ var EnhancedCard = React32.forwardRef(
|
|
|
12107
12107
|
const isCenterColumnAlone = !leftIconId && !rightIconId;
|
|
12108
12108
|
const cardStyle = {
|
|
12109
12109
|
...getCardStyles(size),
|
|
12110
|
+
...borderless && { border: "none" },
|
|
12110
12111
|
...disableHover ? {} : hoverCardStyle,
|
|
12111
12112
|
cursor: cursor2,
|
|
12112
12113
|
...selected && {
|
|
@@ -21236,7 +21237,9 @@ import InputBase from "@mui/material/InputBase";
|
|
|
21236
21237
|
import { FixedSizeList as FixedSizeList2 } from "react-window";
|
|
21237
21238
|
import AutoSizer4 from "react-virtualized-auto-sizer";
|
|
21238
21239
|
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
21239
|
-
var BootstrapInput = styled7(InputBase
|
|
21240
|
+
var BootstrapInput = styled7(InputBase, {
|
|
21241
|
+
shouldForwardProp: (prop) => prop !== "notched"
|
|
21242
|
+
})(() => ({
|
|
21240
21243
|
boxShadow: shadows[0],
|
|
21241
21244
|
borderRadius: "16px",
|
|
21242
21245
|
borderWidth: "1px",
|
|
@@ -22008,11 +22011,358 @@ var UploadClickableArea = ({
|
|
|
22008
22011
|
);
|
|
22009
22012
|
var UploadClickableArea_default = UploadClickableArea;
|
|
22010
22013
|
|
|
22011
|
-
// src/components/input/CategorizedPicker.tsx
|
|
22012
|
-
import
|
|
22013
|
-
import { Grid as Grid3, Popover as Popover2, Select as Select3, Stack as
|
|
22014
|
-
|
|
22015
|
-
|
|
22014
|
+
// src/components/input/categorized-picker/CategorizedPicker.tsx
|
|
22015
|
+
import React66 from "react";
|
|
22016
|
+
import { Grid as Grid3, Popover as Popover2, Select as Select3, Stack as Stack11 } from "@mui/material";
|
|
22017
|
+
|
|
22018
|
+
// src/components/input/categorized-picker/CategorizedPickerOptionItem.tsx
|
|
22019
|
+
import * as React64 from "react";
|
|
22020
|
+
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
22021
|
+
var CategorizedPickerOptionItem = function CategorizedPickerOptionItem2({
|
|
22022
|
+
option,
|
|
22023
|
+
selectedId,
|
|
22024
|
+
dataTestId,
|
|
22025
|
+
index,
|
|
22026
|
+
searchText = "",
|
|
22027
|
+
onSelect,
|
|
22028
|
+
onScrollToItem
|
|
22029
|
+
}) {
|
|
22030
|
+
const itemRef = React64.useRef(null);
|
|
22031
|
+
React64.useEffect(() => {
|
|
22032
|
+
if (selectedId === option.id && itemRef.current) {
|
|
22033
|
+
onScrollToItem(itemRef.current);
|
|
22034
|
+
}
|
|
22035
|
+
}, [onScrollToItem, option.id, selectedId]);
|
|
22036
|
+
return /* @__PURE__ */ jsx120(
|
|
22037
|
+
ListItemButton_default,
|
|
22038
|
+
{
|
|
22039
|
+
ref: itemRef,
|
|
22040
|
+
selected: selectedId === option.id,
|
|
22041
|
+
onClick: () => {
|
|
22042
|
+
const { categorizedPickerItemType, ...rest } = option;
|
|
22043
|
+
onSelect(rest);
|
|
22044
|
+
},
|
|
22045
|
+
buttonDataTestId: dataTestId ? dataTestId + "-option-" + index : void 0,
|
|
22046
|
+
children: /* @__PURE__ */ jsx120(
|
|
22047
|
+
TextEllipsis_default,
|
|
22048
|
+
{
|
|
22049
|
+
text: /* @__PURE__ */ jsx120(
|
|
22050
|
+
TextMarker_default,
|
|
22051
|
+
{
|
|
22052
|
+
searchText,
|
|
22053
|
+
backgroundColor: primary200,
|
|
22054
|
+
multiSearchCharSeparator: ",",
|
|
22055
|
+
children: option.name
|
|
22056
|
+
}
|
|
22057
|
+
),
|
|
22058
|
+
typographyVariant: "body2"
|
|
22059
|
+
}
|
|
22060
|
+
)
|
|
22061
|
+
},
|
|
22062
|
+
option.id
|
|
22063
|
+
);
|
|
22064
|
+
};
|
|
22065
|
+
var CategorizedPickerOptionItem_default = CategorizedPickerOptionItem;
|
|
22066
|
+
|
|
22067
|
+
// src/components/input/categorized-picker/CategorizedPickerSubcategoryItem.tsx
|
|
22068
|
+
import { jsx as jsx121 } from "react/jsx-runtime";
|
|
22069
|
+
var CategorizedPickerSubcategoryItem = function CategorizedPickerSubcategoryItem2({
|
|
22070
|
+
option,
|
|
22071
|
+
dataTestId,
|
|
22072
|
+
index,
|
|
22073
|
+
searchText = ""
|
|
22074
|
+
}) {
|
|
22075
|
+
return /* @__PURE__ */ jsx121(
|
|
22076
|
+
ListItemButton_default,
|
|
22077
|
+
{
|
|
22078
|
+
baseSx: { height: "16px", marginTop: "12px" },
|
|
22079
|
+
selected: false,
|
|
22080
|
+
buttonDataTestId: dataTestId ? dataTestId + "-option-" + index : void 0,
|
|
22081
|
+
disabled: true,
|
|
22082
|
+
children: /* @__PURE__ */ jsx121(
|
|
22083
|
+
TextEllipsis_default,
|
|
22084
|
+
{
|
|
22085
|
+
text: /* @__PURE__ */ jsx121(
|
|
22086
|
+
TextMarker_default,
|
|
22087
|
+
{
|
|
22088
|
+
searchText,
|
|
22089
|
+
backgroundColor: primary200,
|
|
22090
|
+
multiSearchCharSeparator: ",",
|
|
22091
|
+
children: option.name
|
|
22092
|
+
}
|
|
22093
|
+
),
|
|
22094
|
+
typographyVariant: "caption"
|
|
22095
|
+
}
|
|
22096
|
+
)
|
|
22097
|
+
},
|
|
22098
|
+
option.name
|
|
22099
|
+
);
|
|
22100
|
+
};
|
|
22101
|
+
var CategorizedPickerSubcategoryItem_default = CategorizedPickerSubcategoryItem;
|
|
22102
|
+
|
|
22103
|
+
// src/components/input/categorized-picker/CategorizedPickerGroupItem.tsx
|
|
22104
|
+
import * as React65 from "react";
|
|
22105
|
+
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
22106
|
+
var CategorizedPickerGroupItem = function CategorizedPickerGroupItem2({
|
|
22107
|
+
option,
|
|
22108
|
+
selectedId,
|
|
22109
|
+
dataTestId,
|
|
22110
|
+
index,
|
|
22111
|
+
searchText = "",
|
|
22112
|
+
onSelect,
|
|
22113
|
+
onScrollToItem
|
|
22114
|
+
}) {
|
|
22115
|
+
const [isCollapsed, setCollapsed] = React65.useState(
|
|
22116
|
+
!searchText && !option.options.some(
|
|
22117
|
+
(opt) => opt.categorizedPickerItemType === "option" && opt.id === selectedId
|
|
22118
|
+
)
|
|
22119
|
+
);
|
|
22120
|
+
return /* @__PURE__ */ jsx122(
|
|
22121
|
+
CollapsiblePanel_default,
|
|
22122
|
+
{
|
|
22123
|
+
header: /* @__PURE__ */ jsx122(
|
|
22124
|
+
ListItemButton_default,
|
|
22125
|
+
{
|
|
22126
|
+
selected: selectedId === option.id,
|
|
22127
|
+
onClick: () => {
|
|
22128
|
+
setCollapsed(!isCollapsed);
|
|
22129
|
+
},
|
|
22130
|
+
baseSx: {
|
|
22131
|
+
height: "auto",
|
|
22132
|
+
minHeight: "44px",
|
|
22133
|
+
"& > svg": { color: grey500 }
|
|
22134
|
+
},
|
|
22135
|
+
buttonDataTestId: dataTestId ? dataTestId + "group-option-" + index : void 0,
|
|
22136
|
+
endIconId: isCollapsed ? `chevron-down` : `chevron-up`,
|
|
22137
|
+
children: /* @__PURE__ */ jsx122(
|
|
22138
|
+
TextEllipsis_default,
|
|
22139
|
+
{
|
|
22140
|
+
text: /* @__PURE__ */ jsx122(
|
|
22141
|
+
TextMarker_default,
|
|
22142
|
+
{
|
|
22143
|
+
searchText,
|
|
22144
|
+
backgroundColor: primary200,
|
|
22145
|
+
multiSearchCharSeparator: ",",
|
|
22146
|
+
children: option.name
|
|
22147
|
+
}
|
|
22148
|
+
),
|
|
22149
|
+
typographyVariant: "body2-semibold"
|
|
22150
|
+
}
|
|
22151
|
+
)
|
|
22152
|
+
},
|
|
22153
|
+
option.id
|
|
22154
|
+
),
|
|
22155
|
+
isCollapsed,
|
|
22156
|
+
onToggle: () => setCollapsed(!isCollapsed),
|
|
22157
|
+
children: /* @__PURE__ */ jsx122(List_default, { disablePadding: true, children: option.options.map((opt, idx) => /* @__PURE__ */ jsx122(
|
|
22158
|
+
CategorizedPickerItem_default,
|
|
22159
|
+
{
|
|
22160
|
+
onScrollToItem,
|
|
22161
|
+
option: opt,
|
|
22162
|
+
index: idx,
|
|
22163
|
+
selectedId,
|
|
22164
|
+
onSelect,
|
|
22165
|
+
dataTestId: dataTestId ? `${dataTestId}-group-${index}` : void 0,
|
|
22166
|
+
searchText
|
|
22167
|
+
},
|
|
22168
|
+
`categorized-group-${idx}`
|
|
22169
|
+
)) })
|
|
22170
|
+
}
|
|
22171
|
+
);
|
|
22172
|
+
};
|
|
22173
|
+
var CategorizedPickerGroupItem_default = CategorizedPickerGroupItem;
|
|
22174
|
+
|
|
22175
|
+
// src/components/input/categorized-picker/CategorizedPickerItem.tsx
|
|
22176
|
+
import { Fragment as Fragment25, jsx as jsx123, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
22177
|
+
var CategorizedPickerItem = function CategorizedPickerItem2({
|
|
22178
|
+
option,
|
|
22179
|
+
selectedId,
|
|
22180
|
+
dataTestId,
|
|
22181
|
+
index,
|
|
22182
|
+
searchText = "",
|
|
22183
|
+
onSelect,
|
|
22184
|
+
onScrollToItem
|
|
22185
|
+
}) {
|
|
22186
|
+
const onScrollSelectedItem = (item) => {
|
|
22187
|
+
if (onScrollToItem) {
|
|
22188
|
+
return onScrollToItem(item);
|
|
22189
|
+
}
|
|
22190
|
+
item.scrollIntoView({
|
|
22191
|
+
behavior: "smooth"
|
|
22192
|
+
});
|
|
22193
|
+
};
|
|
22194
|
+
return /* @__PURE__ */ jsxs56(Fragment25, { children: [
|
|
22195
|
+
option.categorizedPickerItemType === "option" && /* @__PURE__ */ jsx123(
|
|
22196
|
+
CategorizedPickerOptionItem_default,
|
|
22197
|
+
{
|
|
22198
|
+
option,
|
|
22199
|
+
index,
|
|
22200
|
+
selectedId,
|
|
22201
|
+
onSelect,
|
|
22202
|
+
onScrollToItem: onScrollSelectedItem,
|
|
22203
|
+
dataTestId,
|
|
22204
|
+
searchText
|
|
22205
|
+
}
|
|
22206
|
+
),
|
|
22207
|
+
option.categorizedPickerItemType === "subcategory" && /* @__PURE__ */ jsx123(
|
|
22208
|
+
CategorizedPickerSubcategoryItem_default,
|
|
22209
|
+
{
|
|
22210
|
+
option,
|
|
22211
|
+
index,
|
|
22212
|
+
dataTestId,
|
|
22213
|
+
searchText
|
|
22214
|
+
}
|
|
22215
|
+
),
|
|
22216
|
+
option.categorizedPickerItemType === "group" && /* @__PURE__ */ jsx123(
|
|
22217
|
+
CategorizedPickerGroupItem_default,
|
|
22218
|
+
{
|
|
22219
|
+
option,
|
|
22220
|
+
index,
|
|
22221
|
+
onSelect,
|
|
22222
|
+
onScrollToItem: onScrollSelectedItem,
|
|
22223
|
+
selectedId,
|
|
22224
|
+
dataTestId,
|
|
22225
|
+
searchText
|
|
22226
|
+
}
|
|
22227
|
+
)
|
|
22228
|
+
] });
|
|
22229
|
+
};
|
|
22230
|
+
var CategorizedPickerItem_default = CategorizedPickerItem;
|
|
22231
|
+
|
|
22232
|
+
// src/components/input/categorized-picker/CategorizedPickerEmptyCategoryPanel.tsx
|
|
22233
|
+
import { Stack as Stack10 } from "@mui/material";
|
|
22234
|
+
import { Fragment as Fragment26, jsx as jsx124 } from "react/jsx-runtime";
|
|
22235
|
+
var CategorizedPickerEmptyCategoryPanel = function CategorizedPickerEmptyCategoryPanel2({
|
|
22236
|
+
selectedCategory,
|
|
22237
|
+
isEmptyCategories
|
|
22238
|
+
}) {
|
|
22239
|
+
const { t } = useTranslation();
|
|
22240
|
+
return /* @__PURE__ */ jsx124(Fragment26, { children: !selectedCategory?.emptyData ? /* @__PURE__ */ jsx124(Stack10, { padding: "12px", alignItems: "center", children: /* @__PURE__ */ jsx124(Typography_default, { variant: "body2", color: grey600, children: isEmptyCategories ? t("CATEGORIZED_PICKER.NO_RESULTS") : t("CATEGORIZED_PICKER.NO_OPTIONS") }) }) : selectedCategory.emptyData });
|
|
22241
|
+
};
|
|
22242
|
+
var CategorizedPickerEmptyCategoryPanel_default = CategorizedPickerEmptyCategoryPanel;
|
|
22243
|
+
|
|
22244
|
+
// src/components/input/categorized-picker/CategorizedPickerCategoryPanel.tsx
|
|
22245
|
+
import { Fragment as Fragment27, jsx as jsx125 } from "react/jsx-runtime";
|
|
22246
|
+
var CategorizedPickerCategoryPanel = function CategorizedPickerCategoryPanel2({
|
|
22247
|
+
value,
|
|
22248
|
+
selectedCategory,
|
|
22249
|
+
searchText,
|
|
22250
|
+
isEmptyCategories,
|
|
22251
|
+
categoryOptions,
|
|
22252
|
+
dataTestId,
|
|
22253
|
+
onSelect
|
|
22254
|
+
}) {
|
|
22255
|
+
const getSubcategoryGroup = (options) => {
|
|
22256
|
+
const result = [];
|
|
22257
|
+
const subcategoryGroup = options.reduce((acc, option) => {
|
|
22258
|
+
const key = option.group.name;
|
|
22259
|
+
if (!acc[key]) {
|
|
22260
|
+
acc[key] = [];
|
|
22261
|
+
}
|
|
22262
|
+
acc[key].push(option);
|
|
22263
|
+
return acc;
|
|
22264
|
+
}, {});
|
|
22265
|
+
Object.keys(subcategoryGroup).forEach((key) => {
|
|
22266
|
+
result.push({
|
|
22267
|
+
name: key,
|
|
22268
|
+
categorizedPickerItemType: "subcategory"
|
|
22269
|
+
});
|
|
22270
|
+
subcategoryGroup[key].sort(orderOptions).forEach((option) => {
|
|
22271
|
+
result.push({
|
|
22272
|
+
...option,
|
|
22273
|
+
categorizedPickerItemType: "option"
|
|
22274
|
+
});
|
|
22275
|
+
});
|
|
22276
|
+
});
|
|
22277
|
+
return result;
|
|
22278
|
+
};
|
|
22279
|
+
const getGroups = (options) => {
|
|
22280
|
+
const result = [];
|
|
22281
|
+
const grouped = options.reduce((acc, option) => {
|
|
22282
|
+
const key = option.group.id;
|
|
22283
|
+
if (!acc[key]) {
|
|
22284
|
+
acc[key] = [];
|
|
22285
|
+
}
|
|
22286
|
+
acc[key].push(option);
|
|
22287
|
+
return acc;
|
|
22288
|
+
}, {});
|
|
22289
|
+
Object.keys(grouped).forEach((key) => {
|
|
22290
|
+
const groupOption = options.find((o) => o.group.id === key);
|
|
22291
|
+
const subcategoryGroup = grouped[key].reduce((acc, option) => {
|
|
22292
|
+
const key2 = option.group.subcategory ?? "";
|
|
22293
|
+
if (!acc[key2]) {
|
|
22294
|
+
acc[key2] = [];
|
|
22295
|
+
}
|
|
22296
|
+
acc[key2].push(option);
|
|
22297
|
+
return acc;
|
|
22298
|
+
}, {});
|
|
22299
|
+
const categoryResults = [];
|
|
22300
|
+
Object.keys(subcategoryGroup).forEach((key2) => {
|
|
22301
|
+
if (key2 !== "") {
|
|
22302
|
+
categoryResults.push({
|
|
22303
|
+
name: key2,
|
|
22304
|
+
categorizedPickerItemType: "subcategory"
|
|
22305
|
+
});
|
|
22306
|
+
}
|
|
22307
|
+
const optionsWithoutCategories = subcategoryGroup[key2].sort(orderOptions).map(
|
|
22308
|
+
(o) => ({
|
|
22309
|
+
...o,
|
|
22310
|
+
categorizedPickerItemType: "option"
|
|
22311
|
+
})
|
|
22312
|
+
);
|
|
22313
|
+
categoryResults.push(...optionsWithoutCategories);
|
|
22314
|
+
});
|
|
22315
|
+
result.push({
|
|
22316
|
+
id: key,
|
|
22317
|
+
name: groupOption.group.name,
|
|
22318
|
+
categorizedPickerItemType: "group",
|
|
22319
|
+
options: categoryResults
|
|
22320
|
+
});
|
|
22321
|
+
});
|
|
22322
|
+
return result;
|
|
22323
|
+
};
|
|
22324
|
+
const groupCategoryOptions = (options) => {
|
|
22325
|
+
const result = options.filter((o) => !o.group).sort(orderOptions).map((o) => ({ ...o, categorizedPickerItemType: "option" }));
|
|
22326
|
+
const subcategoryOnly = options.filter((o) => o.group?.type === "subcategory");
|
|
22327
|
+
result.push(...getSubcategoryGroup(subcategoryOnly));
|
|
22328
|
+
const withGroup = options.filter((o) => o.group?.type === "group");
|
|
22329
|
+
result.push(...getGroups(withGroup));
|
|
22330
|
+
return result;
|
|
22331
|
+
};
|
|
22332
|
+
return /* @__PURE__ */ jsx125(Fragment27, { children: !selectedCategory || !categoryOptions?.length ? /* @__PURE__ */ jsx125(
|
|
22333
|
+
CategorizedPickerEmptyCategoryPanel_default,
|
|
22334
|
+
{
|
|
22335
|
+
selectedCategory,
|
|
22336
|
+
isEmptyCategories
|
|
22337
|
+
}
|
|
22338
|
+
) : groupCategoryOptions(categoryOptions).map((option, idx) => /* @__PURE__ */ jsx125(
|
|
22339
|
+
CategorizedPickerItem_default,
|
|
22340
|
+
{
|
|
22341
|
+
option,
|
|
22342
|
+
index: idx,
|
|
22343
|
+
selectedId: value?.id ?? "",
|
|
22344
|
+
onSelect,
|
|
22345
|
+
dataTestId,
|
|
22346
|
+
searchText
|
|
22347
|
+
},
|
|
22348
|
+
`categorized-Picker-item-${idx}`
|
|
22349
|
+
)) });
|
|
22350
|
+
};
|
|
22351
|
+
function orderOptions(a, b) {
|
|
22352
|
+
const orderA = a.order ?? Infinity;
|
|
22353
|
+
const orderB = b.order ?? Infinity;
|
|
22354
|
+
if (orderA !== orderB) {
|
|
22355
|
+
return orderA - orderB;
|
|
22356
|
+
}
|
|
22357
|
+
return a.name.localeCompare(b.name, void 0, {
|
|
22358
|
+
sensitivity: "base"
|
|
22359
|
+
});
|
|
22360
|
+
}
|
|
22361
|
+
var CategorizedPickerCategoryPanel_default = CategorizedPickerCategoryPanel;
|
|
22362
|
+
|
|
22363
|
+
// src/components/input/categorized-picker/CategorizedPicker.tsx
|
|
22364
|
+
import { Fragment as Fragment28, jsx as jsx126, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
22365
|
+
var ChevronIcon2 = ({ disabled }) => /* @__PURE__ */ jsx126(
|
|
22016
22366
|
Icon_default,
|
|
22017
22367
|
{
|
|
22018
22368
|
id: "chevron-down",
|
|
@@ -22034,38 +22384,41 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22034
22384
|
onChange
|
|
22035
22385
|
}) {
|
|
22036
22386
|
const { t } = useTranslation();
|
|
22037
|
-
const anchorRef =
|
|
22038
|
-
const [open, setOpen] =
|
|
22039
|
-
const [search, setSearch] =
|
|
22040
|
-
const
|
|
22041
|
-
categories.map((category) => ({
|
|
22387
|
+
const anchorRef = React66.useRef(null);
|
|
22388
|
+
const [open, setOpen] = React66.useState(false);
|
|
22389
|
+
const [search, setSearch] = React66.useState("");
|
|
22390
|
+
const unfilteredCategories = React66.useMemo(
|
|
22391
|
+
() => categories.map((category) => ({
|
|
22042
22392
|
...category,
|
|
22043
22393
|
categoryOptions: options.filter(category.filter)
|
|
22044
|
-
})).filter(
|
|
22394
|
+
})).filter(
|
|
22395
|
+
(category) => category.categoryOptions.length > 0 || !!category.emptyData
|
|
22396
|
+
),
|
|
22397
|
+
[categories, options]
|
|
22045
22398
|
);
|
|
22046
|
-
const [filteredCategories, setFilteredCategories] =
|
|
22047
|
-
const getDefaultSelectedCategory =
|
|
22399
|
+
const [filteredCategories, setFilteredCategories] = React66.useState(unfilteredCategories);
|
|
22400
|
+
const getDefaultSelectedCategory = React66.useCallback(
|
|
22048
22401
|
() => filteredCategories.find(
|
|
22049
22402
|
(category) => category.categoryOptions.some((option) => option.id === value?.id)
|
|
22050
22403
|
),
|
|
22051
|
-
[filteredCategories, value
|
|
22404
|
+
[filteredCategories, value]
|
|
22052
22405
|
);
|
|
22053
|
-
const [selectedCategory, setSelectedCategory] =
|
|
22054
|
-
const onTypeSearch =
|
|
22406
|
+
const [selectedCategory, setSelectedCategory] = React66.useState(getDefaultSelectedCategory());
|
|
22407
|
+
const onTypeSearch = React66.useCallback(
|
|
22055
22408
|
(event) => {
|
|
22056
22409
|
setSearch(event.target.value);
|
|
22057
22410
|
},
|
|
22058
22411
|
[]
|
|
22059
22412
|
);
|
|
22060
|
-
const openPopover =
|
|
22413
|
+
const openPopover = React66.useCallback(() => {
|
|
22061
22414
|
setOpen(true);
|
|
22062
22415
|
setSearch("");
|
|
22063
22416
|
setSelectedCategory(getDefaultSelectedCategory());
|
|
22064
22417
|
}, [getDefaultSelectedCategory]);
|
|
22065
|
-
const closePopover =
|
|
22418
|
+
const closePopover = React66.useCallback(() => {
|
|
22066
22419
|
setOpen(false);
|
|
22067
22420
|
}, []);
|
|
22068
|
-
|
|
22421
|
+
React66.useEffect(() => {
|
|
22069
22422
|
const tokens = search.split(",").map((s) => s.trim()).filter((s) => !!s);
|
|
22070
22423
|
if (tokens.length === 0) {
|
|
22071
22424
|
setFilteredCategories(unfilteredCategories);
|
|
@@ -22095,7 +22448,7 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22095
22448
|
}).filter((category) => !!category);
|
|
22096
22449
|
setFilteredCategories(nextCategories);
|
|
22097
22450
|
}, [categories, options, search, unfilteredCategories]);
|
|
22098
|
-
|
|
22451
|
+
React66.useEffect(() => {
|
|
22099
22452
|
const filteredSelectedCategory = selectedCategory && filteredCategories.find(
|
|
22100
22453
|
(category) => category.name === selectedCategory.name
|
|
22101
22454
|
);
|
|
@@ -22107,8 +22460,8 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22107
22460
|
setSelectedCategory(filteredSelectedCategory);
|
|
22108
22461
|
}
|
|
22109
22462
|
}, [filteredCategories, selectedCategory]);
|
|
22110
|
-
return /* @__PURE__ */
|
|
22111
|
-
/* @__PURE__ */
|
|
22463
|
+
return /* @__PURE__ */ jsxs57(Fragment28, { children: [
|
|
22464
|
+
/* @__PURE__ */ jsx126(
|
|
22112
22465
|
Select3,
|
|
22113
22466
|
{
|
|
22114
22467
|
ref: anchorRef,
|
|
@@ -22123,16 +22476,19 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22123
22476
|
value: value?.name || "",
|
|
22124
22477
|
displayEmpty: true,
|
|
22125
22478
|
disabled,
|
|
22126
|
-
input: /* @__PURE__ */
|
|
22479
|
+
input: /* @__PURE__ */ jsx126(
|
|
22127
22480
|
BootstrapInput,
|
|
22128
22481
|
{
|
|
22482
|
+
inputProps: {
|
|
22483
|
+
"data-testid": dataTestId ? dataTestId + "-input" : void 0
|
|
22484
|
+
},
|
|
22129
22485
|
sx: {
|
|
22130
22486
|
borderRadius: "4px"
|
|
22131
22487
|
}
|
|
22132
22488
|
}
|
|
22133
22489
|
),
|
|
22134
22490
|
renderValue: (value2) => value2 || placeholder,
|
|
22135
|
-
IconComponent: () => /* @__PURE__ */
|
|
22491
|
+
IconComponent: () => /* @__PURE__ */ jsx126(ChevronIcon2, { disabled }),
|
|
22136
22492
|
onClick: !disabled ? (e) => {
|
|
22137
22493
|
e.preventDefault();
|
|
22138
22494
|
e.stopPropagation();
|
|
@@ -22140,10 +22496,10 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22140
22496
|
} : void 0,
|
|
22141
22497
|
open: false,
|
|
22142
22498
|
"data-testid": dataTestId,
|
|
22143
|
-
children: options.map((option) => /* @__PURE__ */
|
|
22499
|
+
children: options.map((option) => /* @__PURE__ */ jsx126("option", { value: option.name }, option.id))
|
|
22144
22500
|
}
|
|
22145
22501
|
),
|
|
22146
|
-
/* @__PURE__ */
|
|
22502
|
+
/* @__PURE__ */ jsx126(
|
|
22147
22503
|
Popover2,
|
|
22148
22504
|
{
|
|
22149
22505
|
anchorEl: anchorRef.current,
|
|
@@ -22164,8 +22520,8 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22164
22520
|
width: "640px"
|
|
22165
22521
|
}
|
|
22166
22522
|
},
|
|
22167
|
-
children: /* @__PURE__ */
|
|
22168
|
-
/* @__PURE__ */
|
|
22523
|
+
children: /* @__PURE__ */ jsxs57(Grid3, { container: true, children: [
|
|
22524
|
+
/* @__PURE__ */ jsx126(
|
|
22169
22525
|
Grid3,
|
|
22170
22526
|
{
|
|
22171
22527
|
size: {
|
|
@@ -22173,20 +22529,21 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22173
22529
|
},
|
|
22174
22530
|
padding: "8px",
|
|
22175
22531
|
borderBottom: `1px solid ${grey200}`,
|
|
22176
|
-
children: /* @__PURE__ */
|
|
22532
|
+
children: /* @__PURE__ */ jsx126(
|
|
22177
22533
|
DebouncedTextField_default,
|
|
22178
22534
|
{
|
|
22179
22535
|
placeholder: t(
|
|
22180
22536
|
"CATEGORIZED_PICKER.SEARCH_PLACEHOLDER"
|
|
22181
22537
|
),
|
|
22182
|
-
value:
|
|
22538
|
+
value: "",
|
|
22183
22539
|
onChange: onTypeSearch,
|
|
22184
|
-
startAdornment: /* @__PURE__ */
|
|
22540
|
+
startAdornment: /* @__PURE__ */ jsx126(Icon_default, { id: "magnify" }),
|
|
22541
|
+
"data-testid": dataTestId ? dataTestId + "-search-input" : void 0
|
|
22185
22542
|
}
|
|
22186
22543
|
)
|
|
22187
22544
|
}
|
|
22188
22545
|
),
|
|
22189
|
-
/* @__PURE__ */
|
|
22546
|
+
/* @__PURE__ */ jsx126(
|
|
22190
22547
|
Grid3,
|
|
22191
22548
|
{
|
|
22192
22549
|
size: {
|
|
@@ -22195,14 +22552,14 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22195
22552
|
sx: { borderRight: `1px solid ${grey200}` },
|
|
22196
22553
|
height: "316px",
|
|
22197
22554
|
className: "Slim-Vertical-Scroll",
|
|
22198
|
-
children: /* @__PURE__ */
|
|
22555
|
+
children: /* @__PURE__ */ jsx126(Stack11, { children: filteredCategories.map((category, idx) => /* @__PURE__ */ jsx126(
|
|
22199
22556
|
ListItemButton_default,
|
|
22200
22557
|
{
|
|
22201
22558
|
selected: selectedCategory === category,
|
|
22202
22559
|
onClick: () => {
|
|
22203
22560
|
setSelectedCategory(category);
|
|
22204
22561
|
},
|
|
22205
|
-
endAdornment: selectedCategory === category ? /* @__PURE__ */
|
|
22562
|
+
endAdornment: selectedCategory === category ? /* @__PURE__ */ jsx126(
|
|
22206
22563
|
Icon_default,
|
|
22207
22564
|
{
|
|
22208
22565
|
id: "menu-right",
|
|
@@ -22210,10 +22567,10 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22210
22567
|
}
|
|
22211
22568
|
) : void 0,
|
|
22212
22569
|
buttonDataTestId: dataTestId ? dataTestId + "-category-" + idx : void 0,
|
|
22213
|
-
children: /* @__PURE__ */
|
|
22570
|
+
children: /* @__PURE__ */ jsx126(
|
|
22214
22571
|
TextEllipsis_default,
|
|
22215
22572
|
{
|
|
22216
|
-
text: /* @__PURE__ */
|
|
22573
|
+
text: /* @__PURE__ */ jsx126(
|
|
22217
22574
|
TextMarker_default,
|
|
22218
22575
|
{
|
|
22219
22576
|
searchText: search,
|
|
@@ -22231,7 +22588,7 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22231
22588
|
)) })
|
|
22232
22589
|
}
|
|
22233
22590
|
),
|
|
22234
|
-
/* @__PURE__ */
|
|
22591
|
+
/* @__PURE__ */ jsx126(
|
|
22235
22592
|
Grid3,
|
|
22236
22593
|
{
|
|
22237
22594
|
size: {
|
|
@@ -22239,46 +22596,37 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22239
22596
|
},
|
|
22240
22597
|
height: "316px",
|
|
22241
22598
|
className: "Slim-Vertical-Scroll",
|
|
22242
|
-
children: /* @__PURE__ */
|
|
22243
|
-
|
|
22599
|
+
children: /* @__PURE__ */ jsx126(
|
|
22600
|
+
Stack11,
|
|
22244
22601
|
{
|
|
22245
|
-
|
|
22246
|
-
|
|
22247
|
-
|
|
22248
|
-
|
|
22249
|
-
|
|
22250
|
-
|
|
22602
|
+
...(!selectedCategory || !!selectedCategory.emptyData) && {
|
|
22603
|
+
height: "100%"
|
|
22604
|
+
},
|
|
22605
|
+
children: /* @__PURE__ */ jsx126(
|
|
22606
|
+
Stack11,
|
|
22607
|
+
{
|
|
22608
|
+
...(!selectedCategory || !!selectedCategory.emptyData) && {
|
|
22609
|
+
height: "100%"
|
|
22610
|
+
},
|
|
22611
|
+
children: /* @__PURE__ */ jsx126(
|
|
22612
|
+
CategorizedPickerCategoryPanel_default,
|
|
22613
|
+
{
|
|
22614
|
+
selectedCategory,
|
|
22615
|
+
isEmptyCategories: filteredCategories.length === 0,
|
|
22616
|
+
categoryOptions: selectedCategory?.categoryOptions ?? [],
|
|
22617
|
+
onSelect: (option) => {
|
|
22618
|
+
onChange(option);
|
|
22619
|
+
closePopover();
|
|
22620
|
+
},
|
|
22621
|
+
dataTestId,
|
|
22622
|
+
searchText: search,
|
|
22623
|
+
value
|
|
22624
|
+
}
|
|
22625
|
+
)
|
|
22626
|
+
}
|
|
22251
22627
|
)
|
|
22252
22628
|
}
|
|
22253
|
-
)
|
|
22254
|
-
(option, idx) => /* @__PURE__ */ jsx120(
|
|
22255
|
-
ListItemButton_default,
|
|
22256
|
-
{
|
|
22257
|
-
selected: value?.id === option.id,
|
|
22258
|
-
onClick: () => {
|
|
22259
|
-
onChange(option);
|
|
22260
|
-
closePopover();
|
|
22261
|
-
},
|
|
22262
|
-
buttonDataTestId: dataTestId ? dataTestId + "-option-" + idx : void 0,
|
|
22263
|
-
children: /* @__PURE__ */ jsx120(
|
|
22264
|
-
TextEllipsis_default,
|
|
22265
|
-
{
|
|
22266
|
-
text: /* @__PURE__ */ jsx120(
|
|
22267
|
-
TextMarker_default,
|
|
22268
|
-
{
|
|
22269
|
-
searchText: search,
|
|
22270
|
-
backgroundColor: primary200,
|
|
22271
|
-
multiSearchCharSeparator: ",",
|
|
22272
|
-
children: option.name
|
|
22273
|
-
}
|
|
22274
|
-
),
|
|
22275
|
-
typographyVariant: "body2"
|
|
22276
|
-
}
|
|
22277
|
-
)
|
|
22278
|
-
},
|
|
22279
|
-
option.id
|
|
22280
|
-
)
|
|
22281
|
-
) }) })
|
|
22629
|
+
)
|
|
22282
22630
|
}
|
|
22283
22631
|
)
|
|
22284
22632
|
] })
|
|
@@ -22289,14 +22637,14 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22289
22637
|
var CategorizedPicker_default = CategorizedPicker;
|
|
22290
22638
|
|
|
22291
22639
|
// src/components/input/ItemSelector.tsx
|
|
22292
|
-
import * as
|
|
22640
|
+
import * as React68 from "react";
|
|
22293
22641
|
|
|
22294
22642
|
// src/components/input/SelectPopover.tsx
|
|
22295
|
-
import * as
|
|
22296
|
-
import { Grid as Grid4, Stack as
|
|
22297
|
-
import { useState as
|
|
22643
|
+
import * as React67 from "react";
|
|
22644
|
+
import { Grid as Grid4, Stack as Stack12 } from "@mui/material";
|
|
22645
|
+
import { useState as useState25 } from "react";
|
|
22298
22646
|
import InfiniteScroll from "react-infinite-scroll-component";
|
|
22299
|
-
import { jsx as
|
|
22647
|
+
import { jsx as jsx127, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
22300
22648
|
var defaultItemsColorStyles = {
|
|
22301
22649
|
selectedColor: Colors_exports.primaryMain,
|
|
22302
22650
|
disabledColor: ""
|
|
@@ -22328,11 +22676,11 @@ var SelectPopover = function SelectPopover2({
|
|
|
22328
22676
|
paddingContent
|
|
22329
22677
|
}) {
|
|
22330
22678
|
const { t } = useTranslation();
|
|
22331
|
-
const [searchText, setSearchText] =
|
|
22332
|
-
const [isScrollBottom, setIsScrollBottom] =
|
|
22333
|
-
const [currentItems, setCurrentItems] =
|
|
22334
|
-
const [currentSelectedItems, setCurrentSelectedItems] =
|
|
22335
|
-
const prevSelectedItemsIdsRef =
|
|
22679
|
+
const [searchText, setSearchText] = useState25("");
|
|
22680
|
+
const [isScrollBottom, setIsScrollBottom] = useState25(false);
|
|
22681
|
+
const [currentItems, setCurrentItems] = useState25([]);
|
|
22682
|
+
const [currentSelectedItems, setCurrentSelectedItems] = React67.useState([]);
|
|
22683
|
+
const prevSelectedItemsIdsRef = React67.useRef([]);
|
|
22336
22684
|
const onSearchTextChanged = (text) => {
|
|
22337
22685
|
onSearch(text);
|
|
22338
22686
|
setSearchText(text);
|
|
@@ -22344,7 +22692,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22344
22692
|
}
|
|
22345
22693
|
setCurrentSelectedItems(selectedItemsIds);
|
|
22346
22694
|
};
|
|
22347
|
-
|
|
22695
|
+
React67.useEffect(() => {
|
|
22348
22696
|
const prevSelectedItemsIds = prevSelectedItemsIdsRef.current;
|
|
22349
22697
|
if (keepCurrentSelectionOnSearch && anchorEl) {
|
|
22350
22698
|
let nextSelectedItems = currentSelectedItems;
|
|
@@ -22433,7 +22781,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22433
22781
|
}
|
|
22434
22782
|
}
|
|
22435
22783
|
};
|
|
22436
|
-
return /* @__PURE__ */
|
|
22784
|
+
return /* @__PURE__ */ jsxs58(
|
|
22437
22785
|
Popover_default,
|
|
22438
22786
|
{
|
|
22439
22787
|
centeredInScreen,
|
|
@@ -22441,14 +22789,14 @@ var SelectPopover = function SelectPopover2({
|
|
|
22441
22789
|
anchorEl,
|
|
22442
22790
|
disableRestoreFocus,
|
|
22443
22791
|
children: [
|
|
22444
|
-
/* @__PURE__ */
|
|
22792
|
+
/* @__PURE__ */ jsx127(
|
|
22445
22793
|
Box_default2,
|
|
22446
22794
|
{
|
|
22447
22795
|
sx: {
|
|
22448
22796
|
borderBottom: `1px solid ${Colors_exports.grey200}`,
|
|
22449
22797
|
padding: "8px"
|
|
22450
22798
|
},
|
|
22451
|
-
children: /* @__PURE__ */
|
|
22799
|
+
children: /* @__PURE__ */ jsx127(
|
|
22452
22800
|
DebouncedTextField_default,
|
|
22453
22801
|
{
|
|
22454
22802
|
iconId: "magnify",
|
|
@@ -22463,7 +22811,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22463
22811
|
)
|
|
22464
22812
|
}
|
|
22465
22813
|
),
|
|
22466
|
-
/* @__PURE__ */
|
|
22814
|
+
/* @__PURE__ */ jsx127(
|
|
22467
22815
|
InfiniteScroll,
|
|
22468
22816
|
{
|
|
22469
22817
|
height: 300,
|
|
@@ -22482,7 +22830,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22482
22830
|
e.target.scrollHeight - e.target.scrollTop === e.target.clientHeight
|
|
22483
22831
|
),
|
|
22484
22832
|
loader: true,
|
|
22485
|
-
children: /* @__PURE__ */
|
|
22833
|
+
children: /* @__PURE__ */ jsxs58(
|
|
22486
22834
|
Grid4,
|
|
22487
22835
|
{
|
|
22488
22836
|
container: true,
|
|
@@ -22525,7 +22873,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22525
22873
|
onItemSelected
|
|
22526
22874
|
) : getItemElement(item, onItemSelected)
|
|
22527
22875
|
),
|
|
22528
|
-
isLoading && /* @__PURE__ */
|
|
22876
|
+
isLoading && /* @__PURE__ */ jsx127(
|
|
22529
22877
|
Skeleton_default,
|
|
22530
22878
|
{
|
|
22531
22879
|
variant: "text",
|
|
@@ -22538,13 +22886,13 @@ var SelectPopover = function SelectPopover2({
|
|
|
22538
22886
|
}
|
|
22539
22887
|
}
|
|
22540
22888
|
),
|
|
22541
|
-
!isLoading && currentItems.length === 0 ? typeof emptyListPlaceholder === "string" ? /* @__PURE__ */
|
|
22542
|
-
|
|
22889
|
+
!isLoading && currentItems.length === 0 ? typeof emptyListPlaceholder === "string" ? /* @__PURE__ */ jsx127(
|
|
22890
|
+
Stack12,
|
|
22543
22891
|
{
|
|
22544
22892
|
alignItems: "center",
|
|
22545
22893
|
justifyContent: "center",
|
|
22546
22894
|
width: "100%",
|
|
22547
|
-
children: /* @__PURE__ */
|
|
22895
|
+
children: /* @__PURE__ */ jsx127(Typography_default, { variant: "body2", color: grey600, children: emptyListPlaceholder })
|
|
22548
22896
|
}
|
|
22549
22897
|
) : emptyListPlaceholder : ""
|
|
22550
22898
|
]
|
|
@@ -22552,11 +22900,11 @@ var SelectPopover = function SelectPopover2({
|
|
|
22552
22900
|
)
|
|
22553
22901
|
}
|
|
22554
22902
|
),
|
|
22555
|
-
/* @__PURE__ */
|
|
22903
|
+
/* @__PURE__ */ jsx127(
|
|
22556
22904
|
PopoverActions_default,
|
|
22557
22905
|
{
|
|
22558
22906
|
sx: { padding: "16px 24px" },
|
|
22559
|
-
leftContent: /* @__PURE__ */
|
|
22907
|
+
leftContent: /* @__PURE__ */ jsx127(
|
|
22560
22908
|
Button_default,
|
|
22561
22909
|
{
|
|
22562
22910
|
variant: "contained",
|
|
@@ -22566,7 +22914,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22566
22914
|
onClick: closePopover
|
|
22567
22915
|
}
|
|
22568
22916
|
),
|
|
22569
|
-
rightContent: /* @__PURE__ */
|
|
22917
|
+
rightContent: /* @__PURE__ */ jsx127(
|
|
22570
22918
|
Button_default,
|
|
22571
22919
|
{
|
|
22572
22920
|
variant: "contained",
|
|
@@ -22590,7 +22938,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22590
22938
|
);
|
|
22591
22939
|
};
|
|
22592
22940
|
function getItemElement(item, onItemClick) {
|
|
22593
|
-
return /* @__PURE__ */
|
|
22941
|
+
return /* @__PURE__ */ jsx127(
|
|
22594
22942
|
SelectPopoverItem_default,
|
|
22595
22943
|
{
|
|
22596
22944
|
id: item.id,
|
|
@@ -22619,7 +22967,7 @@ var arraysEqual = (a, b) => {
|
|
|
22619
22967
|
var SelectPopover_default = SelectPopover;
|
|
22620
22968
|
|
|
22621
22969
|
// src/components/input/ItemSelector.tsx
|
|
22622
|
-
import { Fragment as
|
|
22970
|
+
import { Fragment as Fragment29, jsx as jsx128, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
22623
22971
|
var ItemSelector = function ItemSelector2({
|
|
22624
22972
|
items,
|
|
22625
22973
|
selectedItems,
|
|
@@ -22650,16 +22998,16 @@ var ItemSelector = function ItemSelector2({
|
|
|
22650
22998
|
onSearch,
|
|
22651
22999
|
onClose
|
|
22652
23000
|
}) {
|
|
22653
|
-
const [anchorEl, setAnchorEl] =
|
|
22654
|
-
const [searchText, setSearchText] =
|
|
22655
|
-
const allShownItemsRef =
|
|
22656
|
-
const selectRef =
|
|
22657
|
-
|
|
23001
|
+
const [anchorEl, setAnchorEl] = React68.useState();
|
|
23002
|
+
const [searchText, setSearchText] = React68.useState("");
|
|
23003
|
+
const allShownItemsRef = React68.useRef(items);
|
|
23004
|
+
const selectRef = React68.useRef(null);
|
|
23005
|
+
React68.useEffect(() => {
|
|
22658
23006
|
if (anchorEl) {
|
|
22659
23007
|
onSearch(searchText);
|
|
22660
23008
|
}
|
|
22661
23009
|
}, [anchorEl, onSearch, searchText]);
|
|
22662
|
-
|
|
23010
|
+
React68.useEffect(() => {
|
|
22663
23011
|
const allShownItems = allShownItemsRef.current;
|
|
22664
23012
|
allShownItemsRef.current = allShownItems.concat(
|
|
22665
23013
|
items.filter(
|
|
@@ -22673,7 +23021,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22673
23021
|
item
|
|
22674
23022
|
}) => {
|
|
22675
23023
|
const [ref, { contentWidth: width2 }] = useResizeObserver();
|
|
22676
|
-
return /* @__PURE__ */
|
|
23024
|
+
return /* @__PURE__ */ jsx128(
|
|
22677
23025
|
Chip_default,
|
|
22678
23026
|
{
|
|
22679
23027
|
ref,
|
|
@@ -22703,8 +23051,8 @@ var ItemSelector = function ItemSelector2({
|
|
|
22703
23051
|
const selectedItem = selectedItems[0]?.id;
|
|
22704
23052
|
return selectedItem ? [selectedItem] : "";
|
|
22705
23053
|
};
|
|
22706
|
-
return /* @__PURE__ */
|
|
22707
|
-
/* @__PURE__ */
|
|
23054
|
+
return /* @__PURE__ */ jsxs59(Fragment29, { children: [
|
|
23055
|
+
/* @__PURE__ */ jsx128(
|
|
22708
23056
|
Select_default,
|
|
22709
23057
|
{
|
|
22710
23058
|
ref: selectRef,
|
|
@@ -22720,17 +23068,17 @@ var ItemSelector = function ItemSelector2({
|
|
|
22720
23068
|
renderValue: (value) => {
|
|
22721
23069
|
let component;
|
|
22722
23070
|
if (!value || !Array.isArray(value) || value.length === 0) {
|
|
22723
|
-
component = /* @__PURE__ */
|
|
22724
|
-
/* @__PURE__ */
|
|
23071
|
+
component = /* @__PURE__ */ jsxs59(Fragment29, { children: [
|
|
23072
|
+
/* @__PURE__ */ jsx128(
|
|
22725
23073
|
Stack_default,
|
|
22726
23074
|
{
|
|
22727
23075
|
direction: "row",
|
|
22728
23076
|
flexWrap: "wrap",
|
|
22729
23077
|
padding: "6px 0",
|
|
22730
|
-
children: /* @__PURE__ */
|
|
23078
|
+
children: /* @__PURE__ */ jsx128(Typography_default, { variant: "body2", color: grey600, children: placeholder })
|
|
22731
23079
|
}
|
|
22732
23080
|
),
|
|
22733
|
-
/* @__PURE__ */
|
|
23081
|
+
/* @__PURE__ */ jsx128(
|
|
22734
23082
|
Divider_default,
|
|
22735
23083
|
{
|
|
22736
23084
|
variant: "middle",
|
|
@@ -22740,8 +23088,8 @@ var ItemSelector = function ItemSelector2({
|
|
|
22740
23088
|
)
|
|
22741
23089
|
] });
|
|
22742
23090
|
} else {
|
|
22743
|
-
component = /* @__PURE__ */
|
|
22744
|
-
/* @__PURE__ */
|
|
23091
|
+
component = /* @__PURE__ */ jsxs59(Fragment29, { children: [
|
|
23092
|
+
/* @__PURE__ */ jsxs59(
|
|
22745
23093
|
Stack_default,
|
|
22746
23094
|
{
|
|
22747
23095
|
direction: "row",
|
|
@@ -22755,7 +23103,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22755
23103
|
const item = selectedItems.find(
|
|
22756
23104
|
(i) => i.id === id
|
|
22757
23105
|
);
|
|
22758
|
-
return item ? /* @__PURE__ */
|
|
23106
|
+
return item ? /* @__PURE__ */ jsx128(
|
|
22759
23107
|
ItemChip,
|
|
22760
23108
|
{
|
|
22761
23109
|
item: {
|
|
@@ -22764,14 +23112,14 @@ var ItemSelector = function ItemSelector2({
|
|
|
22764
23112
|
}
|
|
22765
23113
|
},
|
|
22766
23114
|
id
|
|
22767
|
-
) : /* @__PURE__ */
|
|
23115
|
+
) : /* @__PURE__ */ jsx128(Fragment29, {});
|
|
22768
23116
|
}),
|
|
22769
|
-
value.length - limitItemChips > 0 ? /* @__PURE__ */
|
|
23117
|
+
value.length - limitItemChips > 0 ? /* @__PURE__ */ jsx128(
|
|
22770
23118
|
Tooltip_default,
|
|
22771
23119
|
{
|
|
22772
23120
|
interactive: true,
|
|
22773
23121
|
variant: "white",
|
|
22774
|
-
title: /* @__PURE__ */
|
|
23122
|
+
title: /* @__PURE__ */ jsx128(
|
|
22775
23123
|
Stack_default,
|
|
22776
23124
|
{
|
|
22777
23125
|
direction: "row",
|
|
@@ -22788,24 +23136,24 @@ var ItemSelector = function ItemSelector2({
|
|
|
22788
23136
|
const item = selectedItems.find(
|
|
22789
23137
|
(i) => i.id === id
|
|
22790
23138
|
);
|
|
22791
|
-
return item ? /* @__PURE__ */
|
|
23139
|
+
return item ? /* @__PURE__ */ jsx128(
|
|
22792
23140
|
ItemChip,
|
|
22793
23141
|
{
|
|
22794
23142
|
item
|
|
22795
23143
|
},
|
|
22796
23144
|
id
|
|
22797
|
-
) : /* @__PURE__ */
|
|
23145
|
+
) : /* @__PURE__ */ jsx128(Fragment29, {});
|
|
22798
23146
|
})
|
|
22799
23147
|
}
|
|
22800
23148
|
),
|
|
22801
|
-
children: /* @__PURE__ */
|
|
23149
|
+
children: /* @__PURE__ */ jsx128(Typography_default, { variant: "body2", children: `+${value.length - limitItemChips}` })
|
|
22802
23150
|
}
|
|
22803
23151
|
) : void 0
|
|
22804
23152
|
]
|
|
22805
23153
|
}
|
|
22806
23154
|
),
|
|
22807
|
-
!disabled && /* @__PURE__ */
|
|
22808
|
-
/* @__PURE__ */
|
|
23155
|
+
!disabled && /* @__PURE__ */ jsxs59(Stack_default, { direction: "row", children: [
|
|
23156
|
+
/* @__PURE__ */ jsx128(
|
|
22809
23157
|
IconButton_default,
|
|
22810
23158
|
{
|
|
22811
23159
|
iconId: "close",
|
|
@@ -22823,7 +23171,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22823
23171
|
}
|
|
22824
23172
|
}
|
|
22825
23173
|
),
|
|
22826
|
-
/* @__PURE__ */
|
|
23174
|
+
/* @__PURE__ */ jsx128(
|
|
22827
23175
|
Divider_default,
|
|
22828
23176
|
{
|
|
22829
23177
|
variant: "middle",
|
|
@@ -22834,7 +23182,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22834
23182
|
] })
|
|
22835
23183
|
] });
|
|
22836
23184
|
}
|
|
22837
|
-
return /* @__PURE__ */
|
|
23185
|
+
return /* @__PURE__ */ jsx128(
|
|
22838
23186
|
Stack_default,
|
|
22839
23187
|
{
|
|
22840
23188
|
direction: "row",
|
|
@@ -22856,8 +23204,8 @@ var ItemSelector = function ItemSelector2({
|
|
|
22856
23204
|
}
|
|
22857
23205
|
}
|
|
22858
23206
|
),
|
|
22859
|
-
helperText && /* @__PURE__ */
|
|
22860
|
-
/* @__PURE__ */
|
|
23207
|
+
helperText && /* @__PURE__ */ jsx128(InputHelperText_default, { severity: isError ? "error" : "info", children: helperText }),
|
|
23208
|
+
/* @__PURE__ */ jsx128(
|
|
22861
23209
|
SelectPopover_default,
|
|
22862
23210
|
{
|
|
22863
23211
|
items: items.map((item) => {
|
|
@@ -22905,7 +23253,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22905
23253
|
var ItemSelector_default = ItemSelector;
|
|
22906
23254
|
|
|
22907
23255
|
// src/components/input/autocomplete/Autocomplete.tsx
|
|
22908
|
-
import * as
|
|
23256
|
+
import * as React72 from "react";
|
|
22909
23257
|
|
|
22910
23258
|
// src/utils/RegExpUtils.ts
|
|
22911
23259
|
var map = {
|
|
@@ -22919,11 +23267,11 @@ var map = {
|
|
|
22919
23267
|
var toDiacriticInsensitiveString = (input) => Array.from(input).map((char) => map[char] ? `[${map[char]}]` : char).join("");
|
|
22920
23268
|
|
|
22921
23269
|
// src/components/input/autocomplete/AutocompleteInput.tsx
|
|
22922
|
-
import * as
|
|
23270
|
+
import * as React70 from "react";
|
|
22923
23271
|
|
|
22924
23272
|
// src/components/input/autocomplete/AutocompleteInputSelection.tsx
|
|
22925
|
-
import * as
|
|
22926
|
-
import { jsx as
|
|
23273
|
+
import * as React69 from "react";
|
|
23274
|
+
import { jsx as jsx129, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
22927
23275
|
var AUTOCOMPLETE_PADDING_RIGHT = 6;
|
|
22928
23276
|
var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
22929
23277
|
value,
|
|
@@ -22934,8 +23282,8 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
22934
23282
|
onOpenPopover,
|
|
22935
23283
|
onRemoveValue
|
|
22936
23284
|
}) {
|
|
22937
|
-
const stackRef =
|
|
22938
|
-
return /* @__PURE__ */
|
|
23285
|
+
const stackRef = React69.useRef(null);
|
|
23286
|
+
return /* @__PURE__ */ jsxs60(
|
|
22939
23287
|
Stack_default,
|
|
22940
23288
|
{
|
|
22941
23289
|
ref: stackRef,
|
|
@@ -22951,7 +23299,7 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
22951
23299
|
paddingLeft: "2px"
|
|
22952
23300
|
},
|
|
22953
23301
|
children: [
|
|
22954
|
-
!!startIconId && /* @__PURE__ */
|
|
23302
|
+
!!startIconId && /* @__PURE__ */ jsx129(
|
|
22955
23303
|
IconButton_default,
|
|
22956
23304
|
{
|
|
22957
23305
|
iconId: startIconId,
|
|
@@ -22970,8 +23318,8 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
22970
23318
|
}
|
|
22971
23319
|
}
|
|
22972
23320
|
),
|
|
22973
|
-
/* @__PURE__ */
|
|
22974
|
-
!Array.isArray(value) && !!value && /* @__PURE__ */
|
|
23321
|
+
/* @__PURE__ */ jsxs60(Stack_default, { whiteSpace: "nowrap", flex: "1 1 auto", minWidth: 0, children: [
|
|
23322
|
+
!Array.isArray(value) && !!value && /* @__PURE__ */ jsx129(
|
|
22975
23323
|
TextEllipsis_default,
|
|
22976
23324
|
{
|
|
22977
23325
|
typographyVariant: "body2",
|
|
@@ -22981,7 +23329,7 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
22981
23329
|
)
|
|
22982
23330
|
}
|
|
22983
23331
|
),
|
|
22984
|
-
Array.isArray(value) && /* @__PURE__ */
|
|
23332
|
+
Array.isArray(value) && /* @__PURE__ */ jsx129(
|
|
22985
23333
|
ChipViewer_default,
|
|
22986
23334
|
{
|
|
22987
23335
|
values: value,
|
|
@@ -23008,7 +23356,7 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
23008
23356
|
var AutocompleteInputSelection_default = AutocompleteInputSelection;
|
|
23009
23357
|
|
|
23010
23358
|
// src/components/input/autocomplete/AutocompleteInput.tsx
|
|
23011
|
-
import { Fragment as
|
|
23359
|
+
import { Fragment as Fragment30, jsx as jsx130, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
23012
23360
|
var INPUT_MIN_WIDTH = 80;
|
|
23013
23361
|
var CLEAR_BUTTON_WIDTH = 36;
|
|
23014
23362
|
var AutocompleteInput = function AutocompleteInput2({
|
|
@@ -23037,10 +23385,10 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23037
23385
|
onRemoveValue
|
|
23038
23386
|
}) {
|
|
23039
23387
|
const { t } = useTranslation();
|
|
23040
|
-
const [isHover, setIsHover] =
|
|
23388
|
+
const [isHover, setIsHover] = React70.useState(false);
|
|
23041
23389
|
const dirty = !!inputValue || Array.isArray(value) && value.length > 0 || !Array.isArray(value) && !!value;
|
|
23042
23390
|
const showClearButton = !disabled && dirty && !disableClear && (isOpenPopover || isHover);
|
|
23043
|
-
return /* @__PURE__ */
|
|
23391
|
+
return /* @__PURE__ */ jsx130(Fragment30, { children: /* @__PURE__ */ jsx130(
|
|
23044
23392
|
DebouncedTextField_default,
|
|
23045
23393
|
{
|
|
23046
23394
|
ref: inputRef,
|
|
@@ -23119,7 +23467,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23119
23467
|
}
|
|
23120
23468
|
},
|
|
23121
23469
|
containerRef,
|
|
23122
|
-
startAdornment: /* @__PURE__ */
|
|
23470
|
+
startAdornment: /* @__PURE__ */ jsx130(
|
|
23123
23471
|
AutocompleteInputSelection_default,
|
|
23124
23472
|
{
|
|
23125
23473
|
value,
|
|
@@ -23131,7 +23479,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23131
23479
|
disabled
|
|
23132
23480
|
}
|
|
23133
23481
|
),
|
|
23134
|
-
endAdornment: /* @__PURE__ */
|
|
23482
|
+
endAdornment: /* @__PURE__ */ jsxs61(
|
|
23135
23483
|
Stack_default,
|
|
23136
23484
|
{
|
|
23137
23485
|
direction: "row",
|
|
@@ -23143,7 +23491,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23143
23491
|
flex: "0 0 auto",
|
|
23144
23492
|
children: [
|
|
23145
23493
|
textFieldProps?.endAdornment,
|
|
23146
|
-
showClearButton && /* @__PURE__ */
|
|
23494
|
+
showClearButton && /* @__PURE__ */ jsx130(Tooltip_default, { title: t("AUTOCOMPLETE.CLEAR"), children: /* @__PURE__ */ jsx130(
|
|
23147
23495
|
IconButton_default,
|
|
23148
23496
|
{
|
|
23149
23497
|
iconId: "close",
|
|
@@ -23170,11 +23518,11 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23170
23518
|
"data-test": "clear-autocomplete"
|
|
23171
23519
|
}
|
|
23172
23520
|
) }),
|
|
23173
|
-
!disabled && variant !== "text" && /* @__PURE__ */
|
|
23521
|
+
!disabled && variant !== "text" && /* @__PURE__ */ jsx130(
|
|
23174
23522
|
Tooltip_default,
|
|
23175
23523
|
{
|
|
23176
23524
|
title: isOpenPopover ? t("AUTOCOMPLETE.COLLAPSE") : t("AUTOCOMPLETE.EXPAND"),
|
|
23177
|
-
children: /* @__PURE__ */
|
|
23525
|
+
children: /* @__PURE__ */ jsx130(
|
|
23178
23526
|
IconButton_default,
|
|
23179
23527
|
{
|
|
23180
23528
|
iconId: isOpenPopover ? "chevron-up" : "chevron-down",
|
|
@@ -23210,7 +23558,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23210
23558
|
var AutocompleteInput_default = AutocompleteInput;
|
|
23211
23559
|
|
|
23212
23560
|
// src/components/input/autocomplete/AutocompleteList.tsx
|
|
23213
|
-
import * as
|
|
23561
|
+
import * as React71 from "react";
|
|
23214
23562
|
import { Popper as Popper2, ClickAwayListener } from "@mui/material";
|
|
23215
23563
|
import { FixedSizeList as FixedSizeList3 } from "react-window";
|
|
23216
23564
|
import AutoSizer5 from "react-virtualized-auto-sizer";
|
|
@@ -23236,7 +23584,7 @@ function getInitialListScroll({
|
|
|
23236
23584
|
}
|
|
23237
23585
|
|
|
23238
23586
|
// src/components/input/autocomplete/AutocompleteList.tsx
|
|
23239
|
-
import { Fragment as
|
|
23587
|
+
import { Fragment as Fragment31, jsx as jsx131, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
23240
23588
|
var AUTOCOMPLETE_ITEM_HEIGHT = 44;
|
|
23241
23589
|
var AutocompleteList = function AutocompleteList2({
|
|
23242
23590
|
options,
|
|
@@ -23254,7 +23602,7 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23254
23602
|
onClickAwayPopover
|
|
23255
23603
|
}) {
|
|
23256
23604
|
const { t } = useTranslation();
|
|
23257
|
-
const listRef =
|
|
23605
|
+
const listRef = React71.useRef(null);
|
|
23258
23606
|
const getText = (option) => {
|
|
23259
23607
|
const isInOptions = options.some((elem) => elem.id === option.id);
|
|
23260
23608
|
if (!isInOptions) {
|
|
@@ -23269,7 +23617,7 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23269
23617
|
}) => {
|
|
23270
23618
|
const option = filteredOptions[index];
|
|
23271
23619
|
const isMultiple = Array.isArray(selectedIndex);
|
|
23272
|
-
return /* @__PURE__ */
|
|
23620
|
+
return /* @__PURE__ */ jsx131(
|
|
23273
23621
|
ListItemButton_default,
|
|
23274
23622
|
{
|
|
23275
23623
|
selected: !isMultiple ? index === selectedIndex : selectedIndex.includes(index),
|
|
@@ -23298,20 +23646,20 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23298
23646
|
option.id
|
|
23299
23647
|
);
|
|
23300
23648
|
};
|
|
23301
|
-
return /* @__PURE__ */
|
|
23649
|
+
return /* @__PURE__ */ jsx131(Fragment31, { children: /* @__PURE__ */ jsx131(
|
|
23302
23650
|
ClickAwayListener,
|
|
23303
23651
|
{
|
|
23304
23652
|
onClickAway: (event) => onClickAwayPopover(
|
|
23305
23653
|
event
|
|
23306
23654
|
),
|
|
23307
23655
|
mouseEvent: "onMouseDown",
|
|
23308
|
-
children: /* @__PURE__ */
|
|
23656
|
+
children: /* @__PURE__ */ jsx131(
|
|
23309
23657
|
Popper2,
|
|
23310
23658
|
{
|
|
23311
23659
|
anchorEl: inputContainerRef.current,
|
|
23312
23660
|
open: isOpen,
|
|
23313
23661
|
sx: { zIndex: 3e3 },
|
|
23314
|
-
children: /* @__PURE__ */
|
|
23662
|
+
children: /* @__PURE__ */ jsx131(Paper_default, { sx: { boxShadow: shadows[1], borderRadius: "8px" }, children: /* @__PURE__ */ jsxs62(
|
|
23315
23663
|
Box_default2,
|
|
23316
23664
|
{
|
|
23317
23665
|
sx: {
|
|
@@ -23323,22 +23671,22 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23323
23671
|
className: "Slim-Vertical-Scroll",
|
|
23324
23672
|
ref: listRef,
|
|
23325
23673
|
children: [
|
|
23326
|
-
isLoading && /* @__PURE__ */
|
|
23674
|
+
isLoading && /* @__PURE__ */ jsx131(
|
|
23327
23675
|
ListItem_default,
|
|
23328
23676
|
{
|
|
23329
23677
|
text: loadingText ?? t("AUTOCOMPLETE.LOADING")
|
|
23330
23678
|
}
|
|
23331
23679
|
),
|
|
23332
|
-
!isLoading && filteredOptions.length === 0 && /* @__PURE__ */
|
|
23680
|
+
!isLoading && filteredOptions.length === 0 && /* @__PURE__ */ jsx131(
|
|
23333
23681
|
ListItem_default,
|
|
23334
23682
|
{
|
|
23335
23683
|
text: noOptionsText ?? t("AUTOCOMPLETE.NO_OPTIONS")
|
|
23336
23684
|
}
|
|
23337
23685
|
),
|
|
23338
|
-
!isLoading && filteredOptions.length > 0 && /* @__PURE__ */
|
|
23686
|
+
!isLoading && filteredOptions.length > 0 && /* @__PURE__ */ jsx131(AutoSizer5, { children: ({
|
|
23339
23687
|
height: height2,
|
|
23340
23688
|
width: width2
|
|
23341
|
-
}) => /* @__PURE__ */
|
|
23689
|
+
}) => /* @__PURE__ */ jsx131(
|
|
23342
23690
|
FixedSizeList3,
|
|
23343
23691
|
{
|
|
23344
23692
|
overscanCount: 3,
|
|
@@ -23371,7 +23719,7 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23371
23719
|
var AutocompleteList_default = AutocompleteList;
|
|
23372
23720
|
|
|
23373
23721
|
// src/components/input/autocomplete/Autocomplete.tsx
|
|
23374
|
-
import { Fragment as
|
|
23722
|
+
import { Fragment as Fragment32, jsx as jsx132, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
23375
23723
|
var MIN_AUTOCOMPLETE_WIDTH = "328px";
|
|
23376
23724
|
var Autocomplete = function Autocomplete2({
|
|
23377
23725
|
variant = "default",
|
|
@@ -23400,15 +23748,15 @@ var Autocomplete = function Autocomplete2({
|
|
|
23400
23748
|
onOpen = () => ({}),
|
|
23401
23749
|
disableClear
|
|
23402
23750
|
}) {
|
|
23403
|
-
const anchorRef =
|
|
23404
|
-
const inputRef =
|
|
23405
|
-
const [placeholder, setPlaceholder] =
|
|
23751
|
+
const anchorRef = React72.useRef(null);
|
|
23752
|
+
const inputRef = React72.useRef(null);
|
|
23753
|
+
const [placeholder, setPlaceholder] = React72.useState(
|
|
23406
23754
|
textFieldProps?.placeholder || ""
|
|
23407
23755
|
);
|
|
23408
|
-
const _renderLabel =
|
|
23409
|
-
const [inputValue, setInputValue] =
|
|
23410
|
-
const [isDirty, setDirty] =
|
|
23411
|
-
const getOptionsLabeled =
|
|
23756
|
+
const _renderLabel = React72.useCallback((id) => id, []);
|
|
23757
|
+
const [inputValue, setInputValue] = React72.useState("");
|
|
23758
|
+
const [isDirty, setDirty] = React72.useState(false);
|
|
23759
|
+
const getOptionsLabeled = React72.useCallback(
|
|
23412
23760
|
(options2, inputValue2 = "") => {
|
|
23413
23761
|
const searchValue = escapeRegExp2(inputValue2.trim());
|
|
23414
23762
|
const regExp = new RegExp(
|
|
@@ -23439,7 +23787,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23439
23787
|
renderLabel
|
|
23440
23788
|
]
|
|
23441
23789
|
);
|
|
23442
|
-
const getAllowFreeTextOption =
|
|
23790
|
+
const getAllowFreeTextOption = React72.useCallback(
|
|
23443
23791
|
(inputValue2) => {
|
|
23444
23792
|
if (allowFreeText) {
|
|
23445
23793
|
const freeOption = {
|
|
@@ -23457,27 +23805,27 @@ var Autocomplete = function Autocomplete2({
|
|
|
23457
23805
|
},
|
|
23458
23806
|
[_renderLabel, allowFreeText, options, renderLabel]
|
|
23459
23807
|
);
|
|
23460
|
-
const [filteredOptions, setFilteredOptions] =
|
|
23461
|
-
const virtualListRef =
|
|
23462
|
-
const [isOpenPopover, setOpenPopover] =
|
|
23808
|
+
const [filteredOptions, setFilteredOptions] = React72.useState(getOptionsLabeled([...options]));
|
|
23809
|
+
const virtualListRef = React72.createRef();
|
|
23810
|
+
const [isOpenPopover, setOpenPopover] = React72.useState(false);
|
|
23463
23811
|
const getSelectedIndexEmpty = () => multiple ? [] : void 0;
|
|
23464
|
-
const [selectedIndex, setSelectedIndex] =
|
|
23465
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
23466
|
-
|
|
23812
|
+
const [selectedIndex, setSelectedIndex] = React72.useState(getSelectedIndexEmpty());
|
|
23813
|
+
const [highlightedIndex, setHighlightedIndex] = React72.useState(-1);
|
|
23814
|
+
React72.useEffect(() => {
|
|
23467
23815
|
setFilteredOptions(getOptionsLabeled([...options]));
|
|
23468
23816
|
}, [options]);
|
|
23469
23817
|
const canAddValues = maxValues === void 0 || maxValues === 0 || !!multiple && Array.isArray(value) && value.length < maxValues;
|
|
23470
|
-
|
|
23818
|
+
React72.useEffect(() => {
|
|
23471
23819
|
if (disabled) {
|
|
23472
23820
|
setOpenPopover(false);
|
|
23473
23821
|
}
|
|
23474
23822
|
}, [disabled]);
|
|
23475
|
-
|
|
23823
|
+
React72.useEffect(() => {
|
|
23476
23824
|
if (!canAddValues && isOpenPopover) {
|
|
23477
23825
|
closePopover();
|
|
23478
23826
|
}
|
|
23479
23827
|
}, [canAddValues, isOpenPopover]);
|
|
23480
|
-
const getLastSelectedIndex =
|
|
23828
|
+
const getLastSelectedIndex = React72.useCallback(() => {
|
|
23481
23829
|
if (Array.isArray(selectedIndex) && selectedIndex.length > 0) {
|
|
23482
23830
|
return selectedIndex[selectedIndex.length - 1];
|
|
23483
23831
|
} else if (typeof selectedIndex === "number") {
|
|
@@ -23485,7 +23833,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23485
23833
|
}
|
|
23486
23834
|
return void 0;
|
|
23487
23835
|
}, [selectedIndex]);
|
|
23488
|
-
|
|
23836
|
+
React72.useEffect(() => {
|
|
23489
23837
|
if (isOpenPopover) {
|
|
23490
23838
|
if (highlightedIndex > -1) {
|
|
23491
23839
|
virtualListRef.current?.scrollToItem(highlightedIndex);
|
|
@@ -23687,8 +24035,8 @@ var Autocomplete = function Autocomplete2({
|
|
|
23687
24035
|
setNextIndexByValue(value2);
|
|
23688
24036
|
onChange && onChange(event, value2);
|
|
23689
24037
|
};
|
|
23690
|
-
return /* @__PURE__ */
|
|
23691
|
-
/* @__PURE__ */
|
|
24038
|
+
return /* @__PURE__ */ jsxs63(Fragment32, { children: [
|
|
24039
|
+
/* @__PURE__ */ jsx132(
|
|
23692
24040
|
AutocompleteInput_default,
|
|
23693
24041
|
{
|
|
23694
24042
|
inputRef,
|
|
@@ -23722,7 +24070,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23722
24070
|
onRemoveValue: onRemoveInputValue
|
|
23723
24071
|
}
|
|
23724
24072
|
),
|
|
23725
|
-
/* @__PURE__ */
|
|
24073
|
+
/* @__PURE__ */ jsx132(
|
|
23726
24074
|
AutocompleteList_default,
|
|
23727
24075
|
{
|
|
23728
24076
|
options,
|
|
@@ -23757,7 +24105,7 @@ function elementIsDescendantOrEqual(parent2, descendant) {
|
|
|
23757
24105
|
}
|
|
23758
24106
|
|
|
23759
24107
|
// src/components/input/TextEditor.tsx
|
|
23760
|
-
import
|
|
24108
|
+
import React75 from "react";
|
|
23761
24109
|
import { Editor } from "@tinymce/tinymce-react";
|
|
23762
24110
|
import "tinymce/tinymce";
|
|
23763
24111
|
import "tinymce/models/dom/model";
|
|
@@ -23778,16 +24126,16 @@ import "tinymce/plugins/wordcount";
|
|
|
23778
24126
|
import "tinymce/plugins/emoticons/js/emojis";
|
|
23779
24127
|
|
|
23780
24128
|
// src/components/input/CodeEditorPopup.tsx
|
|
23781
|
-
import
|
|
24129
|
+
import React74 from "react";
|
|
23782
24130
|
|
|
23783
24131
|
// src/components/input/CodeEditor.tsx
|
|
23784
|
-
import
|
|
24132
|
+
import React73 from "react";
|
|
23785
24133
|
import CodeMirror, {
|
|
23786
24134
|
EditorView
|
|
23787
24135
|
} from "@uiw/react-codemirror";
|
|
23788
24136
|
import { html } from "@codemirror/lang-html";
|
|
23789
24137
|
import { linter, lintGutter } from "@codemirror/lint";
|
|
23790
|
-
import { jsx as
|
|
24138
|
+
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
23791
24139
|
var removeFocusOutline = EditorView.baseTheme({
|
|
23792
24140
|
"&.cm-focused": {
|
|
23793
24141
|
outline: "none"
|
|
@@ -23809,7 +24157,7 @@ var CodeEditor = function CodeEditor2({
|
|
|
23809
24157
|
linter(linterOptions?.source || null, linterOptions?.config),
|
|
23810
24158
|
...extensions
|
|
23811
24159
|
] : extensions;
|
|
23812
|
-
return /* @__PURE__ */
|
|
24160
|
+
return /* @__PURE__ */ jsx133(
|
|
23813
24161
|
CodeMirror,
|
|
23814
24162
|
{
|
|
23815
24163
|
...rest,
|
|
@@ -23824,11 +24172,11 @@ var CodeEditor = function CodeEditor2({
|
|
|
23824
24172
|
}
|
|
23825
24173
|
);
|
|
23826
24174
|
};
|
|
23827
|
-
var CodeEditor_default =
|
|
24175
|
+
var CodeEditor_default = React73.forwardRef(CodeEditor);
|
|
23828
24176
|
|
|
23829
24177
|
// src/components/input/CodeEditorPopup.tsx
|
|
23830
24178
|
import format from "html-format";
|
|
23831
|
-
import { Fragment as
|
|
24179
|
+
import { Fragment as Fragment33, jsx as jsx134, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
23832
24180
|
var FORMAT_CHARACTERS_LINE = 120;
|
|
23833
24181
|
var FORMAT_NUMBER_SPACES_INDENTATION = 2;
|
|
23834
24182
|
var CodeEditorPopup = ({
|
|
@@ -23844,9 +24192,9 @@ var CodeEditorPopup = ({
|
|
|
23844
24192
|
onCancel
|
|
23845
24193
|
}) => {
|
|
23846
24194
|
const { t } = useTranslation();
|
|
23847
|
-
const [valueModified, setValueModified] =
|
|
23848
|
-
const [hasErrors, setHasErrors] =
|
|
23849
|
-
|
|
24195
|
+
const [valueModified, setValueModified] = React74.useState(value);
|
|
24196
|
+
const [hasErrors, setHasErrors] = React74.useState(false);
|
|
24197
|
+
React74.useEffect(() => {
|
|
23850
24198
|
if (open) {
|
|
23851
24199
|
setValueModified(value);
|
|
23852
24200
|
}
|
|
@@ -23871,8 +24219,8 @@ var CodeEditorPopup = ({
|
|
|
23871
24219
|
" ".repeat(FORMAT_NUMBER_SPACES_INDENTATION),
|
|
23872
24220
|
FORMAT_CHARACTERS_LINE
|
|
23873
24221
|
);
|
|
23874
|
-
return /* @__PURE__ */
|
|
23875
|
-
readonly && /* @__PURE__ */
|
|
24222
|
+
return /* @__PURE__ */ jsxs64(Fragment33, { children: [
|
|
24223
|
+
readonly && /* @__PURE__ */ jsx134(
|
|
23876
24224
|
Dialog_default,
|
|
23877
24225
|
{
|
|
23878
24226
|
open,
|
|
@@ -23883,7 +24231,7 @@ var CodeEditorPopup = ({
|
|
|
23883
24231
|
noPaddingTitle: false,
|
|
23884
24232
|
wrapChildren: false,
|
|
23885
24233
|
title: t("TEXT_EDITOR.SOURCE_CODE.TITLE"),
|
|
23886
|
-
children: /* @__PURE__ */
|
|
24234
|
+
children: /* @__PURE__ */ jsxs64(
|
|
23887
24235
|
Stack_default,
|
|
23888
24236
|
{
|
|
23889
24237
|
flexGrow: 1,
|
|
@@ -23891,13 +24239,13 @@ var CodeEditorPopup = ({
|
|
|
23891
24239
|
justifyContent: "space-between",
|
|
23892
24240
|
paddingTop: "20px",
|
|
23893
24241
|
children: [
|
|
23894
|
-
/* @__PURE__ */
|
|
24242
|
+
/* @__PURE__ */ jsx134(
|
|
23895
24243
|
Box_default2,
|
|
23896
24244
|
{
|
|
23897
24245
|
flexGrow: 1,
|
|
23898
24246
|
className: "Slim-Vertical-Scroll",
|
|
23899
24247
|
sx: { margin: "0", padding: "0" },
|
|
23900
|
-
children: /* @__PURE__ */
|
|
24248
|
+
children: /* @__PURE__ */ jsxs64(
|
|
23901
24249
|
Stack_default,
|
|
23902
24250
|
{
|
|
23903
24251
|
gap: "16px",
|
|
@@ -23908,7 +24256,7 @@ var CodeEditorPopup = ({
|
|
|
23908
24256
|
}
|
|
23909
24257
|
},
|
|
23910
24258
|
children: [
|
|
23911
|
-
/* @__PURE__ */
|
|
24259
|
+
/* @__PURE__ */ jsx134(Box_default2, { flexGrow: 1, minHeight: 0, children: /* @__PURE__ */ jsx134(
|
|
23912
24260
|
CodeEditor_default,
|
|
23913
24261
|
{
|
|
23914
24262
|
autoFocus: true,
|
|
@@ -23937,7 +24285,7 @@ var CodeEditorPopup = ({
|
|
|
23937
24285
|
}
|
|
23938
24286
|
) }),
|
|
23939
24287
|
messageNode,
|
|
23940
|
-
hasErrors && /* @__PURE__ */
|
|
24288
|
+
hasErrors && /* @__PURE__ */ jsx134(Alert_default, { severity: "info", children: t(
|
|
23941
24289
|
"TEXT_EDITOR.SOURCE_CODE.VALIDATION_ERRORS_FOUND"
|
|
23942
24290
|
) })
|
|
23943
24291
|
]
|
|
@@ -23945,13 +24293,13 @@ var CodeEditorPopup = ({
|
|
|
23945
24293
|
)
|
|
23946
24294
|
}
|
|
23947
24295
|
),
|
|
23948
|
-
/* @__PURE__ */
|
|
24296
|
+
/* @__PURE__ */ jsx134(
|
|
23949
24297
|
Box_default2,
|
|
23950
24298
|
{
|
|
23951
24299
|
sx: {
|
|
23952
24300
|
padding: "16px 24px 16px 24px"
|
|
23953
24301
|
},
|
|
23954
|
-
children: /* @__PURE__ */
|
|
24302
|
+
children: /* @__PURE__ */ jsx134(
|
|
23955
24303
|
Button_default,
|
|
23956
24304
|
{
|
|
23957
24305
|
text: t(
|
|
@@ -23968,7 +24316,7 @@ var CodeEditorPopup = ({
|
|
|
23968
24316
|
)
|
|
23969
24317
|
}
|
|
23970
24318
|
),
|
|
23971
|
-
!readonly && /* @__PURE__ */
|
|
24319
|
+
!readonly && /* @__PURE__ */ jsx134(
|
|
23972
24320
|
ConfirmationDialog_default,
|
|
23973
24321
|
{
|
|
23974
24322
|
fullScreen: true,
|
|
@@ -23976,7 +24324,7 @@ var CodeEditorPopup = ({
|
|
|
23976
24324
|
open,
|
|
23977
24325
|
onCancel: onCancelData,
|
|
23978
24326
|
onAccept: onAcceptData,
|
|
23979
|
-
children: /* @__PURE__ */
|
|
24327
|
+
children: /* @__PURE__ */ jsxs64(
|
|
23980
24328
|
Stack_default,
|
|
23981
24329
|
{
|
|
23982
24330
|
gap: "16px",
|
|
@@ -23987,7 +24335,7 @@ var CodeEditorPopup = ({
|
|
|
23987
24335
|
}
|
|
23988
24336
|
},
|
|
23989
24337
|
children: [
|
|
23990
|
-
codeEditorSubtitle && /* @__PURE__ */
|
|
24338
|
+
codeEditorSubtitle && /* @__PURE__ */ jsx134(Box_default2, { sx: { marginTop: "4px", marginBottom: "8px" }, children: /* @__PURE__ */ jsx134(
|
|
23991
24339
|
Typography_default,
|
|
23992
24340
|
{
|
|
23993
24341
|
variant: "body2",
|
|
@@ -23995,7 +24343,7 @@ var CodeEditorPopup = ({
|
|
|
23995
24343
|
children: codeEditorSubtitle
|
|
23996
24344
|
}
|
|
23997
24345
|
) }),
|
|
23998
|
-
/* @__PURE__ */
|
|
24346
|
+
/* @__PURE__ */ jsx134(Box_default2, { flexGrow: 1, minHeight: 0, children: /* @__PURE__ */ jsx134(
|
|
23999
24347
|
CodeEditor_default,
|
|
24000
24348
|
{
|
|
24001
24349
|
autoFocus: true,
|
|
@@ -24024,7 +24372,7 @@ var CodeEditorPopup = ({
|
|
|
24024
24372
|
}
|
|
24025
24373
|
) }),
|
|
24026
24374
|
messageNode,
|
|
24027
|
-
hasErrors && /* @__PURE__ */
|
|
24375
|
+
hasErrors && /* @__PURE__ */ jsx134(Alert_default, { severity: "info", children: t(
|
|
24028
24376
|
"TEXT_EDITOR.SOURCE_CODE.VALIDATION_ERRORS_FOUND"
|
|
24029
24377
|
) })
|
|
24030
24378
|
]
|
|
@@ -24037,7 +24385,7 @@ var CodeEditorPopup = ({
|
|
|
24037
24385
|
var CodeEditorPopup_default = CodeEditorPopup;
|
|
24038
24386
|
|
|
24039
24387
|
// src/components/input/TextEditor.tsx
|
|
24040
|
-
import { Fragment as
|
|
24388
|
+
import { Fragment as Fragment34, jsx as jsx135, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
24041
24389
|
var DEFAULT_TOOLBAR_INSERT_MENU_ITEMS = [
|
|
24042
24390
|
"link",
|
|
24043
24391
|
"image",
|
|
@@ -24076,15 +24424,15 @@ var TextEditor = function TextEditor2({
|
|
|
24076
24424
|
...rest
|
|
24077
24425
|
}) {
|
|
24078
24426
|
const { t } = useTranslation();
|
|
24079
|
-
const editorRef =
|
|
24080
|
-
const [internalValue] =
|
|
24427
|
+
const editorRef = React75.useRef(null);
|
|
24428
|
+
const [internalValue] = React75.useState(
|
|
24081
24429
|
initialValue ?? t("TEXT_EDITOR.INITIAL_VALUE")
|
|
24082
24430
|
);
|
|
24083
|
-
const [contentValue, setContentValue] =
|
|
24084
|
-
const [codeEditorChanges, setCodeEditorChanges] =
|
|
24085
|
-
const [isCodeEditorDirty, setIsCodeEditorDirty] =
|
|
24086
|
-
const [isCodeEditorOpened, setIsCodeEditorOpened] =
|
|
24087
|
-
const [isDirty, setIsDirty] =
|
|
24431
|
+
const [contentValue, setContentValue] = React75.useState("");
|
|
24432
|
+
const [codeEditorChanges, setCodeEditorChanges] = React75.useState("");
|
|
24433
|
+
const [isCodeEditorDirty, setIsCodeEditorDirty] = React75.useState(false);
|
|
24434
|
+
const [isCodeEditorOpened, setIsCodeEditorOpened] = React75.useState(false);
|
|
24435
|
+
const [isDirty, setIsDirty] = React75.useState(false);
|
|
24088
24436
|
const codeEditorButtonIndexToUse = codeEditorButtonIndex ?? customToolbarGroups.insert?.items?.length ?? DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.length;
|
|
24089
24437
|
const defaultToolbarInsertMenuItemsWithCodeEditor = DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.slice();
|
|
24090
24438
|
defaultToolbarInsertMenuItemsWithCodeEditor.splice(
|
|
@@ -24098,12 +24446,12 @@ var TextEditor = function TextEditor2({
|
|
|
24098
24446
|
0,
|
|
24099
24447
|
"cnCodeEditor"
|
|
24100
24448
|
);
|
|
24101
|
-
const onTextChange =
|
|
24449
|
+
const onTextChange = React75.useCallback(() => {
|
|
24102
24450
|
if (editorRef.current) {
|
|
24103
24451
|
onChange(editorRef.current?.getContent());
|
|
24104
24452
|
}
|
|
24105
24453
|
}, [onChange]);
|
|
24106
|
-
const onTextEditorDirty =
|
|
24454
|
+
const onTextEditorDirty = React75.useCallback(
|
|
24107
24455
|
(textEditorDirty) => {
|
|
24108
24456
|
editorRef.current?.setDirty(textEditorDirty);
|
|
24109
24457
|
setIsDirty(textEditorDirty);
|
|
@@ -24116,7 +24464,7 @@ var TextEditor = function TextEditor2({
|
|
|
24116
24464
|
},
|
|
24117
24465
|
[onDirty, onTextChange]
|
|
24118
24466
|
);
|
|
24119
|
-
|
|
24467
|
+
React75.useEffect(() => {
|
|
24120
24468
|
if (resetDirty && editorRef.current?.isDirty()) {
|
|
24121
24469
|
onTextEditorDirty(false);
|
|
24122
24470
|
}
|
|
@@ -24124,7 +24472,7 @@ var TextEditor = function TextEditor2({
|
|
|
24124
24472
|
onResetDirty();
|
|
24125
24473
|
}
|
|
24126
24474
|
}, [onResetDirty, onTextEditorDirty, resetDirty]);
|
|
24127
|
-
|
|
24475
|
+
React75.useEffect(() => {
|
|
24128
24476
|
if (newValue && editorRef.current) {
|
|
24129
24477
|
editorRef.current.setContent(newValue);
|
|
24130
24478
|
if (onNewValueSetter) {
|
|
@@ -24132,7 +24480,7 @@ var TextEditor = function TextEditor2({
|
|
|
24132
24480
|
}
|
|
24133
24481
|
}
|
|
24134
24482
|
}, [newValue, onNewValueSetter]);
|
|
24135
|
-
|
|
24483
|
+
React75.useEffect(() => {
|
|
24136
24484
|
if (forceCloseCodeEditor) {
|
|
24137
24485
|
setIsCodeEditorOpened(false);
|
|
24138
24486
|
if (onForceCloseCodeEditor) {
|
|
@@ -24323,8 +24671,8 @@ var TextEditor = function TextEditor2({
|
|
|
24323
24671
|
};
|
|
24324
24672
|
}
|
|
24325
24673
|
};
|
|
24326
|
-
return /* @__PURE__ */
|
|
24327
|
-
/* @__PURE__ */
|
|
24674
|
+
return /* @__PURE__ */ jsxs65(Fragment34, { children: [
|
|
24675
|
+
/* @__PURE__ */ jsx135(
|
|
24328
24676
|
Editor,
|
|
24329
24677
|
{
|
|
24330
24678
|
id,
|
|
@@ -24344,7 +24692,7 @@ var TextEditor = function TextEditor2({
|
|
|
24344
24692
|
...rest
|
|
24345
24693
|
}
|
|
24346
24694
|
),
|
|
24347
|
-
/* @__PURE__ */
|
|
24695
|
+
/* @__PURE__ */ jsx135(
|
|
24348
24696
|
CodeEditorPopup_default,
|
|
24349
24697
|
{
|
|
24350
24698
|
value: contentValue,
|
|
@@ -24379,10 +24727,10 @@ var TextEditor = function TextEditor2({
|
|
|
24379
24727
|
var TextEditor_default = TextEditor;
|
|
24380
24728
|
|
|
24381
24729
|
// src/components/input/PhoneField.tsx
|
|
24382
|
-
import * as
|
|
24383
|
-
import { Fragment as
|
|
24730
|
+
import * as React76 from "react";
|
|
24731
|
+
import { Fragment as Fragment35, jsx as jsx136, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
24384
24732
|
var maxPhoneLengthWithPrefix = 16;
|
|
24385
|
-
var PhoneField =
|
|
24733
|
+
var PhoneField = React76.forwardRef(function PhoneField2({
|
|
24386
24734
|
value,
|
|
24387
24735
|
onChange,
|
|
24388
24736
|
defaultCountryCode = "34",
|
|
@@ -24390,20 +24738,20 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24390
24738
|
codeSelectProps,
|
|
24391
24739
|
...rest
|
|
24392
24740
|
}, ref) {
|
|
24393
|
-
const [countryCode, setCountryCode] =
|
|
24394
|
-
const [textValue, setTextValue] =
|
|
24395
|
-
const countryCodeOptions =
|
|
24741
|
+
const [countryCode, setCountryCode] = React76.useState(defaultCountryCode);
|
|
24742
|
+
const [textValue, setTextValue] = React76.useState("");
|
|
24743
|
+
const countryCodeOptions = React76.useMemo(
|
|
24396
24744
|
() => allCountries.map((c) => ({
|
|
24397
24745
|
value: c.countryCode,
|
|
24398
24746
|
label: `+${c.countryCode} ${c.name}`
|
|
24399
24747
|
})),
|
|
24400
24748
|
[]
|
|
24401
24749
|
);
|
|
24402
|
-
const sanitizeTextValue =
|
|
24750
|
+
const sanitizeTextValue = React76.useCallback(
|
|
24403
24751
|
(value2) => value2.replace(/[^\d]/g, ""),
|
|
24404
24752
|
[]
|
|
24405
24753
|
);
|
|
24406
|
-
const onChangeText =
|
|
24754
|
+
const onChangeText = React76.useCallback(
|
|
24407
24755
|
(event) => {
|
|
24408
24756
|
const sanitizedTextValue = sanitizeTextValue(
|
|
24409
24757
|
event.target.value
|
|
@@ -24417,7 +24765,7 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24417
24765
|
},
|
|
24418
24766
|
[countryCode, onChange, sanitizeTextValue, textValue]
|
|
24419
24767
|
);
|
|
24420
|
-
const onChangeCountryCode =
|
|
24768
|
+
const onChangeCountryCode = React76.useCallback(
|
|
24421
24769
|
(countryCode2) => {
|
|
24422
24770
|
const sanitizedTextValue = sanitizeTextValue(textValue).substring(
|
|
24423
24771
|
0,
|
|
@@ -24433,7 +24781,7 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24433
24781
|
},
|
|
24434
24782
|
[onChange, sanitizeTextValue, textValue]
|
|
24435
24783
|
);
|
|
24436
|
-
|
|
24784
|
+
React76.useEffect(() => {
|
|
24437
24785
|
const countryCode2 = getCountryCode(value);
|
|
24438
24786
|
if (!countryCode2) {
|
|
24439
24787
|
setTextValue("");
|
|
@@ -24443,7 +24791,7 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24443
24791
|
setCountryCode(countryCode2);
|
|
24444
24792
|
setTextValue(phone);
|
|
24445
24793
|
}, [value]);
|
|
24446
|
-
const select = /* @__PURE__ */
|
|
24794
|
+
const select = /* @__PURE__ */ jsx136(
|
|
24447
24795
|
Select_default,
|
|
24448
24796
|
{
|
|
24449
24797
|
className: "Cn-PhoneField-countryCodeSelector",
|
|
@@ -24459,13 +24807,13 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24459
24807
|
}
|
|
24460
24808
|
}
|
|
24461
24809
|
);
|
|
24462
|
-
return /* @__PURE__ */
|
|
24810
|
+
return /* @__PURE__ */ jsx136(
|
|
24463
24811
|
TextField_default,
|
|
24464
24812
|
{
|
|
24465
24813
|
groupElements: true,
|
|
24466
24814
|
...rest,
|
|
24467
24815
|
className: `Cn-PhoneField ${className}`,
|
|
24468
|
-
startAdornment: /* @__PURE__ */
|
|
24816
|
+
startAdornment: /* @__PURE__ */ jsxs66(Fragment35, { children: [
|
|
24469
24817
|
rest.startAdornment,
|
|
24470
24818
|
select
|
|
24471
24819
|
] }),
|
|
@@ -24478,8 +24826,8 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24478
24826
|
var PhoneField_default = PhoneField;
|
|
24479
24827
|
|
|
24480
24828
|
// src/components/input/NumberField.tsx
|
|
24481
|
-
import * as
|
|
24482
|
-
import { jsx as
|
|
24829
|
+
import * as React77 from "react";
|
|
24830
|
+
import { jsx as jsx137, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
24483
24831
|
var setValueAndTriggerChangeEvent = (r2, value) => {
|
|
24484
24832
|
const propDescriptor = Object.getOwnPropertyDescriptor(
|
|
24485
24833
|
window["HTMLInputElement"].prototype,
|
|
@@ -24495,7 +24843,7 @@ var setValueAndTriggerChangeEvent = (r2, value) => {
|
|
|
24495
24843
|
r2.current.dispatchEvent(e);
|
|
24496
24844
|
}
|
|
24497
24845
|
};
|
|
24498
|
-
var NumberField =
|
|
24846
|
+
var NumberField = React77.forwardRef(function NumberField2({
|
|
24499
24847
|
value,
|
|
24500
24848
|
type = "integer",
|
|
24501
24849
|
onChange,
|
|
@@ -24511,16 +24859,16 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24511
24859
|
endAdornment,
|
|
24512
24860
|
...rest
|
|
24513
24861
|
}, ref) {
|
|
24514
|
-
const inputRef =
|
|
24515
|
-
const numberToString =
|
|
24862
|
+
const inputRef = React77.useRef(null);
|
|
24863
|
+
const numberToString = React77.useCallback(
|
|
24516
24864
|
(value2) => typeof value2 === "number" && !isNaN(value2) ? fractionDigits !== 0 ? value2.toFixed(fractionDigits) : value2.toString() : "",
|
|
24517
24865
|
[fractionDigits]
|
|
24518
24866
|
);
|
|
24519
|
-
const stringToNumber =
|
|
24867
|
+
const stringToNumber = React77.useCallback(
|
|
24520
24868
|
(value2) => !value2 || isNaN(+value2) ? null : +value2,
|
|
24521
24869
|
[]
|
|
24522
24870
|
);
|
|
24523
|
-
const sanitizeDecimalTextValue =
|
|
24871
|
+
const sanitizeDecimalTextValue = React77.useCallback(
|
|
24524
24872
|
(value2) => {
|
|
24525
24873
|
const negativeSign = value2.charAt(0) === "-" ? "-" : "";
|
|
24526
24874
|
const numbersAndDots = value2.replace(/[^\d.]/g, "");
|
|
@@ -24532,7 +24880,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24532
24880
|
},
|
|
24533
24881
|
[fractionDigits]
|
|
24534
24882
|
);
|
|
24535
|
-
const sanitizeIntegerTextValue =
|
|
24883
|
+
const sanitizeIntegerTextValue = React77.useCallback(
|
|
24536
24884
|
(value2) => {
|
|
24537
24885
|
const negativeSign = value2.charAt(0) === "-" ? "-" : "";
|
|
24538
24886
|
const numbers = value2.replace(/[^\d]/g, "");
|
|
@@ -24540,7 +24888,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24540
24888
|
},
|
|
24541
24889
|
[]
|
|
24542
24890
|
);
|
|
24543
|
-
const _onChange =
|
|
24891
|
+
const _onChange = React77.useCallback(
|
|
24544
24892
|
(event) => {
|
|
24545
24893
|
const sanitizedTextValue = type === "integer" ? sanitizeIntegerTextValue(event.target.value) : sanitizeDecimalTextValue(event.target.value);
|
|
24546
24894
|
let numericValue = stringToNumber(sanitizedTextValue);
|
|
@@ -24570,7 +24918,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24570
24918
|
numberToString
|
|
24571
24919
|
]
|
|
24572
24920
|
);
|
|
24573
|
-
const stepUp =
|
|
24921
|
+
const stepUp = React77.useCallback(() => {
|
|
24574
24922
|
if (typeof value === "number" && !isNaN(value)) {
|
|
24575
24923
|
setValueAndTriggerChangeEvent(
|
|
24576
24924
|
ref ?? inputRef,
|
|
@@ -24583,7 +24931,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24583
24931
|
);
|
|
24584
24932
|
}
|
|
24585
24933
|
}, [numberToString, ref, step, value]);
|
|
24586
|
-
const stepDown =
|
|
24934
|
+
const stepDown = React77.useCallback(() => {
|
|
24587
24935
|
if (typeof value === "number" && !isNaN(value)) {
|
|
24588
24936
|
setValueAndTriggerChangeEvent(
|
|
24589
24937
|
ref ?? inputRef,
|
|
@@ -24596,7 +24944,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24596
24944
|
);
|
|
24597
24945
|
}
|
|
24598
24946
|
}, [numberToString, ref, step, value]);
|
|
24599
|
-
const _onKeyDown =
|
|
24947
|
+
const _onKeyDown = React77.useCallback(
|
|
24600
24948
|
(event) => {
|
|
24601
24949
|
onKeyDown && onKeyDown(event);
|
|
24602
24950
|
if (step <= 0) {
|
|
@@ -24615,8 +24963,8 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24615
24963
|
},
|
|
24616
24964
|
[onKeyDown, step, stepDown, stepUp]
|
|
24617
24965
|
);
|
|
24618
|
-
const [textValue, setTextValue] =
|
|
24619
|
-
const _onBlur =
|
|
24966
|
+
const [textValue, setTextValue] = React77.useState(numberToString(value));
|
|
24967
|
+
const _onBlur = React77.useCallback(
|
|
24620
24968
|
(event) => {
|
|
24621
24969
|
onBlur && onBlur(event);
|
|
24622
24970
|
const text = numberToString(value);
|
|
@@ -24628,9 +24976,9 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24628
24976
|
);
|
|
24629
24977
|
const stepUpDisabled = typeof value !== "number" || typeof maxValue === "number" && value + step > maxValue;
|
|
24630
24978
|
const stepDownDisabled = typeof value !== "number" || typeof minValue === "number" && value - step < minValue;
|
|
24631
|
-
const _endAdornment = withStepperButtons ? /* @__PURE__ */
|
|
24979
|
+
const _endAdornment = withStepperButtons ? /* @__PURE__ */ jsxs67(Stack_default, { direction: "row", gap: "8px", children: [
|
|
24632
24980
|
endAdornment,
|
|
24633
|
-
/* @__PURE__ */
|
|
24981
|
+
/* @__PURE__ */ jsxs67(
|
|
24634
24982
|
Stack_default,
|
|
24635
24983
|
{
|
|
24636
24984
|
justifyContent: "center",
|
|
@@ -24642,12 +24990,12 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24642
24990
|
}
|
|
24643
24991
|
},
|
|
24644
24992
|
children: [
|
|
24645
|
-
/* @__PURE__ */
|
|
24993
|
+
/* @__PURE__ */ jsx137(
|
|
24646
24994
|
Tooltip_default,
|
|
24647
24995
|
{
|
|
24648
24996
|
title: stepUpDisabledTooltip && stepUpDisabled ? stepUpDisabledTooltip : "",
|
|
24649
24997
|
allowDisabled: true,
|
|
24650
|
-
children: /* @__PURE__ */
|
|
24998
|
+
children: /* @__PURE__ */ jsx137(
|
|
24651
24999
|
IconButton_default,
|
|
24652
25000
|
{
|
|
24653
25001
|
disabled: stepUpDisabled,
|
|
@@ -24658,12 +25006,12 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24658
25006
|
)
|
|
24659
25007
|
}
|
|
24660
25008
|
),
|
|
24661
|
-
/* @__PURE__ */
|
|
25009
|
+
/* @__PURE__ */ jsx137(
|
|
24662
25010
|
Tooltip_default,
|
|
24663
25011
|
{
|
|
24664
25012
|
title: stepDownDisabledTooltip && stepDownDisabled ? stepDownDisabledTooltip : "",
|
|
24665
25013
|
allowDisabled: true,
|
|
24666
|
-
children: /* @__PURE__ */
|
|
25014
|
+
children: /* @__PURE__ */ jsx137(
|
|
24667
25015
|
IconButton_default,
|
|
24668
25016
|
{
|
|
24669
25017
|
disabled: stepDownDisabled,
|
|
@@ -24678,12 +25026,12 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24678
25026
|
}
|
|
24679
25027
|
)
|
|
24680
25028
|
] }) : endAdornment;
|
|
24681
|
-
|
|
25029
|
+
React77.useEffect(() => {
|
|
24682
25030
|
if (stringToNumber(textValue) !== value) {
|
|
24683
25031
|
setTextValue(numberToString(value));
|
|
24684
25032
|
}
|
|
24685
25033
|
}, [numberToString, stringToNumber, textValue, value]);
|
|
24686
|
-
return /* @__PURE__ */
|
|
25034
|
+
return /* @__PURE__ */ jsx137(
|
|
24687
25035
|
TextField_default,
|
|
24688
25036
|
{
|
|
24689
25037
|
...rest,
|
|
@@ -24699,13 +25047,13 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24699
25047
|
var NumberField_default = NumberField;
|
|
24700
25048
|
|
|
24701
25049
|
// src/components/input/DatePicker.tsx
|
|
24702
|
-
import * as
|
|
25050
|
+
import * as React79 from "react";
|
|
24703
25051
|
import { tz as tz8 } from "moment-timezone";
|
|
24704
25052
|
|
|
24705
25053
|
// src/components/input/DatePickerStatic.tsx
|
|
24706
|
-
import * as
|
|
25054
|
+
import * as React78 from "react";
|
|
24707
25055
|
import { tz as tz7 } from "moment-timezone";
|
|
24708
|
-
import { jsx as
|
|
25056
|
+
import { jsx as jsx138, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
24709
25057
|
var minYear = 1900;
|
|
24710
25058
|
var maxYear = 2100;
|
|
24711
25059
|
var DatePickerStatic = ({
|
|
@@ -24714,13 +25062,13 @@ var DatePickerStatic = ({
|
|
|
24714
25062
|
minDate,
|
|
24715
25063
|
maxDate
|
|
24716
25064
|
}) => {
|
|
24717
|
-
const { timezone } =
|
|
24718
|
-
const [selectedDateParts, setSelectedDateParts] =
|
|
24719
|
-
const [visibleMonth, setVisibleMonth] =
|
|
25065
|
+
const { timezone } = React78.useContext(IntlContext);
|
|
25066
|
+
const [selectedDateParts, setSelectedDateParts] = React78.useState(void 0);
|
|
25067
|
+
const [visibleMonth, setVisibleMonth] = React78.useState({
|
|
24720
25068
|
year: minYear,
|
|
24721
25069
|
month: 0
|
|
24722
25070
|
});
|
|
24723
|
-
|
|
25071
|
+
React78.useEffect(() => {
|
|
24724
25072
|
if (selectedDateParts) {
|
|
24725
25073
|
setVisibleMonth({
|
|
24726
25074
|
year: selectedDateParts.year,
|
|
@@ -24734,7 +25082,7 @@ var DatePickerStatic = ({
|
|
|
24734
25082
|
});
|
|
24735
25083
|
}
|
|
24736
25084
|
}, [selectedDateParts, timezone]);
|
|
24737
|
-
|
|
25085
|
+
React78.useEffect(() => {
|
|
24738
25086
|
if (!value || isNaN(value.getTime())) {
|
|
24739
25087
|
setSelectedDateParts(void 0);
|
|
24740
25088
|
return;
|
|
@@ -24756,25 +25104,25 @@ var DatePickerStatic = ({
|
|
|
24756
25104
|
const endYear = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getFullYear() : maxYear;
|
|
24757
25105
|
const startMonth = minDate && !isNaN(minDate.getTime()) ? minDate.getMonth() : 0;
|
|
24758
25106
|
const endMonth = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getMonth() : 11;
|
|
24759
|
-
const options =
|
|
25107
|
+
const options = React78.useMemo(
|
|
24760
25108
|
() => Array.from(Array(endYear - startYear + 1)).map((_, i) => ({
|
|
24761
25109
|
value: startYear + i
|
|
24762
25110
|
})),
|
|
24763
25111
|
[endYear, startYear]
|
|
24764
25112
|
);
|
|
24765
|
-
const navigatePreviousMonth =
|
|
25113
|
+
const navigatePreviousMonth = React78.useCallback(() => {
|
|
24766
25114
|
setVisibleMonth({
|
|
24767
25115
|
month: visibleMonth.month === 0 ? 11 : visibleMonth.month - 1,
|
|
24768
25116
|
year: visibleMonth.month === 0 ? visibleMonth.year - 1 : visibleMonth.year
|
|
24769
25117
|
});
|
|
24770
25118
|
}, [visibleMonth]);
|
|
24771
|
-
const navigateNextMonth =
|
|
25119
|
+
const navigateNextMonth = React78.useCallback(() => {
|
|
24772
25120
|
setVisibleMonth({
|
|
24773
25121
|
month: visibleMonth.month === 11 ? 0 : visibleMonth.month + 1,
|
|
24774
25122
|
year: visibleMonth.month === 11 ? visibleMonth.year + 1 : visibleMonth.year
|
|
24775
25123
|
});
|
|
24776
25124
|
}, [visibleMonth]);
|
|
24777
|
-
const onChangeYear =
|
|
25125
|
+
const onChangeYear = React78.useCallback(
|
|
24778
25126
|
(value2) => {
|
|
24779
25127
|
const month = value2 === startYear ? Math.max(startMonth, visibleMonth.month) : value2 === endYear ? Math.min(endMonth, visibleMonth.month) : visibleMonth.month;
|
|
24780
25128
|
setVisibleMonth({
|
|
@@ -24784,17 +25132,17 @@ var DatePickerStatic = ({
|
|
|
24784
25132
|
},
|
|
24785
25133
|
[endMonth, endYear, startMonth, startYear, visibleMonth.month]
|
|
24786
25134
|
);
|
|
24787
|
-
const minSimpleDate =
|
|
25135
|
+
const minSimpleDate = React78.useMemo(
|
|
24788
25136
|
() => dateToSimpleDate(minDate, timezone),
|
|
24789
25137
|
[minDate, timezone]
|
|
24790
25138
|
);
|
|
24791
|
-
const maxSimpleDate =
|
|
25139
|
+
const maxSimpleDate = React78.useMemo(
|
|
24792
25140
|
() => dateToSimpleDate(maxDate, timezone),
|
|
24793
25141
|
[maxDate, timezone]
|
|
24794
25142
|
);
|
|
24795
25143
|
const isDisabledPreviousMonth = visibleMonth.year < startYear || visibleMonth.year === startYear && visibleMonth.month <= startMonth;
|
|
24796
25144
|
const isDisabledNextMonth = visibleMonth.year > endYear || visibleMonth.year === endYear && visibleMonth.month >= endMonth;
|
|
24797
|
-
return /* @__PURE__ */
|
|
25145
|
+
return /* @__PURE__ */ jsxs68(
|
|
24798
25146
|
Stack_default,
|
|
24799
25147
|
{
|
|
24800
25148
|
sx: {
|
|
@@ -24803,7 +25151,7 @@ var DatePickerStatic = ({
|
|
|
24803
25151
|
boxSizing: "border-box"
|
|
24804
25152
|
},
|
|
24805
25153
|
children: [
|
|
24806
|
-
/* @__PURE__ */
|
|
25154
|
+
/* @__PURE__ */ jsxs68(
|
|
24807
25155
|
Stack_default,
|
|
24808
25156
|
{
|
|
24809
25157
|
direction: "row",
|
|
@@ -24813,7 +25161,7 @@ var DatePickerStatic = ({
|
|
|
24813
25161
|
spacing: 2,
|
|
24814
25162
|
justifyContent: "space-between",
|
|
24815
25163
|
children: [
|
|
24816
|
-
/* @__PURE__ */
|
|
25164
|
+
/* @__PURE__ */ jsx138(
|
|
24817
25165
|
Select_default,
|
|
24818
25166
|
{
|
|
24819
25167
|
value: visibleMonth.year,
|
|
@@ -24821,8 +25169,8 @@ var DatePickerStatic = ({
|
|
|
24821
25169
|
onChange: onChangeYear
|
|
24822
25170
|
}
|
|
24823
25171
|
),
|
|
24824
|
-
/* @__PURE__ */
|
|
24825
|
-
/* @__PURE__ */
|
|
25172
|
+
/* @__PURE__ */ jsxs68(Stack_default, { direction: "row", spacing: 2, children: [
|
|
25173
|
+
/* @__PURE__ */ jsx138(
|
|
24826
25174
|
IconButton_default,
|
|
24827
25175
|
{
|
|
24828
25176
|
disabled: isDisabledPreviousMonth,
|
|
@@ -24830,7 +25178,7 @@ var DatePickerStatic = ({
|
|
|
24830
25178
|
onClick: navigatePreviousMonth
|
|
24831
25179
|
}
|
|
24832
25180
|
),
|
|
24833
|
-
/* @__PURE__ */
|
|
25181
|
+
/* @__PURE__ */ jsx138(
|
|
24834
25182
|
IconButton_default,
|
|
24835
25183
|
{
|
|
24836
25184
|
disabled: isDisabledNextMonth,
|
|
@@ -24842,8 +25190,8 @@ var DatePickerStatic = ({
|
|
|
24842
25190
|
]
|
|
24843
25191
|
}
|
|
24844
25192
|
),
|
|
24845
|
-
/* @__PURE__ */
|
|
24846
|
-
/* @__PURE__ */
|
|
25193
|
+
/* @__PURE__ */ jsx138(DaysOfWeekRow_default, {}),
|
|
25194
|
+
/* @__PURE__ */ jsx138(Box_default2, { sx: { padding: "8px" }, children: /* @__PURE__ */ jsx138(
|
|
24847
25195
|
CalendarMonth_default,
|
|
24848
25196
|
{
|
|
24849
25197
|
allowKeyboardNavigation: true,
|
|
@@ -24880,14 +25228,14 @@ var DatePickerStatic = ({
|
|
|
24880
25228
|
var DatePickerStatic_default = DatePickerStatic;
|
|
24881
25229
|
|
|
24882
25230
|
// src/components/input/DatePickerPopover.tsx
|
|
24883
|
-
import { jsx as
|
|
25231
|
+
import { jsx as jsx139 } from "react/jsx-runtime";
|
|
24884
25232
|
var DatePickerPopover = ({
|
|
24885
25233
|
value,
|
|
24886
25234
|
onSelect,
|
|
24887
25235
|
minDate,
|
|
24888
25236
|
maxDate,
|
|
24889
25237
|
...rest
|
|
24890
|
-
}) => /* @__PURE__ */
|
|
25238
|
+
}) => /* @__PURE__ */ jsx139(Popover_default, { anchorHorizontalOrigin: "right", horizontalAlign: "right", ...rest, children: /* @__PURE__ */ jsx139(
|
|
24891
25239
|
DatePickerStatic_default,
|
|
24892
25240
|
{
|
|
24893
25241
|
value,
|
|
@@ -24899,19 +25247,19 @@ var DatePickerPopover = ({
|
|
|
24899
25247
|
var DatePickerPopover_default = DatePickerPopover;
|
|
24900
25248
|
|
|
24901
25249
|
// src/components/input/DatePicker.tsx
|
|
24902
|
-
import { Fragment as
|
|
24903
|
-
var DatePicker =
|
|
25250
|
+
import { Fragment as Fragment36, jsx as jsx140, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
25251
|
+
var DatePicker = React79.forwardRef(
|
|
24904
25252
|
function DatePicker2({ value, onChange, onBlur, onKeyDown, minDate, maxDate, ...rest }, ref) {
|
|
24905
|
-
const { locale, timezone } =
|
|
25253
|
+
const { locale, timezone } = React79.useContext(IntlContext);
|
|
24906
25254
|
const dateInputFormat = getDateInputFormatForLocale(locale);
|
|
24907
25255
|
const { t } = useTranslation();
|
|
24908
|
-
const dateInputFormatPlaceholder =
|
|
25256
|
+
const dateInputFormatPlaceholder = React79.useMemo(
|
|
24909
25257
|
() => dateInputFormat.replace(/Y/g, t("DATE_COMPONENTS.YEAR_LETTER")).replace(/M/g, t("DATE_COMPONENTS.MONTH_LETTER")).replace(/D/g, t("DATE_COMPONENTS.DAY_LETTER")),
|
|
24910
25258
|
[dateInputFormat, t]
|
|
24911
25259
|
);
|
|
24912
|
-
const _containerRef =
|
|
24913
|
-
const [isPopoverOpen, setPopoverOpen] =
|
|
24914
|
-
const [textValue, setTextValue] =
|
|
25260
|
+
const _containerRef = React79.useRef(null);
|
|
25261
|
+
const [isPopoverOpen, setPopoverOpen] = React79.useState(false);
|
|
25262
|
+
const [textValue, setTextValue] = React79.useState("");
|
|
24915
25263
|
let anchorEl = null;
|
|
24916
25264
|
if (isPopoverOpen) {
|
|
24917
25265
|
if (rest.containerRef && typeof rest.containerRef === "object" && rest.containerRef.current) {
|
|
@@ -24920,21 +25268,21 @@ var DatePicker = React77.forwardRef(
|
|
|
24920
25268
|
anchorEl = _containerRef.current;
|
|
24921
25269
|
}
|
|
24922
25270
|
}
|
|
24923
|
-
const isValidDate =
|
|
25271
|
+
const isValidDate = React79.useCallback(
|
|
24924
25272
|
(dateString) => {
|
|
24925
25273
|
const date = parseDateForLocale(dateString, locale, timezone);
|
|
24926
25274
|
return !isNaN(date.getTime()) && (!minDate || date >= minDate) && (!maxDate || date <= maxDate);
|
|
24927
25275
|
},
|
|
24928
25276
|
[locale, maxDate, minDate, timezone]
|
|
24929
25277
|
);
|
|
24930
|
-
const onSelect =
|
|
25278
|
+
const onSelect = React79.useCallback(
|
|
24931
25279
|
(date) => {
|
|
24932
25280
|
setPopoverOpen(false);
|
|
24933
25281
|
onChange && onChange(date);
|
|
24934
25282
|
},
|
|
24935
25283
|
[onChange]
|
|
24936
25284
|
);
|
|
24937
|
-
const onChangeTextField =
|
|
25285
|
+
const onChangeTextField = React79.useCallback(
|
|
24938
25286
|
(event) => {
|
|
24939
25287
|
setTextValue(event.target.value);
|
|
24940
25288
|
if (!event.target.value && value) {
|
|
@@ -24953,7 +25301,7 @@ var DatePicker = React77.forwardRef(
|
|
|
24953
25301
|
},
|
|
24954
25302
|
[isValidDate, locale, onChange, timezone, value]
|
|
24955
25303
|
);
|
|
24956
|
-
const onBlurTextField =
|
|
25304
|
+
const onBlurTextField = React79.useCallback(
|
|
24957
25305
|
(event) => {
|
|
24958
25306
|
if (!isValidDate(event.target.value)) {
|
|
24959
25307
|
value ? onChange && onChange(null) : setTextValue("");
|
|
@@ -24962,7 +25310,7 @@ var DatePicker = React77.forwardRef(
|
|
|
24962
25310
|
},
|
|
24963
25311
|
[isValidDate, onChange, onBlur, value]
|
|
24964
25312
|
);
|
|
24965
|
-
const onKeyDownTextField =
|
|
25313
|
+
const onKeyDownTextField = React79.useCallback(
|
|
24966
25314
|
(event) => {
|
|
24967
25315
|
if (event.key === "ArrowDown") {
|
|
24968
25316
|
setPopoverOpen(true);
|
|
@@ -24971,12 +25319,12 @@ var DatePicker = React77.forwardRef(
|
|
|
24971
25319
|
},
|
|
24972
25320
|
[onKeyDown]
|
|
24973
25321
|
);
|
|
24974
|
-
|
|
25322
|
+
React79.useEffect(() => {
|
|
24975
25323
|
const text = value && !isNaN(value.getTime()) ? tz8(value, timezone).format(dateInputFormat) : "";
|
|
24976
25324
|
setTextValue(text);
|
|
24977
25325
|
}, [dateInputFormat, timezone, value]);
|
|
24978
|
-
return /* @__PURE__ */
|
|
24979
|
-
/* @__PURE__ */
|
|
25326
|
+
return /* @__PURE__ */ jsxs69(Fragment36, { children: [
|
|
25327
|
+
/* @__PURE__ */ jsx140(
|
|
24980
25328
|
TextField_default,
|
|
24981
25329
|
{
|
|
24982
25330
|
ref,
|
|
@@ -24987,7 +25335,7 @@ var DatePicker = React77.forwardRef(
|
|
|
24987
25335
|
onChange: onChangeTextField,
|
|
24988
25336
|
onBlur: onBlurTextField,
|
|
24989
25337
|
onKeyDown: onKeyDownTextField,
|
|
24990
|
-
endAdornment: /* @__PURE__ */
|
|
25338
|
+
endAdornment: /* @__PURE__ */ jsx140(
|
|
24991
25339
|
IconButton_default,
|
|
24992
25340
|
{
|
|
24993
25341
|
"data-testid": "date-picker-open-button",
|
|
@@ -24999,7 +25347,7 @@ var DatePicker = React77.forwardRef(
|
|
|
24999
25347
|
)
|
|
25000
25348
|
}
|
|
25001
25349
|
),
|
|
25002
|
-
/* @__PURE__ */
|
|
25350
|
+
/* @__PURE__ */ jsx140(
|
|
25003
25351
|
DatePickerPopover_default,
|
|
25004
25352
|
{
|
|
25005
25353
|
anchorEl,
|
|
@@ -25018,14 +25366,14 @@ var DatePicker_default = DatePicker;
|
|
|
25018
25366
|
// src/components/input/Checkbox.tsx
|
|
25019
25367
|
import MuiCheckbox from "@mui/material/Checkbox";
|
|
25020
25368
|
import { FormControlLabel, FormGroup } from "@mui/material";
|
|
25021
|
-
import { Fragment as
|
|
25369
|
+
import { Fragment as Fragment37, jsx as jsx141, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
25022
25370
|
var MaterialCheckbox = ({
|
|
25023
25371
|
checked,
|
|
25024
25372
|
disabled,
|
|
25025
25373
|
inputClass,
|
|
25026
25374
|
indeterminate,
|
|
25027
25375
|
onChange
|
|
25028
|
-
}) => /* @__PURE__ */
|
|
25376
|
+
}) => /* @__PURE__ */ jsx141(
|
|
25029
25377
|
MuiCheckbox,
|
|
25030
25378
|
{
|
|
25031
25379
|
disabled,
|
|
@@ -25051,8 +25399,8 @@ var Checkbox = ({
|
|
|
25051
25399
|
inputClass,
|
|
25052
25400
|
onChange,
|
|
25053
25401
|
tabIndex
|
|
25054
|
-
}) => /* @__PURE__ */
|
|
25055
|
-
!label && /* @__PURE__ */
|
|
25402
|
+
}) => /* @__PURE__ */ jsxs70(Fragment37, { children: [
|
|
25403
|
+
!label && /* @__PURE__ */ jsx141(
|
|
25056
25404
|
MaterialCheckbox,
|
|
25057
25405
|
{
|
|
25058
25406
|
disabled,
|
|
@@ -25063,11 +25411,11 @@ var Checkbox = ({
|
|
|
25063
25411
|
inputClass
|
|
25064
25412
|
}
|
|
25065
25413
|
),
|
|
25066
|
-
label && /* @__PURE__ */
|
|
25414
|
+
label && /* @__PURE__ */ jsx141(FormGroup, { children: /* @__PURE__ */ jsx141(
|
|
25067
25415
|
FormControlLabel,
|
|
25068
25416
|
{
|
|
25069
25417
|
value: label,
|
|
25070
|
-
control: /* @__PURE__ */
|
|
25418
|
+
control: /* @__PURE__ */ jsx141(
|
|
25071
25419
|
MaterialCheckbox,
|
|
25072
25420
|
{
|
|
25073
25421
|
disabled,
|
|
@@ -25078,7 +25426,7 @@ var Checkbox = ({
|
|
|
25078
25426
|
inputClass
|
|
25079
25427
|
}
|
|
25080
25428
|
),
|
|
25081
|
-
label: /* @__PURE__ */
|
|
25429
|
+
label: /* @__PURE__ */ jsx141(Typography_default, { variant: "body2", children: label }),
|
|
25082
25430
|
labelPlacement,
|
|
25083
25431
|
sx: {
|
|
25084
25432
|
margin: 0,
|
|
@@ -25090,11 +25438,11 @@ var Checkbox = ({
|
|
|
25090
25438
|
var Checkbox_default = Checkbox;
|
|
25091
25439
|
|
|
25092
25440
|
// src/components/input/Radio.tsx
|
|
25093
|
-
import * as
|
|
25441
|
+
import * as React80 from "react";
|
|
25094
25442
|
import MuiRadio from "@mui/material/Radio";
|
|
25095
25443
|
import { FormControlLabel as FormControlLabel2 } from "@mui/material";
|
|
25096
|
-
import { Fragment as
|
|
25097
|
-
var Radio =
|
|
25444
|
+
import { Fragment as Fragment38, jsx as jsx142, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
25445
|
+
var Radio = React80.forwardRef(function Radio2({
|
|
25098
25446
|
label,
|
|
25099
25447
|
labelPlacement = "end",
|
|
25100
25448
|
onChange,
|
|
@@ -25105,13 +25453,13 @@ var Radio = React78.forwardRef(function Radio2({
|
|
|
25105
25453
|
size = "M",
|
|
25106
25454
|
...rest
|
|
25107
25455
|
}, ref) {
|
|
25108
|
-
const _onChange =
|
|
25456
|
+
const _onChange = React80.useCallback(
|
|
25109
25457
|
(event) => {
|
|
25110
25458
|
onChange && onChange(event, event.target.value);
|
|
25111
25459
|
},
|
|
25112
25460
|
[onChange]
|
|
25113
25461
|
);
|
|
25114
|
-
const radio = /* @__PURE__ */
|
|
25462
|
+
const radio = /* @__PURE__ */ jsx142(
|
|
25115
25463
|
MuiRadio,
|
|
25116
25464
|
{
|
|
25117
25465
|
className: `Cn-Radio ${className}`,
|
|
@@ -25130,13 +25478,13 @@ var Radio = React78.forwardRef(function Radio2({
|
|
|
25130
25478
|
size: size === "S" ? "small" : "medium"
|
|
25131
25479
|
}
|
|
25132
25480
|
);
|
|
25133
|
-
return /* @__PURE__ */
|
|
25481
|
+
return /* @__PURE__ */ jsxs71(Fragment38, { children: [
|
|
25134
25482
|
!label && radio,
|
|
25135
|
-
label && /* @__PURE__ */
|
|
25483
|
+
label && /* @__PURE__ */ jsx142(
|
|
25136
25484
|
FormControlLabel2,
|
|
25137
25485
|
{
|
|
25138
25486
|
control: radio,
|
|
25139
|
-
label: /* @__PURE__ */
|
|
25487
|
+
label: /* @__PURE__ */ jsx142(Typography_default, { variant: "body2", children: label }),
|
|
25140
25488
|
labelPlacement,
|
|
25141
25489
|
sx: {
|
|
25142
25490
|
margin: 0,
|
|
@@ -25149,8 +25497,8 @@ var Radio = React78.forwardRef(function Radio2({
|
|
|
25149
25497
|
var Radio_default = Radio;
|
|
25150
25498
|
|
|
25151
25499
|
// src/components/input/PageSelector.tsx
|
|
25152
|
-
import * as
|
|
25153
|
-
import { jsx as
|
|
25500
|
+
import * as React81 from "react";
|
|
25501
|
+
import { jsx as jsx143, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
25154
25502
|
var PageSelector = ({
|
|
25155
25503
|
currentPage,
|
|
25156
25504
|
pageSize,
|
|
@@ -25158,17 +25506,17 @@ var PageSelector = ({
|
|
|
25158
25506
|
text,
|
|
25159
25507
|
onPageChange
|
|
25160
25508
|
}) => {
|
|
25161
|
-
const handlePrevious =
|
|
25509
|
+
const handlePrevious = React81.useCallback(() => {
|
|
25162
25510
|
if (currentPage > 1) {
|
|
25163
25511
|
onPageChange(Math.max(1, currentPage - 1));
|
|
25164
25512
|
}
|
|
25165
25513
|
}, [currentPage, onPageChange]);
|
|
25166
|
-
const handleNext =
|
|
25514
|
+
const handleNext = React81.useCallback(() => {
|
|
25167
25515
|
onPageChange(
|
|
25168
25516
|
Math.min(Math.ceil(totalItems / pageSize), currentPage + 1)
|
|
25169
25517
|
);
|
|
25170
25518
|
}, [currentPage, onPageChange, pageSize, totalItems]);
|
|
25171
|
-
return /* @__PURE__ */
|
|
25519
|
+
return /* @__PURE__ */ jsxs72(
|
|
25172
25520
|
Stack_default,
|
|
25173
25521
|
{
|
|
25174
25522
|
direction: "row",
|
|
@@ -25177,7 +25525,7 @@ var PageSelector = ({
|
|
|
25177
25525
|
justifyContent: "flex-end",
|
|
25178
25526
|
flexGrow: 1,
|
|
25179
25527
|
children: [
|
|
25180
|
-
text && /* @__PURE__ */
|
|
25528
|
+
text && /* @__PURE__ */ jsx143(Typography_default, { variant: "body2", children: /* @__PURE__ */ jsx143(
|
|
25181
25529
|
"div",
|
|
25182
25530
|
{
|
|
25183
25531
|
dangerouslySetInnerHTML: {
|
|
@@ -25185,8 +25533,8 @@ var PageSelector = ({
|
|
|
25185
25533
|
}
|
|
25186
25534
|
}
|
|
25187
25535
|
) }),
|
|
25188
|
-
/* @__PURE__ */
|
|
25189
|
-
/* @__PURE__ */
|
|
25536
|
+
/* @__PURE__ */ jsxs72(Stack_default, { direction: "row", alignItems: "center", children: [
|
|
25537
|
+
/* @__PURE__ */ jsx143(
|
|
25190
25538
|
IconButton_default,
|
|
25191
25539
|
{
|
|
25192
25540
|
iconId: "chevron-left",
|
|
@@ -25194,7 +25542,7 @@ var PageSelector = ({
|
|
|
25194
25542
|
disabled: currentPage <= 1
|
|
25195
25543
|
}
|
|
25196
25544
|
),
|
|
25197
|
-
/* @__PURE__ */
|
|
25545
|
+
/* @__PURE__ */ jsx143(
|
|
25198
25546
|
NumberField_default,
|
|
25199
25547
|
{
|
|
25200
25548
|
value: currentPage,
|
|
@@ -25212,7 +25560,7 @@ var PageSelector = ({
|
|
|
25212
25560
|
}
|
|
25213
25561
|
}
|
|
25214
25562
|
),
|
|
25215
|
-
/* @__PURE__ */
|
|
25563
|
+
/* @__PURE__ */ jsx143(
|
|
25216
25564
|
IconButton_default,
|
|
25217
25565
|
{
|
|
25218
25566
|
iconId: "chevron-right",
|
|
@@ -25232,13 +25580,13 @@ import Fade from "@mui/material/Fade";
|
|
|
25232
25580
|
|
|
25233
25581
|
// src/components/progress/LinearProgress.tsx
|
|
25234
25582
|
import MuiLinearProgress from "@mui/material/LinearProgress";
|
|
25235
|
-
import { jsx as
|
|
25583
|
+
import { jsx as jsx144 } from "react/jsx-runtime";
|
|
25236
25584
|
var LinearProgress = ({
|
|
25237
25585
|
color: color2,
|
|
25238
25586
|
backgroundColor: backgroundColor2,
|
|
25239
25587
|
variant = "indeterminate",
|
|
25240
25588
|
...rest
|
|
25241
|
-
}) => /* @__PURE__ */
|
|
25589
|
+
}) => /* @__PURE__ */ jsx144(
|
|
25242
25590
|
MuiLinearProgress,
|
|
25243
25591
|
{
|
|
25244
25592
|
...rest,
|
|
@@ -25261,11 +25609,11 @@ var LinearProgress = ({
|
|
|
25261
25609
|
var LinearProgress_default = LinearProgress;
|
|
25262
25610
|
|
|
25263
25611
|
// src/components/progress/CircularProgress.tsx
|
|
25264
|
-
import * as
|
|
25612
|
+
import * as React82 from "react";
|
|
25265
25613
|
import MuiCircularProgress from "@mui/material/CircularProgress";
|
|
25266
25614
|
import Typography3 from "@mui/material/Typography";
|
|
25267
25615
|
import Box4 from "@mui/material/Box";
|
|
25268
|
-
import { jsx as
|
|
25616
|
+
import { jsx as jsx145, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
25269
25617
|
var circularSizes = {
|
|
25270
25618
|
XS: "20px",
|
|
25271
25619
|
SM: "24px",
|
|
@@ -25287,10 +25635,10 @@ var CircularProgress = ({
|
|
|
25287
25635
|
typographyColor = black,
|
|
25288
25636
|
gradientColors
|
|
25289
25637
|
}) => {
|
|
25290
|
-
const gradientName =
|
|
25638
|
+
const gradientName = React82.useRef(
|
|
25291
25639
|
gradientColors ? crypto.randomUUID() : void 0
|
|
25292
25640
|
);
|
|
25293
|
-
return /* @__PURE__ */
|
|
25641
|
+
return /* @__PURE__ */ jsxs73(
|
|
25294
25642
|
Box4,
|
|
25295
25643
|
{
|
|
25296
25644
|
sx: {
|
|
@@ -25304,7 +25652,7 @@ var CircularProgress = ({
|
|
|
25304
25652
|
}
|
|
25305
25653
|
},
|
|
25306
25654
|
children: [
|
|
25307
|
-
gradientColors && /* @__PURE__ */
|
|
25655
|
+
gradientColors && /* @__PURE__ */ jsx145("svg", { width: 0, height: 0, children: /* @__PURE__ */ jsx145("defs", { children: /* @__PURE__ */ jsxs73(
|
|
25308
25656
|
"linearGradient",
|
|
25309
25657
|
{
|
|
25310
25658
|
id: gradientName.current,
|
|
@@ -25313,14 +25661,14 @@ var CircularProgress = ({
|
|
|
25313
25661
|
x2: "0%",
|
|
25314
25662
|
y2: "100%",
|
|
25315
25663
|
children: [
|
|
25316
|
-
/* @__PURE__ */
|
|
25664
|
+
/* @__PURE__ */ jsx145(
|
|
25317
25665
|
"stop",
|
|
25318
25666
|
{
|
|
25319
25667
|
offset: "0%",
|
|
25320
25668
|
stopColor: gradientColors.startColor
|
|
25321
25669
|
}
|
|
25322
25670
|
),
|
|
25323
|
-
/* @__PURE__ */
|
|
25671
|
+
/* @__PURE__ */ jsx145(
|
|
25324
25672
|
"stop",
|
|
25325
25673
|
{
|
|
25326
25674
|
offset: "100%",
|
|
@@ -25330,7 +25678,7 @@ var CircularProgress = ({
|
|
|
25330
25678
|
]
|
|
25331
25679
|
}
|
|
25332
25680
|
) }) }),
|
|
25333
|
-
showCircularBackground && /* @__PURE__ */
|
|
25681
|
+
showCircularBackground && /* @__PURE__ */ jsx145(
|
|
25334
25682
|
Box4,
|
|
25335
25683
|
{
|
|
25336
25684
|
sx: {
|
|
@@ -25343,7 +25691,7 @@ var CircularProgress = ({
|
|
|
25343
25691
|
maxHeight: circularSizes[size]
|
|
25344
25692
|
}
|
|
25345
25693
|
},
|
|
25346
|
-
children: /* @__PURE__ */
|
|
25694
|
+
children: /* @__PURE__ */ jsx145(
|
|
25347
25695
|
MuiCircularProgress,
|
|
25348
25696
|
{
|
|
25349
25697
|
variant: "determinate",
|
|
@@ -25355,7 +25703,7 @@ var CircularProgress = ({
|
|
|
25355
25703
|
)
|
|
25356
25704
|
}
|
|
25357
25705
|
),
|
|
25358
|
-
/* @__PURE__ */
|
|
25706
|
+
/* @__PURE__ */ jsx145(
|
|
25359
25707
|
MuiCircularProgress,
|
|
25360
25708
|
{
|
|
25361
25709
|
variant,
|
|
@@ -25384,7 +25732,7 @@ var CircularProgress = ({
|
|
|
25384
25732
|
thickness
|
|
25385
25733
|
}
|
|
25386
25734
|
),
|
|
25387
|
-
variant !== "indeterminate" && /* @__PURE__ */
|
|
25735
|
+
variant !== "indeterminate" && /* @__PURE__ */ jsx145(
|
|
25388
25736
|
Box4,
|
|
25389
25737
|
{
|
|
25390
25738
|
sx: {
|
|
@@ -25399,7 +25747,7 @@ var CircularProgress = ({
|
|
|
25399
25747
|
height: circularSizes[size],
|
|
25400
25748
|
width: circularSizes[size]
|
|
25401
25749
|
},
|
|
25402
|
-
children: typeof label === "string" ? /* @__PURE__ */
|
|
25750
|
+
children: typeof label === "string" ? /* @__PURE__ */ jsx145(
|
|
25403
25751
|
Typography3,
|
|
25404
25752
|
{
|
|
25405
25753
|
variant: typographyVariant,
|
|
@@ -25418,8 +25766,8 @@ var CircularProgress_default = CircularProgress;
|
|
|
25418
25766
|
|
|
25419
25767
|
// src/components/progress/DonutProgress.tsx
|
|
25420
25768
|
import Box5 from "@mui/material/Box";
|
|
25421
|
-
import { Stack as
|
|
25422
|
-
import { jsx as
|
|
25769
|
+
import { Stack as Stack13 } from "@mui/material";
|
|
25770
|
+
import { jsx as jsx146, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
25423
25771
|
var CIRCULAR_PROGRESS_PERCENTAGE = 85;
|
|
25424
25772
|
var variants2 = {
|
|
25425
25773
|
empty: {
|
|
@@ -25455,9 +25803,9 @@ var DonutProgress = ({
|
|
|
25455
25803
|
labelChip,
|
|
25456
25804
|
showPercentageSymbol
|
|
25457
25805
|
}) => {
|
|
25458
|
-
const getPercentageWithSymbol = () => /* @__PURE__ */
|
|
25459
|
-
/* @__PURE__ */
|
|
25460
|
-
/* @__PURE__ */
|
|
25806
|
+
const getPercentageWithSymbol = () => /* @__PURE__ */ jsxs74(Stack13, { direction: "row", alignItems: "center", position: "relative", children: [
|
|
25807
|
+
/* @__PURE__ */ jsx146(Typography_default, { variant: "h6", component: "div", color: grey800, children: label }),
|
|
25808
|
+
/* @__PURE__ */ jsx146(
|
|
25461
25809
|
Typography_default,
|
|
25462
25810
|
{
|
|
25463
25811
|
variant: "tooltip",
|
|
@@ -25468,7 +25816,7 @@ var DonutProgress = ({
|
|
|
25468
25816
|
}
|
|
25469
25817
|
)
|
|
25470
25818
|
] });
|
|
25471
|
-
return /* @__PURE__ */
|
|
25819
|
+
return /* @__PURE__ */ jsxs74(
|
|
25472
25820
|
Box5,
|
|
25473
25821
|
{
|
|
25474
25822
|
sx: {
|
|
@@ -25476,7 +25824,7 @@ var DonutProgress = ({
|
|
|
25476
25824
|
width: "fit-content"
|
|
25477
25825
|
},
|
|
25478
25826
|
children: [
|
|
25479
|
-
/* @__PURE__ */
|
|
25827
|
+
/* @__PURE__ */ jsx146(
|
|
25480
25828
|
CircularProgress_default,
|
|
25481
25829
|
{
|
|
25482
25830
|
variant: "determinate",
|
|
@@ -25492,7 +25840,7 @@ var DonutProgress = ({
|
|
|
25492
25840
|
color: variants2[variant].emptyColor
|
|
25493
25841
|
}
|
|
25494
25842
|
),
|
|
25495
|
-
/* @__PURE__ */
|
|
25843
|
+
/* @__PURE__ */ jsx146(
|
|
25496
25844
|
Box5,
|
|
25497
25845
|
{
|
|
25498
25846
|
sx: {
|
|
@@ -25500,7 +25848,7 @@ var DonutProgress = ({
|
|
|
25500
25848
|
top: 0,
|
|
25501
25849
|
left: 0
|
|
25502
25850
|
},
|
|
25503
|
-
children: /* @__PURE__ */
|
|
25851
|
+
children: /* @__PURE__ */ jsx146(
|
|
25504
25852
|
CircularProgress_default,
|
|
25505
25853
|
{
|
|
25506
25854
|
variant: "determinate",
|
|
@@ -25515,7 +25863,7 @@ var DonutProgress = ({
|
|
|
25515
25863
|
)
|
|
25516
25864
|
}
|
|
25517
25865
|
),
|
|
25518
|
-
variant !== "empty" && labelChip && /* @__PURE__ */
|
|
25866
|
+
variant !== "empty" && labelChip && /* @__PURE__ */ jsx146(
|
|
25519
25867
|
Box5,
|
|
25520
25868
|
{
|
|
25521
25869
|
sx: {
|
|
@@ -25532,7 +25880,7 @@ var DonutProgress = ({
|
|
|
25532
25880
|
justifyContent: "center",
|
|
25533
25881
|
boxSizing: "border-box"
|
|
25534
25882
|
},
|
|
25535
|
-
children: /* @__PURE__ */
|
|
25883
|
+
children: /* @__PURE__ */ jsx146(
|
|
25536
25884
|
Typography_default,
|
|
25537
25885
|
{
|
|
25538
25886
|
variant: "tooltip",
|
|
@@ -25549,14 +25897,14 @@ var DonutProgress = ({
|
|
|
25549
25897
|
var DonutProgress_default = DonutProgress;
|
|
25550
25898
|
|
|
25551
25899
|
// src/components/loader/Loader.tsx
|
|
25552
|
-
import { jsx as
|
|
25900
|
+
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
25553
25901
|
var Loader = ({
|
|
25554
25902
|
isVisible,
|
|
25555
25903
|
zIndex = 1e4,
|
|
25556
25904
|
size,
|
|
25557
25905
|
hideProgress = false,
|
|
25558
25906
|
sx
|
|
25559
|
-
}) => /* @__PURE__ */
|
|
25907
|
+
}) => /* @__PURE__ */ jsx147(Fade, { in: isVisible, children: /* @__PURE__ */ jsx147(
|
|
25560
25908
|
Box_default2,
|
|
25561
25909
|
{
|
|
25562
25910
|
sx: {
|
|
@@ -25572,29 +25920,29 @@ var Loader = ({
|
|
|
25572
25920
|
backgroundColor: whiteOpacity32,
|
|
25573
25921
|
...sx
|
|
25574
25922
|
},
|
|
25575
|
-
children: !hideProgress && /* @__PURE__ */
|
|
25923
|
+
children: !hideProgress && /* @__PURE__ */ jsx147(CircularProgress_default, { size })
|
|
25576
25924
|
}
|
|
25577
25925
|
) });
|
|
25578
25926
|
var Loader_default = Loader;
|
|
25579
25927
|
|
|
25580
25928
|
// src/components/markdown/MarkdownRenderer.tsx
|
|
25581
|
-
import
|
|
25929
|
+
import React83 from "react";
|
|
25582
25930
|
import Markdown from "markdown-to-jsx";
|
|
25583
25931
|
import { styled as styled8 } from "@mui/material/styles";
|
|
25584
25932
|
import "katex/dist/katex.min.css";
|
|
25585
25933
|
|
|
25586
25934
|
// src/components/markdown/KatexRenderer.tsx
|
|
25587
25935
|
import katex from "katex";
|
|
25588
|
-
import { jsx as
|
|
25936
|
+
import { jsx as jsx148, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
25589
25937
|
var KatexRenderer = ({ children, block }) => {
|
|
25590
25938
|
try {
|
|
25591
25939
|
const html2 = katex.renderToString(children, {
|
|
25592
25940
|
throwOnError: false,
|
|
25593
25941
|
displayMode: block
|
|
25594
25942
|
});
|
|
25595
|
-
return /* @__PURE__ */
|
|
25943
|
+
return /* @__PURE__ */ jsx148("span", { dangerouslySetInnerHTML: { __html: html2 } });
|
|
25596
25944
|
} catch (err) {
|
|
25597
|
-
return /* @__PURE__ */
|
|
25945
|
+
return /* @__PURE__ */ jsxs75("pre", { style: { color: "red" }, children: [
|
|
25598
25946
|
"KaTeX error: $",
|
|
25599
25947
|
err.message
|
|
25600
25948
|
] });
|
|
@@ -25603,7 +25951,7 @@ var KatexRenderer = ({ children, block }) => {
|
|
|
25603
25951
|
var KatexRenderer_default = KatexRenderer;
|
|
25604
25952
|
|
|
25605
25953
|
// src/components/markdown/MarkdownRenderer.tsx
|
|
25606
|
-
import { jsx as
|
|
25954
|
+
import { jsx as jsx149 } from "react/jsx-runtime";
|
|
25607
25955
|
var MarkdownContainer = styled8("div")(
|
|
25608
25956
|
({
|
|
25609
25957
|
color: color2,
|
|
@@ -25707,11 +26055,11 @@ var renderWithMath = (text) => {
|
|
|
25707
26055
|
const inline = match[2];
|
|
25708
26056
|
if (block !== void 0) {
|
|
25709
26057
|
parts.push(
|
|
25710
|
-
/* @__PURE__ */
|
|
26058
|
+
/* @__PURE__ */ jsx149(KatexRenderer_default, { block: true, children: block.trim() }, start)
|
|
25711
26059
|
);
|
|
25712
26060
|
} else if (inline !== void 0) {
|
|
25713
26061
|
parts.push(
|
|
25714
|
-
/* @__PURE__ */
|
|
26062
|
+
/* @__PURE__ */ jsx149(KatexRenderer_default, { children: inline.trim() }, start)
|
|
25715
26063
|
);
|
|
25716
26064
|
}
|
|
25717
26065
|
lastIndex = regex.lastIndex;
|
|
@@ -25721,13 +26069,13 @@ var renderWithMath = (text) => {
|
|
|
25721
26069
|
}
|
|
25722
26070
|
return parts;
|
|
25723
26071
|
};
|
|
25724
|
-
var renderChildrenWithMath = (children) =>
|
|
26072
|
+
var renderChildrenWithMath = (children) => React83.Children.map(children, (child) => {
|
|
25725
26073
|
if (typeof child === "string") {
|
|
25726
26074
|
return renderWithMath(child);
|
|
25727
26075
|
}
|
|
25728
|
-
if (
|
|
26076
|
+
if (React83.isValidElement(child)) {
|
|
25729
26077
|
const element = child;
|
|
25730
|
-
return
|
|
26078
|
+
return React83.cloneElement(element, {
|
|
25731
26079
|
...element.props,
|
|
25732
26080
|
children: renderChildrenWithMath(element.props.children)
|
|
25733
26081
|
});
|
|
@@ -25742,11 +26090,11 @@ var CodeOrMath = ({ children, ...props }) => {
|
|
|
25742
26090
|
if (m) {
|
|
25743
26091
|
const expr = m[1] || m[2] || "";
|
|
25744
26092
|
const isBlock = Boolean(m[1]);
|
|
25745
|
-
return /* @__PURE__ */
|
|
26093
|
+
return /* @__PURE__ */ jsx149(KatexRenderer_default, { block: isBlock, children: expr.trim() });
|
|
25746
26094
|
}
|
|
25747
26095
|
const maybe = renderWithMath(s);
|
|
25748
26096
|
const onlyText = maybe.length === 1 && typeof maybe[0] === "string";
|
|
25749
|
-
return onlyText ? /* @__PURE__ */
|
|
26097
|
+
return onlyText ? /* @__PURE__ */ jsx149("code", { ...props, children }) : /* @__PURE__ */ jsx149("span", { children: maybe });
|
|
25750
26098
|
};
|
|
25751
26099
|
var escapeInlineUnderscores = (s) => s.replace(/(\S)_(\S)/g, "$1\\_$2");
|
|
25752
26100
|
var MarkdownRenderer = ({
|
|
@@ -25756,19 +26104,19 @@ var MarkdownRenderer = ({
|
|
|
25756
26104
|
}) => {
|
|
25757
26105
|
const protectedText = escapeInlineUnderscores(text || "");
|
|
25758
26106
|
const normalized = normalizeLatexDelimiters(protectedText);
|
|
25759
|
-
return /* @__PURE__ */
|
|
26107
|
+
return /* @__PURE__ */ jsx149(
|
|
25760
26108
|
MarkdownContainer,
|
|
25761
26109
|
{
|
|
25762
26110
|
className: `markdown-container ${className || ""}`,
|
|
25763
26111
|
...rest,
|
|
25764
|
-
children: /* @__PURE__ */
|
|
26112
|
+
children: /* @__PURE__ */ jsx149(
|
|
25765
26113
|
Markdown,
|
|
25766
26114
|
{
|
|
25767
26115
|
options: {
|
|
25768
26116
|
forceBlock: true,
|
|
25769
26117
|
overrides: {
|
|
25770
26118
|
p: {
|
|
25771
|
-
component: ({ children, ...props }) => /* @__PURE__ */
|
|
26119
|
+
component: ({ children, ...props }) => /* @__PURE__ */ jsx149("p", { ...props, children: renderChildrenWithMath(children) })
|
|
25772
26120
|
},
|
|
25773
26121
|
code: { component: CodeOrMath }
|
|
25774
26122
|
}
|
|
@@ -25783,7 +26131,7 @@ var MarkdownRenderer_default = MarkdownRenderer;
|
|
|
25783
26131
|
|
|
25784
26132
|
// src/components/navbar/Navbar.tsx
|
|
25785
26133
|
import { Drawer as Drawer2 } from "@mui/material";
|
|
25786
|
-
import { Fragment as
|
|
26134
|
+
import { Fragment as Fragment39, jsx as jsx150, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
25787
26135
|
var Navbar = ({
|
|
25788
26136
|
topContent,
|
|
25789
26137
|
bottomContent,
|
|
@@ -25791,8 +26139,8 @@ var Navbar = ({
|
|
|
25791
26139
|
drawerBottomContent,
|
|
25792
26140
|
onClose,
|
|
25793
26141
|
isDrawerOpen = false
|
|
25794
|
-
}) => /* @__PURE__ */
|
|
25795
|
-
/* @__PURE__ */
|
|
26142
|
+
}) => /* @__PURE__ */ jsxs76(Fragment39, { children: [
|
|
26143
|
+
/* @__PURE__ */ jsxs76(
|
|
25796
26144
|
Box_default2,
|
|
25797
26145
|
{
|
|
25798
26146
|
sx: {
|
|
@@ -25807,12 +26155,12 @@ var Navbar = ({
|
|
|
25807
26155
|
},
|
|
25808
26156
|
className: "Slim-Vertical-Scroll",
|
|
25809
26157
|
children: [
|
|
25810
|
-
/* @__PURE__ */
|
|
25811
|
-
/* @__PURE__ */
|
|
26158
|
+
/* @__PURE__ */ jsx150(Box_default2, { children: topContent }),
|
|
26159
|
+
/* @__PURE__ */ jsx150(Box_default2, { children: bottomContent })
|
|
25812
26160
|
]
|
|
25813
26161
|
}
|
|
25814
26162
|
),
|
|
25815
|
-
/* @__PURE__ */
|
|
26163
|
+
/* @__PURE__ */ jsxs76(
|
|
25816
26164
|
Drawer2,
|
|
25817
26165
|
{
|
|
25818
26166
|
open: isDrawerOpen,
|
|
@@ -25835,8 +26183,8 @@ var Navbar = ({
|
|
|
25835
26183
|
},
|
|
25836
26184
|
onClose,
|
|
25837
26185
|
children: [
|
|
25838
|
-
/* @__PURE__ */
|
|
25839
|
-
/* @__PURE__ */
|
|
26186
|
+
/* @__PURE__ */ jsx150("div", { children: drawerTopContent }),
|
|
26187
|
+
/* @__PURE__ */ jsx150("div", { children: drawerBottomContent })
|
|
25840
26188
|
]
|
|
25841
26189
|
}
|
|
25842
26190
|
)
|
|
@@ -25844,10 +26192,10 @@ var Navbar = ({
|
|
|
25844
26192
|
var Navbar_default = Navbar;
|
|
25845
26193
|
|
|
25846
26194
|
// src/components/navbar/NavbarButton.tsx
|
|
25847
|
-
import * as
|
|
26195
|
+
import * as React84 from "react";
|
|
25848
26196
|
import { Box as Box6, ButtonBase as ButtonBase2 } from "@mui/material";
|
|
25849
|
-
import { jsx as
|
|
25850
|
-
var NavbarButton =
|
|
26197
|
+
import { jsx as jsx151, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
26198
|
+
var NavbarButton = React84.forwardRef(
|
|
25851
26199
|
function NavbarButton2({
|
|
25852
26200
|
iconId,
|
|
25853
26201
|
srcUrl,
|
|
@@ -25862,7 +26210,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25862
26210
|
if (!highlighted) {
|
|
25863
26211
|
return element;
|
|
25864
26212
|
}
|
|
25865
|
-
return /* @__PURE__ */
|
|
26213
|
+
return /* @__PURE__ */ jsxs77(
|
|
25866
26214
|
Box6,
|
|
25867
26215
|
{
|
|
25868
26216
|
sx: {
|
|
@@ -25872,7 +26220,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25872
26220
|
position: "relative"
|
|
25873
26221
|
},
|
|
25874
26222
|
children: [
|
|
25875
|
-
/* @__PURE__ */
|
|
26223
|
+
/* @__PURE__ */ jsx151(
|
|
25876
26224
|
Box6,
|
|
25877
26225
|
{
|
|
25878
26226
|
sx: {
|
|
@@ -25888,7 +26236,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25888
26236
|
}
|
|
25889
26237
|
}
|
|
25890
26238
|
),
|
|
25891
|
-
/* @__PURE__ */
|
|
26239
|
+
/* @__PURE__ */ jsx151(
|
|
25892
26240
|
Box6,
|
|
25893
26241
|
{
|
|
25894
26242
|
sx: {
|
|
@@ -25903,7 +26251,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25903
26251
|
}
|
|
25904
26252
|
);
|
|
25905
26253
|
};
|
|
25906
|
-
return /* @__PURE__ */
|
|
26254
|
+
return /* @__PURE__ */ jsxs77(
|
|
25907
26255
|
ButtonBase2,
|
|
25908
26256
|
{
|
|
25909
26257
|
className: "NavbarButton-root",
|
|
@@ -25921,7 +26269,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25921
26269
|
},
|
|
25922
26270
|
children: [
|
|
25923
26271
|
srcUrl ? getButtonContent(
|
|
25924
|
-
/* @__PURE__ */
|
|
26272
|
+
/* @__PURE__ */ jsx151(
|
|
25925
26273
|
Avatar_default,
|
|
25926
26274
|
{
|
|
25927
26275
|
className: "NavbarButton-icon",
|
|
@@ -25931,7 +26279,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25931
26279
|
}
|
|
25932
26280
|
)
|
|
25933
26281
|
) : getButtonContent(
|
|
25934
|
-
/* @__PURE__ */
|
|
26282
|
+
/* @__PURE__ */ jsx151(
|
|
25935
26283
|
Icon_default,
|
|
25936
26284
|
{
|
|
25937
26285
|
id: iconId,
|
|
@@ -25947,7 +26295,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25947
26295
|
}
|
|
25948
26296
|
)
|
|
25949
26297
|
),
|
|
25950
|
-
badgeIconProps && /* @__PURE__ */
|
|
26298
|
+
badgeIconProps && /* @__PURE__ */ jsx151(
|
|
25951
26299
|
Icon_default,
|
|
25952
26300
|
{
|
|
25953
26301
|
...badgeIconProps,
|
|
@@ -25969,8 +26317,8 @@ var NavbarButton = React82.forwardRef(
|
|
|
25969
26317
|
var NavbarButton_default = NavbarButton;
|
|
25970
26318
|
|
|
25971
26319
|
// src/components/navbar/NavbarHeader.tsx
|
|
25972
|
-
import { jsx as
|
|
25973
|
-
var NavbarHeader = ({ text }) => /* @__PURE__ */
|
|
26320
|
+
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
26321
|
+
var NavbarHeader = ({ text }) => /* @__PURE__ */ jsx152(
|
|
25974
26322
|
Typography_default,
|
|
25975
26323
|
{
|
|
25976
26324
|
sx: {
|
|
@@ -25990,12 +26338,12 @@ var NavbarHeader = ({ text }) => /* @__PURE__ */ jsx146(
|
|
|
25990
26338
|
var NavbarHeader_default = NavbarHeader;
|
|
25991
26339
|
|
|
25992
26340
|
// src/components/navbar/NavbarLogo.tsx
|
|
25993
|
-
import * as
|
|
26341
|
+
import * as React85 from "react";
|
|
25994
26342
|
import { ButtonBase as ButtonBase3 } from "@mui/material";
|
|
25995
|
-
import { jsx as
|
|
25996
|
-
var NavbarLogo =
|
|
26343
|
+
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
26344
|
+
var NavbarLogo = React85.forwardRef(
|
|
25997
26345
|
function NavbarButton3({ src, ...rest }, ref) {
|
|
25998
|
-
return /* @__PURE__ */
|
|
26346
|
+
return /* @__PURE__ */ jsx153(
|
|
25999
26347
|
ButtonBase3,
|
|
26000
26348
|
{
|
|
26001
26349
|
ref,
|
|
@@ -26006,7 +26354,7 @@ var NavbarLogo = React83.forwardRef(
|
|
|
26006
26354
|
borderBottom: `1px solid ${grey200}`,
|
|
26007
26355
|
boxSizing: "border-box"
|
|
26008
26356
|
},
|
|
26009
|
-
children: /* @__PURE__ */
|
|
26357
|
+
children: /* @__PURE__ */ jsx153("img", { src, width: "32px", height: "32px" })
|
|
26010
26358
|
}
|
|
26011
26359
|
);
|
|
26012
26360
|
}
|
|
@@ -26014,8 +26362,8 @@ var NavbarLogo = React83.forwardRef(
|
|
|
26014
26362
|
var NavbarLogo_default = NavbarLogo;
|
|
26015
26363
|
|
|
26016
26364
|
// src/components/overlay/DonutFocusOverlay.tsx
|
|
26017
|
-
import * as
|
|
26018
|
-
import { Fragment as
|
|
26365
|
+
import * as React86 from "react";
|
|
26366
|
+
import { Fragment as Fragment40, jsx as jsx154, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
26019
26367
|
var DonutFocusOverlay = ({
|
|
26020
26368
|
isVisible,
|
|
26021
26369
|
elementRef,
|
|
@@ -26024,8 +26372,8 @@ var DonutFocusOverlay = ({
|
|
|
26024
26372
|
chipLabel,
|
|
26025
26373
|
chipPosition = "right"
|
|
26026
26374
|
}) => {
|
|
26027
|
-
const [clientRect, setClientRect] =
|
|
26028
|
-
|
|
26375
|
+
const [clientRect, setClientRect] = React86.useState();
|
|
26376
|
+
React86.useEffect(() => {
|
|
26029
26377
|
if (!elementRef?.current) {
|
|
26030
26378
|
setClientRect(void 0);
|
|
26031
26379
|
return;
|
|
@@ -26056,8 +26404,8 @@ var DonutFocusOverlay = ({
|
|
|
26056
26404
|
const internalTopHalfCircle = `${internalCircleRadius} ${internalCircleRadius} 0 0 1 ${startPointX + donutWidth + internalCircleRadius * 2} ${startPointY}`;
|
|
26057
26405
|
const externalTopHalfCircle = `${externalCircleRadius} ${externalCircleRadius} 0 0 0 ${startPointX} ${startPointY}`;
|
|
26058
26406
|
const path = `path("M ${startPointX} ${startPointY} A ${externalBottomHalfCircle} m ${-donutWidth} 0 A ${internalBottomHalfCircle} A ${internalTopHalfCircle} m ${donutWidth} 0 A ${externalTopHalfCircle} Z")`;
|
|
26059
|
-
return /* @__PURE__ */
|
|
26060
|
-
/* @__PURE__ */
|
|
26407
|
+
return /* @__PURE__ */ jsxs78(Fragment40, { children: [
|
|
26408
|
+
/* @__PURE__ */ jsx154(
|
|
26061
26409
|
Box_default2,
|
|
26062
26410
|
{
|
|
26063
26411
|
sx: {
|
|
@@ -26074,7 +26422,7 @@ var DonutFocusOverlay = ({
|
|
|
26074
26422
|
}
|
|
26075
26423
|
}
|
|
26076
26424
|
),
|
|
26077
|
-
chipLabel && /* @__PURE__ */
|
|
26425
|
+
chipLabel && /* @__PURE__ */ jsx154(
|
|
26078
26426
|
Chip_default,
|
|
26079
26427
|
{
|
|
26080
26428
|
label: chipLabel,
|
|
@@ -26101,7 +26449,7 @@ var DonutFocusOverlay = ({
|
|
|
26101
26449
|
var DonutFocusOverlay_default = DonutFocusOverlay;
|
|
26102
26450
|
|
|
26103
26451
|
// src/components/pager/Pager.tsx
|
|
26104
|
-
import { Fragment as
|
|
26452
|
+
import { Fragment as Fragment41, jsx as jsx155, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
26105
26453
|
var Pager = ({
|
|
26106
26454
|
page,
|
|
26107
26455
|
pageSize,
|
|
@@ -26115,10 +26463,10 @@ var Pager = ({
|
|
|
26115
26463
|
const to = Math.min(current + pageSize, total);
|
|
26116
26464
|
const pages = Math.max(Math.ceil(total / pageSize), 1);
|
|
26117
26465
|
const options = [...Array(pages).keys()].map((i) => ({ value: i + 1 }));
|
|
26118
|
-
const Label = ({ children }) => /* @__PURE__ */
|
|
26119
|
-
return /* @__PURE__ */
|
|
26120
|
-
/* @__PURE__ */
|
|
26121
|
-
/* @__PURE__ */
|
|
26466
|
+
const Label = ({ children }) => /* @__PURE__ */ jsx155(Typography_default, { color: Colors_exports.grey400, sx: { padding: "0 8px" }, children });
|
|
26467
|
+
return /* @__PURE__ */ jsxs79(Stack_default, { direction: "row", sx: { alignItems: "center" }, children: [
|
|
26468
|
+
/* @__PURE__ */ jsx155(Label, { children: t("PAGER.PAGE") }),
|
|
26469
|
+
/* @__PURE__ */ jsx155(
|
|
26122
26470
|
Select_default,
|
|
26123
26471
|
{
|
|
26124
26472
|
value: page,
|
|
@@ -26127,9 +26475,9 @@ var Pager = ({
|
|
|
26127
26475
|
sx: { minWidth: 78 }
|
|
26128
26476
|
}
|
|
26129
26477
|
),
|
|
26130
|
-
allowedPageSizes && /* @__PURE__ */
|
|
26131
|
-
/* @__PURE__ */
|
|
26132
|
-
/* @__PURE__ */
|
|
26478
|
+
allowedPageSizes && /* @__PURE__ */ jsxs79(Fragment41, { children: [
|
|
26479
|
+
/* @__PURE__ */ jsx155(Label, { children: t("PAGER.ROWS_PER_PAGE") }),
|
|
26480
|
+
/* @__PURE__ */ jsx155(
|
|
26133
26481
|
Select_default,
|
|
26134
26482
|
{
|
|
26135
26483
|
value: pageSize,
|
|
@@ -26143,7 +26491,7 @@ var Pager = ({
|
|
|
26143
26491
|
}
|
|
26144
26492
|
)
|
|
26145
26493
|
] }),
|
|
26146
|
-
/* @__PURE__ */
|
|
26494
|
+
/* @__PURE__ */ jsxs79(Label, { children: [
|
|
26147
26495
|
from,
|
|
26148
26496
|
" - ",
|
|
26149
26497
|
to,
|
|
@@ -26152,7 +26500,7 @@ var Pager = ({
|
|
|
26152
26500
|
" ",
|
|
26153
26501
|
total
|
|
26154
26502
|
] }),
|
|
26155
|
-
/* @__PURE__ */
|
|
26503
|
+
/* @__PURE__ */ jsx155(
|
|
26156
26504
|
IconButton_default,
|
|
26157
26505
|
{
|
|
26158
26506
|
disabled: page <= 1,
|
|
@@ -26160,7 +26508,7 @@ var Pager = ({
|
|
|
26160
26508
|
onClick: () => onPageChange(page - 1, pageSize)
|
|
26161
26509
|
}
|
|
26162
26510
|
),
|
|
26163
|
-
/* @__PURE__ */
|
|
26511
|
+
/* @__PURE__ */ jsx155(
|
|
26164
26512
|
IconButton_default,
|
|
26165
26513
|
{
|
|
26166
26514
|
disabled: page > total / pageSize,
|
|
@@ -26174,17 +26522,17 @@ var Pager_default = Pager;
|
|
|
26174
26522
|
|
|
26175
26523
|
// src/components/scrollable/HorizontalScrollable.tsx
|
|
26176
26524
|
import { ButtonBase as ButtonBase4 } from "@mui/material";
|
|
26177
|
-
import * as
|
|
26178
|
-
import { jsx as
|
|
26525
|
+
import * as React87 from "react";
|
|
26526
|
+
import { jsx as jsx156, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
26179
26527
|
var HorizontalScrollable = ({
|
|
26180
26528
|
style: style3,
|
|
26181
26529
|
children,
|
|
26182
26530
|
stepDistance = 200
|
|
26183
26531
|
}) => {
|
|
26184
|
-
const horizontalContainerRef =
|
|
26185
|
-
const [isLeftArrowHidden, setLeftArrowHidden] =
|
|
26186
|
-
const [isRightArrowHidden, setRightArrowHidden] =
|
|
26187
|
-
|
|
26532
|
+
const horizontalContainerRef = React87.useRef(null);
|
|
26533
|
+
const [isLeftArrowHidden, setLeftArrowHidden] = React87.useState(true);
|
|
26534
|
+
const [isRightArrowHidden, setRightArrowHidden] = React87.useState(true);
|
|
26535
|
+
React87.useEffect(() => {
|
|
26188
26536
|
if (!horizontalContainerRef.current) {
|
|
26189
26537
|
return;
|
|
26190
26538
|
}
|
|
@@ -26224,8 +26572,8 @@ var HorizontalScrollable = ({
|
|
|
26224
26572
|
);
|
|
26225
26573
|
current.scrollBy(stepDistance, 0);
|
|
26226
26574
|
};
|
|
26227
|
-
return /* @__PURE__ */
|
|
26228
|
-
/* @__PURE__ */
|
|
26575
|
+
return /* @__PURE__ */ jsxs80(Box_default2, { sx: { position: "relative", ...style3 }, children: [
|
|
26576
|
+
/* @__PURE__ */ jsx156(
|
|
26229
26577
|
ButtonBase4,
|
|
26230
26578
|
{
|
|
26231
26579
|
sx: {
|
|
@@ -26242,10 +26590,10 @@ var HorizontalScrollable = ({
|
|
|
26242
26590
|
...isLeftArrowHidden && { display: "none" }
|
|
26243
26591
|
},
|
|
26244
26592
|
onClick: () => leftScroll(),
|
|
26245
|
-
children: /* @__PURE__ */
|
|
26593
|
+
children: /* @__PURE__ */ jsx156(Icon_default, { id: "chevron-left" })
|
|
26246
26594
|
}
|
|
26247
26595
|
),
|
|
26248
|
-
/* @__PURE__ */
|
|
26596
|
+
/* @__PURE__ */ jsx156(
|
|
26249
26597
|
Box_default2,
|
|
26250
26598
|
{
|
|
26251
26599
|
ref: horizontalContainerRef,
|
|
@@ -26264,7 +26612,7 @@ var HorizontalScrollable = ({
|
|
|
26264
26612
|
children
|
|
26265
26613
|
}
|
|
26266
26614
|
),
|
|
26267
|
-
/* @__PURE__ */
|
|
26615
|
+
/* @__PURE__ */ jsx156(
|
|
26268
26616
|
ButtonBase4,
|
|
26269
26617
|
{
|
|
26270
26618
|
sx: {
|
|
@@ -26281,7 +26629,7 @@ var HorizontalScrollable = ({
|
|
|
26281
26629
|
...isRightArrowHidden && { display: "none" }
|
|
26282
26630
|
},
|
|
26283
26631
|
onClick: () => rightScroll(),
|
|
26284
|
-
children: /* @__PURE__ */
|
|
26632
|
+
children: /* @__PURE__ */ jsx156(Icon_default, { id: "chevron-right" })
|
|
26285
26633
|
}
|
|
26286
26634
|
)
|
|
26287
26635
|
] });
|
|
@@ -26289,8 +26637,8 @@ var HorizontalScrollable = ({
|
|
|
26289
26637
|
var HorizontalScrollable_default = HorizontalScrollable;
|
|
26290
26638
|
|
|
26291
26639
|
// src/components/scrollable/Carousel.tsx
|
|
26292
|
-
import * as
|
|
26293
|
-
import { jsx as
|
|
26640
|
+
import * as React88 from "react";
|
|
26641
|
+
import { jsx as jsx157, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
26294
26642
|
var buttonStyles = {
|
|
26295
26643
|
color: grey800,
|
|
26296
26644
|
position: "absolute",
|
|
@@ -26306,26 +26654,26 @@ function Carousel({
|
|
|
26306
26654
|
items,
|
|
26307
26655
|
renderItem,
|
|
26308
26656
|
gap: gap2 = 8,
|
|
26309
|
-
padding: padding2 = 8
|
|
26657
|
+
padding: padding2 = 8,
|
|
26658
|
+
alignment = "left"
|
|
26310
26659
|
}) {
|
|
26311
|
-
const rootRef =
|
|
26312
|
-
const containerRef =
|
|
26313
|
-
const previousClientWidth =
|
|
26314
|
-
const isScrolling =
|
|
26315
|
-
const [isLeftArrowHidden, setLeftArrowHidden] =
|
|
26316
|
-
const [isRightArrowHidden, setRightArrowHidden] =
|
|
26317
|
-
const [paddingElement, setPaddingElement] =
|
|
26318
|
-
const [visibleCount, setVisibleCount] =
|
|
26319
|
-
const showedElementsRef =
|
|
26320
|
-
const
|
|
26321
|
-
const updateArrows = React86.useCallback(() => {
|
|
26660
|
+
const rootRef = React88.useRef(null);
|
|
26661
|
+
const containerRef = React88.useRef(null);
|
|
26662
|
+
const previousClientWidth = React88.useRef(null);
|
|
26663
|
+
const isScrolling = React88.useRef(false);
|
|
26664
|
+
const [isLeftArrowHidden, setLeftArrowHidden] = React88.useState(true);
|
|
26665
|
+
const [isRightArrowHidden, setRightArrowHidden] = React88.useState(true);
|
|
26666
|
+
const [paddingElement, setPaddingElement] = React88.useState();
|
|
26667
|
+
const [visibleCount, setVisibleCount] = React88.useState();
|
|
26668
|
+
const showedElementsRef = React88.useRef(void 0);
|
|
26669
|
+
const updateArrows = React88.useCallback(() => {
|
|
26322
26670
|
if (!showedElementsRef.current) {
|
|
26323
26671
|
return;
|
|
26324
26672
|
}
|
|
26325
26673
|
setLeftArrowHidden(showedElementsRef.current.start === 0);
|
|
26326
26674
|
setRightArrowHidden(showedElementsRef.current.end === items.length - 1);
|
|
26327
26675
|
}, [items.length]);
|
|
26328
|
-
const getUsableWidth =
|
|
26676
|
+
const getUsableWidth = React88.useCallback(
|
|
26329
26677
|
(el) => {
|
|
26330
26678
|
let current = el;
|
|
26331
26679
|
while (current) {
|
|
@@ -26339,16 +26687,15 @@ function Carousel({
|
|
|
26339
26687
|
},
|
|
26340
26688
|
[]
|
|
26341
26689
|
);
|
|
26342
|
-
const resetCarousel =
|
|
26690
|
+
const resetCarousel = React88.useCallback(
|
|
26343
26691
|
(root, container) => {
|
|
26344
26692
|
root.style.width = "";
|
|
26345
26693
|
showedElementsRef.current = void 0;
|
|
26346
|
-
setShowedElements(void 0);
|
|
26347
26694
|
container.scrollTo({ left: 0, behavior: "instant" });
|
|
26348
26695
|
},
|
|
26349
26696
|
[]
|
|
26350
26697
|
);
|
|
26351
|
-
const setMeasures =
|
|
26698
|
+
const setMeasures = React88.useCallback(
|
|
26352
26699
|
(root, container, nextElementsIndex) => {
|
|
26353
26700
|
const children = Array.from(container.children);
|
|
26354
26701
|
if (children.length === 0) {
|
|
@@ -26356,7 +26703,7 @@ function Carousel({
|
|
|
26356
26703
|
return;
|
|
26357
26704
|
}
|
|
26358
26705
|
const containerWidth = getUsableWidth(root);
|
|
26359
|
-
const initialHorizontalPadding = padding2 * 2;
|
|
26706
|
+
const initialHorizontalPadding = alignment === "left" ? 0 : padding2 * 2;
|
|
26360
26707
|
let count = 0;
|
|
26361
26708
|
let accumulatedWidth = initialHorizontalPadding;
|
|
26362
26709
|
let nextChild = children[nextElementsIndex.start];
|
|
@@ -26367,17 +26714,17 @@ function Carousel({
|
|
|
26367
26714
|
}
|
|
26368
26715
|
const addGap = nextElementsIndex.start + count < items.length;
|
|
26369
26716
|
const diffWidth = containerWidth - accumulatedWidth + initialHorizontalPadding + (addGap ? gap2 : 0);
|
|
26370
|
-
|
|
26717
|
+
const shouldCenter = alignment === "center" && count === items.length;
|
|
26718
|
+
setPaddingElement(`${shouldCenter ? diffWidth / 2 : 0}px`);
|
|
26371
26719
|
setVisibleCount(count);
|
|
26372
26720
|
showedElementsRef.current = nextElementsIndex;
|
|
26373
|
-
setShowedElements(nextElementsIndex);
|
|
26374
26721
|
return {
|
|
26375
26722
|
childrenWidth: accumulatedWidth
|
|
26376
26723
|
};
|
|
26377
26724
|
},
|
|
26378
|
-
[gap2, getUsableWidth, items.length, padding2]
|
|
26725
|
+
[alignment, gap2, getUsableWidth, items.length, padding2]
|
|
26379
26726
|
);
|
|
26380
|
-
const updateVisibleCount =
|
|
26727
|
+
const updateVisibleCount = React88.useCallback(() => {
|
|
26381
26728
|
const root = rootRef.current;
|
|
26382
26729
|
const container = containerRef.current;
|
|
26383
26730
|
if (!container || !parent) {
|
|
@@ -26392,7 +26739,7 @@ function Carousel({
|
|
|
26392
26739
|
return;
|
|
26393
26740
|
}
|
|
26394
26741
|
const containerWidth = getUsableWidth(root);
|
|
26395
|
-
const initialHorizontalPadding = padding2 * 2;
|
|
26742
|
+
const initialHorizontalPadding = alignment === "left" ? 0 : padding2 * 2;
|
|
26396
26743
|
let count = 0;
|
|
26397
26744
|
let accumulatedWidth = initialHorizontalPadding;
|
|
26398
26745
|
for (const child of children) {
|
|
@@ -26405,12 +26752,12 @@ function Carousel({
|
|
|
26405
26752
|
}
|
|
26406
26753
|
const addGap = count < items.length;
|
|
26407
26754
|
const diffWidth = containerWidth - accumulatedWidth + initialHorizontalPadding + (addGap ? gap2 : 0);
|
|
26408
|
-
const
|
|
26755
|
+
const shouldCenter = alignment === "center" && count === items.length;
|
|
26756
|
+
const newPaddingSize = `${shouldCenter ? diffWidth / 2 : 0}px`;
|
|
26409
26757
|
setPaddingElement(newPaddingSize);
|
|
26410
26758
|
setVisibleCount(count);
|
|
26411
26759
|
const newVisible = { start: 0, end: count - 1 };
|
|
26412
26760
|
showedElementsRef.current = newVisible;
|
|
26413
|
-
setShowedElements(newVisible);
|
|
26414
26761
|
if (root) {
|
|
26415
26762
|
root.style.width = `${containerWidth}px`;
|
|
26416
26763
|
}
|
|
@@ -26420,10 +26767,11 @@ function Carousel({
|
|
|
26420
26767
|
padding2,
|
|
26421
26768
|
items.length,
|
|
26422
26769
|
gap2,
|
|
26770
|
+
alignment,
|
|
26423
26771
|
updateArrows,
|
|
26424
26772
|
resetCarousel
|
|
26425
26773
|
]);
|
|
26426
|
-
const getInitialWidth =
|
|
26774
|
+
const getInitialWidth = React88.useCallback(
|
|
26427
26775
|
(el) => {
|
|
26428
26776
|
let current = el;
|
|
26429
26777
|
let width2 = 0;
|
|
@@ -26441,7 +26789,7 @@ function Carousel({
|
|
|
26441
26789
|
},
|
|
26442
26790
|
[]
|
|
26443
26791
|
);
|
|
26444
|
-
const resizeObserverCallback =
|
|
26792
|
+
const resizeObserverCallback = React88.useCallback(() => {
|
|
26445
26793
|
if (!rootRef.current || !containerRef.current) {
|
|
26446
26794
|
return;
|
|
26447
26795
|
}
|
|
@@ -26452,7 +26800,7 @@ function Carousel({
|
|
|
26452
26800
|
previousClientWidth.current = newClientWidth;
|
|
26453
26801
|
updateVisibleCount();
|
|
26454
26802
|
}, [getInitialWidth, updateVisibleCount]);
|
|
26455
|
-
|
|
26803
|
+
React88.useEffect(() => {
|
|
26456
26804
|
const container = containerRef.current;
|
|
26457
26805
|
if (!container) {
|
|
26458
26806
|
return;
|
|
@@ -26491,7 +26839,7 @@ function Carousel({
|
|
|
26491
26839
|
};
|
|
26492
26840
|
const scrollHorizontal = ({
|
|
26493
26841
|
elementsIndex
|
|
26494
|
-
}
|
|
26842
|
+
}) => {
|
|
26495
26843
|
const container = containerRef.current;
|
|
26496
26844
|
const root = rootRef.current;
|
|
26497
26845
|
if (!container || !root) {
|
|
@@ -26499,17 +26847,13 @@ function Carousel({
|
|
|
26499
26847
|
}
|
|
26500
26848
|
const newMeasures = setMeasures(root, container, elementsIndex);
|
|
26501
26849
|
if (newMeasures) {
|
|
26502
|
-
const
|
|
26503
|
-
const targetLeft =
|
|
26504
|
-
container.scrollLeft - newMeasures.childrenWidth,
|
|
26505
|
-
0
|
|
26506
|
-
);
|
|
26850
|
+
const targetItem = container.children[elementsIndex.start];
|
|
26851
|
+
const targetLeft = targetItem?.offsetLeft ?? 0;
|
|
26507
26852
|
waitForSmoothScrollEnd(container, () => {
|
|
26508
26853
|
isScrolling.current = false;
|
|
26509
26854
|
updateArrows();
|
|
26510
26855
|
});
|
|
26511
26856
|
showedElementsRef.current = elementsIndex;
|
|
26512
|
-
setShowedElements(elementsIndex);
|
|
26513
26857
|
container.scrollTo({ left: targetLeft, behavior: "smooth" });
|
|
26514
26858
|
}
|
|
26515
26859
|
};
|
|
@@ -26544,21 +26888,21 @@ function Carousel({
|
|
|
26544
26888
|
elementsIndex: { start, end }
|
|
26545
26889
|
};
|
|
26546
26890
|
}
|
|
26547
|
-
scrollHorizontal(scrollData
|
|
26891
|
+
scrollHorizontal(scrollData);
|
|
26548
26892
|
};
|
|
26549
|
-
return /* @__PURE__ */
|
|
26893
|
+
return /* @__PURE__ */ jsx157(Box_default2, { ref: rootRef, width: "100%", children: /* @__PURE__ */ jsxs81(
|
|
26550
26894
|
Box_default2,
|
|
26551
26895
|
{
|
|
26552
26896
|
sx: {
|
|
26553
26897
|
position: "relative",
|
|
26554
26898
|
alignSelf: "center",
|
|
26555
|
-
padding: `${padding2}px`,
|
|
26556
|
-
...paddingElement && {
|
|
26557
|
-
padding: `${padding2}px ${paddingElement}`
|
|
26899
|
+
padding: `${alignment === "left" ? 0 : padding2}px`,
|
|
26900
|
+
...(paddingElement || alignment === "left") && {
|
|
26901
|
+
padding: `${alignment === "left" ? 0 : padding2}px ${paddingElement || "0px"}`
|
|
26558
26902
|
}
|
|
26559
26903
|
},
|
|
26560
26904
|
children: [
|
|
26561
|
-
/* @__PURE__ */
|
|
26905
|
+
/* @__PURE__ */ jsx157(
|
|
26562
26906
|
IconButton_default,
|
|
26563
26907
|
{
|
|
26564
26908
|
iconId: "chevron-left",
|
|
@@ -26571,11 +26915,12 @@ function Carousel({
|
|
|
26571
26915
|
onClick: () => scrollToNext("left")
|
|
26572
26916
|
}
|
|
26573
26917
|
),
|
|
26574
|
-
/* @__PURE__ */
|
|
26918
|
+
/* @__PURE__ */ jsx157(
|
|
26575
26919
|
Box_default2,
|
|
26576
26920
|
{
|
|
26577
26921
|
ref: containerRef,
|
|
26578
26922
|
sx: {
|
|
26923
|
+
position: "relative",
|
|
26579
26924
|
width: "100%",
|
|
26580
26925
|
overflowX: "hidden",
|
|
26581
26926
|
display: "flex",
|
|
@@ -26584,13 +26929,10 @@ function Carousel({
|
|
|
26584
26929
|
"::-webkit-scrollbar": { display: "none" },
|
|
26585
26930
|
gap: `${gap2}px`
|
|
26586
26931
|
},
|
|
26587
|
-
children: items.map((item, index) => /* @__PURE__ */
|
|
26932
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx157(
|
|
26588
26933
|
Box_default2,
|
|
26589
26934
|
{
|
|
26590
26935
|
sx: {
|
|
26591
|
-
...showedElements && (index < showedElements.start || index > showedElements.end) && {
|
|
26592
|
-
opacity: 0
|
|
26593
|
-
},
|
|
26594
26936
|
transition: "opacity 0.5s ease"
|
|
26595
26937
|
},
|
|
26596
26938
|
children: renderItem(item, index)
|
|
@@ -26599,7 +26941,7 @@ function Carousel({
|
|
|
26599
26941
|
))
|
|
26600
26942
|
}
|
|
26601
26943
|
),
|
|
26602
|
-
/* @__PURE__ */
|
|
26944
|
+
/* @__PURE__ */ jsx157(
|
|
26603
26945
|
IconButton_default,
|
|
26604
26946
|
{
|
|
26605
26947
|
iconId: "chevron-right",
|
|
@@ -26622,12 +26964,12 @@ var Carousel_default = Carousel;
|
|
|
26622
26964
|
import {
|
|
26623
26965
|
SnackbarProvider as NotistackSnackbarProvider
|
|
26624
26966
|
} from "notistack";
|
|
26625
|
-
import { jsx as
|
|
26967
|
+
import { jsx as jsx158 } from "react/jsx-runtime";
|
|
26626
26968
|
var SnackbarProvider = ({
|
|
26627
26969
|
children,
|
|
26628
26970
|
maxSnack = 3,
|
|
26629
26971
|
domRoot
|
|
26630
|
-
}) => /* @__PURE__ */
|
|
26972
|
+
}) => /* @__PURE__ */ jsx158(
|
|
26631
26973
|
NotistackSnackbarProvider,
|
|
26632
26974
|
{
|
|
26633
26975
|
maxSnack,
|
|
@@ -26645,10 +26987,10 @@ import {
|
|
|
26645
26987
|
} from "notistack";
|
|
26646
26988
|
|
|
26647
26989
|
// src/components/snackbar/Snackbar.tsx
|
|
26648
|
-
import * as
|
|
26990
|
+
import * as React89 from "react";
|
|
26649
26991
|
import { SnackbarContent } from "notistack";
|
|
26650
26992
|
import { Typography as Typography4 } from "@mui/material";
|
|
26651
|
-
import { jsx as
|
|
26993
|
+
import { jsx as jsx159, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
26652
26994
|
var sizeStyles5 = {
|
|
26653
26995
|
M: {
|
|
26654
26996
|
width: "344px",
|
|
@@ -26673,7 +27015,7 @@ var iconColors = {
|
|
|
26673
27015
|
error: error300,
|
|
26674
27016
|
warning: complementary300
|
|
26675
27017
|
};
|
|
26676
|
-
var Snackbar =
|
|
27018
|
+
var Snackbar = React89.forwardRef(
|
|
26677
27019
|
function Snackbar2({
|
|
26678
27020
|
severity = "info",
|
|
26679
27021
|
message,
|
|
@@ -26685,13 +27027,13 @@ var Snackbar = React87.forwardRef(
|
|
|
26685
27027
|
identifierKey: key,
|
|
26686
27028
|
dataTestKey
|
|
26687
27029
|
}, ref) {
|
|
26688
|
-
const actionClickHandler =
|
|
27030
|
+
const actionClickHandler = React89.useCallback(() => {
|
|
26689
27031
|
onActionClick && onActionClick(key);
|
|
26690
27032
|
}, [onActionClick, key]);
|
|
26691
|
-
const closeClickHandler =
|
|
27033
|
+
const closeClickHandler = React89.useCallback(() => {
|
|
26692
27034
|
onCloseClick && onCloseClick(key);
|
|
26693
27035
|
}, [onCloseClick, key]);
|
|
26694
|
-
return /* @__PURE__ */
|
|
27036
|
+
return /* @__PURE__ */ jsx159(
|
|
26695
27037
|
SnackbarContent,
|
|
26696
27038
|
{
|
|
26697
27039
|
ref,
|
|
@@ -26709,14 +27051,14 @@ var Snackbar = React87.forwardRef(
|
|
|
26709
27051
|
...dataTestKey && {
|
|
26710
27052
|
"data-test": dataTestKey
|
|
26711
27053
|
},
|
|
26712
|
-
children: /* @__PURE__ */
|
|
27054
|
+
children: /* @__PURE__ */ jsxs82(
|
|
26713
27055
|
Stack_default,
|
|
26714
27056
|
{
|
|
26715
27057
|
direction: "row",
|
|
26716
27058
|
spacing: 2,
|
|
26717
27059
|
sx: { width: "100%", alignItems: "center" },
|
|
26718
27060
|
children: [
|
|
26719
|
-
withIcon && /* @__PURE__ */
|
|
27061
|
+
withIcon && /* @__PURE__ */ jsx159(
|
|
26720
27062
|
Box_default2,
|
|
26721
27063
|
{
|
|
26722
27064
|
sx: {
|
|
@@ -26724,10 +27066,10 @@ var Snackbar = React87.forwardRef(
|
|
|
26724
27066
|
flexShrink: 0,
|
|
26725
27067
|
color: iconColors[severity]
|
|
26726
27068
|
},
|
|
26727
|
-
children: /* @__PURE__ */
|
|
27069
|
+
children: /* @__PURE__ */ jsx159(Icon_default, { id: severityIcons[severity] })
|
|
26728
27070
|
}
|
|
26729
27071
|
),
|
|
26730
|
-
/* @__PURE__ */
|
|
27072
|
+
/* @__PURE__ */ jsx159(
|
|
26731
27073
|
Typography4,
|
|
26732
27074
|
{
|
|
26733
27075
|
variant: "body2",
|
|
@@ -26735,7 +27077,7 @@ var Snackbar = React87.forwardRef(
|
|
|
26735
27077
|
children: message
|
|
26736
27078
|
}
|
|
26737
27079
|
),
|
|
26738
|
-
actionText && /* @__PURE__ */
|
|
27080
|
+
actionText && /* @__PURE__ */ jsx159(Box_default2, { sx: { flexGrow: 0, flexShrink: 0 }, children: /* @__PURE__ */ jsx159(
|
|
26739
27081
|
Button_default,
|
|
26740
27082
|
{
|
|
26741
27083
|
sx: {
|
|
@@ -26750,7 +27092,7 @@ var Snackbar = React87.forwardRef(
|
|
|
26750
27092
|
onClick: actionClickHandler
|
|
26751
27093
|
}
|
|
26752
27094
|
) }),
|
|
26753
|
-
/* @__PURE__ */
|
|
27095
|
+
/* @__PURE__ */ jsx159(Box_default2, { sx: { flexGrow: 0, flexShrink: 0 }, children: /* @__PURE__ */ jsx159(
|
|
26754
27096
|
IconButton_default,
|
|
26755
27097
|
{
|
|
26756
27098
|
iconId: "close",
|
|
@@ -26775,7 +27117,7 @@ var Snackbar_default = Snackbar;
|
|
|
26775
27117
|
|
|
26776
27118
|
// src/components/snackbar/enqueueSnackbar.tsx
|
|
26777
27119
|
import { closeSnackbar as closeSnackbar2 } from "notistack";
|
|
26778
|
-
import { jsx as
|
|
27120
|
+
import { jsx as jsx160 } from "react/jsx-runtime";
|
|
26779
27121
|
var enqueueSnackbar = (message, options = {}) => {
|
|
26780
27122
|
const {
|
|
26781
27123
|
persist,
|
|
@@ -26791,7 +27133,7 @@ var enqueueSnackbar = (message, options = {}) => {
|
|
|
26791
27133
|
autoHideDuration: autoHideDurationMs ?? 1e4,
|
|
26792
27134
|
persist: persist ?? false,
|
|
26793
27135
|
content(key, message2) {
|
|
26794
|
-
return /* @__PURE__ */
|
|
27136
|
+
return /* @__PURE__ */ jsx160(
|
|
26795
27137
|
Snackbar_default,
|
|
26796
27138
|
{
|
|
26797
27139
|
identifierKey: key,
|
|
@@ -26808,7 +27150,7 @@ var enqueueSnackbar = (message, options = {}) => {
|
|
|
26808
27150
|
|
|
26809
27151
|
// src/components/tab/TabButton.tsx
|
|
26810
27152
|
import MuiTab from "@mui/material/Tab";
|
|
26811
|
-
import { jsx as
|
|
27153
|
+
import { jsx as jsx161 } from "react/jsx-runtime";
|
|
26812
27154
|
var TabButton = ({
|
|
26813
27155
|
children,
|
|
26814
27156
|
disabled = false,
|
|
@@ -26816,10 +27158,10 @@ var TabButton = ({
|
|
|
26816
27158
|
marginRight = "0px",
|
|
26817
27159
|
dataTestId,
|
|
26818
27160
|
...rest
|
|
26819
|
-
}) => /* @__PURE__ */
|
|
27161
|
+
}) => /* @__PURE__ */ jsx161(
|
|
26820
27162
|
MuiTab,
|
|
26821
27163
|
{
|
|
26822
|
-
label: /* @__PURE__ */
|
|
27164
|
+
label: /* @__PURE__ */ jsx161(
|
|
26823
27165
|
"div",
|
|
26824
27166
|
{
|
|
26825
27167
|
style: {
|
|
@@ -26854,13 +27196,13 @@ var TabButton = ({
|
|
|
26854
27196
|
var TabButton_default = TabButton;
|
|
26855
27197
|
|
|
26856
27198
|
// src/components/tab/Tabs.tsx
|
|
26857
|
-
import * as
|
|
27199
|
+
import * as React91 from "react";
|
|
26858
27200
|
import MuiTabs from "@mui/material/Tabs";
|
|
26859
27201
|
|
|
26860
27202
|
// src/components/layout/SwipeableViews.tsx
|
|
26861
|
-
import * as
|
|
26862
|
-
import { useEffect as
|
|
26863
|
-
import { jsx as
|
|
27203
|
+
import * as React90 from "react";
|
|
27204
|
+
import { useEffect as useEffect25, useRef as useRef29, useState as useState36 } from "react";
|
|
27205
|
+
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
26864
27206
|
var styles = {
|
|
26865
27207
|
container: {
|
|
26866
27208
|
maxHeight: "100%",
|
|
@@ -26893,12 +27235,12 @@ function SwipeableViews({
|
|
|
26893
27235
|
disableScroll = false,
|
|
26894
27236
|
...rootProps
|
|
26895
27237
|
}) {
|
|
26896
|
-
const containerRef =
|
|
26897
|
-
const scrollTimeout =
|
|
26898
|
-
const scrollingMethod =
|
|
26899
|
-
const [previousIndex, setPreviousIndex] =
|
|
26900
|
-
const hideScrollAnimation =
|
|
26901
|
-
|
|
27238
|
+
const containerRef = useRef29(null);
|
|
27239
|
+
const scrollTimeout = useRef29(null);
|
|
27240
|
+
const scrollingMethod = useRef29("none");
|
|
27241
|
+
const [previousIndex, setPreviousIndex] = useState36(index);
|
|
27242
|
+
const hideScrollAnimation = useRef29(true);
|
|
27243
|
+
useEffect25(() => {
|
|
26902
27244
|
if (containerRef.current) {
|
|
26903
27245
|
if (scrollingMethod.current === "manual") {
|
|
26904
27246
|
scrollingMethod.current = "none";
|
|
@@ -26935,7 +27277,7 @@ function SwipeableViews({
|
|
|
26935
27277
|
}
|
|
26936
27278
|
}, [index]);
|
|
26937
27279
|
const hasShowTab = (childIndex) => childIndex === index || childIndex === previousIndex;
|
|
26938
|
-
return /* @__PURE__ */
|
|
27280
|
+
return /* @__PURE__ */ jsx162(
|
|
26939
27281
|
"div",
|
|
26940
27282
|
{
|
|
26941
27283
|
...rootProps,
|
|
@@ -26958,12 +27300,12 @@ function SwipeableViews({
|
|
|
26958
27300
|
);
|
|
26959
27301
|
}, 100);
|
|
26960
27302
|
},
|
|
26961
|
-
children:
|
|
27303
|
+
children: React90.Children.map(children, (child, childIndex) => {
|
|
26962
27304
|
let mountedChild = false;
|
|
26963
|
-
if (
|
|
27305
|
+
if (React90.isValidElement(child)) {
|
|
26964
27306
|
mountedChild = !!child.props.keepMounted;
|
|
26965
27307
|
}
|
|
26966
|
-
return /* @__PURE__ */
|
|
27308
|
+
return /* @__PURE__ */ jsx162(
|
|
26967
27309
|
"div",
|
|
26968
27310
|
{
|
|
26969
27311
|
style: Object.assign(
|
|
@@ -26988,7 +27330,7 @@ function SwipeableViews({
|
|
|
26988
27330
|
}
|
|
26989
27331
|
|
|
26990
27332
|
// src/components/tab/Tabs.tsx
|
|
26991
|
-
import { jsx as
|
|
27333
|
+
import { jsx as jsx163, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
26992
27334
|
var Tabs = ({
|
|
26993
27335
|
tabButtons,
|
|
26994
27336
|
children,
|
|
@@ -27003,8 +27345,8 @@ var Tabs = ({
|
|
|
27003
27345
|
hideLineTabs = false,
|
|
27004
27346
|
backgroundScrollButtons = Colors_exports.white
|
|
27005
27347
|
}) => {
|
|
27006
|
-
const tabsRef =
|
|
27007
|
-
const [value, setValue] =
|
|
27348
|
+
const tabsRef = React91.useRef(null);
|
|
27349
|
+
const [value, setValue] = React91.useState(0);
|
|
27008
27350
|
const measureTextWidthRange = (child) => {
|
|
27009
27351
|
const walker = document.createTreeWalker(child, NodeFilter.SHOW_TEXT, {
|
|
27010
27352
|
acceptNode: (node) => node.textContent?.trim() ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT
|
|
@@ -27018,7 +27360,7 @@ var Tabs = ({
|
|
|
27018
27360
|
const rect = range.getBoundingClientRect();
|
|
27019
27361
|
return Math.round(rect.width);
|
|
27020
27362
|
};
|
|
27021
|
-
const waitForSmoothScrollEnd =
|
|
27363
|
+
const waitForSmoothScrollEnd = React91.useCallback(
|
|
27022
27364
|
(container, onEnd) => {
|
|
27023
27365
|
let prev = container.scrollLeft;
|
|
27024
27366
|
let idleFrames = 0;
|
|
@@ -27042,7 +27384,7 @@ var Tabs = ({
|
|
|
27042
27384
|
},
|
|
27043
27385
|
[]
|
|
27044
27386
|
);
|
|
27045
|
-
const calculateIndicatorTabWidth =
|
|
27387
|
+
const calculateIndicatorTabWidth = React91.useCallback((index) => {
|
|
27046
27388
|
if (!tabsRef.current) {
|
|
27047
27389
|
return null;
|
|
27048
27390
|
}
|
|
@@ -27061,7 +27403,7 @@ var Tabs = ({
|
|
|
27061
27403
|
indicator.style.width = `${textWidth}px`;
|
|
27062
27404
|
indicator.style.left = `${left}px`;
|
|
27063
27405
|
}, []);
|
|
27064
|
-
|
|
27406
|
+
React91.useEffect(() => {
|
|
27065
27407
|
if (!tabsRef.current) {
|
|
27066
27408
|
return;
|
|
27067
27409
|
}
|
|
@@ -27087,7 +27429,7 @@ var Tabs = ({
|
|
|
27087
27429
|
bottom: 0,
|
|
27088
27430
|
borderRadius: "8px"
|
|
27089
27431
|
};
|
|
27090
|
-
return /* @__PURE__ */
|
|
27432
|
+
return /* @__PURE__ */ jsxs83(
|
|
27091
27433
|
Box_default2,
|
|
27092
27434
|
{
|
|
27093
27435
|
sx: {
|
|
@@ -27101,7 +27443,7 @@ var Tabs = ({
|
|
|
27101
27443
|
}
|
|
27102
27444
|
},
|
|
27103
27445
|
children: [
|
|
27104
|
-
/* @__PURE__ */
|
|
27446
|
+
/* @__PURE__ */ jsx163(
|
|
27105
27447
|
MuiTabs,
|
|
27106
27448
|
{
|
|
27107
27449
|
ref: tabsRef,
|
|
@@ -27140,7 +27482,7 @@ var Tabs = ({
|
|
|
27140
27482
|
children: tabButtons
|
|
27141
27483
|
}
|
|
27142
27484
|
),
|
|
27143
|
-
/* @__PURE__ */
|
|
27485
|
+
/* @__PURE__ */ jsx163(
|
|
27144
27486
|
Box_default2,
|
|
27145
27487
|
{
|
|
27146
27488
|
sx: {
|
|
@@ -27149,7 +27491,7 @@ var Tabs = ({
|
|
|
27149
27491
|
height: "100%"
|
|
27150
27492
|
}
|
|
27151
27493
|
},
|
|
27152
|
-
children: /* @__PURE__ */
|
|
27494
|
+
children: /* @__PURE__ */ jsx163(
|
|
27153
27495
|
SwipeableViews,
|
|
27154
27496
|
{
|
|
27155
27497
|
index: currentTabIndex ?? value,
|
|
@@ -27178,8 +27520,8 @@ var Tabs = ({
|
|
|
27178
27520
|
var Tabs_default = Tabs;
|
|
27179
27521
|
|
|
27180
27522
|
// src/components/tab/TabContent.tsx
|
|
27181
|
-
import { jsx as
|
|
27182
|
-
var TabContent = ({ children }) => /* @__PURE__ */
|
|
27523
|
+
import { jsx as jsx164 } from "react/jsx-runtime";
|
|
27524
|
+
var TabContent = ({ children }) => /* @__PURE__ */ jsx164(
|
|
27183
27525
|
Box_default2,
|
|
27184
27526
|
{
|
|
27185
27527
|
sx: {
|
|
@@ -27196,8 +27538,8 @@ import {
|
|
|
27196
27538
|
TableRow as MuiTableRow,
|
|
27197
27539
|
TableCell as MuiTableCell
|
|
27198
27540
|
} from "@mui/material";
|
|
27199
|
-
import { jsx as
|
|
27200
|
-
var TableDivider = () => /* @__PURE__ */
|
|
27541
|
+
import { jsx as jsx165 } from "react/jsx-runtime";
|
|
27542
|
+
var TableDivider = () => /* @__PURE__ */ jsx165(MuiTableRow, { children: /* @__PURE__ */ jsx165(
|
|
27201
27543
|
MuiTableCell,
|
|
27202
27544
|
{
|
|
27203
27545
|
colSpan: 1e3,
|
|
@@ -27210,8 +27552,8 @@ var TableDivider_default = TableDivider;
|
|
|
27210
27552
|
import {
|
|
27211
27553
|
TableSortLabel as MuiTableSortLabel
|
|
27212
27554
|
} from "@mui/material";
|
|
27213
|
-
import { jsx as
|
|
27214
|
-
var TableSortLabel = ({ children, ...rest }) => /* @__PURE__ */
|
|
27555
|
+
import { jsx as jsx166 } from "react/jsx-runtime";
|
|
27556
|
+
var TableSortLabel = ({ children, ...rest }) => /* @__PURE__ */ jsx166(MuiTableSortLabel, { ...rest, children });
|
|
27215
27557
|
var TableSortLabel_default = TableSortLabel;
|
|
27216
27558
|
|
|
27217
27559
|
// src/components/table/Table.tsx
|
|
@@ -27219,21 +27561,21 @@ import {
|
|
|
27219
27561
|
TableContainer,
|
|
27220
27562
|
Table as MuiTable
|
|
27221
27563
|
} from "@mui/material";
|
|
27222
|
-
import { jsx as
|
|
27223
|
-
var Table = ({ children, sx, className }) => /* @__PURE__ */
|
|
27564
|
+
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
27565
|
+
var Table = ({ children, sx, className }) => /* @__PURE__ */ jsx167(TableContainer, { className: "Slim-Horizontal-Scroll", children: /* @__PURE__ */ jsx167(MuiTable, { sx: { backgroundColor: white, ...sx }, className, children }) });
|
|
27224
27566
|
var Table_default = Table;
|
|
27225
27567
|
|
|
27226
27568
|
// src/components/table/TableBody.tsx
|
|
27227
27569
|
import { TableBody as MuiTableBody } from "@mui/material";
|
|
27228
|
-
import { jsx as
|
|
27229
|
-
var TableBody = ({ children }) => /* @__PURE__ */
|
|
27570
|
+
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
27571
|
+
var TableBody = ({ children }) => /* @__PURE__ */ jsx168(MuiTableBody, { children });
|
|
27230
27572
|
var TableBody_default = TableBody;
|
|
27231
27573
|
|
|
27232
27574
|
// src/components/table/TableCell.tsx
|
|
27233
27575
|
import {
|
|
27234
27576
|
TableCell as MuiTableCell2
|
|
27235
27577
|
} from "@mui/material";
|
|
27236
|
-
import { jsx as
|
|
27578
|
+
import { jsx as jsx169 } from "react/jsx-runtime";
|
|
27237
27579
|
var TableCell = ({
|
|
27238
27580
|
children,
|
|
27239
27581
|
size = "M",
|
|
@@ -27244,7 +27586,7 @@ var TableCell = ({
|
|
|
27244
27586
|
onClick,
|
|
27245
27587
|
noBorder = false,
|
|
27246
27588
|
...rest
|
|
27247
|
-
}) => /* @__PURE__ */
|
|
27589
|
+
}) => /* @__PURE__ */ jsx169(
|
|
27248
27590
|
MuiTableCell2,
|
|
27249
27591
|
{
|
|
27250
27592
|
...rest,
|
|
@@ -27268,12 +27610,12 @@ var TableCell = ({
|
|
|
27268
27610
|
var TableCell_default = TableCell;
|
|
27269
27611
|
|
|
27270
27612
|
// src/components/table/TableCellCopy.tsx
|
|
27271
|
-
import * as
|
|
27272
|
-
import { jsx as
|
|
27613
|
+
import * as React92 from "react";
|
|
27614
|
+
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
27273
27615
|
var TableCellCopy = ({ text, textToCopy, ...rest }) => {
|
|
27274
27616
|
const { t } = useTranslation();
|
|
27275
|
-
const [isCopied, setIsCopied] =
|
|
27276
|
-
const [showIcon, setShowIcon] =
|
|
27617
|
+
const [isCopied, setIsCopied] = React92.useState(false);
|
|
27618
|
+
const [showIcon, setShowIcon] = React92.useState(false);
|
|
27277
27619
|
const manageButtonClicked = () => {
|
|
27278
27620
|
void navigator.clipboard.writeText(textToCopy ?? text);
|
|
27279
27621
|
if (isCopied) {
|
|
@@ -27287,7 +27629,7 @@ var TableCellCopy = ({ text, textToCopy, ...rest }) => {
|
|
|
27287
27629
|
const getIconId = () => !isCopied ? "content-copy" : "check";
|
|
27288
27630
|
const iconHiddenClass = "icon-hidden";
|
|
27289
27631
|
const iconCopiedClass = "icon-copied";
|
|
27290
|
-
return /* @__PURE__ */
|
|
27632
|
+
return /* @__PURE__ */ jsx170(TableCell_default, { ...rest, sx: { padding: 0 }, children: /* @__PURE__ */ jsx170(
|
|
27291
27633
|
Stack_default,
|
|
27292
27634
|
{
|
|
27293
27635
|
direction: "row",
|
|
@@ -27296,7 +27638,7 @@ var TableCellCopy = ({ text, textToCopy, ...rest }) => {
|
|
|
27296
27638
|
onMouseEnter: () => setShowIcon(true),
|
|
27297
27639
|
onMouseLeave: () => setShowIcon(false),
|
|
27298
27640
|
onClick: manageButtonClicked,
|
|
27299
|
-
children: /* @__PURE__ */
|
|
27641
|
+
children: /* @__PURE__ */ jsx170(Tooltip_default, { title: t(!isCopied ? "COPY" : "COPIED"), children: /* @__PURE__ */ jsx170(
|
|
27300
27642
|
Button_default,
|
|
27301
27643
|
{
|
|
27302
27644
|
className: isCopied ? iconCopiedClass : !showIcon ? iconHiddenClass : "",
|
|
@@ -27326,21 +27668,21 @@ var TableCellCopy_default = TableCellCopy;
|
|
|
27326
27668
|
|
|
27327
27669
|
// src/components/table/TableHead.tsx
|
|
27328
27670
|
import { TableHead as MuiTableHead } from "@mui/material";
|
|
27329
|
-
import { jsx as
|
|
27330
|
-
var TableHead = ({ children }) => /* @__PURE__ */
|
|
27671
|
+
import { jsx as jsx171 } from "react/jsx-runtime";
|
|
27672
|
+
var TableHead = ({ children }) => /* @__PURE__ */ jsx171(MuiTableHead, { children });
|
|
27331
27673
|
var TableHead_default = TableHead;
|
|
27332
27674
|
|
|
27333
27675
|
// src/components/table/TableRow.tsx
|
|
27334
27676
|
import {
|
|
27335
27677
|
TableRow as MuiTableRow2
|
|
27336
27678
|
} from "@mui/material";
|
|
27337
|
-
import { jsx as
|
|
27679
|
+
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
27338
27680
|
var TableRow = ({
|
|
27339
27681
|
children,
|
|
27340
27682
|
isFollowedByNestedTable = false,
|
|
27341
27683
|
fadeInLeftAnimation = false,
|
|
27342
27684
|
sx
|
|
27343
|
-
}) => /* @__PURE__ */
|
|
27685
|
+
}) => /* @__PURE__ */ jsx172(
|
|
27344
27686
|
MuiTableRow2,
|
|
27345
27687
|
{
|
|
27346
27688
|
className: `${isFollowedByNestedTable ? "Followed-By-Nested-Table" : ""} ${fadeInLeftAnimation ? "animated fadeInLeft" : ""}`,
|
|
@@ -27352,14 +27694,14 @@ var TableRow_default = TableRow;
|
|
|
27352
27694
|
|
|
27353
27695
|
// src/components/table/NestedTable.tsx
|
|
27354
27696
|
import { Collapse as Collapse7 } from "@mui/material";
|
|
27355
|
-
import { jsx as
|
|
27697
|
+
import { jsx as jsx173 } from "react/jsx-runtime";
|
|
27356
27698
|
var NestedTable = ({
|
|
27357
27699
|
colSpan,
|
|
27358
27700
|
children,
|
|
27359
27701
|
className = "",
|
|
27360
27702
|
sx,
|
|
27361
27703
|
isVisible = true
|
|
27362
|
-
}) => /* @__PURE__ */
|
|
27704
|
+
}) => /* @__PURE__ */ jsx173(TableRow_default, { children: /* @__PURE__ */ jsx173(
|
|
27363
27705
|
TableCell_default,
|
|
27364
27706
|
{
|
|
27365
27707
|
colSpan,
|
|
@@ -27368,14 +27710,14 @@ var NestedTable = ({
|
|
|
27368
27710
|
height: "auto",
|
|
27369
27711
|
...!isVisible && { borderBottom: "none" }
|
|
27370
27712
|
},
|
|
27371
|
-
children: /* @__PURE__ */
|
|
27713
|
+
children: /* @__PURE__ */ jsx173(Collapse7, { in: isVisible, children: /* @__PURE__ */ jsx173(Box_default2, { sx: { padding: "16px", backgroundColor: grey100 }, children: /* @__PURE__ */ jsx173(Paper_default, { children: /* @__PURE__ */ jsx173(Table_default, { sx, className: `Nested-Table ${className}`, children }) }) }) })
|
|
27372
27714
|
}
|
|
27373
27715
|
) });
|
|
27374
27716
|
var NestedTable_default = NestedTable;
|
|
27375
27717
|
|
|
27376
27718
|
// src/components/toolbar/ToolbarBreadcrumb.tsx
|
|
27377
|
-
import { jsx as
|
|
27378
|
-
var ToolbarBreadcrumb = ({ parts = [] }) => /* @__PURE__ */
|
|
27719
|
+
import { jsx as jsx174 } from "react/jsx-runtime";
|
|
27720
|
+
var ToolbarBreadcrumb = ({ parts = [] }) => /* @__PURE__ */ jsx174(
|
|
27379
27721
|
Stack_default,
|
|
27380
27722
|
{
|
|
27381
27723
|
direction: "row",
|
|
@@ -27385,7 +27727,7 @@ var ToolbarBreadcrumb = ({ parts = [] }) => /* @__PURE__ */ jsx168(
|
|
|
27385
27727
|
(previous, current, index) => [
|
|
27386
27728
|
...previous,
|
|
27387
27729
|
...index > 0 ? [
|
|
27388
|
-
/* @__PURE__ */
|
|
27730
|
+
/* @__PURE__ */ jsx174(
|
|
27389
27731
|
Typography_default,
|
|
27390
27732
|
{
|
|
27391
27733
|
color: grey500,
|
|
@@ -27408,10 +27750,10 @@ var ToolbarBreadcrumb_default = ToolbarBreadcrumb;
|
|
|
27408
27750
|
|
|
27409
27751
|
// src/components/toolbar/ToolbarBreadcrumbButton.tsx
|
|
27410
27752
|
import { ButtonBase as ButtonBase5 } from "@mui/material";
|
|
27411
|
-
import * as
|
|
27412
|
-
import { jsx as
|
|
27413
|
-
var ToolbarBreadcrumbButton =
|
|
27414
|
-
return /* @__PURE__ */
|
|
27753
|
+
import * as React93 from "react";
|
|
27754
|
+
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
27755
|
+
var ToolbarBreadcrumbButton = React93.forwardRef(function ToolbarBreadcrumbButton2({ text, className, ...rest }, ref) {
|
|
27756
|
+
return /* @__PURE__ */ jsx175(
|
|
27415
27757
|
ButtonBase5,
|
|
27416
27758
|
{
|
|
27417
27759
|
className: `Cn-ToolbarBreadcrumbButton ${className}`,
|
|
@@ -27430,14 +27772,14 @@ var ToolbarBreadcrumbButton = React91.forwardRef(function ToolbarBreadcrumbButto
|
|
|
27430
27772
|
}
|
|
27431
27773
|
},
|
|
27432
27774
|
...rest,
|
|
27433
|
-
children: /* @__PURE__ */
|
|
27775
|
+
children: /* @__PURE__ */ jsx175(Typography_default, { color: "inherit", component: "div", variant: "h6", noWrap: true, children: text })
|
|
27434
27776
|
}
|
|
27435
27777
|
);
|
|
27436
27778
|
});
|
|
27437
27779
|
var ToolbarBreadcrumbButton_default = ToolbarBreadcrumbButton;
|
|
27438
27780
|
|
|
27439
27781
|
// src/components/toolbar/Toolbar.tsx
|
|
27440
|
-
import { jsx as
|
|
27782
|
+
import { jsx as jsx176, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
27441
27783
|
var Toolbar = ({
|
|
27442
27784
|
children,
|
|
27443
27785
|
rightActions,
|
|
@@ -27446,7 +27788,7 @@ var Toolbar = ({
|
|
|
27446
27788
|
sx,
|
|
27447
27789
|
dataTestId,
|
|
27448
27790
|
onClickToolbar
|
|
27449
|
-
}) => /* @__PURE__ */
|
|
27791
|
+
}) => /* @__PURE__ */ jsxs84(
|
|
27450
27792
|
Box_default2,
|
|
27451
27793
|
{
|
|
27452
27794
|
className: `Cn-Toolbar ${className}`,
|
|
@@ -27466,7 +27808,7 @@ var Toolbar = ({
|
|
|
27466
27808
|
onClick: onClickToolbar,
|
|
27467
27809
|
"data-testid": dataTestId,
|
|
27468
27810
|
children: [
|
|
27469
|
-
/* @__PURE__ */
|
|
27811
|
+
/* @__PURE__ */ jsxs84(
|
|
27470
27812
|
Box_default2,
|
|
27471
27813
|
{
|
|
27472
27814
|
sx: {
|
|
@@ -27478,7 +27820,7 @@ var Toolbar = ({
|
|
|
27478
27820
|
width: "100%"
|
|
27479
27821
|
},
|
|
27480
27822
|
children: [
|
|
27481
|
-
leftActions && /* @__PURE__ */
|
|
27823
|
+
leftActions && /* @__PURE__ */ jsx176(
|
|
27482
27824
|
Box_default2,
|
|
27483
27825
|
{
|
|
27484
27826
|
className: `Cn-Toolbar-left`,
|
|
@@ -27488,7 +27830,7 @@ var Toolbar = ({
|
|
|
27488
27830
|
children: leftActions
|
|
27489
27831
|
}
|
|
27490
27832
|
),
|
|
27491
|
-
/* @__PURE__ */
|
|
27833
|
+
/* @__PURE__ */ jsx176(
|
|
27492
27834
|
Box_default2,
|
|
27493
27835
|
{
|
|
27494
27836
|
className: `Cn-Toolbar-children`,
|
|
@@ -27503,7 +27845,7 @@ var Toolbar = ({
|
|
|
27503
27845
|
]
|
|
27504
27846
|
}
|
|
27505
27847
|
),
|
|
27506
|
-
rightActions && /* @__PURE__ */
|
|
27848
|
+
rightActions && /* @__PURE__ */ jsx176(
|
|
27507
27849
|
Box_default2,
|
|
27508
27850
|
{
|
|
27509
27851
|
className: `Cn-Toolbar-right`,
|
|
@@ -27522,26 +27864,26 @@ var Toolbar = ({
|
|
|
27522
27864
|
var Toolbar_default = Toolbar;
|
|
27523
27865
|
|
|
27524
27866
|
// src/components/toolbar/ToolbarTitle.tsx
|
|
27525
|
-
import * as
|
|
27526
|
-
import { useState as
|
|
27527
|
-
import { jsx as
|
|
27528
|
-
var ToolbarTitle =
|
|
27867
|
+
import * as React94 from "react";
|
|
27868
|
+
import { useState as useState39 } from "react";
|
|
27869
|
+
import { jsx as jsx177, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
27870
|
+
var ToolbarTitle = React94.forwardRef(function ToolbarTitle2({
|
|
27529
27871
|
title,
|
|
27530
27872
|
align = "left",
|
|
27531
27873
|
className,
|
|
27532
27874
|
hoverActions,
|
|
27533
27875
|
color: color2 = grey900
|
|
27534
27876
|
}, ref) {
|
|
27535
|
-
const textElementRef =
|
|
27877
|
+
const textElementRef = React94.useRef(
|
|
27536
27878
|
null
|
|
27537
27879
|
);
|
|
27538
|
-
const [showHoverActions, setShowHoverActions] =
|
|
27539
|
-
return /* @__PURE__ */
|
|
27880
|
+
const [showHoverActions, setShowHoverActions] = useState39(false);
|
|
27881
|
+
return /* @__PURE__ */ jsx177(Box_default2, { sx: { maxWidth: "100%" }, children: /* @__PURE__ */ jsx177(
|
|
27540
27882
|
TextEllipsisTooltip_default,
|
|
27541
27883
|
{
|
|
27542
27884
|
title: title ?? "\xA0",
|
|
27543
27885
|
textEllipsableElement: textElementRef,
|
|
27544
|
-
children: /* @__PURE__ */
|
|
27886
|
+
children: /* @__PURE__ */ jsxs85(
|
|
27545
27887
|
Typography_default,
|
|
27546
27888
|
{
|
|
27547
27889
|
color: color2,
|
|
@@ -27559,7 +27901,7 @@ var ToolbarTitle = React92.forwardRef(function ToolbarTitle2({
|
|
|
27559
27901
|
},
|
|
27560
27902
|
children: [
|
|
27561
27903
|
title || "\xA0",
|
|
27562
|
-
hoverActions && showHoverActions && /* @__PURE__ */
|
|
27904
|
+
hoverActions && showHoverActions && /* @__PURE__ */ jsx177(
|
|
27563
27905
|
Box_default2,
|
|
27564
27906
|
{
|
|
27565
27907
|
sx: {
|
|
@@ -27588,13 +27930,13 @@ var Slide_default = Slide;
|
|
|
27588
27930
|
|
|
27589
27931
|
// src/components/widget/WidgetLegendItem.tsx
|
|
27590
27932
|
import { ButtonBase as ButtonBase6 } from "@mui/material";
|
|
27591
|
-
import { jsx as
|
|
27933
|
+
import { jsx as jsx178, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
27592
27934
|
var WidgetLegendItem = ({
|
|
27593
27935
|
groupLabel,
|
|
27594
27936
|
legendDirection = "column",
|
|
27595
27937
|
items = [],
|
|
27596
27938
|
onClick
|
|
27597
|
-
}) => /* @__PURE__ */
|
|
27939
|
+
}) => /* @__PURE__ */ jsx178(
|
|
27598
27940
|
ButtonBase6,
|
|
27599
27941
|
{
|
|
27600
27942
|
tabIndex: onClick ? 0 : -1,
|
|
@@ -27608,7 +27950,7 @@ var WidgetLegendItem = ({
|
|
|
27608
27950
|
p: "2px 12px",
|
|
27609
27951
|
cursor: onClick ? "pointer" : "default"
|
|
27610
27952
|
},
|
|
27611
|
-
children: /* @__PURE__ */
|
|
27953
|
+
children: /* @__PURE__ */ jsxs86(
|
|
27612
27954
|
Box_default2,
|
|
27613
27955
|
{
|
|
27614
27956
|
sx: {
|
|
@@ -27620,7 +27962,7 @@ var WidgetLegendItem = ({
|
|
|
27620
27962
|
color: grey800
|
|
27621
27963
|
},
|
|
27622
27964
|
children: [
|
|
27623
|
-
groupLabel && /* @__PURE__ */
|
|
27965
|
+
groupLabel && /* @__PURE__ */ jsx178(
|
|
27624
27966
|
Typography_default,
|
|
27625
27967
|
{
|
|
27626
27968
|
variant: "overline",
|
|
@@ -27642,7 +27984,7 @@ var WidgetLegendItem = ({
|
|
|
27642
27984
|
style: style3
|
|
27643
27985
|
}, i) => {
|
|
27644
27986
|
const incrementLabelIconId = incrementLabelType && incrementLabelStyles[incrementLabelType].icon;
|
|
27645
|
-
return /* @__PURE__ */
|
|
27987
|
+
return /* @__PURE__ */ jsxs86(
|
|
27646
27988
|
Box_default2,
|
|
27647
27989
|
{
|
|
27648
27990
|
sx: {
|
|
@@ -27652,7 +27994,7 @@ var WidgetLegendItem = ({
|
|
|
27652
27994
|
paddingRight: legendDirection === "row" ? "12px" : "inherit"
|
|
27653
27995
|
},
|
|
27654
27996
|
children: [
|
|
27655
|
-
iconColor && /* @__PURE__ */
|
|
27997
|
+
iconColor && /* @__PURE__ */ jsx178(
|
|
27656
27998
|
Icon_default,
|
|
27657
27999
|
{
|
|
27658
28000
|
id: iconId,
|
|
@@ -27663,7 +28005,7 @@ var WidgetLegendItem = ({
|
|
|
27663
28005
|
size: iconSize
|
|
27664
28006
|
}
|
|
27665
28007
|
),
|
|
27666
|
-
label && /* @__PURE__ */
|
|
28008
|
+
label && /* @__PURE__ */ jsx178(
|
|
27667
28009
|
Typography_default,
|
|
27668
28010
|
{
|
|
27669
28011
|
variant: "caption",
|
|
@@ -27672,7 +28014,7 @@ var WidgetLegendItem = ({
|
|
|
27672
28014
|
children: label
|
|
27673
28015
|
}
|
|
27674
28016
|
),
|
|
27675
|
-
value && /* @__PURE__ */
|
|
28017
|
+
value && /* @__PURE__ */ jsx178(
|
|
27676
28018
|
Typography_default,
|
|
27677
28019
|
{
|
|
27678
28020
|
sx: style3,
|
|
@@ -27681,7 +28023,7 @@ var WidgetLegendItem = ({
|
|
|
27681
28023
|
children: value
|
|
27682
28024
|
}
|
|
27683
28025
|
),
|
|
27684
|
-
incrementLabelValue && /* @__PURE__ */
|
|
28026
|
+
incrementLabelValue && /* @__PURE__ */ jsx178(
|
|
27685
28027
|
IncrementLabel_default,
|
|
27686
28028
|
{
|
|
27687
28029
|
label: incrementLabelValue,
|
|
@@ -27707,8 +28049,8 @@ var WidgetLegendItem_default = WidgetLegendItem;
|
|
|
27707
28049
|
|
|
27708
28050
|
// src/components/widget/Widget.tsx
|
|
27709
28051
|
import MuiCard2 from "@mui/material/Card";
|
|
27710
|
-
import { jsx as
|
|
27711
|
-
var Widget = ({ children }) => /* @__PURE__ */
|
|
28052
|
+
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
28053
|
+
var Widget = ({ children }) => /* @__PURE__ */ jsx179(
|
|
27712
28054
|
MuiCard2,
|
|
27713
28055
|
{
|
|
27714
28056
|
variant: "elevation",
|
|
@@ -27732,8 +28074,8 @@ var Widget = ({ children }) => /* @__PURE__ */ jsx173(
|
|
|
27732
28074
|
var Widget_default = Widget;
|
|
27733
28075
|
|
|
27734
28076
|
// src/components/widget/WidgetActions.tsx
|
|
27735
|
-
import { jsx as
|
|
27736
|
-
var WidgetActions = ({ children }) => /* @__PURE__ */
|
|
28077
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
28078
|
+
var WidgetActions = ({ children }) => /* @__PURE__ */ jsx180(
|
|
27737
28079
|
Box_default2,
|
|
27738
28080
|
{
|
|
27739
28081
|
sx: {
|
|
@@ -27747,8 +28089,8 @@ var WidgetActions = ({ children }) => /* @__PURE__ */ jsx174(
|
|
|
27747
28089
|
var WidgetActions_default = WidgetActions;
|
|
27748
28090
|
|
|
27749
28091
|
// src/components/widget/WidgetTitle.tsx
|
|
27750
|
-
import { jsx as
|
|
27751
|
-
var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE__ */
|
|
28092
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
28093
|
+
var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE__ */ jsx181(
|
|
27752
28094
|
Box_default2,
|
|
27753
28095
|
{
|
|
27754
28096
|
sx: {
|
|
@@ -27758,7 +28100,7 @@ var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE
|
|
|
27758
28100
|
maxWidth: "100%",
|
|
27759
28101
|
...sx
|
|
27760
28102
|
},
|
|
27761
|
-
children: /* @__PURE__ */
|
|
28103
|
+
children: /* @__PURE__ */ jsx181(
|
|
27762
28104
|
Typography_default,
|
|
27763
28105
|
{
|
|
27764
28106
|
variant: "subtitle2",
|
|
@@ -27772,12 +28114,12 @@ var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE
|
|
|
27772
28114
|
}
|
|
27773
28115
|
)
|
|
27774
28116
|
}
|
|
27775
|
-
) : /* @__PURE__ */
|
|
28117
|
+
) : /* @__PURE__ */ jsx181("span", {});
|
|
27776
28118
|
var WidgetTitle_default = WidgetTitle;
|
|
27777
28119
|
|
|
27778
28120
|
// src/components/window/MinimizableWindow.tsx
|
|
27779
|
-
import * as
|
|
27780
|
-
import { Fragment as
|
|
28121
|
+
import * as React95 from "react";
|
|
28122
|
+
import { Fragment as Fragment42, jsx as jsx182, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
27781
28123
|
var sizes6 = {
|
|
27782
28124
|
M: 400,
|
|
27783
28125
|
L: 500,
|
|
@@ -27802,7 +28144,7 @@ var iconButtonsStyles = {
|
|
|
27802
28144
|
backgroundColor: "rgba(255, 255, 255, 0.2)"
|
|
27803
28145
|
}
|
|
27804
28146
|
};
|
|
27805
|
-
var MinimizableWindow =
|
|
28147
|
+
var MinimizableWindow = React95.forwardRef(function MinimizableWindow2({
|
|
27806
28148
|
children,
|
|
27807
28149
|
title,
|
|
27808
28150
|
size = "M",
|
|
@@ -27822,17 +28164,17 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27822
28164
|
onBack
|
|
27823
28165
|
}, ref) {
|
|
27824
28166
|
const { t } = useTranslation();
|
|
27825
|
-
const overlayRef =
|
|
27826
|
-
const windowRef =
|
|
27827
|
-
const headerRef =
|
|
27828
|
-
const [isDraggingState, setIsDraggingState] =
|
|
27829
|
-
const diffRef =
|
|
27830
|
-
|
|
28167
|
+
const overlayRef = React95.useRef(null);
|
|
28168
|
+
const windowRef = React95.useRef(null);
|
|
28169
|
+
const headerRef = React95.useRef(null);
|
|
28170
|
+
const [isDraggingState, setIsDraggingState] = React95.useState(false);
|
|
28171
|
+
const diffRef = React95.useRef({ x: 0, y: 0 });
|
|
28172
|
+
React95.useImperativeHandle(ref, () => ({
|
|
27831
28173
|
window: windowRef.current,
|
|
27832
28174
|
header: headerRef.current,
|
|
27833
28175
|
overlay: overlayRef.current
|
|
27834
28176
|
}));
|
|
27835
|
-
|
|
28177
|
+
React95.useEffect(() => {
|
|
27836
28178
|
if (open) {
|
|
27837
28179
|
overlayRef.current?.style.removeProperty("transform");
|
|
27838
28180
|
overlayRef.current?.style.removeProperty("opacity");
|
|
@@ -27894,8 +28236,8 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27894
28236
|
}
|
|
27895
28237
|
}, 750);
|
|
27896
28238
|
};
|
|
27897
|
-
return /* @__PURE__ */
|
|
27898
|
-
isDraggingState && /* @__PURE__ */
|
|
28239
|
+
return /* @__PURE__ */ jsxs87(Fragment42, { children: [
|
|
28240
|
+
isDraggingState && /* @__PURE__ */ jsx182(
|
|
27899
28241
|
Box_default2,
|
|
27900
28242
|
{
|
|
27901
28243
|
sx: {
|
|
@@ -27911,7 +28253,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27911
28253
|
onMouseMove: (ev) => handleMouseMove(ev)
|
|
27912
28254
|
}
|
|
27913
28255
|
),
|
|
27914
|
-
/* @__PURE__ */
|
|
28256
|
+
/* @__PURE__ */ jsx182(
|
|
27915
28257
|
Box_default2,
|
|
27916
28258
|
{
|
|
27917
28259
|
ref: overlayRef,
|
|
@@ -27928,7 +28270,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27928
28270
|
...!open && { pointerEvents: "none" },
|
|
27929
28271
|
transition: "transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), left 0.4s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
27930
28272
|
},
|
|
27931
|
-
children: /* @__PURE__ */
|
|
28273
|
+
children: /* @__PURE__ */ jsxs87(
|
|
27932
28274
|
Stack_default,
|
|
27933
28275
|
{
|
|
27934
28276
|
sx: {
|
|
@@ -27939,7 +28281,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27939
28281
|
width: `${sizes6[size]}px`,
|
|
27940
28282
|
height: contentHeight !== void 0 && headerRef.current ? `${contentHeight + contentPadding + headerRef.current.scrollHeight}px` : void 0,
|
|
27941
28283
|
children: [
|
|
27942
|
-
/* @__PURE__ */
|
|
28284
|
+
/* @__PURE__ */ jsxs87(
|
|
27943
28285
|
Stack_default,
|
|
27944
28286
|
{
|
|
27945
28287
|
ref: headerRef,
|
|
@@ -27953,19 +28295,19 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27953
28295
|
onMouseDown: handleMouseDown,
|
|
27954
28296
|
minHeight: "44px",
|
|
27955
28297
|
children: [
|
|
27956
|
-
/* @__PURE__ */
|
|
28298
|
+
/* @__PURE__ */ jsx182(
|
|
27957
28299
|
Stack_default,
|
|
27958
28300
|
{
|
|
27959
28301
|
direction: "row",
|
|
27960
28302
|
alignItems: "center",
|
|
27961
28303
|
onMouseDown: (ev) => ev.stopPropagation(),
|
|
27962
|
-
children: showBackButton && (!backButton ? /* @__PURE__ */
|
|
28304
|
+
children: showBackButton && (!backButton ? /* @__PURE__ */ jsx182(
|
|
27963
28305
|
Tooltip_default,
|
|
27964
28306
|
{
|
|
27965
28307
|
title: t("MINIMIZABLE_WINDOW.GO_BACK"),
|
|
27966
28308
|
zIndex: 999999,
|
|
27967
28309
|
placement: "top",
|
|
27968
|
-
children: /* @__PURE__ */
|
|
28310
|
+
children: /* @__PURE__ */ jsx182(
|
|
27969
28311
|
IconButton_default,
|
|
27970
28312
|
{
|
|
27971
28313
|
size: iconSizes4,
|
|
@@ -27978,7 +28320,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27978
28320
|
) : backButton)
|
|
27979
28321
|
}
|
|
27980
28322
|
),
|
|
27981
|
-
/* @__PURE__ */
|
|
28323
|
+
/* @__PURE__ */ jsx182(
|
|
27982
28324
|
Box_default2,
|
|
27983
28325
|
{
|
|
27984
28326
|
sx: {
|
|
@@ -27986,23 +28328,23 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27986
28328
|
left: "50%",
|
|
27987
28329
|
transform: "translateX(-50%)"
|
|
27988
28330
|
},
|
|
27989
|
-
children: typeof title === "string" ? /* @__PURE__ */
|
|
28331
|
+
children: typeof title === "string" ? /* @__PURE__ */ jsx182(Typography_default, { children: title }) : title
|
|
27990
28332
|
}
|
|
27991
28333
|
),
|
|
27992
|
-
/* @__PURE__ */
|
|
28334
|
+
/* @__PURE__ */ jsxs87(
|
|
27993
28335
|
Stack_default,
|
|
27994
28336
|
{
|
|
27995
28337
|
direction: "row",
|
|
27996
28338
|
alignItems: "center",
|
|
27997
28339
|
onMouseDown: (ev) => ev.stopPropagation(),
|
|
27998
28340
|
children: [
|
|
27999
|
-
/* @__PURE__ */
|
|
28341
|
+
/* @__PURE__ */ jsx182(Box_default2, { children: /* @__PURE__ */ jsx182(
|
|
28000
28342
|
Tooltip_default,
|
|
28001
28343
|
{
|
|
28002
28344
|
title: t("MINIMIZABLE_WINDOW.MINIMIZE"),
|
|
28003
28345
|
zIndex: 999999,
|
|
28004
28346
|
placement: "top",
|
|
28005
|
-
children: /* @__PURE__ */
|
|
28347
|
+
children: /* @__PURE__ */ jsx182(
|
|
28006
28348
|
IconButton_default,
|
|
28007
28349
|
{
|
|
28008
28350
|
size: iconSizes4,
|
|
@@ -28018,13 +28360,13 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
28018
28360
|
)
|
|
28019
28361
|
}
|
|
28020
28362
|
) }),
|
|
28021
|
-
closeable && /* @__PURE__ */
|
|
28363
|
+
closeable && /* @__PURE__ */ jsx182(Box_default2, { sx: { padding: "0 8px" }, children: /* @__PURE__ */ jsx182(
|
|
28022
28364
|
Tooltip_default,
|
|
28023
28365
|
{
|
|
28024
28366
|
title: t("MINIMIZABLE_WINDOW.CLOSE"),
|
|
28025
28367
|
zIndex: 999999,
|
|
28026
28368
|
placement: "top",
|
|
28027
|
-
children: /* @__PURE__ */
|
|
28369
|
+
children: /* @__PURE__ */ jsx182(
|
|
28028
28370
|
IconButton_default,
|
|
28029
28371
|
{
|
|
28030
28372
|
size: iconSizes4,
|
|
@@ -28041,7 +28383,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
28041
28383
|
]
|
|
28042
28384
|
}
|
|
28043
28385
|
),
|
|
28044
|
-
/* @__PURE__ */
|
|
28386
|
+
/* @__PURE__ */ jsx182(
|
|
28045
28387
|
Stack_default,
|
|
28046
28388
|
{
|
|
28047
28389
|
sx: {
|