@teambit/notifications 1.0.107 → 1.0.108

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.
@@ -1,5 +1,5 @@
1
1
  import { Message } from '@teambit/ui-foundation.ui.notifications.store';
2
- export declare type NotificationAction = {
2
+ export type NotificationAction = {
3
3
  type: 'add' | 'dismiss' | 'clear';
4
4
  content?: Message;
5
5
  id?: string;
@@ -77,9 +77,8 @@ class NotificationUI {
77
77
  _defineProperty(this, "dispatch", void 0);
78
78
  /** adds a full message to the log */
79
79
  _defineProperty(this, "add", (message, level) => {
80
- var _this$dispatch;
81
80
  const id = (0, _uuid().v1)();
82
- (_this$dispatch = this.dispatch) === null || _this$dispatch === void 0 || _this$dispatch.call(this, {
81
+ this.dispatch?.({
83
82
  type: 'add',
84
83
  content: {
85
84
  id,
@@ -100,8 +99,7 @@ class NotificationUI {
100
99
  _defineProperty(this, "success", message => this.add(message, _uiFoundationUiNotifications3().MessageLevel.success));
101
100
  /** removes all notifications */
102
101
  _defineProperty(this, "clear", () => {
103
- var _this$dispatch2;
104
- (_this$dispatch2 = this.dispatch) === null || _this$dispatch2 === void 0 || _this$dispatch2.call(this, {
102
+ this.dispatch?.({
105
103
  type: 'clear'
106
104
  });
107
105
  });
@@ -129,8 +127,7 @@ class NotificationUI {
129
127
  }
130
128
  /** removes/archives a message from the log */
131
129
  dismiss(id) {
132
- var _this$dispatch3;
133
- (_this$dispatch3 = this.dispatch) === null || _this$dispatch3 === void 0 || _this$dispatch3.call(this, {
130
+ this.dispatch?.({
134
131
  type: 'dismiss',
135
132
  id
136
133
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_ui","data","require","_react","_interopRequireWildcard","_uuid","_uiFoundationUiNotifications","_uiFoundationUiNotifications2","_uiFoundationUiNotifications3","_notificationReducer","_notifications","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_defineProperty","obj","value","_toPropertyKey","enumerable","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","Number","NotificationUI","provider","uiRuntimeExtension","constructor","message","level","_this$dispatch","id","v1","dispatch","type","content","time","Date","toISOString","add","MessageLevel","info","warning","error","success","_this$dispatch2","props","messages","useReducer","notificationReducer","createElement","NotificationCenter","notifications","children","NotificationContext","Provider","registerHudItem","render","registerRenderHooks","reactContext","renderContext","dismiss","_this$dispatch3","exports","UIAspect","UIRuntime","NotificationsAspect","addRuntime"],"sources":["notification.ui.runtime.tsx"],"sourcesContent":["import { UIAspect, UIRuntime, UiUI } from '@teambit/ui';\nimport React, { ReactNode, useReducer } from 'react';\nimport { v1 } from 'uuid';\n\nimport { NotificationContext } from '@teambit/ui-foundation.ui.notifications.notification-context';\nimport {\n NotificationCenter,\n NotificationCenterProps,\n} from '@teambit/ui-foundation.ui.notifications.notification-center';\nimport { MessageLevel, NotificationsStore } from '@teambit/ui-foundation.ui.notifications.store';\nimport { NotificationAction, notificationReducer } from './notification-reducer';\nimport { NotificationsAspect } from './notifications.aspect';\n\n/**\n * extension\n */\nexport default class NotificationUI implements NotificationsStore {\n static dependencies = [UIAspect];\n\n static runtime = UIRuntime;\n\n static async provider([uiRuntimeExtension]: [UiUI]) {\n return new NotificationUI(uiRuntimeExtension);\n }\n\n constructor(uiRuntimeExtension: UiUI) {\n uiRuntimeExtension.registerHudItem(<this.render key=\"NotificationUI\" />);\n uiRuntimeExtension.registerRenderHooks({ reactContext: this.renderContext });\n }\n\n private dispatch?: React.Dispatch<NotificationAction>;\n\n /** adds a full message to the log */\n add = (message: string, level: MessageLevel) => {\n const id = v1();\n\n this.dispatch?.({\n type: 'add',\n content: {\n id,\n message,\n level,\n time: new Date().toISOString(),\n },\n });\n\n return id;\n };\n\n /** removes/archives a message from the log */\n dismiss(id: string) {\n this.dispatch?.({\n type: 'dismiss',\n id,\n });\n }\n\n /** adds a message with level \"info\" to the log */\n log = (message: string) => this.add(message, MessageLevel.info);\n /** adds a message with level \"warning\" to the log */\n warn = (message: string) => this.add(message, MessageLevel.warning);\n /** adds a message with level \"error\" to the log */\n error = (message: string) => this.add(message, MessageLevel.error);\n /** adds a message with level \"success\" to the log */\n success = (message: string) => this.add(message, MessageLevel.success);\n\n /** removes all notifications */\n clear = () => {\n this.dispatch?.({\n type: 'clear',\n });\n };\n\n private render = (props: Omit<NotificationCenterProps, 'notifications'>) => {\n // this code assumes a single place of render per instance of NotificationUI\n const [messages, dispatch] = useReducer(notificationReducer, []);\n this.dispatch = dispatch;\n\n return <NotificationCenter {...props} notifications={messages} />;\n };\n\n private renderContext = ({ children }: { children: ReactNode }) => {\n return <NotificationContext.Provider value={this}>{children}</NotificationContext.Provider>;\n };\n}\n\nNotificationsAspect.addRuntime(NotificationUI);\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,uBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,6BAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,4BAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,8BAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,6BAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAO,8BAAA;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Ab,eAAA,CApEoBa,cAAc,kBACX,CAACwC,cAAQ,CAAC;AAAArD,eAAA,CADba,cAAc,aAGhByC,eAAS;AAmE5BC,oCAAmB,CAACC,UAAU,CAAC3C,cAAc,CAAC"}
1
+ {"version":3,"names":["_ui","data","require","_react","_interopRequireWildcard","_uuid","_uiFoundationUiNotifications","_uiFoundationUiNotifications2","_uiFoundationUiNotifications3","_notificationReducer","_notifications","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_extends","assign","bind","target","arguments","length","source","key","apply","_defineProperty","obj","value","_toPropertyKey","enumerable","configurable","writable","_toPrimitive","String","Symbol","toPrimitive","TypeError","Number","NotificationUI","provider","uiRuntimeExtension","constructor","message","level","id","v1","dispatch","type","content","time","Date","toISOString","add","MessageLevel","info","warning","error","success","props","messages","useReducer","notificationReducer","createElement","NotificationCenter","notifications","children","NotificationContext","Provider","registerHudItem","render","registerRenderHooks","reactContext","renderContext","dismiss","exports","UIAspect","UIRuntime","NotificationsAspect","addRuntime"],"sources":["notification.ui.runtime.tsx"],"sourcesContent":["import { UIAspect, UIRuntime, UiUI } from '@teambit/ui';\nimport React, { ReactNode, useReducer } from 'react';\nimport { v1 } from 'uuid';\n\nimport { NotificationContext } from '@teambit/ui-foundation.ui.notifications.notification-context';\nimport {\n NotificationCenter,\n NotificationCenterProps,\n} from '@teambit/ui-foundation.ui.notifications.notification-center';\nimport { MessageLevel, NotificationsStore } from '@teambit/ui-foundation.ui.notifications.store';\nimport { NotificationAction, notificationReducer } from './notification-reducer';\nimport { NotificationsAspect } from './notifications.aspect';\n\n/**\n * extension\n */\nexport default class NotificationUI implements NotificationsStore {\n static dependencies = [UIAspect];\n\n static runtime = UIRuntime;\n\n static async provider([uiRuntimeExtension]: [UiUI]) {\n return new NotificationUI(uiRuntimeExtension);\n }\n\n constructor(uiRuntimeExtension: UiUI) {\n uiRuntimeExtension.registerHudItem(<this.render key=\"NotificationUI\" />);\n uiRuntimeExtension.registerRenderHooks({ reactContext: this.renderContext });\n }\n\n private dispatch?: React.Dispatch<NotificationAction>;\n\n /** adds a full message to the log */\n add = (message: string, level: MessageLevel) => {\n const id = v1();\n\n this.dispatch?.({\n type: 'add',\n content: {\n id,\n message,\n level,\n time: new Date().toISOString(),\n },\n });\n\n return id;\n };\n\n /** removes/archives a message from the log */\n dismiss(id: string) {\n this.dispatch?.({\n type: 'dismiss',\n id,\n });\n }\n\n /** adds a message with level \"info\" to the log */\n log = (message: string) => this.add(message, MessageLevel.info);\n /** adds a message with level \"warning\" to the log */\n warn = (message: string) => this.add(message, MessageLevel.warning);\n /** adds a message with level \"error\" to the log */\n error = (message: string) => this.add(message, MessageLevel.error);\n /** adds a message with level \"success\" to the log */\n success = (message: string) => this.add(message, MessageLevel.success);\n\n /** removes all notifications */\n clear = () => {\n this.dispatch?.({\n type: 'clear',\n });\n };\n\n private render = (props: Omit<NotificationCenterProps, 'notifications'>) => {\n // this code assumes a single place of render per instance of NotificationUI\n const [messages, dispatch] = useReducer(notificationReducer, []);\n this.dispatch = dispatch;\n\n return <NotificationCenter {...props} notifications={messages} />;\n };\n\n private renderContext = ({ children }: { children: ReactNode }) => {\n return <NotificationContext.Provider value={this}>{children}</NotificationContext.Provider>;\n };\n}\n\nNotificationsAspect.addRuntime(NotificationUI);\n"],"mappings":";;;;;;AAAA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,OAAA;EAAA,MAAAF,IAAA,GAAAG,uBAAA,CAAAF,OAAA;EAAAC,MAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAA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IACF,CAAC,CAAC;EACJ;AA6BF;AAAC8B,OAAA,CAAAzE,OAAA,GAAAqC,cAAA;AAAAb,eAAA,CApEoBa,cAAc,kBACX,CAACqC,cAAQ,CAAC;AAAAlD,eAAA,CADba,cAAc,aAGhBsC,eAAS;AAmE5BC,oCAAmB,CAACC,UAAU,CAACxC,cAAc,CAAC"}
package/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { NotificationsAspect } from './notifications.aspect';
2
+
3
+ export type { default as NotificationUI } from './notification.ui.runtime';
4
+
5
+ export { NotificationsAspect };
6
+ export default NotificationsAspect;
@@ -0,0 +1,7 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+
3
+ export const NotificationsAspect = Aspect.create({
4
+ id: 'teambit.ui-foundation/notifications',
5
+ });
6
+
7
+ export default NotificationsAspect;
package/package.json CHANGED
@@ -1,36 +1,32 @@
1
1
  {
2
2
  "name": "@teambit/notifications",
3
- "version": "1.0.107",
3
+ "version": "1.0.108",
4
4
  "homepage": "https://bit.cloud/teambit/ui-foundation/notifications",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.ui-foundation",
8
8
  "name": "notifications",
9
- "version": "1.0.107"
9
+ "version": "1.0.108"
10
10
  },
11
11
  "dependencies": {
12
12
  "uuid": "8.3.2",
13
- "core-js": "^3.0.0",
14
- "@babel/runtime": "7.20.0",
15
13
  "@teambit/ui-foundation.ui.notifications.store": "0.0.500",
16
14
  "@teambit/ui-foundation.ui.notifications.notification-center": "0.0.523",
17
15
  "@teambit/ui-foundation.ui.notifications.notification-context": "0.0.501",
18
16
  "@teambit/harmony": "0.4.6",
19
- "@teambit/ui": "1.0.107"
17
+ "@teambit/ui": "1.0.108"
20
18
  },
21
19
  "devDependencies": {
22
- "@types/react": "^17.0.8",
23
20
  "@types/uuid": "8.3.4",
24
21
  "@types/mocha": "9.1.0",
25
- "@types/node": "12.20.4",
26
- "@types/react-dom": "^17.0.5",
27
- "@types/jest": "^26.0.0",
28
- "@types/testing-library__jest-dom": "5.9.5"
22
+ "@types/jest": "^29.2.2",
23
+ "@types/testing-library__jest-dom": "^5.9.5",
24
+ "@teambit/harmony.envs.core-aspect-env": "0.0.13"
29
25
  },
30
26
  "peerDependencies": {
31
- "@teambit/legacy": "1.0.624",
32
- "react": "^16.8.0 || ^17.0.0",
33
- "react-dom": "^16.8.0 || ^17.0.0"
27
+ "react": "^17.0.0 || ^18.0.0",
28
+ "@types/react": "^18.2.12",
29
+ "@teambit/legacy": "1.0.624"
34
30
  },
35
31
  "license": "Apache-2.0",
36
32
  "optionalDependencies": {},
@@ -44,7 +40,7 @@
44
40
  },
45
41
  "private": false,
46
42
  "engines": {
47
- "node": ">=12.22.0"
43
+ "node": ">=16.0.0"
48
44
  },
49
45
  "repository": {
50
46
  "type": "git",
@@ -53,12 +49,9 @@
53
49
  "keywords": [
54
50
  "bit",
55
51
  "bit-aspect",
52
+ "bit-core-aspect",
56
53
  "components",
57
54
  "collaboration",
58
- "web",
59
- "react",
60
- "react-components",
61
- "angular",
62
- "angular-components"
55
+ "web"
63
56
  ]
64
57
  }
package/tsconfig.json CHANGED
@@ -1,38 +1,33 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "lib": [
4
- "es2019",
5
- "DOM",
6
- "ES6",
7
- "DOM.Iterable",
8
- "ScriptHost"
4
+ "esnext",
5
+ "dom",
6
+ "dom.Iterable"
9
7
  ],
10
- "target": "es2015",
11
- "module": "CommonJS",
12
- "jsx": "react",
13
- "allowJs": true,
14
- "composite": true,
8
+ "target": "es2020",
9
+ "module": "es2020",
10
+ "jsx": "react-jsx",
15
11
  "declaration": true,
16
12
  "sourceMap": true,
17
- "skipLibCheck": true,
18
13
  "experimentalDecorators": true,
19
- "outDir": "dist",
14
+ "skipLibCheck": true,
20
15
  "moduleResolution": "node",
21
16
  "esModuleInterop": true,
22
- "rootDir": ".",
23
17
  "resolveJsonModule": true,
24
- "emitDeclarationOnly": true,
25
- "emitDecoratorMetadata": true,
26
- "allowSyntheticDefaultImports": true,
27
- "strictPropertyInitialization": false,
28
- "strict": true,
29
- "noImplicitAny": false,
30
- "preserveConstEnums": true
18
+ "allowJs": true,
19
+ "outDir": "dist",
20
+ "emitDeclarationOnly": true
31
21
  },
32
22
  "exclude": [
23
+ "artifacts",
24
+ "public",
33
25
  "dist",
26
+ "node_modules",
27
+ "package.json",
34
28
  "esm.mjs",
35
- "package.json"
29
+ "**/*.cjs",
30
+ "./dist"
36
31
  ],
37
32
  "include": [
38
33
  "**/*",
package/types/asset.d.ts CHANGED
@@ -5,12 +5,12 @@ declare module '*.png' {
5
5
  declare module '*.svg' {
6
6
  import type { FunctionComponent, SVGProps } from 'react';
7
7
 
8
- export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
8
+ export const ReactComponent: FunctionComponent<
9
+ SVGProps<SVGSVGElement> & { title?: string }
10
+ >;
9
11
  const src: string;
10
12
  export default src;
11
13
  }
12
-
13
- // @TODO Gilad
14
14
  declare module '*.jpg' {
15
15
  const value: any;
16
16
  export = value;
@@ -27,3 +27,15 @@ declare module '*.bmp' {
27
27
  const value: any;
28
28
  export = value;
29
29
  }
30
+ declare module '*.otf' {
31
+ const value: any;
32
+ export = value;
33
+ }
34
+ declare module '*.woff' {
35
+ const value: any;
36
+ export = value;
37
+ }
38
+ declare module '*.woff2' {
39
+ const value: any;
40
+ export = value;
41
+ }