@planningcenter/topbar 7.2.2-people.0 → 7.3.0-alpha.3
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 +32 -5
- package/README.md +75 -14
- 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.css +1 -1
- package/dist/topbar.css.map +1 -1
- package/dist/topbar.js +1 -1
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.css +1 -1
- package/dist/topbar.modern.css.map +1 -1
- package/dist/topbar.modern.js +1 -1
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.css +1 -1
- package/dist/topbar.module.css.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 +12 -0
- package/dist/types/modules/api_request.d.ts.map +1 -0
- package/dist/types/modules/apps_provider.d.ts +16 -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 +14 -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 +10 -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 +20 -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 +21 -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 +27 -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 +17 -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 +43 -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 +32 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,37 +1,65 @@
|
|
|
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
|
+
|
|
12
|
+
- Notification bell, indicator, and dropdown that displays the current user's read and unread notifications.
|
|
13
|
+
- Subscribe to push notifications via Jolt after initial load. Whenever a push event is received, a GET request is sent to the notifications API endpoint to retrieve the details of the new notification.
|
|
14
|
+
- Set up prettier and eslint and allow them to have their way on the code
|
|
15
|
+
- Control the admin notifications inbox with the flipper flag of `TOPBAR_notifications_enabled` in People. Disable for a specific app by setting `window.notificationsDisabled = true`.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- No-op `AppsProvider`'s `fetch` and `remove` functions that are passed along with `apps` to the `render` function prop. Since we will always have fresh data now, there is no need to have these functions run.
|
|
20
|
+
- The information required to render the topbar is now contained in a single API request from people (`/me/topbar`). This includes the list of apps to render in the app switcher and enabled features inside the topbar. This is a change specifically to the app switcher, so changes had to be made in terms of the expected shape of the response from the server in order to render the app switcher. The `AppsProvider` `mapApps` function has been updated accordingly.
|
|
21
|
+
|
|
22
|
+
### Removed
|
|
23
|
+
|
|
24
|
+
- `mapResourcesToCalendar` is removed as an export of `AppsProvider`. The apps array we receive from the API no longer returns Resources. Use `mapApps` instead (or, better still, don't pass anything to `formatter` and let us use the default).
|
|
25
|
+
|
|
3
26
|
## [7.2.1] - 2021-12-09
|
|
4
27
|
|
|
5
|
-
###
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
6
30
|
- Bug z-stacking Safari bug that caused expanded `smalltopbar` items to show up behind elements [#46](https://github.com/ministrycentered/topbar/pull/46)
|
|
7
31
|
- 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
32
|
|
|
9
33
|
## [7.2.0] - 2021-12-02
|
|
10
34
|
|
|
11
35
|
### Changed
|
|
36
|
+
|
|
12
37
|
- New look and feel for the app switcher ([#40](https://github.com/ministrycentered/topbar/pull/40), [#42](https://github.com/ministrycentered/topbar/pull/42)).
|
|
13
38
|
The switcher now displays Home at the top with some visual separation and Accounts (as "account") at the bottom—also with visual separation.
|
|
14
39
|
|
|
15
40
|
## [7.1.3] - 2021-11-16
|
|
16
41
|
|
|
17
42
|
### Fixed
|
|
43
|
+
|
|
18
44
|
- Corrected the sorting of app names in mobile topbar as well [#36](https://github.com/ministrycentered/topbar/pull/36)
|
|
19
45
|
|
|
20
46
|
## [7.1.2] - 2021-11-11
|
|
21
47
|
|
|
22
48
|
### Fixed
|
|
49
|
+
|
|
23
50
|
- Corrected the corrected sorting of app names in app switcher [#33](https://github.com/ministrycentered/topbar/pull/33)
|
|
24
51
|
|
|
25
52
|
## [7.1.1] - 2021-11-10
|
|
26
53
|
|
|
27
54
|
### Fixed
|
|
55
|
+
|
|
28
56
|
- Corrected sorting of app names in app switcher [#32](https://github.com/ministrycentered/topbar/pull/32)
|
|
29
57
|
|
|
30
58
|
## [7.1.0] - 2021-11-08
|
|
31
59
|
|
|
32
60
|
### Added
|
|
33
|
-
- Add Home to the app switcher dropdown
|
|
34
61
|
|
|
62
|
+
- Add Home to the app switcher dropdown
|
|
35
63
|
|
|
36
64
|
## [7.0.0] - 2021-10-01
|
|
37
65
|
|
|
@@ -81,8 +109,7 @@
|
|
|
81
109
|
|
|
82
110
|
Versions entries to this changelog weren't tracked very well and were presented in a less organized style (more like a README or upgrade guide). If you are interested in that, you can read about the changes in [README-pre-4.9.0].
|
|
83
111
|
|
|
84
|
-
|
|
85
|
-
|
|
112
|
+
[unreleased notifications]: https://github.com/ministrycentered/topbar/compare/@planningcenter/topbar@7.2.1..notifications
|
|
86
113
|
[7.2.1]: https://github.com/ministrycentered/topbar/compare/v7.2.0..v7.2.1
|
|
87
114
|
[7.2.0]: https://github.com/ministrycentered/topbar/compare/v7.1.3..v7.2.0
|
|
88
115
|
[7.1.3]: https://github.com/ministrycentered/topbar/compare/v7.1.2..v7.1.3
|
|
@@ -90,4 +117,4 @@ Versions entries to this changelog weren't tracked very well and were presented
|
|
|
90
117
|
[7.1.1]: https://github.com/ministrycentered/topbar/compare/v7.1.0..v7.1.1
|
|
91
118
|
[7.1.0]: https://github.com/ministrycentered/topbar/compare/v7.0.0..v7.1.0
|
|
92
119
|
[7.0.0]: https://github.com/ministrycentered/topbar/compare/@planningcenter/topbar@6.0.6..v7.0.0
|
|
93
|
-
[
|
|
120
|
+
[previous entries]: CHANGELOG-pre-4.9.0.md
|
package/README.md
CHANGED
|
@@ -2,22 +2,70 @@
|
|
|
2
2
|
|
|
3
3
|
The shared Planning Center product Topbar
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
In general, it is responsible for a number of things that are shared across our apps.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
- App switcher (via [`AppsProvider`](./modules/apps_provider.tsx))
|
|
8
|
+
- Profile switcher (via [`ConnectedPeopleProvider`](./modules/connected_people_provider.tsx))
|
|
9
|
+
- Admin notifications inbox dropdown (via [`NotificationsMenu`](./modules/components/notifications_menu.tsx))
|
|
10
|
+
- Platform and/or product announcements (via [`PlatformAnnouncements`](./modules/platform_announcements.jsx) and [`ProductAnnouncements`](./moduels/product_announcements))
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
To a limited extent, each product can customize the display of these items as they see fit.
|
|
15
|
+
For the majority of the products, implementation is very similar.
|
|
16
|
+
You can view [product-specific examples](#example-product-implementations) below.
|
|
17
|
+
|
|
18
|
+
### Disabling the notifications inbox
|
|
19
|
+
|
|
20
|
+
The global determination of whether the notifications inbox is enabled or disabled is controlled via a [People flipper flag](https://people.planningcenteronline.com/flipper/features/TOPBAR_notifications_enabled).
|
|
21
|
+
However, if your app needs to disable the notifications inbox for whatever reason, set `window.notificationsDisabled = true` when your app renders and we'll honor that setting.
|
|
22
|
+
Because settings and flags are cached for one load cycle, it will take a fresh reload from the user to have the disable override to take effect.
|
|
23
|
+
|
|
24
|
+
### Shared Jolt connections
|
|
25
|
+
|
|
26
|
+
New in v7.3 is the admin notifications inbox feature.
|
|
27
|
+
Visually, this is a bell in the topbar that, when clicked, will display a dropdown containing notifications from every app in their account.
|
|
28
|
+
Because a notification can be sent to a user as they are working on a page, topbar subscribes to a special notifications channel for the current user that provides push updates to the dropdown.
|
|
29
|
+
|
|
30
|
+
For a handful of reasons (not least of which is because we pay per Jolt connection), if the current page of an app is already using a Jolt connection, topbar would like to piggy-back on that connection for its own subscription.
|
|
31
|
+
**Note that this connection sharing is entirely optional for the parent app, but strongly encouraged.**
|
|
32
|
+
If a Jolt connection is not shared with topbar, it will gladly initiate its own connection specifically for its purposes.
|
|
33
|
+
|
|
34
|
+
To reuse your app's Jolt connection, topbar requires a Promise that resolves into a [Jolt client](https://github.com/ministrycentered/jolt-client/) connection.
|
|
35
|
+
If nothing is passed—or if a Promise is passed that resolves to `undefined` or `void`—topbar will initiate its own connection.
|
|
36
|
+
|
|
37
|
+
#### Example
|
|
38
|
+
|
|
39
|
+
As an example, we'll use what Services has done for the v7.3 alpha.
|
|
40
|
+
As a layout partial, they attach two Jolt-related things to `window`:
|
|
41
|
+
|
|
42
|
+
1. `joltListener` (an instance of their own wrapper around the `jolt-client` library)
|
|
43
|
+
1. `joltListenerPromise` (a `jolt-client` instance that has gone through (or will go through asynchronously) the connection and authorization process)
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<script>
|
|
47
|
+
window.joltListener = new window.JoltListener()
|
|
48
|
+
window.joltListenerPromise = window.joltListener.connect()
|
|
49
|
+
</script>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
In their Topbar implementation component, they then create the function that provides topbar the required Promise...
|
|
53
|
+
|
|
54
|
+
```jsx
|
|
55
|
+
const waitForWindowJolt = async () => {
|
|
56
|
+
const listener = Promise.resolve(window.joltListenerPromise)
|
|
57
|
+
return listener.then((listener) => {
|
|
58
|
+
if (listener && listener.jolt) {
|
|
59
|
+
return listener.jolt
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
...and passes that function in for the `JoltPromise` prop to topbar.
|
|
66
|
+
Topbar can then use this Promise to determine whether or not it needs to create its own connection or piggyback on one provided.
|
|
67
|
+
|
|
68
|
+
The implementation details for your app can be decided by you and dependent on your apps current usage of Jolt.
|
|
21
69
|
|
|
22
70
|
## Upgrade
|
|
23
71
|
|
|
@@ -57,3 +105,16 @@ So, this CHANGELOG is a little lazy.
|
|
|
57
105
|
If you like history, here are the initial release notes with technical considerations and trade-offs.
|
|
58
106
|
|
|
59
107
|
[STORY](./docs/STORY.md)
|
|
108
|
+
|
|
109
|
+
## Example product implementations
|
|
110
|
+
|
|
111
|
+
- [API](https://github.com/ministrycentered/api/blob/master/app/javascript/components/api_topbar.jsx)
|
|
112
|
+
- [Accounts](https://github.com/ministrycentered/accounts/blob/master/app/javascript/components/accounts_topbar.jsx)
|
|
113
|
+
- [Calendar](https://github.com/ministrycentered/resources/blob/master/app/javascript/components/CalendarTopbar.jsx)
|
|
114
|
+
- [Check-Ins](https://github.com/ministrycentered/check-ins/blob/master/app/javascript/components/checkins_topbar.js)
|
|
115
|
+
- [Giving](https://github.com/ministrycentered/giving/blob/master/app/javascript/application/components/giving_topbar.jsx)
|
|
116
|
+
- [Groups](https://github.com/ministrycentered/groups/blob/master/app/javascript/application/components/groups_topbar.js)
|
|
117
|
+
- [People](https://github.com/ministrycentered/people/blob/master/app/javascript/components/people_topbar.jsx)
|
|
118
|
+
- [Publishing](https://github.com/ministrycentered/publishing/blob/master/app/javascript/src/PublishingTopbar.js)
|
|
119
|
+
- [Registrations](https://github.com/ministrycentered/registrations/blob/master/app/javascript/components/registrations_topbar.jsx)
|
|
120
|
+
- [Services](https://github.com/ministrycentered/services/blob/master/app/javascript/components/ServicesTopbar.js)
|
|
@@ -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;
|
package/dist/topbar.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@-webkit-keyframes spinning{to{transform:rotate(1turn)}}@keyframes spinning{to{transform:rotate(1turn)}}.spinner{align-self:center;-webkit-animation:spinning .5s linear infinite;animation:spinning .5s linear infinite;border:2px solid #f7f7f7;border-radius:50%;border-top-color:#9e9e9e;display:inline;height:16px;transform:rotate(0deg);vertical-align:middle;width:16px}
|
|
1
|
+
.hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar::-webkit-scrollbar{display:none}@-webkit-keyframes spinning{to{transform:rotate(1turn)}}@keyframes spinning{to{transform:rotate(1turn)}}.spinner{align-self:center;-webkit-animation:spinning .5s linear infinite;animation:spinning .5s linear infinite;border:2px solid #f7f7f7;border-radius:50%;border-top-color:#9e9e9e;display:inline;height:16px;transform:rotate(0deg);vertical-align:middle;width:16px}
|
|
2
2
|
/*# sourceMappingURL=topbar.css.map */
|
package/dist/topbar.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["spinner.css"],"names":[],"mappings":"AAAA,4BACE,GAEE,uBACF,CACF,CACA,oBACE,GAEE,uBACF,CACF,CAEA,SACE,iBAAkB,CAClB,8CAAyC,CAAzC,sCAAyC,CAKzC,wBAAiB,CAHjB,iBAAkB,CAGlB,wBAAiB,CACjB,cAAe,CACf,WAAY,CACZ,sBAAuB,CACvB,qBAAsB,CACtB,UACF","file":"topbar.css","sourcesContent":["@-webkit-keyframes spinning {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes spinning {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n.spinner {\n align-self: center;\n animation: spinning 500ms infinite linear;\n border-color: hsl(0 0% 97%);\n border-radius: 50%;\n border-style: solid;\n border-top-color: hsl(0 0% 62%);\n border-width: 2px;\n display: inline;\n height: 16px;\n transform: rotate(0deg);\n vertical-align: middle;\n width: 16px;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["utils.css","spinner.css"],"names":[],"mappings":"AAAA,gBACE,uBAAwB,CACxB,oBACF,CACA,mCACE,YACF,CCNA,4BACE,GAEE,uBACF,CACF,CACA,oBACE,GAEE,uBACF,CACF,CAEA,SACE,iBAAkB,CAClB,8CAAyC,CAAzC,sCAAyC,CAKzC,wBAAiB,CAHjB,iBAAkB,CAGlB,wBAAiB,CACjB,cAAe,CACf,WAAY,CACZ,sBAAuB,CACvB,qBAAsB,CACtB,UACF","file":"topbar.css","sourcesContent":[".hide-scrollbar {\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n}\n.hide-scrollbar::-webkit-scrollbar {\n display: none; /* Chrome, Safari, and Opera */\n}\n","@-webkit-keyframes spinning {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes spinning {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n.spinner {\n align-self: center;\n animation: spinning 500ms infinite linear;\n border-color: hsl(0 0% 97%);\n border-radius: 50%;\n border-style: solid;\n border-top-color: hsl(0 0% 62%);\n border-width: 2px;\n display: inline;\n height: 16px;\n transform: rotate(0deg);\n vertical-align: middle;\n width: 16px;\n}\n"]}
|