@camunda/camunda-composite-components 0.3.1-rc.9 → 0.4.1-rc.0
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 +1 -1
- package/lib/esm/package.json +114 -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.js +2 -2
- package/lib/esm/src/components/c3-cluster-tag/c3-cluster-tag.test.js +8 -0
- package/lib/esm/{components → src/components}/c3-help-center/c3-help-center-provider.d.ts +4 -1
- package/lib/esm/{components → src/components}/c3-help-center/c3-help-center-provider.js +8 -9
- package/lib/esm/{components → src/components}/c3-help-center/c3-help-center.js +13 -4
- package/lib/esm/{components → src/components}/c3-help-center/help-center-hint.d.ts +0 -1
- package/lib/esm/{components → src/components}/c3-help-center/help-center-hint.js +4 -5
- package/lib/esm/{components → src/components}/c3-help-center/help-center.d.ts +1 -0
- package/lib/esm/{components → src/components}/c3-help-center/help-center.js +4 -3
- package/lib/esm/{components → src/components}/c3-help-center/tabs/feedback.js +1 -1
- package/lib/esm/{components → src/components}/c3-help-center/tabs/tabContent.d.ts +2 -1
- package/lib/esm/src/components/c3-help-center/tabs/tabContent.js +20 -0
- package/lib/esm/src/components/c3-help-center/tabs/tabContentSkeleton.d.ts +2 -0
- package/lib/esm/src/components/c3-help-center/tabs/tabContentSkeleton.js +22 -0
- package/lib/esm/{components → src/components}/c3-help-center/tile.js +20 -5
- package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-org-sidebar.js +1 -1
- package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/components.d.ts +1 -0
- package/lib/esm/{components → src/components}/c3-navigation/c3-navigation.types.d.ts +1 -0
- package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts +13 -0
- package/lib/esm/{components → src/components}/c3-navigation/c3-notification-provider/c3-notification-container.js +6 -2
- package/lib/esm/{components → src/components}/c3-navigation/story-helpers.js +1 -1
- package/lib/esm/{components → src/components}/c3-onboarding-survey/c3-onboarding-survey.js +1 -0
- package/lib/esm/{components → src/components}/c3-onboarding-survey/onboardingModal.d.ts +1 -0
- package/lib/esm/{components → src/components}/c3-onboarding-survey/onboardingSurvey.js +2 -3
- package/lib/esm/{components → src/components}/c3-onboarding-survey/step.d.ts +1 -0
- package/lib/esm/{components → src/components}/c3-user-configuration/authToken.js +2 -2
- package/lib/esm/src/components/styles.d.ts +6 -0
- package/lib/esm/src/icons/c3-icons.types.js +1 -0
- package/package.json +46 -38
- package/lib/esm/components/c3-help-center/tabs/tabContent.js +0 -18
- package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts +0 -826
- package/lib/esm/components/styles.d.ts +0 -548
- /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.d.ts +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/c3-empty-state/c3-empty-state.test.d.ts → src/components/c3-cluster-tag/c3-cluster-tag.test.d.ts} +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/c3-empty-state/c3-empty-state.types.js → 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/c3-help-center/c3-help-center.types.js → src/components/c3-empty-state/c3-empty-state.types.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.d.ts +0 -0
- /package/lib/esm/{components/c3-navigation/c3-navigation-actions/c3-action-buttons.types.js → 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/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/tile.d.ts +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/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.types.js → src/components/c3-navigation/c3-navigation-actions/c3-action-buttons.types.js} +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-appbar.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-appbar.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.d.ts +0 -0
- /package/lib/esm/{components/c3-navigation/c3-navigation.test.d.ts → 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-notification-sidebar.js +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-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.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.js +0 -0
- /package/lib/esm/{components/c3-navigation/c3-navigation.types.js → 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/{icons/c3-icons.types.js → src/components/c3-navigation/c3-navigation.types.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-helpers.d.ts +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.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/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/c3-profile-provider/c3-profile-provider.d.ts +0 -0
- /package/lib/esm/{components → src/components}/c3-user-configuration/c3-profile-provider/c3-profile-provider.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.d.ts +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.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/{icons → src/icons}/c3-icons.d.ts +0 -0
- /package/lib/esm/{icons → src/icons}/c3-icons.js +0 -0
- /package/lib/esm/{icons → src/icons}/c3-icons.types.d.ts +0 -0
- /package/lib/esm/{index.d.ts → src/index.d.ts} +0 -0
- /package/lib/esm/{index.js → src/index.js} +0 -0
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ yarn build
|
|
|
25
25
|
|
|
26
26
|
## Release
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Simply run our [release workflow](https://github.com/camunda-cloud/camunda-composite-components/actions/workflows/release.yml) in the GitHub Actions tab. This will create a new release, publish the package to npm and update the changelog automatically.
|
|
29
29
|
|
|
30
30
|
Pushing to `main` will update the storybook available under [cloudflare page](https://camunda-composite-components.pages.dev/).
|
|
31
31
|
|
|
@@ -0,0 +1,114 @@
|
|
|
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.4.0",
|
|
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 6006 -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:6006 && 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.7",
|
|
34
|
+
"@babel/preset-env": "7.23.8",
|
|
35
|
+
"@babel/preset-react": "7.23.3",
|
|
36
|
+
"@babel/preset-typescript": "7.23.3",
|
|
37
|
+
"@carbon/react": "1.48.1",
|
|
38
|
+
"@mdx-js/react": "3.0.0",
|
|
39
|
+
"@playwright/test": "1.41.1",
|
|
40
|
+
"@semantic-release/changelog": "6.0.3",
|
|
41
|
+
"@semantic-release/git": "10.0.1",
|
|
42
|
+
"@storybook/addon-a11y": "7.6.8",
|
|
43
|
+
"@storybook/addon-actions": "7.6.8",
|
|
44
|
+
"@storybook/addon-docs": "7.6.8",
|
|
45
|
+
"@storybook/addon-essentials": "7.6.8",
|
|
46
|
+
"@storybook/addon-interactions": "7.6.8",
|
|
47
|
+
"@storybook/addon-links": "7.6.8",
|
|
48
|
+
"@storybook/blocks": "7.6.8",
|
|
49
|
+
"@storybook/preset-scss": "1.0.3",
|
|
50
|
+
"@storybook/react": "7.6.8",
|
|
51
|
+
"@storybook/react-webpack5": "7.6.8",
|
|
52
|
+
"@storybook/test-runner": "0.16.0",
|
|
53
|
+
"@storybook/testing-library": "0.2.2",
|
|
54
|
+
"@types/carbon-components-react": "7.55.10",
|
|
55
|
+
"@types/event-source-polyfill": "1.0.5",
|
|
56
|
+
"@types/mixpanel-browser": "2.48.1",
|
|
57
|
+
"@types/node": "20.11.10",
|
|
58
|
+
"@types/react": "18.2.48",
|
|
59
|
+
"@types/react-dom": "18.2.18",
|
|
60
|
+
"@types/styled-components": "5.1.34",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "6.9.0",
|
|
62
|
+
"@typescript-eslint/parser": "6.9.0",
|
|
63
|
+
"axe-playwright": "1.2.3",
|
|
64
|
+
"babel-loader": "9.1.3",
|
|
65
|
+
"conventional-changelog-conventionalcommits": "7.0.2",
|
|
66
|
+
"copyfiles": "2.4.1",
|
|
67
|
+
"css-loader": "6.9.1",
|
|
68
|
+
"eslint": "8.52.0",
|
|
69
|
+
"eslint-config-prettier": "9.0.0",
|
|
70
|
+
"eslint-import-resolver-typescript": "3.6.1",
|
|
71
|
+
"eslint-plugin-import": "2.29.0",
|
|
72
|
+
"eslint-plugin-prettier": "5.0.1",
|
|
73
|
+
"eslint-plugin-react": "7.33.2",
|
|
74
|
+
"eslint-plugin-react-hooks": "4.6.0",
|
|
75
|
+
"eslint-plugin-storybook": "0.6.15",
|
|
76
|
+
"event-source-polyfill": "1.0.31",
|
|
77
|
+
"husky": "8.0.3",
|
|
78
|
+
"mixpanel-browser": "2.48.1",
|
|
79
|
+
"prettier": "3.0.3",
|
|
80
|
+
"react": "18.2.0",
|
|
81
|
+
"react-dom": "18.2.0",
|
|
82
|
+
"rimraf": "5.0.5",
|
|
83
|
+
"sass": "1.70.0",
|
|
84
|
+
"sass-loader": "13.3.3",
|
|
85
|
+
"semantic-release": "22.0.12",
|
|
86
|
+
"serve": "14.2.1",
|
|
87
|
+
"storybook": "7.6.8",
|
|
88
|
+
"style-loader": "3.3.4",
|
|
89
|
+
"styled-components": "6.1.8",
|
|
90
|
+
"typescript": "5.3.3",
|
|
91
|
+
"wait-on": "7.2.0",
|
|
92
|
+
"webpack": "5.90.0"
|
|
93
|
+
},
|
|
94
|
+
"dependencies": {
|
|
95
|
+
"jwt-decode": "4.0.0",
|
|
96
|
+
"react-markdown": "8.0.7"
|
|
97
|
+
},
|
|
98
|
+
"peerDependencies": {
|
|
99
|
+
"@carbon/react": "1.x",
|
|
100
|
+
"event-source-polyfill": "1.0.x",
|
|
101
|
+
"react": "18.x",
|
|
102
|
+
"react-dom": "18.x",
|
|
103
|
+
"styled-components": "5.x || 6.x"
|
|
104
|
+
},
|
|
105
|
+
"description": "Camunda Composite Components",
|
|
106
|
+
"main": "./lib/esm/src/index.js",
|
|
107
|
+
"types": "./lib/esm/src/index.d.ts",
|
|
108
|
+
"files": [
|
|
109
|
+
"/lib"
|
|
110
|
+
],
|
|
111
|
+
"author": "Camunda",
|
|
112
|
+
"license": "Apache-2.0",
|
|
113
|
+
"packageManager": "yarn@4.0.2"
|
|
114
|
+
}
|
|
@@ -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,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jwtDecode } from "jwt-decode";
|
|
2
2
|
import { request } from "./api";
|
|
3
3
|
const decodeJWT = (userToken) => {
|
|
4
4
|
let decodedToken = {};
|
|
5
5
|
try {
|
|
6
|
-
decodedToken =
|
|
6
|
+
decodedToken = jwtDecode(userToken);
|
|
7
7
|
}
|
|
8
8
|
catch (error) {
|
|
9
9
|
console.error("User token invalid");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { expect, test } from "@playwright/test";
|
|
2
|
+
import { getStory } from "../test-utils";
|
|
3
|
+
test.describe("Cluster tag", () => {
|
|
4
|
+
test("Basic", async ({ page }) => {
|
|
5
|
+
await getStory(page, "components-c3clustertag--basic");
|
|
6
|
+
await expect(page).toHaveScreenshot();
|
|
7
|
+
});
|
|
8
|
+
});
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React, { FC, PropsWithChildren } from "react";
|
|
2
|
-
|
|
2
|
+
export declare enum HelpCenterHintType {
|
|
3
|
+
HelpCenter = "help-center",
|
|
4
|
+
Onboarding = "onboarding"
|
|
5
|
+
}
|
|
3
6
|
export type C3HelpCenterContextValue = {
|
|
4
7
|
openHelpCenter: (showTabId?: string) => void;
|
|
5
8
|
setIsHelpCenterOpen: (isOpen: boolean) => void;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
|
+
export var HelpCenterHintType;
|
|
3
|
+
(function (HelpCenterHintType) {
|
|
4
|
+
HelpCenterHintType["HelpCenter"] = "help-center";
|
|
5
|
+
HelpCenterHintType["Onboarding"] = "onboarding";
|
|
6
|
+
})(HelpCenterHintType || (HelpCenterHintType = {}));
|
|
2
7
|
export const C3HelpCenterContext = React.createContext({
|
|
3
8
|
openHelpCenter: () => undefined,
|
|
4
9
|
setIsHelpCenterOpen: () => undefined,
|
|
@@ -6,7 +11,7 @@ export const C3HelpCenterContext = React.createContext({
|
|
|
6
11
|
showHint: false,
|
|
7
12
|
setShowHint: () => undefined,
|
|
8
13
|
setShowHintOnClose: () => undefined,
|
|
9
|
-
hintType:
|
|
14
|
+
hintType: HelpCenterHintType.Onboarding,
|
|
10
15
|
setHintType: () => undefined,
|
|
11
16
|
});
|
|
12
17
|
export const C3HelpCenterProvider = ({ children }) => {
|
|
@@ -14,7 +19,7 @@ export const C3HelpCenterProvider = ({ children }) => {
|
|
|
14
19
|
const [activeTabId, setActiveTabId] = useState(null);
|
|
15
20
|
const [showHint, setShowHint] = useState(false);
|
|
16
21
|
const [showHintOnClose, setShowHintOnClose] = useState(false);
|
|
17
|
-
const [hintType, setHintType] = useState(
|
|
22
|
+
const [hintType, setHintType] = useState(HelpCenterHintType.Onboarding);
|
|
18
23
|
const openHelpCenter = (showTabId) => {
|
|
19
24
|
if (!isHelpCenterOpen) {
|
|
20
25
|
setIsHelpCenterOpen(true);
|
|
@@ -27,17 +32,11 @@ export const C3HelpCenterProvider = ({ children }) => {
|
|
|
27
32
|
if (!isHelpCenterOpen) {
|
|
28
33
|
setActiveTabId(null);
|
|
29
34
|
if (showHintOnClose) {
|
|
30
|
-
console.log("showing hint and hiding after");
|
|
31
35
|
setShowHintOnClose(false);
|
|
32
|
-
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
console.log("timeout over, showing hint");
|
|
35
|
-
setShowHint(true);
|
|
36
|
-
}, 240);
|
|
36
|
+
setTimeout(() => setShowHint(true), 240);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}, [isHelpCenterOpen]);
|
|
40
|
-
console.log("showHintOnClose", showHintOnClose);
|
|
41
40
|
return (React.createElement(C3HelpCenterContext.Provider, { value: {
|
|
42
41
|
openHelpCenter,
|
|
43
42
|
setIsHelpCenterOpen,
|
|
@@ -51,9 +51,10 @@ 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
|
+
const isFirstLoad = useRef(true);
|
|
57
58
|
const fetchData = async () => {
|
|
58
59
|
if (!userToken || !decodedToken || !decodedAudience)
|
|
59
60
|
return;
|
|
@@ -76,23 +77,31 @@ export const C3HelpCenter = ({ autoStartSurvey, origin, flags, onRequestClose, m
|
|
|
76
77
|
onRequestOpen?.();
|
|
77
78
|
}
|
|
78
79
|
await fetchConfig();
|
|
80
|
+
isFirstLoad.current = false;
|
|
79
81
|
};
|
|
80
82
|
React.useEffect(() => {
|
|
81
83
|
fetchData();
|
|
82
84
|
}, [JSON.stringify(decodedToken), decodedAudience]);
|
|
83
85
|
useEffect(() => {
|
|
84
|
-
if (
|
|
86
|
+
if (isFirstLoad.current ||
|
|
87
|
+
!userToken ||
|
|
88
|
+
!decodedAudience ||
|
|
89
|
+
!persona?.complete)
|
|
85
90
|
return;
|
|
86
91
|
fetchConfig();
|
|
87
92
|
reloadClusters();
|
|
88
93
|
}, [persona?.complete]);
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
if (isFirstLoad.current || !activeOrganizationId)
|
|
96
|
+
return;
|
|
97
|
+
fetchConfig();
|
|
98
|
+
reloadClusters();
|
|
99
|
+
}, [activeOrganizationId]);
|
|
89
100
|
React.useEffect(() => {
|
|
90
101
|
const tabs = helpCenterConfig.tabs;
|
|
91
102
|
const firstTab = tabs[0].id;
|
|
92
103
|
if (isOpen) {
|
|
93
|
-
console.log("opening hc");
|
|
94
104
|
if (autoStartSurvey && !persona?.wasShown) {
|
|
95
|
-
console.log("show hint on close");
|
|
96
105
|
setShowHintOnClose(true);
|
|
97
106
|
}
|
|
98
107
|
if (persona && !persona.wasShown && decodedAudience) {
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Button, Toggletip, ToggletipActions, ToggletipContent, } from "@carbon/react";
|
|
3
|
-
import { useC3HelpCenter } from "./c3-help-center-provider";
|
|
3
|
+
import { HelpCenterHintType, useC3HelpCenter } from "./c3-help-center-provider";
|
|
4
4
|
export const HelpCenterHint = ({ children }) => {
|
|
5
5
|
const { showHint, setShowHint, hintType } = useC3HelpCenter();
|
|
6
|
-
console.log("showHint", showHint);
|
|
7
6
|
return showHint ? (React.createElement(Toggletip, { defaultOpen: true,
|
|
8
7
|
// eslint-disable-next-line
|
|
9
8
|
// @ts-ignore
|
|
10
9
|
align: "bottom-right" },
|
|
11
10
|
children,
|
|
12
11
|
React.createElement(ToggletipContent, null,
|
|
13
|
-
React.createElement("p", null, hintType ===
|
|
14
|
-
? "Access the
|
|
15
|
-
: "Access the onboarding survey to get personalized next steps and educational content"),
|
|
12
|
+
React.createElement("p", null, hintType === HelpCenterHintType.HelpCenter
|
|
13
|
+
? "Access the Help Center at any time to see your recommendations, discover guides, tutorials, or to share feedback."
|
|
14
|
+
: "Access the onboarding survey from the Help Center to get personalized next steps and educational content."),
|
|
16
15
|
React.createElement(ToggletipActions, null,
|
|
17
16
|
React.createElement(Button, { size: "sm", onClick: () => setShowHint(false) }, "Got it"))))) : (children);
|
|
18
17
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button,
|
|
1
|
+
import { Button, ModalBody, ModalFooter, ModalHeader, SideNav, SideNavItems, SideNavMenuItem, Stack, } from "@carbon/react";
|
|
2
2
|
import { Undo } from "@carbon/react/icons";
|
|
3
3
|
import React, { useEffect, useState } from "react";
|
|
4
4
|
import { Feedback } from "./tabs/feedback";
|
|
@@ -9,6 +9,7 @@ import { body01, headings } from "../styles";
|
|
|
9
9
|
import styled from "styled-components";
|
|
10
10
|
import { useC3HelpCenter } from "./c3-help-center-provider";
|
|
11
11
|
import { useC3Profile } from "../c3-user-configuration/c3-profile-provider/c3-profile-provider";
|
|
12
|
+
import { TabContentSkeleton } from "./tabs/tabContentSkeleton";
|
|
12
13
|
export const StyledModalHeader = styled(ModalHeader) `
|
|
13
14
|
${headings}
|
|
14
15
|
`;
|
|
@@ -52,8 +53,8 @@ export const HelpCenter = ({ configuration, persona, email, audience, flags = []
|
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
setTabTiles(tiles);
|
|
56
56
|
setIsLoadingTiles(false);
|
|
57
|
+
setTabTiles(tiles);
|
|
57
58
|
})();
|
|
58
59
|
}, [
|
|
59
60
|
token,
|
|
@@ -78,7 +79,7 @@ export const HelpCenter = ({ configuration, persona, email, audience, flags = []
|
|
|
78
79
|
Object.keys(tabTiles).length === 0 &&
|
|
79
80
|
isLoadingTiles) {
|
|
80
81
|
header = "Your recommendations";
|
|
81
|
-
content = React.createElement(
|
|
82
|
+
content = React.createElement(TabContentSkeleton, null);
|
|
82
83
|
}
|
|
83
84
|
else if (activeTab === "recommendations" &&
|
|
84
85
|
Object.keys(tabTiles).length === 0) {
|
|
@@ -30,7 +30,7 @@ export const Feedback = (props) => {
|
|
|
30
30
|
placeholder: Placeholder.Feedback,
|
|
31
31
|
});
|
|
32
32
|
const [suggestion, setSuggestion] = useState("");
|
|
33
|
-
const [allowContact, setAllowContact] = useState(
|
|
33
|
+
const [allowContact, setAllowContact] = useState(true);
|
|
34
34
|
const [file, setFile] = useState(undefined);
|
|
35
35
|
const [submitted, setSubmitted] = useState(false);
|
|
36
36
|
const [isDoingAsyncWork, setisDoingAsyncWork] = useState(false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
1
|
+
import React, { FC } from "react";
|
|
2
2
|
import { Dict } from "mixpanel-browser";
|
|
3
3
|
import { WpCardType } from "../c3-help-center.types";
|
|
4
4
|
export declare const TAB_TYPES: {
|
|
@@ -6,6 +6,7 @@ export declare const TAB_TYPES: {
|
|
|
6
6
|
readonly Column: "column";
|
|
7
7
|
};
|
|
8
8
|
export type TabType = (typeof TAB_TYPES)[keyof typeof TAB_TYPES];
|
|
9
|
+
export declare const TileWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
9
10
|
export declare const TabContent: FC<{
|
|
10
11
|
onboarding: {
|
|
11
12
|
complete: boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ActionableNotification, Stack } from "@carbon/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { HelpCenterTile } from "../tile";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
export const TAB_TYPES = {
|
|
6
|
+
Grid: "grid",
|
|
7
|
+
Column: "column",
|
|
8
|
+
};
|
|
9
|
+
export const TileWrapper = styled.div `
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
justify-content: flex-start;
|
|
13
|
+
gap: var(--cds-spacing-05);
|
|
14
|
+
`;
|
|
15
|
+
export const TabContent = ({ onboarding, type, origin, tiles, mixpanelTrack }) => {
|
|
16
|
+
return (React.createElement("div", null,
|
|
17
|
+
React.createElement(Stack, null,
|
|
18
|
+
onboarding && onboarding?.complete !== true && (React.createElement(ActionableNotification, { kind: "info", inline: true, lowContrast: true, hideCloseButton: true, style: { maxWidth: "100%", marginBottom: "1rem" }, actionButtonLabel: "Resume Survey", onActionButtonClick: onboarding.resumeSurvey, title: "Complete the new user survey to see more recommendations", subtitle: "" })),
|
|
19
|
+
React.createElement(TileWrapper, null, tiles.map((tile) => (React.createElement(HelpCenterTile, { origin: origin, tabType: type, tile: tile, mixpanelTrack: mixpanelTrack, key: tile.card_id })))))));
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TileWrapper } from "./tabContent";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { SkeletonPlaceholder } from "@carbon/react";
|
|
5
|
+
const TileOuter = styled.div `
|
|
6
|
+
background: var(--cds-layer-02, #f4f4f4);
|
|
7
|
+
display: flex;
|
|
8
|
+
width: 300px;
|
|
9
|
+
height: 300px;
|
|
10
|
+
padding: 16px;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: 16px;
|
|
14
|
+
`;
|
|
15
|
+
const TileSkeleton = styled(SkeletonPlaceholder) `
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
`;
|
|
19
|
+
export const TabContentSkeleton = () => (React.createElement(TileWrapper, null, Array(6)
|
|
20
|
+
.fill("_")
|
|
21
|
+
.map((_, i) => (React.createElement(TileOuter, { key: `tile-skeleton-${i}-${Math.random() * 10000}` },
|
|
22
|
+
React.createElement(TileSkeleton, null))))));
|
|
@@ -3,6 +3,21 @@ import { ArrowRight } from "@carbon/react/icons";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { TAB_TYPES } from "./tabs/tabContent";
|
|
5
5
|
import ReactMarkdown from "react-markdown";
|
|
6
|
+
import styled from "styled-components";
|
|
7
|
+
const TileHeading = styled.h6 `
|
|
8
|
+
font-size: var(--cds-heading-compact-01-font-size);
|
|
9
|
+
font-weight: var(--cds-heading-compact-01-font-weight);
|
|
10
|
+
line-height: var(--cds-heading-compact-01-line-height);
|
|
11
|
+
letter-spacing: var(--cds-heading-compact-01-letter-spacing);
|
|
12
|
+
`;
|
|
13
|
+
const TileDescription = styled.p `
|
|
14
|
+
height: 50px;
|
|
15
|
+
color: var(--cds-text-secondary);
|
|
16
|
+
`;
|
|
17
|
+
const TileStack = styled.div `
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
`;
|
|
6
21
|
export const HelpCenterTile = ({ tile, tabType, origin, mixpanelTrack }) => {
|
|
7
22
|
const { title, description, timeToComplete, cta, image, link, card_id } = tile;
|
|
8
23
|
if (tabType === TAB_TYPES.Grid) {
|
|
@@ -12,17 +27,17 @@ export const HelpCenterTile = ({ tile, tabType, origin, mixpanelTrack }) => {
|
|
|
12
27
|
}, className: "cds--layer-two" },
|
|
13
28
|
React.createElement(Stack, { orientation: "vertical", gap: 3 },
|
|
14
29
|
React.createElement("img", { src: image, alt: title }),
|
|
15
|
-
React.createElement(
|
|
16
|
-
React.createElement(
|
|
17
|
-
React.createElement(
|
|
30
|
+
React.createElement(TileStack, null,
|
|
31
|
+
React.createElement(TileHeading, null, title),
|
|
32
|
+
React.createElement(TileDescription, null, description),
|
|
18
33
|
React.createElement("div", { style: { marginLeft: "-4px", marginTop: "12px" } }, (() => {
|
|
19
34
|
let content = React.createElement("div", { style: { height: "32px" } });
|
|
20
35
|
if (timeToComplete) {
|
|
21
|
-
content = (React.createElement(Tag, { type: "gray", title: timeToComplete }, timeToComplete));
|
|
36
|
+
content = (React.createElement(Tag, { type: "warm-gray", size: "sm", title: timeToComplete }, timeToComplete));
|
|
22
37
|
}
|
|
23
38
|
return content;
|
|
24
39
|
})()))),
|
|
25
|
-
React.createElement(Button, { as: "a", href: link, target: "_blank", onClick: () => {
|
|
40
|
+
React.createElement(Button, { size: "sm", as: "a", href: link, target: "_blank", onClick: () => {
|
|
26
41
|
mixpanelTrack?.(`helpcenter:click`, {
|
|
27
42
|
from: origin,
|
|
28
43
|
to: card_id,
|
package/lib/esm/{components → src/components}/c3-navigation/c3-navigation-sidebar/c3-org-sidebar.js
RENAMED
|
@@ -62,7 +62,7 @@ const C3OrgSidebar = ({ sideBar }) => {
|
|
|
62
62
|
} },
|
|
63
63
|
React.createElement(FormLabel, null, activeOrganization.activeLabel),
|
|
64
64
|
React.createElement("div", { className: "textPrimary", style: {
|
|
65
|
-
height: "20px",
|
|
65
|
+
height: "20px", // Set minimum height to allow decenders to be rendered
|
|
66
66
|
lineHeight: "20px",
|
|
67
67
|
fontSize: "14px",
|
|
68
68
|
textOverflow: "ellipsis",
|
package/lib/esm/src/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { Notification as NotificationProps } from "../../../api/notifications";
|
|
3
|
+
export declare const NotificationTitle: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>;
|
|
4
|
+
export declare const NotificationDescription: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>;
|
|
5
|
+
export declare const LinkContainer: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
6
|
+
declare const C3NotificationContainer: FC<NotificationProps & {
|
|
7
|
+
onRead: () => void;
|
|
8
|
+
onDismiss: () => void;
|
|
9
|
+
onLinkClick?: (meta: NotificationProps["meta"]) => void;
|
|
10
|
+
originalOnLinkClick?: (meta: NotificationProps["meta"]) => void;
|
|
11
|
+
unread?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export default C3NotificationContainer;
|
|
@@ -96,9 +96,13 @@ const C3NotificationContainer = ({ description, state, timestamp, title, onDismi
|
|
|
96
96
|
(state === "new" || unread) && React.createElement(Dot, null),
|
|
97
97
|
React.createElement(NotificationHeader, null,
|
|
98
98
|
React.createElement(Timestamp, null, getReadableTimestamp(timestamp)),
|
|
99
|
-
|
|
99
|
+
React.createElement(CloseButton
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
100
101
|
// @ts-ignore
|
|
101
|
-
|
|
102
|
+
, {
|
|
103
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
104
|
+
// @ts-ignore
|
|
105
|
+
kind: "ghost", hasIconOnly: true, iconDescription: "Dismiss", align: "bottom-right", renderIcon: Close, onClick: dismissNotification, size: "sm", "$show": isHovering }))),
|
|
102
106
|
React.createElement(NotificationTitle, null, title),
|
|
103
107
|
React.createElement(NotificationDescription, null, description),
|
|
104
108
|
meta && (React.createElement(LinkContainer, null,
|
|
@@ -225,5 +225,5 @@ export const createHelpCenterProps = (options) => ({
|
|
|
225
225
|
origin: options?.origin || "console",
|
|
226
226
|
theme: options?.theme,
|
|
227
227
|
autoStartSurvey: options?.autoStartSurvey,
|
|
228
|
-
mixpanelTrack: (event, data) => console.log(`Mixpanel event ${event} tracked: ${data}`),
|
|
228
|
+
mixpanelTrack: (event, data) => console.log(`Mixpanel event ${event} tracked: ${JSON.stringify(data)}`),
|
|
229
229
|
});
|
|
@@ -4,7 +4,7 @@ import { OnboardingModal } from "./onboardingModal";
|
|
|
4
4
|
import { OnboardingPage } from "./onboardingPage";
|
|
5
5
|
import { OnboardingStep } from "./step";
|
|
6
6
|
import { Body01 } from "../styles";
|
|
7
|
-
import { useC3HelpCenter } from "../c3-help-center/c3-help-center-provider";
|
|
7
|
+
import { HelpCenterHintType, useC3HelpCenter, } from "../c3-help-center/c3-help-center-provider";
|
|
8
8
|
export const OnboardingSurvey = ({ appTheme, persona, userFirstName, syncPersona, setPersona, mixpanelTrack, onRequestClose, onboardingConfiguration, isLoadingConfig, modal, origin, }) => {
|
|
9
9
|
const { setHintType } = useC3HelpCenter();
|
|
10
10
|
const [step, setStep] = useState(persona?.nextStep ?? 0);
|
|
@@ -22,8 +22,7 @@ export const OnboardingSurvey = ({ appTheme, persona, userFirstName, syncPersona
|
|
|
22
22
|
},
|
|
23
23
|
};
|
|
24
24
|
if (committedStep >= onboardingConfiguration.steps.length) {
|
|
25
|
-
|
|
26
|
-
setHintType("help-center");
|
|
25
|
+
setHintType(HelpCenterHintType.HelpCenter);
|
|
27
26
|
newPersona.nextStep = 0;
|
|
28
27
|
newPersona.complete = true;
|
|
29
28
|
await syncPersona(newPersona, true);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jwtDecode } from "jwt-decode";
|
|
2
2
|
const AUTH0_BASE_CLAIM = `https://camunda.com`;
|
|
3
3
|
const AUTH0_TOKEN_ATTRIBUTE_SETTINGS = "settings";
|
|
4
4
|
const AUTH0_TOKEN_ATTRIBUTE_META = "meta";
|
|
@@ -8,7 +8,7 @@ export const getMeta = (token) => token[`${AUTH0_BASE_CLAIM}/${AUTH0_TOKEN_ATTRI
|
|
|
8
8
|
export const decodeJWT = (userToken) => {
|
|
9
9
|
let decodedToken = null;
|
|
10
10
|
try {
|
|
11
|
-
decodedToken =
|
|
11
|
+
decodedToken = jwtDecode(userToken);
|
|
12
12
|
}
|
|
13
13
|
catch (error) {
|
|
14
14
|
console.error("User token invalid");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const headings: import("styled-components").RuleSet<object>;
|
|
3
|
+
export declare const body02: import("styled-components").RuleSet<object>;
|
|
4
|
+
export declare const Body02: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>;
|
|
5
|
+
export declare const body01: import("styled-components").RuleSet<object>;
|
|
6
|
+
export declare const Body01: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|