@orchestrator-ui/orchestrator-ui-components 0.2.1 → 0.2.2

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.
Files changed (212) hide show
  1. package/.storybook/main.js +28 -0
  2. package/.storybook/preview.js +14 -0
  3. package/.turbo/turbo-build.log +11 -0
  4. package/.turbo/turbo-lint.log +10 -0
  5. package/.turbo/turbo-test.log +17 -0
  6. package/CHANGELOG.md +6 -0
  7. package/dist/index.d.ts +751 -0
  8. package/dist/index.js +7016 -0
  9. package/package.json +18 -4
  10. package/src/components/{Badges/Badge/Badge.stories.tsx → WFOBadges/WFOBadge/WFOBadge.stories.tsx} +4 -4
  11. package/src/components/{Badges/Badge/Badge.tsx → WFOBadges/WFOBadge/WFOBadge.tsx} +2 -2
  12. package/src/components/WFOBadges/WFOBadge/index.ts +1 -0
  13. package/src/components/{Badges/EngineStatusBadge/EngineStatusBadge.stories.tsx → WFOBadges/WFOEngineStatusBadge/WFOEngineStatusBadge.stories.tsx} +4 -4
  14. package/src/components/{Badges/EngineStatusBadge/EngineStatusBadge.tsx → WFOBadges/WFOEngineStatusBadge/WFOEngineStatusBadge.tsx} +6 -6
  15. package/src/components/WFOBadges/WFOEngineStatusBadge/index.ts +1 -0
  16. package/src/components/{Badges/EnvironmentBadge/EnvironmentBadge.stories.tsx → WFOBadges/WFOEnvironmentBadge/WFOEnvironmentBadge.stories.tsx} +4 -4
  17. package/src/components/{Badges/EnvironmentBadge/EnvironmentBadge.tsx → WFOBadges/WFOEnvironmentBadge/WFOEnvironmentBadge.tsx} +6 -6
  18. package/src/components/WFOBadges/WFOEnvironmentBadge/index.ts +1 -0
  19. package/src/components/WFOBadges/WFOFailedTasksBadge/WFOFailedTasksBadge.stories.tsx +12 -0
  20. package/src/components/{Badges/FailedTasksBadge/FailedTasksBadge.tsx → WFOBadges/WFOFailedTasksBadge/WFOFailedTasksBadge.tsx} +6 -6
  21. package/src/components/WFOBadges/WFOFailedTasksBadge/index.ts +1 -0
  22. package/src/components/{Badges/HeaderBadge/HeaderBadge.stories.tsx → WFOBadges/WFOHeaderBadge/WFOHeaderBadge.stories.tsx} +4 -4
  23. package/src/components/{Badges/HeaderBadge/HeaderBadge.tsx → WFOBadges/WFOHeaderBadge/WFOHeaderBadge.tsx} +4 -4
  24. package/src/components/WFOBadges/WFOHeaderBadge/index.ts +1 -0
  25. package/src/components/WFOBadges/WFOProcessStatusBadge/WFOProcessStatusBadge.tsx +71 -0
  26. package/src/components/WFOBadges/WFOProcessStatusBadge/index.ts +1 -0
  27. package/src/components/{Badges → WFOBadges}/WFOProductBlockBadge/WFOProductBlockBadge.stories.tsx +1 -1
  28. package/src/components/{Badges → WFOBadges}/WFOProductBlockBadge/WFOProductBlockBadge.tsx +3 -3
  29. package/src/components/{Badges → WFOBadges}/WFOStatusBadge/WFOStatusBadge.stories.tsx +1 -1
  30. package/src/components/{Badges → WFOBadges}/WFOStatusBadge/WFOStatusBadge.tsx +3 -3
  31. package/src/components/WFOBadges/index.ts +8 -0
  32. package/src/components/{Breadcrumbs/Breadcrumbs.tsx → WFOBreadcrumbs/WFOBreadcrumbs.tsx} +1 -1
  33. package/src/components/WFOBreadcrumbs/index.ts +1 -0
  34. package/src/components/WFOFilterTabs/WFOFilterTabs.tsx +43 -0
  35. package/src/components/WFOFilterTabs/index.ts +1 -0
  36. package/src/components/WFOLoading/WFOLoading.tsx +2 -0
  37. package/src/components/WFOLoading/index.ts +1 -0
  38. package/src/components/{OrchestratorPageTemplate/OrchestratorPageHeader/OrchestratorPageHeader.stories.tsx → WFOPageTemplate/WFOPageHeader/WFOPageHeader.stories.tsx} +5 -14
  39. package/src/components/{OrchestratorPageTemplate/OrchestratorPageHeader/OrchestratorPageHeader.tsx → WFOPageTemplate/WFOPageHeader/WFOPageHeader.tsx} +10 -10
  40. package/src/components/WFOPageTemplate/WFOPageHeader/index.ts +1 -0
  41. package/src/components/WFOPageTemplate/WFOPageTemplate/WFOPageTemplate.stories.tsx +24 -0
  42. package/src/components/{OrchestratorPageTemplate/OrchestratorPageTemplate/OrchestratorPageTemplate.tsx → WFOPageTemplate/WFOPageTemplate/WFOPageTemplate.tsx} +6 -6
  43. package/src/components/WFOPageTemplate/WFOPageTemplate/index.ts +1 -0
  44. package/src/components/{OrchestratorPageTemplate/OrchestratorSidebar/OrchestratorSidebar.stories.tsx → WFOPageTemplate/WFOSidebar/WFOSidebar.stories.tsx} +4 -4
  45. package/src/components/{OrchestratorPageTemplate/OrchestratorSidebar/OrchestratorSidebar.tsx → WFOPageTemplate/WFOSidebar/WFOSidebar.tsx} +2 -14
  46. package/src/components/WFOPageTemplate/WFOSidebar/index.ts +1 -0
  47. package/src/components/WFOPageTemplate/index.ts +3 -0
  48. package/src/components/{SearchBar/SearchField.tsx → WFOSearchBar/WFOSearchField.tsx} +3 -3
  49. package/src/components/WFOSearchBar/index.ts +1 -0
  50. package/src/components/WFOSettingsModal/index.tsx +1 -0
  51. package/src/components/{SettingsPage/EngineStatusButton.tsx → WFOSettingsPage/WFOEngineStatusButton.tsx} +2 -2
  52. package/src/components/{SettingsPage/FlushSettings.tsx → WFOSettingsPage/WFOFlushSettings.tsx} +1 -1
  53. package/src/components/{SettingsPage/ModifySettings.tsx → WFOSettingsPage/WFOModifySettings.tsx} +4 -4
  54. package/src/components/{SettingsPage/Settings.tsx → WFOSettingsPage/WFOSettings.tsx} +7 -7
  55. package/src/components/{SettingsPage/Status.tsx → WFOSettingsPage/WFOStatus.tsx} +4 -4
  56. package/src/components/WFOSettingsPage/index.ts +1 -0
  57. package/src/components/{StartPage/FrequentlyUsed.stories.tsx → WFOStartPage/WFOFrequentlyUsed.stories.tsx} +4 -4
  58. package/src/components/{StartPage/FrequentlyUsed.tsx → WFOStartPage/WFOFrequentlyUsed.tsx} +2 -2
  59. package/src/components/{StartPage/ListItemStartPage.stories.tsx → WFOStartPage/WFOListItemStartPage.stories.tsx} +4 -4
  60. package/src/components/{StartPage/ListItemStartPage.tsx → WFOStartPage/WFOListItemStartPage.tsx} +10 -7
  61. package/src/components/{StartPage/ListStartPage.stories.tsx → WFOStartPage/WFOListStartPage.stories.tsx} +4 -4
  62. package/src/components/{StartPage/ListStartPage.tsx → WFOStartPage/WFOListStartPage.tsx} +9 -4
  63. package/src/components/{StartPage/MultiListSection.stories.tsx → WFOStartPage/WFOMultiListSection.stories.tsx} +4 -4
  64. package/src/components/{StartPage/MultiListSection.tsx → WFOStartPage/WFOMultiListSection.tsx} +5 -5
  65. package/src/components/WFOStartPage/WFONewProcessPanel.stories.tsx +12 -0
  66. package/src/components/{StartPage/NewProcessPanel.tsx → WFOStartPage/WFONewProcessPanel.tsx} +3 -3
  67. package/src/components/WFOStartPage/WFOStatCards.stories.tsx +12 -0
  68. package/src/components/{StartPage/StatCards.tsx → WFOStartPage/WFOStatCards.tsx} +1 -1
  69. package/src/components/WFOStartPage/index.ts +6 -0
  70. package/src/components/{Subscription/FixedInputBlock.tsx → WFOSubscription/WFOFixedInputBlock.tsx} +2 -2
  71. package/src/components/{Subscription/ProcessesTimeline.tsx → WFOSubscription/WFOProcessesTimeline.tsx} +4 -4
  72. package/src/components/{Subscription/ProductBlock.tsx → WFOSubscription/WFOProductBlock.tsx} +4 -1
  73. package/src/components/{Subscription/SubscriptionActions.tsx → WFOSubscription/WFOSubscriptionActions.tsx} +1 -1
  74. package/src/components/{Subscription/SubscriptionBlock.tsx → WFOSubscription/WFOSubscriptionBlock.tsx} +5 -5
  75. package/src/components/{Subscription/SubscriptionDetailTree.tsx → WFOSubscription/WFOSubscriptionDetailTree.tsx} +5 -5
  76. package/src/components/{Subscription/SubscriptionGeneral.tsx → WFOSubscription/WFOSubscriptionGeneral.tsx} +9 -6
  77. package/src/components/WFOSubscription/index.ts +7 -0
  78. package/src/components/{Table/DataGridTable/DataGridTable.stories.tsx → WFOTable/WFODataGridTable/WFODataGridTable.stories.tsx} +6 -6
  79. package/src/components/{Table/DataGridTable/DataGridTable.tsx → WFOTable/WFODataGridTable/WFODataGridTable.tsx} +13 -13
  80. package/src/components/{Table/DataGridTable/dataGridColumns.spec.ts → WFOTable/WFODataGridTable/WFOdataGridColumns.spec.ts} +6 -6
  81. package/src/components/{Table/DataGridTable/dataGridColumns.ts → WFOTable/WFODataGridTable/WFOdataGridColumns.ts} +6 -6
  82. package/src/components/{Table/SortDirectionIcon.tsx → WFOTable/WFOSortDirectionIcon.tsx} +6 -6
  83. package/src/components/{Table/Table.tsx → WFOTable/WFOTable.tsx} +13 -13
  84. package/src/components/{Table/TableHeaderCell.tsx → WFOTable/WFOTableHeaderCell.tsx} +4 -4
  85. package/src/components/{Table/TableSettingsModal/TableSettingsModal.tsx → WFOTable/WFOTableSettingsModal/WFOTableSettingsModal.tsx} +1 -1
  86. package/src/components/WFOTable/WFOTableSettingsModal/index.ts +1 -0
  87. package/src/components/{Table/TableWithFilter/TableWithFilter.tsx → WFOTable/WFOTableWithFilter/WFOTableWithFilter.tsx} +31 -24
  88. package/src/components/WFOTable/WFOTableWithFilter/index.ts +1 -0
  89. package/src/components/WFOTable/index.ts +14 -0
  90. package/src/components/{Table → WFOTable}/utils/columns.ts +10 -10
  91. package/src/components/WFOTable/utils/constants.ts +15 -0
  92. package/src/components/{Tree/Tree.tsx → WFOTree/WFOTree.tsx} +4 -4
  93. package/src/components/{Tree/TreeBranch.tsx → WFOTree/WFOTreeBranch.tsx} +9 -5
  94. package/src/components/{Tree/TreeNode.tsx → WFOTree/WFOTreeNode.tsx} +6 -2
  95. package/src/components/index.ts +11 -11
  96. package/src/graphqlQueries/index.ts +2 -0
  97. package/src/graphqlQueries/processListQuery.ts +53 -0
  98. package/src/graphqlQueries/productBlocksQuery.ts +0 -5
  99. package/src/graphqlQueries/productsQuery.ts +47 -0
  100. package/src/graphqlQueries/resourceTypesQuery.ts +35 -0
  101. package/src/graphqlQueries/workflowsQuery.ts +37 -0
  102. package/src/hooks/useProcessStatusCountsQuery.ts +1 -0
  103. package/src/hooks/useSubscriptionProcesses.ts +2 -1
  104. package/src/icons/{ArrowNarrowDown.tsx → WFOArrowNarrowDown.tsx} +2 -2
  105. package/src/icons/{ArrowNarrowUp.tsx → WFOArrowNarrowUp.tsx} +2 -2
  106. package/src/icons/WFOCheckmarkCircleFill.stories.tsx +12 -0
  107. package/src/icons/{CheckmarkCircleFill.tsx → WFOCheckmarkCircleFill.tsx} +2 -2
  108. package/src/icons/{ChevronDown.tsx → WFOChevronDown.tsx} +2 -2
  109. package/src/icons/{IconProps.ts → WFOIconProps.ts} +1 -1
  110. package/src/icons/WFOLogoutIcon.stories.tsx +12 -0
  111. package/src/icons/{LogoutIcon.tsx → WFOLogoutIcon.tsx} +2 -2
  112. package/src/icons/WFOMinusCircleOutline.stories.tsx +12 -0
  113. package/src/icons/{MinusCircleOutline.tsx → WFOMinusCircleOutline.tsx} +2 -2
  114. package/src/icons/WFOPlusCircleFill.stories.tsx +12 -0
  115. package/src/icons/{PlusCircleFill.tsx → WFOPlusCircleFill.tsx} +2 -2
  116. package/src/icons/WFOStatusDotIcon.stories.tsx +12 -0
  117. package/src/icons/{StatusDotIcon.tsx → WFOStatusDotIcon.tsx} +2 -2
  118. package/src/icons/WFOXCircleFill.stories.tsx +12 -0
  119. package/src/icons/{XCircleFill.tsx → WFOXCircleFill.tsx} +2 -2
  120. package/src/icons/index.ts +10 -10
  121. package/src/messages/en-US.json +34 -2
  122. package/src/messages/nl-NL.json +67 -3
  123. package/src/pages/index.ts +2 -0
  124. package/src/pages/metadata/WFOMetadataPageLayout.tsx +0 -5
  125. package/src/pages/metadata/WFOProductBlocksPage.tsx +13 -16
  126. package/src/pages/metadata/WFOProductsPage.tsx +169 -0
  127. package/src/pages/metadata/WFOResourceTypesPage.tsx +120 -0
  128. package/src/pages/metadata/WFOWorkflowsPage.tsx +251 -0
  129. package/src/pages/metadata/index.ts +3 -0
  130. package/src/pages/processes/WFOProcessListPage.tsx +204 -0
  131. package/src/pages/processes/WFOProcessesListSubscriptionsCell.tsx +28 -0
  132. package/src/pages/processes/getProcessListTabTypeFromString.ts +19 -0
  133. package/src/pages/processes/index.ts +4 -0
  134. package/src/pages/processes/tabConfig.ts +33 -0
  135. package/src/pages/processes/tableConfig.ts +22 -0
  136. package/src/pages/subscriptions/index.ts +2 -0
  137. package/src/pages/subscriptions/subscriptionListTabs.ts +71 -0
  138. package/src/pages/subscriptions/types.ts +13 -0
  139. package/src/stories/Button.jsx +54 -0
  140. package/src/stories/Button.stories.js +45 -0
  141. package/src/stories/Configure.mdx +446 -0
  142. package/src/stories/Header.jsx +59 -0
  143. package/src/stories/Header.stories.js +23 -0
  144. package/src/stories/Page.jsx +68 -0
  145. package/src/stories/Page.stories.js +24 -0
  146. package/src/stories/assets/accessibility.png +0 -0
  147. package/src/stories/assets/accessibility.svg +5 -0
  148. package/src/stories/assets/addon-library.png +0 -0
  149. package/src/stories/assets/assets.png +0 -0
  150. package/src/stories/assets/context.png +0 -0
  151. package/src/stories/assets/discord.svg +15 -0
  152. package/src/stories/assets/docs.png +0 -0
  153. package/src/stories/assets/figma-plugin.png +0 -0
  154. package/src/stories/assets/github.svg +3 -0
  155. package/src/stories/assets/share.png +0 -0
  156. package/src/stories/assets/styling.png +0 -0
  157. package/src/stories/assets/testing.png +0 -0
  158. package/src/stories/assets/theming.png +0 -0
  159. package/src/stories/assets/tutorials.svg +12 -0
  160. package/src/stories/assets/youtube.svg +4 -0
  161. package/src/stories/button.css +30 -0
  162. package/src/stories/header.css +32 -0
  163. package/src/stories/page.css +69 -0
  164. package/src/types.ts +60 -11
  165. package/tsconfig.json +2 -4
  166. package/src/components/Badges/Badge/index.ts +0 -1
  167. package/src/components/Badges/EngineStatusBadge/index.ts +0 -1
  168. package/src/components/Badges/EnvironmentBadge/index.ts +0 -1
  169. package/src/components/Badges/FailedTasksBadge/FailedTasksBadge.stories.tsx +0 -12
  170. package/src/components/Badges/FailedTasksBadge/index.ts +0 -1
  171. package/src/components/Badges/HeaderBadge/index.ts +0 -1
  172. package/src/components/Badges/ProcessStatusBadge/ProcessStatusBadge.tsx +0 -46
  173. package/src/components/Badges/ProcessStatusBadge/index.ts +0 -1
  174. package/src/components/Badges/index.ts +0 -8
  175. package/src/components/Breadcrumbs/index.ts +0 -1
  176. package/src/components/Loading/Loading.tsx +0 -2
  177. package/src/components/Loading/index.ts +0 -1
  178. package/src/components/OrchestratorPageTemplate/OrchestratorPageHeader/index.ts +0 -1
  179. package/src/components/OrchestratorPageTemplate/OrchestratorPageTemplate/OrchestratorPageTemplate.stories.tsx +0 -33
  180. package/src/components/OrchestratorPageTemplate/OrchestratorPageTemplate/index.ts +0 -1
  181. package/src/components/OrchestratorPageTemplate/OrchestratorSidebar/index.ts +0 -1
  182. package/src/components/OrchestratorPageTemplate/index.ts +0 -3
  183. package/src/components/SearchBar/index.ts +0 -1
  184. package/src/components/SettingsModal/index.tsx +0 -1
  185. package/src/components/SettingsPage/index.ts +0 -1
  186. package/src/components/StartPage/NewProcessPanel.stories.tsx +0 -12
  187. package/src/components/StartPage/StatCards.stories.tsx +0 -12
  188. package/src/components/StartPage/index.ts +0 -6
  189. package/src/components/Subscription/index.ts +0 -7
  190. package/src/components/SubscriptionsTabs/SubscriptionsTabs.tsx +0 -90
  191. package/src/components/SubscriptionsTabs/getSubscriptionsTabTypeFromString.spec.ts +0 -34
  192. package/src/components/SubscriptionsTabs/getSubscriptionsTabTypeFromString.ts +0 -23
  193. package/src/components/SubscriptionsTabs/index.ts +0 -2
  194. package/src/components/Table/TableSettingsModal/index.ts +0 -1
  195. package/src/components/Table/TableWithFilter/index.ts +0 -1
  196. package/src/components/Table/index.ts +0 -14
  197. package/src/components/Table/utils/constants.ts +0 -5
  198. package/src/icons/CheckmarkCircleFill.stories.tsx +0 -12
  199. package/src/icons/LogoutIcon.stories.tsx +0 -12
  200. package/src/icons/MinusCircleOutline.stories.tsx +0 -12
  201. package/src/icons/PlusCircleFill.stories.tsx +0 -12
  202. package/src/icons/StatusDotIcon.stories.tsx +0 -12
  203. package/src/icons/XCircleFill.stories.tsx +0 -12
  204. /package/src/components/{Badges → WFOBadges}/WFOProductBlockBadge/index.ts +0 -0
  205. /package/src/components/{Badges → WFOBadges}/WFOStatusBadge/index.ts +0 -0
  206. /package/src/components/{SettingsModal/SettingsModal.tsx → WFOSettingsModal/WFOSettingsModal.tsx} +0 -0
  207. /package/src/components/{Subscription → WFOSubscription}/styles.ts +0 -0
  208. /package/src/components/{Table → WFOTable}/utils/columns.spec.ts +0 -0
  209. /package/src/components/{Table → WFOTable}/utils/tableConfigPersistence.spec.ts +0 -0
  210. /package/src/components/{Table → WFOTable}/utils/tableConfigPersistence.ts +0 -0
  211. /package/src/components/{Table → WFOTable}/utils/tableUtils.spec.ts +0 -0
  212. /package/src/components/{Table → WFOTable}/utils/tableUtils.ts +0 -0
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "test": "jest",
7
7
  "build": "tsup src/index.ts --format esm --dts",
8
8
  "tsc": "tsc --noEmit",
9
9
  "lint": "eslint \"src/**/*.ts*\"",
10
- "dev": "yarn build -- --watch"
10
+ "dev": "yarn build -- --watch",
11
+ "storybook": "storybook dev -p 6006",
12
+ "build-storybook": "storybook build"
11
13
  },
12
14
  "dependencies": {
13
15
  "@graphql-typed-document-node/core": "3.2.0",
@@ -26,8 +28,16 @@
26
28
  "react-query": "3.39.3"
27
29
  },
28
30
  "devDependencies": {
29
- "tsup": "^7.1.0",
30
31
  "@orchestrator-ui/eslint-config-custom": "*",
32
+ "@orchestrator-ui/jest-config": "*",
33
+ "@storybook/addon-essentials": "^7.2.1",
34
+ "@storybook/addon-interactions": "^7.2.1",
35
+ "@storybook/addon-links": "^7.2.1",
36
+ "@storybook/addon-onboarding": "^1.0.8",
37
+ "@storybook/blocks": "^7.2.1",
38
+ "@storybook/nextjs": "^7.2.1",
39
+ "@storybook/react": "^7.2.1",
40
+ "@storybook/testing-library": "^0.2.0",
31
41
  "@testing-library/jest-dom": "^5.16.1",
32
42
  "@testing-library/react": "^14.0.0",
33
43
  "@testing-library/react-hooks": "^8.0.1",
@@ -37,9 +47,13 @@
37
47
  "esbuild-jest": "^0.5.0",
38
48
  "jest": "^27.4.7",
39
49
  "jest-watch-typeahead": "^1.0.0",
40
- "@orchestrator-ui/jest-config": "*"
50
+ "react": "^18.2.0",
51
+ "react-dom": "^18.2.0",
52
+ "storybook": "^7.2.1",
53
+ "tsup": "^7.1.0"
41
54
  },
42
55
  "type": "module",
43
56
  "main": "./dist/index.js",
57
+ "browser": "./dist/index.js",
44
58
  "types": "./dist/index.d.ts"
45
59
  }
@@ -1,9 +1,9 @@
1
1
  import type { Meta } from '@storybook/react';
2
- import { Badge } from './Badge';
2
+ import { WFOBadge } from './WFOBadge';
3
3
 
4
- const Story: Meta<typeof Badge> = {
5
- component: Badge,
6
- title: 'Badges/Badge',
4
+ const Story: Meta<typeof WFOBadge> = {
5
+ component: WFOBadge,
6
+ title: 'Badges/WFOBadge',
7
7
  };
8
8
  export default Story;
9
9
 
@@ -3,12 +3,12 @@ import { EuiBadge, EuiBadgeProps, EuiText } from '@elastic/eui';
3
3
  import { FC, ReactNode } from 'react';
4
4
  import { TextColor } from '@elastic/eui/src/components/text/text_color';
5
5
 
6
- export type BadgeProps = EuiBadgeProps & {
6
+ export type WFOBadgeProps = EuiBadgeProps & {
7
7
  textColor: TextColor | string;
8
8
  children: ReactNode;
9
9
  };
10
10
 
11
- export const Badge: FC<BadgeProps> = ({
11
+ export const WFOBadge: FC<WFOBadgeProps> = ({
12
12
  textColor,
13
13
  children,
14
14
  ...restProps
@@ -0,0 +1 @@
1
+ export * from './WFOBadge';
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import type { Meta } from '@storybook/react';
3
- import { EngineStatusBadge } from './EngineStatusBadge';
3
+ import { WFOEngineStatusBadge } from './WFOEngineStatusBadge';
4
4
 
5
- const Story: Meta<typeof EngineStatusBadge> = {
5
+ const Story: Meta<typeof WFOEngineStatusBadge> = {
6
6
  component: (args) => (
7
7
  <div style={{ display: 'flex' }}>
8
- <EngineStatusBadge {...args} />
8
+ <WFOEngineStatusBadge {...args} />
9
9
  </div>
10
10
  ),
11
- title: 'Badges/EngineStatusBadge',
11
+ title: 'Badges/WFOEngineStatusBadge',
12
12
  parameters: {
13
13
  mockData: [
14
14
  {
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { useOrchestratorTheme } from '../../../hooks/useOrchestratorTheme';
3
- import { HeaderBadge } from '../HeaderBadge';
3
+ import { WFOHeaderBadge } from '../WFOHeaderBadge';
4
4
  import { useEngineStatusQuery } from '../../../hooks/useEngineStatusQuery';
5
- import { StatusDotIcon } from '../../../icons/StatusDotIcon';
5
+ import { WFOStatusDotIcon } from '../../../icons/WFOStatusDotIcon';
6
6
 
7
- export const EngineStatusBadge = () => {
7
+ export const WFOEngineStatusBadge = () => {
8
8
  const { theme } = useOrchestratorTheme();
9
9
  const { data: engineStatus } = useEngineStatusQuery();
10
10
 
@@ -13,12 +13,12 @@ export const EngineStatusBadge = () => {
13
13
  : 'Engine status is unavailable';
14
14
 
15
15
  return (
16
- <HeaderBadge
16
+ <WFOHeaderBadge
17
17
  color={theme.colors.emptyShade}
18
18
  textColor={theme.colors.shadow}
19
- iconType={() => <StatusDotIcon color={theme.colors.success} />}
19
+ iconType={() => <WFOStatusDotIcon color={theme.colors.success} />}
20
20
  >
21
21
  {engineStatusText}
22
- </HeaderBadge>
22
+ </WFOHeaderBadge>
23
23
  );
24
24
  };
@@ -0,0 +1 @@
1
+ export * from './WFOEngineStatusBadge';
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import type { Meta } from '@storybook/react';
3
- import { EnvironmentBadge } from './EnvironmentBadge';
3
+ import { WFOEnvironmentBadge } from './WFOEnvironmentBadge';
4
4
 
5
- const Story: Meta<typeof EnvironmentBadge> = {
5
+ const Story: Meta<typeof WFOEnvironmentBadge> = {
6
6
  component: (args) => (
7
7
  <div style={{ display: 'flex' }}>
8
- <EnvironmentBadge {...args} />
8
+ <WFOEnvironmentBadge {...args} />
9
9
  </div>
10
10
  ),
11
- title: 'Badges/EnvironmentBadge',
11
+ title: 'Badges/WFOEnvironmentBadge',
12
12
  };
13
13
  export default Story;
14
14
 
@@ -1,27 +1,27 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { useOrchestratorTheme } from '../../../hooks/useOrchestratorTheme';
3
- import { HeaderBadge } from '../HeaderBadge/HeaderBadge';
3
+ import { WFOHeaderBadge } from '../WFOHeaderBadge/WFOHeaderBadge';
4
4
  import { OrchestratorConfigContext } from '../../../contexts/OrchestratorConfigContext';
5
5
  import { Environment } from '../../../hooks/useOrchestratorConfig';
6
6
 
7
- export const EnvironmentBadge = () => {
7
+ export const WFOEnvironmentBadge = () => {
8
8
  const { environmentName } = useContext(OrchestratorConfigContext);
9
9
  const { theme, toSecondaryColor } = useOrchestratorTheme();
10
10
 
11
11
  if (environmentName !== Environment.PRODUCTION) {
12
12
  return (
13
- <HeaderBadge color="warning" textColor={theme.colors.shadow}>
13
+ <WFOHeaderBadge color="warning" textColor={theme.colors.shadow}>
14
14
  {environmentName}
15
- </HeaderBadge>
15
+ </WFOHeaderBadge>
16
16
  );
17
17
  }
18
18
 
19
19
  return (
20
- <HeaderBadge
20
+ <WFOHeaderBadge
21
21
  color={toSecondaryColor(theme.colors.primary)}
22
22
  textColor={theme.colors.primary}
23
23
  >
24
24
  {environmentName}
25
- </HeaderBadge>
25
+ </WFOHeaderBadge>
26
26
  );
27
27
  };
@@ -0,0 +1 @@
1
+ export * from './WFOEnvironmentBadge';
@@ -0,0 +1,12 @@
1
+ import type { Meta } from '@storybook/react';
2
+ import { WFOFailedTasksBadge } from './WFOFailedTasksBadge';
3
+
4
+ const Story: Meta<typeof WFOFailedTasksBadge> = {
5
+ component: WFOFailedTasksBadge,
6
+ title: 'Badges/WFOFailedTasksBadge',
7
+ };
8
+ export default Story;
9
+
10
+ export const Primary = {
11
+ args: {},
12
+ };
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { EuiToolTip } from '@elastic/eui';
3
3
  import { useOrchestratorTheme } from '../../../hooks/useOrchestratorTheme';
4
- import { HeaderBadge } from '../HeaderBadge';
5
- import { XCircleFill } from '../../../icons/XCircleFill';
4
+ import { WFOHeaderBadge } from '../WFOHeaderBadge';
5
+ import { WFOXCircleFill } from '../../../icons/WFOXCircleFill';
6
6
  import {
7
7
  ProcessStatusCounts,
8
8
  useProcessStatusCountsQuery,
@@ -31,7 +31,7 @@ const getTaskCountsSummary = (
31
31
  };
32
32
  };
33
33
 
34
- export const FailedTasksBadge = () => {
34
+ export const WFOFailedTasksBadge = () => {
35
35
  const { theme } = useOrchestratorTheme();
36
36
  const { data: processStatusCounts } = useProcessStatusCountsQuery();
37
37
  const taskCountsSummary = getTaskCountsSummary(processStatusCounts);
@@ -51,13 +51,13 @@ export const FailedTasksBadge = () => {
51
51
  </>
52
52
  }
53
53
  >
54
- <HeaderBadge
54
+ <WFOHeaderBadge
55
55
  color={theme.colors.emptyShade}
56
56
  textColor={theme.colors.shadow}
57
- iconType={() => <XCircleFill color={theme.colors.danger} />}
57
+ iconType={() => <WFOXCircleFill color={theme.colors.danger} />}
58
58
  >
59
59
  {taskCountsSummary.total}
60
- </HeaderBadge>
60
+ </WFOHeaderBadge>
61
61
  </EuiToolTip>
62
62
  );
63
63
  };
@@ -0,0 +1 @@
1
+ export * from './WFOFailedTasksBadge';
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import type { Meta } from '@storybook/react';
3
- import { HeaderBadge } from './HeaderBadge';
3
+ import { WFOHeaderBadge } from './WFOHeaderBadge';
4
4
 
5
- const Story: Meta<typeof HeaderBadge> = {
5
+ const Story: Meta<typeof WFOHeaderBadge> = {
6
6
  component: (args) => (
7
7
  <div style={{ display: 'flex' }}>
8
- <HeaderBadge {...args} />
8
+ <WFOHeaderBadge {...args} />
9
9
  </div>
10
10
  ),
11
- title: 'Badges/HeaderBadge',
11
+ title: 'Badges/WFOHeaderBadge',
12
12
  };
13
13
  export default Story;
14
14
 
@@ -1,6 +1,6 @@
1
1
  import React, { FC, ReactNode } from 'react';
2
2
  import { EuiBadgeProps } from '@elastic/eui';
3
- import { Badge } from '../Badge/Badge';
3
+ import { WFOBadge } from '../WFOBadge/WFOBadge';
4
4
  import { TextColor } from '@elastic/eui/src/components/text/text_color';
5
5
 
6
6
  export type HeaderBadgeProps = EuiBadgeProps & {
@@ -8,7 +8,7 @@ export type HeaderBadgeProps = EuiBadgeProps & {
8
8
  children: ReactNode;
9
9
  };
10
10
 
11
- export const HeaderBadge: FC<HeaderBadgeProps> = ({
11
+ export const WFOHeaderBadge: FC<HeaderBadgeProps> = ({
12
12
  children,
13
13
  ...restProps
14
14
  }) => {
@@ -24,8 +24,8 @@ export const HeaderBadge: FC<HeaderBadgeProps> = ({
24
24
  };
25
25
 
26
26
  return (
27
- <Badge {...restProps} css={css}>
27
+ <WFOBadge {...restProps} css={css}>
28
28
  {children}
29
- </Badge>
29
+ </WFOBadge>
30
30
  );
31
31
  };
@@ -0,0 +1 @@
1
+ export * from './WFOHeaderBadge';
@@ -0,0 +1,71 @@
1
+ import React, { FC } from 'react';
2
+ import { ProcessStatus, useOrchestratorTheme } from '../../../hooks';
3
+ import { WFOBadge } from '../WFOBadge';
4
+
5
+ export type WFOProcessStatusBadgeProps = {
6
+ processStatus: ProcessStatus;
7
+ };
8
+
9
+ export const WFOProcessStatusBadge: FC<WFOProcessStatusBadgeProps> = ({
10
+ processStatus,
11
+ }) => {
12
+ const { theme, toSecondaryColor } = useOrchestratorTheme();
13
+
14
+ const getBadgeColorFromProcessStatus = (status: ProcessStatus) => {
15
+ const {
16
+ primary,
17
+ danger,
18
+ dangerText,
19
+ lightShade,
20
+ primaryText,
21
+ success,
22
+ successText,
23
+ text,
24
+ warning,
25
+ warningText,
26
+ } = theme.colors;
27
+
28
+ switch (status.toLowerCase()) {
29
+ case ProcessStatus.COMPLETED:
30
+ return {
31
+ badgeColor: toSecondaryColor(success),
32
+ textColor: successText,
33
+ };
34
+ case ProcessStatus.FAILED:
35
+ case ProcessStatus.ABORTED:
36
+ return {
37
+ badgeColor: toSecondaryColor(danger),
38
+ textColor: dangerText,
39
+ };
40
+ case ProcessStatus.SUSPENDED:
41
+ return {
42
+ badgeColor: toSecondaryColor(warning),
43
+ textColor: warningText,
44
+ };
45
+ case ProcessStatus.CREATED:
46
+ return {
47
+ badgeColor: lightShade,
48
+ textColor: text,
49
+ };
50
+ case ProcessStatus.WAITING:
51
+ case ProcessStatus.RESUMED:
52
+ case ProcessStatus.RUNNING:
53
+ case ProcessStatus.API_UNAVAILABLE:
54
+ case ProcessStatus.INCONSISTENT_DATA:
55
+ default:
56
+ return {
57
+ badgeColor: toSecondaryColor(primary),
58
+ textColor: primaryText,
59
+ };
60
+ }
61
+ };
62
+
63
+ const { badgeColor, textColor } =
64
+ getBadgeColorFromProcessStatus(processStatus);
65
+
66
+ return (
67
+ <WFOBadge textColor={textColor} color={badgeColor}>
68
+ {processStatus.toLowerCase()}
69
+ </WFOBadge>
70
+ );
71
+ };
@@ -0,0 +1 @@
1
+ export * from './WFOProcessStatusBadge';
@@ -3,7 +3,7 @@ import { WFOProductBlockBadge } from './WFOProductBlockBadge';
3
3
 
4
4
  const Story: Meta<typeof WFOProductBlockBadge> = {
5
5
  component: WFOProductBlockBadge,
6
- title: 'Badges/ProductBlockBadge',
6
+ title: 'Badges/WFOProductBlockBadge',
7
7
  };
8
8
 
9
9
  export default Story;
@@ -1,4 +1,4 @@
1
- import { Badge } from '../Badge';
1
+ import { WFOBadge } from '../WFOBadge';
2
2
  import React, { FC } from 'react';
3
3
  import { useOrchestratorTheme } from '../../../hooks';
4
4
 
@@ -12,11 +12,11 @@ export const WFOProductBlockBadge: FC<WFOProductBlockBadgeProps> = ({
12
12
  const { theme, toSecondaryColor } = useOrchestratorTheme();
13
13
 
14
14
  return (
15
- <Badge
15
+ <WFOBadge
16
16
  textColor={theme.colors.link}
17
17
  color={toSecondaryColor(theme.colors.primary)}
18
18
  >
19
19
  {children}
20
- </Badge>
20
+ </WFOBadge>
21
21
  );
22
22
  };
@@ -3,7 +3,7 @@ import { WFOStatusBadge } from './WFOStatusBadge';
3
3
 
4
4
  const Story: Meta<typeof WFOStatusBadge> = {
5
5
  component: WFOStatusBadge,
6
- title: 'Badges/StatusBadge',
6
+ title: 'Badges/WFOStatusBadge',
7
7
  };
8
8
  export default Story;
9
9
 
@@ -1,4 +1,4 @@
1
- import { Badge } from '../Badge';
1
+ import { WFOBadge } from '../WFOBadge';
2
2
  import React, { FC } from 'react';
3
3
  import { useOrchestratorTheme } from '../../../hooks';
4
4
 
@@ -42,8 +42,8 @@ export const WFOStatusBadge: FC<WFOStatusBadgeProps> = ({ status }) => {
42
42
  const { badgeColor, textColor } = getBadgeColorFromStatus(status);
43
43
 
44
44
  return (
45
- <Badge textColor={textColor} color={badgeColor}>
45
+ <WFOBadge textColor={textColor} color={badgeColor}>
46
46
  {status}
47
- </Badge>
47
+ </WFOBadge>
48
48
  );
49
49
  };
@@ -0,0 +1,8 @@
1
+ export * from './WFOBadge';
2
+ export * from './WFOStatusBadge';
3
+ export * from './WFOProductBlockBadge';
4
+ export * from './WFOProcessStatusBadge';
5
+ export * from './WFOFailedTasksBadge';
6
+ export * from './WFOEnvironmentBadge';
7
+ export * from './WFOEngineStatusBadge';
8
+ export * from './WFOHeaderBadge';
@@ -3,7 +3,7 @@ import { EuiBreadcrumb, EuiBreadcrumbs, EuiSpacer } from '@elastic/eui';
3
3
  import { useRouter } from 'next/router';
4
4
  import { isUuid4, removeSuffix, upperCaseFirstChar } from '../../utils';
5
5
 
6
- export const Breadcrumbs = () => {
6
+ export const WFOBreadcrumbs = () => {
7
7
  const router = useRouter();
8
8
  // Setup initial breadcrumbs with navigation to home
9
9
  const breadcrumbs: EuiBreadcrumb[] = [
@@ -0,0 +1 @@
1
+ export * from './WFOBreadcrumbs';
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { EuiTab, EuiTabs } from '@elastic/eui';
3
+ import { useTranslations } from 'next-intl';
4
+
5
+ export type FilterQuery<DataType> = {
6
+ field: keyof DataType;
7
+ value: string;
8
+ };
9
+
10
+ export type WFOFilterTab<TabType, DataType> = {
11
+ id: TabType;
12
+ translationKey: string;
13
+ alwaysOnFilters?: FilterQuery<DataType>[];
14
+ };
15
+
16
+ export type WFOFilterTabsProps<TabType, DataType> = {
17
+ tabs: WFOFilterTab<TabType, DataType>[];
18
+ selectedTab: TabType;
19
+ translationNamespace: string;
20
+ onChangeTab: (updatedTab: TabType) => void;
21
+ };
22
+
23
+ export const WFOFilterTabs = <TabType extends string, DataType>({
24
+ tabs,
25
+ selectedTab,
26
+ translationNamespace,
27
+ onChangeTab,
28
+ }: WFOFilterTabsProps<TabType, DataType>) => {
29
+ const t = useTranslations(translationNamespace);
30
+ return (
31
+ <EuiTabs>
32
+ {tabs.map(({ id, translationKey: name }) => (
33
+ <EuiTab
34
+ key={id}
35
+ isSelected={id === selectedTab}
36
+ onClick={() => id !== selectedTab && onChangeTab(id)}
37
+ >
38
+ {t(name)}
39
+ </EuiTab>
40
+ ))}
41
+ </EuiTabs>
42
+ );
43
+ };
@@ -0,0 +1 @@
1
+ export * from './WFOFilterTabs';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export const WFOLoading = () => <h1>Loading...</h1>;
@@ -0,0 +1 @@
1
+ export * from './WFOLoading';
@@ -1,27 +1,18 @@
1
1
  import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
2
2
  import type { Meta } from '@storybook/react';
3
3
  import React, { ReactElement } from 'react';
4
- import { OrchestratorPageHeader } from './OrchestratorPageHeader';
5
- import Logo from '../../../../../.storybook/mockdata/logo-orchestrator.svg';
6
- import Image from 'next/image';
4
+ import { WFOPageHeader } from './WFOPageHeader';
7
5
 
8
- const Story: Meta<typeof OrchestratorPageHeader> = {
9
- component: OrchestratorPageHeader,
10
- title: 'PageTemplate/OrchestratorPageHeader',
6
+ const Story: Meta<typeof WFOPageHeader> = {
7
+ component: WFOPageHeader,
8
+ title: 'PageTemplate/WFOPageHeader',
11
9
  };
12
10
  export default Story;
13
11
 
14
12
  function getAppLogo(navigationLogo: number): ReactElement {
15
13
  return (
16
14
  <EuiFlexGroup alignItems="center" css={{ height: navigationLogo }}>
17
- <EuiFlexItem>
18
- <Image
19
- src={Logo}
20
- alt="Orchestrator Logo"
21
- width={134}
22
- height={32}
23
- />
24
- </EuiFlexItem>
15
+ <EuiFlexItem>FLEX ITEM PLACEHOLDER</EuiFlexItem>
25
16
  </EuiFlexGroup>
26
17
  );
27
18
  }
@@ -8,19 +8,19 @@ import {
8
8
  EuiHeaderSectionItem,
9
9
  } from '@elastic/eui';
10
10
  import { useOrchestratorTheme } from '../../../hooks/useOrchestratorTheme';
11
- import { FailedTasksBadge } from '../../Badges/FailedTasksBadge';
12
- import { EngineStatusBadge } from '../../Badges/EngineStatusBadge';
13
- import { EnvironmentBadge } from '../../Badges/EnvironmentBadge';
14
- import { LogoutIcon } from '../../../icons/LogoutIcon';
11
+ import { WFOFailedTasksBadge } from '../../WFOBadges/WFOFailedTasksBadge';
12
+ import { WFOEngineStatusBadge } from '../../WFOBadges/WFOEngineStatusBadge';
13
+ import { WFOEnvironmentBadge } from '../../WFOBadges/WFOEnvironmentBadge';
14
+ import { WFOLogoutIcon } from '../../../icons/WFOLogoutIcon';
15
15
 
16
- export interface OrchestratorPageHeaderProps {
16
+ export interface WFOPageHeaderProps {
17
17
  // todo: should be part of theme!
18
18
  navigationHeight: number;
19
19
  getAppLogo: (navigationHeight: number) => ReactElement;
20
20
  handleLogoutClick: () => void;
21
21
  }
22
22
 
23
- export const OrchestratorPageHeader: FC<OrchestratorPageHeaderProps> = ({
23
+ export const WFOPageHeader: FC<WFOPageHeaderProps> = ({
24
24
  navigationHeight,
25
25
  getAppLogo,
26
26
  handleLogoutClick,
@@ -40,22 +40,22 @@ export const OrchestratorPageHeader: FC<OrchestratorPageHeaderProps> = ({
40
40
  />
41
41
  </EuiHeaderSectionItem>
42
42
  <EuiHeaderSectionItem>
43
- <EnvironmentBadge />
43
+ <WFOEnvironmentBadge />
44
44
  </EuiHeaderSectionItem>
45
45
  </EuiHeaderSection>
46
46
 
47
47
  <EuiHeaderSection>
48
48
  <EuiHeaderSectionItem>
49
49
  <EuiBadgeGroup css={{ marginRight: multiplyByBaseUnit(2) }}>
50
- <EngineStatusBadge />
51
- <FailedTasksBadge />
50
+ <WFOEngineStatusBadge />
51
+ <WFOFailedTasksBadge />
52
52
  </EuiBadgeGroup>
53
53
 
54
54
  <EuiButtonIcon
55
55
  aria-label="Logout"
56
56
  display="empty"
57
57
  iconType={() => (
58
- <LogoutIcon color={theme.colors.emptyShade} />
58
+ <WFOLogoutIcon color={theme.colors.emptyShade} />
59
59
  )}
60
60
  css={{ width: 48, height: 48 }}
61
61
  color="ghost"
@@ -0,0 +1 @@
1
+ export * from './WFOPageHeader';
@@ -0,0 +1,24 @@
1
+ import type { Meta } from '@storybook/react';
2
+ import { WFOPageTemplate } from './WFOPageTemplate';
3
+ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
4
+ import React, { ReactElement } from 'react';
5
+
6
+ const Story: Meta<typeof WFOPageTemplate> = {
7
+ component: WFOPageTemplate,
8
+ title: 'PageTemplate/WFOPageTemplate',
9
+ };
10
+ export default Story;
11
+
12
+ function getAppLogo(navigationLogo: number): ReactElement {
13
+ return (
14
+ <EuiFlexGroup alignItems="center" css={{ height: navigationLogo }}>
15
+ <EuiFlexItem>FLEX ITEM PLACEHOLDER</EuiFlexItem>
16
+ </EuiFlexGroup>
17
+ );
18
+ }
19
+
20
+ export const Default = {
21
+ args: {
22
+ getAppLogo,
23
+ },
24
+ };