@camunda/camunda-composite-components 0.20.4 → 0.20.6

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.20.4",
3
+ "version": "0.20.6",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -168,7 +168,7 @@ export const C3Navigation = ({ app, appBar, forwardRef, navbar, orgSideBar, info
168
168
  console.warn("The `prefix` prop is deprecated and will be removed in a future release. It has been replaced with a Camunda icon.");
169
169
  return (_jsxs(C3SidebarStateProvider, { isNotificationSidebarOpen: notificationSideBar?.isOpen, isOrgSidebarOpen: orgSideBar?.isOpen, isInfoSidebarOpen: infoSideBar?.isOpen, isUserSidebarOpen: userSideBar?.isOpen, children: [_jsxs(Header, { "aria-label": app.ariaLabel, children: [_jsx(SkipToContent, {}), displayAppBar && (_jsx(C3NavigationAppBar, { app: app, appBar: { ...appBar, isOpen: appBarOpen }, forwardRef: forwardRef, navbar: navbar, toggleAppbar: (value) => {
170
170
  setAppBarOpen(value);
171
- } })), _jsx(HeaderName, { as: forwardRef, prefix: "", ...app.routeProps, children: _jsxs(Stack, { gap: 3, orientation: "horizontal", children: [_jsx(CamundaLogo, { "aria-label": "Camunda" }), _jsx("span", { children: app.name })] }) }), _jsx(HeaderNavigation, { "aria-label": app.ariaLabel, children: navbar.elements.map((element) => (_jsx(HeaderMenuItem, { as: element.routeProps && forwardRef, isActive: element.isCurrentPage, ...element.routeProps, children: _jsx("span", { children: element.label }) }, element.key))) }), _jsxs(HeaderGlobalBar, { children: [_jsxs(ResponsiveNavbarElementsWrapper, { children: [tags &&
171
+ } })), _jsx(HeaderName, { as: forwardRef, prefix: "", ...app.routeProps, children: _jsxs(Stack, { gap: 3, orientation: "horizontal", children: [_jsx(CamundaLogo, { "aria-label": "Camunda" }), _jsx("span", { children: app.name })] }) }), _jsx(HeaderNavigation, { "aria-label": app.ariaLabel, children: navbar.elements.map((element) => (_jsx(HeaderMenuItem, { as: element.routeProps && forwardRef, isActive: element.isCurrentPage, ...element.routeProps, children: _jsx("span", { children: element.label }) }, element.key))) }), navbar?.customNavSlot && navbar?.customNavSlot, _jsxs(HeaderGlobalBar, { children: [_jsxs(ResponsiveNavbarElementsWrapper, { children: [tags &&
172
172
  tags.length > 0 &&
173
173
  tags.map((tag) => {
174
174
  if (tag?.tooltip !== undefined) {
@@ -50,6 +50,7 @@ export interface C3NavigationNavBarProps {
50
50
  isCommercial?: boolean;
51
51
  expiresAt?: number | string;
52
52
  };
53
+ customNavSlot?: React.ReactNode;
53
54
  orgName?: string;
54
55
  }
55
56
  export interface C3NotificationsProps {
@@ -81,14 +81,20 @@ export const OnboardingSurvey = ({ appTheme, persona, userFirstName, syncPersona
81
81
  }
82
82
  else {
83
83
  return requirements.reduce((prev, key) => {
84
+ let elementIndex = onboardingConfiguration.steps[step].elements?.findIndex((el) => el?.mapto === key);
85
+ elementIndex = elementIndex ?? -1;
84
86
  return (prev &&
85
- !!persona?.[key] &&
86
- (!(typeof persona[key] === "object" || typeof persona[key] === "string") ||
87
- (typeof persona[key] === "string" &&
88
- !!persona[key].trim()) ||
89
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
90
- // @ts-ignore
91
- (typeof persona[key] === "object" && persona[key].length !== 0)));
87
+ (onboardingConfiguration.steps[step].elements?.[elementIndex]
88
+ ?.elements?.[0]?.value ||
89
+ (!!persona?.[key] &&
90
+ (!(typeof persona[key] === "object" ||
91
+ typeof persona[key] === "string") ||
92
+ (typeof persona[key] === "string" &&
93
+ !!persona[key].trim()) ||
94
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
95
+ // @ts-ignore
96
+ (typeof persona[key] === "object" &&
97
+ persona[key].length !== 0)))));
92
98
  }, true);
93
99
  }
94
100
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/camunda-composite-components",
3
- "version": "0.20.4",
3
+ "version": "0.20.6",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"