@hivegpt/hiveai-angular 0.0.476 → 0.0.477

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.
@@ -1723,15 +1723,22 @@ class ChatDrawerComponent {
1723
1723
  }
1724
1724
  }
1725
1725
  /**
1726
- * Get timezone abbreviation (e.g. IST, EST, PST) for display after the time.
1727
- * Prefers standard abbreviations over GMT+offset from Intl.
1726
+ * Get timezone abbreviation (e.g. IST, SAST, SAWST, ESAST, EEDT) for display after the time.
1727
+ * Uses map aligned with parent app session-layouts; falls back to Intl when not in map.
1728
1728
  */
1729
1729
  getTimezoneAbbreviation(tz) {
1730
1730
  var _a;
1731
1731
  if (!tz || !String(tz).trim())
1732
1732
  return '';
1733
1733
  const tzId = String(tz).trim();
1734
- const mapped = this.constructor.TZ_ABBR_MAP[tzId];
1734
+ const map = this.constructor.TZ_ABBR_MAP;
1735
+ let mapped = map[tzId];
1736
+ if (!mapped) {
1737
+ const keyLower = tzId.toLowerCase();
1738
+ const entry = Object.entries(map).find(([k]) => k.toLowerCase() === keyLower);
1739
+ if (entry)
1740
+ mapped = entry[1];
1741
+ }
1735
1742
  if (mapped)
1736
1743
  return mapped;
1737
1744
  try {
@@ -1742,13 +1749,8 @@ class ChatDrawerComponent {
1742
1749
  const parts = formatter.formatToParts(new Date());
1743
1750
  const tzPart = parts.find((p) => p.type === 'timeZoneName');
1744
1751
  const value = ((_a = tzPart === null || tzPart === void 0 ? void 0 : tzPart.value) !== null && _a !== void 0 ? _a : '').trim();
1745
- // If Intl returned GMT+5:30 style, try to use a known abbreviation from map by normalizing key
1746
- if (value && /^GMT[+-]\d/.test(value)) {
1747
- const byAbbr = Object.entries(this.constructor.TZ_ABBR_MAP).find(([_, abbr]) => abbr === value);
1748
- if (byAbbr)
1749
- return byAbbr[1];
1750
- return value;
1751
- }
1752
+ if (value && /^GMT[+-]\d/.test(value))
1753
+ return '';
1752
1754
  return value;
1753
1755
  }
1754
1756
  catch (_b) {
@@ -3710,26 +3712,149 @@ class ChatDrawerComponent {
3710
3712
  }
3711
3713
  }
3712
3714
  /**
3713
- * Map of IANA timezone IDs to standard abbreviations (IST, EST, etc.) when Intl returns GMT offset.
3715
+ * IANA timezone ID -> abbreviation map (matches parent app session-layouts / timezones.enum TimeZones).
3716
+ * Used so session cards show SAST, EEST, SAWST, ESAST, etc. instead of GMT+1, GMT+2.
3714
3717
  */
3715
3718
  ChatDrawerComponent.TZ_ABBR_MAP = {
3719
+ 'Pacific/Kiritimati': 'LINT',
3720
+ 'Pacific/Apia': 'SST',
3721
+ 'Pacific/Tongatapu': 'TST',
3722
+ 'Etc/GMT-13': 'UTC',
3723
+ 'Pacific/Chatham': 'CHADT',
3724
+ 'Asia/Kamchatka': 'ANAT',
3725
+ 'Pacific/Fiji': 'FJT',
3726
+ 'Etc/GMT-12': 'U',
3727
+ 'Pacific/Auckland': 'NZST',
3728
+ 'Pacific/Guadalcanal': 'CPST',
3729
+ 'Asia/Sakhalin': 'SAKT',
3730
+ 'Pacific/Norfolk': 'NFT',
3731
+ 'Asia/Magadan': 'MAGT',
3732
+ 'Asia/Srednekolymsk': 'SRET',
3733
+ 'Pacific/Bougainville': 'BST',
3734
+ 'Australia/Lord_Howe': 'LHST',
3735
+ 'Asia/Vladivostok': 'VLAT',
3736
+ 'Australia/Hobart': 'AEST',
3737
+ 'Pacific/Port_Moresby': 'ChST',
3738
+ 'Australia/Sydney': 'AEST',
3739
+ 'Australia/Brisbane': 'AWST',
3740
+ 'Australia/Darwin': 'ACST',
3741
+ 'Australia/Adelaide': 'ACST',
3742
+ 'Asia/Yakutsk': 'YAKT',
3743
+ 'Asia/Seoul': 'KST',
3744
+ 'Asia/Pyongyang': 'KST',
3745
+ 'Asia/Tokyo': 'TST',
3746
+ 'Asia/Chita': 'YAKT',
3747
+ 'Australia/Eucla': 'ACWST',
3748
+ 'Asia/Ulaanbaatar': 'FST',
3749
+ 'Asia/Taipei': 'ULAT',
3750
+ 'Australia/Perth': 'AWST',
3751
+ 'Asia/Singapore': 'SNST',
3752
+ 'Asia/Irkutsk': 'IRKT',
3753
+ 'Asia/Shanghai': 'CST',
3754
+ 'Asia/Tomsk': 'MSD',
3755
+ 'Asia/Novosibirsk': 'NOVT',
3756
+ 'Asia/Krasnoyarsk': 'KRAT',
3757
+ 'Asia/Hovd': 'SAST',
3758
+ 'Asia/Barnaul': 'MSK',
3759
+ 'Asia/Bangkok': 'THA',
3760
+ 'Asia/Yangon': 'MYST',
3761
+ 'Asia/Omsk': 'OMST',
3762
+ 'Asia/Dhaka': 'BST',
3763
+ 'Asia/Almaty': 'NCAST',
3764
+ 'Asia/Kathmandu': 'NPT',
3765
+ 'Asia/Colombo': 'SLT',
3716
3766
  'Asia/Kolkata': 'IST',
3717
3767
  'Asia/Calcutta': 'IST',
3718
- 'America/New_York': 'EST',
3719
- 'America/Los_Angeles': 'PST',
3720
- 'America/Chicago': 'CST',
3721
- 'America/Denver': 'MST',
3722
- 'Europe/London': 'GMT',
3723
- 'Europe/Paris': 'CET',
3724
- 'Europe/Berlin': 'CET',
3725
- 'Asia/Dubai': 'GST',
3726
- 'Asia/Singapore': 'SGT',
3727
- 'Asia/Tokyo': 'JST',
3728
- 'Australia/Sydney': 'AEST',
3729
- 'America/Toronto': 'EST',
3730
- 'America/Vancouver': 'PST',
3731
- 'Pacific/Auckland': 'NZST',
3768
+ 'Asia/Qyzylorda': 'CAST',
3769
+ 'Asia/Karachi': 'PKT',
3770
+ 'Asia/Yekaterinburg': 'YEKT',
3771
+ 'Asia/Tashkent': 'WAST',
3772
+ 'Asia/Kabul': 'AFT',
3773
+ 'Asia/Yerevan': 'AMT',
3774
+ 'Europe/Volgograd': 'VST',
3775
+ 'Asia/Tbilisi': 'GET',
3776
+ 'Europe/Saratov': 'SLT',
3777
+ 'Indian/Mauritius': 'MUT',
3778
+ 'Europe/Samara': 'SAMT',
3779
+ 'Asia/Baku': 'AZT',
3780
+ 'Europe/Astrakhan': 'SAMT',
3781
+ 'Asia/Dubai': 'ARBST',
3782
+ 'Asia/Tehran': 'IDT',
3783
+ 'Africa/Nairobi': 'EAST',
3784
+ 'Europe/Moscow': 'MSK',
3785
+ 'Europe/Minsk': 'MSK',
3786
+ 'Asia/Riyadh': 'AST',
3787
+ 'Europe/Istanbul': 'TDT',
3788
+ 'Asia/Baghdad': 'AST',
3789
+ 'Africa/Windhoek': 'NST',
3790
+ 'Africa/Tripoli': 'LST',
3791
+ 'Africa/Khartoum': 'EAST',
3792
+ 'Europe/Kaliningrad': 'KST',
3793
+ 'Asia/Jerusalem': 'JDT',
3794
+ 'Europe/Kiev': 'EEDT',
3795
+ 'Africa/Johannesburg': 'SAST',
3796
+ 'Asia/Hebron': 'EET',
3797
+ 'Asia/Damascus': 'SDT',
3798
+ 'Europe/Chisinau': 'GDT',
3799
+ 'Africa/Cairo': 'EST',
3800
+ 'Asia/Beirut': 'MEDT',
3801
+ 'Europe/Bucharest': 'GDT',
3802
+ 'Asia/Amman': 'JST',
3803
+ 'Africa/Lagos': 'ECT',
3804
+ 'Europe/Warsaw': 'CEDT',
3805
+ 'Africa/Casablanca': 'MDT',
3806
+ 'Europe/Paris': 'CEST',
3807
+ 'Europe/Budapest': 'CEDT',
3808
+ 'Europe/Berlin': 'WEDT',
3809
+ 'Africa/Sao_Tome': 'GST',
3810
+ 'Atlantic/Reykjavik': 'GST',
3811
+ 'Europe/London': 'GDT',
3732
3812
  'Etc/UTC': 'UTC',
3813
+ 'Atlantic/Azores': 'ADT',
3814
+ 'Atlantic/Cape_Verde': 'CVST',
3815
+ 'Etc/GMT+2': 'MST',
3816
+ 'America/Araguaina': 'SEST',
3817
+ 'America/Sao_Paulo': 'ESAST',
3818
+ 'America/Cayenne': 'SEST',
3819
+ 'America/Argentina/Buenos_Aires': 'AST',
3820
+ 'America/Nuuk': 'WGT',
3821
+ 'America/Montevideo': 'MST',
3822
+ 'America/Punta_Arenas': 'CLST',
3823
+ 'America/Miquelon': 'PMST',
3824
+ 'America/Bahia': 'BST',
3825
+ 'America/St_Johns': 'NST',
3826
+ 'America/Asuncion': 'PRST',
3827
+ 'America/Halifax': 'AST',
3828
+ 'America/Caracas': 'VST',
3829
+ 'America/Cuiaba': 'CBST',
3830
+ 'America/La_Paz': 'SAWST',
3831
+ 'America/Santiago': 'PSST',
3832
+ 'America/Bogota': 'SPST',
3833
+ 'America/Cancun': 'EST',
3834
+ 'America/New_York': 'ET',
3835
+ 'America/Port-au-Prince': 'EDT',
3836
+ 'America/Havana': 'EDT',
3837
+ 'America/Indiana/Indianapolis': 'EST',
3838
+ 'America/Grand_Turk': 'EST',
3839
+ 'America/Guatemala': 'CAST',
3840
+ 'America/Chicago': 'CT',
3841
+ 'Pacific/Easter': 'EAST',
3842
+ 'America/Mexico_City': 'CST',
3843
+ 'America/Regina': 'CCST',
3844
+ 'America/Phoenix': 'MT',
3845
+ 'America/Chihuahua': 'MDT',
3846
+ 'America/Denver': 'MT',
3847
+ 'America/Whitehorse': 'YST',
3848
+ 'America/Tijuana': 'PST',
3849
+ 'Etc/GMT+8': 'UTC-08',
3850
+ 'America/Los_Angeles': 'PT',
3851
+ 'America/Anchorage': 'AK',
3852
+ 'Etc/GMT+9': 'UTC-09',
3853
+ 'Pacific/Marquesas': 'MST',
3854
+ 'America/Adak': 'HST',
3855
+ 'Pacific/Honolulu': 'HAST',
3856
+ 'Etc/GMT+11': 'UTC-11',
3857
+ 'Etc/GMT+12': 'BIT',
3733
3858
  };
3734
3859
  ChatDrawerComponent.decorators = [
3735
3860
  { type: Component, args: [{