@odigos/ui-kit 0.0.25 → 0.0.26
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/CHANGELOG.md +14 -0
- package/lib/components.js +8 -8
- package/lib/constants/strings/index.d.ts +8 -4
- package/lib/constants.js +3 -3
- package/lib/containers/data-flow-actions-menu/data-stream-select/index.d.ts +1 -1
- package/lib/containers/destination-modal/index.d.ts +0 -1
- package/lib/containers/destination-selection-form/index.d.ts +1 -2
- package/lib/containers/setup-summary/index.d.ts +1 -0
- package/lib/containers.js +145 -109
- package/lib/functions.js +4 -4
- package/lib/hooks.js +5 -5
- package/lib/icons.js +1 -1
- package/lib/{index-HOKGoci6.js → index-B6FywnIf.js} +10 -6
- package/lib/{index-BOkleuyi.js → index-BfatCMWq.js} +4 -4
- package/lib/{index-CTdoDQzG.js → index-ByO2rgKy.js} +2 -2
- package/lib/{index-C0N2DFBu.js → index-CFnxjzaW.js} +1 -1
- package/lib/{index-C2m4uddS.js → index-CJs4RDHU.js} +1 -1
- package/lib/{index-DE7A6Q_i.js → index-CWufhl9G.js} +3 -3
- package/lib/{index-CYUrArTm.js → index-C_LWKMnO.js} +4 -4
- package/lib/{index-CK8tITRA.js → index-DMXaEyAB.js} +27 -13
- package/lib/mock-data/sources/index.d.ts +1 -1
- package/lib/snippets.js +7 -7
- package/lib/store/useSetupStore.d.ts +4 -0
- package/lib/store.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/types/destinations/index.d.ts +1 -1
- package/lib/types/sources/index.d.ts +1 -1
- package/lib/{useSourceSelectionFormData-Bxm0NBIy.js → useSourceSelectionFormData-plxXIM0Q.js} +4 -4
- package/lib/{useTransition-DvT5YNul.js → useTransition-BPxqZqXu.js} +2 -2
- package/package.json +14 -14
package/lib/containers.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, memo, useContext, createContext, useCallback, useLayoutEffect, Fragment } from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
|
-
import { D as DISPLAY_TITLES, A as ACTION_OPTIONS, M as MONITORS_OPTIONS, B as BUTTON_TEXTS, I as INSTRUMENTATION_RULE_OPTIONS, F as FORM_ALERTS } from './index-
|
|
3
|
+
import { D as DISPLAY_TITLES, A as ACTION_OPTIONS, M as MONITORS_OPTIONS, B as BUTTON_TEXTS, I as INSTRUMENTATION_RULE_OPTIONS, F as FORM_ALERTS } from './index-B6FywnIf.js';
|
|
4
4
|
import { ActionType, EntityTypes, StatusType, Crud, OtherStatus, NodeTypes, AddNodeTypes, EdgeTypes, FieldTypes, SignalType, CodeAttributesKeyTypes, PayloadCollectionKeyTypes, InstrumentationRuleType } from './types.js';
|
|
5
|
-
import { f as DataCardFieldTypes, o as FieldLabel, C as Checkbox, n as FieldError, u as Input, w as InputTable, K as KeyValueInputsList, v as InputList, V as Text, O as Segment, L as SectionTitle, i as DocsButton, y as MonitorsCheckboxes, W as TextArea, j as Drawer, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a4 as ModalBody, a as AutocompleteInput, h as Divider, R as Status, $ as FlexRow, Y as Tooltip, r as IconWrapped, z as MonitorsIcons, a5 as TableContainer, a6 as TableTitleWrap, q as IconTitleBadge, a7 as TableWrap, x as InteractiveTable, a1 as CenterThis, G as NoDataFound, a0 as FlexColumn, Z as TraceLoader, b as Badge, E as ExtendArrow, a2 as VerticalScroll, P as SelectionButton, B as Button, m as Dropdown, a8 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, Q as SkeletonLoader, X as Toggle, A as AddButton$1, J as NotificationNote, U as Stepper, I as IconButton, e as DataCardFields, s as IconsNav, p as IconGroup } from './index-
|
|
6
|
-
import { h as usePendingStore, g as useNotificationStore, b as useDrawerStore, c as useEntityStore, f as useModalStore, d as useFilterStore, s as styleInject, i as useSelectedStore, e as useInstrumentStore, a as useDataStreamStore, k as getEntityId, j as useSetupStore, u as useDarkMode } from './index-
|
|
5
|
+
import { f as DataCardFieldTypes, o as FieldLabel, C as Checkbox, n as FieldError, u as Input, w as InputTable, K as KeyValueInputsList, v as InputList, V as Text, O as Segment, L as SectionTitle, i as DocsButton, y as MonitorsCheckboxes, W as TextArea, j as Drawer, d as ConditionDetails, D as DataCard, M as Modal, N as NavigationButtons, a4 as ModalBody, a as AutocompleteInput, h as Divider, R as Status, $ as FlexRow, Y as Tooltip, r as IconWrapped, z as MonitorsIcons, a5 as TableContainer, a6 as TableTitleWrap, q as IconTitleBadge, a7 as TableWrap, x as InteractiveTable, a1 as CenterThis, G as NoDataFound, a0 as FlexColumn, Z as TraceLoader, b as Badge, E as ExtendArrow, a2 as VerticalScroll, P as SelectionButton, B as Button, m as Dropdown, a8 as getDefaultExportFromCjs, F as FadeLoader, g as DataTab, Q as SkeletonLoader, X as Toggle, A as AddButton$1, J as NotificationNote, U as Stepper, I as IconButton, e as DataCardFields, s as IconsNav, p as IconGroup } from './index-C_LWKMnO.js';
|
|
6
|
+
import { h as usePendingStore, g as useNotificationStore, b as useDrawerStore, c as useEntityStore, f as useModalStore, d as useFilterStore, s as styleInject, i as useSelectedStore, e as useInstrumentStore, a as useDataStreamStore, k as getEntityId, j as useSetupStore, u as useDarkMode } from './index-DMXaEyAB.js';
|
|
7
7
|
import Theme from './theme.js';
|
|
8
8
|
import { i as isEmpty, s as safeJsonParse } from './index-BZS1ijMm.js';
|
|
9
9
|
import { i as CheckCircledIcon, O as OdigosLogo } from './index-IKusBlIE.js';
|
|
10
10
|
import { C as CrossCircledIcon, O as OdigosLogoText, a as OverviewIcon, F as FilterIcon, D as DataStreamsIcon, N as NotificationIcon, S as SlackLogo, K as KeyIcon, T as TerminalIcon } from './index-CamnKrev.js';
|
|
11
|
-
import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-
|
|
12
|
-
import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-
|
|
13
|
-
import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-
|
|
11
|
+
import { g as getActionIcon, a as getInstrumentationRuleIcon } from './index-CFnxjzaW.js';
|
|
12
|
+
import { u as useActionFormData, a as useClickNode, c as useDestinationFormData, b as useClickNotification, d as useSourceFormData, e as useSourceSelectionFormData } from './useSourceSelectionFormData-plxXIM0Q.js';
|
|
13
|
+
import { d as useKeyDown, e as useOnClickOutside, u as useContainerSize, c as useInstrumentationRuleFormData, g as useTransition, f as useTimeAgo, a as useCopy } from './useTransition-BPxqZqXu.js';
|
|
14
14
|
import { E as EditIcon } from './index-CWbxXTof.js';
|
|
15
15
|
import { T as TrashIcon, S as SearchIcon, P as PlusIcon$1, f as CheckIcon, A as ArrowIcon, a as CopyIcon, g as CrossIcon } from './index-BJxaoI0G.js';
|
|
16
|
-
import { D as DeleteWarning, C as CancelWarning } from './index-
|
|
17
|
-
import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-
|
|
18
|
-
import { f as filterActions, i as getConditionsBooleans, n as getEntityLabel, m as getEntityIcon, v as sleep$1, p as getPlatformIcon, q as getPlatformLabel, h as formatBytes, k as getContainersIcons, r as getValueForRange, l as getDestinationIcon, u as mapExportedSignals, g as filterSourcesByStream, e as filterSources, b as filterDestinationsByStream, a as filterDestinations, c as compareCondition, d as deepClone, o as getMetricForEntity, s as getWorkloadId, j as getContainersInstrumentedCount, t as isOverTime } from './index-
|
|
16
|
+
import { D as DeleteWarning, C as CancelWarning } from './index-ByO2rgKy.js';
|
|
17
|
+
import { m as mapConditions, b as getStatusIcon, c as capitalizeFirstLetter } from './index-CJs4RDHU.js';
|
|
18
|
+
import { f as filterActions, i as getConditionsBooleans, n as getEntityLabel, m as getEntityIcon, v as sleep$1, p as getPlatformIcon, q as getPlatformLabel, h as formatBytes, k as getContainersIcons, r as getValueForRange, l as getDestinationIcon, u as mapExportedSignals, g as filterSourcesByStream, e as filterSources, b as filterDestinationsByStream, a as filterDestinations, c as compareCondition, d as deepClone, o as getMetricForEntity, s as getWorkloadId, j as getContainersInstrumentedCount, t as isOverTime } from './index-BfatCMWq.js';
|
|
19
19
|
import { createPortal } from 'react-dom';
|
|
20
|
-
import { N as NoteBackToSummary, E as EditButton } from './index-
|
|
20
|
+
import { N as NoteBackToSummary, E as EditButton } from './index-CWufhl9G.js';
|
|
21
21
|
import { D as DESTINATION_CATEGORIES } from './index-Dqief9td.js';
|
|
22
22
|
import { a6 as RulesIcon, a7 as SourcesIcon, a3 as ActionsIcon, a4 as DestinationsIcon } from './index-BRW_Nl-n.js';
|
|
23
23
|
import './index-DGel4E-Z.js';
|
|
@@ -1051,7 +1051,7 @@ const ComputePlatformsActionsMenu = ({ connections }) => {
|
|
|
1051
1051
|
React.createElement(ConnectionStatusDropdown, { connections: connections, value: statuses, onSelect: (val) => setStatuses([...(statuses || []), val]), onDeselect: (val) => setStatuses((statuses || []).filter((opt) => opt.id !== val.id)), showSearch: true, required: true, isMulti: true })))));
|
|
1052
1052
|
};
|
|
1053
1053
|
|
|
1054
|
-
var css_248z = "/* this gets exported as style.css and can be used for the default theming */\n/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */\n.react-flow {\n direction: ltr;\n\n --xy-edge-stroke-default: #b1b1b7;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #555;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);\n\n --xy-minimap-background-color-default: #fff;\n --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #e2e2e2;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: transparent;\n --xy-background-pattern-dots-color-default: #91919a;\n --xy-background-pattern-lines-color-default: #eee;\n --xy-background-pattern-cross-color-default: #e2e2e2;\n background-color: var(--xy-background-color, var(--xy-background-color-default));\n --xy-node-color-default: inherit;\n --xy-node-border-default: 1px solid #1a192b;\n --xy-node-background-color-default: #fff;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;\n --xy-node-border-radius-default: 3px;\n\n --xy-handle-background-color-default: #1a192b;\n --xy-handle-border-color-default: #fff;\n\n --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);\n\n --xy-controls-button-background-color-default: #fefefe;\n --xy-controls-button-background-color-hover-default: #f4f4f4;\n --xy-controls-button-color-default: inherit;\n --xy-controls-button-color-hover-default: inherit;\n --xy-controls-button-border-color-default: #eee;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #ffffff;\n --xy-edge-label-color-default: inherit;\n --xy-resize-background-color-default: #3367d9;\n}\n.react-flow.dark {\n --xy-edge-stroke-default: #3e3e3e;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #727272;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);\n\n --xy-minimap-background-color-default: #141414;\n --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #2b2b2b;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: #141414;\n --xy-background-pattern-dots-color-default: #777;\n --xy-background-pattern-lines-color-default: #777;\n --xy-background-pattern-cross-color-default: #777;\n --xy-node-color-default: #f8f8f8;\n --xy-node-border-default: 1px solid #3c3c3c;\n --xy-node-background-color-default: #1e1e1e;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;\n\n --xy-handle-background-color-default: #bebebe;\n --xy-handle-border-color-default: #1e1e1e;\n\n --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);\n\n --xy-controls-button-background-color-default: #2b2b2b;\n --xy-controls-button-background-color-hover-default: #3e3e3e;\n --xy-controls-button-color-default: #f8f8f8;\n --xy-controls-button-color-hover-default: #fff;\n --xy-controls-button-border-color-default: #5b5b5b;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #141414;\n --xy-edge-label-color-default: #f8f8f8;\n}\n.react-flow__background {\n background-color: var(--xy-background-color, var(--xy-background-color-props, var(--xy-background-color-default)));\n pointer-events: none;\n z-index: -1;\n}\n.react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.react-flow__pane {\n z-index: 1;\n}\n.react-flow__pane.draggable {\n cursor: grab;\n }\n.react-flow__pane.dragging {\n cursor: grabbing;\n }\n.react-flow__pane.selection {\n cursor: pointer;\n }\n.react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n}\n.react-flow__renderer {\n z-index: 4;\n}\n.react-flow__selection {\n z-index: 6;\n}\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible {\n outline: none;\n}\n.react-flow__edge-path {\n stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));\n stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));\n fill: none;\n}\n.react-flow__connection-path {\n stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));\n stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));\n fill: none;\n}\n.react-flow .react-flow__edges {\n position: absolute;\n}\n.react-flow .react-flow__edges svg {\n overflow: visible;\n position: absolute;\n pointer-events: none;\n }\n.react-flow__edge {\n pointer-events: visibleStroke;\n}\n.react-flow__edge.selectable {\n cursor: pointer;\n }\n.react-flow__edge.animated path {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\n.react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n animation: none;\n }\n.react-flow__edge.inactive {\n pointer-events: none;\n }\n.react-flow__edge.selected,\n .react-flow__edge:focus,\n .react-flow__edge:focus-visible {\n outline: none;\n }\n.react-flow__edge.selected .react-flow__edge-path,\n .react-flow__edge.selectable:focus .react-flow__edge-path,\n .react-flow__edge.selectable:focus-visible .react-flow__edge-path {\n stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));\n }\n.react-flow__edge-textwrapper {\n pointer-events: all;\n }\n.react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__connection {\n pointer-events: none;\n}\n.react-flow__connection .animated {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\nsvg.react-flow__connectionline {\n z-index: 1001;\n overflow: visible;\n position: absolute;\n}\n.react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n}\n.react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: default;\n}\n.react-flow__node.selectable {\n cursor: pointer;\n }\n.react-flow__node.draggable {\n cursor: grab;\n pointer-events: all;\n }\n.react-flow__node.draggable.dragging {\n cursor: grabbing;\n }\n.react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n}\n.react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: grab;\n }\n.react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));\n border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));\n border-radius: 100%;\n}\n.react-flow__handle.connectingfrom {\n pointer-events: all;\n }\n.react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n }\n.react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 50%);\n }\n.react-flow__handle-top {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-left {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n }\n.react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n}\n.react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n}\n.react-flow__panel.top {\n top: 0;\n }\n.react-flow__panel.bottom {\n bottom: 0;\n }\n.react-flow__panel.top.center, .react-flow__panel.bottom.center {\n left: 50%;\n transform: translateX(-50%);\n }\n.react-flow__panel.left {\n left: 0;\n }\n.react-flow__panel.right {\n right: 0;\n }\n.react-flow__panel.left.center, .react-flow__panel.right.center {\n top: 50%;\n transform: translateY(-50%);\n }\n.react-flow__attribution {\n font-size: 10px;\n background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));\n padding: 2px 3px;\n margin: 0;\n}\n.react-flow__attribution a {\n text-decoration: none;\n color: #999;\n }\n@keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n.react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n left: 0;\n top: 0;\n}\n.react-flow__viewport-portal {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__minimap {\n background: var(\n --xy-minimap-background-color-props,\n var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))\n );\n}\n.react-flow__minimap-svg {\n display: block;\n }\n.react-flow__minimap-mask {\n fill: var(\n --xy-minimap-mask-background-color-props,\n var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))\n );\n stroke: var(\n --xy-minimap-mask-stroke-color-props,\n var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-mask-stroke-width-props,\n var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))\n );\n }\n.react-flow__minimap-node {\n fill: var(\n --xy-minimap-node-background-color-props,\n var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))\n );\n stroke: var(\n --xy-minimap-node-stroke-color-props,\n var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-node-stroke-width-props,\n var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))\n );\n }\n.react-flow__background-pattern.dots {\n fill: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))\n );\n }\n.react-flow__background-pattern.lines {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))\n );\n }\n.react-flow__background-pattern.cross {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))\n );\n }\n.react-flow__controls {\n display: flex;\n flex-direction: column;\n box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));\n}\n.react-flow__controls.horizontal {\n flex-direction: row;\n }\n.react-flow__controls-button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 26px;\n width: 26px;\n padding: 4px;\n border: none;\n background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));\n border-bottom: 1px solid\n var(\n --xy-controls-button-border-color-props,\n var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))\n );\n color: var(\n --xy-controls-button-color-props,\n var(--xy-controls-button-color, var(--xy-controls-button-color-default))\n );\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n fill: currentColor;\n }\n.react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n }\n.react-flow__edge-text {\n font-size: 10px;\n }\n.react-flow__node.selectable:focus,\n .react-flow__node.selectable:focus-visible {\n outline: none;\n }\n.react-flow__node-input,\n.react-flow__node-default,\n.react-flow__node-output,\n.react-flow__node-group {\n padding: 10px;\n border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));\n width: 150px;\n font-size: 12px;\n color: var(--xy-node-color, var(--xy-node-color-default));\n text-align: center;\n border: var(--xy-node-border, var(--xy-node-border-default));\n background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));\n}\n.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {\n box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));\n }\n.react-flow__node-input.selectable.selected,\n .react-flow__node-input.selectable:focus,\n .react-flow__node-input.selectable:focus-visible,\n .react-flow__node-default.selectable.selected,\n .react-flow__node-default.selectable:focus,\n .react-flow__node-default.selectable:focus-visible,\n .react-flow__node-output.selectable.selected,\n .react-flow__node-output.selectable:focus,\n .react-flow__node-output.selectable:focus-visible,\n .react-flow__node-group.selectable.selected,\n .react-flow__node-group.selectable:focus,\n .react-flow__node-group.selectable:focus-visible {\n box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));\n }\n.react-flow__node-group {\n background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));\n}\n.react-flow__nodesselection-rect,\n.react-flow__selection {\n background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));\n border: var(--xy-selection-border, var(--xy-selection-border-default));\n}\n.react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible,\n .react-flow__selection:focus,\n .react-flow__selection:focus-visible {\n outline: none;\n }\n.react-flow__controls-button:hover {\n background: var(\n --xy-controls-button-background-color-hover-props,\n var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))\n );\n color: var(\n --xy-controls-button-color-hover-props,\n var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))\n );\n }\n.react-flow__controls-button:disabled {\n pointer-events: none;\n }\n.react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n }\n.react-flow__controls-button:last-child {\n border-bottom: none;\n }\n.react-flow__resize-control {\n position: absolute;\n}\n.react-flow__resize-control.left,\n.react-flow__resize-control.right {\n cursor: ew-resize;\n}\n.react-flow__resize-control.top,\n.react-flow__resize-control.bottom {\n cursor: ns-resize;\n}\n.react-flow__resize-control.top.left,\n.react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n}\n.react-flow__resize-control.bottom.left,\n.react-flow__resize-control.top.right {\n cursor: nesw-resize;\n}\n/* handle styles */\n.react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n transform: translate(-50%, -50%);\n}\n.react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n}\n.react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n}\n.react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n}\n.react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n}\n.react-flow__resize-control.handle.top.left {\n left: 0;\n}\n.react-flow__resize-control.handle.bottom.left {\n left: 0;\n}\n.react-flow__resize-control.handle.top.right {\n left: 100%;\n}\n.react-flow__resize-control.handle.bottom.right {\n left: 100%;\n}\n/* line styles */\n.react-flow__resize-control.line {\n border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n border-width: 0;\n border-style: solid;\n}\n.react-flow__resize-control.line.left,\n.react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n}\n.react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n}\n.react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n}\n.react-flow__resize-control.line.top,\n.react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n}\n.react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n}\n.react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n}\n.react-flow__edge-textbg {\n fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));\n}\n.react-flow__edge-text {\n fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));\n}\n";
|
|
1054
|
+
var css_248z = "/* this gets exported as style.css and can be used for the default theming */\n/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */\n.react-flow {\n direction: ltr;\n\n --xy-edge-stroke-default: #b1b1b7;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #555;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);\n\n --xy-minimap-background-color-default: #fff;\n --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #e2e2e2;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: transparent;\n --xy-background-pattern-dots-color-default: #91919a;\n --xy-background-pattern-lines-color-default: #eee;\n --xy-background-pattern-cross-color-default: #e2e2e2;\n background-color: var(--xy-background-color, var(--xy-background-color-default));\n --xy-node-color-default: inherit;\n --xy-node-border-default: 1px solid #1a192b;\n --xy-node-background-color-default: #fff;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;\n --xy-node-border-radius-default: 3px;\n\n --xy-handle-background-color-default: #1a192b;\n --xy-handle-border-color-default: #fff;\n\n --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);\n\n --xy-controls-button-background-color-default: #fefefe;\n --xy-controls-button-background-color-hover-default: #f4f4f4;\n --xy-controls-button-color-default: inherit;\n --xy-controls-button-color-hover-default: inherit;\n --xy-controls-button-border-color-default: #eee;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #ffffff;\n --xy-edge-label-color-default: inherit;\n --xy-resize-background-color-default: #3367d9;\n}\n.react-flow.dark {\n --xy-edge-stroke-default: #3e3e3e;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #727272;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);\n\n --xy-minimap-background-color-default: #141414;\n --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #2b2b2b;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: #141414;\n --xy-background-pattern-dots-color-default: #777;\n --xy-background-pattern-lines-color-default: #777;\n --xy-background-pattern-cross-color-default: #777;\n --xy-node-color-default: #f8f8f8;\n --xy-node-border-default: 1px solid #3c3c3c;\n --xy-node-background-color-default: #1e1e1e;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;\n\n --xy-handle-background-color-default: #bebebe;\n --xy-handle-border-color-default: #1e1e1e;\n\n --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);\n\n --xy-controls-button-background-color-default: #2b2b2b;\n --xy-controls-button-background-color-hover-default: #3e3e3e;\n --xy-controls-button-color-default: #f8f8f8;\n --xy-controls-button-color-hover-default: #fff;\n --xy-controls-button-border-color-default: #5b5b5b;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #141414;\n --xy-edge-label-color-default: #f8f8f8;\n}\n.react-flow__background {\n background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));\n pointer-events: none;\n z-index: -1;\n}\n.react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.react-flow__pane {\n z-index: 1;\n}\n.react-flow__pane.draggable {\n cursor: grab;\n }\n.react-flow__pane.dragging {\n cursor: grabbing;\n }\n.react-flow__pane.selection {\n cursor: pointer;\n }\n.react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n}\n.react-flow__renderer {\n z-index: 4;\n}\n.react-flow__selection {\n z-index: 6;\n}\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible {\n outline: none;\n}\n.react-flow__edge-path {\n stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));\n stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));\n fill: none;\n}\n.react-flow__connection-path {\n stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));\n stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));\n fill: none;\n}\n.react-flow .react-flow__edges {\n position: absolute;\n}\n.react-flow .react-flow__edges svg {\n overflow: visible;\n position: absolute;\n pointer-events: none;\n }\n.react-flow__edge {\n pointer-events: visibleStroke;\n}\n.react-flow__edge.selectable {\n cursor: pointer;\n }\n.react-flow__edge.animated path {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\n.react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n animation: none;\n }\n.react-flow__edge.inactive {\n pointer-events: none;\n }\n.react-flow__edge.selected,\n .react-flow__edge:focus,\n .react-flow__edge:focus-visible {\n outline: none;\n }\n.react-flow__edge.selected .react-flow__edge-path,\n .react-flow__edge.selectable:focus .react-flow__edge-path,\n .react-flow__edge.selectable:focus-visible .react-flow__edge-path {\n stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));\n }\n.react-flow__edge-textwrapper {\n pointer-events: all;\n }\n.react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__connection {\n pointer-events: none;\n}\n.react-flow__connection .animated {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\nsvg.react-flow__connectionline {\n z-index: 1001;\n overflow: visible;\n position: absolute;\n}\n.react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n}\n.react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: default;\n}\n.react-flow__node.selectable {\n cursor: pointer;\n }\n.react-flow__node.draggable {\n cursor: grab;\n pointer-events: all;\n }\n.react-flow__node.draggable.dragging {\n cursor: grabbing;\n }\n.react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n}\n.react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: grab;\n }\n.react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));\n border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));\n border-radius: 100%;\n}\n.react-flow__handle.connectingfrom {\n pointer-events: all;\n }\n.react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n }\n.react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 50%);\n }\n.react-flow__handle-top {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-left {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n }\n.react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n}\n.react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n}\n.react-flow__panel.top {\n top: 0;\n }\n.react-flow__panel.bottom {\n bottom: 0;\n }\n.react-flow__panel.top.center, .react-flow__panel.bottom.center {\n left: 50%;\n transform: translateX(-15px) translateX(-50%);\n }\n.react-flow__panel.left {\n left: 0;\n }\n.react-flow__panel.right {\n right: 0;\n }\n.react-flow__panel.left.center, .react-flow__panel.right.center {\n top: 50%;\n transform: translateY(-15px) translateY(-50%);\n }\n.react-flow__attribution {\n font-size: 10px;\n background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));\n padding: 2px 3px;\n margin: 0;\n}\n.react-flow__attribution a {\n text-decoration: none;\n color: #999;\n }\n@keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n.react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n left: 0;\n top: 0;\n}\n.react-flow__viewport-portal {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__minimap {\n background: var(\n --xy-minimap-background-color-props,\n var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))\n );\n}\n.react-flow__minimap-svg {\n display: block;\n }\n.react-flow__minimap-mask {\n fill: var(\n --xy-minimap-mask-background-color-props,\n var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))\n );\n stroke: var(\n --xy-minimap-mask-stroke-color-props,\n var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-mask-stroke-width-props,\n var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))\n );\n }\n.react-flow__minimap-node {\n fill: var(\n --xy-minimap-node-background-color-props,\n var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))\n );\n stroke: var(\n --xy-minimap-node-stroke-color-props,\n var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-node-stroke-width-props,\n var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))\n );\n }\n.react-flow__background-pattern.dots {\n fill: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))\n );\n }\n.react-flow__background-pattern.lines {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))\n );\n }\n.react-flow__background-pattern.cross {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))\n );\n }\n.react-flow__controls {\n display: flex;\n flex-direction: column;\n box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));\n}\n.react-flow__controls.horizontal {\n flex-direction: row;\n }\n.react-flow__controls-button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 26px;\n width: 26px;\n padding: 4px;\n border: none;\n background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));\n border-bottom: 1px solid\n var(\n --xy-controls-button-border-color-props,\n var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))\n );\n color: var(\n --xy-controls-button-color-props,\n var(--xy-controls-button-color, var(--xy-controls-button-color-default))\n );\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n fill: currentColor;\n }\n.react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n }\n.react-flow__edge-text {\n font-size: 10px;\n }\n.react-flow__node.selectable:focus,\n .react-flow__node.selectable:focus-visible {\n outline: none;\n }\n.react-flow__node-input,\n.react-flow__node-default,\n.react-flow__node-output,\n.react-flow__node-group {\n padding: 10px;\n border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));\n width: 150px;\n font-size: 12px;\n color: var(--xy-node-color, var(--xy-node-color-default));\n text-align: center;\n border: var(--xy-node-border, var(--xy-node-border-default));\n background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));\n}\n.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {\n box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));\n }\n.react-flow__node-input.selectable.selected,\n .react-flow__node-input.selectable:focus,\n .react-flow__node-input.selectable:focus-visible,\n .react-flow__node-default.selectable.selected,\n .react-flow__node-default.selectable:focus,\n .react-flow__node-default.selectable:focus-visible,\n .react-flow__node-output.selectable.selected,\n .react-flow__node-output.selectable:focus,\n .react-flow__node-output.selectable:focus-visible,\n .react-flow__node-group.selectable.selected,\n .react-flow__node-group.selectable:focus,\n .react-flow__node-group.selectable:focus-visible {\n box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));\n }\n.react-flow__node-group {\n background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));\n}\n.react-flow__nodesselection-rect,\n.react-flow__selection {\n background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));\n border: var(--xy-selection-border, var(--xy-selection-border-default));\n}\n.react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible,\n .react-flow__selection:focus,\n .react-flow__selection:focus-visible {\n outline: none;\n }\n.react-flow__controls-button:hover {\n background: var(\n --xy-controls-button-background-color-hover-props,\n var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))\n );\n color: var(\n --xy-controls-button-color-hover-props,\n var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))\n );\n }\n.react-flow__controls-button:disabled {\n pointer-events: none;\n }\n.react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n }\n.react-flow__controls-button:last-child {\n border-bottom: none;\n }\n.react-flow__controls.horizontal .react-flow__controls-button {\n border-bottom: none;\n border-right: 1px solid\n var(\n --xy-controls-button-border-color-props,\n var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))\n );\n }\n.react-flow__controls.horizontal .react-flow__controls-button:last-child {\n border-right: none;\n }\n.react-flow__resize-control {\n position: absolute;\n}\n.react-flow__resize-control.left,\n.react-flow__resize-control.right {\n cursor: ew-resize;\n}\n.react-flow__resize-control.top,\n.react-flow__resize-control.bottom {\n cursor: ns-resize;\n}\n.react-flow__resize-control.top.left,\n.react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n}\n.react-flow__resize-control.bottom.left,\n.react-flow__resize-control.top.right {\n cursor: nesw-resize;\n}\n/* handle styles */\n.react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n transform: translate(-50%, -50%);\n}\n.react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n}\n.react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n}\n.react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n}\n.react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n}\n.react-flow__resize-control.handle.top.left {\n left: 0;\n}\n.react-flow__resize-control.handle.bottom.left {\n left: 0;\n}\n.react-flow__resize-control.handle.top.right {\n left: 100%;\n}\n.react-flow__resize-control.handle.bottom.right {\n left: 100%;\n}\n/* line styles */\n.react-flow__resize-control.line {\n border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n border-width: 0;\n border-style: solid;\n}\n.react-flow__resize-control.line.left,\n.react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n}\n.react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n}\n.react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n}\n.react-flow__resize-control.line.top,\n.react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n}\n.react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n}\n.react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n}\n.react-flow__edge-textbg {\n fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));\n}\n.react-flow__edge-text {\n fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));\n}\n";
|
|
1055
1055
|
styleInject(css_248z);
|
|
1056
1056
|
|
|
1057
1057
|
var jsxRuntime = {exports: {}};
|
|
@@ -5513,7 +5513,7 @@ const rendererPointToPoint = ({ x, y }, [tx, ty, tScale]) => {
|
|
|
5513
5513
|
*/
|
|
5514
5514
|
function parsePadding(padding, viewport) {
|
|
5515
5515
|
if (typeof padding === 'number') {
|
|
5516
|
-
return Math.floor(viewport - viewport / (1 + padding));
|
|
5516
|
+
return Math.floor((viewport - viewport / (1 + padding)) * 0.5);
|
|
5517
5517
|
}
|
|
5518
5518
|
if (typeof padding === 'string' && padding.endsWith('px')) {
|
|
5519
5519
|
const paddingValue = parseFloat(padding);
|
|
@@ -5671,6 +5671,19 @@ function areSetsEqual(a, b) {
|
|
|
5671
5671
|
}
|
|
5672
5672
|
return true;
|
|
5673
5673
|
}
|
|
5674
|
+
/**
|
|
5675
|
+
* Polyfill for Promise.withResolvers until we can use it in all browsers
|
|
5676
|
+
* @internal
|
|
5677
|
+
*/
|
|
5678
|
+
function withResolvers() {
|
|
5679
|
+
let resolve;
|
|
5680
|
+
let reject;
|
|
5681
|
+
const promise = new Promise((res, rej) => {
|
|
5682
|
+
resolve = res;
|
|
5683
|
+
reject = rej;
|
|
5684
|
+
});
|
|
5685
|
+
return { promise, resolve, reject };
|
|
5686
|
+
}
|
|
5674
5687
|
|
|
5675
5688
|
function getPointerPosition(event, { snapGrid = [0, 0], snapToGrid = false, transform, containerBounds }) {
|
|
5676
5689
|
const { x, y } = getEventPosition(event);
|
|
@@ -6297,7 +6310,7 @@ function updateAbsolutePositions(nodeLookup, parentLookup, options) {
|
|
|
6297
6310
|
}
|
|
6298
6311
|
function adoptUserNodes(nodes, nodeLookup, parentLookup, options) {
|
|
6299
6312
|
const _options = mergeObjects(adoptUserNodesDefaultOptions, options);
|
|
6300
|
-
let nodesInitialized =
|
|
6313
|
+
let nodesInitialized = nodes.length > 0;
|
|
6301
6314
|
const tmpLookup = new Map(nodeLookup);
|
|
6302
6315
|
const selectedNodeZ = _options?.elevateNodesOnSelect ? 1000 : 0;
|
|
6303
6316
|
nodeLookup.clear();
|
|
@@ -6328,7 +6341,9 @@ function adoptUserNodes(nodes, nodeLookup, parentLookup, options) {
|
|
|
6328
6341
|
};
|
|
6329
6342
|
nodeLookup.set(userNode.id, internalNode);
|
|
6330
6343
|
}
|
|
6331
|
-
if ((
|
|
6344
|
+
if ((internalNode.measured === undefined ||
|
|
6345
|
+
internalNode.measured.width === undefined ||
|
|
6346
|
+
internalNode.measured.height === undefined) &&
|
|
6332
6347
|
!internalNode.hidden) {
|
|
6333
6348
|
nodesInitialized = false;
|
|
6334
6349
|
}
|
|
@@ -7921,7 +7936,7 @@ function nodeToChildExtent(child, parent, nodeOrigin) {
|
|
|
7921
7936
|
}
|
|
7922
7937
|
function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
|
|
7923
7938
|
const selection = select(domNode);
|
|
7924
|
-
function update({ controlPosition, boundaries, keepAspectRatio, onResizeStart, onResize, onResizeEnd, shouldResize, }) {
|
|
7939
|
+
function update({ controlPosition, boundaries, keepAspectRatio, resizeDirection, onResizeStart, onResize, onResizeEnd, shouldResize, }) {
|
|
7925
7940
|
let prevValues = { ...initPrevValues$1 };
|
|
7926
7941
|
let startValues = { ...initStartValues };
|
|
7927
7942
|
const controlDirection = getControlDirection(controlPosition);
|
|
@@ -8036,8 +8051,10 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {
|
|
|
8036
8051
|
}
|
|
8037
8052
|
}
|
|
8038
8053
|
if (isWidthChange || isHeightChange) {
|
|
8039
|
-
change.width =
|
|
8040
|
-
|
|
8054
|
+
change.width =
|
|
8055
|
+
isWidthChange && (!resizeDirection || resizeDirection === 'horizontal') ? width : prevValues.width;
|
|
8056
|
+
change.height =
|
|
8057
|
+
isHeightChange && (!resizeDirection || resizeDirection === 'vertical') ? height : prevValues.height;
|
|
8041
8058
|
prevValues.width = change.width;
|
|
8042
8059
|
prevValues.height = change.height;
|
|
8043
8060
|
}
|
|
@@ -9266,8 +9283,12 @@ function applyChange(change, element) {
|
|
|
9266
9283
|
element.measured.width = change.dimensions.width;
|
|
9267
9284
|
element.measured.height = change.dimensions.height;
|
|
9268
9285
|
if (change.setAttributes) {
|
|
9269
|
-
|
|
9270
|
-
|
|
9286
|
+
if (change.setAttributes === true || change.setAttributes === 'width') {
|
|
9287
|
+
element.width = change.dimensions.width;
|
|
9288
|
+
}
|
|
9289
|
+
if (change.setAttributes === true || change.setAttributes === 'height') {
|
|
9290
|
+
element.height = change.dimensions.height;
|
|
9291
|
+
}
|
|
9271
9292
|
}
|
|
9272
9293
|
}
|
|
9273
9294
|
if (typeof change.resizing === 'boolean') {
|
|
@@ -9523,29 +9544,26 @@ function BatchProvider({ children, }) {
|
|
|
9523
9544
|
for (const payload of queueItems) {
|
|
9524
9545
|
next = typeof payload === 'function' ? payload(next) : payload;
|
|
9525
9546
|
}
|
|
9547
|
+
const changes = getElementsDiffChanges({
|
|
9548
|
+
items: next,
|
|
9549
|
+
lookup: nodeLookup,
|
|
9550
|
+
});
|
|
9526
9551
|
if (hasDefaultNodes) {
|
|
9527
9552
|
setNodes(next);
|
|
9528
9553
|
}
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9554
|
+
// We only want to fire onNodesChange if there are changes to the nodes
|
|
9555
|
+
if (changes.length > 0) {
|
|
9556
|
+
onNodesChange?.(changes);
|
|
9557
|
+
}
|
|
9558
|
+
else if (fitViewQueued) {
|
|
9559
|
+
// If there are no changes to the nodes, we still need to call setNodes
|
|
9560
|
+
// to trigger a re-render and fitView.
|
|
9561
|
+
window.requestAnimationFrame(() => {
|
|
9562
|
+
const { fitViewQueued, nodes, setNodes } = store.getState();
|
|
9563
|
+
if (fitViewQueued) {
|
|
9564
|
+
setNodes(nodes);
|
|
9565
|
+
}
|
|
9534
9566
|
});
|
|
9535
|
-
// We only want to fire onNodesChange if there are changes to the nodes
|
|
9536
|
-
if (changes.length > 0) {
|
|
9537
|
-
onNodesChange?.(changes);
|
|
9538
|
-
}
|
|
9539
|
-
else if (fitViewQueued) {
|
|
9540
|
-
// If there are no changes to the nodes, we still need to call setNodes
|
|
9541
|
-
// to trigger a re-render and fitView.
|
|
9542
|
-
window.requestAnimationFrame(() => {
|
|
9543
|
-
const { fitViewQueued, nodes, setNodes } = store.getState();
|
|
9544
|
-
if (fitViewQueued) {
|
|
9545
|
-
setNodes(nodes);
|
|
9546
|
-
}
|
|
9547
|
-
});
|
|
9548
|
-
}
|
|
9549
9567
|
}
|
|
9550
9568
|
}, []);
|
|
9551
9569
|
const nodeQueue = useQueue(nodeQueueHandler);
|
|
@@ -9765,7 +9783,7 @@ function useReactFlow() {
|
|
|
9765
9783
|
fitView: async (options) => {
|
|
9766
9784
|
// We either create a new Promise or reuse the existing one
|
|
9767
9785
|
// Even if fitView is called multiple times in a row, we only end up with a single Promise
|
|
9768
|
-
const fitViewResolver = store.getState().fitViewResolver ??
|
|
9786
|
+
const fitViewResolver = store.getState().fitViewResolver ?? withResolvers();
|
|
9769
9787
|
// We schedule a fitView by setting fitViewQueued and triggering a setNodes
|
|
9770
9788
|
store.setState({ fitViewQueued: true, fitViewOptions: options, fitViewResolver });
|
|
9771
9789
|
batchContext.nodeQueue.push((nodes) => [...nodes]);
|
|
@@ -10904,7 +10922,7 @@ const MarkerDefinitions = ({ defaultColor, rfId }) => {
|
|
|
10904
10922
|
if (!markers.length) {
|
|
10905
10923
|
return null;
|
|
10906
10924
|
}
|
|
10907
|
-
return (jsxRuntimeExports.jsx("svg", { className: "react-flow__marker", children: jsxRuntimeExports.jsx("defs", { children: markers.map((marker) => (jsxRuntimeExports.jsx(Marker, { id: marker.id, type: marker.type, color: marker.color, width: marker.width, height: marker.height, markerUnits: marker.markerUnits, strokeWidth: marker.strokeWidth, orient: marker.orient }, marker.id))) }) }));
|
|
10925
|
+
return (jsxRuntimeExports.jsx("svg", { className: "react-flow__marker", "aria-hidden": "true", children: jsxRuntimeExports.jsx("defs", { children: markers.map((marker) => (jsxRuntimeExports.jsx(Marker, { id: marker.id, type: marker.type, color: marker.color, width: marker.width, height: marker.height, markerUnits: marker.markerUnits, strokeWidth: marker.strokeWidth, orient: marker.orient }, marker.id))) }) }));
|
|
10908
10926
|
};
|
|
10909
10927
|
MarkerDefinitions.displayName = 'MarkerDefinitions';
|
|
10910
10928
|
var MarkerDefinitions$1 = memo(MarkerDefinitions);
|
|
@@ -11640,7 +11658,7 @@ function GraphViewComponent({ nodeTypes, edgeTypes, onInit, onNodeClick, onEdgeC
|
|
|
11640
11658
|
GraphViewComponent.displayName = 'GraphView';
|
|
11641
11659
|
const GraphView = memo(GraphViewComponent);
|
|
11642
11660
|
|
|
11643
|
-
const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView, nodeOrigin, nodeExtent, } = {}) => {
|
|
11661
|
+
const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView, fitViewOptions, minZoom = 0.5, maxZoom = 2, nodeOrigin, nodeExtent, } = {}) => {
|
|
11644
11662
|
const nodeLookup = new Map();
|
|
11645
11663
|
const parentLookup = new Map();
|
|
11646
11664
|
const connectionLookup = new Map();
|
|
@@ -11650,7 +11668,7 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
|
|
|
11650
11668
|
const storeNodeOrigin = nodeOrigin ?? [0, 0];
|
|
11651
11669
|
const storeNodeExtent = nodeExtent ?? infiniteExtent;
|
|
11652
11670
|
updateConnectionLookup(connectionLookup, edgeLookup, storeEdges);
|
|
11653
|
-
adoptUserNodes(storeNodes, nodeLookup, parentLookup, {
|
|
11671
|
+
const nodesInitialized = adoptUserNodes(storeNodes, nodeLookup, parentLookup, {
|
|
11654
11672
|
nodeOrigin: storeNodeOrigin,
|
|
11655
11673
|
nodeExtent: storeNodeExtent,
|
|
11656
11674
|
elevateNodesOnSelect: false,
|
|
@@ -11660,7 +11678,7 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
|
|
|
11660
11678
|
const bounds = getInternalNodesBounds(nodeLookup, {
|
|
11661
11679
|
filter: (node) => !!((node.width || node.initialWidth) && (node.height || node.initialHeight)),
|
|
11662
11680
|
});
|
|
11663
|
-
const { x, y, zoom } = getViewportForBounds(bounds, width, height,
|
|
11681
|
+
const { x, y, zoom } = getViewportForBounds(bounds, width, height, minZoom, maxZoom, fitViewOptions?.padding ?? 0.1);
|
|
11664
11682
|
transform = [x, y, zoom];
|
|
11665
11683
|
}
|
|
11666
11684
|
return {
|
|
@@ -11669,6 +11687,7 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
|
|
|
11669
11687
|
height: 0,
|
|
11670
11688
|
transform,
|
|
11671
11689
|
nodes: storeNodes,
|
|
11690
|
+
nodesInitialized,
|
|
11672
11691
|
nodeLookup,
|
|
11673
11692
|
parentLookup,
|
|
11674
11693
|
edges: storeEdges,
|
|
@@ -11679,8 +11698,8 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
|
|
|
11679
11698
|
hasDefaultNodes: defaultNodes !== undefined,
|
|
11680
11699
|
hasDefaultEdges: defaultEdges !== undefined,
|
|
11681
11700
|
panZoom: null,
|
|
11682
|
-
minZoom
|
|
11683
|
-
maxZoom
|
|
11701
|
+
minZoom,
|
|
11702
|
+
maxZoom,
|
|
11684
11703
|
translateExtent: infiniteExtent,
|
|
11685
11704
|
nodeExtent: storeNodeExtent,
|
|
11686
11705
|
nodesSelectionActive: false,
|
|
@@ -11705,7 +11724,7 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
|
|
|
11705
11724
|
selectNodesOnDrag: true,
|
|
11706
11725
|
multiSelectionActive: false,
|
|
11707
11726
|
fitViewQueued: fitView ?? false,
|
|
11708
|
-
fitViewOptions
|
|
11727
|
+
fitViewOptions,
|
|
11709
11728
|
fitViewResolver: null,
|
|
11710
11729
|
connection: { ...initialConnection },
|
|
11711
11730
|
connectionClickStartHandle: null,
|
|
@@ -11723,7 +11742,7 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
|
|
|
11723
11742
|
};
|
|
11724
11743
|
};
|
|
11725
11744
|
|
|
11726
|
-
const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView, nodeOrigin, nodeExtent, }) => createWithEqualityFn((set, get) => {
|
|
11745
|
+
const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView, fitViewOptions, minZoom, maxZoom, nodeOrigin, nodeExtent, }) => createWithEqualityFn((set, get) => {
|
|
11727
11746
|
async function resolveFitView() {
|
|
11728
11747
|
const { nodeLookup, panZoom, fitViewOptions, fitViewResolver, width, height, minZoom, maxZoom } = get();
|
|
11729
11748
|
if (!panZoom) {
|
|
@@ -11745,7 +11764,20 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
11745
11764
|
set({ fitViewResolver: null });
|
|
11746
11765
|
}
|
|
11747
11766
|
return {
|
|
11748
|
-
...getInitialState({
|
|
11767
|
+
...getInitialState({
|
|
11768
|
+
nodes,
|
|
11769
|
+
edges,
|
|
11770
|
+
width,
|
|
11771
|
+
height,
|
|
11772
|
+
fitView,
|
|
11773
|
+
fitViewOptions,
|
|
11774
|
+
minZoom,
|
|
11775
|
+
maxZoom,
|
|
11776
|
+
nodeOrigin,
|
|
11777
|
+
nodeExtent,
|
|
11778
|
+
defaultNodes,
|
|
11779
|
+
defaultEdges,
|
|
11780
|
+
}),
|
|
11749
11781
|
setNodes: (nodes) => {
|
|
11750
11782
|
const { nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect, fitViewQueued } = get();
|
|
11751
11783
|
/*
|
|
@@ -11764,10 +11796,10 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
11764
11796
|
});
|
|
11765
11797
|
if (fitViewQueued && nodesInitialized) {
|
|
11766
11798
|
resolveFitView();
|
|
11767
|
-
set({ nodes, fitViewQueued: false, fitViewOptions: undefined });
|
|
11799
|
+
set({ nodes, nodesInitialized, fitViewQueued: false, fitViewOptions: undefined });
|
|
11768
11800
|
}
|
|
11769
11801
|
else {
|
|
11770
|
-
set({ nodes });
|
|
11802
|
+
set({ nodes, nodesInitialized });
|
|
11771
11803
|
}
|
|
11772
11804
|
},
|
|
11773
11805
|
setEdges: (edges) => {
|
|
@@ -11936,7 +11968,10 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
11936
11968
|
get().panZoom?.setClickDistance(clickDistance);
|
|
11937
11969
|
},
|
|
11938
11970
|
resetSelectedElements: () => {
|
|
11939
|
-
const { edges, nodes, triggerNodeChanges, triggerEdgeChanges } = get();
|
|
11971
|
+
const { edges, nodes, triggerNodeChanges, triggerEdgeChanges, elementsSelectable } = get();
|
|
11972
|
+
if (!elementsSelectable) {
|
|
11973
|
+
return;
|
|
11974
|
+
}
|
|
11940
11975
|
const nodeChanges = nodes.reduce((res, node) => (node.selected ? [...res, createSelectionChange(node.id, false)] : res), []);
|
|
11941
11976
|
const edgeChanges = edges.reduce((res, edge) => (edge.selected ? [...res, createSelectionChange(edge.id, false)] : res), []);
|
|
11942
11977
|
triggerNodeChanges(nodeChanges);
|
|
@@ -12008,7 +12043,7 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
12008
12043
|
* your router. If you have multiple flows on the same page you will need to use a separate
|
|
12009
12044
|
* `<ReactFlowProvider />` for each flow.
|
|
12010
12045
|
*/
|
|
12011
|
-
function ReactFlowProvider({ initialNodes: nodes, initialEdges: edges, defaultNodes, defaultEdges, initialWidth: width, initialHeight: height, fitView, nodeOrigin, nodeExtent, children, }) {
|
|
12046
|
+
function ReactFlowProvider({ initialNodes: nodes, initialEdges: edges, defaultNodes, defaultEdges, initialWidth: width, initialHeight: height, initialMinZoom: minZoom, initialMaxZoom: maxZoom, initialFitViewOptions: fitViewOptions, fitView, nodeOrigin, nodeExtent, children, }) {
|
|
12012
12047
|
const [store] = useState(() => createStore({
|
|
12013
12048
|
nodes,
|
|
12014
12049
|
edges,
|
|
@@ -12017,13 +12052,16 @@ function ReactFlowProvider({ initialNodes: nodes, initialEdges: edges, defaultNo
|
|
|
12017
12052
|
width,
|
|
12018
12053
|
height,
|
|
12019
12054
|
fitView,
|
|
12055
|
+
minZoom,
|
|
12056
|
+
maxZoom,
|
|
12057
|
+
fitViewOptions,
|
|
12020
12058
|
nodeOrigin,
|
|
12021
12059
|
nodeExtent,
|
|
12022
12060
|
}));
|
|
12023
12061
|
return (jsxRuntimeExports.jsx(Provider$1, { value: store, children: jsxRuntimeExports.jsx(BatchProvider, { children: children }) }));
|
|
12024
12062
|
}
|
|
12025
12063
|
|
|
12026
|
-
function Wrapper({ children, nodes, edges, defaultNodes, defaultEdges, width, height, fitView, nodeOrigin, nodeExtent, }) {
|
|
12064
|
+
function Wrapper({ children, nodes, edges, defaultNodes, defaultEdges, width, height, fitView, fitViewOptions, minZoom, maxZoom, nodeOrigin, nodeExtent, }) {
|
|
12027
12065
|
const isWrapped = useContext(StoreContext);
|
|
12028
12066
|
if (isWrapped) {
|
|
12029
12067
|
/*
|
|
@@ -12032,7 +12070,7 @@ function Wrapper({ children, nodes, edges, defaultNodes, defaultEdges, width, he
|
|
|
12032
12070
|
*/
|
|
12033
12071
|
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children });
|
|
12034
12072
|
}
|
|
12035
|
-
return (jsxRuntimeExports.jsx(ReactFlowProvider, { initialNodes: nodes, initialEdges: edges, defaultNodes: defaultNodes, defaultEdges: defaultEdges, initialWidth: width, initialHeight: height, fitView: fitView, nodeOrigin: nodeOrigin, nodeExtent: nodeExtent, children: children }));
|
|
12073
|
+
return (jsxRuntimeExports.jsx(ReactFlowProvider, { initialNodes: nodes, initialEdges: edges, defaultNodes: defaultNodes, defaultEdges: defaultEdges, initialWidth: width, initialHeight: height, fitView: fitView, initialFitViewOptions: fitViewOptions, initialMinZoom: minZoom, initialMaxZoom: maxZoom, nodeOrigin: nodeOrigin, nodeExtent: nodeExtent, children: children }));
|
|
12036
12074
|
}
|
|
12037
12075
|
|
|
12038
12076
|
const wrapperStyle = {
|
|
@@ -12050,7 +12088,7 @@ function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTy
|
|
|
12050
12088
|
e.currentTarget.scrollTo({ top: 0, left: 0, behavior: 'instant' });
|
|
12051
12089
|
onScroll?.(e);
|
|
12052
12090
|
}, [onScroll]);
|
|
12053
|
-
return (jsxRuntimeExports.jsx("div", { "data-testid": "rf__wrapper", ...rest, onScroll: wrapperOnScroll, style: { ...style, ...wrapperStyle }, ref: ref, className: cc(['react-flow', className, colorModeClassName]), id: id, children: jsxRuntimeExports.jsxs(Wrapper, { nodes: nodes, edges: edges, width: width, height: height, fitView: fitView, nodeOrigin: nodeOrigin, nodeExtent: nodeExtent, children: [jsxRuntimeExports.jsx(GraphView, { onInit: onInit, onNodeClick: onNodeClick, onEdgeClick: onEdgeClick, onNodeMouseEnter: onNodeMouseEnter, onNodeMouseMove: onNodeMouseMove, onNodeMouseLeave: onNodeMouseLeave, onNodeContextMenu: onNodeContextMenu, onNodeDoubleClick: onNodeDoubleClick, nodeTypes: nodeTypes, edgeTypes: edgeTypes, connectionLineType: connectionLineType, connectionLineStyle: connectionLineStyle, connectionLineComponent: connectionLineComponent, connectionLineContainerStyle: connectionLineContainerStyle, selectionKeyCode: selectionKeyCode, selectionOnDrag: selectionOnDrag, selectionMode: selectionMode, deleteKeyCode: deleteKeyCode, multiSelectionKeyCode: multiSelectionKeyCode, panActivationKeyCode: panActivationKeyCode, zoomActivationKeyCode: zoomActivationKeyCode, onlyRenderVisibleElements: onlyRenderVisibleElements, defaultViewport: defaultViewport$1, translateExtent: translateExtent, minZoom: minZoom, maxZoom: maxZoom, preventScrolling: preventScrolling, zoomOnScroll: zoomOnScroll, zoomOnPinch: zoomOnPinch, zoomOnDoubleClick: zoomOnDoubleClick, panOnScroll: panOnScroll, panOnScrollSpeed: panOnScrollSpeed, panOnScrollMode: panOnScrollMode, panOnDrag: panOnDrag, onPaneClick: onPaneClick, onPaneMouseEnter: onPaneMouseEnter, onPaneMouseMove: onPaneMouseMove, onPaneMouseLeave: onPaneMouseLeave, onPaneScroll: onPaneScroll, onPaneContextMenu: onPaneContextMenu, paneClickDistance: paneClickDistance, nodeClickDistance: nodeClickDistance, onSelectionContextMenu: onSelectionContextMenu, onSelectionStart: onSelectionStart, onSelectionEnd: onSelectionEnd, onReconnect: onReconnect, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, onEdgeContextMenu: onEdgeContextMenu, onEdgeDoubleClick: onEdgeDoubleClick, onEdgeMouseEnter: onEdgeMouseEnter, onEdgeMouseMove: onEdgeMouseMove, onEdgeMouseLeave: onEdgeMouseLeave, reconnectRadius: reconnectRadius, defaultMarkerColor: defaultMarkerColor, noDragClassName: noDragClassName, noWheelClassName: noWheelClassName, noPanClassName: noPanClassName, rfId: rfId, disableKeyboardA11y: disableKeyboardA11y, nodeExtent: nodeExtent, viewport: viewport, onViewportChange: onViewportChange }), jsxRuntimeExports.jsx(StoreUpdater, { nodes: nodes, edges: edges, defaultNodes: defaultNodes, defaultEdges: defaultEdges, onConnect: onConnect, onConnectStart: onConnectStart, onConnectEnd: onConnectEnd, onClickConnectStart: onClickConnectStart, onClickConnectEnd: onClickConnectEnd, nodesDraggable: nodesDraggable, nodesConnectable: nodesConnectable, nodesFocusable: nodesFocusable, edgesFocusable: edgesFocusable, edgesReconnectable: edgesReconnectable, elementsSelectable: elementsSelectable, elevateNodesOnSelect: elevateNodesOnSelect, elevateEdgesOnSelect: elevateEdgesOnSelect, minZoom: minZoom, maxZoom: maxZoom, nodeExtent: nodeExtent, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, snapToGrid: snapToGrid, snapGrid: snapGrid, connectionMode: connectionMode, translateExtent: translateExtent, connectOnClick: connectOnClick, defaultEdgeOptions: defaultEdgeOptions, fitView: fitView, fitViewOptions: fitViewOptions, onNodesDelete: onNodesDelete, onEdgesDelete: onEdgesDelete, onDelete: onDelete, onNodeDragStart: onNodeDragStart, onNodeDrag: onNodeDrag, onNodeDragStop: onNodeDragStop, onSelectionDrag: onSelectionDrag, onSelectionDragStart: onSelectionDragStart, onSelectionDragStop: onSelectionDragStop, onMove: onMove, onMoveStart: onMoveStart, onMoveEnd: onMoveEnd, noPanClassName: noPanClassName, nodeOrigin: nodeOrigin, rfId: rfId, autoPanOnConnect: autoPanOnConnect, autoPanOnNodeDrag: autoPanOnNodeDrag, autoPanSpeed: autoPanSpeed, onError: onError, connectionRadius: connectionRadius, isValidConnection: isValidConnection, selectNodesOnDrag: selectNodesOnDrag, nodeDragThreshold: nodeDragThreshold, onBeforeDelete: onBeforeDelete, paneClickDistance: paneClickDistance, debug: debug }), jsxRuntimeExports.jsx(SelectionListener, { onSelectionChange: onSelectionChange }), children, jsxRuntimeExports.jsx(Attribution, { proOptions: proOptions, position: attributionPosition }), jsxRuntimeExports.jsx(A11yDescriptions, { rfId: rfId, disableKeyboardA11y: disableKeyboardA11y })] }) }));
|
|
12091
|
+
return (jsxRuntimeExports.jsx("div", { "data-testid": "rf__wrapper", ...rest, onScroll: wrapperOnScroll, style: { ...style, ...wrapperStyle }, ref: ref, className: cc(['react-flow', className, colorModeClassName]), id: id, children: jsxRuntimeExports.jsxs(Wrapper, { nodes: nodes, edges: edges, width: width, height: height, fitView: fitView, fitViewOptions: fitViewOptions, minZoom: minZoom, maxZoom: maxZoom, nodeOrigin: nodeOrigin, nodeExtent: nodeExtent, children: [jsxRuntimeExports.jsx(GraphView, { onInit: onInit, onNodeClick: onNodeClick, onEdgeClick: onEdgeClick, onNodeMouseEnter: onNodeMouseEnter, onNodeMouseMove: onNodeMouseMove, onNodeMouseLeave: onNodeMouseLeave, onNodeContextMenu: onNodeContextMenu, onNodeDoubleClick: onNodeDoubleClick, nodeTypes: nodeTypes, edgeTypes: edgeTypes, connectionLineType: connectionLineType, connectionLineStyle: connectionLineStyle, connectionLineComponent: connectionLineComponent, connectionLineContainerStyle: connectionLineContainerStyle, selectionKeyCode: selectionKeyCode, selectionOnDrag: selectionOnDrag, selectionMode: selectionMode, deleteKeyCode: deleteKeyCode, multiSelectionKeyCode: multiSelectionKeyCode, panActivationKeyCode: panActivationKeyCode, zoomActivationKeyCode: zoomActivationKeyCode, onlyRenderVisibleElements: onlyRenderVisibleElements, defaultViewport: defaultViewport$1, translateExtent: translateExtent, minZoom: minZoom, maxZoom: maxZoom, preventScrolling: preventScrolling, zoomOnScroll: zoomOnScroll, zoomOnPinch: zoomOnPinch, zoomOnDoubleClick: zoomOnDoubleClick, panOnScroll: panOnScroll, panOnScrollSpeed: panOnScrollSpeed, panOnScrollMode: panOnScrollMode, panOnDrag: panOnDrag, onPaneClick: onPaneClick, onPaneMouseEnter: onPaneMouseEnter, onPaneMouseMove: onPaneMouseMove, onPaneMouseLeave: onPaneMouseLeave, onPaneScroll: onPaneScroll, onPaneContextMenu: onPaneContextMenu, paneClickDistance: paneClickDistance, nodeClickDistance: nodeClickDistance, onSelectionContextMenu: onSelectionContextMenu, onSelectionStart: onSelectionStart, onSelectionEnd: onSelectionEnd, onReconnect: onReconnect, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, onEdgeContextMenu: onEdgeContextMenu, onEdgeDoubleClick: onEdgeDoubleClick, onEdgeMouseEnter: onEdgeMouseEnter, onEdgeMouseMove: onEdgeMouseMove, onEdgeMouseLeave: onEdgeMouseLeave, reconnectRadius: reconnectRadius, defaultMarkerColor: defaultMarkerColor, noDragClassName: noDragClassName, noWheelClassName: noWheelClassName, noPanClassName: noPanClassName, rfId: rfId, disableKeyboardA11y: disableKeyboardA11y, nodeExtent: nodeExtent, viewport: viewport, onViewportChange: onViewportChange }), jsxRuntimeExports.jsx(StoreUpdater, { nodes: nodes, edges: edges, defaultNodes: defaultNodes, defaultEdges: defaultEdges, onConnect: onConnect, onConnectStart: onConnectStart, onConnectEnd: onConnectEnd, onClickConnectStart: onClickConnectStart, onClickConnectEnd: onClickConnectEnd, nodesDraggable: nodesDraggable, nodesConnectable: nodesConnectable, nodesFocusable: nodesFocusable, edgesFocusable: edgesFocusable, edgesReconnectable: edgesReconnectable, elementsSelectable: elementsSelectable, elevateNodesOnSelect: elevateNodesOnSelect, elevateEdgesOnSelect: elevateEdgesOnSelect, minZoom: minZoom, maxZoom: maxZoom, nodeExtent: nodeExtent, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, snapToGrid: snapToGrid, snapGrid: snapGrid, connectionMode: connectionMode, translateExtent: translateExtent, connectOnClick: connectOnClick, defaultEdgeOptions: defaultEdgeOptions, fitView: fitView, fitViewOptions: fitViewOptions, onNodesDelete: onNodesDelete, onEdgesDelete: onEdgesDelete, onDelete: onDelete, onNodeDragStart: onNodeDragStart, onNodeDrag: onNodeDrag, onNodeDragStop: onNodeDragStop, onSelectionDrag: onSelectionDrag, onSelectionDragStart: onSelectionDragStart, onSelectionDragStop: onSelectionDragStop, onMove: onMove, onMoveStart: onMoveStart, onMoveEnd: onMoveEnd, noPanClassName: noPanClassName, nodeOrigin: nodeOrigin, rfId: rfId, autoPanOnConnect: autoPanOnConnect, autoPanOnNodeDrag: autoPanOnNodeDrag, autoPanSpeed: autoPanSpeed, onError: onError, connectionRadius: connectionRadius, isValidConnection: isValidConnection, selectNodesOnDrag: selectNodesOnDrag, nodeDragThreshold: nodeDragThreshold, onBeforeDelete: onBeforeDelete, paneClickDistance: paneClickDistance, debug: debug }), jsxRuntimeExports.jsx(SelectionListener, { onSelectionChange: onSelectionChange }), children, jsxRuntimeExports.jsx(Attribution, { proOptions: proOptions, position: attributionPosition }), jsxRuntimeExports.jsx(A11yDescriptions, { rfId: rfId, disableKeyboardA11y: disableKeyboardA11y })] }) }));
|
|
12054
12092
|
}
|
|
12055
12093
|
/**
|
|
12056
12094
|
* The `<ReactFlow />` component is the heart of your React Flow application.
|
|
@@ -12614,7 +12652,7 @@ MiniMapComponent.displayName = 'MiniMap';
|
|
|
12614
12652
|
*/
|
|
12615
12653
|
memo(MiniMapComponent);
|
|
12616
12654
|
|
|
12617
|
-
function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle, className, style = {}, children, color, minWidth = 10, minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepAspectRatio = false, shouldResize, onResizeStart, onResize, onResizeEnd, }) {
|
|
12655
|
+
function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle, className, style = {}, children, color, minWidth = 10, minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepAspectRatio = false, resizeDirection, shouldResize, onResizeStart, onResize, onResizeEnd, }) {
|
|
12618
12656
|
const contextNodeId = useNodeId();
|
|
12619
12657
|
const id = typeof nodeId === 'string' ? nodeId : contextNodeId;
|
|
12620
12658
|
const store = useStoreApi();
|
|
@@ -12680,11 +12718,12 @@ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle
|
|
|
12680
12718
|
changes.push(positionChange);
|
|
12681
12719
|
}
|
|
12682
12720
|
if (change.width !== undefined && change.height !== undefined) {
|
|
12721
|
+
const setAttributes = !resizeDirection ? true : resizeDirection === 'horizontal' ? 'width' : 'height';
|
|
12683
12722
|
const dimensionChange = {
|
|
12684
12723
|
id,
|
|
12685
12724
|
type: 'dimensions',
|
|
12686
12725
|
resizing: true,
|
|
12687
|
-
setAttributes
|
|
12726
|
+
setAttributes,
|
|
12688
12727
|
dimensions: {
|
|
12689
12728
|
width: change.width,
|
|
12690
12729
|
height: change.height,
|
|
@@ -12724,6 +12763,7 @@ function ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle
|
|
|
12724
12763
|
maxHeight,
|
|
12725
12764
|
},
|
|
12726
12765
|
keepAspectRatio,
|
|
12766
|
+
resizeDirection,
|
|
12727
12767
|
onResizeStart,
|
|
12728
12768
|
onResize,
|
|
12729
12769
|
onResizeEnd,
|
|
@@ -13912,7 +13952,7 @@ const SelectionMenuHeadWrap = styled.div `
|
|
|
13912
13952
|
const SelectionWrap = styled(VerticalScroll) `
|
|
13913
13953
|
max-height: 240px;
|
|
13914
13954
|
`;
|
|
13915
|
-
const DataStreamSelect = ({
|
|
13955
|
+
const DataStreamSelect = ({ onClickNewDataStream }) => {
|
|
13916
13956
|
const theme = Theme.useTheme();
|
|
13917
13957
|
const { dataStreams, selectedStreamName, setSelectedStreamName } = useDataStreamStore();
|
|
13918
13958
|
const containerRef = useRef(null);
|
|
@@ -13927,7 +13967,7 @@ const DataStreamSelect = ({ onClickNewStream }) => {
|
|
|
13927
13967
|
React.createElement(Text, null, selectedStreamName),
|
|
13928
13968
|
React.createElement(ExtendArrow, { extend: popupOpen })),
|
|
13929
13969
|
React.createElement(Divider, { orientation: 'vertical', length: '32px', thickness: 2, margin: '0' }),
|
|
13930
|
-
React.createElement(AddButton$1, { onClick:
|
|
13970
|
+
React.createElement(AddButton$1, { onClick: onClickNewDataStream, label: BUTTON_TEXTS.NEW })),
|
|
13931
13971
|
popupOpen && (React.createElement(AbsoluteContainer$1, { ref: containerRef },
|
|
13932
13972
|
React.createElement(SelectionMenuHeadWrap, null,
|
|
13933
13973
|
React.createElement(Input, { placeholder: 'Search...', icon: SearchIcon, value: searchText, onChange: (e) => setSearchText(e.target.value) })),
|
|
@@ -13948,10 +13988,10 @@ const Container$b = styled.div `
|
|
|
13948
13988
|
const PushToEnd = styled.div `
|
|
13949
13989
|
margin-left: auto;
|
|
13950
13990
|
`;
|
|
13951
|
-
const DataFlowActionsMenu = ({ addEntity,
|
|
13991
|
+
const DataFlowActionsMenu = ({ addEntity, onClickNewDataStream }) => {
|
|
13952
13992
|
const { setCurrentModal } = useModalStore();
|
|
13953
13993
|
return (React.createElement(Container$b, null,
|
|
13954
|
-
|
|
13994
|
+
onClickNewDataStream && React.createElement(DataStreamSelect, { onClickNewDataStream: onClickNewDataStream }),
|
|
13955
13995
|
React.createElement(Search, null),
|
|
13956
13996
|
React.createElement(Filters$1, null),
|
|
13957
13997
|
addEntity && (React.createElement(PushToEnd, null,
|
|
@@ -13970,8 +14010,8 @@ const DataStreamSelectionForm = forwardRef(({ isModal, onClickSummary }, ref) =>
|
|
|
13970
14010
|
return (React.createElement(ModalBody, { "$isNotModal": !isModal, "$minHeight": '70vh' },
|
|
13971
14011
|
React.createElement(FlexColumn, { "$gap": 24 },
|
|
13972
14012
|
onClickSummary && React.createElement(NoteBackToSummary, { onClick: onClickSummary }),
|
|
13973
|
-
React.createElement(SectionTitle, { title: DISPLAY_TITLES.
|
|
13974
|
-
React.createElement(AutocompleteInput, { placeholder: DISPLAY_TITLES.
|
|
14013
|
+
React.createElement(SectionTitle, { title: DISPLAY_TITLES.NAME_YOUR_STREAM, description: DISPLAY_TITLES.STREAM_DESCRIPTION }),
|
|
14014
|
+
React.createElement(AutocompleteInput, { placeholder: DISPLAY_TITLES.NAME_YOUR_STREAM_PLACEHOLDER, autoFocus: true, options: dataStreamOptions, defaultText: nameInput, onTextChange: setNameInput }))));
|
|
13975
14015
|
});
|
|
13976
14016
|
|
|
13977
14017
|
const buildMonitorsList = (exportedSignals) => Object.keys(exportedSignals)
|
|
@@ -14344,7 +14384,7 @@ const DEFAULT_CATEGORY = DROPDOWN_OPTIONS[0];
|
|
|
14344
14384
|
const DEFAULT_MONITORS = [SignalType.Logs, SignalType.Metrics, SignalType.Traces];
|
|
14345
14385
|
const createConfiguredItems = (destinations, selectedStreamName, configuredDestinationIds) => destinations.map((dest) => {
|
|
14346
14386
|
const { type, displayName } = dest.destinationType;
|
|
14347
|
-
const isInSelectedStream = dest.
|
|
14387
|
+
const isInSelectedStream = dest.dataStreamNames?.includes(selectedStreamName);
|
|
14348
14388
|
const isConfigured = configuredDestinationIds.has(dest.id);
|
|
14349
14389
|
return {
|
|
14350
14390
|
id: dest.id,
|
|
@@ -14362,8 +14402,8 @@ const createConfiguredItems = (destinations, selectedStreamName, configuredDesti
|
|
|
14362
14402
|
});
|
|
14363
14403
|
const ChooseDestinationBody = ({ hidden, categories, potentialDestinations, onSelectOption, onSelectConfigured }) => {
|
|
14364
14404
|
const { destinations } = useEntityStore();
|
|
14365
|
-
const { configuredDestinations } = useSetupStore();
|
|
14366
14405
|
const { selectedStreamName } = useDataStreamStore();
|
|
14406
|
+
const { configuredDestinations, configuredDestinationsUpdateOnly } = useSetupStore();
|
|
14367
14407
|
const [search, setSearch] = useState('');
|
|
14368
14408
|
const [selectedCategory, setSelectedCategory] = useState(DEFAULT_CATEGORY);
|
|
14369
14409
|
const [selectedMonitors, setSelectedMonitors] = useState(DEFAULT_MONITORS);
|
|
@@ -14374,7 +14414,7 @@ const ChooseDestinationBody = ({ hidden, categories, potentialDestinations, onSe
|
|
|
14374
14414
|
description: EXISTS.DESCRIPTION,
|
|
14375
14415
|
icon: CheckIcon,
|
|
14376
14416
|
// !! do not "filterDestinationsByStream" here, because we need all destinations to select already configured
|
|
14377
|
-
items: createConfiguredItems(destinations, selectedStreamName, new Set(configuredDestinations.map((d) => d.id))),
|
|
14417
|
+
items: createConfiguredItems(destinations, selectedStreamName, new Set(configuredDestinations.concat(configuredDestinationsUpdateOnly).map((d) => d.id))),
|
|
14378
14418
|
});
|
|
14379
14419
|
clonedDestinationsCategories.unshift({
|
|
14380
14420
|
name: DETECTED.TITLE,
|
|
@@ -14421,45 +14461,32 @@ const SideMenuWrapper = styled.div `
|
|
|
14421
14461
|
display: none;
|
|
14422
14462
|
}
|
|
14423
14463
|
`;
|
|
14424
|
-
const DestinationModal = ({ isOnboarding, categories, potentialDestinations, createDestination,
|
|
14464
|
+
const DestinationModal = ({ isOnboarding, categories, potentialDestinations, createDestination, testConnection }) => {
|
|
14425
14465
|
const { destinations } = useEntityStore();
|
|
14426
14466
|
const { selectedStreamName } = useDataStreamStore();
|
|
14427
|
-
const { addConfiguredDestination } = useSetupStore();
|
|
14428
14467
|
const { currentModal, setCurrentModal } = useModalStore();
|
|
14468
|
+
const { addConfiguredDestination, addConfiguredDestinationUpdateOnly } = useSetupStore();
|
|
14429
14469
|
const isOpen = currentModal === EntityTypes.Destination;
|
|
14430
14470
|
const [selectedItem, setSelectedItem] = useState(undefined);
|
|
14431
14471
|
const { formData, formErrors, handleFormChange, resetFormData, validateForm, setYamlFields, dynamicFields, setDynamicFields } = useDestinationFormData({
|
|
14432
14472
|
supportedSignals: selectedItem?.supportedSignals,
|
|
14433
14473
|
preLoadedFields: selectedItem?.fields,
|
|
14434
14474
|
});
|
|
14435
|
-
const
|
|
14436
|
-
const
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
|
|
14448
|
-
updateDestination(alreadyConfigDest.id, payload);
|
|
14449
|
-
};
|
|
14450
|
-
const handleAddOnboarding = () => {
|
|
14451
|
-
const fields = {};
|
|
14452
|
-
dynamicFields.forEach((f) => {
|
|
14453
|
-
fields[f.name] = (f.componentType === FieldTypes.Dropdown ? f.value?.value || '' : f.value);
|
|
14454
|
-
});
|
|
14455
|
-
addConfiguredDestination({
|
|
14456
|
-
id: formData.type,
|
|
14457
|
-
name: formData.name,
|
|
14458
|
-
streamNames: [],
|
|
14459
|
-
conditions: [],
|
|
14460
|
-
exportedSignals: formData.exportedSignals,
|
|
14475
|
+
const getDestPayload = (alreadyConfigDest) => {
|
|
14476
|
+
const fields = alreadyConfigDest ? safeJsonParse(alreadyConfigDest.fields, {}) : {};
|
|
14477
|
+
if (!alreadyConfigDest) {
|
|
14478
|
+
dynamicFields.forEach((f) => {
|
|
14479
|
+
fields[f.name] = (f.componentType === FieldTypes.Dropdown ? f.value?.value || '' : f.value);
|
|
14480
|
+
});
|
|
14481
|
+
}
|
|
14482
|
+
return {
|
|
14483
|
+
id: alreadyConfigDest?.id || formData.type,
|
|
14484
|
+
name: alreadyConfigDest?.name || formData.name,
|
|
14485
|
+
dataStreamNames: alreadyConfigDest?.dataStreamNames || [],
|
|
14486
|
+
conditions: alreadyConfigDest?.conditions || [],
|
|
14487
|
+
exportedSignals: alreadyConfigDest?.exportedSignals || formData.exportedSignals,
|
|
14461
14488
|
fields: JSON.stringify(fields),
|
|
14462
|
-
destinationType: {
|
|
14489
|
+
destinationType: alreadyConfigDest?.destinationType || {
|
|
14463
14490
|
type: selectedItem.type,
|
|
14464
14491
|
displayName: selectedItem.displayName,
|
|
14465
14492
|
supportedSignals: {
|
|
@@ -14468,15 +14495,15 @@ const DestinationModal = ({ isOnboarding, categories, potentialDestinations, cre
|
|
|
14468
14495
|
traces: { supported: false },
|
|
14469
14496
|
},
|
|
14470
14497
|
},
|
|
14471
|
-
}
|
|
14498
|
+
};
|
|
14472
14499
|
};
|
|
14473
14500
|
const handleAdd = (alreadyConfigDest) => {
|
|
14474
14501
|
// Handle case from already configured
|
|
14475
14502
|
if (alreadyConfigDest)
|
|
14476
|
-
return
|
|
14503
|
+
return addConfiguredDestinationUpdateOnly(getDestPayload(alreadyConfigDest));
|
|
14477
14504
|
// Handle new cases from onboarding
|
|
14478
14505
|
if (isOnboarding)
|
|
14479
|
-
return
|
|
14506
|
+
return addConfiguredDestination(getDestPayload());
|
|
14480
14507
|
// Handle new cases from overview
|
|
14481
14508
|
else
|
|
14482
14509
|
return createDestination(formData);
|
|
@@ -14554,12 +14581,12 @@ const Container$7 = styled.div `
|
|
|
14554
14581
|
overflow-y: scroll;
|
|
14555
14582
|
`;
|
|
14556
14583
|
const DestinationList = ({ withDelete }) => {
|
|
14557
|
-
const { configuredDestinations } = useSetupStore();
|
|
14558
|
-
if (!configuredDestinations.length) {
|
|
14584
|
+
const { configuredDestinations, configuredDestinationsUpdateOnly } = useSetupStore();
|
|
14585
|
+
if (!configuredDestinations.length && !configuredDestinationsUpdateOnly.length) {
|
|
14559
14586
|
return (React.createElement(CenterThis, null,
|
|
14560
14587
|
React.createElement(NoDataFound, { title: 'No destinations', subTitle: 'Please add a destination' })));
|
|
14561
14588
|
}
|
|
14562
|
-
return (React.createElement(Container$7, null, configuredDestinations.map((dest, idx) => (React.createElement(ListItem, { key: `configured-destination-${dest.destinationType.type}-${idx}`, "data-id": `configured-destination-${dest.destinationType.type}`, item: dest, isLastItem: configuredDestinations.length === 1, withDelete: withDelete })))));
|
|
14589
|
+
return (React.createElement(Container$7, null, configuredDestinations.concat(configuredDestinationsUpdateOnly).map((dest, idx) => (React.createElement(ListItem, { key: `configured-destination-${dest.destinationType.type}-${idx}`, "data-id": `configured-destination-${dest.destinationType.type}`, item: dest, isLastItem: configuredDestinations.length + configuredDestinationsUpdateOnly.length === 1, withDelete: withDelete })))));
|
|
14563
14590
|
};
|
|
14564
14591
|
const ListItem = ({ item, isLastItem, withDelete }) => {
|
|
14565
14592
|
const { removeConfiguredDestination } = useSetupStore();
|
|
@@ -14590,17 +14617,17 @@ const LargeAndWideAddButton = styled(Button) `
|
|
|
14590
14617
|
border-radius: 16px;
|
|
14591
14618
|
border-style: dashed !important;
|
|
14592
14619
|
`;
|
|
14593
|
-
const DestinationSelectionForm = ({ isSourcesListEmpty, goToSources, categories, potentialDestinations,
|
|
14620
|
+
const DestinationSelectionForm = ({ isSourcesListEmpty, goToSources, categories, potentialDestinations, testConnection, onClickSummary }) => {
|
|
14594
14621
|
const theme = Theme.useTheme();
|
|
14595
14622
|
const { setCurrentModal } = useModalStore();
|
|
14596
|
-
const { configuredDestinations } = useSetupStore();
|
|
14623
|
+
const { configuredDestinations, configuredDestinationsUpdateOnly } = useSetupStore();
|
|
14597
14624
|
const onOpen = () => setCurrentModal(EntityTypes.Destination);
|
|
14598
14625
|
return (React.createElement(React.Fragment, null,
|
|
14599
14626
|
React.createElement(ModalBody, { "$isNotModal": true },
|
|
14600
14627
|
React.createElement(FlexColumn, { "$gap": 12 },
|
|
14601
14628
|
React.createElement(FlexColumn, { "$gap": 24 },
|
|
14602
14629
|
onClickSummary && React.createElement(NoteBackToSummary, { onClick: onClickSummary }),
|
|
14603
|
-
React.createElement(SectionTitle, { title: DISPLAY_TITLES.ADD_DESTINATIONS, badgeLabel: configuredDestinations.length, description: DISPLAY_TITLES.ADD_DESTINATION_DESCRIPTION }),
|
|
14630
|
+
React.createElement(SectionTitle, { title: DISPLAY_TITLES.ADD_DESTINATIONS, badgeLabel: configuredDestinations.length + configuredDestinationsUpdateOnly.length, description: DISPLAY_TITLES.ADD_DESTINATION_DESCRIPTION }),
|
|
14604
14631
|
isSourcesListEmpty && (React.createElement(NotificationNote, { type: StatusType.Warning, message: DISPLAY_TITLES.NO_SOURCES_GO_BACK, action: {
|
|
14605
14632
|
label: DISPLAY_TITLES.SELECT_SOURCES,
|
|
14606
14633
|
onClick: goToSources,
|
|
@@ -14609,7 +14636,7 @@ const DestinationSelectionForm = ({ isSourcesListEmpty, goToSources, categories,
|
|
|
14609
14636
|
React.createElement(PlusIcon$1, null),
|
|
14610
14637
|
React.createElement(Text, { color: theme.colors.secondary, size: 14, decoration: 'underline', family: 'secondary' }, DISPLAY_TITLES.ADD_DESTINATION))),
|
|
14611
14638
|
React.createElement(DestinationList, { withDelete: true }))),
|
|
14612
|
-
React.createElement(DestinationModal, { isOnboarding: true, categories: categories, potentialDestinations: potentialDestinations, createDestination: () => { },
|
|
14639
|
+
React.createElement(DestinationModal, { isOnboarding: true, categories: categories, potentialDestinations: potentialDestinations, createDestination: () => { }, testConnection: testConnection })));
|
|
14613
14640
|
};
|
|
14614
14641
|
|
|
14615
14642
|
const columns$2 = [
|
|
@@ -15160,7 +15187,14 @@ const MultiSourceControl = ({ totalSourceCount, uninstrumentSources }) => {
|
|
|
15160
15187
|
setSelectedSources({});
|
|
15161
15188
|
};
|
|
15162
15189
|
const onDelete = () => {
|
|
15163
|
-
|
|
15190
|
+
const payload = {};
|
|
15191
|
+
Object.entries(selectedSources).forEach(([ns, sources]) => {
|
|
15192
|
+
payload[ns] = sources.map((source) => ({
|
|
15193
|
+
...source,
|
|
15194
|
+
selected: false,
|
|
15195
|
+
}));
|
|
15196
|
+
});
|
|
15197
|
+
uninstrumentSources(payload);
|
|
15164
15198
|
setIsWarnModalOpen(false);
|
|
15165
15199
|
onDeselect();
|
|
15166
15200
|
};
|
|
@@ -15427,16 +15461,18 @@ const Container$3 = styled.div `
|
|
|
15427
15461
|
height: fit-content;
|
|
15428
15462
|
overflow-y: scroll;
|
|
15429
15463
|
`;
|
|
15430
|
-
const SetupSummary = ({ onEditSources, onEditDestinations }) => {
|
|
15431
|
-
const {
|
|
15464
|
+
const SetupSummary = ({ onEditStream, onEditSources, onEditDestinations }) => {
|
|
15465
|
+
const { selectedStreamName } = useDataStreamStore();
|
|
15466
|
+
const { configuredSources, configuredDestinations, configuredDestinationsUpdateOnly } = useSetupStore();
|
|
15432
15467
|
const sourceCount = useMemo(() => Object.values(configuredSources).reduce((total, sourceList) => total + sourceList.filter((s) => s.selected).length, 0), [configuredSources]);
|
|
15433
15468
|
return (React.createElement(ModalBody, { "$isNotModal": true },
|
|
15434
15469
|
React.createElement(FlexColumn, { "$gap": 12 },
|
|
15435
15470
|
React.createElement(SectionTitle, { title: DISPLAY_TITLES.SUMMARY, description: DISPLAY_TITLES.STREAM_CONFIRM }),
|
|
15436
15471
|
React.createElement(Container$3, null,
|
|
15472
|
+
React.createElement(DataCard, { title: DISPLAY_TITLES.STREAM_NAME, action: () => React.createElement(EditButton, { onClick: onEditStream }), data: [{ title: '', value: selectedStreamName }] }),
|
|
15437
15473
|
React.createElement(DataCard, { title: DISPLAY_TITLES.SELECTED_SOURCES, titleBadge: sourceCount, action: () => React.createElement(EditButton, { onClick: onEditSources }) },
|
|
15438
15474
|
React.createElement(SourceList, { filteredNamespacesAndSources: configuredSources, withInstances: false })),
|
|
15439
|
-
React.createElement(DataCard, { title: DISPLAY_TITLES.SELECTED_DESTINATIONS, titleBadge: configuredDestinations.length, action: () => React.createElement(EditButton, { onClick: onEditDestinations }) },
|
|
15475
|
+
React.createElement(DataCard, { title: DISPLAY_TITLES.SELECTED_DESTINATIONS, titleBadge: configuredDestinations.length + configuredDestinationsUpdateOnly.length, action: () => React.createElement(EditButton, { onClick: onEditDestinations }) },
|
|
15440
15476
|
React.createElement(DestinationList, null))))));
|
|
15441
15477
|
};
|
|
15442
15478
|
|