@veltdev/react 1.0.136 → 1.0.138
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 +15 -7
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/index.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/cjs/types/hooks/LiveStateSyncElement.d.ts +2 -1
- package/esm/index.js +15 -8
- package/esm/index.js.map +1 -1
- package/esm/types/components/index.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/esm/types/hooks/LiveStateSyncElement.d.ts +2 -1
- package/index.d.ts +12 -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 = '1.0.
|
|
143
|
+
var VELT_SDK_VERSION = '1.0.156';
|
|
144
144
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
145
145
|
|
|
146
146
|
var SnippylyProvider = function (props) {
|
|
@@ -2060,6 +2060,13 @@ var VeltCommentBubbleCommentsCount = function (props) {
|
|
|
2060
2060
|
return (React__default["default"].createElement("velt-comment-bubble-comments-count-wireframe", null, children));
|
|
2061
2061
|
};
|
|
2062
2062
|
|
|
2063
|
+
var VeltCommentBubbleWireframe = function (props) {
|
|
2064
|
+
var children = props.children, remainingProp = __rest(props, ["children"]);
|
|
2065
|
+
return (React__default["default"].createElement("velt-comment-bubble-wireframe", __assign({}, remainingProp), children));
|
|
2066
|
+
};
|
|
2067
|
+
VeltCommentBubbleWireframe.Avatar = VeltCommentBubbleAvatar;
|
|
2068
|
+
VeltCommentBubbleWireframe.CommentsCount = VeltCommentBubbleCommentsCount;
|
|
2069
|
+
|
|
2063
2070
|
var VeltReactionToolWireframe = function (props) {
|
|
2064
2071
|
var children = props.children, remainingProp = __rest(props, ["children"]);
|
|
2065
2072
|
return (React__default["default"].createElement("velt-reaction-tool-wireframe", __assign({}, remainingProp), children));
|
|
@@ -2172,15 +2179,15 @@ function useVeltInitState() {
|
|
|
2172
2179
|
var client = useVeltClient().client;
|
|
2173
2180
|
var _a = React__default["default"].useState(), data = _a[0], setData = _a[1];
|
|
2174
2181
|
React__default["default"].useEffect(function () {
|
|
2175
|
-
if (!(client === null || client === void 0 ? void 0 : client.getVeltInitState
|
|
2182
|
+
if (!(client === null || client === void 0 ? void 0 : client.getVeltInitState))
|
|
2176
2183
|
return;
|
|
2177
|
-
var subscription = client === null || client === void 0 ? void 0 : client.getVeltInitState
|
|
2184
|
+
var subscription = client === null || client === void 0 ? void 0 : client.getVeltInitState().subscribe(function (res) {
|
|
2178
2185
|
setData(res);
|
|
2179
2186
|
});
|
|
2180
2187
|
return function () {
|
|
2181
2188
|
subscription.unsubscribe();
|
|
2182
2189
|
};
|
|
2183
|
-
}, [client === null || client === void 0 ? void 0 : client.getVeltInitState
|
|
2190
|
+
}, [client === null || client === void 0 ? void 0 : client.getVeltInitState]);
|
|
2184
2191
|
return data;
|
|
2185
2192
|
}
|
|
2186
2193
|
|
|
@@ -2336,13 +2343,13 @@ function useLiveStateSyncUtils() {
|
|
|
2336
2343
|
}, [client, setLiveStateSyncElement, liveStateSyncElement]);
|
|
2337
2344
|
return liveStateSyncElement;
|
|
2338
2345
|
}
|
|
2339
|
-
function useLiveStateData(liveStateDataId) {
|
|
2346
|
+
function useLiveStateData(liveStateDataId, listenToNewChangesOnly) {
|
|
2340
2347
|
var liveStateSyncElement = useLiveStateSyncUtils();
|
|
2341
2348
|
var _a = React__default["default"].useState(), data = _a[0], setData = _a[1];
|
|
2342
2349
|
React.useEffect(function () {
|
|
2343
2350
|
if (!(liveStateSyncElement === null || liveStateSyncElement === void 0 ? void 0 : liveStateSyncElement.getLiveStateData))
|
|
2344
2351
|
return;
|
|
2345
|
-
var subscription = liveStateSyncElement.getLiveStateData(liveStateDataId).subscribe(function (res) {
|
|
2352
|
+
var subscription = liveStateSyncElement.getLiveStateData(liveStateDataId, listenToNewChangesOnly).subscribe(function (res) {
|
|
2346
2353
|
setData(res);
|
|
2347
2354
|
});
|
|
2348
2355
|
return function () {
|
|
@@ -2451,7 +2458,7 @@ function useLiveState(liveStateDataId, initialValue, options) {
|
|
|
2451
2458
|
}
|
|
2452
2459
|
});
|
|
2453
2460
|
}
|
|
2454
|
-
var subscription = liveStateSyncElement.getLiveStateData(liveStateDataId).subscribe(function (res) {
|
|
2461
|
+
var subscription = liveStateSyncElement.getLiveStateData(liveStateDataId, options === null || options === void 0 ? void 0 : options.listenToNewChangesOnly).subscribe(function (res) {
|
|
2455
2462
|
setData(res);
|
|
2456
2463
|
});
|
|
2457
2464
|
return function () {
|
|
@@ -2789,6 +2796,7 @@ exports.VeltChartComment = VeltChartComment;
|
|
|
2789
2796
|
exports.VeltCommentBubble = SnippylyCommentBubble;
|
|
2790
2797
|
exports.VeltCommentBubbleAvatar = VeltCommentBubbleAvatar;
|
|
2791
2798
|
exports.VeltCommentBubbleCommentsCount = VeltCommentBubbleCommentsCount;
|
|
2799
|
+
exports.VeltCommentBubbleWireframe = VeltCommentBubbleWireframe;
|
|
2792
2800
|
exports.VeltCommentDialogPriorityDropdownContent = VeltCommentDialogPriorityDropdownContent;
|
|
2793
2801
|
exports.VeltCommentDialogPriorityDropdownTrigger = VeltCommentDialogPriorityDropdownTrigger;
|
|
2794
2802
|
exports.VeltCommentDialogStatusDropdownContent = VeltCommentDialogStatusDropdownContent;
|