@hybridcore/ui 1.4.10 → 1.4.11

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,15 +1,17 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { a as f } from "../../helpers-B4UL9NMD.js";
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { a as m } from "../../helpers-B4UL9NMD.js";
3
3
  import n from "lodash";
4
4
  import { Loading as d } from "../loading/index.js";
5
- const A = ({
5
+ function x({
6
6
  pagePath: s,
7
7
  feature: o,
8
8
  appRoles: t,
9
9
  fallback: i,
10
10
  loading: e = !1,
11
11
  children: r
12
- }) => (s && (s = s.split("/").slice(1)[0] || "dashboard", s === "dashboard" ? o = "MAIN" : s === "agent-based-simulations" ? o = "SIMULATION" : o = n.toUpper(n.snakeCase(s))), s && e ? /* @__PURE__ */ m(d, { show: !0, position: "fixed", top: 0, left: 0, zIndex: 99999 }) : o && f(o, t) && r ? r : i || null);
12
+ }) {
13
+ return s && (s = s.split("/").slice(1)[0] || "dashboard", s === "dashboard" ? o = "MAIN" : s === "agent-based-simulations" ? o = "SIMULATION" : o = n.toUpper(n.snakeCase(s))), s && e ? /* @__PURE__ */ f(d, { show: !0, position: "fixed", top: 0, left: 0, zIndex: 99999 }) : o && m(o, t) && r ? r : i || null;
14
+ }
13
15
  export {
14
- A as Access
16
+ x as Access
15
17
  };
package/dist/main.d.ts CHANGED
@@ -15,15 +15,17 @@ import { Feature } from 'ol';
15
15
  import { Geometry } from 'ol/geom';
16
16
  import { GridActionsCellItemProps } from '@mui/x-data-grid';
17
17
  import { IconButtonProps } from '@mui/material/IconButton';
18
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
18
19
  import { LocalizationProvider } from '@mui/x-date-pickers';
19
20
  import { Pixel } from 'ol/pixel';
21
+ import { ReactNode } from 'react';
20
22
  import { Size } from 'ol/size';
21
23
  import { SxProps } from '@mui/material';
22
24
  import { SxProps as SxProps_2 } from '@mui/material/styles';
23
25
  import { Theme } from '@mui/material/styles';
24
26
  import { View } from 'ol';
25
27
 
26
- export declare const Access: React.FC<Props>;
28
+ export declare function Access<T extends string>({ pagePath, feature, appRoles, fallback, loading, children, }: Props<T>): string | number | true | Iterable<ReactNode> | JSX_2.Element | null;
27
29
 
28
30
  declare type AccessType = "READ" | "ALL" | "SUPER_ADMIN";
29
31
 
@@ -512,7 +514,7 @@ declare type OrientationType_2 = "portrait" | "landscape";
512
514
 
513
515
  export declare const PhoneInput: React.FC<Props_9>;
514
516
 
515
- declare interface Props {
517
+ declare interface Props<T extends string> {
516
518
  /**
517
519
  *
518
520
  */
@@ -528,7 +530,7 @@ declare interface Props {
528
530
  /**
529
531
  *
530
532
  */
531
- feature?: AUTH.ModuleType;
533
+ feature?: FeatureType | T;
532
534
  /**
533
535
  *
534
536
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.4.10",
4
+ "version": "1.4.11",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",