@camunda/camunda-composite-components 0.4.2-rc.1 → 0.4.2-rc.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.
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/camunda-cloud/camunda-composite-components.git"
6
6
  },
7
- "version": "0.4.2-rc.0",
7
+ "version": "0.4.2-rc.2",
8
8
  "scripts": {
9
9
  "clean": "rimraf lib/",
10
10
  "build": "yarn clean && tsc",
@@ -39,16 +39,16 @@
39
39
  "@playwright/test": "1.41.2",
40
40
  "@semantic-release/changelog": "6.0.3",
41
41
  "@semantic-release/git": "10.0.1",
42
- "@storybook/addon-a11y": "7.6.11",
43
- "@storybook/addon-actions": "7.6.11",
44
- "@storybook/addon-docs": "7.6.11",
45
- "@storybook/addon-essentials": "7.6.11",
46
- "@storybook/addon-interactions": "7.6.11",
47
- "@storybook/addon-links": "7.6.11",
48
- "@storybook/blocks": "7.6.11",
42
+ "@storybook/addon-a11y": "7.6.12",
43
+ "@storybook/addon-actions": "7.6.12",
44
+ "@storybook/addon-docs": "7.6.12",
45
+ "@storybook/addon-essentials": "7.6.12",
46
+ "@storybook/addon-interactions": "7.6.12",
47
+ "@storybook/addon-links": "7.6.12",
48
+ "@storybook/blocks": "7.6.12",
49
49
  "@storybook/preset-scss": "1.0.3",
50
- "@storybook/react": "7.6.11",
51
- "@storybook/react-webpack5": "7.6.11",
50
+ "@storybook/react": "7.6.12",
51
+ "@storybook/react-webpack5": "7.6.12",
52
52
  "@storybook/test-runner": "0.16.0",
53
53
  "@storybook/testing-library": "0.2.2",
54
54
  "@types/carbon-components-react": "7.55.10",
@@ -84,7 +84,7 @@
84
84
  "sass-loader": "13.3.3",
85
85
  "semantic-release": "23.0.0",
86
86
  "serve": "14.2.1",
87
- "storybook": "7.6.11",
87
+ "storybook": "7.6.12",
88
88
  "style-loader": "3.3.4",
89
89
  "styled-components": "6.1.8",
90
90
  "typescript": "5.3.3",
@@ -35,7 +35,7 @@ export const C3AppTeaser = ({ appName: app, hasTrialExpired, canUpgradePlan, can
35
35
  "Your plan has expired, which means you won't be able to ",
36
36
  React.createElement("br", null),
37
37
  "create a Cluster or access the following apps and features.")) : (React.createElement(React.Fragment, null,
38
- "The components displayed below require a Cluster to run. ",
38
+ "The apps displayed below require a Cluster to run. ",
39
39
  React.createElement("br", null),
40
40
  "Begin by creating your Cluster.")), subtext: hasTrialExpired ? "Plans starting at €99/month" : "", cta: {
41
41
  action: onClickCta,
@@ -20,29 +20,34 @@ export const C3NavigationAppBar = ({ appBar, forwardRef, navbar, }) => {
20
20
  return;
21
21
  const defaultElements = [];
22
22
  APPS.forEach((app) => {
23
- if (!decodedAudience || !currentApp)
23
+ if (!decodedAudience || !currentApp || !activeOrg?.uuid)
24
24
  return;
25
25
  const element = {
26
26
  key: app,
27
27
  label: app.charAt(0).toUpperCase() + app.slice(1),
28
28
  active: currentApp === app,
29
+ href: currentApp === app ? "#" : undefined,
30
+ onClick: currentApp === app ? () => false : undefined,
29
31
  };
30
32
  if (app === "console") {
31
- element.href = `https://console.${decodedAudience}/${activeOrg?.uuid}`;
33
+ if (currentApp !== "console")
34
+ element.href = `https://console.${decodedAudience}/org/${activeOrg?.uuid}`;
32
35
  }
33
36
  else if (app === "modeler") {
34
- const hasPermission = activeOrg?.permissions.org.webide.read;
35
- if (hasPermission) {
36
- element.href = `https://modeler.${decodedAudience}/org/${activeOrg?.uuid}`;
37
+ const hasPermission = activeOrg?.permissions?.org?.webide?.read;
38
+ if (hasPermission && currentApp !== "modeler") {
39
+ element.href = `https://modeler.${decodedAudience}/login?returnUrl=/org/${activeOrg?.uuid}`;
37
40
  }
38
41
  }
39
42
  else {
40
- const hasAppReadPermission = activeOrg?.permissions.cluster[app]?.read;
43
+ const hasAppReadPermission = activeOrg?.permissions?.cluster?.[app]?.read;
41
44
  const clustersToRender = clusters?.filter(({ status, urls }) => status[app] === "Healthy" && urls[app] && hasAppReadPermission);
42
45
  if (clustersToRender?.length === 1) {
43
- element.href = clustersToRender?.[0].urls[app];
46
+ if (currentApp !== app)
47
+ element.href = clustersToRender?.[0].urls[app];
44
48
  }
45
49
  else if (clustersToRender && clustersToRender.length > 1) {
50
+ element.onClick = undefined;
46
51
  element.subElements = clustersToRender.map((cluster, index) => ({
47
52
  key: `${app}-${cluster.uuid}-${index}`,
48
53
  label: cluster.name,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/camunda-cloud/camunda-composite-components.git"
6
6
  },
7
- "version": "0.4.2-rc.1",
7
+ "version": "0.4.2-rc.3",
8
8
  "scripts": {
9
9
  "clean": "rimraf lib/",
10
10
  "build": "yarn clean && tsc",
@@ -39,16 +39,16 @@
39
39
  "@playwright/test": "1.41.2",
40
40
  "@semantic-release/changelog": "6.0.3",
41
41
  "@semantic-release/git": "10.0.1",
42
- "@storybook/addon-a11y": "7.6.11",
43
- "@storybook/addon-actions": "7.6.11",
44
- "@storybook/addon-docs": "7.6.11",
45
- "@storybook/addon-essentials": "7.6.11",
46
- "@storybook/addon-interactions": "7.6.11",
47
- "@storybook/addon-links": "7.6.11",
48
- "@storybook/blocks": "7.6.11",
42
+ "@storybook/addon-a11y": "7.6.12",
43
+ "@storybook/addon-actions": "7.6.12",
44
+ "@storybook/addon-docs": "7.6.12",
45
+ "@storybook/addon-essentials": "7.6.12",
46
+ "@storybook/addon-interactions": "7.6.12",
47
+ "@storybook/addon-links": "7.6.12",
48
+ "@storybook/blocks": "7.6.12",
49
49
  "@storybook/preset-scss": "1.0.3",
50
- "@storybook/react": "7.6.11",
51
- "@storybook/react-webpack5": "7.6.11",
50
+ "@storybook/react": "7.6.12",
51
+ "@storybook/react-webpack5": "7.6.12",
52
52
  "@storybook/test-runner": "0.16.0",
53
53
  "@storybook/testing-library": "0.2.2",
54
54
  "@types/carbon-components-react": "7.55.10",
@@ -84,7 +84,7 @@
84
84
  "sass-loader": "13.3.3",
85
85
  "semantic-release": "23.0.0",
86
86
  "serve": "14.2.1",
87
- "storybook": "7.6.11",
87
+ "storybook": "7.6.12",
88
88
  "style-loader": "3.3.4",
89
89
  "styled-components": "6.1.8",
90
90
  "typescript": "5.3.3",