@42.nl/react-flash-messages 2.0.1 → 2.0.2

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/lib/models.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare type OnFlashMessageClicked<Data> = (flashMessage: FlashMessage<Data>) => void;
1
+ export type OnFlashMessageClicked<Data> = (flashMessage: FlashMessage<Data>) => void;
2
2
  /**
3
3
  * The reason a flash message was removed.
4
4
  *
@@ -7,13 +7,13 @@ export declare type OnFlashMessageClicked<Data> = (flashMessage: FlashMessage<Da
7
7
  * it is 'manually-removed' it was because the `removeFlashMessage`
8
8
  * action was called.
9
9
  */
10
- export declare type FlashMessageRemovedReason = 'duration-elapsed' | 'manually-removed';
11
- export declare type OnFlashMessageRemoved<Data> = (flashMessage: FlashMessage<Data>, reason: FlashMessageRemovedReason) => void;
10
+ export type FlashMessageRemovedReason = 'duration-elapsed' | 'manually-removed';
11
+ export type OnFlashMessageRemoved<Data> = (flashMessage: FlashMessage<Data>, reason: FlashMessageRemovedReason) => void;
12
12
  /**
13
13
  * Represents a FlashMessage as it will be represented in the
14
14
  * flashMessageService.
15
15
  */
16
- export declare type FlashMessage<Data> = {
16
+ export type FlashMessage<Data> = {
17
17
  /**
18
18
  * The id of the flashMessage must be unique for each flash message.
19
19
  */
@@ -77,7 +77,7 @@ export declare type FlashMessage<Data> = {
77
77
  * creating a the FlashMessage from the FlashMessageConfig and they
78
78
  * will be re-written.
79
79
  */
80
- export declare type FlashMessageConfig<Data> = {
80
+ export type FlashMessageConfig<Data> = {
81
81
  /**
82
82
  * The type of flash message, can be useful to distinguish
83
83
  * between types of messages. For example you might have a type
@@ -119,7 +119,7 @@ export declare type FlashMessageConfig<Data> = {
119
119
  * etc etc, so the developer can quickly spawn flash messages without
120
120
  * resorting to the more low level `addFlashMessage` action.
121
121
  */
122
- export declare type FlashMessageCreatorConfig<Data> = {
122
+ export type FlashMessageCreatorConfig<Data> = {
123
123
  /**
124
124
  * The text message you want to show to the user.
125
125
  */
package/lib/provider.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FlashMessage } from './models';
3
3
  export declare const FlashMessagesContext: React.Context<FlashMessage<unknown>[]>;
4
- export declare type Props = {
4
+ export type Props = {
5
5
  children: React.ReactNode;
6
6
  };
7
7
  /**
package/lib/service.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FlashMessage, FlashMessageRemovedReason } from './models';
2
- export declare type Subscriber = (flashMessages: FlashMessage<unknown>[]) => void;
3
- export declare type FlashMessageService = {
2
+ export type Subscriber = (flashMessages: FlashMessage<unknown>[]) => void;
3
+ export type FlashMessageService = {
4
4
  addFlashMessage(flashMessage: FlashMessage<unknown>): void;
5
5
  removeFlashMessage(flashMessage: FlashMessage<unknown>, reason: FlashMessageRemovedReason): void;
6
6
  clearFlashMessages(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@42.nl/react-flash-messages",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Storing flash messages via a nice api for use with React.",
5
5
  "files": [
6
6
  "lib"
@@ -21,28 +21,29 @@
21
21
  },
22
22
  "homepage": "https://github.com/42BV/flash-messages#readme",
23
23
  "devDependencies": {
24
- "@testing-library/jest-dom": "5.16.2",
25
- "@testing-library/react": "12.1.4",
26
- "@types/jest": "27.4.1",
27
- "@types/react": "17.0.40",
28
- "@types/react-dom": "17.0.13",
29
- "@typescript-eslint/eslint-plugin": "5.14.0",
30
- "@typescript-eslint/parser": "5.14.0",
31
- "eslint": "8.10.0",
32
- "eslint-config-react-app": "7.0.0",
33
- "eslint-plugin-jest": "26.1.1",
34
- "eslint-plugin-react": "7.29.3",
35
- "eslint-plugin-react-hooks": "4.3.0",
36
- "husky": "7.0.4",
37
- "jest": "27.5.1",
38
- "jest-watch-typeahead": "1.0.0",
39
- "lint-staged": "12.3.5",
40
- "np": "^7.6.0",
41
- "prettier": "2.5.1",
42
- "react": "17.0.2",
43
- "react-dom": "17.0.2",
44
- "ts-jest": "27.1.3",
45
- "typescript": "4.6.2"
24
+ "@testing-library/jest-dom": "5.16.5",
25
+ "@testing-library/react": "14.0.0",
26
+ "@types/jest": "29.4.0",
27
+ "@types/react": "18.0.28",
28
+ "@types/react-dom": "18.0.11",
29
+ "@typescript-eslint/eslint-plugin": "5.52.0",
30
+ "@typescript-eslint/parser": "5.52.0",
31
+ "eslint": "8.34.0",
32
+ "eslint-config-react-app": "7.0.1",
33
+ "eslint-plugin-jest": "27.2.1",
34
+ "eslint-plugin-react": "7.32.2",
35
+ "eslint-plugin-react-hooks": "4.6.0",
36
+ "husky": "8.0.3",
37
+ "jest": "29.4.3",
38
+ "jest-environment-jsdom": "^29.4.3",
39
+ "jest-watch-typeahead": "2.2.2",
40
+ "lint-staged": "13.1.2",
41
+ "np": "^7.6.3",
42
+ "prettier": "2.8.4",
43
+ "react": "18.2.0",
44
+ "react-dom": "18.2.0",
45
+ "ts-jest": "29.0.5",
46
+ "typescript": "4.9.5"
46
47
  },
47
48
  "scripts": {
48
49
  "start": "jest --watch --coverage",
@@ -55,7 +56,7 @@
55
56
  "lint": "npm run lint:test && npm run lint:src",
56
57
  "lint:test": "eslint \"tests/**\" --max-warnings=0",
57
58
  "lint:src": "eslint \"src/**\" --max-warnings=0",
58
- "release": "npm run tsc && np --otp",
59
+ "release": "npm run tsc && np",
59
60
  "dev:publish": "./scripts/dev-publish.sh",
60
61
  "version": "npm run tsc && jekyll build",
61
62
  "prepare": "husky install"