@camunda/camunda-composite-components 0.20.2 → 0.20.3
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/lib/esm/package.json +27 -28
- package/lib/esm/src/api/clusters.js +1 -1
- package/lib/esm/src/api/endpoints.const.js +2 -0
- package/lib/esm/src/api/help-center.d.ts +1 -1
- package/lib/esm/src/api/status.js +1 -1
- package/lib/esm/src/assets/c3-icons.d.ts +4 -4
- package/lib/esm/src/assets/c3-icons.js +5 -14
- package/lib/esm/src/components/c3-app-teaser/app-teaser-cards.d.ts +1 -1
- package/lib/esm/src/components/c3-app-teaser/app-teaser-cards.js +10 -19
- package/lib/esm/src/components/c3-app-teaser/app-teaster-card.d.ts +1 -1
- package/lib/esm/src/components/c3-app-teaser/app-teaster-card.js +4 -8
- package/lib/esm/src/components/c3-app-teaser/c3-app-teaser-page.d.ts +1 -1
- package/lib/esm/src/components/c3-app-teaser/c3-app-teaser-page.js +2 -2
- package/lib/esm/src/components/c3-app-teaser/c3-app-teaser.d.ts +1 -1
- package/lib/esm/src/components/c3-app-teaser/c3-app-teaser.js +8 -9
- package/lib/esm/src/components/c3-cluster-tag/c3-cluster-tag.d.ts +2 -1
- package/lib/esm/src/components/c3-cluster-tag/c3-cluster-tag.js +9 -8
- package/lib/esm/src/components/c3-data-table/c3-data-table.js +84 -70
- package/lib/esm/src/components/c3-data-table/c3-data-table.types.d.ts +3 -2
- package/lib/esm/src/components/c3-data-table/link-button/link-button.js +2 -4
- package/lib/esm/src/components/c3-data-table/link-button/link-button.types.d.ts +0 -1
- package/lib/esm/src/components/c3-empty-state/c3-empty-state.js +9 -29
- package/lib/esm/src/components/c3-help-center/c3-help-center-provider.js +3 -2
- package/lib/esm/src/components/c3-help-center/c3-help-center.js +3 -7
- package/lib/esm/src/components/c3-help-center/help-center-hint.d.ts +1 -1
- package/lib/esm/src/components/c3-help-center/help-center-hint.js +6 -10
- package/lib/esm/src/components/c3-help-center/help-center.d.ts +1 -1
- package/lib/esm/src/components/c3-help-center/help-center.js +69 -102
- package/lib/esm/src/components/c3-help-center/tabs/feedback.js +41 -89
- package/lib/esm/src/components/c3-help-center/tabs/tabContent.js +2 -5
- package/lib/esm/src/components/c3-help-center/tabs/tabContentSkeleton.js +4 -5
- package/lib/esm/src/components/c3-help-center/tile.js +16 -30
- package/lib/esm/src/components/c3-navigation/c3-info-button.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-info-button.js +2 -3
- package/lib/esm/src/components/c3-navigation/c3-navigation-actions/c3-action-buttons.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-actions/c3-action-buttons.js +9 -9
- package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/c3-navigation-appbar.js +72 -87
- package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/components.d.ts +1 -5
- package/lib/esm/src/components/c3-navigation/c3-navigation-appbar/components.js +1 -0
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.js +20 -28
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.js +23 -27
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.js +29 -37
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.js +18 -24
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.js +3 -2
- package/lib/esm/src/components/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.js +13 -37
- package/lib/esm/src/components/c3-navigation/c3-navigation.js +78 -120
- package/lib/esm/src/components/c3-navigation/c3-navigation.types.d.ts +5 -6
- package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-container.js +10 -18
- package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-provider.js +4 -4
- package/lib/esm/src/components/c3-navigation/c3-org-name.js +2 -4
- package/lib/esm/src/components/c3-navigation/c3-org-sidebar/c3-org-sidebar.js +48 -60
- package/lib/esm/src/components/c3-navigation/c3-org-sidebar/components.js +23 -13
- package/lib/esm/src/components/c3-navigation/helpers.d.ts +2 -3
- package/lib/esm/src/components/c3-navigation/index.d.ts +1 -2
- package/lib/esm/src/components/c3-navigation/stories/story-helpers.js +3 -5
- package/lib/esm/src/components/c3-navigation/stories/story-templates.d.ts +1 -1
- package/lib/esm/src/components/c3-navigation/stories/story-templates.js +23 -29
- package/lib/esm/src/components/c3-onboarding-survey/c3-onboarding-survey.js +2 -1
- package/lib/esm/src/components/c3-onboarding-survey/elements/dropdownSelect.js +25 -38
- package/lib/esm/src/components/c3-onboarding-survey/elements/radioGroupMulti.js +45 -56
- package/lib/esm/src/components/c3-onboarding-survey/elements/radioGroupSingle.js +24 -34
- package/lib/esm/src/components/c3-onboarding-survey/elements/textField.js +4 -9
- package/lib/esm/src/components/c3-onboarding-survey/onboardingModal.d.ts +9 -9
- package/lib/esm/src/components/c3-onboarding-survey/onboardingModal.js +31 -42
- package/lib/esm/src/components/c3-onboarding-survey/onboardingPage.d.ts +9 -9
- package/lib/esm/src/components/c3-onboarding-survey/onboardingPage.js +27 -39
- package/lib/esm/src/components/c3-onboarding-survey/onboardingSurvey.js +9 -13
- package/lib/esm/src/components/c3-onboarding-survey/step.js +27 -27
- package/lib/esm/src/components/c3-page/c3-breadcrumb/c3-breadcrumb.js +8 -17
- package/lib/esm/src/components/c3-page/c3-page.js +2 -9
- package/lib/esm/src/components/c3-page/c3-tabs/c3-tabs.js +4 -5
- package/lib/esm/src/components/c3-responsive-stack/c3-responsive-stack.d.ts +2 -0
- package/lib/esm/src/components/c3-responsive-stack/c3-responsive-stack.js +13 -0
- package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.d.ts +1 -1
- package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/c3-profile-provider.js +5 -4
- package/lib/esm/src/components/c3-user-configuration/c3-profile-provider/carbon-theme-provider.js +3 -2
- package/lib/esm/src/components/c3-user-configuration/c3-user-configuration-provider.js +3 -4
- package/lib/esm/src/contexts/c3-cluster-update-manager.d.ts +1 -1
- package/lib/esm/src/contexts/c3-cluster-update-manager.js +3 -2
- package/lib/esm/src/hooks/useApi.d.ts +4 -5
- package/lib/esm/src/index.d.ts +1 -0
- package/lib/esm/src/index.js +1 -0
- package/package.json +20 -27
- package/README.md +0 -197
package/README.md
DELETED
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
# Camunda Composite Components
|
|
2
|
-
|
|
3
|
-
Camunda Composite Components (also known as **C3**) is the main software
|
|
4
|
-
artifact of the
|
|
5
|
-
[Design System Team](https://confluence.camunda.com/display/HAN/Design+System).
|
|
6
|
-
|
|
7
|
-
We have a dedicated slack channel for everyone having questions, comments, bug
|
|
8
|
-
reports or concerns about this repository:
|
|
9
|
-
[#camunda-composite-components](https://app.slack.com/client/T0PM0P1SA/C049YH1C202/thread/C03NF7FH17G-1671730364.608129).
|
|
10
|
-
For more general questions towards the Design System team, please use
|
|
11
|
-
[#ask-cds](https://app.slack.com/client/T0PM0P1SA/C04FUEGLG8N).
|
|
12
|
-
|
|
13
|
-
If you like the idea of having a repository for your own composite components -
|
|
14
|
-
how about you do your own **Camunda Custom Composite Components**? Just go over
|
|
15
|
-
[here](https://github.com/camunda-cloud/c4-starter), fork it, lezgo! A list of
|
|
16
|
-
C4-Adopters can be found <a href="#c4list">here</a>.
|
|
17
|
-
|
|
18
|
-
## Storybook
|
|
19
|
-
|
|
20
|
-
A live view of the `main` branch can be found
|
|
21
|
-
[here](https://camunda-composite-components.pages.dev/). When opening a PR, a
|
|
22
|
-
version of storybook with the changes is deployed automatically and can be
|
|
23
|
-
accessed by clicking on the link in the PR.
|
|
24
|
-
|
|
25
|
-
## Dev
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
# install
|
|
29
|
-
yarn
|
|
30
|
-
|
|
31
|
-
# start storybook
|
|
32
|
-
yarn storybook
|
|
33
|
-
|
|
34
|
-
# build components
|
|
35
|
-
yarn build
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Release
|
|
39
|
-
|
|
40
|
-
Simply run our
|
|
41
|
-
[release workflow](https://github.com/camunda-cloud/camunda-composite-components/actions/workflows/release.yml)
|
|
42
|
-
in the GitHub Actions tab. This will create a new release, publish the package
|
|
43
|
-
to npm and update the changelog automatically.
|
|
44
|
-
|
|
45
|
-
Pushing to `main` will update the storybook available under
|
|
46
|
-
[cloudflare page](https://camunda-composite-components.pages.dev/).
|
|
47
|
-
|
|
48
|
-
## Usage
|
|
49
|
-
|
|
50
|
-
Example for navbar:
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
import { C3NavigationElementProps } from "@camunda/camunda-composite-components"
|
|
54
|
-
|
|
55
|
-
// ...
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<C3Navigation
|
|
59
|
-
app={{
|
|
60
|
-
ariaLabel: "Camunda Console",
|
|
61
|
-
name: "Console",
|
|
62
|
-
prefix: "Camunda",
|
|
63
|
-
routeProps: { route: routes.home, router: router },
|
|
64
|
-
}}
|
|
65
|
-
// ...
|
|
66
|
-
/>
|
|
67
|
-
)
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Opt into SSE by using the `C3ClusterUpdateManager` Provider
|
|
71
|
-
|
|
72
|
-
```tsx
|
|
73
|
-
// App.tsx
|
|
74
|
-
import { C3ClusterUpdateManager } from "@camunda/camunda-composite-components"
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<C3ClusterUpdateManager stage={getEnv()} userToken={auth.token!}>
|
|
78
|
-
<App />
|
|
79
|
-
</C3ClusterUpdateManager>
|
|
80
|
-
)
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Listen for SSE events from anywhere in your app
|
|
84
|
-
|
|
85
|
-
```tsx
|
|
86
|
-
// ClusterPage.tsx
|
|
87
|
-
|
|
88
|
-
useEffect(() => {
|
|
89
|
-
const handler = (event) => {
|
|
90
|
-
const data = event.detail
|
|
91
|
-
|
|
92
|
-
if (data && data.org && data.org === currentOrgId) {
|
|
93
|
-
switch (data.entity) {
|
|
94
|
-
case "cluster": {
|
|
95
|
-
}
|
|
96
|
-
case "cluster-client": {
|
|
97
|
-
}
|
|
98
|
-
case "alert-subscription": {
|
|
99
|
-
}
|
|
100
|
-
case "connector-secrets": {
|
|
101
|
-
}
|
|
102
|
-
case "console-api-client": {
|
|
103
|
-
}
|
|
104
|
-
case "backup": {
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
window.addEventListener("clusterchange", handler)
|
|
111
|
-
|
|
112
|
-
return () => {
|
|
113
|
-
window.removeEventListener("clusterchange", handler)
|
|
114
|
-
}
|
|
115
|
-
}, [])
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## <a name="c4list"></a> (incomplete) List of adopters of C3+C4
|
|
119
|
-
|
|
120
|
-
- [Console team](https://confluence.camunda.com/display/HAN/Console+Team)
|
|
121
|
-
started this, their C4 repo can be found
|
|
122
|
-
[here](https://github.com/camunda/camunda-cloud-management-apps/tree/main/packages/c4)
|
|
123
|
-
- [Identity team](https://github.com/camunda/team-identity):
|
|
124
|
-
[c4-identity](https://github.com/camunda-cloud/c4-identity)
|
|
125
|
-
|
|
126
|
-
## Testing
|
|
127
|
-
|
|
128
|
-
### Visual regression tests (VRT)
|
|
129
|
-
|
|
130
|
-
We use [Playwright](https://playwright.dev/docs/intro) screenshot tests to be
|
|
131
|
-
aware of any visual changes introduced by dependency updates or changes in the
|
|
132
|
-
component code.
|
|
133
|
-
|
|
134
|
-
#### Running VRT locally
|
|
135
|
-
|
|
136
|
-
We run VRT inside a docker container to avoid different results caused by
|
|
137
|
-
different platforms. Simply run:
|
|
138
|
-
|
|
139
|
-
```shell
|
|
140
|
-
yarn start:docker-storybook
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
then
|
|
144
|
-
|
|
145
|
-
```shell
|
|
146
|
-
yarn test:visual-regression:docker
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
The commands above will:
|
|
150
|
-
|
|
151
|
-
1. Build storybook.
|
|
152
|
-
2. Start a Playwright docker container with the name `c3-visual-regression`.
|
|
153
|
-
3. Serve storybook within the docker container.
|
|
154
|
-
4. Run the visual regression tests within the docker container.
|
|
155
|
-
|
|
156
|
-
When developing, it might not always be helpful to run all of these steps at
|
|
157
|
-
once. You can find more granular scripts in the [package.json](package.json).
|
|
158
|
-
|
|
159
|
-
#### Running VRT in the CI
|
|
160
|
-
|
|
161
|
-
There is a `Visual regression tests` workflow that is triggered automatically on
|
|
162
|
-
push. You can also trigger it manually in the `Actions` tab.
|
|
163
|
-
|
|
164
|
-
If the workflow fails, you can find the test report by navigating to the
|
|
165
|
-
workflow run summary, then scrolling down to the `Artifacts` section. Click on
|
|
166
|
-
the artifact called `Playwright report` to download it, go to your downloads
|
|
167
|
-
folder, then open the `index.html` file of the test report in your browser to
|
|
168
|
-
view the report.
|
|
169
|
-
|
|
170
|
-
#### How to deal with failing tests
|
|
171
|
-
|
|
172
|
-
When a VRT fails, this can have two reasons:
|
|
173
|
-
|
|
174
|
-
1. A change was introduced unknowingly. In this case, have a look at the test
|
|
175
|
-
report and check if the change was intended. If it is, proceed with 2.
|
|
176
|
-
2. You made a change to the UI on purpose. In this case you need to update the
|
|
177
|
-
screenshot as follows.
|
|
178
|
-
|
|
179
|
-
Make sure you have the `c3-visual-regression` docker container running, or start
|
|
180
|
-
it like described [here](#running-vrt-locally). Then, have a look at the test
|
|
181
|
-
report:
|
|
182
|
-
|
|
183
|
-
```shell
|
|
184
|
-
yarn report:visual-regression
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
Double-check that you don't apply any unwanted changes by looking at the
|
|
188
|
-
difference that is highlighted in the failed test's report.
|
|
189
|
-
|
|
190
|
-
To update all screenshots, run:
|
|
191
|
-
|
|
192
|
-
```shell
|
|
193
|
-
yarn update:visual-regression:docker
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
The tests should now pass locally and in the CI. Commit and push the updated
|
|
197
|
-
screenshot(s).
|