@headless-adminapp/app 1.4.25 → 1.4.38
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { View, ViewExperience } from '@headless-adminapp/core/experience/view';
|
|
2
|
+
export declare function useExperienceView(logicalName: string, viewId?: string, associated?: boolean, viewIds?: string[], view?: ViewExperience<any>): {
|
|
3
|
+
view: View<import("@headless-adminapp/core/schema").SchemaAttributes> | undefined;
|
|
3
4
|
isLoadingView: boolean;
|
|
4
5
|
};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useExperienceView = useExperienceView;
|
|
4
4
|
const react_query_1 = require("@tanstack/react-query");
|
|
5
5
|
const useExperienceStore_1 = require("./useExperienceStore");
|
|
6
|
-
function useExperienceView(logicalName, viewId, associated, viewIds) {
|
|
6
|
+
function useExperienceView(logicalName, viewId, associated, viewIds, view) {
|
|
7
7
|
const experienceStore = (0, useExperienceStore_1.useExperienceStore)();
|
|
8
8
|
const { data, isPending } = (0, react_query_1.useQuery)({
|
|
9
9
|
queryKey: [
|
|
@@ -12,8 +12,17 @@ function useExperienceView(logicalName, viewId, associated, viewIds) {
|
|
|
12
12
|
viewId,
|
|
13
13
|
associated,
|
|
14
14
|
viewIds,
|
|
15
|
+
view,
|
|
15
16
|
],
|
|
16
17
|
queryFn: async () => {
|
|
18
|
+
if (view) {
|
|
19
|
+
return {
|
|
20
|
+
id: '__custom-view__',
|
|
21
|
+
name: 'Custom View',
|
|
22
|
+
experience: view,
|
|
23
|
+
logicalName: logicalName,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
17
26
|
if (associated) {
|
|
18
27
|
return experienceStore.getAssociatedView(logicalName, viewId, viewIds);
|
|
19
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@headless-adminapp/app",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.38",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"uuid": "11.0.3",
|
|
39
39
|
"yup": "^1.4.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "f94f402ec1cbba0d94b6122d48dce471eba433e1"
|
|
42
42
|
}
|