@gen3/frontend 0.11.26 → 0.11.27

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 (147) hide show
  1. package/dist/cjs/index.js +36 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/dts/components/Providers/Gen3Provider.d.ts +6 -6
  4. package/dist/dts/components/SegmentedControl.stories.d.ts +374 -0
  5. package/dist/dts/components/SegmentedControl.stories.d.ts.map +1 -0
  6. package/dist/dts/components/SegmentedControl.stories.js +28 -0
  7. package/dist/dts/components/SegmentedControl.stories.js.map +1 -0
  8. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +4 -4
  9. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.d.ts +3 -0
  10. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.d.ts.map +1 -0
  11. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.js +46 -0
  12. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.js.map +1 -0
  13. package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -1
  14. package/dist/dts/features/CohortBuilder/Repository/Repository.d.ts +4 -0
  15. package/dist/dts/features/CohortBuilder/Repository/Repository.d.ts.map +1 -0
  16. package/dist/dts/features/CohortBuilder/Repository/Repository.js +8 -0
  17. package/dist/dts/features/CohortBuilder/Repository/Repository.js.map +1 -0
  18. package/dist/dts/features/CohortBuilder/Repository/index.d.ts +4 -0
  19. package/dist/dts/features/CohortBuilder/Repository/index.d.ts.map +1 -0
  20. package/dist/dts/features/CohortBuilder/Repository/index.js +3 -0
  21. package/dist/dts/features/CohortBuilder/Repository/index.js.map +1 -0
  22. package/dist/dts/features/CohortBuilder/Repository/types.d.ts +12 -0
  23. package/dist/dts/features/CohortBuilder/Repository/types.d.ts.map +1 -0
  24. package/dist/dts/features/CohortBuilder/Repository/types.js.map +1 -0
  25. package/dist/dts/lib/session/session.d.ts.map +1 -1
  26. package/dist/dts/lib/session/session.js +36 -1
  27. package/dist/dts/lib/session/session.js.map +1 -1
  28. package/dist/dts/pages/Repository/Repository.d.ts +4 -0
  29. package/dist/dts/pages/Repository/Repository.d.ts.map +1 -0
  30. package/dist/dts/pages/Repository/Repository.js +24 -0
  31. package/dist/dts/pages/Repository/Repository.js.map +1 -0
  32. package/dist/dts/pages/Repository/data.d.ts +4 -0
  33. package/dist/dts/pages/Repository/data.d.ts.map +1 -0
  34. package/dist/dts/{features/CohortBuilder/CohortManager/cohortActionHooks.js → pages/Repository/data.js} +55 -42
  35. package/dist/dts/pages/Repository/data.js.map +1 -0
  36. package/dist/dts/pages/Repository/index.d.ts +4 -0
  37. package/dist/dts/pages/Repository/index.d.ts.map +1 -0
  38. package/dist/dts/pages/Repository/index.js +4 -0
  39. package/dist/dts/pages/Repository/index.js.map +1 -0
  40. package/dist/dts/pages/Repository/types.d.ts +6 -0
  41. package/dist/dts/pages/Repository/types.d.ts.map +1 -0
  42. package/dist/dts/pages/Repository/types.js +2 -0
  43. package/dist/dts/pages/Repository/types.js.map +1 -0
  44. package/dist/dts/types/icons.d.ts +2 -2
  45. package/dist/dts/types/icons.d.ts.map +1 -1
  46. package/dist/dts/types/icons.js +2 -2
  47. package/dist/dts/types/icons.js.map +1 -1
  48. package/dist/esm/index.js +37 -2
  49. package/dist/esm/index.js.map +1 -1
  50. package/dist/index.d.ts +6 -6
  51. package/dist/tsconfig.tsbuildinfo +1 -1
  52. package/package.json +3 -3
  53. package/dist/dts/components/DropdownMenu/DropdownMenu.d.ts +0 -64
  54. package/dist/dts/components/DropdownMenu/DropdownMenu.d.ts.map +0 -1
  55. package/dist/dts/components/DropdownMenu/DropdownMenu.js +0 -38
  56. package/dist/dts/components/DropdownMenu/DropdownMenu.js.map +0 -1
  57. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.d.ts +0 -2
  58. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.d.ts.map +0 -1
  59. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.js +0 -141
  60. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.js.map +0 -1
  61. package/dist/dts/components/DropdownMenu/index.d.ts +0 -3
  62. package/dist/dts/components/DropdownMenu/index.d.ts.map +0 -1
  63. package/dist/dts/components/DropdownMenu/index.js +0 -3
  64. package/dist/dts/components/DropdownMenu/index.js.map +0 -1
  65. package/dist/dts/components/MessageCards/ErrorMessage.d.ts +0 -7
  66. package/dist/dts/components/MessageCards/ErrorMessage.d.ts.map +0 -1
  67. package/dist/dts/components/MessageCards/ErrorMessage.js +0 -8
  68. package/dist/dts/components/MessageCards/ErrorMessage.js.map +0 -1
  69. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts +0 -20
  70. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts.map +0 -1
  71. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js +0 -37
  72. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js.map +0 -1
  73. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.d.ts +0 -9
  74. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.d.ts.map +0 -1
  75. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.js +0 -122
  76. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.js.map +0 -1
  77. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.d.ts +0 -19
  78. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.d.ts.map +0 -1
  79. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.js +0 -52
  80. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.js.map +0 -1
  81. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts +0 -10
  82. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts.map +0 -1
  83. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js +0 -37
  84. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js.map +0 -1
  85. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.d.ts +0 -13
  86. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.d.ts.map +0 -1
  87. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.js +0 -33
  88. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.js.map +0 -1
  89. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.d.ts +0 -7
  90. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.d.ts.map +0 -1
  91. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.js.map +0 -1
  92. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.d.ts +0 -5
  93. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.d.ts.map +0 -1
  94. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.js +0 -5
  95. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.js.map +0 -1
  96. package/dist/dts/features/CohortBuilder/CohortManager/index.d.ts +0 -5
  97. package/dist/dts/features/CohortBuilder/CohortManager/index.d.ts.map +0 -1
  98. package/dist/dts/features/CohortBuilder/CohortManager/index.js +0 -4
  99. package/dist/dts/features/CohortBuilder/CohortManager/index.js.map +0 -1
  100. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.d.ts +0 -13
  101. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.d.ts.map +0 -1
  102. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.js +0 -15
  103. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.js.map +0 -1
  104. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.d.ts +0 -4
  105. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.d.ts.map +0 -1
  106. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.js +0 -8
  107. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.js.map +0 -1
  108. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts +0 -32
  109. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts.map +0 -1
  110. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js +0 -190
  111. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js.map +0 -1
  112. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.d.ts +0 -2
  113. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.d.ts.map +0 -1
  114. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.js +0 -145
  115. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.js.map +0 -1
  116. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts +0 -29
  117. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts.map +0 -1
  118. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js +0 -79
  119. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js.map +0 -1
  120. package/dist/dts/features/CohortBuilder/CohortManager/style.d.ts +0 -5
  121. package/dist/dts/features/CohortBuilder/CohortManager/style.d.ts.map +0 -1
  122. package/dist/dts/features/CohortBuilder/CohortManager/style.js +0 -21
  123. package/dist/dts/features/CohortBuilder/CohortManager/style.js.map +0 -1
  124. package/dist/dts/features/CohortBuilder/CohortManager/types.d.ts +0 -49
  125. package/dist/dts/features/CohortBuilder/CohortManager/types.d.ts.map +0 -1
  126. package/dist/dts/features/CohortBuilder/CohortManager/types.js.map +0 -1
  127. package/dist/dts/features/CohortBuilder/CohortManager.d.ts +0 -6
  128. package/dist/dts/features/CohortBuilder/CohortManager.d.ts.map +0 -1
  129. package/dist/dts/features/CohortBuilder/CohortManager.js +0 -8
  130. package/dist/dts/features/CohortBuilder/CohortManager.js.map +0 -1
  131. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts +0 -64
  132. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts.map +0 -1
  133. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js +0 -572
  134. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js.map +0 -1
  135. package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts +0 -1
  136. package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts.map +0 -1
  137. package/dist/dts/features/CohortDiscovery/CohortSelectors.js +0 -41
  138. package/dist/dts/features/CohortDiscovery/CohortSelectors.js.map +0 -1
  139. package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts +0 -1
  140. package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts.map +0 -1
  141. package/dist/dts/features/CohortDiscovery/CohortSlice.js +0 -162
  142. package/dist/dts/features/CohortDiscovery/CohortSlice.js.map +0 -1
  143. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.d.ts +0 -1
  144. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.d.ts.map +0 -1
  145. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.js +0 -284
  146. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.js.map +0 -1
  147. /package/dist/dts/features/CohortBuilder/{CohortManager → Repository}/types.js +0 -0
package/dist/cjs/index.js CHANGED
@@ -880,6 +880,7 @@ const workspaceShutdownAlertLimit = 30000; // 5 minutes: 5 * 60 * 1000 TODO Figu
880
880
  }
881
881
  };
882
882
 
883
+ const ACTIVITY_CHANNEL = 'gen3-user-activity';
883
884
  const logoutSession = async ()=>{
884
885
  // logged in using credentials then execute credentials logout first
885
886
  const accessToken = cookiesNext.getCookie('credentials_token');
@@ -963,6 +964,27 @@ const UPDATE_SESSION_LIMIT = MinutesToMilliseconds(5);
963
964
  const [getUserDetails] = core.useLazyFetchUserDetailsQuery(); // Fetch user details
964
965
  const userStatus = core.useCoreSelector((state)=>core.selectUserAuthStatus(state));
965
966
  const [mostRecentActivityTimestamp, setMostRecentActivityTimestamp] = React.useState(Date.now());
967
+ const broadcastChannelRef = React.useRef(null);
968
+ // Initialize BroadcastChannel for cross-tab communication
969
+ // any user event on one tab or window will update mostRecentActivityTimestamp
970
+ React.useEffect(()=>{
971
+ if (typeof window !== 'undefined') {
972
+ broadcastChannelRef.current = new BroadcastChannel(ACTIVITY_CHANNEL);
973
+ // Listen for activity updates from other tabs
974
+ const handleActivityMessage = (event)=>{
975
+ if (event.data.type === 'activity-update') {
976
+ setMostRecentActivityTimestamp(event.data.timestamp);
977
+ }
978
+ };
979
+ broadcastChannelRef.current.addEventListener('message', handleActivityMessage);
980
+ return ()=>{
981
+ if (broadcastChannelRef.current) {
982
+ broadcastChannelRef.current.removeEventListener('message', handleActivityMessage);
983
+ broadcastChannelRef.current.close();
984
+ }
985
+ };
986
+ }
987
+ }, []);
966
988
  const [mostRecentSessionRefreshTimestamp, setMostRecentSessionRefreshTimestamp] = React.useState(Date.now());
967
989
  const inactiveTimeLimitMilliseconds = MinutesToMilliseconds(inactiveTimeLimit);
968
990
  const workspaceInactivityTimeLimitMilliseconds = MinutesToMilliseconds(workspaceInactivityTimeLimit);
@@ -999,15 +1021,28 @@ const UPDATE_SESSION_LIMIT = MinutesToMilliseconds(5);
999
1021
  updateSession();
1000
1022
  if (updateSessionIntervalMilliseconds <= 0) return; // do not poll if updateSessionInterval is 0
1001
1023
  const updateUserActivity = ()=>{
1002
- setMostRecentActivityTimestamp(Date.now());
1024
+ const timestamp = Date.now();
1025
+ setMostRecentActivityTimestamp(timestamp);
1026
+ if (broadcastChannelRef.current) {
1027
+ broadcastChannelRef.current.postMessage({
1028
+ type: 'activity-update',
1029
+ timestamp
1030
+ });
1031
+ }
1003
1032
  };
1004
1033
  window.addEventListener('mousedown', updateUserActivity);
1005
1034
  window.addEventListener('keypress', updateUserActivity);
1006
1035
  window.addEventListener('updateUserActivity', updateUserActivity);
1036
+ window.addEventListener('scroll', updateUserActivity);
1037
+ window.addEventListener('click', updateUserActivity);
1038
+ window.addEventListener('touchstart', updateUserActivity);
1007
1039
  return ()=>{
1008
1040
  window.removeEventListener('mousedown', updateUserActivity);
1009
1041
  window.removeEventListener('keypress', updateUserActivity);
1010
1042
  window.removeEventListener('updateUserActivity', updateUserActivity);
1043
+ window.removeEventListener('scroll', updateUserActivity);
1044
+ window.removeEventListener('click', updateUserActivity);
1045
+ window.removeEventListener('touchstart', updateUserActivity);
1011
1046
  };
1012
1047
  }, []); // only call on mount/dismount
1013
1048
  useInterval(()=>{