@veltdev/react 1.0.51 → 1.0.53
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 +5 -17
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/SnippylyComments/SnippylyComments.d.ts +1 -85
- package/cjs/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +31 -0
- package/cjs/types/constants.d.ts +1 -1
- package/esm/index.js +5 -17
- package/esm/index.js.map +1 -1
- package/esm/types/components/SnippylyComments/SnippylyComments.d.ts +1 -85
- package/esm/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +31 -0
- package/esm/types/constants.d.ts +1 -1
- package/index.d.ts +37 -90
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -94,7 +94,7 @@ var loadVelt = function (callback, version, staging) {
|
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
var VELT_SDK_VERSION = '1.0.
|
|
97
|
+
var VELT_SDK_VERSION = '1.0.63';
|
|
98
98
|
|
|
99
99
|
var SnippylyProvider = function (props) {
|
|
100
100
|
var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, language = props.language, translations = props.translations, autoTranslation = props.autoTranslation, onClientLoad = props.onClientLoad, children = props.children;
|
|
@@ -178,15 +178,12 @@ var SnippylyCommentBubble = function (props) {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
var SnippylyComments = function (props) {
|
|
181
|
-
var autoCategorize = props.autoCategorize, streamViewContainerId = props.streamViewContainerId,
|
|
181
|
+
var autoCategorize = props.autoCategorize, streamViewContainerId = props.streamViewContainerId, onSignIn = props.onSignIn, onUpgrade = props.onUpgrade, textMode = props.textMode, popoverMode = props.popoverMode, popoverTriangleComponent = props.popoverTriangleComponent, floatingCommentDialog = props.floatingCommentDialog, moderatorMode = props.moderatorMode, streamMode = props.streamMode, signInButton = props.signInButton, upgradeButton = props.upgradeButton, attachments = props.attachments, recordings = props.recordings, reactions = props.reactions, deviceInfo = props.deviceInfo, commentIndex = props.commentIndex, dialogOnHover = props.dialogOnHover, dialogOnTargetElementClick = props.dialogOnTargetElementClick, priority = props.priority, inboxMode = props.inboxMode, suggestionMode = props.suggestionMode, mobileMode = props.mobileMode, inlineCommentMode = props.inlineCommentMode, privateCommentMode = props.privateCommentMode, minimap = props.minimap, persistentCommentMode = props.persistentCommentMode, ghostComments = props.ghostComments, ghostCommentsIndicator = props.ghostCommentsIndicator, commentsOnDom = props.commentsOnDom, commentTool = props.commentTool, sidebarButtonOnCommentDialog = props.sidebarButtonOnCommentDialog, scrollToComponent = props.scrollToComponent, userMentions = props.userMentions, allowedElementIds = props.allowedElementIds, onCommentAdd = props.onCommentAdd, onCommentUpdate = props.onCommentUpdate, onCommentAccept = props.onCommentAccept, onCommentReject = props.onCommentReject, onSidebarButtonOnCommentDialogClick = props.onSidebarButtonOnCommentDialogClick, customStatus = props.customStatus, customPriority = props.customPriority, customCategory = props.customCategory, status = props.status, resolveButton = props.resolveButton, darkMode = props.darkMode, onCustomPinInject = props.onCustomPinInject, children = props.children;
|
|
182
182
|
var ref = React.useRef();
|
|
183
183
|
React.useEffect(function () {
|
|
184
184
|
if (ref.current) {
|
|
185
185
|
var element = ref.current;
|
|
186
186
|
element.addEventListener('onSignIn', function (event) {
|
|
187
|
-
if (signIn) {
|
|
188
|
-
signIn(event === null || event === void 0 ? void 0 : event.detail);
|
|
189
|
-
}
|
|
190
187
|
if (onSignIn) {
|
|
191
188
|
onSignIn(event === null || event === void 0 ? void 0 : event.detail);
|
|
192
189
|
}
|
|
@@ -197,9 +194,6 @@ var SnippylyComments = function (props) {
|
|
|
197
194
|
}
|
|
198
195
|
});
|
|
199
196
|
element.addEventListener('onCommentAdd', function (event) {
|
|
200
|
-
if (commentAdded) {
|
|
201
|
-
commentAdded(event === null || event === void 0 ? void 0 : event.detail);
|
|
202
|
-
}
|
|
203
197
|
if (onCommentAdd) {
|
|
204
198
|
onCommentAdd(event === null || event === void 0 ? void 0 : event.detail);
|
|
205
199
|
}
|
|
@@ -210,17 +204,11 @@ var SnippylyComments = function (props) {
|
|
|
210
204
|
}
|
|
211
205
|
});
|
|
212
206
|
element.addEventListener('onCommentAccept', function (event) {
|
|
213
|
-
if (commentAccepted) {
|
|
214
|
-
commentAccepted(event === null || event === void 0 ? void 0 : event.detail);
|
|
215
|
-
}
|
|
216
207
|
if (onCommentAccept) {
|
|
217
208
|
onCommentAccept(event === null || event === void 0 ? void 0 : event.detail);
|
|
218
209
|
}
|
|
219
210
|
});
|
|
220
211
|
element.addEventListener('onCommentReject', function (event) {
|
|
221
|
-
if (commentRejected) {
|
|
222
|
-
commentRejected(event === null || event === void 0 ? void 0 : event.detail);
|
|
223
|
-
}
|
|
224
212
|
if (onCommentReject) {
|
|
225
213
|
onCommentReject(event === null || event === void 0 ? void 0 : event.detail);
|
|
226
214
|
}
|
|
@@ -237,11 +225,11 @@ var SnippylyComments = function (props) {
|
|
|
237
225
|
});
|
|
238
226
|
}
|
|
239
227
|
}, []);
|
|
240
|
-
return (React__default["default"].createElement("velt-comments", { ref: ref, "auto-categorize": [true, false].includes(autoCategorize) ? (autoCategorize ? 'true' : 'false') : undefined, "data-stream-view-container-id": streamViewContainerId, "
|
|
228
|
+
return (React__default["default"].createElement("velt-comments", { ref: ref, "auto-categorize": [true, false].includes(autoCategorize) ? (autoCategorize ? 'true' : 'false') : undefined, "data-stream-view-container-id": streamViewContainerId, "text-mode": [true, false].includes(textMode) ? (textMode ? 'true' : 'false') : undefined, "popover-mode": [true, false].includes(popoverMode) ? (popoverMode ? 'true' : 'false') : undefined, "popover-triangle-component": [true, false].includes(popoverTriangleComponent) ? (popoverTriangleComponent ? 'true' : 'false') : undefined, "floating-comment-dialog": [true, false].includes(floatingCommentDialog) ? (floatingCommentDialog ? 'true' : 'false') : undefined, "moderator-mode": [true, false].includes(moderatorMode) ? (moderatorMode ? 'true' : 'false') : undefined, "stream-mode": [true, false].includes(streamMode) ? (streamMode ? 'true' : 'false') : undefined, "sign-in-button": [true, false].includes(signInButton) ? (signInButton ? 'true' : 'false') : undefined, "upgrade-button": [true, false].includes(upgradeButton) ? (upgradeButton ? 'true' : 'false') : undefined, attachments: [true, false].includes(attachments) ? (attachments ? 'true' : 'false') : undefined, recordings: recordings, reactions: [true, false].includes(reactions) ? (reactions ? 'true' : 'false') : undefined, "device-info": [true, false].includes(deviceInfo) ? (deviceInfo ? 'true' : 'false') : undefined, "comment-index": [true, false].includes(commentIndex) ? (commentIndex ? 'true' : 'false') : undefined, "dialog-on-hover": [true, false].includes(dialogOnHover) ? (dialogOnHover ? 'true' : 'false') : undefined, "dialog-on-target-element-click": [true, false].includes(dialogOnTargetElementClick) ? (dialogOnTargetElementClick ? 'true' : 'false') : undefined, priority: [true, false].includes(priority) ? (priority ? 'true' : 'false') : undefined, status: [true, false].includes(status) ? (status ? 'true' : 'false') : undefined, "resolve-button": [true, false].includes(resolveButton) ? (resolveButton ? 'true' : 'false') : undefined, "inbox-mode": [true, false].includes(inboxMode) ? (inboxMode ? 'true' : 'false') : undefined, "suggestion-mode": [true, false].includes(suggestionMode) ? (suggestionMode ? 'true' : 'false') : undefined, "mobile-mode": [true, false].includes(mobileMode) ? (mobileMode ? 'true' : 'false') : undefined, "inline-comment-mode": [true, false].includes(inlineCommentMode) ? (inlineCommentMode ? 'true' : 'false') : undefined, "private-comment-mode": [true, false].includes(privateCommentMode) ? (privateCommentMode ? 'true' : 'false') : undefined, minimap: [true, false].includes(minimap) ? (minimap ? 'true' : 'false') : undefined, "persistent-comment-mode": [true, false].includes(persistentCommentMode) ? (persistentCommentMode ? 'true' : 'false') : undefined, "ghost-comments": [true, false].includes(ghostComments) ? (ghostComments ? 'true' : 'false') : undefined, "ghost-comments-indicator": [true, false].includes(ghostCommentsIndicator) ? (ghostCommentsIndicator ? 'true' : 'false') : undefined, "comments-on-dom": [true, false].includes(commentsOnDom) ? (commentsOnDom ? 'true' : 'false') : undefined, "comment-tool": [true, false].includes(commentTool) ? (commentTool ? 'true' : 'false') : undefined, "sidebar-button-on-comment-dialog": [true, false].includes(sidebarButtonOnCommentDialog) ? (sidebarButtonOnCommentDialog ? 'true' : 'false') : undefined, "scroll-to-component": [true, false].includes(scrollToComponent) ? (scrollToComponent ? 'true' : 'false') : undefined, "user-mentions": [true, false].includes(userMentions) ? (userMentions ? 'true' : 'false') : undefined, "allowed-element-ids": JSON.stringify(allowedElementIds), "custom-status": JSON.stringify(customStatus), "custom-priority": JSON.stringify(customPriority), "custom-category": JSON.stringify(customCategory), "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined }, children));
|
|
241
229
|
};
|
|
242
230
|
|
|
243
231
|
var SnippylyCommentsSidebar = function (props) {
|
|
244
|
-
var embedMode = props.embedMode, enableUrlNavigation = props.enableUrlNavigation, urlNavigation = props.urlNavigation, pageMode = props.pageMode, openSidebar = props.openSidebar, onSidebarOpen = props.onSidebarOpen, onSidebarCommentClick = props.onSidebarCommentClick, onCommentClick = props.onCommentClick;
|
|
232
|
+
var embedMode = props.embedMode, enableUrlNavigation = props.enableUrlNavigation, urlNavigation = props.urlNavigation, pageMode = props.pageMode, currentLocationSuffix = props.currentLocationSuffix, filterConfig = props.filterConfig, groupConfig = props.groupConfig, filters = props.filters, openSidebar = props.openSidebar, onSidebarOpen = props.onSidebarOpen, onSidebarCommentClick = props.onSidebarCommentClick, onCommentClick = props.onCommentClick;
|
|
245
233
|
var ref = React.useRef();
|
|
246
234
|
React.useEffect(function () {
|
|
247
235
|
if (ref.current) {
|
|
@@ -264,7 +252,7 @@ var SnippylyCommentsSidebar = function (props) {
|
|
|
264
252
|
});
|
|
265
253
|
}
|
|
266
254
|
}, []);
|
|
267
|
-
return (React__default["default"].createElement("velt-comments-sidebar", { ref: ref, "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 }));
|
|
255
|
+
return (React__default["default"].createElement("velt-comments-sidebar", { ref: ref, "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 }));
|
|
268
256
|
};
|
|
269
257
|
|
|
270
258
|
var SnippylyCommentTool = function (props) {
|