@apolitical/component-library 4.7.5-test.0 → 4.7.5
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/discussion/components/index.d.ts +1 -0
- package/discussion/components/profile-modal-launcher/index.d.ts +1 -0
- package/discussion/components/profile-modal-launcher/profile-modal-launcher.d.ts +7 -0
- package/discussion/components/profile-modal-launcher/profile-modal-launcher.mock.d.ts +24 -0
- package/discussion/feeds/activities-feed/activities-feed.d.ts +3 -0
- package/discussion/feeds/replies-feed/replies-feed.d.ts +4 -1
- package/discussion/sections/activity-section/activity-section.d.ts +4 -2
- package/enums/custom-events.d.ts +1 -0
- package/form/components/form/form.types.d.ts +1 -1
- package/form/types/profile-form/profile-form.mock.d.ts +19 -0
- package/helpers/index.d.ts +1 -0
- package/helpers/intl.d.ts +3 -0
- package/helpers/profile-is-complete/index.d.ts +1 -0
- package/helpers/profile-is-complete/profile-is-complete.d.ts +3 -0
- package/index.js +60 -60
- package/index.mjs +7113 -7045
- package/modals/types/profile-modal/index.d.ts +1 -0
- package/modals/types/profile-modal/profile-modal.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ProfileModalLauncher } from './profile-modal-launcher';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IProfileFormProps } from '../../../form';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** The `form` props for ProfileModal */
|
|
4
|
+
form: IProfileFormProps;
|
|
5
|
+
}
|
|
6
|
+
declare const ProfileModalLauncher: ({ form }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default ProfileModalLauncher;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
functions: {
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
};
|
|
5
|
+
form: {
|
|
6
|
+
hooks: {
|
|
7
|
+
useMaps: () => {
|
|
8
|
+
buildLocation: (input: string) => Promise<{
|
|
9
|
+
id: string;
|
|
10
|
+
en: string;
|
|
11
|
+
code: string;
|
|
12
|
+
}>;
|
|
13
|
+
isValidPlace: (input: string) => boolean;
|
|
14
|
+
predictPlaces: (input: string) => Promise<never[]>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
functions: {
|
|
18
|
+
uploadImage: () => Promise<void>;
|
|
19
|
+
onSuccess: () => Promise<void>;
|
|
20
|
+
onFailure: () => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type IProfileFormProps } from '../../../form';
|
|
2
3
|
import type { IMentionsFns } from '../../../discussion/discussion.d';
|
|
3
4
|
import type { IQueryFns } from './cache';
|
|
4
5
|
interface Props {
|
|
@@ -19,6 +20,8 @@ interface Props {
|
|
|
19
20
|
/** Function to leave the community */
|
|
20
21
|
leave: () => Promise<void>;
|
|
21
22
|
};
|
|
23
|
+
/** Props to pass into the profile form */
|
|
24
|
+
profile: IProfileFormProps;
|
|
22
25
|
}
|
|
23
26
|
declare const ActivitiesFeed: React.FC<Props>;
|
|
24
27
|
export default ActivitiesFeed;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type IProfileFormProps } from '../../../form';
|
|
2
3
|
import type { IMentionsFns } from './../../discussion';
|
|
3
|
-
import type
|
|
4
|
+
import { type IQueryFns } from './cache';
|
|
4
5
|
interface Props {
|
|
5
6
|
/** The base path, used for slugs */
|
|
6
7
|
basePath: string;
|
|
@@ -21,6 +22,8 @@ interface Props {
|
|
|
21
22
|
/** Function to leave the community */
|
|
22
23
|
leave: () => Promise<void>;
|
|
23
24
|
};
|
|
25
|
+
/** Props to pass into the profile form */
|
|
26
|
+
profile: IProfileFormProps;
|
|
24
27
|
}
|
|
25
28
|
declare const RepliesFeed: React.FC<Props>;
|
|
26
29
|
export default RepliesFeed;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type
|
|
2
|
+
import { type IProfileFormProps } from '../../../form';
|
|
3
|
+
import { type IRepliesFeedQueryFns } from '../../../discussion/feeds';
|
|
3
4
|
import type { IMentionsFns } from './../../discussion.d';
|
|
4
|
-
import type
|
|
5
|
+
import { type IQueryFns } from './cache';
|
|
5
6
|
interface IActivitySectionQueryFns extends IQueryFns {
|
|
6
7
|
remove: () => Promise<void>;
|
|
7
8
|
}
|
|
@@ -17,6 +18,7 @@ interface Props {
|
|
|
17
18
|
join: () => Promise<void>;
|
|
18
19
|
leave: () => Promise<void>;
|
|
19
20
|
};
|
|
21
|
+
profile: IProfileFormProps;
|
|
20
22
|
}
|
|
21
23
|
declare const ActivitySection: React.FC<Props>;
|
|
22
24
|
export default ActivitySection;
|
package/enums/custom-events.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface ILabel {
|
|
|
12
12
|
/** The ID of the input to be labelled */
|
|
13
13
|
htmlFor?: string;
|
|
14
14
|
}
|
|
15
|
-
export type FormActionTypes = 'addError' | 'formSubmitted' | 'formSubmittedAndReset' | 'removeError' | 'submitForm' | '
|
|
15
|
+
export type FormActionTypes = 'addError' | 'formSubmitted' | 'formSubmittedAndReset' | 'removeError' | 'submitForm' | 'updateValue';
|
|
16
16
|
export type FieldValidationConditions = boolean | 'no-numbers' | 'required' | 'valid-email' | 'valid-url' | 'custom-validation' | ((arg: IFormValues) => boolean);
|
|
17
17
|
export interface IFieldOption {
|
|
18
18
|
/** The ID of the option */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
hooks: {
|
|
3
|
+
useMaps: () => {
|
|
4
|
+
buildLocation: (input: string) => Promise<{
|
|
5
|
+
id: string;
|
|
6
|
+
en: string;
|
|
7
|
+
code: string;
|
|
8
|
+
}>;
|
|
9
|
+
isValidPlace: (input: string) => boolean;
|
|
10
|
+
predictPlaces: (input: string) => Promise<never[]>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
functions: {
|
|
14
|
+
uploadImage: () => Promise<void>;
|
|
15
|
+
onSuccess: () => Promise<void>;
|
|
16
|
+
onFailure: () => void;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
package/helpers/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './intl';
|
|
|
9
9
|
export * from './numbers';
|
|
10
10
|
export { default as passPropsToChildren } from './pass-props-to-children';
|
|
11
11
|
export * from './prerender';
|
|
12
|
+
export * from './profile-is-complete';
|
|
12
13
|
export { default as replaceMentionData } from './replace-mention-data';
|
|
13
14
|
export * from './urls';
|
|
14
15
|
export * from './validation';
|
package/helpers/intl.d.ts
CHANGED
|
@@ -166,6 +166,9 @@ export declare const checkIntlPathExists: (path: string, language?: {
|
|
|
166
166
|
discussion_thread_show: string;
|
|
167
167
|
discussion_thread_hide: string;
|
|
168
168
|
discussion_thread_loadMore: string;
|
|
169
|
+
profileModalLauncher_successMessage: string;
|
|
170
|
+
profileModalLauncher_title: string;
|
|
171
|
+
profileModalLauncher_text: string;
|
|
169
172
|
contactFooter_title: string;
|
|
170
173
|
contactFooter_text: string;
|
|
171
174
|
contactFooter_phone: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as profileIsComplete } from './profile-is-complete';
|