wacomm 3.0.3 → 3.2.0

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.
@@ -6,3 +6,4 @@ type Story = StoryObj<typeof meta>;
6
6
  export declare const Empty: Story;
7
7
  export declare const WithLinks: Story;
8
8
  export declare const AllTypes: Story;
9
+ export declare const DropsTheSchemeFromTheText: Story;
@@ -8,4 +8,4 @@ export { default as SocialMediaEditor } from '../SocialMediaEditor';
8
8
  export { default as SocialMediaLinks } from '../SocialMediaLinks';
9
9
  export { default as DeletableSocialMediaLinks } from '../DeletableSocialMediaLinks';
10
10
  export type { SocialMediaType } from './util';
11
- export { getSocialMediaLabel, SOCIAL_MEDIA_TYPES } from './util';
11
+ export { getSocialMediaLabel, getSocialMediaLinkError, getSocialMediaDisplayLink, isLinkableSocialMediaLink, isValidSocialMediaLink, SOCIAL_MEDIA_TYPES } from './util';
@@ -1,6 +1,9 @@
1
1
  import { ElementType } from 'react';
2
- export type SocialMediaType = 'none' | 'facebook' | 'linkedIn' | 'instagram' | 'x' | 'tikTok' | 'youTube' | 'snapchat' | 'pinterest' | 'telegram' | 'reddit' | 'other';
2
+ export type SocialMediaType = 'none' | 'facebook' | 'linkedIn' | 'instagram' | 'x' | 'tikTok' | 'youTube' | 'snapchat' | 'pinterest' | 'telegram' | 'reddit' | 'slack' | 'discord' | 'weChat' | 'line' | 'other';
3
3
  export declare const SOCIAL_MEDIA_TYPES: SocialMediaType[];
4
4
  export declare function getSocialMediaLabel(socialMediaType: SocialMediaType): string;
5
5
  export declare function isValidSocialMediaLink(socialMediaType: SocialMediaType, link: string): boolean;
6
+ export declare function getSocialMediaLinkError(socialMediaType: SocialMediaType, link: string): string;
7
+ export declare function isLinkableSocialMediaLink(link: string): boolean;
8
+ export declare function getSocialMediaDisplayLink(link: string): string;
6
9
  export declare function getSocialMediaSvg(socialMediaType: SocialMediaType): ElementType | null;
@@ -2,9 +2,8 @@ import { SocialMediaLinkProps } from '../common/SocialMediaLink';
2
2
  interface SocialMediaEditorModalContentProps {
3
3
  links: SocialMediaLinkProps[];
4
4
  onSave: (links: SocialMediaLinkProps[]) => void;
5
- onCancel: () => void;
6
5
  error?: string;
7
6
  disabled?: boolean;
8
7
  }
9
- declare function SocialMediaEditorModalContent({ links, onSave, onCancel, error, disabled }: SocialMediaEditorModalContentProps): import("react").JSX.Element;
8
+ declare function SocialMediaEditorModalContent({ links, onSave, error, disabled }: SocialMediaEditorModalContentProps): import("react").JSX.Element;
10
9
  export default SocialMediaEditorModalContent;
@@ -1,8 +1,10 @@
1
+ import { SocialMediaLinkProps } from '../common/SocialMediaLink';
1
2
  import { SocialMediaType } from '../common/util';
2
3
  interface SocialMediaLinkInputProps {
3
4
  onAdd: (socialMediaType: SocialMediaType, link: string) => void;
5
+ existingLinks?: SocialMediaLinkProps[];
4
6
  className?: string;
5
7
  disabled?: boolean;
6
8
  }
7
- declare function SocialMediaLinkInput({ onAdd, className, disabled }: SocialMediaLinkInputProps): import("react").JSX.Element;
9
+ declare function SocialMediaLinkInput({ onAdd, existingLinks, className, disabled }: SocialMediaLinkInputProps): import("react").JSX.Element;
8
10
  export default SocialMediaLinkInput;
@@ -5,5 +5,7 @@ export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
7
  export declare const Disabled: Story;
8
+ export declare const RejectsAMismatchedLink: Story;
9
+ export declare const RejectsADuplicate: Story;
8
10
  export declare const Mobile: Story;
9
11
  export declare const Desktop: Story;