@veltdev/react 4.5.0-beta.62 → 4.5.0-beta.64
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 +14 -7
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/Snippyly/Snippyly.d.ts +2 -1
- package/cjs/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +1 -0
- package/cjs/types/components/SnippylySidebarButton/SnippylySidebarButton.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/esm/index.js +14 -7
- package/esm/index.js.map +1 -1
- package/esm/types/components/Snippyly/Snippyly.d.ts +2 -1
- package/esm/types/components/SnippylyCommentsSidebar/SnippylyCommentsSidebar.d.ts +1 -0
- package/esm/types/components/SnippylySidebarButton/SnippylySidebarButton.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/index.d.ts +4 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -144,17 +144,17 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain, integ
|
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
var VELT_SDK_VERSION = '4.5.0-beta.
|
|
147
|
+
var VELT_SDK_VERSION = '4.5.0-beta.64';
|
|
148
148
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
149
149
|
var VELT_TAB_ID = 'veltTabId';
|
|
150
150
|
// integrity map for the Velt SDK
|
|
151
151
|
// Note: generate integrity hashes with: https://www.srihash.org/
|
|
152
152
|
var INTEGRITY_MAP = {
|
|
153
|
-
'4.5.0-beta.
|
|
153
|
+
'4.5.0-beta.64': 'sha384-A2mLpoSvdDIRMS1KNJssa1+W2227CkbrlKSr0p/rM/3BJ7iEdKY9CB7udKX96NqC',
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
var SnippylyProvider = function (props) {
|
|
157
|
-
var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, language = props.language, translations = props.translations, autoTranslation = props.autoTranslation, userDataProvider = props.userDataProvider, dataProviders = props.dataProviders, authProvider = props.authProvider, onClientLoad = props.onClientLoad, children = props.children;
|
|
157
|
+
var apiKey = props.apiKey, user = props.user, config = props.config, documentId = props.documentId, language = props.language, translations = props.translations, autoTranslation = props.autoTranslation, userDataProvider = props.userDataProvider, dataProviders = props.dataProviders, encryptionProvider = props.encryptionProvider, authProvider = props.authProvider, onClientLoad = props.onClientLoad, children = props.children;
|
|
158
158
|
var _a = React.useState(null), client = _a[0], setClient = _a[1];
|
|
159
159
|
React.useEffect(function () {
|
|
160
160
|
if (apiKey) {
|
|
@@ -194,6 +194,13 @@ var SnippylyProvider = function (props) {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}, [client, dataProviders]);
|
|
197
|
+
React.useEffect(function () {
|
|
198
|
+
if (client && encryptionProvider) {
|
|
199
|
+
if (typeof (client === null || client === void 0 ? void 0 : client.setEncryptionProvider) === "function") {
|
|
200
|
+
client === null || client === void 0 ? void 0 : client.setEncryptionProvider(encryptionProvider);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}, [client, encryptionProvider]);
|
|
197
204
|
React.useEffect(function () {
|
|
198
205
|
if (client && authProvider && authProvider.user) {
|
|
199
206
|
client.setVeltAuthProvider(authProvider);
|
|
@@ -408,7 +415,7 @@ var SnippylyComments = function (props) {
|
|
|
408
415
|
};
|
|
409
416
|
|
|
410
417
|
var SnippylyCommentsSidebar = function (props) {
|
|
411
|
-
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, searchPlaceholder = props.searchPlaceholder, 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, filterOptionLayout = props.filterOptionLayout, filterCount = props.filterCount, fullExpanded = props.fullExpanded, systemFiltersOperator = props.systemFiltersOperator, sidebarButtonCountType = props.sidebarButtonCountType;
|
|
418
|
+
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, searchPlaceholder = props.searchPlaceholder, 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, filterOptionLayout = props.filterOptionLayout, filterCount = props.filterCount, fullExpanded = props.fullExpanded, systemFiltersOperator = props.systemFiltersOperator, sidebarButtonCountType = props.sidebarButtonCountType, filterGhostCommentsInSidebar = props.filterGhostCommentsInSidebar;
|
|
412
419
|
var ref = React.useRef();
|
|
413
420
|
var openSidebarRef = React.useRef(openSidebar);
|
|
414
421
|
var onSidebarOpenRef = React.useRef(onSidebarOpen);
|
|
@@ -481,7 +488,7 @@ var SnippylyCommentsSidebar = function (props) {
|
|
|
481
488
|
}
|
|
482
489
|
};
|
|
483
490
|
}, []);
|
|
484
|
-
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, "search-placeholder": searchPlaceholder, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, "floating-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined, "filter-option-layout": filterOptionLayout, "filter-count": [true, false].includes(filterCount) ? (filterCount ? 'true' : 'false') : undefined, "full-expanded": [true, false].includes(fullExpanded) ? (fullExpanded ? 'true' : 'false') : undefined, "system-filters-operator": systemFiltersOperator, "sidebar-button-count-type": sidebarButtonCountType }));
|
|
491
|
+
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, "search-placeholder": searchPlaceholder, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, "floating-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined, "filter-option-layout": filterOptionLayout, "filter-count": [true, false].includes(filterCount) ? (filterCount ? 'true' : 'false') : undefined, "full-expanded": [true, false].includes(fullExpanded) ? (fullExpanded ? 'true' : 'false') : undefined, "system-filters-operator": systemFiltersOperator, "sidebar-button-count-type": sidebarButtonCountType, "filter-ghost-comments-in-sidebar": [true, false].includes(filterGhostCommentsInSidebar) ? (filterGhostCommentsInSidebar ? 'true' : 'false') : undefined }));
|
|
485
492
|
};
|
|
486
493
|
|
|
487
494
|
var SnippylyCommentTool = function (props) {
|
|
@@ -691,7 +698,7 @@ var SnippylyRecorderTool = function (props) {
|
|
|
691
698
|
};
|
|
692
699
|
|
|
693
700
|
var SnippylySidebarButton = function (props) {
|
|
694
|
-
var tooltipText = props.tooltipText, children = props.children, darkMode = props.darkMode, shadowDom = props.shadowDom, floatingMode = props.floatingMode, pageMode = props.pageMode, sortData = props.sortData, urlNavigation = props.urlNavigation, currentLocationSuffix = props.currentLocationSuffix, filterConfig = props.filterConfig, groupConfig = props.groupConfig, filters = props.filters, excludeLocationIds = props.excludeLocationIds, dialogVariant = props.dialogVariant, pageModeComposerVariant = props.pageModeComposerVariant, sidebarShadowDom = props.sidebarShadowDom, sidebarVariant = props.sidebarVariant, position = props.position, onCommentClick = props.onCommentClick, onSidebarOpen = props.onSidebarOpen, filterPanelLayout = props.filterPanelLayout, sidebarButtonCountType = props.sidebarButtonCountType;
|
|
701
|
+
var tooltipText = props.tooltipText, children = props.children, darkMode = props.darkMode, shadowDom = props.shadowDom, floatingMode = props.floatingMode, pageMode = props.pageMode, sortData = props.sortData, urlNavigation = props.urlNavigation, currentLocationSuffix = props.currentLocationSuffix, filterConfig = props.filterConfig, groupConfig = props.groupConfig, filters = props.filters, excludeLocationIds = props.excludeLocationIds, dialogVariant = props.dialogVariant, pageModeComposerVariant = props.pageModeComposerVariant, sidebarShadowDom = props.sidebarShadowDom, sidebarVariant = props.sidebarVariant, position = props.position, onCommentClick = props.onCommentClick, onSidebarOpen = props.onSidebarOpen, filterPanelLayout = props.filterPanelLayout, sidebarButtonCountType = props.sidebarButtonCountType, filterGhostCommentsInSidebar = props.filterGhostCommentsInSidebar;
|
|
695
702
|
var ref = React.useRef();
|
|
696
703
|
var onSidebarOpenRef = React.useRef(onSidebarOpen);
|
|
697
704
|
var onCommentClickRef = React.useRef(onCommentClick);
|
|
@@ -727,7 +734,7 @@ var SnippylySidebarButton = function (props) {
|
|
|
727
734
|
}
|
|
728
735
|
};
|
|
729
736
|
});
|
|
730
|
-
return (React__default["default"].createElement("velt-sidebar-button", { "tooltip-text": tooltipText, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, "floating-mode": [true, false].includes(floatingMode) ? (floatingMode ? 'true' : 'false') : undefined, ref: ref, "page-mode": [true, false].includes(pageMode) ? (pageMode ? 'true' : 'false') : undefined, "sort-data": sortData, "url-navigation": [true, false].includes(urlNavigation) ? (urlNavigation ? '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, "dialog-variant": dialogVariant, "page-mode-composer-variant": pageModeComposerVariant, "sidebar-shadow-dom": [true, false].includes(sidebarShadowDom) ? (sidebarShadowDom ? 'true' : 'false') : undefined, "sidebar-variant": sidebarVariant, position: position, "filter-panel-layout": filterPanelLayout, "sidebar-button-count-type": sidebarButtonCountType }, children));
|
|
737
|
+
return (React__default["default"].createElement("velt-sidebar-button", { "tooltip-text": tooltipText, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, "floating-mode": [true, false].includes(floatingMode) ? (floatingMode ? 'true' : 'false') : undefined, ref: ref, "page-mode": [true, false].includes(pageMode) ? (pageMode ? 'true' : 'false') : undefined, "sort-data": sortData, "url-navigation": [true, false].includes(urlNavigation) ? (urlNavigation ? '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, "dialog-variant": dialogVariant, "page-mode-composer-variant": pageModeComposerVariant, "sidebar-shadow-dom": [true, false].includes(sidebarShadowDom) ? (sidebarShadowDom ? 'true' : 'false') : undefined, "sidebar-variant": sidebarVariant, position: position, "filter-panel-layout": filterPanelLayout, "sidebar-button-count-type": sidebarButtonCountType, "filter-ghost-comments-in-sidebar": [true, false].includes(filterGhostCommentsInSidebar) ? (filterGhostCommentsInSidebar ? 'true' : 'false') : undefined }, children));
|
|
731
738
|
};
|
|
732
739
|
|
|
733
740
|
var VeltCommentsSidebarButton = function (props) {
|