funda-ui 4.7.111 → 4.7.125

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 (56) hide show
  1. package/CascadingSelect/index.d.ts +1 -0
  2. package/CascadingSelect/index.js +7 -3
  3. package/CascadingSelectE2E/index.d.ts +1 -0
  4. package/CascadingSelectE2E/index.js +7 -3
  5. package/Date/index.js +25 -2
  6. package/EventCalendar/index.js +25 -2
  7. package/EventCalendarTimeline/index.js +25 -2
  8. package/README.md +9 -10
  9. package/SplitterPanel/index.css +63 -0
  10. package/SplitterPanel/index.d.ts +20 -0
  11. package/SplitterPanel/index.js +736 -0
  12. package/Stepper/index.js +3 -2
  13. package/Utils/date.d.ts +15 -5
  14. package/Utils/date.js +22 -2
  15. package/Utils/time.d.ts +34 -0
  16. package/Utils/time.js +162 -0
  17. package/Utils/useHistoryTracker.d.ts +26 -0
  18. package/Utils/useHistoryTracker.js +475 -0
  19. package/all.d.ts +1 -0
  20. package/all.js +1 -0
  21. package/lib/cjs/CascadingSelect/index.d.ts +1 -0
  22. package/lib/cjs/CascadingSelect/index.js +7 -3
  23. package/lib/cjs/CascadingSelectE2E/index.d.ts +1 -0
  24. package/lib/cjs/CascadingSelectE2E/index.js +7 -3
  25. package/lib/cjs/Date/index.js +25 -2
  26. package/lib/cjs/EventCalendar/index.js +25 -2
  27. package/lib/cjs/EventCalendarTimeline/index.js +25 -2
  28. package/lib/cjs/SplitterPanel/index.d.ts +20 -0
  29. package/lib/cjs/SplitterPanel/index.js +736 -0
  30. package/lib/cjs/Stepper/index.js +3 -2
  31. package/lib/cjs/Utils/date.d.ts +15 -5
  32. package/lib/cjs/Utils/date.js +22 -2
  33. package/lib/cjs/Utils/time.d.ts +34 -0
  34. package/lib/cjs/Utils/time.js +162 -0
  35. package/lib/cjs/Utils/useHistoryTracker.d.ts +26 -0
  36. package/lib/cjs/Utils/useHistoryTracker.js +475 -0
  37. package/lib/cjs/index.d.ts +1 -0
  38. package/lib/cjs/index.js +1 -0
  39. package/lib/css/SplitterPanel/index.css +63 -0
  40. package/lib/esm/CascadingSelect/Group.tsx +4 -2
  41. package/lib/esm/CascadingSelect/index.tsx +3 -0
  42. package/lib/esm/CascadingSelectE2E/Group.tsx +4 -2
  43. package/lib/esm/CascadingSelectE2E/index.tsx +3 -0
  44. package/lib/esm/SplitterPanel/index.scss +82 -0
  45. package/lib/esm/SplitterPanel/index.tsx +174 -0
  46. package/lib/esm/Stepper/index.tsx +4 -2
  47. package/lib/esm/Utils/hooks/useHistoryTracker.tsx +403 -0
  48. package/lib/esm/Utils/libs/date.ts +28 -8
  49. package/lib/esm/Utils/libs/time.ts +125 -0
  50. package/lib/esm/index.js +1 -0
  51. package/package.json +1 -1
  52. package/Utils/useGlobalUrlListener.d.ts +0 -2
  53. package/Utils/useGlobalUrlListener.js +0 -157
  54. package/lib/cjs/Utils/useGlobalUrlListener.d.ts +0 -2
  55. package/lib/cjs/Utils/useGlobalUrlListener.js +0 -157
  56. package/lib/esm/Utils/hooks/useGlobalUrlListener.tsx +0 -46
@@ -2530,6 +2530,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2530
2530
  return (/* binding */_getDateDetails
2531
2531
  );
2532
2532
  },
2533
+ /* harmony export */"getDaysInLastMonths": function getDaysInLastMonths() {
2534
+ return (/* binding */_getDaysInLastMonths
2535
+ );
2536
+ },
2533
2537
  /* harmony export */"getFirstAndLastMonthDay": function getFirstAndLastMonthDay() {
2534
2538
  return (/* binding */_getFirstAndLastMonthDay
2535
2539
  );
@@ -2830,6 +2834,25 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2830
2834
  return specifiedDay;
2831
2835
  }
2832
2836
 
2837
+ /**
2838
+ * Calculates the total number of days from today going back a specified number of months.
2839
+ *
2840
+ * @param {number} monthsAgo - The number of months to go back (e.g., 3 means the past 3 months).
2841
+ * @returns {number} The total number of days between the calculated past date and today.
2842
+ *
2843
+ * @example
2844
+ * getDaysInLastMonths(3); // Returns number of days in the past 3 months
2845
+ */
2846
+ function _getDaysInLastMonths() {
2847
+ var monthsAgo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3;
2848
+ var today = new Date();
2849
+ var pastDate = new Date();
2850
+ pastDate.setMonth(today.getMonth() - monthsAgo);
2851
+ var diffInMs = today.getTime() - pastDate.getTime();
2852
+ var diffInDays = Math.round(diffInMs / (1000 * 60 * 60 * 24));
2853
+ return diffInDays;
2854
+ }
2855
+
2833
2856
  /**
2834
2857
  * Get next month date
2835
2858
  * @param {Date | String} v
@@ -2910,7 +2933,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2910
2933
  /**
2911
2934
  * Get current month
2912
2935
  * @param {Boolean} padZeroEnabled
2913
- * @returns {Number}
2936
+ * @returns {Number|String}
2914
2937
  */
2915
2938
  function _getCurrentMonth() {
2916
2939
  var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
@@ -2921,7 +2944,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2921
2944
  /**
2922
2945
  * Get current day
2923
2946
  * @param {Boolean} padZeroEnabled
2924
- * @returns {Number}
2947
+ * @returns {Number|String}
2925
2948
  */
2926
2949
  function _getCurrentDay() {
2927
2950
  var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
@@ -2152,6 +2152,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2152
2152
  return (/* binding */_getDateDetails
2153
2153
  );
2154
2154
  },
2155
+ /* harmony export */"getDaysInLastMonths": function getDaysInLastMonths() {
2156
+ return (/* binding */_getDaysInLastMonths
2157
+ );
2158
+ },
2155
2159
  /* harmony export */"getFirstAndLastMonthDay": function getFirstAndLastMonthDay() {
2156
2160
  return (/* binding */_getFirstAndLastMonthDay
2157
2161
  );
@@ -2452,6 +2456,25 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2452
2456
  return specifiedDay;
2453
2457
  }
2454
2458
 
2459
+ /**
2460
+ * Calculates the total number of days from today going back a specified number of months.
2461
+ *
2462
+ * @param {number} monthsAgo - The number of months to go back (e.g., 3 means the past 3 months).
2463
+ * @returns {number} The total number of days between the calculated past date and today.
2464
+ *
2465
+ * @example
2466
+ * getDaysInLastMonths(3); // Returns number of days in the past 3 months
2467
+ */
2468
+ function _getDaysInLastMonths() {
2469
+ var monthsAgo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3;
2470
+ var today = new Date();
2471
+ var pastDate = new Date();
2472
+ pastDate.setMonth(today.getMonth() - monthsAgo);
2473
+ var diffInMs = today.getTime() - pastDate.getTime();
2474
+ var diffInDays = Math.round(diffInMs / (1000 * 60 * 60 * 24));
2475
+ return diffInDays;
2476
+ }
2477
+
2455
2478
  /**
2456
2479
  * Get next month date
2457
2480
  * @param {Date | String} v
@@ -2532,7 +2555,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2532
2555
  /**
2533
2556
  * Get current month
2534
2557
  * @param {Boolean} padZeroEnabled
2535
- * @returns {Number}
2558
+ * @returns {Number|String}
2536
2559
  */
2537
2560
  function _getCurrentMonth() {
2538
2561
  var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
@@ -2543,7 +2566,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2543
2566
  /**
2544
2567
  * Get current day
2545
2568
  * @param {Boolean} padZeroEnabled
2546
- * @returns {Number}
2569
+ * @returns {Number|String}
2547
2570
  */
2548
2571
  function _getCurrentDay() {
2549
2572
  var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
@@ -2347,6 +2347,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2347
2347
  return (/* binding */_getDateDetails
2348
2348
  );
2349
2349
  },
2350
+ /* harmony export */"getDaysInLastMonths": function getDaysInLastMonths() {
2351
+ return (/* binding */_getDaysInLastMonths
2352
+ );
2353
+ },
2350
2354
  /* harmony export */"getFirstAndLastMonthDay": function getFirstAndLastMonthDay() {
2351
2355
  return (/* binding */_getFirstAndLastMonthDay
2352
2356
  );
@@ -2647,6 +2651,25 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2647
2651
  return specifiedDay;
2648
2652
  }
2649
2653
 
2654
+ /**
2655
+ * Calculates the total number of days from today going back a specified number of months.
2656
+ *
2657
+ * @param {number} monthsAgo - The number of months to go back (e.g., 3 means the past 3 months).
2658
+ * @returns {number} The total number of days between the calculated past date and today.
2659
+ *
2660
+ * @example
2661
+ * getDaysInLastMonths(3); // Returns number of days in the past 3 months
2662
+ */
2663
+ function _getDaysInLastMonths() {
2664
+ var monthsAgo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3;
2665
+ var today = new Date();
2666
+ var pastDate = new Date();
2667
+ pastDate.setMonth(today.getMonth() - monthsAgo);
2668
+ var diffInMs = today.getTime() - pastDate.getTime();
2669
+ var diffInDays = Math.round(diffInMs / (1000 * 60 * 60 * 24));
2670
+ return diffInDays;
2671
+ }
2672
+
2650
2673
  /**
2651
2674
  * Get next month date
2652
2675
  * @param {Date | String} v
@@ -2727,7 +2750,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2727
2750
  /**
2728
2751
  * Get current month
2729
2752
  * @param {Boolean} padZeroEnabled
2730
- * @returns {Number}
2753
+ * @returns {Number|String}
2731
2754
  */
2732
2755
  function _getCurrentMonth() {
2733
2756
  var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
@@ -2738,7 +2761,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2738
2761
  /**
2739
2762
  * Get current day
2740
2763
  * @param {Boolean} padZeroEnabled
2741
- * @returns {Number}
2764
+ * @returns {Number|String}
2742
2765
  */
2743
2766
  function _getCurrentDay() {
2744
2767
  var padZeroEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ interface SplitterPanelSubProps {
3
+ children: React.ReactNode;
4
+ }
5
+ declare const SplitterPanelLeft: React.FC<SplitterPanelSubProps>;
6
+ declare const SplitterPanelRight: React.FC<SplitterPanelSubProps>;
7
+ interface SplitterPanelProps {
8
+ wrapperClassName?: string;
9
+ draggable?: boolean;
10
+ initialWidth?: number;
11
+ minWidth?: number;
12
+ maxWidth?: number;
13
+ onDrag?: (type: 'dragStart' | 'dragEnd' | 'drag', leftWidth: number) => void;
14
+ children?: React.ReactNode;
15
+ }
16
+ declare const SplitterPanel: React.FC<SplitterPanelProps> & {
17
+ Left: typeof SplitterPanelLeft;
18
+ Right: typeof SplitterPanelRight;
19
+ };
20
+ export default SplitterPanel;