@planningcenter/topbar 8.3.0 → 8.3.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 (37) hide show
  1. package/CHANGELOG.md +210 -0
  2. package/dist/modules/api_request.d.ts +0 -5
  3. package/dist/modules/components/NotificationsMenuBlankState.d.ts +12 -0
  4. package/dist/modules/components/apps_menu.d.ts +2 -6
  5. package/dist/modules/components/conditional_wrap.d.ts +1 -1
  6. package/dist/modules/components/notifications_inbox.d.ts +18 -0
  7. package/dist/modules/components/notifications_menu.d.ts +1 -3
  8. package/dist/modules/components/{notifications_menu_wrapper.d.ts → notifications_menu_Wrapper.d.ts} +0 -0
  9. package/dist/modules/components/notifications_menu_blank_state.d.ts +1 -1
  10. package/dist/modules/dummy_data.d.ts +3 -0
  11. package/dist/modules/formatters.d.ts +1 -13
  12. package/dist/modules/hooks/use_local_storage.d.ts +10 -0
  13. package/dist/modules/hooks/use_notifications.d.ts +2 -1
  14. package/dist/modules/hooks/use_topbar_api.d.ts +8 -0
  15. package/dist/modules/medium_topbar.d.ts +38 -34
  16. package/dist/modules/not_small_topbar.d.ts +82 -39
  17. package/dist/modules/small_topbar.d.ts +42 -39
  18. package/dist/modules/symbols.d.ts +8 -34
  19. package/dist/modules/topbar_context.d.ts +5 -0
  20. package/dist/topbar +2 -0
  21. package/dist/topbar.js +1 -1
  22. package/dist/topbar.js.map +1 -1
  23. package/dist/topbar.map +1 -0
  24. package/dist/topbar.modern.js +1 -1
  25. package/dist/topbar.modern.js.map +1 -1
  26. package/dist/topbar.module.js +1 -1
  27. package/dist/topbar.module.js.map +1 -1
  28. package/dist/topbar.umd.js +1 -1
  29. package/dist/topbar.umd.js.map +1 -1
  30. package/dist/types/modules/interfaces.d.ts +55 -0
  31. package/dist/types/modules/interfaces.d.ts.map +1 -0
  32. package/dist/types/modules/small_topbar.d.ts.map +1 -1
  33. package/package.json +20 -20
  34. package/dist/types/modules/dummy_data.d.ts +0 -4
  35. package/dist/types/modules/dummy_data.d.ts.map +0 -1
  36. package/dist/types/modules/hooks/use_local_notifications.d.ts +0 -9
  37. package/dist/types/modules/hooks/use_local_notifications.d.ts.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,210 @@
1
+ # Changelog
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
+ ## [8.3.1] - 2022-08-31
9
+
10
+ ### Fixed
11
+
12
+ - Fix an overflow issue when there were enough linked orgs for the menu to hit the bottom of the browser on mobile
13
+
14
+ ### Security
15
+
16
+ - Bumped `moment-timezone` from 0.5.34 to 0.5.35
17
+
18
+ ## [8.3.0] - 2022-08-16
19
+
20
+ ### Added
21
+
22
+ - Add `topbar` and `app-switcher` convenience data attributes for targeting with Pendo
23
+
24
+ ### Changed
25
+
26
+ - Add `?return` param to the Login profile path URL, to reduce our dependence on referers
27
+
28
+ ### Security
29
+
30
+ - Bumped `async` from 2.6.3 to 2.6.4
31
+ - Bumped `terser` from 4.8.0 to 4.8.1
32
+ - Bumped `moment` from 2.29.2 to 2.29.4
33
+
34
+ ## [8.2.2] - 2022-06-28
35
+
36
+ ### Changed
37
+
38
+ - VoiceOver support for Notifications
39
+
40
+ ## [8.2.1] - 2022-06-15
41
+
42
+ ### Changed
43
+
44
+ - Disable dropdown menu and hide caret icon when no custom routes are provided.
45
+
46
+ ## [8.2.0] - 2022-05-23
47
+
48
+ ### Added
49
+
50
+ - Make whether Jolt sends its logs to console configurable (`enableJoltLogging` prop) and default to `false`
51
+
52
+ ### Changed
53
+
54
+ - Add more info regarding troubleshooting `yalc` issues to the README
55
+ - Send a `fetchAuthTokenFn` to `jolt-client` instead of `authToken`. Over time, the auth token can get stale. Sending a function instead of a value allows the client to refresh itself when required.
56
+ - Instead of fetching the WSS URLs for authorization from an api endpoint, hard-code them instead. After the change adding `fetchAuthTokenFn`, this change reduces required API calls by 1.
57
+
58
+ ### Fixed
59
+
60
+ - fix: hook into `pco-page-expired` to `disconnect` jolt instance when session is changed
61
+
62
+ ## [8.1.1] - 2022-04-11
63
+
64
+ ### Changed
65
+
66
+ - fix: don't send a `timeZone` key to `@churchcenter/datetime-fmt` if it doesn't have a value
67
+
68
+ ## [8.1.0] - 2022-04-11
69
+
70
+ ### Changed
71
+
72
+ - Removed references to Resources
73
+ - Transition away from branded Accounts symbols
74
+ - Fix padding in account switcher
75
+ - Update styles for account switcher on mobile
76
+ - Fix dark mode text styles in notifications inbox
77
+ - Fix notification date timezone not displaying in the org's time zone
78
+
79
+ ## [8.0.1] - 2022-03-29
80
+
81
+ ### Changed
82
+
83
+ - Correct the capitalization of "Check-Ins" in order to set the correct color for notifications
84
+ - Bring back the `notifications` prop for topbars so that if notifications are not enabled, it will render the `notifications` prop instead
85
+
86
+ ## [8.0.0] - 2022-03-24
87
+
88
+ ### Added
89
+
90
+ - Notification bell, indicator, and dropdown that displays the current user's read and unread notifications.
91
+ - 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.
92
+ - Set up prettier and eslint and allow them to have their way on the code
93
+ - 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`.
94
+ - Control the Login info section with the flipper flag of `TOPBAR_mfa_enabled` in People.
95
+ - Show an indicator for whether MFA is configured for the current profile
96
+ - Add `props.linkToProfile` to `SharedTopbarProps` (so it's available to small and not small)
97
+
98
+ ### Changed
99
+
100
+ - 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.
101
+ - 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.
102
+
103
+ ### Removed
104
+
105
+ - `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).
106
+ - `MediumTopbar`. Only one app (API) was using it and it wasn't worth attempting to keep feature parity with the other two topbars.
107
+
108
+ ## [7.2.1] - 2021-12-09
109
+
110
+ ### Fixed
111
+
112
+ - Bug z-stacking Safari bug that caused expanded `smalltopbar` items to show up behind elements [#46](https://github.com/ministrycentered/topbar/pull/46)
113
+ - 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)
114
+
115
+ ## [7.2.0] - 2021-12-02
116
+
117
+ ### Changed
118
+
119
+ - New look and feel for the app switcher ([#40](https://github.com/ministrycentered/topbar/pull/40), [#42](https://github.com/ministrycentered/topbar/pull/42)).
120
+ The switcher now displays Home at the top with some visual separation and Accounts (as "account") at the bottom—also with visual separation.
121
+
122
+ ## [7.1.3] - 2021-11-16
123
+
124
+ ### Fixed
125
+
126
+ - Corrected the sorting of app names in mobile topbar as well [#36](https://github.com/ministrycentered/topbar/pull/36)
127
+
128
+ ## [7.1.2] - 2021-11-11
129
+
130
+ ### Fixed
131
+
132
+ - Corrected the corrected sorting of app names in app switcher [#33](https://github.com/ministrycentered/topbar/pull/33)
133
+
134
+ ## [7.1.1] - 2021-11-10
135
+
136
+ ### Fixed
137
+
138
+ - Corrected sorting of app names in app switcher [#32](https://github.com/ministrycentered/topbar/pull/32)
139
+
140
+ ## [7.1.0] - 2021-11-08
141
+
142
+ ### Added
143
+
144
+ - Add Home to the app switcher dropdown
145
+
146
+ ## [7.0.0] - 2021-10-01
147
+
148
+ - Add CSRF support to login ([#46](https://github.com/planningcenter/design/pull/46) @danielma)
149
+ - [First implementation in Accounts](https://github.com/ministrycentered/accounts/pull/1877/files)
150
+ - [Second implementation in Giving](https://github.com/ministrycentered/giving/pull/4482/files)
151
+ - Update devDependencies pins
152
+ - `microbundle`: `^0.12.4` => `^0.13.0`
153
+ - `webpack`: `^4.46.0` => `^5.13.0`
154
+ - `webpack-cli`: `^3.3.13` => `^4.3.1`
155
+ - `ts-loader`: `^7.0.5` => `^8.0.14`
156
+ - `typescript`: `^3.9.7` => `^4.1.3`
157
+ - `react`: `^16.14.0` => `^17.0.1`
158
+ - `react-dom`: `^16.14.0` => `^17.0.1`
159
+ - `@types/react`: `^16.14.2` => `^17.0.0`
160
+ - `@types/react-dom`: `^16.9.10` => `^17.0.0`
161
+ - Unlock modern builds by removing `--format cjs` flag for improved bundling app-side
162
+ - Add `referer` query parameter to `AppSwitch` urls: [Accounts PR](https://github.com/ministrycentered/accounts/pull/1910)
163
+ - Add the ability to override the topbar’s link colors via props in `NotSmallTopbar` [#122](https://github.com/planningcenter/design/pull/122)
164
+ - Add `ProductAnnouncement` component
165
+ - Additional top-level exports:
166
+ - `ProductAnnouncementStyleProvider`
167
+ - `StyledProductAnnouncement`
168
+ - `StyledProductAnnouncementDimissButton`
169
+ - `Topbar_ProductAnnouncement` parent selector for styling content
170
+ - Fix Announcement topbars to be 14px font-size and 48px absolute height
171
+
172
+ ## 6.0.0
173
+
174
+ - [BREAKING] modify `/logout` urls to target Login, a2ec71d
175
+
176
+ ## 5.0.0
177
+
178
+ - [BREAKING] replace Registrations icon
179
+ - Add `mapRegistrationsToExpiredRegistrations` to control them
180
+
181
+ ## 4.11.0
182
+
183
+ - Add `AppsProvider#formatter` and `mapApps`/`mapResourcesToCalendar` formatters to provide a AppsMenu control mechanism to product teams
184
+ - Add `.codes` support for `pco-box`
185
+
186
+ ## 4.9.0
187
+
188
+ - Add support for "Calendar" app
189
+
190
+ ## [Previous entries]
191
+
192
+ 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].
193
+
194
+ [8.3.1]: https://github.com/ministrycentered/topbar/compare/v8.3.0...v8.3.1
195
+ [8.3.0]: https://github.com/ministrycentered/topbar/compare/v8.2.2...v8.3.0
196
+ [8.2.2]: https://github.com/ministrycentered/topbar/compare/v8.2.1...v8.2.2
197
+ [8.2.1]: https://github.com/ministrycentered/topbar/compare/v8.2.0...v8.2.1
198
+ [8.2.0]: https://github.com/ministrycentered/topbar/compare/v8.1.1...v8.2.0
199
+ [8.1.1]: https://github.com/ministrycentered/topbar/compare/v8.1.0...v8.1.1
200
+ [8.1.0]: https://github.com/ministrycentered/topbar/compare/v8.0.1...v8.1.0
201
+ [8.0.1]: https://github.com/ministrycentered/topbar/compare/v8.0.0...v8.0.1
202
+ [8.0.0]: https://github.com/ministrycentered/topbar/compare/v7.2.1...v8.0.0
203
+ [7.2.1]: https://github.com/ministrycentered/topbar/compare/v7.2.0...v7.2.1
204
+ [7.2.0]: https://github.com/ministrycentered/topbar/compare/v7.1.3...v7.2.0
205
+ [7.1.3]: https://github.com/ministrycentered/topbar/compare/v7.1.2...v7.1.3
206
+ [7.1.2]: https://github.com/ministrycentered/topbar/compare/v7.1.1...v7.1.2
207
+ [7.1.1]: https://github.com/ministrycentered/topbar/compare/v7.1.0...v7.1.1
208
+ [7.1.0]: https://github.com/ministrycentered/topbar/compare/v7.0.0...v7.1.0
209
+ [7.0.0]: https://github.com/ministrycentered/topbar/compare/@planningcenter/topbar@6.0.6..v7.0.0
210
+ [previous entries]: CHANGELOG-pre-4.9.0.md
@@ -1,10 +1,5 @@
1
- import { Environment } from "@planningcenter/url";
2
1
  declare global {
3
2
  interface Window {
4
- railsEnv?: Environment;
5
- currentPerson?: {
6
- id: number;
7
- };
8
3
  Rails?: {
9
4
  csrfToken: () => string;
10
5
  };
@@ -0,0 +1,12 @@
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,5 +1,5 @@
1
1
  import * as React from "react";
2
- declare const ConditionalWrap: ({ children, condition, wrap, ...props }: {
2
+ declare const ConditionalWrap: ({ children, condition, wrap, }: {
3
3
  children: React.ReactNode;
4
4
  condition?: boolean;
5
5
  wrap: any;
@@ -0,0 +1,18 @@
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,8 +1,6 @@
1
1
  /// <reference types="react" />
2
- import * as PCO_URL from "@planningcenter/url";
3
2
  import { Notification } from "../interfaces";
4
- declare const NotificationsMenu: ({ env, handleMarkAllAsRead, handleMarkAsRead, handleToggleRead, hasError, isLoading, mobile, notifications: { read, unread }, toggle, visible, }: {
5
- env: PCO_URL.Environment;
3
+ declare const NotificationsMenu: ({ handleMarkAllAsRead, handleMarkAsRead, handleToggleRead, hasError, isLoading, mobile, notifications: { read, unread }, toggle, visible, }: {
6
4
  handleMarkAllAsRead: () => any;
7
5
  handleMarkAsRead: (notification: Notification) => any;
8
6
  handleToggleRead: (notification: Notification) => any;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare const NotificationsMenuBlankState: ({ dark, description, style, title, ...props }: {
2
+ declare const NotificationsMenuBlankState: ({ dark, description, style, title, }: {
3
3
  dark?: boolean;
4
4
  description: string;
5
5
  style?: object;
@@ -0,0 +1,3 @@
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
- export interface App {
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[];
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ declare function useLocalStorage(
3
+ key: string,
4
+ initialValue: any
5
+ ): {
6
+ storedValue: any
7
+ setStoredValue: import("react").Dispatch<any>
8
+ dropKey: () => void
9
+ }
10
+ export default useLocalStorage
@@ -1,6 +1,7 @@
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
  }) => {
@@ -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;
@@ -1,42 +1,46 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import * as PCO_URL from "@planningcenter/url";
3
- declare const Topbar: {
4
- (props: {
5
- apps: {
6
- attributes: {
7
- name: string;
8
- url: string;
9
- };
10
- }[];
11
- env: PCO_URL.Environment;
12
- appName: string;
13
- routes: any;
14
- colors: any;
15
- userAvatarPath: string;
16
- userId: string;
17
- userName: string;
18
- orgName: string;
19
- connectedPeople: any;
20
- search?: any;
21
- style?: any;
22
- showOrgName?: boolean;
23
- notifications?: any;
24
- requestAppsFetch: any;
25
- requestConnectedPeopleFetch: any;
26
- requestUnlinkConnectedPeople: any;
27
- requestSwitchConnectedPerson: any;
28
- requestClearAppsCache: any;
29
- requestClearConnectedPeopleCache: any;
30
- linkToProfile?: boolean;
31
- }): JSX.Element;
32
- defaultProps: {
3
+ export declare class Topbar extends React.Component<{
4
+ apps: {
5
+ attributes: {
6
+ name: string;
7
+ url: string;
8
+ };
9
+ }[];
10
+ env: PCO_URL.Environment;
11
+ appName: string;
12
+ routes: any;
13
+ colors: any;
14
+ userAvatarPath: string;
15
+ userId: string;
16
+ userName: string;
17
+ orgName: string;
18
+ connectedPeople: any;
19
+ search?: any;
20
+ style?: any;
21
+ showOrgName?: boolean;
22
+ notifications?: any;
23
+ requestAppsFetch: any;
24
+ requestConnectedPeopleFetch: any;
25
+ requestUnlinkConnectedPeople: any;
26
+ requestSwitchConnectedPerson: any;
27
+ requestClearAppsCache: any;
28
+ requestClearConnectedPeopleCache: any;
29
+ linkToProfile?: boolean;
30
+ }, {
31
+ appsMenuVisible: boolean;
32
+ routesMenuVisible: boolean;
33
+ userMenuVisible: boolean;
34
+ }> {
35
+ constructor(props: any);
36
+ static defaultProps: {
33
37
  currentRouteComponent: (props: any) => JSX.Element;
34
38
  };
35
- };
36
- declare const Route: ({ active, style, name, ...props }: {
39
+ render(): JSX.Element;
40
+ }
41
+ export declare const Route: ({ active, style, name, ...props }: {
37
42
  [x: string]: any;
38
43
  active: any;
39
44
  style: any;
40
45
  name?: string;
41
46
  }) => JSX.Element;
42
- export { Route, Topbar };
@@ -1,48 +1,91 @@
1
1
  import * as React from "react";
2
2
  import * as PCO_URL from "@planningcenter/url";
3
- declare const Topbar: {
4
- (props: {
5
- apps: {
6
- attributes: {
7
- name: string;
8
- url: string;
9
- };
10
- }[];
11
- activeRoute: string;
12
- env: PCO_URL.Environment;
13
- appName: string;
14
- routes: any;
15
- colors: any;
16
- userAvatarPath: string;
17
- userId: string;
18
- userName: string;
19
- orgName: string;
20
- connectedPeople: any;
21
- search?: any;
22
- style?: any;
23
- showOrgName?: boolean;
24
- requestAppsFetch: any;
25
- requestConnectedPeopleFetch: any;
26
- requestUnlinkConnectedPeople: any;
27
- requestSwitchConnectedPerson: any;
28
- requestClearAppsCache: any;
29
- requestClearConnectedPeopleCache: any;
30
- useDummyNotifications?: boolean;
31
- linkToProfile?: boolean;
32
- onLinkToProfileClick?: () => any;
33
- }): JSX.Element;
34
- defaultProps: {
3
+ export declare class AppsButton extends React.Component<{
4
+ appName: string;
5
+ colors: any;
6
+ expanded: boolean;
7
+ style?: object;
8
+ onClick: any;
9
+ displayIconOnly?: boolean;
10
+ }, {
11
+ entered: boolean;
12
+ down: boolean;
13
+ }> {
14
+ constructor(props: any);
15
+ static defaultProps: {
16
+ displayIconOnly: boolean;
17
+ };
18
+ render(): JSX.Element;
19
+ }
20
+ export declare class Hoverable extends React.Component<{
21
+ component?: any;
22
+ style?: object;
23
+ hover?: any;
24
+ active?: any;
25
+ type?: string;
26
+ onClick?: any;
27
+ }, {
28
+ entered: boolean;
29
+ down: boolean;
30
+ }> {
31
+ constructor(props: any);
32
+ render(): JSX.Element;
33
+ }
34
+ export declare class Topbar extends React.Component<{
35
+ apps: {
36
+ attributes: {
37
+ name: string;
38
+ url: string;
39
+ };
40
+ }[];
41
+ activeRoute: string;
42
+ env: PCO_URL.Environment;
43
+ appName: string;
44
+ routes: any;
45
+ colors: any;
46
+ userAvatarPath: string;
47
+ userId: string;
48
+ userName: string;
49
+ orgName: string;
50
+ connectedPeople: any;
51
+ search?: any;
52
+ style?: any;
53
+ showOrgName?: boolean;
54
+ notifications?: any;
55
+ requestAppsFetch: any;
56
+ requestConnectedPeopleFetch: any;
57
+ requestUnlinkConnectedPeople: any;
58
+ requestSwitchConnectedPerson: any;
59
+ requestClearAppsCache: any;
60
+ requestClearConnectedPeopleCache: any;
61
+ linkToProfile?: boolean;
62
+ onLinkToProfileClick?: () => any;
63
+ }, {
64
+ appsMenuVisible: boolean;
65
+ userMenuVisible: boolean;
66
+ routesVisible: boolean;
67
+ }> {
68
+ static defaultProps: {
69
+ notifications: () => any;
35
70
  search: () => any;
36
71
  linkToProfile: boolean;
37
72
  showOrgName: boolean;
38
- useDummyNotifications: boolean;
39
73
  };
40
- };
41
- declare const Route: ({ active, colors, style, ...nativeProps }: {
74
+ constructor(props: any);
75
+ hideRoutes(): void;
76
+ showRoutes(): void;
77
+ getTextColor(): any;
78
+ render(): JSX.Element;
79
+ }
80
+ export declare class Route extends React.Component<{
42
81
  active: boolean;
43
- children: React.ReactNode;
44
82
  colors: any;
45
- href?: string;
46
83
  style?: object;
47
- }) => JSX.Element;
48
- export { Topbar, Route };
84
+ href?: string;
85
+ }, {
86
+ entered: boolean;
87
+ down: boolean;
88
+ }> {
89
+ constructor(props: any);
90
+ render(): JSX.Element;
91
+ }
@@ -1,45 +1,48 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  import * as PCO_URL from "@planningcenter/url";
3
- declare const Topbar: {
4
- (props: {
5
- apps: {
6
- attributes: {
7
- name: string;
8
- url: string;
9
- };
10
- }[];
11
- env: PCO_URL.Environment;
12
- appName: string;
13
- routes: any;
14
- colors: any;
15
- userAvatarPath: string;
16
- userId: string;
17
- userName: string;
18
- orgName: string;
19
- connectedPeople: {
20
- id: number;
21
- attributes: {
22
- name: string;
23
- organization_name: string;
24
- };
25
- }[];
26
- style?: any;
27
- currentRouteComponent?: any;
28
- requestAppsFetch: any;
29
- requestConnectedPeopleFetch: any;
30
- requestUnlinkConnectedPeople: any;
31
- requestSwitchConnectedPerson: any;
32
- requestClearAppsCache: any;
33
- requestClearConnectedPeopleCache: any;
34
- useDummyNotifications?: boolean;
35
- notifications?: any;
36
- }): JSX.Element;
37
- defaultProps: {
3
+ export declare class Topbar extends React.Component<{
4
+ apps: {
5
+ attributes: {
6
+ name: string;
7
+ url: string;
8
+ };
9
+ }[];
10
+ env: PCO_URL.Environment;
11
+ appName: string;
12
+ routes: any;
13
+ colors: any;
14
+ userAvatarPath: string;
15
+ userId: string;
16
+ userName: string;
17
+ orgName: string;
18
+ connectedPeople: {
19
+ id: number;
20
+ attributes: {
21
+ name: string;
22
+ organization_name: string;
23
+ };
24
+ }[];
25
+ style?: any;
26
+ currentRouteComponent?: any;
27
+ requestAppsFetch: any;
28
+ requestConnectedPeopleFetch: any;
29
+ requestUnlinkConnectedPeople: any;
30
+ requestSwitchConnectedPerson: any;
31
+ requestClearAppsCache: any;
32
+ requestClearConnectedPeopleCache: any;
33
+ notifications?: any;
34
+ }, {
35
+ routesMenuVisible: boolean;
36
+ userMenuVisible: boolean;
37
+ }> {
38
+ constructor(props: any);
39
+ static defaultProps: {
38
40
  currentRouteComponent: (props: any) => JSX.Element;
39
41
  };
40
- };
41
- declare const Route: ({ active, ...props }: {
42
+ componentDidUpdate(): "" | "hidden";
43
+ render(): JSX.Element;
44
+ }
45
+ export declare const Route: ({ active, ...props }: {
42
46
  [x: string]: any;
43
47
  active: any;
44
48
  }) => JSX.Element;
45
- export { Route, Topbar };