@availity/mui-spaces 1.0.28 → 1.0.30

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,20 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.0.30](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.29...@availity/mui-spaces@1.0.30) (2025-08-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * spaces link full url only if starts with web ([5db57d4](https://github.com/Availity/element/commit/5db57d4c0e58f1b1c98b95186b6600ebb9d44493))
11
+
12
+ ## [1.0.29](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.28...@availity/mui-spaces@1.0.29) (2025-07-02)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * fix onprem sso config value ([0c79a52](https://github.com/Availity/element/commit/0c79a52a9f6c56d2d8c45a7546664e7700f19c9e))
18
+
5
19
  ## [1.0.28](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.27...@availity/mui-spaces@1.0.28) (2025-07-01)
6
20
 
7
21
 
package/dist/index.js CHANGED
@@ -118,7 +118,7 @@ var spacesReducer = (state, action) => {
118
118
  const { type } = action;
119
119
  return actions[type](state, action);
120
120
  };
121
- var fetchSpaces = (_0) => __async(void 0, [_0], function* ({ query, clientId, variables }) {
121
+ var fetchSpaces = (_0) => __async(null, [_0], function* ({ query, clientId, variables }) {
122
122
  const headers = {};
123
123
  if (clientId) {
124
124
  headers["X-Client-ID"] = clientId;
@@ -144,7 +144,7 @@ var fetchSpaces = (_0) => __async(void 0, [_0], function* ({ query, clientId, va
144
144
  hasNextPage
145
145
  };
146
146
  });
147
- var fetchAllSpaces = (_0) => __async(void 0, [_0], function* ({
147
+ var fetchAllSpaces = (_0) => __async(null, [_0], function* ({
148
148
  query,
149
149
  clientId,
150
150
  variables,
@@ -330,7 +330,7 @@ var getLocalStorageTopApps = (akaname) => {
330
330
  const topAppsValues = getItemLocalStorage(`${TOP_APPS.KEYS.VALUES}-${akaname}`);
331
331
  return topAppsValues;
332
332
  };
333
- var updateTopApps = (space, akaname) => __async(void 0, null, function* () {
333
+ var updateTopApps = (space, akaname) => __async(null, null, function* () {
334
334
  if (!space.configurationId || !space.type) return;
335
335
  if (canTrackSpace(space.configurationId, space.type)) {
336
336
  const today = (0, import_dayjs.default)();
@@ -363,7 +363,7 @@ var disclaimerQuery = `query disclaimerFindOne($id: ID!) {
363
363
  var DisclaimerModal = ({ disclaimerId }) => {
364
364
  const [disclaimer, setDisclaimer] = (0, import_react.useState)("");
365
365
  (0, import_react.useEffect)(() => {
366
- const fetchDisclaimer = () => __async(void 0, null, function* () {
366
+ const fetchDisclaimer = () => __async(null, null, function* () {
367
367
  if (disclaimerId) {
368
368
  const result = yield import_api_axios2.avWebQLApi.create({ query: disclaimerQuery, variables: { id: disclaimerId } });
369
369
  setDisclaimer(result.data.data.configurationFindOne.description);
@@ -780,7 +780,7 @@ var import_hooks = require("@availity/hooks");
780
780
  // src/lib/SpacesLink/linkHandlers.tsx
781
781
  var import_native_form = __toESM(require("@availity/native-form"));
782
782
  var import_resolve_url2 = require("@availity/resolve-url");
783
- var openLink = (space, params) => __async(void 0, null, function* () {
783
+ var openLink = (space, params) => __async(null, null, function* () {
784
784
  var _a, _b, _c;
785
785
  if (!((_a = space == null ? void 0 : space.link) == null ? void 0 : _a.url)) {
786
786
  return;
@@ -791,19 +791,22 @@ var openLink = (space, params) => __async(void 0, null, function* () {
791
791
  const needsSpaceId = !(0, import_resolve_url2.isAbsoluteUrl)(space.link.url) || essentialsDomainRegex.test(space.link.url);
792
792
  const urlWithParams = needsSpaceId ? updateUrl(space.link.url, "spaceId", spaceId) : space.link.url;
793
793
  let url = !(0, import_resolve_url2.isAbsoluteUrl)(space.link.url) ? getUrl(urlWithParams, false, false) : urlWithParams;
794
- if (!(0, import_resolve_url2.isAbsoluteUrl)(url) && !essentialsDomainRegex.test(document.referrer) && /\/web\/|\/public\/(apps|spaces)/.test(url)) {
794
+ if (!(0, import_resolve_url2.isAbsoluteUrl)(url) && !essentialsDomainRegex.test(document.referrer) && /^\/web\/|\/public\/(apps|spaces)/.test(url)) {
795
795
  const referrer = new URL(document.referrer);
796
796
  url = `${referrer.origin}${url}`;
797
797
  }
798
798
  const target = getTarget(space.link.target);
799
799
  window.open(url, target);
800
800
  });
801
- var openLinkWithSso = (_0, _1) => __async(void 0, [_0, _1], function* (space, { akaname, clientId, payerSpaceId, ssoParams }) {
801
+ var openLinkWithSso = (_0, _1) => __async(null, [_0, _1], function* (space, { akaname, clientId, payerSpaceId, ssoParams }) {
802
802
  var _a, _b;
803
803
  if (space.meta && space.meta.ssoId) {
804
804
  let options;
805
805
  if (space.meta.appsDomain === "true") {
806
- options = ((_a = space.link) == null ? void 0 : _a.target) ? { target: getTarget(space.link.target) } : { action: `${new URL(document.referrer).origin}/ms/api/availity/internal/spc/magneto/sso/v1/saml/${space.meta.ssoId}` };
806
+ options = ((_a = space.link) == null ? void 0 : _a.target) ? {
807
+ target: getTarget(space.link.target),
808
+ action: `${new URL(document.referrer).origin}/ms/api/availity/internal/spc/magneto/sso/v1/saml/${space.meta.ssoId}`
809
+ } : { action: `${new URL(document.referrer).origin}/ms/api/availity/internal/spc/magneto/sso/v1/saml/${space.meta.ssoId}` };
807
810
  } else {
808
811
  options = ((_b = space.link) == null ? void 0 : _b.target) ? { target: getTarget(space.link.target) } : void 0;
809
812
  }
package/dist/index.mjs CHANGED
@@ -76,7 +76,7 @@ var spacesReducer = (state, action) => {
76
76
  const { type } = action;
77
77
  return actions[type](state, action);
78
78
  };
79
- var fetchSpaces = (_0) => __async(void 0, [_0], function* ({ query, clientId, variables }) {
79
+ var fetchSpaces = (_0) => __async(null, [_0], function* ({ query, clientId, variables }) {
80
80
  const headers = {};
81
81
  if (clientId) {
82
82
  headers["X-Client-ID"] = clientId;
@@ -102,7 +102,7 @@ var fetchSpaces = (_0) => __async(void 0, [_0], function* ({ query, clientId, va
102
102
  hasNextPage
103
103
  };
104
104
  });
105
- var fetchAllSpaces = (_0) => __async(void 0, [_0], function* ({
105
+ var fetchAllSpaces = (_0) => __async(null, [_0], function* ({
106
106
  query,
107
107
  clientId,
108
108
  variables,
@@ -288,7 +288,7 @@ var getLocalStorageTopApps = (akaname) => {
288
288
  const topAppsValues = getItemLocalStorage(`${TOP_APPS.KEYS.VALUES}-${akaname}`);
289
289
  return topAppsValues;
290
290
  };
291
- var updateTopApps = (space, akaname) => __async(void 0, null, function* () {
291
+ var updateTopApps = (space, akaname) => __async(null, null, function* () {
292
292
  if (!space.configurationId || !space.type) return;
293
293
  if (canTrackSpace(space.configurationId, space.type)) {
294
294
  const today = dayjs();
@@ -321,7 +321,7 @@ var disclaimerQuery = `query disclaimerFindOne($id: ID!) {
321
321
  var DisclaimerModal = ({ disclaimerId }) => {
322
322
  const [disclaimer, setDisclaimer] = useState("");
323
323
  useEffect(() => {
324
- const fetchDisclaimer = () => __async(void 0, null, function* () {
324
+ const fetchDisclaimer = () => __async(null, null, function* () {
325
325
  if (disclaimerId) {
326
326
  const result = yield avWebQLApi2.create({ query: disclaimerQuery, variables: { id: disclaimerId } });
327
327
  setDisclaimer(result.data.data.configurationFindOne.description);
@@ -738,7 +738,7 @@ import { useCurrentUser } from "@availity/hooks";
738
738
  // src/lib/SpacesLink/linkHandlers.tsx
739
739
  import nativeForm from "@availity/native-form";
740
740
  import { isAbsoluteUrl as isAbsoluteUrl2 } from "@availity/resolve-url";
741
- var openLink = (space, params) => __async(void 0, null, function* () {
741
+ var openLink = (space, params) => __async(null, null, function* () {
742
742
  var _a, _b, _c;
743
743
  if (!((_a = space == null ? void 0 : space.link) == null ? void 0 : _a.url)) {
744
744
  return;
@@ -749,19 +749,22 @@ var openLink = (space, params) => __async(void 0, null, function* () {
749
749
  const needsSpaceId = !isAbsoluteUrl2(space.link.url) || essentialsDomainRegex.test(space.link.url);
750
750
  const urlWithParams = needsSpaceId ? updateUrl(space.link.url, "spaceId", spaceId) : space.link.url;
751
751
  let url = !isAbsoluteUrl2(space.link.url) ? getUrl(urlWithParams, false, false) : urlWithParams;
752
- if (!isAbsoluteUrl2(url) && !essentialsDomainRegex.test(document.referrer) && /\/web\/|\/public\/(apps|spaces)/.test(url)) {
752
+ if (!isAbsoluteUrl2(url) && !essentialsDomainRegex.test(document.referrer) && /^\/web\/|\/public\/(apps|spaces)/.test(url)) {
753
753
  const referrer = new URL(document.referrer);
754
754
  url = `${referrer.origin}${url}`;
755
755
  }
756
756
  const target = getTarget(space.link.target);
757
757
  window.open(url, target);
758
758
  });
759
- var openLinkWithSso = (_0, _1) => __async(void 0, [_0, _1], function* (space, { akaname, clientId, payerSpaceId, ssoParams }) {
759
+ var openLinkWithSso = (_0, _1) => __async(null, [_0, _1], function* (space, { akaname, clientId, payerSpaceId, ssoParams }) {
760
760
  var _a, _b;
761
761
  if (space.meta && space.meta.ssoId) {
762
762
  let options;
763
763
  if (space.meta.appsDomain === "true") {
764
- options = ((_a = space.link) == null ? void 0 : _a.target) ? { target: getTarget(space.link.target) } : { action: `${new URL(document.referrer).origin}/ms/api/availity/internal/spc/magneto/sso/v1/saml/${space.meta.ssoId}` };
764
+ options = ((_a = space.link) == null ? void 0 : _a.target) ? {
765
+ target: getTarget(space.link.target),
766
+ action: `${new URL(document.referrer).origin}/ms/api/availity/internal/spc/magneto/sso/v1/saml/${space.meta.ssoId}`
767
+ } : { action: `${new URL(document.referrer).origin}/ms/api/availity/internal/spc/magneto/sso/v1/saml/${space.meta.ssoId}` };
765
768
  } else {
766
769
  options = ((_b = space.link) == null ? void 0 : _b.target) ? { target: getTarget(space.link.target) } : void 0;
767
770
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-spaces",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "Availity MUI Spaces Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -20,7 +20,7 @@ export const openLink: OpenLink = async (space, params) => {
20
20
 
21
21
  let url = !isAbsoluteUrl(space.link.url) ? getUrl(urlWithParams, false, false) : urlWithParams;
22
22
 
23
- if (!isAbsoluteUrl(url) && !essentialsDomainRegex.test(document.referrer) && /\/web\/|\/public\/(apps|spaces)/.test(url)) {
23
+ if (!isAbsoluteUrl(url) && !essentialsDomainRegex.test(document.referrer) && /^\/web\/|\/public\/(apps|spaces)/.test(url)) {
24
24
  const referrer = new URL(document.referrer);
25
25
  url = `${referrer.origin}${url}`
26
26
  }
@@ -34,7 +34,12 @@ export const openLinkWithSso: OpenLinkWithSso = async (space, { akaname, clientI
34
34
  if (space.meta && space.meta.ssoId) {
35
35
  let options;
36
36
  if (space.meta.appsDomain === 'true') {
37
- options = space.link?.target ? { target: getTarget(space.link.target) } : { action: `${new URL(document.referrer).origin}/ms/api/availity/internal/spc/magneto/sso/v1/saml/${space.meta.ssoId}`};
37
+ options = space.link?.target ?
38
+ {
39
+ target: getTarget(space.link.target),
40
+ action: `${new URL(document.referrer).origin}/ms/api/availity/internal/spc/magneto/sso/v1/saml/${space.meta.ssoId}`
41
+ } :
42
+ { action: `${new URL(document.referrer).origin}/ms/api/availity/internal/spc/magneto/sso/v1/saml/${space.meta.ssoId}`};
38
43
  } else {
39
44
  options = space.link?.target ? { target: getTarget(space.link.target) } : undefined;
40
45
  }