pixel-react 1.14.42 → 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 (35) 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/SessionDropdown/SessionDropdown.js +0 -2
  25. package/lib/components/SessionDropdown/SessionDropdown.js.map +1 -1
  26. package/lib/index.cjs +688 -567
  27. package/lib/index.cjs.map +1 -1
  28. package/lib/index.d.ts +1 -0
  29. package/lib/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js +39 -0
  30. package/lib/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js.map +1 -0
  31. package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
  32. package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
  33. package/lib/styles.css +1 -1
  34. package/lib/styles.css.map +1 -1
  35. 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
 
@@ -25621,6 +25621,498 @@ function DayPicker(initialProps) {
25621
25621
  }, props.footer))));
25622
25622
  }
25623
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
+
25624
26116
  const formatDistanceLocale = {
25625
26117
  lessThanXSeconds: {
25626
26118
  one: "less than a second",
@@ -26263,267 +26755,6 @@ const enUS = {
26263
26755
  },
26264
26756
  };
26265
26757
 
26266
- let defaultOptions = {};
26267
-
26268
- function getDefaultOptions$1() {
26269
- return defaultOptions;
26270
- }
26271
-
26272
- /**
26273
- * @module constants
26274
- * @summary Useful constants
26275
- * @description
26276
- * Collection of useful date constants.
26277
- *
26278
- * The constants could be imported from `date-fns/constants`:
26279
- *
26280
- * ```ts
26281
- * import { maxTime, minTime } from "./constants/date-fns/constants";
26282
- *
26283
- * function isAllowedTime(time) {
26284
- * return time <= maxTime && time >= minTime;
26285
- * }
26286
- * ```
26287
- */
26288
-
26289
-
26290
- /**
26291
- * @constant
26292
- * @name millisecondsInWeek
26293
- * @summary Milliseconds in 1 week.
26294
- */
26295
- const millisecondsInWeek = 604800000;
26296
-
26297
- /**
26298
- * @constant
26299
- * @name millisecondsInDay
26300
- * @summary Milliseconds in 1 day.
26301
- */
26302
- const millisecondsInDay = 86400000;
26303
-
26304
- /**
26305
- * @name toDate
26306
- * @category Common Helpers
26307
- * @summary Convert the given argument to an instance of Date.
26308
- *
26309
- * @description
26310
- * Convert the given argument to an instance of Date.
26311
- *
26312
- * If the argument is an instance of Date, the function returns its clone.
26313
- *
26314
- * If the argument is a number, it is treated as a timestamp.
26315
- *
26316
- * If the argument is none of the above, the function returns Invalid Date.
26317
- *
26318
- * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
26319
- *
26320
- * @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).
26321
- *
26322
- * @param argument - The value to convert
26323
- *
26324
- * @returns The parsed date in the local time zone
26325
- *
26326
- * @example
26327
- * // Clone the date:
26328
- * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
26329
- * //=> Tue Feb 11 2014 11:30:30
26330
- *
26331
- * @example
26332
- * // Convert the timestamp to date:
26333
- * const result = toDate(1392098430000)
26334
- * //=> Tue Feb 11 2014 11:30:30
26335
- */
26336
- function toDate$1(argument) {
26337
- const argStr = Object.prototype.toString.call(argument);
26338
-
26339
- // Clone the date
26340
- if (
26341
- argument instanceof Date ||
26342
- (typeof argument === "object" && argStr === "[object Date]")
26343
- ) {
26344
- // Prevent the date to lose the milliseconds when passed to new Date() in IE10
26345
- return new argument.constructor(+argument);
26346
- } else if (
26347
- typeof argument === "number" ||
26348
- argStr === "[object Number]" ||
26349
- typeof argument === "string" ||
26350
- argStr === "[object String]"
26351
- ) {
26352
- // TODO: Can we get rid of as?
26353
- return new Date(argument);
26354
- } else {
26355
- // TODO: Can we get rid of as?
26356
- return new Date(NaN);
26357
- }
26358
- }
26359
-
26360
- /**
26361
- * @name startOfDay
26362
- * @category Day Helpers
26363
- * @summary Return the start of a day for the given date.
26364
- *
26365
- * @description
26366
- * Return the start of a day for the given date.
26367
- * The result will be in the local timezone.
26368
- *
26369
- * @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).
26370
- *
26371
- * @param date - The original date
26372
- *
26373
- * @returns The start of a day
26374
- *
26375
- * @example
26376
- * // The start of a day for 2 September 2014 11:55:00:
26377
- * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
26378
- * //=> Tue Sep 02 2014 00:00:00
26379
- */
26380
- function startOfDay(date) {
26381
- const _date = toDate$1(date);
26382
- _date.setHours(0, 0, 0, 0);
26383
- return _date;
26384
- }
26385
-
26386
- /**
26387
- * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
26388
- * They usually appear for dates that denote time before the timezones were introduced
26389
- * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
26390
- * and GMT+01:00:00 after that date)
26391
- *
26392
- * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
26393
- * which would lead to incorrect calculations.
26394
- *
26395
- * This function returns the timezone offset in milliseconds that takes seconds in account.
26396
- */
26397
- function getTimezoneOffsetInMilliseconds$1(date) {
26398
- const _date = toDate$1(date);
26399
- const utcDate = new Date(
26400
- Date.UTC(
26401
- _date.getFullYear(),
26402
- _date.getMonth(),
26403
- _date.getDate(),
26404
- _date.getHours(),
26405
- _date.getMinutes(),
26406
- _date.getSeconds(),
26407
- _date.getMilliseconds(),
26408
- ),
26409
- );
26410
- utcDate.setUTCFullYear(_date.getFullYear());
26411
- return +date - +utcDate;
26412
- }
26413
-
26414
- /**
26415
- * @name differenceInCalendarDays
26416
- * @category Day Helpers
26417
- * @summary Get the number of calendar days between the given dates.
26418
- *
26419
- * @description
26420
- * Get the number of calendar days between the given dates. This means that the times are removed
26421
- * from the dates and then the difference in days is calculated.
26422
- *
26423
- * @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).
26424
- *
26425
- * @param dateLeft - The later date
26426
- * @param dateRight - The earlier date
26427
- *
26428
- * @returns The number of calendar days
26429
- *
26430
- * @example
26431
- * // How many calendar days are between
26432
- * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
26433
- * const result = differenceInCalendarDays(
26434
- * new Date(2012, 6, 2, 0, 0),
26435
- * new Date(2011, 6, 2, 23, 0)
26436
- * )
26437
- * //=> 366
26438
- * // How many calendar days are between
26439
- * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
26440
- * const result = differenceInCalendarDays(
26441
- * new Date(2011, 6, 3, 0, 1),
26442
- * new Date(2011, 6, 2, 23, 59)
26443
- * )
26444
- * //=> 1
26445
- */
26446
- function differenceInCalendarDays(dateLeft, dateRight) {
26447
- const startOfDayLeft = startOfDay(dateLeft);
26448
- const startOfDayRight = startOfDay(dateRight);
26449
-
26450
- const timestampLeft =
26451
- +startOfDayLeft - getTimezoneOffsetInMilliseconds$1(startOfDayLeft);
26452
- const timestampRight =
26453
- +startOfDayRight - getTimezoneOffsetInMilliseconds$1(startOfDayRight);
26454
-
26455
- // Round the number of days to the nearest integer because the number of
26456
- // milliseconds in a day is not constant (e.g. it's different in the week of
26457
- // the daylight saving time clock shift).
26458
- return Math.round((timestampLeft - timestampRight) / millisecondsInDay);
26459
- }
26460
-
26461
- /**
26462
- * @name constructFrom
26463
- * @category Generic Helpers
26464
- * @summary Constructs a date using the reference date and the value
26465
- *
26466
- * @description
26467
- * The function constructs a new date using the constructor from the reference
26468
- * date and the given value. It helps to build generic functions that accept
26469
- * date extensions.
26470
- *
26471
- * It defaults to `Date` if the passed reference date is a number or a string.
26472
- *
26473
- * @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).
26474
- *
26475
- * @param date - The reference date to take constructor from
26476
- * @param value - The value to create the date
26477
- *
26478
- * @returns Date initialized using the given date and value
26479
- *
26480
- * @example
26481
- * import { constructFrom } from 'date-fns'
26482
- *
26483
- * // A function that clones a date preserving the original type
26484
- * function cloneDate<DateType extends Date(date: DateType): DateType {
26485
- * return constructFrom(
26486
- * date, // Use contrustor from the given date
26487
- * date.getTime() // Use the date value to create a new date
26488
- * )
26489
- * }
26490
- */
26491
- function constructFrom(date, value) {
26492
- if (date instanceof Date) {
26493
- return new date.constructor(value);
26494
- } else {
26495
- return new Date(value);
26496
- }
26497
- }
26498
-
26499
- /**
26500
- * @name startOfYear
26501
- * @category Year Helpers
26502
- * @summary Return the start of a year for the given date.
26503
- *
26504
- * @description
26505
- * Return the start of a year for the given date.
26506
- * The result will be in the local timezone.
26507
- *
26508
- * @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).
26509
- *
26510
- * @param date - The original date
26511
- *
26512
- * @returns The start of a year
26513
- *
26514
- * @example
26515
- * // The start of a year for 2 September 2014 11:55:00:
26516
- * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
26517
- * //=> Wed Jan 01 2014 00:00:00
26518
- */
26519
- function startOfYear(date) {
26520
- const cleanDate = toDate$1(date);
26521
- const _date = constructFrom(date, 0);
26522
- _date.setFullYear(cleanDate.getFullYear(), 0, 1);
26523
- _date.setHours(0, 0, 0, 0);
26524
- return _date;
26525
- }
26526
-
26527
26758
  /**
26528
26759
  * @name getDayOfYear
26529
26760
  * @category Day Helpers
@@ -26550,156 +26781,6 @@ function getDayOfYear(date) {
26550
26781
  return dayOfYear;
26551
26782
  }
26552
26783
 
26553
- /**
26554
- * The {@link startOfWeek} function options.
26555
- */
26556
-
26557
- /**
26558
- * @name startOfWeek
26559
- * @category Week Helpers
26560
- * @summary Return the start of a week for the given date.
26561
- *
26562
- * @description
26563
- * Return the start of a week for the given date.
26564
- * The result will be in the local timezone.
26565
- *
26566
- * @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).
26567
- *
26568
- * @param date - The original date
26569
- * @param options - An object with options
26570
- *
26571
- * @returns The start of a week
26572
- *
26573
- * @example
26574
- * // The start of a week for 2 September 2014 11:55:00:
26575
- * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
26576
- * //=> Sun Aug 31 2014 00:00:00
26577
- *
26578
- * @example
26579
- * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
26580
- * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
26581
- * //=> Mon Sep 01 2014 00:00:00
26582
- */
26583
- function startOfWeek(date, options) {
26584
- const defaultOptions = getDefaultOptions$1();
26585
- const weekStartsOn =
26586
- options?.weekStartsOn ??
26587
- options?.locale?.options?.weekStartsOn ??
26588
- defaultOptions.weekStartsOn ??
26589
- defaultOptions.locale?.options?.weekStartsOn ??
26590
- 0;
26591
-
26592
- const _date = toDate$1(date);
26593
- const day = _date.getDay();
26594
- const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
26595
-
26596
- _date.setDate(_date.getDate() - diff);
26597
- _date.setHours(0, 0, 0, 0);
26598
- return _date;
26599
- }
26600
-
26601
- /**
26602
- * @name startOfISOWeek
26603
- * @category ISO Week Helpers
26604
- * @summary Return the start of an ISO week for the given date.
26605
- *
26606
- * @description
26607
- * Return the start of an ISO week for the given date.
26608
- * The result will be in the local timezone.
26609
- *
26610
- * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
26611
- *
26612
- * @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).
26613
- *
26614
- * @param date - The original date
26615
- *
26616
- * @returns The start of an ISO week
26617
- *
26618
- * @example
26619
- * // The start of an ISO week for 2 September 2014 11:55:00:
26620
- * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
26621
- * //=> Mon Sep 01 2014 00:00:00
26622
- */
26623
- function startOfISOWeek(date) {
26624
- return startOfWeek(date, { weekStartsOn: 1 });
26625
- }
26626
-
26627
- /**
26628
- * @name getISOWeekYear
26629
- * @category ISO Week-Numbering Year Helpers
26630
- * @summary Get the ISO week-numbering year of the given date.
26631
- *
26632
- * @description
26633
- * Get the ISO week-numbering year of the given date,
26634
- * which always starts 3 days before the year's first Thursday.
26635
- *
26636
- * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
26637
- *
26638
- * @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).
26639
- *
26640
- * @param date - The given date
26641
- *
26642
- * @returns The ISO week-numbering year
26643
- *
26644
- * @example
26645
- * // Which ISO-week numbering year is 2 January 2005?
26646
- * const result = getISOWeekYear(new Date(2005, 0, 2))
26647
- * //=> 2004
26648
- */
26649
- function getISOWeekYear(date) {
26650
- const _date = toDate$1(date);
26651
- const year = _date.getFullYear();
26652
-
26653
- const fourthOfJanuaryOfNextYear = constructFrom(date, 0);
26654
- fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
26655
- fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
26656
- const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
26657
-
26658
- const fourthOfJanuaryOfThisYear = constructFrom(date, 0);
26659
- fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
26660
- fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
26661
- const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
26662
-
26663
- if (_date.getTime() >= startOfNextYear.getTime()) {
26664
- return year + 1;
26665
- } else if (_date.getTime() >= startOfThisYear.getTime()) {
26666
- return year;
26667
- } else {
26668
- return year - 1;
26669
- }
26670
- }
26671
-
26672
- /**
26673
- * @name startOfISOWeekYear
26674
- * @category ISO Week-Numbering Year Helpers
26675
- * @summary Return the start of an ISO week-numbering year for the given date.
26676
- *
26677
- * @description
26678
- * Return the start of an ISO week-numbering year,
26679
- * which always starts 3 days before the year's first Thursday.
26680
- * The result will be in the local timezone.
26681
- *
26682
- * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
26683
- *
26684
- * @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).
26685
- *
26686
- * @param date - The original date
26687
- *
26688
- * @returns The start of an ISO week-numbering year
26689
- *
26690
- * @example
26691
- * // The start of an ISO week-numbering year for 2 July 2005:
26692
- * const result = startOfISOWeekYear(new Date(2005, 6, 2))
26693
- * //=> Mon Jan 03 2005 00:00:00
26694
- */
26695
- function startOfISOWeekYear(date) {
26696
- const year = getISOWeekYear(date);
26697
- const fourthOfJanuary = constructFrom(date, 0);
26698
- fourthOfJanuary.setFullYear(year, 0, 4);
26699
- fourthOfJanuary.setHours(0, 0, 0, 0);
26700
- return startOfISOWeek(fourthOfJanuary);
26701
- }
26702
-
26703
26784
  /**
26704
26785
  * @name getISOWeek
26705
26786
  * @category ISO Week Helpers
@@ -27863,87 +27944,6 @@ function message(token, format, input) {
27863
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`;
27864
27945
  }
27865
27946
 
27866
- /**
27867
- * @name isDate
27868
- * @category Common Helpers
27869
- * @summary Is the given value a date?
27870
- *
27871
- * @description
27872
- * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
27873
- *
27874
- * @param value - The value to check
27875
- *
27876
- * @returns True if the given value is a date
27877
- *
27878
- * @example
27879
- * // For a valid date:
27880
- * const result = isDate(new Date())
27881
- * //=> true
27882
- *
27883
- * @example
27884
- * // For an invalid date:
27885
- * const result = isDate(new Date(NaN))
27886
- * //=> true
27887
- *
27888
- * @example
27889
- * // For some value:
27890
- * const result = isDate('2014-02-31')
27891
- * //=> false
27892
- *
27893
- * @example
27894
- * // For an object:
27895
- * const result = isDate({})
27896
- * //=> false
27897
- */
27898
- function isDate(value) {
27899
- return (
27900
- value instanceof Date ||
27901
- (typeof value === "object" &&
27902
- Object.prototype.toString.call(value) === "[object Date]")
27903
- );
27904
- }
27905
-
27906
- /**
27907
- * @name isValid
27908
- * @category Common Helpers
27909
- * @summary Is the given date valid?
27910
- *
27911
- * @description
27912
- * Returns false if argument is Invalid Date and true otherwise.
27913
- * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)
27914
- * Invalid Date is a Date, whose time value is NaN.
27915
- *
27916
- * Time value of Date: http://es5.github.io/#x15.9.1.1
27917
- *
27918
- * @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).
27919
- *
27920
- * @param date - The date to check
27921
- *
27922
- * @returns The date is valid
27923
- *
27924
- * @example
27925
- * // For the valid date:
27926
- * const result = isValid(new Date(2014, 1, 31))
27927
- * //=> true
27928
- *
27929
- * @example
27930
- * // For the value, convertable into a date:
27931
- * const result = isValid(1393804800000)
27932
- * //=> true
27933
- *
27934
- * @example
27935
- * // For the invalid date:
27936
- * const result = isValid(new Date(''))
27937
- * //=> false
27938
- */
27939
- function isValid(date) {
27940
- if (!isDate(date) && typeof date !== "number") {
27941
- return false;
27942
- }
27943
- const _date = toDate$1(date);
27944
- return !isNaN(Number(_date));
27945
- }
27946
-
27947
27947
  // This RegExp consists of three parts separated by `|`:
27948
27948
  // - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
27949
27949
  // (one of the certain letters followed by `o`)
@@ -29452,6 +29452,40 @@ function format$2(date, formatStr, options = {}) {
29452
29452
  return format$3(date, formatStr, options);
29453
29453
  }
29454
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
+
29455
29489
  const TimePicker = ({
29456
29490
  value,
29457
29491
  onChange,
@@ -29739,21 +29773,6 @@ const TimePicker = ({
29739
29773
  });
29740
29774
  };
29741
29775
 
29742
- const handleTimeZoneChange = timeZone => {
29743
- const currentDate = new Date();
29744
- return new Intl.DateTimeFormat('en-US', {
29745
- timeZone,
29746
- weekday: 'long',
29747
- year: 'numeric',
29748
- month: 'short',
29749
- day: '2-digit',
29750
- hour: '2-digit',
29751
- minute: '2-digit',
29752
- second: '2-digit',
29753
- hour12: true
29754
- }).format(currentDate);
29755
- };
29756
-
29757
29776
  const CustomDatePicker = /*#__PURE__*/React.forwardRef(({
29758
29777
  minDate,
29759
29778
  maxDate,
@@ -29792,7 +29811,8 @@ const CustomDatePicker = /*#__PURE__*/React.forwardRef(({
29792
29811
  const pickerRef = React.useRef(null); // Ref to track the picker
29793
29812
  const containerRef = React.useRef(null);
29794
29813
  const mergedRef = useMergeRefs(pickerRef, ref);
29795
- const todayInTimeZone = new Date(handleTimeZoneChange(timezone));
29814
+ const todayInTimeZone = startOfDay(toZonedTime(new Date(), timezone));
29815
+ const systemTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
29796
29816
  React.useEffect(() => {
29797
29817
  selectedDateRef.current = selectedDate;
29798
29818
  }, [selectedDate]);
@@ -30136,7 +30156,7 @@ const CustomDatePicker = /*#__PURE__*/React.forwardRef(({
30136
30156
  before: new Date(minDate ? minDate : ''),
30137
30157
  after: new Date(maxDate ? maxDate : '')
30138
30158
  }],
30139
- timeZone: timezone,
30159
+ timeZone: systemTimeZone,
30140
30160
  components: {
30141
30161
  CaptionLabel: props => jsxRuntime.jsx(CustomCaption, {
30142
30162
  ...props
@@ -31612,7 +31632,8 @@ const DashboardDonutChart = ({
31612
31632
  onSelectedStatus = _value => {},
31613
31633
  selectedStatusKey = '',
31614
31634
  setSelectedStatusKey = _selectedStatusKey => {},
31615
- isOnClick = false
31635
+ isOnClick = false,
31636
+ zIndex = 99
31616
31637
  }) => {
31617
31638
  const [hoveredItemIndex, setHoveredItemIndex] = React.useState(null);
31618
31639
  const [hoveredVersion, setHoveredVersion] = React.useState(null);
@@ -32312,6 +32333,9 @@ const DashboardDonutChart = ({
32312
32333
  },
32313
32334
  children: [jsxRuntime.jsxs("div", {
32314
32335
  className: "ff-dashboard-donut-chart-svg-container",
32336
+ style: {
32337
+ zIndex: zIndex
32338
+ },
32315
32339
  children: [jsxRuntime.jsx("svg", {
32316
32340
  width: DONUT_SVG_SIZE,
32317
32341
  height: DONUT_SVG_SIZE,
@@ -37738,7 +37762,7 @@ const EmptyCell = {
37738
37762
  };
37739
37763
  const fontFamilyList = [{
37740
37764
  label: 'Times New Roman',
37741
- value: '"Times New Roman"'
37765
+ value: 'Times New Roman'
37742
37766
  }, {
37743
37767
  label: 'Arial',
37744
37768
  value: 'Arial'
@@ -37762,28 +37786,28 @@ const fontFamilyList = [{
37762
37786
  value: 'Tahoma'
37763
37787
  }, {
37764
37788
  label: 'Trebuchet MS',
37765
- value: '"Trebuchet MS"'
37789
+ value: 'Trebuchet MS'
37766
37790
  }, {
37767
37791
  label: 'Comic Sans MS',
37768
- value: '"Comic Sans MS"'
37792
+ value: 'Comic Sans MS'
37769
37793
  }, {
37770
37794
  label: 'Impact',
37771
37795
  value: 'Impact'
37772
37796
  }, {
37773
37797
  label: 'Arial Black',
37774
- value: '"Arial Black"'
37798
+ value: 'Arial Black'
37775
37799
  }, {
37776
37800
  label: 'Lucida Console',
37777
- value: '"Lucida Console"'
37801
+ value: 'Lucida Console'
37778
37802
  }, {
37779
37803
  label: 'Lucida Sans Unicode',
37780
- value: '"Lucida Sans Unicode"'
37804
+ value: 'Lucida Sans Unicode'
37781
37805
  }, {
37782
37806
  label: 'Courier',
37783
37807
  value: 'Courier'
37784
37808
  }, {
37785
37809
  label: 'Arial Rounded MT Bold',
37786
- value: '"Arial Rounded MT Bold"'
37810
+ value: 'Arial Rounded MT Bold'
37787
37811
  }, {
37788
37812
  label: 'Georgia',
37789
37813
  value: 'Georgia'
@@ -38291,65 +38315,142 @@ function applyBorderToCells(currentData, selectedRange, value, color, editable)
38291
38315
  start,
38292
38316
  end
38293
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
+ };
38294
38328
  for (let row = start.row; row <= end.row; row++) {
38295
38329
  for (let col = start.column; col <= end.column; col++) {
38296
- const currentCell = get$1({
38297
- row,
38298
- column: col
38299
- }, updatedData);
38300
- if (!currentCell || !editable) continue;
38301
- if (currentCell.readOnly) continue;
38302
- let updatedCell = {
38303
- ...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
+ }
38304
38375
  };
38305
38376
  switch (value) {
38306
38377
  case 'border-all-sides':
38307
- updatedCell.style = {
38308
- ...currentCell.style,
38309
- borderRight: `2px solid ${color}`,
38310
- borderLeft: `2px solid ${color}`,
38311
- borderTop: `2px solid ${color}`,
38312
- borderBottom: `2px solid ${color}`
38313
- };
38378
+ applyBorder('borderTop');
38379
+ applyBorder('borderBottom');
38380
+ applyBorder('borderLeft');
38381
+ applyBorder('borderRight');
38314
38382
  break;
38315
38383
  case 'border-none':
38316
38384
  updatedCell.style = {
38317
- ...currentCell.style,
38318
- borderRight: `1px solid var(--excel-header-border)`,
38319
- borderLeft: `1px solid var(--excel-header-border)`,
38320
- borderTop: `1px solid var(--excel-header-border)`,
38321
- borderBottom: `1px solid var(--excel-header-border)`
38385
+ ...updatedCell.style,
38386
+ borderRight: defaultBorder,
38387
+ borderLeft: defaultBorder,
38388
+ borderTop: defaultBorder,
38389
+ borderBottom: defaultBorder
38322
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
+ }
38323
38439
  break;
38324
38440
  case 'border-right':
38325
- updatedCell.style = {
38326
- ...currentCell.style,
38327
- borderRight: `2px solid ${color}`
38328
- };
38441
+ applyBorder('borderRight');
38329
38442
  break;
38330
38443
  case 'border-left':
38331
- updatedCell.style = {
38332
- ...currentCell.style,
38333
- borderLeft: `2px solid ${color}`
38334
- };
38444
+ applyBorder('borderLeft');
38335
38445
  break;
38336
38446
  case 'border-top':
38337
- updatedCell.style = {
38338
- ...currentCell.style,
38339
- borderTop: `2px solid ${color}`
38340
- };
38447
+ applyBorder('borderTop');
38341
38448
  break;
38342
38449
  case 'border-bottom':
38343
- updatedCell.style = {
38344
- ...currentCell.style,
38345
- borderBottom: `2px solid ${color}`
38346
- };
38450
+ applyBorder('borderBottom');
38347
38451
  break;
38348
38452
  }
38349
- updatedData = set$1({
38350
- row,
38351
- column: col
38352
- }, updatedCell, updatedData);
38453
+ setCell(row, col, updatedCell);
38353
38454
  }
38354
38455
  }
38355
38456
  return updatedData;
@@ -41418,7 +41519,8 @@ const Cell = ({
41418
41519
  select,
41419
41520
  activate,
41420
41521
  setCellDimensions,
41421
- setCellData
41522
+ setCellData,
41523
+ editable
41422
41524
  }) => {
41423
41525
  const rootRef = React__namespace.useRef(null);
41424
41526
  const point = React__namespace.useMemo(() => ({
@@ -41426,6 +41528,7 @@ const Cell = ({
41426
41528
  column
41427
41529
  }), [row, column]);
41428
41530
  const handleMouseDown = React__namespace.useCallback(event => {
41531
+ if (!editable) return;
41429
41532
  if (mode === 'view') {
41430
41533
  setCellDimensions(point, getOffsetRect(event.currentTarget));
41431
41534
  if (event.shiftKey) {
@@ -43031,7 +43134,8 @@ const Spreadsheet = props => {
43031
43134
  row: rowNumber,
43032
43135
  column: columnNumber,
43033
43136
  // @ts-ignore
43034
- DataViewer: DataViewer$1
43137
+ DataViewer: DataViewer$1,
43138
+ editable: editable$1
43035
43139
  }, columnNumber))]
43036
43140
  }, rowNumber))]
43037
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]);
@@ -50303,7 +50407,6 @@ const SessionDropdown = ({
50303
50407
  className: `ff-dropdown-header-item ${activeTab === 'primary' ? 'active' : ''}`,
50304
50408
  onClick: onPrimaryTabClick,
50305
50409
  children: [jsxRuntime.jsx(Typography, {
50306
- fontSize: 16,
50307
50410
  fontWeight: "semi-bold",
50308
50411
  className: "ff-dropdown-text",
50309
50412
  children: header
@@ -50315,7 +50418,6 @@ const SessionDropdown = ({
50315
50418
  className: `ff-dropdown-header-item ${activeTab === 'secondary' ? 'active' : ''}`,
50316
50419
  onClick: onSecondaryTabClick,
50317
50420
  children: [jsxRuntime.jsx(Typography, {
50318
- fontSize: 16,
50319
50421
  fontWeight: "semi-bold",
50320
50422
  className: "ff-dropdown-text",
50321
50423
  children: secondaryHeader
@@ -56611,7 +56713,7 @@ const BarChart = ({
56611
56713
  const chartWidth = totalBarWidth + leftPadding * 2 + 10 + extendBarChartRightWidth;
56612
56714
  const id = Date.now();
56613
56715
  const renderGradients = gradients => {
56614
- return gradients.map((gradient, index) => jsxRuntime.jsx("defs", {
56716
+ return gradients.filter(gradient => gradient.length > 1).map((gradient, index) => jsxRuntime.jsx("defs", {
56615
56717
  children: jsxRuntime.jsx("linearGradient", {
56616
56718
  id: `gradient-${id}-${type}-${index}`,
56617
56719
  x1: "0%",
@@ -56625,7 +56727,11 @@ const BarChart = ({
56625
56727
  })
56626
56728
  }, index));
56627
56729
  };
56628
- 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
+ };
56629
56735
  const handleMouseEnter = (label, value, id, percent, versions) => {
56630
56736
  setIsHoveringBar(true);
56631
56737
  const tooltip = tooltipRef.current;
@@ -64353,14 +64459,14 @@ const MachineInstances = ({
64353
64459
  },
64354
64460
  children: [jsxRuntime.jsx("div", {
64355
64461
  className: `ff-curve-right-icon ff-curve-right-icon-${runLevelExecutionDataSetIndex}`
64356
- }), childNodeData?.runScriptCount && jsxRuntime.jsx("div", {
64462
+ }), Number(childNodeData?.runScriptCount) ? jsxRuntime.jsx("div", {
64357
64463
  className: "ff-selectedMachines-connecting-line-text",
64358
64464
  children: jsxRuntime.jsx(Typography, {
64359
64465
  fontSize: 8,
64360
64466
  fontWeight: "regular",
64361
- children: `${childNodeData.runScriptCount} Script${childNodeData.runScriptCount !== 1 ? 's' : ''}`
64467
+ children: `${![0, '0', null].includes(childNodeData.runScriptCount) ? childNodeData.runScriptCount : ''} Script${childNodeData.runScriptCount !== 1 ? 's' : ''}`
64362
64468
  })
64363
- })]
64469
+ }) : jsxRuntime.jsx(jsxRuntime.Fragment, {})]
64364
64470
  })
64365
64471
  }), jsxRuntime.jsx("div", {
64366
64472
  className: "ff-run-data-box",
@@ -79033,6 +79139,21 @@ const convertToISO = dateString => {
79033
79139
  return new Date(`${formattedDate}T${formattedTime}`);
79034
79140
  };
79035
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
+
79036
79157
  const PrePostStepAccordions = ({
79037
79158
  data,
79038
79159
  level = 0,