@veltdev/react 1.0.93 → 1.0.94
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 +52 -1
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/VeltNotificationsHistory/VeltNotificationsHistory.d.ts +7 -0
- package/cjs/types/components/VeltNotificationsHistory/index.d.ts +1 -0
- package/cjs/types/components/VeltNotificationsPanel/VeltNotificationsPanel.d.ts +6 -0
- package/cjs/types/components/VeltNotificationsPanel/index.d.ts +1 -0
- package/cjs/types/components/VeltNotificationsTool/VeltNotificationsTool.d.ts +6 -0
- package/cjs/types/components/VeltNotificationsTool/index.d.ts +1 -0
- package/cjs/types/components/index.d.ts +3 -0
- package/cjs/types/constants.d.ts +1 -1
- package/esm/index.js +50 -2
- package/esm/index.js.map +1 -1
- package/esm/types/components/VeltNotificationsHistory/VeltNotificationsHistory.d.ts +7 -0
- package/esm/types/components/VeltNotificationsHistory/index.d.ts +1 -0
- package/esm/types/components/VeltNotificationsPanel/VeltNotificationsPanel.d.ts +6 -0
- package/esm/types/components/VeltNotificationsPanel/index.d.ts +1 -0
- package/esm/types/components/VeltNotificationsTool/VeltNotificationsTool.d.ts +6 -0
- package/esm/types/components/VeltNotificationsTool/index.d.ts +1 -0
- package/esm/types/components/index.d.ts +3 -0
- package/esm/types/constants.d.ts +1 -1
- package/index.d.ts +17 -1
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -109,7 +109,7 @@ var loadVelt = function (callback, version, staging, develop) {
|
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
var VELT_SDK_VERSION = '1.0.
|
|
112
|
+
var VELT_SDK_VERSION = '1.0.109';
|
|
113
113
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
114
114
|
|
|
115
115
|
var SnippylyProvider = function (props) {
|
|
@@ -455,6 +455,54 @@ var VeltCommentThread = function (props) {
|
|
|
455
455
|
return (React__default["default"].createElement("velt-comment-thread", { "annotation-id": annotationId }));
|
|
456
456
|
};
|
|
457
457
|
|
|
458
|
+
var VeltNotificationsTool = function (props) {
|
|
459
|
+
var children = props.children, onNotificationClick = props.onNotificationClick;
|
|
460
|
+
var ref = React.useRef();
|
|
461
|
+
React.useEffect(function () {
|
|
462
|
+
if (ref.current) {
|
|
463
|
+
var element = ref.current;
|
|
464
|
+
element.addEventListener('onNotificationClick', function (event) {
|
|
465
|
+
if (onNotificationClick) {
|
|
466
|
+
onNotificationClick(event === null || event === void 0 ? void 0 : event.detail);
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}, []);
|
|
471
|
+
return (React__default["default"].createElement("velt-notifications-tool", { ref: ref }, children));
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
var VeltNotificationsPanel = function (props) {
|
|
475
|
+
var onNotificationClick = props.onNotificationClick;
|
|
476
|
+
var ref = React.useRef();
|
|
477
|
+
React.useEffect(function () {
|
|
478
|
+
if (ref.current) {
|
|
479
|
+
var element = ref.current;
|
|
480
|
+
element.addEventListener('onNotificationClick', function (event) {
|
|
481
|
+
if (onNotificationClick) {
|
|
482
|
+
onNotificationClick(event === null || event === void 0 ? void 0 : event.detail);
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
}, []);
|
|
487
|
+
return (React__default["default"].createElement("velt-notifications-panel", { ref: ref }));
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
var VeltNotificationsHistory = function (props) {
|
|
491
|
+
var embedMode = props.embedMode, onNotificationClick = props.onNotificationClick;
|
|
492
|
+
var ref = React.useRef();
|
|
493
|
+
React.useEffect(function () {
|
|
494
|
+
if (ref.current) {
|
|
495
|
+
var element = ref.current;
|
|
496
|
+
element.addEventListener('onNotificationClick', function (event) {
|
|
497
|
+
if (onNotificationClick) {
|
|
498
|
+
onNotificationClick(event === null || event === void 0 ? void 0 : event.detail);
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
}, []);
|
|
503
|
+
return (React__default["default"].createElement("velt-notifications-history", { ref: ref, "embed-mode": [true, false].includes(embedMode) ? (embedMode ? 'true' : 'false') : undefined }));
|
|
504
|
+
};
|
|
505
|
+
|
|
458
506
|
/**
|
|
459
507
|
* @beta This hook is in beta
|
|
460
508
|
*/
|
|
@@ -1067,6 +1115,9 @@ exports.VeltCommentsSidebar = SnippylyCommentsSidebar;
|
|
|
1067
1115
|
exports.VeltCursor = SnippylyCursor;
|
|
1068
1116
|
exports.VeltHuddle = SnippylyHuddle;
|
|
1069
1117
|
exports.VeltHuddleTool = SnippylyHuddleTool;
|
|
1118
|
+
exports.VeltNotificationsHistory = VeltNotificationsHistory;
|
|
1119
|
+
exports.VeltNotificationsPanel = VeltNotificationsPanel;
|
|
1120
|
+
exports.VeltNotificationsTool = VeltNotificationsTool;
|
|
1070
1121
|
exports.VeltPresence = SnippylyPresence;
|
|
1071
1122
|
exports.VeltProvider = SnippylyProvider;
|
|
1072
1123
|
exports.VeltRecorderControlPanel = SnippylyRecorderControlPanel;
|