@capillarytech/blaze-ui 4.33.9 → 4.33.10

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,49 +20112,6 @@ _dayjs.default.extend(_utc.default);
20112
20112
  _dayjs.default.extend(_dayjsTimezoneIanaPlugin.default);
20113
20113
  _dayjs.default.extend(_dayjsAbbrTimezone.default);
20114
20114
 
20115
- // Verify timezone plugin was properly extended immediately after extending
20116
- // This ensures we catch issues early and helps with webpack bundling
20117
- const testInstance = (0, _dayjs.default)();
20118
- if (typeof testInstance.tz !== 'function') {
20119
- console.error('[dayjs-timezone-iana-plugin] CRITICAL: Plugin not properly extended!', 'dayjs().tz type:', typeof testInstance.tz, 'This indicates the plugin extension failed. Check plugin import and order.');
20120
- // Try to re-extend as a fallback (shouldn't be necessary, but helps with bundling issues)
20121
- try {
20122
- _dayjs.default.extend(_dayjsTimezoneIanaPlugin.default);
20123
- const retestInstance = (0, _dayjs.default)();
20124
- if (typeof retestInstance.tz === 'function') {
20125
- console.warn('[dayjs-timezone-iana-plugin] Plugin extension succeeded on retry.');
20126
- }
20127
- } catch (error) {
20128
- console.error('[dayjs-timezone-iana-plugin] Failed to extend plugin:', error);
20129
- }
20130
- }
20131
-
20132
- // dayjs-timezone-iana-plugin only provides instance method dayjs().tz(), not static dayjs.tz()
20133
- // Add a static wrapper function to match the API used throughout the codebase
20134
- // Check if dayjs.tz is callable as a function (it might be an object with setDefault)
20135
- const tzIsCallable = typeof _dayjs.default.tz === 'function';
20136
- if (!tzIsCallable) {
20137
- // Preserve existing properties (like setDefault) if they exist
20138
- const existingTz = _dayjs.default.tz;
20139
- const existingSetDefault = existingTz && typeof existingTz.setDefault === 'function' ? existingTz.setDefault : null;
20140
-
20141
- // Create a static tz function that wraps the instance method
20142
- // This wrapper ensures dayjs.tz() works even if the instance method is available
20143
- _dayjs.default.tz = function (date, tzName) {
20144
- // Verify instance method is available before using it
20145
- const instance = !date ? (0, _dayjs.default)() : _dayjs.default.isDayjs(date) ? date : (0, _dayjs.default)(date);
20146
- if (typeof instance.tz !== 'function') {
20147
- throw new Error('dayjs().tz() is not available. The timezone plugin may not be properly extended. ' + 'Check that dayjs-timezone-iana-plugin is correctly imported and extended.');
20148
- }
20149
- return instance.tz(tzName);
20150
- };
20151
-
20152
- // Restore setDefault if it existed
20153
- if (existingSetDefault) {
20154
- _dayjs.default.tz.setDefault = existingSetDefault;
20155
- }
20156
- }
20157
-
20158
20115
  // Core functionality plugins
20159
20116
  _dayjs.default.extend(_relativeTime.default);
20160
20117
  _dayjs.default.extend(_customParseFormat.default);