@rws-aoa/react-library 8.2.8 → 9.0.0

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.
@@ -0,0 +1,31 @@
1
+ import { TypographyProps } from '@mui/material';
2
+ import { PropsWithChildren } from 'react';
3
+ export interface AoaPermissionWrapperProps {
4
+ /**
5
+ * Additional props for the {@link Typography} component
6
+ */
7
+ readonly TypographyProps?: TypographyProps & {
8
+ 'data-qa'?: string;
9
+ };
10
+ /**
11
+ * Whether the user is authorised
12
+ */
13
+ readonly hasPermissions: boolean;
14
+ /**
15
+ * The 'no permission' message to display to the unauthorised user
16
+ */
17
+ readonly noPermissionLabel: string;
18
+ }
19
+ /**
20
+ * Displays a 'no permission' message for unauthorised users and the child components for authorised users
21
+ *
22
+ * @param props - Props to pass to the Permission Wrapper component
23
+ * @example
24
+ * ```jsx
25
+ * <AoaPermissionWrapper hasPermissions={true} noPermissionLabel='This is a message'>
26
+ * <Box>Child component</Box>
27
+ * </AoaPermissionWrapper>
28
+ * ```
29
+ */
30
+ export declare function AoaPermissionWrapper({ children, TypographyProps, hasPermissions, noPermissionLabel }: PropsWithChildren<AoaPermissionWrapperProps>): import("react/jsx-runtime").JSX.Element;
31
+ //# sourceMappingURL=PermissionWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components-generic/atoms/no-permission/PermissionWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,eAAe,EAAqB,MAAM,eAAe,CAAC;AAEpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpE;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACpC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,EAAE,iBAAiB,CAAC,yBAAyB,CAAC,2CA4BlJ"}
@@ -0,0 +1,27 @@
1
+ import { jsx as r, Fragment as a } from "react/jsx-runtime";
2
+ import { Box as e, Container as m, Typography as s, typographyClasses as p } from "@mui/material";
3
+ import { l } from "../../../chunks/lodash.CdkV4gpV.js";
4
+ import { FontNormalSxProps as x } from "../../../_constants.js";
5
+ function f({
6
+ children: t,
7
+ TypographyProps: o,
8
+ hasPermissions: i,
9
+ noPermissionLabel: n
10
+ }) {
11
+ return /* @__PURE__ */ r(e, { "data-qa": "permission-wrapper", children: i ? /* @__PURE__ */ r(a, { children: t }) : /* @__PURE__ */ r(e, { sx: {
12
+ marginTop: "40px"
13
+ }, children: /* @__PURE__ */ r(m, { maxWidth: "md", sx: {
14
+ height: "100%"
15
+ }, children: /* @__PURE__ */ r(e, { sx: {
16
+ height: "100%",
17
+ placeContent: "center center",
18
+ display: "flex",
19
+ alignItems: "center"
20
+ }, children: /* @__PURE__ */ r(s, { ...o, color: "textPrimary", sx: l.merge({
21
+ [`.${p.root}`]: x
22
+ }, o?.sx), variant: "h4", children: n }) }) }) }) });
23
+ }
24
+ export {
25
+ f as AoaPermissionWrapper
26
+ };
27
+ //# sourceMappingURL=PermissionWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionWrapper.js","sources":["../../../../src/components-generic/atoms/no-permission/PermissionWrapper.tsx"],"sourcesContent":["import { Box, Container, Typography, type TypographyProps, typographyClasses } from '@mui/material';\nimport { merge } from 'lodash';\nimport type { PropsWithChildren } from 'react';\nimport { FontNormalSxProps } from '../../../_constants';\n\nexport interface AoaPermissionWrapperProps {\n /**\n * Additional props for the {@link Typography} component\n */\n readonly TypographyProps?: TypographyProps & { 'data-qa'?: string };\n /**\n * Whether the user is authorised\n */\n readonly hasPermissions: boolean;\n /**\n * The 'no permission' message to display to the unauthorised user\n */\n readonly noPermissionLabel: string;\n}\n\n/**\n * Displays a 'no permission' message for unauthorised users and the child components for authorised users\n *\n * @param props - Props to pass to the Permission Wrapper component\n * @example\n * ```jsx\n * <AoaPermissionWrapper hasPermissions={true} noPermissionLabel='This is a message'>\n * <Box>Child component</Box>\n * </AoaPermissionWrapper>\n * ```\n */\nexport function AoaPermissionWrapper({ children, TypographyProps, hasPermissions, noPermissionLabel }: PropsWithChildren<AoaPermissionWrapperProps>) {\n return (\n <Box data-qa='permission-wrapper'>\n {hasPermissions ? (\n <>{children}</>\n ) : (\n <Box sx={{ marginTop: '40px' }}>\n <Container maxWidth='md' sx={{ height: '100%' }}>\n <Box sx={{ height: '100%', placeContent: 'center center', display: 'flex', alignItems: 'center' }}>\n <Typography\n {...TypographyProps}\n color='textPrimary'\n sx={merge(\n {\n [`.${typographyClasses.root}`]: FontNormalSxProps\n },\n TypographyProps?.sx\n )}\n variant='h4'\n >\n {noPermissionLabel}\n </Typography>\n </Box>\n </Container>\n </Box>\n )}\n </Box>\n );\n}\n"],"names":["AoaPermissionWrapper","children","TypographyProps","hasPermissions","noPermissionLabel","jsx","Box","marginTop","Container","height","placeContent","display","alignItems","Typography","merge","typographyClasses","root","FontNormalSxProps","sx"],"mappings":";;;;AA+BO,SAASA,EAAqB;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,iBAAAA;AAAAA,EAAiBC,gBAAAA;AAAAA,EAAgBC,mBAAAA;AAAgE,GAAG;AACnJ,SACE,gBAAAC,EAACC,GAAA,EAAI,WAAQ,sBACVH,UAAAA,2BACIF,UAAAA,EAAAA,CAAS,IAEZ,gBAAAI,EAACC,GAAA,EAAI,IAAI;AAAA,IAAEC,WAAW;AAAA,EAAA,GACpB,UAAA,gBAAAF,EAACG,GAAA,EAAU,UAAS,MAAK,IAAI;AAAA,IAAEC,QAAQ;AAAA,EAAA,GACrC,UAAA,gBAAAJ,EAACC,GAAA,EAAI,IAAI;AAAA,IAAEG,QAAQ;AAAA,IAAQC,cAAc;AAAA,IAAiBC,SAAS;AAAA,IAAQC,YAAY;AAAA,EAAA,GACrF,4BAACC,GAAA,EACC,GAAIX,GACJ,OAAM,eACN,IAAIY,QACF;AAAA,IACE,CAAC,IAAIC,EAAkBC,IAAI,EAAE,GAAGC;AAAAA,EAAAA,GAElCf,GAAiBgB,EACnB,GACA,SAAQ,MAEPd,UAAAA,EAAAA,CACH,EAAA,CACF,GACF,EAAA,CACF,EAAA,CAEJ;AAEJ;"}
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { AoaIconButton, type AoaIconButtonProps } from './components-generic/ato
5
5
  export { AoaInput, type AoaInputProps } from './components-generic/atoms/input/Input';
6
6
  export { AoaList, type AoaListProps, type AoaListItem } from './components-generic/atoms/list/List';
7
7
  export { AoaLogo, type AoaLogoProps } from './components-generic/atoms/logo/Logo';
8
- export { AoaNoPermission, type AoaNoPermissionProps } from './components-generic/atoms/no-permission/NoPermission';
8
+ export { AoaPermissionWrapper, type AoaPermissionWrapperProps } from './components-generic/atoms/no-permission/PermissionWrapper';
9
9
  export { AoaNotification, type AoaNotificationProps } from './components-generic/atoms/notification/Notification';
10
10
  export { AoaSectionHeader, type AoaSectionHeaderProps } from './components-generic/atoms/section-header/SectionHeader';
11
11
  export { AoaCheckbox, type AoaCheckboxProps } from './components-generic/atoms/selection-buttons/checkbox/Checkbox';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAC;AACnF,YAAY,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB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AACxI,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAC5G,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AAC3H,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AACvH,OAAO,EAAE,qBAAqB,EAAE,KAAK,0BAA0B,EAAE,MAAM,yEAAyE,CAAC;AAGjJ,OAAO,EACL,cAAc,IAAI,kBAAkB,EACpC,KAAK,mBAAmB,IAAI,uBAAuB,EACpD,MAAM,yDAAyD,CAAC;AAGjE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC"}
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { AoaButton as r } from "./components-generic/atoms/button/Button.js";
1
+ import { AoaButton as a } from "./components-generic/atoms/button/Button.js";
2
2
  import { AoaIconButton as e } from "./components-generic/atoms/icon-button/IconButton.js";
3
- import { AoaInput as m } from "./components-generic/atoms/input/Input.js";
3
+ import { AoaInput as A } from "./components-generic/atoms/input/Input.js";
4
4
  import { AoaList as x } from "./components-generic/atoms/list/List.js";
5
5
  import { AoaLogo as n } from "./components-generic/atoms/logo/Logo.js";
6
- import { AoaNoPermission as s } from "./components-generic/atoms/no-permission/NoPermission.js";
6
+ import { AoaPermissionWrapper as s } from "./components-generic/atoms/no-permission/PermissionWrapper.js";
7
7
  import { AoaNotification as d } from "./components-generic/atoms/notification/Notification.js";
8
8
  import { AoaSectionHeader as F } from "./components-generic/atoms/section-header/SectionHeader.js";
9
9
  import { AoaCheckbox as c } from "./components-generic/atoms/selection-buttons/checkbox/Checkbox.js";
10
10
  import { AoaRadioButton as b } from "./components-generic/atoms/selection-buttons/radio-button/RadioButton.js";
11
- import { AoaSwitchButton as g } from "./components-generic/atoms/selection-buttons/switch-button/SwitchButton.js";
11
+ import { AoaSwitchButton as h } from "./components-generic/atoms/selection-buttons/switch-button/SwitchButton.js";
12
12
  import { AoaTable as T } from "./components-generic/atoms/table/Table.js";
13
13
  import { AoaTooltip as L } from "./components-generic/atoms/tooltip/Tooltip.js";
14
14
  import { AoaZeroWidthSpace as S } from "./components-generic/atoms/zero-width-space/ZeroWidthSpace.js";
15
- import { A as I, a as P, b as k, c as v, d as z, e as D, u as H, f as R, g as U, w as W } from "./chunks/FieldError.C1l5S0jl.js";
15
+ import { A as I, a as P, b as W, c as k, d as v, e as z, u as D, f as H, g as R, w as U } from "./chunks/FieldError.C1l5S0jl.js";
16
16
  import { AoaFileDropzone as j } from "./components-generic/molecules/file-dropzone/FileDropzone.js";
17
17
  import { AoaFileTable as y } from "./components-generic/molecules/file-table/FileTable.js";
18
18
  import { AoaModalCloseButton as J } from "./components-generic/molecules/modal-close-button/ModalCloseButton.js";
@@ -21,36 +21,36 @@ import { AoaNavigationBar as V } from "./components-generic/molecules/navigation
21
21
  import { AoaUploadButton as Y } from "./components-generic/molecules/upload-button/UploadButton.js";
22
22
  import { AoaContentPage as $ } from "./components-generic/organisms/content-page/ContentPage.js";
23
23
  export {
24
- r as AoaButton,
24
+ a as AoaButton,
25
25
  c as AoaCheckbox,
26
26
  $ as AoaContentTemplate,
27
27
  I as AoaFieldError,
28
28
  j as AoaFileDropzone,
29
29
  y as AoaFileTable,
30
30
  P as AoaFormError,
31
- k as AoaFormModal,
31
+ W as AoaFormModal,
32
32
  e as AoaIconButton,
33
- m as AoaInput,
33
+ A as AoaInput,
34
34
  x as AoaList,
35
35
  n as AoaLogo,
36
36
  O as AoaModal,
37
37
  J as AoaModalCloseButton,
38
38
  V as AoaNavigationBar,
39
- v as AoaNoLabelNumberField,
40
- s as AoaNoPermission,
39
+ k as AoaNoLabelNumberField,
41
40
  d as AoaNotification,
41
+ s as AoaPermissionWrapper,
42
42
  b as AoaRadioButton,
43
43
  F as AoaSectionHeader,
44
- g as AoaSwitchButton,
44
+ h as AoaSwitchButton,
45
45
  T as AoaTable,
46
46
  L as AoaTooltip,
47
47
  Y as AoaUploadButton,
48
48
  S as AoaZeroWidthSpace,
49
- z as aoaFieldContext,
50
- D as aoaFormContext,
51
- H as useAoaAppForm,
52
- R as useAoaFieldContext,
53
- U as useAoaFormContext,
54
- W as withAoaForm
49
+ v as aoaFieldContext,
50
+ z as aoaFormContext,
51
+ D as useAoaAppForm,
52
+ H as useAoaFieldContext,
53
+ R as useAoaFormContext,
54
+ U as withAoaForm
55
55
  };
56
56
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rws-aoa/react-library",
3
- "version": "8.2.8",
3
+ "version": "9.0.0",
4
4
  "description": "RWS AOA Design System",
5
5
  "author": "@rws-aoa",
6
6
  "license": "Apache-2.0",
@@ -182,14 +182,14 @@
182
182
  "types": "./dist/components-generic/molecules/no-label-number-field/NoLabelNumberField.d.ts",
183
183
  "default": "./dist/components-generic/molecules/no-label-number-field/NoLabelNumberField.js"
184
184
  },
185
- "./nopermission": {
186
- "types": "./dist/components-generic/atoms/no-permission/NoPermission.d.ts",
187
- "default": "./dist/components-generic/atoms/no-permission/NoPermission.js"
188
- },
189
185
  "./notification": {
190
186
  "types": "./dist/components-generic/atoms/notification/Notification.d.ts",
191
187
  "default": "./dist/components-generic/atoms/notification/Notification.js"
192
188
  },
189
+ "./permissionwrapper": {
190
+ "types": "./dist/components-generic/atoms/no-permission/PermissionWrapper.d.ts",
191
+ "default": "./dist/components-generic/atoms/no-permission/PermissionWrapper.js"
192
+ },
193
193
  "./radiobutton": {
194
194
  "types": "./dist/components-generic/atoms/selection-buttons/radio-button/RadioButton.d.ts",
195
195
  "default": "./dist/components-generic/atoms/selection-buttons/radio-button/RadioButton.js"
@@ -1,27 +0,0 @@
1
- import { TypographyProps } from '@mui/material';
2
- import { ReactNode } from 'react';
3
- export interface AoaNoPermissionProps {
4
- /**
5
- * Additional props for the {@link Typography} component
6
- */
7
- readonly TypographyProps?: TypographyProps & {
8
- 'data-qa'?: string;
9
- };
10
- /**
11
- * The 'no permission' message to display to the user
12
- */
13
- readonly children: ReactNode;
14
- }
15
- /**
16
- * Creates a 'no permission' message for unauthorized users
17
- *
18
- * @param props - Props to pass to the No Permission component
19
- * @example
20
- * ```jsx
21
- * <AoaNoPermission>
22
- * This is a message
23
- * </AoaNoPermission>
24
- * ```
25
- */
26
- export declare function AoaNoPermission({ children, TypographyProps }: AoaNoPermissionProps): import("react/jsx-runtime").JSX.Element;
27
- //# sourceMappingURL=NoPermission.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NoPermission.d.ts","sourceRoot":"","sources":["../../../../src/components-generic/atoms/no-permission/NoPermission.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,eAAe,EAAqB,MAAM,eAAe,CAAC;AAEpG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpE;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,oBAAoB,2CAoBlF"}
@@ -1,23 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { Container as e, Box as i, Typography as n, typographyClasses as m } from "@mui/material";
3
- import { l as s } from "../../../chunks/lodash.CdkV4gpV.js";
4
- import { FontNormalSxProps as a } from "../../../_constants.js";
5
- function c({
6
- children: t,
7
- TypographyProps: o
8
- }) {
9
- return /* @__PURE__ */ r(e, { maxWidth: "md", sx: {
10
- height: "100%"
11
- }, children: /* @__PURE__ */ r(i, { sx: {
12
- height: "100%",
13
- placeContent: "center center",
14
- display: "flex",
15
- alignItems: "center"
16
- }, children: /* @__PURE__ */ r(n, { ...o, color: "textPrimary", sx: s.merge({
17
- [`.${m.root}`]: a
18
- }, o?.sx), variant: "h4", children: t }) }) });
19
- }
20
- export {
21
- c as AoaNoPermission
22
- };
23
- //# sourceMappingURL=NoPermission.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NoPermission.js","sources":["../../../../src/components-generic/atoms/no-permission/NoPermission.tsx"],"sourcesContent":["import { Box, Container, Typography, type TypographyProps, typographyClasses } from '@mui/material';\nimport { merge } from 'lodash';\nimport type { ReactNode } from 'react';\nimport { FontNormalSxProps } from '../../../_constants';\n\nexport interface AoaNoPermissionProps {\n /**\n * Additional props for the {@link Typography} component\n */\n readonly TypographyProps?: TypographyProps & { 'data-qa'?: string };\n /**\n * The 'no permission' message to display to the user\n */\n readonly children: ReactNode;\n}\n\n/**\n * Creates a 'no permission' message for unauthorized users\n *\n * @param props - Props to pass to the No Permission component\n * @example\n * ```jsx\n * <AoaNoPermission>\n * This is a message\n * </AoaNoPermission>\n * ```\n */\nexport function AoaNoPermission({ children, TypographyProps }: AoaNoPermissionProps) {\n return (\n <Container maxWidth='md' sx={{ height: '100%' }}>\n <Box sx={{ height: '100%', placeContent: 'center center', display: 'flex', alignItems: 'center' }}>\n <Typography\n {...TypographyProps}\n color='textPrimary'\n sx={merge(\n {\n [`.${typographyClasses.root}`]: FontNormalSxProps\n },\n TypographyProps?.sx\n )}\n variant='h4'\n >\n {children}\n </Typography>\n </Box>\n </Container>\n );\n}\n"],"names":["AoaNoPermission","children","TypographyProps","jsx","Container","height","Box","placeContent","display","alignItems","Typography","merge","typographyClasses","root","FontNormalSxProps","sx"],"mappings":";;;;AA2BO,SAASA,EAAgB;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,iBAAAA;AAAsC,GAAG;AACnF,SACE,gBAAAC,EAACC,GAAA,EAAU,UAAS,MAAK,IAAI;AAAA,IAAEC,QAAQ;AAAA,EAAA,GACrC,UAAA,gBAAAF,EAACG,GAAA,EAAI,IAAI;AAAA,IAAED,QAAQ;AAAA,IAAQE,cAAc;AAAA,IAAiBC,SAAS;AAAA,IAAQC,YAAY;AAAA,EAAA,GACrF,4BAACC,GAAA,EACC,GAAIR,GACJ,OAAM,eACN,IAAIS,QACF;AAAA,IACE,CAAC,IAAIC,EAAkBC,IAAI,EAAE,GAAGC;AAAAA,EAAAA,GAElCZ,GAAiBa,EACnB,GACA,SAAQ,MAEPd,UAAAA,EAAAA,CACH,GACF,GACF;AAEJ;"}