@apolitical/component-library 8.3.18-re.4 → 8.3.19
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/publish-article-form.d.ts +1 -1
- package/form/types/publish-article-form/publish-article-form.types.d.ts +6 -0
- package/helpers/intl.d.ts +5 -0
- package/index.js +48 -48
- package/index.mjs +2114 -2090
- package/navigation/action-bar/action-bar.d.ts +5 -0
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type IPublishArticleFormProps } from './publish-article-form.types';
|
|
2
|
-
declare const PublishArticleForm: ({ id, values, setShowImagePicker, functions, meta, gtm, }: IPublishArticleFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const PublishArticleForm: ({ id, values, setShowImagePicker, functions, meta, gtm, isEditMode, }: IPublishArticleFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default PublishArticleForm;
|
|
@@ -44,6 +44,8 @@ export interface IPublishArticleFormProps {
|
|
|
44
44
|
tags?: ArticleTags[];
|
|
45
45
|
/** The cover image */
|
|
46
46
|
coverImage?: ICoverImage;
|
|
47
|
+
/** The slug of the article */
|
|
48
|
+
slug?: string;
|
|
47
49
|
};
|
|
48
50
|
/** The functions to handle the form */
|
|
49
51
|
functions?: {
|
|
@@ -53,6 +55,8 @@ export interface IPublishArticleFormProps {
|
|
|
53
55
|
onSuccess?: (args: IPublishArticleFormValues) => void;
|
|
54
56
|
/** A function to call when there's an error with the form */
|
|
55
57
|
onFailure?: () => void;
|
|
58
|
+
/** The function to edit the article */
|
|
59
|
+
edit?: (args: IPublishArticleFormValues) => Promise<void>;
|
|
56
60
|
};
|
|
57
61
|
/** Toggle the image picker */
|
|
58
62
|
setShowImagePicker: (showImagePicker: boolean) => void;
|
|
@@ -68,4 +72,6 @@ export interface IPublishArticleFormProps {
|
|
|
68
72
|
/** The event for GTM */
|
|
69
73
|
event?: string;
|
|
70
74
|
};
|
|
75
|
+
/** Whether the form is used to edit an article */
|
|
76
|
+
isEditMode?: boolean;
|
|
71
77
|
}
|
package/helpers/intl.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
113
113
|
markCompleteButton_completed: string;
|
|
114
114
|
discussion_action_answer: string;
|
|
115
115
|
discussion_action_comment: string;
|
|
116
|
+
discussion_action_edit: string;
|
|
116
117
|
discussion_action_poll: string;
|
|
117
118
|
discussion_action_post: string;
|
|
118
119
|
discussion_action_response: string;
|
|
@@ -312,9 +313,13 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
312
313
|
publishArticleForm_tags_error_required: string;
|
|
313
314
|
publishArticleForm_disclaimer: string;
|
|
314
315
|
publishArticleForm_cta_submit: string;
|
|
316
|
+
publishArticleForm_cta_submit_edit: string;
|
|
315
317
|
publishArticleForm_cta_submitting: string;
|
|
318
|
+
publishArticleForm_cta_submitting_edit: string;
|
|
316
319
|
publishArticleForm_cta_submitted: string;
|
|
320
|
+
publishArticleForm_cta_submitted_edit: string;
|
|
317
321
|
publishArticleForm_aria_success: string;
|
|
322
|
+
publishArticleForm_aria_success_edit: string;
|
|
318
323
|
publishArticleForm_error: string;
|
|
319
324
|
publishArticleForm_error_underMinLength: string;
|
|
320
325
|
publishArticleForm_error_loggedOut: string;
|