@veltdev/react 4.7.1-beta.2 → 4.7.1-beta.4
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 +6 -6
- package/cjs/index.js.map +1 -1
- package/cjs/types/components/VeltNotificationsPanel/VeltNotificationsPanel.d.ts +2 -1
- package/cjs/types/components/VeltNotificationsTool/VeltNotificationsTool.d.ts +2 -0
- package/cjs/types/constants.d.ts +1 -1
- package/esm/index.js +6 -6
- package/esm/index.js.map +1 -1
- package/esm/types/components/VeltNotificationsPanel/VeltNotificationsPanel.d.ts +2 -1
- package/esm/types/components/VeltNotificationsTool/VeltNotificationsTool.d.ts +2 -0
- package/esm/types/constants.d.ts +1 -1
- package/index.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NotificationPanelMode } from '@veltdev/types';
|
|
1
|
+
import { NotificationPanelMode, NotificationSettingsLayout } from '@veltdev/types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare class NotificationTabConfigItem {
|
|
4
4
|
name?: string;
|
|
@@ -21,6 +21,7 @@ export interface IVeltNotificationsPanelProps {
|
|
|
21
21
|
settings?: boolean;
|
|
22
22
|
selfNotifications?: boolean;
|
|
23
23
|
pageSize?: number;
|
|
24
|
+
settingsLayout?: NotificationSettingsLayout;
|
|
24
25
|
}
|
|
25
26
|
declare const VeltNotificationsPanel: React.FC<IVeltNotificationsPanelProps>;
|
|
26
27
|
export default VeltNotificationsPanel;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { NotificationSettingsLayout } from '@veltdev/types';
|
|
2
3
|
export declare class NotificationTabConfigItem {
|
|
3
4
|
name?: string;
|
|
4
5
|
enable?: boolean;
|
|
@@ -24,6 +25,7 @@ export interface IVeltNotificationsToolProps extends React.DetailedHTMLProps<Rea
|
|
|
24
25
|
selfNotifications?: boolean;
|
|
25
26
|
considerAllNotifications?: boolean;
|
|
26
27
|
pageSize?: number;
|
|
28
|
+
settingsLayout?: NotificationSettingsLayout;
|
|
27
29
|
}
|
|
28
30
|
declare const VeltNotificationsTool: React.FC<IVeltNotificationsToolProps>;
|
|
29
31
|
export default VeltNotificationsTool;
|
package/cjs/types/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const VELT_SDK_VERSION = "4.7.1-beta.
|
|
2
|
+
export declare const VELT_SDK_VERSION = "4.7.1-beta.4";
|
|
3
3
|
export declare const VELT_SDK_INIT_EVENT = "onVeltInit";
|
|
4
4
|
export declare const VELT_TAB_ID = "veltTabId";
|
|
5
5
|
export declare const INTEGRITY_MAP: Record<string, string>;
|
package/esm/index.js
CHANGED
|
@@ -137,13 +137,13 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain, integ
|
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
var VELT_SDK_VERSION = '4.7.1-beta.
|
|
140
|
+
var VELT_SDK_VERSION = '4.7.1-beta.4';
|
|
141
141
|
var VELT_SDK_INIT_EVENT = 'onVeltInit';
|
|
142
142
|
var VELT_TAB_ID = 'veltTabId';
|
|
143
143
|
// integrity map for the Velt SDK
|
|
144
144
|
// Note: generate integrity hashes with: https://www.srihash.org/
|
|
145
145
|
var INTEGRITY_MAP = {
|
|
146
|
-
'4.7.1-beta.
|
|
146
|
+
'4.7.1-beta.4': 'sha384-JNK/OeMGwgDLuxNsBQnVlMTINX6+kJs+i+1I37NT2ynKJ9HyX+sTNNigm0Gs+dNN',
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
var validProps = ['veltIf', 'veltClass', 'className', 'variant'];
|
|
@@ -987,7 +987,7 @@ var VeltCommentThread = function (props) {
|
|
|
987
987
|
};
|
|
988
988
|
|
|
989
989
|
var VeltNotificationsTool = function (props) {
|
|
990
|
-
var children = props.children, darkMode = props.darkMode, onNotificationClick = props.onNotificationClick, shadowDom = props.shadowDom, panelShadowDom = props.panelShadowDom, variant = props.variant, maxDays = props.maxDays, tabConfig = props.tabConfig, panelOpenMode = props.panelOpenMode, panelVariant = props.panelVariant, readNotificationsOnForYouTab = props.readNotificationsOnForYouTab, settings = props.settings, selfNotifications = props.selfNotifications, considerAllNotifications = props.considerAllNotifications, pageSize = props.pageSize;
|
|
990
|
+
var children = props.children, darkMode = props.darkMode, onNotificationClick = props.onNotificationClick, shadowDom = props.shadowDom, panelShadowDom = props.panelShadowDom, variant = props.variant, maxDays = props.maxDays, tabConfig = props.tabConfig, panelOpenMode = props.panelOpenMode, panelVariant = props.panelVariant, readNotificationsOnForYouTab = props.readNotificationsOnForYouTab, settings = props.settings, selfNotifications = props.selfNotifications, considerAllNotifications = props.considerAllNotifications, pageSize = props.pageSize, settingsLayout = props.settingsLayout;
|
|
991
991
|
var ref = useRef();
|
|
992
992
|
var onNotificationClickRef = useRef(onNotificationClick);
|
|
993
993
|
// Update the ref to always point to the latest callback function
|
|
@@ -1013,11 +1013,11 @@ var VeltNotificationsTool = function (props) {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
};
|
|
1015
1015
|
}, []);
|
|
1016
|
-
return (React.createElement("velt-notifications-tool", { ref: ref, "panel-open-mode": panelOpenMode, panelVariant: panelVariant, "tab-config": JSON.stringify(tabConfig), variant: variant, "max-days": (maxDays && maxDays > 0) ? maxDays + '' : undefined, "panel-shadow-dom": [true, false].includes(panelShadowDom) ? (panelShadowDom ? 'true' : 'false') : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, settings: [true, false].includes(settings) ? (settings ? 'true' : 'false') : undefined, "self-notifications": [true, false].includes(selfNotifications) ? (selfNotifications ? 'true' : 'false') : undefined, "read-notifications-on-for-you-tab": [true, false].includes(readNotificationsOnForYouTab) ? (readNotificationsOnForYouTab ? 'true' : 'false') : undefined, "consider-all-notifications": [true, false].includes(considerAllNotifications) ? (considerAllNotifications ? 'true' : 'false') : undefined, "page-size": (pageSize && pageSize > 0) ? pageSize + '' : undefined }, children));
|
|
1016
|
+
return (React.createElement("velt-notifications-tool", { ref: ref, "panel-open-mode": panelOpenMode, panelVariant: panelVariant, "tab-config": JSON.stringify(tabConfig), variant: variant, "max-days": (maxDays && maxDays > 0) ? maxDays + '' : undefined, "panel-shadow-dom": [true, false].includes(panelShadowDom) ? (panelShadowDom ? 'true' : 'false') : undefined, "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, settings: [true, false].includes(settings) ? (settings ? 'true' : 'false') : undefined, "self-notifications": [true, false].includes(selfNotifications) ? (selfNotifications ? 'true' : 'false') : undefined, "read-notifications-on-for-you-tab": [true, false].includes(readNotificationsOnForYouTab) ? (readNotificationsOnForYouTab ? 'true' : 'false') : undefined, "consider-all-notifications": [true, false].includes(considerAllNotifications) ? (considerAllNotifications ? 'true' : 'false') : undefined, "page-size": (pageSize && pageSize > 0) ? pageSize + '' : undefined, "settings-layout": settingsLayout }, children));
|
|
1017
1017
|
};
|
|
1018
1018
|
|
|
1019
1019
|
var VeltNotificationsPanel = function (props) {
|
|
1020
|
-
var darkMode = props.darkMode, onNotificationClick = props.onNotificationClick, shadowDom = props.shadowDom, tabConfig = props.tabConfig, variant = props.variant, readNotificationsOnForYouTab = props.readNotificationsOnForYouTab, panelOpenMode = props.panelOpenMode, settings = props.settings, selfNotifications = props.selfNotifications, pageSize = props.pageSize;
|
|
1020
|
+
var darkMode = props.darkMode, onNotificationClick = props.onNotificationClick, shadowDom = props.shadowDom, tabConfig = props.tabConfig, variant = props.variant, readNotificationsOnForYouTab = props.readNotificationsOnForYouTab, panelOpenMode = props.panelOpenMode, settings = props.settings, selfNotifications = props.selfNotifications, pageSize = props.pageSize, settingsLayout = props.settingsLayout;
|
|
1021
1021
|
var ref = useRef();
|
|
1022
1022
|
var onNotificationClickRef = useRef(onNotificationClick);
|
|
1023
1023
|
// Update the ref to always point to the latest callback function
|
|
@@ -1043,7 +1043,7 @@ var VeltNotificationsPanel = function (props) {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
};
|
|
1045
1045
|
}, []);
|
|
1046
|
-
return (React.createElement("velt-notifications-panel", { ref: ref, variant: variant, "tab-config": JSON.stringify(tabConfig), "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, settings: [true, false].includes(settings) ? (settings ? 'true' : 'false') : undefined, "self-notifications": [true, false].includes(selfNotifications) ? (selfNotifications ? 'true' : 'false') : undefined, "read-notifications-on-for-you-tab": [true, false].includes(readNotificationsOnForYouTab) ? (readNotificationsOnForYouTab ? 'true' : 'false') : undefined, "panel-open-mode": panelOpenMode, "page-size": (pageSize && pageSize > 0) ? pageSize + '' : undefined }));
|
|
1046
|
+
return (React.createElement("velt-notifications-panel", { ref: ref, variant: variant, "tab-config": JSON.stringify(tabConfig), "shadow-dom": [true, false].includes(shadowDom) ? (shadowDom ? 'true' : 'false') : undefined, "dark-mode": [true, false].includes(darkMode) ? (darkMode ? 'true' : 'false') : undefined, settings: [true, false].includes(settings) ? (settings ? 'true' : 'false') : undefined, "self-notifications": [true, false].includes(selfNotifications) ? (selfNotifications ? 'true' : 'false') : undefined, "read-notifications-on-for-you-tab": [true, false].includes(readNotificationsOnForYouTab) ? (readNotificationsOnForYouTab ? 'true' : 'false') : undefined, "panel-open-mode": panelOpenMode, "page-size": (pageSize && pageSize > 0) ? pageSize + '' : undefined, "settings-layout": settingsLayout }));
|
|
1047
1047
|
};
|
|
1048
1048
|
|
|
1049
1049
|
var VeltNotificationsHistoryPanel = function (props) {
|