@camunda/camunda-composite-components 0.3.1-rc.13 → 0.3.1-rc.15
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 +110 -0
- package/lib/esm/{api → src/api}/help-center.d.ts +3 -2
- package/lib/esm/{api → src/api}/help-center.js +4 -4
- package/lib/esm/{api → src/api}/profile.d.ts +1 -2
- package/lib/esm/{components → src/components}/c3-help-center/c3-help-center.js +1 -1
- package/lib/esm/{components → src/components}/c3-help-center/c3-help-center.types.d.ts +13 -0
- package/lib/esm/{components/c3-navigation/c3-navigation-appbar → src/components/c3-navigation}/c3-navigation-appbar.d.ts +1 -1
- package/lib/esm/{components/c3-navigation/c3-navigation-appbar → src/components/c3-navigation}/c3-navigation-appbar.js +20 -69
- package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.types.d.ts +0 -9
- package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.js +1 -1
- package/lib/esm/{components → src/components}/c3-navigation/c3-navigation.js +3 -5
- package/lib/esm/{components → src/components}/c3-navigation/story-helpers.d.ts +0 -1
- package/lib/esm/{components → src/components}/c3-navigation/story-helpers.js +41 -64
- package/lib/esm/{components → src/components}/c3-onboarding-survey/c3-onboarding-survey.js +1 -0
- package/lib/esm/{components → src/components}/c3-user-configuration/c3-profile-provider/c3-profile-provider.d.ts +1 -1
- package/lib/esm/{components → src/components}/c3-user-configuration/c3-profile-provider/c3-profile-provider.js +0 -3
- package/lib/esm/{components → src/components}/c3-user-configuration/c3-user-configuration-provider.d.ts +0 -1
- package/lib/esm/{index.d.ts → src/index.d.ts} +2 -4
- package/lib/esm/{index.js → src/index.js} +1 -3
- package/package.json +5 -1
- package/lib/esm/assets/appTeaserPreviews.d.ts +0 -3
- package/lib/esm/assets/appTeaserPreviews.js +0 -3
- package/lib/esm/components/c3-app-teaser/app-teaser-cards.d.ts +0 -17
- package/lib/esm/components/c3-app-teaser/app-teaser-cards.js +0 -25
- package/lib/esm/components/c3-app-teaser/app-teaster-card.d.ts +0 -14
- package/lib/esm/components/c3-app-teaser/app-teaster-card.js +0 -19
- package/lib/esm/components/c3-app-teaser/c3-app-teaser-page.d.ts +0 -6
- package/lib/esm/components/c3-app-teaser/c3-app-teaser-page.js +0 -20
- package/lib/esm/components/c3-app-teaser/c3-app-teaser.d.ts +0 -10
- package/lib/esm/components/c3-app-teaser/c3-app-teaser.js +0 -58
- package/lib/esm/components/c3-navigation/c3-navigation-appbar/components.d.ts +0 -277
- package/lib/esm/components/c3-navigation/c3-navigation-appbar/components.js +0 -15
- package/lib/esm/utils/camunda.d.ts +0 -7
- package/lib/esm/utils/camunda.js +0 -17
- package/lib/esm/utils/camunda.types.d.ts +0 -43
- package/lib/esm/utils/camunda.types.js +0 -1
- /package/lib/esm/{api → src/api}/api.d.ts +0 -0
- /package/lib/esm/{api → src/api}/api.js +0 -0
- /package/lib/esm/{api → src/api}/endpoints.const.d.ts +0 -0
- /package/lib/esm/{api → src/api}/endpoints.const.js +0 -0
- /package/lib/esm/{api → src/api}/jwt.utils.d.ts +0 -0
- /package/lib/esm/{api → src/api}/jwt.utils.js +0 -0
- /package/lib/esm/{api → src/api}/notifications.d.ts +0 -0
- /package/lib/esm/{api → src/api}/notifications.js +0 -0
- /package/lib/esm/{api → src/api}/profile.js +0 -0
- /package/lib/esm/{components → src/components}/c3-cluster-tag/c3-cluster-tag.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-cluster-tag/c3-cluster-tag.js +0 -0
- /package/lib/esm/{components → src/components}/c3-cluster-tag/c3-cluster-tag.types.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-cluster-tag/c3-cluster-tag.types.js +0 -0
- /package/lib/esm/{components → src/components}/c3-empty-state/c3-empty-state.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-empty-state/c3-empty-state.js +0 -0
- /package/lib/esm/{components → src/components}/c3-empty-state/c3-empty-state.test.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-empty-state/c3-empty-state.test.js +0 -0
- /package/lib/esm/{components → src/components}/c3-empty-state/c3-empty-state.types.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-empty-state/c3-empty-state.types.js +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/c3-help-center-provider.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/c3-help-center-provider.js +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/c3-help-center.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/c3-help-center.types.js +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/defaultHelpCenterConfig.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/defaultHelpCenterConfig.js +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/help-center.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/help-center.js +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/recommendations.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/recommendations.js +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/tabs/feedback.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/tabs/feedback.js +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/tabs/tabContent.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/tabs/tabContent.js +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/tile.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-help-center/tile.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-info-button.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-info-button.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-actions/c3-action-buttons.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-actions/c3-action-buttons.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-actions/c3-action-buttons.types.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-actions/c3-action-buttons.types.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.types.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-org-sidebar.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-org-sidebar.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/components.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/components.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation.test.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation.test.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation.types.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation.types.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-notification-provider/c3-notification-container.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-notification-provider/c3-notification-container.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-notification-provider/c3-notification-provider.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-notification-provider/c3-notification-provider.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/helpers.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/helpers.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/index.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/index.js +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/story-templates.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/story-templates.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/c3-onboarding-survey.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/defaultOnboardingConfig.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/defaultOnboardingConfig.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/elements/dropdownSelect.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/elements/dropdownSelect.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/elements/radioGroupMulti.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/elements/radioGroupMulti.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/elements/radioGroupSingle.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/elements/radioGroupSingle.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/elements/textField.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/elements/textField.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/helpers.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/helpers.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/onboarding.types.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/onboarding.types.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/onboardingModal.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/onboardingModal.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/onboardingPage.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/onboardingPage.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/onboardingSurvey.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/onboardingSurvey.js +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/step.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-onboarding-survey/step.js +0 -0
- /package/lib/esm/{components → src/components}/c3-user-configuration/authToken.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-user-configuration/authToken.js +0 -0
- /package/lib/esm/{components → src/components}/c3-user-configuration/c3-profile-provider/carbon-theme-provider.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-user-configuration/c3-profile-provider/carbon-theme-provider.js +0 -0
- /package/lib/esm/{components → src/components}/c3-user-configuration/c3-user-configuration-provider.js +0 -0
- /package/lib/esm/{components → src/components}/styles.d.ts +0 -0
- /package/lib/esm/{components → src/components}/styles.js +0 -0
- /package/lib/esm/{components → src/components}/test-utils.d.ts +0 -0
- /package/lib/esm/{components → src/components}/test-utils.js +0 -0
- /package/lib/esm/{assets → src/icons}/c3-icons.d.ts +0 -0
- /package/lib/esm/{assets → src/icons}/c3-icons.js +0 -0
- /package/lib/esm/{assets → src/icons}/c3-icons.types.d.ts +0 -0
- /package/lib/esm/{assets → src/icons}/c3-icons.types.js +0 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@camunda/camunda-composite-components",
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "https://github.com/camunda-cloud/camunda-composite-components.git"
|
|
6
|
+
},
|
|
7
|
+
"version": "0.3.1-rc.14",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"clean": "rimraf lib/",
|
|
10
|
+
"build": "yarn clean && tsc",
|
|
11
|
+
"storybook": "storybook dev -p 6006",
|
|
12
|
+
"start": "yarn storybook",
|
|
13
|
+
"build:storybook": "storybook build",
|
|
14
|
+
"build:all": "yarn build && yarn build:storybook",
|
|
15
|
+
"serve:storybook": "serve ./storybook-static -p 8081 -n -L",
|
|
16
|
+
"prepare": "husky install",
|
|
17
|
+
"format": "prettier --write .",
|
|
18
|
+
"lint": "eslint src/",
|
|
19
|
+
"lint:fix": "eslint --fix src/",
|
|
20
|
+
"test:ts": "tsc --noEmit --project ./tsconfig.json",
|
|
21
|
+
"test:storybook": "TEST_A11Y=true test-storybook",
|
|
22
|
+
"test:storybook:smoke": "test-storybook",
|
|
23
|
+
"start:docker-storybook": "yarn build:storybook && docker-compose up -d && docker-compose exec c3-visual-regression yarn serve:storybook",
|
|
24
|
+
"test:visual-regression": "wait-on http://localhost:8081 && PWTEST_SKIP_TEST_OUTPUT=1 yarn playwright test",
|
|
25
|
+
"test:visual-regression:ui": "yarn test:playwright --ui",
|
|
26
|
+
"report:visual-regression": "yarn playwright show-report",
|
|
27
|
+
"update:visual-regression": "yarn playwright test --update-snapshots",
|
|
28
|
+
"test:visual-regression:docker": "docker exec -it -t c3-visual-regression yarn test:visual-regression",
|
|
29
|
+
"update:visual-regression:docker": "docker exec -it -t c3-visual-regression yarn update:visual-regression",
|
|
30
|
+
"test": "yarn test:ts && yarn test:storybook && yarn test:visual-regression:docker"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@babel/core": "7.23.3",
|
|
34
|
+
"@babel/preset-env": "7.23.3",
|
|
35
|
+
"@babel/preset-react": "7.23.3",
|
|
36
|
+
"@babel/preset-typescript": "7.23.3",
|
|
37
|
+
"@carbon/react": "1.37.0",
|
|
38
|
+
"@mdx-js/react": "2.3.0",
|
|
39
|
+
"@playwright/test": "1.37.1",
|
|
40
|
+
"@storybook/addon-a11y": "7.5.3",
|
|
41
|
+
"@storybook/addon-actions": "7.5.3",
|
|
42
|
+
"@storybook/addon-docs": "7.5.3",
|
|
43
|
+
"@storybook/addon-essentials": "7.5.3",
|
|
44
|
+
"@storybook/addon-interactions": "7.5.3",
|
|
45
|
+
"@storybook/addon-links": "7.5.3",
|
|
46
|
+
"@storybook/blocks": "7.5.3",
|
|
47
|
+
"@storybook/preset-scss": "1.0.3",
|
|
48
|
+
"@storybook/react": "7.5.3",
|
|
49
|
+
"@storybook/react-webpack5": "7.5.3",
|
|
50
|
+
"@storybook/test-runner": "0.16.0",
|
|
51
|
+
"@storybook/testing-library": "0.2.2",
|
|
52
|
+
"@types/carbon-components-react": "7.55.3",
|
|
53
|
+
"@types/event-source-polyfill": "1.0.1",
|
|
54
|
+
"@types/mixpanel-browser": "2.47.1",
|
|
55
|
+
"@types/node": "20.9.0",
|
|
56
|
+
"@types/react": "18.2.21",
|
|
57
|
+
"@types/react-dom": "18.2.7",
|
|
58
|
+
"@types/styled-components": "5.1.27",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "6.9.0",
|
|
60
|
+
"@typescript-eslint/parser": "6.9.0",
|
|
61
|
+
"axe-playwright": "1.2.3",
|
|
62
|
+
"babel-loader": "9.1.3",
|
|
63
|
+
"copyfiles": "2.4.1",
|
|
64
|
+
"css-loader": "6.8.1",
|
|
65
|
+
"eslint": "8.52.0",
|
|
66
|
+
"eslint-config-prettier": "9.0.0",
|
|
67
|
+
"eslint-import-resolver-typescript": "3.6.1",
|
|
68
|
+
"eslint-plugin-import": "2.29.0",
|
|
69
|
+
"eslint-plugin-prettier": "5.0.1",
|
|
70
|
+
"eslint-plugin-react": "7.33.2",
|
|
71
|
+
"eslint-plugin-react-hooks": "4.6.0",
|
|
72
|
+
"eslint-plugin-storybook": "0.6.15",
|
|
73
|
+
"event-source-polyfill": "1.0.31",
|
|
74
|
+
"husky": "8.0.3",
|
|
75
|
+
"mixpanel-browser": "2.47.0",
|
|
76
|
+
"prettier": "3.0.3",
|
|
77
|
+
"react": "18.2.0",
|
|
78
|
+
"react-dom": "18.2.0",
|
|
79
|
+
"rimraf": "5.0.5",
|
|
80
|
+
"sass": "1.66.1",
|
|
81
|
+
"sass-loader": "13.3.2",
|
|
82
|
+
"serve": "14.2.1",
|
|
83
|
+
"storybook": "7.5.3",
|
|
84
|
+
"style-loader": "3.3.3",
|
|
85
|
+
"styled-components": "6.0.7",
|
|
86
|
+
"typescript": "5.2.2",
|
|
87
|
+
"wait-on": "7.0.1",
|
|
88
|
+
"webpack": "5.88.2"
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"jwt-decode": "3.1.2",
|
|
92
|
+
"react-markdown": "8.0.7"
|
|
93
|
+
},
|
|
94
|
+
"peerDependencies": {
|
|
95
|
+
"@carbon/react": "1.x",
|
|
96
|
+
"event-source-polyfill": "1.0.x",
|
|
97
|
+
"react": "18.x",
|
|
98
|
+
"react-dom": "18.x",
|
|
99
|
+
"styled-components": "5.x || 6.x"
|
|
100
|
+
},
|
|
101
|
+
"description": "Camunda Composite Components",
|
|
102
|
+
"main": "./lib/esm/index.js",
|
|
103
|
+
"types": "./lib/esm/index.d.ts",
|
|
104
|
+
"files": [
|
|
105
|
+
"/lib"
|
|
106
|
+
],
|
|
107
|
+
"author": "Camunda",
|
|
108
|
+
"license": "Apache-2.0",
|
|
109
|
+
"packageManager": "yarn@3.6.4"
|
|
110
|
+
}
|
|
@@ -2,7 +2,7 @@ import { HelpCenterConfig } from "../components/c3-help-center/defaultHelpCenter
|
|
|
2
2
|
import { Persona, TileConfig, WpCardType } from "../components/c3-help-center/c3-help-center.types";
|
|
3
3
|
import { OnboardingConfig } from "../components/c3-onboarding-survey/defaultOnboardingConfig";
|
|
4
4
|
import { RequestPayload } from "./api";
|
|
5
|
-
export declare const getConfig: (accessToken: string, audience: string) => Promise<HelpCenterConfig | null>;
|
|
5
|
+
export declare const getConfig: (accessToken: string, audience: string, orgId: string) => Promise<HelpCenterConfig | null>;
|
|
6
6
|
export declare const getTiles: ({ accessToken, tileConfig, salesPlanType, clusterIds, currentOrgId, persona, flags, email, cloudAudience, }: {
|
|
7
7
|
accessToken: string;
|
|
8
8
|
tileConfig: TileConfig[];
|
|
@@ -16,9 +16,10 @@ export declare const getTiles: ({ accessToken, tileConfig, salesPlanType, cluste
|
|
|
16
16
|
salesPlanType: string;
|
|
17
17
|
flags: string[];
|
|
18
18
|
}) => Promise<WpCardType[]>;
|
|
19
|
-
export declare const getOnboardingConfig: ({ camundaAuth, audience, }: {
|
|
19
|
+
export declare const getOnboardingConfig: ({ camundaAuth, audience, orgId, }: {
|
|
20
20
|
audience: string;
|
|
21
21
|
camundaAuth: RequestPayload["camundaAuth"];
|
|
22
|
+
orgId: string;
|
|
22
23
|
}) => Promise<OnboardingConfig>;
|
|
23
24
|
export declare const updatePersona: ({ newPersona, audience, accessToken, orgId, userId, }: {
|
|
24
25
|
newPersona: Persona;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { recommendations } from "../components/c3-help-center/recommendations";
|
|
2
2
|
import { request } from "./api";
|
|
3
|
-
export const getConfig = async (accessToken, audience) => {
|
|
3
|
+
export const getConfig = async (accessToken, audience, orgId) => {
|
|
4
4
|
try {
|
|
5
|
-
const response = await fetch(`https://helpcenter.${audience}/helpcenter/config`, {
|
|
5
|
+
const response = await fetch(`https://helpcenter.${audience}/helpcenter/config/${orgId}`, {
|
|
6
6
|
headers: {
|
|
7
7
|
authorization: `Bearer ${accessToken}`,
|
|
8
8
|
"Content-Type": "application/json",
|
|
@@ -31,8 +31,8 @@ export const getTiles = async ({ accessToken, tileConfig, salesPlanType, cluster
|
|
|
31
31
|
});
|
|
32
32
|
return cards;
|
|
33
33
|
};
|
|
34
|
-
export const getOnboardingConfig = ({ camundaAuth, audience, }) => request({
|
|
35
|
-
url: `https://helpcenter.${audience}/survey/config`,
|
|
34
|
+
export const getOnboardingConfig = ({ camundaAuth, audience, orgId, }) => request({
|
|
35
|
+
url: `https://helpcenter.${audience}/survey/config/${orgId}`,
|
|
36
36
|
camundaAuth,
|
|
37
37
|
type: "json",
|
|
38
38
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { C3NotificationsProps } from "../components/c3-navigation/c3-navigation.types";
|
|
2
2
|
import { Theme } from "../components/c3-user-configuration/c3-profile-provider/c3-profile-provider";
|
|
3
|
-
import { Organization } from "../
|
|
4
|
-
import { Cluster } from "../utils/camunda.types";
|
|
3
|
+
import { Cluster, Organization } from "../components/c3-help-center/c3-help-center.types";
|
|
5
4
|
export type Profile = {
|
|
6
5
|
theme: Theme;
|
|
7
6
|
};
|
|
@@ -51,7 +51,7 @@ export const C3HelpCenter = ({ autoStartSurvey, origin, flags, onRequestClose, m
|
|
|
51
51
|
const fetchConfig = async () => {
|
|
52
52
|
if (!userToken || !decodedAudience)
|
|
53
53
|
return;
|
|
54
|
-
const onboardConfig = await getConfig(userToken, decodedAudience);
|
|
54
|
+
const onboardConfig = await getConfig(userToken, decodedAudience, activeOrganizationId);
|
|
55
55
|
setHelpCenterConfig(onboardConfig || defaultHelpCenterConfig);
|
|
56
56
|
};
|
|
57
57
|
const fetchData = async () => {
|
|
@@ -34,6 +34,12 @@ export interface TileConfig {
|
|
|
34
34
|
bool: string;
|
|
35
35
|
prerequestites: Prerequestite[] | boolean;
|
|
36
36
|
}
|
|
37
|
+
export type Cluster = {
|
|
38
|
+
uuid: string;
|
|
39
|
+
labels?: {
|
|
40
|
+
camunda: string[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
37
43
|
export type Tab = {
|
|
38
44
|
id: string;
|
|
39
45
|
label: string;
|
|
@@ -41,3 +47,10 @@ export type Tab = {
|
|
|
41
47
|
tiles: TileConfig[];
|
|
42
48
|
tiletype: TabType;
|
|
43
49
|
};
|
|
50
|
+
export type Organization = {
|
|
51
|
+
uuid: string;
|
|
52
|
+
name: string;
|
|
53
|
+
salesPlan?: {
|
|
54
|
+
type: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -1,74 +1,25 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
import { Close } from "@carbon/react/icons";
|
|
3
|
-
import { useOnClickOutside } from "
|
|
4
|
-
import { HeaderGlobalAction, HeaderMenuItem, HeaderSideNavItems, SideNavItems, SideNavLink, SideNavMenu, SideNavMenuItem, } from "@carbon/react";
|
|
5
|
-
import { C3AppMenuIcon } from "
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { useOnClickOutside } from "./helpers";
|
|
4
|
+
import { HeaderGlobalAction, HeaderMenuItem, HeaderSideNavItems, SideNav as CarbonSideNav, SideNavItems, SideNavLink, SideNavMenu, SideNavMenuItem, } from "@carbon/react";
|
|
5
|
+
import { C3AppMenuIcon } from "../../icons/c3-icons";
|
|
6
|
+
import styled from "styled-components";
|
|
7
|
+
const NavWrapper = styled.div `
|
|
8
|
+
.cds--side-nav__overlay {
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
const SideNav = styled(CarbonSideNav) `
|
|
13
|
+
visibility: ${({ expanded }) => (expanded ? "visible" : "hidden")};
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-auto-flow: row;
|
|
16
|
+
grid-auto-rows: max-content 1fr;
|
|
17
|
+
border-right: ${({ expanded }) => expanded ? "1px solid var(--cds-border-subtle)" : undefined};
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
`;
|
|
10
20
|
export const C3NavigationAppBar = ({ appBar, forwardRef, navbar, }) => {
|
|
11
|
-
const { currentApp, decodedAudience, analyticsTrack } = useC3UserConfiguration();
|
|
12
|
-
const { clusters, activeOrg } = useC3Profile();
|
|
13
21
|
const [appBarOpen, setAppBarOpen] = useState(appBar.isOpen);
|
|
14
22
|
const [panelRef, iconRef] = useOnClickOutside(() => setAppBarOpen(false));
|
|
15
|
-
const [appElements, setAppElements] = useState([]);
|
|
16
|
-
if ((!appBar.elements && !appBar.appTeaser) ||
|
|
17
|
-
(appBar.appTeaser && Object.keys(appBar.appTeaser).length === 0))
|
|
18
|
-
console.warn("No app elements or app teaser pages provided. Please provide at least one of them.");
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
if (appBar.elements)
|
|
21
|
-
return;
|
|
22
|
-
const defaultElements = [];
|
|
23
|
-
APPS.forEach((app) => {
|
|
24
|
-
if (!decodedAudience || !currentApp)
|
|
25
|
-
return;
|
|
26
|
-
const element = {
|
|
27
|
-
key: app,
|
|
28
|
-
label: app.charAt(0).toUpperCase() + app.slice(1),
|
|
29
|
-
active: currentApp === app,
|
|
30
|
-
};
|
|
31
|
-
if (app === "console") {
|
|
32
|
-
element.href = `https://console.${decodedAudience}/${activeOrg?.uuid}`;
|
|
33
|
-
}
|
|
34
|
-
else if (app === "modeler") {
|
|
35
|
-
const hasPermission = activeOrg?.permissions.org.webide.read;
|
|
36
|
-
if (hasPermission) {
|
|
37
|
-
element.href =
|
|
38
|
-
currentApp === "modeler"
|
|
39
|
-
? ""
|
|
40
|
-
: `https://modeler.${decodedAudience}/login?returnUrl=/org/${activeOrg?.uuid}`;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
const hasAppReadPermission = activeOrg?.permissions.cluster[app]?.read;
|
|
45
|
-
const clustersToRender = clusters?.filter(({ status, urls }) => status[app] === "Healthy" && urls[app] && hasAppReadPermission);
|
|
46
|
-
if (clustersToRender?.length === 1) {
|
|
47
|
-
element.href = clustersToRender?.[0].urls[app];
|
|
48
|
-
}
|
|
49
|
-
else if (clustersToRender && clustersToRender.length > 1) {
|
|
50
|
-
element.subElements = clustersToRender.map((cluster, index) => ({
|
|
51
|
-
key: `${app}-${cluster.uuid}-${index}`,
|
|
52
|
-
label: cluster.name,
|
|
53
|
-
href: cluster.urls[app],
|
|
54
|
-
onClick: () => {
|
|
55
|
-
setAppBarOpen(false);
|
|
56
|
-
analyticsTrack?.(`${app}:open`, { currentApp: app });
|
|
57
|
-
},
|
|
58
|
-
}));
|
|
59
|
-
}
|
|
60
|
-
else if (hasAppReadPermission) {
|
|
61
|
-
if (appBar.appTeaser?.[app]?.routeProps) {
|
|
62
|
-
element.routeProps = appBar.appTeaser?.[app]?.routeProps;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (element.href || element.routeProps || element.subElements)
|
|
67
|
-
defaultElements.push(element);
|
|
68
|
-
});
|
|
69
|
-
setAppElements(defaultElements);
|
|
70
|
-
}, [JSON.stringify(clusters)]);
|
|
71
|
-
const appBarElements = appBar.elements || (clusters ? appElements : null);
|
|
72
23
|
return (React.createElement(React.Fragment, null,
|
|
73
24
|
React.createElement(HeaderGlobalAction, { ref: iconRef, "aria-label": "Camunda components", isActive: appBarOpen, onClick: () => {
|
|
74
25
|
setAppBarOpen(!appBarOpen);
|
|
@@ -87,8 +38,8 @@ export const C3NavigationAppBar = ({ appBar, forwardRef, navbar, }) => {
|
|
|
87
38
|
setAppBarOpen(false);
|
|
88
39
|
}
|
|
89
40
|
} }, element.label)))))),
|
|
90
|
-
|
|
91
|
-
|
|
41
|
+
appBar.elements &&
|
|
42
|
+
appBar.elements.map((element) => {
|
|
92
43
|
if (element.subElements && element.subElements.length > 0) {
|
|
93
44
|
return (React.createElement(SideNavMenu, { large: true, title: element.label, key: element.key }, element.subElements.map((subElement) => (React.createElement(SideNavMenuItem, { as: subElement.routeProps && forwardRef, key: subElement.key, href: subElement.href, target: subElement.href ? subElement.target : undefined, ...subElement.routeProps, onClick: () => {
|
|
94
45
|
if (subElement.onClick) {
|
|
@@ -56,16 +56,8 @@ export type C3NavigationNotificationsSideBarProps = C3NavigationSideBarBaseProps
|
|
|
56
56
|
type: "notifications";
|
|
57
57
|
onLinkClick?: (meta: Notification["meta"]) => void;
|
|
58
58
|
};
|
|
59
|
-
type AppTeaserRoute = {
|
|
60
|
-
routeProps: any;
|
|
61
|
-
};
|
|
62
59
|
export type C3NavigationAppBarProps = C3NavigationSideBarBaseProps & {
|
|
63
60
|
type: "app";
|
|
64
|
-
appTeaser?: {
|
|
65
|
-
operate?: AppTeaserRoute;
|
|
66
|
-
tasklist?: AppTeaserRoute;
|
|
67
|
-
optimize?: AppTeaserRoute;
|
|
68
|
-
};
|
|
69
61
|
};
|
|
70
62
|
export type C3NavigationSideBarProps = {
|
|
71
63
|
callbacks?: {
|
|
@@ -73,4 +65,3 @@ export type C3NavigationSideBarProps = {
|
|
|
73
65
|
afterClosing?: () => void;
|
|
74
66
|
};
|
|
75
67
|
} & (C3NavigationOrgSideBarProps | C3NavigationInfoSideBarProps | C3NavigationUserSideBarProps | C3NavigationNotificationsSideBarProps);
|
|
76
|
-
export {};
|
|
@@ -2,7 +2,7 @@ import { Button } from "@carbon/react";
|
|
|
2
2
|
import { Notification as NotificationIcon } from "@carbon/react/icons";
|
|
3
3
|
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
4
4
|
import styled from "styled-components";
|
|
5
|
-
import { C3BellIcon, C3NotificationsUnreadIcon } from "../../../
|
|
5
|
+
import { C3BellIcon, C3NotificationsUnreadIcon } from "../../../icons/c3-icons";
|
|
6
6
|
import C3NotificationContainer, { NotificationDescription, NotificationTitle, } from "../c3-notification-provider/c3-notification-container";
|
|
7
7
|
import { C3NotificationContext } from "../c3-notification-provider/c3-notification-provider";
|
|
8
8
|
import C3NavigationSideBar from "./c3-navigation-sidebar";
|
|
@@ -5,10 +5,10 @@ import { C3NotificationSidebar } from "./c3-navigation-sidebar/c3-notification-s
|
|
|
5
5
|
import C3OrgSidebar from "./c3-navigation-sidebar/c3-org-sidebar";
|
|
6
6
|
import C3UserSidebar from "./c3-navigation-sidebar/c3-user-sidebar";
|
|
7
7
|
import { useMediaQuery } from "./helpers";
|
|
8
|
-
import { C3NavigationAppBar } from "./c3-navigation-appbar
|
|
8
|
+
import { C3NavigationAppBar } from "./c3-navigation-appbar";
|
|
9
9
|
import styled from "styled-components";
|
|
10
10
|
import C3ActionButtons from "./c3-navigation-actions/c3-action-buttons";
|
|
11
|
-
import { CamundaLogo } from "../../
|
|
11
|
+
import { CamundaLogo } from "../../icons/c3-icons";
|
|
12
12
|
import { InfoButton } from "./c3-info-button";
|
|
13
13
|
import { C3SidebarStateProvider } from "./c3-navigation-sidebar/c3-sidebar-state-provider";
|
|
14
14
|
import { C3HelpCenter } from "../c3-help-center/c3-help-center";
|
|
@@ -44,9 +44,7 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
|
|
|
44
44
|
const { activeOrg } = useC3Profile();
|
|
45
45
|
const isLargeScreen = useMediaQuery(`(min-width: ${BREAKPOINT_LG_WIDTH}`);
|
|
46
46
|
const appBarElementsLength = appBar.elements?.length ?? 0;
|
|
47
|
-
const displayAppBar = appBarElementsLength > 0 ||
|
|
48
|
-
appBar.appTeaser ||
|
|
49
|
-
(!isLargeScreen && navbar.elements.length > 0);
|
|
47
|
+
const displayAppBar = appBarElementsLength > 0 || (!isLargeScreen && navbar.elements.length > 0);
|
|
50
48
|
const orgName = activeOrg?.name || navbar.orgName;
|
|
51
49
|
if (app.prefix)
|
|
52
50
|
console.warn("The `prefix` prop is deprecated and will be removed in a future release. It has been replaced with a Camunda icon.");
|
|
@@ -5,7 +5,6 @@ export declare function createAppProps(): C3NavigationAppProps;
|
|
|
5
5
|
export declare function createAppBarProps(options?: {
|
|
6
6
|
isOpen?: boolean;
|
|
7
7
|
elements?: Array<C3NavigationElementProps>;
|
|
8
|
-
useElementsFromConfig?: boolean;
|
|
9
8
|
}): C3NavigationProps["appBar"];
|
|
10
9
|
export declare function createNavBarBarProps({ orgName, elements, }?: {
|
|
11
10
|
elements?: C3NavigationNavBarProps["elements"];
|
|
@@ -13,74 +13,51 @@ export function createAppProps() {
|
|
|
13
13
|
export function createAppBarProps(options = {}) {
|
|
14
14
|
return {
|
|
15
15
|
isOpen: Boolean(options?.isOpen),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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",
|
|
31
45
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
? undefined
|
|
37
|
-
: options?.elements ?? [
|
|
38
|
-
{
|
|
39
|
-
key: "console",
|
|
40
|
-
label: "Console",
|
|
41
|
-
active: true,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
key: "modeler",
|
|
45
|
-
label: "Modeler",
|
|
46
|
-
active: false,
|
|
47
|
-
routeProps: {
|
|
48
|
-
onClick: () => console.log("Redirecting to Modeler..."),
|
|
46
|
+
{
|
|
47
|
+
key: "cluster-b",
|
|
48
|
+
label: "Cluster B",
|
|
49
|
+
onClick: () => console.log("Redirecting to Tasklist..."),
|
|
49
50
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
active: false,
|
|
55
|
-
target: "_blank",
|
|
56
|
-
href: "https://camunda.com/",
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
key: "tasklist",
|
|
60
|
-
label: "Task List",
|
|
61
|
-
active: false,
|
|
62
|
-
subElements: [
|
|
63
|
-
{
|
|
64
|
-
key: "cluster-a",
|
|
65
|
-
label: "Cluster A",
|
|
66
|
-
href: "https://camunda.com/",
|
|
67
|
-
target: "_blank",
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
key: "cluster-b",
|
|
71
|
-
label: "Cluster B",
|
|
51
|
+
{
|
|
52
|
+
key: "cluster-c",
|
|
53
|
+
label: "Cluster C",
|
|
54
|
+
routeProps: {
|
|
72
55
|
onClick: () => console.log("Redirecting to Tasklist..."),
|
|
73
56
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
onClick: () => console.log("Redirecting to Tasklist..."),
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
},
|
|
83
|
-
],
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
],
|
|
84
61
|
elementClicked: (element) => console.log(`event coming from the appBarProps: ${element} has been clicked`),
|
|
85
62
|
};
|
|
86
63
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, PropsWithChildren } from "react";
|
|
2
2
|
import { ResolvedTheme } from "./carbon-theme-provider";
|
|
3
|
-
import { Cluster, Organization } from "
|
|
3
|
+
import { Cluster, Organization } from "../../c3-help-center/c3-help-center.types";
|
|
4
4
|
export type Theme = "light" | "dark" | "system";
|
|
5
5
|
export declare const defaultTheme: "light";
|
|
6
6
|
export type C3ProfileContextValue = {
|
|
@@ -54,9 +54,6 @@ export const C3ProfileProvider = ({ children }) => {
|
|
|
54
54
|
JSON.stringify(decodedToken),
|
|
55
55
|
decodedAudience,
|
|
56
56
|
]);
|
|
57
|
-
useEffect(() => {
|
|
58
|
-
loadClusters();
|
|
59
|
-
}, [activeOrg]);
|
|
60
57
|
useEffect(() => {
|
|
61
58
|
const updateSystemTheme = ({ matches }) => {
|
|
62
59
|
if (themeRef.current === "system")
|
|
@@ -8,7 +8,6 @@ type C3UserConfigurationBase = {
|
|
|
8
8
|
userToken: string;
|
|
9
9
|
getNewUserToken: () => Promise<string>;
|
|
10
10
|
analyticsTrack?: MixPanelTrack;
|
|
11
|
-
currentApp?: "console" | "modeler" | "tasklist" | "operate" | "optimize";
|
|
12
11
|
};
|
|
13
12
|
type C3UserConfigurationWithEndpoints = C3UserConfigurationBase & {
|
|
14
13
|
endpoints: Endpoints;
|
|
@@ -7,8 +7,6 @@ export { C3NavigationSideBarBaseProps } from "./components/c3-navigation/c3-navi
|
|
|
7
7
|
export { C3NavigationAppProps, C3NavigationElementProps, C3NavigationNavBarProps, C3NavigationProps, } from "./components/c3-navigation/c3-navigation.types";
|
|
8
8
|
export { useC3Profile } from "./components/c3-user-configuration/c3-profile-provider/c3-profile-provider";
|
|
9
9
|
export { C3UserConfiguration, default as C3UserConfigurationProvider, } from "./components/c3-user-configuration/c3-user-configuration-provider";
|
|
10
|
-
export { C3AppMenuIcon } from "./
|
|
11
|
-
export { C3IconProps } from "./
|
|
10
|
+
export { C3AppMenuIcon } from "./icons/c3-icons";
|
|
11
|
+
export { C3IconProps } from "./icons/c3-icons.types";
|
|
12
12
|
export { useC3HelpCenter } from "./components/c3-help-center/c3-help-center-provider";
|
|
13
|
-
export { C3AppTeaserPage, C3AppTeaserPageProps, } from "./components/c3-app-teaser/c3-app-teaser-page";
|
|
14
|
-
export * from "./assets/appTeaserPreviews";
|
|
@@ -4,7 +4,5 @@ export { C3EmptyState } from "./components/c3-empty-state/c3-empty-state";
|
|
|
4
4
|
export { default as C3Navigation } from "./components/c3-navigation";
|
|
5
5
|
export { useC3Profile } from "./components/c3-user-configuration/c3-profile-provider/c3-profile-provider";
|
|
6
6
|
export { default as C3UserConfigurationProvider, } from "./components/c3-user-configuration/c3-user-configuration-provider";
|
|
7
|
-
export { C3AppMenuIcon } from "./
|
|
7
|
+
export { C3AppMenuIcon } from "./icons/c3-icons";
|
|
8
8
|
export { useC3HelpCenter } from "./components/c3-help-center/c3-help-center-provider";
|
|
9
|
-
export { C3AppTeaserPage, } from "./components/c3-app-teaser/c3-app-teaser-page";
|
|
10
|
-
export * from "./assets/appTeaserPreviews";
|
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/camunda-composite-components",
|
|
3
|
-
"
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "https://github.com/camunda-cloud/camunda-composite-components.git"
|
|
6
|
+
},
|
|
7
|
+
"version": "0.3.1-rc.15",
|
|
4
8
|
"scripts": {
|
|
5
9
|
"clean": "rimraf lib/",
|
|
6
10
|
"build": "yarn clean && tsc",
|