@availity/mui-spaces 1.0.19 → 1.0.21

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,19 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [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
+
7
+ ## [1.0.20](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.19...@availity/mui-spaces@1.0.20) (2025-05-20)
8
+
9
+ ### Dependency Updates
10
+
11
+ * `mui-favorites` updated to version `1.0.19`
12
+ * `@availity/mock` updated to version `1.0.19`
13
+
14
+ ### Bug Fixes
15
+
16
+ * **mui-spaces:** fix casing of payerIDs ([379fd35](https://github.com/Availity/element/commit/379fd3544271e3fd90ee5ee0b0920a682cb5e022))
17
+
5
18
  ## [1.0.19](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.18...@availity/mui-spaces@1.0.19) (2025-05-19)
6
19
 
7
20
 
package/dist/index.js CHANGED
@@ -629,7 +629,7 @@ var Spaces = ({
629
629
  }
630
630
  }
631
631
  const spaceIdVars = __spreadProps(__spreadValues({}, variables), { ids: [...spaceIdsToQuery.keys()] });
632
- const payerIdVars = __spreadProps(__spreadValues({}, variables), { payerIds: [...payerIdsToQuery.keys()] });
632
+ const payerIdVars = __spreadProps(__spreadValues({}, variables), { payerIDs: [...payerIdsToQuery.keys()] });
633
633
  const [
634
634
  { data: spacesBySpaceIds, isFetching: isLoadingBySpaceIds, isError: isErrorBySpaceIds },
635
635
  { data: spacesByPayerIds, isFetching: isLoadingByPayerIds, isError: isErrorByPayerIds }
@@ -786,7 +786,10 @@ var openLink = (space, params) => __async(void 0, null, function* () {
786
786
  return;
787
787
  }
788
788
  if (params == null ? void 0 : params.akaname) yield updateTopApps(space, params.akaname);
789
- const url = !(0, import_resolve_url2.isAbsoluteUrl)(space.link.url) ? getUrl(updateUrl(space.link.url, "spaceId", (params == null ? void 0 : params.payerSpaceId) || ((_c = (_b = space.parents) == null ? void 0 : _b[0]) == null ? void 0 : _c.id)), false, false) : space.link.url;
789
+ const spaceId = (params == null ? void 0 : params.payerSpaceId) || ((_c = (_b = space.parents) == null ? void 0 : _b[0]) == null ? void 0 : _c.id);
790
+ const needsSpaceId = !(0, import_resolve_url2.isAbsoluteUrl)(space.link.url) || /(test|qa(p?)-)?essentials\.availity\.com/.test(space.link.url);
791
+ const urlWithParams = needsSpaceId ? updateUrl(space.link.url, "spaceId", spaceId) : space.link.url;
792
+ const url = !(0, import_resolve_url2.isAbsoluteUrl)(space.link.url) ? getUrl(urlWithParams, false, false) : urlWithParams;
790
793
  const target = getTarget(space.link.target);
791
794
  window.open(url, target);
792
795
  });
package/dist/index.mjs CHANGED
@@ -587,7 +587,7 @@ var Spaces = ({
587
587
  }
588
588
  }
589
589
  const spaceIdVars = __spreadProps(__spreadValues({}, variables), { ids: [...spaceIdsToQuery.keys()] });
590
- const payerIdVars = __spreadProps(__spreadValues({}, variables), { payerIds: [...payerIdsToQuery.keys()] });
590
+ const payerIdVars = __spreadProps(__spreadValues({}, variables), { payerIDs: [...payerIdsToQuery.keys()] });
591
591
  const [
592
592
  { data: spacesBySpaceIds, isFetching: isLoadingBySpaceIds, isError: isErrorBySpaceIds },
593
593
  { data: spacesByPayerIds, isFetching: isLoadingByPayerIds, isError: isErrorByPayerIds }
@@ -744,7 +744,10 @@ var openLink = (space, params) => __async(void 0, null, function* () {
744
744
  return;
745
745
  }
746
746
  if (params == null ? void 0 : params.akaname) yield updateTopApps(space, params.akaname);
747
- const url = !isAbsoluteUrl2(space.link.url) ? getUrl(updateUrl(space.link.url, "spaceId", (params == null ? void 0 : params.payerSpaceId) || ((_c = (_b = space.parents) == null ? void 0 : _b[0]) == null ? void 0 : _c.id)), false, false) : space.link.url;
747
+ const spaceId = (params == null ? void 0 : params.payerSpaceId) || ((_c = (_b = space.parents) == null ? void 0 : _b[0]) == null ? void 0 : _c.id);
748
+ const needsSpaceId = !isAbsoluteUrl2(space.link.url) || /(test|qa(p?)-)?essentials\.availity\.com/.test(space.link.url);
749
+ const urlWithParams = needsSpaceId ? updateUrl(space.link.url, "spaceId", spaceId) : space.link.url;
750
+ const url = !isAbsoluteUrl2(space.link.url) ? getUrl(urlWithParams, false, false) : urlWithParams;
748
751
  const target = getTarget(space.link.target);
749
752
  window.open(url, target);
750
753
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-spaces",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "Availity MUI Spaces Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -45,7 +45,7 @@
45
45
  "@availity/mui-chip": "^1.0.3",
46
46
  "@availity/mui-dialog": "^1.0.14",
47
47
  "@availity/mui-disclaimer": "^1.0.5",
48
- "@availity/mui-favorites": "^1.1.4",
48
+ "@availity/mui-favorites": "^1.1.5",
49
49
  "@availity/mui-icon": "^1.1.0",
50
50
  "@availity/mui-layout": "^1.0.2",
51
51
  "@availity/mui-list": "^1.0.6",
@@ -66,7 +66,7 @@
66
66
  "@availity/mui-chip": "^1.0.3",
67
67
  "@availity/mui-dialog": "^1.0.14",
68
68
  "@availity/mui-disclaimer": "^1.0.5",
69
- "@availity/mui-favorites": "^1.1.4",
69
+ "@availity/mui-favorites": "^1.1.5",
70
70
  "@availity/mui-icon": "^1.1.0",
71
71
  "@availity/mui-layout": "^1.0.2",
72
72
  "@availity/mui-list": "^1.0.6",
@@ -3,7 +3,6 @@ import { useState } from 'react';
3
3
  import { render, waitFor, fireEvent } from '@testing-library/react';
4
4
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
5
5
  import { Spaces, useSpaces, useSpacesContext } from '..';
6
- import type { Space } from './spaces-types';
7
6
 
8
7
  // eslint-disable-next-line @nx/enforce-module-boundaries
9
8
  import { server } from '../../../mock/src/lib/server';
@@ -74,7 +74,7 @@ export const Spaces = ({
74
74
 
75
75
  const spaceIdVars = { ...variables, ids: [...spaceIdsToQuery.keys()] };
76
76
 
77
- const payerIdVars = { ...variables, payerIds: [...payerIdsToQuery.keys()] };
77
+ const payerIdVars = { ...variables, payerIDs: [...payerIdsToQuery.keys()] };
78
78
 
79
79
  const [
80
80
  { data: spacesBySpaceIds, isFetching: isLoadingBySpaceIds, isError: isErrorBySpaceIds },
@@ -11,9 +11,11 @@ export const openLink: OpenLink = async (space, params) => {
11
11
 
12
12
  if (params?.akaname) await updateTopApps(space, params.akaname);
13
13
 
14
- const url = !isAbsoluteUrl(space.link.url)
15
- ? getUrl(updateUrl(space.link.url, 'spaceId', params?.payerSpaceId || space.parents?.[0]?.id), false, false)
16
- : space.link.url;
14
+ const spaceId = params?.payerSpaceId || space.parents?.[0]?.id;
15
+ const needsSpaceId =
16
+ !isAbsoluteUrl(space.link.url) || /(test|qa(p?)-)?essentials\.availity\.com/.test(space.link.url);
17
+ const urlWithParams = needsSpaceId ? updateUrl(space.link.url, 'spaceId', spaceId) : space.link.url;
18
+ const url = !isAbsoluteUrl(space.link.url) ? getUrl(urlWithParams, false, false) : urlWithParams;
17
19
 
18
20
  const target = getTarget(space.link.target);
19
21