@planningcenter/topbar 8.3.2 → 8.4.0-alpha.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 +56 -0
- package/dist/index.d.ts +10 -0
- package/dist/modules/api_request.d.ts +23 -0
- package/dist/modules/apps_provider.d.ts +30 -0
- package/dist/modules/avatar.d.ts +7 -0
- package/dist/modules/client_storage.d.ts +12 -0
- package/dist/modules/color_app_icon.d.ts +5 -0
- package/dist/modules/color_app_squircles.d.ts +14 -0
- package/dist/modules/colors.d.ts +46 -0
- package/dist/modules/components/apps_button.d.ts +10 -0
- package/dist/modules/components/apps_menu.d.ts +15 -0
- package/dist/modules/components/conditional_wrap.d.ts +7 -0
- package/dist/modules/components/eyebrow.d.ts +6 -0
- package/dist/modules/components/hoverable.d.ts +11 -0
- package/dist/modules/components/hoverable_list_item.d.ts +9 -0
- package/dist/modules/components/notification_bell.d.ts +6 -0
- package/dist/modules/components/notification_item.d.ts +11 -0
- package/dist/modules/components/notifications_menu.d.ts +19 -0
- package/dist/modules/components/notifications_menu_blank_state.d.ts +8 -0
- package/dist/modules/components/notifications_menu_wrapper.d.ts +7 -0
- package/dist/modules/components/outsider.d.ts +13 -0
- package/dist/modules/components/popover_root.d.ts +6 -0
- package/dist/modules/components/popup.d.ts +9 -0
- package/dist/modules/components/popup_root.d.ts +6 -0
- package/dist/modules/components/spinner.d.ts +4 -0
- package/dist/modules/connected_people_provider.d.ts +21 -0
- package/dist/modules/display_switch.d.ts +26 -0
- package/dist/modules/formatters.d.ts +15 -0
- package/dist/modules/get_apps_switch_product_path.d.ts +1 -0
- package/dist/modules/hooks/use_hover.d.ts +3 -0
- package/dist/modules/hooks/use_notifications.d.ts +15 -0
- package/dist/modules/medium_topbar.d.ts +42 -0
- package/dist/modules/mono_app_icon.d.ts +7 -0
- package/dist/modules/mono_app_name.d.ts +6 -0
- package/dist/modules/mono_app_symbols.d.ts +57 -0
- package/dist/modules/mono_app_text.d.ts +66 -0
- package/dist/modules/not_small_topbar.d.ts +48 -0
- package/dist/modules/platform_announcements.d.ts +31 -0
- package/dist/modules/product_announcement.d.ts +20 -0
- package/dist/modules/small_topbar.d.ts +45 -0
- package/dist/modules/styled_root.d.ts +6 -0
- package/dist/modules/styles.d.ts +9 -0
- package/dist/modules/symbols.d.ts +42 -0
- package/dist/modules/unbutton.d.ts +11 -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 +2 -0
- package/dist/topbar.modern.css.map +1 -0
- package/dist/topbar.modern.js +1 -1
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.css +2 -0
- package/dist/topbar.module.css.map +1 -0
- 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 +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/apps_provider.d.ts +3 -13
- 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/colors.d.ts +3 -0
- package/dist/types/modules/colors.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 +2 -2
- 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 +2 -10
- 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 +7 -6
- 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/get_login_profile_path.d.ts +2 -2
- package/dist/types/modules/get_login_profile_path.d.ts.map +1 -1
- package/dist/types/modules/hooks/use_local_notifications.d.ts +9 -0
- package/dist/types/modules/hooks/use_local_notifications.d.ts.map +1 -0
- package/dist/types/modules/hooks/use_notifications.d.ts.map +1 -1
- package/dist/types/modules/hooks/use_store.d.ts +3 -0
- package/dist/types/modules/hooks/use_store.d.ts.map +1 -0
- 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/medium_topbar.d.ts +39 -0
- package/dist/types/modules/medium_topbar.d.ts.map +1 -0
- 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/helpdesk_trigger.d.ts +4 -0
- package/dist/types/modules/not_small_topbar/helpdesk_trigger.d.ts.map +1 -0
- package/dist/types/modules/not_small_topbar/index.d.ts +26 -0
- package/dist/types/modules/not_small_topbar/index.d.ts.map +1 -0
- package/dist/types/modules/not_small_topbar/user_menu.d.ts +23 -0
- package/dist/types/modules/not_small_topbar/user_menu.d.ts.map +1 -0
- package/dist/types/modules/not_small_topbar/user_menu_trigger.d.ts +16 -0
- package/dist/types/modules/not_small_topbar/user_menu_trigger.d.ts.map +1 -0
- 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/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 +10 -0
- package/dist/types/modules/profile_container.d.ts.map +1 -0
- package/dist/types/modules/small_topbar/account_settings_link.d.ts +5 -0
- package/dist/types/modules/small_topbar/account_settings_link.d.ts.map +1 -0
- package/dist/types/modules/small_topbar/close_menu_button.d.ts +6 -0
- package/dist/types/modules/small_topbar/close_menu_button.d.ts.map +1 -0
- package/dist/types/modules/small_topbar/index.d.ts +17 -0
- package/dist/types/modules/small_topbar/index.d.ts.map +1 -0
- package/dist/types/modules/small_topbar/linked_accounts.d.ts +11 -0
- package/dist/types/modules/small_topbar/linked_accounts.d.ts.map +1 -0
- package/dist/types/modules/small_topbar/login_settings_link.d.ts +9 -0
- package/dist/types/modules/small_topbar/login_settings_link.d.ts.map +1 -0
- package/dist/types/modules/small_topbar/profile_link.d.ts +5 -0
- package/dist/types/modules/small_topbar/profile_link.d.ts.map +1 -0
- package/dist/types/modules/small_topbar/user_info.d.ts +13 -0
- package/dist/types/modules/small_topbar/user_info.d.ts.map +1 -0
- package/dist/types/modules/small_topbar/user_menu_trigger.d.ts +9 -0
- package/dist/types/modules/small_topbar/user_menu_trigger.d.ts.map +1 -0
- package/dist/types/modules/small_topbar/user_name.d.ts +5 -0
- package/dist/types/modules/small_topbar/user_name.d.ts.map +1 -0
- 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/theme.d.ts +5 -0
- package/dist/types/modules/theme.d.ts.map +1 -0
- 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/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/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 +13 -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/toolbar/useStore.d.ts +3 -0
- package/dist/types/modules/toolbar/useStore.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/dist/types/modules/utils.d.ts +1 -0
- package/dist/types/modules/utils.d.ts.map +1 -1
- package/package.json +14 -3
- package/CHANGELOG.md +0 -217
package/README.md
CHANGED
|
@@ -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.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { railsCsrfFetch } from "./modules/api_request";
|
|
2
|
+
export { AppsProvider, mapApps, mapResourcesToCalendar, } from "./modules/apps_provider";
|
|
3
|
+
export { ConnectedPeopleProvider } from "./modules/connected_people_provider";
|
|
4
|
+
export { DisplaySwitch } from "./modules/display_switch";
|
|
5
|
+
export { Topbar as NotSmallTopbar, Route as NotSmallRoute, } from "./modules/not_small_topbar";
|
|
6
|
+
export { Topbar as SmallTopbar, Route as SmallRoute, } from "./modules/small_topbar";
|
|
7
|
+
export { Topbar as MediumTopbar, Route as MediumRoute, } from "./modules/medium_topbar";
|
|
8
|
+
export { default as PlatformAnnouncements, StyleProvider as PlatformAnnouncementsStyleProvider, StyledAnnouncement as StyledPlatformAnnouncement, } from "./modules/platform_announcements";
|
|
9
|
+
export { ProductAnnouncement, StyleProvider as ProductAnnouncementStyleProvider, StyledAnnouncement as StyledProductAnnouncement, StyledDismissButton as StyledProductAnnouncementDimissButton, } from "./modules/product_announcement";
|
|
10
|
+
export { Bell as BellIcon, X as XIcon, Spyglass as SpyglassIcon, } from "./modules/symbols";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Environment } from "@planningcenter/url";
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
railsEnv?: Environment;
|
|
5
|
+
currentPerson?: {
|
|
6
|
+
id: number;
|
|
7
|
+
};
|
|
8
|
+
Rails?: {
|
|
9
|
+
csrfToken: () => string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare type Fetch = typeof fetch;
|
|
14
|
+
export declare const defaultFetch: Fetch;
|
|
15
|
+
export declare const railsCsrfFetch: Fetch;
|
|
16
|
+
export default function apiRequest(fetch: Fetch, url: string, { method, data }?: {
|
|
17
|
+
method?: string;
|
|
18
|
+
data?: any;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
response: Response;
|
|
21
|
+
json: any;
|
|
22
|
+
ok: boolean;
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PCO_URL from "@planningcenter/url";
|
|
3
|
+
import { Fetch } from "./api_request";
|
|
4
|
+
export declare class AppsProvider extends React.Component<{
|
|
5
|
+
env: PCO_URL.Environment;
|
|
6
|
+
formatter?: any;
|
|
7
|
+
configuredFetch?: Fetch;
|
|
8
|
+
render: (apps: object[], callback: any) => React.ReactElement<any>;
|
|
9
|
+
}, {
|
|
10
|
+
apps: object[];
|
|
11
|
+
}> {
|
|
12
|
+
constructor(props: any);
|
|
13
|
+
static defaultProps: {
|
|
14
|
+
formatter: typeof mapApps;
|
|
15
|
+
configuredFetch: typeof fetch;
|
|
16
|
+
};
|
|
17
|
+
fetch(): void;
|
|
18
|
+
remove(): void;
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
render(): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
|
|
21
|
+
}
|
|
22
|
+
interface App {
|
|
23
|
+
attributes: {
|
|
24
|
+
name: string;
|
|
25
|
+
url: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export declare function mapResourcesToCalendar(apps: App[]): App[];
|
|
29
|
+
export declare function mapApps(apps: App[]): App[];
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare class ClientStorage extends React.Component<{
|
|
3
|
+
item: string;
|
|
4
|
+
method?: "localStorage" | "sessionStorage";
|
|
5
|
+
render: (apps: any, other: any) => React.ReactElement<any>;
|
|
6
|
+
}, {}> {
|
|
7
|
+
static defaultProps: {
|
|
8
|
+
method: string;
|
|
9
|
+
};
|
|
10
|
+
update(value: any): void;
|
|
11
|
+
render(): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function Accounts(): JSX.Element[];
|
|
3
|
+
export declare function API(): JSX.Element[];
|
|
4
|
+
export declare function Calendar(): JSX.Element[];
|
|
5
|
+
export declare function CheckIns(): JSX.Element[];
|
|
6
|
+
export declare function ChurchCenter(): JSX.Element[];
|
|
7
|
+
export declare function Giving(): JSX.Element[];
|
|
8
|
+
export declare function Groups(): JSX.Element[];
|
|
9
|
+
export declare function Home(): JSX.Element[];
|
|
10
|
+
export declare function People(): JSX.Element[];
|
|
11
|
+
export declare function Publishing(): JSX.Element[];
|
|
12
|
+
export declare function Registrations(): JSX.Element[];
|
|
13
|
+
export declare function Resources(): JSX.Element[];
|
|
14
|
+
export declare function Services(): JSX.Element[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare const colors: {
|
|
2
|
+
danger43: string;
|
|
3
|
+
danger45: string;
|
|
4
|
+
danger47: string;
|
|
5
|
+
danger93: string;
|
|
6
|
+
danger97: string;
|
|
7
|
+
darkNeutral07: string;
|
|
8
|
+
darkNeutral12: string;
|
|
9
|
+
darkNeutral15: string;
|
|
10
|
+
darkNeutral17: string;
|
|
11
|
+
darkNeutral19: string;
|
|
12
|
+
darkNeutral24: string;
|
|
13
|
+
darkNeutral32: string;
|
|
14
|
+
darkNeutral50: string;
|
|
15
|
+
darkNeutral68: string;
|
|
16
|
+
darkNeutral88: string;
|
|
17
|
+
darkNeutral98: string;
|
|
18
|
+
interaction45: string;
|
|
19
|
+
interaction50: string;
|
|
20
|
+
interaction55: string;
|
|
21
|
+
interaction66: string;
|
|
22
|
+
interaction91: string;
|
|
23
|
+
interaction93: string;
|
|
24
|
+
lightNeutral100: string;
|
|
25
|
+
lightNeutral12: string;
|
|
26
|
+
lightNeutral24: string;
|
|
27
|
+
lightNeutral45: string;
|
|
28
|
+
lightNeutral62: string;
|
|
29
|
+
lightNeutral81: string;
|
|
30
|
+
lightNeutral88: string;
|
|
31
|
+
lightNeutral93: string;
|
|
32
|
+
lightNeutral95: string;
|
|
33
|
+
lightNeutral97: string;
|
|
34
|
+
lightNeutral98: string;
|
|
35
|
+
success23: string;
|
|
36
|
+
success25: string;
|
|
37
|
+
success27: string;
|
|
38
|
+
success91: string;
|
|
39
|
+
success97: string;
|
|
40
|
+
warning49: string;
|
|
41
|
+
warning55: string;
|
|
42
|
+
warning63: string;
|
|
43
|
+
warning94: string;
|
|
44
|
+
warning97: string;
|
|
45
|
+
};
|
|
46
|
+
export default colors;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const AppsButton: ({ appName, colors, displayIconOnly, expanded, onClick, style, ...nativeProps }: {
|
|
3
|
+
appName: string;
|
|
4
|
+
colors: any;
|
|
5
|
+
displayIconOnly?: boolean;
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
onClick: any;
|
|
8
|
+
style?: object;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export default AppsButton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as PCO_URL from "@planningcenter/url";
|
|
3
|
+
declare const AppsMenu: ({ appName, apps, env, toggle, visible, }: {
|
|
4
|
+
appName: string;
|
|
5
|
+
apps: {
|
|
6
|
+
attributes: {
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
9
|
+
};
|
|
10
|
+
}[];
|
|
11
|
+
env: PCO_URL.Environment;
|
|
12
|
+
toggle: any;
|
|
13
|
+
visible: boolean;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
export default AppsMenu;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Hoverable: ({ active, component: C, hover, style, ...nativeProps }: {
|
|
3
|
+
active?: any;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
component?: any;
|
|
6
|
+
hover?: any;
|
|
7
|
+
onClick?: any;
|
|
8
|
+
style?: object;
|
|
9
|
+
type?: string;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export default Hoverable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const HoverableListItem: ({ component: C, style, ...nativeProps }: {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
component?: any;
|
|
5
|
+
href?: string;
|
|
6
|
+
onClick?: any;
|
|
7
|
+
style?: object;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default HoverableListItem;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Notification } from "../interfaces";
|
|
3
|
+
declare const NotificationItem: ({ mobile, isLast, onMarkAsRead, onToggleRead, showBottomBorder, notification, }: {
|
|
4
|
+
mobile?: boolean;
|
|
5
|
+
isLast?: boolean;
|
|
6
|
+
onMarkAsRead?: (notification: Notification) => any;
|
|
7
|
+
onToggleRead: any;
|
|
8
|
+
showBottomBorder?: boolean;
|
|
9
|
+
notification: Notification;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export default NotificationItem;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as PCO_URL from "@planningcenter/url";
|
|
3
|
+
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;
|
|
6
|
+
handleMarkAllAsRead: () => any;
|
|
7
|
+
handleMarkAsRead: (notification: Notification) => any;
|
|
8
|
+
handleToggleRead: (notification: Notification) => any;
|
|
9
|
+
hasError?: boolean;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
mobile?: boolean;
|
|
12
|
+
notifications: {
|
|
13
|
+
read: Notification[];
|
|
14
|
+
unread: Notification[];
|
|
15
|
+
};
|
|
16
|
+
toggle?: any;
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
}) => JSX.Element;
|
|
19
|
+
export default NotificationsMenu;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const NotificationsMenuBlankState: ({ dark, description, style, title, ...props }: {
|
|
3
|
+
dark?: boolean;
|
|
4
|
+
description: string;
|
|
5
|
+
style?: object;
|
|
6
|
+
title?: string;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export default NotificationsMenuBlankState;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export default class Outsider extends React.Component<{
|
|
3
|
+
cleanup: boolean;
|
|
4
|
+
component: any;
|
|
5
|
+
onOutsideClick: any;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
}, {}> {
|
|
8
|
+
private container;
|
|
9
|
+
constructor(props: any);
|
|
10
|
+
componentWillUnmount(): void;
|
|
11
|
+
handleOutsideClick(e: any): any;
|
|
12
|
+
render(): JSX.Element;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PCO_URL from "@planningcenter/url";
|
|
3
|
+
import { Fetch } from "./api_request";
|
|
4
|
+
export declare class ConnectedPeopleProvider extends React.Component<{
|
|
5
|
+
env: PCO_URL.Environment;
|
|
6
|
+
configuredFetch?: Fetch;
|
|
7
|
+
render: (connectedPeople: object[], callback: any) => React.ReactElement<any>;
|
|
8
|
+
}, {
|
|
9
|
+
connectedPeople: object[];
|
|
10
|
+
}> {
|
|
11
|
+
constructor(props: any);
|
|
12
|
+
static defaultProps: {
|
|
13
|
+
configuredFetch: typeof fetch;
|
|
14
|
+
};
|
|
15
|
+
fetch(): void;
|
|
16
|
+
remove(): void;
|
|
17
|
+
unlink(): void;
|
|
18
|
+
switch(toId: string, returnPath: string): void;
|
|
19
|
+
componentDidMount(): void;
|
|
20
|
+
render(): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare class PointBreak extends React.Component<{
|
|
3
|
+
render: (breakpoint: string) => React.ReactElement<any>;
|
|
4
|
+
}, {
|
|
5
|
+
width: number;
|
|
6
|
+
}> {
|
|
7
|
+
constructor(props: any);
|
|
8
|
+
setWindowWidth(): void;
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
componentWillUnmount(): void;
|
|
11
|
+
breakpointString(width: any): "xs" | "sm" | "md" | "lg" | "xl";
|
|
12
|
+
render(): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
|
|
13
|
+
}
|
|
14
|
+
export declare class DisplaySwitch extends React.Component<{
|
|
15
|
+
smallBreakpoints: String[];
|
|
16
|
+
mediumBreakpoints: String[];
|
|
17
|
+
smallTopbar: (breakpointShorthand: string) => React.ReactElement<any>;
|
|
18
|
+
mediumTopbar?: (breakpointShorthand: string) => React.ReactElement<any>;
|
|
19
|
+
notSmallTopbar: (breakpointShortand: string) => React.ReactElement<any>;
|
|
20
|
+
}, {}> {
|
|
21
|
+
static defaultProps: {
|
|
22
|
+
smallBreakpoints: string[];
|
|
23
|
+
mediumBreakpoints: string[];
|
|
24
|
+
};
|
|
25
|
+
render(): JSX.Element;
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
}
|
|
14
|
+
export declare const appsMenuFormatter: (apps: App[]) => App[];
|
|
15
|
+
export declare const connectedPeopleMenuFormatter: (connectedPeople: ConnectedPerson[]) => ConnectedPerson[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getAppsSwitchProductPath(productName: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as PCO_URL from "@planningcenter/url";
|
|
2
|
+
import { Notification } from "../interfaces";
|
|
3
|
+
declare const useNotifications: ({ env, userId, }: {
|
|
4
|
+
env: PCO_URL.Environment;
|
|
5
|
+
userId: string;
|
|
6
|
+
}) => {
|
|
7
|
+
handleMarkAllAsRead: () => any;
|
|
8
|
+
handleMarkAsRead: (notification: Notification) => any;
|
|
9
|
+
handleToggleRead: (notification: Notification) => any;
|
|
10
|
+
hasError: boolean;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
read: Notification[];
|
|
13
|
+
unread: Notification[];
|
|
14
|
+
};
|
|
15
|
+
export default useNotifications;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
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: {
|
|
33
|
+
currentRouteComponent: (props: any) => JSX.Element;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
declare const Route: ({ active, style, name, ...props }: {
|
|
37
|
+
[x: string]: any;
|
|
38
|
+
active: any;
|
|
39
|
+
style: any;
|
|
40
|
+
name?: string;
|
|
41
|
+
}) => JSX.Element;
|
|
42
|
+
export { Route, Topbar };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function Squircle({ color, ...platformProps }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
color?: string;
|
|
5
|
+
}): JSX.Element;
|
|
6
|
+
export declare function Accounts({ color, ...platformProps }: {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
color: any;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export declare function API({ color, ...platformProps }: {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
color: any;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
export declare function Calendar({ color, ...platformProps }: {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
color: any;
|
|
17
|
+
}): JSX.Element;
|
|
18
|
+
export declare function CheckIns({ color, ...platformProps }: {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
color: any;
|
|
21
|
+
}): JSX.Element;
|
|
22
|
+
export declare function ChurchCenter({ color, ...platformProps }: {
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
color: any;
|
|
25
|
+
}): JSX.Element;
|
|
26
|
+
export declare function Giving({ color, ...platformProps }: {
|
|
27
|
+
[x: string]: any;
|
|
28
|
+
color: any;
|
|
29
|
+
}): JSX.Element;
|
|
30
|
+
export declare function Groups({ color, ...platformProps }: {
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
color: any;
|
|
33
|
+
}): JSX.Element;
|
|
34
|
+
export declare function Home({ color, ...platformProps }: {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
color: any;
|
|
37
|
+
}): JSX.Element;
|
|
38
|
+
export declare function People({ color, ...platformProps }: {
|
|
39
|
+
[x: string]: any;
|
|
40
|
+
color: any;
|
|
41
|
+
}): JSX.Element;
|
|
42
|
+
export declare function Publishing({ color, ...platformProps }: {
|
|
43
|
+
[x: string]: any;
|
|
44
|
+
color: any;
|
|
45
|
+
}): JSX.Element;
|
|
46
|
+
export declare function Registrations({ color, ...platformProps }: {
|
|
47
|
+
[x: string]: any;
|
|
48
|
+
color: any;
|
|
49
|
+
}): JSX.Element;
|
|
50
|
+
export declare function Resources({ color, ...platformProps }: {
|
|
51
|
+
[x: string]: any;
|
|
52
|
+
color: any;
|
|
53
|
+
}): JSX.Element;
|
|
54
|
+
export declare function Services({ color, ...platformProps }: {
|
|
55
|
+
[x: string]: any;
|
|
56
|
+
color: any;
|
|
57
|
+
}): JSX.Element;
|