@veltdev/react 1.0.90 → 1.0.91

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.
@@ -21,6 +21,7 @@ export interface IVeltPresenceProps {
21
21
  url: string;
22
22
  baseUrl: string;
23
23
  }) => void;
24
+ onPresenceUserClick?: (presenceUser: any) => any;
24
25
  }
25
26
  declare const SnippylyPresence: React.FC<IVeltPresenceProps>;
26
27
  export default SnippylyPresence;
package/esm/index.js CHANGED
@@ -313,7 +313,7 @@ var SnippylyHuddleTool = function (props) {
313
313
  };
314
314
 
315
315
  var SnippylyPresence = function (props) {
316
- var maxUsers = props.maxUsers, inactivityTime = props.inactivityTime, documentParams = props.documentParams, location = props.location, self = props.self, onUsersChanged = props.onUsersChanged, onPresenceUserChange = props.onPresenceUserChange, disableFlockNavigation = props.disableFlockNavigation, defaultFlockNavigation = props.defaultFlockNavigation, onNavigate = props.onNavigate, flockMode = props.flockMode;
316
+ var maxUsers = props.maxUsers, inactivityTime = props.inactivityTime, documentParams = props.documentParams, location = props.location, self = props.self, onPresenceUserClick = props.onPresenceUserClick, onUsersChanged = props.onUsersChanged, onPresenceUserChange = props.onPresenceUserChange, disableFlockNavigation = props.disableFlockNavigation, defaultFlockNavigation = props.defaultFlockNavigation, onNavigate = props.onNavigate, flockMode = props.flockMode;
317
317
  var ref = useRef();
318
318
  useEffect(function () {
319
319
  if (ref.current) {
@@ -331,6 +331,11 @@ var SnippylyPresence = function (props) {
331
331
  onNavigate(event === null || event === void 0 ? void 0 : event.detail);
332
332
  }
333
333
  });
334
+ element.addEventListener('onPresenceUserClick', function (event) {
335
+ if (onPresenceUserClick) {
336
+ onPresenceUserClick(event === null || event === void 0 ? void 0 : event.detail);
337
+ }
338
+ });
334
339
  }
335
340
  }, []);
336
341
  return (React.createElement("velt-presence", { ref: ref, "flock-mode": [true, false].includes(flockMode) ? (flockMode ? 'true' : 'false') : undefined, "max-users": maxUsers, "inactivity-time": inactivityTime, "document-params": (typeof documentParams === 'object') ? JSON.stringify(documentParams) : (documentParams ? documentParams : undefined), "disable-flock-navigation": [true, false].includes(disableFlockNavigation) ? (disableFlockNavigation ? 'true' : 'false') : undefined, "default-flock-navigation": [true, false].includes(defaultFlockNavigation) ? (defaultFlockNavigation ? 'true' : 'false') : undefined, self: [true, false].includes(self) ? (self ? 'true' : 'false') : undefined, location: (typeof location === 'object') ? JSON.stringify(location) : (location ? location : undefined) }));