@scm-manager/ui-api 2.40.2-20230002-084229 → 2.40.2-SNAPSHOT
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/build/index.d.ts +1 -1
- package/build/index.js +3 -3
- package/build/index.mjs +3 -3
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -636,7 +636,7 @@ declare const useConfigLink: <C extends HalRepresentation>(link: string) => {
|
|
|
636
636
|
isReadOnly: boolean;
|
|
637
637
|
error: Error | null;
|
|
638
638
|
initialConfiguration: C | undefined;
|
|
639
|
-
update: (configuration: C) =>
|
|
639
|
+
update: (configuration: C) => Promise<Response> | undefined;
|
|
640
640
|
isUpdated: boolean;
|
|
641
641
|
};
|
|
642
642
|
|
package/build/index.js
CHANGED
|
@@ -2597,7 +2597,7 @@ var useConfigLink = (link) => {
|
|
|
2597
2597
|
const {
|
|
2598
2598
|
isLoading: isUpdating,
|
|
2599
2599
|
error: mutationError,
|
|
2600
|
-
|
|
2600
|
+
mutateAsync,
|
|
2601
2601
|
data: updateResponse
|
|
2602
2602
|
} = (0, import_react_query22.useMutation)(
|
|
2603
2603
|
(vars) => apiClient.put(vars.link, vars.configuration, vars.contentType),
|
|
@@ -2611,14 +2611,14 @@ var useConfigLink = (link) => {
|
|
|
2611
2611
|
const update = (0, import_react7.useCallback)(
|
|
2612
2612
|
(configuration) => {
|
|
2613
2613
|
if (data && !isReadOnly) {
|
|
2614
|
-
|
|
2614
|
+
return mutateAsync({
|
|
2615
2615
|
configuration,
|
|
2616
2616
|
contentType: data.contentType,
|
|
2617
2617
|
link: data.configuration._links.update.href
|
|
2618
2618
|
});
|
|
2619
2619
|
}
|
|
2620
2620
|
},
|
|
2621
|
-
[
|
|
2621
|
+
[mutateAsync, data, isReadOnly]
|
|
2622
2622
|
);
|
|
2623
2623
|
return {
|
|
2624
2624
|
isLoading,
|
package/build/index.mjs
CHANGED
|
@@ -2416,7 +2416,7 @@ var useConfigLink = (link) => {
|
|
|
2416
2416
|
const {
|
|
2417
2417
|
isLoading: isUpdating,
|
|
2418
2418
|
error: mutationError,
|
|
2419
|
-
|
|
2419
|
+
mutateAsync,
|
|
2420
2420
|
data: updateResponse
|
|
2421
2421
|
} = useMutation13(
|
|
2422
2422
|
(vars) => apiClient.put(vars.link, vars.configuration, vars.contentType),
|
|
@@ -2430,14 +2430,14 @@ var useConfigLink = (link) => {
|
|
|
2430
2430
|
const update = useCallback3(
|
|
2431
2431
|
(configuration) => {
|
|
2432
2432
|
if (data && !isReadOnly) {
|
|
2433
|
-
|
|
2433
|
+
return mutateAsync({
|
|
2434
2434
|
configuration,
|
|
2435
2435
|
contentType: data.contentType,
|
|
2436
2436
|
link: data.configuration._links.update.href
|
|
2437
2437
|
});
|
|
2438
2438
|
}
|
|
2439
2439
|
},
|
|
2440
|
-
[
|
|
2440
|
+
[mutateAsync, data, isReadOnly]
|
|
2441
2441
|
);
|
|
2442
2442
|
return {
|
|
2443
2443
|
isLoading,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scm-manager/ui-api",
|
|
3
|
-
"version": "2.40.2-
|
|
3
|
+
"version": "2.40.2-SNAPSHOT",
|
|
4
4
|
"description": "React hook api for the SCM-Manager backend",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"module": "build/index.mjs",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"tsup": "^5.12.6"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@scm-manager/ui-types": "2.40.2-
|
|
32
|
+
"@scm-manager/ui-types": "2.40.2-SNAPSHOT",
|
|
33
33
|
"fetch-mock-jest": "^1.5.1",
|
|
34
34
|
"gitdiff-parser": "^0.2.2",
|
|
35
35
|
"query-string": "6.14.1",
|