@prismicio/editor-fields 0.4.9 → 0.4.10
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 +1 -0
- package/dist/fields/LinkField/Documents/Filters.d.ts +28 -0
- package/dist/fields/LinkField/Documents/documentsData.d.ts +8 -2
- package/dist/fields/LinkField/Documents/filterData.d.ts +4 -2
- package/dist/fields/LinkField/Documents/useFilters.d.ts +15 -0
- package/dist/fields/RichTextField/BubbleMenu/Link/LinkItems.d.ts +2 -0
- package/dist/fields/RichTextField/BubbleMenu/Link/LinkPopover.d.ts +7 -0
- package/dist/fields/RichTextField/BubbleMenu/Link/SetLinkModal.d.ts +2 -3
- package/dist/index.es.js +16672 -16432
- package/package.json +3 -3
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare type SearchDocuments = {
|
|
|
19
19
|
customTypesApiUrl: string;
|
|
20
20
|
repository: string;
|
|
21
21
|
status: "published" | "release" | "archived" | "unclassified";
|
|
22
|
+
localeId?: string;
|
|
22
23
|
};
|
|
23
24
|
export declare type Env = "dev" | "stage" | "prod";
|
|
24
25
|
export declare const EditorConfigContext: import("react").Context<EditorConfig | undefined>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FilterOption } from "@prismicio/editor-ui";
|
|
2
|
+
interface DocumentsListFiltersProps {
|
|
3
|
+
filteredLocales: Set<FilterOption>;
|
|
4
|
+
setFilteredLocales: (newValue: Set<FilterOption>) => void;
|
|
5
|
+
filteredTags: Set<FilterOption>;
|
|
6
|
+
setFilteredTags: (newValue: Set<FilterOption>) => void;
|
|
7
|
+
filteredCustomTypes: Set<FilterOption>;
|
|
8
|
+
setFilteredCustomTypes: (newValue: Set<FilterOption>) => void;
|
|
9
|
+
fixedCustomTypes?: Set<string>;
|
|
10
|
+
fixedTags?: Set<string>;
|
|
11
|
+
}
|
|
12
|
+
export declare function DocumentsListFilters(props: DocumentsListFiltersProps): JSX.Element;
|
|
13
|
+
interface FilterProps {
|
|
14
|
+
onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
|
|
15
|
+
fixedSelectedValues?: Set<FilterOption>;
|
|
16
|
+
selectedValues: Set<FilterOption>;
|
|
17
|
+
label: string;
|
|
18
|
+
icon: "label" | "description" | "public";
|
|
19
|
+
fetchFilters: () => Set<FilterOption>;
|
|
20
|
+
multiple?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function Filter(props: FilterProps): JSX.Element;
|
|
23
|
+
interface LocalesFilterProps {
|
|
24
|
+
selectedValues: Set<FilterOption>;
|
|
25
|
+
onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare function LocalesFilter(props: LocalesFilterProps): JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { FilterOption } from "@prismicio/editor-ui";
|
|
1
2
|
export declare function useDocuments(params: {
|
|
2
3
|
searchTerm: string;
|
|
3
|
-
tagsFilter:
|
|
4
|
-
typesFilter:
|
|
4
|
+
tagsFilter: Set<FilterOption>;
|
|
5
|
+
typesFilter: Set<FilterOption>;
|
|
6
|
+
localesFilter: Set<FilterOption>;
|
|
5
7
|
}): {
|
|
6
8
|
documents: {
|
|
7
9
|
id: string;
|
|
@@ -23,6 +25,8 @@ export declare function useDocuments(params: {
|
|
|
23
25
|
preview_summary?: string | undefined;
|
|
24
26
|
preview_image?: string | undefined;
|
|
25
27
|
})[];
|
|
28
|
+
locale: string;
|
|
29
|
+
group_lang_id: string;
|
|
26
30
|
}[];
|
|
27
31
|
onHasReachedBottom: () => void;
|
|
28
32
|
response: {
|
|
@@ -47,6 +51,8 @@ export declare function useDocuments(params: {
|
|
|
47
51
|
preview_summary?: string | undefined;
|
|
48
52
|
preview_image?: string | undefined;
|
|
49
53
|
})[];
|
|
54
|
+
locale: string;
|
|
55
|
+
group_lang_id: string;
|
|
50
56
|
}[];
|
|
51
57
|
cursor?: string | undefined;
|
|
52
58
|
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
1
|
+
import type { FilterOption } from "@prismicio/editor-ui";
|
|
2
|
+
export declare function useRepositoryLocales(): Set<FilterOption>;
|
|
3
|
+
export declare function useRepositoryTags(): Set<FilterOption>;
|
|
4
|
+
export declare function useRepositoryTypes(): Set<FilterOption>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FilterOption } from "@prismicio/editor-ui";
|
|
2
|
+
export declare function useFilters(fixedCustomTypes?: Set<string>, fixedTags?: Set<string>): {
|
|
3
|
+
searchTerm: string;
|
|
4
|
+
setSearchTerm: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
5
|
+
debouncedSearchTerm: string;
|
|
6
|
+
filteredTags: Set<FilterOption>;
|
|
7
|
+
setFilteredTags: import("react").Dispatch<import("react").SetStateAction<Set<FilterOption>>>;
|
|
8
|
+
filteredCustomTypes: Set<FilterOption>;
|
|
9
|
+
setFilteredCustomTypes: import("react").Dispatch<import("react").SetStateAction<Set<FilterOption>>>;
|
|
10
|
+
filteredLocales: Set<FilterOption>;
|
|
11
|
+
setFilteredLocales: import("react").Dispatch<import("react").SetStateAction<Set<FilterOption>>>;
|
|
12
|
+
typesFilter: Set<FilterOption>;
|
|
13
|
+
tagsFilter: Set<FilterOption>;
|
|
14
|
+
};
|
|
15
|
+
export declare function transformFixedFilters(filters?: Set<string>): Set<FilterOption>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Editor } from "@tiptap/core";
|
|
2
|
+
import type { MutableRefObject } from "react";
|
|
2
3
|
interface LinkItemsProps {
|
|
3
4
|
editor: Editor;
|
|
4
5
|
setDisplayLinkModal: (open: boolean) => void;
|
|
6
|
+
bubbleMenuContainerRef?: MutableRefObject<null>;
|
|
5
7
|
}
|
|
6
8
|
export declare function LinkItems(props: LinkItemsProps): JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import type { Editor } from "@tiptap/core";
|
|
1
2
|
interface SetLinkModalProps {
|
|
2
3
|
open: boolean;
|
|
3
4
|
setOpen: (open: boolean) => void;
|
|
4
|
-
|
|
5
|
-
openInNewTab: boolean;
|
|
6
|
-
setOpenInNewTab: (openInNewTab: boolean) => void;
|
|
5
|
+
editor: Editor;
|
|
7
6
|
}
|
|
8
7
|
export declare function SetLinkModal(props: SetLinkModalProps): JSX.Element;
|
|
9
8
|
export {};
|