@veltdev/react 3.0.42 → 3.0.44

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 (44) hide show
  1. package/cjs/index.js +66 -3
  2. package/cjs/index.js.map +1 -1
  3. package/cjs/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +3 -0
  4. package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogNavigationButton/VeltCommentDialogNavigationButton.d.ts +6 -0
  5. package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogNavigationButton/index.d.ts +1 -0
  6. package/cjs/types/components/VeltCommentDialogWireframe/VeltCommentDialogWireframe.d.ts +2 -0
  7. package/cjs/types/components/VeltCommentText/VeltCommentText.d.ts +7 -0
  8. package/cjs/types/components/VeltCommentText/index.d.ts +1 -0
  9. package/cjs/types/components/VeltCommentThreadWireframe/VeltCommentThreadWireframe.d.ts +8 -0
  10. package/cjs/types/components/VeltCommentThreadWireframe/index.d.ts +1 -0
  11. package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThread.d.ts +12 -0
  12. package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThreadBackButton/VeltCommentsSidebarFocusedThreadBackButton.d.ts +8 -0
  13. package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThreadBackButton/index.d.ts +1 -0
  14. package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThreadDialogContainer/VeltCommentsSidebarFocusedThreadDialogContainer.d.ts +8 -0
  15. package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThreadDialogContainer/index.d.ts +1 -0
  16. package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/index.d.ts +1 -0
  17. package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarWireframe.d.ts +2 -0
  18. package/cjs/types/components/index.d.ts +2 -0
  19. package/cjs/types/constants.d.ts +1 -1
  20. package/cjs/types/hooks/SelectionElement.d.ts +2 -1
  21. package/cjs/types/hooks/index.d.ts +1 -1
  22. package/esm/index.js +64 -4
  23. package/esm/index.js.map +1 -1
  24. package/esm/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +3 -0
  25. package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogNavigationButton/VeltCommentDialogNavigationButton.d.ts +6 -0
  26. package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogNavigationButton/index.d.ts +1 -0
  27. package/esm/types/components/VeltCommentDialogWireframe/VeltCommentDialogWireframe.d.ts +2 -0
  28. package/esm/types/components/VeltCommentText/VeltCommentText.d.ts +7 -0
  29. package/esm/types/components/VeltCommentText/index.d.ts +1 -0
  30. package/esm/types/components/VeltCommentThreadWireframe/VeltCommentThreadWireframe.d.ts +8 -0
  31. package/esm/types/components/VeltCommentThreadWireframe/index.d.ts +1 -0
  32. package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThread.d.ts +12 -0
  33. package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThreadBackButton/VeltCommentsSidebarFocusedThreadBackButton.d.ts +8 -0
  34. package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThreadBackButton/index.d.ts +1 -0
  35. package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThreadDialogContainer/VeltCommentsSidebarFocusedThreadDialogContainer.d.ts +8 -0
  36. package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/VeltCommentsSidebarFocusedThreadDialogContainer/index.d.ts +1 -0
  37. package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFocusedThread/index.d.ts +1 -0
  38. package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarWireframe.d.ts +2 -0
  39. package/esm/types/components/index.d.ts +2 -0
  40. package/esm/types/constants.d.ts +1 -1
  41. package/esm/types/hooks/SelectionElement.d.ts +2 -1
  42. package/esm/types/hooks/index.d.ts +1 -1
  43. package/index.d.ts +45 -2
  44. package/package.json +1 -1
package/cjs/index.js CHANGED
@@ -140,7 +140,7 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
140
140
  }
141
141
  };
142
142
 
143
- var VELT_SDK_VERSION = '3.0.42';
143
+ var VELT_SDK_VERSION = '3.0.44';
144
144
  var VELT_SDK_INIT_EVENT = 'onVeltInit';
145
145
  var VELT_TAB_ID = 'veltTabId';
146
146
 
@@ -363,13 +363,14 @@ var SnippylyComments = function (props) {
363
363
  };
364
364
 
365
365
  var SnippylyCommentsSidebar = function (props) {
366
- var embedMode = props.embedMode; props.floatingMode; var enableUrlNavigation = props.enableUrlNavigation, urlNavigation = props.urlNavigation, queryParamsComments = props.queryParamsComments, pageMode = props.pageMode, currentLocationSuffix = props.currentLocationSuffix, sortData = props.sortData, filterConfig = props.filterConfig, groupConfig = props.groupConfig, filters = props.filters, excludeLocationIds = props.excludeLocationIds, variant = props.variant, pageModeComposerVariant = props.pageModeComposerVariant, dialogVariant = props.dialogVariant, shadowDom = props.shadowDom, openSidebar = props.openSidebar, onSidebarOpen = props.onSidebarOpen, onSidebarCommentClick = props.onSidebarCommentClick, onCommentClick = props.onCommentClick, onSidebarClose = props.onSidebarClose, darkMode = props.darkMode, position = props.position, filterPanelLayout = props.filterPanelLayout, customActions = props.customActions;
366
+ var embedMode = props.embedMode; props.floatingMode; var enableUrlNavigation = props.enableUrlNavigation, urlNavigation = props.urlNavigation, queryParamsComments = props.queryParamsComments, pageMode = props.pageMode, currentLocationSuffix = props.currentLocationSuffix, sortData = props.sortData, filterConfig = props.filterConfig, groupConfig = props.groupConfig, filters = props.filters, excludeLocationIds = props.excludeLocationIds, variant = props.variant, pageModeComposerVariant = props.pageModeComposerVariant, dialogVariant = props.dialogVariant, shadowDom = props.shadowDom, openSidebar = props.openSidebar, onSidebarOpen = props.onSidebarOpen, onSidebarCommentClick = props.onSidebarCommentClick, onCommentClick = props.onCommentClick, onSidebarClose = props.onSidebarClose, darkMode = props.darkMode, position = props.position, filterPanelLayout = props.filterPanelLayout, customActions = props.customActions, focusedThreadDialogVariant = props.focusedThreadDialogVariant, focusedThreadMode = props.focusedThreadMode, onCommentNavigationButtonClick = props.onCommentNavigationButtonClick;
367
367
  var ref = React.useRef();
368
368
  var openSidebarRef = React.useRef(openSidebar);
369
369
  var onSidebarOpenRef = React.useRef(onSidebarOpen);
370
370
  var onSidebarCommentClickRef = React.useRef(onSidebarCommentClick);
371
371
  var onCommentClickRef = React.useRef(onCommentClick);
372
372
  var onSidebarCloseRef = React.useRef(onSidebarClose);
373
+ var onCommentNavigationButtonClickRef = React.useRef(onCommentNavigationButtonClick);
373
374
  // Update the ref to always point to the latest callback function
374
375
  React.useEffect(function () {
375
376
  openSidebarRef.current = openSidebar;
@@ -386,6 +387,9 @@ var SnippylyCommentsSidebar = function (props) {
386
387
  React.useEffect(function () {
387
388
  onCommentClickRef.current = onCommentClick;
388
389
  }, [onCommentClick]);
390
+ React.useEffect(function () {
391
+ onCommentNavigationButtonClickRef.current = onCommentNavigationButtonClick;
392
+ }, [onCommentNavigationButtonClick]);
389
393
  React.useEffect(function () {
390
394
  var element;
391
395
  var handleSidebarOpen = function (event) {
@@ -409,12 +413,18 @@ var SnippylyCommentsSidebar = function (props) {
409
413
  onSidebarCloseRef.current(event === null || event === void 0 ? void 0 : event.detail);
410
414
  }
411
415
  };
416
+ var handleCommentNavigationButtonClick = function (event) {
417
+ if (onCommentNavigationButtonClickRef.current) {
418
+ onCommentNavigationButtonClickRef.current(event === null || event === void 0 ? void 0 : event.detail);
419
+ }
420
+ };
412
421
  if (ref.current) {
413
422
  element = ref.current;
414
423
  if (element) {
415
424
  element.addEventListener('onSidebarOpen', handleSidebarOpen);
416
425
  element.addEventListener('onSidebarCommentClick', handleSidebarCommentClick);
417
426
  element.addEventListener('onSidebarClose', handleSidebarClose);
427
+ element.addEventListener('onCommentNavigationButtonClick', handleCommentNavigationButtonClick);
418
428
  }
419
429
  }
420
430
  return function () {
@@ -422,10 +432,11 @@ var SnippylyCommentsSidebar = function (props) {
422
432
  element.removeEventListener('onSidebarOpen', handleSidebarOpen);
423
433
  element.removeEventListener('onSidebarCommentClick', handleSidebarCommentClick);
424
434
  element.removeEventListener('onSidebarClose', handleSidebarClose);
435
+ element.removeEventListener('onCommentNavigationButtonClick', handleCommentNavigationButtonClick);
425
436
  }
426
437
  };
427
438
  }, []);
428
- return (React__default["default"].createElement("velt-comments-sidebar", { ref: ref, position: position, "filter-panel-layout": filterPanelLayout, "custom-actions": [true, false].includes(customActions) ? (customActions ? 'true' : 'false') : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "embed-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined, "enable-url-navigation": [true, false].includes(enableUrlNavigation) ? (enableUrlNavigation ? 'true' : 'false') : undefined, "url-navigation": [true, false].includes(urlNavigation) ? (urlNavigation ? 'true' : 'false') : undefined, "query-params-comments": [true, false].includes(queryParamsComments) ? (queryParamsComments ? 'true' : 'false') : undefined, "page-mode": [true, false].includes(pageMode) ? (pageMode ? 'true' : 'false') : undefined, "current-location-suffix": [true, false].includes(currentLocationSuffix) ? (currentLocationSuffix ? 'true' : 'false') : undefined, "filter-config": filterConfig ? JSON.stringify(filterConfig) : undefined, "group-config": groupConfig ? JSON.stringify(groupConfig) : undefined, filters: filters ? JSON.stringify(filters) : undefined, "exclude-location-ids": excludeLocationIds ? JSON.stringify(excludeLocationIds) : undefined, variant: variant, "page-mode-composer-variant": pageModeComposerVariant, "dialog-variant": dialogVariant, "sort-data": sortData, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, "floating-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined }));
439
+ return (React__default["default"].createElement("velt-comments-sidebar", { ref: ref, position: position, "filter-panel-layout": filterPanelLayout, "focused-thread-mode": [true, false].includes(focusedThreadMode) ? (focusedThreadMode ? 'true' : 'false') : undefined, "focused-thread-dialog-variant": focusedThreadDialogVariant, "custom-actions": [true, false].includes(customActions) ? (customActions ? 'true' : 'false') : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "embed-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined, "enable-url-navigation": [true, false].includes(enableUrlNavigation) ? (enableUrlNavigation ? 'true' : 'false') : undefined, "url-navigation": [true, false].includes(urlNavigation) ? (urlNavigation ? 'true' : 'false') : undefined, "query-params-comments": [true, false].includes(queryParamsComments) ? (queryParamsComments ? 'true' : 'false') : undefined, "page-mode": [true, false].includes(pageMode) ? (pageMode ? 'true' : 'false') : undefined, "current-location-suffix": [true, false].includes(currentLocationSuffix) ? (currentLocationSuffix ? 'true' : 'false') : undefined, "filter-config": filterConfig ? JSON.stringify(filterConfig) : undefined, "group-config": groupConfig ? JSON.stringify(groupConfig) : undefined, filters: filters ? JSON.stringify(filters) : undefined, "exclude-location-ids": excludeLocationIds ? JSON.stringify(excludeLocationIds) : undefined, variant: variant, "page-mode-composer-variant": pageModeComposerVariant, "dialog-variant": dialogVariant, "sort-data": sortData, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, "floating-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined }));
429
440
  };
430
441
 
431
442
  var SnippylyCommentTool = function (props) {
@@ -1391,6 +1402,11 @@ var VeltCommentPin = function (props) {
1391
1402
  return (React__default["default"].createElement("velt-comment-pin", { "annotation-id": annotationId }, children));
1392
1403
  };
1393
1404
 
1405
+ var VeltCommentText = function (props) {
1406
+ var children = props.children, annotationId = props.annotationId, multiThreadAnnotationId = props.multiThreadAnnotationId;
1407
+ return (React__default["default"].createElement("velt-comment-text", { "annotation-id": annotationId, "multi-thread-annotation-id": multiThreadAnnotationId }, children));
1408
+ };
1409
+
1394
1410
  var VeltCanvasComment = function (props) {
1395
1411
  var children = props.children, canvasId = props.canvasId, position = props.position;
1396
1412
  return (React__default["default"].createElement("velt-canvas-comment", { "canvas-id": canvasId, position: JSON.stringify(position) }, children));
@@ -2147,6 +2163,11 @@ var VeltCommentDialogUnresolveButton = function (props) {
2147
2163
  return (React__default["default"].createElement("velt-comment-dialog-unresolve-button-wireframe", __assign({}, remainingProp), children));
2148
2164
  };
2149
2165
 
2166
+ var VeltCommentDialogNavigationButton = function (props) {
2167
+ var children = props.children, remainingProp = __rest(props, ["children"]);
2168
+ return (React__default["default"].createElement("velt-comment-dialog-navigation-button-wireframe", __assign({}, remainingProp), children));
2169
+ };
2170
+
2150
2171
  var VeltCommentDialogWireframe = function (props) {
2151
2172
  var children = props.children, remainingProp = __rest(props, ["children"]);
2152
2173
  return (React__default["default"].createElement("velt-comment-dialog-wireframe", __assign({}, remainingProp), children));
@@ -2179,6 +2200,7 @@ VeltCommentDialogWireframe.Upgrade = VeltCommentDialogUpgrade;
2179
2200
  VeltCommentDialogWireframe.CustomAnnotationDropdown = VeltCommentDialogCustomAnnotationDropdown;
2180
2201
  VeltCommentDialogWireframe.DeleteButton = VeltCommentDialogDeleteButton;
2181
2202
  VeltCommentDialogWireframe.CloseButton = VeltCommentDialogCloseButton;
2203
+ VeltCommentDialogWireframe.NavigationButton = VeltCommentDialogNavigationButton;
2182
2204
 
2183
2205
  var VeltCommentsSidebarCloseButton = function (props) {
2184
2206
  var children = props.children, remainingProps = __rest(props, ["children"]);
@@ -2585,6 +2607,23 @@ var VeltCommentsSidebarActionButton = function (props) {
2585
2607
  return (React__default["default"].createElement("velt-comments-sidebar-action-button-wireframe", { variant: variant, type: type, id: id }, children));
2586
2608
  };
2587
2609
 
2610
+ var VeltCommentsSidebarFocusedThreadBackButton = function (props) {
2611
+ var children = props.children, remainingProps = __rest(props, ["children"]);
2612
+ return (React__default["default"].createElement("velt-comments-sidebar-focused-thread-back-button-wireframe", __assign({}, remainingProps), children));
2613
+ };
2614
+
2615
+ var VeltCommentsSidebarFocusedThreadDialogContainer = function (props) {
2616
+ var children = props.children, remainingProps = __rest(props, ["children"]);
2617
+ return (React__default["default"].createElement("velt-comments-sidebar-focused-thread-dialog-container-wireframe", __assign({}, remainingProps), children));
2618
+ };
2619
+
2620
+ var VeltCommentsSidebarFocusedThread = function (props) {
2621
+ var children = props.children, remainingProps = __rest(props, ["children"]);
2622
+ return (React__default["default"].createElement("velt-comments-sidebar-focused-thread-wireframe", __assign({}, remainingProps), children));
2623
+ };
2624
+ VeltCommentsSidebarFocusedThread.BackButton = VeltCommentsSidebarFocusedThreadBackButton;
2625
+ VeltCommentsSidebarFocusedThread.DialogContainer = VeltCommentsSidebarFocusedThreadDialogContainer;
2626
+
2588
2627
  var VeltCommentsSidebarWireframe = function (props) {
2589
2628
  var children = props.children, remainingProp = __rest(props, ["children"]);
2590
2629
  return (React__default["default"].createElement("velt-comments-sidebar-wireframe", __assign({}, remainingProp), children));
@@ -2605,6 +2644,7 @@ VeltCommentsSidebarWireframe.LocationFilterDropdown = VeltCommentsSidebarLocatio
2605
2644
  VeltCommentsSidebarWireframe.MinimalActionsDropdown = VeltCommentsSidebarMinimalActionsDropdownWireframe;
2606
2645
  VeltCommentsSidebarWireframe.ResetFilterButton = VeltCommentsSidebarResetFilterButtonWireframe;
2607
2646
  VeltCommentsSidebarWireframe.ActionButton = VeltCommentsSidebarActionButton;
2647
+ VeltCommentsSidebarWireframe.FocusedThread = VeltCommentsSidebarFocusedThread;
2608
2648
 
2609
2649
  var VeltCommentPinGhostCommentIndicator = function (props) {
2610
2650
  var children = props.children, remainingProp = __rest(props, ["children"]);
@@ -3414,6 +3454,11 @@ var VeltCommentComposerWireframe = function (props) {
3414
3454
  return (React__default["default"].createElement("velt-comment-composer-wireframe", __assign({}, remainingProps), children));
3415
3455
  };
3416
3456
 
3457
+ var VeltCommentThreadWireframe = function (props) {
3458
+ var children = props.children, remainingProp = __rest(props, ["children"]);
3459
+ return (React__default["default"].createElement("velt-comment-thread-wireframe", __assign({}, remainingProp), children));
3460
+ };
3461
+
3417
3462
  function useClient() {
3418
3463
  var client = useVeltClient().client;
3419
3464
  var _a = React__default["default"].useState(), veltClient = _a[0], setVeltClient = _a[1];
@@ -4111,6 +4156,21 @@ function useLiveSelectionUtils() {
4111
4156
  }, [client, setSelectionElement, selectionElement]);
4112
4157
  return selectionElement;
4113
4158
  }
4159
+ function useLiveSelectionDataHandler() {
4160
+ var selectionElement = useLiveSelectionUtils();
4161
+ var _a = React__default["default"].useState(null), data = _a[0], setData = _a[1];
4162
+ React.useEffect(function () {
4163
+ if (!(selectionElement === null || selectionElement === void 0 ? void 0 : selectionElement.getLiveSelectionData))
4164
+ return;
4165
+ var subscription = selectionElement.getLiveSelectionData().subscribe(function (res) {
4166
+ setData(res);
4167
+ });
4168
+ return function () {
4169
+ subscription.unsubscribe();
4170
+ };
4171
+ }, [selectionElement === null || selectionElement === void 0 ? void 0 : selectionElement.getLiveSelectionData]);
4172
+ return data;
4173
+ }
4114
4174
 
4115
4175
  function useTagUtils() {
4116
4176
  var _a = React__default["default"].useState(), tagElement = _a[0], setTagElement = _a[1];
@@ -4389,7 +4449,9 @@ exports.VeltCommentDialogWireframe = VeltCommentDialogWireframe;
4389
4449
  exports.VeltCommentPin = VeltCommentPin;
4390
4450
  exports.VeltCommentPinWireframe = VeltCommentPinWireframe;
4391
4451
  exports.VeltCommentPlayerTimeline = VeltCommentPlayerTimeline;
4452
+ exports.VeltCommentText = VeltCommentText;
4392
4453
  exports.VeltCommentThread = VeltCommentThread;
4454
+ exports.VeltCommentThreadWireframe = VeltCommentThreadWireframe;
4393
4455
  exports.VeltCommentTool = SnippylyCommentTool;
4394
4456
  exports.VeltCommentToolWireframe = VeltCommentToolWireframe;
4395
4457
  exports.VeltComments = SnippylyComments;
@@ -4466,6 +4528,7 @@ exports.useEditorAccessRequestHandler = useEditorAccessRequestHandler;
4466
4528
  exports.useEditorAccessTimer = useEditorAccessTimer;
4467
4529
  exports.useHuddleUtils = useHuddleUtils;
4468
4530
  exports.useIdentify = useIdentify;
4531
+ exports.useLiveSelectionDataHandler = useLiveSelectionDataHandler;
4469
4532
  exports.useLiveSelectionUtils = useLiveSelectionUtils;
4470
4533
  exports.useLiveState = useLiveState;
4471
4534
  exports.useLiveStateData = useLiveStateData;