@camunda/camunda-composite-components 0.1.1 → 0.1.2

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 (70) hide show
  1. package/README.md +60 -0
  2. package/lib/esm/api/api.d.ts +19 -19
  3. package/lib/esm/api/api.js +67 -65
  4. package/lib/esm/api/endpoints.const.d.ts +12 -12
  5. package/lib/esm/api/endpoints.const.js +25 -24
  6. package/lib/esm/api/jwt.utils.d.ts +3 -3
  7. package/lib/esm/api/jwt.utils.js +21 -23
  8. package/lib/esm/api/notifications.d.ts +35 -64
  9. package/lib/esm/api/notifications.js +159 -168
  10. package/lib/esm/components/c3-empty-state/c3-empty-state.d.ts +2 -9
  11. package/lib/esm/components/c3-empty-state/c3-empty-state.js +17 -58
  12. package/lib/esm/components/c3-empty-state/c3-empty-state.test.d.ts +1 -0
  13. package/lib/esm/components/c3-empty-state/c3-empty-state.test.js +12 -0
  14. package/lib/esm/components/c3-empty-state/c3-empty-state.types.d.ts +19 -19
  15. package/lib/esm/components/c3-empty-state/c3-empty-state.types.js +1 -1
  16. package/lib/esm/components/c3-navigation/c3-info-button.d.ts +3 -3
  17. package/lib/esm/components/c3-navigation/c3-info-button.js +5 -13
  18. package/lib/esm/components/c3-navigation/c3-navigation-actions/c3-action-buttons.d.ts +5 -5
  19. package/lib/esm/components/c3-navigation/c3-navigation-actions/c3-action-buttons.js +13 -21
  20. package/lib/esm/components/c3-navigation/c3-navigation-actions/c3-action-buttons.types.d.ts +10 -6
  21. package/lib/esm/components/c3-navigation/c3-navigation-actions/c3-action-buttons.types.js +1 -1
  22. package/lib/esm/components/c3-navigation/c3-navigation-appbar.d.ts +3 -3
  23. package/lib/esm/components/c3-navigation/c3-navigation-appbar.js +68 -157
  24. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.d.ts +5 -5
  25. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.js +39 -62
  26. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.d.ts +9 -10
  27. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.js +33 -56
  28. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.d.ts +9 -9
  29. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.js +57 -110
  30. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.types.d.ts +61 -72
  31. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.types.js +1 -1
  32. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.d.ts +4 -4
  33. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.js +88 -142
  34. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-org-sidebar.d.ts +5 -5
  35. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-org-sidebar.js +51 -105
  36. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.d.ts +24 -26
  37. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.js +25 -38
  38. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.d.ts +5 -5
  39. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.js +57 -146
  40. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/components.d.ts +2 -8
  41. package/lib/esm/components/c3-navigation/c3-navigation-sidebar/components.js +4 -4
  42. package/lib/esm/components/c3-navigation/c3-navigation.d.ts +2 -14
  43. package/lib/esm/components/c3-navigation/c3-navigation.js +90 -214
  44. package/lib/esm/components/c3-navigation/c3-navigation.test.d.ts +1 -0
  45. package/lib/esm/components/c3-navigation/c3-navigation.test.js +80 -0
  46. package/lib/esm/components/c3-navigation/c3-navigation.types.d.ts +63 -70
  47. package/lib/esm/components/c3-navigation/c3-navigation.types.js +1 -1
  48. package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts +13 -30
  49. package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-container.js +70 -114
  50. package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-provider.d.ts +27 -29
  51. package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-provider.js +90 -118
  52. package/lib/esm/components/c3-navigation/helpers.d.ts +3 -5
  53. package/lib/esm/components/c3-navigation/helpers.js +49 -53
  54. package/lib/esm/components/c3-navigation/index.d.ts +2 -4
  55. package/lib/esm/components/c3-navigation/index.js +3 -3
  56. package/lib/esm/components/c3-navigation/story-helpers.d.ts +18 -24
  57. package/lib/esm/components/c3-navigation/story-helpers.js +197 -200
  58. package/lib/esm/components/c3-navigation/story-templates.d.ts +8 -8
  59. package/lib/esm/components/c3-navigation/story-templates.js +33 -66
  60. package/lib/esm/components/c3-user-configuration/c3-user-configuration-provider.d.ts +16 -20
  61. package/lib/esm/components/c3-user-configuration/c3-user-configuration-provider.js +4 -9
  62. package/lib/esm/components/test-utils.d.ts +3 -0
  63. package/lib/esm/components/test-utils.js +22 -0
  64. package/lib/esm/icons/c3-icons.d.ts +5 -8
  65. package/lib/esm/icons/c3-icons.js +14 -82
  66. package/lib/esm/icons/c3-icons.types.d.ts +1 -1
  67. package/lib/esm/icons/c3-icons.types.js +1 -1
  68. package/lib/esm/index.d.ts +9 -14
  69. package/lib/esm/index.js +4 -4
  70. package/package.json +30 -20
@@ -1,30 +1,24 @@
1
- /// <reference types="react" />
2
- import {
3
- C3NavigationAppProps,
4
- C3NavigationElementProps,
5
- C3NavigationNavBarProps,
6
- C3NavigationProps,
7
- } from "./c3-navigation.types"
8
- export declare function createAppProps(): C3NavigationAppProps
1
+ import { C3NavigationAppProps, C3NavigationElementProps, C3NavigationNavBarProps, C3NavigationProps } from "./c3-navigation.types";
2
+ export declare function createAppProps(): C3NavigationAppProps;
9
3
  export declare function createAppBarProps(options?: {
10
- isOpen?: boolean
11
- elements?: Array<C3NavigationElementProps>
12
- }): C3NavigationProps["appBar"]
4
+ isOpen?: boolean;
5
+ elements?: Array<C3NavigationElementProps>;
6
+ }): C3NavigationProps["appBar"];
13
7
  export declare function createNavBarBarProps(options?: {
14
- elements?: C3NavigationNavBarProps["elements"]
15
- }): C3NavigationNavBarProps
8
+ elements?: C3NavigationNavBarProps["elements"];
9
+ }): C3NavigationNavBarProps;
16
10
  export declare function createInfoSideBarProps(options: {
17
- isOpen: boolean
18
- preceedingDividerOn2ndElement?: boolean
19
- }): C3NavigationProps["infoSideBar"]
11
+ isOpen: boolean;
12
+ preceedingDividerOn2ndElement?: boolean;
13
+ }): C3NavigationProps["infoSideBar"];
20
14
  export declare function createOrgSideBarProps(options: {
21
- isOpen: boolean
22
- orgCount: number
23
- }): C3NavigationProps["orgSideBar"]
15
+ isOpen: boolean;
16
+ orgCount: number;
17
+ }): C3NavigationProps["orgSideBar"];
24
18
  export declare function createUserSideBarProps(options: {
25
- isOpen: boolean
26
- customSection?: JSX.Element
27
- }): C3NavigationProps["userSideBar"]
19
+ isOpen: boolean;
20
+ customSection?: JSX.Element;
21
+ }): C3NavigationProps["userSideBar"];
28
22
  export declare function createNotificationSideBarProps(options: {
29
- isOpen: boolean
30
- }): C3NavigationProps["notificationSideBar"]
23
+ isOpen: boolean;
24
+ }): C3NavigationProps["notificationSideBar"];
@@ -1,214 +1,211 @@
1
- import React from "react"
2
- import { Link } from "@carbon/react"
3
- import { ArrowRight, TrashCan, Add } from "@carbon/react/icons"
1
+ import React from "react";
2
+ import { Link } from "@carbon/react";
3
+ import { ArrowRight, TrashCan, Add } from "@carbon/react/icons";
4
4
  export function createAppProps() {
5
- return {
6
- name: "Console",
7
- ariaLabel: "Camunda Console",
8
- routeProps: {
9
- href: "https://www.camunda.com",
10
- },
11
- }
5
+ return {
6
+ name: "Console",
7
+ ariaLabel: "Camunda Console",
8
+ routeProps: {
9
+ href: "https://www.camunda.com",
10
+ },
11
+ };
12
12
  }
13
13
  export function createAppBarProps(options = {}) {
14
- return {
15
- isOpen: Boolean(options?.isOpen),
16
- elements: options?.elements ?? [
17
- {
18
- key: "console",
19
- label: "Console",
20
- active: true,
21
- },
22
- {
23
- key: "modeler",
24
- label: "Modeler",
25
- active: false,
26
- routeProps: { onClick: () => console.log("Redirecting to Modeler...") },
27
- },
28
- {
29
- key: "operate",
30
- label: "Operate",
31
- active: false,
32
- target: "_blank",
33
- href: "https://camunda.com/",
34
- },
35
- {
36
- key: "tasklist",
37
- label: "Task List",
38
- active: false,
39
- subElements: [
40
- {
41
- key: "cluster-a",
42
- label: "Cluster A",
43
- href: "https://camunda.com/",
44
- target: "_blank",
45
- },
46
- {
47
- key: "cluster-b",
48
- label: "Cluster B",
49
- onClick: () => console.log("Redirecting to Tasklist..."),
50
- },
51
- {
52
- key: "cluster-c",
53
- label: "Cluster C",
54
- routeProps: {
55
- onClick: () => console.log("Redirecting to Tasklist..."),
56
- },
57
- },
58
- ],
59
- },
60
- ],
61
- }
14
+ return {
15
+ isOpen: Boolean(options?.isOpen),
16
+ elements: options?.elements ?? [
17
+ {
18
+ key: "console",
19
+ label: "Console",
20
+ active: true,
21
+ },
22
+ {
23
+ key: "modeler",
24
+ label: "Modeler",
25
+ active: false,
26
+ routeProps: { onClick: () => console.log("Redirecting to Modeler...") },
27
+ },
28
+ {
29
+ key: "operate",
30
+ label: "Operate",
31
+ active: false,
32
+ target: "_blank",
33
+ href: "https://camunda.com/",
34
+ },
35
+ {
36
+ key: "tasklist",
37
+ label: "Task List",
38
+ active: false,
39
+ subElements: [
40
+ {
41
+ key: "cluster-a",
42
+ label: "Cluster A",
43
+ href: "https://camunda.com/",
44
+ target: "_blank",
45
+ },
46
+ {
47
+ key: "cluster-b",
48
+ label: "Cluster B",
49
+ onClick: () => console.log("Redirecting to Tasklist..."),
50
+ },
51
+ {
52
+ key: "cluster-c",
53
+ label: "Cluster C",
54
+ routeProps: {
55
+ onClick: () => console.log("Redirecting to Tasklist..."),
56
+ },
57
+ },
58
+ ],
59
+ },
60
+ ],
61
+ };
62
62
  }
63
63
  export function createNavBarBarProps(options = {}) {
64
- return {
65
- elements: options?.elements ?? [
66
- {
67
- key: "dashboard",
68
- label: "Dashboard",
69
- isCurrentPage: true,
70
- routeProps: {},
71
- },
72
- {
73
- key: "clusters",
74
- label: "Clusters",
75
- isCurrentPage: false,
76
- routeProps: {
77
- onClick: () => console.log("Redirecting to clusters..."),
78
- },
79
- },
80
- ],
81
- orgName: "Camunda",
82
- tags: [
83
- {
84
- key: "stage",
85
- label: "Production",
86
- color: "red",
87
- },
88
- {
89
- key: "githash",
90
- label: "abcdefg",
91
- color: "teal",
92
- },
93
- {
94
- key: "fooTooltip",
95
- label: "I am a tooltip pill",
96
- color: "cool-gray",
97
- tooltip: {
98
- content: React.createElement(
99
- "p",
100
- null,
101
- "tooltip popover with a",
102
- " ",
103
- React.createElement(Link, { href: "http://camunda.com/" }, "link"),
104
- ),
105
- buttonLabel: "open the tooltip",
106
- },
107
- },
108
- ],
109
- }
64
+ return {
65
+ elements: options?.elements ?? [
66
+ {
67
+ key: "dashboard",
68
+ label: "Dashboard",
69
+ isCurrentPage: true,
70
+ routeProps: {},
71
+ },
72
+ {
73
+ key: "clusters",
74
+ label: "Clusters",
75
+ isCurrentPage: false,
76
+ routeProps: {
77
+ onClick: () => console.log("Redirecting to clusters..."),
78
+ },
79
+ },
80
+ ],
81
+ orgName: "Camunda",
82
+ tags: [
83
+ {
84
+ key: "stage",
85
+ label: "Production",
86
+ color: "red",
87
+ },
88
+ {
89
+ key: "githash",
90
+ label: "abcdefg",
91
+ color: "teal",
92
+ },
93
+ {
94
+ key: "fooTooltip",
95
+ label: "I am a tooltip pill",
96
+ color: "cool-gray",
97
+ tooltip: {
98
+ content: (React.createElement("p", null,
99
+ "tooltip popover with a",
100
+ " ",
101
+ React.createElement(Link, { href: "http://camunda.com/" }, "link"))),
102
+ buttonLabel: "open the tooltip",
103
+ },
104
+ },
105
+ ],
106
+ };
110
107
  }
111
108
  export function createInfoSideBarProps(options) {
112
- return {
113
- isOpen: options.isOpen,
114
- onOpen: () => console.log("Opened info sidebar"),
115
- elements: [
116
- {
117
- key: "info1",
118
- label: "Info 1",
119
- },
120
- {
121
- key: "info2",
122
- label: "Info 2",
123
- preceedingDivider: options.preceedingDividerOn2ndElement,
124
- },
125
- ],
126
- }
109
+ return {
110
+ isOpen: options.isOpen,
111
+ onOpen: () => console.log("Opened info sidebar"),
112
+ elements: [
113
+ {
114
+ key: "info1",
115
+ label: "Info 1",
116
+ },
117
+ {
118
+ key: "info2",
119
+ label: "Info 2",
120
+ preceedingDivider: options.preceedingDividerOn2ndElement,
121
+ },
122
+ ],
123
+ };
127
124
  }
128
125
  export function createOrgSideBarProps(options) {
129
- const elements = []
130
- for (let i = 0; i < options.orgCount; i++) {
131
- elements.push({
132
- key: `org-${i}`,
133
- label: `Organization ${i}`,
134
- })
135
- }
136
- return {
137
- isOpen: options.isOpen,
138
- customElements: {
139
- activeOrganization: {
140
- activeLabel: "Active Organization",
141
- otherLabel: "Other Organization",
142
- orgName: "Camunda",
143
- action: {
144
- label: "Manage",
145
- onClick: () => console.log("Manage organization"),
146
- },
147
- },
148
- },
149
- elements,
150
- bottomElements: [
151
- {
152
- key: "createTrial",
153
- label: "Create new Trial Org",
154
- renderIcon: Add,
155
- onClick: () => {
156
- console.log("clicked")
157
- },
158
- },
159
- ],
160
- }
126
+ const elements = [];
127
+ for (let i = 0; i < options.orgCount; i++) {
128
+ elements.push({
129
+ key: `org-${i}`,
130
+ label: `Organization ${i}`,
131
+ });
132
+ }
133
+ return {
134
+ isOpen: options.isOpen,
135
+ customElements: {
136
+ activeOrganization: {
137
+ activeLabel: "Active Organization",
138
+ otherLabel: "Other Organization",
139
+ orgName: "Camunda",
140
+ action: {
141
+ label: "Manage",
142
+ onClick: () => console.log("Manage organization"),
143
+ },
144
+ },
145
+ },
146
+ elements,
147
+ bottomElements: [
148
+ {
149
+ key: "createTrial",
150
+ label: "Create new Trial Org",
151
+ renderIcon: Add,
152
+ onClick: () => {
153
+ console.log("clicked");
154
+ },
155
+ },
156
+ ],
157
+ };
161
158
  }
162
159
  export function createUserSideBarProps(options) {
163
- return {
164
- isOpen: options.isOpen,
165
- version: "8.3.0-alpha4",
166
- customElements: {
167
- customSection: options.customSection,
168
- profile: {
169
- label: "Profile",
170
- user: {
171
- email: "teamcloud@camunda.com",
172
- name: "Team Cloud",
173
- },
174
- },
175
- themeSelector: {
176
- currentTheme: "dark",
177
- onChange: () => console.log("Selected dark theme"),
178
- },
179
- stageToggle: {
180
- prodFeaturesEnabled: true,
181
- toggle: () => console.log("Toggle stage"),
182
- },
183
- },
184
- elements: [
185
- {
186
- key: "cookie",
187
- label: "Cookie Preferences",
188
- },
189
- {
190
- key: "terms",
191
- label: "Terms of use",
192
- },
193
- {
194
- key: "logout",
195
- label: "Log out",
196
- kind: "ghost",
197
- renderIcon: ArrowRight,
198
- },
199
- ],
200
- bottomElements: [
201
- {
202
- key: "delete",
203
- label: "Delete account",
204
- kind: "danger--ghost",
205
- renderIcon: TrashCan,
206
- },
207
- ],
208
- }
160
+ return {
161
+ isOpen: options.isOpen,
162
+ version: "8.3.0-alpha4",
163
+ customElements: {
164
+ customSection: options.customSection,
165
+ profile: {
166
+ label: "Profile",
167
+ user: {
168
+ email: "teamcloud@camunda.com",
169
+ name: "Team Cloud",
170
+ },
171
+ },
172
+ themeSelector: {
173
+ currentTheme: "dark",
174
+ onChange: () => console.log("Selected dark theme"),
175
+ },
176
+ stageToggle: {
177
+ prodFeaturesEnabled: true,
178
+ toggle: () => console.log("Toggle stage"),
179
+ },
180
+ },
181
+ elements: [
182
+ {
183
+ key: "cookie",
184
+ label: "Cookie Preferences",
185
+ },
186
+ {
187
+ key: "terms",
188
+ label: "Terms of use",
189
+ },
190
+ {
191
+ key: "logout",
192
+ label: "Log out",
193
+ kind: "ghost",
194
+ renderIcon: ArrowRight,
195
+ },
196
+ ],
197
+ bottomElements: [
198
+ {
199
+ key: "delete",
200
+ label: "Delete account",
201
+ kind: "danger--ghost",
202
+ renderIcon: TrashCan,
203
+ },
204
+ ],
205
+ };
209
206
  }
210
207
  export function createNotificationSideBarProps(options) {
211
- return {
212
- isOpen: options.isOpen,
213
- }
208
+ return {
209
+ isOpen: options.isOpen,
210
+ };
214
211
  }
@@ -1,9 +1,9 @@
1
- import { FC } from "react"
2
- import { C3Navigation } from "./c3-navigation"
3
- import { ComponentStory } from "@storybook/react"
4
- export declare const DefaultTemplate: ComponentStory<typeof C3Navigation>
1
+ import { FC } from "react";
2
+ import { C3Navigation } from "./c3-navigation";
3
+ import { ComponentStory } from "@storybook/react";
4
+ export declare const DefaultTemplate: ComponentStory<typeof C3Navigation>;
5
5
  export declare const SuperUserToggle: FC<{
6
- isActive?: boolean
7
- onChange?: (newValue: boolean) => void
8
- }>
9
- export declare const NavbarWithCustomSection: FC
6
+ isActive?: boolean;
7
+ onChange?: (newValue: boolean) => void;
8
+ }>;
9
+ export declare const NavbarWithCustomSection: FC;
@@ -1,68 +1,35 @@
1
- import React, { useState } from "react"
2
- import { C3Navigation } from "./c3-navigation"
3
- import {
4
- createAppBarProps,
5
- createAppProps,
6
- createNavBarBarProps,
7
- createUserSideBarProps,
8
- } from "./story-helpers"
9
- import { SwitcherDivider, Toggle } from "@carbon/react"
10
- export const DefaultTemplate = (args) =>
11
- React.createElement(
12
- React.Fragment,
13
- null,
14
- React.createElement(C3Navigation, { ...args }),
15
- React.createElement("div", { id: "main-content" }),
16
- )
1
+ import React, { useState } from "react";
2
+ import { C3Navigation } from "./c3-navigation";
3
+ import { createAppBarProps, createAppProps, createNavBarBarProps, createUserSideBarProps, } from "./story-helpers";
4
+ import { SwitcherDivider, Toggle } from "@carbon/react";
5
+ export const DefaultTemplate = (args) => (React.createElement(React.Fragment, null,
6
+ React.createElement(C3Navigation, { ...args }),
7
+ React.createElement("div", { id: "main-content" })));
17
8
  export const SuperUserToggle = ({ isActive, onChange }) => {
18
- return React.createElement(
19
- React.Fragment,
20
- null,
21
- React.createElement(SwitcherDivider, null),
22
- React.createElement(
23
- "div",
24
- { style: { padding: ".5rem 1rem" } },
25
- React.createElement(Toggle, {
26
- size: "sm",
27
- id: "toggle-super-admin-mode",
28
- defaultToggled: isActive,
29
- onToggle: (superAdminModeActive) => onChange?.(superAdminModeActive),
30
- labelText: "Enter super-admin mode",
31
- "aria-label": "Enter super-admin mode",
32
- }),
33
- ),
34
- )
35
- }
9
+ return (React.createElement(React.Fragment, null,
10
+ React.createElement(SwitcherDivider, null),
11
+ React.createElement("div", { style: { padding: ".5rem 1rem" } },
12
+ React.createElement(Toggle, { size: "sm", id: "toggle-super-admin-mode", defaultToggled: isActive, onToggle: (superAdminModeActive) => onChange?.(superAdminModeActive), labelText: "Enter super-admin mode", "aria-label": "Enter super-admin mode" }))));
13
+ };
36
14
  export const NavbarWithCustomSection = () => {
37
- const [isSuperAdminModeActive, setIsSuperAdminModeActive] = useState(true)
38
- return React.createElement(
39
- React.Fragment,
40
- null,
41
- React.createElement(C3Navigation, {
42
- app: createAppProps(),
43
- appBar: createAppBarProps(),
44
- navbar: {
45
- ...createNavBarBarProps(),
46
- tags: isSuperAdminModeActive
47
- ? [
48
- {
49
- key: "superUserMode",
50
- label: "Super-user mode",
51
- color: "high-contrast",
52
- },
53
- ]
54
- : undefined,
55
- },
56
- userSideBar: {
57
- ...createUserSideBarProps({ isOpen: false }),
58
- customElements: {
59
- customSection: React.createElement(SuperUserToggle, {
60
- isActive: isSuperAdminModeActive,
61
- onChange: setIsSuperAdminModeActive,
62
- }),
63
- },
64
- },
65
- }),
66
- React.createElement("div", { id: "main-content" }),
67
- )
68
- }
15
+ const [isSuperAdminModeActive, setIsSuperAdminModeActive] = useState(true);
16
+ return (React.createElement(React.Fragment, null,
17
+ React.createElement(C3Navigation, { app: createAppProps(), appBar: createAppBarProps(), navbar: {
18
+ ...createNavBarBarProps(),
19
+ tags: isSuperAdminModeActive
20
+ ? [
21
+ {
22
+ key: "superUserMode",
23
+ label: "Super-user mode",
24
+ color: "high-contrast",
25
+ },
26
+ ]
27
+ : undefined,
28
+ }, userSideBar: {
29
+ ...createUserSideBarProps({ isOpen: false }),
30
+ customElements: {
31
+ customSection: (React.createElement(SuperUserToggle, { isActive: isSuperAdminModeActive, onChange: setIsSuperAdminModeActive })),
32
+ },
33
+ } }),
34
+ React.createElement("div", { id: "main-content" })));
35
+ };
@@ -1,23 +1,19 @@
1
- import React, { FC, ReactNode } from "react"
2
- import { Endpoints, Stage } from "../../api/endpoints.const"
1
+ import React, { FC, ReactNode } from "react";
2
+ import { Endpoints, Stage } from "../../api/endpoints.const";
3
3
  declare type C3UserConfigurationBase = {
4
- activeOrganizationId: string
5
- userToken: string
6
- getNewUserToken: () => Promise<string>
7
- }
4
+ activeOrganizationId: string;
5
+ userToken: string;
6
+ getNewUserToken: () => Promise<string>;
7
+ };
8
8
  declare type C3UserConfigurationWithEndpoints = C3UserConfigurationBase & {
9
- endpoints: Endpoints
10
- }
9
+ endpoints: Endpoints;
10
+ };
11
11
  declare type C3UserConfigurationWithStage = C3UserConfigurationBase & {
12
- stage: Stage
13
- }
14
- export declare type C3UserConfiguration =
15
- | C3UserConfigurationWithEndpoints
16
- | C3UserConfigurationWithStage
17
- export declare const C3UserConfigurationContext: React.Context<C3UserConfiguration | null>
18
- declare const C3UserConfigurationProvider: FC<
19
- C3UserConfiguration & {
20
- children?: ReactNode
21
- }
22
- >
23
- export default C3UserConfigurationProvider
12
+ stage: Stage;
13
+ };
14
+ export declare type C3UserConfiguration = C3UserConfigurationWithEndpoints | C3UserConfigurationWithStage;
15
+ export declare const C3UserConfigurationContext: React.Context<C3UserConfiguration | null>;
16
+ declare const C3UserConfigurationProvider: FC<C3UserConfiguration & {
17
+ children?: ReactNode;
18
+ }>;
19
+ export default C3UserConfigurationProvider;
@@ -1,9 +1,4 @@
1
- import React from "react"
2
- export const C3UserConfigurationContext = React.createContext(null)
3
- const C3UserConfigurationProvider = ({ children, ...config }) =>
4
- React.createElement(
5
- C3UserConfigurationContext.Provider,
6
- { value: config },
7
- children,
8
- )
9
- export default C3UserConfigurationProvider
1
+ import React from "react";
2
+ export const C3UserConfigurationContext = React.createContext(null);
3
+ const C3UserConfigurationProvider = ({ children, ...config }) => (React.createElement(C3UserConfigurationContext.Provider, { value: config }, children));
4
+ export default C3UserConfigurationProvider;
@@ -0,0 +1,3 @@
1
+ import * as Playwright from "@playwright/test";
2
+ /** Load Storybook story for Playwright testing */
3
+ export declare function getStory(page: Playwright.Page, storyID: string): Promise<void>;