@veltdev/react 4.0.0-beta.2 → 4.0.0-beta.3
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 +23 -5
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilter.d.ts +2 -0
- package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilterStatus/VeltCommentsSidebarFilterStatus.d.ts +12 -0
- package/cjs/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilterStatus/index.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/CommentActions.d.ts +2 -2
- package/esm/index.js +23 -5
- package/esm/index.js.map +1 -1
- package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilter.d.ts +2 -0
- package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilterStatus/VeltCommentsSidebarFilterStatus.d.ts +12 -0
- package/esm/types/components/VeltCommentsSidebarWireframe/VeltCommentsSidebarFilter/VeltCommentsSidebarFilterStatus/index.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/CommentActions.d.ts +2 -2
- package/index.d.ts +11 -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 = '4.0.0-beta.
|
|
143
|
+
var VELT_SDK_VERSION = '4.0.0-beta.3';
|
|
144
144
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
145
145
|
var VELT_TAB_ID = 'veltTabId';
|
|
146
146
|
|
|
@@ -2394,6 +2394,13 @@ var VeltCommentsSidebarFilterVersions = function (props) {
|
|
|
2394
2394
|
VeltCommentsSidebarFilterVersions.Name = VeltCommentsSidebarFilterName;
|
|
2395
2395
|
VeltCommentsSidebarFilterVersions.Item = VeltCommentsSidebarFilterItem;
|
|
2396
2396
|
|
|
2397
|
+
var VeltCommentsSidebarFilterStatus = function (props) {
|
|
2398
|
+
var children = props.children, remainingProps = __rest(props, ["children"]);
|
|
2399
|
+
return (React__default["default"].createElement("velt-comments-sidebar-filter-status-wireframe", __assign({}, remainingProps), children));
|
|
2400
|
+
};
|
|
2401
|
+
VeltCommentsSidebarFilterStatus.Name = VeltCommentsSidebarFilterName;
|
|
2402
|
+
VeltCommentsSidebarFilterStatus.Item = VeltCommentsSidebarFilterItem;
|
|
2403
|
+
|
|
2397
2404
|
var VeltCommentsSidebarFilter = function (props) {
|
|
2398
2405
|
var children = props.children, remainingProps = __rest(props, ["children"]);
|
|
2399
2406
|
return (React__default["default"].createElement("velt-comments-sidebar-filter-wireframe", __assign({}, remainingProps), children));
|
|
@@ -2409,6 +2416,7 @@ VeltCommentsSidebarFilter.Priority = VeltCommentsSidebarFilterPriority;
|
|
|
2409
2416
|
VeltCommentsSidebarFilter.Title = VeltCommentsSidebarFilterTitle;
|
|
2410
2417
|
VeltCommentsSidebarFilter.Versions = VeltCommentsSidebarFilterVersions;
|
|
2411
2418
|
VeltCommentsSidebarFilter.Item = VeltCommentsSidebarFilterItem;
|
|
2419
|
+
VeltCommentsSidebarFilter.Status = VeltCommentsSidebarFilterStatus;
|
|
2412
2420
|
|
|
2413
2421
|
var VeltCommentsSidebarFilterButton = function (props) {
|
|
2414
2422
|
var children = props.children, remainingProps = __rest(props, ["children"]);
|
|
@@ -4838,7 +4846,7 @@ function useDeleteCommentAnnotation() {
|
|
|
4838
4846
|
}
|
|
4839
4847
|
function useGetCommentAnnotations(getCommentAnnotationsRequest) {
|
|
4840
4848
|
var commentElement = useCommentUtils();
|
|
4841
|
-
var _a = React.useState(null), data = _a[0], setData = _a[1];
|
|
4849
|
+
var _a = React.useState({ data: null }), data = _a[0], setData = _a[1];
|
|
4842
4850
|
var subscriptionRef = React.useRef();
|
|
4843
4851
|
// Memoize the inputs
|
|
4844
4852
|
var memoizedData = React.useMemo(function () {
|
|
@@ -4853,7 +4861,12 @@ function useGetCommentAnnotations(getCommentAnnotationsRequest) {
|
|
|
4853
4861
|
}
|
|
4854
4862
|
var subscription = commentElement.getCommentAnnotations(memoizedData)
|
|
4855
4863
|
.subscribe(function (res) {
|
|
4856
|
-
|
|
4864
|
+
if (res) {
|
|
4865
|
+
setData(res);
|
|
4866
|
+
}
|
|
4867
|
+
else {
|
|
4868
|
+
setData({ data: null });
|
|
4869
|
+
}
|
|
4857
4870
|
});
|
|
4858
4871
|
// Store the new subscription
|
|
4859
4872
|
subscriptionRef.current = subscription;
|
|
@@ -4868,7 +4881,7 @@ function useGetCommentAnnotations(getCommentAnnotationsRequest) {
|
|
|
4868
4881
|
}
|
|
4869
4882
|
function useCommentAnnotationsCount(getCommentAnnotationsCountRequest) {
|
|
4870
4883
|
var commentElement = useCommentUtils();
|
|
4871
|
-
var _a = React.useState(null), data = _a[0], setData = _a[1];
|
|
4884
|
+
var _a = React.useState({ data: null }), data = _a[0], setData = _a[1];
|
|
4872
4885
|
var subscriptionRef = React.useRef();
|
|
4873
4886
|
// Memoize the inputs
|
|
4874
4887
|
var memoizedData = React.useMemo(function () {
|
|
@@ -4883,7 +4896,12 @@ function useCommentAnnotationsCount(getCommentAnnotationsCountRequest) {
|
|
|
4883
4896
|
}
|
|
4884
4897
|
var subscription = commentElement.getCommentAnnotationsCount(memoizedData)
|
|
4885
4898
|
.subscribe(function (res) {
|
|
4886
|
-
|
|
4899
|
+
if (res) {
|
|
4900
|
+
setData(res);
|
|
4901
|
+
}
|
|
4902
|
+
else {
|
|
4903
|
+
setData({ data: null });
|
|
4904
|
+
}
|
|
4887
4905
|
});
|
|
4888
4906
|
// Store the new subscription
|
|
4889
4907
|
subscriptionRef.current = subscription;
|