@teambit/notifications 1.0.667 → 1.0.669

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,4 +1,4 @@
1
- import { Message } from '@teambit/ui-foundation.ui.notifications.store';
1
+ import type { Message } from '@teambit/ui-foundation.ui.notifications.store';
2
2
  export type NotificationAction = {
3
3
  type: 'add' | 'dismiss' | 'clear';
4
4
  content?: Message;
@@ -1 +1 @@
1
- {"version":3,"names":["notificationReducer","state","action","type","filter","x","id","content","concat"],"sources":["notification-reducer.tsx"],"sourcesContent":["import { Message } from '@teambit/ui-foundation.ui.notifications.store';\n\nexport type NotificationAction = {\n type: 'add' | 'dismiss' | 'clear';\n content?: Message;\n id?: string;\n};\n\nexport function notificationReducer(state: Message[], action: NotificationAction) {\n switch (action.type) {\n case 'dismiss':\n return state.filter((x) => x.id !== action.id);\n case 'add':\n if (!action.content) return state;\n return state.concat(action.content);\n case 'clear':\n return [];\n default:\n return state;\n }\n}\n"],"mappings":";;;;;;AAQO,SAASA,mBAAmBA,CAACC,KAAgB,EAAEC,MAA0B,EAAE;EAChF,QAAQA,MAAM,CAACC,IAAI;IACjB,KAAK,SAAS;MACZ,OAAOF,KAAK,CAACG,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAACC,EAAE,KAAKJ,MAAM,CAACI,EAAE,CAAC;IAChD,KAAK,KAAK;MACR,IAAI,CAACJ,MAAM,CAACK,OAAO,EAAE,OAAON,KAAK;MACjC,OAAOA,KAAK,CAACO,MAAM,CAACN,MAAM,CAACK,OAAO,CAAC;IACrC,KAAK,OAAO;MACV,OAAO,EAAE;IACX;MACE,OAAON,KAAK;EAChB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["notificationReducer","state","action","type","filter","x","id","content","concat"],"sources":["notification-reducer.tsx"],"sourcesContent":["import type { Message } from '@teambit/ui-foundation.ui.notifications.store';\n\nexport type NotificationAction = {\n type: 'add' | 'dismiss' | 'clear';\n content?: Message;\n id?: string;\n};\n\nexport function notificationReducer(state: Message[], action: NotificationAction) {\n switch (action.type) {\n case 'dismiss':\n return state.filter((x) => x.id !== action.id);\n case 'add':\n if (!action.content) return state;\n return state.concat(action.content);\n case 'clear':\n return [];\n default:\n return state;\n }\n}\n"],"mappings":";;;;;;AAQO,SAASA,mBAAmBA,CAACC,KAAgB,EAAEC,MAA0B,EAAE;EAChF,QAAQA,MAAM,CAACC,IAAI;IACjB,KAAK,SAAS;MACZ,OAAOF,KAAK,CAACG,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAACC,EAAE,KAAKJ,MAAM,CAACI,EAAE,CAAC;IAChD,KAAK,KAAK;MACR,IAAI,CAACJ,MAAM,CAACK,OAAO,EAAE,OAAON,KAAK;MACjC,OAAOA,KAAK,CAACO,MAAM,CAACN,MAAM,CAACK,OAAO,CAAC;IACrC,KAAK,OAAO;MACV,OAAO,EAAE;IACX;MACE,OAAON,KAAK;EAChB;AACF","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import { UiUI } from '@teambit/ui';
2
- import { MessageLevel, NotificationsStore } from '@teambit/ui-foundation.ui.notifications.store';
1
+ import type { UiUI } from '@teambit/ui';
2
+ import type { NotificationsStore } from '@teambit/ui-foundation.ui.notifications.store';
3
+ import { MessageLevel } from '@teambit/ui-foundation.ui.notifications.store';
3
4
  /**
4
5
  * extension
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"names":["_ui","data","require","_react","_interopRequireWildcard","_uuid","_uiFoundationUiNotifications","_uiFoundationUiNotifications2","_uiFoundationUiNotifications3","_notificationReducer","_notifications","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","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","key","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,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;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,6BAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,qBAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,oBAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EA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;MACjE,oBAAOxE,MAAA,GAAAkB,OAAA,CAAAmD,aAAA,CAAClE,4BAAA,GAAAsE,mBAAmB,CAACC,QAAQ;QAACvC,KAAK,EAAE;MAAK,GAAEqC,QAAuC,CAAC;IAC7F,CAAC;IAzDCzB,kBAAkB,CAAC4B,eAAe,cAAC3E,MAAA,GAAAkB,OAAA,CAAAmD,aAAA,MAAMO,MAAM;MAACC,GAAG,EAAC;IAAgB,CAAE,CAAC,CAAC;IACxE9B,kBAAkB,CAAC+B,mBAAmB,CAAC;MAAEC,YAAY,EAAE,IAAI,CAACC;IAAc,CAAC,CAAC;EAC9E;EAqBA;EACAC,OAAOA,CAAC9B,EAAU,EAAE;IAClB,IAAI,CAACE,QAAQ,GAAG;MACdC,IAAI,EAAE,SAAS;MACfH;IACF,CAAC,CAAC;EACJ;AA6BF;AAAC+B,OAAA,CAAAhE,OAAA,GAAA2B,cAAA;AAAAZ,eAAA,CApEoBY,cAAc,kBACX,CAACsC,cAAQ,CAAC;AAAAlD,eAAA,CADbY,cAAc,aAGhBuC,eAAS;AAmE5BC,oCAAmB,CAACC,UAAU,CAACzC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_ui","data","require","_react","_interopRequireWildcard","_uuid","_uiFoundationUiNotifications","_uiFoundationUiNotifications2","_uiFoundationUiNotifications3","_notificationReducer","_notifications","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","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","key","registerRenderHooks","reactContext","renderContext","dismiss","exports","UIAspect","UIRuntime","NotificationsAspect","addRuntime"],"sources":["notification.ui.runtime.tsx"],"sourcesContent":["import type { UiUI } from '@teambit/ui';\nimport { UIAspect, UIRuntime } from '@teambit/ui';\nimport type { ReactNode } from 'react';\nimport React, { useReducer } from 'react';\nimport { v1 } from 'uuid';\n\nimport { NotificationContext } from '@teambit/ui-foundation.ui.notifications.notification-context';\nimport type { NotificationCenterProps } from '@teambit/ui-foundation.ui.notifications.notification-center';\nimport { NotificationCenter } from '@teambit/ui-foundation.ui.notifications.notification-center';\nimport type { NotificationsStore } from '@teambit/ui-foundation.ui.notifications.store';\nimport { MessageLevel } from '@teambit/ui-foundation.ui.notifications.store';\nimport type { NotificationAction } from './notification-reducer';\nimport { 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":";;;;;;AACA,SAAAA,IAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,GAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,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;AAEA,SAAAM,8BAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,6BAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,8BAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,6BAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,qBAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,oBAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;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GAAAkB,OAAA,CAAAmD,aAAA,CAAClE,4BAAA,GAAAsE,mBAAmB,CAACC,QAAQ;QAACvC,KAAK,EAAE;MAAK,GAAEqC,QAAuC,CAAC;IAC7F,CAAC;IAzDCzB,kBAAkB,CAAC4B,eAAe,cAAC3E,MAAA,GAAAkB,OAAA,CAAAmD,aAAA,MAAMO,MAAM;MAACC,GAAG,EAAC;IAAgB,CAAE,CAAC,CAAC;IACxE9B,kBAAkB,CAAC+B,mBAAmB,CAAC;MAAEC,YAAY,EAAE,IAAI,CAACC;IAAc,CAAC,CAAC;EAC9E;EAqBA;EACAC,OAAOA,CAAC9B,EAAU,EAAE;IAClB,IAAI,CAACE,QAAQ,GAAG;MACdC,IAAI,EAAE,SAAS;MACfH;IACF,CAAC,CAAC;EACJ;AA6BF;AAAC+B,OAAA,CAAAhE,OAAA,GAAA2B,cAAA;AAAAZ,eAAA,CApEoBY,cAAc,kBACX,CAACsC,cAAQ,CAAC;AAAAlD,eAAA,CADbY,cAAc,aAGhBuC,eAAS;AAmE5BC,oCAAmB,CAACC,UAAU,CAACzC,cAAc,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { Message } from '@teambit/ui-foundation.ui.notifications.store';
1
+ import type { Message } from '@teambit/ui-foundation.ui.notifications.store';
2
2
 
3
3
  export type NotificationAction = {
4
4
  type: 'add' | 'dismiss' | 'clear';
@@ -1,14 +1,16 @@
1
- import { UIAspect, UIRuntime, UiUI } from '@teambit/ui';
2
- import React, { ReactNode, useReducer } from 'react';
1
+ import type { UiUI } from '@teambit/ui';
2
+ import { UIAspect, UIRuntime } from '@teambit/ui';
3
+ import type { ReactNode } from 'react';
4
+ import React, { useReducer } from 'react';
3
5
  import { v1 } from 'uuid';
4
6
 
5
7
  import { NotificationContext } from '@teambit/ui-foundation.ui.notifications.notification-context';
6
- import {
7
- NotificationCenter,
8
- NotificationCenterProps,
9
- } from '@teambit/ui-foundation.ui.notifications.notification-center';
10
- import { MessageLevel, NotificationsStore } from '@teambit/ui-foundation.ui.notifications.store';
11
- import { NotificationAction, notificationReducer } from './notification-reducer';
8
+ import type { NotificationCenterProps } from '@teambit/ui-foundation.ui.notifications.notification-center';
9
+ import { NotificationCenter } from '@teambit/ui-foundation.ui.notifications.notification-center';
10
+ import type { NotificationsStore } from '@teambit/ui-foundation.ui.notifications.store';
11
+ import { MessageLevel } from '@teambit/ui-foundation.ui.notifications.store';
12
+ import type { NotificationAction } from './notification-reducer';
13
+ import { notificationReducer } from './notification-reducer';
12
14
  import { NotificationsAspect } from './notifications.aspect';
13
15
 
14
16
  /**
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/notifications",
3
- "version": "1.0.667",
3
+ "version": "1.0.669",
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.667"
9
+ "version": "1.0.669"
10
10
  },
11
11
  "dependencies": {
12
12
  "uuid": "8.3.2",
@@ -14,7 +14,7 @@
14
14
  "@teambit/ui-foundation.ui.notifications.notification-center": "0.0.523",
15
15
  "@teambit/ui-foundation.ui.notifications.notification-context": "0.0.501",
16
16
  "@teambit/harmony": "0.4.7",
17
- "@teambit/ui": "1.0.667"
17
+ "@teambit/ui": "1.0.669"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/uuid": "8.3.4",