siam-ui-utils 1.1.8 → 1.1.10

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/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  declare module "siam-ui-utils" {
2
+ //BRIDGES
3
+ export function withRouter(props);
4
+
2
5
  //CUSTOMBOOSTRAP
3
6
  export function Colxx(props);
4
7
  export function Separator(props);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siam-ui-utils",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "keywords": [
5
5
  "ampf-react",
6
6
  "ampf-utils",
@@ -19,9 +19,6 @@
19
19
  },
20
20
  "moduleResolution": "nodenext",
21
21
  "scripts": {
22
- "build-browser": "npx tsc --allowJs true src/index.js --outDir dist_browser",
23
- "cpToDistBrowser": "copyfiles --all src/**/*.* dist_browser",
24
- "publish-npm_2": "npm run cpToDistBrowser & npm run build-browser & npm publish",
25
22
  "publish-npm": "npm publish"
26
23
  },
27
24
  "dependencies": {
@@ -29,6 +26,7 @@
29
26
  "prop-types": "^15.8.1",
30
27
  "react": "^18.3.1",
31
28
  "react-intl": "^6.6.8",
29
+ "react-router": "^6.26.2",
32
30
  "react-router-dom": "^5.2.0",
33
31
  "react-select": "^5.8.0",
34
32
  "reactstrap": "^9.2.2",
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { useNavigate } from 'react-router';
3
+
4
+ export const withRouter = (Component) => {
5
+ const Wrapper = (props) => {
6
+ const history = useNavigate();
7
+ return <Component history={history} {...props} />;
8
+ };
9
+ return Wrapper;
10
+ };
11
+
12
+ export default withRouter;
package/src/index.js CHANGED
@@ -1,4 +1,5 @@
1
+ export * from "./bridges";
1
2
  export * from "./CustomBootstrap";
2
3
  export * from "./CustomSelectInput";
3
- export * from "./IntlMessages";
4
4
  export * from "./iconos";
5
+ export * from "./IntlMessages";