@capillarytech/blaze-ui 5.2.2 → 5.2.4

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 (47) hide show
  1. package/.npmrc +2 -0
  2. package/CapCollapsibleNavbar/index.js +55 -3
  3. package/CapCollapsibleNavbar/index.js.map +1 -1
  4. package/CapCondition/index.js +55 -3
  5. package/CapCondition/index.js.map +1 -1
  6. package/CapDatePicker/index.js +55 -3
  7. package/CapDatePicker/index.js.map +1 -1
  8. package/CapDateTimePicker/README.md +136 -0
  9. package/CapDateTimePicker/index.d.ts +13 -0
  10. package/CapDateTimePicker/index.d.ts.map +1 -0
  11. package/CapDateTimePicker/index.js +166 -106
  12. package/CapDateTimePicker/index.js.map +1 -1
  13. package/CapDateTimePicker/messages.d.ts +17 -0
  14. package/CapDateTimePicker/messages.d.ts.map +1 -0
  15. package/CapDateTimePicker/types.d.ts +93 -0
  16. package/CapDateTimePicker/types.d.ts.map +1 -0
  17. package/CapDateTimeRangePicker/index.js +55 -3
  18. package/CapDateTimeRangePicker/index.js.map +1 -1
  19. package/CapEventCalendar/index.js +55 -3
  20. package/CapEventCalendar/index.js.map +1 -1
  21. package/CapLanguageProvider/index.js +55 -3
  22. package/CapLanguageProvider/index.js.map +1 -1
  23. package/CapLevelGraphRenderer/CapLevelGraphRenderer-test-cases.md +50 -0
  24. package/CapLevelGraphRenderer/MIGRATION_ANALYSIS.md +138 -0
  25. package/CapLevelGraphRenderer/README.md +123 -0
  26. package/CapLevelGraphRenderer/STORYBOOK_ANALYSIS.md +96 -0
  27. package/CapLevelGraphRenderer/Tooltip.d.ts +31 -0
  28. package/CapLevelGraphRenderer/Tooltip.d.ts.map +1 -0
  29. package/CapLevelGraphRenderer/Tooltip_MIGRATION_ANALYSIS.md +120 -0
  30. package/CapLevelGraphRenderer/index.d.ts +16 -0
  31. package/CapLevelGraphRenderer/index.d.ts.map +1 -0
  32. package/CapLevelGraphRenderer/index.js +159 -135
  33. package/CapLevelGraphRenderer/index.js.map +1 -1
  34. package/CapLevelGraphRenderer/tests/TEST_COVERAGE.md +119 -0
  35. package/CapLevelGraphRenderer/types.d.ts +139 -0
  36. package/CapLevelGraphRenderer/types.d.ts.map +1 -0
  37. package/CapNotificationDropdown/index.js +55 -3
  38. package/CapNotificationDropdown/index.js.map +1 -1
  39. package/CapTimePicker/index.js +55 -3
  40. package/CapTimePicker/index.js.map +1 -1
  41. package/index.d.ts +4 -0
  42. package/index.d.ts.map +1 -1
  43. package/index.js +1053 -4
  44. package/index.js.map +1 -1
  45. package/package.json +4 -2
  46. package/utils/dayjs.d.ts +21 -0
  47. package/utils/dayjs.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capillarytech/blaze-ui",
3
- "version": "5.2.2",
3
+ "version": "5.2.4",
4
4
  "description": "Capillary UI component library with Ant Design v6",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -50,7 +50,9 @@
50
50
  "react-rnd": "^10.5.2",
51
51
  "react-virtuoso": "4.9.0",
52
52
  "sanitize.css": "^13.0.0",
53
- "whatwg-fetch": "3.0.0"
53
+ "whatwg-fetch": "3.0.0",
54
+ "@antv/x6": "^1.12.4",
55
+ "@antv/x6-react-shape": "^1.2.3"
54
56
  },
55
57
  "lint-staged": {
56
58
  "components/**/*.{ts,tsx}": [
package/utils/dayjs.d.ts CHANGED
@@ -34,6 +34,7 @@ export declare const FORMAT_TOKENS: {
34
34
  readonly MONTH_FULL: "MMMM";
35
35
  readonly YEAR: "YYYY";
36
36
  readonly YEAR_SHORT: "YY";
37
+ readonly DATE_TIME: "DD-MM-YYYY | HH:mm";
37
38
  readonly DATE_LOCALIZED_SHORT: "l";
38
39
  readonly DATETIME_LOCALIZED_SHORT: "ll";
39
40
  readonly DATETIME_LOCALIZED_SHORT_TIME: "lll";
@@ -45,6 +46,7 @@ export declare const FORMAT_TOKENS: {
45
46
  };
46
47
  export type TimeUnit = (typeof TIME_UNITS)[keyof typeof TIME_UNITS];
47
48
  export type FormatToken = (typeof FORMAT_TOKENS)[keyof typeof FORMAT_TOKENS];
49
+ export declare const DEFAULT_TIMEZONE = "Asia/Kolkata";
48
50
  export declare function normalizeDateValue(isConsumerUsingMoment: boolean, parsedValue: dayjs.Dayjs | Moment | null | undefined): dayjs.Dayjs | Moment | null | undefined;
49
51
  export declare function isDayjsObject(value: unknown): value is dayjs.Dayjs;
50
52
  /**
@@ -81,6 +83,25 @@ export declare function hasMomentTimezoneSupport(value: Moment): boolean;
81
83
  * const result2 = momentToDayjs(moment.invalid()); // Returns null
82
84
  */
83
85
  export declare function momentToDayjs(value: Moment | dayjs.Dayjs | string | Date | null | undefined): dayjs.Dayjs | null;
86
+ /**
87
+ * Converts any supported date value (Moment, Day.js, string, Date) to a Day.js object
88
+ * in the specified timezone. This is the recommended single entry point for timezone-safe
89
+ * date conversion — it handles moment-to-dayjs conversion and timezone application in one step,
90
+ * avoiding the double-offset bug in dayjs-timezone-iana-plugin.
91
+ *
92
+ * @param value - Moment, Day.js, string, Date, or null/undefined
93
+ * @param timezone - Target IANA timezone (e.g., 'Asia/Kolkata', 'America/New_York')
94
+ * @returns Day.js object in the target timezone, or null if invalid
95
+ *
96
+ * @example
97
+ * toDayjsInTimezone(moment.tz('2025-04-21 00:00', 'Asia/Kolkata'), 'Asia/Kolkata');
98
+ * // Returns dayjs representing 2025-04-21 00:00 IST
99
+ *
100
+ * @example
101
+ * toDayjsInTimezone(moment.tz('2025-04-21 00:00', 'UTC'), 'Asia/Kolkata');
102
+ * // Returns dayjs representing 2025-04-21 05:30 IST
103
+ */
104
+ export declare function toDayjsInTimezone(value: Moment | dayjs.Dayjs | string | Date | null | undefined, timezone: string): dayjs.Dayjs | null;
84
105
  /**
85
106
  * Converts a Day.js object to Moment.js, preserving timezone and locale information.
86
107
  *
@@ -1 +1 @@
1
- {"version":3,"file":"dayjs.d.ts","sourceRoot":"","sources":["../../components/utils/dayjs.ts"],"names":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