@opengeoweb/snackbar 9.0.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/README.md +7 -0
- package/index.esm.d.ts +1 -0
- package/index.esm.js +12586 -0
- package/package.json +13 -0
- package/src/index.d.ts +1 -0
- package/src/lib/components/Snackbar/SnackbarWrapper.d.ts +9 -0
- package/src/lib/components/Snackbar/SnackbarWrapper.spec.d.ts +1 -0
- package/src/lib/components/Snackbar/SnackbarWrapper.stories.d.ts +7 -0
- package/src/lib/components/Snackbar/SnackbarWrapperConnect.d.ts +3 -0
- package/src/lib/components/Snackbar/SnackbarWrapperConnect.spec.d.ts +8 -0
- package/src/lib/components/Snackbar/index.d.ts +1 -0
- package/src/lib/index.d.ts +2 -0
- package/src/lib/store/config.d.ts +4 -0
- package/src/lib/store/index.d.ts +6 -0
- package/src/lib/store/reducer.d.ts +11 -0
- package/src/lib/store/reducer.spec.d.ts +1 -0
- package/src/lib/store/sagas.d.ts +5 -0
- package/src/lib/store/sagas.spec.d.ts +1 -0
- package/src/lib/store/selectors.d.ts +8 -0
- package/src/lib/store/selectors.spec.d.ts +1 -0
- package/src/lib/store/types.d.ts +15 -0
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opengeoweb/snackbar",
|
|
3
|
+
"version": "9.0.0",
|
|
4
|
+
"description": "GeoWeb snackbar library for the opengeoweb project",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
|
+
},
|
|
10
|
+
"module": "./index.esm.js",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "./index.esm.js"
|
|
13
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SnackbarProps } from '@mui/material';
|
|
3
|
+
interface SnackBarWrapperProps extends SnackbarProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
id: string;
|
|
6
|
+
onCloseSnackbar: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const SnackbarWrapper: React.FC<SnackBarWrapperProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SnackbarWrapperConnect } from './SnackbarWrapperConnect';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { snackbarActions } from './reducer';
|
|
2
|
+
export * as snackbarSelectors from './selectors';
|
|
3
|
+
export * as snackbarTypes from './types';
|
|
4
|
+
export * from './config';
|
|
5
|
+
export { reducer as snackbarReducer } from './reducer';
|
|
6
|
+
export { rootSaga as snackbarSaga } from './sagas';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
|
+
import { OpenSnackbarPayload, SnackbarItem, SnackbarState, TriggerOpenSnackbarBySagaPayload } from './types';
|
|
3
|
+
export declare const snackbarAdapter: import("@reduxjs/toolkit").EntityAdapter<SnackbarItem>;
|
|
4
|
+
export declare const initialState: SnackbarState;
|
|
5
|
+
export declare const reducer: import("redux").Reducer<SnackbarState, import("redux").AnyAction>;
|
|
6
|
+
export declare const snackbarActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
7
|
+
openSnackbar: (draft: Draft<SnackbarState>, action: PayloadAction<OpenSnackbarPayload>) => void;
|
|
8
|
+
triggerOpenSnackbarBySaga: (draft: Draft<SnackbarState>, action: PayloadAction<TriggerOpenSnackbarBySagaPayload>) => void;
|
|
9
|
+
closeSnackbar: (draft: Draft<SnackbarState>) => void;
|
|
10
|
+
}, "snackbar">;
|
|
11
|
+
export type SnackbarActions = ReturnType<typeof snackbarActions.openSnackbar> | ReturnType<typeof snackbarActions.triggerOpenSnackbarBySaga> | ReturnType<typeof snackbarActions.closeSnackbar>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SnackbarModuleStore, SnackbarState } from './types';
|
|
2
|
+
export declare const getSnackbarStore: (store: SnackbarModuleStore) => SnackbarState;
|
|
3
|
+
export declare const getCurrentSnackbarMessages: (state: SnackbarModuleStore) => import("./types").SnackbarItem[];
|
|
4
|
+
export declare const getFirstSnackbarMessage: ((state: SnackbarModuleStore) => import("./types").SnackbarItem | undefined) & import("reselect").OutputSelectorFields<(args_0: import("./types").SnackbarItem[]) => import("./types").SnackbarItem | undefined, {
|
|
5
|
+
clearCache: () => void;
|
|
6
|
+
}> & {
|
|
7
|
+
clearCache: () => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EntityState } from '@reduxjs/toolkit';
|
|
2
|
+
export interface SnackbarItem {
|
|
3
|
+
message: string;
|
|
4
|
+
id: string;
|
|
5
|
+
}
|
|
6
|
+
export type SnackbarState = EntityState<SnackbarItem>;
|
|
7
|
+
export interface SnackbarModuleStore {
|
|
8
|
+
snackbar?: SnackbarState;
|
|
9
|
+
}
|
|
10
|
+
export interface OpenSnackbarPayload {
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TriggerOpenSnackbarBySagaPayload {
|
|
14
|
+
snackbarContent: SnackbarItem;
|
|
15
|
+
}
|