@veltdev/react 4.1.1 → 4.2.0-beta.2
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 +11 -4
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/Snippyly/Snippyly.d.ts +2 -1
- package/cjs/types/components/SnippylyRecorderNotes/SnippylyRecorderNotes.d.ts +1 -0
- package/cjs/types/constants.d.ts +1 -1
- package/esm/index.js +11 -4
- package/esm/index.js.map +1 -1
- package/esm/types/components/Snippyly/Snippyly.d.ts +2 -1
- package/esm/types/components/SnippylyRecorderNotes/SnippylyRecorderNotes.d.ts +1 -0
- package/esm/types/constants.d.ts +1 -1
- package/index.d.ts +3 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -140,12 +140,12 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
var VELT_SDK_VERSION = '4.
|
|
143
|
+
var VELT_SDK_VERSION = '4.2.0-beta.2';
|
|
144
144
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
145
145
|
var VELT_TAB_ID = 'veltTabId';
|
|
146
146
|
|
|
147
147
|
var SnippylyProvider = function (props) {
|
|
148
|
-
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, onClientLoad = props.onClientLoad, children = props.children;
|
|
148
|
+
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, onClientLoad = props.onClientLoad, children = props.children;
|
|
149
149
|
var _a = React.useState(null), client = _a[0], setClient = _a[1];
|
|
150
150
|
React.useEffect(function () {
|
|
151
151
|
if (apiKey) {
|
|
@@ -161,6 +161,13 @@ var SnippylyProvider = function (props) {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}, [client, userDataProvider]);
|
|
164
|
+
React.useEffect(function () {
|
|
165
|
+
if (client && dataProviders) {
|
|
166
|
+
if (typeof (client === null || client === void 0 ? void 0 : client.setDataProviders) === 'function') {
|
|
167
|
+
client === null || client === void 0 ? void 0 : client.setDataProviders(dataProviders);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}, [client, dataProviders]);
|
|
164
171
|
var initVelt = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
165
172
|
var velt, event;
|
|
166
173
|
var _a, _b;
|
|
@@ -613,8 +620,8 @@ var SnippylyRecorderControlPanel = function (props) {
|
|
|
613
620
|
};
|
|
614
621
|
|
|
615
622
|
var SnippylyRecorderNotes = function (props) {
|
|
616
|
-
var shadowDom = props.shadowDom, children = props.children;
|
|
617
|
-
return (React__default["default"].createElement("velt-recorder-notes", { "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined }, children));
|
|
623
|
+
var shadowDom = props.shadowDom, children = props.children, videoEditor = props.videoEditor;
|
|
624
|
+
return (React__default["default"].createElement("velt-recorder-notes", { "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "video-editor": [true, false].includes(videoEditor) ? (videoEditor ? 'true' : 'false') : undefined }, children));
|
|
618
625
|
};
|
|
619
626
|
|
|
620
627
|
var SnippylyRecorderPlayer = function (props) {
|