@availity/mui-spaces 1.1.0 → 1.1.2
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 +28 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +28 -27
- package/src/lib/configurationFindMany.tsx +1 -1
- package/src/lib/spaces-data.test.tsx +40 -1
- package/src/lib/spaces-data.tsx +6 -1
- package/src/lib/spaces-types.tsx +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.1.2](https://github.com/Availity/element/compare/@availity/mui-spaces@1.1.1...@availity/mui-spaces@1.1.2) (2025-10-30)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-button` updated to version `1.1.1`
|
|
10
|
+
* `mui-card` updated to version `1.1.1`
|
|
11
|
+
* `mui-chip` updated to version `1.1.1`
|
|
12
|
+
* `mui-dialog` updated to version `1.1.1`
|
|
13
|
+
* `mui-disclaimer` updated to version `1.1.1`
|
|
14
|
+
* `mui-favorites` updated to version `1.1.1`
|
|
15
|
+
* `mui-icon` updated to version `1.1.1`
|
|
16
|
+
* `mui-layout` updated to version `1.1.1`
|
|
17
|
+
* `mui-list` updated to version `1.1.1`
|
|
18
|
+
* `mui-modal` updated to version `1.1.1`
|
|
19
|
+
* `mui-progress` updated to version `1.1.1`
|
|
20
|
+
* `mui-typography` updated to version `1.1.1`
|
|
21
|
+
* `mui-paper` updated to version `1.1.1`
|
|
22
|
+
## [1.1.1](https://github.com/Availity/element/compare/@availity/mui-spaces@1.1.0...@availity/mui-spaces@1.1.1) (2025-10-09)
|
|
23
|
+
|
|
24
|
+
### Dependency Updates
|
|
25
|
+
|
|
26
|
+
* `mui-favorites` updated to version `1.1.0`
|
|
27
|
+
* `@availity/mock` updated to version `1.1.0`
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* **mui-spaces:** try to parse operationName ([8189c94](https://github.com/Availity/element/commit/8189c94dd6b8fef981266d121b3a2893639fa482))
|
|
32
|
+
|
|
5
33
|
## [1.1.0](https://github.com/Availity/element/compare/@availity/mui-spaces@1.0.31...@availity/mui-spaces@1.1.0) (2025-09-25)
|
|
6
34
|
|
|
7
35
|
|
package/dist/index.d.mts
CHANGED
|
@@ -88,6 +88,11 @@ type SpacesProps = {
|
|
|
88
88
|
/**
|
|
89
89
|
* Name for the GraphQL operation, used for debugging and monitoring.
|
|
90
90
|
*
|
|
91
|
+
* If an operation name exists in the query string, leave this undefined or
|
|
92
|
+
* ensure it matches what is in the query string.
|
|
93
|
+
*
|
|
94
|
+
* If no operation name exists in the query string, it can be defined here.
|
|
95
|
+
*
|
|
91
96
|
* Format: `{ValueStream || PayerName}{AbbreviatedAppName}{Description}{Type}` (PascalCase)
|
|
92
97
|
* @example "OnbPsFavoritesQuery"
|
|
93
98
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -88,6 +88,11 @@ type SpacesProps = {
|
|
|
88
88
|
/**
|
|
89
89
|
* Name for the GraphQL operation, used for debugging and monitoring.
|
|
90
90
|
*
|
|
91
|
+
* If an operation name exists in the query string, leave this undefined or
|
|
92
|
+
* ensure it matches what is in the query string.
|
|
93
|
+
*
|
|
94
|
+
* If no operation name exists in the query string, it can be defined here.
|
|
95
|
+
*
|
|
91
96
|
* Format: `{ValueStream || PayerName}{AbbreviatedAppName}{Description}{Type}` (PascalCase)
|
|
92
97
|
* @example "OnbPsFavoritesQuery"
|
|
93
98
|
*/
|
package/dist/index.js
CHANGED
|
@@ -98,6 +98,10 @@ var import_react_query = require("@tanstack/react-query");
|
|
|
98
98
|
|
|
99
99
|
// src/lib/spaces-data.tsx
|
|
100
100
|
var import_api_axios = require("@availity/api-axios");
|
|
101
|
+
var parseOperationName = (query) => {
|
|
102
|
+
const match = query.match(/(?:query|mutation|subscription)\s+([a-zA-Z_][a-zA-Z0-9_]*)/i);
|
|
103
|
+
return match == null ? void 0 : match[1];
|
|
104
|
+
};
|
|
101
105
|
var actions = {
|
|
102
106
|
SPACES: (currentState, { spaces, spacesByConfig, spacesByPayer }) => ({
|
|
103
107
|
previousSpacesMap: spaces,
|
|
@@ -131,7 +135,7 @@ var fetchSpaces = (_0) => __async(null, [_0], function* ({ query, clientId, vari
|
|
|
131
135
|
{
|
|
132
136
|
query,
|
|
133
137
|
variables: __spreadValues({}, variables),
|
|
134
|
-
operationName: operationName || "PuiSpacesCmpAnonymousOperation"
|
|
138
|
+
operationName: operationName || parseOperationName(query) || "PuiSpacesCmpAnonymousOperation"
|
|
135
139
|
},
|
|
136
140
|
{ headers: __spreadValues({}, headers) }
|
|
137
141
|
);
|
|
@@ -164,7 +168,7 @@ var fetchAllSpaces = (_0) => __async(null, [_0], function* ({
|
|
|
164
168
|
});
|
|
165
169
|
|
|
166
170
|
// src/lib/configurationFindMany.tsx
|
|
167
|
-
var configurationFindMany_default = `query
|
|
171
|
+
var configurationFindMany_default = `query PuiSpacesCmpConfigurationFindMany($ids: [String!], $payerIDs: [ID!], $types: [TypeEnum!], $page: Int) {
|
|
168
172
|
configurationPagination(filter: { ids: $ids, payerIds: $payerIDs, types: $types }, page: $page) {
|
|
169
173
|
pageInfo {
|
|
170
174
|
hasNextPage
|
package/dist/index.mjs
CHANGED
|
@@ -56,6 +56,10 @@ import { useQueries } from "@tanstack/react-query";
|
|
|
56
56
|
|
|
57
57
|
// src/lib/spaces-data.tsx
|
|
58
58
|
import { avWebQLApi } from "@availity/api-axios";
|
|
59
|
+
var parseOperationName = (query) => {
|
|
60
|
+
const match = query.match(/(?:query|mutation|subscription)\s+([a-zA-Z_][a-zA-Z0-9_]*)/i);
|
|
61
|
+
return match == null ? void 0 : match[1];
|
|
62
|
+
};
|
|
59
63
|
var actions = {
|
|
60
64
|
SPACES: (currentState, { spaces, spacesByConfig, spacesByPayer }) => ({
|
|
61
65
|
previousSpacesMap: spaces,
|
|
@@ -89,7 +93,7 @@ var fetchSpaces = (_0) => __async(null, [_0], function* ({ query, clientId, vari
|
|
|
89
93
|
{
|
|
90
94
|
query,
|
|
91
95
|
variables: __spreadValues({}, variables),
|
|
92
|
-
operationName: operationName || "PuiSpacesCmpAnonymousOperation"
|
|
96
|
+
operationName: operationName || parseOperationName(query) || "PuiSpacesCmpAnonymousOperation"
|
|
93
97
|
},
|
|
94
98
|
{ headers: __spreadValues({}, headers) }
|
|
95
99
|
);
|
|
@@ -122,7 +126,7 @@ var fetchAllSpaces = (_0) => __async(null, [_0], function* ({
|
|
|
122
126
|
});
|
|
123
127
|
|
|
124
128
|
// src/lib/configurationFindMany.tsx
|
|
125
|
-
var configurationFindMany_default = `query
|
|
129
|
+
var configurationFindMany_default = `query PuiSpacesCmpConfigurationFindMany($ids: [String!], $payerIDs: [ID!], $types: [TypeEnum!], $page: Int) {
|
|
126
130
|
configurationPagination(filter: { ids: $ids, payerIds: $payerIDs, types: $types }, page: $page) {
|
|
127
131
|
pageInfo {
|
|
128
132
|
hasNextPage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-spaces",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Availity MUI Spaces Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@availity/mui-button": "^1.1.
|
|
44
|
-
"@availity/mui-card": "^1.0.
|
|
45
|
-
"@availity/mui-chip": "^1.0.
|
|
46
|
-
"@availity/mui-dialog": "^1.0.
|
|
47
|
-
"@availity/mui-disclaimer": "^1.0.
|
|
48
|
-
"@availity/mui-favorites": "^1.1.
|
|
49
|
-
"@availity/mui-icon": "^1.1.
|
|
50
|
-
"@availity/mui-layout": "^1.0.
|
|
51
|
-
"@availity/mui-list": "^1.0.
|
|
52
|
-
"@availity/mui-modal": "^1.0.
|
|
53
|
-
"@availity/mui-paper": "^1.0.
|
|
54
|
-
"@availity/mui-progress": "^1.0.
|
|
55
|
-
"@availity/mui-typography": "^1.0.
|
|
43
|
+
"@availity/mui-button": "^1.1.5",
|
|
44
|
+
"@availity/mui-card": "^1.0.13",
|
|
45
|
+
"@availity/mui-chip": "^1.0.5",
|
|
46
|
+
"@availity/mui-dialog": "^1.0.16",
|
|
47
|
+
"@availity/mui-disclaimer": "^1.0.6",
|
|
48
|
+
"@availity/mui-favorites": "^1.1.8",
|
|
49
|
+
"@availity/mui-icon": "^1.1.1",
|
|
50
|
+
"@availity/mui-layout": "^1.0.3",
|
|
51
|
+
"@availity/mui-list": "^1.0.8",
|
|
52
|
+
"@availity/mui-modal": "^1.0.13",
|
|
53
|
+
"@availity/mui-paper": "^1.0.3",
|
|
54
|
+
"@availity/mui-progress": "^1.0.4",
|
|
55
|
+
"@availity/mui-typography": "^1.0.3",
|
|
56
56
|
"@mui/material": "^6.4.5",
|
|
57
57
|
"react": "18.2.0",
|
|
58
58
|
"react-dom": "18.2.0",
|
|
@@ -61,18 +61,18 @@
|
|
|
61
61
|
"typescript": "^5.4.5"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@availity/mui-button": "^1.1.
|
|
65
|
-
"@availity/mui-card": "^1.0.
|
|
66
|
-
"@availity/mui-chip": "^1.0.
|
|
67
|
-
"@availity/mui-dialog": "^1.0.
|
|
68
|
-
"@availity/mui-disclaimer": "^1.0.
|
|
69
|
-
"@availity/mui-favorites": "^1.1.
|
|
70
|
-
"@availity/mui-icon": "^1.1.
|
|
71
|
-
"@availity/mui-layout": "^1.0.
|
|
72
|
-
"@availity/mui-list": "^1.0.
|
|
73
|
-
"@availity/mui-modal": "^1.0.
|
|
74
|
-
"@availity/mui-progress": "^1.0.
|
|
75
|
-
"@availity/mui-typography": "^1.0.
|
|
64
|
+
"@availity/mui-button": "^1.1.5",
|
|
65
|
+
"@availity/mui-card": "^1.0.13",
|
|
66
|
+
"@availity/mui-chip": "^1.0.5",
|
|
67
|
+
"@availity/mui-dialog": "^1.0.16",
|
|
68
|
+
"@availity/mui-disclaimer": "^1.0.6",
|
|
69
|
+
"@availity/mui-favorites": "^1.1.8",
|
|
70
|
+
"@availity/mui-icon": "^1.1.1",
|
|
71
|
+
"@availity/mui-layout": "^1.0.3",
|
|
72
|
+
"@availity/mui-list": "^1.0.8",
|
|
73
|
+
"@availity/mui-modal": "^1.0.13",
|
|
74
|
+
"@availity/mui-progress": "^1.0.4",
|
|
75
|
+
"@availity/mui-typography": "^1.0.3",
|
|
76
76
|
"@mui/material": "^6.4.5",
|
|
77
77
|
"react": ">=16.3.0",
|
|
78
78
|
"react-router-dom": "^6.26.0"
|
|
@@ -91,5 +91,6 @@
|
|
|
91
91
|
"qs": "^6.14.0",
|
|
92
92
|
"react-image": "^4.1.0",
|
|
93
93
|
"react-markdown": "^6.0.3"
|
|
94
|
-
}
|
|
94
|
+
},
|
|
95
|
+
"sideEffects": false
|
|
95
96
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default `query
|
|
1
|
+
export default `query PuiSpacesCmpConfigurationFindMany($ids: [String!], $payerIDs: [ID!], $types: [TypeEnum!], $page: Int) {
|
|
2
2
|
configurationPagination(filter: { ids: $ids, payerIds: $payerIDs, types: $types }, page: $page) {
|
|
3
3
|
pageInfo {
|
|
4
4
|
hasNextPage
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fetchAllSpaces } from './spaces-data';
|
|
1
|
+
import { fetchAllSpaces, parseOperationName } from './spaces-data';
|
|
2
2
|
import configurationFindMany from './configurationFindMany';
|
|
3
3
|
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
4
4
|
import { server } from '../../../mock/src/lib/server';
|
|
@@ -38,3 +38,42 @@ describe('getAllSpaces', () => {
|
|
|
38
38
|
expect(apiCalls).toBe(2);
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
|
+
|
|
42
|
+
describe('parseQueryName', () => {
|
|
43
|
+
it('should return the query name if one exists in the query', async () => {
|
|
44
|
+
const opName = parseOperationName(configurationFindMany);
|
|
45
|
+
|
|
46
|
+
expect(opName).toBe('PuiSpacesCmpConfigurationFindMany');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('should return the mutation name if one exists in the mutation', async () => {
|
|
50
|
+
const opName = parseOperationName(`
|
|
51
|
+
mutation FakeMutation($ids: [String!]) {
|
|
52
|
+
fakeMutation({ ids: $ids }) {
|
|
53
|
+
id
|
|
54
|
+
}
|
|
55
|
+
}`);
|
|
56
|
+
|
|
57
|
+
expect(opName).toBe('FakeMutation');
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('should return the subscription name if one exists in the subscription', async () => {
|
|
61
|
+
const opName = parseOperationName(`
|
|
62
|
+
subscription FakeSubscription($ids: [String!]) {
|
|
63
|
+
fakeSubscription({ ids: $ids }) {
|
|
64
|
+
id
|
|
65
|
+
}
|
|
66
|
+
}`);
|
|
67
|
+
|
|
68
|
+
expect(opName).toBe('FakeSubscription');
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('should return undefined if an opeation does not exist on the query', async () => {
|
|
72
|
+
const opName = parseOperationName(`
|
|
73
|
+
fakeQuery({ ids: $ids }) {
|
|
74
|
+
id
|
|
75
|
+
}`);
|
|
76
|
+
|
|
77
|
+
expect(opName).toBe(undefined);
|
|
78
|
+
});
|
|
79
|
+
});
|
package/src/lib/spaces-data.tsx
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { avWebQLApi } from '@availity/api-axios';
|
|
2
2
|
import { Space, FetchSpacesProps, FetchAllSpacesProps, SpacesContextType, SpacesReducerAction } from './spaces-types';
|
|
3
3
|
|
|
4
|
+
export const parseOperationName = (query: string): string | undefined => {
|
|
5
|
+
const match = query.match(/(?:query|mutation|subscription)\s+([a-zA-Z_][a-zA-Z0-9_]*)/i);
|
|
6
|
+
return match?.[1];
|
|
7
|
+
};
|
|
8
|
+
|
|
4
9
|
export const actions = {
|
|
5
10
|
SPACES: (
|
|
6
11
|
currentState: SpacesContextType,
|
|
@@ -43,7 +48,7 @@ export const fetchSpaces = async ({ query, clientId, variables, operationName }:
|
|
|
43
48
|
{
|
|
44
49
|
query,
|
|
45
50
|
variables: { ...variables },
|
|
46
|
-
operationName: operationName || 'PuiSpacesCmpAnonymousOperation',
|
|
51
|
+
operationName: operationName || parseOperationName(query) || 'PuiSpacesCmpAnonymousOperation',
|
|
47
52
|
},
|
|
48
53
|
{ headers: { ...headers } }
|
|
49
54
|
);
|
package/src/lib/spaces-types.tsx
CHANGED
|
@@ -69,6 +69,11 @@ export type FetchSpacesProps = {
|
|
|
69
69
|
/**
|
|
70
70
|
* Name for the GraphQL operation, used for debugging and monitoring.
|
|
71
71
|
*
|
|
72
|
+
* If an operation name exists in the query string, leave this undefined or
|
|
73
|
+
* ensure it matches what is in the query string.
|
|
74
|
+
*
|
|
75
|
+
* If no operation name exists in the query string, it can be defined here.
|
|
76
|
+
*
|
|
72
77
|
* Format: `{ValueStream || PayerName}{AbbreviatedAppName}{Description}{Type}` (PascalCase)
|
|
73
78
|
* @example "OnbPsFavoritesQuery"
|
|
74
79
|
*/
|
|
@@ -87,6 +92,11 @@ export type FetchAllSpacesProps = {
|
|
|
87
92
|
/**
|
|
88
93
|
* Name for the GraphQL operation, used for debugging and monitoring.
|
|
89
94
|
*
|
|
95
|
+
* If an operation name exists in the query string, leave this undefined or
|
|
96
|
+
* ensure it matches what is in the query string.
|
|
97
|
+
*
|
|
98
|
+
* If no operation name exists in the query string, it can be defined here.
|
|
99
|
+
*
|
|
90
100
|
* Format: `{ValueStream || PayerName}{AbbreviatedAppName}{Description}{Type}` (PascalCase)
|
|
91
101
|
* @example "OnbPsFavoritesQuery"
|
|
92
102
|
*/
|
|
@@ -133,6 +143,11 @@ export type SpacesProps = {
|
|
|
133
143
|
/**
|
|
134
144
|
* Name for the GraphQL operation, used for debugging and monitoring.
|
|
135
145
|
*
|
|
146
|
+
* If an operation name exists in the query string, leave this undefined or
|
|
147
|
+
* ensure it matches what is in the query string.
|
|
148
|
+
*
|
|
149
|
+
* If no operation name exists in the query string, it can be defined here.
|
|
150
|
+
*
|
|
136
151
|
* Format: `{ValueStream || PayerName}{AbbreviatedAppName}{Description}{Type}` (PascalCase)
|
|
137
152
|
* @example "OnbPsFavoritesQuery"
|
|
138
153
|
*/
|