@connectif/ui-components 8.1.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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,
@@ -3373,6 +3374,7 @@ var icons = {
3373
3374
  "file-delimited": mdiFileDelimited,
3374
3375
  "file-document": mdiFileDocument,
3375
3376
  "file-document-box": mdiTextBox,
3377
+ "file-document-outline": mdiFileDocumentOutline,
3376
3378
  "file-excel": mdiFileExcel,
3377
3379
  "file-excel-box": mdiFileExcelBox,
3378
3380
  "file-export": mdiFileExport,
@@ -5991,8 +5993,11 @@ function getContainerQuery(theme2, shorthand) {
5991
5993
  const matches = shorthand.match(/^@([^/]+)?\/?(.+)?$/);
5992
5994
  if (!matches) {
5993
5995
  if (true) {
5994
- throw new Error(true ? `MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
5995
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.` : formatMuiErrorMessage(18, `(${shorthand})`));
5996
+ throw (
5997
+ /* minify-error */
5998
+ new Error(`MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
5999
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`)
6000
+ );
5996
6001
  }
5997
6002
  return null;
5998
6003
  }
@@ -11813,7 +11818,7 @@ var ChipViewer = ({
11813
11818
  return 0;
11814
11819
  }
11815
11820
  rootNodeRef.current.appendChild(clonedContainer);
11816
- const parentWidth = rootNodeRef.current.parentElement ? rootNodeRef.current.parentElement.getBoundingClientRect().width : 0;
11821
+ const parentWidth = rootNodeRef.current.getBoundingClientRect().width;
11817
11822
  rootNodeRef.current.removeChild(clonedContainer);
11818
11823
  return parentWidth;
11819
11824
  }, [getRenderGhostChipsContainer]);
@@ -11836,7 +11841,7 @@ var ChipViewer = ({
11836
11841
  `+${chips.length - count}`,
11837
11842
  true
11838
11843
  );
11839
- if (Math.ceil(rowWidth - widthChip + plusNumberWidth) >= maxWidth2) {
11844
+ if (rowWidth - widthChip + plusNumberWidth >= maxWidth2) {
11840
11845
  count--;
11841
11846
  }
11842
11847
  break;
@@ -11875,7 +11880,8 @@ var ChipViewer = ({
11875
11880
  };
11876
11881
  const calculateVisibleChips = React31.useCallback(() => {
11877
11882
  const container = rootNodeRef.current;
11878
- if (!container || areArraysEqual(lastDataCalculated.current?.chips ?? [], values2) && lastDataCalculated.current?.numberLines === numberLines && lastDataCalculated.current?.forceRecalculate === forceRecalculate) {
11883
+ const maxParentWidth = getMaxParentWidth();
11884
+ if (!container || areArraysEqual(lastDataCalculated.current?.chips ?? [], values2) && lastDataCalculated.current?.numberLines === numberLines && lastDataCalculated.current?.forceRecalculate === forceRecalculate && lastDataCalculated.current?.parentWidth === maxParentWidth) {
11879
11885
  return;
11880
11886
  }
11881
11887
  if (numberLines === 0) {
@@ -11884,7 +11890,8 @@ var ChipViewer = ({
11884
11890
  lastDataCalculated.current = {
11885
11891
  chips: values2,
11886
11892
  numberLines,
11887
- forceRecalculate
11893
+ forceRecalculate,
11894
+ parentWidth: maxParentWidth
11888
11895
  };
11889
11896
  return;
11890
11897
  }
@@ -11894,16 +11901,17 @@ var ChipViewer = ({
11894
11901
  lastDataCalculated.current = {
11895
11902
  chips: values2,
11896
11903
  numberLines,
11897
- forceRecalculate
11904
+ forceRecalculate,
11905
+ parentWidth: maxParentWidth
11898
11906
  };
11899
11907
  return;
11900
11908
  }
11901
- const maxParentWidth = getMaxParentWidth();
11902
11909
  const visibleChipsCount = maxParentWidth && maxParentWidth > 0 ? getVisibleChipsCounter(values2, maxParentWidth) : values2.length;
11903
11910
  lastDataCalculated.current = {
11904
11911
  chips: values2,
11905
11912
  numberLines,
11906
- forceRecalculate
11913
+ forceRecalculate,
11914
+ parentWidth: maxParentWidth
11907
11915
  };
11908
11916
  if (visibleChipsCount < values2.length) {
11909
11917
  setVisibleChips(values2.slice(0, visibleChipsCount));
@@ -11924,7 +11932,7 @@ var ChipViewer = ({
11924
11932
  calculateVisibleChips();
11925
11933
  }, [calculateVisibleChips, values2, numberLines]);
11926
11934
  React31.useEffect(() => {
11927
- const container = containerRef.current;
11935
+ const container = rootNodeRef.current;
11928
11936
  if (!container) {
11929
11937
  return;
11930
11938
  }
@@ -15537,7 +15545,7 @@ var DATE_INTERVAL_PICKER3 = {
15537
15545
  START_HOUR: "Heure de d\xE9but"
15538
15546
  };
15539
15547
  var PAGE_SELECTOR3 = {
15540
- SHOWING_ITEMS: "Affichage <b>{from}-{to}</b> de {total}"
15548
+ SHOWING_ITEMS: "Montrer <b>{from}-{to}</b> de {total}"
15541
15549
  };
15542
15550
  var SELECT_POPOVER3 = {
15543
15551
  APPLY: "Appliquer",
@@ -15828,7 +15836,7 @@ var DATE_INTERVAL_PICKER4 = {
15828
15836
  START_HOUR: "Ora di inizio"
15829
15837
  };
15830
15838
  var PAGE_SELECTOR4 = {
15831
- SHOWING_ITEMS: "Visualizzazione <b>{from}-{to}</b> di {total}"
15839
+ SHOWING_ITEMS: "Mostra <b>{from}-{to}</b> di {total}"
15832
15840
  };
15833
15841
  var SELECT_POPOVER4 = {
15834
15842
  APPLY: "Applica",
@@ -16104,7 +16112,7 @@ var DATE_INTERVAL_PICKER5 = {
16104
16112
  START_HOUR: "Hora de in\xEDcio"
16105
16113
  };
16106
16114
  var PAGE_SELECTOR5 = {
16107
- SHOWING_ITEMS: "Mostrando <b>{from}-{to}</b> de {total}"
16115
+ SHOWING_ITEMS: "Exibindo <b>{from}-{to}</b> de {total}"
16108
16116
  };
16109
16117
  var SELECT_POPOVER5 = {
16110
16118
  APPLY: "Aplicar",
@@ -19760,7 +19768,7 @@ var DebouncedTextField = React53.forwardRef(function DebouncedTextField2({ value
19760
19768
  var DebouncedTextField_default = DebouncedTextField;
19761
19769
 
19762
19770
  // src/components/input/date-interval-picker/DateIntervalPicker.tsx
19763
- import * as React63 from "react";
19771
+ import * as React60 from "react";
19764
19772
 
19765
19773
  // src/components/input/date-interval-picker/DateIntervalPickerPopover.tsx
19766
19774
  import * as React59 from "react";
@@ -21288,12 +21296,12 @@ var DateIntervalPickerPopover = ({
21288
21296
  var DateIntervalPickerPopover_default = DateIntervalPickerPopover;
21289
21297
 
21290
21298
  // src/components/input/date-interval-picker/DateIntervalPicker.tsx
21291
- import { tz as tz9 } from "moment-timezone";
21299
+ import { tz as tz6 } from "moment-timezone";
21292
21300
 
21293
- // src/components/input/date-interval-picker/DateIntervalPickerDefaultButton.tsx
21301
+ // src/components/input/date-interval-picker/DateIntervalPickerButton.tsx
21294
21302
  import { ButtonBase } from "@mui/material";
21295
21303
  import { jsx as jsx114, jsxs as jsxs53 } from "react/jsx-runtime";
21296
- var DateIntervalPickerDefaultButton = ({
21304
+ var DateIntervalPickerButton = ({
21297
21305
  interval,
21298
21306
  startDate,
21299
21307
  endDate,
@@ -21409,17 +21417,100 @@ var DateIntervalPickerDefaultButton = ({
21409
21417
  }
21410
21418
  );
21411
21419
  };
21412
- var DateIntervalPickerDefaultButton_default = DateIntervalPickerDefaultButton;
21420
+ var DateIntervalPickerButton_default = DateIntervalPickerButton;
21421
+
21422
+ // src/components/input/date-interval-picker/DateIntervalPicker.tsx
21423
+ import { jsx as jsx115, jsxs as jsxs54 } from "react/jsx-runtime";
21424
+ var DateIntervalPicker = ({
21425
+ color: color2,
21426
+ maxSelectableDays,
21427
+ disabled,
21428
+ minDate,
21429
+ maxDate,
21430
+ startDate,
21431
+ endDate,
21432
+ interval,
21433
+ allowCompare,
21434
+ showTime,
21435
+ allowedIntervals,
21436
+ comparisonInterval,
21437
+ comparisonStartDate,
21438
+ comparisonEndDate,
21439
+ comparisonColor,
21440
+ intersectionColor,
21441
+ onChange
21442
+ }) => {
21443
+ const { timezone } = React60.useContext(IntlContext);
21444
+ const [anchorEl, setAnchorEl] = React60.useState(
21445
+ null
21446
+ );
21447
+ const isSameDate = (date1, date2) => date1?.getTime() === date2?.getTime();
21448
+ const handlePopoverCancel = () => {
21449
+ setAnchorEl(null);
21450
+ };
21451
+ const handleComparisonChanges = (values2) => values2.comparisonInterval !== comparisonInterval || !isSameDate(values2.comparisonStartDate, comparisonStartDate) || !isSameDate(values2.comparisonEndDate, comparisonEndDate);
21452
+ const handleApply = (values2) => {
21453
+ if (onChange && (!isSameDate(values2.startDate, startDate) || !isSameDate(values2.endDate, endDate) || values2.interval !== interval || handleComparisonChanges(values2))) {
21454
+ onChange(values2);
21455
+ }
21456
+ setAnchorEl(null);
21457
+ };
21458
+ const internalMaxDate = maxDate ?? tz6(timezone).toDate();
21459
+ const internalMinDate = minDate ?? tz6(internalMaxDate, timezone).subtract(maxSelectableDays - 1, "days").toDate();
21460
+ const displayEndDate = getDisplayEndDate(endDate, timezone, !!showTime);
21461
+ const isEndDateVisible = !isSameDate(startDate, displayEndDate);
21462
+ return /* @__PURE__ */ jsxs54("div", { style: { display: "inline-flex" }, children: [
21463
+ /* @__PURE__ */ jsx115(
21464
+ DateIntervalPickerButton_default,
21465
+ {
21466
+ startDate,
21467
+ endDate: displayEndDate,
21468
+ interval,
21469
+ comparisonEndDate,
21470
+ comparisonStartDate,
21471
+ disabled,
21472
+ showTime,
21473
+ isEndDateVisible,
21474
+ onClick: setAnchorEl
21475
+ }
21476
+ ),
21477
+ anchorEl !== null && /* @__PURE__ */ jsx115(
21478
+ DateIntervalPickerPopover_default,
21479
+ {
21480
+ anchorEl,
21481
+ startDate,
21482
+ endDate,
21483
+ color: color2 ?? primaryMain,
21484
+ maxSelectableDays,
21485
+ disabled,
21486
+ minDate: internalMinDate,
21487
+ maxDate: internalMaxDate,
21488
+ interval,
21489
+ comparisonColor: comparisonColor ?? yellow,
21490
+ intersectionColor: intersectionColor ?? oliveGreen,
21491
+ allowCompare,
21492
+ comparisonInterval,
21493
+ comparisonStartDate,
21494
+ comparisonEndDate,
21495
+ allowedIntervals,
21496
+ showTime,
21497
+ onCancel: handlePopoverCancel,
21498
+ onApply: handleApply
21499
+ }
21500
+ )
21501
+ ] });
21502
+ };
21503
+ var DateIntervalPicker_default = DateIntervalPicker;
21413
21504
 
21414
21505
  // src/components/input/date-range-picker/DateRangePicker.tsx
21415
- import * as React62 from "react";
21416
- import { tz as tz8 } from "moment-timezone";
21506
+ import * as React63 from "react";
21507
+ import { tz as tz9 } from "moment-timezone";
21417
21508
 
21418
- // src/components/input/date-interval-picker/DateIntervalPickerInputButton.tsx
21419
- import * as React60 from "react";
21420
- import { tz as tz6 } from "moment-timezone";
21421
- import { jsx as jsx115 } from "react/jsx-runtime";
21422
- var DateIntervalPickerInputButton = ({
21509
+ // src/components/input/date-range-picker/DateRangePickerButton.tsx
21510
+ import * as React61 from "react";
21511
+ import { tz as tz7 } from "moment-timezone";
21512
+ import { jsx as jsx116 } from "react/jsx-runtime";
21513
+ var DateRangePickerButton = ({
21423
21514
  startDate,
21424
21515
  endDate,
21425
21516
  disabled,
@@ -21428,20 +21519,21 @@ var DateIntervalPickerInputButton = ({
21428
21519
  onClick
21429
21520
  }) => {
21430
21521
  const { t } = useTranslation();
21431
- const inputRef = React60.useRef(null);
21432
- const { locale, timezone } = React60.useContext(IntlContext);
21433
- const [dateText, setDateText] = React60.useState("");
21522
+ const inputRef = React61.useRef(null);
21523
+ const { locale, timezone } = React61.useContext(IntlContext);
21524
+ const [dateText, setDateText] = React61.useState("");
21434
21525
  const dateInputFormat = getDateInputFormatForLocale(locale);
21435
- const dateInputFormatPlaceholder = React60.useMemo(() => {
21526
+ const dateInputFormatPlaceholder = React61.useMemo(() => {
21436
21527
  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
21528
  return `${formatString} - ${formatString}`;
21438
21529
  }, [dateInputFormat, t]);
21439
- const getDateString = React60.useCallback(
21440
- (date) => !isNaN(date.getTime()) ? tz6(date, timezone).format(dateInputFormat) : "",
21530
+ const getDateString = React61.useCallback(
21531
+ (date) => !isNaN(date.getTime()) ? tz7(date, timezone).format(dateInputFormat) : "",
21441
21532
  [dateInputFormat, timezone]
21442
21533
  );
21443
- React60.useEffect(() => {
21534
+ React61.useEffect(() => {
21444
21535
  if (!startDate || !endDate) {
21536
+ setDateText("");
21445
21537
  return;
21446
21538
  }
21447
21539
  const startDateText = getDateString(startDate);
@@ -21455,13 +21547,13 @@ var DateIntervalPickerInputButton = ({
21455
21547
  onClick(inputRef.current);
21456
21548
  }
21457
21549
  };
21458
- return /* @__PURE__ */ jsx115(
21550
+ return /* @__PURE__ */ jsx116(
21459
21551
  Box_default2,
21460
21552
  {
21461
21553
  onClick: handleButtonClick,
21462
21554
  sx: { cursor: "pointer" },
21463
- "data-testid": "date-interval-picker-input-button",
21464
- children: /* @__PURE__ */ jsx115(
21555
+ "data-testid": "date-range-picker-button",
21556
+ children: /* @__PURE__ */ jsx116(
21465
21557
  TextField_default,
21466
21558
  {
21467
21559
  ref: inputRef,
@@ -21469,7 +21561,7 @@ var DateIntervalPickerInputButton = ({
21469
21561
  inputSx: {
21470
21562
  minWidth: "166px"
21471
21563
  },
21472
- endAdornment: /* @__PURE__ */ jsx115(
21564
+ endAdornment: /* @__PURE__ */ jsx116(
21473
21565
  Icon_default,
21474
21566
  {
21475
21567
  id: isPopoverOpen ? "chevron-up" : "chevron-down",
@@ -21485,12 +21577,12 @@ var DateIntervalPickerInputButton = ({
21485
21577
  }
21486
21578
  );
21487
21579
  };
21488
- var DateIntervalPickerInputButton_default = DateIntervalPickerInputButton;
21580
+ var DateRangePickerButton_default = DateRangePickerButton;
21489
21581
 
21490
21582
  // src/components/input/date-range-picker/DateRangePickerPopover.tsx
21491
- import * as React61 from "react";
21492
- import { tz as tz7 } from "moment-timezone";
21493
- import { jsx as jsx116, jsxs as jsxs54 } from "react/jsx-runtime";
21583
+ import * as React62 from "react";
21584
+ import { tz as tz8 } from "moment-timezone";
21585
+ import { jsx as jsx117, jsxs as jsxs55 } from "react/jsx-runtime";
21494
21586
  var CALENDAR_COLUMN_WIDTH2 = 250;
21495
21587
  var DateRangePickerPopover = ({
21496
21588
  startDate,
@@ -21503,10 +21595,10 @@ var DateRangePickerPopover = ({
21503
21595
  onApply,
21504
21596
  onCancel
21505
21597
  }) => {
21506
- const { locale, timezone } = React61.useContext(IntlContext);
21598
+ const { locale, timezone } = React62.useContext(IntlContext);
21507
21599
  const dateInputFormat = getDateInputFormatForLocale(locale);
21508
21600
  const { t } = useTranslation();
21509
- const dateInputFormatter = (date) => tz7(date, timezone).format(dateInputFormat);
21601
+ const dateInputFormatter = (date) => tz8(date, timezone).format(dateInputFormat);
21510
21602
  const initialState = {
21511
21603
  interval: "custom",
21512
21604
  highlightedInput: "startDate",
@@ -21526,7 +21618,7 @@ var DateRangePickerPopover = ({
21526
21618
  comparisonEndSimpleDate: null,
21527
21619
  isComparing: false
21528
21620
  };
21529
- const [state, setState] = React61.useState(initialState);
21621
+ const [state, setState] = React62.useState(initialState);
21530
21622
  const handleApply = () => {
21531
21623
  const safeParseDate = (dateString, simpleDate) => {
21532
21624
  if (!dateString || !simpleDate) {
@@ -21536,7 +21628,7 @@ var DateRangePickerPopover = ({
21536
21628
  Date.UTC(simpleDate.year, simpleDate.month, simpleDate.day)
21537
21629
  );
21538
21630
  if (isNaN(parsed.getTime()) || parsed < minDate || parsed > maxDate) {
21539
- return tz7(
21631
+ return tz8(
21540
21632
  {
21541
21633
  year: simpleDate.year,
21542
21634
  month: simpleDate.month,
@@ -21557,8 +21649,8 @@ var DateRangePickerPopover = ({
21557
21649
  setState(initialState);
21558
21650
  };
21559
21651
  const isApplyButtonDisabled = () => !state.startSimpleDate || !state.endSimpleDate;
21560
- return /* @__PURE__ */ jsxs54(Popover_default, { onClose: handleCancel, anchorEl, children: [
21561
- /* @__PURE__ */ jsx116(
21652
+ return /* @__PURE__ */ jsxs55(Popover_default, { onClose: handleCancel, anchorEl, children: [
21653
+ /* @__PURE__ */ jsx117(
21562
21654
  Box_default2,
21563
21655
  {
21564
21656
  sx: {
@@ -21573,7 +21665,7 @@ var DateRangePickerPopover = ({
21573
21665
  minHeight: "300px",
21574
21666
  maxHeight: "580px"
21575
21667
  },
21576
- children: /* @__PURE__ */ jsx116(
21668
+ children: /* @__PURE__ */ jsx117(
21577
21669
  DateIntervalRangeSelector_default,
21578
21670
  {
21579
21671
  state,
@@ -21590,11 +21682,11 @@ var DateRangePickerPopover = ({
21590
21682
  )
21591
21683
  }
21592
21684
  ),
21593
- /* @__PURE__ */ jsx116(
21685
+ /* @__PURE__ */ jsx117(
21594
21686
  PopoverActions_default,
21595
21687
  {
21596
21688
  sx: { padding: "16px 24px" },
21597
- leftContent: /* @__PURE__ */ jsx116(
21689
+ leftContent: /* @__PURE__ */ jsx117(
21598
21690
  Button_default,
21599
21691
  {
21600
21692
  "data-testid": "date-interval-picker-cancel-button",
@@ -21604,7 +21696,7 @@ var DateRangePickerPopover = ({
21604
21696
  text: t("DATE_INTERVAL_PICKER.CANCEL")
21605
21697
  }
21606
21698
  ),
21607
- rightContent: /* @__PURE__ */ jsx116(
21699
+ rightContent: /* @__PURE__ */ jsx117(
21608
21700
  Button_default,
21609
21701
  {
21610
21702
  "data-testid": "date-interval-picker-apply-button",
@@ -21621,7 +21713,7 @@ var DateRangePickerPopover = ({
21621
21713
  var DateRangePickerPopover_default = DateRangePickerPopover;
21622
21714
 
21623
21715
  // src/components/input/date-range-picker/DateRangePicker.tsx
21624
- import { jsx as jsx117, jsxs as jsxs55 } from "react/jsx-runtime";
21716
+ import { jsx as jsx118, jsxs as jsxs56 } from "react/jsx-runtime";
21625
21717
  var DEFAULT_MIN_DATE = { year: 1900, month: 0, date: 1 };
21626
21718
  var DEFAULT_MAX_DATE = { year: 2100, month: 11, date: 31 };
21627
21719
  var DateRangePicker = ({
@@ -21634,8 +21726,8 @@ var DateRangePicker = ({
21634
21726
  minDate,
21635
21727
  maxDate
21636
21728
  }) => {
21637
- const { timezone } = React62.useContext(IntlContext);
21638
- const [anchorEl, setAnchorEl] = React62.useState(
21729
+ const { timezone } = React63.useContext(IntlContext);
21730
+ const [anchorEl, setAnchorEl] = React63.useState(
21639
21731
  null
21640
21732
  );
21641
21733
  const isSameDate = (date1, date2) => date1?.getTime() === date2?.getTime();
@@ -21648,12 +21740,12 @@ var DateRangePicker = ({
21648
21740
  }
21649
21741
  setAnchorEl(null);
21650
21742
  };
21651
- const internalMaxDate = maxDate ?? tz8(DEFAULT_MAX_DATE, timezone).toDate();
21652
- const internalMinDate = minDate ?? tz8(DEFAULT_MIN_DATE, timezone).toDate();
21743
+ const internalMaxDate = maxDate ?? tz9(DEFAULT_MAX_DATE, timezone).toDate();
21744
+ const internalMinDate = minDate ?? tz9(DEFAULT_MIN_DATE, timezone).toDate();
21653
21745
  const isEndDateVisible = endDate !== void 0 && !isSameDate(startDate, endDate);
21654
- return /* @__PURE__ */ jsxs55("div", { style: { display: "inline-flex" }, children: [
21655
- /* @__PURE__ */ jsx117(
21656
- DateIntervalPickerInputButton_default,
21746
+ return /* @__PURE__ */ jsxs56("div", { style: { display: "inline-flex" }, children: [
21747
+ /* @__PURE__ */ jsx118(
21748
+ DateRangePickerButton_default,
21657
21749
  {
21658
21750
  isPopoverOpen: anchorEl !== null,
21659
21751
  startDate,
@@ -21663,7 +21755,7 @@ var DateRangePicker = ({
21663
21755
  onClick: setAnchorEl
21664
21756
  }
21665
21757
  ),
21666
- anchorEl !== null && /* @__PURE__ */ jsx117(
21758
+ anchorEl !== null && /* @__PURE__ */ jsx118(
21667
21759
  DateRangePickerPopover_default,
21668
21760
  {
21669
21761
  anchorEl,
@@ -21681,97 +21773,6 @@ var DateRangePicker = ({
21681
21773
  };
21682
21774
  var DateRangePicker_default = DateRangePicker;
21683
21775
 
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
21776
  // src/components/input/SelectPopoverItem.tsx
21776
21777
  import { Grid as Grid2, Stack as Stack9 } from "@mui/material";
21777
21778
  import { lighten as lighten3 } from "@mui/material";
@@ -26417,11 +26418,14 @@ var PageSelector = ({
26417
26418
  const handleNext = React86.useCallback(() => {
26418
26419
  onPageChange(Math.min(totalPages, currentPage + 1));
26419
26420
  }, [currentPage, onPageChange, totalPages]);
26420
- const displayText = hideText ? "" : text || t("PAGE_SELECTOR.SHOWING_ITEMS", {
26421
- from: pageSize * (currentPage - 1) + 1,
26422
- to: Math.min(pageSize * currentPage, totalItems),
26423
- total: totalItems
26424
- });
26421
+ const displayText = hideText ? "" : text || t(
26422
+ "PAGE_SELECTOR.SHOWING_ITEMS",
26423
+ totalItems === 0 ? { from: 0, to: 0, total: 0 } : {
26424
+ from: pageSize * (currentPage - 1) + 1,
26425
+ to: Math.min(pageSize * currentPage, totalItems),
26426
+ total: totalItems
26427
+ }
26428
+ );
26425
26429
  return /* @__PURE__ */ jsxs76(
26426
26430
  Stack_default,
26427
26431
  {
@@ -28472,7 +28476,7 @@ import {
28472
28476
  Table as MuiTable
28473
28477
  } from "@mui/material";
28474
28478
  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 }) });
28479
+ 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
28480
  var Table_default = Table;
28477
28481
 
28478
28482
  // src/components/table/TableBody.tsx
@@ -29542,7 +29546,7 @@ react-is/cjs/react-is.development.js:
29542
29546
 
29543
29547
  @mui/styled-engine/esm/index.js:
29544
29548
  (**
29545
- * @mui/styled-engine v7.3.7
29549
+ * @mui/styled-engine v7.3.10
29546
29550
  *
29547
29551
  * @license MIT
29548
29552
  * This source code is licensed under the MIT license found in the
@@ -29551,7 +29555,7 @@ react-is/cjs/react-is.development.js:
29551
29555
 
29552
29556
  @mui/system/esm/index.js:
29553
29557
  (**
29554
- * @mui/system v7.3.7
29558
+ * @mui/system v7.3.11
29555
29559
  *
29556
29560
  * @license MIT
29557
29561
  * This source code is licensed under the MIT license found in the