dinocollab-core 2.0.3 → 2.0.4
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/api-context.d.ts +2 -0
- package/dist/api-context.js +2 -0
- package/dist/api-context.mjs +2 -0
- package/dist/components.d.ts +2 -0
- package/dist/components.js +2 -0
- package/dist/components.mjs +2 -0
- package/dist/data-view.d.ts +2 -0
- package/dist/data-view.js +2 -0
- package/dist/data-view.mjs +2 -0
- package/dist/form.d.ts +2 -0
- package/dist/form.js +2 -0
- package/dist/form.mjs +2 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +2 -0
- package/dist/hooks.mjs +2 -0
- package/dist/http-service.d.ts +2 -0
- package/dist/http-service.js +2 -0
- package/dist/http-service.mjs +2 -0
- package/dist/mfe-shared/auth.js.map +1 -1
- package/dist/mfe-shared/auth.ssr.js.map +1 -1
- package/dist/mfe-shared/auth.types.js.map +1 -1
- package/dist/mfe-shared/hydration-helper.js +1 -1
- package/dist/mfe-shared/hydration-helper.js.map +1 -1
- package/dist/mfe-shared/index.js +1 -1
- package/dist/mfe-shared/mfe-bridge.js.map +1 -1
- package/dist/mfe-shared.d.ts +2 -0
- package/dist/mfe-shared.js +2 -0
- package/dist/mfe-shared.mjs +2 -0
- package/dist/redux.d.ts +2 -0
- package/dist/redux.js +2 -0
- package/dist/redux.mjs +2 -0
- package/dist/table-grid.d.ts +2 -0
- package/dist/table-grid.js +2 -0
- package/dist/table-grid.mjs +2 -0
- package/dist/table.d.ts +2 -0
- package/dist/table.js +2 -0
- package/dist/table.mjs +2 -0
- package/dist/types/mfe-shared/auth.d.ts +13 -8
- package/dist/types/mfe-shared/auth.ssr.d.ts +3 -3
- package/dist/types/mfe-shared/auth.types.d.ts +4 -4
- package/dist/types/mfe-shared/cart.debug.d.ts +2 -2
- package/dist/types/mfe-shared/hydration-helper.d.ts +4 -4
- package/dist/types/mfe-shared/index.d.ts +6 -4
- package/dist/types/mfe-shared/mfe-bridge.d.ts +4 -4
- package/dist/types/mfe-shared/types.d.ts +4 -4
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +2 -0
- package/dist/utils.mjs +2 -0
- package/package.json +90 -8
- package/dist/mfe-auth/auth-enums.js +0 -2
- package/dist/mfe-auth/auth-enums.js.map +0 -1
- package/dist/mfe-auth/auth-mfe-manager.js +0 -2
- package/dist/mfe-auth/auth-mfe-manager.js.map +0 -1
- package/dist/mfe-auth/auth-mfe-provider.js +0 -2
- package/dist/mfe-auth/auth-mfe-provider.js.map +0 -1
- package/dist/mfe-auth/auth-types.js +0 -2
- package/dist/mfe-auth/auth-types.js.map +0 -1
- package/dist/mfe-auth/index.js +0 -2
- package/dist/mfe-auth/index.js.map +0 -1
- package/dist/mfe-auth/micro-frontend-auth-hooks.js +0 -2
- package/dist/mfe-auth/micro-frontend-auth-hooks.js.map +0 -1
- package/dist/types/mfe-auth/auth-enums.d.ts +0 -40
- package/dist/types/mfe-auth/auth-mfe-manager.d.ts +0 -68
- package/dist/types/mfe-auth/auth-mfe-provider.d.ts +0 -19
- package/dist/types/mfe-auth/auth-types.d.ts +0 -33
- package/dist/types/mfe-auth/index.d.ts +0 -6
- package/dist/types/mfe-auth/micro-frontend-auth-hooks.d.ts +0 -164
- package/dist/types/mfe-navigate/index.d.ts +0 -2
- package/dist/types/mfe-navigate/mfe-navigate.debug.d.ts +0 -4
- package/dist/types/mfe-navigate/mfe-navigate.remote.d.ts +0 -11
- package/dist/types/mfe-navigate/nextjs/index.d.ts +0 -1
- package/dist/types/mfe-navigate/nextjs/provider.d.ts +0 -2
- package/dist/types/mfe-navigate/react/index.d.ts +0 -1
- package/dist/types/mfe-navigate/react/provider.d.ts +0 -3
- package/dist/types/mfe-navigate/types.d.ts +0 -13
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import React, { FC, CSSProperties } from 'react';
|
|
2
|
-
import { AuthEventData, AuthEventListener } from './auth-types';
|
|
3
|
-
import { AuthStatus } from './auth-enums';
|
|
4
|
-
/**
|
|
5
|
-
* Authentication Manager for Micro Frontends
|
|
6
|
-
* Manages connection to global auth state via window object
|
|
7
|
-
*/
|
|
8
|
-
declare class MicroFrontendAuth {
|
|
9
|
-
private microFrontendId;
|
|
10
|
-
private authData;
|
|
11
|
-
private listeners;
|
|
12
|
-
private retryCount;
|
|
13
|
-
private isInitialized;
|
|
14
|
-
private initPromise;
|
|
15
|
-
constructor(microFrontendId: string);
|
|
16
|
-
/**
|
|
17
|
-
* Initialize connection to global auth manager
|
|
18
|
-
*/
|
|
19
|
-
private initialize;
|
|
20
|
-
private tryInitialize;
|
|
21
|
-
/**
|
|
22
|
-
* Setup connection to global auth manager
|
|
23
|
-
*/
|
|
24
|
-
private setupConnection;
|
|
25
|
-
/**
|
|
26
|
-
* Handle authentication state changes from global manager
|
|
27
|
-
*/
|
|
28
|
-
private handleAuthChange;
|
|
29
|
-
/**
|
|
30
|
-
* Handle auth response events
|
|
31
|
-
*/
|
|
32
|
-
private handleAuthResponse;
|
|
33
|
-
/**
|
|
34
|
-
* Handle global auth state changes
|
|
35
|
-
*/
|
|
36
|
-
private handleStateChanged;
|
|
37
|
-
/**
|
|
38
|
-
* Request current authentication state
|
|
39
|
-
*/
|
|
40
|
-
private requestAuthState;
|
|
41
|
-
/**
|
|
42
|
-
* Notify all listeners of auth changes
|
|
43
|
-
*/
|
|
44
|
-
private notifyListeners;
|
|
45
|
-
/**
|
|
46
|
-
* Subscribe to authentication changes
|
|
47
|
-
*/
|
|
48
|
-
subscribe(listener: AuthEventListener): () => void;
|
|
49
|
-
/**
|
|
50
|
-
* Get current authentication data
|
|
51
|
-
*/
|
|
52
|
-
getAuthData(): AuthEventData;
|
|
53
|
-
/**
|
|
54
|
-
* Request login from host application
|
|
55
|
-
*/
|
|
56
|
-
requestLogin(): void;
|
|
57
|
-
/**
|
|
58
|
-
* Request logout from host application
|
|
59
|
-
*/
|
|
60
|
-
requestLogout(): void;
|
|
61
|
-
/**
|
|
62
|
-
* Check if connected to global auth manager
|
|
63
|
-
*/
|
|
64
|
-
isConnected(): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Get debug information
|
|
67
|
-
*/
|
|
68
|
-
getDebugInfo(): {
|
|
69
|
-
microFrontendId: string;
|
|
70
|
-
isInitialized: boolean;
|
|
71
|
-
isConnected: boolean;
|
|
72
|
-
retryCount: number;
|
|
73
|
-
authData: AuthEventData;
|
|
74
|
-
listenerCount: number;
|
|
75
|
-
globalAvailable: boolean;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Cleanup when component unmounts
|
|
79
|
-
*/
|
|
80
|
-
destroy(): void;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* React Hook for Micro Frontend Authentication
|
|
84
|
-
* Primary hook for function components
|
|
85
|
-
*/
|
|
86
|
-
export declare function useMicroFrontendAuth(microFrontendId: string): {
|
|
87
|
-
isAuthenticated: boolean;
|
|
88
|
-
isLoading: boolean;
|
|
89
|
-
isAuthenticating: boolean;
|
|
90
|
-
hasError: boolean;
|
|
91
|
-
displayName: string | undefined;
|
|
92
|
-
email: string | undefined;
|
|
93
|
-
userId: string | undefined;
|
|
94
|
-
avatar: string | undefined;
|
|
95
|
-
profile: Record<string, any> | undefined;
|
|
96
|
-
status: AuthStatus;
|
|
97
|
-
error: string | undefined;
|
|
98
|
-
timestamp: number;
|
|
99
|
-
login: () => void;
|
|
100
|
-
logout: () => void;
|
|
101
|
-
authData: AuthEventData;
|
|
102
|
-
isConnected: boolean;
|
|
103
|
-
debugInfo: {
|
|
104
|
-
microFrontendId: string;
|
|
105
|
-
isInitialized: boolean;
|
|
106
|
-
isConnected: boolean;
|
|
107
|
-
retryCount: number;
|
|
108
|
-
authData: AuthEventData;
|
|
109
|
-
listenerCount: number;
|
|
110
|
-
globalAvailable: boolean;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* React Hook for Authentication Actions Only
|
|
115
|
-
* Lightweight hook for components that only need actions
|
|
116
|
-
*/
|
|
117
|
-
export declare function useMicroFrontendAuthActions(microFrontendId: string): {
|
|
118
|
-
login: () => void;
|
|
119
|
-
logout: () => void;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* Consumer Component for Class Components or Render Props Pattern
|
|
123
|
-
*/
|
|
124
|
-
interface MicroFrontendAuthConsumerProps {
|
|
125
|
-
microFrontendId: string;
|
|
126
|
-
children: (authData: ReturnType<typeof useMicroFrontendAuth>) => React.ReactNode;
|
|
127
|
-
}
|
|
128
|
-
export declare function MicroFrontendAuthConsumer({ microFrontendId, children }: MicroFrontendAuthConsumerProps): import("react/jsx-runtime").JSX.Element;
|
|
129
|
-
/**
|
|
130
|
-
* Higher-Order Component for Class Components
|
|
131
|
-
*/
|
|
132
|
-
export declare function withMicroFrontendAuth<P extends object>(Component: React.ComponentType<P & {
|
|
133
|
-
auth: ReturnType<typeof useMicroFrontendAuth>;
|
|
134
|
-
}>, microFrontendId: string): (props: P) => import("react/jsx-runtime").JSX.Element;
|
|
135
|
-
/**
|
|
136
|
-
* Utility functions for non-React contexts
|
|
137
|
-
*/
|
|
138
|
-
export declare const microFrontendAuthUtils: {
|
|
139
|
-
/**
|
|
140
|
-
* Get current auth state synchronously
|
|
141
|
-
*/
|
|
142
|
-
getCurrentAuth: (microFrontendId: string) => AuthEventData;
|
|
143
|
-
/**
|
|
144
|
-
* Request login from any context
|
|
145
|
-
*/
|
|
146
|
-
requestLogin: (microFrontendId: string) => void;
|
|
147
|
-
/**
|
|
148
|
-
* Request logout from any context
|
|
149
|
-
*/
|
|
150
|
-
requestLogout: (microFrontendId: string) => void;
|
|
151
|
-
/**
|
|
152
|
-
* Create or get auth instance
|
|
153
|
-
*/
|
|
154
|
-
createAuthInstance: (microFrontendId: string) => MicroFrontendAuth;
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* Debug component for micro frontends
|
|
158
|
-
*/
|
|
159
|
-
interface MicroFrontendAuthDebugProps {
|
|
160
|
-
microFrontendId: string;
|
|
161
|
-
position?: Pick<CSSProperties, 'top' | 'left' | 'right' | 'bottom'>;
|
|
162
|
-
}
|
|
163
|
-
export declare const MicroFrontendAuthDebug: FC<MicroFrontendAuthDebugProps>;
|
|
164
|
-
export { MicroFrontendAuth };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AnchorHTMLAttributes, FC } from 'react';
|
|
2
|
-
import type { MfeNavigate } from './types';
|
|
3
|
-
export declare const useMfeNavigate: () => {
|
|
4
|
-
navigate: (params: MfeNavigate) => void;
|
|
5
|
-
};
|
|
6
|
-
export interface IMfeLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href'> {
|
|
7
|
-
internal?: boolean;
|
|
8
|
-
primaryHref: string;
|
|
9
|
-
secondaryHref?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare const MfeLink: FC<IMfeLinkProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './provider';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './provider';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type AppSite = 'client' | 'home' | 'music';
|
|
2
|
-
export type IMfeNavigateHref = {
|
|
3
|
-
primaryHref: string;
|
|
4
|
-
secondaryHref?: string;
|
|
5
|
-
};
|
|
6
|
-
export interface MfeNavigate {
|
|
7
|
-
primaryHref: string;
|
|
8
|
-
secondaryHref?: string;
|
|
9
|
-
internal?: boolean;
|
|
10
|
-
site?: AppSite;
|
|
11
|
-
options?: any;
|
|
12
|
-
target?: '_self' | '_blank';
|
|
13
|
-
}
|