@connectif/ui-components 5.2.3 → 5.4.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 +18 -0
- package/dist/components/input/categorized-picker/CategorizedPicker.d.ts +15 -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/index.js +951 -580
- 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;
|
|
@@ -21237,7 +21237,9 @@ import InputBase from "@mui/material/InputBase";
|
|
|
21237
21237
|
import { FixedSizeList as FixedSizeList2 } from "react-window";
|
|
21238
21238
|
import AutoSizer4 from "react-virtualized-auto-sizer";
|
|
21239
21239
|
import { jsx as jsx115 } from "react/jsx-runtime";
|
|
21240
|
-
var BootstrapInput = styled7(InputBase
|
|
21240
|
+
var BootstrapInput = styled7(InputBase, {
|
|
21241
|
+
shouldForwardProp: (prop) => prop !== "notched"
|
|
21242
|
+
})(() => ({
|
|
21241
21243
|
boxShadow: shadows[0],
|
|
21242
21244
|
borderRadius: "16px",
|
|
21243
21245
|
borderWidth: "1px",
|
|
@@ -21595,7 +21597,7 @@ var Select = function Select2({
|
|
|
21595
21597
|
return /* @__PURE__ */ jsx115(
|
|
21596
21598
|
SelectOption,
|
|
21597
21599
|
{
|
|
21598
|
-
label: label ??
|
|
21600
|
+
label: label ?? optionValue?.toString() ?? "",
|
|
21599
21601
|
value: optionValue,
|
|
21600
21602
|
id: optionValue,
|
|
21601
21603
|
colors: !menuColors?.selectedColor ? {
|
|
@@ -22009,11 +22011,358 @@ var UploadClickableArea = ({
|
|
|
22009
22011
|
);
|
|
22010
22012
|
var UploadClickableArea_default = UploadClickableArea;
|
|
22011
22013
|
|
|
22012
|
-
// src/components/input/CategorizedPicker.tsx
|
|
22013
|
-
import
|
|
22014
|
-
import { Grid as Grid3, Popover as Popover2, Select as Select3, Stack as
|
|
22015
|
-
|
|
22016
|
-
|
|
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(
|
|
22017
22366
|
Icon_default,
|
|
22018
22367
|
{
|
|
22019
22368
|
id: "chevron-down",
|
|
@@ -22032,41 +22381,49 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22032
22381
|
disabled = false,
|
|
22033
22382
|
sx,
|
|
22034
22383
|
dataTestId,
|
|
22384
|
+
onOpen,
|
|
22035
22385
|
onChange
|
|
22036
22386
|
}) {
|
|
22037
22387
|
const { t } = useTranslation();
|
|
22038
|
-
const
|
|
22039
|
-
|
|
22040
|
-
|
|
22041
|
-
const
|
|
22042
|
-
|
|
22388
|
+
const categoryRefs = React66.useRef(
|
|
22389
|
+
{}
|
|
22390
|
+
);
|
|
22391
|
+
const anchorRef = React66.useRef(null);
|
|
22392
|
+
const [open, setOpen] = React66.useState(false);
|
|
22393
|
+
const [search, setSearch] = React66.useState("");
|
|
22394
|
+
const unfilteredCategories = React66.useMemo(
|
|
22395
|
+
() => categories.map((category) => ({
|
|
22043
22396
|
...category,
|
|
22044
22397
|
categoryOptions: options.filter(category.filter)
|
|
22045
|
-
})).filter(
|
|
22398
|
+
})).filter(
|
|
22399
|
+
(category) => category.categoryOptions.length > 0 || !!category.emptyData
|
|
22400
|
+
),
|
|
22401
|
+
[categories, options]
|
|
22046
22402
|
);
|
|
22047
|
-
const [filteredCategories, setFilteredCategories] =
|
|
22048
|
-
const getDefaultSelectedCategory =
|
|
22403
|
+
const [filteredCategories, setFilteredCategories] = React66.useState(unfilteredCategories);
|
|
22404
|
+
const getDefaultSelectedCategory = React66.useCallback(
|
|
22049
22405
|
() => filteredCategories.find(
|
|
22050
22406
|
(category) => category.categoryOptions.some((option) => option.id === value?.id)
|
|
22051
22407
|
),
|
|
22052
|
-
[filteredCategories, value
|
|
22408
|
+
[filteredCategories, value]
|
|
22053
22409
|
);
|
|
22054
|
-
const [selectedCategory, setSelectedCategory] =
|
|
22055
|
-
const onTypeSearch =
|
|
22410
|
+
const [selectedCategory, setSelectedCategory] = React66.useState(getDefaultSelectedCategory());
|
|
22411
|
+
const onTypeSearch = React66.useCallback(
|
|
22056
22412
|
(event) => {
|
|
22057
22413
|
setSearch(event.target.value);
|
|
22058
22414
|
},
|
|
22059
22415
|
[]
|
|
22060
22416
|
);
|
|
22061
|
-
const openPopover =
|
|
22417
|
+
const openPopover = React66.useCallback(() => {
|
|
22062
22418
|
setOpen(true);
|
|
22063
22419
|
setSearch("");
|
|
22064
22420
|
setSelectedCategory(getDefaultSelectedCategory());
|
|
22065
|
-
|
|
22066
|
-
|
|
22421
|
+
onOpen?.();
|
|
22422
|
+
}, [getDefaultSelectedCategory, onOpen]);
|
|
22423
|
+
const closePopover = React66.useCallback(() => {
|
|
22067
22424
|
setOpen(false);
|
|
22068
22425
|
}, []);
|
|
22069
|
-
|
|
22426
|
+
React66.useEffect(() => {
|
|
22070
22427
|
const tokens = search.split(",").map((s) => s.trim()).filter((s) => !!s);
|
|
22071
22428
|
if (tokens.length === 0) {
|
|
22072
22429
|
setFilteredCategories(unfilteredCategories);
|
|
@@ -22096,7 +22453,7 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22096
22453
|
}).filter((category) => !!category);
|
|
22097
22454
|
setFilteredCategories(nextCategories);
|
|
22098
22455
|
}, [categories, options, search, unfilteredCategories]);
|
|
22099
|
-
|
|
22456
|
+
React66.useEffect(() => {
|
|
22100
22457
|
const filteredSelectedCategory = selectedCategory && filteredCategories.find(
|
|
22101
22458
|
(category) => category.name === selectedCategory.name
|
|
22102
22459
|
);
|
|
@@ -22108,8 +22465,8 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22108
22465
|
setSelectedCategory(filteredSelectedCategory);
|
|
22109
22466
|
}
|
|
22110
22467
|
}, [filteredCategories, selectedCategory]);
|
|
22111
|
-
return /* @__PURE__ */
|
|
22112
|
-
/* @__PURE__ */
|
|
22468
|
+
return /* @__PURE__ */ jsxs57(Fragment28, { children: [
|
|
22469
|
+
/* @__PURE__ */ jsx126(
|
|
22113
22470
|
Select3,
|
|
22114
22471
|
{
|
|
22115
22472
|
ref: anchorRef,
|
|
@@ -22119,21 +22476,27 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22119
22476
|
height: "34px",
|
|
22120
22477
|
lineHeight: "34px"
|
|
22121
22478
|
},
|
|
22479
|
+
"&.MuiInputBase-root.Mui-focused": {
|
|
22480
|
+
background: white
|
|
22481
|
+
},
|
|
22122
22482
|
...sx
|
|
22123
22483
|
},
|
|
22124
22484
|
value: value?.name || "",
|
|
22125
22485
|
displayEmpty: true,
|
|
22126
22486
|
disabled,
|
|
22127
|
-
input: /* @__PURE__ */
|
|
22487
|
+
input: /* @__PURE__ */ jsx126(
|
|
22128
22488
|
BootstrapInput,
|
|
22129
22489
|
{
|
|
22490
|
+
inputProps: {
|
|
22491
|
+
"data-testid": dataTestId ? dataTestId + "-input" : void 0
|
|
22492
|
+
},
|
|
22130
22493
|
sx: {
|
|
22131
22494
|
borderRadius: "4px"
|
|
22132
22495
|
}
|
|
22133
22496
|
}
|
|
22134
22497
|
),
|
|
22135
22498
|
renderValue: (value2) => value2 || placeholder,
|
|
22136
|
-
IconComponent: () => /* @__PURE__ */
|
|
22499
|
+
IconComponent: () => /* @__PURE__ */ jsx126(ChevronIcon2, { disabled }),
|
|
22137
22500
|
onClick: !disabled ? (e) => {
|
|
22138
22501
|
e.preventDefault();
|
|
22139
22502
|
e.stopPropagation();
|
|
@@ -22141,10 +22504,10 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22141
22504
|
} : void 0,
|
|
22142
22505
|
open: false,
|
|
22143
22506
|
"data-testid": dataTestId,
|
|
22144
|
-
children: options.map((option) => /* @__PURE__ */
|
|
22507
|
+
children: options.map((option) => /* @__PURE__ */ jsx126("option", { value: option.name }, option.id))
|
|
22145
22508
|
}
|
|
22146
22509
|
),
|
|
22147
|
-
/* @__PURE__ */
|
|
22510
|
+
/* @__PURE__ */ jsx126(
|
|
22148
22511
|
Popover2,
|
|
22149
22512
|
{
|
|
22150
22513
|
anchorEl: anchorRef.current,
|
|
@@ -22152,6 +22515,19 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22152
22515
|
vertical: "top",
|
|
22153
22516
|
horizontal: "left"
|
|
22154
22517
|
},
|
|
22518
|
+
slotProps: {
|
|
22519
|
+
transition: {
|
|
22520
|
+
onEntered: () => {
|
|
22521
|
+
if (!selectedCategory) {
|
|
22522
|
+
return;
|
|
22523
|
+
}
|
|
22524
|
+
const el = categoryRefs.current[selectedCategory.name];
|
|
22525
|
+
el?.scrollIntoView({
|
|
22526
|
+
behavior: "smooth"
|
|
22527
|
+
});
|
|
22528
|
+
}
|
|
22529
|
+
}
|
|
22530
|
+
},
|
|
22155
22531
|
transformOrigin: {
|
|
22156
22532
|
vertical: "top",
|
|
22157
22533
|
horizontal: "left"
|
|
@@ -22165,8 +22541,8 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22165
22541
|
width: "640px"
|
|
22166
22542
|
}
|
|
22167
22543
|
},
|
|
22168
|
-
children: /* @__PURE__ */
|
|
22169
|
-
/* @__PURE__ */
|
|
22544
|
+
children: /* @__PURE__ */ jsxs57(Grid3, { container: true, children: [
|
|
22545
|
+
/* @__PURE__ */ jsx126(
|
|
22170
22546
|
Grid3,
|
|
22171
22547
|
{
|
|
22172
22548
|
size: {
|
|
@@ -22174,20 +22550,21 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22174
22550
|
},
|
|
22175
22551
|
padding: "8px",
|
|
22176
22552
|
borderBottom: `1px solid ${grey200}`,
|
|
22177
|
-
children: /* @__PURE__ */
|
|
22553
|
+
children: /* @__PURE__ */ jsx126(
|
|
22178
22554
|
DebouncedTextField_default,
|
|
22179
22555
|
{
|
|
22180
22556
|
placeholder: t(
|
|
22181
22557
|
"CATEGORIZED_PICKER.SEARCH_PLACEHOLDER"
|
|
22182
22558
|
),
|
|
22183
|
-
value:
|
|
22559
|
+
value: "",
|
|
22184
22560
|
onChange: onTypeSearch,
|
|
22185
|
-
startAdornment: /* @__PURE__ */
|
|
22561
|
+
startAdornment: /* @__PURE__ */ jsx126(Icon_default, { id: "magnify" }),
|
|
22562
|
+
"data-testid": dataTestId ? dataTestId + "-search-input" : void 0
|
|
22186
22563
|
}
|
|
22187
22564
|
)
|
|
22188
22565
|
}
|
|
22189
22566
|
),
|
|
22190
|
-
/* @__PURE__ */
|
|
22567
|
+
/* @__PURE__ */ jsx126(
|
|
22191
22568
|
Grid3,
|
|
22192
22569
|
{
|
|
22193
22570
|
size: {
|
|
@@ -22196,14 +22573,17 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22196
22573
|
sx: { borderRight: `1px solid ${grey200}` },
|
|
22197
22574
|
height: "316px",
|
|
22198
22575
|
className: "Slim-Vertical-Scroll",
|
|
22199
|
-
children: /* @__PURE__ */
|
|
22576
|
+
children: /* @__PURE__ */ jsx126(Stack11, { children: filteredCategories.map((category, idx) => /* @__PURE__ */ jsx126(
|
|
22200
22577
|
ListItemButton_default,
|
|
22201
22578
|
{
|
|
22579
|
+
ref: (el) => {
|
|
22580
|
+
categoryRefs.current[category.name] = el;
|
|
22581
|
+
},
|
|
22202
22582
|
selected: selectedCategory === category,
|
|
22203
22583
|
onClick: () => {
|
|
22204
22584
|
setSelectedCategory(category);
|
|
22205
22585
|
},
|
|
22206
|
-
endAdornment: selectedCategory === category ? /* @__PURE__ */
|
|
22586
|
+
endAdornment: selectedCategory === category ? /* @__PURE__ */ jsx126(
|
|
22207
22587
|
Icon_default,
|
|
22208
22588
|
{
|
|
22209
22589
|
id: "menu-right",
|
|
@@ -22211,10 +22591,10 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22211
22591
|
}
|
|
22212
22592
|
) : void 0,
|
|
22213
22593
|
buttonDataTestId: dataTestId ? dataTestId + "-category-" + idx : void 0,
|
|
22214
|
-
children: /* @__PURE__ */
|
|
22594
|
+
children: /* @__PURE__ */ jsx126(
|
|
22215
22595
|
TextEllipsis_default,
|
|
22216
22596
|
{
|
|
22217
|
-
text: /* @__PURE__ */
|
|
22597
|
+
text: /* @__PURE__ */ jsx126(
|
|
22218
22598
|
TextMarker_default,
|
|
22219
22599
|
{
|
|
22220
22600
|
searchText: search,
|
|
@@ -22232,7 +22612,7 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22232
22612
|
)) })
|
|
22233
22613
|
}
|
|
22234
22614
|
),
|
|
22235
|
-
/* @__PURE__ */
|
|
22615
|
+
/* @__PURE__ */ jsx126(
|
|
22236
22616
|
Grid3,
|
|
22237
22617
|
{
|
|
22238
22618
|
size: {
|
|
@@ -22240,46 +22620,37 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22240
22620
|
},
|
|
22241
22621
|
height: "316px",
|
|
22242
22622
|
className: "Slim-Vertical-Scroll",
|
|
22243
|
-
children: /* @__PURE__ */
|
|
22244
|
-
|
|
22623
|
+
children: /* @__PURE__ */ jsx126(
|
|
22624
|
+
Stack11,
|
|
22245
22625
|
{
|
|
22246
|
-
|
|
22247
|
-
|
|
22248
|
-
|
|
22249
|
-
|
|
22250
|
-
|
|
22251
|
-
|
|
22626
|
+
...(!selectedCategory || !!selectedCategory.emptyData) && {
|
|
22627
|
+
height: "100%"
|
|
22628
|
+
},
|
|
22629
|
+
children: /* @__PURE__ */ jsx126(
|
|
22630
|
+
Stack11,
|
|
22631
|
+
{
|
|
22632
|
+
...(!selectedCategory || !!selectedCategory.emptyData) && {
|
|
22633
|
+
height: "100%"
|
|
22634
|
+
},
|
|
22635
|
+
children: /* @__PURE__ */ jsx126(
|
|
22636
|
+
CategorizedPickerCategoryPanel_default,
|
|
22637
|
+
{
|
|
22638
|
+
selectedCategory,
|
|
22639
|
+
isEmptyCategories: filteredCategories.length === 0,
|
|
22640
|
+
categoryOptions: selectedCategory?.categoryOptions ?? [],
|
|
22641
|
+
onSelect: (option) => {
|
|
22642
|
+
onChange(option);
|
|
22643
|
+
closePopover();
|
|
22644
|
+
},
|
|
22645
|
+
dataTestId,
|
|
22646
|
+
searchText: search,
|
|
22647
|
+
value
|
|
22648
|
+
}
|
|
22649
|
+
)
|
|
22650
|
+
}
|
|
22252
22651
|
)
|
|
22253
22652
|
}
|
|
22254
|
-
)
|
|
22255
|
-
(option, idx) => /* @__PURE__ */ jsx120(
|
|
22256
|
-
ListItemButton_default,
|
|
22257
|
-
{
|
|
22258
|
-
selected: value?.id === option.id,
|
|
22259
|
-
onClick: () => {
|
|
22260
|
-
onChange(option);
|
|
22261
|
-
closePopover();
|
|
22262
|
-
},
|
|
22263
|
-
buttonDataTestId: dataTestId ? dataTestId + "-option-" + idx : void 0,
|
|
22264
|
-
children: /* @__PURE__ */ jsx120(
|
|
22265
|
-
TextEllipsis_default,
|
|
22266
|
-
{
|
|
22267
|
-
text: /* @__PURE__ */ jsx120(
|
|
22268
|
-
TextMarker_default,
|
|
22269
|
-
{
|
|
22270
|
-
searchText: search,
|
|
22271
|
-
backgroundColor: primary200,
|
|
22272
|
-
multiSearchCharSeparator: ",",
|
|
22273
|
-
children: option.name
|
|
22274
|
-
}
|
|
22275
|
-
),
|
|
22276
|
-
typographyVariant: "body2"
|
|
22277
|
-
}
|
|
22278
|
-
)
|
|
22279
|
-
},
|
|
22280
|
-
option.id
|
|
22281
|
-
)
|
|
22282
|
-
) }) })
|
|
22653
|
+
)
|
|
22283
22654
|
}
|
|
22284
22655
|
)
|
|
22285
22656
|
] })
|
|
@@ -22290,14 +22661,14 @@ var CategorizedPicker = function CategorizedPicker2({
|
|
|
22290
22661
|
var CategorizedPicker_default = CategorizedPicker;
|
|
22291
22662
|
|
|
22292
22663
|
// src/components/input/ItemSelector.tsx
|
|
22293
|
-
import * as
|
|
22664
|
+
import * as React68 from "react";
|
|
22294
22665
|
|
|
22295
22666
|
// src/components/input/SelectPopover.tsx
|
|
22296
|
-
import * as
|
|
22297
|
-
import { Grid as Grid4, Stack as
|
|
22298
|
-
import { useState as
|
|
22667
|
+
import * as React67 from "react";
|
|
22668
|
+
import { Grid as Grid4, Stack as Stack12 } from "@mui/material";
|
|
22669
|
+
import { useState as useState25 } from "react";
|
|
22299
22670
|
import InfiniteScroll from "react-infinite-scroll-component";
|
|
22300
|
-
import { jsx as
|
|
22671
|
+
import { jsx as jsx127, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
22301
22672
|
var defaultItemsColorStyles = {
|
|
22302
22673
|
selectedColor: Colors_exports.primaryMain,
|
|
22303
22674
|
disabledColor: ""
|
|
@@ -22329,11 +22700,11 @@ var SelectPopover = function SelectPopover2({
|
|
|
22329
22700
|
paddingContent
|
|
22330
22701
|
}) {
|
|
22331
22702
|
const { t } = useTranslation();
|
|
22332
|
-
const [searchText, setSearchText] =
|
|
22333
|
-
const [isScrollBottom, setIsScrollBottom] =
|
|
22334
|
-
const [currentItems, setCurrentItems] =
|
|
22335
|
-
const [currentSelectedItems, setCurrentSelectedItems] =
|
|
22336
|
-
const prevSelectedItemsIdsRef =
|
|
22703
|
+
const [searchText, setSearchText] = useState25("");
|
|
22704
|
+
const [isScrollBottom, setIsScrollBottom] = useState25(false);
|
|
22705
|
+
const [currentItems, setCurrentItems] = useState25([]);
|
|
22706
|
+
const [currentSelectedItems, setCurrentSelectedItems] = React67.useState([]);
|
|
22707
|
+
const prevSelectedItemsIdsRef = React67.useRef([]);
|
|
22337
22708
|
const onSearchTextChanged = (text) => {
|
|
22338
22709
|
onSearch(text);
|
|
22339
22710
|
setSearchText(text);
|
|
@@ -22345,7 +22716,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22345
22716
|
}
|
|
22346
22717
|
setCurrentSelectedItems(selectedItemsIds);
|
|
22347
22718
|
};
|
|
22348
|
-
|
|
22719
|
+
React67.useEffect(() => {
|
|
22349
22720
|
const prevSelectedItemsIds = prevSelectedItemsIdsRef.current;
|
|
22350
22721
|
if (keepCurrentSelectionOnSearch && anchorEl) {
|
|
22351
22722
|
let nextSelectedItems = currentSelectedItems;
|
|
@@ -22434,7 +22805,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22434
22805
|
}
|
|
22435
22806
|
}
|
|
22436
22807
|
};
|
|
22437
|
-
return /* @__PURE__ */
|
|
22808
|
+
return /* @__PURE__ */ jsxs58(
|
|
22438
22809
|
Popover_default,
|
|
22439
22810
|
{
|
|
22440
22811
|
centeredInScreen,
|
|
@@ -22442,14 +22813,14 @@ var SelectPopover = function SelectPopover2({
|
|
|
22442
22813
|
anchorEl,
|
|
22443
22814
|
disableRestoreFocus,
|
|
22444
22815
|
children: [
|
|
22445
|
-
/* @__PURE__ */
|
|
22816
|
+
/* @__PURE__ */ jsx127(
|
|
22446
22817
|
Box_default2,
|
|
22447
22818
|
{
|
|
22448
22819
|
sx: {
|
|
22449
22820
|
borderBottom: `1px solid ${Colors_exports.grey200}`,
|
|
22450
22821
|
padding: "8px"
|
|
22451
22822
|
},
|
|
22452
|
-
children: /* @__PURE__ */
|
|
22823
|
+
children: /* @__PURE__ */ jsx127(
|
|
22453
22824
|
DebouncedTextField_default,
|
|
22454
22825
|
{
|
|
22455
22826
|
iconId: "magnify",
|
|
@@ -22464,7 +22835,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22464
22835
|
)
|
|
22465
22836
|
}
|
|
22466
22837
|
),
|
|
22467
|
-
/* @__PURE__ */
|
|
22838
|
+
/* @__PURE__ */ jsx127(
|
|
22468
22839
|
InfiniteScroll,
|
|
22469
22840
|
{
|
|
22470
22841
|
height: 300,
|
|
@@ -22483,7 +22854,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22483
22854
|
e.target.scrollHeight - e.target.scrollTop === e.target.clientHeight
|
|
22484
22855
|
),
|
|
22485
22856
|
loader: true,
|
|
22486
|
-
children: /* @__PURE__ */
|
|
22857
|
+
children: /* @__PURE__ */ jsxs58(
|
|
22487
22858
|
Grid4,
|
|
22488
22859
|
{
|
|
22489
22860
|
container: true,
|
|
@@ -22526,7 +22897,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22526
22897
|
onItemSelected
|
|
22527
22898
|
) : getItemElement(item, onItemSelected)
|
|
22528
22899
|
),
|
|
22529
|
-
isLoading && /* @__PURE__ */
|
|
22900
|
+
isLoading && /* @__PURE__ */ jsx127(
|
|
22530
22901
|
Skeleton_default,
|
|
22531
22902
|
{
|
|
22532
22903
|
variant: "text",
|
|
@@ -22539,13 +22910,13 @@ var SelectPopover = function SelectPopover2({
|
|
|
22539
22910
|
}
|
|
22540
22911
|
}
|
|
22541
22912
|
),
|
|
22542
|
-
!isLoading && currentItems.length === 0 ? typeof emptyListPlaceholder === "string" ? /* @__PURE__ */
|
|
22543
|
-
|
|
22913
|
+
!isLoading && currentItems.length === 0 ? typeof emptyListPlaceholder === "string" ? /* @__PURE__ */ jsx127(
|
|
22914
|
+
Stack12,
|
|
22544
22915
|
{
|
|
22545
22916
|
alignItems: "center",
|
|
22546
22917
|
justifyContent: "center",
|
|
22547
22918
|
width: "100%",
|
|
22548
|
-
children: /* @__PURE__ */
|
|
22919
|
+
children: /* @__PURE__ */ jsx127(Typography_default, { variant: "body2", color: grey600, children: emptyListPlaceholder })
|
|
22549
22920
|
}
|
|
22550
22921
|
) : emptyListPlaceholder : ""
|
|
22551
22922
|
]
|
|
@@ -22553,11 +22924,11 @@ var SelectPopover = function SelectPopover2({
|
|
|
22553
22924
|
)
|
|
22554
22925
|
}
|
|
22555
22926
|
),
|
|
22556
|
-
/* @__PURE__ */
|
|
22927
|
+
/* @__PURE__ */ jsx127(
|
|
22557
22928
|
PopoverActions_default,
|
|
22558
22929
|
{
|
|
22559
22930
|
sx: { padding: "16px 24px" },
|
|
22560
|
-
leftContent: /* @__PURE__ */
|
|
22931
|
+
leftContent: /* @__PURE__ */ jsx127(
|
|
22561
22932
|
Button_default,
|
|
22562
22933
|
{
|
|
22563
22934
|
variant: "contained",
|
|
@@ -22567,7 +22938,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22567
22938
|
onClick: closePopover
|
|
22568
22939
|
}
|
|
22569
22940
|
),
|
|
22570
|
-
rightContent: /* @__PURE__ */
|
|
22941
|
+
rightContent: /* @__PURE__ */ jsx127(
|
|
22571
22942
|
Button_default,
|
|
22572
22943
|
{
|
|
22573
22944
|
variant: "contained",
|
|
@@ -22591,7 +22962,7 @@ var SelectPopover = function SelectPopover2({
|
|
|
22591
22962
|
);
|
|
22592
22963
|
};
|
|
22593
22964
|
function getItemElement(item, onItemClick) {
|
|
22594
|
-
return /* @__PURE__ */
|
|
22965
|
+
return /* @__PURE__ */ jsx127(
|
|
22595
22966
|
SelectPopoverItem_default,
|
|
22596
22967
|
{
|
|
22597
22968
|
id: item.id,
|
|
@@ -22620,7 +22991,7 @@ var arraysEqual = (a, b) => {
|
|
|
22620
22991
|
var SelectPopover_default = SelectPopover;
|
|
22621
22992
|
|
|
22622
22993
|
// src/components/input/ItemSelector.tsx
|
|
22623
|
-
import { Fragment as
|
|
22994
|
+
import { Fragment as Fragment29, jsx as jsx128, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
22624
22995
|
var ItemSelector = function ItemSelector2({
|
|
22625
22996
|
items,
|
|
22626
22997
|
selectedItems,
|
|
@@ -22651,16 +23022,16 @@ var ItemSelector = function ItemSelector2({
|
|
|
22651
23022
|
onSearch,
|
|
22652
23023
|
onClose
|
|
22653
23024
|
}) {
|
|
22654
|
-
const [anchorEl, setAnchorEl] =
|
|
22655
|
-
const [searchText, setSearchText] =
|
|
22656
|
-
const allShownItemsRef =
|
|
22657
|
-
const selectRef =
|
|
22658
|
-
|
|
23025
|
+
const [anchorEl, setAnchorEl] = React68.useState();
|
|
23026
|
+
const [searchText, setSearchText] = React68.useState("");
|
|
23027
|
+
const allShownItemsRef = React68.useRef(items);
|
|
23028
|
+
const selectRef = React68.useRef(null);
|
|
23029
|
+
React68.useEffect(() => {
|
|
22659
23030
|
if (anchorEl) {
|
|
22660
23031
|
onSearch(searchText);
|
|
22661
23032
|
}
|
|
22662
23033
|
}, [anchorEl, onSearch, searchText]);
|
|
22663
|
-
|
|
23034
|
+
React68.useEffect(() => {
|
|
22664
23035
|
const allShownItems = allShownItemsRef.current;
|
|
22665
23036
|
allShownItemsRef.current = allShownItems.concat(
|
|
22666
23037
|
items.filter(
|
|
@@ -22674,7 +23045,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22674
23045
|
item
|
|
22675
23046
|
}) => {
|
|
22676
23047
|
const [ref, { contentWidth: width2 }] = useResizeObserver();
|
|
22677
|
-
return /* @__PURE__ */
|
|
23048
|
+
return /* @__PURE__ */ jsx128(
|
|
22678
23049
|
Chip_default,
|
|
22679
23050
|
{
|
|
22680
23051
|
ref,
|
|
@@ -22704,8 +23075,8 @@ var ItemSelector = function ItemSelector2({
|
|
|
22704
23075
|
const selectedItem = selectedItems[0]?.id;
|
|
22705
23076
|
return selectedItem ? [selectedItem] : "";
|
|
22706
23077
|
};
|
|
22707
|
-
return /* @__PURE__ */
|
|
22708
|
-
/* @__PURE__ */
|
|
23078
|
+
return /* @__PURE__ */ jsxs59(Fragment29, { children: [
|
|
23079
|
+
/* @__PURE__ */ jsx128(
|
|
22709
23080
|
Select_default,
|
|
22710
23081
|
{
|
|
22711
23082
|
ref: selectRef,
|
|
@@ -22721,17 +23092,17 @@ var ItemSelector = function ItemSelector2({
|
|
|
22721
23092
|
renderValue: (value) => {
|
|
22722
23093
|
let component;
|
|
22723
23094
|
if (!value || !Array.isArray(value) || value.length === 0) {
|
|
22724
|
-
component = /* @__PURE__ */
|
|
22725
|
-
/* @__PURE__ */
|
|
23095
|
+
component = /* @__PURE__ */ jsxs59(Fragment29, { children: [
|
|
23096
|
+
/* @__PURE__ */ jsx128(
|
|
22726
23097
|
Stack_default,
|
|
22727
23098
|
{
|
|
22728
23099
|
direction: "row",
|
|
22729
23100
|
flexWrap: "wrap",
|
|
22730
23101
|
padding: "6px 0",
|
|
22731
|
-
children: /* @__PURE__ */
|
|
23102
|
+
children: /* @__PURE__ */ jsx128(Typography_default, { variant: "body2", color: grey600, children: placeholder })
|
|
22732
23103
|
}
|
|
22733
23104
|
),
|
|
22734
|
-
/* @__PURE__ */
|
|
23105
|
+
/* @__PURE__ */ jsx128(
|
|
22735
23106
|
Divider_default,
|
|
22736
23107
|
{
|
|
22737
23108
|
variant: "middle",
|
|
@@ -22741,8 +23112,8 @@ var ItemSelector = function ItemSelector2({
|
|
|
22741
23112
|
)
|
|
22742
23113
|
] });
|
|
22743
23114
|
} else {
|
|
22744
|
-
component = /* @__PURE__ */
|
|
22745
|
-
/* @__PURE__ */
|
|
23115
|
+
component = /* @__PURE__ */ jsxs59(Fragment29, { children: [
|
|
23116
|
+
/* @__PURE__ */ jsxs59(
|
|
22746
23117
|
Stack_default,
|
|
22747
23118
|
{
|
|
22748
23119
|
direction: "row",
|
|
@@ -22756,7 +23127,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22756
23127
|
const item = selectedItems.find(
|
|
22757
23128
|
(i) => i.id === id
|
|
22758
23129
|
);
|
|
22759
|
-
return item ? /* @__PURE__ */
|
|
23130
|
+
return item ? /* @__PURE__ */ jsx128(
|
|
22760
23131
|
ItemChip,
|
|
22761
23132
|
{
|
|
22762
23133
|
item: {
|
|
@@ -22765,14 +23136,14 @@ var ItemSelector = function ItemSelector2({
|
|
|
22765
23136
|
}
|
|
22766
23137
|
},
|
|
22767
23138
|
id
|
|
22768
|
-
) : /* @__PURE__ */
|
|
23139
|
+
) : /* @__PURE__ */ jsx128(Fragment29, {});
|
|
22769
23140
|
}),
|
|
22770
|
-
value.length - limitItemChips > 0 ? /* @__PURE__ */
|
|
23141
|
+
value.length - limitItemChips > 0 ? /* @__PURE__ */ jsx128(
|
|
22771
23142
|
Tooltip_default,
|
|
22772
23143
|
{
|
|
22773
23144
|
interactive: true,
|
|
22774
23145
|
variant: "white",
|
|
22775
|
-
title: /* @__PURE__ */
|
|
23146
|
+
title: /* @__PURE__ */ jsx128(
|
|
22776
23147
|
Stack_default,
|
|
22777
23148
|
{
|
|
22778
23149
|
direction: "row",
|
|
@@ -22789,24 +23160,24 @@ var ItemSelector = function ItemSelector2({
|
|
|
22789
23160
|
const item = selectedItems.find(
|
|
22790
23161
|
(i) => i.id === id
|
|
22791
23162
|
);
|
|
22792
|
-
return item ? /* @__PURE__ */
|
|
23163
|
+
return item ? /* @__PURE__ */ jsx128(
|
|
22793
23164
|
ItemChip,
|
|
22794
23165
|
{
|
|
22795
23166
|
item
|
|
22796
23167
|
},
|
|
22797
23168
|
id
|
|
22798
|
-
) : /* @__PURE__ */
|
|
23169
|
+
) : /* @__PURE__ */ jsx128(Fragment29, {});
|
|
22799
23170
|
})
|
|
22800
23171
|
}
|
|
22801
23172
|
),
|
|
22802
|
-
children: /* @__PURE__ */
|
|
23173
|
+
children: /* @__PURE__ */ jsx128(Typography_default, { variant: "body2", children: `+${value.length - limitItemChips}` })
|
|
22803
23174
|
}
|
|
22804
23175
|
) : void 0
|
|
22805
23176
|
]
|
|
22806
23177
|
}
|
|
22807
23178
|
),
|
|
22808
|
-
!disabled && /* @__PURE__ */
|
|
22809
|
-
/* @__PURE__ */
|
|
23179
|
+
!disabled && /* @__PURE__ */ jsxs59(Stack_default, { direction: "row", children: [
|
|
23180
|
+
/* @__PURE__ */ jsx128(
|
|
22810
23181
|
IconButton_default,
|
|
22811
23182
|
{
|
|
22812
23183
|
iconId: "close",
|
|
@@ -22824,7 +23195,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22824
23195
|
}
|
|
22825
23196
|
}
|
|
22826
23197
|
),
|
|
22827
|
-
/* @__PURE__ */
|
|
23198
|
+
/* @__PURE__ */ jsx128(
|
|
22828
23199
|
Divider_default,
|
|
22829
23200
|
{
|
|
22830
23201
|
variant: "middle",
|
|
@@ -22835,7 +23206,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22835
23206
|
] })
|
|
22836
23207
|
] });
|
|
22837
23208
|
}
|
|
22838
|
-
return /* @__PURE__ */
|
|
23209
|
+
return /* @__PURE__ */ jsx128(
|
|
22839
23210
|
Stack_default,
|
|
22840
23211
|
{
|
|
22841
23212
|
direction: "row",
|
|
@@ -22857,8 +23228,8 @@ var ItemSelector = function ItemSelector2({
|
|
|
22857
23228
|
}
|
|
22858
23229
|
}
|
|
22859
23230
|
),
|
|
22860
|
-
helperText && /* @__PURE__ */
|
|
22861
|
-
/* @__PURE__ */
|
|
23231
|
+
helperText && /* @__PURE__ */ jsx128(InputHelperText_default, { severity: isError ? "error" : "info", children: helperText }),
|
|
23232
|
+
/* @__PURE__ */ jsx128(
|
|
22862
23233
|
SelectPopover_default,
|
|
22863
23234
|
{
|
|
22864
23235
|
items: items.map((item) => {
|
|
@@ -22906,7 +23277,7 @@ var ItemSelector = function ItemSelector2({
|
|
|
22906
23277
|
var ItemSelector_default = ItemSelector;
|
|
22907
23278
|
|
|
22908
23279
|
// src/components/input/autocomplete/Autocomplete.tsx
|
|
22909
|
-
import * as
|
|
23280
|
+
import * as React72 from "react";
|
|
22910
23281
|
|
|
22911
23282
|
// src/utils/RegExpUtils.ts
|
|
22912
23283
|
var map = {
|
|
@@ -22920,11 +23291,11 @@ var map = {
|
|
|
22920
23291
|
var toDiacriticInsensitiveString = (input) => Array.from(input).map((char) => map[char] ? `[${map[char]}]` : char).join("");
|
|
22921
23292
|
|
|
22922
23293
|
// src/components/input/autocomplete/AutocompleteInput.tsx
|
|
22923
|
-
import * as
|
|
23294
|
+
import * as React70 from "react";
|
|
22924
23295
|
|
|
22925
23296
|
// src/components/input/autocomplete/AutocompleteInputSelection.tsx
|
|
22926
|
-
import * as
|
|
22927
|
-
import { jsx as
|
|
23297
|
+
import * as React69 from "react";
|
|
23298
|
+
import { jsx as jsx129, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
22928
23299
|
var AUTOCOMPLETE_PADDING_RIGHT = 6;
|
|
22929
23300
|
var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
22930
23301
|
value,
|
|
@@ -22935,8 +23306,8 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
22935
23306
|
onOpenPopover,
|
|
22936
23307
|
onRemoveValue
|
|
22937
23308
|
}) {
|
|
22938
|
-
const stackRef =
|
|
22939
|
-
return /* @__PURE__ */
|
|
23309
|
+
const stackRef = React69.useRef(null);
|
|
23310
|
+
return /* @__PURE__ */ jsxs60(
|
|
22940
23311
|
Stack_default,
|
|
22941
23312
|
{
|
|
22942
23313
|
ref: stackRef,
|
|
@@ -22952,7 +23323,7 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
22952
23323
|
paddingLeft: "2px"
|
|
22953
23324
|
},
|
|
22954
23325
|
children: [
|
|
22955
|
-
!!startIconId && /* @__PURE__ */
|
|
23326
|
+
!!startIconId && /* @__PURE__ */ jsx129(
|
|
22956
23327
|
IconButton_default,
|
|
22957
23328
|
{
|
|
22958
23329
|
iconId: startIconId,
|
|
@@ -22971,8 +23342,8 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
22971
23342
|
}
|
|
22972
23343
|
}
|
|
22973
23344
|
),
|
|
22974
|
-
/* @__PURE__ */
|
|
22975
|
-
!Array.isArray(value) && !!value && /* @__PURE__ */
|
|
23345
|
+
/* @__PURE__ */ jsxs60(Stack_default, { whiteSpace: "nowrap", flex: "1 1 auto", minWidth: 0, children: [
|
|
23346
|
+
!Array.isArray(value) && !!value && /* @__PURE__ */ jsx129(
|
|
22976
23347
|
TextEllipsis_default,
|
|
22977
23348
|
{
|
|
22978
23349
|
typographyVariant: "body2",
|
|
@@ -22982,7 +23353,7 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
22982
23353
|
)
|
|
22983
23354
|
}
|
|
22984
23355
|
),
|
|
22985
|
-
Array.isArray(value) && /* @__PURE__ */
|
|
23356
|
+
Array.isArray(value) && /* @__PURE__ */ jsx129(
|
|
22986
23357
|
ChipViewer_default,
|
|
22987
23358
|
{
|
|
22988
23359
|
values: value,
|
|
@@ -23009,7 +23380,7 @@ var AutocompleteInputSelection = function AutocompleteInputSelection2({
|
|
|
23009
23380
|
var AutocompleteInputSelection_default = AutocompleteInputSelection;
|
|
23010
23381
|
|
|
23011
23382
|
// src/components/input/autocomplete/AutocompleteInput.tsx
|
|
23012
|
-
import { Fragment as
|
|
23383
|
+
import { Fragment as Fragment30, jsx as jsx130, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
23013
23384
|
var INPUT_MIN_WIDTH = 80;
|
|
23014
23385
|
var CLEAR_BUTTON_WIDTH = 36;
|
|
23015
23386
|
var AutocompleteInput = function AutocompleteInput2({
|
|
@@ -23038,10 +23409,10 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23038
23409
|
onRemoveValue
|
|
23039
23410
|
}) {
|
|
23040
23411
|
const { t } = useTranslation();
|
|
23041
|
-
const [isHover, setIsHover] =
|
|
23412
|
+
const [isHover, setIsHover] = React70.useState(false);
|
|
23042
23413
|
const dirty = !!inputValue || Array.isArray(value) && value.length > 0 || !Array.isArray(value) && !!value;
|
|
23043
23414
|
const showClearButton = !disabled && dirty && !disableClear && (isOpenPopover || isHover);
|
|
23044
|
-
return /* @__PURE__ */
|
|
23415
|
+
return /* @__PURE__ */ jsx130(Fragment30, { children: /* @__PURE__ */ jsx130(
|
|
23045
23416
|
DebouncedTextField_default,
|
|
23046
23417
|
{
|
|
23047
23418
|
ref: inputRef,
|
|
@@ -23120,7 +23491,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23120
23491
|
}
|
|
23121
23492
|
},
|
|
23122
23493
|
containerRef,
|
|
23123
|
-
startAdornment: /* @__PURE__ */
|
|
23494
|
+
startAdornment: /* @__PURE__ */ jsx130(
|
|
23124
23495
|
AutocompleteInputSelection_default,
|
|
23125
23496
|
{
|
|
23126
23497
|
value,
|
|
@@ -23132,7 +23503,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23132
23503
|
disabled
|
|
23133
23504
|
}
|
|
23134
23505
|
),
|
|
23135
|
-
endAdornment: /* @__PURE__ */
|
|
23506
|
+
endAdornment: /* @__PURE__ */ jsxs61(
|
|
23136
23507
|
Stack_default,
|
|
23137
23508
|
{
|
|
23138
23509
|
direction: "row",
|
|
@@ -23144,7 +23515,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23144
23515
|
flex: "0 0 auto",
|
|
23145
23516
|
children: [
|
|
23146
23517
|
textFieldProps?.endAdornment,
|
|
23147
|
-
showClearButton && /* @__PURE__ */
|
|
23518
|
+
showClearButton && /* @__PURE__ */ jsx130(Tooltip_default, { title: t("AUTOCOMPLETE.CLEAR"), children: /* @__PURE__ */ jsx130(
|
|
23148
23519
|
IconButton_default,
|
|
23149
23520
|
{
|
|
23150
23521
|
iconId: "close",
|
|
@@ -23171,11 +23542,11 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23171
23542
|
"data-test": "clear-autocomplete"
|
|
23172
23543
|
}
|
|
23173
23544
|
) }),
|
|
23174
|
-
!disabled && variant !== "text" && /* @__PURE__ */
|
|
23545
|
+
!disabled && variant !== "text" && /* @__PURE__ */ jsx130(
|
|
23175
23546
|
Tooltip_default,
|
|
23176
23547
|
{
|
|
23177
23548
|
title: isOpenPopover ? t("AUTOCOMPLETE.COLLAPSE") : t("AUTOCOMPLETE.EXPAND"),
|
|
23178
|
-
children: /* @__PURE__ */
|
|
23549
|
+
children: /* @__PURE__ */ jsx130(
|
|
23179
23550
|
IconButton_default,
|
|
23180
23551
|
{
|
|
23181
23552
|
iconId: isOpenPopover ? "chevron-up" : "chevron-down",
|
|
@@ -23211,7 +23582,7 @@ var AutocompleteInput = function AutocompleteInput2({
|
|
|
23211
23582
|
var AutocompleteInput_default = AutocompleteInput;
|
|
23212
23583
|
|
|
23213
23584
|
// src/components/input/autocomplete/AutocompleteList.tsx
|
|
23214
|
-
import * as
|
|
23585
|
+
import * as React71 from "react";
|
|
23215
23586
|
import { Popper as Popper2, ClickAwayListener } from "@mui/material";
|
|
23216
23587
|
import { FixedSizeList as FixedSizeList3 } from "react-window";
|
|
23217
23588
|
import AutoSizer5 from "react-virtualized-auto-sizer";
|
|
@@ -23237,7 +23608,7 @@ function getInitialListScroll({
|
|
|
23237
23608
|
}
|
|
23238
23609
|
|
|
23239
23610
|
// src/components/input/autocomplete/AutocompleteList.tsx
|
|
23240
|
-
import { Fragment as
|
|
23611
|
+
import { Fragment as Fragment31, jsx as jsx131, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
23241
23612
|
var AUTOCOMPLETE_ITEM_HEIGHT = 44;
|
|
23242
23613
|
var AutocompleteList = function AutocompleteList2({
|
|
23243
23614
|
options,
|
|
@@ -23255,7 +23626,7 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23255
23626
|
onClickAwayPopover
|
|
23256
23627
|
}) {
|
|
23257
23628
|
const { t } = useTranslation();
|
|
23258
|
-
const listRef =
|
|
23629
|
+
const listRef = React71.useRef(null);
|
|
23259
23630
|
const getText = (option) => {
|
|
23260
23631
|
const isInOptions = options.some((elem) => elem.id === option.id);
|
|
23261
23632
|
if (!isInOptions) {
|
|
@@ -23270,7 +23641,7 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23270
23641
|
}) => {
|
|
23271
23642
|
const option = filteredOptions[index];
|
|
23272
23643
|
const isMultiple = Array.isArray(selectedIndex);
|
|
23273
|
-
return /* @__PURE__ */
|
|
23644
|
+
return /* @__PURE__ */ jsx131(
|
|
23274
23645
|
ListItemButton_default,
|
|
23275
23646
|
{
|
|
23276
23647
|
selected: !isMultiple ? index === selectedIndex : selectedIndex.includes(index),
|
|
@@ -23299,20 +23670,20 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23299
23670
|
option.id
|
|
23300
23671
|
);
|
|
23301
23672
|
};
|
|
23302
|
-
return /* @__PURE__ */
|
|
23673
|
+
return /* @__PURE__ */ jsx131(Fragment31, { children: /* @__PURE__ */ jsx131(
|
|
23303
23674
|
ClickAwayListener,
|
|
23304
23675
|
{
|
|
23305
23676
|
onClickAway: (event) => onClickAwayPopover(
|
|
23306
23677
|
event
|
|
23307
23678
|
),
|
|
23308
23679
|
mouseEvent: "onMouseDown",
|
|
23309
|
-
children: /* @__PURE__ */
|
|
23680
|
+
children: /* @__PURE__ */ jsx131(
|
|
23310
23681
|
Popper2,
|
|
23311
23682
|
{
|
|
23312
23683
|
anchorEl: inputContainerRef.current,
|
|
23313
23684
|
open: isOpen,
|
|
23314
23685
|
sx: { zIndex: 3e3 },
|
|
23315
|
-
children: /* @__PURE__ */
|
|
23686
|
+
children: /* @__PURE__ */ jsx131(Paper_default, { sx: { boxShadow: shadows[1], borderRadius: "8px" }, children: /* @__PURE__ */ jsxs62(
|
|
23316
23687
|
Box_default2,
|
|
23317
23688
|
{
|
|
23318
23689
|
sx: {
|
|
@@ -23324,22 +23695,22 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23324
23695
|
className: "Slim-Vertical-Scroll",
|
|
23325
23696
|
ref: listRef,
|
|
23326
23697
|
children: [
|
|
23327
|
-
isLoading && /* @__PURE__ */
|
|
23698
|
+
isLoading && /* @__PURE__ */ jsx131(
|
|
23328
23699
|
ListItem_default,
|
|
23329
23700
|
{
|
|
23330
23701
|
text: loadingText ?? t("AUTOCOMPLETE.LOADING")
|
|
23331
23702
|
}
|
|
23332
23703
|
),
|
|
23333
|
-
!isLoading && filteredOptions.length === 0 && /* @__PURE__ */
|
|
23704
|
+
!isLoading && filteredOptions.length === 0 && /* @__PURE__ */ jsx131(
|
|
23334
23705
|
ListItem_default,
|
|
23335
23706
|
{
|
|
23336
23707
|
text: noOptionsText ?? t("AUTOCOMPLETE.NO_OPTIONS")
|
|
23337
23708
|
}
|
|
23338
23709
|
),
|
|
23339
|
-
!isLoading && filteredOptions.length > 0 && /* @__PURE__ */
|
|
23710
|
+
!isLoading && filteredOptions.length > 0 && /* @__PURE__ */ jsx131(AutoSizer5, { children: ({
|
|
23340
23711
|
height: height2,
|
|
23341
23712
|
width: width2
|
|
23342
|
-
}) => /* @__PURE__ */
|
|
23713
|
+
}) => /* @__PURE__ */ jsx131(
|
|
23343
23714
|
FixedSizeList3,
|
|
23344
23715
|
{
|
|
23345
23716
|
overscanCount: 3,
|
|
@@ -23372,7 +23743,7 @@ var AutocompleteList = function AutocompleteList2({
|
|
|
23372
23743
|
var AutocompleteList_default = AutocompleteList;
|
|
23373
23744
|
|
|
23374
23745
|
// src/components/input/autocomplete/Autocomplete.tsx
|
|
23375
|
-
import { Fragment as
|
|
23746
|
+
import { Fragment as Fragment32, jsx as jsx132, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
23376
23747
|
var MIN_AUTOCOMPLETE_WIDTH = "328px";
|
|
23377
23748
|
var Autocomplete = function Autocomplete2({
|
|
23378
23749
|
variant = "default",
|
|
@@ -23401,15 +23772,15 @@ var Autocomplete = function Autocomplete2({
|
|
|
23401
23772
|
onOpen = () => ({}),
|
|
23402
23773
|
disableClear
|
|
23403
23774
|
}) {
|
|
23404
|
-
const anchorRef =
|
|
23405
|
-
const inputRef =
|
|
23406
|
-
const [placeholder, setPlaceholder] =
|
|
23775
|
+
const anchorRef = React72.useRef(null);
|
|
23776
|
+
const inputRef = React72.useRef(null);
|
|
23777
|
+
const [placeholder, setPlaceholder] = React72.useState(
|
|
23407
23778
|
textFieldProps?.placeholder || ""
|
|
23408
23779
|
);
|
|
23409
|
-
const _renderLabel =
|
|
23410
|
-
const [inputValue, setInputValue] =
|
|
23411
|
-
const [isDirty, setDirty] =
|
|
23412
|
-
const getOptionsLabeled =
|
|
23780
|
+
const _renderLabel = React72.useCallback((id) => id, []);
|
|
23781
|
+
const [inputValue, setInputValue] = React72.useState("");
|
|
23782
|
+
const [isDirty, setDirty] = React72.useState(false);
|
|
23783
|
+
const getOptionsLabeled = React72.useCallback(
|
|
23413
23784
|
(options2, inputValue2 = "") => {
|
|
23414
23785
|
const searchValue = escapeRegExp2(inputValue2.trim());
|
|
23415
23786
|
const regExp = new RegExp(
|
|
@@ -23440,7 +23811,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23440
23811
|
renderLabel
|
|
23441
23812
|
]
|
|
23442
23813
|
);
|
|
23443
|
-
const getAllowFreeTextOption =
|
|
23814
|
+
const getAllowFreeTextOption = React72.useCallback(
|
|
23444
23815
|
(inputValue2) => {
|
|
23445
23816
|
if (allowFreeText) {
|
|
23446
23817
|
const freeOption = {
|
|
@@ -23458,27 +23829,27 @@ var Autocomplete = function Autocomplete2({
|
|
|
23458
23829
|
},
|
|
23459
23830
|
[_renderLabel, allowFreeText, options, renderLabel]
|
|
23460
23831
|
);
|
|
23461
|
-
const [filteredOptions, setFilteredOptions] =
|
|
23462
|
-
const virtualListRef =
|
|
23463
|
-
const [isOpenPopover, setOpenPopover] =
|
|
23832
|
+
const [filteredOptions, setFilteredOptions] = React72.useState(getOptionsLabeled([...options]));
|
|
23833
|
+
const virtualListRef = React72.createRef();
|
|
23834
|
+
const [isOpenPopover, setOpenPopover] = React72.useState(false);
|
|
23464
23835
|
const getSelectedIndexEmpty = () => multiple ? [] : void 0;
|
|
23465
|
-
const [selectedIndex, setSelectedIndex] =
|
|
23466
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
23467
|
-
|
|
23836
|
+
const [selectedIndex, setSelectedIndex] = React72.useState(getSelectedIndexEmpty());
|
|
23837
|
+
const [highlightedIndex, setHighlightedIndex] = React72.useState(-1);
|
|
23838
|
+
React72.useEffect(() => {
|
|
23468
23839
|
setFilteredOptions(getOptionsLabeled([...options]));
|
|
23469
23840
|
}, [options]);
|
|
23470
23841
|
const canAddValues = maxValues === void 0 || maxValues === 0 || !!multiple && Array.isArray(value) && value.length < maxValues;
|
|
23471
|
-
|
|
23842
|
+
React72.useEffect(() => {
|
|
23472
23843
|
if (disabled) {
|
|
23473
23844
|
setOpenPopover(false);
|
|
23474
23845
|
}
|
|
23475
23846
|
}, [disabled]);
|
|
23476
|
-
|
|
23847
|
+
React72.useEffect(() => {
|
|
23477
23848
|
if (!canAddValues && isOpenPopover) {
|
|
23478
23849
|
closePopover();
|
|
23479
23850
|
}
|
|
23480
23851
|
}, [canAddValues, isOpenPopover]);
|
|
23481
|
-
const getLastSelectedIndex =
|
|
23852
|
+
const getLastSelectedIndex = React72.useCallback(() => {
|
|
23482
23853
|
if (Array.isArray(selectedIndex) && selectedIndex.length > 0) {
|
|
23483
23854
|
return selectedIndex[selectedIndex.length - 1];
|
|
23484
23855
|
} else if (typeof selectedIndex === "number") {
|
|
@@ -23486,7 +23857,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23486
23857
|
}
|
|
23487
23858
|
return void 0;
|
|
23488
23859
|
}, [selectedIndex]);
|
|
23489
|
-
|
|
23860
|
+
React72.useEffect(() => {
|
|
23490
23861
|
if (isOpenPopover) {
|
|
23491
23862
|
if (highlightedIndex > -1) {
|
|
23492
23863
|
virtualListRef.current?.scrollToItem(highlightedIndex);
|
|
@@ -23688,8 +24059,8 @@ var Autocomplete = function Autocomplete2({
|
|
|
23688
24059
|
setNextIndexByValue(value2);
|
|
23689
24060
|
onChange && onChange(event, value2);
|
|
23690
24061
|
};
|
|
23691
|
-
return /* @__PURE__ */
|
|
23692
|
-
/* @__PURE__ */
|
|
24062
|
+
return /* @__PURE__ */ jsxs63(Fragment32, { children: [
|
|
24063
|
+
/* @__PURE__ */ jsx132(
|
|
23693
24064
|
AutocompleteInput_default,
|
|
23694
24065
|
{
|
|
23695
24066
|
inputRef,
|
|
@@ -23723,7 +24094,7 @@ var Autocomplete = function Autocomplete2({
|
|
|
23723
24094
|
onRemoveValue: onRemoveInputValue
|
|
23724
24095
|
}
|
|
23725
24096
|
),
|
|
23726
|
-
/* @__PURE__ */
|
|
24097
|
+
/* @__PURE__ */ jsx132(
|
|
23727
24098
|
AutocompleteList_default,
|
|
23728
24099
|
{
|
|
23729
24100
|
options,
|
|
@@ -23758,7 +24129,7 @@ function elementIsDescendantOrEqual(parent2, descendant) {
|
|
|
23758
24129
|
}
|
|
23759
24130
|
|
|
23760
24131
|
// src/components/input/TextEditor.tsx
|
|
23761
|
-
import
|
|
24132
|
+
import React75 from "react";
|
|
23762
24133
|
import { Editor } from "@tinymce/tinymce-react";
|
|
23763
24134
|
import "tinymce/tinymce";
|
|
23764
24135
|
import "tinymce/models/dom/model";
|
|
@@ -23779,16 +24150,16 @@ import "tinymce/plugins/wordcount";
|
|
|
23779
24150
|
import "tinymce/plugins/emoticons/js/emojis";
|
|
23780
24151
|
|
|
23781
24152
|
// src/components/input/CodeEditorPopup.tsx
|
|
23782
|
-
import
|
|
24153
|
+
import React74 from "react";
|
|
23783
24154
|
|
|
23784
24155
|
// src/components/input/CodeEditor.tsx
|
|
23785
|
-
import
|
|
24156
|
+
import React73 from "react";
|
|
23786
24157
|
import CodeMirror, {
|
|
23787
24158
|
EditorView
|
|
23788
24159
|
} from "@uiw/react-codemirror";
|
|
23789
24160
|
import { html } from "@codemirror/lang-html";
|
|
23790
24161
|
import { linter, lintGutter } from "@codemirror/lint";
|
|
23791
|
-
import { jsx as
|
|
24162
|
+
import { jsx as jsx133 } from "react/jsx-runtime";
|
|
23792
24163
|
var removeFocusOutline = EditorView.baseTheme({
|
|
23793
24164
|
"&.cm-focused": {
|
|
23794
24165
|
outline: "none"
|
|
@@ -23810,7 +24181,7 @@ var CodeEditor = function CodeEditor2({
|
|
|
23810
24181
|
linter(linterOptions?.source || null, linterOptions?.config),
|
|
23811
24182
|
...extensions
|
|
23812
24183
|
] : extensions;
|
|
23813
|
-
return /* @__PURE__ */
|
|
24184
|
+
return /* @__PURE__ */ jsx133(
|
|
23814
24185
|
CodeMirror,
|
|
23815
24186
|
{
|
|
23816
24187
|
...rest,
|
|
@@ -23825,11 +24196,11 @@ var CodeEditor = function CodeEditor2({
|
|
|
23825
24196
|
}
|
|
23826
24197
|
);
|
|
23827
24198
|
};
|
|
23828
|
-
var CodeEditor_default =
|
|
24199
|
+
var CodeEditor_default = React73.forwardRef(CodeEditor);
|
|
23829
24200
|
|
|
23830
24201
|
// src/components/input/CodeEditorPopup.tsx
|
|
23831
24202
|
import format from "html-format";
|
|
23832
|
-
import { Fragment as
|
|
24203
|
+
import { Fragment as Fragment33, jsx as jsx134, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
23833
24204
|
var FORMAT_CHARACTERS_LINE = 120;
|
|
23834
24205
|
var FORMAT_NUMBER_SPACES_INDENTATION = 2;
|
|
23835
24206
|
var CodeEditorPopup = ({
|
|
@@ -23845,9 +24216,9 @@ var CodeEditorPopup = ({
|
|
|
23845
24216
|
onCancel
|
|
23846
24217
|
}) => {
|
|
23847
24218
|
const { t } = useTranslation();
|
|
23848
|
-
const [valueModified, setValueModified] =
|
|
23849
|
-
const [hasErrors, setHasErrors] =
|
|
23850
|
-
|
|
24219
|
+
const [valueModified, setValueModified] = React74.useState(value);
|
|
24220
|
+
const [hasErrors, setHasErrors] = React74.useState(false);
|
|
24221
|
+
React74.useEffect(() => {
|
|
23851
24222
|
if (open) {
|
|
23852
24223
|
setValueModified(value);
|
|
23853
24224
|
}
|
|
@@ -23872,8 +24243,8 @@ var CodeEditorPopup = ({
|
|
|
23872
24243
|
" ".repeat(FORMAT_NUMBER_SPACES_INDENTATION),
|
|
23873
24244
|
FORMAT_CHARACTERS_LINE
|
|
23874
24245
|
);
|
|
23875
|
-
return /* @__PURE__ */
|
|
23876
|
-
readonly && /* @__PURE__ */
|
|
24246
|
+
return /* @__PURE__ */ jsxs64(Fragment33, { children: [
|
|
24247
|
+
readonly && /* @__PURE__ */ jsx134(
|
|
23877
24248
|
Dialog_default,
|
|
23878
24249
|
{
|
|
23879
24250
|
open,
|
|
@@ -23884,7 +24255,7 @@ var CodeEditorPopup = ({
|
|
|
23884
24255
|
noPaddingTitle: false,
|
|
23885
24256
|
wrapChildren: false,
|
|
23886
24257
|
title: t("TEXT_EDITOR.SOURCE_CODE.TITLE"),
|
|
23887
|
-
children: /* @__PURE__ */
|
|
24258
|
+
children: /* @__PURE__ */ jsxs64(
|
|
23888
24259
|
Stack_default,
|
|
23889
24260
|
{
|
|
23890
24261
|
flexGrow: 1,
|
|
@@ -23892,13 +24263,13 @@ var CodeEditorPopup = ({
|
|
|
23892
24263
|
justifyContent: "space-between",
|
|
23893
24264
|
paddingTop: "20px",
|
|
23894
24265
|
children: [
|
|
23895
|
-
/* @__PURE__ */
|
|
24266
|
+
/* @__PURE__ */ jsx134(
|
|
23896
24267
|
Box_default2,
|
|
23897
24268
|
{
|
|
23898
24269
|
flexGrow: 1,
|
|
23899
24270
|
className: "Slim-Vertical-Scroll",
|
|
23900
24271
|
sx: { margin: "0", padding: "0" },
|
|
23901
|
-
children: /* @__PURE__ */
|
|
24272
|
+
children: /* @__PURE__ */ jsxs64(
|
|
23902
24273
|
Stack_default,
|
|
23903
24274
|
{
|
|
23904
24275
|
gap: "16px",
|
|
@@ -23909,7 +24280,7 @@ var CodeEditorPopup = ({
|
|
|
23909
24280
|
}
|
|
23910
24281
|
},
|
|
23911
24282
|
children: [
|
|
23912
|
-
/* @__PURE__ */
|
|
24283
|
+
/* @__PURE__ */ jsx134(Box_default2, { flexGrow: 1, minHeight: 0, children: /* @__PURE__ */ jsx134(
|
|
23913
24284
|
CodeEditor_default,
|
|
23914
24285
|
{
|
|
23915
24286
|
autoFocus: true,
|
|
@@ -23938,7 +24309,7 @@ var CodeEditorPopup = ({
|
|
|
23938
24309
|
}
|
|
23939
24310
|
) }),
|
|
23940
24311
|
messageNode,
|
|
23941
|
-
hasErrors && /* @__PURE__ */
|
|
24312
|
+
hasErrors && /* @__PURE__ */ jsx134(Alert_default, { severity: "info", children: t(
|
|
23942
24313
|
"TEXT_EDITOR.SOURCE_CODE.VALIDATION_ERRORS_FOUND"
|
|
23943
24314
|
) })
|
|
23944
24315
|
]
|
|
@@ -23946,13 +24317,13 @@ var CodeEditorPopup = ({
|
|
|
23946
24317
|
)
|
|
23947
24318
|
}
|
|
23948
24319
|
),
|
|
23949
|
-
/* @__PURE__ */
|
|
24320
|
+
/* @__PURE__ */ jsx134(
|
|
23950
24321
|
Box_default2,
|
|
23951
24322
|
{
|
|
23952
24323
|
sx: {
|
|
23953
24324
|
padding: "16px 24px 16px 24px"
|
|
23954
24325
|
},
|
|
23955
|
-
children: /* @__PURE__ */
|
|
24326
|
+
children: /* @__PURE__ */ jsx134(
|
|
23956
24327
|
Button_default,
|
|
23957
24328
|
{
|
|
23958
24329
|
text: t(
|
|
@@ -23969,7 +24340,7 @@ var CodeEditorPopup = ({
|
|
|
23969
24340
|
)
|
|
23970
24341
|
}
|
|
23971
24342
|
),
|
|
23972
|
-
!readonly && /* @__PURE__ */
|
|
24343
|
+
!readonly && /* @__PURE__ */ jsx134(
|
|
23973
24344
|
ConfirmationDialog_default,
|
|
23974
24345
|
{
|
|
23975
24346
|
fullScreen: true,
|
|
@@ -23977,7 +24348,7 @@ var CodeEditorPopup = ({
|
|
|
23977
24348
|
open,
|
|
23978
24349
|
onCancel: onCancelData,
|
|
23979
24350
|
onAccept: onAcceptData,
|
|
23980
|
-
children: /* @__PURE__ */
|
|
24351
|
+
children: /* @__PURE__ */ jsxs64(
|
|
23981
24352
|
Stack_default,
|
|
23982
24353
|
{
|
|
23983
24354
|
gap: "16px",
|
|
@@ -23988,7 +24359,7 @@ var CodeEditorPopup = ({
|
|
|
23988
24359
|
}
|
|
23989
24360
|
},
|
|
23990
24361
|
children: [
|
|
23991
|
-
codeEditorSubtitle && /* @__PURE__ */
|
|
24362
|
+
codeEditorSubtitle && /* @__PURE__ */ jsx134(Box_default2, { sx: { marginTop: "4px", marginBottom: "8px" }, children: /* @__PURE__ */ jsx134(
|
|
23992
24363
|
Typography_default,
|
|
23993
24364
|
{
|
|
23994
24365
|
variant: "body2",
|
|
@@ -23996,7 +24367,7 @@ var CodeEditorPopup = ({
|
|
|
23996
24367
|
children: codeEditorSubtitle
|
|
23997
24368
|
}
|
|
23998
24369
|
) }),
|
|
23999
|
-
/* @__PURE__ */
|
|
24370
|
+
/* @__PURE__ */ jsx134(Box_default2, { flexGrow: 1, minHeight: 0, children: /* @__PURE__ */ jsx134(
|
|
24000
24371
|
CodeEditor_default,
|
|
24001
24372
|
{
|
|
24002
24373
|
autoFocus: true,
|
|
@@ -24025,7 +24396,7 @@ var CodeEditorPopup = ({
|
|
|
24025
24396
|
}
|
|
24026
24397
|
) }),
|
|
24027
24398
|
messageNode,
|
|
24028
|
-
hasErrors && /* @__PURE__ */
|
|
24399
|
+
hasErrors && /* @__PURE__ */ jsx134(Alert_default, { severity: "info", children: t(
|
|
24029
24400
|
"TEXT_EDITOR.SOURCE_CODE.VALIDATION_ERRORS_FOUND"
|
|
24030
24401
|
) })
|
|
24031
24402
|
]
|
|
@@ -24038,7 +24409,7 @@ var CodeEditorPopup = ({
|
|
|
24038
24409
|
var CodeEditorPopup_default = CodeEditorPopup;
|
|
24039
24410
|
|
|
24040
24411
|
// src/components/input/TextEditor.tsx
|
|
24041
|
-
import { Fragment as
|
|
24412
|
+
import { Fragment as Fragment34, jsx as jsx135, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
24042
24413
|
var DEFAULT_TOOLBAR_INSERT_MENU_ITEMS = [
|
|
24043
24414
|
"link",
|
|
24044
24415
|
"image",
|
|
@@ -24077,15 +24448,15 @@ var TextEditor = function TextEditor2({
|
|
|
24077
24448
|
...rest
|
|
24078
24449
|
}) {
|
|
24079
24450
|
const { t } = useTranslation();
|
|
24080
|
-
const editorRef =
|
|
24081
|
-
const [internalValue] =
|
|
24451
|
+
const editorRef = React75.useRef(null);
|
|
24452
|
+
const [internalValue] = React75.useState(
|
|
24082
24453
|
initialValue ?? t("TEXT_EDITOR.INITIAL_VALUE")
|
|
24083
24454
|
);
|
|
24084
|
-
const [contentValue, setContentValue] =
|
|
24085
|
-
const [codeEditorChanges, setCodeEditorChanges] =
|
|
24086
|
-
const [isCodeEditorDirty, setIsCodeEditorDirty] =
|
|
24087
|
-
const [isCodeEditorOpened, setIsCodeEditorOpened] =
|
|
24088
|
-
const [isDirty, setIsDirty] =
|
|
24455
|
+
const [contentValue, setContentValue] = React75.useState("");
|
|
24456
|
+
const [codeEditorChanges, setCodeEditorChanges] = React75.useState("");
|
|
24457
|
+
const [isCodeEditorDirty, setIsCodeEditorDirty] = React75.useState(false);
|
|
24458
|
+
const [isCodeEditorOpened, setIsCodeEditorOpened] = React75.useState(false);
|
|
24459
|
+
const [isDirty, setIsDirty] = React75.useState(false);
|
|
24089
24460
|
const codeEditorButtonIndexToUse = codeEditorButtonIndex ?? customToolbarGroups.insert?.items?.length ?? DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.length;
|
|
24090
24461
|
const defaultToolbarInsertMenuItemsWithCodeEditor = DEFAULT_TOOLBAR_INSERT_MENU_ITEMS.slice();
|
|
24091
24462
|
defaultToolbarInsertMenuItemsWithCodeEditor.splice(
|
|
@@ -24099,12 +24470,12 @@ var TextEditor = function TextEditor2({
|
|
|
24099
24470
|
0,
|
|
24100
24471
|
"cnCodeEditor"
|
|
24101
24472
|
);
|
|
24102
|
-
const onTextChange =
|
|
24473
|
+
const onTextChange = React75.useCallback(() => {
|
|
24103
24474
|
if (editorRef.current) {
|
|
24104
24475
|
onChange(editorRef.current?.getContent());
|
|
24105
24476
|
}
|
|
24106
24477
|
}, [onChange]);
|
|
24107
|
-
const onTextEditorDirty =
|
|
24478
|
+
const onTextEditorDirty = React75.useCallback(
|
|
24108
24479
|
(textEditorDirty) => {
|
|
24109
24480
|
editorRef.current?.setDirty(textEditorDirty);
|
|
24110
24481
|
setIsDirty(textEditorDirty);
|
|
@@ -24117,7 +24488,7 @@ var TextEditor = function TextEditor2({
|
|
|
24117
24488
|
},
|
|
24118
24489
|
[onDirty, onTextChange]
|
|
24119
24490
|
);
|
|
24120
|
-
|
|
24491
|
+
React75.useEffect(() => {
|
|
24121
24492
|
if (resetDirty && editorRef.current?.isDirty()) {
|
|
24122
24493
|
onTextEditorDirty(false);
|
|
24123
24494
|
}
|
|
@@ -24125,7 +24496,7 @@ var TextEditor = function TextEditor2({
|
|
|
24125
24496
|
onResetDirty();
|
|
24126
24497
|
}
|
|
24127
24498
|
}, [onResetDirty, onTextEditorDirty, resetDirty]);
|
|
24128
|
-
|
|
24499
|
+
React75.useEffect(() => {
|
|
24129
24500
|
if (newValue && editorRef.current) {
|
|
24130
24501
|
editorRef.current.setContent(newValue);
|
|
24131
24502
|
if (onNewValueSetter) {
|
|
@@ -24133,7 +24504,7 @@ var TextEditor = function TextEditor2({
|
|
|
24133
24504
|
}
|
|
24134
24505
|
}
|
|
24135
24506
|
}, [newValue, onNewValueSetter]);
|
|
24136
|
-
|
|
24507
|
+
React75.useEffect(() => {
|
|
24137
24508
|
if (forceCloseCodeEditor) {
|
|
24138
24509
|
setIsCodeEditorOpened(false);
|
|
24139
24510
|
if (onForceCloseCodeEditor) {
|
|
@@ -24324,8 +24695,8 @@ var TextEditor = function TextEditor2({
|
|
|
24324
24695
|
};
|
|
24325
24696
|
}
|
|
24326
24697
|
};
|
|
24327
|
-
return /* @__PURE__ */
|
|
24328
|
-
/* @__PURE__ */
|
|
24698
|
+
return /* @__PURE__ */ jsxs65(Fragment34, { children: [
|
|
24699
|
+
/* @__PURE__ */ jsx135(
|
|
24329
24700
|
Editor,
|
|
24330
24701
|
{
|
|
24331
24702
|
id,
|
|
@@ -24345,7 +24716,7 @@ var TextEditor = function TextEditor2({
|
|
|
24345
24716
|
...rest
|
|
24346
24717
|
}
|
|
24347
24718
|
),
|
|
24348
|
-
/* @__PURE__ */
|
|
24719
|
+
/* @__PURE__ */ jsx135(
|
|
24349
24720
|
CodeEditorPopup_default,
|
|
24350
24721
|
{
|
|
24351
24722
|
value: contentValue,
|
|
@@ -24380,10 +24751,10 @@ var TextEditor = function TextEditor2({
|
|
|
24380
24751
|
var TextEditor_default = TextEditor;
|
|
24381
24752
|
|
|
24382
24753
|
// src/components/input/PhoneField.tsx
|
|
24383
|
-
import * as
|
|
24384
|
-
import { Fragment as
|
|
24754
|
+
import * as React76 from "react";
|
|
24755
|
+
import { Fragment as Fragment35, jsx as jsx136, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
24385
24756
|
var maxPhoneLengthWithPrefix = 16;
|
|
24386
|
-
var PhoneField =
|
|
24757
|
+
var PhoneField = React76.forwardRef(function PhoneField2({
|
|
24387
24758
|
value,
|
|
24388
24759
|
onChange,
|
|
24389
24760
|
defaultCountryCode = "34",
|
|
@@ -24391,20 +24762,20 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24391
24762
|
codeSelectProps,
|
|
24392
24763
|
...rest
|
|
24393
24764
|
}, ref) {
|
|
24394
|
-
const [countryCode, setCountryCode] =
|
|
24395
|
-
const [textValue, setTextValue] =
|
|
24396
|
-
const countryCodeOptions =
|
|
24765
|
+
const [countryCode, setCountryCode] = React76.useState(defaultCountryCode);
|
|
24766
|
+
const [textValue, setTextValue] = React76.useState("");
|
|
24767
|
+
const countryCodeOptions = React76.useMemo(
|
|
24397
24768
|
() => allCountries.map((c) => ({
|
|
24398
24769
|
value: c.countryCode,
|
|
24399
24770
|
label: `+${c.countryCode} ${c.name}`
|
|
24400
24771
|
})),
|
|
24401
24772
|
[]
|
|
24402
24773
|
);
|
|
24403
|
-
const sanitizeTextValue =
|
|
24774
|
+
const sanitizeTextValue = React76.useCallback(
|
|
24404
24775
|
(value2) => value2.replace(/[^\d]/g, ""),
|
|
24405
24776
|
[]
|
|
24406
24777
|
);
|
|
24407
|
-
const onChangeText =
|
|
24778
|
+
const onChangeText = React76.useCallback(
|
|
24408
24779
|
(event) => {
|
|
24409
24780
|
const sanitizedTextValue = sanitizeTextValue(
|
|
24410
24781
|
event.target.value
|
|
@@ -24418,7 +24789,7 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24418
24789
|
},
|
|
24419
24790
|
[countryCode, onChange, sanitizeTextValue, textValue]
|
|
24420
24791
|
);
|
|
24421
|
-
const onChangeCountryCode =
|
|
24792
|
+
const onChangeCountryCode = React76.useCallback(
|
|
24422
24793
|
(countryCode2) => {
|
|
24423
24794
|
const sanitizedTextValue = sanitizeTextValue(textValue).substring(
|
|
24424
24795
|
0,
|
|
@@ -24434,7 +24805,7 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24434
24805
|
},
|
|
24435
24806
|
[onChange, sanitizeTextValue, textValue]
|
|
24436
24807
|
);
|
|
24437
|
-
|
|
24808
|
+
React76.useEffect(() => {
|
|
24438
24809
|
const countryCode2 = getCountryCode(value);
|
|
24439
24810
|
if (!countryCode2) {
|
|
24440
24811
|
setTextValue("");
|
|
@@ -24444,7 +24815,7 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24444
24815
|
setCountryCode(countryCode2);
|
|
24445
24816
|
setTextValue(phone);
|
|
24446
24817
|
}, [value]);
|
|
24447
|
-
const select = /* @__PURE__ */
|
|
24818
|
+
const select = /* @__PURE__ */ jsx136(
|
|
24448
24819
|
Select_default,
|
|
24449
24820
|
{
|
|
24450
24821
|
className: "Cn-PhoneField-countryCodeSelector",
|
|
@@ -24460,13 +24831,13 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24460
24831
|
}
|
|
24461
24832
|
}
|
|
24462
24833
|
);
|
|
24463
|
-
return /* @__PURE__ */
|
|
24834
|
+
return /* @__PURE__ */ jsx136(
|
|
24464
24835
|
TextField_default,
|
|
24465
24836
|
{
|
|
24466
24837
|
groupElements: true,
|
|
24467
24838
|
...rest,
|
|
24468
24839
|
className: `Cn-PhoneField ${className}`,
|
|
24469
|
-
startAdornment: /* @__PURE__ */
|
|
24840
|
+
startAdornment: /* @__PURE__ */ jsxs66(Fragment35, { children: [
|
|
24470
24841
|
rest.startAdornment,
|
|
24471
24842
|
select
|
|
24472
24843
|
] }),
|
|
@@ -24479,8 +24850,8 @@ var PhoneField = React74.forwardRef(function PhoneField2({
|
|
|
24479
24850
|
var PhoneField_default = PhoneField;
|
|
24480
24851
|
|
|
24481
24852
|
// src/components/input/NumberField.tsx
|
|
24482
|
-
import * as
|
|
24483
|
-
import { jsx as
|
|
24853
|
+
import * as React77 from "react";
|
|
24854
|
+
import { jsx as jsx137, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
24484
24855
|
var setValueAndTriggerChangeEvent = (r2, value) => {
|
|
24485
24856
|
const propDescriptor = Object.getOwnPropertyDescriptor(
|
|
24486
24857
|
window["HTMLInputElement"].prototype,
|
|
@@ -24496,7 +24867,7 @@ var setValueAndTriggerChangeEvent = (r2, value) => {
|
|
|
24496
24867
|
r2.current.dispatchEvent(e);
|
|
24497
24868
|
}
|
|
24498
24869
|
};
|
|
24499
|
-
var NumberField =
|
|
24870
|
+
var NumberField = React77.forwardRef(function NumberField2({
|
|
24500
24871
|
value,
|
|
24501
24872
|
type = "integer",
|
|
24502
24873
|
onChange,
|
|
@@ -24512,16 +24883,16 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24512
24883
|
endAdornment,
|
|
24513
24884
|
...rest
|
|
24514
24885
|
}, ref) {
|
|
24515
|
-
const inputRef =
|
|
24516
|
-
const numberToString =
|
|
24886
|
+
const inputRef = React77.useRef(null);
|
|
24887
|
+
const numberToString = React77.useCallback(
|
|
24517
24888
|
(value2) => typeof value2 === "number" && !isNaN(value2) ? fractionDigits !== 0 ? value2.toFixed(fractionDigits) : value2.toString() : "",
|
|
24518
24889
|
[fractionDigits]
|
|
24519
24890
|
);
|
|
24520
|
-
const stringToNumber =
|
|
24891
|
+
const stringToNumber = React77.useCallback(
|
|
24521
24892
|
(value2) => !value2 || isNaN(+value2) ? null : +value2,
|
|
24522
24893
|
[]
|
|
24523
24894
|
);
|
|
24524
|
-
const sanitizeDecimalTextValue =
|
|
24895
|
+
const sanitizeDecimalTextValue = React77.useCallback(
|
|
24525
24896
|
(value2) => {
|
|
24526
24897
|
const negativeSign = value2.charAt(0) === "-" ? "-" : "";
|
|
24527
24898
|
const numbersAndDots = value2.replace(/[^\d.]/g, "");
|
|
@@ -24533,7 +24904,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24533
24904
|
},
|
|
24534
24905
|
[fractionDigits]
|
|
24535
24906
|
);
|
|
24536
|
-
const sanitizeIntegerTextValue =
|
|
24907
|
+
const sanitizeIntegerTextValue = React77.useCallback(
|
|
24537
24908
|
(value2) => {
|
|
24538
24909
|
const negativeSign = value2.charAt(0) === "-" ? "-" : "";
|
|
24539
24910
|
const numbers = value2.replace(/[^\d]/g, "");
|
|
@@ -24541,7 +24912,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24541
24912
|
},
|
|
24542
24913
|
[]
|
|
24543
24914
|
);
|
|
24544
|
-
const _onChange =
|
|
24915
|
+
const _onChange = React77.useCallback(
|
|
24545
24916
|
(event) => {
|
|
24546
24917
|
const sanitizedTextValue = type === "integer" ? sanitizeIntegerTextValue(event.target.value) : sanitizeDecimalTextValue(event.target.value);
|
|
24547
24918
|
let numericValue = stringToNumber(sanitizedTextValue);
|
|
@@ -24571,7 +24942,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24571
24942
|
numberToString
|
|
24572
24943
|
]
|
|
24573
24944
|
);
|
|
24574
|
-
const stepUp =
|
|
24945
|
+
const stepUp = React77.useCallback(() => {
|
|
24575
24946
|
if (typeof value === "number" && !isNaN(value)) {
|
|
24576
24947
|
setValueAndTriggerChangeEvent(
|
|
24577
24948
|
ref ?? inputRef,
|
|
@@ -24584,7 +24955,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24584
24955
|
);
|
|
24585
24956
|
}
|
|
24586
24957
|
}, [numberToString, ref, step, value]);
|
|
24587
|
-
const stepDown =
|
|
24958
|
+
const stepDown = React77.useCallback(() => {
|
|
24588
24959
|
if (typeof value === "number" && !isNaN(value)) {
|
|
24589
24960
|
setValueAndTriggerChangeEvent(
|
|
24590
24961
|
ref ?? inputRef,
|
|
@@ -24597,7 +24968,7 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24597
24968
|
);
|
|
24598
24969
|
}
|
|
24599
24970
|
}, [numberToString, ref, step, value]);
|
|
24600
|
-
const _onKeyDown =
|
|
24971
|
+
const _onKeyDown = React77.useCallback(
|
|
24601
24972
|
(event) => {
|
|
24602
24973
|
onKeyDown && onKeyDown(event);
|
|
24603
24974
|
if (step <= 0) {
|
|
@@ -24616,8 +24987,8 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24616
24987
|
},
|
|
24617
24988
|
[onKeyDown, step, stepDown, stepUp]
|
|
24618
24989
|
);
|
|
24619
|
-
const [textValue, setTextValue] =
|
|
24620
|
-
const _onBlur =
|
|
24990
|
+
const [textValue, setTextValue] = React77.useState(numberToString(value));
|
|
24991
|
+
const _onBlur = React77.useCallback(
|
|
24621
24992
|
(event) => {
|
|
24622
24993
|
onBlur && onBlur(event);
|
|
24623
24994
|
const text = numberToString(value);
|
|
@@ -24629,9 +25000,9 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24629
25000
|
);
|
|
24630
25001
|
const stepUpDisabled = typeof value !== "number" || typeof maxValue === "number" && value + step > maxValue;
|
|
24631
25002
|
const stepDownDisabled = typeof value !== "number" || typeof minValue === "number" && value - step < minValue;
|
|
24632
|
-
const _endAdornment = withStepperButtons ? /* @__PURE__ */
|
|
25003
|
+
const _endAdornment = withStepperButtons ? /* @__PURE__ */ jsxs67(Stack_default, { direction: "row", gap: "8px", children: [
|
|
24633
25004
|
endAdornment,
|
|
24634
|
-
/* @__PURE__ */
|
|
25005
|
+
/* @__PURE__ */ jsxs67(
|
|
24635
25006
|
Stack_default,
|
|
24636
25007
|
{
|
|
24637
25008
|
justifyContent: "center",
|
|
@@ -24643,12 +25014,12 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24643
25014
|
}
|
|
24644
25015
|
},
|
|
24645
25016
|
children: [
|
|
24646
|
-
/* @__PURE__ */
|
|
25017
|
+
/* @__PURE__ */ jsx137(
|
|
24647
25018
|
Tooltip_default,
|
|
24648
25019
|
{
|
|
24649
25020
|
title: stepUpDisabledTooltip && stepUpDisabled ? stepUpDisabledTooltip : "",
|
|
24650
25021
|
allowDisabled: true,
|
|
24651
|
-
children: /* @__PURE__ */
|
|
25022
|
+
children: /* @__PURE__ */ jsx137(
|
|
24652
25023
|
IconButton_default,
|
|
24653
25024
|
{
|
|
24654
25025
|
disabled: stepUpDisabled,
|
|
@@ -24659,12 +25030,12 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24659
25030
|
)
|
|
24660
25031
|
}
|
|
24661
25032
|
),
|
|
24662
|
-
/* @__PURE__ */
|
|
25033
|
+
/* @__PURE__ */ jsx137(
|
|
24663
25034
|
Tooltip_default,
|
|
24664
25035
|
{
|
|
24665
25036
|
title: stepDownDisabledTooltip && stepDownDisabled ? stepDownDisabledTooltip : "",
|
|
24666
25037
|
allowDisabled: true,
|
|
24667
|
-
children: /* @__PURE__ */
|
|
25038
|
+
children: /* @__PURE__ */ jsx137(
|
|
24668
25039
|
IconButton_default,
|
|
24669
25040
|
{
|
|
24670
25041
|
disabled: stepDownDisabled,
|
|
@@ -24679,12 +25050,12 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24679
25050
|
}
|
|
24680
25051
|
)
|
|
24681
25052
|
] }) : endAdornment;
|
|
24682
|
-
|
|
25053
|
+
React77.useEffect(() => {
|
|
24683
25054
|
if (stringToNumber(textValue) !== value) {
|
|
24684
25055
|
setTextValue(numberToString(value));
|
|
24685
25056
|
}
|
|
24686
25057
|
}, [numberToString, stringToNumber, textValue, value]);
|
|
24687
|
-
return /* @__PURE__ */
|
|
25058
|
+
return /* @__PURE__ */ jsx137(
|
|
24688
25059
|
TextField_default,
|
|
24689
25060
|
{
|
|
24690
25061
|
...rest,
|
|
@@ -24700,13 +25071,13 @@ var NumberField = React75.forwardRef(function NumberField2({
|
|
|
24700
25071
|
var NumberField_default = NumberField;
|
|
24701
25072
|
|
|
24702
25073
|
// src/components/input/DatePicker.tsx
|
|
24703
|
-
import * as
|
|
25074
|
+
import * as React79 from "react";
|
|
24704
25075
|
import { tz as tz8 } from "moment-timezone";
|
|
24705
25076
|
|
|
24706
25077
|
// src/components/input/DatePickerStatic.tsx
|
|
24707
|
-
import * as
|
|
25078
|
+
import * as React78 from "react";
|
|
24708
25079
|
import { tz as tz7 } from "moment-timezone";
|
|
24709
|
-
import { jsx as
|
|
25080
|
+
import { jsx as jsx138, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
24710
25081
|
var minYear = 1900;
|
|
24711
25082
|
var maxYear = 2100;
|
|
24712
25083
|
var DatePickerStatic = ({
|
|
@@ -24715,13 +25086,13 @@ var DatePickerStatic = ({
|
|
|
24715
25086
|
minDate,
|
|
24716
25087
|
maxDate
|
|
24717
25088
|
}) => {
|
|
24718
|
-
const { timezone } =
|
|
24719
|
-
const [selectedDateParts, setSelectedDateParts] =
|
|
24720
|
-
const [visibleMonth, setVisibleMonth] =
|
|
25089
|
+
const { timezone } = React78.useContext(IntlContext);
|
|
25090
|
+
const [selectedDateParts, setSelectedDateParts] = React78.useState(void 0);
|
|
25091
|
+
const [visibleMonth, setVisibleMonth] = React78.useState({
|
|
24721
25092
|
year: minYear,
|
|
24722
25093
|
month: 0
|
|
24723
25094
|
});
|
|
24724
|
-
|
|
25095
|
+
React78.useEffect(() => {
|
|
24725
25096
|
if (selectedDateParts) {
|
|
24726
25097
|
setVisibleMonth({
|
|
24727
25098
|
year: selectedDateParts.year,
|
|
@@ -24735,7 +25106,7 @@ var DatePickerStatic = ({
|
|
|
24735
25106
|
});
|
|
24736
25107
|
}
|
|
24737
25108
|
}, [selectedDateParts, timezone]);
|
|
24738
|
-
|
|
25109
|
+
React78.useEffect(() => {
|
|
24739
25110
|
if (!value || isNaN(value.getTime())) {
|
|
24740
25111
|
setSelectedDateParts(void 0);
|
|
24741
25112
|
return;
|
|
@@ -24757,25 +25128,25 @@ var DatePickerStatic = ({
|
|
|
24757
25128
|
const endYear = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getFullYear() : maxYear;
|
|
24758
25129
|
const startMonth = minDate && !isNaN(minDate.getTime()) ? minDate.getMonth() : 0;
|
|
24759
25130
|
const endMonth = maxDate && !isNaN(maxDate.getTime()) ? maxDate.getMonth() : 11;
|
|
24760
|
-
const options =
|
|
25131
|
+
const options = React78.useMemo(
|
|
24761
25132
|
() => Array.from(Array(endYear - startYear + 1)).map((_, i) => ({
|
|
24762
25133
|
value: startYear + i
|
|
24763
25134
|
})),
|
|
24764
25135
|
[endYear, startYear]
|
|
24765
25136
|
);
|
|
24766
|
-
const navigatePreviousMonth =
|
|
25137
|
+
const navigatePreviousMonth = React78.useCallback(() => {
|
|
24767
25138
|
setVisibleMonth({
|
|
24768
25139
|
month: visibleMonth.month === 0 ? 11 : visibleMonth.month - 1,
|
|
24769
25140
|
year: visibleMonth.month === 0 ? visibleMonth.year - 1 : visibleMonth.year
|
|
24770
25141
|
});
|
|
24771
25142
|
}, [visibleMonth]);
|
|
24772
|
-
const navigateNextMonth =
|
|
25143
|
+
const navigateNextMonth = React78.useCallback(() => {
|
|
24773
25144
|
setVisibleMonth({
|
|
24774
25145
|
month: visibleMonth.month === 11 ? 0 : visibleMonth.month + 1,
|
|
24775
25146
|
year: visibleMonth.month === 11 ? visibleMonth.year + 1 : visibleMonth.year
|
|
24776
25147
|
});
|
|
24777
25148
|
}, [visibleMonth]);
|
|
24778
|
-
const onChangeYear =
|
|
25149
|
+
const onChangeYear = React78.useCallback(
|
|
24779
25150
|
(value2) => {
|
|
24780
25151
|
const month = value2 === startYear ? Math.max(startMonth, visibleMonth.month) : value2 === endYear ? Math.min(endMonth, visibleMonth.month) : visibleMonth.month;
|
|
24781
25152
|
setVisibleMonth({
|
|
@@ -24785,17 +25156,17 @@ var DatePickerStatic = ({
|
|
|
24785
25156
|
},
|
|
24786
25157
|
[endMonth, endYear, startMonth, startYear, visibleMonth.month]
|
|
24787
25158
|
);
|
|
24788
|
-
const minSimpleDate =
|
|
25159
|
+
const minSimpleDate = React78.useMemo(
|
|
24789
25160
|
() => dateToSimpleDate(minDate, timezone),
|
|
24790
25161
|
[minDate, timezone]
|
|
24791
25162
|
);
|
|
24792
|
-
const maxSimpleDate =
|
|
25163
|
+
const maxSimpleDate = React78.useMemo(
|
|
24793
25164
|
() => dateToSimpleDate(maxDate, timezone),
|
|
24794
25165
|
[maxDate, timezone]
|
|
24795
25166
|
);
|
|
24796
25167
|
const isDisabledPreviousMonth = visibleMonth.year < startYear || visibleMonth.year === startYear && visibleMonth.month <= startMonth;
|
|
24797
25168
|
const isDisabledNextMonth = visibleMonth.year > endYear || visibleMonth.year === endYear && visibleMonth.month >= endMonth;
|
|
24798
|
-
return /* @__PURE__ */
|
|
25169
|
+
return /* @__PURE__ */ jsxs68(
|
|
24799
25170
|
Stack_default,
|
|
24800
25171
|
{
|
|
24801
25172
|
sx: {
|
|
@@ -24804,7 +25175,7 @@ var DatePickerStatic = ({
|
|
|
24804
25175
|
boxSizing: "border-box"
|
|
24805
25176
|
},
|
|
24806
25177
|
children: [
|
|
24807
|
-
/* @__PURE__ */
|
|
25178
|
+
/* @__PURE__ */ jsxs68(
|
|
24808
25179
|
Stack_default,
|
|
24809
25180
|
{
|
|
24810
25181
|
direction: "row",
|
|
@@ -24814,7 +25185,7 @@ var DatePickerStatic = ({
|
|
|
24814
25185
|
spacing: 2,
|
|
24815
25186
|
justifyContent: "space-between",
|
|
24816
25187
|
children: [
|
|
24817
|
-
/* @__PURE__ */
|
|
25188
|
+
/* @__PURE__ */ jsx138(
|
|
24818
25189
|
Select_default,
|
|
24819
25190
|
{
|
|
24820
25191
|
value: visibleMonth.year,
|
|
@@ -24822,8 +25193,8 @@ var DatePickerStatic = ({
|
|
|
24822
25193
|
onChange: onChangeYear
|
|
24823
25194
|
}
|
|
24824
25195
|
),
|
|
24825
|
-
/* @__PURE__ */
|
|
24826
|
-
/* @__PURE__ */
|
|
25196
|
+
/* @__PURE__ */ jsxs68(Stack_default, { direction: "row", spacing: 2, children: [
|
|
25197
|
+
/* @__PURE__ */ jsx138(
|
|
24827
25198
|
IconButton_default,
|
|
24828
25199
|
{
|
|
24829
25200
|
disabled: isDisabledPreviousMonth,
|
|
@@ -24831,7 +25202,7 @@ var DatePickerStatic = ({
|
|
|
24831
25202
|
onClick: navigatePreviousMonth
|
|
24832
25203
|
}
|
|
24833
25204
|
),
|
|
24834
|
-
/* @__PURE__ */
|
|
25205
|
+
/* @__PURE__ */ jsx138(
|
|
24835
25206
|
IconButton_default,
|
|
24836
25207
|
{
|
|
24837
25208
|
disabled: isDisabledNextMonth,
|
|
@@ -24843,8 +25214,8 @@ var DatePickerStatic = ({
|
|
|
24843
25214
|
]
|
|
24844
25215
|
}
|
|
24845
25216
|
),
|
|
24846
|
-
/* @__PURE__ */
|
|
24847
|
-
/* @__PURE__ */
|
|
25217
|
+
/* @__PURE__ */ jsx138(DaysOfWeekRow_default, {}),
|
|
25218
|
+
/* @__PURE__ */ jsx138(Box_default2, { sx: { padding: "8px" }, children: /* @__PURE__ */ jsx138(
|
|
24848
25219
|
CalendarMonth_default,
|
|
24849
25220
|
{
|
|
24850
25221
|
allowKeyboardNavigation: true,
|
|
@@ -24881,14 +25252,14 @@ var DatePickerStatic = ({
|
|
|
24881
25252
|
var DatePickerStatic_default = DatePickerStatic;
|
|
24882
25253
|
|
|
24883
25254
|
// src/components/input/DatePickerPopover.tsx
|
|
24884
|
-
import { jsx as
|
|
25255
|
+
import { jsx as jsx139 } from "react/jsx-runtime";
|
|
24885
25256
|
var DatePickerPopover = ({
|
|
24886
25257
|
value,
|
|
24887
25258
|
onSelect,
|
|
24888
25259
|
minDate,
|
|
24889
25260
|
maxDate,
|
|
24890
25261
|
...rest
|
|
24891
|
-
}) => /* @__PURE__ */
|
|
25262
|
+
}) => /* @__PURE__ */ jsx139(Popover_default, { anchorHorizontalOrigin: "right", horizontalAlign: "right", ...rest, children: /* @__PURE__ */ jsx139(
|
|
24892
25263
|
DatePickerStatic_default,
|
|
24893
25264
|
{
|
|
24894
25265
|
value,
|
|
@@ -24900,19 +25271,19 @@ var DatePickerPopover = ({
|
|
|
24900
25271
|
var DatePickerPopover_default = DatePickerPopover;
|
|
24901
25272
|
|
|
24902
25273
|
// src/components/input/DatePicker.tsx
|
|
24903
|
-
import { Fragment as
|
|
24904
|
-
var DatePicker =
|
|
25274
|
+
import { Fragment as Fragment36, jsx as jsx140, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
25275
|
+
var DatePicker = React79.forwardRef(
|
|
24905
25276
|
function DatePicker2({ value, onChange, onBlur, onKeyDown, minDate, maxDate, ...rest }, ref) {
|
|
24906
|
-
const { locale, timezone } =
|
|
25277
|
+
const { locale, timezone } = React79.useContext(IntlContext);
|
|
24907
25278
|
const dateInputFormat = getDateInputFormatForLocale(locale);
|
|
24908
25279
|
const { t } = useTranslation();
|
|
24909
|
-
const dateInputFormatPlaceholder =
|
|
25280
|
+
const dateInputFormatPlaceholder = React79.useMemo(
|
|
24910
25281
|
() => 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")),
|
|
24911
25282
|
[dateInputFormat, t]
|
|
24912
25283
|
);
|
|
24913
|
-
const _containerRef =
|
|
24914
|
-
const [isPopoverOpen, setPopoverOpen] =
|
|
24915
|
-
const [textValue, setTextValue] =
|
|
25284
|
+
const _containerRef = React79.useRef(null);
|
|
25285
|
+
const [isPopoverOpen, setPopoverOpen] = React79.useState(false);
|
|
25286
|
+
const [textValue, setTextValue] = React79.useState("");
|
|
24916
25287
|
let anchorEl = null;
|
|
24917
25288
|
if (isPopoverOpen) {
|
|
24918
25289
|
if (rest.containerRef && typeof rest.containerRef === "object" && rest.containerRef.current) {
|
|
@@ -24921,21 +25292,21 @@ var DatePicker = React77.forwardRef(
|
|
|
24921
25292
|
anchorEl = _containerRef.current;
|
|
24922
25293
|
}
|
|
24923
25294
|
}
|
|
24924
|
-
const isValidDate =
|
|
25295
|
+
const isValidDate = React79.useCallback(
|
|
24925
25296
|
(dateString) => {
|
|
24926
25297
|
const date = parseDateForLocale(dateString, locale, timezone);
|
|
24927
25298
|
return !isNaN(date.getTime()) && (!minDate || date >= minDate) && (!maxDate || date <= maxDate);
|
|
24928
25299
|
},
|
|
24929
25300
|
[locale, maxDate, minDate, timezone]
|
|
24930
25301
|
);
|
|
24931
|
-
const onSelect =
|
|
25302
|
+
const onSelect = React79.useCallback(
|
|
24932
25303
|
(date) => {
|
|
24933
25304
|
setPopoverOpen(false);
|
|
24934
25305
|
onChange && onChange(date);
|
|
24935
25306
|
},
|
|
24936
25307
|
[onChange]
|
|
24937
25308
|
);
|
|
24938
|
-
const onChangeTextField =
|
|
25309
|
+
const onChangeTextField = React79.useCallback(
|
|
24939
25310
|
(event) => {
|
|
24940
25311
|
setTextValue(event.target.value);
|
|
24941
25312
|
if (!event.target.value && value) {
|
|
@@ -24954,7 +25325,7 @@ var DatePicker = React77.forwardRef(
|
|
|
24954
25325
|
},
|
|
24955
25326
|
[isValidDate, locale, onChange, timezone, value]
|
|
24956
25327
|
);
|
|
24957
|
-
const onBlurTextField =
|
|
25328
|
+
const onBlurTextField = React79.useCallback(
|
|
24958
25329
|
(event) => {
|
|
24959
25330
|
if (!isValidDate(event.target.value)) {
|
|
24960
25331
|
value ? onChange && onChange(null) : setTextValue("");
|
|
@@ -24963,7 +25334,7 @@ var DatePicker = React77.forwardRef(
|
|
|
24963
25334
|
},
|
|
24964
25335
|
[isValidDate, onChange, onBlur, value]
|
|
24965
25336
|
);
|
|
24966
|
-
const onKeyDownTextField =
|
|
25337
|
+
const onKeyDownTextField = React79.useCallback(
|
|
24967
25338
|
(event) => {
|
|
24968
25339
|
if (event.key === "ArrowDown") {
|
|
24969
25340
|
setPopoverOpen(true);
|
|
@@ -24972,12 +25343,12 @@ var DatePicker = React77.forwardRef(
|
|
|
24972
25343
|
},
|
|
24973
25344
|
[onKeyDown]
|
|
24974
25345
|
);
|
|
24975
|
-
|
|
25346
|
+
React79.useEffect(() => {
|
|
24976
25347
|
const text = value && !isNaN(value.getTime()) ? tz8(value, timezone).format(dateInputFormat) : "";
|
|
24977
25348
|
setTextValue(text);
|
|
24978
25349
|
}, [dateInputFormat, timezone, value]);
|
|
24979
|
-
return /* @__PURE__ */
|
|
24980
|
-
/* @__PURE__ */
|
|
25350
|
+
return /* @__PURE__ */ jsxs69(Fragment36, { children: [
|
|
25351
|
+
/* @__PURE__ */ jsx140(
|
|
24981
25352
|
TextField_default,
|
|
24982
25353
|
{
|
|
24983
25354
|
ref,
|
|
@@ -24988,7 +25359,7 @@ var DatePicker = React77.forwardRef(
|
|
|
24988
25359
|
onChange: onChangeTextField,
|
|
24989
25360
|
onBlur: onBlurTextField,
|
|
24990
25361
|
onKeyDown: onKeyDownTextField,
|
|
24991
|
-
endAdornment: /* @__PURE__ */
|
|
25362
|
+
endAdornment: /* @__PURE__ */ jsx140(
|
|
24992
25363
|
IconButton_default,
|
|
24993
25364
|
{
|
|
24994
25365
|
"data-testid": "date-picker-open-button",
|
|
@@ -25000,7 +25371,7 @@ var DatePicker = React77.forwardRef(
|
|
|
25000
25371
|
)
|
|
25001
25372
|
}
|
|
25002
25373
|
),
|
|
25003
|
-
/* @__PURE__ */
|
|
25374
|
+
/* @__PURE__ */ jsx140(
|
|
25004
25375
|
DatePickerPopover_default,
|
|
25005
25376
|
{
|
|
25006
25377
|
anchorEl,
|
|
@@ -25019,14 +25390,14 @@ var DatePicker_default = DatePicker;
|
|
|
25019
25390
|
// src/components/input/Checkbox.tsx
|
|
25020
25391
|
import MuiCheckbox from "@mui/material/Checkbox";
|
|
25021
25392
|
import { FormControlLabel, FormGroup } from "@mui/material";
|
|
25022
|
-
import { Fragment as
|
|
25393
|
+
import { Fragment as Fragment37, jsx as jsx141, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
25023
25394
|
var MaterialCheckbox = ({
|
|
25024
25395
|
checked,
|
|
25025
25396
|
disabled,
|
|
25026
25397
|
inputClass,
|
|
25027
25398
|
indeterminate,
|
|
25028
25399
|
onChange
|
|
25029
|
-
}) => /* @__PURE__ */
|
|
25400
|
+
}) => /* @__PURE__ */ jsx141(
|
|
25030
25401
|
MuiCheckbox,
|
|
25031
25402
|
{
|
|
25032
25403
|
disabled,
|
|
@@ -25052,8 +25423,8 @@ var Checkbox = ({
|
|
|
25052
25423
|
inputClass,
|
|
25053
25424
|
onChange,
|
|
25054
25425
|
tabIndex
|
|
25055
|
-
}) => /* @__PURE__ */
|
|
25056
|
-
!label && /* @__PURE__ */
|
|
25426
|
+
}) => /* @__PURE__ */ jsxs70(Fragment37, { children: [
|
|
25427
|
+
!label && /* @__PURE__ */ jsx141(
|
|
25057
25428
|
MaterialCheckbox,
|
|
25058
25429
|
{
|
|
25059
25430
|
disabled,
|
|
@@ -25064,11 +25435,11 @@ var Checkbox = ({
|
|
|
25064
25435
|
inputClass
|
|
25065
25436
|
}
|
|
25066
25437
|
),
|
|
25067
|
-
label && /* @__PURE__ */
|
|
25438
|
+
label && /* @__PURE__ */ jsx141(FormGroup, { children: /* @__PURE__ */ jsx141(
|
|
25068
25439
|
FormControlLabel,
|
|
25069
25440
|
{
|
|
25070
25441
|
value: label,
|
|
25071
|
-
control: /* @__PURE__ */
|
|
25442
|
+
control: /* @__PURE__ */ jsx141(
|
|
25072
25443
|
MaterialCheckbox,
|
|
25073
25444
|
{
|
|
25074
25445
|
disabled,
|
|
@@ -25079,7 +25450,7 @@ var Checkbox = ({
|
|
|
25079
25450
|
inputClass
|
|
25080
25451
|
}
|
|
25081
25452
|
),
|
|
25082
|
-
label: /* @__PURE__ */
|
|
25453
|
+
label: /* @__PURE__ */ jsx141(Typography_default, { variant: "body2", children: label }),
|
|
25083
25454
|
labelPlacement,
|
|
25084
25455
|
sx: {
|
|
25085
25456
|
margin: 0,
|
|
@@ -25091,11 +25462,11 @@ var Checkbox = ({
|
|
|
25091
25462
|
var Checkbox_default = Checkbox;
|
|
25092
25463
|
|
|
25093
25464
|
// src/components/input/Radio.tsx
|
|
25094
|
-
import * as
|
|
25465
|
+
import * as React80 from "react";
|
|
25095
25466
|
import MuiRadio from "@mui/material/Radio";
|
|
25096
25467
|
import { FormControlLabel as FormControlLabel2 } from "@mui/material";
|
|
25097
|
-
import { Fragment as
|
|
25098
|
-
var Radio =
|
|
25468
|
+
import { Fragment as Fragment38, jsx as jsx142, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
25469
|
+
var Radio = React80.forwardRef(function Radio2({
|
|
25099
25470
|
label,
|
|
25100
25471
|
labelPlacement = "end",
|
|
25101
25472
|
onChange,
|
|
@@ -25106,13 +25477,13 @@ var Radio = React78.forwardRef(function Radio2({
|
|
|
25106
25477
|
size = "M",
|
|
25107
25478
|
...rest
|
|
25108
25479
|
}, ref) {
|
|
25109
|
-
const _onChange =
|
|
25480
|
+
const _onChange = React80.useCallback(
|
|
25110
25481
|
(event) => {
|
|
25111
25482
|
onChange && onChange(event, event.target.value);
|
|
25112
25483
|
},
|
|
25113
25484
|
[onChange]
|
|
25114
25485
|
);
|
|
25115
|
-
const radio = /* @__PURE__ */
|
|
25486
|
+
const radio = /* @__PURE__ */ jsx142(
|
|
25116
25487
|
MuiRadio,
|
|
25117
25488
|
{
|
|
25118
25489
|
className: `Cn-Radio ${className}`,
|
|
@@ -25131,13 +25502,13 @@ var Radio = React78.forwardRef(function Radio2({
|
|
|
25131
25502
|
size: size === "S" ? "small" : "medium"
|
|
25132
25503
|
}
|
|
25133
25504
|
);
|
|
25134
|
-
return /* @__PURE__ */
|
|
25505
|
+
return /* @__PURE__ */ jsxs71(Fragment38, { children: [
|
|
25135
25506
|
!label && radio,
|
|
25136
|
-
label && /* @__PURE__ */
|
|
25507
|
+
label && /* @__PURE__ */ jsx142(
|
|
25137
25508
|
FormControlLabel2,
|
|
25138
25509
|
{
|
|
25139
25510
|
control: radio,
|
|
25140
|
-
label: /* @__PURE__ */
|
|
25511
|
+
label: /* @__PURE__ */ jsx142(Typography_default, { variant: "body2", children: label }),
|
|
25141
25512
|
labelPlacement,
|
|
25142
25513
|
sx: {
|
|
25143
25514
|
margin: 0,
|
|
@@ -25150,8 +25521,8 @@ var Radio = React78.forwardRef(function Radio2({
|
|
|
25150
25521
|
var Radio_default = Radio;
|
|
25151
25522
|
|
|
25152
25523
|
// src/components/input/PageSelector.tsx
|
|
25153
|
-
import * as
|
|
25154
|
-
import { jsx as
|
|
25524
|
+
import * as React81 from "react";
|
|
25525
|
+
import { jsx as jsx143, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
25155
25526
|
var PageSelector = ({
|
|
25156
25527
|
currentPage,
|
|
25157
25528
|
pageSize,
|
|
@@ -25159,17 +25530,17 @@ var PageSelector = ({
|
|
|
25159
25530
|
text,
|
|
25160
25531
|
onPageChange
|
|
25161
25532
|
}) => {
|
|
25162
|
-
const handlePrevious =
|
|
25533
|
+
const handlePrevious = React81.useCallback(() => {
|
|
25163
25534
|
if (currentPage > 1) {
|
|
25164
25535
|
onPageChange(Math.max(1, currentPage - 1));
|
|
25165
25536
|
}
|
|
25166
25537
|
}, [currentPage, onPageChange]);
|
|
25167
|
-
const handleNext =
|
|
25538
|
+
const handleNext = React81.useCallback(() => {
|
|
25168
25539
|
onPageChange(
|
|
25169
25540
|
Math.min(Math.ceil(totalItems / pageSize), currentPage + 1)
|
|
25170
25541
|
);
|
|
25171
25542
|
}, [currentPage, onPageChange, pageSize, totalItems]);
|
|
25172
|
-
return /* @__PURE__ */
|
|
25543
|
+
return /* @__PURE__ */ jsxs72(
|
|
25173
25544
|
Stack_default,
|
|
25174
25545
|
{
|
|
25175
25546
|
direction: "row",
|
|
@@ -25178,7 +25549,7 @@ var PageSelector = ({
|
|
|
25178
25549
|
justifyContent: "flex-end",
|
|
25179
25550
|
flexGrow: 1,
|
|
25180
25551
|
children: [
|
|
25181
|
-
text && /* @__PURE__ */
|
|
25552
|
+
text && /* @__PURE__ */ jsx143(Typography_default, { variant: "body2", children: /* @__PURE__ */ jsx143(
|
|
25182
25553
|
"div",
|
|
25183
25554
|
{
|
|
25184
25555
|
dangerouslySetInnerHTML: {
|
|
@@ -25186,8 +25557,8 @@ var PageSelector = ({
|
|
|
25186
25557
|
}
|
|
25187
25558
|
}
|
|
25188
25559
|
) }),
|
|
25189
|
-
/* @__PURE__ */
|
|
25190
|
-
/* @__PURE__ */
|
|
25560
|
+
/* @__PURE__ */ jsxs72(Stack_default, { direction: "row", alignItems: "center", children: [
|
|
25561
|
+
/* @__PURE__ */ jsx143(
|
|
25191
25562
|
IconButton_default,
|
|
25192
25563
|
{
|
|
25193
25564
|
iconId: "chevron-left",
|
|
@@ -25195,7 +25566,7 @@ var PageSelector = ({
|
|
|
25195
25566
|
disabled: currentPage <= 1
|
|
25196
25567
|
}
|
|
25197
25568
|
),
|
|
25198
|
-
/* @__PURE__ */
|
|
25569
|
+
/* @__PURE__ */ jsx143(
|
|
25199
25570
|
NumberField_default,
|
|
25200
25571
|
{
|
|
25201
25572
|
value: currentPage,
|
|
@@ -25213,7 +25584,7 @@ var PageSelector = ({
|
|
|
25213
25584
|
}
|
|
25214
25585
|
}
|
|
25215
25586
|
),
|
|
25216
|
-
/* @__PURE__ */
|
|
25587
|
+
/* @__PURE__ */ jsx143(
|
|
25217
25588
|
IconButton_default,
|
|
25218
25589
|
{
|
|
25219
25590
|
iconId: "chevron-right",
|
|
@@ -25233,13 +25604,13 @@ import Fade from "@mui/material/Fade";
|
|
|
25233
25604
|
|
|
25234
25605
|
// src/components/progress/LinearProgress.tsx
|
|
25235
25606
|
import MuiLinearProgress from "@mui/material/LinearProgress";
|
|
25236
|
-
import { jsx as
|
|
25607
|
+
import { jsx as jsx144 } from "react/jsx-runtime";
|
|
25237
25608
|
var LinearProgress = ({
|
|
25238
25609
|
color: color2,
|
|
25239
25610
|
backgroundColor: backgroundColor2,
|
|
25240
25611
|
variant = "indeterminate",
|
|
25241
25612
|
...rest
|
|
25242
|
-
}) => /* @__PURE__ */
|
|
25613
|
+
}) => /* @__PURE__ */ jsx144(
|
|
25243
25614
|
MuiLinearProgress,
|
|
25244
25615
|
{
|
|
25245
25616
|
...rest,
|
|
@@ -25262,11 +25633,11 @@ var LinearProgress = ({
|
|
|
25262
25633
|
var LinearProgress_default = LinearProgress;
|
|
25263
25634
|
|
|
25264
25635
|
// src/components/progress/CircularProgress.tsx
|
|
25265
|
-
import * as
|
|
25636
|
+
import * as React82 from "react";
|
|
25266
25637
|
import MuiCircularProgress from "@mui/material/CircularProgress";
|
|
25267
25638
|
import Typography3 from "@mui/material/Typography";
|
|
25268
25639
|
import Box4 from "@mui/material/Box";
|
|
25269
|
-
import { jsx as
|
|
25640
|
+
import { jsx as jsx145, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
25270
25641
|
var circularSizes = {
|
|
25271
25642
|
XS: "20px",
|
|
25272
25643
|
SM: "24px",
|
|
@@ -25288,10 +25659,10 @@ var CircularProgress = ({
|
|
|
25288
25659
|
typographyColor = black,
|
|
25289
25660
|
gradientColors
|
|
25290
25661
|
}) => {
|
|
25291
|
-
const gradientName =
|
|
25662
|
+
const gradientName = React82.useRef(
|
|
25292
25663
|
gradientColors ? crypto.randomUUID() : void 0
|
|
25293
25664
|
);
|
|
25294
|
-
return /* @__PURE__ */
|
|
25665
|
+
return /* @__PURE__ */ jsxs73(
|
|
25295
25666
|
Box4,
|
|
25296
25667
|
{
|
|
25297
25668
|
sx: {
|
|
@@ -25305,7 +25676,7 @@ var CircularProgress = ({
|
|
|
25305
25676
|
}
|
|
25306
25677
|
},
|
|
25307
25678
|
children: [
|
|
25308
|
-
gradientColors && /* @__PURE__ */
|
|
25679
|
+
gradientColors && /* @__PURE__ */ jsx145("svg", { width: 0, height: 0, children: /* @__PURE__ */ jsx145("defs", { children: /* @__PURE__ */ jsxs73(
|
|
25309
25680
|
"linearGradient",
|
|
25310
25681
|
{
|
|
25311
25682
|
id: gradientName.current,
|
|
@@ -25314,14 +25685,14 @@ var CircularProgress = ({
|
|
|
25314
25685
|
x2: "0%",
|
|
25315
25686
|
y2: "100%",
|
|
25316
25687
|
children: [
|
|
25317
|
-
/* @__PURE__ */
|
|
25688
|
+
/* @__PURE__ */ jsx145(
|
|
25318
25689
|
"stop",
|
|
25319
25690
|
{
|
|
25320
25691
|
offset: "0%",
|
|
25321
25692
|
stopColor: gradientColors.startColor
|
|
25322
25693
|
}
|
|
25323
25694
|
),
|
|
25324
|
-
/* @__PURE__ */
|
|
25695
|
+
/* @__PURE__ */ jsx145(
|
|
25325
25696
|
"stop",
|
|
25326
25697
|
{
|
|
25327
25698
|
offset: "100%",
|
|
@@ -25331,7 +25702,7 @@ var CircularProgress = ({
|
|
|
25331
25702
|
]
|
|
25332
25703
|
}
|
|
25333
25704
|
) }) }),
|
|
25334
|
-
showCircularBackground && /* @__PURE__ */
|
|
25705
|
+
showCircularBackground && /* @__PURE__ */ jsx145(
|
|
25335
25706
|
Box4,
|
|
25336
25707
|
{
|
|
25337
25708
|
sx: {
|
|
@@ -25344,7 +25715,7 @@ var CircularProgress = ({
|
|
|
25344
25715
|
maxHeight: circularSizes[size]
|
|
25345
25716
|
}
|
|
25346
25717
|
},
|
|
25347
|
-
children: /* @__PURE__ */
|
|
25718
|
+
children: /* @__PURE__ */ jsx145(
|
|
25348
25719
|
MuiCircularProgress,
|
|
25349
25720
|
{
|
|
25350
25721
|
variant: "determinate",
|
|
@@ -25356,7 +25727,7 @@ var CircularProgress = ({
|
|
|
25356
25727
|
)
|
|
25357
25728
|
}
|
|
25358
25729
|
),
|
|
25359
|
-
/* @__PURE__ */
|
|
25730
|
+
/* @__PURE__ */ jsx145(
|
|
25360
25731
|
MuiCircularProgress,
|
|
25361
25732
|
{
|
|
25362
25733
|
variant,
|
|
@@ -25385,7 +25756,7 @@ var CircularProgress = ({
|
|
|
25385
25756
|
thickness
|
|
25386
25757
|
}
|
|
25387
25758
|
),
|
|
25388
|
-
variant !== "indeterminate" && /* @__PURE__ */
|
|
25759
|
+
variant !== "indeterminate" && /* @__PURE__ */ jsx145(
|
|
25389
25760
|
Box4,
|
|
25390
25761
|
{
|
|
25391
25762
|
sx: {
|
|
@@ -25400,7 +25771,7 @@ var CircularProgress = ({
|
|
|
25400
25771
|
height: circularSizes[size],
|
|
25401
25772
|
width: circularSizes[size]
|
|
25402
25773
|
},
|
|
25403
|
-
children: typeof label === "string" ? /* @__PURE__ */
|
|
25774
|
+
children: typeof label === "string" ? /* @__PURE__ */ jsx145(
|
|
25404
25775
|
Typography3,
|
|
25405
25776
|
{
|
|
25406
25777
|
variant: typographyVariant,
|
|
@@ -25419,8 +25790,8 @@ var CircularProgress_default = CircularProgress;
|
|
|
25419
25790
|
|
|
25420
25791
|
// src/components/progress/DonutProgress.tsx
|
|
25421
25792
|
import Box5 from "@mui/material/Box";
|
|
25422
|
-
import { Stack as
|
|
25423
|
-
import { jsx as
|
|
25793
|
+
import { Stack as Stack13 } from "@mui/material";
|
|
25794
|
+
import { jsx as jsx146, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
25424
25795
|
var CIRCULAR_PROGRESS_PERCENTAGE = 85;
|
|
25425
25796
|
var variants2 = {
|
|
25426
25797
|
empty: {
|
|
@@ -25456,9 +25827,9 @@ var DonutProgress = ({
|
|
|
25456
25827
|
labelChip,
|
|
25457
25828
|
showPercentageSymbol
|
|
25458
25829
|
}) => {
|
|
25459
|
-
const getPercentageWithSymbol = () => /* @__PURE__ */
|
|
25460
|
-
/* @__PURE__ */
|
|
25461
|
-
/* @__PURE__ */
|
|
25830
|
+
const getPercentageWithSymbol = () => /* @__PURE__ */ jsxs74(Stack13, { direction: "row", alignItems: "center", position: "relative", children: [
|
|
25831
|
+
/* @__PURE__ */ jsx146(Typography_default, { variant: "h6", component: "div", color: grey800, children: label }),
|
|
25832
|
+
/* @__PURE__ */ jsx146(
|
|
25462
25833
|
Typography_default,
|
|
25463
25834
|
{
|
|
25464
25835
|
variant: "tooltip",
|
|
@@ -25469,7 +25840,7 @@ var DonutProgress = ({
|
|
|
25469
25840
|
}
|
|
25470
25841
|
)
|
|
25471
25842
|
] });
|
|
25472
|
-
return /* @__PURE__ */
|
|
25843
|
+
return /* @__PURE__ */ jsxs74(
|
|
25473
25844
|
Box5,
|
|
25474
25845
|
{
|
|
25475
25846
|
sx: {
|
|
@@ -25477,7 +25848,7 @@ var DonutProgress = ({
|
|
|
25477
25848
|
width: "fit-content"
|
|
25478
25849
|
},
|
|
25479
25850
|
children: [
|
|
25480
|
-
/* @__PURE__ */
|
|
25851
|
+
/* @__PURE__ */ jsx146(
|
|
25481
25852
|
CircularProgress_default,
|
|
25482
25853
|
{
|
|
25483
25854
|
variant: "determinate",
|
|
@@ -25493,7 +25864,7 @@ var DonutProgress = ({
|
|
|
25493
25864
|
color: variants2[variant].emptyColor
|
|
25494
25865
|
}
|
|
25495
25866
|
),
|
|
25496
|
-
/* @__PURE__ */
|
|
25867
|
+
/* @__PURE__ */ jsx146(
|
|
25497
25868
|
Box5,
|
|
25498
25869
|
{
|
|
25499
25870
|
sx: {
|
|
@@ -25501,7 +25872,7 @@ var DonutProgress = ({
|
|
|
25501
25872
|
top: 0,
|
|
25502
25873
|
left: 0
|
|
25503
25874
|
},
|
|
25504
|
-
children: /* @__PURE__ */
|
|
25875
|
+
children: /* @__PURE__ */ jsx146(
|
|
25505
25876
|
CircularProgress_default,
|
|
25506
25877
|
{
|
|
25507
25878
|
variant: "determinate",
|
|
@@ -25516,7 +25887,7 @@ var DonutProgress = ({
|
|
|
25516
25887
|
)
|
|
25517
25888
|
}
|
|
25518
25889
|
),
|
|
25519
|
-
variant !== "empty" && labelChip && /* @__PURE__ */
|
|
25890
|
+
variant !== "empty" && labelChip && /* @__PURE__ */ jsx146(
|
|
25520
25891
|
Box5,
|
|
25521
25892
|
{
|
|
25522
25893
|
sx: {
|
|
@@ -25533,7 +25904,7 @@ var DonutProgress = ({
|
|
|
25533
25904
|
justifyContent: "center",
|
|
25534
25905
|
boxSizing: "border-box"
|
|
25535
25906
|
},
|
|
25536
|
-
children: /* @__PURE__ */
|
|
25907
|
+
children: /* @__PURE__ */ jsx146(
|
|
25537
25908
|
Typography_default,
|
|
25538
25909
|
{
|
|
25539
25910
|
variant: "tooltip",
|
|
@@ -25550,14 +25921,14 @@ var DonutProgress = ({
|
|
|
25550
25921
|
var DonutProgress_default = DonutProgress;
|
|
25551
25922
|
|
|
25552
25923
|
// src/components/loader/Loader.tsx
|
|
25553
|
-
import { jsx as
|
|
25924
|
+
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
25554
25925
|
var Loader = ({
|
|
25555
25926
|
isVisible,
|
|
25556
25927
|
zIndex = 1e4,
|
|
25557
25928
|
size,
|
|
25558
25929
|
hideProgress = false,
|
|
25559
25930
|
sx
|
|
25560
|
-
}) => /* @__PURE__ */
|
|
25931
|
+
}) => /* @__PURE__ */ jsx147(Fade, { in: isVisible, children: /* @__PURE__ */ jsx147(
|
|
25561
25932
|
Box_default2,
|
|
25562
25933
|
{
|
|
25563
25934
|
sx: {
|
|
@@ -25573,29 +25944,29 @@ var Loader = ({
|
|
|
25573
25944
|
backgroundColor: whiteOpacity32,
|
|
25574
25945
|
...sx
|
|
25575
25946
|
},
|
|
25576
|
-
children: !hideProgress && /* @__PURE__ */
|
|
25947
|
+
children: !hideProgress && /* @__PURE__ */ jsx147(CircularProgress_default, { size })
|
|
25577
25948
|
}
|
|
25578
25949
|
) });
|
|
25579
25950
|
var Loader_default = Loader;
|
|
25580
25951
|
|
|
25581
25952
|
// src/components/markdown/MarkdownRenderer.tsx
|
|
25582
|
-
import
|
|
25953
|
+
import React83 from "react";
|
|
25583
25954
|
import Markdown from "markdown-to-jsx";
|
|
25584
25955
|
import { styled as styled8 } from "@mui/material/styles";
|
|
25585
25956
|
import "katex/dist/katex.min.css";
|
|
25586
25957
|
|
|
25587
25958
|
// src/components/markdown/KatexRenderer.tsx
|
|
25588
25959
|
import katex from "katex";
|
|
25589
|
-
import { jsx as
|
|
25960
|
+
import { jsx as jsx148, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
25590
25961
|
var KatexRenderer = ({ children, block }) => {
|
|
25591
25962
|
try {
|
|
25592
25963
|
const html2 = katex.renderToString(children, {
|
|
25593
25964
|
throwOnError: false,
|
|
25594
25965
|
displayMode: block
|
|
25595
25966
|
});
|
|
25596
|
-
return /* @__PURE__ */
|
|
25967
|
+
return /* @__PURE__ */ jsx148("span", { dangerouslySetInnerHTML: { __html: html2 } });
|
|
25597
25968
|
} catch (err) {
|
|
25598
|
-
return /* @__PURE__ */
|
|
25969
|
+
return /* @__PURE__ */ jsxs75("pre", { style: { color: "red" }, children: [
|
|
25599
25970
|
"KaTeX error: $",
|
|
25600
25971
|
err.message
|
|
25601
25972
|
] });
|
|
@@ -25604,7 +25975,7 @@ var KatexRenderer = ({ children, block }) => {
|
|
|
25604
25975
|
var KatexRenderer_default = KatexRenderer;
|
|
25605
25976
|
|
|
25606
25977
|
// src/components/markdown/MarkdownRenderer.tsx
|
|
25607
|
-
import { jsx as
|
|
25978
|
+
import { jsx as jsx149 } from "react/jsx-runtime";
|
|
25608
25979
|
var MarkdownContainer = styled8("div")(
|
|
25609
25980
|
({
|
|
25610
25981
|
color: color2,
|
|
@@ -25708,11 +26079,11 @@ var renderWithMath = (text) => {
|
|
|
25708
26079
|
const inline = match[2];
|
|
25709
26080
|
if (block !== void 0) {
|
|
25710
26081
|
parts.push(
|
|
25711
|
-
/* @__PURE__ */
|
|
26082
|
+
/* @__PURE__ */ jsx149(KatexRenderer_default, { block: true, children: block.trim() }, start)
|
|
25712
26083
|
);
|
|
25713
26084
|
} else if (inline !== void 0) {
|
|
25714
26085
|
parts.push(
|
|
25715
|
-
/* @__PURE__ */
|
|
26086
|
+
/* @__PURE__ */ jsx149(KatexRenderer_default, { children: inline.trim() }, start)
|
|
25716
26087
|
);
|
|
25717
26088
|
}
|
|
25718
26089
|
lastIndex = regex.lastIndex;
|
|
@@ -25722,13 +26093,13 @@ var renderWithMath = (text) => {
|
|
|
25722
26093
|
}
|
|
25723
26094
|
return parts;
|
|
25724
26095
|
};
|
|
25725
|
-
var renderChildrenWithMath = (children) =>
|
|
26096
|
+
var renderChildrenWithMath = (children) => React83.Children.map(children, (child) => {
|
|
25726
26097
|
if (typeof child === "string") {
|
|
25727
26098
|
return renderWithMath(child);
|
|
25728
26099
|
}
|
|
25729
|
-
if (
|
|
26100
|
+
if (React83.isValidElement(child)) {
|
|
25730
26101
|
const element = child;
|
|
25731
|
-
return
|
|
26102
|
+
return React83.cloneElement(element, {
|
|
25732
26103
|
...element.props,
|
|
25733
26104
|
children: renderChildrenWithMath(element.props.children)
|
|
25734
26105
|
});
|
|
@@ -25743,11 +26114,11 @@ var CodeOrMath = ({ children, ...props }) => {
|
|
|
25743
26114
|
if (m) {
|
|
25744
26115
|
const expr = m[1] || m[2] || "";
|
|
25745
26116
|
const isBlock = Boolean(m[1]);
|
|
25746
|
-
return /* @__PURE__ */
|
|
26117
|
+
return /* @__PURE__ */ jsx149(KatexRenderer_default, { block: isBlock, children: expr.trim() });
|
|
25747
26118
|
}
|
|
25748
26119
|
const maybe = renderWithMath(s);
|
|
25749
26120
|
const onlyText = maybe.length === 1 && typeof maybe[0] === "string";
|
|
25750
|
-
return onlyText ? /* @__PURE__ */
|
|
26121
|
+
return onlyText ? /* @__PURE__ */ jsx149("code", { ...props, children }) : /* @__PURE__ */ jsx149("span", { children: maybe });
|
|
25751
26122
|
};
|
|
25752
26123
|
var escapeInlineUnderscores = (s) => s.replace(/(\S)_(\S)/g, "$1\\_$2");
|
|
25753
26124
|
var MarkdownRenderer = ({
|
|
@@ -25757,19 +26128,19 @@ var MarkdownRenderer = ({
|
|
|
25757
26128
|
}) => {
|
|
25758
26129
|
const protectedText = escapeInlineUnderscores(text || "");
|
|
25759
26130
|
const normalized = normalizeLatexDelimiters(protectedText);
|
|
25760
|
-
return /* @__PURE__ */
|
|
26131
|
+
return /* @__PURE__ */ jsx149(
|
|
25761
26132
|
MarkdownContainer,
|
|
25762
26133
|
{
|
|
25763
26134
|
className: `markdown-container ${className || ""}`,
|
|
25764
26135
|
...rest,
|
|
25765
|
-
children: /* @__PURE__ */
|
|
26136
|
+
children: /* @__PURE__ */ jsx149(
|
|
25766
26137
|
Markdown,
|
|
25767
26138
|
{
|
|
25768
26139
|
options: {
|
|
25769
26140
|
forceBlock: true,
|
|
25770
26141
|
overrides: {
|
|
25771
26142
|
p: {
|
|
25772
|
-
component: ({ children, ...props }) => /* @__PURE__ */
|
|
26143
|
+
component: ({ children, ...props }) => /* @__PURE__ */ jsx149("p", { ...props, children: renderChildrenWithMath(children) })
|
|
25773
26144
|
},
|
|
25774
26145
|
code: { component: CodeOrMath }
|
|
25775
26146
|
}
|
|
@@ -25784,7 +26155,7 @@ var MarkdownRenderer_default = MarkdownRenderer;
|
|
|
25784
26155
|
|
|
25785
26156
|
// src/components/navbar/Navbar.tsx
|
|
25786
26157
|
import { Drawer as Drawer2 } from "@mui/material";
|
|
25787
|
-
import { Fragment as
|
|
26158
|
+
import { Fragment as Fragment39, jsx as jsx150, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
25788
26159
|
var Navbar = ({
|
|
25789
26160
|
topContent,
|
|
25790
26161
|
bottomContent,
|
|
@@ -25792,8 +26163,8 @@ var Navbar = ({
|
|
|
25792
26163
|
drawerBottomContent,
|
|
25793
26164
|
onClose,
|
|
25794
26165
|
isDrawerOpen = false
|
|
25795
|
-
}) => /* @__PURE__ */
|
|
25796
|
-
/* @__PURE__ */
|
|
26166
|
+
}) => /* @__PURE__ */ jsxs76(Fragment39, { children: [
|
|
26167
|
+
/* @__PURE__ */ jsxs76(
|
|
25797
26168
|
Box_default2,
|
|
25798
26169
|
{
|
|
25799
26170
|
sx: {
|
|
@@ -25808,12 +26179,12 @@ var Navbar = ({
|
|
|
25808
26179
|
},
|
|
25809
26180
|
className: "Slim-Vertical-Scroll",
|
|
25810
26181
|
children: [
|
|
25811
|
-
/* @__PURE__ */
|
|
25812
|
-
/* @__PURE__ */
|
|
26182
|
+
/* @__PURE__ */ jsx150(Box_default2, { children: topContent }),
|
|
26183
|
+
/* @__PURE__ */ jsx150(Box_default2, { children: bottomContent })
|
|
25813
26184
|
]
|
|
25814
26185
|
}
|
|
25815
26186
|
),
|
|
25816
|
-
/* @__PURE__ */
|
|
26187
|
+
/* @__PURE__ */ jsxs76(
|
|
25817
26188
|
Drawer2,
|
|
25818
26189
|
{
|
|
25819
26190
|
open: isDrawerOpen,
|
|
@@ -25836,8 +26207,8 @@ var Navbar = ({
|
|
|
25836
26207
|
},
|
|
25837
26208
|
onClose,
|
|
25838
26209
|
children: [
|
|
25839
|
-
/* @__PURE__ */
|
|
25840
|
-
/* @__PURE__ */
|
|
26210
|
+
/* @__PURE__ */ jsx150("div", { children: drawerTopContent }),
|
|
26211
|
+
/* @__PURE__ */ jsx150("div", { children: drawerBottomContent })
|
|
25841
26212
|
]
|
|
25842
26213
|
}
|
|
25843
26214
|
)
|
|
@@ -25845,10 +26216,10 @@ var Navbar = ({
|
|
|
25845
26216
|
var Navbar_default = Navbar;
|
|
25846
26217
|
|
|
25847
26218
|
// src/components/navbar/NavbarButton.tsx
|
|
25848
|
-
import * as
|
|
26219
|
+
import * as React84 from "react";
|
|
25849
26220
|
import { Box as Box6, ButtonBase as ButtonBase2 } from "@mui/material";
|
|
25850
|
-
import { jsx as
|
|
25851
|
-
var NavbarButton =
|
|
26221
|
+
import { jsx as jsx151, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
26222
|
+
var NavbarButton = React84.forwardRef(
|
|
25852
26223
|
function NavbarButton2({
|
|
25853
26224
|
iconId,
|
|
25854
26225
|
srcUrl,
|
|
@@ -25863,7 +26234,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25863
26234
|
if (!highlighted) {
|
|
25864
26235
|
return element;
|
|
25865
26236
|
}
|
|
25866
|
-
return /* @__PURE__ */
|
|
26237
|
+
return /* @__PURE__ */ jsxs77(
|
|
25867
26238
|
Box6,
|
|
25868
26239
|
{
|
|
25869
26240
|
sx: {
|
|
@@ -25873,7 +26244,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25873
26244
|
position: "relative"
|
|
25874
26245
|
},
|
|
25875
26246
|
children: [
|
|
25876
|
-
/* @__PURE__ */
|
|
26247
|
+
/* @__PURE__ */ jsx151(
|
|
25877
26248
|
Box6,
|
|
25878
26249
|
{
|
|
25879
26250
|
sx: {
|
|
@@ -25889,7 +26260,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25889
26260
|
}
|
|
25890
26261
|
}
|
|
25891
26262
|
),
|
|
25892
|
-
/* @__PURE__ */
|
|
26263
|
+
/* @__PURE__ */ jsx151(
|
|
25893
26264
|
Box6,
|
|
25894
26265
|
{
|
|
25895
26266
|
sx: {
|
|
@@ -25904,7 +26275,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25904
26275
|
}
|
|
25905
26276
|
);
|
|
25906
26277
|
};
|
|
25907
|
-
return /* @__PURE__ */
|
|
26278
|
+
return /* @__PURE__ */ jsxs77(
|
|
25908
26279
|
ButtonBase2,
|
|
25909
26280
|
{
|
|
25910
26281
|
className: "NavbarButton-root",
|
|
@@ -25922,7 +26293,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25922
26293
|
},
|
|
25923
26294
|
children: [
|
|
25924
26295
|
srcUrl ? getButtonContent(
|
|
25925
|
-
/* @__PURE__ */
|
|
26296
|
+
/* @__PURE__ */ jsx151(
|
|
25926
26297
|
Avatar_default,
|
|
25927
26298
|
{
|
|
25928
26299
|
className: "NavbarButton-icon",
|
|
@@ -25932,7 +26303,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25932
26303
|
}
|
|
25933
26304
|
)
|
|
25934
26305
|
) : getButtonContent(
|
|
25935
|
-
/* @__PURE__ */
|
|
26306
|
+
/* @__PURE__ */ jsx151(
|
|
25936
26307
|
Icon_default,
|
|
25937
26308
|
{
|
|
25938
26309
|
id: iconId,
|
|
@@ -25948,7 +26319,7 @@ var NavbarButton = React82.forwardRef(
|
|
|
25948
26319
|
}
|
|
25949
26320
|
)
|
|
25950
26321
|
),
|
|
25951
|
-
badgeIconProps && /* @__PURE__ */
|
|
26322
|
+
badgeIconProps && /* @__PURE__ */ jsx151(
|
|
25952
26323
|
Icon_default,
|
|
25953
26324
|
{
|
|
25954
26325
|
...badgeIconProps,
|
|
@@ -25970,8 +26341,8 @@ var NavbarButton = React82.forwardRef(
|
|
|
25970
26341
|
var NavbarButton_default = NavbarButton;
|
|
25971
26342
|
|
|
25972
26343
|
// src/components/navbar/NavbarHeader.tsx
|
|
25973
|
-
import { jsx as
|
|
25974
|
-
var NavbarHeader = ({ text }) => /* @__PURE__ */
|
|
26344
|
+
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
26345
|
+
var NavbarHeader = ({ text }) => /* @__PURE__ */ jsx152(
|
|
25975
26346
|
Typography_default,
|
|
25976
26347
|
{
|
|
25977
26348
|
sx: {
|
|
@@ -25991,12 +26362,12 @@ var NavbarHeader = ({ text }) => /* @__PURE__ */ jsx146(
|
|
|
25991
26362
|
var NavbarHeader_default = NavbarHeader;
|
|
25992
26363
|
|
|
25993
26364
|
// src/components/navbar/NavbarLogo.tsx
|
|
25994
|
-
import * as
|
|
26365
|
+
import * as React85 from "react";
|
|
25995
26366
|
import { ButtonBase as ButtonBase3 } from "@mui/material";
|
|
25996
|
-
import { jsx as
|
|
25997
|
-
var NavbarLogo =
|
|
26367
|
+
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
26368
|
+
var NavbarLogo = React85.forwardRef(
|
|
25998
26369
|
function NavbarButton3({ src, ...rest }, ref) {
|
|
25999
|
-
return /* @__PURE__ */
|
|
26370
|
+
return /* @__PURE__ */ jsx153(
|
|
26000
26371
|
ButtonBase3,
|
|
26001
26372
|
{
|
|
26002
26373
|
ref,
|
|
@@ -26007,7 +26378,7 @@ var NavbarLogo = React83.forwardRef(
|
|
|
26007
26378
|
borderBottom: `1px solid ${grey200}`,
|
|
26008
26379
|
boxSizing: "border-box"
|
|
26009
26380
|
},
|
|
26010
|
-
children: /* @__PURE__ */
|
|
26381
|
+
children: /* @__PURE__ */ jsx153("img", { src, width: "32px", height: "32px" })
|
|
26011
26382
|
}
|
|
26012
26383
|
);
|
|
26013
26384
|
}
|
|
@@ -26015,8 +26386,8 @@ var NavbarLogo = React83.forwardRef(
|
|
|
26015
26386
|
var NavbarLogo_default = NavbarLogo;
|
|
26016
26387
|
|
|
26017
26388
|
// src/components/overlay/DonutFocusOverlay.tsx
|
|
26018
|
-
import * as
|
|
26019
|
-
import { Fragment as
|
|
26389
|
+
import * as React86 from "react";
|
|
26390
|
+
import { Fragment as Fragment40, jsx as jsx154, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
26020
26391
|
var DonutFocusOverlay = ({
|
|
26021
26392
|
isVisible,
|
|
26022
26393
|
elementRef,
|
|
@@ -26025,8 +26396,8 @@ var DonutFocusOverlay = ({
|
|
|
26025
26396
|
chipLabel,
|
|
26026
26397
|
chipPosition = "right"
|
|
26027
26398
|
}) => {
|
|
26028
|
-
const [clientRect, setClientRect] =
|
|
26029
|
-
|
|
26399
|
+
const [clientRect, setClientRect] = React86.useState();
|
|
26400
|
+
React86.useEffect(() => {
|
|
26030
26401
|
if (!elementRef?.current) {
|
|
26031
26402
|
setClientRect(void 0);
|
|
26032
26403
|
return;
|
|
@@ -26057,8 +26428,8 @@ var DonutFocusOverlay = ({
|
|
|
26057
26428
|
const internalTopHalfCircle = `${internalCircleRadius} ${internalCircleRadius} 0 0 1 ${startPointX + donutWidth + internalCircleRadius * 2} ${startPointY}`;
|
|
26058
26429
|
const externalTopHalfCircle = `${externalCircleRadius} ${externalCircleRadius} 0 0 0 ${startPointX} ${startPointY}`;
|
|
26059
26430
|
const path = `path("M ${startPointX} ${startPointY} A ${externalBottomHalfCircle} m ${-donutWidth} 0 A ${internalBottomHalfCircle} A ${internalTopHalfCircle} m ${donutWidth} 0 A ${externalTopHalfCircle} Z")`;
|
|
26060
|
-
return /* @__PURE__ */
|
|
26061
|
-
/* @__PURE__ */
|
|
26431
|
+
return /* @__PURE__ */ jsxs78(Fragment40, { children: [
|
|
26432
|
+
/* @__PURE__ */ jsx154(
|
|
26062
26433
|
Box_default2,
|
|
26063
26434
|
{
|
|
26064
26435
|
sx: {
|
|
@@ -26075,7 +26446,7 @@ var DonutFocusOverlay = ({
|
|
|
26075
26446
|
}
|
|
26076
26447
|
}
|
|
26077
26448
|
),
|
|
26078
|
-
chipLabel && /* @__PURE__ */
|
|
26449
|
+
chipLabel && /* @__PURE__ */ jsx154(
|
|
26079
26450
|
Chip_default,
|
|
26080
26451
|
{
|
|
26081
26452
|
label: chipLabel,
|
|
@@ -26102,7 +26473,7 @@ var DonutFocusOverlay = ({
|
|
|
26102
26473
|
var DonutFocusOverlay_default = DonutFocusOverlay;
|
|
26103
26474
|
|
|
26104
26475
|
// src/components/pager/Pager.tsx
|
|
26105
|
-
import { Fragment as
|
|
26476
|
+
import { Fragment as Fragment41, jsx as jsx155, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
26106
26477
|
var Pager = ({
|
|
26107
26478
|
page,
|
|
26108
26479
|
pageSize,
|
|
@@ -26116,10 +26487,10 @@ var Pager = ({
|
|
|
26116
26487
|
const to = Math.min(current + pageSize, total);
|
|
26117
26488
|
const pages = Math.max(Math.ceil(total / pageSize), 1);
|
|
26118
26489
|
const options = [...Array(pages).keys()].map((i) => ({ value: i + 1 }));
|
|
26119
|
-
const Label = ({ children }) => /* @__PURE__ */
|
|
26120
|
-
return /* @__PURE__ */
|
|
26121
|
-
/* @__PURE__ */
|
|
26122
|
-
/* @__PURE__ */
|
|
26490
|
+
const Label = ({ children }) => /* @__PURE__ */ jsx155(Typography_default, { color: Colors_exports.grey400, sx: { padding: "0 8px" }, children });
|
|
26491
|
+
return /* @__PURE__ */ jsxs79(Stack_default, { direction: "row", sx: { alignItems: "center" }, children: [
|
|
26492
|
+
/* @__PURE__ */ jsx155(Label, { children: t("PAGER.PAGE") }),
|
|
26493
|
+
/* @__PURE__ */ jsx155(
|
|
26123
26494
|
Select_default,
|
|
26124
26495
|
{
|
|
26125
26496
|
value: page,
|
|
@@ -26128,9 +26499,9 @@ var Pager = ({
|
|
|
26128
26499
|
sx: { minWidth: 78 }
|
|
26129
26500
|
}
|
|
26130
26501
|
),
|
|
26131
|
-
allowedPageSizes && /* @__PURE__ */
|
|
26132
|
-
/* @__PURE__ */
|
|
26133
|
-
/* @__PURE__ */
|
|
26502
|
+
allowedPageSizes && /* @__PURE__ */ jsxs79(Fragment41, { children: [
|
|
26503
|
+
/* @__PURE__ */ jsx155(Label, { children: t("PAGER.ROWS_PER_PAGE") }),
|
|
26504
|
+
/* @__PURE__ */ jsx155(
|
|
26134
26505
|
Select_default,
|
|
26135
26506
|
{
|
|
26136
26507
|
value: pageSize,
|
|
@@ -26144,7 +26515,7 @@ var Pager = ({
|
|
|
26144
26515
|
}
|
|
26145
26516
|
)
|
|
26146
26517
|
] }),
|
|
26147
|
-
/* @__PURE__ */
|
|
26518
|
+
/* @__PURE__ */ jsxs79(Label, { children: [
|
|
26148
26519
|
from,
|
|
26149
26520
|
" - ",
|
|
26150
26521
|
to,
|
|
@@ -26153,7 +26524,7 @@ var Pager = ({
|
|
|
26153
26524
|
" ",
|
|
26154
26525
|
total
|
|
26155
26526
|
] }),
|
|
26156
|
-
/* @__PURE__ */
|
|
26527
|
+
/* @__PURE__ */ jsx155(
|
|
26157
26528
|
IconButton_default,
|
|
26158
26529
|
{
|
|
26159
26530
|
disabled: page <= 1,
|
|
@@ -26161,7 +26532,7 @@ var Pager = ({
|
|
|
26161
26532
|
onClick: () => onPageChange(page - 1, pageSize)
|
|
26162
26533
|
}
|
|
26163
26534
|
),
|
|
26164
|
-
/* @__PURE__ */
|
|
26535
|
+
/* @__PURE__ */ jsx155(
|
|
26165
26536
|
IconButton_default,
|
|
26166
26537
|
{
|
|
26167
26538
|
disabled: page > total / pageSize,
|
|
@@ -26175,17 +26546,17 @@ var Pager_default = Pager;
|
|
|
26175
26546
|
|
|
26176
26547
|
// src/components/scrollable/HorizontalScrollable.tsx
|
|
26177
26548
|
import { ButtonBase as ButtonBase4 } from "@mui/material";
|
|
26178
|
-
import * as
|
|
26179
|
-
import { jsx as
|
|
26549
|
+
import * as React87 from "react";
|
|
26550
|
+
import { jsx as jsx156, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
26180
26551
|
var HorizontalScrollable = ({
|
|
26181
26552
|
style: style3,
|
|
26182
26553
|
children,
|
|
26183
26554
|
stepDistance = 200
|
|
26184
26555
|
}) => {
|
|
26185
|
-
const horizontalContainerRef =
|
|
26186
|
-
const [isLeftArrowHidden, setLeftArrowHidden] =
|
|
26187
|
-
const [isRightArrowHidden, setRightArrowHidden] =
|
|
26188
|
-
|
|
26556
|
+
const horizontalContainerRef = React87.useRef(null);
|
|
26557
|
+
const [isLeftArrowHidden, setLeftArrowHidden] = React87.useState(true);
|
|
26558
|
+
const [isRightArrowHidden, setRightArrowHidden] = React87.useState(true);
|
|
26559
|
+
React87.useEffect(() => {
|
|
26189
26560
|
if (!horizontalContainerRef.current) {
|
|
26190
26561
|
return;
|
|
26191
26562
|
}
|
|
@@ -26225,8 +26596,8 @@ var HorizontalScrollable = ({
|
|
|
26225
26596
|
);
|
|
26226
26597
|
current.scrollBy(stepDistance, 0);
|
|
26227
26598
|
};
|
|
26228
|
-
return /* @__PURE__ */
|
|
26229
|
-
/* @__PURE__ */
|
|
26599
|
+
return /* @__PURE__ */ jsxs80(Box_default2, { sx: { position: "relative", ...style3 }, children: [
|
|
26600
|
+
/* @__PURE__ */ jsx156(
|
|
26230
26601
|
ButtonBase4,
|
|
26231
26602
|
{
|
|
26232
26603
|
sx: {
|
|
@@ -26243,10 +26614,10 @@ var HorizontalScrollable = ({
|
|
|
26243
26614
|
...isLeftArrowHidden && { display: "none" }
|
|
26244
26615
|
},
|
|
26245
26616
|
onClick: () => leftScroll(),
|
|
26246
|
-
children: /* @__PURE__ */
|
|
26617
|
+
children: /* @__PURE__ */ jsx156(Icon_default, { id: "chevron-left" })
|
|
26247
26618
|
}
|
|
26248
26619
|
),
|
|
26249
|
-
/* @__PURE__ */
|
|
26620
|
+
/* @__PURE__ */ jsx156(
|
|
26250
26621
|
Box_default2,
|
|
26251
26622
|
{
|
|
26252
26623
|
ref: horizontalContainerRef,
|
|
@@ -26265,7 +26636,7 @@ var HorizontalScrollable = ({
|
|
|
26265
26636
|
children
|
|
26266
26637
|
}
|
|
26267
26638
|
),
|
|
26268
|
-
/* @__PURE__ */
|
|
26639
|
+
/* @__PURE__ */ jsx156(
|
|
26269
26640
|
ButtonBase4,
|
|
26270
26641
|
{
|
|
26271
26642
|
sx: {
|
|
@@ -26282,7 +26653,7 @@ var HorizontalScrollable = ({
|
|
|
26282
26653
|
...isRightArrowHidden && { display: "none" }
|
|
26283
26654
|
},
|
|
26284
26655
|
onClick: () => rightScroll(),
|
|
26285
|
-
children: /* @__PURE__ */
|
|
26656
|
+
children: /* @__PURE__ */ jsx156(Icon_default, { id: "chevron-right" })
|
|
26286
26657
|
}
|
|
26287
26658
|
)
|
|
26288
26659
|
] });
|
|
@@ -26290,8 +26661,8 @@ var HorizontalScrollable = ({
|
|
|
26290
26661
|
var HorizontalScrollable_default = HorizontalScrollable;
|
|
26291
26662
|
|
|
26292
26663
|
// src/components/scrollable/Carousel.tsx
|
|
26293
|
-
import * as
|
|
26294
|
-
import { jsx as
|
|
26664
|
+
import * as React88 from "react";
|
|
26665
|
+
import { jsx as jsx157, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
26295
26666
|
var buttonStyles = {
|
|
26296
26667
|
color: grey800,
|
|
26297
26668
|
position: "absolute",
|
|
@@ -26310,23 +26681,23 @@ function Carousel({
|
|
|
26310
26681
|
padding: padding2 = 8,
|
|
26311
26682
|
alignment = "left"
|
|
26312
26683
|
}) {
|
|
26313
|
-
const rootRef =
|
|
26314
|
-
const containerRef =
|
|
26315
|
-
const previousClientWidth =
|
|
26316
|
-
const isScrolling =
|
|
26317
|
-
const [isLeftArrowHidden, setLeftArrowHidden] =
|
|
26318
|
-
const [isRightArrowHidden, setRightArrowHidden] =
|
|
26319
|
-
const [paddingElement, setPaddingElement] =
|
|
26320
|
-
const [visibleCount, setVisibleCount] =
|
|
26321
|
-
const showedElementsRef =
|
|
26322
|
-
const updateArrows =
|
|
26684
|
+
const rootRef = React88.useRef(null);
|
|
26685
|
+
const containerRef = React88.useRef(null);
|
|
26686
|
+
const previousClientWidth = React88.useRef(null);
|
|
26687
|
+
const isScrolling = React88.useRef(false);
|
|
26688
|
+
const [isLeftArrowHidden, setLeftArrowHidden] = React88.useState(true);
|
|
26689
|
+
const [isRightArrowHidden, setRightArrowHidden] = React88.useState(true);
|
|
26690
|
+
const [paddingElement, setPaddingElement] = React88.useState();
|
|
26691
|
+
const [visibleCount, setVisibleCount] = React88.useState();
|
|
26692
|
+
const showedElementsRef = React88.useRef(void 0);
|
|
26693
|
+
const updateArrows = React88.useCallback(() => {
|
|
26323
26694
|
if (!showedElementsRef.current) {
|
|
26324
26695
|
return;
|
|
26325
26696
|
}
|
|
26326
26697
|
setLeftArrowHidden(showedElementsRef.current.start === 0);
|
|
26327
26698
|
setRightArrowHidden(showedElementsRef.current.end === items.length - 1);
|
|
26328
26699
|
}, [items.length]);
|
|
26329
|
-
const getUsableWidth =
|
|
26700
|
+
const getUsableWidth = React88.useCallback(
|
|
26330
26701
|
(el) => {
|
|
26331
26702
|
let current = el;
|
|
26332
26703
|
while (current) {
|
|
@@ -26340,7 +26711,7 @@ function Carousel({
|
|
|
26340
26711
|
},
|
|
26341
26712
|
[]
|
|
26342
26713
|
);
|
|
26343
|
-
const resetCarousel =
|
|
26714
|
+
const resetCarousel = React88.useCallback(
|
|
26344
26715
|
(root, container) => {
|
|
26345
26716
|
root.style.width = "";
|
|
26346
26717
|
showedElementsRef.current = void 0;
|
|
@@ -26348,7 +26719,7 @@ function Carousel({
|
|
|
26348
26719
|
},
|
|
26349
26720
|
[]
|
|
26350
26721
|
);
|
|
26351
|
-
const setMeasures =
|
|
26722
|
+
const setMeasures = React88.useCallback(
|
|
26352
26723
|
(root, container, nextElementsIndex) => {
|
|
26353
26724
|
const children = Array.from(container.children);
|
|
26354
26725
|
if (children.length === 0) {
|
|
@@ -26377,7 +26748,7 @@ function Carousel({
|
|
|
26377
26748
|
},
|
|
26378
26749
|
[alignment, gap2, getUsableWidth, items.length, padding2]
|
|
26379
26750
|
);
|
|
26380
|
-
const updateVisibleCount =
|
|
26751
|
+
const updateVisibleCount = React88.useCallback(() => {
|
|
26381
26752
|
const root = rootRef.current;
|
|
26382
26753
|
const container = containerRef.current;
|
|
26383
26754
|
if (!container || !parent) {
|
|
@@ -26424,7 +26795,7 @@ function Carousel({
|
|
|
26424
26795
|
updateArrows,
|
|
26425
26796
|
resetCarousel
|
|
26426
26797
|
]);
|
|
26427
|
-
const getInitialWidth =
|
|
26798
|
+
const getInitialWidth = React88.useCallback(
|
|
26428
26799
|
(el) => {
|
|
26429
26800
|
let current = el;
|
|
26430
26801
|
let width2 = 0;
|
|
@@ -26442,7 +26813,7 @@ function Carousel({
|
|
|
26442
26813
|
},
|
|
26443
26814
|
[]
|
|
26444
26815
|
);
|
|
26445
|
-
const resizeObserverCallback =
|
|
26816
|
+
const resizeObserverCallback = React88.useCallback(() => {
|
|
26446
26817
|
if (!rootRef.current || !containerRef.current) {
|
|
26447
26818
|
return;
|
|
26448
26819
|
}
|
|
@@ -26453,7 +26824,7 @@ function Carousel({
|
|
|
26453
26824
|
previousClientWidth.current = newClientWidth;
|
|
26454
26825
|
updateVisibleCount();
|
|
26455
26826
|
}, [getInitialWidth, updateVisibleCount]);
|
|
26456
|
-
|
|
26827
|
+
React88.useEffect(() => {
|
|
26457
26828
|
const container = containerRef.current;
|
|
26458
26829
|
if (!container) {
|
|
26459
26830
|
return;
|
|
@@ -26543,7 +26914,7 @@ function Carousel({
|
|
|
26543
26914
|
}
|
|
26544
26915
|
scrollHorizontal(scrollData);
|
|
26545
26916
|
};
|
|
26546
|
-
return /* @__PURE__ */
|
|
26917
|
+
return /* @__PURE__ */ jsx157(Box_default2, { ref: rootRef, width: "100%", children: /* @__PURE__ */ jsxs81(
|
|
26547
26918
|
Box_default2,
|
|
26548
26919
|
{
|
|
26549
26920
|
sx: {
|
|
@@ -26555,7 +26926,7 @@ function Carousel({
|
|
|
26555
26926
|
}
|
|
26556
26927
|
},
|
|
26557
26928
|
children: [
|
|
26558
|
-
/* @__PURE__ */
|
|
26929
|
+
/* @__PURE__ */ jsx157(
|
|
26559
26930
|
IconButton_default,
|
|
26560
26931
|
{
|
|
26561
26932
|
iconId: "chevron-left",
|
|
@@ -26568,7 +26939,7 @@ function Carousel({
|
|
|
26568
26939
|
onClick: () => scrollToNext("left")
|
|
26569
26940
|
}
|
|
26570
26941
|
),
|
|
26571
|
-
/* @__PURE__ */
|
|
26942
|
+
/* @__PURE__ */ jsx157(
|
|
26572
26943
|
Box_default2,
|
|
26573
26944
|
{
|
|
26574
26945
|
ref: containerRef,
|
|
@@ -26582,7 +26953,7 @@ function Carousel({
|
|
|
26582
26953
|
"::-webkit-scrollbar": { display: "none" },
|
|
26583
26954
|
gap: `${gap2}px`
|
|
26584
26955
|
},
|
|
26585
|
-
children: items.map((item, index) => /* @__PURE__ */
|
|
26956
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx157(
|
|
26586
26957
|
Box_default2,
|
|
26587
26958
|
{
|
|
26588
26959
|
sx: {
|
|
@@ -26594,7 +26965,7 @@ function Carousel({
|
|
|
26594
26965
|
))
|
|
26595
26966
|
}
|
|
26596
26967
|
),
|
|
26597
|
-
/* @__PURE__ */
|
|
26968
|
+
/* @__PURE__ */ jsx157(
|
|
26598
26969
|
IconButton_default,
|
|
26599
26970
|
{
|
|
26600
26971
|
iconId: "chevron-right",
|
|
@@ -26617,12 +26988,12 @@ var Carousel_default = Carousel;
|
|
|
26617
26988
|
import {
|
|
26618
26989
|
SnackbarProvider as NotistackSnackbarProvider
|
|
26619
26990
|
} from "notistack";
|
|
26620
|
-
import { jsx as
|
|
26991
|
+
import { jsx as jsx158 } from "react/jsx-runtime";
|
|
26621
26992
|
var SnackbarProvider = ({
|
|
26622
26993
|
children,
|
|
26623
26994
|
maxSnack = 3,
|
|
26624
26995
|
domRoot
|
|
26625
|
-
}) => /* @__PURE__ */
|
|
26996
|
+
}) => /* @__PURE__ */ jsx158(
|
|
26626
26997
|
NotistackSnackbarProvider,
|
|
26627
26998
|
{
|
|
26628
26999
|
maxSnack,
|
|
@@ -26640,10 +27011,10 @@ import {
|
|
|
26640
27011
|
} from "notistack";
|
|
26641
27012
|
|
|
26642
27013
|
// src/components/snackbar/Snackbar.tsx
|
|
26643
|
-
import * as
|
|
27014
|
+
import * as React89 from "react";
|
|
26644
27015
|
import { SnackbarContent } from "notistack";
|
|
26645
27016
|
import { Typography as Typography4 } from "@mui/material";
|
|
26646
|
-
import { jsx as
|
|
27017
|
+
import { jsx as jsx159, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
26647
27018
|
var sizeStyles5 = {
|
|
26648
27019
|
M: {
|
|
26649
27020
|
width: "344px",
|
|
@@ -26668,7 +27039,7 @@ var iconColors = {
|
|
|
26668
27039
|
error: error300,
|
|
26669
27040
|
warning: complementary300
|
|
26670
27041
|
};
|
|
26671
|
-
var Snackbar =
|
|
27042
|
+
var Snackbar = React89.forwardRef(
|
|
26672
27043
|
function Snackbar2({
|
|
26673
27044
|
severity = "info",
|
|
26674
27045
|
message,
|
|
@@ -26680,13 +27051,13 @@ var Snackbar = React87.forwardRef(
|
|
|
26680
27051
|
identifierKey: key,
|
|
26681
27052
|
dataTestKey
|
|
26682
27053
|
}, ref) {
|
|
26683
|
-
const actionClickHandler =
|
|
27054
|
+
const actionClickHandler = React89.useCallback(() => {
|
|
26684
27055
|
onActionClick && onActionClick(key);
|
|
26685
27056
|
}, [onActionClick, key]);
|
|
26686
|
-
const closeClickHandler =
|
|
27057
|
+
const closeClickHandler = React89.useCallback(() => {
|
|
26687
27058
|
onCloseClick && onCloseClick(key);
|
|
26688
27059
|
}, [onCloseClick, key]);
|
|
26689
|
-
return /* @__PURE__ */
|
|
27060
|
+
return /* @__PURE__ */ jsx159(
|
|
26690
27061
|
SnackbarContent,
|
|
26691
27062
|
{
|
|
26692
27063
|
ref,
|
|
@@ -26704,14 +27075,14 @@ var Snackbar = React87.forwardRef(
|
|
|
26704
27075
|
...dataTestKey && {
|
|
26705
27076
|
"data-test": dataTestKey
|
|
26706
27077
|
},
|
|
26707
|
-
children: /* @__PURE__ */
|
|
27078
|
+
children: /* @__PURE__ */ jsxs82(
|
|
26708
27079
|
Stack_default,
|
|
26709
27080
|
{
|
|
26710
27081
|
direction: "row",
|
|
26711
27082
|
spacing: 2,
|
|
26712
27083
|
sx: { width: "100%", alignItems: "center" },
|
|
26713
27084
|
children: [
|
|
26714
|
-
withIcon && /* @__PURE__ */
|
|
27085
|
+
withIcon && /* @__PURE__ */ jsx159(
|
|
26715
27086
|
Box_default2,
|
|
26716
27087
|
{
|
|
26717
27088
|
sx: {
|
|
@@ -26719,10 +27090,10 @@ var Snackbar = React87.forwardRef(
|
|
|
26719
27090
|
flexShrink: 0,
|
|
26720
27091
|
color: iconColors[severity]
|
|
26721
27092
|
},
|
|
26722
|
-
children: /* @__PURE__ */
|
|
27093
|
+
children: /* @__PURE__ */ jsx159(Icon_default, { id: severityIcons[severity] })
|
|
26723
27094
|
}
|
|
26724
27095
|
),
|
|
26725
|
-
/* @__PURE__ */
|
|
27096
|
+
/* @__PURE__ */ jsx159(
|
|
26726
27097
|
Typography4,
|
|
26727
27098
|
{
|
|
26728
27099
|
variant: "body2",
|
|
@@ -26730,7 +27101,7 @@ var Snackbar = React87.forwardRef(
|
|
|
26730
27101
|
children: message
|
|
26731
27102
|
}
|
|
26732
27103
|
),
|
|
26733
|
-
actionText && /* @__PURE__ */
|
|
27104
|
+
actionText && /* @__PURE__ */ jsx159(Box_default2, { sx: { flexGrow: 0, flexShrink: 0 }, children: /* @__PURE__ */ jsx159(
|
|
26734
27105
|
Button_default,
|
|
26735
27106
|
{
|
|
26736
27107
|
sx: {
|
|
@@ -26745,7 +27116,7 @@ var Snackbar = React87.forwardRef(
|
|
|
26745
27116
|
onClick: actionClickHandler
|
|
26746
27117
|
}
|
|
26747
27118
|
) }),
|
|
26748
|
-
/* @__PURE__ */
|
|
27119
|
+
/* @__PURE__ */ jsx159(Box_default2, { sx: { flexGrow: 0, flexShrink: 0 }, children: /* @__PURE__ */ jsx159(
|
|
26749
27120
|
IconButton_default,
|
|
26750
27121
|
{
|
|
26751
27122
|
iconId: "close",
|
|
@@ -26770,7 +27141,7 @@ var Snackbar_default = Snackbar;
|
|
|
26770
27141
|
|
|
26771
27142
|
// src/components/snackbar/enqueueSnackbar.tsx
|
|
26772
27143
|
import { closeSnackbar as closeSnackbar2 } from "notistack";
|
|
26773
|
-
import { jsx as
|
|
27144
|
+
import { jsx as jsx160 } from "react/jsx-runtime";
|
|
26774
27145
|
var enqueueSnackbar = (message, options = {}) => {
|
|
26775
27146
|
const {
|
|
26776
27147
|
persist,
|
|
@@ -26786,7 +27157,7 @@ var enqueueSnackbar = (message, options = {}) => {
|
|
|
26786
27157
|
autoHideDuration: autoHideDurationMs ?? 1e4,
|
|
26787
27158
|
persist: persist ?? false,
|
|
26788
27159
|
content(key, message2) {
|
|
26789
|
-
return /* @__PURE__ */
|
|
27160
|
+
return /* @__PURE__ */ jsx160(
|
|
26790
27161
|
Snackbar_default,
|
|
26791
27162
|
{
|
|
26792
27163
|
identifierKey: key,
|
|
@@ -26803,7 +27174,7 @@ var enqueueSnackbar = (message, options = {}) => {
|
|
|
26803
27174
|
|
|
26804
27175
|
// src/components/tab/TabButton.tsx
|
|
26805
27176
|
import MuiTab from "@mui/material/Tab";
|
|
26806
|
-
import { jsx as
|
|
27177
|
+
import { jsx as jsx161 } from "react/jsx-runtime";
|
|
26807
27178
|
var TabButton = ({
|
|
26808
27179
|
children,
|
|
26809
27180
|
disabled = false,
|
|
@@ -26811,10 +27182,10 @@ var TabButton = ({
|
|
|
26811
27182
|
marginRight = "0px",
|
|
26812
27183
|
dataTestId,
|
|
26813
27184
|
...rest
|
|
26814
|
-
}) => /* @__PURE__ */
|
|
27185
|
+
}) => /* @__PURE__ */ jsx161(
|
|
26815
27186
|
MuiTab,
|
|
26816
27187
|
{
|
|
26817
|
-
label: /* @__PURE__ */
|
|
27188
|
+
label: /* @__PURE__ */ jsx161(
|
|
26818
27189
|
"div",
|
|
26819
27190
|
{
|
|
26820
27191
|
style: {
|
|
@@ -26849,13 +27220,13 @@ var TabButton = ({
|
|
|
26849
27220
|
var TabButton_default = TabButton;
|
|
26850
27221
|
|
|
26851
27222
|
// src/components/tab/Tabs.tsx
|
|
26852
|
-
import * as
|
|
27223
|
+
import * as React91 from "react";
|
|
26853
27224
|
import MuiTabs from "@mui/material/Tabs";
|
|
26854
27225
|
|
|
26855
27226
|
// src/components/layout/SwipeableViews.tsx
|
|
26856
|
-
import * as
|
|
26857
|
-
import { useEffect as
|
|
26858
|
-
import { jsx as
|
|
27227
|
+
import * as React90 from "react";
|
|
27228
|
+
import { useEffect as useEffect25, useRef as useRef29, useState as useState36 } from "react";
|
|
27229
|
+
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
26859
27230
|
var styles = {
|
|
26860
27231
|
container: {
|
|
26861
27232
|
maxHeight: "100%",
|
|
@@ -26888,12 +27259,12 @@ function SwipeableViews({
|
|
|
26888
27259
|
disableScroll = false,
|
|
26889
27260
|
...rootProps
|
|
26890
27261
|
}) {
|
|
26891
|
-
const containerRef =
|
|
26892
|
-
const scrollTimeout =
|
|
26893
|
-
const scrollingMethod =
|
|
26894
|
-
const [previousIndex, setPreviousIndex] =
|
|
26895
|
-
const hideScrollAnimation =
|
|
26896
|
-
|
|
27262
|
+
const containerRef = useRef29(null);
|
|
27263
|
+
const scrollTimeout = useRef29(null);
|
|
27264
|
+
const scrollingMethod = useRef29("none");
|
|
27265
|
+
const [previousIndex, setPreviousIndex] = useState36(index);
|
|
27266
|
+
const hideScrollAnimation = useRef29(true);
|
|
27267
|
+
useEffect25(() => {
|
|
26897
27268
|
if (containerRef.current) {
|
|
26898
27269
|
if (scrollingMethod.current === "manual") {
|
|
26899
27270
|
scrollingMethod.current = "none";
|
|
@@ -26930,7 +27301,7 @@ function SwipeableViews({
|
|
|
26930
27301
|
}
|
|
26931
27302
|
}, [index]);
|
|
26932
27303
|
const hasShowTab = (childIndex) => childIndex === index || childIndex === previousIndex;
|
|
26933
|
-
return /* @__PURE__ */
|
|
27304
|
+
return /* @__PURE__ */ jsx162(
|
|
26934
27305
|
"div",
|
|
26935
27306
|
{
|
|
26936
27307
|
...rootProps,
|
|
@@ -26953,12 +27324,12 @@ function SwipeableViews({
|
|
|
26953
27324
|
);
|
|
26954
27325
|
}, 100);
|
|
26955
27326
|
},
|
|
26956
|
-
children:
|
|
27327
|
+
children: React90.Children.map(children, (child, childIndex) => {
|
|
26957
27328
|
let mountedChild = false;
|
|
26958
|
-
if (
|
|
27329
|
+
if (React90.isValidElement(child)) {
|
|
26959
27330
|
mountedChild = !!child.props.keepMounted;
|
|
26960
27331
|
}
|
|
26961
|
-
return /* @__PURE__ */
|
|
27332
|
+
return /* @__PURE__ */ jsx162(
|
|
26962
27333
|
"div",
|
|
26963
27334
|
{
|
|
26964
27335
|
style: Object.assign(
|
|
@@ -26983,7 +27354,7 @@ function SwipeableViews({
|
|
|
26983
27354
|
}
|
|
26984
27355
|
|
|
26985
27356
|
// src/components/tab/Tabs.tsx
|
|
26986
|
-
import { jsx as
|
|
27357
|
+
import { jsx as jsx163, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
26987
27358
|
var Tabs = ({
|
|
26988
27359
|
tabButtons,
|
|
26989
27360
|
children,
|
|
@@ -26998,8 +27369,8 @@ var Tabs = ({
|
|
|
26998
27369
|
hideLineTabs = false,
|
|
26999
27370
|
backgroundScrollButtons = Colors_exports.white
|
|
27000
27371
|
}) => {
|
|
27001
|
-
const tabsRef =
|
|
27002
|
-
const [value, setValue] =
|
|
27372
|
+
const tabsRef = React91.useRef(null);
|
|
27373
|
+
const [value, setValue] = React91.useState(0);
|
|
27003
27374
|
const measureTextWidthRange = (child) => {
|
|
27004
27375
|
const walker = document.createTreeWalker(child, NodeFilter.SHOW_TEXT, {
|
|
27005
27376
|
acceptNode: (node) => node.textContent?.trim() ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT
|
|
@@ -27013,7 +27384,7 @@ var Tabs = ({
|
|
|
27013
27384
|
const rect = range.getBoundingClientRect();
|
|
27014
27385
|
return Math.round(rect.width);
|
|
27015
27386
|
};
|
|
27016
|
-
const waitForSmoothScrollEnd =
|
|
27387
|
+
const waitForSmoothScrollEnd = React91.useCallback(
|
|
27017
27388
|
(container, onEnd) => {
|
|
27018
27389
|
let prev = container.scrollLeft;
|
|
27019
27390
|
let idleFrames = 0;
|
|
@@ -27037,7 +27408,7 @@ var Tabs = ({
|
|
|
27037
27408
|
},
|
|
27038
27409
|
[]
|
|
27039
27410
|
);
|
|
27040
|
-
const calculateIndicatorTabWidth =
|
|
27411
|
+
const calculateIndicatorTabWidth = React91.useCallback((index) => {
|
|
27041
27412
|
if (!tabsRef.current) {
|
|
27042
27413
|
return null;
|
|
27043
27414
|
}
|
|
@@ -27056,7 +27427,7 @@ var Tabs = ({
|
|
|
27056
27427
|
indicator.style.width = `${textWidth}px`;
|
|
27057
27428
|
indicator.style.left = `${left}px`;
|
|
27058
27429
|
}, []);
|
|
27059
|
-
|
|
27430
|
+
React91.useEffect(() => {
|
|
27060
27431
|
if (!tabsRef.current) {
|
|
27061
27432
|
return;
|
|
27062
27433
|
}
|
|
@@ -27082,7 +27453,7 @@ var Tabs = ({
|
|
|
27082
27453
|
bottom: 0,
|
|
27083
27454
|
borderRadius: "8px"
|
|
27084
27455
|
};
|
|
27085
|
-
return /* @__PURE__ */
|
|
27456
|
+
return /* @__PURE__ */ jsxs83(
|
|
27086
27457
|
Box_default2,
|
|
27087
27458
|
{
|
|
27088
27459
|
sx: {
|
|
@@ -27096,7 +27467,7 @@ var Tabs = ({
|
|
|
27096
27467
|
}
|
|
27097
27468
|
},
|
|
27098
27469
|
children: [
|
|
27099
|
-
/* @__PURE__ */
|
|
27470
|
+
/* @__PURE__ */ jsx163(
|
|
27100
27471
|
MuiTabs,
|
|
27101
27472
|
{
|
|
27102
27473
|
ref: tabsRef,
|
|
@@ -27135,7 +27506,7 @@ var Tabs = ({
|
|
|
27135
27506
|
children: tabButtons
|
|
27136
27507
|
}
|
|
27137
27508
|
),
|
|
27138
|
-
/* @__PURE__ */
|
|
27509
|
+
/* @__PURE__ */ jsx163(
|
|
27139
27510
|
Box_default2,
|
|
27140
27511
|
{
|
|
27141
27512
|
sx: {
|
|
@@ -27144,7 +27515,7 @@ var Tabs = ({
|
|
|
27144
27515
|
height: "100%"
|
|
27145
27516
|
}
|
|
27146
27517
|
},
|
|
27147
|
-
children: /* @__PURE__ */
|
|
27518
|
+
children: /* @__PURE__ */ jsx163(
|
|
27148
27519
|
SwipeableViews,
|
|
27149
27520
|
{
|
|
27150
27521
|
index: currentTabIndex ?? value,
|
|
@@ -27173,8 +27544,8 @@ var Tabs = ({
|
|
|
27173
27544
|
var Tabs_default = Tabs;
|
|
27174
27545
|
|
|
27175
27546
|
// src/components/tab/TabContent.tsx
|
|
27176
|
-
import { jsx as
|
|
27177
|
-
var TabContent = ({ children }) => /* @__PURE__ */
|
|
27547
|
+
import { jsx as jsx164 } from "react/jsx-runtime";
|
|
27548
|
+
var TabContent = ({ children }) => /* @__PURE__ */ jsx164(
|
|
27178
27549
|
Box_default2,
|
|
27179
27550
|
{
|
|
27180
27551
|
sx: {
|
|
@@ -27191,8 +27562,8 @@ import {
|
|
|
27191
27562
|
TableRow as MuiTableRow,
|
|
27192
27563
|
TableCell as MuiTableCell
|
|
27193
27564
|
} from "@mui/material";
|
|
27194
|
-
import { jsx as
|
|
27195
|
-
var TableDivider = () => /* @__PURE__ */
|
|
27565
|
+
import { jsx as jsx165 } from "react/jsx-runtime";
|
|
27566
|
+
var TableDivider = () => /* @__PURE__ */ jsx165(MuiTableRow, { children: /* @__PURE__ */ jsx165(
|
|
27196
27567
|
MuiTableCell,
|
|
27197
27568
|
{
|
|
27198
27569
|
colSpan: 1e3,
|
|
@@ -27205,8 +27576,8 @@ var TableDivider_default = TableDivider;
|
|
|
27205
27576
|
import {
|
|
27206
27577
|
TableSortLabel as MuiTableSortLabel
|
|
27207
27578
|
} from "@mui/material";
|
|
27208
|
-
import { jsx as
|
|
27209
|
-
var TableSortLabel = ({ children, ...rest }) => /* @__PURE__ */
|
|
27579
|
+
import { jsx as jsx166 } from "react/jsx-runtime";
|
|
27580
|
+
var TableSortLabel = ({ children, ...rest }) => /* @__PURE__ */ jsx166(MuiTableSortLabel, { ...rest, children });
|
|
27210
27581
|
var TableSortLabel_default = TableSortLabel;
|
|
27211
27582
|
|
|
27212
27583
|
// src/components/table/Table.tsx
|
|
@@ -27214,21 +27585,21 @@ import {
|
|
|
27214
27585
|
TableContainer,
|
|
27215
27586
|
Table as MuiTable
|
|
27216
27587
|
} from "@mui/material";
|
|
27217
|
-
import { jsx as
|
|
27218
|
-
var Table = ({ children, sx, className }) => /* @__PURE__ */
|
|
27588
|
+
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
27589
|
+
var Table = ({ children, sx, className }) => /* @__PURE__ */ jsx167(TableContainer, { className: "Slim-Horizontal-Scroll", children: /* @__PURE__ */ jsx167(MuiTable, { sx: { backgroundColor: white, ...sx }, className, children }) });
|
|
27219
27590
|
var Table_default = Table;
|
|
27220
27591
|
|
|
27221
27592
|
// src/components/table/TableBody.tsx
|
|
27222
27593
|
import { TableBody as MuiTableBody } from "@mui/material";
|
|
27223
|
-
import { jsx as
|
|
27224
|
-
var TableBody = ({ children }) => /* @__PURE__ */
|
|
27594
|
+
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
27595
|
+
var TableBody = ({ children }) => /* @__PURE__ */ jsx168(MuiTableBody, { children });
|
|
27225
27596
|
var TableBody_default = TableBody;
|
|
27226
27597
|
|
|
27227
27598
|
// src/components/table/TableCell.tsx
|
|
27228
27599
|
import {
|
|
27229
27600
|
TableCell as MuiTableCell2
|
|
27230
27601
|
} from "@mui/material";
|
|
27231
|
-
import { jsx as
|
|
27602
|
+
import { jsx as jsx169 } from "react/jsx-runtime";
|
|
27232
27603
|
var TableCell = ({
|
|
27233
27604
|
children,
|
|
27234
27605
|
size = "M",
|
|
@@ -27239,7 +27610,7 @@ var TableCell = ({
|
|
|
27239
27610
|
onClick,
|
|
27240
27611
|
noBorder = false,
|
|
27241
27612
|
...rest
|
|
27242
|
-
}) => /* @__PURE__ */
|
|
27613
|
+
}) => /* @__PURE__ */ jsx169(
|
|
27243
27614
|
MuiTableCell2,
|
|
27244
27615
|
{
|
|
27245
27616
|
...rest,
|
|
@@ -27263,12 +27634,12 @@ var TableCell = ({
|
|
|
27263
27634
|
var TableCell_default = TableCell;
|
|
27264
27635
|
|
|
27265
27636
|
// src/components/table/TableCellCopy.tsx
|
|
27266
|
-
import * as
|
|
27267
|
-
import { jsx as
|
|
27637
|
+
import * as React92 from "react";
|
|
27638
|
+
import { jsx as jsx170 } from "react/jsx-runtime";
|
|
27268
27639
|
var TableCellCopy = ({ text, textToCopy, ...rest }) => {
|
|
27269
27640
|
const { t } = useTranslation();
|
|
27270
|
-
const [isCopied, setIsCopied] =
|
|
27271
|
-
const [showIcon, setShowIcon] =
|
|
27641
|
+
const [isCopied, setIsCopied] = React92.useState(false);
|
|
27642
|
+
const [showIcon, setShowIcon] = React92.useState(false);
|
|
27272
27643
|
const manageButtonClicked = () => {
|
|
27273
27644
|
void navigator.clipboard.writeText(textToCopy ?? text);
|
|
27274
27645
|
if (isCopied) {
|
|
@@ -27282,7 +27653,7 @@ var TableCellCopy = ({ text, textToCopy, ...rest }) => {
|
|
|
27282
27653
|
const getIconId = () => !isCopied ? "content-copy" : "check";
|
|
27283
27654
|
const iconHiddenClass = "icon-hidden";
|
|
27284
27655
|
const iconCopiedClass = "icon-copied";
|
|
27285
|
-
return /* @__PURE__ */
|
|
27656
|
+
return /* @__PURE__ */ jsx170(TableCell_default, { ...rest, sx: { padding: 0 }, children: /* @__PURE__ */ jsx170(
|
|
27286
27657
|
Stack_default,
|
|
27287
27658
|
{
|
|
27288
27659
|
direction: "row",
|
|
@@ -27291,7 +27662,7 @@ var TableCellCopy = ({ text, textToCopy, ...rest }) => {
|
|
|
27291
27662
|
onMouseEnter: () => setShowIcon(true),
|
|
27292
27663
|
onMouseLeave: () => setShowIcon(false),
|
|
27293
27664
|
onClick: manageButtonClicked,
|
|
27294
|
-
children: /* @__PURE__ */
|
|
27665
|
+
children: /* @__PURE__ */ jsx170(Tooltip_default, { title: t(!isCopied ? "COPY" : "COPIED"), children: /* @__PURE__ */ jsx170(
|
|
27295
27666
|
Button_default,
|
|
27296
27667
|
{
|
|
27297
27668
|
className: isCopied ? iconCopiedClass : !showIcon ? iconHiddenClass : "",
|
|
@@ -27321,21 +27692,21 @@ var TableCellCopy_default = TableCellCopy;
|
|
|
27321
27692
|
|
|
27322
27693
|
// src/components/table/TableHead.tsx
|
|
27323
27694
|
import { TableHead as MuiTableHead } from "@mui/material";
|
|
27324
|
-
import { jsx as
|
|
27325
|
-
var TableHead = ({ children }) => /* @__PURE__ */
|
|
27695
|
+
import { jsx as jsx171 } from "react/jsx-runtime";
|
|
27696
|
+
var TableHead = ({ children }) => /* @__PURE__ */ jsx171(MuiTableHead, { children });
|
|
27326
27697
|
var TableHead_default = TableHead;
|
|
27327
27698
|
|
|
27328
27699
|
// src/components/table/TableRow.tsx
|
|
27329
27700
|
import {
|
|
27330
27701
|
TableRow as MuiTableRow2
|
|
27331
27702
|
} from "@mui/material";
|
|
27332
|
-
import { jsx as
|
|
27703
|
+
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
27333
27704
|
var TableRow = ({
|
|
27334
27705
|
children,
|
|
27335
27706
|
isFollowedByNestedTable = false,
|
|
27336
27707
|
fadeInLeftAnimation = false,
|
|
27337
27708
|
sx
|
|
27338
|
-
}) => /* @__PURE__ */
|
|
27709
|
+
}) => /* @__PURE__ */ jsx172(
|
|
27339
27710
|
MuiTableRow2,
|
|
27340
27711
|
{
|
|
27341
27712
|
className: `${isFollowedByNestedTable ? "Followed-By-Nested-Table" : ""} ${fadeInLeftAnimation ? "animated fadeInLeft" : ""}`,
|
|
@@ -27347,14 +27718,14 @@ var TableRow_default = TableRow;
|
|
|
27347
27718
|
|
|
27348
27719
|
// src/components/table/NestedTable.tsx
|
|
27349
27720
|
import { Collapse as Collapse7 } from "@mui/material";
|
|
27350
|
-
import { jsx as
|
|
27721
|
+
import { jsx as jsx173 } from "react/jsx-runtime";
|
|
27351
27722
|
var NestedTable = ({
|
|
27352
27723
|
colSpan,
|
|
27353
27724
|
children,
|
|
27354
27725
|
className = "",
|
|
27355
27726
|
sx,
|
|
27356
27727
|
isVisible = true
|
|
27357
|
-
}) => /* @__PURE__ */
|
|
27728
|
+
}) => /* @__PURE__ */ jsx173(TableRow_default, { children: /* @__PURE__ */ jsx173(
|
|
27358
27729
|
TableCell_default,
|
|
27359
27730
|
{
|
|
27360
27731
|
colSpan,
|
|
@@ -27363,14 +27734,14 @@ var NestedTable = ({
|
|
|
27363
27734
|
height: "auto",
|
|
27364
27735
|
...!isVisible && { borderBottom: "none" }
|
|
27365
27736
|
},
|
|
27366
|
-
children: /* @__PURE__ */
|
|
27737
|
+
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 }) }) }) })
|
|
27367
27738
|
}
|
|
27368
27739
|
) });
|
|
27369
27740
|
var NestedTable_default = NestedTable;
|
|
27370
27741
|
|
|
27371
27742
|
// src/components/toolbar/ToolbarBreadcrumb.tsx
|
|
27372
|
-
import { jsx as
|
|
27373
|
-
var ToolbarBreadcrumb = ({ parts = [] }) => /* @__PURE__ */
|
|
27743
|
+
import { jsx as jsx174 } from "react/jsx-runtime";
|
|
27744
|
+
var ToolbarBreadcrumb = ({ parts = [] }) => /* @__PURE__ */ jsx174(
|
|
27374
27745
|
Stack_default,
|
|
27375
27746
|
{
|
|
27376
27747
|
direction: "row",
|
|
@@ -27380,7 +27751,7 @@ var ToolbarBreadcrumb = ({ parts = [] }) => /* @__PURE__ */ jsx168(
|
|
|
27380
27751
|
(previous, current, index) => [
|
|
27381
27752
|
...previous,
|
|
27382
27753
|
...index > 0 ? [
|
|
27383
|
-
/* @__PURE__ */
|
|
27754
|
+
/* @__PURE__ */ jsx174(
|
|
27384
27755
|
Typography_default,
|
|
27385
27756
|
{
|
|
27386
27757
|
color: grey500,
|
|
@@ -27403,10 +27774,10 @@ var ToolbarBreadcrumb_default = ToolbarBreadcrumb;
|
|
|
27403
27774
|
|
|
27404
27775
|
// src/components/toolbar/ToolbarBreadcrumbButton.tsx
|
|
27405
27776
|
import { ButtonBase as ButtonBase5 } from "@mui/material";
|
|
27406
|
-
import * as
|
|
27407
|
-
import { jsx as
|
|
27408
|
-
var ToolbarBreadcrumbButton =
|
|
27409
|
-
return /* @__PURE__ */
|
|
27777
|
+
import * as React93 from "react";
|
|
27778
|
+
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
27779
|
+
var ToolbarBreadcrumbButton = React93.forwardRef(function ToolbarBreadcrumbButton2({ text, className, ...rest }, ref) {
|
|
27780
|
+
return /* @__PURE__ */ jsx175(
|
|
27410
27781
|
ButtonBase5,
|
|
27411
27782
|
{
|
|
27412
27783
|
className: `Cn-ToolbarBreadcrumbButton ${className}`,
|
|
@@ -27425,14 +27796,14 @@ var ToolbarBreadcrumbButton = React91.forwardRef(function ToolbarBreadcrumbButto
|
|
|
27425
27796
|
}
|
|
27426
27797
|
},
|
|
27427
27798
|
...rest,
|
|
27428
|
-
children: /* @__PURE__ */
|
|
27799
|
+
children: /* @__PURE__ */ jsx175(Typography_default, { color: "inherit", component: "div", variant: "h6", noWrap: true, children: text })
|
|
27429
27800
|
}
|
|
27430
27801
|
);
|
|
27431
27802
|
});
|
|
27432
27803
|
var ToolbarBreadcrumbButton_default = ToolbarBreadcrumbButton;
|
|
27433
27804
|
|
|
27434
27805
|
// src/components/toolbar/Toolbar.tsx
|
|
27435
|
-
import { jsx as
|
|
27806
|
+
import { jsx as jsx176, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
27436
27807
|
var Toolbar = ({
|
|
27437
27808
|
children,
|
|
27438
27809
|
rightActions,
|
|
@@ -27441,7 +27812,7 @@ var Toolbar = ({
|
|
|
27441
27812
|
sx,
|
|
27442
27813
|
dataTestId,
|
|
27443
27814
|
onClickToolbar
|
|
27444
|
-
}) => /* @__PURE__ */
|
|
27815
|
+
}) => /* @__PURE__ */ jsxs84(
|
|
27445
27816
|
Box_default2,
|
|
27446
27817
|
{
|
|
27447
27818
|
className: `Cn-Toolbar ${className}`,
|
|
@@ -27461,7 +27832,7 @@ var Toolbar = ({
|
|
|
27461
27832
|
onClick: onClickToolbar,
|
|
27462
27833
|
"data-testid": dataTestId,
|
|
27463
27834
|
children: [
|
|
27464
|
-
/* @__PURE__ */
|
|
27835
|
+
/* @__PURE__ */ jsxs84(
|
|
27465
27836
|
Box_default2,
|
|
27466
27837
|
{
|
|
27467
27838
|
sx: {
|
|
@@ -27473,7 +27844,7 @@ var Toolbar = ({
|
|
|
27473
27844
|
width: "100%"
|
|
27474
27845
|
},
|
|
27475
27846
|
children: [
|
|
27476
|
-
leftActions && /* @__PURE__ */
|
|
27847
|
+
leftActions && /* @__PURE__ */ jsx176(
|
|
27477
27848
|
Box_default2,
|
|
27478
27849
|
{
|
|
27479
27850
|
className: `Cn-Toolbar-left`,
|
|
@@ -27483,7 +27854,7 @@ var Toolbar = ({
|
|
|
27483
27854
|
children: leftActions
|
|
27484
27855
|
}
|
|
27485
27856
|
),
|
|
27486
|
-
/* @__PURE__ */
|
|
27857
|
+
/* @__PURE__ */ jsx176(
|
|
27487
27858
|
Box_default2,
|
|
27488
27859
|
{
|
|
27489
27860
|
className: `Cn-Toolbar-children`,
|
|
@@ -27498,7 +27869,7 @@ var Toolbar = ({
|
|
|
27498
27869
|
]
|
|
27499
27870
|
}
|
|
27500
27871
|
),
|
|
27501
|
-
rightActions && /* @__PURE__ */
|
|
27872
|
+
rightActions && /* @__PURE__ */ jsx176(
|
|
27502
27873
|
Box_default2,
|
|
27503
27874
|
{
|
|
27504
27875
|
className: `Cn-Toolbar-right`,
|
|
@@ -27517,26 +27888,26 @@ var Toolbar = ({
|
|
|
27517
27888
|
var Toolbar_default = Toolbar;
|
|
27518
27889
|
|
|
27519
27890
|
// src/components/toolbar/ToolbarTitle.tsx
|
|
27520
|
-
import * as
|
|
27521
|
-
import { useState as
|
|
27522
|
-
import { jsx as
|
|
27523
|
-
var ToolbarTitle =
|
|
27891
|
+
import * as React94 from "react";
|
|
27892
|
+
import { useState as useState39 } from "react";
|
|
27893
|
+
import { jsx as jsx177, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
27894
|
+
var ToolbarTitle = React94.forwardRef(function ToolbarTitle2({
|
|
27524
27895
|
title,
|
|
27525
27896
|
align = "left",
|
|
27526
27897
|
className,
|
|
27527
27898
|
hoverActions,
|
|
27528
27899
|
color: color2 = grey900
|
|
27529
27900
|
}, ref) {
|
|
27530
|
-
const textElementRef =
|
|
27901
|
+
const textElementRef = React94.useRef(
|
|
27531
27902
|
null
|
|
27532
27903
|
);
|
|
27533
|
-
const [showHoverActions, setShowHoverActions] =
|
|
27534
|
-
return /* @__PURE__ */
|
|
27904
|
+
const [showHoverActions, setShowHoverActions] = useState39(false);
|
|
27905
|
+
return /* @__PURE__ */ jsx177(Box_default2, { sx: { maxWidth: "100%" }, children: /* @__PURE__ */ jsx177(
|
|
27535
27906
|
TextEllipsisTooltip_default,
|
|
27536
27907
|
{
|
|
27537
27908
|
title: title ?? "\xA0",
|
|
27538
27909
|
textEllipsableElement: textElementRef,
|
|
27539
|
-
children: /* @__PURE__ */
|
|
27910
|
+
children: /* @__PURE__ */ jsxs85(
|
|
27540
27911
|
Typography_default,
|
|
27541
27912
|
{
|
|
27542
27913
|
color: color2,
|
|
@@ -27554,7 +27925,7 @@ var ToolbarTitle = React92.forwardRef(function ToolbarTitle2({
|
|
|
27554
27925
|
},
|
|
27555
27926
|
children: [
|
|
27556
27927
|
title || "\xA0",
|
|
27557
|
-
hoverActions && showHoverActions && /* @__PURE__ */
|
|
27928
|
+
hoverActions && showHoverActions && /* @__PURE__ */ jsx177(
|
|
27558
27929
|
Box_default2,
|
|
27559
27930
|
{
|
|
27560
27931
|
sx: {
|
|
@@ -27583,13 +27954,13 @@ var Slide_default = Slide;
|
|
|
27583
27954
|
|
|
27584
27955
|
// src/components/widget/WidgetLegendItem.tsx
|
|
27585
27956
|
import { ButtonBase as ButtonBase6 } from "@mui/material";
|
|
27586
|
-
import { jsx as
|
|
27957
|
+
import { jsx as jsx178, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
27587
27958
|
var WidgetLegendItem = ({
|
|
27588
27959
|
groupLabel,
|
|
27589
27960
|
legendDirection = "column",
|
|
27590
27961
|
items = [],
|
|
27591
27962
|
onClick
|
|
27592
|
-
}) => /* @__PURE__ */
|
|
27963
|
+
}) => /* @__PURE__ */ jsx178(
|
|
27593
27964
|
ButtonBase6,
|
|
27594
27965
|
{
|
|
27595
27966
|
tabIndex: onClick ? 0 : -1,
|
|
@@ -27603,7 +27974,7 @@ var WidgetLegendItem = ({
|
|
|
27603
27974
|
p: "2px 12px",
|
|
27604
27975
|
cursor: onClick ? "pointer" : "default"
|
|
27605
27976
|
},
|
|
27606
|
-
children: /* @__PURE__ */
|
|
27977
|
+
children: /* @__PURE__ */ jsxs86(
|
|
27607
27978
|
Box_default2,
|
|
27608
27979
|
{
|
|
27609
27980
|
sx: {
|
|
@@ -27615,7 +27986,7 @@ var WidgetLegendItem = ({
|
|
|
27615
27986
|
color: grey800
|
|
27616
27987
|
},
|
|
27617
27988
|
children: [
|
|
27618
|
-
groupLabel && /* @__PURE__ */
|
|
27989
|
+
groupLabel && /* @__PURE__ */ jsx178(
|
|
27619
27990
|
Typography_default,
|
|
27620
27991
|
{
|
|
27621
27992
|
variant: "overline",
|
|
@@ -27637,7 +28008,7 @@ var WidgetLegendItem = ({
|
|
|
27637
28008
|
style: style3
|
|
27638
28009
|
}, i) => {
|
|
27639
28010
|
const incrementLabelIconId = incrementLabelType && incrementLabelStyles[incrementLabelType].icon;
|
|
27640
|
-
return /* @__PURE__ */
|
|
28011
|
+
return /* @__PURE__ */ jsxs86(
|
|
27641
28012
|
Box_default2,
|
|
27642
28013
|
{
|
|
27643
28014
|
sx: {
|
|
@@ -27647,7 +28018,7 @@ var WidgetLegendItem = ({
|
|
|
27647
28018
|
paddingRight: legendDirection === "row" ? "12px" : "inherit"
|
|
27648
28019
|
},
|
|
27649
28020
|
children: [
|
|
27650
|
-
iconColor && /* @__PURE__ */
|
|
28021
|
+
iconColor && /* @__PURE__ */ jsx178(
|
|
27651
28022
|
Icon_default,
|
|
27652
28023
|
{
|
|
27653
28024
|
id: iconId,
|
|
@@ -27658,7 +28029,7 @@ var WidgetLegendItem = ({
|
|
|
27658
28029
|
size: iconSize
|
|
27659
28030
|
}
|
|
27660
28031
|
),
|
|
27661
|
-
label && /* @__PURE__ */
|
|
28032
|
+
label && /* @__PURE__ */ jsx178(
|
|
27662
28033
|
Typography_default,
|
|
27663
28034
|
{
|
|
27664
28035
|
variant: "caption",
|
|
@@ -27667,7 +28038,7 @@ var WidgetLegendItem = ({
|
|
|
27667
28038
|
children: label
|
|
27668
28039
|
}
|
|
27669
28040
|
),
|
|
27670
|
-
value && /* @__PURE__ */
|
|
28041
|
+
value && /* @__PURE__ */ jsx178(
|
|
27671
28042
|
Typography_default,
|
|
27672
28043
|
{
|
|
27673
28044
|
sx: style3,
|
|
@@ -27676,7 +28047,7 @@ var WidgetLegendItem = ({
|
|
|
27676
28047
|
children: value
|
|
27677
28048
|
}
|
|
27678
28049
|
),
|
|
27679
|
-
incrementLabelValue && /* @__PURE__ */
|
|
28050
|
+
incrementLabelValue && /* @__PURE__ */ jsx178(
|
|
27680
28051
|
IncrementLabel_default,
|
|
27681
28052
|
{
|
|
27682
28053
|
label: incrementLabelValue,
|
|
@@ -27702,8 +28073,8 @@ var WidgetLegendItem_default = WidgetLegendItem;
|
|
|
27702
28073
|
|
|
27703
28074
|
// src/components/widget/Widget.tsx
|
|
27704
28075
|
import MuiCard2 from "@mui/material/Card";
|
|
27705
|
-
import { jsx as
|
|
27706
|
-
var Widget = ({ children }) => /* @__PURE__ */
|
|
28076
|
+
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
28077
|
+
var Widget = ({ children }) => /* @__PURE__ */ jsx179(
|
|
27707
28078
|
MuiCard2,
|
|
27708
28079
|
{
|
|
27709
28080
|
variant: "elevation",
|
|
@@ -27727,8 +28098,8 @@ var Widget = ({ children }) => /* @__PURE__ */ jsx173(
|
|
|
27727
28098
|
var Widget_default = Widget;
|
|
27728
28099
|
|
|
27729
28100
|
// src/components/widget/WidgetActions.tsx
|
|
27730
|
-
import { jsx as
|
|
27731
|
-
var WidgetActions = ({ children }) => /* @__PURE__ */
|
|
28101
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
28102
|
+
var WidgetActions = ({ children }) => /* @__PURE__ */ jsx180(
|
|
27732
28103
|
Box_default2,
|
|
27733
28104
|
{
|
|
27734
28105
|
sx: {
|
|
@@ -27742,8 +28113,8 @@ var WidgetActions = ({ children }) => /* @__PURE__ */ jsx174(
|
|
|
27742
28113
|
var WidgetActions_default = WidgetActions;
|
|
27743
28114
|
|
|
27744
28115
|
// src/components/widget/WidgetTitle.tsx
|
|
27745
|
-
import { jsx as
|
|
27746
|
-
var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE__ */
|
|
28116
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
28117
|
+
var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE__ */ jsx181(
|
|
27747
28118
|
Box_default2,
|
|
27748
28119
|
{
|
|
27749
28120
|
sx: {
|
|
@@ -27753,7 +28124,7 @@ var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE
|
|
|
27753
28124
|
maxWidth: "100%",
|
|
27754
28125
|
...sx
|
|
27755
28126
|
},
|
|
27756
|
-
children: /* @__PURE__ */
|
|
28127
|
+
children: /* @__PURE__ */ jsx181(
|
|
27757
28128
|
Typography_default,
|
|
27758
28129
|
{
|
|
27759
28130
|
variant: "subtitle2",
|
|
@@ -27767,12 +28138,12 @@ var WidgetTitle = ({ children, sx, multiline = false }) => children ? /* @__PURE
|
|
|
27767
28138
|
}
|
|
27768
28139
|
)
|
|
27769
28140
|
}
|
|
27770
|
-
) : /* @__PURE__ */
|
|
28141
|
+
) : /* @__PURE__ */ jsx181("span", {});
|
|
27771
28142
|
var WidgetTitle_default = WidgetTitle;
|
|
27772
28143
|
|
|
27773
28144
|
// src/components/window/MinimizableWindow.tsx
|
|
27774
|
-
import * as
|
|
27775
|
-
import { Fragment as
|
|
28145
|
+
import * as React95 from "react";
|
|
28146
|
+
import { Fragment as Fragment42, jsx as jsx182, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
27776
28147
|
var sizes6 = {
|
|
27777
28148
|
M: 400,
|
|
27778
28149
|
L: 500,
|
|
@@ -27797,7 +28168,7 @@ var iconButtonsStyles = {
|
|
|
27797
28168
|
backgroundColor: "rgba(255, 255, 255, 0.2)"
|
|
27798
28169
|
}
|
|
27799
28170
|
};
|
|
27800
|
-
var MinimizableWindow =
|
|
28171
|
+
var MinimizableWindow = React95.forwardRef(function MinimizableWindow2({
|
|
27801
28172
|
children,
|
|
27802
28173
|
title,
|
|
27803
28174
|
size = "M",
|
|
@@ -27817,17 +28188,17 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27817
28188
|
onBack
|
|
27818
28189
|
}, ref) {
|
|
27819
28190
|
const { t } = useTranslation();
|
|
27820
|
-
const overlayRef =
|
|
27821
|
-
const windowRef =
|
|
27822
|
-
const headerRef =
|
|
27823
|
-
const [isDraggingState, setIsDraggingState] =
|
|
27824
|
-
const diffRef =
|
|
27825
|
-
|
|
28191
|
+
const overlayRef = React95.useRef(null);
|
|
28192
|
+
const windowRef = React95.useRef(null);
|
|
28193
|
+
const headerRef = React95.useRef(null);
|
|
28194
|
+
const [isDraggingState, setIsDraggingState] = React95.useState(false);
|
|
28195
|
+
const diffRef = React95.useRef({ x: 0, y: 0 });
|
|
28196
|
+
React95.useImperativeHandle(ref, () => ({
|
|
27826
28197
|
window: windowRef.current,
|
|
27827
28198
|
header: headerRef.current,
|
|
27828
28199
|
overlay: overlayRef.current
|
|
27829
28200
|
}));
|
|
27830
|
-
|
|
28201
|
+
React95.useEffect(() => {
|
|
27831
28202
|
if (open) {
|
|
27832
28203
|
overlayRef.current?.style.removeProperty("transform");
|
|
27833
28204
|
overlayRef.current?.style.removeProperty("opacity");
|
|
@@ -27889,8 +28260,8 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27889
28260
|
}
|
|
27890
28261
|
}, 750);
|
|
27891
28262
|
};
|
|
27892
|
-
return /* @__PURE__ */
|
|
27893
|
-
isDraggingState && /* @__PURE__ */
|
|
28263
|
+
return /* @__PURE__ */ jsxs87(Fragment42, { children: [
|
|
28264
|
+
isDraggingState && /* @__PURE__ */ jsx182(
|
|
27894
28265
|
Box_default2,
|
|
27895
28266
|
{
|
|
27896
28267
|
sx: {
|
|
@@ -27906,7 +28277,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27906
28277
|
onMouseMove: (ev) => handleMouseMove(ev)
|
|
27907
28278
|
}
|
|
27908
28279
|
),
|
|
27909
|
-
/* @__PURE__ */
|
|
28280
|
+
/* @__PURE__ */ jsx182(
|
|
27910
28281
|
Box_default2,
|
|
27911
28282
|
{
|
|
27912
28283
|
ref: overlayRef,
|
|
@@ -27923,7 +28294,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27923
28294
|
...!open && { pointerEvents: "none" },
|
|
27924
28295
|
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)"
|
|
27925
28296
|
},
|
|
27926
|
-
children: /* @__PURE__ */
|
|
28297
|
+
children: /* @__PURE__ */ jsxs87(
|
|
27927
28298
|
Stack_default,
|
|
27928
28299
|
{
|
|
27929
28300
|
sx: {
|
|
@@ -27934,7 +28305,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27934
28305
|
width: `${sizes6[size]}px`,
|
|
27935
28306
|
height: contentHeight !== void 0 && headerRef.current ? `${contentHeight + contentPadding + headerRef.current.scrollHeight}px` : void 0,
|
|
27936
28307
|
children: [
|
|
27937
|
-
/* @__PURE__ */
|
|
28308
|
+
/* @__PURE__ */ jsxs87(
|
|
27938
28309
|
Stack_default,
|
|
27939
28310
|
{
|
|
27940
28311
|
ref: headerRef,
|
|
@@ -27948,19 +28319,19 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27948
28319
|
onMouseDown: handleMouseDown,
|
|
27949
28320
|
minHeight: "44px",
|
|
27950
28321
|
children: [
|
|
27951
|
-
/* @__PURE__ */
|
|
28322
|
+
/* @__PURE__ */ jsx182(
|
|
27952
28323
|
Stack_default,
|
|
27953
28324
|
{
|
|
27954
28325
|
direction: "row",
|
|
27955
28326
|
alignItems: "center",
|
|
27956
28327
|
onMouseDown: (ev) => ev.stopPropagation(),
|
|
27957
|
-
children: showBackButton && (!backButton ? /* @__PURE__ */
|
|
28328
|
+
children: showBackButton && (!backButton ? /* @__PURE__ */ jsx182(
|
|
27958
28329
|
Tooltip_default,
|
|
27959
28330
|
{
|
|
27960
28331
|
title: t("MINIMIZABLE_WINDOW.GO_BACK"),
|
|
27961
28332
|
zIndex: 999999,
|
|
27962
28333
|
placement: "top",
|
|
27963
|
-
children: /* @__PURE__ */
|
|
28334
|
+
children: /* @__PURE__ */ jsx182(
|
|
27964
28335
|
IconButton_default,
|
|
27965
28336
|
{
|
|
27966
28337
|
size: iconSizes4,
|
|
@@ -27973,7 +28344,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27973
28344
|
) : backButton)
|
|
27974
28345
|
}
|
|
27975
28346
|
),
|
|
27976
|
-
/* @__PURE__ */
|
|
28347
|
+
/* @__PURE__ */ jsx182(
|
|
27977
28348
|
Box_default2,
|
|
27978
28349
|
{
|
|
27979
28350
|
sx: {
|
|
@@ -27981,23 +28352,23 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
27981
28352
|
left: "50%",
|
|
27982
28353
|
transform: "translateX(-50%)"
|
|
27983
28354
|
},
|
|
27984
|
-
children: typeof title === "string" ? /* @__PURE__ */
|
|
28355
|
+
children: typeof title === "string" ? /* @__PURE__ */ jsx182(Typography_default, { children: title }) : title
|
|
27985
28356
|
}
|
|
27986
28357
|
),
|
|
27987
|
-
/* @__PURE__ */
|
|
28358
|
+
/* @__PURE__ */ jsxs87(
|
|
27988
28359
|
Stack_default,
|
|
27989
28360
|
{
|
|
27990
28361
|
direction: "row",
|
|
27991
28362
|
alignItems: "center",
|
|
27992
28363
|
onMouseDown: (ev) => ev.stopPropagation(),
|
|
27993
28364
|
children: [
|
|
27994
|
-
/* @__PURE__ */
|
|
28365
|
+
/* @__PURE__ */ jsx182(Box_default2, { children: /* @__PURE__ */ jsx182(
|
|
27995
28366
|
Tooltip_default,
|
|
27996
28367
|
{
|
|
27997
28368
|
title: t("MINIMIZABLE_WINDOW.MINIMIZE"),
|
|
27998
28369
|
zIndex: 999999,
|
|
27999
28370
|
placement: "top",
|
|
28000
|
-
children: /* @__PURE__ */
|
|
28371
|
+
children: /* @__PURE__ */ jsx182(
|
|
28001
28372
|
IconButton_default,
|
|
28002
28373
|
{
|
|
28003
28374
|
size: iconSizes4,
|
|
@@ -28013,13 +28384,13 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
28013
28384
|
)
|
|
28014
28385
|
}
|
|
28015
28386
|
) }),
|
|
28016
|
-
closeable && /* @__PURE__ */
|
|
28387
|
+
closeable && /* @__PURE__ */ jsx182(Box_default2, { sx: { padding: "0 8px" }, children: /* @__PURE__ */ jsx182(
|
|
28017
28388
|
Tooltip_default,
|
|
28018
28389
|
{
|
|
28019
28390
|
title: t("MINIMIZABLE_WINDOW.CLOSE"),
|
|
28020
28391
|
zIndex: 999999,
|
|
28021
28392
|
placement: "top",
|
|
28022
|
-
children: /* @__PURE__ */
|
|
28393
|
+
children: /* @__PURE__ */ jsx182(
|
|
28023
28394
|
IconButton_default,
|
|
28024
28395
|
{
|
|
28025
28396
|
size: iconSizes4,
|
|
@@ -28036,7 +28407,7 @@ var MinimizableWindow = React93.forwardRef(function MinimizableWindow2({
|
|
|
28036
28407
|
]
|
|
28037
28408
|
}
|
|
28038
28409
|
),
|
|
28039
|
-
/* @__PURE__ */
|
|
28410
|
+
/* @__PURE__ */ jsx182(
|
|
28040
28411
|
Stack_default,
|
|
28041
28412
|
{
|
|
28042
28413
|
sx: {
|