@capillarytech/blaze-ui 4.33.10 → 4.33.11

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.
@@ -4502,6 +4502,32 @@ _dayjs.default.extend(_utc.default);
4502
4502
  _dayjs.default.extend(_dayjsTimezoneIanaPlugin.default);
4503
4503
  _dayjs.default.extend(_dayjsAbbrTimezone.default);
4504
4504
 
4505
+ // dayjs-timezone-iana-plugin only provides instance method dayjs().tz(), not static dayjs.tz()
4506
+ // Add a static wrapper function to match the API used throughout the codebase
4507
+ // Check if dayjs.tz is callable as a function (it might be an object with setDefault)
4508
+ const tzIsCallable = typeof _dayjs.default.tz === 'function';
4509
+ if (!tzIsCallable) {
4510
+ // Preserve existing properties (like setDefault) if they exist
4511
+ const existingTz = _dayjs.default.tz;
4512
+ const existingSetDefault = existingTz && typeof existingTz.setDefault === 'function' ? existingTz.setDefault : null;
4513
+
4514
+ // Create a static tz function that wraps the instance method
4515
+ _dayjs.default.tz = function (date, tzName) {
4516
+ if (!date) {
4517
+ return (0, _dayjs.default)().tz(tzName);
4518
+ }
4519
+ if (_dayjs.default.isDayjs(date)) {
4520
+ return date.tz(tzName);
4521
+ }
4522
+ return (0, _dayjs.default)(date).tz(tzName);
4523
+ };
4524
+
4525
+ // Restore setDefault if it existed
4526
+ if (existingSetDefault) {
4527
+ _dayjs.default.tz.setDefault = existingSetDefault;
4528
+ }
4529
+ }
4530
+
4505
4531
  // Core functionality plugins
4506
4532
  _dayjs.default.extend(_relativeTime.default);
4507
4533
  _dayjs.default.extend(_customParseFormat.default);