-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37a46f3
commit 619d905
Showing
6 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
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
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,28 @@ | ||
import {renderActionHeader, renderParameters} from "~/render"; | ||
import {actions, actionText} from "~/actions"; | ||
import {renderValue} from "~/value"; | ||
|
||
interface AskForInputParameters { | ||
WFInputType: string, | ||
WFAskActionPrompt: boolean, | ||
WFAskActionDefaultAnswer: string, | ||
WFAskActionDefaultAnswerNumber: string, | ||
} | ||
|
||
export default { | ||
title: "Ask for", | ||
icon: "plus_bubble_fill", | ||
background: '#55bef0', | ||
render: (container: HTMLElement, params: AskForInputParameters) => { | ||
const action = renderActionHeader(actions['ask'], | ||
renderValue(params['WFInputType'], 'Input Type'), | ||
actionText("with"), | ||
renderValue(params['WFAskActionPrompt'], 'Informational message') | ||
); | ||
action.appendChild(renderParameters(actions['ask'], { | ||
'Default Answer': params['WFAskActionDefaultAnswer'] ?? params['WFAskActionDefaultAnswerNumber'], | ||
})); | ||
|
||
return action; | ||
} | ||
} |
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,26 @@ | ||
import {renderActionHeader, renderParameters} from "~/render"; | ||
import {actions} from "~/actions"; | ||
import {renderValue} from "~/value"; | ||
|
||
interface ChooseFromListParamteers { | ||
WFInput: string, | ||
WFChooseFromListActionPrompt: string, | ||
WFChooseFromListActionSelectMultiple: boolean, | ||
WFChooseFromListActionSelectAll: boolean, | ||
} | ||
|
||
export default { | ||
title: "Choose from", | ||
icon: "square_list_fill", | ||
background: '#55bef0', | ||
render: (container: HTMLElement, params: ChooseFromListParamteers) => { | ||
const action = renderActionHeader(actions['choosefromlist'], renderValue(params['WFInput'], 'Informational message')); | ||
action.appendChild(renderParameters(actions['choosefromlist'], { | ||
'Prompt': params['WFChooseFromListActionPrompt'], | ||
'Select Multiple': params['WFChooseFromListActionSelectMultiple'] ?? true, | ||
'Select All Initially': params['WFChooseFromListActionSelectMultiple'] ?? true | ||
})); | ||
|
||
return action; | ||
} | ||
} |
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,24 @@ | ||
import {renderActionHeader} from "~/render"; | ||
import {actions, actionText} from "~/actions"; | ||
import {renderValue} from "~/value"; | ||
|
||
interface CombineTextParameters { | ||
text: string | ||
WFTextSeparator: string | ||
WFTextCustomSeparator: string | ||
} | ||
|
||
export default { | ||
title: 'Combine', | ||
color: 'white', | ||
background: '#ffc200', | ||
icon: 'icon-text_alignleft', | ||
render: (container: HTMLElement, params: CombineTextParameters) => { | ||
return renderActionHeader(actions['text.combine'], | ||
renderValue(params['text'], 'Text List'), | ||
actionText('with'), | ||
renderValue(params['WFTextSeparator'] ?? null, 'Separator'), | ||
renderValue(params['WFTextCustomSeparator'] ?? null, 'CustomSeparator'), | ||
); | ||
} | ||
} |
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,23 @@ | ||
import {renderActionHeader} from "~/render"; | ||
import {actions, actionText} from "~/actions"; | ||
import {renderValue} from "~/value"; | ||
|
||
interface GetFromListParameters { | ||
WFInput: string | object, | ||
WFItemSpecifier: string | ||
} | ||
|
||
|
||
export default { | ||
title: 'Get', | ||
color: 'white', | ||
background: '#fc880f', | ||
icon: 'list_bullet', | ||
render: (container: HTMLElement, params: GetFromListParameters) => { | ||
return renderActionHeader(actions['getitemfromlist'], | ||
renderValue(params['WFItemSpecifier'], 'Item Specifier'), | ||
actionText('from'), | ||
renderValue(params['WFInput'] ?? null, 'Input'), | ||
); | ||
} | ||
} |
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,24 @@ | ||
import {renderActionHeader} from "~/render"; | ||
import {actions, actionText} from "~/actions"; | ||
import {renderValue} from "~/value"; | ||
|
||
interface SplitTextParameters { | ||
text: string | ||
WFTextSeparator: string | ||
WFTextCustomSeparator: string | ||
} | ||
|
||
export default { | ||
title: 'Split', | ||
color: 'white', | ||
background: '#ffc200', | ||
icon: 'icon-text_alignleft', | ||
render: (container: HTMLElement, params: SplitTextParameters) => { | ||
return renderActionHeader(actions['text.split'], | ||
renderValue(params['text'], 'Text List'), | ||
actionText('by'), | ||
renderValue(params['WFTextSeparator'] ?? null, 'Separator'), | ||
renderValue(params['WFTextCustomSeparator'] ?? null, 'Custom Separator'), | ||
); | ||
} | ||
} |