@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.
package/dist/index.js CHANGED
@@ -20112,6 +20112,32 @@ _dayjs.default.extend(_utc.default);
20112
20112
  _dayjs.default.extend(_dayjsTimezoneIanaPlugin.default);
20113
20113
  _dayjs.default.extend(_dayjsAbbrTimezone.default);
20114
20114
 
20115
+ // dayjs-timezone-iana-plugin only provides instance method dayjs().tz(), not static dayjs.tz()
20116
+ // Add a static wrapper function to match the API used throughout the codebase
20117
+ // Check if dayjs.tz is callable as a function (it might be an object with setDefault)
20118
+ const tzIsCallable = typeof _dayjs.default.tz === 'function';
20119
+ if (!tzIsCallable) {
20120
+ // Preserve existing properties (like setDefault) if they exist
20121
+ const existingTz = _dayjs.default.tz;
20122
+ const existingSetDefault = existingTz && typeof existingTz.setDefault === 'function' ? existingTz.setDefault : null;
20123
+
20124
+ // Create a static tz function that wraps the instance method
20125
+ _dayjs.default.tz = function (date, tzName) {
20126
+ if (!date) {
20127
+ return (0, _dayjs.default)().tz(tzName);
20128
+ }
20129
+ if (_dayjs.default.isDayjs(date)) {
20130
+ return date.tz(tzName);
20131
+ }
20132
+ return (0, _dayjs.default)(date).tz(tzName);
20133
+ };
20134
+
20135
+ // Restore setDefault if it existed
20136
+ if (existingSetDefault) {
20137
+ _dayjs.default.tz.setDefault = existingSetDefault;
20138
+ }
20139
+ }
20140
+
20115
20141
  // Core functionality plugins
20116
20142
  _dayjs.default.extend(_relativeTime.default);
20117
20143
  _dayjs.default.extend(_customParseFormat.default);