@saas-support/react 0.4.0 → 0.6.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.cjs +1 -1
- package/dist/index.d.ts +25 -0
- package/dist/index.js +258 -249
- package/dist/react.cjs +1337 -127
- package/dist/react.d.ts +53 -4
- package/dist/react.js +3289 -1487
- package/package.json +1 -1
package/dist/react.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export declare interface Appearance {
|
|
|
8
8
|
baseTheme?: 'light' | 'dark';
|
|
9
9
|
variables?: ThemeVariables;
|
|
10
10
|
elements?: ElementOverrides;
|
|
11
|
+
/** Custom font URL, or null to disable CDN font loading */
|
|
12
|
+
fontUrl?: string | null;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
declare interface ApplyCouponResult {
|
|
@@ -73,6 +75,9 @@ declare class AuthClient {
|
|
|
73
75
|
orgId: string;
|
|
74
76
|
role: string;
|
|
75
77
|
}>;
|
|
78
|
+
listInvites(orgId: string): Promise<PendingInvite[]>;
|
|
79
|
+
revokeInvite(orgId: string, inviteId: string): Promise<void>;
|
|
80
|
+
deleteAccount(): Promise<void>;
|
|
76
81
|
/* Excluded from this release type: handleExternalLogout */
|
|
77
82
|
/* Excluded from this release type: performRefresh */
|
|
78
83
|
private setSession;
|
|
@@ -219,6 +224,12 @@ declare interface ElementOverrides {
|
|
|
219
224
|
chartContainer?: React.CSSProperties;
|
|
220
225
|
queryInput?: React.CSSProperties;
|
|
221
226
|
dashboardGrid?: React.CSSProperties;
|
|
227
|
+
brandIcon?: React.CSSProperties;
|
|
228
|
+
oauthGrid?: React.CSSProperties;
|
|
229
|
+
mfaDigitInput?: React.CSSProperties;
|
|
230
|
+
glassPanel?: React.CSSProperties;
|
|
231
|
+
avatarLarge?: React.CSSProperties;
|
|
232
|
+
profileHeader?: React.CSSProperties;
|
|
222
233
|
}
|
|
223
234
|
|
|
224
235
|
declare interface EmbedToken {
|
|
@@ -251,7 +262,7 @@ declare interface FilterRule {
|
|
|
251
262
|
value: string;
|
|
252
263
|
}
|
|
253
264
|
|
|
254
|
-
declare interface Invite {
|
|
265
|
+
export declare interface Invite {
|
|
255
266
|
inviteId: string;
|
|
256
267
|
email: string;
|
|
257
268
|
role: string;
|
|
@@ -293,7 +304,7 @@ declare interface ListParams {
|
|
|
293
304
|
search?: string;
|
|
294
305
|
}
|
|
295
306
|
|
|
296
|
-
declare interface Member {
|
|
307
|
+
export declare interface Member {
|
|
297
308
|
userId: string;
|
|
298
309
|
email: string;
|
|
299
310
|
role: string;
|
|
@@ -325,7 +336,7 @@ declare interface OffsetPage<T> {
|
|
|
325
336
|
};
|
|
326
337
|
}
|
|
327
338
|
|
|
328
|
-
declare interface Org {
|
|
339
|
+
export declare interface Org {
|
|
329
340
|
id: string;
|
|
330
341
|
projectId: string;
|
|
331
342
|
name: string;
|
|
@@ -352,6 +363,14 @@ export declare interface PaymentPortalProps {
|
|
|
352
363
|
appearance?: Appearance;
|
|
353
364
|
}
|
|
354
365
|
|
|
366
|
+
export declare interface PendingInvite {
|
|
367
|
+
id: string;
|
|
368
|
+
email: string;
|
|
369
|
+
role: string;
|
|
370
|
+
expiresAt: string;
|
|
371
|
+
createdAt: string;
|
|
372
|
+
}
|
|
373
|
+
|
|
355
374
|
declare interface Plan {
|
|
356
375
|
id: string;
|
|
357
376
|
name: string;
|
|
@@ -614,6 +633,12 @@ export declare interface ThemeVariables {
|
|
|
614
633
|
colorWarning?: string;
|
|
615
634
|
fontFamily?: string;
|
|
616
635
|
borderRadius?: string;
|
|
636
|
+
colorPrimaryContainer?: string;
|
|
637
|
+
colorSurface?: string;
|
|
638
|
+
colorOnSurface?: string;
|
|
639
|
+
colorOutline?: string;
|
|
640
|
+
fontFamilyHeadline?: string;
|
|
641
|
+
fontFamilyBody?: string;
|
|
617
642
|
}
|
|
618
643
|
|
|
619
644
|
declare class TokenManager {
|
|
@@ -700,6 +725,13 @@ export declare function useDashboard(dashboardId: string): {
|
|
|
700
725
|
refresh: () => Promise<void>;
|
|
701
726
|
};
|
|
702
727
|
|
|
728
|
+
export declare function useDeleteAccount(): {
|
|
729
|
+
deleteAccount: () => Promise<boolean>;
|
|
730
|
+
isLoading: boolean;
|
|
731
|
+
error: string | null;
|
|
732
|
+
setError: Dispatch<SetStateAction<string | null>>;
|
|
733
|
+
};
|
|
734
|
+
|
|
703
735
|
export declare function useEmbedDashboard(embedToken: string, dashboardId: string, baseUrl?: string): {
|
|
704
736
|
dashboard: Dashboard | null;
|
|
705
737
|
reportClient: ReportClient;
|
|
@@ -719,11 +751,24 @@ export declare function useOrg(): {
|
|
|
719
751
|
orgs: Org[];
|
|
720
752
|
selectedOrg: Org | null;
|
|
721
753
|
members: Member[];
|
|
754
|
+
invites: PendingInvite[];
|
|
722
755
|
isLoading: boolean;
|
|
723
756
|
error: string | null;
|
|
757
|
+
setError: Dispatch<SetStateAction<string | null>>;
|
|
724
758
|
refresh: () => Promise<void>;
|
|
725
759
|
selectOrg: (orgId: string) => Promise<void>;
|
|
726
760
|
createOrg: (name: string, slug: string) => Promise<Org | null>;
|
|
761
|
+
updateOrg: (orgId: string, params: {
|
|
762
|
+
name?: string;
|
|
763
|
+
avatarUrl?: string;
|
|
764
|
+
}) => Promise<Org | null>;
|
|
765
|
+
deleteOrg: (orgId: string) => Promise<boolean>;
|
|
766
|
+
sendInvite: (orgId: string, email: string, role: string) => Promise<Invite | null>;
|
|
767
|
+
refreshInvites: (orgId: string) => Promise<void>;
|
|
768
|
+
revokeInvite: (orgId: string, inviteId: string) => Promise<boolean>;
|
|
769
|
+
updateMemberRole: (orgId: string, userId: string, role: string) => Promise<boolean>;
|
|
770
|
+
removeMember: (orgId: string, userId: string) => Promise<boolean>;
|
|
771
|
+
refreshMembers: (orgId: string) => Promise<void>;
|
|
727
772
|
};
|
|
728
773
|
|
|
729
774
|
export declare function useProfile(): {
|
|
@@ -765,11 +810,15 @@ export declare interface User {
|
|
|
765
810
|
avatarUrl?: string;
|
|
766
811
|
}
|
|
767
812
|
|
|
768
|
-
export declare function UserButton({ appearance: localAppearance }: UserButtonProps): JSX_2.Element | null;
|
|
813
|
+
export declare function UserButton({ appearance: localAppearance, afterSignOutUrl, afterDeleteAccountUrl, showOrgSwitcher, onOrgChange, onOrgSettingsClick, }: UserButtonProps): JSX_2.Element | null;
|
|
769
814
|
|
|
770
815
|
export declare interface UserButtonProps {
|
|
771
816
|
appearance?: Appearance;
|
|
772
817
|
afterSignOutUrl?: string;
|
|
818
|
+
afterDeleteAccountUrl?: string;
|
|
819
|
+
showOrgSwitcher?: boolean;
|
|
820
|
+
onOrgChange?: (org: Org) => void;
|
|
821
|
+
onOrgSettingsClick?: (org: Org) => void;
|
|
773
822
|
}
|
|
774
823
|
|
|
775
824
|
export declare function useReport(): {
|