2019-06-23 03:35:23 -07:00
|
|
|
<template>
|
2023-01-30 09:20:50 -08:00
|
|
|
<div
|
|
|
|
class="node-wrapper"
|
|
|
|
:style="nodePosition"
|
|
|
|
:id="nodeId"
|
|
|
|
data-test-id="canvas-node"
|
|
|
|
:ref="data.name"
|
|
|
|
:data-name="data.name"
|
|
|
|
>
|
2021-11-19 01:17:13 -08:00
|
|
|
<div class="select-background" v-show="isSelected"></div>
|
2022-12-14 01:04:10 -08:00
|
|
|
<div
|
|
|
|
:class="{
|
|
|
|
'node-default': true,
|
|
|
|
'touch-active': isTouchActive,
|
|
|
|
'is-touch-device': isTouchDevice,
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
:class="nodeClass"
|
|
|
|
:style="nodeStyle"
|
|
|
|
@click.left="onClick"
|
|
|
|
v-touch:start="touchStart"
|
|
|
|
v-touch:end="touchEnd"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-if="!data.disabled"
|
|
|
|
:class="{ 'node-info-icon': true, 'shift-icon': shiftOutputCount }"
|
|
|
|
>
|
2021-11-19 01:17:13 -08:00
|
|
|
<div v-if="hasIssues" class="node-issues">
|
2022-12-14 01:04:10 -08:00
|
|
|
<n8n-tooltip placement="bottom">
|
2022-11-18 05:59:31 -08:00
|
|
|
<template #content>
|
|
|
|
<titled-list :title="`${$locale.baseText('node.issues')}:`" :items="nodeIssues" />
|
|
|
|
</template>
|
2021-11-19 01:17:13 -08:00
|
|
|
<font-awesome-icon icon="exclamation-triangle" />
|
|
|
|
</n8n-tooltip>
|
|
|
|
</div>
|
|
|
|
<div v-else-if="waiting" class="waiting">
|
|
|
|
<n8n-tooltip placement="bottom">
|
2022-11-18 05:59:31 -08:00
|
|
|
<template #content>
|
|
|
|
<div v-text="waiting"></div>
|
|
|
|
</template>
|
2021-11-19 01:17:13 -08:00
|
|
|
<font-awesome-icon icon="clock" />
|
|
|
|
</n8n-tooltip>
|
|
|
|
</div>
|
2022-11-14 04:28:26 -08:00
|
|
|
<span v-else-if="showPinnedDataInfo" class="node-pin-data-icon">
|
2022-07-20 08:50:39 -07:00
|
|
|
<font-awesome-icon icon="thumbtack" />
|
|
|
|
<span v-if="workflowDataItems > 1" class="items-count"> {{ workflowDataItems }}</span>
|
|
|
|
</span>
|
2021-11-19 01:17:13 -08:00
|
|
|
<span v-else-if="workflowDataItems" class="data-count">
|
|
|
|
<font-awesome-icon icon="check" />
|
|
|
|
<span v-if="workflowDataItems > 1" class="items-count"> {{ workflowDataItems }}</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
2019-07-25 12:57:27 -07:00
|
|
|
|
2021-12-15 04:16:53 -08:00
|
|
|
<div class="node-executing-info" :title="$locale.baseText('node.nodeIsExecuting')">
|
2021-11-19 01:17:13 -08:00
|
|
|
<font-awesome-icon icon="sync-alt" spin />
|
|
|
|
</div>
|
2021-08-21 05:11:32 -07:00
|
|
|
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
<div class="node-trigger-tooltip__wrapper">
|
2022-12-14 01:04:10 -08:00
|
|
|
<n8n-tooltip
|
|
|
|
placement="top"
|
|
|
|
manual
|
|
|
|
:value="showTriggerNodeTooltip"
|
|
|
|
popper-class="node-trigger-tooltip__wrapper--item"
|
|
|
|
>
|
2022-11-18 05:59:31 -08:00
|
|
|
<template #content>
|
|
|
|
<div v-text="getTriggerNodeTooltip"></div>
|
|
|
|
</template>
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
<span />
|
|
|
|
</n8n-tooltip>
|
2022-07-20 08:50:39 -07:00
|
|
|
<n8n-tooltip
|
|
|
|
v-if="isTriggerNode"
|
|
|
|
placement="top"
|
|
|
|
manual
|
|
|
|
:value="pinDataDiscoveryTooltipVisible"
|
|
|
|
popper-class="node-trigger-tooltip__wrapper--item"
|
|
|
|
>
|
|
|
|
<template #content>
|
|
|
|
{{ $locale.baseText('node.discovery.pinData.canvas') }}
|
|
|
|
</template>
|
|
|
|
<span />
|
|
|
|
</n8n-tooltip>
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
</div>
|
|
|
|
|
2022-12-14 01:04:10 -08:00
|
|
|
<NodeIcon
|
|
|
|
class="node-icon"
|
|
|
|
:nodeType="nodeType"
|
|
|
|
:size="40"
|
|
|
|
:shrink="false"
|
|
|
|
:disabled="this.data.disabled"
|
|
|
|
/>
|
2019-06-23 03:35:23 -07:00
|
|
|
</div>
|
2021-11-19 01:17:13 -08:00
|
|
|
|
|
|
|
<div class="node-options no-select-on-click" v-if="!isReadOnly" v-show="!hideActions">
|
2022-12-15 05:06:00 -08:00
|
|
|
<div
|
|
|
|
v-touch:tap="deleteNode"
|
|
|
|
class="option"
|
|
|
|
:title="$locale.baseText('node.deleteNode')"
|
|
|
|
data-test-id="delete-node-button"
|
|
|
|
>
|
2019-07-25 12:57:27 -07:00
|
|
|
<font-awesome-icon icon="trash" />
|
|
|
|
</div>
|
2022-12-14 01:04:10 -08:00
|
|
|
<div
|
|
|
|
v-touch:tap="disableNode"
|
|
|
|
class="option"
|
|
|
|
:title="$locale.baseText('node.activateDeactivateNode')"
|
2022-12-14 01:33:44 -08:00
|
|
|
data-test-id="disable-node-button"
|
2022-12-14 01:04:10 -08:00
|
|
|
>
|
2019-07-25 12:57:27 -07:00
|
|
|
<font-awesome-icon :icon="nodeDisabledIcon" />
|
|
|
|
</div>
|
2022-12-14 01:04:10 -08:00
|
|
|
<div
|
|
|
|
v-touch:tap="duplicateNode"
|
|
|
|
class="option"
|
|
|
|
:title="$locale.baseText('node.duplicateNode')"
|
|
|
|
v-if="isDuplicatable"
|
2022-12-14 01:33:44 -08:00
|
|
|
data-test-id="duplicate-node-button"
|
2022-12-14 01:04:10 -08:00
|
|
|
>
|
2019-07-25 12:57:27 -07:00
|
|
|
<font-awesome-icon icon="clone" />
|
|
|
|
</div>
|
2022-12-14 01:04:10 -08:00
|
|
|
<div
|
|
|
|
v-touch:tap="setNodeActive"
|
|
|
|
class="option touch"
|
|
|
|
:title="$locale.baseText('node.editNode')"
|
2022-12-14 01:33:44 -08:00
|
|
|
data-test-id="activate-node-button"
|
2022-12-14 01:04:10 -08:00
|
|
|
>
|
2020-02-15 17:29:08 -08:00
|
|
|
<font-awesome-icon class="execute-icon" icon="cog" />
|
|
|
|
</div>
|
2022-12-14 01:04:10 -08:00
|
|
|
<div
|
|
|
|
v-touch:tap="executeNode"
|
|
|
|
class="option"
|
|
|
|
:title="$locale.baseText('node.executeNode')"
|
|
|
|
v-if="!workflowRunning"
|
2022-12-14 01:33:44 -08:00
|
|
|
data-test-id="execute-node-button"
|
2022-12-14 01:04:10 -08:00
|
|
|
>
|
2019-07-25 12:57:27 -07:00
|
|
|
<font-awesome-icon class="execute-icon" icon="play-circle" />
|
|
|
|
</div>
|
2019-06-23 03:35:23 -07:00
|
|
|
</div>
|
2022-12-14 01:04:10 -08:00
|
|
|
<div
|
|
|
|
:class="{ 'disabled-linethrough': true, success: workflowDataItems > 0 }"
|
|
|
|
v-if="showDisabledLinethrough"
|
|
|
|
></div>
|
2019-06-23 03:35:23 -07:00
|
|
|
</div>
|
2019-07-25 09:50:45 -07:00
|
|
|
<div class="node-description">
|
2022-09-21 01:20:29 -07:00
|
|
|
<div class="node-name ph-no-capture" :title="nodeTitle">
|
2022-11-25 04:09:44 -08:00
|
|
|
<p data-test-id="canvas-node-box-title">
|
2021-11-29 00:34:59 -08:00
|
|
|
{{ nodeTitle }}
|
2021-11-20 06:58:21 -08:00
|
|
|
</p>
|
2022-12-14 01:04:10 -08:00
|
|
|
<p v-if="data.disabled">({{ $locale.baseText('node.disabled') }})</p>
|
2019-07-25 09:50:45 -07:00
|
|
|
</div>
|
|
|
|
<div v-if="nodeSubtitle !== undefined" class="node-subtitle" :title="nodeSubtitle">
|
2021-11-20 06:58:21 -08:00
|
|
|
{{ nodeSubtitle }}
|
2019-07-25 09:50:45 -07:00
|
|
|
</div>
|
2019-06-23 03:35:23 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2022-12-14 01:04:10 -08:00
|
|
|
import {
|
|
|
|
CUSTOM_API_CALL_KEY,
|
|
|
|
LOCAL_STORAGE_PIN_DATA_DISCOVERY_CANVAS_FLAG,
|
|
|
|
WAIT_TIME_UNLIMITED,
|
|
|
|
MANUAL_TRIGGER_NODE_TYPE,
|
|
|
|
} from '@/constants';
|
2022-11-23 04:41:53 -08:00
|
|
|
import { externalHooks } from '@/mixins/externalHooks';
|
|
|
|
import { nodeBase } from '@/mixins/nodeBase';
|
|
|
|
import { nodeHelpers } from '@/mixins/nodeHelpers';
|
|
|
|
import { workflowHelpers } from '@/mixins/workflowHelpers';
|
|
|
|
import { pinData } from '@/mixins/pinData';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2022-12-14 01:04:10 -08:00
|
|
|
import { IDataObject, INodeTypeDescription, ITaskData, NodeHelpers } from 'n8n-workflow';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
import NodeIcon from '@/components/NodeIcon.vue';
|
2022-09-05 07:36:22 -07:00
|
|
|
import TitledList from '@/components/TitledList.vue';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
|
|
|
import mixins from 'vue-typed-mixins';
|
|
|
|
|
2021-08-21 05:11:32 -07:00
|
|
|
import { get } from 'lodash';
|
2022-11-23 04:41:53 -08:00
|
|
|
import { getStyleTokenValue, getTriggerNodeServiceName } from '@/utils';
|
2022-12-14 01:04:10 -08:00
|
|
|
import {
|
|
|
|
IExecutionsSummary,
|
|
|
|
INodeUi,
|
|
|
|
INodeUpdatePropertiesInformation,
|
|
|
|
XYPosition,
|
|
|
|
} from '@/Interface';
|
2022-11-23 04:41:53 -08:00
|
|
|
import { debounceHelper } from '@/mixins/debounce';
|
2022-11-04 06:04:31 -07:00
|
|
|
import { mapStores } from 'pinia';
|
|
|
|
import { useUIStore } from '@/stores/ui';
|
|
|
|
import { useWorkflowsStore } from '@/stores/workflows';
|
|
|
|
import { useNDVStore } from '@/stores/ndv';
|
|
|
|
import { useNodeTypesStore } from '@/stores/nodeTypes';
|
2022-12-09 06:07:37 -08:00
|
|
|
import { EnableNodeToggleCommand } from '@/models/history';
|
2021-08-21 05:11:32 -07:00
|
|
|
|
2022-07-20 08:50:39 -07:00
|
|
|
export default mixins(
|
|
|
|
externalHooks,
|
|
|
|
nodeBase,
|
|
|
|
nodeHelpers,
|
|
|
|
workflowHelpers,
|
|
|
|
pinData,
|
2022-10-20 06:45:58 -07:00
|
|
|
debounceHelper,
|
2022-07-20 08:50:39 -07:00
|
|
|
).extend({
|
2019-06-23 03:35:23 -07:00
|
|
|
name: 'Node',
|
|
|
|
components: {
|
2022-09-05 07:36:22 -07:00
|
|
|
TitledList,
|
2019-06-23 03:35:23 -07:00
|
|
|
NodeIcon,
|
|
|
|
},
|
2022-11-14 04:28:26 -08:00
|
|
|
props: {
|
|
|
|
isProductionExecutionPreview: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
computed: {
|
2022-12-14 01:04:10 -08:00
|
|
|
...mapStores(useNodeTypesStore, useNDVStore, useUIStore, useWorkflowsStore),
|
2022-11-14 04:28:26 -08:00
|
|
|
showPinnedDataInfo(): boolean {
|
|
|
|
return this.hasPinData && !this.isProductionExecutionPreview;
|
|
|
|
},
|
feat(editor, core, cli): implement new workflow experience (#4358)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node (#4108)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node
* feat(editor): Do not show duplicate button if canvas contains `maxNodes` amount of nodes
* feat(ManualTrigger node): Implement ManualTrigger node (#4110)
* feat(ManualTrigger node): Implement ManualTrigger node
* :memo: Remove generics doc items from ManualTrigger node
* feat(editor-ui): Trigger tab redesign (#4150)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* 🎨 Use kebab case for main-panel and icon component
* :label: Improve types
* feat(editor-ui): Redesign search input inside node creator panel (#4204)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* :sparkles: Redesign search input and unify usage of categorized items
* :label: Use lowercase "Boolean" as `isSearchVisible` computed return type
* :fire: Remove useless emit
* :sparkles: Implement no result view based on subcategory, minor fixes
* :art: Remove unused properties
* feat(node-email): Change EmailReadImap display name and name (#4239)
* feat(editor-ui): Implement "Choose a Triger" action and related behaviour (#4226)
* :sparkles: Implement "Choose a Triger" action and related behaviour
* :mute: Lint fix
* :recycle: Remove PlaceholderTrigger node, add a button instead
* :art: Merge onMouseEnter and onMouseLeave to a single function
* :bulb: Add comment
* :fire: Remove PlaceholderNode registration
* :art: Rename TriggerPlaceholderButton to CanvasAddButton
* :sparkles: Add method to unregister custom action and rework CanvasAddButton centering logic
* :art: Run `setRecenteredCanvasAddButtonPosition` on `CanvasAddButton` mount
* fix(editor): Fix selecting of node from node-creator panel by clicking
* :twisted_rightwards_arrows: Merge fixes
* fix(editor): Show execute workflow trigger instead of workflow trigger in the trigger helper panel
* feat(editor): Fix node creator panel slide transition (#4261)
* fix(editor): Fix node creator panel slide-in/slide-out transitions
* :art: Fix naming
* :art: Use kebab-case for transition component name
* feat(editor): Disable execution and show notice when user tries to run workflow without enabled triggers
* fix(editor): Address first batch of new WF experience review (#4279)
* fix(editor): Fix first batch of review items
* bug(editor): Fix nodeview canvas add button centering
* :mute: Fix linter errors
* bug(ManualTrigger Node): Fix manual trigger node execution
* fix(editor): Do not show canvas add button in execution or demo mode and prevent clicking if creator is open
* fix(editor): do not show pin data tooltip for manual trigger node
* fix(editor): do not use nodeViewOffset on zoomToFit
* :lipstick: Add margin for last node creator item and set font-weight to 700 for category title
* :sparkles: Position welcome note next to the added trigger node
* :bug: Remve always true welcome note
* feat(editor): Minor UI and UX tweaks (#4328)
* :lipstick: Make top viewport buttons less prominent
* :sparkles: Allow user to switch to all tabs if it contains filter results, move nodecreator state props to its own module
* :mute: Fix linting errors
* :mute: Fix linting errors
* :mute: Fix linting errors
* chore(build): Ping Turbo version to 1.5.5
* :lipstick: Minor traigger panel and node view style changes
* :speech_balloon: Update display name of execute workflow trigger
* feat(core, editor): Update subworkflow execution logic (#4269)
* :sparkles: Implement `findWorkflowStart`
* :zap: Extend `WorkflowOperationError`
* :zap: Add `WorkflowOperationError` to toast
* :blue_book: Extend interface
* :sparkles: Add `subworkflowExecutionError` to store
* :sparkles: Create `SubworkflowOperationError`
* :zap: Render subworkflow error as node error
* :truck: Move subworkflow start validation to `cli`
* :zap: Reset subworkflow execution error state
* :fire: Remove unused import
* :zap: Adjust CLI commands
* :fire: Remove unneeded check
* :fire: Remove stray log
* :zap: Simplify syntax
* :zap: Sort in case both Start and EWT present
* :recycle: Address Omar's feedback
* :fire: Remove unneeded lint exception
* :pencil2: Fix copy
* :shirt: Fix lint
* fix: moved find start node function to catchable place
Co-authored-by: Omar Ajoue <krynble@gmail.com>
* :lipstick: Change ExecuteWorkflow node to primary
* :sparkles: Allow user to navigate to all tab if it contains search results
* :bug: Fixed canvas control button while in demo, disable workflow activation for non-activavle nodes and revert zoomToFit bottom offset
* :fix: Do not chow request text if there's results
* :speech_balloon: Update noResults text
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
2022-10-18 05:23:22 -07:00
|
|
|
isDuplicatable(): boolean {
|
2022-12-14 01:04:10 -08:00
|
|
|
if (!this.nodeType) return true;
|
|
|
|
return (
|
|
|
|
this.nodeType.maxNodes === undefined || this.sameTypeNodes.length < this.nodeType.maxNodes
|
|
|
|
);
|
feat(editor, core, cli): implement new workflow experience (#4358)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node (#4108)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node
* feat(editor): Do not show duplicate button if canvas contains `maxNodes` amount of nodes
* feat(ManualTrigger node): Implement ManualTrigger node (#4110)
* feat(ManualTrigger node): Implement ManualTrigger node
* :memo: Remove generics doc items from ManualTrigger node
* feat(editor-ui): Trigger tab redesign (#4150)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* 🎨 Use kebab case for main-panel and icon component
* :label: Improve types
* feat(editor-ui): Redesign search input inside node creator panel (#4204)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* :sparkles: Redesign search input and unify usage of categorized items
* :label: Use lowercase "Boolean" as `isSearchVisible` computed return type
* :fire: Remove useless emit
* :sparkles: Implement no result view based on subcategory, minor fixes
* :art: Remove unused properties
* feat(node-email): Change EmailReadImap display name and name (#4239)
* feat(editor-ui): Implement "Choose a Triger" action and related behaviour (#4226)
* :sparkles: Implement "Choose a Triger" action and related behaviour
* :mute: Lint fix
* :recycle: Remove PlaceholderTrigger node, add a button instead
* :art: Merge onMouseEnter and onMouseLeave to a single function
* :bulb: Add comment
* :fire: Remove PlaceholderNode registration
* :art: Rename TriggerPlaceholderButton to CanvasAddButton
* :sparkles: Add method to unregister custom action and rework CanvasAddButton centering logic
* :art: Run `setRecenteredCanvasAddButtonPosition` on `CanvasAddButton` mount
* fix(editor): Fix selecting of node from node-creator panel by clicking
* :twisted_rightwards_arrows: Merge fixes
* fix(editor): Show execute workflow trigger instead of workflow trigger in the trigger helper panel
* feat(editor): Fix node creator panel slide transition (#4261)
* fix(editor): Fix node creator panel slide-in/slide-out transitions
* :art: Fix naming
* :art: Use kebab-case for transition component name
* feat(editor): Disable execution and show notice when user tries to run workflow without enabled triggers
* fix(editor): Address first batch of new WF experience review (#4279)
* fix(editor): Fix first batch of review items
* bug(editor): Fix nodeview canvas add button centering
* :mute: Fix linter errors
* bug(ManualTrigger Node): Fix manual trigger node execution
* fix(editor): Do not show canvas add button in execution or demo mode and prevent clicking if creator is open
* fix(editor): do not show pin data tooltip for manual trigger node
* fix(editor): do not use nodeViewOffset on zoomToFit
* :lipstick: Add margin for last node creator item and set font-weight to 700 for category title
* :sparkles: Position welcome note next to the added trigger node
* :bug: Remve always true welcome note
* feat(editor): Minor UI and UX tweaks (#4328)
* :lipstick: Make top viewport buttons less prominent
* :sparkles: Allow user to switch to all tabs if it contains filter results, move nodecreator state props to its own module
* :mute: Fix linting errors
* :mute: Fix linting errors
* :mute: Fix linting errors
* chore(build): Ping Turbo version to 1.5.5
* :lipstick: Minor traigger panel and node view style changes
* :speech_balloon: Update display name of execute workflow trigger
* feat(core, editor): Update subworkflow execution logic (#4269)
* :sparkles: Implement `findWorkflowStart`
* :zap: Extend `WorkflowOperationError`
* :zap: Add `WorkflowOperationError` to toast
* :blue_book: Extend interface
* :sparkles: Add `subworkflowExecutionError` to store
* :sparkles: Create `SubworkflowOperationError`
* :zap: Render subworkflow error as node error
* :truck: Move subworkflow start validation to `cli`
* :zap: Reset subworkflow execution error state
* :fire: Remove unused import
* :zap: Adjust CLI commands
* :fire: Remove unneeded check
* :fire: Remove stray log
* :zap: Simplify syntax
* :zap: Sort in case both Start and EWT present
* :recycle: Address Omar's feedback
* :fire: Remove unneeded lint exception
* :pencil2: Fix copy
* :shirt: Fix lint
* fix: moved find start node function to catchable place
Co-authored-by: Omar Ajoue <krynble@gmail.com>
* :lipstick: Change ExecuteWorkflow node to primary
* :sparkles: Allow user to navigate to all tab if it contains search results
* :bug: Fixed canvas control button while in demo, disable workflow activation for non-activavle nodes and revert zoomToFit bottom offset
* :fix: Do not chow request text if there's results
* :speech_balloon: Update noResults text
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
2022-10-18 05:23:22 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
isScheduledGroup(): boolean {
|
2022-10-13 01:38:41 -07:00
|
|
|
return this.nodeType?.group.includes('schedule') === true;
|
|
|
|
},
|
2021-11-19 01:17:13 -08:00
|
|
|
nodeRunData(): ITaskData[] {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.workflowsStore.getWorkflowResultDataByNodeName(this.data?.name || '') || [];
|
2021-11-19 01:17:13 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
hasIssues(): boolean {
|
2022-07-20 08:50:39 -07:00
|
|
|
if (this.hasPinData) return false;
|
2021-11-19 01:17:13 -08:00
|
|
|
if (this.data.issues !== undefined && Object.keys(this.data.issues).length) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
workflowDataItems(): number {
|
2021-11-19 01:17:13 -08:00
|
|
|
const workflowResultDataNode = this.nodeRunData;
|
2019-06-24 01:28:18 -07:00
|
|
|
if (workflowResultDataNode === null) {
|
2019-06-23 03:35:23 -07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-06-24 01:28:18 -07:00
|
|
|
return workflowResultDataNode.length;
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
canvasOffsetPosition() {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.uiStore.nodeViewOffsetPosition;
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
getTriggerNodeTooltip(): string | undefined {
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
if (this.nodeType !== null && this.nodeType.hasOwnProperty('eventTriggerDescription')) {
|
2022-01-07 13:02:21 -08:00
|
|
|
const nodeName = this.$locale.shortNodeType(this.nodeType.name);
|
|
|
|
const { eventTriggerDescription } = this.nodeType;
|
2022-12-14 01:04:10 -08:00
|
|
|
return this.$locale
|
|
|
|
.nodeText()
|
|
|
|
.eventTriggerDescription(nodeName, eventTriggerDescription || '');
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
} else {
|
2022-12-14 01:04:10 -08:00
|
|
|
return this.$locale.baseText('node.waitingForYouToCreateAnEventIn', {
|
|
|
|
interpolate: {
|
|
|
|
nodeType: this.nodeType ? getTriggerNodeServiceName(this.nodeType) : '',
|
2022-01-07 13:02:21 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
});
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
}
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
isPollingTypeNode(): boolean {
|
2021-12-10 05:48:56 -08:00
|
|
|
return !!(this.nodeType && this.nodeType.polling);
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
isExecuting(): boolean {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.workflowsStore.executingNode === this.data.name;
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
isSingleActiveTriggerNode(): boolean {
|
2022-11-04 06:04:31 -07:00
|
|
|
const nodes = this.workflowsStore.workflowTriggerNodes.filter((node: INodeUi) => {
|
2022-12-14 01:04:10 -08:00
|
|
|
const nodeType = this.nodeTypesStore.getNodeType(node.type, node.typeVersion);
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
return nodeType && nodeType.eventTriggerDescription !== '' && !node.disabled;
|
|
|
|
});
|
|
|
|
|
|
|
|
return nodes.length === 1;
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
isManualTypeNode(): boolean {
|
feat(editor, core, cli): implement new workflow experience (#4358)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node (#4108)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node
* feat(editor): Do not show duplicate button if canvas contains `maxNodes` amount of nodes
* feat(ManualTrigger node): Implement ManualTrigger node (#4110)
* feat(ManualTrigger node): Implement ManualTrigger node
* :memo: Remove generics doc items from ManualTrigger node
* feat(editor-ui): Trigger tab redesign (#4150)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* 🎨 Use kebab case for main-panel and icon component
* :label: Improve types
* feat(editor-ui): Redesign search input inside node creator panel (#4204)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* :sparkles: Redesign search input and unify usage of categorized items
* :label: Use lowercase "Boolean" as `isSearchVisible` computed return type
* :fire: Remove useless emit
* :sparkles: Implement no result view based on subcategory, minor fixes
* :art: Remove unused properties
* feat(node-email): Change EmailReadImap display name and name (#4239)
* feat(editor-ui): Implement "Choose a Triger" action and related behaviour (#4226)
* :sparkles: Implement "Choose a Triger" action and related behaviour
* :mute: Lint fix
* :recycle: Remove PlaceholderTrigger node, add a button instead
* :art: Merge onMouseEnter and onMouseLeave to a single function
* :bulb: Add comment
* :fire: Remove PlaceholderNode registration
* :art: Rename TriggerPlaceholderButton to CanvasAddButton
* :sparkles: Add method to unregister custom action and rework CanvasAddButton centering logic
* :art: Run `setRecenteredCanvasAddButtonPosition` on `CanvasAddButton` mount
* fix(editor): Fix selecting of node from node-creator panel by clicking
* :twisted_rightwards_arrows: Merge fixes
* fix(editor): Show execute workflow trigger instead of workflow trigger in the trigger helper panel
* feat(editor): Fix node creator panel slide transition (#4261)
* fix(editor): Fix node creator panel slide-in/slide-out transitions
* :art: Fix naming
* :art: Use kebab-case for transition component name
* feat(editor): Disable execution and show notice when user tries to run workflow without enabled triggers
* fix(editor): Address first batch of new WF experience review (#4279)
* fix(editor): Fix first batch of review items
* bug(editor): Fix nodeview canvas add button centering
* :mute: Fix linter errors
* bug(ManualTrigger Node): Fix manual trigger node execution
* fix(editor): Do not show canvas add button in execution or demo mode and prevent clicking if creator is open
* fix(editor): do not show pin data tooltip for manual trigger node
* fix(editor): do not use nodeViewOffset on zoomToFit
* :lipstick: Add margin for last node creator item and set font-weight to 700 for category title
* :sparkles: Position welcome note next to the added trigger node
* :bug: Remve always true welcome note
* feat(editor): Minor UI and UX tweaks (#4328)
* :lipstick: Make top viewport buttons less prominent
* :sparkles: Allow user to switch to all tabs if it contains filter results, move nodecreator state props to its own module
* :mute: Fix linting errors
* :mute: Fix linting errors
* :mute: Fix linting errors
* chore(build): Ping Turbo version to 1.5.5
* :lipstick: Minor traigger panel and node view style changes
* :speech_balloon: Update display name of execute workflow trigger
* feat(core, editor): Update subworkflow execution logic (#4269)
* :sparkles: Implement `findWorkflowStart`
* :zap: Extend `WorkflowOperationError`
* :zap: Add `WorkflowOperationError` to toast
* :blue_book: Extend interface
* :sparkles: Add `subworkflowExecutionError` to store
* :sparkles: Create `SubworkflowOperationError`
* :zap: Render subworkflow error as node error
* :truck: Move subworkflow start validation to `cli`
* :zap: Reset subworkflow execution error state
* :fire: Remove unused import
* :zap: Adjust CLI commands
* :fire: Remove unneeded check
* :fire: Remove stray log
* :zap: Simplify syntax
* :zap: Sort in case both Start and EWT present
* :recycle: Address Omar's feedback
* :fire: Remove unneeded lint exception
* :pencil2: Fix copy
* :shirt: Fix lint
* fix: moved find start node function to catchable place
Co-authored-by: Omar Ajoue <krynble@gmail.com>
* :lipstick: Change ExecuteWorkflow node to primary
* :sparkles: Allow user to navigate to all tab if it contains search results
* :bug: Fixed canvas control button while in demo, disable workflow activation for non-activavle nodes and revert zoomToFit bottom offset
* :fix: Do not chow request text if there's results
* :speech_balloon: Update noResults text
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
2022-10-18 05:23:22 -07:00
|
|
|
return this.data.type === MANUAL_TRIGGER_NODE_TYPE;
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
isTriggerNode(): boolean {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.nodeTypesStore.isTriggerNode(this.data?.type || '');
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
isTriggerNodeTooltipEmpty(): boolean {
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
return this.nodeType !== null ? this.nodeType.eventTriggerDescription === '' : false;
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
isNodeDisabled(): boolean | undefined {
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
return this.node && this.node.disabled;
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
nodeType(): INodeTypeDescription | null {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.data && this.nodeTypesStore.getNodeType(this.data.type, this.data.typeVersion);
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
node(): INodeUi | undefined {
|
|
|
|
// same as this.data but reactive..
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.workflowsStore.nodesByName[this.name] as INodeUi | undefined;
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
sameTypeNodes(): INodeUi[] {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.workflowsStore.allNodes.filter((node: INodeUi) => node.type === this.data.type);
|
feat(editor, core, cli): implement new workflow experience (#4358)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node (#4108)
* feat(ExecuteWorkflowTrigger node): Implement ExecuteWorkflowTrigger node
* feat(editor): Do not show duplicate button if canvas contains `maxNodes` amount of nodes
* feat(ManualTrigger node): Implement ManualTrigger node (#4110)
* feat(ManualTrigger node): Implement ManualTrigger node
* :memo: Remove generics doc items from ManualTrigger node
* feat(editor-ui): Trigger tab redesign (#4150)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* 🎨 Use kebab case for main-panel and icon component
* :label: Improve types
* feat(editor-ui): Redesign search input inside node creator panel (#4204)
* :construction: Begin with TriggerPanel implementation, add Other Trigger Nodes subcategory
* :construction: Extracted categorized categories/subcategory/nodes rendering into its own component — CategorizedItems, removed SubcategoryPanel, added translations
* :sparkles: Implement MainPanel background scrim
* :recycle: Move `categoriesWithNodes`, 'visibleNodeTypes` and 'categorizedItems` to store, implemented dynamic categories count based on `selectedType`
* :bug: Fix SlideTransition for all the NodeCreato panels
* :lipstick: Fix cursos for CategoryItem and NodeItem
* :bug: Make sure ALL_NODE_FILTER is always set when MainPanel is mounted
* :art: Address PR comments
* label: Use Array type for CategorizedItems props
* :label: Add proper types for Vue props
* 🎨 Use standard component registration for CategorizedItems inside TriggerHelperPanel
* :sparkles: Redesign search input and unify usage of categorized items
* :label: Use lowercase "Boolean" as `isSearchVisible` computed return type
* :fire: Remove useless emit
* :sparkles: Implement no result view based on subcategory, minor fixes
* :art: Remove unused properties
* feat(node-email): Change EmailReadImap display name and name (#4239)
* feat(editor-ui): Implement "Choose a Triger" action and related behaviour (#4226)
* :sparkles: Implement "Choose a Triger" action and related behaviour
* :mute: Lint fix
* :recycle: Remove PlaceholderTrigger node, add a button instead
* :art: Merge onMouseEnter and onMouseLeave to a single function
* :bulb: Add comment
* :fire: Remove PlaceholderNode registration
* :art: Rename TriggerPlaceholderButton to CanvasAddButton
* :sparkles: Add method to unregister custom action and rework CanvasAddButton centering logic
* :art: Run `setRecenteredCanvasAddButtonPosition` on `CanvasAddButton` mount
* fix(editor): Fix selecting of node from node-creator panel by clicking
* :twisted_rightwards_arrows: Merge fixes
* fix(editor): Show execute workflow trigger instead of workflow trigger in the trigger helper panel
* feat(editor): Fix node creator panel slide transition (#4261)
* fix(editor): Fix node creator panel slide-in/slide-out transitions
* :art: Fix naming
* :art: Use kebab-case for transition component name
* feat(editor): Disable execution and show notice when user tries to run workflow without enabled triggers
* fix(editor): Address first batch of new WF experience review (#4279)
* fix(editor): Fix first batch of review items
* bug(editor): Fix nodeview canvas add button centering
* :mute: Fix linter errors
* bug(ManualTrigger Node): Fix manual trigger node execution
* fix(editor): Do not show canvas add button in execution or demo mode and prevent clicking if creator is open
* fix(editor): do not show pin data tooltip for manual trigger node
* fix(editor): do not use nodeViewOffset on zoomToFit
* :lipstick: Add margin for last node creator item and set font-weight to 700 for category title
* :sparkles: Position welcome note next to the added trigger node
* :bug: Remve always true welcome note
* feat(editor): Minor UI and UX tweaks (#4328)
* :lipstick: Make top viewport buttons less prominent
* :sparkles: Allow user to switch to all tabs if it contains filter results, move nodecreator state props to its own module
* :mute: Fix linting errors
* :mute: Fix linting errors
* :mute: Fix linting errors
* chore(build): Ping Turbo version to 1.5.5
* :lipstick: Minor traigger panel and node view style changes
* :speech_balloon: Update display name of execute workflow trigger
* feat(core, editor): Update subworkflow execution logic (#4269)
* :sparkles: Implement `findWorkflowStart`
* :zap: Extend `WorkflowOperationError`
* :zap: Add `WorkflowOperationError` to toast
* :blue_book: Extend interface
* :sparkles: Add `subworkflowExecutionError` to store
* :sparkles: Create `SubworkflowOperationError`
* :zap: Render subworkflow error as node error
* :truck: Move subworkflow start validation to `cli`
* :zap: Reset subworkflow execution error state
* :fire: Remove unused import
* :zap: Adjust CLI commands
* :fire: Remove unneeded check
* :fire: Remove stray log
* :zap: Simplify syntax
* :zap: Sort in case both Start and EWT present
* :recycle: Address Omar's feedback
* :fire: Remove unneeded lint exception
* :pencil2: Fix copy
* :shirt: Fix lint
* fix: moved find start node function to catchable place
Co-authored-by: Omar Ajoue <krynble@gmail.com>
* :lipstick: Change ExecuteWorkflow node to primary
* :sparkles: Allow user to navigate to all tab if it contains search results
* :bug: Fixed canvas control button while in demo, disable workflow activation for non-activavle nodes and revert zoomToFit bottom offset
* :fix: Do not chow request text if there's results
* :speech_balloon: Update noResults text
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
2022-10-18 05:23:22 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
nodeClass(): object {
|
2021-11-19 01:17:13 -08:00
|
|
|
return {
|
|
|
|
'node-box': true,
|
|
|
|
disabled: this.data.disabled,
|
|
|
|
executing: this.isExecuting,
|
|
|
|
};
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
nodeIssues(): string[] {
|
2019-06-23 03:35:23 -07:00
|
|
|
if (this.data.issues === undefined) {
|
2022-09-05 07:36:22 -07:00
|
|
|
return [];
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2022-09-05 07:36:22 -07:00
|
|
|
return NodeHelpers.nodeIssuesToString(this.data.issues, this.data);
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
nodeDisabledIcon(): string {
|
2019-06-23 03:35:23 -07:00
|
|
|
if (this.data.disabled === false) {
|
|
|
|
return 'pause';
|
|
|
|
} else {
|
|
|
|
return 'play';
|
|
|
|
}
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
position(): XYPosition {
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
return this.node ? this.node.position : [0, 0];
|
2021-11-19 01:17:13 -08:00
|
|
|
},
|
|
|
|
showDisabledLinethrough(): boolean {
|
2022-12-14 01:04:10 -08:00
|
|
|
return !!(
|
|
|
|
this.data.disabled &&
|
|
|
|
this.nodeType &&
|
|
|
|
this.nodeType.inputs.length === 1 &&
|
|
|
|
this.nodeType.outputs.length === 1
|
|
|
|
);
|
|
|
|
},
|
|
|
|
nodePosition(): object {
|
2021-11-19 01:17:13 -08:00
|
|
|
const returnStyles: {
|
|
|
|
[key: string]: string;
|
|
|
|
} = {
|
|
|
|
left: this.position[0] + 'px',
|
|
|
|
top: this.position[1] + 'px',
|
|
|
|
};
|
|
|
|
|
|
|
|
return returnStyles;
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
shortNodeType(): string {
|
2021-12-15 04:16:53 -08:00
|
|
|
return this.$locale.shortNodeType(this.data.type);
|
2021-11-19 01:17:13 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
nodeTitle(): string {
|
2021-12-02 08:51:50 -08:00
|
|
|
if (this.data.name === 'Start') {
|
2021-12-15 04:16:53 -08:00
|
|
|
return this.$locale.headerText({
|
2022-12-29 03:20:43 -08:00
|
|
|
key: 'headers.start.displayName',
|
2021-12-02 08:51:50 -08:00
|
|
|
fallback: 'Start',
|
|
|
|
});
|
|
|
|
}
|
2021-11-29 00:34:59 -08:00
|
|
|
|
2021-12-02 08:51:50 -08:00
|
|
|
return this.data.name;
|
2021-11-29 00:34:59 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
waiting(): string | undefined {
|
2022-11-04 06:04:31 -07:00
|
|
|
const workflowExecution = this.workflowsStore.getWorkflowExecution as IExecutionsSummary;
|
2021-08-21 05:11:32 -07:00
|
|
|
|
|
|
|
if (workflowExecution && workflowExecution.waitTill) {
|
|
|
|
const lastNodeExecuted = get(workflowExecution, 'data.resultData.lastNodeExecuted');
|
|
|
|
if (this.name === lastNodeExecuted) {
|
|
|
|
const waitDate = new Date(workflowExecution.waitTill);
|
|
|
|
if (waitDate.toISOString() === WAIT_TIME_UNLIMITED) {
|
2022-12-14 01:04:10 -08:00
|
|
|
return this.$locale.baseText(
|
|
|
|
'node.theNodeIsWaitingIndefinitelyForAnIncomingWebhookCall',
|
|
|
|
);
|
2021-08-21 05:11:32 -07:00
|
|
|
}
|
2022-12-14 01:04:10 -08:00
|
|
|
return this.$locale.baseText('node.nodeIsWaitingTill', {
|
|
|
|
interpolate: {
|
|
|
|
date: waitDate.toLocaleDateString(),
|
|
|
|
time: waitDate.toLocaleTimeString(),
|
2021-11-20 06:58:21 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
});
|
2021-08-21 05:11:32 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
workflowRunning(): boolean {
|
2022-11-04 06:04:31 -07:00
|
|
|
return this.uiStore.isActionActive('workflowRunning');
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
nodeStyle(): object {
|
2021-11-19 01:17:13 -08:00
|
|
|
let borderColor = getStyleTokenValue('--color-foreground-xdark');
|
|
|
|
|
|
|
|
if (this.data.disabled) {
|
|
|
|
borderColor = getStyleTokenValue('--color-foreground-base');
|
2022-12-14 01:04:10 -08:00
|
|
|
} else if (!this.isExecuting) {
|
2021-11-19 01:17:13 -08:00
|
|
|
if (this.hasIssues) {
|
|
|
|
borderColor = getStyleTokenValue('--color-danger');
|
2022-11-14 04:28:26 -08:00
|
|
|
} else if (this.waiting || this.showPinnedDataInfo) {
|
2021-11-19 01:17:13 -08:00
|
|
|
borderColor = getStyleTokenValue('--color-secondary');
|
2022-07-20 08:50:39 -07:00
|
|
|
} else if (this.workflowDataItems) {
|
2021-11-19 01:17:13 -08:00
|
|
|
borderColor = getStyleTokenValue('--color-success');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const returnStyles: {
|
|
|
|
[key: string]: string;
|
|
|
|
} = {
|
|
|
|
'border-color': borderColor,
|
|
|
|
};
|
|
|
|
|
|
|
|
return returnStyles;
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
isSelected(): boolean {
|
|
|
|
return (
|
|
|
|
this.uiStore.getSelectedNodes.find((node: INodeUi) => node.name === this.data.name) !==
|
|
|
|
undefined
|
|
|
|
);
|
2021-11-19 01:17:13 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
shiftOutputCount(): boolean {
|
2021-11-19 01:17:13 -08:00
|
|
|
return !!(this.nodeType && this.nodeType.outputs.length > 2);
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
shouldShowTriggerTooltip(): boolean {
|
|
|
|
return (
|
|
|
|
!!this.node &&
|
2021-12-10 05:48:56 -08:00
|
|
|
this.isTriggerNode &&
|
|
|
|
!this.isPollingTypeNode &&
|
2022-12-20 00:39:09 -08:00
|
|
|
!this.hasPinData &&
|
2021-12-10 05:48:56 -08:00
|
|
|
!this.isNodeDisabled &&
|
|
|
|
this.workflowRunning &&
|
2022-07-20 08:50:39 -07:00
|
|
|
this.workflowDataItems === 0 &&
|
2021-12-10 05:48:56 -08:00
|
|
|
this.isSingleActiveTriggerNode &&
|
|
|
|
!this.isTriggerNodeTooltipEmpty &&
|
|
|
|
!this.hasIssues &&
|
2022-12-14 01:04:10 -08:00
|
|
|
!this.dragging
|
|
|
|
);
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
},
|
2021-08-07 00:35:59 -07:00
|
|
|
watch: {
|
|
|
|
isActive(newValue, oldValue) {
|
|
|
|
if (!newValue && oldValue) {
|
|
|
|
this.setSubtitle();
|
|
|
|
}
|
2019-07-12 05:14:36 -07:00
|
|
|
},
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
canvasOffsetPosition() {
|
|
|
|
if (this.showTriggerNodeTooltip) {
|
|
|
|
this.showTriggerNodeTooltip = false;
|
|
|
|
setTimeout(() => {
|
|
|
|
this.showTriggerNodeTooltip = this.shouldShowTriggerTooltip;
|
|
|
|
}, 200);
|
|
|
|
}
|
2022-07-20 08:50:39 -07:00
|
|
|
|
|
|
|
if (this.pinDataDiscoveryTooltipVisible) {
|
|
|
|
this.pinDataDiscoveryTooltipVisible = false;
|
|
|
|
setTimeout(() => {
|
|
|
|
this.pinDataDiscoveryTooltipVisible = true;
|
|
|
|
}, 200);
|
|
|
|
}
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
},
|
|
|
|
shouldShowTriggerTooltip(shouldShowTriggerTooltip) {
|
|
|
|
if (shouldShowTriggerTooltip) {
|
|
|
|
setTimeout(() => {
|
|
|
|
this.showTriggerNodeTooltip = this.shouldShowTriggerTooltip;
|
|
|
|
}, 2500);
|
|
|
|
} else {
|
|
|
|
this.showTriggerNodeTooltip = false;
|
|
|
|
}
|
|
|
|
},
|
2021-11-19 01:17:13 -08:00
|
|
|
nodeRunData(newValue) {
|
2022-12-14 01:04:10 -08:00
|
|
|
this.$emit('run', { name: this.data.name, data: newValue, waiting: !!this.waiting });
|
2021-11-19 01:17:13 -08:00
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2022-07-20 08:50:39 -07:00
|
|
|
created() {
|
2022-12-14 01:04:10 -08:00
|
|
|
const hasSeenPinDataTooltip = localStorage.getItem(
|
|
|
|
LOCAL_STORAGE_PIN_DATA_DISCOVERY_CANVAS_FLAG,
|
|
|
|
);
|
2022-07-20 08:50:39 -07:00
|
|
|
if (!hasSeenPinDataTooltip) {
|
|
|
|
this.unwatchWorkflowDataItems = this.$watch('workflowDataItems', (dataItemsCount: number) => {
|
|
|
|
this.showPinDataDiscoveryTooltip(dataItemsCount);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
2021-08-07 00:35:59 -07:00
|
|
|
mounted() {
|
|
|
|
this.setSubtitle();
|
2022-10-26 01:02:56 -07:00
|
|
|
if (this.nodeRunData) {
|
|
|
|
setTimeout(() => {
|
2022-12-14 01:04:10 -08:00
|
|
|
this.$emit('run', {
|
|
|
|
name: this.data && this.data.name,
|
|
|
|
data: this.nodeRunData,
|
|
|
|
waiting: !!this.waiting,
|
|
|
|
});
|
2022-10-26 01:02:56 -07:00
|
|
|
}, 0);
|
|
|
|
}
|
2021-08-07 00:35:59 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
data() {
|
2019-06-23 03:35:23 -07:00
|
|
|
return {
|
2020-10-24 11:01:13 -07:00
|
|
|
isTouchActive: false,
|
2021-08-07 00:35:59 -07:00
|
|
|
nodeSubtitle: '',
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
showTriggerNodeTooltip: false,
|
2022-07-20 08:50:39 -07:00
|
|
|
pinDataDiscoveryTooltipVisible: false,
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
dragging: false,
|
2022-07-20 08:50:39 -07:00
|
|
|
unwatchWorkflowDataItems: () => {},
|
2019-06-23 03:35:23 -07:00
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
2022-07-20 08:50:39 -07:00
|
|
|
showPinDataDiscoveryTooltip(dataItemsCount: number): void {
|
2022-12-14 01:04:10 -08:00
|
|
|
if (
|
|
|
|
!this.isTriggerNode ||
|
|
|
|
this.isManualTypeNode ||
|
|
|
|
this.isScheduledGroup ||
|
|
|
|
dataItemsCount === 0
|
|
|
|
)
|
|
|
|
return;
|
2022-07-20 08:50:39 -07:00
|
|
|
|
2022-10-13 01:38:41 -07:00
|
|
|
localStorage.setItem(LOCAL_STORAGE_PIN_DATA_DISCOVERY_CANVAS_FLAG, 'true');
|
2022-07-20 08:50:39 -07:00
|
|
|
|
2022-10-13 01:38:41 -07:00
|
|
|
this.pinDataDiscoveryTooltipVisible = true;
|
|
|
|
this.unwatchWorkflowDataItems();
|
2022-07-20 08:50:39 -07:00
|
|
|
},
|
2021-08-07 00:35:59 -07:00
|
|
|
setSubtitle() {
|
2022-12-14 01:04:10 -08:00
|
|
|
const nodeSubtitle =
|
|
|
|
this.getNodeSubtitle(this.data, this.nodeType, this.getCurrentWorkflow()) || '';
|
2022-05-24 02:36:19 -07:00
|
|
|
|
2022-12-14 01:04:10 -08:00
|
|
|
this.nodeSubtitle = nodeSubtitle.includes(CUSTOM_API_CALL_KEY) ? '' : nodeSubtitle;
|
2021-08-07 00:35:59 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
disableNode() {
|
2022-12-09 06:07:37 -08:00
|
|
|
if (this.data !== null) {
|
|
|
|
this.disableNodes([this.data]);
|
2022-12-14 01:04:10 -08:00
|
|
|
this.historyStore.pushCommandToUndo(
|
|
|
|
new EnableNodeToggleCommand(
|
|
|
|
this.data.name,
|
|
|
|
!this.data.disabled,
|
|
|
|
this.data.disabled === true,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
this.$telemetry.track('User clicked node hover button', {
|
|
|
|
node_type: this.data.type,
|
|
|
|
button_name: 'disable',
|
|
|
|
workflow_id: this.workflowsStore.workflowId,
|
|
|
|
});
|
2022-12-09 06:07:37 -08:00
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
executeNode() {
|
2021-05-05 17:46:33 -07:00
|
|
|
this.$emit('runWorkflow', this.data.name, 'Node.executeNode');
|
2022-12-14 01:04:10 -08:00
|
|
|
this.$telemetry.track('User clicked node hover button', {
|
|
|
|
node_type: this.data.type,
|
|
|
|
button_name: 'execute',
|
|
|
|
workflow_id: this.workflowsStore.workflowId,
|
|
|
|
});
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
deleteNode() {
|
|
|
|
this.$telemetry.track('User clicked node hover button', {
|
|
|
|
node_type: this.data.type,
|
|
|
|
button_name: 'delete',
|
|
|
|
workflow_id: this.workflowsStore.workflowId,
|
|
|
|
});
|
2021-10-18 20:57:49 -07:00
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
Vue.nextTick(() => {
|
|
|
|
// Wait a tick else vue causes problems because the data is gone
|
|
|
|
this.$emit('removeNode', this.data.name);
|
|
|
|
});
|
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
duplicateNode() {
|
|
|
|
this.$telemetry.track('User clicked node hover button', {
|
|
|
|
node_type: this.data.type,
|
|
|
|
button_name: 'duplicate',
|
|
|
|
workflow_id: this.workflowsStore.workflowId,
|
|
|
|
});
|
2019-06-23 03:35:23 -07:00
|
|
|
Vue.nextTick(() => {
|
|
|
|
// Wait a tick else vue causes problems because the data is gone
|
|
|
|
this.$emit('duplicateNode', this.data.name);
|
|
|
|
});
|
|
|
|
},
|
2021-11-29 00:34:59 -08:00
|
|
|
|
2022-10-20 06:45:58 -07:00
|
|
|
onClick(event: MouseEvent) {
|
2022-11-09 01:01:50 -08:00
|
|
|
this.callDebounced('onClickDebounced', { debounceTime: 50, trailing: true }, event);
|
2022-10-20 06:45:58 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
onClickDebounced(event: MouseEvent) {
|
|
|
|
const isDoubleClick = event.detail >= 2;
|
|
|
|
if (isDoubleClick) {
|
|
|
|
this.setNodeActive();
|
|
|
|
} else {
|
|
|
|
this.mouseLeftClick(event);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2022-12-14 01:04:10 -08:00
|
|
|
setNodeActive() {
|
2022-11-04 06:04:31 -07:00
|
|
|
this.ndvStore.activeNodeName = this.data ? this.data.name : '';
|
2022-07-20 08:50:39 -07:00
|
|
|
this.pinDataDiscoveryTooltipVisible = false;
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
2022-12-14 01:04:10 -08:00
|
|
|
touchStart() {
|
2020-10-24 11:01:13 -07:00
|
|
|
if (this.isTouchDevice === true && this.isMacOs === false && this.isTouchActive === false) {
|
|
|
|
this.isTouchActive = true;
|
|
|
|
setTimeout(() => {
|
|
|
|
this.isTouchActive = false;
|
|
|
|
}, 2000);
|
|
|
|
}
|
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
<style lang="scss" scoped>
|
2019-07-25 12:57:27 -07:00
|
|
|
.node-wrapper {
|
2019-06-23 03:35:23 -07:00
|
|
|
position: absolute;
|
2019-07-25 09:50:45 -07:00
|
|
|
width: 100px;
|
|
|
|
height: 100px;
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2019-07-25 09:50:45 -07:00
|
|
|
.node-description {
|
2019-06-23 03:35:23 -07:00
|
|
|
position: absolute;
|
2021-11-19 01:17:13 -08:00
|
|
|
top: 100px;
|
2019-07-25 09:50:45 -07:00
|
|
|
left: -50px;
|
2021-11-19 01:17:13 -08:00
|
|
|
line-height: 1.5;
|
2019-07-25 09:50:45 -07:00
|
|
|
text-align: center;
|
2019-07-25 12:57:27 -07:00
|
|
|
cursor: default;
|
2021-11-19 01:17:13 -08:00
|
|
|
padding: 8px;
|
|
|
|
width: 200px;
|
|
|
|
pointer-events: none; // prevent container from being draggable
|
2019-07-25 12:57:27 -07:00
|
|
|
|
2022-12-14 01:04:10 -08:00
|
|
|
.node-name > p {
|
|
|
|
// must be paragraph tag to have two lines in safari
|
2019-07-25 12:57:27 -07:00
|
|
|
text-overflow: ellipsis;
|
2021-11-19 01:17:13 -08:00
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
-webkit-line-clamp: 2;
|
|
|
|
overflow: hidden;
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
font-weight: var(--font-weight-bold);
|
|
|
|
line-height: var(--font-line-height-compact);
|
2019-07-25 12:57:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
.node-subtitle {
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
font-weight: 400;
|
2022-09-23 07:14:28 -07:00
|
|
|
color: $custom-font-light;
|
2019-07-25 12:57:27 -07:00
|
|
|
font-size: 0.8em;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2019-07-25 12:57:27 -07:00
|
|
|
.node-default {
|
2021-11-19 01:17:13 -08:00
|
|
|
position: absolute;
|
2019-07-25 09:50:45 -07:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2019-07-25 12:57:27 -07:00
|
|
|
cursor: pointer;
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
.node-box {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
border: 2px solid var(--color-foreground-xdark);
|
|
|
|
border-radius: var(--border-radius-large);
|
|
|
|
background-color: var(--color-background-xlight);
|
2019-07-25 12:57:27 -07:00
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
&.executing {
|
2022-07-26 03:45:55 -07:00
|
|
|
background-color: var(--color-primary-tint-3) !important;
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
.node-executing-info {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
2019-07-25 12:57:27 -07:00
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2020-10-24 11:01:13 -07:00
|
|
|
&.touch-active,
|
2019-07-25 12:57:27 -07:00
|
|
|
&:hover {
|
|
|
|
.node-execute {
|
|
|
|
display: initial;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2019-07-25 12:57:27 -07:00
|
|
|
.node-options {
|
|
|
|
display: initial;
|
|
|
|
}
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2019-07-25 12:57:27 -07:00
|
|
|
.node-executing-info {
|
|
|
|
display: none;
|
|
|
|
position: absolute;
|
|
|
|
left: 0px;
|
|
|
|
top: 0px;
|
|
|
|
z-index: 12;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
font-size: 3.75em;
|
|
|
|
line-height: 1.65em;
|
|
|
|
text-align: center;
|
2022-07-26 03:45:55 -07:00
|
|
|
color: hsla(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l), 0.7);
|
2019-07-25 12:57:27 -07:00
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2019-07-25 12:57:27 -07:00
|
|
|
.node-icon {
|
|
|
|
position: absolute;
|
2021-11-19 01:17:13 -08:00
|
|
|
top: calc(50% - 20px);
|
|
|
|
left: calc(50% - 20px);
|
2019-07-25 12:57:27 -07:00
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2019-07-25 12:57:27 -07:00
|
|
|
.node-info-icon {
|
|
|
|
position: absolute;
|
2021-11-19 01:17:13 -08:00
|
|
|
bottom: 6px;
|
|
|
|
right: 6px;
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
&.shift-icon {
|
|
|
|
right: 12px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.data-count {
|
2019-07-25 12:57:27 -07:00
|
|
|
font-weight: 600;
|
2021-11-19 01:17:13 -08:00
|
|
|
color: var(--color-success);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
2021-08-21 05:11:32 -07:00
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
.node-issues {
|
|
|
|
color: var(--color-danger);
|
2021-08-21 05:11:32 -07:00
|
|
|
}
|
2019-07-25 09:50:45 -07:00
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
.items-count {
|
|
|
|
font-size: var(--font-size-s);
|
2023-01-30 09:20:50 -08:00
|
|
|
padding: 0;
|
2021-11-19 01:17:13 -08:00
|
|
|
}
|
2019-07-25 12:57:27 -07:00
|
|
|
}
|
|
|
|
|
2022-07-20 08:50:39 -07:00
|
|
|
.node-pin-data-icon {
|
|
|
|
color: var(--color-secondary);
|
|
|
|
margin-right: 2px;
|
|
|
|
|
|
|
|
svg {
|
|
|
|
height: 0.85rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-21 05:11:32 -07:00
|
|
|
.waiting {
|
2021-11-19 01:17:13 -08:00
|
|
|
color: var(--color-secondary);
|
2021-08-21 05:11:32 -07:00
|
|
|
}
|
|
|
|
|
2019-07-25 12:57:27 -07:00
|
|
|
.node-options {
|
|
|
|
display: none;
|
|
|
|
position: absolute;
|
2019-07-25 22:49:00 -07:00
|
|
|
top: -25px;
|
2019-07-25 12:57:27 -07:00
|
|
|
left: -10px;
|
|
|
|
width: 120px;
|
2021-12-10 06:35:33 -08:00
|
|
|
height: 26px;
|
2019-07-25 12:57:27 -07:00
|
|
|
font-size: 0.9em;
|
|
|
|
text-align: left;
|
|
|
|
z-index: 10;
|
|
|
|
color: #aaa;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
.option {
|
2021-08-29 04:36:17 -07:00
|
|
|
width: 28px;
|
2019-07-25 12:57:27 -07:00
|
|
|
display: inline-block;
|
|
|
|
|
2020-02-15 17:29:08 -08:00
|
|
|
&.touch {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2019-07-25 12:57:27 -07:00
|
|
|
&:hover {
|
2022-09-23 07:14:28 -07:00
|
|
|
color: $color-primary;
|
2019-07-25 12:57:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
.execute-icon {
|
|
|
|
position: relative;
|
|
|
|
top: 2px;
|
|
|
|
font-size: 1.2em;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
}
|
2019-07-25 22:49:00 -07:00
|
|
|
|
2020-02-15 17:29:08 -08:00
|
|
|
&.is-touch-device .node-options {
|
|
|
|
left: -25px;
|
|
|
|
width: 150px;
|
2020-02-09 00:06:01 -08:00
|
|
|
|
2020-02-15 17:29:08 -08:00
|
|
|
.option.touch {
|
|
|
|
display: initial;
|
2020-02-09 00:06:01 -08:00
|
|
|
}
|
|
|
|
}
|
2021-11-19 01:17:13 -08:00
|
|
|
}
|
|
|
|
}
|
2020-02-09 00:06:01 -08:00
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
.select-background {
|
|
|
|
display: block;
|
2022-12-14 01:04:10 -08:00
|
|
|
background-color: hsla(
|
|
|
|
var(--color-foreground-base-h),
|
|
|
|
var(--color-foreground-base-s),
|
|
|
|
var(--color-foreground-base-l),
|
|
|
|
60%
|
|
|
|
);
|
2021-11-19 01:17:13 -08:00
|
|
|
border-radius: var(--border-radius-xlarge);
|
|
|
|
overflow: hidden;
|
|
|
|
position: absolute;
|
|
|
|
left: -8px !important;
|
|
|
|
top: -8px !important;
|
|
|
|
height: 116px;
|
|
|
|
width: 116px !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.disabled-linethrough {
|
|
|
|
border: 1px solid var(--color-foreground-dark);
|
|
|
|
position: absolute;
|
|
|
|
top: 49px;
|
|
|
|
left: -3px;
|
|
|
|
width: 111px;
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
&.success {
|
|
|
|
border-color: var(--color-success-light);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
<style lang="scss">
|
2021-12-03 09:53:55 -08:00
|
|
|
.jtk-endpoint {
|
2021-11-19 01:17:13 -08:00
|
|
|
z-index: 2;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
.node-trigger-tooltip {
|
|
|
|
&__wrapper {
|
|
|
|
top: -22px;
|
|
|
|
left: 50px;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
&--item {
|
|
|
|
max-width: 160px;
|
|
|
|
position: fixed;
|
2022-12-14 01:04:10 -08:00
|
|
|
z-index: 0 !important;
|
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-01-30 09:20:50 -08:00
|
|
|
.dot-output-endpoint:hover circle {
|
|
|
|
fill: var(--color-primary);
|
|
|
|
}
|
2021-11-19 01:17:13 -08:00
|
|
|
/** connector */
|
2019-06-23 03:35:23 -07:00
|
|
|
.jtk-connector {
|
2021-11-19 01:17:13 -08:00
|
|
|
z-index: 3;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
2021-11-19 01:17:13 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
.jtk-floating-endpoint {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
.jtk-connector path {
|
2022-12-14 01:04:10 -08:00
|
|
|
transition: stroke 0.1s ease-in-out;
|
2021-11-19 01:17:13 -08:00
|
|
|
}
|
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
.jtk-overlay {
|
|
|
|
z-index: 3;
|
|
|
|
}
|
|
|
|
.jtk-connector {
|
2021-11-19 01:17:13 -08:00
|
|
|
z-index: 4;
|
|
|
|
}
|
2023-01-30 09:20:50 -08:00
|
|
|
.node-input-endpoint-label,
|
|
|
|
.node-output-endpoint-label,
|
|
|
|
.connection-run-items-label {
|
|
|
|
z-index: 5;
|
|
|
|
}
|
2021-11-19 01:17:13 -08:00
|
|
|
.jtk-connector.jtk-hover {
|
|
|
|
z-index: 6;
|
|
|
|
}
|
|
|
|
|
2021-12-03 09:53:55 -08:00
|
|
|
.jtk-endpoint.plus-endpoint {
|
2021-11-19 01:17:13 -08:00
|
|
|
z-index: 6;
|
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
.jtk-endpoint.dot-output-endpoint {
|
2021-11-19 01:17:13 -08:00
|
|
|
z-index: 7;
|
2023-01-30 09:20:50 -08:00
|
|
|
overflow: auto;
|
2021-12-03 09:53:55 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
.disabled-linethrough {
|
|
|
|
z-index: 8;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
|
2022-12-14 01:04:10 -08:00
|
|
|
.jtk-drag-active.dot-output-endpoint,
|
|
|
|
.jtk-drag-active.rect-input-endpoint {
|
2021-11-19 01:17:13 -08:00
|
|
|
z-index: 9;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
2023-01-30 09:20:50 -08:00
|
|
|
.rect-input-endpoint > * {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-11-19 01:17:13 -08:00
|
|
|
.connection-actions {
|
2023-01-30 09:20:50 -08:00
|
|
|
z-index: 100;
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
2021-11-19 01:17:13 -08:00
|
|
|
|
|
|
|
.node-options {
|
|
|
|
z-index: 10;
|
|
|
|
}
|
|
|
|
|
|
|
|
.drop-add-node-label {
|
|
|
|
z-index: 10;
|
|
|
|
}
|
2023-01-30 09:20:50 -08:00
|
|
|
|
|
|
|
.jtk-connector.success:not(.jtk-hover) {
|
|
|
|
path:not(.jtk-connector-outline) {
|
|
|
|
stroke: var(--color-success-light);
|
|
|
|
}
|
|
|
|
path[jtk-overlay-id='endpoint-arrow'],
|
|
|
|
path[jtk-overlay-id='midpoint-arrow'] {
|
|
|
|
fill: var(--color-success-light);
|
|
|
|
}
|
|
|
|
}
|
2019-06-23 03:35:23 -07:00
|
|
|
</style>
|
2021-12-03 09:53:55 -08:00
|
|
|
|
|
|
|
<style lang="scss">
|
2023-01-30 09:20:50 -08:00
|
|
|
:root {
|
|
|
|
--endpoint-size-small: 14px;
|
|
|
|
--endpoint-size-medium: 18px;
|
|
|
|
--stalk-size: 40px;
|
|
|
|
--stalk-success-size: 87px;
|
|
|
|
--stalk-long-size: 127px;
|
|
|
|
--plus-endpoint-box-size: 24px;
|
|
|
|
--plus-endpoint-box-size-small: 17px;
|
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
.plus-svg-circle {
|
|
|
|
z-index: 111;
|
|
|
|
circle {
|
|
|
|
stroke: var(--color-foreground-xdark);
|
|
|
|
stroke-width: 2px;
|
|
|
|
fill: var(--color-foreground-xdark);
|
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
&:hover {
|
|
|
|
circle {
|
|
|
|
stroke: var(--color-primary);
|
|
|
|
fill: var(--color-primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.plus-stalk {
|
|
|
|
width: calc(var(--stalk-size) + 2px);
|
|
|
|
border: 1px solid var(--color-foreground-dark);
|
|
|
|
margin-left: calc(var(--stalk-size) / 2);
|
|
|
|
z-index: 3;
|
|
|
|
&.ep-success {
|
|
|
|
border-color: var(--color-success-light);
|
2022-12-14 01:04:10 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
&:after {
|
|
|
|
content: attr(data-label);
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 100%;
|
|
|
|
margin: auto;
|
|
|
|
margin-bottom: 2px;
|
|
|
|
text-align: center;
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
line-height: 1.3em;
|
|
|
|
font-size: var(--font-size-s);
|
|
|
|
font-weight: var(--font-weight-regular);
|
|
|
|
color: var(--color-success);
|
2021-12-03 09:53:55 -08:00
|
|
|
}
|
2022-12-14 01:04:10 -08:00
|
|
|
}
|
2023-01-30 09:20:50 -08:00
|
|
|
}
|
|
|
|
.connection-run-items-label {
|
|
|
|
// Disable points events so that the label does not block the connection
|
|
|
|
// mouse over event.
|
|
|
|
pointer-events: none;
|
|
|
|
span {
|
|
|
|
border-radius: 7px;
|
|
|
|
background-color: hsla(
|
|
|
|
var(--color-canvas-background-h),
|
|
|
|
var(--color-canvas-background-s),
|
|
|
|
var(--color-canvas-background-l),
|
|
|
|
0.85
|
|
|
|
);
|
|
|
|
line-height: 1.3em;
|
|
|
|
padding: 0px 3px;
|
|
|
|
white-space: nowrap;
|
|
|
|
font-size: var(--font-size-s);
|
|
|
|
font-weight: var(--font-weight-regular);
|
|
|
|
color: var(--color-success);
|
|
|
|
margin-top: -15px;
|
|
|
|
|
|
|
|
&.floating {
|
|
|
|
position: absolute;
|
|
|
|
top: -6px;
|
|
|
|
transform: translateX(-50%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.connection-input-name-label {
|
|
|
|
position: relative;
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
span {
|
2022-12-14 01:04:10 -08:00
|
|
|
position: absolute;
|
2023-01-30 09:20:50 -08:00
|
|
|
top: -10px;
|
|
|
|
left: -60px;
|
|
|
|
}
|
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
.plus-endpoint {
|
|
|
|
cursor: pointer;
|
|
|
|
z-index: 10;
|
|
|
|
margin-left: calc((var(--stalk-size) + var(--plus-endpoint-box-size) / 2) - 1px);
|
|
|
|
g {
|
|
|
|
fill: var(--color-background-xlight);
|
2022-12-14 01:04:10 -08:00
|
|
|
pointer-events: none;
|
2023-01-30 09:20:50 -08:00
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
&:hover {
|
|
|
|
path {
|
|
|
|
fill: var(--color-primary);
|
2022-12-14 01:04:10 -08:00
|
|
|
}
|
2023-01-30 09:20:50 -08:00
|
|
|
rect {
|
|
|
|
stroke: var(--color-primary);
|
2021-12-03 09:53:55 -08:00
|
|
|
}
|
2022-12-14 01:04:10 -08:00
|
|
|
}
|
2023-01-30 09:20:50 -08:00
|
|
|
path {
|
|
|
|
fill: var(--color-foreground-xdark);
|
|
|
|
}
|
|
|
|
rect {
|
|
|
|
stroke: var(--color-foreground-xdark);
|
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
&.small {
|
|
|
|
margin-left: calc((var(--stalk-size) + var(--plus-endpoint-box-size-small) / 2));
|
|
|
|
g {
|
|
|
|
transform: scale(0.75);
|
|
|
|
transform-origin: center;
|
|
|
|
}
|
|
|
|
rect {
|
|
|
|
stroke-width: 2.5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:hover .plus-container {
|
|
|
|
color: var(--color-primary);
|
|
|
|
border: 2px solid var(--color-primary);
|
|
|
|
}
|
|
|
|
&:hover .drop-hover-message {
|
|
|
|
display: block;
|
2022-12-14 01:04:10 -08:00
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
&.hidden {
|
2022-12-14 01:04:10 -08:00
|
|
|
display: none;
|
|
|
|
}
|
2023-01-30 09:20:50 -08:00
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
.node-input-endpoint-label,
|
|
|
|
.node-output-endpoint-label {
|
|
|
|
background-color: hsla(
|
|
|
|
var(--color-canvas-background-h),
|
|
|
|
var(--color-canvas-background-s),
|
|
|
|
var(--color-canvas-background-l),
|
|
|
|
0.85
|
|
|
|
);
|
|
|
|
border-radius: 7px;
|
|
|
|
font-size: 0.7em;
|
|
|
|
padding: 2px;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
|
2023-01-30 09:20:50 -08:00
|
|
|
.node-output-endpoint-label {
|
|
|
|
margin-left: calc(var(--endpoint-size-small) + var(--spacing-3xs));
|
|
|
|
}
|
|
|
|
.node-input-endpoint-label {
|
|
|
|
text-align: right;
|
|
|
|
margin-left: -25px;
|
|
|
|
|
|
|
|
&--moved {
|
|
|
|
margin-left: -40px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.hover-message.jtk-overlay {
|
|
|
|
--hover-message-width: 110px;
|
|
|
|
font-weight: var(--font-weight-bold);
|
|
|
|
font-size: var(--font-size-2xs);
|
|
|
|
line-height: var(--font-line-height-regular);
|
|
|
|
color: var(--color-text-light);
|
|
|
|
width: var(--hover-message-width);
|
|
|
|
margin-left: calc(
|
|
|
|
(var(--hover-message-width) / 2) + var(--stalk-size) + var(--plus-endpoint-box-size) +
|
|
|
|
var(--spacing-2xs)
|
|
|
|
);
|
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
|
|
|
&.small {
|
|
|
|
margin-left: calc(
|
|
|
|
(var(--hover-message-width) / 2) + var(--stalk-size) + var(--plus-endpoint-box-size-small) +
|
|
|
|
var(--spacing-2xs)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
&.visible {
|
|
|
|
pointer-events: all;
|
|
|
|
opacity: 1;
|
2021-12-03 09:53:55 -08:00
|
|
|
}
|
2022-12-14 01:04:10 -08:00
|
|
|
}
|
2023-01-30 09:20:50 -08:00
|
|
|
.ep-success {
|
|
|
|
--stalk-size: var(--stalk-success-size);
|
|
|
|
}
|
|
|
|
.long-stalk {
|
|
|
|
--stalk-size: var(--stalk-long-size);
|
|
|
|
}
|
2021-12-03 09:53:55 -08:00
|
|
|
</style>
|