@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/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,7 @@
1
+ import * as React from 'react';
2
+ export declare const SnackbarDemo: () => React.ReactElement;
3
+ export declare const TwoSnackbarsDemo: () => React.ReactElement;
4
+ declare const _default: {
5
+ title: string;
6
+ };
7
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { SnackbarProps } from '@mui/material';
3
+ export declare const SnackbarWrapperConnect: React.FC<SnackbarProps>;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Store } from '@reduxjs/toolkit';
3
+ interface TestProviderProps {
4
+ children?: React.ReactNode;
5
+ store: Store;
6
+ }
7
+ export declare const TestProvider: React.FC<TestProviderProps>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export { SnackbarWrapperConnect } from './SnackbarWrapperConnect';
@@ -0,0 +1,2 @@
1
+ export * from './components/Snackbar';
2
+ export * from './store';
@@ -0,0 +1,4 @@
1
+ import { Egg } from '@redux-eggs/core';
2
+ import { Store } from '@reduxjs/toolkit';
3
+ import { SnackbarModuleStore } from './types';
4
+ export declare const snackbarModuleConfig: Egg<Store<SnackbarModuleStore>>;
@@ -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,5 @@
1
+ import { SagaIterator } from 'redux-saga';
2
+ import { SnackbarActions } from './reducer';
3
+ export declare function openSnackbarSaga(capturedAction: SnackbarActions): SagaIterator;
4
+ export declare function rootSaga(): SagaIterator;
5
+ export default rootSaga;
@@ -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
+ }