datastake-daf 0.6.507 → 0.6.509

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.
@@ -31,28 +31,6 @@ const useResizeContext = () => {
31
31
  return values;
32
32
  };
33
33
 
34
- /* eslint-disable react/prop-types */
35
- const NOTIFICATION_MODE = {
36
- EMPTY: 'EMPTY',
37
- PROJECT_SOURCES: 'PROJECT_SOURCES'
38
- };
39
- const FormsContext = /*#__PURE__*/o.createContext({
40
- onYesNotification: () => {},
41
- onNoNotification: () => {},
42
- notificationMode: NOTIFICATION_MODE.EMPTY,
43
- notificationState: {},
44
- setNotificationMode: () => {},
45
- changeNotificationState: () => {},
46
- authenticationLinks: [],
47
- setAuthenticationLinks: () => {},
48
- addCheck: () => {},
49
- removeCheck: () => {}
50
- });
51
- const useForms = () => {
52
- const value = o.useContext(FormsContext);
53
- return value;
54
- };
55
-
56
34
  /************* ✨ Codeium Command ⭐ *************/
57
35
  /**
58
36
  * Given an array of classnames (some of which may be empty), joins them all
@@ -5263,16 +5241,10 @@ const Sidenav = ({
5263
5241
  const checkOnClick = ({
5264
5242
  event
5265
5243
  }) => {
5266
- console.log("Click 1");
5267
- if (changeNotificationState && typeof changeNotificationState === 'function') {
5268
- console.log("Change notification state", changeNotificationState);
5269
- changeNotificationState({
5270
- onYes: event
5271
- });
5272
- } else if (typeof event === 'function') {
5273
- console.log("Event", event);
5274
- event();
5275
- }
5244
+ console.log("Check on click", event);
5245
+ changeNotificationState({
5246
+ onYes: event
5247
+ });
5276
5248
  };
5277
5249
  const {
5278
5250
  hoverContent,
@@ -5339,12 +5311,11 @@ const Sidenav = ({
5339
5311
  children: [renderModule({
5340
5312
  module: userModule,
5341
5313
  isCollapsed,
5342
- onClick: () => {
5343
- const redirectPath = getRedirectLink(`/app`);
5344
- checkOnClick({
5345
- event: () => goTo(redirectPath)
5346
- });
5347
- },
5314
+ onClick: () => checkOnClick({
5315
+ event: () => {
5316
+ goTo(getRedirectLink(`/app`));
5317
+ }
5318
+ }),
5348
5319
  mod,
5349
5320
  user,
5350
5321
  userHelpers
@@ -7011,6 +6982,8 @@ function AppLayout({
7011
6982
  // Notifications (injected from app)
7012
6983
  notificationHandlers = {},
7013
6984
  NotificationsHistoryProvider,
6985
+ changeNotificationState,
6986
+ notificationMode,
7014
6987
  // Config
7015
6988
  sidenavConfig = {},
7016
6989
  appName = 'app',
@@ -7038,10 +7011,6 @@ function AppLayout({
7038
7011
  // Children
7039
7012
  children
7040
7013
  }) {
7041
- const {
7042
- notificationMode,
7043
- changeNotificationState
7044
- } = useForms();
7045
7014
  const [userPreferences, setUserPreferences] = o.useState(null);
7046
7015
  const isAppNavigation = module === 'app';
7047
7016
  const [drawerOpened, setDrawerOpened] = o.useState(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.507",
3
+ "version": "0.6.509",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -163,15 +163,9 @@ const Sidenav = ({
163
163
  };
164
164
 
165
165
  const checkOnClick = ({ event }) => {
166
- console.log("Click 1")
167
- if (changeNotificationState && typeof changeNotificationState === 'function') {
168
- console.log("Change notification state", changeNotificationState);
169
- changeNotificationState({ onYes: event });
170
- } else if (typeof event === 'function') {
171
- console.log("Event", event);
172
- event();
173
- }
174
- };
166
+ console.log("Check on click", event);
167
+ changeNotificationState({ onYes: event });
168
+ }
175
169
 
176
170
  const { hoverContent, hoverContentSecond } = useMenu({
177
171
  checkOnClick,
@@ -247,12 +241,11 @@ const Sidenav = ({
247
241
  {renderModule({
248
242
  module: userModule,
249
243
  isCollapsed,
250
- onClick: () => {
251
- const redirectPath = getRedirectLink(`/app`);
252
- checkOnClick({
253
- event: () => goTo(redirectPath)
254
- });
255
- },
244
+ onClick: () => checkOnClick({
245
+ event: () => {
246
+ goTo(getRedirectLink(`/app`));
247
+ }
248
+ }),
256
249
  mod,
257
250
  user,
258
251
  userHelpers
@@ -92,6 +92,8 @@ function AppLayout({
92
92
  // Notifications (injected from app)
93
93
  notificationHandlers = {},
94
94
  NotificationsHistoryProvider,
95
+ changeNotificationState,
96
+ notificationMode,
95
97
 
96
98
  // Config
97
99
  sidenavConfig = {},
@@ -115,7 +117,6 @@ function AppLayout({
115
117
  // Children
116
118
  children,
117
119
  }) {
118
- const { notificationMode, changeNotificationState } = useForms();
119
120
  const [userPreferences, setUserPreferences] = useState(null);
120
121
  const isAppNavigation = module === 'app';
121
122
  const [drawerOpened, setDrawerOpened] = useState(false);