@planningcenter/topbar 8.2.0-rc.2 → 8.2.1-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.
Files changed (46) hide show
  1. package/README.md +4 -2
  2. package/dist/modules/apps_provider.d.ts +1 -1
  3. package/dist/modules/client_storage.d.ts +1 -1
  4. package/dist/modules/color_app_squircles.d.ts +1 -0
  5. package/dist/modules/colors.d.ts +46 -0
  6. package/dist/modules/components/conditional_wrap.d.ts +7 -0
  7. package/dist/modules/components/notification_item.d.ts +5 -1
  8. package/dist/modules/components/notifications_menu.d.ts +11 -3
  9. package/dist/modules/components/notifications_menu_blank_state.d.ts +8 -0
  10. package/dist/modules/components/notifications_menu_wrapper.d.ts +7 -0
  11. package/dist/modules/components/popover_root.d.ts +6 -0
  12. package/dist/modules/components/spinner.d.ts +4 -0
  13. package/dist/modules/connected_people_provider.d.ts +1 -1
  14. package/dist/modules/display_switch.d.ts +1 -1
  15. package/dist/modules/hooks/use_hover.d.ts +3 -0
  16. package/dist/modules/hooks/use_notifications.d.ts +15 -0
  17. package/dist/modules/medium_topbar.d.ts +34 -38
  18. package/dist/modules/mono_app_symbols.d.ts +4 -0
  19. package/dist/modules/mono_app_text.d.ts +5 -0
  20. package/dist/modules/not_small_topbar.d.ts +38 -61
  21. package/dist/modules/small_topbar.d.ts +39 -42
  22. package/dist/modules/symbols.d.ts +19 -0
  23. package/dist/topbar.js +1 -1
  24. package/dist/topbar.js.map +1 -1
  25. package/dist/topbar.modern.css +2 -0
  26. package/dist/topbar.modern.css.map +1 -0
  27. package/dist/topbar.modern.js +1 -1
  28. package/dist/topbar.modern.js.map +1 -1
  29. package/dist/topbar.module.css +2 -0
  30. package/dist/topbar.module.css.map +1 -0
  31. package/dist/topbar.module.js +1 -1
  32. package/dist/topbar.module.js.map +1 -1
  33. package/dist/topbar.umd.js +1 -1
  34. package/dist/topbar.umd.js.map +1 -1
  35. package/dist/{modules → types/modules}/dummy_data.d.ts +1 -0
  36. package/dist/types/modules/dummy_data.d.ts.map +1 -0
  37. package/dist/types/modules/hooks/use_local_notifications.d.ts +9 -0
  38. package/dist/types/modules/hooks/use_local_notifications.d.ts.map +1 -0
  39. package/dist/types/modules/hooks/use_notifications.d.ts.map +1 -1
  40. package/dist/types/modules/medium_topbar.d.ts +39 -0
  41. package/dist/types/modules/medium_topbar.d.ts.map +1 -0
  42. package/dist/types/modules/profile_container.d.ts +10 -0
  43. package/dist/types/modules/profile_container.d.ts.map +1 -0
  44. package/dist/types/modules/small_topbar.d.ts.map +1 -1
  45. package/package.json +2 -2
  46. package/CHANGELOG.md +0 -157
@@ -1,3 +1,4 @@
1
1
  import { Notification } from "./interfaces";
2
2
  export declare const DUMMY_DATA_UNREAD: Notification[];
3
3
  export declare const DUMMY_DATA_READ: Notification[];
4
+ //# sourceMappingURL=dummy_data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dummy_data.d.ts","sourceRoot":"","sources":["../../../modules/dummy_data.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAsB3C,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,EAezC,CAAA"}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Notification } from "../interfaces";
3
+ declare function useLocalNotifications(read: Notification[], unread: Notification[]): {
4
+ localRead: Notification[];
5
+ localUnread: Notification[];
6
+ setEnabledLocalUiUpdates: import("react").Dispatch<import("react").SetStateAction<boolean>>;
7
+ };
8
+ export default useLocalNotifications;
9
+ //# sourceMappingURL=use_local_notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use_local_notifications.d.ts","sourceRoot":"","sources":["../../../../modules/hooks/use_local_notifications.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,iBAAS,qBAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;;;;EAc1E;AAED,eAAe,qBAAqB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"use_notifications.d.ts","sourceRoot":"","sources":["../../../../modules/hooks/use_notifications.ts"],"names":[],"mappings":"AAAA,OAAO,IAAkB,MAAM,6BAA6B,CAAA;AAC5D,OAAe,KAAK,OAAO,MAAM,qBAAqB,CAAA;AAItD,OAAO,EAGL,YAAY,EACb,MAAM,eAAe,CAAA;AA0JtB,aAAK,qBAAqB,GAAG;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,OAAO,CAAC,WAAW,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC,CAAA;IACpD,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,gBAAgB,0DAMnB,qBAAqB;yBACD,MAAM,GAAG;qCACG,YAAY,KAAK,QAAQ,GAAG,CAAC;qCAC7B,YAAY,KAAK,QAAQ,GAAG,CAAC;cACpD,OAAO;eACN,OAAO;UACZ,YAAY,EAAE;YACZ,YAAY,EAAE;iBACT,MAAM;CAyOpB,CAAA;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"use_notifications.d.ts","sourceRoot":"","sources":["../../../../modules/hooks/use_notifications.ts"],"names":[],"mappings":"AAAA,OAAO,IAAkB,MAAM,6BAA6B,CAAA;AAC5D,OAAe,KAAK,OAAO,MAAM,qBAAqB,CAAA;AAItD,OAAO,EAGL,YAAY,EACb,MAAM,eAAe,CAAA;AAoKtB,aAAK,qBAAqB,GAAG;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,EAAE,OAAO,CAAC,WAAW,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC,CAAA;IACpD,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,gBAAgB,0DAMnB,qBAAqB;yBACD,MAAM,GAAG;qCACG,YAAY,KAAK,QAAQ,GAAG,CAAC;qCAC7B,YAAY,KAAK,QAAQ,GAAG,CAAC;cACpD,OAAO;eACN,OAAO;UACZ,YAAY,EAAE;YACZ,YAAY,EAAE;iBACT,MAAM;CAyOpB,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -0,0 +1,39 @@
1
+ /// <reference types="react" />
2
+ import * as PCO_URL from "@planningcenter/url";
3
+ import { App } from "./interfaces";
4
+ declare const Topbar: {
5
+ (props: {
6
+ appName: string;
7
+ apps: App[];
8
+ colors: any;
9
+ connectedPeople: any;
10
+ env: PCO_URL.Environment;
11
+ linkToProfile?: boolean;
12
+ notifications?: any;
13
+ orgName: string;
14
+ requestAppsFetch: any;
15
+ requestClearAppsCache: any;
16
+ requestClearConnectedPeopleCache: any;
17
+ requestConnectedPeopleFetch: any;
18
+ requestSwitchConnectedPerson: any;
19
+ requestUnlinkConnectedPeople: any;
20
+ routes: any;
21
+ search?: any;
22
+ showOrgName?: boolean;
23
+ style?: any;
24
+ userAvatarPath: string;
25
+ userId: string;
26
+ userName: string;
27
+ }): JSX.Element;
28
+ defaultProps: {
29
+ currentRouteComponent: (props: any) => JSX.Element;
30
+ };
31
+ };
32
+ declare const Route: ({ active, style, name, ...props }: {
33
+ [x: string]: any;
34
+ active: any;
35
+ style: any;
36
+ name?: string;
37
+ }) => JSX.Element;
38
+ export { Route, Topbar };
39
+ //# sourceMappingURL=medium_topbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"medium_topbar.d.ts","sourceRoot":"","sources":["../../../modules/medium_topbar.tsx"],"names":[],"mappings":";AAAA,OAAe,KAAK,OAAO,MAAM,qBAAqB,CAAA;AAYtD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAQlC,QAAA,MAAM,MAAM;YAAW;QACrB,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,GAAG,EAAE,CAAA;QACX,MAAM,EAAE,GAAG,CAAA;QACX,eAAe,EAAE,GAAG,CAAA;QAEpB,GAAG,EAAE,QAAQ,WAAW,CAAA;QACxB,aAAa,CAAC,EAAE,OAAO,CAAA;QACvB,aAAa,CAAC,EAAE,GAAG,CAAA;QACnB,OAAO,EAAE,MAAM,CAAA;QACf,gBAAgB,EAAE,GAAG,CAAA;QACrB,qBAAqB,EAAE,GAAG,CAAA;QAC1B,gCAAgC,EAAE,GAAG,CAAA;QACrC,2BAA2B,EAAE,GAAG,CAAA;QAChC,4BAA4B,EAAE,GAAG,CAAA;QACjC,4BAA4B,EAAE,GAAG,CAAA;QACjC,MAAM,EAAE,GAAG,CAAA;QACX,MAAM,CAAC,EAAE,GAAG,CAAA;QACZ,WAAW,CAAC,EAAE,OAAO,CAAA;QACrB,KAAK,CAAC,EAAE,GAAG,CAAA;QACX,cAAc,EAAE,MAAM,CAAA;QACtB,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;KACjB;;;;CAqYA,CAAA;AAMD,QAAA,MAAM,KAAK;;;;;iBAyBV,CAAA;AAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA"}
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ interface ProfileContainerProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ component: React.ReactNode;
4
+ href: string;
5
+ linkToProfile: boolean;
6
+ onLinkToProfileClick?: (clickEvent: any) => any;
7
+ }
8
+ declare const ProfileContainer: ({ component, href, linkToProfile, onLinkToProfileClick, ...nativeProps }: ProfileContainerProps) => JSX.Element;
9
+ export default ProfileContainer;
10
+ //# sourceMappingURL=profile_container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile_container.d.ts","sourceRoot":"","sources":["../../../modules/profile_container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,UAAU,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E,SAAS,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,OAAO,CAAA;IACtB,oBAAoB,CAAC,EAAE,CAAC,UAAU,KAAA,KAAK,GAAG,CAAA;CAC3C;AAED,QAAA,MAAM,gBAAgB,6EAMnB,qBAAqB,gBAUvB,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"small_topbar.d.ts","sourceRoot":"","sources":["../../../modules/small_topbar.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAqChD,UAAU,gBAAgB;IACxB,qBAAqB,CAAC,EAAE,GAAG,CAAA;CAC5B;AAED,QAAA,MAAM,MAAM;YAAW,iBAAiB,GAAG,gBAAgB;;;;;CA2mB1D,CAAA;AAOD,QAAA,MAAM,KAAK;;;iBAmBV,CAAA;AAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"small_topbar.d.ts","sourceRoot":"","sources":["../../../modules/small_topbar.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAqChD,UAAU,gBAAgB;IACxB,qBAAqB,CAAC,EAAE,GAAG,CAAA;CAC5B;AAED,QAAA,MAAM,MAAM;YAAW,iBAAiB,GAAG,gBAAgB;;;;;CAqnB1D,CAAA;AAOD,QAAA,MAAM,KAAK;;;iBAmBV,CAAA;AAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/topbar",
3
- "version": "8.2.0-rc.2",
3
+ "version": "8.2.1-alpha.0",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Planning Center application Topbar",
6
6
  "main": "./dist/topbar.js",
@@ -23,7 +23,7 @@
23
23
  "private": false,
24
24
  "dependencies": {
25
25
  "@churchcenter/datetime-fmt": "^1.3.2",
26
- "@planningcenter/jolt-client": "^1.2.0",
26
+ "@planningcenter/jolt-client": "^1.3.1",
27
27
  "@planningcenter/url": "^2.6.4",
28
28
  "react-cool-dimensions": "^2.0.7",
29
29
  "react-transition-group": "^4.4.2"
package/CHANGELOG.md DELETED
@@ -1,157 +0,0 @@
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.2.0-rc.2] - 2022-05-18
9
-
10
- ### Fixed
11
-
12
- - fix: hook into `pco-page-expired` to `disconnect` jolt instance when session is changed
13
-
14
- ## [8.1.1] - 2022-04-11
15
-
16
- ### Changed
17
-
18
- - fix: don't send a `timeZone` key to `@churchcenter/datetime-fmt` if it doesn't have a value
19
-
20
- ## [8.1.0] - 2022-04-11
21
-
22
- ### Changed
23
-
24
- - Removed references to Resources
25
- - Transition away from branded Accounts symbols
26
- - Fix padding in account switcher
27
- - Update styles for account switcher on mobile
28
- - Fix dark mode text styles in notifications inbox
29
- - Fix notification date timezone not displaying in the org's time zone
30
-
31
- ## [8.0.1] - 2022-03-29
32
-
33
- ### Changed
34
-
35
- - Correct the capitalization of "Check-Ins" in order to set the correct color for notifications
36
- - Bring back the `notifications` prop for topbars so that if notifications are not enabled, it will render the `notifications` prop instead
37
-
38
- ## [8.0.0] - 2022-03-24
39
-
40
- ### Added
41
-
42
- - Notification bell, indicator, and dropdown that displays the current user's read and unread notifications.
43
- - 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.
44
- - Set up prettier and eslint and allow them to have their way on the code
45
- - 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`.
46
- - Control the Login info section with the flipper flag of `TOPBAR_mfa_enabled` in People.
47
- - Show an indicator for whether MFA is configured for the current profile
48
- - Add `props.linkToProfile` to `SharedTopbarProps` (so it's available to small and not small)
49
-
50
- ### Changed
51
-
52
- - 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.
53
- - 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.
54
-
55
- ### Removed
56
-
57
- - `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).
58
- - `MediumTopbar`. Only one app (API) was using it and it wasn't worth attempting to keep feature parity with the other two topbars.
59
-
60
- ## [7.2.1] - 2021-12-09
61
-
62
- ### Fixed
63
-
64
- - Bug z-stacking Safari bug that caused expanded `smalltopbar` items to show up behind elements [#46](https://github.com/ministrycentered/topbar/pull/46)
65
- - 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)
66
-
67
- ## [7.2.0] - 2021-12-02
68
-
69
- ### Changed
70
-
71
- - New look and feel for the app switcher ([#40](https://github.com/ministrycentered/topbar/pull/40), [#42](https://github.com/ministrycentered/topbar/pull/42)).
72
- The switcher now displays Home at the top with some visual separation and Accounts (as "account") at the bottom—also with visual separation.
73
-
74
- ## [7.1.3] - 2021-11-16
75
-
76
- ### Fixed
77
-
78
- - Corrected the sorting of app names in mobile topbar as well [#36](https://github.com/ministrycentered/topbar/pull/36)
79
-
80
- ## [7.1.2] - 2021-11-11
81
-
82
- ### Fixed
83
-
84
- - Corrected the corrected sorting of app names in app switcher [#33](https://github.com/ministrycentered/topbar/pull/33)
85
-
86
- ## [7.1.1] - 2021-11-10
87
-
88
- ### Fixed
89
-
90
- - Corrected sorting of app names in app switcher [#32](https://github.com/ministrycentered/topbar/pull/32)
91
-
92
- ## [7.1.0] - 2021-11-08
93
-
94
- ### Added
95
-
96
- - Add Home to the app switcher dropdown
97
-
98
- ## [7.0.0] - 2021-10-01
99
-
100
- - Add CSRF support to login ([#46](https://github.com/planningcenter/design/pull/46) @danielma)
101
- - [First implementation in Accounts](https://github.com/ministrycentered/accounts/pull/1877/files)
102
- - [Second implementation in Giving](https://github.com/ministrycentered/giving/pull/4482/files)
103
- - Update devDependencies pins
104
- - `microbundle`: `^0.12.4` => `^0.13.0`
105
- - `webpack`: `^4.46.0` => `^5.13.0`
106
- - `webpack-cli`: `^3.3.13` => `^4.3.1`
107
- - `ts-loader`: `^7.0.5` => `^8.0.14`
108
- - `typescript`: `^3.9.7` => `^4.1.3`
109
- - `react`: `^16.14.0` => `^17.0.1`
110
- - `react-dom`: `^16.14.0` => `^17.0.1`
111
- - `@types/react`: `^16.14.2` => `^17.0.0`
112
- - `@types/react-dom`: `^16.9.10` => `^17.0.0`
113
- - Unlock modern builds by removing `--format cjs` flag for improved bundling app-side
114
- - Add `referer` query parameter to `AppSwitch` urls: [Accounts PR](https://github.com/ministrycentered/accounts/pull/1910)
115
- - Add the ability to override the topbar’s link colors via props in `NotSmallTopbar` [#122](https://github.com/planningcenter/design/pull/122)
116
- - Add `ProductAnnouncement` component
117
- - Additional top-level exports:
118
- - `ProductAnnouncementStyleProvider`
119
- - `StyledProductAnnouncement`
120
- - `StyledProductAnnouncementDimissButton`
121
- - `Topbar_ProductAnnouncement` parent selector for styling content
122
- - Fix Announcement topbars to be 14px font-size and 48px absolute height
123
-
124
- ## 6.0.0
125
-
126
- - [BREAKING] modify `/logout` urls to target Login, a2ec71d
127
-
128
- ## 5.0.0
129
-
130
- - [BREAKING] replace Registrations icon
131
- - Add `mapRegistrationsToExpiredRegistrations` to control them
132
-
133
- ## 4.11.0
134
-
135
- - Add `AppsProvider#formatter` and `mapApps`/`mapResourcesToCalendar` formatters to provide a AppsMenu control mechanism to product teams
136
- - Add `.codes` support for `pco-box`
137
-
138
- ## 4.9.0
139
-
140
- - Add support for "Calendar" app
141
-
142
- ## [Previous entries]
143
-
144
- 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].
145
-
146
- [8.1.1]: https://github.com/ministrycentered/topbar/compare/v8.1.0..v8.1.1
147
- [8.1.0]: https://github.com/ministrycentered/topbar/compare/v8.0.1..v8.1.0
148
- [8.0.1]: https://github.com/ministrycentered/topbar/compare/v8.0.0..v8.0.1
149
- [8.0.0]: https://github.com/ministrycentered/topbar/compare/v7.2.1..v8.0.0
150
- [7.2.1]: https://github.com/ministrycentered/topbar/compare/v7.2.0..v7.2.1
151
- [7.2.0]: https://github.com/ministrycentered/topbar/compare/v7.1.3..v7.2.0
152
- [7.1.3]: https://github.com/ministrycentered/topbar/compare/v7.1.2..v7.1.3
153
- [7.1.2]: https://github.com/ministrycentered/topbar/compare/v7.1.1..v7.1.2
154
- [7.1.1]: https://github.com/ministrycentered/topbar/compare/v7.1.0..v7.1.1
155
- [7.1.0]: https://github.com/ministrycentered/topbar/compare/v7.0.0..v7.1.0
156
- [7.0.0]: https://github.com/ministrycentered/topbar/compare/@planningcenter/topbar@6.0.6..v7.0.0
157
- [previous entries]: CHANGELOG-pre-4.9.0.md