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