@acvl/frontend-components 0.0.3 → 0.0.6

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/dist/cjs/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  'use strict';
2
3
 
3
4
  var jsxRuntime = require('react/jsx-runtime');
@@ -22704,7 +22705,7 @@ const ControlledDate = (props) => {
22704
22705
 
22705
22706
  const useHasPermission = (path) => {
22706
22707
  const session = core.useSession();
22707
- return !!lodash.get(session, `user.permissions.${path}`);
22708
+ return !!lodash.get(session, `extraUserInfo.permissions.${path}`);
22708
22709
  };
22709
22710
 
22710
22711
  const APIContext = React.createContext(null);
@@ -22730,7 +22731,20 @@ const useNavigation = () => {
22730
22731
  if (!context) {
22731
22732
  throw new Error('useNavigation debe ser utilizado dentro de un NavigationContextProvider');
22732
22733
  }
22733
- return context.hook;
22734
+ const navigate = context.hook();
22735
+ const response = {
22736
+ push: undefined,
22737
+ back: undefined,
22738
+ };
22739
+ if (typeof navigate === 'function') {
22740
+ response.push = navigate;
22741
+ response.back = navigate(-1);
22742
+ }
22743
+ else {
22744
+ response.push = navigate.push;
22745
+ response.back = navigate.back();
22746
+ }
22747
+ return response;
22734
22748
  };
22735
22749
  // // Inside your shared library
22736
22750
  // export const MyCustomLink = ({ href, children, component: Component = 'a', ...props }) => {
@@ -27716,6 +27730,8 @@ const EditGridWrapper = (props) => {
27716
27730
  setErrors(prevState => immer.produce(prevState, draft => {
27717
27731
  delete draft[newRow.id];
27718
27732
  }));
27733
+ if (props?.postAction)
27734
+ props.postAction(result);
27719
27735
  notifications.show(`Información actualizada!`, { severity: 'success' });
27720
27736
  return result.list;
27721
27737
  }