@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.
@@ -8284,6 +8284,32 @@ _dayjs.default.extend(_utc.default);
8284
8284
  _dayjs.default.extend(_dayjsTimezoneIanaPlugin.default);
8285
8285
  _dayjs.default.extend(_dayjsAbbrTimezone.default);
8286
8286
 
8287
+ // dayjs-timezone-iana-plugin only provides instance method dayjs().tz(), not static dayjs.tz()
8288
+ // Add a static wrapper function to match the API used throughout the codebase
8289
+ // Check if dayjs.tz is callable as a function (it might be an object with setDefault)
8290
+ const tzIsCallable = typeof _dayjs.default.tz === 'function';
8291
+ if (!tzIsCallable) {
8292
+ // Preserve existing properties (like setDefault) if they exist
8293
+ const existingTz = _dayjs.default.tz;
8294
+ const existingSetDefault = existingTz && typeof existingTz.setDefault === 'function' ? existingTz.setDefault : null;
8295
+
8296
+ // Create a static tz function that wraps the instance method
8297
+ _dayjs.default.tz = function (date, tzName) {
8298
+ if (!date) {
8299
+ return (0, _dayjs.default)().tz(tzName);
8300
+ }
8301
+ if (_dayjs.default.isDayjs(date)) {
8302
+ return date.tz(tzName);
8303
+ }
8304
+ return (0, _dayjs.default)(date).tz(tzName);
8305
+ };
8306
+
8307
+ // Restore setDefault if it existed
8308
+ if (existingSetDefault) {
8309
+ _dayjs.default.tz.setDefault = existingSetDefault;
8310
+ }
8311
+ }
8312
+
8287
8313
  // Core functionality plugins
8288
8314
  _dayjs.default.extend(_relativeTime.default);
8289
8315
  _dayjs.default.extend(_customParseFormat.default);