@availity/mui-favorites 1.1.5 → 1.1.7
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 +7 -0
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.1.7](https://github.com/Availity/element/compare/@availity/mui-favorites@1.1.6...@availity/mui-favorites@1.1.7) (2025-10-09)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@availity/mock` updated to version `1.1.6`
|
|
10
|
+
## [1.1.6](https://github.com/Availity/element/compare/@availity/mui-favorites@1.1.5...@availity/mui-favorites@1.1.6) (2025-05-29)
|
|
11
|
+
|
|
5
12
|
## [1.1.5](https://github.com/Availity/element/compare/@availity/mui-favorites@1.1.4...@availity/mui-favorites@1.1.5) (2025-05-20)
|
|
6
13
|
|
|
7
14
|
### Dependency Updates
|
package/dist/index.js
CHANGED
|
@@ -108,11 +108,11 @@ var validateFavorites = (unvalidatedFavorites) => {
|
|
|
108
108
|
const validatedFavorites = Array.isArray(unvalidatedFavorites) ? unvalidatedFavorites == null ? void 0 : unvalidatedFavorites.filter(isFavorite) : [];
|
|
109
109
|
return validatedFavorites;
|
|
110
110
|
};
|
|
111
|
-
var submit = (_0, _1) => __async(
|
|
111
|
+
var submit = (_0, _1) => __async(null, [_0, _1], function* ({ favorites, targetFavoriteId }, applicationId) {
|
|
112
112
|
const response = yield import_api_axios.avSettingsApi.setApplication(applicationId, { favorites });
|
|
113
113
|
return { favorites: response.data.favorites, targetFavoriteId };
|
|
114
114
|
});
|
|
115
|
-
var getFavorites = (applicationId) => __async(
|
|
115
|
+
var getFavorites = (applicationId) => __async(null, null, function* () {
|
|
116
116
|
var _a, _b, _c;
|
|
117
117
|
const result = yield import_api_axios.avSettingsApi.getApplication(applicationId);
|
|
118
118
|
const unvalidatedFavorites = (_c = (_b = (_a = result == null ? void 0 : result.data) == null ? void 0 : _a.settings) == null ? void 0 : _b[0]) == null ? void 0 : _c.favorites;
|
|
@@ -198,7 +198,7 @@ var FavoritesProvider = ({
|
|
|
198
198
|
if (unsubscribe) unsubscribe();
|
|
199
199
|
};
|
|
200
200
|
}, [queryClient, applicationId]);
|
|
201
|
-
const deleteFavorite = (id) => __async(
|
|
201
|
+
const deleteFavorite = (id) => __async(null, null, function* () {
|
|
202
202
|
if (favorites) {
|
|
203
203
|
const response = yield submitFavorites({
|
|
204
204
|
favorites: favorites.filter((favorite) => favorite.id !== id),
|
|
@@ -208,7 +208,7 @@ var FavoritesProvider = ({
|
|
|
208
208
|
onFavoritesChange == null ? void 0 : onFavoritesChange(response.favorites);
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
|
-
const addFavorite = (id) => __async(
|
|
211
|
+
const addFavorite = (id) => __async(null, null, function* () {
|
|
212
212
|
if (!favorites) return false;
|
|
213
213
|
if (favorites.length >= maxFavorites) {
|
|
214
214
|
openMaxModal(applicationId);
|
package/dist/index.mjs
CHANGED
|
@@ -73,11 +73,11 @@ var validateFavorites = (unvalidatedFavorites) => {
|
|
|
73
73
|
const validatedFavorites = Array.isArray(unvalidatedFavorites) ? unvalidatedFavorites == null ? void 0 : unvalidatedFavorites.filter(isFavorite) : [];
|
|
74
74
|
return validatedFavorites;
|
|
75
75
|
};
|
|
76
|
-
var submit = (_0, _1) => __async(
|
|
76
|
+
var submit = (_0, _1) => __async(null, [_0, _1], function* ({ favorites, targetFavoriteId }, applicationId) {
|
|
77
77
|
const response = yield avSettingsApi.setApplication(applicationId, { favorites });
|
|
78
78
|
return { favorites: response.data.favorites, targetFavoriteId };
|
|
79
79
|
});
|
|
80
|
-
var getFavorites = (applicationId) => __async(
|
|
80
|
+
var getFavorites = (applicationId) => __async(null, null, function* () {
|
|
81
81
|
var _a, _b, _c;
|
|
82
82
|
const result = yield avSettingsApi.getApplication(applicationId);
|
|
83
83
|
const unvalidatedFavorites = (_c = (_b = (_a = result == null ? void 0 : result.data) == null ? void 0 : _a.settings) == null ? void 0 : _b[0]) == null ? void 0 : _c.favorites;
|
|
@@ -163,7 +163,7 @@ var FavoritesProvider = ({
|
|
|
163
163
|
if (unsubscribe) unsubscribe();
|
|
164
164
|
};
|
|
165
165
|
}, [queryClient, applicationId]);
|
|
166
|
-
const deleteFavorite = (id) => __async(
|
|
166
|
+
const deleteFavorite = (id) => __async(null, null, function* () {
|
|
167
167
|
if (favorites) {
|
|
168
168
|
const response = yield submitFavorites({
|
|
169
169
|
favorites: favorites.filter((favorite) => favorite.id !== id),
|
|
@@ -173,7 +173,7 @@ var FavoritesProvider = ({
|
|
|
173
173
|
onFavoritesChange == null ? void 0 : onFavoritesChange(response.favorites);
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
|
-
const addFavorite = (id) => __async(
|
|
176
|
+
const addFavorite = (id) => __async(null, null, function* () {
|
|
177
177
|
if (!favorites) return false;
|
|
178
178
|
if (favorites.length >= maxFavorites) {
|
|
179
179
|
openMaxModal(applicationId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-favorites",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Availity MUI Favorites Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@availity/api-axios": "^
|
|
44
|
-
"@availity/message-core": "^
|
|
43
|
+
"@availity/api-axios": "^11.0.0",
|
|
44
|
+
"@availity/message-core": "^8.0.0",
|
|
45
45
|
"@tanstack/react-query": "^4.36.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|