@planningcenter/topbar 8.3.1 → 8.3.2-home-team.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.
- package/README.md +67 -11
- 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.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/__tests__/canary.test.d.ts +1 -0
- package/dist/types/__tests__/canary.test.d.ts.map +1 -0
- package/dist/types/dev/dev.d.ts +2 -0
- package/dist/types/dev/dev.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/jest.config.d.ts +5 -0
- package/dist/types/jest.config.d.ts.map +1 -0
- package/dist/types/modules/app_symbols.d.ts +34 -0
- package/dist/types/modules/app_symbols.d.ts.map +1 -0
- package/dist/types/modules/apps_provider.d.ts +1 -1
- package/dist/types/modules/apps_provider.d.ts.map +1 -1
- package/dist/types/modules/avatar.d.ts +2 -3
- package/dist/types/modules/avatar.d.ts.map +1 -1
- package/dist/types/modules/client_storage.d.ts +2 -2
- package/dist/types/modules/client_storage.d.ts.map +1 -1
- package/dist/types/modules/color_app_icon.d.ts +0 -1
- package/dist/types/modules/color_app_icon.d.ts.map +1 -1
- package/dist/types/modules/color_app_squircles.d.ts +0 -1
- package/dist/types/modules/color_app_squircles.d.ts.map +1 -1
- package/dist/types/modules/components/apps_button.d.ts +0 -1
- package/dist/types/modules/components/apps_button.d.ts.map +1 -1
- package/dist/types/modules/components/apps_menu.d.ts +0 -1
- package/dist/types/modules/components/apps_menu.d.ts.map +1 -1
- package/dist/types/modules/components/conditional_wrap.d.ts +1 -1
- package/dist/types/modules/components/conditional_wrap.d.ts.map +1 -1
- package/dist/types/modules/components/eyebrow.d.ts +1 -1
- package/dist/types/modules/components/eyebrow.d.ts.map +1 -1
- package/dist/types/modules/components/hoverable.d.ts +1 -1
- package/dist/types/modules/components/hoverable.d.ts.map +1 -1
- package/dist/types/modules/components/hoverable_list_item.d.ts +1 -1
- package/dist/types/modules/components/hoverable_list_item.d.ts.map +1 -1
- package/dist/types/modules/components/notification_bell.d.ts +0 -1
- package/dist/types/modules/components/notification_bell.d.ts.map +1 -1
- package/dist/types/modules/components/notification_item.d.ts +0 -1
- package/dist/types/modules/components/notification_item.d.ts.map +1 -1
- package/dist/types/modules/components/notifications_menu.d.ts +0 -1
- package/dist/types/modules/components/notifications_menu.d.ts.map +1 -1
- package/dist/types/modules/components/notifications_menu_blank_state.d.ts +2 -2
- package/dist/types/modules/components/notifications_menu_blank_state.d.ts.map +1 -1
- package/dist/types/modules/components/notifications_menu_wrapper.d.ts +1 -1
- package/dist/types/modules/components/notifications_menu_wrapper.d.ts.map +1 -1
- package/dist/types/modules/components/outsider.d.ts +1 -1
- package/dist/types/modules/components/outsider.d.ts.map +1 -1
- package/dist/types/modules/components/popover_root.d.ts +1 -1
- package/dist/types/modules/components/popover_root.d.ts.map +1 -1
- package/dist/types/modules/components/popup.d.ts +1 -1
- package/dist/types/modules/components/popup.d.ts.map +1 -1
- package/dist/types/modules/components/popup_root.d.ts +1 -1
- package/dist/types/modules/components/popup_root.d.ts.map +1 -1
- package/dist/types/modules/components/spinner.d.ts +0 -1
- package/dist/types/modules/components/spinner.d.ts.map +1 -1
- package/dist/types/modules/connected_people_provider.d.ts +3 -3
- package/dist/types/modules/connected_people_provider.d.ts.map +1 -1
- package/dist/types/modules/display_switch.d.ts +2 -2
- package/dist/types/modules/display_switch.d.ts.map +1 -1
- package/dist/types/modules/dummy_data.d.ts +4 -0
- package/dist/types/modules/dummy_data.d.ts.map +1 -0
- package/dist/types/modules/error_boundary.d.ts +25 -0
- package/dist/types/modules/error_boundary.d.ts.map +1 -0
- package/dist/types/modules/hooks/use_notifications.d.ts.map +1 -1
- package/dist/types/modules/hooks/use_topbar_api.d.ts +2 -2
- package/dist/types/modules/hooks/use_topbar_api.d.ts.map +1 -1
- package/dist/types/modules/interfaces.d.ts +99 -47
- package/dist/types/modules/interfaces.d.ts.map +1 -1
- package/dist/types/modules/mfa_status.d.ts +0 -1
- package/dist/types/modules/mfa_status.d.ts.map +1 -1
- package/dist/types/modules/mono_app_icon.d.ts +0 -1
- package/dist/types/modules/mono_app_icon.d.ts.map +1 -1
- package/dist/types/modules/mono_app_name.d.ts +0 -1
- package/dist/types/modules/mono_app_name.d.ts.map +1 -1
- package/dist/types/modules/mono_app_symbols.d.ts +0 -1
- package/dist/types/modules/mono_app_symbols.d.ts.map +1 -1
- package/dist/types/modules/mono_app_text.d.ts +0 -1
- package/dist/types/modules/mono_app_text.d.ts.map +1 -1
- package/dist/types/modules/not_small_topbar.d.ts +1 -1
- package/dist/types/modules/not_small_topbar.d.ts.map +1 -1
- package/dist/types/modules/pco_url.d.ts +3 -0
- package/dist/types/modules/pco_url.d.ts.map +1 -0
- package/dist/types/modules/platform_announcements.d.ts +3 -3
- package/dist/types/modules/platform_announcements.d.ts.map +1 -1
- package/dist/types/modules/product_announcement.d.ts +1 -1
- package/dist/types/modules/product_announcement.d.ts.map +1 -1
- package/dist/types/modules/profile_container.d.ts +9 -9
- package/dist/types/modules/small_topbar.d.ts +0 -1
- package/dist/types/modules/small_topbar.d.ts.map +1 -1
- package/dist/types/modules/styled_root.d.ts +0 -1
- package/dist/types/modules/styled_root.d.ts.map +1 -1
- package/dist/types/modules/symbols.d.ts +2 -2
- package/dist/types/modules/symbols.d.ts.map +1 -1
- package/dist/types/modules/toolbar/components/drawer.d.ts +5 -0
- package/dist/types/modules/toolbar/components/drawer.d.ts.map +1 -0
- package/dist/types/modules/toolbar/components/drawer_header.d.ts +5 -0
- package/dist/types/modules/toolbar/components/drawer_header.d.ts.map +1 -0
- package/dist/types/modules/toolbar/components/drawer_heading.d.ts +5 -0
- package/dist/types/modules/toolbar/components/drawer_heading.d.ts.map +1 -0
- package/dist/types/modules/toolbar/components/header.d.ts +8 -0
- package/dist/types/modules/toolbar/components/header.d.ts.map +1 -0
- package/dist/types/modules/toolbar/components/index.d.ts +6 -0
- package/dist/types/modules/toolbar/components/index.d.ts.map +1 -0
- package/dist/types/modules/toolbar/components/switch_view.d.ts +8 -0
- package/dist/types/modules/toolbar/components/switch_view.d.ts.map +1 -0
- package/dist/types/modules/toolbar/components/user_profile.d.ts +11 -0
- package/dist/types/modules/toolbar/components/user_profile.d.ts.map +1 -0
- package/dist/types/modules/toolbar/hooks/index.d.ts +2 -0
- package/dist/types/modules/toolbar/hooks/index.d.ts.map +1 -0
- package/dist/types/modules/toolbar/hooks/use_toolbar_reducer.d.ts +20 -0
- package/dist/types/modules/toolbar/hooks/use_toolbar_reducer.d.ts.map +1 -0
- package/dist/types/modules/toolbar/index.d.ts +10 -0
- package/dist/types/modules/toolbar/index.d.ts.map +1 -0
- package/dist/types/modules/toolbar/tools/index.d.ts +3 -0
- package/dist/types/modules/toolbar/tools/index.d.ts.map +1 -0
- package/dist/types/modules/toolbar/tools/notifications.d.ts +4 -0
- package/dist/types/modules/toolbar/tools/notifications.d.ts.map +1 -0
- package/dist/types/modules/toolbar/tools/tasks.d.ts +4 -0
- package/dist/types/modules/toolbar/tools/tasks.d.ts.map +1 -0
- package/dist/types/modules/topbar_context.d.ts +1 -0
- package/dist/types/modules/topbar_context.d.ts.map +1 -1
- package/dist/types/modules/unbutton.d.ts +0 -1
- package/dist/types/modules/unbutton.d.ts.map +1 -1
- package/package.json +9 -6
- package/CHANGELOG.md +0 -210
- package/dist/index.d.ts +0 -10
- package/dist/modules/api_request.d.ts +0 -18
- package/dist/modules/apps_provider.d.ts +0 -30
- package/dist/modules/avatar.d.ts +0 -7
- package/dist/modules/client_storage.d.ts +0 -12
- package/dist/modules/color_app_icon.d.ts +0 -5
- package/dist/modules/color_app_squircles.d.ts +0 -14
- package/dist/modules/colors.d.ts +0 -46
- package/dist/modules/components/NotificationsMenuBlankState.d.ts +0 -12
- package/dist/modules/components/apps_button.d.ts +0 -10
- package/dist/modules/components/apps_menu.d.ts +0 -11
- package/dist/modules/components/conditional_wrap.d.ts +0 -7
- package/dist/modules/components/eyebrow.d.ts +0 -6
- package/dist/modules/components/hoverable.d.ts +0 -11
- package/dist/modules/components/hoverable_list_item.d.ts +0 -9
- package/dist/modules/components/notification_bell.d.ts +0 -6
- package/dist/modules/components/notification_item.d.ts +0 -11
- package/dist/modules/components/notifications_inbox.d.ts +0 -18
- package/dist/modules/components/notifications_menu.d.ts +0 -17
- package/dist/modules/components/notifications_menu_Wrapper.d.ts +0 -7
- package/dist/modules/components/notifications_menu_blank_state.d.ts +0 -8
- package/dist/modules/components/outsider.d.ts +0 -13
- package/dist/modules/components/popover_root.d.ts +0 -6
- package/dist/modules/components/popup.d.ts +0 -9
- package/dist/modules/components/popup_root.d.ts +0 -6
- package/dist/modules/components/spinner.d.ts +0 -4
- package/dist/modules/connected_people_provider.d.ts +0 -21
- package/dist/modules/display_switch.d.ts +0 -26
- package/dist/modules/dummy_data.d.ts +0 -3
- package/dist/modules/formatters.d.ts +0 -3
- package/dist/modules/get_apps_switch_product_path.d.ts +0 -1
- package/dist/modules/hooks/use_hover.d.ts +0 -3
- package/dist/modules/hooks/use_local_storage.d.ts +0 -10
- package/dist/modules/hooks/use_notifications.d.ts +0 -16
- package/dist/modules/hooks/use_topbar_api.d.ts +0 -8
- package/dist/modules/medium_topbar.d.ts +0 -46
- package/dist/modules/mono_app_icon.d.ts +0 -7
- package/dist/modules/mono_app_name.d.ts +0 -6
- package/dist/modules/mono_app_symbols.d.ts +0 -57
- package/dist/modules/mono_app_text.d.ts +0 -66
- package/dist/modules/not_small_topbar.d.ts +0 -91
- package/dist/modules/platform_announcements.d.ts +0 -31
- package/dist/modules/product_announcement.d.ts +0 -20
- package/dist/modules/small_topbar.d.ts +0 -48
- package/dist/modules/styled_root.d.ts +0 -6
- package/dist/modules/styles.d.ts +0 -9
- package/dist/modules/symbols.d.ts +0 -16
- package/dist/modules/topbar_context.d.ts +0 -5
- package/dist/modules/unbutton.d.ts +0 -11
- package/dist/topbar +0 -2
- package/dist/topbar.map +0 -1
- package/dist/topbar.modern.css +0 -2
- package/dist/topbar.modern.css.map +0 -1
- package/dist/topbar.module.css +0 -2
- package/dist/topbar.module.css.map +0 -1
- package/dist/types/modules/medium_topbar.d.ts +0 -39
- package/dist/types/modules/medium_topbar.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ For a handful of reasons (not least of which is because we pay per Jolt connecti
|
|
|
31
31
|
**Note that this connection sharing is entirely optional for the parent app, but strongly encouraged.**
|
|
32
32
|
If a Jolt connection is not shared with topbar, it will gladly initiate its own connection specifically for its purposes.
|
|
33
33
|
|
|
34
|
-
To reuse your app's Jolt connection, topbar requires a Promise that resolves into a [Jolt client](https://github.com/
|
|
34
|
+
To reuse your app's Jolt connection, topbar requires a Promise that resolves into a [Jolt client](https://github.com/planningcenter/jolt-client/) connection.
|
|
35
35
|
If nothing is passed—or if a Promise is passed that resolves to `undefined` or `void`—topbar will initiate its own connection.
|
|
36
36
|
|
|
37
37
|
Topbar hooks into `pco-page-expired` and will `disconnect` when the session is invalidated (i.e. logged out in a different tab).
|
|
@@ -114,6 +114,62 @@ If you are passing your own Jolt client object into Topbar via props, you can co
|
|
|
114
114
|
If you are relying on Topbar to create its own Jolt connection and would like to enable logging, pass `enableJoltLogging={true}` as a prop to whichever topbar
|
|
115
115
|
you are using (`SmallTopbar`/`NotSmallTopbar`).
|
|
116
116
|
|
|
117
|
+
## Toolbar
|
|
118
|
+
|
|
119
|
+
Toolbar lives alongside Topbar on the right side of the viewport. It is responsible for the global concerns of Profile, Help Desk, Tasks, Notifications, and Core Messaging.
|
|
120
|
+
|
|
121
|
+
### Contributing
|
|
122
|
+
|
|
123
|
+
Tool implementations are self-contained modules that live in the `modules/toolbar/tools/` directory.
|
|
124
|
+
|
|
125
|
+
A tool module is required to have a named export which adheres to the following `ToolbarTool` interface.
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
interface ToolbarTool {
|
|
129
|
+
component: unknown // A React component. Stronger typing is in the works.
|
|
130
|
+
icon: string
|
|
131
|
+
name: string
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
- `component`: the React component that will be rendered into the drawer when the tool is selected.
|
|
136
|
+
- `icon`: the name of the [`tapestry-react` icon](https://planningcenter.github.io/tapestry-react/icon#preview-icons) that will be rendered as the button in Toolbar.
|
|
137
|
+
- `name`: the formal name of the tool. For now, this is only surfaced for accessibility concerns on the tool's toolbar `Button`.
|
|
138
|
+
|
|
139
|
+
### Example
|
|
140
|
+
|
|
141
|
+
The following example implements an example tool using the shared `DrawerHeader` and `DrawerHeading` components.
|
|
142
|
+
|
|
143
|
+
- `DrawerHeader` handles the placement and styling of the close button.
|
|
144
|
+
- `DrawerHeading` handles the styling of the drawer heading.
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
// tool_name.tsx
|
|
148
|
+
|
|
149
|
+
import { DrawerHeader, DrawerHeading } from "../components"
|
|
150
|
+
|
|
151
|
+
import { ToolbarTool } from "../types"
|
|
152
|
+
|
|
153
|
+
function ToolComponent({ closeDrawer }) {
|
|
154
|
+
return (
|
|
155
|
+
<>
|
|
156
|
+
<DrawerHeader closeDrawer={closeDrawer}>
|
|
157
|
+
<DrawerHeading>Tool name</DrawerHeading>
|
|
158
|
+
</DrawerHeader>
|
|
159
|
+
{/* Tool drawer content implementation */}
|
|
160
|
+
</>
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const ToolName: ToolbarTool = {
|
|
165
|
+
component: ToolComponent,
|
|
166
|
+
icon: "general.toolbarIconName",
|
|
167
|
+
name: "Tool name",
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export { ToolName }
|
|
171
|
+
```
|
|
172
|
+
|
|
117
173
|
## Migrate
|
|
118
174
|
|
|
119
175
|
These migration docs will guide you thru the process of updating to recent major releases.
|
|
@@ -137,13 +193,13 @@ If you like history, here are the initial release notes with technical considera
|
|
|
137
193
|
|
|
138
194
|
## Example product implementations
|
|
139
195
|
|
|
140
|
-
- [API](https://github.com/
|
|
141
|
-
- [Accounts](https://github.com/
|
|
142
|
-
- [Calendar](https://github.com/
|
|
143
|
-
- [Check-Ins](https://github.com/
|
|
144
|
-
- [Giving](https://github.com/
|
|
145
|
-
- [Groups](https://github.com/
|
|
146
|
-
- [People](https://github.com/
|
|
147
|
-
- [Publishing](https://github.com/
|
|
148
|
-
- [Registrations](https://github.com/
|
|
149
|
-
- [Services](https://github.com/
|
|
196
|
+
- [API](https://github.com/planningcenter/api/blob/master/app/javascript/components/api_topbar.jsx)
|
|
197
|
+
- [Accounts](https://github.com/planningcenter/accounts/blob/master/app/javascript/components/accounts_topbar.jsx)
|
|
198
|
+
- [Calendar](https://github.com/planningcenter/calendar/blob/master/app/javascript/components/CalendarTopbar.jsx)
|
|
199
|
+
- [Check-Ins](https://github.com/planningcenter/check-ins/blob/master/app/javascript/components/checkins_topbar.js)
|
|
200
|
+
- [Giving](https://github.com/planningcenter/giving/blob/master/app/javascript/application/components/giving_topbar.jsx)
|
|
201
|
+
- [Groups](https://github.com/planningcenter/groups/blob/master/app/javascript/application/components/groups_topbar.js)
|
|
202
|
+
- [People](https://github.com/planningcenter/people/blob/master/app/javascript/components/people_topbar.jsx)
|
|
203
|
+
- [Publishing](https://github.com/planningcenter/publishing/blob/master/app/javascript/src/PublishingTopbar.js)
|
|
204
|
+
- [Registrations](https://github.com/planningcenter/registrations/blob/master/app/javascript/components/registrations_topbar.jsx)
|
|
205
|
+
- [Services](https://github.com/planningcenter/services/blob/master/app/javascript/components/ServicesTopbar.js)
|
package/dist/topbar.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar::-webkit-scrollbar{display:none}
|
|
1
|
+
.hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar::-webkit-scrollbar{display:none}
|
|
2
2
|
/*# sourceMappingURL=topbar.css.map */
|
package/dist/topbar.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils.css"
|
|
1
|
+
{"version":3,"sources":["utils.css"],"names":[],"mappings":"AAAA,gBACE,uBAAwB,CACxB,oBACF,CACA,mCACE,YACF","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"]}
|