-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add timeinterval for the interval trigger in workflow (#88)
* feat(core): add timeinterval for the interval trigger in workflow * refactor(core): add changes
- Loading branch information
1 parent
242eaeb
commit 2a7d458
Showing
19 changed files
with
201 additions
and
21 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
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
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
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
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
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
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
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
21 changes: 21 additions & 0 deletions
21
projects/workflows-creator/src/lib/services/statement/inputs/stepper.input.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,21 @@ | ||
import {State, WorkflowPrompt} from '../../../classes'; | ||
import {InputTypes} from '../../../enum'; | ||
import {RecordOfAnyType} from '../../../types'; | ||
|
||
export class StepperInput extends WorkflowPrompt { | ||
prefix = ''; | ||
suffix = ''; | ||
typeFunction = () => InputTypes.Stepper; | ||
inputKey = 'value'; | ||
listNameField = 'text'; | ||
listValueField = 'value'; | ||
placeholder = 'n'; | ||
customPlaceholder: string | {state: string} = {state: 'stepperPlaceholder'}; | ||
options = <S extends RecordOfAnyType>(state: State<S>) => | ||
state.get('stepperCount') as []; | ||
static identifier = 'StepperInput'; | ||
|
||
getIdentifier(): string { | ||
return StepperInput.identifier; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
projects/workflows-creator/src/lib/services/statement/inputs/timeinterval.input.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,30 @@ | ||
import {State, WorkflowPrompt} from '../../../classes'; | ||
import {InputTypes, IntervalType} from '../../../enum'; | ||
import {BpmnNode, RecordOfAnyType} from '../../../types'; | ||
export class TimeIntervalInput extends WorkflowPrompt { | ||
prefix: string | {state: string} = {state: 'timeIntervalSuffix'}; | ||
suffix = ''; | ||
typeFunction = () => InputTypes.IntervalTime; | ||
inputKey = 'TimeInterval'; | ||
listNameField = 'text'; | ||
listValueField = 'value'; | ||
placeholder = 'hh:mm'; | ||
customPlaceholder: string | {state: string} = {state: 'timeStatePlaceholder'}; | ||
isHidden = (node: BpmnNode) => { | ||
return ![ | ||
IntervalType.Weeks, | ||
IntervalType.Months, | ||
IntervalType.Week, | ||
IntervalType.Month, | ||
IntervalType.Days, | ||
IntervalType.Day, | ||
].includes(node.state.get('intervalType')); | ||
}; | ||
options = <S extends RecordOfAnyType>(state: State<S>) => | ||
state.get('timevalues'); | ||
static identifier = 'TimeIntervalInput'; | ||
|
||
getIdentifier(): string { | ||
return TimeIntervalInput.identifier; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
projects/workflows-creator/src/lib/services/statement/inputs/tointerval.input.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,30 @@ | ||
import {State, WorkflowPrompt} from '../../../classes'; | ||
import {InputTypes, IntervalType} from '../../../enum'; | ||
import {BpmnNode, RecordOfAnyType} from '../../../types'; | ||
|
||
export class ToIntervalInput extends WorkflowPrompt { | ||
prefix = ''; | ||
suffix = ''; | ||
typeFunction = <S extends RecordOfAnyType>(state: State<S>) => | ||
state.get('valueInputTypes') as InputTypes; | ||
inputKey = 'toInterval'; | ||
listNameField = 'text'; | ||
listValueField = 'value'; | ||
placeholder = 'weekday'; | ||
customPlaceholder: string | {state: string} = {state: 'dateStatePlaceholder'}; | ||
isHidden = (node: BpmnNode) => { | ||
return ![ | ||
IntervalType.Weeks, | ||
IntervalType.Months, | ||
IntervalType.Week, | ||
IntervalType.Month, | ||
].includes(node.state.get('intervalType')); | ||
}; | ||
options = <S extends RecordOfAnyType>(state: State<S>) => | ||
state.get('intervalOption'); | ||
static identifier = 'ToIntervalInput'; | ||
|
||
getIdentifier(): string { | ||
return ToIntervalInput.identifier; | ||
} | ||
} |
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