aquasis-fe-components 1.7.7 → 1.7.8
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/aquasis-fe-components.js +20667 -21169
- package/dist/aquasis-fe-components.umd.cjs +115 -119
- package/dist/components/ReduxErrorBoundary/index.d.ts +30 -0
- package/dist/helpers/index.d.ts +0 -2
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/useReduxProvider.d.ts +24 -0
- package/dist/index.d.ts +4 -4
- package/dist/lib/Helpdesk/HelpdeskConnector.d.ts +2 -7
- package/dist/lib/Helpdesk/HelpdeskContent/index.d.ts +3 -1
- package/dist/lib/Helpdesk/index.d.ts +2 -0
- package/dist/lib/LanguageSwitcher/LanguageSwitcherConnector.d.ts +2 -6
- package/dist/lib/ReleaseNote/ReleaseNoteConnector.d.ts +2 -12
- package/dist/lib/UserModal/UserModalConnector.d.ts +2 -9
- package/dist/types/helpdesk.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
interface ReduxErrorBoundaryProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
fallback: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
interface ReduxErrorBoundaryState {
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Error boundary component to catch Redux connection errors
|
|
11
|
+
*
|
|
12
|
+
* This component catches errors that occur when trying to connect to Redux
|
|
13
|
+
* and renders a fallback component instead. It's specifically designed to
|
|
14
|
+
* handle "react-redux context value" errors that occur when no Redux
|
|
15
|
+
* provider is available in the component tree.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <ReduxErrorBoundary fallback={<StandaloneComponent {...props} />}>
|
|
20
|
+
* <ConnectedComponent {...props} />
|
|
21
|
+
* </ReduxErrorBoundary>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class ReduxErrorBoundary extends Component<ReduxErrorBoundaryProps, ReduxErrorBoundaryState> {
|
|
25
|
+
constructor(props: ReduxErrorBoundaryProps);
|
|
26
|
+
static getDerivedStateFromError(): ReduxErrorBoundaryState;
|
|
27
|
+
componentDidCatch(error: Error, errorInfo: any): void;
|
|
28
|
+
render(): ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export default ReduxErrorBoundary;
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { FlagType } from '../types/app';
|
|
2
1
|
import { RcFile } from 'antd/es/upload';
|
|
3
|
-
export declare const getInitLanguage: () => FlagType;
|
|
4
2
|
export declare const getCurrTenantId: () => string;
|
|
5
3
|
export declare const getCurrAppId: () => string;
|
|
6
4
|
export declare function getCookie<T>(key: string): T;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Themes } from '../enums/app';
|
|
2
2
|
import { AppDispatch, RootState } from '../store';
|
|
3
3
|
import { ColorsThemeKey } from '../themes';
|
|
4
|
-
import { FlagType } from '../types/app';
|
|
5
4
|
import { TypedUseSelectorHook } from 'react-redux';
|
|
6
5
|
type DispatchFunc = () => AppDispatch;
|
|
7
6
|
export declare const useAppDispatch: DispatchFunc;
|
|
8
7
|
export declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
9
|
-
export declare const useGetLanguage: () => FlagType;
|
|
10
8
|
export declare const useGetTheme: () => Themes;
|
|
11
9
|
export declare const useGetColorTheme: () => {
|
|
12
10
|
getColor: (attribute: keyof ColorsThemeKey) => string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to detect if Redux Provider is available in the component tree
|
|
3
|
+
*
|
|
4
|
+
* This hook returns false by default since we'll handle Redux connection
|
|
5
|
+
* errors at the component level instead of trying to detect the provider.
|
|
6
|
+
*
|
|
7
|
+
* @returns boolean - always returns false for now
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const MyComponent = () => {
|
|
12
|
+
* const hasReduxProvider = useCheckReduxProvider();
|
|
13
|
+
*
|
|
14
|
+
* if (hasReduxProvider) {
|
|
15
|
+
* // Component is wrapped in Redux Provider
|
|
16
|
+
* return <ConnectedComponent />;
|
|
17
|
+
* } else {
|
|
18
|
+
* // No Redux Provider, use standalone version
|
|
19
|
+
* return <StandaloneComponent />;
|
|
20
|
+
* }
|
|
21
|
+
* };
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const useCheckReduxProvider: () => boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { HelpdeskComponent as Helpdesk } from './lib/Helpdesk/HelpdeskConnector';
|
|
2
|
+
import { LanguageSwitcherComponent as LanguageSwitcher } from './lib/LanguageSwitcher/LanguageSwitcherConnector';
|
|
3
|
+
import { ReleaseNoteComponent as ReleaseNote } from './lib/ReleaseNote/ReleaseNoteConnector';
|
|
4
|
+
import { UserModalComponent as UserModal } from './lib/UserModal/UserModalConnector';
|
|
5
5
|
import { default as i18n } from './i18n';
|
|
6
6
|
export type * from './types/app';
|
|
7
7
|
export type * from './types/helpdesk';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { HelpdeskProps } from './index';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
placement?: import('antd/es/tooltip').TooltipPlacement | undefined;
|
|
6
|
-
context?: import('react').Context<import('react-redux').ReactReduxContextValue<any, import('redux').UnknownAction> | null> | undefined;
|
|
7
|
-
store?: import('redux').Store | undefined;
|
|
8
|
-
}>;
|
|
9
|
-
export { ConnectedHelpdesk };
|
|
3
|
+
declare const HelpdeskComponent: FC<HelpdeskProps>;
|
|
4
|
+
export { HelpdeskComponent };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
+
appName: string;
|
|
3
|
+
groupId?: number;
|
|
2
4
|
onCancel?: () => void;
|
|
3
5
|
};
|
|
4
|
-
export declare const HelpdeskContent: ({ onCancel }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const HelpdeskContent: ({ onCancel, appName, groupId }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
export {};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { LanguageSwitcherProps } from '.';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
context?: import('react').Context<import('react-redux').ReactReduxContextValue<any, import('redux').UnknownAction> | null> | undefined;
|
|
6
|
-
store?: import('redux').Store | undefined;
|
|
7
|
-
}>;
|
|
8
|
-
export { LanguageSwitcherConnector };
|
|
3
|
+
declare const LanguageSwitcherComponent: FC<LanguageSwitcherProps>;
|
|
4
|
+
export { LanguageSwitcherComponent };
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ReleaseNoteProps } from '.';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
addBtnTooltipText?: string | undefined;
|
|
6
|
-
release2edit?: import('../..').IReleaseNote | undefined;
|
|
7
|
-
beforeOpenModal?: (() => void) | undefined;
|
|
8
|
-
beforeCloseModal?: (() => void) | undefined;
|
|
9
|
-
afterSubmit?: (() => void) | undefined;
|
|
10
|
-
showAddBtn?: boolean | undefined;
|
|
11
|
-
context?: import('react').Context<import('react-redux').ReactReduxContextValue<any, import('redux').UnknownAction> | null> | undefined;
|
|
12
|
-
store?: import('redux').Store | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
export { ReleaseNotesConnector };
|
|
3
|
+
declare const ReleaseNoteComponent: FC<ReleaseNoteProps>;
|
|
4
|
+
export { ReleaseNoteComponent };
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { UserModalProps } from '.';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
onCancel: () => void;
|
|
6
|
-
isLoading?: boolean | undefined;
|
|
7
|
-
isOpen: boolean;
|
|
8
|
-
context?: import('react').Context<import('react-redux').ReactReduxContextValue<any, import('redux').UnknownAction> | null> | undefined;
|
|
9
|
-
store?: import('redux').Store | undefined;
|
|
10
|
-
}>;
|
|
11
|
-
export { UserModalConnector };
|
|
3
|
+
declare const UserModalComponent: FC<UserModalProps>;
|
|
4
|
+
export { UserModalComponent };
|
package/dist/types/helpdesk.d.ts
CHANGED