@crystaldesign/diva-navigator 26.6.0-beta.9 → 26.6.0-rc.1

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.
Files changed (26) hide show
  1. package/build/esm/index.js +651 -136
  2. package/build/types/navigator/src/DropdownContainer/index.d.ts +12 -0
  3. package/build/types/navigator/src/DropdownContainer/index.d.ts.map +1 -0
  4. package/build/types/navigator/src/Header/Notifications/Dropdown.d.ts +13 -0
  5. package/build/types/navigator/src/Header/Notifications/Dropdown.d.ts.map +1 -0
  6. package/build/types/navigator/src/Header/Notifications/PopupContent.d.ts +8 -0
  7. package/build/types/navigator/src/Header/Notifications/PopupContent.d.ts.map +1 -0
  8. package/build/types/navigator/src/Header/Notifications/api.d.ts +15 -0
  9. package/build/types/navigator/src/Header/Notifications/api.d.ts.map +1 -0
  10. package/build/types/navigator/src/Header/Notifications/index.d.ts +8 -0
  11. package/build/types/navigator/src/Header/Notifications/index.d.ts.map +1 -0
  12. package/build/types/navigator/src/Header/Notifications/stateUtils.d.ts +6 -0
  13. package/build/types/navigator/src/Header/Notifications/stateUtils.d.ts.map +1 -0
  14. package/build/types/navigator/src/Header/Notifications/types.d.ts +19 -0
  15. package/build/types/navigator/src/Header/Notifications/types.d.ts.map +1 -0
  16. package/build/types/navigator/src/Header/Notifications/useNotifications.d.ts +16 -0
  17. package/build/types/navigator/src/Header/Notifications/useNotifications.d.ts.map +1 -0
  18. package/build/types/navigator/src/Header/index.d.ts.map +1 -1
  19. package/build/types/navigator/src/Profil/index.d.ts.map +1 -1
  20. package/build/types/navigator/src/tests/unit/Header/Notifications/api.test.d.ts +2 -0
  21. package/build/types/navigator/src/tests/unit/Header/Notifications/api.test.d.ts.map +1 -0
  22. package/build/types/navigator/src/tests/unit/Header/Notifications/index.test.d.ts +2 -0
  23. package/build/types/navigator/src/tests/unit/Header/Notifications/index.test.d.ts.map +1 -0
  24. package/build/types/navigator/src/tests/unit/Header/Notifications/stateUtils.test.d.ts +2 -0
  25. package/build/types/navigator/src/tests/unit/Header/Notifications/stateUtils.test.d.ts.map +1 -0
  26. package/package.json +2 -2
@@ -0,0 +1,12 @@
1
+ import React, { CSSProperties, PropsWithChildren } from 'react';
2
+ interface Props {
3
+ open: boolean;
4
+ maxHeight: number;
5
+ top?: number;
6
+ right?: number;
7
+ className?: string;
8
+ style?: CSSProperties;
9
+ }
10
+ export default function DropdownContainer({ open, maxHeight, top, right, className, style, children }: PropsWithChildren<Props>): React.JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/DropdownContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAIhE,UAAU,KAAK;IACb,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,qBAc9H"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { NotificationListItem } from './types';
3
+ interface Props {
4
+ open: boolean;
5
+ items: NotificationListItem[];
6
+ loading: boolean;
7
+ errorMessage?: string;
8
+ onSelect: (id: string) => void;
9
+ onRefresh: () => void;
10
+ }
11
+ export default function NotificationsDropdown({ open, items, loading: isLoading, errorMessage, onSelect, onRefresh }: Props): React.JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=Dropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../../../src/Header/Notifications/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAiBpD,UAAU,KAAK;IACb,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAOD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,qBAqD1H"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { Notification } from './types';
3
+ interface Props {
4
+ notification: Notification;
5
+ }
6
+ export default function NotificationPopupContent({ notification }: Props): React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=PopupContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopupContent.d.ts","sourceRoot":"","sources":["../../../../../../src/Header/Notifications/PopupContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,UAAU,KAAK;IACb,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,qBAUvE"}
@@ -0,0 +1,15 @@
1
+ import type { Notification, NotificationListResponse } from './types';
2
+ export declare class NotificationsApiError extends Error {
3
+ readonly status: number;
4
+ constructor(status: number);
5
+ }
6
+ export interface NotificationsApiContext {
7
+ messageService: string;
8
+ jwt: string;
9
+ }
10
+ export declare function fetchNotifications(userId: string, { limit, offset }: {
11
+ limit: number;
12
+ offset: number;
13
+ }, { messageService, jwt }: NotificationsApiContext): Promise<NotificationListResponse>;
14
+ export declare function fetchNotification(userId: string, communicationId: string, { messageService, jwt }: NotificationsApiContext): Promise<Notification>;
15
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../../src/Header/Notifications/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEtE,qBAAa,qBAAsB,SAAQ,KAAK;aAClB,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM;CAI3C;AAED,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb;AASD,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,EACd,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACpD,EAAE,cAAc,EAAE,GAAG,EAAE,EAAE,uBAAuB,GAC/C,OAAO,CAAC,wBAAwB,CAAC,CAUnC;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,EACvB,EAAE,cAAc,EAAE,GAAG,EAAE,EAAE,uBAAuB,GAC/C,OAAO,CAAC,YAAY,CAAC,CAUvB"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ totalUnread: number;
4
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
5
+ }
6
+ export default function NotificationsBell({ totalUnread, onClick }: Props): React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Header/Notifications/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,KAAK;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC/D;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,KAAK,qBAkBxE"}
@@ -0,0 +1,6 @@
1
+ import type { NotificationListItem } from './types';
2
+ export declare function applyMarkReadUpdate(items: NotificationListItem[], communicationId: string): {
3
+ items: NotificationListItem[];
4
+ decrement: boolean;
5
+ };
6
+ //# sourceMappingURL=stateUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stateUtils.d.ts","sourceRoot":"","sources":["../../../../../../src/Header/Notifications/stateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,oBAAoB,EAAE,EAC7B,eAAe,EAAE,MAAM,GACtB;IAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAUvD"}
@@ -0,0 +1,19 @@
1
+ export interface NotificationListItem {
2
+ _id: string;
3
+ subject: string;
4
+ sentAt: number;
5
+ hasRead: boolean;
6
+ }
7
+ export interface NotificationListResponse {
8
+ data: NotificationListItem[];
9
+ total: number;
10
+ totalUnread: number;
11
+ }
12
+ export interface Notification {
13
+ _id: string;
14
+ subject: string;
15
+ content: string;
16
+ sentAt: number;
17
+ readAt: number;
18
+ }
19
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/Header/Notifications/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,oBAAoB,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { NotificationListItem } from './types';
3
+ export interface NotificationsState {
4
+ enabled: boolean;
5
+ totalUnread: number;
6
+ open: boolean;
7
+ items: NotificationListItem[];
8
+ loading: boolean;
9
+ errorMessage?: string;
10
+ onBellClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
11
+ onSelect: (id: string) => void;
12
+ setOpen: (open: boolean) => void;
13
+ onRefresh: () => void;
14
+ }
15
+ export default function useNotifications(): NotificationsState;
16
+ //# sourceMappingURL=useNotifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNotifications.d.ts","sourceRoot":"","sources":["../../../../../../src/Header/Notifications/useNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAKzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAClE,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,IAAI,kBAAkB,CAkH7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;;AAgBnD,wBA2EG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;;AAmBnD,wBAgGG"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Profil/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,UAAU,KAAK;IACb,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,qBAwDhD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Profil/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,UAAU,KAAK;IACb,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,qBAsDhD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=api.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.test.d.ts","sourceRoot":"","sources":["../../../../../../../../src/tests/unit/Header/Notifications/api.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../../../../../src/tests/unit/Header/Notifications/index.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=stateUtils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stateUtils.test.d.ts","sourceRoot":"","sources":["../../../../../../../../src/tests/unit/Header/Notifications/stateUtils.test.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-navigator",
3
- "version": "26.6.0-beta.9",
3
+ "version": "26.6.0-rc.1",
4
4
  "license": "MIT",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^6.5.0",
@@ -25,5 +25,5 @@
25
25
  },
26
26
  "module": "build/esm/index.js",
27
27
  "types": "./build/types/navigator/src/index.d.ts",
28
- "gitHead": "0ab8386d03704240ab430bf0121060c7d9234e12"
28
+ "gitHead": "bef68a1e25644ad7155ec7c1c003bf295a2275ea"
29
29
  }