@connectif/ui-components 8.1.1 → 9.0.1
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 +28 -0
- package/dist/components/icon/icons.d.ts +2 -0
- package/dist/components/input/Select.d.ts +11 -0
- package/dist/components/input/date-interval-picker/DateIntervalPicker.d.ts +8 -37
- package/dist/components/input/date-interval-picker/DateIntervalPickerButton.d.ts +7 -0
- package/dist/components/input/date-range-picker/DateRangePicker.d.ts +4 -2
- package/dist/components/input/date-range-picker/DateRangePickerButton.d.ts +10 -0
- package/dist/components/table/Table.d.ts +5 -3
- package/dist/index.js +170 -165
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +10 -13
- package/dist/components/input/date-interval-picker/DateIntervalPickerDefaultButton.d.ts +0 -9
- package/dist/components/input/date-interval-picker/DateIntervalPickerInputButton.d.ts +0 -10
package/dist/index.js
CHANGED
|
@@ -1560,6 +1560,7 @@ import {
|
|
|
1560
1560
|
mdiFileCloud,
|
|
1561
1561
|
mdiFileDelimited,
|
|
1562
1562
|
mdiFileDocument,
|
|
1563
|
+
mdiFileDocumentOutline,
|
|
1563
1564
|
mdiTextBox,
|
|
1564
1565
|
mdiFileExcel,
|
|
1565
1566
|
mdiFileExcelBox,
|
|
@@ -2637,7 +2638,8 @@ import {
|
|
|
2637
2638
|
mdiDatabaseExport,
|
|
2638
2639
|
mdiBrain,
|
|
2639
2640
|
mdiTools,
|
|
2640
|
-
mdiSitemapOutline
|
|
2641
|
+
mdiSitemapOutline,
|
|
2642
|
+
mdiViewWeekOutline
|
|
2641
2643
|
} from "@mdi/js";
|
|
2642
2644
|
var icons = {
|
|
2643
2645
|
"abx-testing": "M 18.00108644,11.0000004 L 18.00108644,8.00000044 L 22.00108644,12.0000004 L 18.00108644,16.0000004 L 18.00108644,13.0000004 L 13.57108644,13.0000004 C 13.1110864,12.2500004 12.5410864,11.5800004 11.8810864,11.0000004 L 18.00108644,11.0000004 Z M 12.0010864,22.0000004 L 16.00108644,18.0000004 L 13.0010864,18.0000004 C 13.1510864,14.3900004 10.4310864,11.3100004 6.8310864,11.0000004 C 6.2810864,9.44000044 4.5610864,8.62000044 3.0010864,9.17000044 C 1.4410864,9.72000044 0.6210864,11.4400004 1.1710864,13.0000004 C 1.7310864,14.5600004 3.4410864,15.3800004 5.0010864,14.8300004 C 5.8610864,14.5300004 6.5310864,13.8500004 6.8310864,13.0000004 C 10.8310864,13.4700004 11.0310864,17.4700004 11.0310864,17.9500004 L 8.0310864,17.9500004 L 12.0010864,22.0000004 Z M 11.4110864,10.6300004 C 12.4310864,9.30000044 13.0010864,7.67000044 13.0010864,6.00000044 L 16.00108644,6.00000044 L 12.0010864,2.00000044 L 8.0010864,6.00000044 L 11.0010864,6.00000044 C 10.9710864,7.34000044 10.5010864,8.63000044 9.6010864,9.64000044 C 10.2410864,9.89000044 10.8510864,10.22000044 11.4110864,10.6300004 Z",
|
|
@@ -3373,6 +3375,7 @@ var icons = {
|
|
|
3373
3375
|
"file-delimited": mdiFileDelimited,
|
|
3374
3376
|
"file-document": mdiFileDocument,
|
|
3375
3377
|
"file-document-box": mdiTextBox,
|
|
3378
|
+
"file-document-outline": mdiFileDocumentOutline,
|
|
3376
3379
|
"file-excel": mdiFileExcel,
|
|
3377
3380
|
"file-excel-box": mdiFileExcelBox,
|
|
3378
3381
|
"file-export": mdiFileExport,
|
|
@@ -4540,6 +4543,7 @@ var icons = {
|
|
|
4540
4543
|
"view-sequential": mdiViewSequential,
|
|
4541
4544
|
"view-stream": mdiViewStream,
|
|
4542
4545
|
"view-week": mdiViewWeek,
|
|
4546
|
+
"view-week-outline": mdiViewWeekOutline,
|
|
4543
4547
|
vimeo: "M22,7.42C21.91,9.37 20.55,12.04 17.92,15.44C15.2,19 12.9,20.75 11,20.75C9.85,20.75 8.86,19.67 8.05,17.5C7.5,15.54 7,13.56 6.44,11.58C5.84,9.42 5.2,8.34 4.5,8.34C4.36,8.34 3.84,8.66 2.94,9.29L2,8.07C3,7.2 3.96,6.33 4.92,5.46C6.24,4.32 7.23,3.72 7.88,3.66C9.44,3.5 10.4,4.58 10.76,6.86C11.15,9.33 11.42,10.86 11.57,11.46C12,13.5 12.5,14.5 13.05,14.5C13.47,14.5 14.1,13.86 14.94,12.53C15.78,11.21 16.23,10.2 16.29,9.5C16.41,8.36 15.96,7.79 14.94,7.79C14.46,7.79 13.97,7.9 13.46,8.12C14.44,4.89 16.32,3.32 19.09,3.41C21.15,3.47 22.12,4.81 22,7.42Z",
|
|
4544
4548
|
vine: "M19.89,11.95C19.43,12.06 19,12.1 18.57,12.1C16.3,12.1 14.55,10.5 14.55,7.76C14.55,6.41 15.08,5.7 15.82,5.7C16.5,5.7 17,6.33 17,7.61C17,8.34 16.79,9.14 16.65,9.61C16.65,9.61 17.35,10.83 19.26,10.46C19.67,9.56 19.89,8.39 19.89,7.36C19.89,4.6 18.5,3 15.91,3C13.26,3 11.71,5.04 11.71,7.72C11.71,10.38 12.95,12.67 15,13.71C14.14,15.43 13.04,16.95 11.9,18.1C9.82,15.59 7.94,12.24 7.17,5.7H4.11C5.53,16.59 9.74,20.05 10.86,20.72C11.5,21.1 12.03,21.08 12.61,20.75C13.5,20.24 16.23,17.5 17.74,14.34C18.37,14.33 19.13,14.26 19.89,14.09V11.95Z",
|
|
4545
4549
|
violin: mdiViolin,
|
|
@@ -5991,8 +5995,11 @@ function getContainerQuery(theme2, shorthand) {
|
|
|
5991
5995
|
const matches = shorthand.match(/^@([^/]+)?\/?(.+)?$/);
|
|
5992
5996
|
if (!matches) {
|
|
5993
5997
|
if (true) {
|
|
5994
|
-
throw
|
|
5995
|
-
|
|
5998
|
+
throw (
|
|
5999
|
+
/* minify-error */
|
|
6000
|
+
new Error(`MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
6001
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`)
|
|
6002
|
+
);
|
|
5996
6003
|
}
|
|
5997
6004
|
return null;
|
|
5998
6005
|
}
|
|
@@ -11813,7 +11820,7 @@ var ChipViewer = ({
|
|
|
11813
11820
|
return 0;
|
|
11814
11821
|
}
|
|
11815
11822
|
rootNodeRef.current.appendChild(clonedContainer);
|
|
11816
|
-
const parentWidth = rootNodeRef.current.
|
|
11823
|
+
const parentWidth = rootNodeRef.current.getBoundingClientRect().width;
|
|
11817
11824
|
rootNodeRef.current.removeChild(clonedContainer);
|
|
11818
11825
|
return parentWidth;
|
|
11819
11826
|
}, [getRenderGhostChipsContainer]);
|
|
@@ -11836,7 +11843,7 @@ var ChipViewer = ({
|
|
|
11836
11843
|
`+${chips.length - count}`,
|
|
11837
11844
|
true
|
|
11838
11845
|
);
|
|
11839
|
-
if (
|
|
11846
|
+
if (rowWidth - widthChip + plusNumberWidth >= maxWidth2) {
|
|
11840
11847
|
count--;
|
|
11841
11848
|
}
|
|
11842
11849
|
break;
|
|
@@ -11875,7 +11882,8 @@ var ChipViewer = ({
|
|
|
11875
11882
|
};
|
|
11876
11883
|
const calculateVisibleChips = React31.useCallback(() => {
|
|
11877
11884
|
const container = rootNodeRef.current;
|
|
11878
|
-
|
|
11885
|
+
const maxParentWidth = getMaxParentWidth();
|
|
11886
|
+
if (!container || areArraysEqual(lastDataCalculated.current?.chips ?? [], values2) && lastDataCalculated.current?.numberLines === numberLines && lastDataCalculated.current?.forceRecalculate === forceRecalculate && lastDataCalculated.current?.parentWidth === maxParentWidth) {
|
|
11879
11887
|
return;
|
|
11880
11888
|
}
|
|
11881
11889
|
if (numberLines === 0) {
|
|
@@ -11884,7 +11892,8 @@ var ChipViewer = ({
|
|
|
11884
11892
|
lastDataCalculated.current = {
|
|
11885
11893
|
chips: values2,
|
|
11886
11894
|
numberLines,
|
|
11887
|
-
forceRecalculate
|
|
11895
|
+
forceRecalculate,
|
|
11896
|
+
parentWidth: maxParentWidth
|
|
11888
11897
|
};
|
|
11889
11898
|
return;
|
|
11890
11899
|
}
|
|
@@ -11894,16 +11903,17 @@ var ChipViewer = ({
|
|
|
11894
11903
|
lastDataCalculated.current = {
|
|
11895
11904
|
chips: values2,
|
|
11896
11905
|
numberLines,
|
|
11897
|
-
forceRecalculate
|
|
11906
|
+
forceRecalculate,
|
|
11907
|
+
parentWidth: maxParentWidth
|
|
11898
11908
|
};
|
|
11899
11909
|
return;
|
|
11900
11910
|
}
|
|
11901
|
-
const maxParentWidth = getMaxParentWidth();
|
|
11902
11911
|
const visibleChipsCount = maxParentWidth && maxParentWidth > 0 ? getVisibleChipsCounter(values2, maxParentWidth) : values2.length;
|
|
11903
11912
|
lastDataCalculated.current = {
|
|
11904
11913
|
chips: values2,
|
|
11905
11914
|
numberLines,
|
|
11906
|
-
forceRecalculate
|
|
11915
|
+
forceRecalculate,
|
|
11916
|
+
parentWidth: maxParentWidth
|
|
11907
11917
|
};
|
|
11908
11918
|
if (visibleChipsCount < values2.length) {
|
|
11909
11919
|
setVisibleChips(values2.slice(0, visibleChipsCount));
|
|
@@ -11924,7 +11934,7 @@ var ChipViewer = ({
|
|
|
11924
11934
|
calculateVisibleChips();
|
|
11925
11935
|
}, [calculateVisibleChips, values2, numberLines]);
|
|
11926
11936
|
React31.useEffect(() => {
|
|
11927
|
-
const container =
|
|
11937
|
+
const container = rootNodeRef.current;
|
|
11928
11938
|
if (!container) {
|
|
11929
11939
|
return;
|
|
11930
11940
|
}
|
|
@@ -19760,7 +19770,7 @@ var DebouncedTextField = React53.forwardRef(function DebouncedTextField2({ value
|
|
|
19760
19770
|
var DebouncedTextField_default = DebouncedTextField;
|
|
19761
19771
|
|
|
19762
19772
|
// src/components/input/date-interval-picker/DateIntervalPicker.tsx
|
|
19763
|
-
import * as
|
|
19773
|
+
import * as React60 from "react";
|
|
19764
19774
|
|
|
19765
19775
|
// src/components/input/date-interval-picker/DateIntervalPickerPopover.tsx
|
|
19766
19776
|
import * as React59 from "react";
|
|
@@ -21288,12 +21298,12 @@ var DateIntervalPickerPopover = ({
|
|
|
21288
21298
|
var DateIntervalPickerPopover_default = DateIntervalPickerPopover;
|
|
21289
21299
|
|
|
21290
21300
|
// src/components/input/date-interval-picker/DateIntervalPicker.tsx
|
|
21291
|
-
import { tz as
|
|
21301
|
+
import { tz as tz6 } from "moment-timezone";
|
|
21292
21302
|
|
|
21293
|
-
// src/components/input/date-interval-picker/
|
|
21303
|
+
// src/components/input/date-interval-picker/DateIntervalPickerButton.tsx
|
|
21294
21304
|
import { ButtonBase } from "@mui/material";
|
|
21295
21305
|
import { jsx as jsx114, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
21296
|
-
var
|
|
21306
|
+
var DateIntervalPickerButton = ({
|
|
21297
21307
|
interval,
|
|
21298
21308
|
startDate,
|
|
21299
21309
|
endDate,
|
|
@@ -21409,17 +21419,100 @@ var DateIntervalPickerDefaultButton = ({
|
|
|
21409
21419
|
}
|
|
21410
21420
|
);
|
|
21411
21421
|
};
|
|
21412
|
-
var
|
|
21422
|
+
var DateIntervalPickerButton_default = DateIntervalPickerButton;
|
|
21423
|
+
|
|
21424
|
+
// src/components/input/date-interval-picker/DateIntervalPicker.tsx
|
|
21425
|
+
import { jsx as jsx115, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
21426
|
+
var DateIntervalPicker = ({
|
|
21427
|
+
color: color2,
|
|
21428
|
+
maxSelectableDays,
|
|
21429
|
+
disabled,
|
|
21430
|
+
minDate,
|
|
21431
|
+
maxDate,
|
|
21432
|
+
startDate,
|
|
21433
|
+
endDate,
|
|
21434
|
+
interval,
|
|
21435
|
+
allowCompare,
|
|
21436
|
+
showTime,
|
|
21437
|
+
allowedIntervals,
|
|
21438
|
+
comparisonInterval,
|
|
21439
|
+
comparisonStartDate,
|
|
21440
|
+
comparisonEndDate,
|
|
21441
|
+
comparisonColor,
|
|
21442
|
+
intersectionColor,
|
|
21443
|
+
onChange
|
|
21444
|
+
}) => {
|
|
21445
|
+
const { timezone } = React60.useContext(IntlContext);
|
|
21446
|
+
const [anchorEl, setAnchorEl] = React60.useState(
|
|
21447
|
+
null
|
|
21448
|
+
);
|
|
21449
|
+
const isSameDate = (date1, date2) => date1?.getTime() === date2?.getTime();
|
|
21450
|
+
const handlePopoverCancel = () => {
|
|
21451
|
+
setAnchorEl(null);
|
|
21452
|
+
};
|
|
21453
|
+
const handleComparisonChanges = (values2) => values2.comparisonInterval !== comparisonInterval || !isSameDate(values2.comparisonStartDate, comparisonStartDate) || !isSameDate(values2.comparisonEndDate, comparisonEndDate);
|
|
21454
|
+
const handleApply = (values2) => {
|
|
21455
|
+
if (onChange && (!isSameDate(values2.startDate, startDate) || !isSameDate(values2.endDate, endDate) || values2.interval !== interval || handleComparisonChanges(values2))) {
|
|
21456
|
+
onChange(values2);
|
|
21457
|
+
}
|
|
21458
|
+
setAnchorEl(null);
|
|
21459
|
+
};
|
|
21460
|
+
const internalMaxDate = maxDate ?? tz6(timezone).toDate();
|
|
21461
|
+
const internalMinDate = minDate ?? tz6(internalMaxDate, timezone).subtract(maxSelectableDays - 1, "days").toDate();
|
|
21462
|
+
const displayEndDate = getDisplayEndDate(endDate, timezone, !!showTime);
|
|
21463
|
+
const isEndDateVisible = !isSameDate(startDate, displayEndDate);
|
|
21464
|
+
return /* @__PURE__ */ jsxs54("div", { style: { display: "inline-flex" }, children: [
|
|
21465
|
+
/* @__PURE__ */ jsx115(
|
|
21466
|
+
DateIntervalPickerButton_default,
|
|
21467
|
+
{
|
|
21468
|
+
startDate,
|
|
21469
|
+
endDate: displayEndDate,
|
|
21470
|
+
interval,
|
|
21471
|
+
comparisonEndDate,
|
|
21472
|
+
comparisonStartDate,
|
|
21473
|
+
disabled,
|
|
21474
|
+
showTime,
|
|
21475
|
+
isEndDateVisible,
|
|
21476
|
+
onClick: setAnchorEl
|
|
21477
|
+
}
|
|
21478
|
+
),
|
|
21479
|
+
anchorEl !== null && /* @__PURE__ */ jsx115(
|
|
21480
|
+
DateIntervalPickerPopover_default,
|
|
21481
|
+
{
|
|
21482
|
+
anchorEl,
|
|
21483
|
+
startDate,
|
|
21484
|
+
endDate,
|
|
21485
|
+
color: color2 ?? primaryMain,
|
|
21486
|
+
maxSelectableDays,
|
|
21487
|
+
disabled,
|
|
21488
|
+
minDate: internalMinDate,
|
|
21489
|
+
maxDate: internalMaxDate,
|
|
21490
|
+
interval,
|
|
21491
|
+
comparisonColor: comparisonColor ?? yellow,
|
|
21492
|
+
intersectionColor: intersectionColor ?? oliveGreen,
|
|
21493
|
+
allowCompare,
|
|
21494
|
+
comparisonInterval,
|
|
21495
|
+
comparisonStartDate,
|
|
21496
|
+
comparisonEndDate,
|
|
21497
|
+
allowedIntervals,
|
|
21498
|
+
showTime,
|
|
21499
|
+
onCancel: handlePopoverCancel,
|
|
21500
|
+
onApply: handleApply
|
|
21501
|
+
}
|
|
21502
|
+
)
|
|
21503
|
+
] });
|
|
21504
|
+
};
|
|
21505
|
+
var DateIntervalPicker_default = DateIntervalPicker;
|
|
21413
21506
|
|
|
21414
21507
|
// src/components/input/date-range-picker/DateRangePicker.tsx
|
|
21415
|
-
import * as
|
|
21416
|
-
import { tz as
|
|
21508
|
+
import * as React63 from "react";
|
|
21509
|
+
import { tz as tz9 } from "moment-timezone";
|
|
21417
21510
|
|
|
21418
|
-
// src/components/input/date-
|
|
21419
|
-
import * as
|
|
21420
|
-
import { tz as
|
|
21421
|
-
import { jsx as
|
|
21422
|
-
var
|
|
21511
|
+
// src/components/input/date-range-picker/DateRangePickerButton.tsx
|
|
21512
|
+
import * as React61 from "react";
|
|
21513
|
+
import { tz as tz7 } from "moment-timezone";
|
|
21514
|
+
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
21515
|
+
var DateRangePickerButton = ({
|
|
21423
21516
|
startDate,
|
|
21424
21517
|
endDate,
|
|
21425
21518
|
disabled,
|
|
@@ -21428,20 +21521,21 @@ var DateIntervalPickerInputButton = ({
|
|
|
21428
21521
|
onClick
|
|
21429
21522
|
}) => {
|
|
21430
21523
|
const { t } = useTranslation();
|
|
21431
|
-
const inputRef =
|
|
21432
|
-
const { locale, timezone } =
|
|
21433
|
-
const [dateText, setDateText] =
|
|
21524
|
+
const inputRef = React61.useRef(null);
|
|
21525
|
+
const { locale, timezone } = React61.useContext(IntlContext);
|
|
21526
|
+
const [dateText, setDateText] = React61.useState("");
|
|
21434
21527
|
const dateInputFormat = getDateInputFormatForLocale(locale);
|
|
21435
|
-
const dateInputFormatPlaceholder =
|
|
21528
|
+
const dateInputFormatPlaceholder = React61.useMemo(() => {
|
|
21436
21529
|
const formatString = 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"));
|
|
21437
21530
|
return `${formatString} - ${formatString}`;
|
|
21438
21531
|
}, [dateInputFormat, t]);
|
|
21439
|
-
const getDateString =
|
|
21440
|
-
(date) => !isNaN(date.getTime()) ?
|
|
21532
|
+
const getDateString = React61.useCallback(
|
|
21533
|
+
(date) => !isNaN(date.getTime()) ? tz7(date, timezone).format(dateInputFormat) : "",
|
|
21441
21534
|
[dateInputFormat, timezone]
|
|
21442
21535
|
);
|
|
21443
|
-
|
|
21536
|
+
React61.useEffect(() => {
|
|
21444
21537
|
if (!startDate || !endDate) {
|
|
21538
|
+
setDateText("");
|
|
21445
21539
|
return;
|
|
21446
21540
|
}
|
|
21447
21541
|
const startDateText = getDateString(startDate);
|
|
@@ -21455,13 +21549,13 @@ var DateIntervalPickerInputButton = ({
|
|
|
21455
21549
|
onClick(inputRef.current);
|
|
21456
21550
|
}
|
|
21457
21551
|
};
|
|
21458
|
-
return /* @__PURE__ */
|
|
21552
|
+
return /* @__PURE__ */ jsx116(
|
|
21459
21553
|
Box_default2,
|
|
21460
21554
|
{
|
|
21461
21555
|
onClick: handleButtonClick,
|
|
21462
21556
|
sx: { cursor: "pointer" },
|
|
21463
|
-
"data-testid": "date-
|
|
21464
|
-
children: /* @__PURE__ */
|
|
21557
|
+
"data-testid": "date-range-picker-button",
|
|
21558
|
+
children: /* @__PURE__ */ jsx116(
|
|
21465
21559
|
TextField_default,
|
|
21466
21560
|
{
|
|
21467
21561
|
ref: inputRef,
|
|
@@ -21469,7 +21563,7 @@ var DateIntervalPickerInputButton = ({
|
|
|
21469
21563
|
inputSx: {
|
|
21470
21564
|
minWidth: "166px"
|
|
21471
21565
|
},
|
|
21472
|
-
endAdornment: /* @__PURE__ */
|
|
21566
|
+
endAdornment: /* @__PURE__ */ jsx116(
|
|
21473
21567
|
Icon_default,
|
|
21474
21568
|
{
|
|
21475
21569
|
id: isPopoverOpen ? "chevron-up" : "chevron-down",
|
|
@@ -21485,12 +21579,12 @@ var DateIntervalPickerInputButton = ({
|
|
|
21485
21579
|
}
|
|
21486
21580
|
);
|
|
21487
21581
|
};
|
|
21488
|
-
var
|
|
21582
|
+
var DateRangePickerButton_default = DateRangePickerButton;
|
|
21489
21583
|
|
|
21490
21584
|
// src/components/input/date-range-picker/DateRangePickerPopover.tsx
|
|
21491
|
-
import * as
|
|
21492
|
-
import { tz as
|
|
21493
|
-
import { jsx as
|
|
21585
|
+
import * as React62 from "react";
|
|
21586
|
+
import { tz as tz8 } from "moment-timezone";
|
|
21587
|
+
import { jsx as jsx117, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
21494
21588
|
var CALENDAR_COLUMN_WIDTH2 = 250;
|
|
21495
21589
|
var DateRangePickerPopover = ({
|
|
21496
21590
|
startDate,
|
|
@@ -21503,10 +21597,10 @@ var DateRangePickerPopover = ({
|
|
|
21503
21597
|
onApply,
|
|
21504
21598
|
onCancel
|
|
21505
21599
|
}) => {
|
|
21506
|
-
const { locale, timezone } =
|
|
21600
|
+
const { locale, timezone } = React62.useContext(IntlContext);
|
|
21507
21601
|
const dateInputFormat = getDateInputFormatForLocale(locale);
|
|
21508
21602
|
const { t } = useTranslation();
|
|
21509
|
-
const dateInputFormatter = (date) =>
|
|
21603
|
+
const dateInputFormatter = (date) => tz8(date, timezone).format(dateInputFormat);
|
|
21510
21604
|
const initialState = {
|
|
21511
21605
|
interval: "custom",
|
|
21512
21606
|
highlightedInput: "startDate",
|
|
@@ -21526,7 +21620,7 @@ var DateRangePickerPopover = ({
|
|
|
21526
21620
|
comparisonEndSimpleDate: null,
|
|
21527
21621
|
isComparing: false
|
|
21528
21622
|
};
|
|
21529
|
-
const [state, setState] =
|
|
21623
|
+
const [state, setState] = React62.useState(initialState);
|
|
21530
21624
|
const handleApply = () => {
|
|
21531
21625
|
const safeParseDate = (dateString, simpleDate) => {
|
|
21532
21626
|
if (!dateString || !simpleDate) {
|
|
@@ -21536,7 +21630,7 @@ var DateRangePickerPopover = ({
|
|
|
21536
21630
|
Date.UTC(simpleDate.year, simpleDate.month, simpleDate.day)
|
|
21537
21631
|
);
|
|
21538
21632
|
if (isNaN(parsed.getTime()) || parsed < minDate || parsed > maxDate) {
|
|
21539
|
-
return
|
|
21633
|
+
return tz8(
|
|
21540
21634
|
{
|
|
21541
21635
|
year: simpleDate.year,
|
|
21542
21636
|
month: simpleDate.month,
|
|
@@ -21557,8 +21651,8 @@ var DateRangePickerPopover = ({
|
|
|
21557
21651
|
setState(initialState);
|
|
21558
21652
|
};
|
|
21559
21653
|
const isApplyButtonDisabled = () => !state.startSimpleDate || !state.endSimpleDate;
|
|
21560
|
-
return /* @__PURE__ */
|
|
21561
|
-
/* @__PURE__ */
|
|
21654
|
+
return /* @__PURE__ */ jsxs55(Popover_default, { onClose: handleCancel, anchorEl, children: [
|
|
21655
|
+
/* @__PURE__ */ jsx117(
|
|
21562
21656
|
Box_default2,
|
|
21563
21657
|
{
|
|
21564
21658
|
sx: {
|
|
@@ -21573,7 +21667,7 @@ var DateRangePickerPopover = ({
|
|
|
21573
21667
|
minHeight: "300px",
|
|
21574
21668
|
maxHeight: "580px"
|
|
21575
21669
|
},
|
|
21576
|
-
children: /* @__PURE__ */
|
|
21670
|
+
children: /* @__PURE__ */ jsx117(
|
|
21577
21671
|
DateIntervalRangeSelector_default,
|
|
21578
21672
|
{
|
|
21579
21673
|
state,
|
|
@@ -21590,11 +21684,11 @@ var DateRangePickerPopover = ({
|
|
|
21590
21684
|
)
|
|
21591
21685
|
}
|
|
21592
21686
|
),
|
|
21593
|
-
/* @__PURE__ */
|
|
21687
|
+
/* @__PURE__ */ jsx117(
|
|
21594
21688
|
PopoverActions_default,
|
|
21595
21689
|
{
|
|
21596
21690
|
sx: { padding: "16px 24px" },
|
|
21597
|
-
leftContent: /* @__PURE__ */
|
|
21691
|
+
leftContent: /* @__PURE__ */ jsx117(
|
|
21598
21692
|
Button_default,
|
|
21599
21693
|
{
|
|
21600
21694
|
"data-testid": "date-interval-picker-cancel-button",
|
|
@@ -21604,7 +21698,7 @@ var DateRangePickerPopover = ({
|
|
|
21604
21698
|
text: t("DATE_INTERVAL_PICKER.CANCEL")
|
|
21605
21699
|
}
|
|
21606
21700
|
),
|
|
21607
|
-
rightContent: /* @__PURE__ */
|
|
21701
|
+
rightContent: /* @__PURE__ */ jsx117(
|
|
21608
21702
|
Button_default,
|
|
21609
21703
|
{
|
|
21610
21704
|
"data-testid": "date-interval-picker-apply-button",
|
|
@@ -21621,7 +21715,7 @@ var DateRangePickerPopover = ({
|
|
|
21621
21715
|
var DateRangePickerPopover_default = DateRangePickerPopover;
|
|
21622
21716
|
|
|
21623
21717
|
// src/components/input/date-range-picker/DateRangePicker.tsx
|
|
21624
|
-
import { jsx as
|
|
21718
|
+
import { jsx as jsx118, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
21625
21719
|
var DEFAULT_MIN_DATE = { year: 1900, month: 0, date: 1 };
|
|
21626
21720
|
var DEFAULT_MAX_DATE = { year: 2100, month: 11, date: 31 };
|
|
21627
21721
|
var DateRangePicker = ({
|
|
@@ -21634,8 +21728,8 @@ var DateRangePicker = ({
|
|
|
21634
21728
|
minDate,
|
|
21635
21729
|
maxDate
|
|
21636
21730
|
}) => {
|
|
21637
|
-
const { timezone } =
|
|
21638
|
-
const [anchorEl, setAnchorEl] =
|
|
21731
|
+
const { timezone } = React63.useContext(IntlContext);
|
|
21732
|
+
const [anchorEl, setAnchorEl] = React63.useState(
|
|
21639
21733
|
null
|
|
21640
21734
|
);
|
|
21641
21735
|
const isSameDate = (date1, date2) => date1?.getTime() === date2?.getTime();
|
|
@@ -21648,12 +21742,12 @@ var DateRangePicker = ({
|
|
|
21648
21742
|
}
|
|
21649
21743
|
setAnchorEl(null);
|
|
21650
21744
|
};
|
|
21651
|
-
const internalMaxDate = maxDate ??
|
|
21652
|
-
const internalMinDate = minDate ??
|
|
21745
|
+
const internalMaxDate = maxDate ?? tz9(DEFAULT_MAX_DATE, timezone).toDate();
|
|
21746
|
+
const internalMinDate = minDate ?? tz9(DEFAULT_MIN_DATE, timezone).toDate();
|
|
21653
21747
|
const isEndDateVisible = endDate !== void 0 && !isSameDate(startDate, endDate);
|
|
21654
|
-
return /* @__PURE__ */
|
|
21655
|
-
/* @__PURE__ */
|
|
21656
|
-
|
|
21748
|
+
return /* @__PURE__ */ jsxs56("div", { style: { display: "inline-flex" }, children: [
|
|
21749
|
+
/* @__PURE__ */ jsx118(
|
|
21750
|
+
DateRangePickerButton_default,
|
|
21657
21751
|
{
|
|
21658
21752
|
isPopoverOpen: anchorEl !== null,
|
|
21659
21753
|
startDate,
|
|
@@ -21663,7 +21757,7 @@ var DateRangePicker = ({
|
|
|
21663
21757
|
onClick: setAnchorEl
|
|
21664
21758
|
}
|
|
21665
21759
|
),
|
|
21666
|
-
anchorEl !== null && /* @__PURE__ */
|
|
21760
|
+
anchorEl !== null && /* @__PURE__ */ jsx118(
|
|
21667
21761
|
DateRangePickerPopover_default,
|
|
21668
21762
|
{
|
|
21669
21763
|
anchorEl,
|
|
@@ -21681,97 +21775,6 @@ var DateRangePicker = ({
|
|
|
21681
21775
|
};
|
|
21682
21776
|
var DateRangePicker_default = DateRangePicker;
|
|
21683
21777
|
|
|
21684
|
-
// src/components/input/date-interval-picker/DateIntervalPicker.tsx
|
|
21685
|
-
import { jsx as jsx118, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
21686
|
-
var DateIntervalPicker = ({
|
|
21687
|
-
color: color2,
|
|
21688
|
-
maxSelectableDays,
|
|
21689
|
-
disabled,
|
|
21690
|
-
minDate,
|
|
21691
|
-
maxDate,
|
|
21692
|
-
...rest
|
|
21693
|
-
}) => {
|
|
21694
|
-
const { timezone } = React63.useContext(IntlContext);
|
|
21695
|
-
const [anchorEl, setAnchorEl] = React63.useState(
|
|
21696
|
-
null
|
|
21697
|
-
);
|
|
21698
|
-
if (rest.variant === "input") {
|
|
21699
|
-
return /* @__PURE__ */ jsx118(
|
|
21700
|
-
DateRangePicker_default,
|
|
21701
|
-
{
|
|
21702
|
-
startDate: rest.startDate,
|
|
21703
|
-
endDate: rest.endDate,
|
|
21704
|
-
onChange: rest.onChange,
|
|
21705
|
-
color: color2,
|
|
21706
|
-
maxSelectableDays,
|
|
21707
|
-
disabled,
|
|
21708
|
-
minDate,
|
|
21709
|
-
maxDate
|
|
21710
|
-
}
|
|
21711
|
-
);
|
|
21712
|
-
}
|
|
21713
|
-
const isSameDate = (date1, date2) => date1?.getTime() === date2?.getTime();
|
|
21714
|
-
const handlePopoverCancel = () => {
|
|
21715
|
-
setAnchorEl(null);
|
|
21716
|
-
};
|
|
21717
|
-
const handleComparisonChanges = (values2) => values2.comparisonInterval !== rest.comparisonInterval || !isSameDate(values2.comparisonStartDate, rest.comparisonStartDate) || !isSameDate(values2.comparisonEndDate, rest.comparisonEndDate);
|
|
21718
|
-
const handleApply = (values2) => {
|
|
21719
|
-
if (rest.onChange && (!isSameDate(values2.startDate, rest.startDate) || !isSameDate(values2.endDate, rest.endDate) || values2.interval !== rest.interval || handleComparisonChanges(values2))) {
|
|
21720
|
-
rest.onChange(values2);
|
|
21721
|
-
}
|
|
21722
|
-
setAnchorEl(null);
|
|
21723
|
-
};
|
|
21724
|
-
const internalMaxDate = maxDate ?? tz9(timezone).toDate();
|
|
21725
|
-
const internalMinDate = minDate ?? tz9(internalMaxDate, timezone).subtract(maxSelectableDays - 1, "days").toDate();
|
|
21726
|
-
const displayEndDate = getDisplayEndDate(
|
|
21727
|
-
rest.endDate,
|
|
21728
|
-
timezone,
|
|
21729
|
-
!!rest.showTime
|
|
21730
|
-
);
|
|
21731
|
-
const isEndDateVisible = !isSameDate(rest.startDate, displayEndDate);
|
|
21732
|
-
return /* @__PURE__ */ jsxs56("div", { style: { display: "inline-flex" }, children: [
|
|
21733
|
-
/* @__PURE__ */ jsx118(
|
|
21734
|
-
DateIntervalPickerDefaultButton_default,
|
|
21735
|
-
{
|
|
21736
|
-
startDate: rest.startDate,
|
|
21737
|
-
endDate: displayEndDate,
|
|
21738
|
-
interval: rest.interval,
|
|
21739
|
-
comparisonEndDate: rest.comparisonEndDate,
|
|
21740
|
-
comparisonStartDate: rest.comparisonStartDate,
|
|
21741
|
-
disabled,
|
|
21742
|
-
showTime: rest.showTime,
|
|
21743
|
-
isEndDateVisible,
|
|
21744
|
-
onClick: setAnchorEl
|
|
21745
|
-
}
|
|
21746
|
-
),
|
|
21747
|
-
anchorEl !== null && /* @__PURE__ */ jsx118(
|
|
21748
|
-
DateIntervalPickerPopover_default,
|
|
21749
|
-
{
|
|
21750
|
-
anchorEl,
|
|
21751
|
-
startDate: rest.startDate,
|
|
21752
|
-
endDate: rest.endDate,
|
|
21753
|
-
color: color2 ?? primaryMain,
|
|
21754
|
-
maxSelectableDays,
|
|
21755
|
-
disabled,
|
|
21756
|
-
minDate: internalMinDate,
|
|
21757
|
-
maxDate: internalMaxDate,
|
|
21758
|
-
interval: rest.interval,
|
|
21759
|
-
comparisonColor: rest.comparisonColor ?? yellow,
|
|
21760
|
-
intersectionColor: rest.intersectionColor ?? oliveGreen,
|
|
21761
|
-
allowCompare: rest.allowCompare,
|
|
21762
|
-
comparisonInterval: rest.comparisonInterval,
|
|
21763
|
-
comparisonStartDate: rest.comparisonStartDate,
|
|
21764
|
-
comparisonEndDate: rest.comparisonEndDate,
|
|
21765
|
-
allowedIntervals: rest.allowedIntervals,
|
|
21766
|
-
showTime: rest.showTime,
|
|
21767
|
-
onCancel: handlePopoverCancel,
|
|
21768
|
-
onApply: handleApply
|
|
21769
|
-
}
|
|
21770
|
-
)
|
|
21771
|
-
] });
|
|
21772
|
-
};
|
|
21773
|
-
var DateIntervalPicker_default = DateIntervalPicker;
|
|
21774
|
-
|
|
21775
21778
|
// src/components/input/SelectPopoverItem.tsx
|
|
21776
21779
|
import { Grid as Grid2, Stack as Stack9 } from "@mui/material";
|
|
21777
21780
|
import { lighten as lighten3 } from "@mui/material";
|
|
@@ -22050,6 +22053,8 @@ var Select = function Select2({
|
|
|
22050
22053
|
menuZIndex,
|
|
22051
22054
|
menuColors,
|
|
22052
22055
|
menuMaxHeight,
|
|
22056
|
+
minMenuWidth = 200,
|
|
22057
|
+
maxMenuWidth = 400,
|
|
22053
22058
|
"data-testid": dataTestId,
|
|
22054
22059
|
open,
|
|
22055
22060
|
onOpen,
|
|
@@ -22062,9 +22067,6 @@ var Select = function Select2({
|
|
|
22062
22067
|
const paperRef = React64.useRef(null);
|
|
22063
22068
|
const selectRef = React64.useRef(null);
|
|
22064
22069
|
const [measuredPaperHeight, setMeasuredPaperHeight] = React64.useState(void 0);
|
|
22065
|
-
const [selectWidth, setSelectWidth] = React64.useState(
|
|
22066
|
-
void 0
|
|
22067
|
-
);
|
|
22068
22070
|
const [highlightedIndex, setHighlightedIndex] = React64.useState(-1);
|
|
22069
22071
|
const currentValue = React64.useMemo(
|
|
22070
22072
|
() => value ?? (multiple ? [] : ""),
|
|
@@ -22120,7 +22122,7 @@ var Select = function Select2({
|
|
|
22120
22122
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
22121
22123
|
}, [isOpen, virtualized, highlightedIndex, options, onChange, onClose]);
|
|
22122
22124
|
const defaultVirtualizedProps = {
|
|
22123
|
-
width:
|
|
22125
|
+
width: minMenuWidth,
|
|
22124
22126
|
overscanCount: 3,
|
|
22125
22127
|
itemSize: 44
|
|
22126
22128
|
};
|
|
@@ -22215,7 +22217,6 @@ var Select = function Select2({
|
|
|
22215
22217
|
IconComponent: () => /* @__PURE__ */ jsx120(ChevronIcon, { disabled: rest.disabled, isOpen }),
|
|
22216
22218
|
input: /* @__PURE__ */ jsx120(BootstrapInput, { ref: selectRef, placeholder }),
|
|
22217
22219
|
onOpen: () => {
|
|
22218
|
-
setSelectWidth(selectRef.current?.clientWidth);
|
|
22219
22220
|
setOpen(true);
|
|
22220
22221
|
onOpen && onOpen();
|
|
22221
22222
|
},
|
|
@@ -22253,7 +22254,8 @@ var Select = function Select2({
|
|
|
22253
22254
|
border: `1px solid ${menuColors.borderColor}`
|
|
22254
22255
|
},
|
|
22255
22256
|
maxHeight: menuMaxHeight,
|
|
22256
|
-
|
|
22257
|
+
minWidth: minMenuWidth,
|
|
22258
|
+
maxWidth: maxMenuWidth
|
|
22257
22259
|
},
|
|
22258
22260
|
className: paperClassName
|
|
22259
22261
|
},
|
|
@@ -22271,7 +22273,7 @@ var Select = function Select2({
|
|
|
22271
22273
|
style: {
|
|
22272
22274
|
maxHeight: measuredPaperHeight ? measuredPaperHeight - 16 : menuMaxHeight ? `calc(${menuMaxHeight} - 16px)` : "90vh",
|
|
22273
22275
|
height: options.length * itemSize,
|
|
22274
|
-
maxWidth:
|
|
22276
|
+
maxWidth: maxMenuWidth,
|
|
22275
22277
|
flex: "1 1 auto"
|
|
22276
22278
|
}
|
|
22277
22279
|
}
|
|
@@ -22339,7 +22341,6 @@ var Select = function Select2({
|
|
|
22339
22341
|
open,
|
|
22340
22342
|
input: /* @__PURE__ */ jsx120(BootstrapInput, { ref: selectRef, placeholder }),
|
|
22341
22343
|
onOpen: () => {
|
|
22342
|
-
setSelectWidth(selectRef.current?.clientWidth);
|
|
22343
22344
|
setOpen(true);
|
|
22344
22345
|
onOpen && onOpen();
|
|
22345
22346
|
},
|
|
@@ -22383,7 +22384,8 @@ var Select = function Select2({
|
|
|
22383
22384
|
border: `1px solid ${menuColors.borderColor}`
|
|
22384
22385
|
},
|
|
22385
22386
|
maxHeight: menuMaxHeight,
|
|
22386
|
-
|
|
22387
|
+
minWidth: minMenuWidth,
|
|
22388
|
+
maxWidth: maxMenuWidth
|
|
22387
22389
|
},
|
|
22388
22390
|
className: `${paperClassName} Slim-Vertical-Scroll`
|
|
22389
22391
|
}
|
|
@@ -26417,11 +26419,14 @@ var PageSelector = ({
|
|
|
26417
26419
|
const handleNext = React86.useCallback(() => {
|
|
26418
26420
|
onPageChange(Math.min(totalPages, currentPage + 1));
|
|
26419
26421
|
}, [currentPage, onPageChange, totalPages]);
|
|
26420
|
-
const displayText = hideText ? "" : text || t(
|
|
26421
|
-
|
|
26422
|
-
|
|
26423
|
-
|
|
26424
|
-
|
|
26422
|
+
const displayText = hideText ? "" : text || t(
|
|
26423
|
+
"PAGE_SELECTOR.SHOWING_ITEMS",
|
|
26424
|
+
totalItems === 0 ? { from: 0, to: 0, total: 0 } : {
|
|
26425
|
+
from: pageSize * (currentPage - 1) + 1,
|
|
26426
|
+
to: Math.min(pageSize * currentPage, totalItems),
|
|
26427
|
+
total: totalItems
|
|
26428
|
+
}
|
|
26429
|
+
);
|
|
26425
26430
|
return /* @__PURE__ */ jsxs76(
|
|
26426
26431
|
Stack_default,
|
|
26427
26432
|
{
|
|
@@ -28472,7 +28477,7 @@ import {
|
|
|
28472
28477
|
Table as MuiTable
|
|
28473
28478
|
} from "@mui/material";
|
|
28474
28479
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
28475
|
-
var Table = ({ children, sx, className }) => /* @__PURE__ */ jsx172(TableContainer, { className: "Slim-Horizontal-Scroll", children: /* @__PURE__ */ jsx172(MuiTable, { sx: { backgroundColor: white, ...sx }, className, children }) });
|
|
28480
|
+
var Table = ({ children, sx, className, containerSx }) => /* @__PURE__ */ jsx172(TableContainer, { className: "Slim-Horizontal-Scroll", sx: containerSx, children: /* @__PURE__ */ jsx172(MuiTable, { sx: { backgroundColor: white, ...sx }, className, children }) });
|
|
28476
28481
|
var Table_default = Table;
|
|
28477
28482
|
|
|
28478
28483
|
// src/components/table/TableBody.tsx
|
|
@@ -29542,7 +29547,7 @@ react-is/cjs/react-is.development.js:
|
|
|
29542
29547
|
|
|
29543
29548
|
@mui/styled-engine/esm/index.js:
|
|
29544
29549
|
(**
|
|
29545
|
-
* @mui/styled-engine v7.3.
|
|
29550
|
+
* @mui/styled-engine v7.3.10
|
|
29546
29551
|
*
|
|
29547
29552
|
* @license MIT
|
|
29548
29553
|
* This source code is licensed under the MIT license found in the
|
|
@@ -29551,7 +29556,7 @@ react-is/cjs/react-is.development.js:
|
|
|
29551
29556
|
|
|
29552
29557
|
@mui/system/esm/index.js:
|
|
29553
29558
|
(**
|
|
29554
|
-
* @mui/system v7.3.
|
|
29559
|
+
* @mui/system v7.3.11
|
|
29555
29560
|
*
|
|
29556
29561
|
* @license MIT
|
|
29557
29562
|
* This source code is licensed under the MIT license found in the
|