@veltdev/react 3.0.35 → 3.0.37
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.
- package/cjs/index.js +59 -5
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +2 -0
- package/cjs/types/components/VeltCommentThread/VeltCommentThread.d.ts +4 -0
- package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarActionButton/VeltCommentsSidebarActionButton.d.ts +8 -0
- package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarActionButton/index.d.ts +1 -0
- package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarWireframe.d.ts +2 -0
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/CommentElement.d.ts +4 -1
- package/cjs/types/hooks/index.d.ts +1 -1
- package/esm/index.js +57 -6
- package/esm/index.js.map +1 -1
- package/esm/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +2 -0
- package/esm/types/components/VeltCommentThread/VeltCommentThread.d.ts +4 -0
- package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarActionButton/VeltCommentsSidebarActionButton.d.ts +8 -0
- package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarActionButton/index.d.ts +1 -0
- package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarWireframe.d.ts +2 -0
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/CommentElement.d.ts +4 -1
- package/esm/types/hooks/index.d.ts +1 -1
- package/index.d.ts +18 -2
- 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.
|
|
143
|
+
var VELT_SDK_VERSION = '3.0.37';
|
|
144
144
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
145
145
|
var VELT_TAB_ID = 'veltTabId';
|
|
146
146
|
|
|
@@ -363,7 +363,7 @@ 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, 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;
|
|
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, customFilterMode = props.customFilterMode;
|
|
367
367
|
var ref = React.useRef();
|
|
368
368
|
var openSidebarRef = React.useRef(openSidebar);
|
|
369
369
|
var onSidebarOpenRef = React.useRef(onSidebarOpen);
|
|
@@ -425,7 +425,7 @@ var SnippylyCommentsSidebar = function (props) {
|
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
}, []);
|
|
428
|
-
return (React__default["default"].createElement("velt-comments-sidebar", { ref: ref, position: position, "filter-panel-layout": filterPanelLayout, "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, "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 }));
|
|
428
|
+
return (React__default["default"].createElement("velt-comments-sidebar", { ref: ref, position: position, "filter-panel-layout": filterPanelLayout, "custom-filter-mode": [true, false].includes(customFilterMode) ? (customFilterMode ? '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
429
|
};
|
|
430
430
|
|
|
431
431
|
var SnippylyCommentTool = function (props) {
|
|
@@ -794,7 +794,7 @@ var VeltViewAnalytics = function (props) {
|
|
|
794
794
|
};
|
|
795
795
|
|
|
796
796
|
var VeltCommentThread = function (props) {
|
|
797
|
-
var annotationId = props.annotationId, onCommentClick = props.onCommentClick;
|
|
797
|
+
var annotationId = props.annotationId, onCommentClick = props.onCommentClick, darkMode = props.darkMode, variant = props.variant, shadowDom = props.shadowDom, dialogVariant = props.dialogVariant;
|
|
798
798
|
var ref = React.useRef();
|
|
799
799
|
var onCommentClickRef = React.useRef(onCommentClick);
|
|
800
800
|
React.useEffect(function () {
|
|
@@ -819,7 +819,7 @@ var VeltCommentThread = function (props) {
|
|
|
819
819
|
}
|
|
820
820
|
};
|
|
821
821
|
}, []);
|
|
822
|
-
return (React__default["default"].createElement("velt-comment-thread", { ref: ref, "annotation-id": annotationId }));
|
|
822
|
+
return (React__default["default"].createElement("velt-comment-thread", { ref: ref, "annotation-id": annotationId, variant: variant, "dialog-variant": dialogVariant, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }));
|
|
823
823
|
};
|
|
824
824
|
|
|
825
825
|
var VeltNotificationsTool = function (props) {
|
|
@@ -2580,6 +2580,11 @@ var VeltCommentsSidebarResetFilterButtonWireframe = function (props) {
|
|
|
2580
2580
|
return (React__default["default"].createElement("velt-comments-sidebar-reset-filter-button-wireframe", __assign({}, remainingProps), children));
|
|
2581
2581
|
};
|
|
2582
2582
|
|
|
2583
|
+
var VeltCommentsSidebarActionButton = function (props) {
|
|
2584
|
+
var children = props.children, variant = props.variant, type = props.type, id = props.id;
|
|
2585
|
+
return (React__default["default"].createElement("velt-comments-sidebar-action-button-wireframe", { variant: variant, type: type, id: id }, children));
|
|
2586
|
+
};
|
|
2587
|
+
|
|
2583
2588
|
var VeltCommentsSidebarWireframe = function (props) {
|
|
2584
2589
|
var children = props.children, remainingProp = __rest(props, ["children"]);
|
|
2585
2590
|
return (React__default["default"].createElement("velt-comments-sidebar-wireframe", __assign({}, remainingProp), children));
|
|
@@ -2599,6 +2604,7 @@ VeltCommentsSidebarWireframe.MinimalFilterDropdown = VeltCommentsSidebarMinimalF
|
|
|
2599
2604
|
VeltCommentsSidebarWireframe.LocationFilterDropdown = VeltCommentsSidebarLocationFilterDropdown;
|
|
2600
2605
|
VeltCommentsSidebarWireframe.MinimalActionsDropdown = VeltCommentsSidebarMinimalActionsDropdownWireframe;
|
|
2601
2606
|
VeltCommentsSidebarWireframe.ResetFilterButton = VeltCommentsSidebarResetFilterButtonWireframe;
|
|
2607
|
+
VeltCommentsSidebarWireframe.ActionButton = VeltCommentsSidebarActionButton;
|
|
2602
2608
|
|
|
2603
2609
|
var VeltCommentPinGhostCommentIndicator = function (props) {
|
|
2604
2610
|
var children = props.children, remainingProp = __rest(props, ["children"]);
|
|
@@ -3672,6 +3678,51 @@ function useCommentAnnotationById(config) {
|
|
|
3672
3678
|
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.getCommentAnnotationById]);
|
|
3673
3679
|
return data;
|
|
3674
3680
|
}
|
|
3681
|
+
function useCommentSidebarActionButtonClick() {
|
|
3682
|
+
var commentElement = useCommentUtils();
|
|
3683
|
+
var _a = React__default["default"].useState(null), data = _a[0], setData = _a[1];
|
|
3684
|
+
React.useEffect(function () {
|
|
3685
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentSidebarActionButtonClick))
|
|
3686
|
+
return;
|
|
3687
|
+
var subscription = commentElement.onCommentSidebarActionButtonClick().subscribe(function (res) {
|
|
3688
|
+
setData(res);
|
|
3689
|
+
});
|
|
3690
|
+
return function () {
|
|
3691
|
+
subscription.unsubscribe();
|
|
3692
|
+
};
|
|
3693
|
+
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentSidebarActionButtonClick]);
|
|
3694
|
+
return data;
|
|
3695
|
+
}
|
|
3696
|
+
function useCommentSidebarInit() {
|
|
3697
|
+
var commentElement = useCommentUtils();
|
|
3698
|
+
var _a = React__default["default"].useState(null), data = _a[0], setData = _a[1];
|
|
3699
|
+
React.useEffect(function () {
|
|
3700
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentSidebarInit))
|
|
3701
|
+
return;
|
|
3702
|
+
var subscription = commentElement.onCommentSidebarInit().subscribe(function (res) {
|
|
3703
|
+
setData(res);
|
|
3704
|
+
});
|
|
3705
|
+
return function () {
|
|
3706
|
+
subscription.unsubscribe();
|
|
3707
|
+
};
|
|
3708
|
+
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentSidebarInit]);
|
|
3709
|
+
return data;
|
|
3710
|
+
}
|
|
3711
|
+
function useCommentSidebarData() {
|
|
3712
|
+
var commentElement = useCommentUtils();
|
|
3713
|
+
var _a = React__default["default"].useState(null), data = _a[0], setData = _a[1];
|
|
3714
|
+
React.useEffect(function () {
|
|
3715
|
+
if (!(commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentSidebarData))
|
|
3716
|
+
return;
|
|
3717
|
+
var subscription = commentElement.onCommentSidebarData().subscribe(function (res) {
|
|
3718
|
+
setData(res);
|
|
3719
|
+
});
|
|
3720
|
+
return function () {
|
|
3721
|
+
subscription.unsubscribe();
|
|
3722
|
+
};
|
|
3723
|
+
}, [commentElement === null || commentElement === void 0 ? void 0 : commentElement.onCommentSidebarData]);
|
|
3724
|
+
return data;
|
|
3725
|
+
}
|
|
3675
3726
|
|
|
3676
3727
|
function useCursorUtils() {
|
|
3677
3728
|
var _a = React__default["default"].useState(), cursorElement = _a[0], setCursorElement = _a[1];
|
|
@@ -4309,6 +4360,9 @@ exports.useCommentCopyLinkHandler = useCommentCopyLinkHandler;
|
|
|
4309
4360
|
exports.useCommentDialogSidebarClickHandler = useCommentDialogSidebarClickHandler;
|
|
4310
4361
|
exports.useCommentModeState = useCommentModeState;
|
|
4311
4362
|
exports.useCommentSelectionChangeHandler = useCommentSelectionChangeHandler;
|
|
4363
|
+
exports.useCommentSidebarActionButtonClick = useCommentSidebarActionButtonClick;
|
|
4364
|
+
exports.useCommentSidebarData = useCommentSidebarData;
|
|
4365
|
+
exports.useCommentSidebarInit = useCommentSidebarInit;
|
|
4312
4366
|
exports.useCommentUpdateHandler = useCommentUpdateHandler;
|
|
4313
4367
|
exports.useCommentUtils = useCommentUtils;
|
|
4314
4368
|
exports.useContactSelected = useContactSelected;
|