@apolitical/component-library 6.6.23 → 6.6.25
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/form/types/publish-article-form/components/cover-image-preview/cover-image-preview.d.ts +15 -0
- package/form/types/publish-article-form/components/cover-image-preview/index.d.ts +1 -0
- package/form/types/publish-article-form/components/index.d.ts +1 -0
- package/form/types/publish-article-form/publish-article-form.d.ts +1 -1
- package/form/types/publish-article-form/publish-article-form.types.d.ts +15 -0
- package/helpers/intl.d.ts +3 -0
- package/index.js +38 -38
- package/index.mjs +3564 -3506
- package/package.json +1 -1
- package/style.css +1 -1
package/form/types/publish-article-form/components/cover-image-preview/cover-image-preview.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
coverImage?: {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
url: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
color?: string;
|
|
9
|
+
authorName: string;
|
|
10
|
+
authorLink: string;
|
|
11
|
+
};
|
|
12
|
+
setShowImagePicker: (showImagePicker: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
export default function CoverImagePreview({ coverImage, setShowImagePicker }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CoverImagePreview } from './cover-image-preview';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type IPublishArticleFormProps } from './publish-article-form.types';
|
|
2
|
-
declare const PublishArticleForm: ({ id, values, functions, meta, gtm, }: IPublishArticleFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const PublishArticleForm: ({ id, values, setShowImagePicker, functions, meta, gtm, }: IPublishArticleFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default PublishArticleForm;
|
|
@@ -12,11 +12,22 @@ export declare enum ArticleTags {
|
|
|
12
12
|
TransportAndInfrastructure = "topic_TransportAndInfrastructure",
|
|
13
13
|
WorkingAndTheEconomy = "topic_WorkAndTheEconomy"
|
|
14
14
|
}
|
|
15
|
+
export interface ICoverImage {
|
|
16
|
+
title?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
url: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
color?: string;
|
|
22
|
+
authorName: string;
|
|
23
|
+
authorLink: string;
|
|
24
|
+
}
|
|
15
25
|
export interface IPublishArticleFormValues {
|
|
16
26
|
title: string;
|
|
17
27
|
subtitle: string;
|
|
18
28
|
body: string;
|
|
19
29
|
tags: ArticleTags[];
|
|
30
|
+
coverImage: ICoverImage;
|
|
20
31
|
}
|
|
21
32
|
export interface IPublishArticleFormProps {
|
|
22
33
|
/** A unique ID for the form */
|
|
@@ -31,6 +42,8 @@ export interface IPublishArticleFormProps {
|
|
|
31
42
|
body?: string;
|
|
32
43
|
/** The tags of the form */
|
|
33
44
|
tags?: ArticleTags[];
|
|
45
|
+
/** The cover image */
|
|
46
|
+
coverImage?: ICoverImage;
|
|
34
47
|
};
|
|
35
48
|
/** The functions to handle the form */
|
|
36
49
|
functions?: {
|
|
@@ -41,6 +54,8 @@ export interface IPublishArticleFormProps {
|
|
|
41
54
|
/** A function to call when there's an error with the form */
|
|
42
55
|
onFailure?: () => void;
|
|
43
56
|
};
|
|
57
|
+
/** Toggle the image picker */
|
|
58
|
+
setShowImagePicker: (showImagePicker: boolean) => void;
|
|
44
59
|
/** Metadata about the form */
|
|
45
60
|
meta?: {
|
|
46
61
|
/** Whether the form is rendered in an overlay */
|
package/helpers/intl.d.ts
CHANGED
|
@@ -295,6 +295,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
295
295
|
publishArticleForm_body_label: string;
|
|
296
296
|
publishArticleForm_body_placeholder: string;
|
|
297
297
|
publishArticleForm_tags_label: string;
|
|
298
|
+
publishArticleForm_cover_image_label: string;
|
|
298
299
|
publishArticleForm__tags_topic_CitiesAndLocalGovernment: string;
|
|
299
300
|
publishArticleForm__tags_topic_Climate: string;
|
|
300
301
|
publishArticleForm__tags_topic_DigitalAndData: string;
|
|
@@ -318,6 +319,8 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
318
319
|
publishArticleForm_error_underMinLength: string;
|
|
319
320
|
publishArticleForm_error_loggedOut: string;
|
|
320
321
|
publishArticleForm_progressBar: string;
|
|
322
|
+
publishArticleForm_selectImage_button: string;
|
|
323
|
+
publishArticleForm_replaceImage_button: string;
|
|
321
324
|
ratings_text: string;
|
|
322
325
|
ratings_stars: string;
|
|
323
326
|
ratings_low: string;
|