@planningcenter/topbar 7.2.2-people.0 → 7.3.0-alpha.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/CHANGELOG.md +14 -2
- package/dist/modules/components/NotificationsMenuBlankState.d.ts +12 -7
- package/dist/modules/components/apps_menu.d.ts +2 -6
- package/dist/modules/components/conditional_wrap.d.ts +1 -1
- package/dist/modules/components/notification_item.d.ts +2 -1
- package/dist/modules/components/notifications_inbox.d.ts +18 -14
- package/dist/modules/components/notifications_menu.d.ts +2 -3
- package/dist/modules/components/notifications_menu_blank_state.d.ts +1 -1
- package/dist/modules/components/outsider.d.ts +1 -1
- package/dist/modules/dummy_data.d.ts +3 -3
- package/dist/modules/formatters.d.ts +1 -13
- package/dist/modules/hooks/use_local_storage.d.ts +10 -0
- package/dist/modules/hooks/use_notifications.d.ts +3 -1
- package/dist/modules/hooks/use_topbar_api.d.ts +8 -0
- package/dist/modules/topbar_context.d.ts +5 -0
- package/dist/topbar.js +1 -1
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +1 -1
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +1 -1
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +1 -1
- package/dist/topbar.umd.js.map +1 -1
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/modules/api_request.d.ts +24 -0
- package/dist/types/modules/api_request.d.ts.map +1 -0
- package/dist/types/modules/apps_provider.d.ts +13 -0
- package/dist/types/modules/apps_provider.d.ts.map +1 -0
- package/dist/types/modules/avatar.d.ts +8 -0
- package/dist/types/modules/avatar.d.ts.map +1 -0
- package/dist/types/modules/client_storage.d.ts +13 -0
- package/dist/types/modules/client_storage.d.ts.map +1 -0
- package/dist/types/modules/color_app_icon.d.ts +6 -0
- package/dist/types/modules/color_app_icon.d.ts.map +1 -0
- package/dist/types/modules/color_app_squircles.d.ts +15 -0
- package/dist/types/modules/color_app_squircles.d.ts.map +1 -0
- package/dist/types/modules/colors.d.ts +47 -0
- package/dist/types/modules/colors.d.ts.map +1 -0
- package/dist/types/modules/components/apps_button.d.ts +11 -0
- package/dist/types/modules/components/apps_button.d.ts.map +1 -0
- package/dist/types/modules/components/apps_menu.d.ts +12 -0
- package/dist/types/modules/components/apps_menu.d.ts.map +1 -0
- package/dist/types/modules/components/conditional_wrap.d.ts +8 -0
- package/dist/types/modules/components/conditional_wrap.d.ts.map +1 -0
- package/dist/types/modules/components/eyebrow.d.ts +7 -0
- package/dist/types/modules/components/eyebrow.d.ts.map +1 -0
- package/dist/types/modules/components/hoverable.d.ts +12 -0
- package/dist/types/modules/components/hoverable.d.ts.map +1 -0
- package/dist/types/modules/components/hoverable_list_item.d.ts +10 -0
- package/dist/types/modules/components/hoverable_list_item.d.ts.map +1 -0
- package/dist/types/modules/components/notification_bell.d.ts +7 -0
- package/dist/types/modules/components/notification_bell.d.ts.map +1 -0
- package/dist/types/modules/components/notification_item.d.ts +12 -0
- package/dist/types/modules/components/notification_item.d.ts.map +1 -0
- package/dist/types/modules/components/notifications_menu.d.ts +18 -0
- package/dist/types/modules/components/notifications_menu.d.ts.map +1 -0
- package/dist/types/modules/components/notifications_menu_blank_state.d.ts +9 -0
- package/dist/types/modules/components/notifications_menu_blank_state.d.ts.map +1 -0
- package/dist/types/modules/components/notifications_menu_wrapper.d.ts +8 -0
- package/dist/types/modules/components/notifications_menu_wrapper.d.ts.map +1 -0
- package/dist/types/modules/components/outsider.d.ts +14 -0
- package/dist/types/modules/components/outsider.d.ts.map +1 -0
- package/dist/types/modules/components/popover_root.d.ts +7 -0
- package/dist/types/modules/components/popover_root.d.ts.map +1 -0
- package/dist/types/modules/components/popup.d.ts +10 -0
- package/dist/types/modules/components/popup.d.ts.map +1 -0
- package/dist/types/modules/components/popup_root.d.ts +7 -0
- package/dist/types/modules/components/popup_root.d.ts.map +1 -0
- package/dist/types/modules/components/spinner.d.ts +5 -0
- package/dist/types/modules/components/spinner.d.ts.map +1 -0
- package/dist/types/modules/connected_people_provider.d.ts +22 -0
- package/dist/types/modules/connected_people_provider.d.ts.map +1 -0
- package/dist/types/modules/display_switch.d.ts +27 -0
- package/dist/types/modules/display_switch.d.ts.map +1 -0
- package/dist/types/modules/formatters.d.ts +4 -0
- package/dist/types/modules/formatters.d.ts.map +1 -0
- package/dist/types/modules/get_apps_switch_product_path.d.ts +2 -0
- package/dist/types/modules/get_apps_switch_product_path.d.ts.map +1 -0
- package/dist/types/modules/hooks/use_hover.d.ts +4 -0
- package/dist/types/modules/hooks/use_hover.d.ts.map +1 -0
- package/dist/types/modules/hooks/use_local_storage.d.ts +8 -0
- package/dist/types/modules/hooks/use_local_storage.d.ts.map +1 -0
- package/dist/types/modules/hooks/use_notifications.d.ts +17 -0
- package/dist/types/modules/hooks/use_notifications.d.ts.map +1 -0
- package/dist/types/modules/hooks/use_topbar_api.d.ts +9 -0
- package/dist/types/modules/hooks/use_topbar_api.d.ts.map +1 -0
- package/dist/types/modules/interfaces.d.ts +55 -0
- package/dist/types/modules/interfaces.d.ts.map +1 -0
- package/dist/types/modules/medium_topbar.d.ts +39 -0
- package/dist/types/modules/medium_topbar.d.ts.map +1 -0
- package/dist/types/modules/mono_app_icon.d.ts +8 -0
- package/dist/types/modules/mono_app_icon.d.ts.map +1 -0
- package/dist/types/modules/mono_app_name.d.ts +7 -0
- package/dist/types/modules/mono_app_name.d.ts.map +1 -0
- package/dist/types/modules/mono_app_symbols.d.ts +44 -0
- package/dist/types/modules/mono_app_symbols.d.ts.map +1 -0
- package/dist/types/modules/mono_app_text.d.ts +54 -0
- package/dist/types/modules/mono_app_text.d.ts.map +1 -0
- package/dist/types/modules/not_small_topbar.d.ts +45 -0
- package/dist/types/modules/not_small_topbar.d.ts.map +1 -0
- package/dist/types/modules/platform_announcements.d.ts +32 -0
- package/dist/types/modules/platform_announcements.d.ts.map +1 -0
- package/dist/types/modules/product_announcement.d.ts +20 -0
- package/dist/types/modules/product_announcement.d.ts.map +1 -0
- package/dist/types/modules/profile_container.d.ts +10 -0
- package/dist/types/modules/profile_container.d.ts.map +1 -0
- package/dist/types/modules/small_topbar.d.ts +42 -0
- package/dist/types/modules/small_topbar.d.ts.map +1 -0
- package/dist/types/modules/styled_root.d.ts +7 -0
- package/dist/types/modules/styled_root.d.ts.map +1 -0
- package/dist/types/modules/styles.d.ts +10 -0
- package/dist/types/modules/styles.d.ts.map +1 -0
- package/dist/types/modules/symbols.d.ts +33 -0
- package/dist/types/modules/symbols.d.ts.map +1 -0
- package/dist/types/modules/topbar_context.d.ts +6 -0
- package/dist/types/modules/topbar_context.d.ts.map +1 -0
- package/dist/types/modules/unbutton.d.ts +12 -0
- package/dist/types/modules/unbutton.d.ts.map +1 -0
- package/dist/types/modules/utils.d.ts +2 -0
- package/dist/types/modules/utils.d.ts.map +1 -0
- package/package.json +29 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased notifications]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Notification bell, indicator, and dropdown that displayes the current user's read and unread notifications. On initial load, a GET request is sent to the notifications API and its response is used to populate the unread indicator. To use dummy data instead, you can pass `useDummyNotifications={true}` when calling any `Topbar` component.
|
|
12
|
+
- Subscribe to push notifications via Jolt after initial load. This is a naive implementation in that whenever a push event is received, a fresh GET request is sent to the notifications API endpoint to retrieve the current state of ALL of the user's notifications.
|
|
13
|
+
- Set a baseline prettier config
|
|
14
|
+
|
|
3
15
|
## [7.2.1] - 2021-12-09
|
|
4
16
|
|
|
5
|
-
###
|
|
17
|
+
### Fixed
|
|
6
18
|
- Bug z-stacking Safari bug that caused expanded `smalltopbar` items to show up behind elements [#46](https://github.com/ministrycentered/topbar/pull/46)
|
|
7
19
|
- Bug causing user settings to be hidden on mobile when Home wasn't enabled for the user [#47](https://github.com/ministrycentered/topbar/pull/47)
|
|
8
20
|
|
|
@@ -32,7 +44,6 @@
|
|
|
32
44
|
### Added
|
|
33
45
|
- Add Home to the app switcher dropdown
|
|
34
46
|
|
|
35
|
-
|
|
36
47
|
## [7.0.0] - 2021-10-01
|
|
37
48
|
|
|
38
49
|
- Add CSRF support to login ([#46](https://github.com/planningcenter/design/pull/46) @danielma)
|
|
@@ -83,6 +94,7 @@ Versions entries to this changelog weren't tracked very well and were presented
|
|
|
83
94
|
|
|
84
95
|
|
|
85
96
|
|
|
97
|
+
[Unreleased notifications]: https://github.com/ministrycentered/topbar/compare/@planningcenter/topbar@7.2.1..notifications
|
|
86
98
|
[7.2.1]: https://github.com/ministrycentered/topbar/compare/v7.2.0..v7.2.1
|
|
87
99
|
[7.2.0]: https://github.com/ministrycentered/topbar/compare/v7.1.3..v7.2.0
|
|
88
100
|
[7.1.3]: https://github.com/ministrycentered/topbar/compare/v7.1.2..v7.1.3
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const NotificationsMenuBlankState: ({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const NotificationsMenuBlankState: ({
|
|
3
|
+
description,
|
|
4
|
+
style,
|
|
5
|
+
title,
|
|
6
|
+
...props
|
|
7
|
+
}: {
|
|
8
|
+
description: string
|
|
9
|
+
style?: object
|
|
10
|
+
title?: string
|
|
11
|
+
}) => JSX.Element
|
|
12
|
+
export default NotificationsMenuBlankState
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as PCO_URL from "@planningcenter/url";
|
|
3
|
+
import { App } from "../interfaces";
|
|
3
4
|
declare const AppsMenu: ({ appName, apps, env, toggle, visible, }: {
|
|
4
5
|
appName: string;
|
|
5
|
-
apps:
|
|
6
|
-
attributes: {
|
|
7
|
-
name: string;
|
|
8
|
-
url: string;
|
|
9
|
-
};
|
|
10
|
-
}[];
|
|
6
|
+
apps: App[];
|
|
11
7
|
env: PCO_URL.Environment;
|
|
12
8
|
toggle: any;
|
|
13
9
|
visible: boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Notification } from "../interfaces";
|
|
3
|
-
declare const NotificationItem: ({ mobile, isLast, onToggleRead, showBottomBorder, notification
|
|
3
|
+
declare const NotificationItem: ({ mobile, isLast, onMarkAsRead, onToggleRead, showBottomBorder, notification, }: {
|
|
4
4
|
mobile?: boolean;
|
|
5
5
|
isLast?: boolean;
|
|
6
|
+
onMarkAsRead?: (notification: Notification) => any;
|
|
6
7
|
onToggleRead: any;
|
|
7
8
|
showBottomBorder?: boolean;
|
|
8
9
|
notification: Notification;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import * as PCO_URL from "@planningcenter/url"
|
|
3
|
-
import { Notification } from "../interfaces"
|
|
4
|
-
declare const NotificationsInbox: ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as PCO_URL from "@planningcenter/url"
|
|
3
|
+
import { Notification } from "../interfaces"
|
|
4
|
+
declare const NotificationsInbox: ({
|
|
5
|
+
env,
|
|
6
|
+
render,
|
|
7
|
+
userId,
|
|
8
|
+
}: {
|
|
9
|
+
env: PCO_URL.Environment
|
|
10
|
+
render: (props: {
|
|
11
|
+
handleMarkAllAsRead: () => any
|
|
12
|
+
handleToggleRead: (notification: Notification) => any
|
|
13
|
+
read: Notification[]
|
|
14
|
+
unread: Notification[]
|
|
15
|
+
}) => JSX.Element
|
|
16
|
+
userId: string
|
|
17
|
+
}) => JSX.Element
|
|
18
|
+
export default NotificationsInbox
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import * as PCO_URL from "@planningcenter/url";
|
|
3
2
|
import { Notification } from "../interfaces";
|
|
4
|
-
declare const NotificationsMenu: ({
|
|
5
|
-
env: PCO_URL.Environment;
|
|
3
|
+
declare const NotificationsMenu: ({ handleMarkAllAsRead, handleMarkAsRead, handleToggleRead, hasError, isLoading, mobile, notifications: { read, unread }, toggle, visible, }: {
|
|
6
4
|
handleMarkAllAsRead: () => any;
|
|
5
|
+
handleMarkAsRead: (notification: Notification) => any;
|
|
7
6
|
handleToggleRead: (notification: Notification) => any;
|
|
8
7
|
hasError?: boolean;
|
|
9
8
|
isLoading?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const NotificationsMenuBlankState: ({ dark, description, style, title,
|
|
2
|
+
declare const NotificationsMenuBlankState: ({ dark, description, style, title, }: {
|
|
3
3
|
dark?: boolean;
|
|
4
4
|
description: string;
|
|
5
5
|
style?: object;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Notification } from "./interfaces"
|
|
2
|
-
export declare const DUMMY_DATA_UNREAD: Notification[]
|
|
3
|
-
export declare const DUMMY_DATA_READ: Notification[]
|
|
1
|
+
import { Notification } from "./interfaces"
|
|
2
|
+
export declare const DUMMY_DATA_UNREAD: Notification[]
|
|
3
|
+
export declare const DUMMY_DATA_READ: Notification[]
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
attributes: {
|
|
3
|
-
name: string;
|
|
4
|
-
url: string;
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export interface ConnectedPerson {
|
|
8
|
-
id: number;
|
|
9
|
-
attributes: {
|
|
10
|
-
name: string;
|
|
11
|
-
organization_name: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
1
|
+
import { App, ConnectedPerson } from "./interfaces";
|
|
14
2
|
export declare const appsMenuFormatter: (apps: App[]) => App[];
|
|
15
3
|
export declare const connectedPeopleMenuFormatter: (connectedPeople: ConnectedPerson[]) => ConnectedPerson[];
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as PCO_URL from "@planningcenter/url";
|
|
2
2
|
import { Notification } from "../interfaces";
|
|
3
|
-
declare const useNotifications: ({ env, userId, }: {
|
|
3
|
+
declare const useNotifications: ({ disabled, env, userId, }: {
|
|
4
|
+
disabled?: boolean;
|
|
4
5
|
env: PCO_URL.Environment;
|
|
5
6
|
userId: string;
|
|
6
7
|
}) => {
|
|
7
8
|
handleMarkAllAsRead: () => any;
|
|
9
|
+
handleMarkAsRead: (notification: Notification) => any;
|
|
8
10
|
handleToggleRead: (notification: Notification) => any;
|
|
9
11
|
hasError: boolean;
|
|
10
12
|
isLoading: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as PCO_URL from "@planningcenter/url";
|
|
2
|
+
import { Fetch } from "../api_request";
|
|
3
|
+
import { TopbarAPIResponse } from "../interfaces";
|
|
4
|
+
declare const useTopbarAPI: ({ configuredFetch, env, }: {
|
|
5
|
+
configuredFetch: Fetch;
|
|
6
|
+
env: PCO_URL.Environment;
|
|
7
|
+
}) => TopbarAPIResponse;
|
|
8
|
+
export default useTopbarAPI;
|