pixel-react 1.14.41 → 1.14.43

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.
Files changed (39) hide show
  1. package/lib/assets/icons/beautify_icon.svg.js +1 -1
  2. package/lib/assets/icons/beautify_icon.svg.js.map +1 -1
  3. package/lib/components/Charts/BarChart/BarChart.js +6 -2
  4. package/lib/components/Charts/BarChart/BarChart.js.map +1 -1
  5. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.js +5 -1
  6. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.js.map +1 -1
  7. package/lib/components/Charts/DashboardDonutChart/types.d.ts +1 -0
  8. package/lib/components/ConnectingBranch/BranchComponents/MachineInstances.js +3 -3
  9. package/lib/components/ConnectingBranch/BranchComponents/MachineInstances.js.map +1 -1
  10. package/lib/components/DatePicker/DatePicker.js +5 -3
  11. package/lib/components/DatePicker/DatePicker.js.map +1 -1
  12. package/lib/components/Excel/Data.js +14 -14
  13. package/lib/components/Excel/Data.js.map +1 -1
  14. package/lib/components/Excel/Data2.js +2 -2
  15. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Cell.js +3 -1
  16. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Cell.js.map +1 -1
  17. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js +2 -1
  18. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js.map +1 -1
  19. package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.js +117 -40
  20. package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.js.map +1 -1
  21. package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +3 -0
  22. package/lib/components/Excel/ExcelFile/ExcelFileComponents/util.js +7 -7
  23. package/lib/components/Excel/ExcelFile/ExcelFileComponents/util.js.map +1 -1
  24. package/lib/components/Select/Select.js +2 -1
  25. package/lib/components/Select/Select.js.map +1 -1
  26. package/lib/components/SessionDropdown/SessionDropdown.js +0 -2
  27. package/lib/components/SessionDropdown/SessionDropdown.js.map +1 -1
  28. package/lib/index.cjs +690 -568
  29. package/lib/index.cjs.map +1 -1
  30. package/lib/index.d.ts +1 -0
  31. package/lib/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js +39 -0
  32. package/lib/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js.map +1 -0
  33. package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
  34. package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
  35. package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
  36. package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
  37. package/lib/styles.css +1 -1
  38. package/lib/styles.css.map +1 -1
  39. package/package.json +1 -1
package/lib/index.cjs CHANGED
@@ -222,7 +222,7 @@ const SvgExportCollectionIcon = (props) => /* @__PURE__ */ React__namespace.crea
222
222
 
223
223
  const SvgRunIcon = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("g", { clipPath: "url(#clip0_5151_106068)" }, /* @__PURE__ */ React__namespace.createElement("g", { filter: "url(#filter0_d_5151_106068)" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M24.8701 12C24.8701 18.6274 19.4975 24 12.8701 24C6.2427 24 0.870117 18.6274 0.870117 12C0.870117 5.37258 6.2427 0 12.8701 0C19.4975 0 24.8701 5.37258 24.8701 12Z", fill: "url(#paint0_linear_5151_106068)" })), /* @__PURE__ */ React__namespace.createElement("path", { d: "M11.2033 15.7503L16.2033 12.0003L11.2033 8.25032V15.7503ZM12.87 3.66699C11.2218 3.66699 9.61061 4.15573 8.24021 5.07141C6.8698 5.98709 5.80169 7.28858 5.17096 8.8113C4.54023 10.334 4.3752 12.0096 4.69675 13.6261C5.01829 15.2426 5.81196 16.7274 6.9774 17.8929C8.14284 19.0583 9.6277 19.852 11.2442 20.1735C12.8607 20.4951 14.5363 20.33 16.059 19.6993C17.5817 19.0686 18.8832 18.0005 19.7989 16.6301C20.7145 15.2597 21.2033 13.6485 21.2033 12.0003C21.2033 9.79019 20.3253 7.67057 18.7625 6.10777C17.1997 4.54497 15.0801 3.66699 12.87 3.66699ZM12.87 18.667C11.5514 18.667 10.2625 18.276 9.16616 17.5435C8.06983 16.8109 7.21535 15.7697 6.71076 14.5515C6.20618 13.3334 6.07415 11.9929 6.33139 10.6997C6.58862 9.40652 7.22356 8.21863 8.15591 7.28628C9.08826 6.35393 10.2761 5.71899 11.5694 5.46176C12.8626 5.20452 14.203 5.33654 15.4212 5.84113C16.6394 6.34571 17.6805 7.2002 18.4131 8.29652C19.1456 9.39285 19.5366 10.6818 19.5366 12.0003C19.5344 13.7678 18.8313 15.4622 17.5816 16.7119C16.3318 17.9617 14.6374 18.6648 12.87 18.667Z", fill: "currentColor" })), /* @__PURE__ */ React__namespace.createElement("defs", null, /* @__PURE__ */ React__namespace.createElement("filter", { id: "filter0_d_5151_106068", x: -0.129883, y: -3, width: 28, height: 28, filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" }, /* @__PURE__ */ React__namespace.createElement("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }), /* @__PURE__ */ React__namespace.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), /* @__PURE__ */ React__namespace.createElement("feOffset", { dx: 1, dy: -1 }), /* @__PURE__ */ React__namespace.createElement("feGaussianBlur", { stdDeviation: 1 }), /* @__PURE__ */ React__namespace.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.141176 0 0 0 0 0.0745098 0 0 0 0 0.196078 0 0 0 0.1 0" }), /* @__PURE__ */ React__namespace.createElement("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_5151_106068" }), /* @__PURE__ */ React__namespace.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_5151_106068", result: "shape" })), /* @__PURE__ */ React__namespace.createElement("linearGradient", { id: "paint0_linear_5151_106068", x1: 2.59783, y1: 2.34599, x2: 24.8701, y2: 24, gradientUnits: "userSpaceOnUse" }, /* @__PURE__ */ React__namespace.createElement("stop", { offset: 1, stopColor: "#2A6F09" }), /* @__PURE__ */ React__namespace.createElement("stop", { stopColor: "#44B002" })), /* @__PURE__ */ React__namespace.createElement("clipPath", { id: "clip0_5151_106068" }, /* @__PURE__ */ React__namespace.createElement("rect", { width: 24, height: 24, fill: "currentColor", transform: "translate(0.870117)" }))));
224
224
 
225
- const SvgBeautifyIcon = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6 0.439941H0V1.71995H6V0.439941ZM0 3.00001H6V4.28001H0V3.00001ZM6 10.6801H0V11.9601H6V10.6801ZM6 13.2401H0V14.5201H6V13.2401ZM2.56001 5.56002H10.2401V6.84003H2.56001V5.56002ZM12.4084 5.56002H10.5601V6.84003H12.4084V5.56002ZM2.56001 8.12003H12.8V9.40004H2.56001V8.12003ZM16 8.12003H13.44V9.40004H16V8.12003Z", fill: "currentColor" }));
225
+ const SvgBeautifyIcon = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("rect", { x: 0.5, y: 0.5, width: 16, height: 16, rx: 4.5, stroke: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M10 15.2402H3V14.2402H10V15.2402ZM10 13.2402H3V12.2402H10V13.2402ZM14.7998 11.04H4.56055V9.75977H14.7998V11.04ZM12.2402 8.48047H4.56055V7.2002H12.2402V8.48047ZM14.4082 8.48047H12.5605V7.2002H14.4082V8.48047ZM10 6H3V5H10V6ZM10 4H3V3H10V4Z", fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.2786 2.22236C13.249 2.0923 13.1334 2 13 2C12.8666 2 12.751 2.0923 12.7214 2.22236L12.5633 2.91756C12.4902 3.23911 12.2391 3.4902 11.9176 3.56331L11.2224 3.7214C11.0923 3.75097 11 3.86661 11 4C11 4.13339 11.0923 4.24903 11.2224 4.2786L11.9176 4.43669C12.2391 4.5098 12.4902 4.76089 12.5633 5.08244L12.7214 5.77764C12.751 5.9077 12.8666 6 13 6C13.1334 6 13.249 5.9077 13.2786 5.77764L13.4367 5.08244C13.5098 4.76089 13.7609 4.5098 14.0824 4.43669L14.7776 4.2786C14.9077 4.24903 15 4.13339 15 4C15 3.86661 14.9077 3.75097 14.7776 3.7214L14.0824 3.56331C13.7609 3.4902 13.5098 3.23911 13.4367 2.91756L13.2786 2.22236ZM12.3769 4C12.6449 3.86324 12.8632 3.64489 13 3.37691C13.1368 3.64489 13.3551 3.86324 13.6231 4C13.3551 4.13676 13.1368 4.35511 13 4.62309C12.8632 4.35511 12.6449 4.13676 12.3769 4Z", fill: "currentColor" }));
226
226
 
227
227
  const SvgAddVariableIcon = (props) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M14.9799 1.39074L14.98 1.39066C14.7152 1.10024 14.2958 0.91202 13.667 0.901363L13.6603 0.901248L13.6603 0.901202C12.7479 0.873384 11.9951 1.10031 11.384 1.55729C10.8289 1.97239 10.3593 2.60115 10.001 3.47483C10.1534 3.44887 10.311 3.43399 10.4753 3.43399C10.7848 3.43399 11.4004 3.4707 11.7695 3.94829L11.7739 3.95398L11.7738 3.95401C12.0596 4.33506 12.0442 4.83443 11.9167 5.28791L11.9148 5.29459L11.9148 5.29458C11.8487 5.5177 11.679 5.86554 11.4767 6.23962C11.2662 6.62901 10.996 7.09066 10.702 7.55973L10.6993 7.56416L10.6992 7.56414C10.3347 8.13251 10.0495 8.55478 9.83621 8.83812C9.73082 8.9781 9.63297 9.09769 9.54476 9.18669C9.50132 9.23051 9.44774 9.27975 9.3864 9.32131C9.33933 9.3532 9.21625 9.43126 9.04751 9.43126H9.03969L9.03189 9.43102C8.86024 9.42565 8.74138 9.34197 8.68565 9.29502C8.62506 9.24396 8.58139 9.18766 8.55261 9.14632C8.49422 9.06244 8.44439 8.96269 8.40245 8.86844C8.31617 8.6746 8.22417 8.41394 8.13119 8.12159C7.94369 7.5321 7.73346 6.75358 7.53672 5.98052C7.33946 5.20536 7.15363 4.42727 7.01499 3.8353C6.94564 3.53916 6.88802 3.28929 6.84663 3.10947L6.79742 2.89575C6.78998 2.86356 6.7853 2.8436 6.78273 2.83267C6.78085 2.82467 6.78011 2.82151 6.78026 2.82195C6.57968 2.09733 6.4571 1.68312 6.26635 1.42424C6.18505 1.31391 6.0959 1.24128 5.9786 1.19094C5.85381 1.13739 5.67159 1.09837 5.39186 1.09837C5.26627 1.09837 5.03076 1.1623 4.67253 1.3451C4.32974 1.52003 3.92898 1.77495 3.49123 2.08709C2.6167 2.71068 1.63791 3.53124 0.748646 4.31012L0.746028 4.31241L0.74602 4.3124L0.529348 4.49953L0.770345 4.803C1.04584 4.59868 1.33341 4.39361 1.60844 4.23668C1.8837 4.07963 2.21683 3.9283 2.55433 3.92635C3.08046 3.91574 3.42074 4.32093 3.64468 4.72599C3.88424 5.15933 4.10594 5.79526 4.33533 6.63214C4.78297 8.25095 5.33179 9.99936 5.93252 11.3357C6.23406 12.0064 6.53701 12.5465 6.83047 12.9111C7.13988 13.2955 7.35241 13.3793 7.4597 13.3793C8.04015 13.3793 8.72417 13.1366 9.55755 12.509C10.3917 11.8809 11.3418 10.8921 12.4423 9.46323L14.9799 1.39074ZM14.9799 1.39074L14.9874 1.39862M14.9799 1.39074L14.9874 1.39862M14.9874 1.39862C15.338 1.76673 15.549 2.45607 15.4903 3.5376L15.4902 3.5376M14.9874 1.39862L15.4902 3.5376M15.4902 3.5376L15.4899 3.54442M15.4902 3.5376L15.4899 3.54442M15.4899 3.54442C15.4633 4.19952 15.2114 5.02391 14.6981 6.02812M15.4899 3.54442L14.6981 6.02812M14.6981 6.02812C14.1875 7.02705 13.4345 8.17281 12.4424 9.46314L14.6981 6.02812Z", fill: "currentColor", stroke: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M13.4708 9.75072H15.8999V11.1833H13.4708H13.3708V11.2833V13.7793H11.8044V11.2833V11.1833H11.7044H9.27529V9.75072H11.7044H11.8044V9.65072V7.15469H13.3708V9.65072V9.75072H13.4708Z", fill: "currentColor", stroke: "white", strokeWidth: 0.2 }));
228
228
 
@@ -6470,7 +6470,8 @@ const Select$1 = ({
6470
6470
  }
6471
6471
  const style = window.getComputedStyle(parent);
6472
6472
  const overflowY = style.overflowY;
6473
- const isScrollable = (overflowY === 'auto' || overflowY === 'scroll') && parent.scrollHeight > parent.clientHeight;
6473
+ const overflowX = style.overflowX;
6474
+ const isScrollable = (overflowY === 'auto' || overflowY === 'scroll' || overflowX === 'auto' || overflowX === 'scroll') && (parent.scrollHeight > parent.clientHeight || parent.scrollWidth > parent.clientWidth);
6474
6475
  if (isScrollable) {
6475
6476
  return parent;
6476
6477
  }
@@ -25620,6 +25621,498 @@ function DayPicker(initialProps) {
25620
25621
  }, props.footer))));
25621
25622
  }
25622
25623
 
25624
+ /**
25625
+ * @name toDate
25626
+ * @category Common Helpers
25627
+ * @summary Convert the given argument to an instance of Date.
25628
+ *
25629
+ * @description
25630
+ * Convert the given argument to an instance of Date.
25631
+ *
25632
+ * If the argument is an instance of Date, the function returns its clone.
25633
+ *
25634
+ * If the argument is a number, it is treated as a timestamp.
25635
+ *
25636
+ * If the argument is none of the above, the function returns Invalid Date.
25637
+ *
25638
+ * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
25639
+ *
25640
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
25641
+ *
25642
+ * @param argument - The value to convert
25643
+ *
25644
+ * @returns The parsed date in the local time zone
25645
+ *
25646
+ * @example
25647
+ * // Clone the date:
25648
+ * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
25649
+ * //=> Tue Feb 11 2014 11:30:30
25650
+ *
25651
+ * @example
25652
+ * // Convert the timestamp to date:
25653
+ * const result = toDate(1392098430000)
25654
+ * //=> Tue Feb 11 2014 11:30:30
25655
+ */
25656
+ function toDate$1(argument) {
25657
+ const argStr = Object.prototype.toString.call(argument);
25658
+
25659
+ // Clone the date
25660
+ if (
25661
+ argument instanceof Date ||
25662
+ (typeof argument === "object" && argStr === "[object Date]")
25663
+ ) {
25664
+ // Prevent the date to lose the milliseconds when passed to new Date() in IE10
25665
+ return new argument.constructor(+argument);
25666
+ } else if (
25667
+ typeof argument === "number" ||
25668
+ argStr === "[object Number]" ||
25669
+ typeof argument === "string" ||
25670
+ argStr === "[object String]"
25671
+ ) {
25672
+ // TODO: Can we get rid of as?
25673
+ return new Date(argument);
25674
+ } else {
25675
+ // TODO: Can we get rid of as?
25676
+ return new Date(NaN);
25677
+ }
25678
+ }
25679
+
25680
+ /**
25681
+ * @name constructFrom
25682
+ * @category Generic Helpers
25683
+ * @summary Constructs a date using the reference date and the value
25684
+ *
25685
+ * @description
25686
+ * The function constructs a new date using the constructor from the reference
25687
+ * date and the given value. It helps to build generic functions that accept
25688
+ * date extensions.
25689
+ *
25690
+ * It defaults to `Date` if the passed reference date is a number or a string.
25691
+ *
25692
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
25693
+ *
25694
+ * @param date - The reference date to take constructor from
25695
+ * @param value - The value to create the date
25696
+ *
25697
+ * @returns Date initialized using the given date and value
25698
+ *
25699
+ * @example
25700
+ * import { constructFrom } from 'date-fns'
25701
+ *
25702
+ * // A function that clones a date preserving the original type
25703
+ * function cloneDate<DateType extends Date(date: DateType): DateType {
25704
+ * return constructFrom(
25705
+ * date, // Use contrustor from the given date
25706
+ * date.getTime() // Use the date value to create a new date
25707
+ * )
25708
+ * }
25709
+ */
25710
+ function constructFrom(date, value) {
25711
+ if (date instanceof Date) {
25712
+ return new date.constructor(value);
25713
+ } else {
25714
+ return new Date(value);
25715
+ }
25716
+ }
25717
+
25718
+ /**
25719
+ * @module constants
25720
+ * @summary Useful constants
25721
+ * @description
25722
+ * Collection of useful date constants.
25723
+ *
25724
+ * The constants could be imported from `date-fns/constants`:
25725
+ *
25726
+ * ```ts
25727
+ * import { maxTime, minTime } from "./constants/date-fns/constants";
25728
+ *
25729
+ * function isAllowedTime(time) {
25730
+ * return time <= maxTime && time >= minTime;
25731
+ * }
25732
+ * ```
25733
+ */
25734
+
25735
+
25736
+ /**
25737
+ * @constant
25738
+ * @name millisecondsInWeek
25739
+ * @summary Milliseconds in 1 week.
25740
+ */
25741
+ const millisecondsInWeek = 604800000;
25742
+
25743
+ /**
25744
+ * @constant
25745
+ * @name millisecondsInDay
25746
+ * @summary Milliseconds in 1 day.
25747
+ */
25748
+ const millisecondsInDay = 86400000;
25749
+
25750
+ let defaultOptions = {};
25751
+
25752
+ function getDefaultOptions$1() {
25753
+ return defaultOptions;
25754
+ }
25755
+
25756
+ /**
25757
+ * The {@link startOfWeek} function options.
25758
+ */
25759
+
25760
+ /**
25761
+ * @name startOfWeek
25762
+ * @category Week Helpers
25763
+ * @summary Return the start of a week for the given date.
25764
+ *
25765
+ * @description
25766
+ * Return the start of a week for the given date.
25767
+ * The result will be in the local timezone.
25768
+ *
25769
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
25770
+ *
25771
+ * @param date - The original date
25772
+ * @param options - An object with options
25773
+ *
25774
+ * @returns The start of a week
25775
+ *
25776
+ * @example
25777
+ * // The start of a week for 2 September 2014 11:55:00:
25778
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
25779
+ * //=> Sun Aug 31 2014 00:00:00
25780
+ *
25781
+ * @example
25782
+ * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
25783
+ * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
25784
+ * //=> Mon Sep 01 2014 00:00:00
25785
+ */
25786
+ function startOfWeek(date, options) {
25787
+ const defaultOptions = getDefaultOptions$1();
25788
+ const weekStartsOn =
25789
+ options?.weekStartsOn ??
25790
+ options?.locale?.options?.weekStartsOn ??
25791
+ defaultOptions.weekStartsOn ??
25792
+ defaultOptions.locale?.options?.weekStartsOn ??
25793
+ 0;
25794
+
25795
+ const _date = toDate$1(date);
25796
+ const day = _date.getDay();
25797
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
25798
+
25799
+ _date.setDate(_date.getDate() - diff);
25800
+ _date.setHours(0, 0, 0, 0);
25801
+ return _date;
25802
+ }
25803
+
25804
+ /**
25805
+ * @name startOfISOWeek
25806
+ * @category ISO Week Helpers
25807
+ * @summary Return the start of an ISO week for the given date.
25808
+ *
25809
+ * @description
25810
+ * Return the start of an ISO week for the given date.
25811
+ * The result will be in the local timezone.
25812
+ *
25813
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
25814
+ *
25815
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
25816
+ *
25817
+ * @param date - The original date
25818
+ *
25819
+ * @returns The start of an ISO week
25820
+ *
25821
+ * @example
25822
+ * // The start of an ISO week for 2 September 2014 11:55:00:
25823
+ * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
25824
+ * //=> Mon Sep 01 2014 00:00:00
25825
+ */
25826
+ function startOfISOWeek(date) {
25827
+ return startOfWeek(date, { weekStartsOn: 1 });
25828
+ }
25829
+
25830
+ /**
25831
+ * @name getISOWeekYear
25832
+ * @category ISO Week-Numbering Year Helpers
25833
+ * @summary Get the ISO week-numbering year of the given date.
25834
+ *
25835
+ * @description
25836
+ * Get the ISO week-numbering year of the given date,
25837
+ * which always starts 3 days before the year's first Thursday.
25838
+ *
25839
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
25840
+ *
25841
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
25842
+ *
25843
+ * @param date - The given date
25844
+ *
25845
+ * @returns The ISO week-numbering year
25846
+ *
25847
+ * @example
25848
+ * // Which ISO-week numbering year is 2 January 2005?
25849
+ * const result = getISOWeekYear(new Date(2005, 0, 2))
25850
+ * //=> 2004
25851
+ */
25852
+ function getISOWeekYear(date) {
25853
+ const _date = toDate$1(date);
25854
+ const year = _date.getFullYear();
25855
+
25856
+ const fourthOfJanuaryOfNextYear = constructFrom(date, 0);
25857
+ fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
25858
+ fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
25859
+ const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
25860
+
25861
+ const fourthOfJanuaryOfThisYear = constructFrom(date, 0);
25862
+ fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
25863
+ fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
25864
+ const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
25865
+
25866
+ if (_date.getTime() >= startOfNextYear.getTime()) {
25867
+ return year + 1;
25868
+ } else if (_date.getTime() >= startOfThisYear.getTime()) {
25869
+ return year;
25870
+ } else {
25871
+ return year - 1;
25872
+ }
25873
+ }
25874
+
25875
+ /**
25876
+ * @name startOfDay
25877
+ * @category Day Helpers
25878
+ * @summary Return the start of a day for the given date.
25879
+ *
25880
+ * @description
25881
+ * Return the start of a day for the given date.
25882
+ * The result will be in the local timezone.
25883
+ *
25884
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
25885
+ *
25886
+ * @param date - The original date
25887
+ *
25888
+ * @returns The start of a day
25889
+ *
25890
+ * @example
25891
+ * // The start of a day for 2 September 2014 11:55:00:
25892
+ * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
25893
+ * //=> Tue Sep 02 2014 00:00:00
25894
+ */
25895
+ function startOfDay(date) {
25896
+ const _date = toDate$1(date);
25897
+ _date.setHours(0, 0, 0, 0);
25898
+ return _date;
25899
+ }
25900
+
25901
+ /**
25902
+ * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
25903
+ * They usually appear for dates that denote time before the timezones were introduced
25904
+ * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
25905
+ * and GMT+01:00:00 after that date)
25906
+ *
25907
+ * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
25908
+ * which would lead to incorrect calculations.
25909
+ *
25910
+ * This function returns the timezone offset in milliseconds that takes seconds in account.
25911
+ */
25912
+ function getTimezoneOffsetInMilliseconds$1(date) {
25913
+ const _date = toDate$1(date);
25914
+ const utcDate = new Date(
25915
+ Date.UTC(
25916
+ _date.getFullYear(),
25917
+ _date.getMonth(),
25918
+ _date.getDate(),
25919
+ _date.getHours(),
25920
+ _date.getMinutes(),
25921
+ _date.getSeconds(),
25922
+ _date.getMilliseconds(),
25923
+ ),
25924
+ );
25925
+ utcDate.setUTCFullYear(_date.getFullYear());
25926
+ return +date - +utcDate;
25927
+ }
25928
+
25929
+ /**
25930
+ * @name differenceInCalendarDays
25931
+ * @category Day Helpers
25932
+ * @summary Get the number of calendar days between the given dates.
25933
+ *
25934
+ * @description
25935
+ * Get the number of calendar days between the given dates. This means that the times are removed
25936
+ * from the dates and then the difference in days is calculated.
25937
+ *
25938
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
25939
+ *
25940
+ * @param dateLeft - The later date
25941
+ * @param dateRight - The earlier date
25942
+ *
25943
+ * @returns The number of calendar days
25944
+ *
25945
+ * @example
25946
+ * // How many calendar days are between
25947
+ * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
25948
+ * const result = differenceInCalendarDays(
25949
+ * new Date(2012, 6, 2, 0, 0),
25950
+ * new Date(2011, 6, 2, 23, 0)
25951
+ * )
25952
+ * //=> 366
25953
+ * // How many calendar days are between
25954
+ * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
25955
+ * const result = differenceInCalendarDays(
25956
+ * new Date(2011, 6, 3, 0, 1),
25957
+ * new Date(2011, 6, 2, 23, 59)
25958
+ * )
25959
+ * //=> 1
25960
+ */
25961
+ function differenceInCalendarDays(dateLeft, dateRight) {
25962
+ const startOfDayLeft = startOfDay(dateLeft);
25963
+ const startOfDayRight = startOfDay(dateRight);
25964
+
25965
+ const timestampLeft =
25966
+ +startOfDayLeft - getTimezoneOffsetInMilliseconds$1(startOfDayLeft);
25967
+ const timestampRight =
25968
+ +startOfDayRight - getTimezoneOffsetInMilliseconds$1(startOfDayRight);
25969
+
25970
+ // Round the number of days to the nearest integer because the number of
25971
+ // milliseconds in a day is not constant (e.g. it's different in the week of
25972
+ // the daylight saving time clock shift).
25973
+ return Math.round((timestampLeft - timestampRight) / millisecondsInDay);
25974
+ }
25975
+
25976
+ /**
25977
+ * @name startOfISOWeekYear
25978
+ * @category ISO Week-Numbering Year Helpers
25979
+ * @summary Return the start of an ISO week-numbering year for the given date.
25980
+ *
25981
+ * @description
25982
+ * Return the start of an ISO week-numbering year,
25983
+ * which always starts 3 days before the year's first Thursday.
25984
+ * The result will be in the local timezone.
25985
+ *
25986
+ * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
25987
+ *
25988
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
25989
+ *
25990
+ * @param date - The original date
25991
+ *
25992
+ * @returns The start of an ISO week-numbering year
25993
+ *
25994
+ * @example
25995
+ * // The start of an ISO week-numbering year for 2 July 2005:
25996
+ * const result = startOfISOWeekYear(new Date(2005, 6, 2))
25997
+ * //=> Mon Jan 03 2005 00:00:00
25998
+ */
25999
+ function startOfISOWeekYear(date) {
26000
+ const year = getISOWeekYear(date);
26001
+ const fourthOfJanuary = constructFrom(date, 0);
26002
+ fourthOfJanuary.setFullYear(year, 0, 4);
26003
+ fourthOfJanuary.setHours(0, 0, 0, 0);
26004
+ return startOfISOWeek(fourthOfJanuary);
26005
+ }
26006
+
26007
+ /**
26008
+ * @name isDate
26009
+ * @category Common Helpers
26010
+ * @summary Is the given value a date?
26011
+ *
26012
+ * @description
26013
+ * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
26014
+ *
26015
+ * @param value - The value to check
26016
+ *
26017
+ * @returns True if the given value is a date
26018
+ *
26019
+ * @example
26020
+ * // For a valid date:
26021
+ * const result = isDate(new Date())
26022
+ * //=> true
26023
+ *
26024
+ * @example
26025
+ * // For an invalid date:
26026
+ * const result = isDate(new Date(NaN))
26027
+ * //=> true
26028
+ *
26029
+ * @example
26030
+ * // For some value:
26031
+ * const result = isDate('2014-02-31')
26032
+ * //=> false
26033
+ *
26034
+ * @example
26035
+ * // For an object:
26036
+ * const result = isDate({})
26037
+ * //=> false
26038
+ */
26039
+ function isDate(value) {
26040
+ return (
26041
+ value instanceof Date ||
26042
+ (typeof value === "object" &&
26043
+ Object.prototype.toString.call(value) === "[object Date]")
26044
+ );
26045
+ }
26046
+
26047
+ /**
26048
+ * @name isValid
26049
+ * @category Common Helpers
26050
+ * @summary Is the given date valid?
26051
+ *
26052
+ * @description
26053
+ * Returns false if argument is Invalid Date and true otherwise.
26054
+ * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
26055
+ * Invalid Date is a Date, whose time value is NaN.
26056
+ *
26057
+ * Time value of Date: http://es5.github.io/#x15.9.1.1
26058
+ *
26059
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26060
+ *
26061
+ * @param date - The date to check
26062
+ *
26063
+ * @returns The date is valid
26064
+ *
26065
+ * @example
26066
+ * // For the valid date:
26067
+ * const result = isValid(new Date(2014, 1, 31))
26068
+ * //=> true
26069
+ *
26070
+ * @example
26071
+ * // For the value, convertable into a date:
26072
+ * const result = isValid(1393804800000)
26073
+ * //=> true
26074
+ *
26075
+ * @example
26076
+ * // For the invalid date:
26077
+ * const result = isValid(new Date(''))
26078
+ * //=> false
26079
+ */
26080
+ function isValid(date) {
26081
+ if (!isDate(date) && typeof date !== "number") {
26082
+ return false;
26083
+ }
26084
+ const _date = toDate$1(date);
26085
+ return !isNaN(Number(_date));
26086
+ }
26087
+
26088
+ /**
26089
+ * @name startOfYear
26090
+ * @category Year Helpers
26091
+ * @summary Return the start of a year for the given date.
26092
+ *
26093
+ * @description
26094
+ * Return the start of a year for the given date.
26095
+ * The result will be in the local timezone.
26096
+ *
26097
+ * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26098
+ *
26099
+ * @param date - The original date
26100
+ *
26101
+ * @returns The start of a year
26102
+ *
26103
+ * @example
26104
+ * // The start of a year for 2 September 2014 11:55:00:
26105
+ * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
26106
+ * //=> Wed Jan 01 2014 00:00:00
26107
+ */
26108
+ function startOfYear(date) {
26109
+ const cleanDate = toDate$1(date);
26110
+ const _date = constructFrom(date, 0);
26111
+ _date.setFullYear(cleanDate.getFullYear(), 0, 1);
26112
+ _date.setHours(0, 0, 0, 0);
26113
+ return _date;
26114
+ }
26115
+
25623
26116
  const formatDistanceLocale = {
25624
26117
  lessThanXSeconds: {
25625
26118
  one: "less than a second",
@@ -26262,267 +26755,6 @@ const enUS = {
26262
26755
  },
26263
26756
  };
26264
26757
 
26265
- let defaultOptions = {};
26266
-
26267
- function getDefaultOptions$1() {
26268
- return defaultOptions;
26269
- }
26270
-
26271
- /**
26272
- * @module constants
26273
- * @summary Useful constants
26274
- * @description
26275
- * Collection of useful date constants.
26276
- *
26277
- * The constants could be imported from `date-fns/constants`:
26278
- *
26279
- * ```ts
26280
- * import { maxTime, minTime } from "./constants/date-fns/constants";
26281
- *
26282
- * function isAllowedTime(time) {
26283
- * return time <= maxTime && time >= minTime;
26284
- * }
26285
- * ```
26286
- */
26287
-
26288
-
26289
- /**
26290
- * @constant
26291
- * @name millisecondsInWeek
26292
- * @summary Milliseconds in 1 week.
26293
- */
26294
- const millisecondsInWeek = 604800000;
26295
-
26296
- /**
26297
- * @constant
26298
- * @name millisecondsInDay
26299
- * @summary Milliseconds in 1 day.
26300
- */
26301
- const millisecondsInDay = 86400000;
26302
-
26303
- /**
26304
- * @name toDate
26305
- * @category Common Helpers
26306
- * @summary Convert the given argument to an instance of Date.
26307
- *
26308
- * @description
26309
- * Convert the given argument to an instance of Date.
26310
- *
26311
- * If the argument is an instance of Date, the function returns its clone.
26312
- *
26313
- * If the argument is a number, it is treated as a timestamp.
26314
- *
26315
- * If the argument is none of the above, the function returns Invalid Date.
26316
- *
26317
- * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
26318
- *
26319
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26320
- *
26321
- * @param argument - The value to convert
26322
- *
26323
- * @returns The parsed date in the local time zone
26324
- *
26325
- * @example
26326
- * // Clone the date:
26327
- * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
26328
- * //=> Tue Feb 11 2014 11:30:30
26329
- *
26330
- * @example
26331
- * // Convert the timestamp to date:
26332
- * const result = toDate(1392098430000)
26333
- * //=> Tue Feb 11 2014 11:30:30
26334
- */
26335
- function toDate$1(argument) {
26336
- const argStr = Object.prototype.toString.call(argument);
26337
-
26338
- // Clone the date
26339
- if (
26340
- argument instanceof Date ||
26341
- (typeof argument === "object" && argStr === "[object Date]")
26342
- ) {
26343
- // Prevent the date to lose the milliseconds when passed to new Date() in IE10
26344
- return new argument.constructor(+argument);
26345
- } else if (
26346
- typeof argument === "number" ||
26347
- argStr === "[object Number]" ||
26348
- typeof argument === "string" ||
26349
- argStr === "[object String]"
26350
- ) {
26351
- // TODO: Can we get rid of as?
26352
- return new Date(argument);
26353
- } else {
26354
- // TODO: Can we get rid of as?
26355
- return new Date(NaN);
26356
- }
26357
- }
26358
-
26359
- /**
26360
- * @name startOfDay
26361
- * @category Day Helpers
26362
- * @summary Return the start of a day for the given date.
26363
- *
26364
- * @description
26365
- * Return the start of a day for the given date.
26366
- * The result will be in the local timezone.
26367
- *
26368
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26369
- *
26370
- * @param date - The original date
26371
- *
26372
- * @returns The start of a day
26373
- *
26374
- * @example
26375
- * // The start of a day for 2 September 2014 11:55:00:
26376
- * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
26377
- * //=> Tue Sep 02 2014 00:00:00
26378
- */
26379
- function startOfDay(date) {
26380
- const _date = toDate$1(date);
26381
- _date.setHours(0, 0, 0, 0);
26382
- return _date;
26383
- }
26384
-
26385
- /**
26386
- * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
26387
- * They usually appear for dates that denote time before the timezones were introduced
26388
- * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
26389
- * and GMT+01:00:00 after that date)
26390
- *
26391
- * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
26392
- * which would lead to incorrect calculations.
26393
- *
26394
- * This function returns the timezone offset in milliseconds that takes seconds in account.
26395
- */
26396
- function getTimezoneOffsetInMilliseconds$1(date) {
26397
- const _date = toDate$1(date);
26398
- const utcDate = new Date(
26399
- Date.UTC(
26400
- _date.getFullYear(),
26401
- _date.getMonth(),
26402
- _date.getDate(),
26403
- _date.getHours(),
26404
- _date.getMinutes(),
26405
- _date.getSeconds(),
26406
- _date.getMilliseconds(),
26407
- ),
26408
- );
26409
- utcDate.setUTCFullYear(_date.getFullYear());
26410
- return +date - +utcDate;
26411
- }
26412
-
26413
- /**
26414
- * @name differenceInCalendarDays
26415
- * @category Day Helpers
26416
- * @summary Get the number of calendar days between the given dates.
26417
- *
26418
- * @description
26419
- * Get the number of calendar days between the given dates. This means that the times are removed
26420
- * from the dates and then the difference in days is calculated.
26421
- *
26422
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26423
- *
26424
- * @param dateLeft - The later date
26425
- * @param dateRight - The earlier date
26426
- *
26427
- * @returns The number of calendar days
26428
- *
26429
- * @example
26430
- * // How many calendar days are between
26431
- * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
26432
- * const result = differenceInCalendarDays(
26433
- * new Date(2012, 6, 2, 0, 0),
26434
- * new Date(2011, 6, 2, 23, 0)
26435
- * )
26436
- * //=> 366
26437
- * // How many calendar days are between
26438
- * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
26439
- * const result = differenceInCalendarDays(
26440
- * new Date(2011, 6, 3, 0, 1),
26441
- * new Date(2011, 6, 2, 23, 59)
26442
- * )
26443
- * //=> 1
26444
- */
26445
- function differenceInCalendarDays(dateLeft, dateRight) {
26446
- const startOfDayLeft = startOfDay(dateLeft);
26447
- const startOfDayRight = startOfDay(dateRight);
26448
-
26449
- const timestampLeft =
26450
- +startOfDayLeft - getTimezoneOffsetInMilliseconds$1(startOfDayLeft);
26451
- const timestampRight =
26452
- +startOfDayRight - getTimezoneOffsetInMilliseconds$1(startOfDayRight);
26453
-
26454
- // Round the number of days to the nearest integer because the number of
26455
- // milliseconds in a day is not constant (e.g. it's different in the week of
26456
- // the daylight saving time clock shift).
26457
- return Math.round((timestampLeft - timestampRight) / millisecondsInDay);
26458
- }
26459
-
26460
- /**
26461
- * @name constructFrom
26462
- * @category Generic Helpers
26463
- * @summary Constructs a date using the reference date and the value
26464
- *
26465
- * @description
26466
- * The function constructs a new date using the constructor from the reference
26467
- * date and the given value. It helps to build generic functions that accept
26468
- * date extensions.
26469
- *
26470
- * It defaults to `Date` if the passed reference date is a number or a string.
26471
- *
26472
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26473
- *
26474
- * @param date - The reference date to take constructor from
26475
- * @param value - The value to create the date
26476
- *
26477
- * @returns Date initialized using the given date and value
26478
- *
26479
- * @example
26480
- * import { constructFrom } from 'date-fns'
26481
- *
26482
- * // A function that clones a date preserving the original type
26483
- * function cloneDate<DateType extends Date(date: DateType): DateType {
26484
- * return constructFrom(
26485
- * date, // Use contrustor from the given date
26486
- * date.getTime() // Use the date value to create a new date
26487
- * )
26488
- * }
26489
- */
26490
- function constructFrom(date, value) {
26491
- if (date instanceof Date) {
26492
- return new date.constructor(value);
26493
- } else {
26494
- return new Date(value);
26495
- }
26496
- }
26497
-
26498
- /**
26499
- * @name startOfYear
26500
- * @category Year Helpers
26501
- * @summary Return the start of a year for the given date.
26502
- *
26503
- * @description
26504
- * Return the start of a year for the given date.
26505
- * The result will be in the local timezone.
26506
- *
26507
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26508
- *
26509
- * @param date - The original date
26510
- *
26511
- * @returns The start of a year
26512
- *
26513
- * @example
26514
- * // The start of a year for 2 September 2014 11:55:00:
26515
- * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
26516
- * //=> Wed Jan 01 2014 00:00:00
26517
- */
26518
- function startOfYear(date) {
26519
- const cleanDate = toDate$1(date);
26520
- const _date = constructFrom(date, 0);
26521
- _date.setFullYear(cleanDate.getFullYear(), 0, 1);
26522
- _date.setHours(0, 0, 0, 0);
26523
- return _date;
26524
- }
26525
-
26526
26758
  /**
26527
26759
  * @name getDayOfYear
26528
26760
  * @category Day Helpers
@@ -26549,156 +26781,6 @@ function getDayOfYear(date) {
26549
26781
  return dayOfYear;
26550
26782
  }
26551
26783
 
26552
- /**
26553
- * The {@link startOfWeek} function options.
26554
- */
26555
-
26556
- /**
26557
- * @name startOfWeek
26558
- * @category Week Helpers
26559
- * @summary Return the start of a week for the given date.
26560
- *
26561
- * @description
26562
- * Return the start of a week for the given date.
26563
- * The result will be in the local timezone.
26564
- *
26565
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26566
- *
26567
- * @param date - The original date
26568
- * @param options - An object with options
26569
- *
26570
- * @returns The start of a week
26571
- *
26572
- * @example
26573
- * // The start of a week for 2 September 2014 11:55:00:
26574
- * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
26575
- * //=> Sun Aug 31 2014 00:00:00
26576
- *
26577
- * @example
26578
- * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
26579
- * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
26580
- * //=> Mon Sep 01 2014 00:00:00
26581
- */
26582
- function startOfWeek(date, options) {
26583
- const defaultOptions = getDefaultOptions$1();
26584
- const weekStartsOn =
26585
- options?.weekStartsOn ??
26586
- options?.locale?.options?.weekStartsOn ??
26587
- defaultOptions.weekStartsOn ??
26588
- defaultOptions.locale?.options?.weekStartsOn ??
26589
- 0;
26590
-
26591
- const _date = toDate$1(date);
26592
- const day = _date.getDay();
26593
- const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
26594
-
26595
- _date.setDate(_date.getDate() - diff);
26596
- _date.setHours(0, 0, 0, 0);
26597
- return _date;
26598
- }
26599
-
26600
- /**
26601
- * @name startOfISOWeek
26602
- * @category ISO Week Helpers
26603
- * @summary Return the start of an ISO week for the given date.
26604
- *
26605
- * @description
26606
- * Return the start of an ISO week for the given date.
26607
- * The result will be in the local timezone.
26608
- *
26609
- * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
26610
- *
26611
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26612
- *
26613
- * @param date - The original date
26614
- *
26615
- * @returns The start of an ISO week
26616
- *
26617
- * @example
26618
- * // The start of an ISO week for 2 September 2014 11:55:00:
26619
- * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
26620
- * //=> Mon Sep 01 2014 00:00:00
26621
- */
26622
- function startOfISOWeek(date) {
26623
- return startOfWeek(date, { weekStartsOn: 1 });
26624
- }
26625
-
26626
- /**
26627
- * @name getISOWeekYear
26628
- * @category ISO Week-Numbering Year Helpers
26629
- * @summary Get the ISO week-numbering year of the given date.
26630
- *
26631
- * @description
26632
- * Get the ISO week-numbering year of the given date,
26633
- * which always starts 3 days before the year's first Thursday.
26634
- *
26635
- * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
26636
- *
26637
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26638
- *
26639
- * @param date - The given date
26640
- *
26641
- * @returns The ISO week-numbering year
26642
- *
26643
- * @example
26644
- * // Which ISO-week numbering year is 2 January 2005?
26645
- * const result = getISOWeekYear(new Date(2005, 0, 2))
26646
- * //=> 2004
26647
- */
26648
- function getISOWeekYear(date) {
26649
- const _date = toDate$1(date);
26650
- const year = _date.getFullYear();
26651
-
26652
- const fourthOfJanuaryOfNextYear = constructFrom(date, 0);
26653
- fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
26654
- fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
26655
- const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
26656
-
26657
- const fourthOfJanuaryOfThisYear = constructFrom(date, 0);
26658
- fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
26659
- fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
26660
- const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
26661
-
26662
- if (_date.getTime() >= startOfNextYear.getTime()) {
26663
- return year + 1;
26664
- } else if (_date.getTime() >= startOfThisYear.getTime()) {
26665
- return year;
26666
- } else {
26667
- return year - 1;
26668
- }
26669
- }
26670
-
26671
- /**
26672
- * @name startOfISOWeekYear
26673
- * @category ISO Week-Numbering Year Helpers
26674
- * @summary Return the start of an ISO week-numbering year for the given date.
26675
- *
26676
- * @description
26677
- * Return the start of an ISO week-numbering year,
26678
- * which always starts 3 days before the year's first Thursday.
26679
- * The result will be in the local timezone.
26680
- *
26681
- * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
26682
- *
26683
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
26684
- *
26685
- * @param date - The original date
26686
- *
26687
- * @returns The start of an ISO week-numbering year
26688
- *
26689
- * @example
26690
- * // The start of an ISO week-numbering year for 2 July 2005:
26691
- * const result = startOfISOWeekYear(new Date(2005, 6, 2))
26692
- * //=> Mon Jan 03 2005 00:00:00
26693
- */
26694
- function startOfISOWeekYear(date) {
26695
- const year = getISOWeekYear(date);
26696
- const fourthOfJanuary = constructFrom(date, 0);
26697
- fourthOfJanuary.setFullYear(year, 0, 4);
26698
- fourthOfJanuary.setHours(0, 0, 0, 0);
26699
- return startOfISOWeek(fourthOfJanuary);
26700
- }
26701
-
26702
26784
  /**
26703
26785
  * @name getISOWeek
26704
26786
  * @category ISO Week Helpers
@@ -27862,87 +27944,6 @@ function message(token, format, input) {
27862
27944
  return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
27863
27945
  }
27864
27946
 
27865
- /**
27866
- * @name isDate
27867
- * @category Common Helpers
27868
- * @summary Is the given value a date?
27869
- *
27870
- * @description
27871
- * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
27872
- *
27873
- * @param value - The value to check
27874
- *
27875
- * @returns True if the given value is a date
27876
- *
27877
- * @example
27878
- * // For a valid date:
27879
- * const result = isDate(new Date())
27880
- * //=> true
27881
- *
27882
- * @example
27883
- * // For an invalid date:
27884
- * const result = isDate(new Date(NaN))
27885
- * //=> true
27886
- *
27887
- * @example
27888
- * // For some value:
27889
- * const result = isDate('2014-02-31')
27890
- * //=> false
27891
- *
27892
- * @example
27893
- * // For an object:
27894
- * const result = isDate({})
27895
- * //=> false
27896
- */
27897
- function isDate(value) {
27898
- return (
27899
- value instanceof Date ||
27900
- (typeof value === "object" &&
27901
- Object.prototype.toString.call(value) === "[object Date]")
27902
- );
27903
- }
27904
-
27905
- /**
27906
- * @name isValid
27907
- * @category Common Helpers
27908
- * @summary Is the given date valid?
27909
- *
27910
- * @description
27911
- * Returns false if argument is Invalid Date and true otherwise.
27912
- * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
27913
- * Invalid Date is a Date, whose time value is NaN.
27914
- *
27915
- * Time value of Date: http://es5.github.io/#x15.9.1.1
27916
- *
27917
- * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
27918
- *
27919
- * @param date - The date to check
27920
- *
27921
- * @returns The date is valid
27922
- *
27923
- * @example
27924
- * // For the valid date:
27925
- * const result = isValid(new Date(2014, 1, 31))
27926
- * //=> true
27927
- *
27928
- * @example
27929
- * // For the value, convertable into a date:
27930
- * const result = isValid(1393804800000)
27931
- * //=> true
27932
- *
27933
- * @example
27934
- * // For the invalid date:
27935
- * const result = isValid(new Date(''))
27936
- * //=> false
27937
- */
27938
- function isValid(date) {
27939
- if (!isDate(date) && typeof date !== "number") {
27940
- return false;
27941
- }
27942
- const _date = toDate$1(date);
27943
- return !isNaN(Number(_date));
27944
- }
27945
-
27946
27947
  // This RegExp consists of three parts separated by `|`:
27947
27948
  // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
27948
27949
  // (one of the certain letters followed by `o`)
@@ -29451,6 +29452,40 @@ function format$2(date, formatStr, options = {}) {
29451
29452
  return format$3(date, formatStr, options);
29452
29453
  }
29453
29454
 
29455
+ /**
29456
+ * @name toZonedTime
29457
+ * @category Time Zone Helpers
29458
+ * @summary Get a date/time representing local time in a given time zone from the UTC date
29459
+ *
29460
+ * @description
29461
+ * Returns a date instance with values representing the local time in the time zone
29462
+ * specified of the UTC time from the date provided. In other words, when the new date
29463
+ * is formatted it will show the equivalent hours in the target time zone regardless
29464
+ * of the current system time zone.
29465
+ *
29466
+ * @param date the date with the relevant UTC time
29467
+ * @param timeZone the time zone to get local time for, can be an offset or IANA time zone
29468
+ * @param options the object with options. See [Options]{@link https://date-fns.org/docs/Options}
29469
+ * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
29470
+ *
29471
+ * @throws {TypeError} 2 arguments required
29472
+ * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2
29473
+ *
29474
+ * @example
29475
+ * // In June 10am UTC is 6am in New York (-04:00)
29476
+ * const result = toZonedTime('2014-06-25T10:00:00.000Z', 'America/New_York')
29477
+ * //=> Jun 25 2014 06:00:00
29478
+ */
29479
+ function toZonedTime(date, timeZone, options) {
29480
+ date = toDate(date, options);
29481
+ const offsetMilliseconds = tzParseTimezone(timeZone, date, true);
29482
+ const d = new Date(date.getTime() - offsetMilliseconds);
29483
+ const resultDate = new Date(0);
29484
+ resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());
29485
+ resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds());
29486
+ return resultDate;
29487
+ }
29488
+
29454
29489
  const TimePicker = ({
29455
29490
  value,
29456
29491
  onChange,
@@ -29738,21 +29773,6 @@ const TimePicker = ({
29738
29773
  });
29739
29774
  };
29740
29775
 
29741
- const handleTimeZoneChange = timeZone => {
29742
- const currentDate = new Date();
29743
- return new Intl.DateTimeFormat('en-US', {
29744
- timeZone,
29745
- weekday: 'long',
29746
- year: 'numeric',
29747
- month: 'short',
29748
- day: '2-digit',
29749
- hour: '2-digit',
29750
- minute: '2-digit',
29751
- second: '2-digit',
29752
- hour12: true
29753
- }).format(currentDate);
29754
- };
29755
-
29756
29776
  const CustomDatePicker = /*#__PURE__*/React.forwardRef(({
29757
29777
  minDate,
29758
29778
  maxDate,
@@ -29791,7 +29811,8 @@ const CustomDatePicker = /*#__PURE__*/React.forwardRef(({
29791
29811
  const pickerRef = React.useRef(null); // Ref to track the picker
29792
29812
  const containerRef = React.useRef(null);
29793
29813
  const mergedRef = useMergeRefs(pickerRef, ref);
29794
- const todayInTimeZone = new Date(handleTimeZoneChange(timezone));
29814
+ const todayInTimeZone = startOfDay(toZonedTime(new Date(), timezone));
29815
+ const systemTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
29795
29816
  React.useEffect(() => {
29796
29817
  selectedDateRef.current = selectedDate;
29797
29818
  }, [selectedDate]);
@@ -30135,7 +30156,7 @@ const CustomDatePicker = /*#__PURE__*/React.forwardRef(({
30135
30156
  before: new Date(minDate ? minDate : ''),
30136
30157
  after: new Date(maxDate ? maxDate : '')
30137
30158
  }],
30138
- timeZone: timezone,
30159
+ timeZone: systemTimeZone,
30139
30160
  components: {
30140
30161
  CaptionLabel: props => jsxRuntime.jsx(CustomCaption, {
30141
30162
  ...props
@@ -31611,7 +31632,8 @@ const DashboardDonutChart = ({
31611
31632
  onSelectedStatus = _value => {},
31612
31633
  selectedStatusKey = '',
31613
31634
  setSelectedStatusKey = _selectedStatusKey => {},
31614
- isOnClick = false
31635
+ isOnClick = false,
31636
+ zIndex = 99
31615
31637
  }) => {
31616
31638
  const [hoveredItemIndex, setHoveredItemIndex] = React.useState(null);
31617
31639
  const [hoveredVersion, setHoveredVersion] = React.useState(null);
@@ -32311,6 +32333,9 @@ const DashboardDonutChart = ({
32311
32333
  },
32312
32334
  children: [jsxRuntime.jsxs("div", {
32313
32335
  className: "ff-dashboard-donut-chart-svg-container",
32336
+ style: {
32337
+ zIndex: zIndex
32338
+ },
32314
32339
  children: [jsxRuntime.jsx("svg", {
32315
32340
  width: DONUT_SVG_SIZE,
32316
32341
  height: DONUT_SVG_SIZE,
@@ -37737,7 +37762,7 @@ const EmptyCell = {
37737
37762
  };
37738
37763
  const fontFamilyList = [{
37739
37764
  label: 'Times New Roman',
37740
- value: '"Times New Roman"'
37765
+ value: 'Times New Roman'
37741
37766
  }, {
37742
37767
  label: 'Arial',
37743
37768
  value: 'Arial'
@@ -37761,28 +37786,28 @@ const fontFamilyList = [{
37761
37786
  value: 'Tahoma'
37762
37787
  }, {
37763
37788
  label: 'Trebuchet MS',
37764
- value: '"Trebuchet MS"'
37789
+ value: 'Trebuchet MS'
37765
37790
  }, {
37766
37791
  label: 'Comic Sans MS',
37767
- value: '"Comic Sans MS"'
37792
+ value: 'Comic Sans MS'
37768
37793
  }, {
37769
37794
  label: 'Impact',
37770
37795
  value: 'Impact'
37771
37796
  }, {
37772
37797
  label: 'Arial Black',
37773
- value: '"Arial Black"'
37798
+ value: 'Arial Black'
37774
37799
  }, {
37775
37800
  label: 'Lucida Console',
37776
- value: '"Lucida Console"'
37801
+ value: 'Lucida Console'
37777
37802
  }, {
37778
37803
  label: 'Lucida Sans Unicode',
37779
- value: '"Lucida Sans Unicode"'
37804
+ value: 'Lucida Sans Unicode'
37780
37805
  }, {
37781
37806
  label: 'Courier',
37782
37807
  value: 'Courier'
37783
37808
  }, {
37784
37809
  label: 'Arial Rounded MT Bold',
37785
- value: '"Arial Rounded MT Bold"'
37810
+ value: 'Arial Rounded MT Bold'
37786
37811
  }, {
37787
37812
  label: 'Georgia',
37788
37813
  value: 'Georgia'
@@ -38290,65 +38315,142 @@ function applyBorderToCells(currentData, selectedRange, value, color, editable)
38290
38315
  start,
38291
38316
  end
38292
38317
  } = selectedRange;
38318
+ const getCell = (row, col) => get$1({
38319
+ row,
38320
+ column: col
38321
+ }, updatedData);
38322
+ const setCell = (row, col, cell) => {
38323
+ updatedData = set$1({
38324
+ row,
38325
+ column: col
38326
+ }, cell, updatedData);
38327
+ };
38293
38328
  for (let row = start.row; row <= end.row; row++) {
38294
38329
  for (let col = start.column; col <= end.column; col++) {
38295
- const currentCell = get$1({
38296
- row,
38297
- column: col
38298
- }, updatedData);
38299
- if (!currentCell || !editable) continue;
38300
- if (currentCell.readOnly) continue;
38301
- let updatedCell = {
38302
- ...currentCell
38330
+ const currentCell = getCell(row, col);
38331
+ if (!currentCell || !editable || currentCell.readOnly) continue;
38332
+ const updatedCell = {
38333
+ ...currentCell,
38334
+ style: {
38335
+ ...currentCell.style
38336
+ }
38337
+ };
38338
+ const aboveCell = getCell(row - 1, col);
38339
+ const belowCell = getCell(row + 1, col);
38340
+ const leftCell = getCell(row, col - 1);
38341
+ const rightCell = getCell(row, col + 1);
38342
+ const borderStyle = `2px solid ${color}`;
38343
+ const defaultBorder = `1px solid var(--excel-header-border)`;
38344
+ const applyBorder = side => {
38345
+ switch (side) {
38346
+ case 'borderTop':
38347
+ if (!aboveCell || aboveCell.style?.borderBottom !== borderStyle) {
38348
+ updatedCell.style.borderTop = borderStyle;
38349
+ } else {
38350
+ updatedCell.style.borderTop = 'none';
38351
+ }
38352
+ break;
38353
+ case 'borderBottom':
38354
+ if (!belowCell || belowCell.style?.borderTop !== borderStyle) {
38355
+ updatedCell.style.borderBottom = borderStyle;
38356
+ } else {
38357
+ updatedCell.style.borderBottom = 'none';
38358
+ }
38359
+ break;
38360
+ case 'borderLeft':
38361
+ if (!leftCell || leftCell.style?.borderRight !== borderStyle) {
38362
+ updatedCell.style.borderLeft = borderStyle;
38363
+ } else {
38364
+ updatedCell.style.borderLeft = 'none';
38365
+ }
38366
+ break;
38367
+ case 'borderRight':
38368
+ if (!rightCell || rightCell.style?.borderLeft !== borderStyle) {
38369
+ updatedCell.style.borderRight = borderStyle;
38370
+ } else {
38371
+ updatedCell.style.borderRight = 'none';
38372
+ }
38373
+ break;
38374
+ }
38303
38375
  };
38304
38376
  switch (value) {
38305
38377
  case 'border-all-sides':
38306
- updatedCell.style = {
38307
- ...currentCell.style,
38308
- borderRight: `2px solid ${color}`,
38309
- borderLeft: `2px solid ${color}`,
38310
- borderTop: `2px solid ${color}`,
38311
- borderBottom: `2px solid ${color}`
38312
- };
38378
+ applyBorder('borderTop');
38379
+ applyBorder('borderBottom');
38380
+ applyBorder('borderLeft');
38381
+ applyBorder('borderRight');
38313
38382
  break;
38314
38383
  case 'border-none':
38315
38384
  updatedCell.style = {
38316
- ...currentCell.style,
38317
- borderRight: `1px solid var(--excel-header-border)`,
38318
- borderLeft: `1px solid var(--excel-header-border)`,
38319
- borderTop: `1px solid var(--excel-header-border)`,
38320
- borderBottom: `1px solid var(--excel-header-border)`
38385
+ ...updatedCell.style,
38386
+ borderRight: defaultBorder,
38387
+ borderLeft: defaultBorder,
38388
+ borderTop: defaultBorder,
38389
+ borderBottom: defaultBorder
38321
38390
  };
38391
+ if (aboveCell) {
38392
+ const updatedAbove = {
38393
+ ...aboveCell,
38394
+ style: {
38395
+ ...aboveCell.style
38396
+ }
38397
+ };
38398
+ if (updatedAbove.style.borderBottom === 'none') {
38399
+ updatedAbove.style.borderBottom = borderStyle;
38400
+ setCell(row - 1, col, updatedAbove);
38401
+ }
38402
+ }
38403
+ if (belowCell) {
38404
+ const updatedBelow = {
38405
+ ...belowCell,
38406
+ style: {
38407
+ ...belowCell.style
38408
+ }
38409
+ };
38410
+ if (updatedBelow.style.borderTop === 'none') {
38411
+ updatedBelow.style.borderTop = borderStyle;
38412
+ setCell(row + 1, col, updatedBelow);
38413
+ }
38414
+ }
38415
+ if (leftCell) {
38416
+ const updatedLeft = {
38417
+ ...leftCell,
38418
+ style: {
38419
+ ...leftCell.style
38420
+ }
38421
+ };
38422
+ if (updatedLeft.style.borderRight === 'none') {
38423
+ updatedLeft.style.borderRight = borderStyle;
38424
+ setCell(row, col - 1, updatedLeft);
38425
+ }
38426
+ }
38427
+ if (rightCell) {
38428
+ const updatedRight = {
38429
+ ...rightCell,
38430
+ style: {
38431
+ ...rightCell.style
38432
+ }
38433
+ };
38434
+ if (updatedRight.style.borderLeft === 'none') {
38435
+ updatedRight.style.borderLeft = borderStyle;
38436
+ setCell(row, col + 1, updatedRight);
38437
+ }
38438
+ }
38322
38439
  break;
38323
38440
  case 'border-right':
38324
- updatedCell.style = {
38325
- ...currentCell.style,
38326
- borderRight: `2px solid ${color}`
38327
- };
38441
+ applyBorder('borderRight');
38328
38442
  break;
38329
38443
  case 'border-left':
38330
- updatedCell.style = {
38331
- ...currentCell.style,
38332
- borderLeft: `2px solid ${color}`
38333
- };
38444
+ applyBorder('borderLeft');
38334
38445
  break;
38335
38446
  case 'border-top':
38336
- updatedCell.style = {
38337
- ...currentCell.style,
38338
- borderTop: `2px solid ${color}`
38339
- };
38447
+ applyBorder('borderTop');
38340
38448
  break;
38341
38449
  case 'border-bottom':
38342
- updatedCell.style = {
38343
- ...currentCell.style,
38344
- borderBottom: `2px solid ${color}`
38345
- };
38450
+ applyBorder('borderBottom');
38346
38451
  break;
38347
38452
  }
38348
- updatedData = set$1({
38349
- row,
38350
- column: col
38351
- }, updatedCell, updatedData);
38453
+ setCell(row, col, updatedCell);
38352
38454
  }
38353
38455
  }
38354
38456
  return updatedData;
@@ -41417,7 +41519,8 @@ const Cell = ({
41417
41519
  select,
41418
41520
  activate,
41419
41521
  setCellDimensions,
41420
- setCellData
41522
+ setCellData,
41523
+ editable
41421
41524
  }) => {
41422
41525
  const rootRef = React__namespace.useRef(null);
41423
41526
  const point = React__namespace.useMemo(() => ({
@@ -41425,6 +41528,7 @@ const Cell = ({
41425
41528
  column
41426
41529
  }), [row, column]);
41427
41530
  const handleMouseDown = React__namespace.useCallback(event => {
41531
+ if (!editable) return;
41428
41532
  if (mode === 'view') {
41429
41533
  setCellDimensions(point, getOffsetRect(event.currentTarget));
41430
41534
  if (event.shiftKey) {
@@ -43030,7 +43134,8 @@ const Spreadsheet = props => {
43030
43134
  row: rowNumber,
43031
43135
  column: columnNumber,
43032
43136
  // @ts-ignore
43033
- DataViewer: DataViewer$1
43137
+ DataViewer: DataViewer$1,
43138
+ editable: editable$1
43034
43139
  }, columnNumber))]
43035
43140
  }, rowNumber))]
43036
43141
  }), [Table$1, size.rows, size.columns, Row$1, HeaderRow$1, CornerIndicator$1, columnLabels, ColumnIndicator, rowLabels, RowIndicator$1, Cell$1, DataViewer$1, visibleRange.end, visibleRange.start]);
@@ -50302,7 +50407,6 @@ const SessionDropdown = ({
50302
50407
  className: `ff-dropdown-header-item ${activeTab === 'primary' ? 'active' : ''}`,
50303
50408
  onClick: onPrimaryTabClick,
50304
50409
  children: [jsxRuntime.jsx(Typography, {
50305
- fontSize: 16,
50306
50410
  fontWeight: "semi-bold",
50307
50411
  className: "ff-dropdown-text",
50308
50412
  children: header
@@ -50314,7 +50418,6 @@ const SessionDropdown = ({
50314
50418
  className: `ff-dropdown-header-item ${activeTab === 'secondary' ? 'active' : ''}`,
50315
50419
  onClick: onSecondaryTabClick,
50316
50420
  children: [jsxRuntime.jsx(Typography, {
50317
- fontSize: 16,
50318
50421
  fontWeight: "semi-bold",
50319
50422
  className: "ff-dropdown-text",
50320
50423
  children: secondaryHeader
@@ -56610,7 +56713,7 @@ const BarChart = ({
56610
56713
  const chartWidth = totalBarWidth + leftPadding * 2 + 10 + extendBarChartRightWidth;
56611
56714
  const id = Date.now();
56612
56715
  const renderGradients = gradients => {
56613
- return gradients.map((gradient, index) => jsxRuntime.jsx("defs", {
56716
+ return gradients.filter(gradient => gradient.length > 1).map((gradient, index) => jsxRuntime.jsx("defs", {
56614
56717
  children: jsxRuntime.jsx("linearGradient", {
56615
56718
  id: `gradient-${id}-${type}-${index}`,
56616
56719
  x1: "0%",
@@ -56624,7 +56727,11 @@ const BarChart = ({
56624
56727
  })
56625
56728
  }, index));
56626
56729
  };
56627
- const getFillColor = index => colors?.[index % colors.length]?.[0] ? `url(#gradient-${id}-${type}-${index % colors.length})` : 'grey';
56730
+ const getFillColor = index => {
56731
+ if (!colors.length) return 'grey';
56732
+ const colorGroup = colors[index % colors.length];
56733
+ return colorGroup?.length === 1 ? colorGroup[0] : `url(#gradient-${id}-${type}-${index % colors.length})`;
56734
+ };
56628
56735
  const handleMouseEnter = (label, value, id, percent, versions) => {
56629
56736
  setIsHoveringBar(true);
56630
56737
  const tooltip = tooltipRef.current;
@@ -64352,14 +64459,14 @@ const MachineInstances = ({
64352
64459
  },
64353
64460
  children: [jsxRuntime.jsx("div", {
64354
64461
  className: `ff-curve-right-icon ff-curve-right-icon-${runLevelExecutionDataSetIndex}`
64355
- }), childNodeData?.runScriptCount && jsxRuntime.jsx("div", {
64462
+ }), Number(childNodeData?.runScriptCount) ? jsxRuntime.jsx("div", {
64356
64463
  className: "ff-selectedMachines-connecting-line-text",
64357
64464
  children: jsxRuntime.jsx(Typography, {
64358
64465
  fontSize: 8,
64359
64466
  fontWeight: "regular",
64360
- children: `${childNodeData.runScriptCount} Script${childNodeData.runScriptCount !== 1 ? 's' : ''}`
64467
+ children: `${![0, '0', null].includes(childNodeData.runScriptCount) ? childNodeData.runScriptCount : ''} Script${childNodeData.runScriptCount !== 1 ? 's' : ''}`
64361
64468
  })
64362
- })]
64469
+ }) : jsxRuntime.jsx(jsxRuntime.Fragment, {})]
64363
64470
  })
64364
64471
  }), jsxRuntime.jsx("div", {
64365
64472
  className: "ff-run-data-box",
@@ -79032,6 +79139,21 @@ const convertToISO = dateString => {
79032
79139
  return new Date(`${formattedDate}T${formattedTime}`);
79033
79140
  };
79034
79141
 
79142
+ const handleTimeZoneChange = timeZone => {
79143
+ const currentDate = new Date();
79144
+ return new Intl.DateTimeFormat('en-US', {
79145
+ timeZone,
79146
+ weekday: 'long',
79147
+ year: 'numeric',
79148
+ month: 'short',
79149
+ day: '2-digit',
79150
+ hour: '2-digit',
79151
+ minute: '2-digit',
79152
+ second: '2-digit',
79153
+ hour12: true
79154
+ }).format(currentDate);
79155
+ };
79156
+
79035
79157
  const PrePostStepAccordions = ({
79036
79158
  data,
79037
79159
  level = 0,