@prismicio/editor-fields 0.4.59 → 0.4.61
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/dist/EditorConfig.d.ts +0 -1
- package/dist/core/MediaLibrary/MediaLibrary.d.ts +4 -3
- package/dist/core/MediaLibrary/components/MediaLibraryActions.d.ts +2 -2
- package/dist/core/MediaLibrary/components/MediaLibraryContext.d.ts +7 -5
- package/dist/core/MediaLibrary/components/MediaLibrarySkeleton.d.ts +2 -2
- package/dist/core/service/customType.d.ts +1906 -8
- package/dist/core/service/document.d.ts +204 -4
- package/dist/core/service/documentSearch.d.ts +16 -4
- package/dist/core/service/role.d.ts +2 -2
- package/dist/fields/LinkField/Documents/documentsData.d.ts +6 -0
- package/dist/fields/LinkField/LinkFieldActions.d.ts +3 -0
- package/dist/fields/LinkField/RepeatableLinkField/useRepeatableLinkField.d.ts +6 -0
- package/dist/fields/LinkField/useLinkField.d.ts +3 -0
- package/dist/index.cjs.js +50 -50
- package/dist/index.es.js +11022 -10951
- package/dist/slices/utils.d.ts +12 -0
- package/package.json +5 -5
|
@@ -16,7 +16,6 @@ interface SearchDocumentsArgs {
|
|
|
16
16
|
* TODO: Remove after all repos have been migrated to storageVerison 7 or above (PBD-1908)
|
|
17
17
|
*/
|
|
18
18
|
storageVersion?: Repository["storageVersion"];
|
|
19
|
-
searchDocumentsWithInterestingVersions: boolean;
|
|
20
19
|
track: ((args: {
|
|
21
20
|
numberOfResults: number;
|
|
22
21
|
searchQuery: string;
|
|
@@ -86,6 +85,9 @@ export declare function searchDocuments(args: SearchDocumentsArgs): Promise<{
|
|
|
86
85
|
custom_type_id?: string | undefined;
|
|
87
86
|
summary?: string | undefined;
|
|
88
87
|
author_ids?: string[] | undefined;
|
|
88
|
+
highlights?: {
|
|
89
|
+
uid?: string | undefined;
|
|
90
|
+
} | undefined;
|
|
89
91
|
})[];
|
|
90
92
|
}[];
|
|
91
93
|
}>;
|
|
@@ -169,6 +171,9 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
169
171
|
custom_type_id?: string | undefined;
|
|
170
172
|
summary?: string | undefined;
|
|
171
173
|
author_ids?: string[] | undefined;
|
|
174
|
+
highlights?: {
|
|
175
|
+
uid?: string | undefined;
|
|
176
|
+
} | undefined;
|
|
172
177
|
})[];
|
|
173
178
|
}[];
|
|
174
179
|
}, Error, {
|
|
@@ -232,6 +237,9 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
232
237
|
custom_type_id?: string | undefined;
|
|
233
238
|
summary?: string | undefined;
|
|
234
239
|
author_ids?: string[] | undefined;
|
|
240
|
+
highlights?: {
|
|
241
|
+
uid?: string | undefined;
|
|
242
|
+
} | undefined;
|
|
235
243
|
})[];
|
|
236
244
|
}[];
|
|
237
245
|
}, readonly ["searchDocuments", {
|
|
@@ -245,7 +253,6 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
245
253
|
readonly authors: string[] | undefined;
|
|
246
254
|
readonly status: ("unclassified" | "published" | "release" | "archived")[] | undefined;
|
|
247
255
|
readonly locale: string | undefined;
|
|
248
|
-
readonly searchDocumentsWithInterestingVersions: boolean;
|
|
249
256
|
readonly track: ((args: {
|
|
250
257
|
numberOfResults: number;
|
|
251
258
|
searchQuery: string;
|
|
@@ -318,6 +325,9 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
318
325
|
custom_type_id?: string | undefined;
|
|
319
326
|
summary?: string | undefined;
|
|
320
327
|
author_ids?: string[] | undefined;
|
|
328
|
+
highlights?: {
|
|
329
|
+
uid?: string | undefined;
|
|
330
|
+
} | undefined;
|
|
321
331
|
})[];
|
|
322
332
|
}[];
|
|
323
333
|
}> | undefined;
|
|
@@ -333,7 +343,6 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
333
343
|
readonly authors: string[] | undefined;
|
|
334
344
|
readonly status: ("unclassified" | "published" | "release" | "archived")[] | undefined;
|
|
335
345
|
readonly locale: string | undefined;
|
|
336
|
-
readonly searchDocumentsWithInterestingVersions: boolean;
|
|
337
346
|
readonly track: ((args: {
|
|
338
347
|
numberOfResults: number;
|
|
339
348
|
searchQuery: string;
|
|
@@ -405,11 +414,14 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
405
414
|
custom_type_id?: string | undefined;
|
|
406
415
|
summary?: string | undefined;
|
|
407
416
|
author_ids?: string[] | undefined;
|
|
417
|
+
highlights?: {
|
|
418
|
+
uid?: string | undefined;
|
|
419
|
+
} | undefined;
|
|
408
420
|
})[];
|
|
409
421
|
}[];
|
|
410
422
|
}>;
|
|
411
423
|
};
|
|
412
424
|
type SearchDocumentsConfig = Pick<EditorConfig & {
|
|
413
425
|
searchDocuments: true;
|
|
414
|
-
}, "authStrategy" | "coreApiBaseUrl" | "documentSearchBaseUrl" | "repository" | "searchDocuments"
|
|
426
|
+
}, "authStrategy" | "coreApiBaseUrl" | "documentSearchBaseUrl" | "repository" | "searchDocuments">;
|
|
415
427
|
export {};
|
|
@@ -102,7 +102,7 @@ export declare function getTeamSpacesOptions(args: GetTeamSpacesArgs): import("@
|
|
|
102
102
|
customTypes: string[];
|
|
103
103
|
rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
|
|
104
104
|
rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
|
|
105
|
-
}[], string[]> & {
|
|
105
|
+
}[], (string | GetTeamSpacesArgs)[]> & {
|
|
106
106
|
initialData?: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").L<{
|
|
107
107
|
results: {
|
|
108
108
|
name: string;
|
|
@@ -113,7 +113,7 @@ export declare function getTeamSpacesOptions(args: GetTeamSpacesArgs): import("@
|
|
|
113
113
|
}[];
|
|
114
114
|
}> | undefined;
|
|
115
115
|
} & {
|
|
116
|
-
queryKey: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").E<string[], {
|
|
116
|
+
queryKey: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").E<(string | GetTeamSpacesArgs)[], {
|
|
117
117
|
results: {
|
|
118
118
|
name: string;
|
|
119
119
|
id: string;
|
|
@@ -47,6 +47,9 @@ export declare function useDocuments(params: {
|
|
|
47
47
|
custom_type_id?: string | undefined;
|
|
48
48
|
summary?: string | undefined;
|
|
49
49
|
author_ids?: string[] | undefined;
|
|
50
|
+
highlights?: {
|
|
51
|
+
uid?: string | undefined;
|
|
52
|
+
} | undefined;
|
|
50
53
|
}))[];
|
|
51
54
|
id: string;
|
|
52
55
|
title: string;
|
|
@@ -99,6 +102,9 @@ export declare function useDocuments(params: {
|
|
|
99
102
|
custom_type_id?: string | undefined;
|
|
100
103
|
summary?: string | undefined;
|
|
101
104
|
author_ids?: string[] | undefined;
|
|
105
|
+
highlights?: {
|
|
106
|
+
uid?: string | undefined;
|
|
107
|
+
} | undefined;
|
|
102
108
|
}))[];
|
|
103
109
|
id: string;
|
|
104
110
|
title: string;
|
|
@@ -12,6 +12,9 @@ interface Props {
|
|
|
12
12
|
condensedButtons?: boolean;
|
|
13
13
|
showNewTabButton?: boolean;
|
|
14
14
|
displayTextEnabled: boolean;
|
|
15
|
+
variants: string[];
|
|
16
|
+
variant?: string;
|
|
17
|
+
onVariantChange: (newVariant: string) => void;
|
|
15
18
|
}
|
|
16
19
|
export declare function LinkFieldActions(props: Props): JSX.Element;
|
|
17
20
|
export {};
|
|
@@ -26,6 +26,7 @@ export declare function useRepeatableLinkField(props: UseRepeatableLinkFieldProp
|
|
|
26
26
|
kind: "image";
|
|
27
27
|
}) & {
|
|
28
28
|
text?: string | undefined;
|
|
29
|
+
variant?: string | undefined;
|
|
29
30
|
})) | ({
|
|
30
31
|
__TYPE__: "FileLink";
|
|
31
32
|
} & ((({
|
|
@@ -40,6 +41,7 @@ export declare function useRepeatableLinkField(props: UseRepeatableLinkFieldProp
|
|
|
40
41
|
kind: "file";
|
|
41
42
|
}) & {
|
|
42
43
|
text?: string | undefined;
|
|
44
|
+
variant?: string | undefined;
|
|
43
45
|
})) | ({
|
|
44
46
|
__TYPE__: "DocumentLink";
|
|
45
47
|
} & (({
|
|
@@ -48,6 +50,7 @@ export declare function useRepeatableLinkField(props: UseRepeatableLinkFieldProp
|
|
|
48
50
|
kind: "document";
|
|
49
51
|
}) & {
|
|
50
52
|
text?: string | undefined;
|
|
53
|
+
variant?: string | undefined;
|
|
51
54
|
})) | ({
|
|
52
55
|
__TYPE__: "ExternalLink";
|
|
53
56
|
} & ((({
|
|
@@ -62,18 +65,21 @@ export declare function useRepeatableLinkField(props: UseRepeatableLinkFieldProp
|
|
|
62
65
|
kind: "web";
|
|
63
66
|
}) & {
|
|
64
67
|
text?: string | undefined;
|
|
68
|
+
variant?: string | undefined;
|
|
65
69
|
})) | ({
|
|
66
70
|
__TYPE__: "MediaLink";
|
|
67
71
|
} & {
|
|
68
72
|
kind: "media";
|
|
69
73
|
} & {
|
|
70
74
|
text?: string | undefined;
|
|
75
|
+
variant?: string | undefined;
|
|
71
76
|
}) | ({
|
|
72
77
|
__TYPE__: "AnyLink";
|
|
73
78
|
} & {
|
|
74
79
|
kind: "any";
|
|
75
80
|
} & {
|
|
76
81
|
text?: string | undefined;
|
|
82
|
+
variant?: string | undefined;
|
|
77
83
|
});
|
|
78
84
|
})[];
|
|
79
85
|
updateLink: (linkContent: LinkContent | undefined, index: number) => void;
|
|
@@ -27,6 +27,9 @@ export declare function useLinkField(params: useLinkFieldParams): {
|
|
|
27
27
|
onMediaSelected: (newMedia: MediaAssetOrExternalImage) => void;
|
|
28
28
|
displayTextEnabled: boolean;
|
|
29
29
|
displayText: string;
|
|
30
|
+
variants: string[];
|
|
31
|
+
variant: string | undefined;
|
|
32
|
+
onVariantChange: (newVariant: string) => void;
|
|
30
33
|
};
|
|
31
34
|
export declare function useDocumentTitle(id: string): string;
|
|
32
35
|
interface MapMediaToLinkContentArgs {
|