cloud-ide-layout 1.0.62 → 1.0.63

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.
Files changed (13) hide show
  1. package/fesm2022/{cloud-ide-layout-cloud-ide-layout-CKLj-6xH.mjs → cloud-ide-layout-cloud-ide-layout-D1c2ObrF.mjs} +136 -25
  2. package/fesm2022/cloud-ide-layout-cloud-ide-layout-D1c2ObrF.mjs.map +1 -0
  3. package/fesm2022/{cloud-ide-layout-drawer-theme.component-DMn2Cznf.mjs → cloud-ide-layout-drawer-theme.component-t7-o6zko.mjs} +2 -2
  4. package/fesm2022/{cloud-ide-layout-drawer-theme.component-DMn2Cznf.mjs.map → cloud-ide-layout-drawer-theme.component-t7-o6zko.mjs.map} +1 -1
  5. package/fesm2022/{cloud-ide-layout-floating-entity-selection.component-L3hZ4LJm.mjs → cloud-ide-layout-floating-entity-selection.component-mK3rgtPi.mjs} +2 -2
  6. package/fesm2022/{cloud-ide-layout-floating-entity-selection.component-L3hZ4LJm.mjs.map → cloud-ide-layout-floating-entity-selection.component-mK3rgtPi.mjs.map} +1 -1
  7. package/fesm2022/{cloud-ide-layout-home-wrapper.component-ZWphfyNz.mjs → cloud-ide-layout-home-wrapper.component-PzCCRZ1z.mjs} +2 -2
  8. package/fesm2022/{cloud-ide-layout-home-wrapper.component-ZWphfyNz.mjs.map → cloud-ide-layout-home-wrapper.component-PzCCRZ1z.mjs.map} +1 -1
  9. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-sYWI-yH9.mjs → cloud-ide-layout-sidedrawer-notes.component-B9CanGJ0.mjs} +2 -2
  10. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-sYWI-yH9.mjs.map → cloud-ide-layout-sidedrawer-notes.component-B9CanGJ0.mjs.map} +1 -1
  11. package/fesm2022/cloud-ide-layout.mjs +1 -1
  12. package/package.json +1 -1
  13. package/fesm2022/cloud-ide-layout-cloud-ide-layout-CKLj-6xH.mjs.map +0 -1
@@ -1266,7 +1266,7 @@ class CideLytFloatingEntitySelectionService {
1266
1266
  }
1267
1267
  try {
1268
1268
  // Use relative import to avoid circular dependency
1269
- const module = await import('./cloud-ide-layout-floating-entity-selection.component-L3hZ4LJm.mjs');
1269
+ const module = await import('./cloud-ide-layout-floating-entity-selection.component-mK3rgtPi.mjs');
1270
1270
  if (module.CideLytFloatingEntitySelectionComponent) {
1271
1271
  this.containerService.registerComponent('entity-selection-header', module.CideLytFloatingEntitySelectionComponent);
1272
1272
  console.log('✅ Entity selection component registered successfully');
@@ -1552,16 +1552,21 @@ class CideLytHeaderWrapperComponent {
1552
1552
  }
1553
1553
  /**
1554
1554
  * Load notifications from API
1555
+ * @param showReadOnly - If true, only load read notifications. If false, load all.
1555
1556
  */
1556
- loadNotifications() {
1557
+ loadNotifications(showReadOnly = false) {
1557
1558
  try {
1558
1559
  // Get notifications from WebSocket service (real-time)
1559
1560
  const wsNotifications = this.wsNotificationService?.allNotifications() || [];
1560
1561
  console.log('[Notifications] WebSocket notifications:', wsNotifications.length);
1561
1562
  // Load from API to get all notifications (including read status)
1562
- this.notificationApiService.getNotifications({
1563
+ // By default, we can filter to show unread first, but load all for "View All"
1564
+ const params = {
1563
1565
  pageSize: 20
1564
- }).subscribe({
1566
+ };
1567
+ // Optionally filter by status if we only want unread
1568
+ // Note: We load all and filter client-side for better UX
1569
+ this.notificationApiService.getNotifications(params).subscribe({
1565
1570
  next: (response) => {
1566
1571
  console.log('[Notifications] API response:', response);
1567
1572
  if (response && response.success && response.data) {
@@ -1631,8 +1636,11 @@ class CideLytHeaderWrapperComponent {
1631
1636
  updateNotificationDropdown() {
1632
1637
  const notifs = this.notifications();
1633
1638
  const unreadCount = this.unreadCount();
1634
- // Map notifications to dropdown items (show first 10)
1635
- this.notificationItems = notifs.slice(0, 10).map(notif => ({
1639
+ // Filter to show only unread notifications in the dropdown (or all if "View All" was clicked)
1640
+ // For now, show first 20 notifications (increased from 10 for better UX)
1641
+ const notificationsToShow = notifs.slice(0, 20);
1642
+ // Map notifications to dropdown items
1643
+ this.notificationItems = notificationsToShow.map(notif => ({
1636
1644
  id: notif.id,
1637
1645
  label: notif.title,
1638
1646
  icon: this.getNotificationIcon(notif.type),
@@ -1657,7 +1665,7 @@ class CideLytHeaderWrapperComponent {
1657
1665
  iconColor: 'tw-text-blue-500'
1658
1666
  });
1659
1667
  }
1660
- // Add "Clear All" option
1668
+ // Add "Clear All" option (only if there are notifications)
1661
1669
  this.notificationItems.push({
1662
1670
  id: 'clear-all',
1663
1671
  label: 'Clear All',
@@ -1672,10 +1680,13 @@ class CideLytHeaderWrapperComponent {
1672
1680
  label: '',
1673
1681
  divider: true
1674
1682
  });
1675
- // Add "View All" option
1683
+ // Add "View All" option (show count if more than displayed)
1684
+ const viewAllLabel = notifs.length > 20
1685
+ ? `View All Notifications (${notifs.length})`
1686
+ : 'View All Notifications';
1676
1687
  this.notificationItems.push({
1677
1688
  id: 'view-all',
1678
- label: 'View All Notifications',
1689
+ label: viewAllLabel,
1679
1690
  icon: 'list',
1680
1691
  iconColor: 'tw-text-blue-500'
1681
1692
  });
@@ -1730,9 +1741,9 @@ class CideLytHeaderWrapperComponent {
1730
1741
  return;
1731
1742
  }
1732
1743
  if (item.id === 'view-all') {
1733
- // Navigate to notifications page or open full panel
1734
- console.log('View all notifications');
1735
- // TODO: Navigate to full notifications page
1744
+ // Show all notifications - for now, just reload with more items
1745
+ console.log('[Notifications] View all notifications');
1746
+ this.loadAllNotifications();
1736
1747
  return;
1737
1748
  }
1738
1749
  if (item.id === 'no-notifications' || item.id === 'divider' || item.id === 'divider-1' || item.id === 'divider-2') {
@@ -1750,19 +1761,28 @@ class CideLytHeaderWrapperComponent {
1750
1761
  * Mark a single notification as read
1751
1762
  */
1752
1763
  markNotificationAsRead(notificationId) {
1764
+ console.log('[Notifications] Marking as read:', notificationId);
1753
1765
  // Mark in WebSocket service
1754
1766
  if (this.wsNotificationService) {
1755
1767
  this.wsNotificationService.markAsRead(notificationId);
1756
1768
  }
1757
1769
  // Mark in API
1758
1770
  this.notificationApiService.markAsRead(notificationId).subscribe({
1759
- next: () => {
1760
- console.log('[Notifications] Marked as read:', notificationId);
1771
+ next: (response) => {
1772
+ console.log('[Notifications] Marked as read successfully:', response);
1761
1773
  // Reload notifications to update unread count
1762
1774
  this.loadNotifications();
1763
1775
  },
1764
1776
  error: (error) => {
1765
1777
  console.error('[Notifications] Error marking notification as read:', error);
1778
+ console.error('[Notifications] Error details:', {
1779
+ status: error?.status,
1780
+ statusText: error?.statusText,
1781
+ message: error?.message,
1782
+ url: error?.url
1783
+ });
1784
+ // Still reload to get updated state
1785
+ this.loadNotifications();
1766
1786
  }
1767
1787
  });
1768
1788
  }
@@ -1770,14 +1790,23 @@ class CideLytHeaderWrapperComponent {
1770
1790
  * Mark all notifications as read
1771
1791
  */
1772
1792
  markAllAsRead() {
1793
+ console.log('[Notifications] Marking all as read');
1773
1794
  this.notificationApiService.markAllAsRead().subscribe({
1774
- next: () => {
1775
- console.log('[Notifications] All notifications marked as read');
1795
+ next: (response) => {
1796
+ console.log('[Notifications] All notifications marked as read successfully:', response);
1776
1797
  // Reload notifications to update unread count
1777
1798
  this.loadNotifications();
1778
1799
  },
1779
1800
  error: (error) => {
1780
1801
  console.error('[Notifications] Error marking all as read:', error);
1802
+ console.error('[Notifications] Error details:', {
1803
+ status: error?.status,
1804
+ statusText: error?.statusText,
1805
+ message: error?.message,
1806
+ url: error?.url
1807
+ });
1808
+ // Still reload to get updated state
1809
+ this.loadNotifications();
1781
1810
  }
1782
1811
  });
1783
1812
  }
@@ -1786,21 +1815,103 @@ class CideLytHeaderWrapperComponent {
1786
1815
  */
1787
1816
  clearAllNotifications() {
1788
1817
  if (confirm('Are you sure you want to clear all notifications? This will mark them all as read.')) {
1818
+ console.log('[Notifications] Clearing all notifications');
1789
1819
  // First mark all as read
1790
1820
  this.notificationApiService.markAllAsRead().subscribe({
1791
- next: () => {
1792
- console.log('[Notifications] All notifications cleared');
1793
- // Clear local notifications array
1821
+ next: (response) => {
1822
+ console.log('[Notifications] All notifications marked as read:', response);
1823
+ // Filter current notifications to mark them as read locally
1824
+ const currentNotifs = this.notifications();
1825
+ const updatedNotifs = currentNotifs.map(notif => ({
1826
+ ...notif,
1827
+ isRead: true
1828
+ }));
1829
+ // Clear notifications from view (they're all read now)
1794
1830
  this.notifications.set([]);
1795
1831
  this.updateNotificationDropdown();
1796
- // Reload to get updated state
1797
- this.loadNotifications();
1832
+ // Reload after a short delay to get updated state from server
1833
+ // This will show empty or only new unread notifications
1834
+ setTimeout(() => {
1835
+ this.loadNotifications();
1836
+ }, 500);
1798
1837
  },
1799
1838
  error: (error) => {
1800
1839
  console.error('[Notifications] Error clearing all notifications:', error);
1840
+ console.error('[Notifications] Error details:', {
1841
+ status: error?.status,
1842
+ statusText: error?.statusText,
1843
+ message: error?.message,
1844
+ url: error?.url
1845
+ });
1846
+ // Still try to reload
1847
+ this.loadNotifications();
1848
+ }
1849
+ });
1850
+ }
1851
+ }
1852
+ /**
1853
+ * Load all notifications (for "View All" functionality)
1854
+ */
1855
+ loadAllNotifications() {
1856
+ try {
1857
+ const wsNotifications = this.wsNotificationService?.allNotifications() || [];
1858
+ console.log('[Notifications] Loading all notifications (View All)');
1859
+ // Load more notifications from API (increase pageSize)
1860
+ this.notificationApiService.getNotifications({
1861
+ pageSize: 100 // Load more for "View All"
1862
+ }).subscribe({
1863
+ next: (response) => {
1864
+ console.log('[Notifications] All notifications API response:', response);
1865
+ if (response && response.success && response.data) {
1866
+ // Convert server notifications to notification payloads
1867
+ const apiPayloads = response.data.map((notif) => ({
1868
+ id: String(notif._id),
1869
+ type: notif.not_type || 'info',
1870
+ category: notif.not_category,
1871
+ title: notif.not_title,
1872
+ message: notif.not_message,
1873
+ data: notif.not_data,
1874
+ action_url: notif.not_action_url,
1875
+ action_label: notif.not_action_label,
1876
+ priority: notif.not_priority || 'normal',
1877
+ created_at: new Date(notif.not_created_at),
1878
+ timestamp: new Date(notif.not_created_at),
1879
+ isRead: notif.not_status === 'read' || notif.not_read_at !== undefined
1880
+ }));
1881
+ // Merge WebSocket and API notifications
1882
+ const mergedNotifications = [];
1883
+ // Add API notifications first
1884
+ apiPayloads.forEach(apiNotif => {
1885
+ mergedNotifications.push(apiNotif);
1886
+ });
1887
+ // Add WebSocket notifications that aren't in API
1888
+ wsNotifications.forEach(wsNotif => {
1889
+ if (!mergedNotifications.find(n => n.id === wsNotif.id)) {
1890
+ mergedNotifications.push({ ...wsNotif, isRead: false });
1891
+ }
1892
+ });
1893
+ // Sort by timestamp (newest first)
1894
+ mergedNotifications.sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());
1895
+ console.log('[Notifications] Total notifications loaded:', mergedNotifications.length);
1896
+ this.notifications.set(mergedNotifications);
1897
+ this.updateNotificationDropdown();
1898
+ }
1899
+ else {
1900
+ console.warn('[Notifications] API response invalid');
1901
+ this.notifications.set(wsNotifications);
1902
+ this.updateNotificationDropdown();
1903
+ }
1904
+ },
1905
+ error: (error) => {
1906
+ console.error('[Notifications] Error loading all notifications:', error);
1907
+ this.notifications.set(wsNotifications);
1908
+ this.updateNotificationDropdown();
1801
1909
  }
1802
1910
  });
1803
1911
  }
1912
+ catch (error) {
1913
+ console.error('[Notifications] Error in loadAllNotifications:', error);
1914
+ }
1804
1915
  }
1805
1916
  ngAfterViewInit() {
1806
1917
  // No need to manually load file details - cideEleFileImage directive will handle it
@@ -3406,8 +3517,8 @@ class CideLytSidedrawerWrapperComponent {
3406
3517
  }
3407
3518
  ngOnInit() {
3408
3519
  // Initialize the component map (You'd likely populate this from a config or service)
3409
- this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-sYWI-yH9.mjs').then(m => m.CideLytSidedrawerNotesComponent);
3410
- this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-DMn2Cznf.mjs').then(m => m.CideLytDrawerThemeComponent);
3520
+ this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-B9CanGJ0.mjs').then(m => m.CideLytSidedrawerNotesComponent);
3521
+ this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-t7-o6zko.mjs').then(m => m.CideLytDrawerThemeComponent);
3411
3522
  }
3412
3523
  async loadComponent(configFor) {
3413
3524
  console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
@@ -3930,7 +4041,7 @@ const layoutControlPannelChildRoutes = [{
3930
4041
  },
3931
4042
  {
3932
4043
  path: "home",
3933
- loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-ZWphfyNz.mjs').then(c => c.CideLytHomeWrapperComponent),
4044
+ loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-PzCCRZ1z.mjs').then(c => c.CideLytHomeWrapperComponent),
3934
4045
  canActivate: [authGuard],
3935
4046
  data: {
3936
4047
  reuseTab: true, // For CustomRouteReuseStrategy
@@ -5498,4 +5609,4 @@ var floatingEntityRightsSharing_component = /*#__PURE__*/Object.freeze({
5498
5609
  */
5499
5610
 
5500
5611
  export { AppStateHelperService as A, CideLytSharedWrapperComponent as C, ENVIRONMENT_CONFIG as E, CideLytSidebarService as a, CideLytRequestService as b, CideLytSidedrawerService as c, CideLytThemeService as d, AppStateService as e, CloudIdeLayoutService as f, CloudIdeLayoutComponent as g, CideLytSharedService as h, layoutControlPannelChildRoutes as i, CustomRouteReuseStrategy as j, CideLytUserStatusService as k, layoutRoutes as l, CacheManagerService as m, CideLytFileManagerService as n, CideLytFloatingEntityRightsSharingComponent as o, processThemeVariable as p, CideLytFloatingEntityRightsSharingService as q, setCSSVariable as s, themeFactory as t };
5501
- //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-CKLj-6xH.mjs.map
5612
+ //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-D1c2ObrF.mjs.map