-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #520 from HaveAGitGat/parser
Add pluginId input
- Loading branch information
Showing
2 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
FlowPlugins/CommunityFlowPlugins/tools/goToFlow/2.0.0/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.plugin = exports.details = void 0; | ||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */ | ||
var details = function () { return ({ | ||
name: 'Go To Flow', | ||
description: 'Go to a different flow', | ||
style: { | ||
borderColor: 'green', | ||
}, | ||
tags: '', | ||
isStartPlugin: false, | ||
pType: '', | ||
requiresVersion: '2.14.01', | ||
sidebarPosition: -1, | ||
icon: 'faArrowRight', | ||
inputs: [ | ||
{ | ||
name: 'flowId', | ||
type: 'string', | ||
defaultValue: '', | ||
inputUI: { | ||
type: 'dropdown', | ||
options: [], | ||
}, | ||
tooltip: 'Specify flow ID to go to', | ||
}, | ||
{ | ||
name: 'pluginId', | ||
type: 'string', | ||
defaultValue: 'start', | ||
inputUI: { | ||
type: 'text', | ||
}, | ||
tooltip: 'Specify plugin ID to go to', | ||
}, | ||
], | ||
outputs: [], | ||
}); }; | ||
exports.details = details; | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
var plugin = function (args) { | ||
var lib = require('../../../../../methods/lib')(); | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign | ||
args.inputs = lib.loadDefaultValues(args.inputs, details); | ||
return { | ||
outputFileObj: args.inputFileObj, | ||
outputNumber: 1, | ||
variables: args.variables, | ||
}; | ||
}; | ||
exports.plugin = plugin; |
59 changes: 59 additions & 0 deletions
59
FlowPluginsTs/CommunityFlowPlugins/tools/goToFlow/2.0.0/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { | ||
IpluginDetails, | ||
IpluginInputArgs, | ||
IpluginOutputArgs, | ||
} from '../../../../FlowHelpers/1.0.0/interfaces/interfaces'; | ||
|
||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */ | ||
const details = ():IpluginDetails => ({ | ||
name: 'Go To Flow', | ||
description: 'Go to a different flow', | ||
style: { | ||
borderColor: 'green', | ||
}, | ||
tags: '', | ||
isStartPlugin: false, | ||
pType: '', | ||
requiresVersion: '2.14.01', | ||
sidebarPosition: -1, | ||
icon: 'faArrowRight', | ||
inputs: [ | ||
{ | ||
name: 'flowId', | ||
type: 'string', | ||
defaultValue: '', | ||
inputUI: { | ||
type: 'dropdown', | ||
options: [], | ||
}, | ||
tooltip: 'Specify flow ID to go to', | ||
}, | ||
{ | ||
name: 'pluginId', | ||
type: 'string', | ||
defaultValue: 'start', | ||
inputUI: { | ||
type: 'text', | ||
}, | ||
tooltip: 'Specify plugin ID to go to', | ||
}, | ||
], | ||
outputs: [], | ||
}); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const plugin = (args:IpluginInputArgs):IpluginOutputArgs => { | ||
const lib = require('../../../../../methods/lib')(); | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign | ||
args.inputs = lib.loadDefaultValues(args.inputs, details); | ||
|
||
return { | ||
outputFileObj: args.inputFileObj, | ||
outputNumber: 1, | ||
variables: args.variables, | ||
}; | ||
}; | ||
export { | ||
details, | ||
plugin, | ||
}; |