@availity/mui-spaces 1.0.21 → 1.0.23

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/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.0.23](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.22...@availity/mui-spaces@1.0.23) (2025-06-10)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **mui-spaces:** don't check for sso type on rendered apps for sso linkout ([3bda63f](https://github.com/Availity/element/commit/3bda63f80fea1c6cdb7526fe905dd2b6bfbc1ffe))
11
+ * **mui-spaces:** put type back ([6aa9083](https://github.com/Availity/element/commit/6aa9083ff39fd3b384002f4e6951de80627b4c35))
12
+
13
+ ## [1.0.22](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.21...@availity/mui-spaces@1.0.22) (2025-05-29)
14
+
15
+ ### Dependency Updates
16
+
17
+ * `mui-card` updated to version `1.0.21`
18
+ * `mui-chip` updated to version `1.0.21`
19
+ * `mui-dialog` updated to version `1.0.21`
20
+ * `mui-favorites` updated to version `1.0.21`
21
+ * `mui-list` updated to version `1.0.21`
22
+ * `mui-modal` updated to version `1.0.21`
5
23
  ## [1.0.21](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.20...@availity/mui-spaces@1.0.21) (2025-05-28)
6
24
 
7
25
  ## [1.0.20](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.19...@availity/mui-spaces@1.0.20) (2025-05-20)
package/dist/index.d.mts CHANGED
@@ -1,110 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ElementType } from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
  import { StatusChipProps } from '@availity/mui-chip';
4
5
  import { SvgIconProps } from '@mui/material';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
-
7
- type SpacesLinkVariants = 'card' | 'list' | 'default' | undefined;
8
- type SpacesLinkWithSpace = {
9
- /** If no spaceId is provided, the first space in the spaces array is used.
10
- * Note: This is only to be used when the Spaces provider should only ever contain a single space.
11
- */
12
- spaceId?: string;
13
- /** Use to directly pass a space to the component rather than have it fetched from the spaces API.
14
- * This component does not have to be a child of SpacesProvider.
15
- * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
16
- */
17
- space: Space | SsoTypeSpace;
18
- } & SpacesLinkProps;
19
- type SpacesLinkWithSpaceId = {
20
- /** If no spaceId is provided, the first space in the spaces array is used.
21
- * Note: This is only to be used when the Spaces provider should only ever contain a single space.
22
- */
23
- spaceId: string;
24
- /** Use to directly pass a space to the component rather than have it fetched from the spaces API.
25
- * This component does not have to be a child of SpacesProvider.
26
- * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
27
- */
28
- space?: Space | SsoTypeSpace;
29
- } & SpacesLinkProps;
30
- type SpacesLinkProps = {
31
- /** Children can be a react child or render prop. */
32
- children?: JSX.Element | ((props: any | undefined) => JSX.Element);
33
- /** Tag to overwrite the root component rendered. */
34
- tag?: ElementType<any, keyof JSX.IntrinsicElements>;
35
- /** Tag to overwrite the body component that renders the title, description and data values.
36
- * It defaults to CardBody or div depending on the value of the variant prop.
37
- */
38
- bodyTag?: ElementType<any, keyof JSX.IntrinsicElements>;
39
- /** Tag to overwrite the title component. If variant prop is set to "card", defaults to CardTitle.
40
- * If variant is set to "list", defaults to ListItemHeading. Overwise, defaults to div.
41
- */
42
- titleTag?: ElementType<any, keyof JSX.IntrinsicElements>;
43
- /** Tag to overwrite the text component. If variant prop is set to "card", defaults to Card Text.
44
- * If variant is set to "list", defaults to ListItemText. Otherwise, defaults to div.
45
- */
46
- textTag?: ElementType<any, keyof JSX.IntrinsicElements>;
47
- titleClassName?: string;
48
- /** When true, utilizes the Card component for styling. */
49
- card?: boolean;
50
- /** When true, renders an @availity/mui-icon next to the title if present on the Space. */
51
- icon?: (props: SvgIconProps) => JSX.Element;
52
- /** When true, renders the Spaces description beneath the title. */
53
- description?: boolean;
54
- /** When passed in, provides predefined styles for the component.
55
- * @default 'default'
56
- */
57
- variant?: SpacesLinkVariants;
58
- /** When true, renders the FavoriteHeart component to the left of the Component.
59
- * Note, this does require you to have wrapped your component somewhere in the Favorites Provider.
60
- * This also requires the peerDependency @tanstack/react-query.
61
- */
62
- favorite?: boolean;
63
- /** When true, renders the tyitle, and allow for the description and date info to be added on.
64
- * @default true
65
- */
66
- body?: boolean;
67
- /** When true, renders the activeDate of the space. */
68
- showDate?: boolean;
69
- /** When true, renders the name of the space.
70
- * @default true
71
- */
72
- showName?: boolean;
73
- /** When true, renders a "New!" badge if the activeDate is less than 30 days old. */
74
- showNew?: boolean;
75
- /** When true, renders the component vertically. */
76
- stacked?: boolean;
77
- /** Optionally pass in your own landing state for the component if you are managing the state yourself. */
78
- loading?: boolean;
79
- /** Required when space is not provided, or space is provided and space contains an sso link. */
80
- clientId?: string;
81
- style?: object;
82
- className?: string;
83
- /** Allows the description length to be truncated. */
84
- maxDescriptionWidth?: string;
85
- /** Additional attributes you may want to tack onto the native-form when submitting a SAML sso.
86
- * i.e. spaceId or sourceApplicationId
87
- */
88
- linkAttributes?: object;
89
- /** Allows the role of the root component to be overwritten.
90
- * If variant prop is set to "list", defaults to "listitem".
91
- */
92
- role?: string;
93
- /** When Analytics props are passed inside the analytics props, they will be passed down to the click item.
94
- * For more information on Analytics props see: Autotrack Logged Events
95
- */
96
- analytics?: object;
97
- customBadgeText?: string;
98
- customBadgeColor?: StatusChipProps['color'];
99
- /** prefix for ids to prevent duplicates when the same config link is displayed on the page more than once
100
- * @default ''
101
- */
102
- idPrefix?: string;
103
- [key: string]: any;
104
- };
105
- interface SsoTypeSpace extends Space {
106
- type: 'saml' | 'openid';
107
- }
108
6
 
109
7
  type Link = {
110
8
  /** Contains a URL or URL Fragment that the hyperlink points to. */
@@ -163,7 +61,7 @@ type Space = {
163
61
  };
164
62
  type SpacesContextType = {
165
63
  /** Array of spaces to be passed into the Spaces provider. */
166
- spaces?: Map<string, Space | SsoTypeSpace>;
64
+ spaces?: Map<string, Space>;
167
65
  /** Array of spaces from previous page load. */
168
66
  previousSpacesMap?: Map<string, Space>;
169
67
  /** Array of spaces organized by configurationId. */
@@ -203,7 +101,7 @@ type SpacesProps = {
203
101
  * Useful for if you already have the spaces in your app and don't want the spaces provider to have to fetch them again. */
204
102
  spaces?: Space[];
205
103
  };
206
- type UseSpaces = (...ids: string[]) => (Space | SsoTypeSpace)[] | undefined;
104
+ type UseSpaces = (...ids: string[]) => (Space)[] | undefined;
207
105
 
208
106
  declare const INITIAL_STATE: {
209
107
  loading: boolean;
@@ -213,6 +111,105 @@ declare const useSpacesContext: () => SpacesContextType;
213
111
  declare const Spaces: ({ query, variables, clientId, children, payerIds, spaceIds, spaces: spacesFromProps, }: SpacesProps) => JSX.Element;
214
112
  declare const useSpaces: UseSpaces;
215
113
 
114
+ type SpacesLinkVariants = 'card' | 'list' | 'default' | undefined;
115
+ type SpacesLinkWithSpace = {
116
+ /** If no spaceId is provided, the first space in the spaces array is used.
117
+ * Note: This is only to be used when the Spaces provider should only ever contain a single space.
118
+ */
119
+ spaceId?: string;
120
+ /** Use to directly pass a space to the component rather than have it fetched from the spaces API.
121
+ * This component does not have to be a child of SpacesProvider.
122
+ * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
123
+ */
124
+ space: Space;
125
+ } & SpacesLinkProps;
126
+ type SpacesLinkWithSpaceId = {
127
+ /** If no spaceId is provided, the first space in the spaces array is used.
128
+ * Note: This is only to be used when the Spaces provider should only ever contain a single space.
129
+ */
130
+ spaceId: string;
131
+ /** Use to directly pass a space to the component rather than have it fetched from the spaces API.
132
+ * This component does not have to be a child of SpacesProvider.
133
+ * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
134
+ */
135
+ space?: Space;
136
+ } & SpacesLinkProps;
137
+ type SpacesLinkProps = {
138
+ /** Children can be a react child or render prop. */
139
+ children?: JSX.Element | ((props: any | undefined) => JSX.Element);
140
+ /** Tag to overwrite the root component rendered. */
141
+ tag?: ElementType<any, keyof JSX.IntrinsicElements>;
142
+ /** Tag to overwrite the body component that renders the title, description and data values.
143
+ * It defaults to CardBody or div depending on the value of the variant prop.
144
+ */
145
+ bodyTag?: ElementType<any, keyof JSX.IntrinsicElements>;
146
+ /** Tag to overwrite the title component. If variant prop is set to "card", defaults to CardTitle.
147
+ * If variant is set to "list", defaults to ListItemHeading. Overwise, defaults to div.
148
+ */
149
+ titleTag?: ElementType<any, keyof JSX.IntrinsicElements>;
150
+ /** Tag to overwrite the text component. If variant prop is set to "card", defaults to Card Text.
151
+ * If variant is set to "list", defaults to ListItemText. Otherwise, defaults to div.
152
+ */
153
+ textTag?: ElementType<any, keyof JSX.IntrinsicElements>;
154
+ titleClassName?: string;
155
+ /** When true, utilizes the Card component for styling. */
156
+ card?: boolean;
157
+ /** When true, renders an @availity/mui-icon next to the title if present on the Space. */
158
+ icon?: (props: SvgIconProps) => JSX.Element;
159
+ /** When true, renders the Spaces description beneath the title. */
160
+ description?: boolean;
161
+ /** When passed in, provides predefined styles for the component.
162
+ * @default 'default'
163
+ */
164
+ variant?: SpacesLinkVariants;
165
+ /** When true, renders the FavoriteHeart component to the left of the Component.
166
+ * Note, this does require you to have wrapped your component somewhere in the Favorites Provider.
167
+ * This also requires the peerDependency @tanstack/react-query.
168
+ */
169
+ favorite?: boolean;
170
+ /** When true, renders the tyitle, and allow for the description and date info to be added on.
171
+ * @default true
172
+ */
173
+ body?: boolean;
174
+ /** When true, renders the activeDate of the space. */
175
+ showDate?: boolean;
176
+ /** When true, renders the name of the space.
177
+ * @default true
178
+ */
179
+ showName?: boolean;
180
+ /** When true, renders a "New!" badge if the activeDate is less than 30 days old. */
181
+ showNew?: boolean;
182
+ /** When true, renders the component vertically. */
183
+ stacked?: boolean;
184
+ /** Optionally pass in your own landing state for the component if you are managing the state yourself. */
185
+ loading?: boolean;
186
+ /** Required when space is not provided, or space is provided and space contains an sso link. */
187
+ clientId?: string;
188
+ style?: object;
189
+ className?: string;
190
+ /** Allows the description length to be truncated. */
191
+ maxDescriptionWidth?: string;
192
+ /** Additional attributes you may want to tack onto the native-form when submitting a SAML sso.
193
+ * i.e. spaceId or sourceApplicationId
194
+ */
195
+ linkAttributes?: object;
196
+ /** Allows the role of the root component to be overwritten.
197
+ * If variant prop is set to "list", defaults to "listitem".
198
+ */
199
+ role?: string;
200
+ /** When Analytics props are passed inside the analytics props, they will be passed down to the click item.
201
+ * For more information on Analytics props see: Autotrack Logged Events
202
+ */
203
+ analytics?: object;
204
+ customBadgeText?: string;
205
+ customBadgeColor?: StatusChipProps['color'];
206
+ /** prefix for ids to prevent duplicates when the same config link is displayed on the page more than once
207
+ * @default ''
208
+ */
209
+ idPrefix?: string;
210
+ [key: string]: any;
211
+ };
212
+
216
213
  declare const SpacesLink: ({ spaceId, space: propSpace, className, children, favorite, icon: FileIcon, showName, showNew, showDate, stacked, body, description: showDescription, tag, bodyTag, titleTag, textTag, titleClassName, variant, loading: propsLoading, clientId: propsClientId, maxDescriptionWidth, style, linkAttributes, role, analytics, customBadgeText, customBadgeColor, idPrefix, ...rest }: SpacesLinkWithSpace | SpacesLinkWithSpaceId) => react_jsx_runtime.JSX.Element;
217
214
 
218
215
  type SpacesAgreementProps = {
package/dist/index.d.ts CHANGED
@@ -1,110 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ElementType } from 'react';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
  import { StatusChipProps } from '@availity/mui-chip';
4
5
  import { SvgIconProps } from '@mui/material';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
-
7
- type SpacesLinkVariants = 'card' | 'list' | 'default' | undefined;
8
- type SpacesLinkWithSpace = {
9
- /** If no spaceId is provided, the first space in the spaces array is used.
10
- * Note: This is only to be used when the Spaces provider should only ever contain a single space.
11
- */
12
- spaceId?: string;
13
- /** Use to directly pass a space to the component rather than have it fetched from the spaces API.
14
- * This component does not have to be a child of SpacesProvider.
15
- * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
16
- */
17
- space: Space | SsoTypeSpace;
18
- } & SpacesLinkProps;
19
- type SpacesLinkWithSpaceId = {
20
- /** If no spaceId is provided, the first space in the spaces array is used.
21
- * Note: This is only to be used when the Spaces provider should only ever contain a single space.
22
- */
23
- spaceId: string;
24
- /** Use to directly pass a space to the component rather than have it fetched from the spaces API.
25
- * This component does not have to be a child of SpacesProvider.
26
- * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
27
- */
28
- space?: Space | SsoTypeSpace;
29
- } & SpacesLinkProps;
30
- type SpacesLinkProps = {
31
- /** Children can be a react child or render prop. */
32
- children?: JSX.Element | ((props: any | undefined) => JSX.Element);
33
- /** Tag to overwrite the root component rendered. */
34
- tag?: ElementType<any, keyof JSX.IntrinsicElements>;
35
- /** Tag to overwrite the body component that renders the title, description and data values.
36
- * It defaults to CardBody or div depending on the value of the variant prop.
37
- */
38
- bodyTag?: ElementType<any, keyof JSX.IntrinsicElements>;
39
- /** Tag to overwrite the title component. If variant prop is set to "card", defaults to CardTitle.
40
- * If variant is set to "list", defaults to ListItemHeading. Overwise, defaults to div.
41
- */
42
- titleTag?: ElementType<any, keyof JSX.IntrinsicElements>;
43
- /** Tag to overwrite the text component. If variant prop is set to "card", defaults to Card Text.
44
- * If variant is set to "list", defaults to ListItemText. Otherwise, defaults to div.
45
- */
46
- textTag?: ElementType<any, keyof JSX.IntrinsicElements>;
47
- titleClassName?: string;
48
- /** When true, utilizes the Card component for styling. */
49
- card?: boolean;
50
- /** When true, renders an @availity/mui-icon next to the title if present on the Space. */
51
- icon?: (props: SvgIconProps) => JSX.Element;
52
- /** When true, renders the Spaces description beneath the title. */
53
- description?: boolean;
54
- /** When passed in, provides predefined styles for the component.
55
- * @default 'default'
56
- */
57
- variant?: SpacesLinkVariants;
58
- /** When true, renders the FavoriteHeart component to the left of the Component.
59
- * Note, this does require you to have wrapped your component somewhere in the Favorites Provider.
60
- * This also requires the peerDependency @tanstack/react-query.
61
- */
62
- favorite?: boolean;
63
- /** When true, renders the tyitle, and allow for the description and date info to be added on.
64
- * @default true
65
- */
66
- body?: boolean;
67
- /** When true, renders the activeDate of the space. */
68
- showDate?: boolean;
69
- /** When true, renders the name of the space.
70
- * @default true
71
- */
72
- showName?: boolean;
73
- /** When true, renders a "New!" badge if the activeDate is less than 30 days old. */
74
- showNew?: boolean;
75
- /** When true, renders the component vertically. */
76
- stacked?: boolean;
77
- /** Optionally pass in your own landing state for the component if you are managing the state yourself. */
78
- loading?: boolean;
79
- /** Required when space is not provided, or space is provided and space contains an sso link. */
80
- clientId?: string;
81
- style?: object;
82
- className?: string;
83
- /** Allows the description length to be truncated. */
84
- maxDescriptionWidth?: string;
85
- /** Additional attributes you may want to tack onto the native-form when submitting a SAML sso.
86
- * i.e. spaceId or sourceApplicationId
87
- */
88
- linkAttributes?: object;
89
- /** Allows the role of the root component to be overwritten.
90
- * If variant prop is set to "list", defaults to "listitem".
91
- */
92
- role?: string;
93
- /** When Analytics props are passed inside the analytics props, they will be passed down to the click item.
94
- * For more information on Analytics props see: Autotrack Logged Events
95
- */
96
- analytics?: object;
97
- customBadgeText?: string;
98
- customBadgeColor?: StatusChipProps['color'];
99
- /** prefix for ids to prevent duplicates when the same config link is displayed on the page more than once
100
- * @default ''
101
- */
102
- idPrefix?: string;
103
- [key: string]: any;
104
- };
105
- interface SsoTypeSpace extends Space {
106
- type: 'saml' | 'openid';
107
- }
108
6
 
109
7
  type Link = {
110
8
  /** Contains a URL or URL Fragment that the hyperlink points to. */
@@ -163,7 +61,7 @@ type Space = {
163
61
  };
164
62
  type SpacesContextType = {
165
63
  /** Array of spaces to be passed into the Spaces provider. */
166
- spaces?: Map<string, Space | SsoTypeSpace>;
64
+ spaces?: Map<string, Space>;
167
65
  /** Array of spaces from previous page load. */
168
66
  previousSpacesMap?: Map<string, Space>;
169
67
  /** Array of spaces organized by configurationId. */
@@ -203,7 +101,7 @@ type SpacesProps = {
203
101
  * Useful for if you already have the spaces in your app and don't want the spaces provider to have to fetch them again. */
204
102
  spaces?: Space[];
205
103
  };
206
- type UseSpaces = (...ids: string[]) => (Space | SsoTypeSpace)[] | undefined;
104
+ type UseSpaces = (...ids: string[]) => (Space)[] | undefined;
207
105
 
208
106
  declare const INITIAL_STATE: {
209
107
  loading: boolean;
@@ -213,6 +111,105 @@ declare const useSpacesContext: () => SpacesContextType;
213
111
  declare const Spaces: ({ query, variables, clientId, children, payerIds, spaceIds, spaces: spacesFromProps, }: SpacesProps) => JSX.Element;
214
112
  declare const useSpaces: UseSpaces;
215
113
 
114
+ type SpacesLinkVariants = 'card' | 'list' | 'default' | undefined;
115
+ type SpacesLinkWithSpace = {
116
+ /** If no spaceId is provided, the first space in the spaces array is used.
117
+ * Note: This is only to be used when the Spaces provider should only ever contain a single space.
118
+ */
119
+ spaceId?: string;
120
+ /** Use to directly pass a space to the component rather than have it fetched from the spaces API.
121
+ * This component does not have to be a child of SpacesProvider.
122
+ * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
123
+ */
124
+ space: Space;
125
+ } & SpacesLinkProps;
126
+ type SpacesLinkWithSpaceId = {
127
+ /** If no spaceId is provided, the first space in the spaces array is used.
128
+ * Note: This is only to be used when the Spaces provider should only ever contain a single space.
129
+ */
130
+ spaceId: string;
131
+ /** Use to directly pass a space to the component rather than have it fetched from the spaces API.
132
+ * This component does not have to be a child of SpacesProvider.
133
+ * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
134
+ */
135
+ space?: Space;
136
+ } & SpacesLinkProps;
137
+ type SpacesLinkProps = {
138
+ /** Children can be a react child or render prop. */
139
+ children?: JSX.Element | ((props: any | undefined) => JSX.Element);
140
+ /** Tag to overwrite the root component rendered. */
141
+ tag?: ElementType<any, keyof JSX.IntrinsicElements>;
142
+ /** Tag to overwrite the body component that renders the title, description and data values.
143
+ * It defaults to CardBody or div depending on the value of the variant prop.
144
+ */
145
+ bodyTag?: ElementType<any, keyof JSX.IntrinsicElements>;
146
+ /** Tag to overwrite the title component. If variant prop is set to "card", defaults to CardTitle.
147
+ * If variant is set to "list", defaults to ListItemHeading. Overwise, defaults to div.
148
+ */
149
+ titleTag?: ElementType<any, keyof JSX.IntrinsicElements>;
150
+ /** Tag to overwrite the text component. If variant prop is set to "card", defaults to Card Text.
151
+ * If variant is set to "list", defaults to ListItemText. Otherwise, defaults to div.
152
+ */
153
+ textTag?: ElementType<any, keyof JSX.IntrinsicElements>;
154
+ titleClassName?: string;
155
+ /** When true, utilizes the Card component for styling. */
156
+ card?: boolean;
157
+ /** When true, renders an @availity/mui-icon next to the title if present on the Space. */
158
+ icon?: (props: SvgIconProps) => JSX.Element;
159
+ /** When true, renders the Spaces description beneath the title. */
160
+ description?: boolean;
161
+ /** When passed in, provides predefined styles for the component.
162
+ * @default 'default'
163
+ */
164
+ variant?: SpacesLinkVariants;
165
+ /** When true, renders the FavoriteHeart component to the left of the Component.
166
+ * Note, this does require you to have wrapped your component somewhere in the Favorites Provider.
167
+ * This also requires the peerDependency @tanstack/react-query.
168
+ */
169
+ favorite?: boolean;
170
+ /** When true, renders the tyitle, and allow for the description and date info to be added on.
171
+ * @default true
172
+ */
173
+ body?: boolean;
174
+ /** When true, renders the activeDate of the space. */
175
+ showDate?: boolean;
176
+ /** When true, renders the name of the space.
177
+ * @default true
178
+ */
179
+ showName?: boolean;
180
+ /** When true, renders a "New!" badge if the activeDate is less than 30 days old. */
181
+ showNew?: boolean;
182
+ /** When true, renders the component vertically. */
183
+ stacked?: boolean;
184
+ /** Optionally pass in your own landing state for the component if you are managing the state yourself. */
185
+ loading?: boolean;
186
+ /** Required when space is not provided, or space is provided and space contains an sso link. */
187
+ clientId?: string;
188
+ style?: object;
189
+ className?: string;
190
+ /** Allows the description length to be truncated. */
191
+ maxDescriptionWidth?: string;
192
+ /** Additional attributes you may want to tack onto the native-form when submitting a SAML sso.
193
+ * i.e. spaceId or sourceApplicationId
194
+ */
195
+ linkAttributes?: object;
196
+ /** Allows the role of the root component to be overwritten.
197
+ * If variant prop is set to "list", defaults to "listitem".
198
+ */
199
+ role?: string;
200
+ /** When Analytics props are passed inside the analytics props, they will be passed down to the click item.
201
+ * For more information on Analytics props see: Autotrack Logged Events
202
+ */
203
+ analytics?: object;
204
+ customBadgeText?: string;
205
+ customBadgeColor?: StatusChipProps['color'];
206
+ /** prefix for ids to prevent duplicates when the same config link is displayed on the page more than once
207
+ * @default ''
208
+ */
209
+ idPrefix?: string;
210
+ [key: string]: any;
211
+ };
212
+
216
213
  declare const SpacesLink: ({ spaceId, space: propSpace, className, children, favorite, icon: FileIcon, showName, showNew, showDate, stacked, body, description: showDescription, tag, bodyTag, titleTag, textTag, titleClassName, variant, loading: propsLoading, clientId: propsClientId, maxDescriptionWidth, style, linkAttributes, role, analytics, customBadgeText, customBadgeColor, idPrefix, ...rest }: SpacesLinkWithSpace | SpacesLinkWithSpaceId) => react_jsx_runtime.JSX.Element;
217
214
 
218
215
  type SpacesAgreementProps = {
package/dist/index.js CHANGED
@@ -816,7 +816,6 @@ var openLinkWithSso = (_0, _1) => __async(void 0, [_0, _1], function* (space, {
816
816
  });
817
817
 
818
818
  // src/lib/SpacesLink/useLink.tsx
819
- var isSsoSpace = (space) => (space == null ? void 0 : space.type) === "saml" || (space == null ? void 0 : space.type) === "openid";
820
819
  var useLink = (spaceOrSpaceId, options) => {
821
820
  var _a, _b, _c, _d;
822
821
  const spaceFromSpacesProvider = useSpaces(
@@ -859,7 +858,7 @@ var useLink = (spaceOrSpaceId, options) => {
859
858
  const mediaProps = {
860
859
  role: "link"
861
860
  };
862
- if (isSsoSpace(space) && ((_b = space == null ? void 0 : space.meta) == null ? void 0 : _b.ssoId)) {
861
+ if ((_b = space == null ? void 0 : space.meta) == null ? void 0 : _b.ssoId) {
863
862
  if (!(options == null ? void 0 : options.clientId)) {
864
863
  throw new Error("clientId is required for SSO spaces");
865
864
  }
package/dist/index.mjs CHANGED
@@ -774,7 +774,6 @@ var openLinkWithSso = (_0, _1) => __async(void 0, [_0, _1], function* (space, {
774
774
  });
775
775
 
776
776
  // src/lib/SpacesLink/useLink.tsx
777
- var isSsoSpace = (space) => (space == null ? void 0 : space.type) === "saml" || (space == null ? void 0 : space.type) === "openid";
778
777
  var useLink = (spaceOrSpaceId, options) => {
779
778
  var _a, _b, _c, _d;
780
779
  const spaceFromSpacesProvider = useSpaces(
@@ -817,7 +816,7 @@ var useLink = (spaceOrSpaceId, options) => {
817
816
  const mediaProps = {
818
817
  role: "link"
819
818
  };
820
- if (isSsoSpace(space) && ((_b = space == null ? void 0 : space.meta) == null ? void 0 : _b.ssoId)) {
819
+ if ((_b = space == null ? void 0 : space.meta) == null ? void 0 : _b.ssoId) {
821
820
  if (!(options == null ? void 0 : options.clientId)) {
822
821
  throw new Error("clientId is required for SSO spaces");
823
822
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-spaces",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "Availity MUI Spaces Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -41,15 +41,15 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@availity/mui-button": "^1.1.4",
44
- "@availity/mui-card": "^1.0.11",
45
- "@availity/mui-chip": "^1.0.3",
46
- "@availity/mui-dialog": "^1.0.14",
44
+ "@availity/mui-card": "^1.0.12",
45
+ "@availity/mui-chip": "^1.0.4",
46
+ "@availity/mui-dialog": "^1.0.15",
47
47
  "@availity/mui-disclaimer": "^1.0.5",
48
- "@availity/mui-favorites": "^1.1.5",
48
+ "@availity/mui-favorites": "^1.1.6",
49
49
  "@availity/mui-icon": "^1.1.0",
50
50
  "@availity/mui-layout": "^1.0.2",
51
- "@availity/mui-list": "^1.0.6",
52
- "@availity/mui-modal": "^1.0.11",
51
+ "@availity/mui-list": "^1.0.7",
52
+ "@availity/mui-modal": "^1.0.12",
53
53
  "@availity/mui-paper": "^1.0.2",
54
54
  "@availity/mui-progress": "^1.0.3",
55
55
  "@availity/mui-typography": "^1.0.2",
@@ -62,15 +62,15 @@
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@availity/mui-button": "^1.1.4",
65
- "@availity/mui-card": "^1.0.11",
66
- "@availity/mui-chip": "^1.0.3",
67
- "@availity/mui-dialog": "^1.0.14",
65
+ "@availity/mui-card": "^1.0.12",
66
+ "@availity/mui-chip": "^1.0.4",
67
+ "@availity/mui-dialog": "^1.0.15",
68
68
  "@availity/mui-disclaimer": "^1.0.5",
69
- "@availity/mui-favorites": "^1.1.5",
69
+ "@availity/mui-favorites": "^1.1.6",
70
70
  "@availity/mui-icon": "^1.1.0",
71
71
  "@availity/mui-layout": "^1.0.2",
72
- "@availity/mui-list": "^1.0.6",
73
- "@availity/mui-modal": "^1.0.11",
72
+ "@availity/mui-list": "^1.0.7",
73
+ "@availity/mui-modal": "^1.0.12",
74
74
  "@availity/mui-progress": "^1.0.3",
75
75
  "@availity/mui-typography": "^1.0.2",
76
76
  "@mui/material": "^6.4.5",
@@ -81,11 +81,11 @@
81
81
  "access": "public"
82
82
  },
83
83
  "dependencies": {
84
- "@availity/api-axios": "^10.0.3",
85
- "@availity/hooks": "^5.1.3",
86
- "@availity/message-core": "^7.0.5",
87
- "@availity/native-form": "^6.0.11",
88
- "@availity/resolve-url": "^3.0.3",
84
+ "@availity/api-axios": "^11.0.0",
85
+ "@availity/hooks": "^5.1.5",
86
+ "@availity/message-core": "^8.0.0",
87
+ "@availity/native-form": "^7.0.1",
88
+ "@availity/resolve-url": "^4.0.0",
89
89
  "@tanstack/react-query": "^4.36.1",
90
90
  "dayjs": "^1.11.13",
91
91
  "qs": "^6.14.0",
@@ -4,7 +4,6 @@ import { spacesReducer, fetchAllSpaces } from './spaces-data';
4
4
  import configurationFindMany from './configurationFindMany';
5
5
  import { ModalProvider } from './modals/ModalProvider';
6
6
  import type { Space, SpacesProps, SpacesContextType, UseSpaces } from './spaces-types';
7
- import type { SsoTypeSpace } from './SpacesLink/spaces-link-types';
8
7
  import { isReactNodeFunction } from './helpers';
9
8
 
10
9
  export const INITIAL_STATE = {
@@ -206,7 +205,7 @@ export const useSpaces: UseSpaces = (...ids) => {
206
205
  return spaces && [...spaces.values()];
207
206
  }
208
207
 
209
- return ids.reduce((acc: (Space | SsoTypeSpace)[], id) => {
208
+ return ids.reduce((acc: (Space)[], id) => {
210
209
  const matchedSpace = spaces?.get(id) || spacesByConfig?.get(id);
211
210
 
212
211
  if (matchedSpace) {
@@ -14,7 +14,7 @@ export type SpacesLinkWithSpace = {
14
14
  * This component does not have to be a child of SpacesProvider.
15
15
  * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
16
16
  */
17
- space: Space | SsoTypeSpace;
17
+ space: Space;
18
18
  } & SpacesLinkProps;
19
19
 
20
20
  export type SpacesLinkWithSpaceId = {
@@ -26,7 +26,7 @@ export type SpacesLinkWithSpaceId = {
26
26
  * This component does not have to be a child of SpacesProvider.
27
27
  * Note: If you are wanting to take advantage of the sso links you will additionally need to pass the clientId in.
28
28
  */
29
- space?: Space | SsoTypeSpace;
29
+ space?: Space;
30
30
  } & SpacesLinkProps;
31
31
 
32
32
  export type SpacesLinkProps = {
@@ -111,13 +111,9 @@ export type MediaProps = {
111
111
  onKeyDown?: (event: React.KeyboardEvent) => void;
112
112
  };
113
113
 
114
- export interface SsoTypeSpace extends Space {
115
- type: 'saml' | 'openid';
116
- }
117
-
118
114
  export type UseLink = {
119
115
  (
120
- spaceId?: Space | SsoTypeSpace | string,
116
+ spaceId?: Space | string,
121
117
  options?: { clientId?: string; linkAttributes?: Record<string, any> }
122
118
  ): [Space | undefined, MediaProps | undefined];
123
119
  };
@@ -134,7 +130,7 @@ export type OpenLink = {
134
130
 
135
131
  export type OpenLinkWithSso = {
136
132
  (
137
- space: SsoTypeSpace,
133
+ space: Space,
138
134
  params: {
139
135
  akaname?: string;
140
136
  clientId: string;
@@ -4,14 +4,13 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
4
4
  import { Spaces } from '../Spaces';
5
5
  import { SpacesLink } from './SpacesLink';
6
6
  import type { Space } from '../spaces-types';
7
- import type { SsoTypeSpace } from './spaces-link-types';
8
7
 
9
8
  // eslint-disable-next-line @nx/enforce-module-boundaries
10
9
  import { server } from '@availity/mock/src/lib/server';
11
10
 
12
11
  jest.mock('@availity/native-form');
13
12
 
14
- const buildSpacesLink = (space: Space | SsoTypeSpace, linkAttributes: Record<any, any>) => {
13
+ const buildSpacesLink = (space: Space, linkAttributes: Record<any, any>) => {
15
14
  const queryClient = new QueryClient();
16
15
  return (
17
16
  <QueryClientProvider client={queryClient}>
@@ -44,7 +43,7 @@ describe('useLink', () => {
44
43
  server.resetHandlers();
45
44
  });
46
45
 
47
- const space: Space | SsoTypeSpace = {
46
+ const space: Space = {
48
47
  type: 'APPLICATION',
49
48
  name: 'an application',
50
49
  description: 'This is an application',
@@ -2,11 +2,7 @@ import { useCurrentUser } from '@availity/hooks';
2
2
  import { useSpaces } from '../Spaces';
3
3
  import { useModal } from '../modals/ModalProvider';
4
4
  import { openLink, openLinkWithSso } from './linkHandlers';
5
- import type { UseLink, MediaProps, SsoTypeSpace } from './spaces-link-types';
6
- import { Space } from '../spaces-types';
7
-
8
- const isSsoSpace = (space: Space | SsoTypeSpace | undefined): space is SsoTypeSpace =>
9
- space?.type === 'saml' || space?.type === 'openid';
5
+ import type { UseLink, MediaProps } from './spaces-link-types';
10
6
 
11
7
  export const useLink: UseLink = (spaceOrSpaceId, options) => {
12
8
  const spaceFromSpacesProvider = useSpaces(
@@ -56,7 +52,7 @@ export const useLink: UseLink = (spaceOrSpaceId, options) => {
56
52
  role: 'link',
57
53
  };
58
54
 
59
- if (isSsoSpace(space) && space?.meta?.ssoId) {
55
+ if (space?.meta?.ssoId) {
60
56
  if (!options?.clientId) {
61
57
  throw new Error('clientId is required for SSO spaces');
62
58
  }
@@ -1,5 +1,3 @@
1
- import { SsoTypeSpace } from './SpacesLink/spaces-link-types';
2
-
3
1
  export type Link = {
4
2
  /** Contains a URL or URL Fragment that the hyperlink points to. */
5
3
  url?: string;
@@ -83,7 +81,7 @@ export type FetchAllSpacesProps = {
83
81
 
84
82
  export type SpacesContextType = {
85
83
  /** Array of spaces to be passed into the Spaces provider. */
86
- spaces?: Map<string, Space | SsoTypeSpace>;
84
+ spaces?: Map<string, Space>;
87
85
  /** Array of spaces from previous page load. */
88
86
  previousSpacesMap?: Map<string, Space>;
89
87
  /** Array of spaces organized by configurationId. */
@@ -135,4 +133,4 @@ export type SpacesProps = {
135
133
  spaces?: Space[];
136
134
  };
137
135
 
138
- export type UseSpaces = (...ids: string[]) => (Space | SsoTypeSpace)[] | undefined;
136
+ export type UseSpaces = (...ids: string[]) => (Space)[] | undefined;