@gouvfr-lasuite/ui-kit 0.8.2 → 0.10.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.
package/dist/index.d.ts CHANGED
@@ -692,7 +692,7 @@ export declare type ShareMemberItemProps<UserType, AccessType> = {
692
692
  roleTopMessage?: string;
693
693
  };
694
694
 
695
- export declare const ShareModal: <UserType, InvitationType, AccessType>({ searchUsersResult, children, outsideSearchContent, accesses: members, invitations, hasNextMembers, canUpdate, hasNextInvitations, ...props }: PropsWithChildren<ShareModalProps<UserType, InvitationType, AccessType>>) => JSX.Element;
695
+ export declare const ShareModal: <UserType, InvitationType, AccessType>({ searchUsersResult, children, outsideSearchContent, accesses: members, invitations, hasNextMembers, canUpdate, canView, hasNextInvitations, hideInvitations, hideMembers, cannotViewChildren, ...props }: PropsWithChildren<ShareModalProps<UserType, InvitationType, AccessType>>) => JSX.Element;
696
696
 
697
697
  declare type ShareModalAccessProps<UserType, AccessType> = {
698
698
  accesses?: AccessData<UserType, AccessType>[];
@@ -719,6 +719,17 @@ declare type ShareModalInvitationProps<UserType, InvitationType> = {
719
719
  invitationRoleTopMessage?: (invitation: InvitationData<UserType, InvitationType>) => string;
720
720
  };
721
721
 
722
+ declare type ShareModalLinkSettingsProps = {
723
+ linkSettings?: boolean;
724
+ linkReachChoices?: Partial<DropdownMenuOption>[];
725
+ onUpdateLinkReach?: (value: string) => void;
726
+ linkReach?: string;
727
+ linkRoleChoices?: Partial<DropdownMenuOption>[];
728
+ linkRole?: "reader" | "editor";
729
+ showLinkRole?: boolean;
730
+ onUpdateLinkRole?: (value: string) => void;
731
+ };
732
+
722
733
  /**
723
734
  * Only the props for the modal and generic props
724
735
  * The modal is generic and can be with all types as long as the types meet the minimum requirements
@@ -728,17 +739,22 @@ export declare type ShareModalProps<UserType, InvitationType, AccessType> = {
728
739
  modalTitle?: string;
729
740
  isOpen: boolean;
730
741
  canUpdate?: boolean;
742
+ canView?: boolean;
743
+ cannotViewChildren?: ReactNode;
744
+ cannotViewMessage?: string;
731
745
  onClose: () => void;
732
- invitationRoles: DropdownMenuOption[];
746
+ invitationRoles?: DropdownMenuOption[];
733
747
  getAccessRoles?: (access: AccessData<UserType, AccessType>) => DropdownMenuOption[];
734
748
  outsideSearchContent?: ReactNode;
735
- } & ShareModalInvitationProps<UserType, InvitationType> & ShareModalAccessProps<UserType, AccessType> & ShareModalSearchProps<UserType>;
749
+ hideInvitations?: boolean;
750
+ hideMembers?: boolean;
751
+ } & ShareModalInvitationProps<UserType, InvitationType> & ShareModalAccessProps<UserType, AccessType> & ShareModalSearchProps<UserType> & ShareModalLinkSettingsProps;
736
752
 
737
753
  declare type ShareModalSearchProps<UserType> = {
738
754
  searchUsersResult?: UserData<UserType>[];
739
- onSearchUsers: (search: string) => void;
755
+ onSearchUsers?: (search: string) => void;
740
756
  searchPlaceholder?: string;
741
- onInviteUser: (users: UserData<UserType>[], role: string) => void;
757
+ onInviteUser?: (users: UserData<UserType>[], role: string) => void;
742
758
  loading?: boolean;
743
759
  };
744
760