@veltdev/react 4.4.0-beta.10 → 4.4.0-beta.12

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.
@@ -1,3 +1,4 @@
1
+ import { NotificationPanelMode } from '@veltdev/types';
1
2
  import React from 'react';
2
3
  export declare class NotificationTabConfigItem {
3
4
  name?: string;
@@ -16,6 +17,7 @@ export interface IVeltNotificationsPanelProps {
16
17
  variant?: string;
17
18
  tabConfig?: NotificationTabConfig;
18
19
  readNotificationsOnForYouTab?: boolean;
20
+ panelOpenMode?: NotificationPanelMode;
19
21
  }
20
22
  declare const VeltNotificationsPanel: React.FC<IVeltNotificationsPanelProps>;
21
23
  export default VeltNotificationsPanel;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const VELT_SDK_VERSION = "4.4.0-beta.10";
2
+ export declare const VELT_SDK_VERSION = "4.4.0-beta.12";
3
3
  export declare const VELT_SDK_INIT_EVENT = "onVeltInit";
4
4
  export declare const VELT_TAB_ID = "veltTabId";
5
5
  export interface IVeltWireframeCommonProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
@@ -3,8 +3,8 @@ declare class LiveStateDataConfig {
3
3
  listenToNewChangesOnly?: boolean;
4
4
  }
5
5
  export declare function useLiveStateSyncUtils(): LiveStateSyncElement | undefined;
6
- export declare function useLiveStateData(liveStateDataId?: string, liveStateDataConfig?: LiveStateDataConfig): any;
7
- export declare function useSetLiveStateData(liveStateDataId: string, liveStateData: any, config?: SetLiveStateDataConfig): void;
6
+ export declare function useLiveStateData<T = unknown>(liveStateDataId?: string, liveStateDataConfig?: LiveStateDataConfig): T | undefined;
7
+ export declare function useSetLiveStateData<T = unknown>(liveStateDataId: string, liveStateData: T, config?: SetLiveStateDataConfig): void;
8
8
  export declare function useUserEditorState(): UserEditorAccess | null | undefined;
9
9
  export declare function useEditor(): User | null;
10
10
  export declare function useEditorAccessTimer(): EditorAccessTimer;
package/esm/index.js CHANGED
@@ -132,7 +132,7 @@ var loadVelt = function (callback, version, staging, develop, proxyDomain) {
132
132
  }
133
133
  };
134
134
 
135
- var VELT_SDK_VERSION = '4.4.0-beta.10';
135
+ var VELT_SDK_VERSION = '4.4.0-beta.12';
136
136
  var VELT_SDK_INIT_EVENT = 'onVeltInit';
137
137
  var VELT_TAB_ID = 'veltTabId';
138
138
 
@@ -871,7 +871,7 @@ var VeltNotificationsTool = function (props) {
871
871
  };
872
872
 
873
873
  var VeltNotificationsPanel = function (props) {
874
- var darkMode = props.darkMode, onNotificationClick = props.onNotificationClick, shadowDom = props.shadowDom, tabConfig = props.tabConfig, variant = props.variant, readNotificationsOnForYouTab = props.readNotificationsOnForYouTab;
874
+ var darkMode = props.darkMode, onNotificationClick = props.onNotificationClick, shadowDom = props.shadowDom, tabConfig = props.tabConfig, variant = props.variant, readNotificationsOnForYouTab = props.readNotificationsOnForYouTab, panelOpenMode = props.panelOpenMode;
875
875
  var ref = useRef();
876
876
  var onNotificationClickRef = useRef(onNotificationClick);
877
877
  // Update the ref to always point to the latest callback function
@@ -897,7 +897,7 @@ var VeltNotificationsPanel = function (props) {
897
897
  }
898
898
  };
899
899
  }, []);
900
- 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, "read-notifications-on-for-you-tab": [true, false].includes(readNotificationsOnForYouTab) ? (readNotificationsOnForYouTab ? 'true' : 'false') : undefined }));
900
+ 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, "read-notifications-on-for-you-tab": [true, false].includes(readNotificationsOnForYouTab) ? (readNotificationsOnForYouTab ? 'true' : 'false') : undefined, "panel-open-mode": panelOpenMode }));
901
901
  };
902
902
 
903
903
  var VeltNotificationsHistoryPanel = function (props) {