mirror of
https://github.com/nocobase/nocobase
synced 2024-11-17 23:46:05 +00:00
4fbad75ea9
* feat(plugin-workflow): add prompt node * feat(plugin-workflow): useValueGetter for all instructions and triggers * feat(plugin-workflow): add workflow block initializer * refactor(plugin-workflow): change prompt node type to manual * feat(plugin-workflow): add ModeConfig component for mode * feat(plugin-workflow): add todo drawer * feat(plugin-workflow): add block value provider * feat(plugin-workflow): improve todo block and drawer * fix(plugin-workflow): fix instruction name in test cases * fix(plugin-workflow): fix test cases * refactor(plugin-workflow): change param type of collection field initializer * feat(plugin-workflow): add filter types for getters * fix(plugin-workflow): fix assignees variable * fix(plugin-workflow): filter todo by exist workflow * fix(plugin-workflow): fix duplicated save action in manual config * fix(plugin-workflow): fix transaction * feat(plugin-workflow): destroy workflow will be cascaded * fix(plugin-workflow): fix merge * fix(plugin-workflow): fix locale * fix(plugin-workflow): allow open ui view when executed * fix(plugin-workflow): change todo table filter * feat(plugin-workflow): use formula for calculation * fix(plugin-workflow): fix variable template regexp * fix(plugin-workflow): fix sub-options logic with types * refactor(plugin-workflow): drop useless component * fix(plugin-workflow): fix manual node action button * feat(plugin-workflow): add new variable input component * refactor(plugin-workflow): change all variable to new component * fix(plugin-workflow): fix type * fix(plugin-workflow): fix functions init * fix(plugin-workflow): change jsonb to json for stable order * fix(plugin-workflow): fix duplicated field name when initialize * fix(plugin-workflow): fix manual result in manual block * test(plugin-workflow): log field initializer props * fix(plugin-workflow): fix nullable arguments * test(plugin-workflow): test initializer fields schema * fix: observer * fix(plugin-workflow): adjust hints * fix(plugin-workflow): fix locale and cursor in variable input * refactor(plugin-workflow): change status keys * fix(plugin-workflow): fix parallel instruction * fix(plugin-workflow): fix calculation migration * fix(plugin-workflow): move tasks native filter to server * fix(plugin-workflow): fix manual options for variable * fix(plugin-workflow): fix conflict * fix(plugin-workflow): fix some bugs * fix(plugin-workflow): fix todo list filter and locale * fix(plugin-workflow): fix update action of workflow * refactor(plugin-workflow): add legacy condition calculation as basic engine * fix(plugin-workflow): fix type * fix(plugin-workflow): fix condition basic calculation * fix(plugin-workflow): fix type * fix(plugin-workflow): fix migration * fix(plugin-workflow): fix evaluators and scope * fix(plugin-workflow): remove disabled type select in schema config * fix(plugin-workflow): fix manual form schema designer --------- Co-authored-by: chenos <chenlinxh@gmail.com>
238 lines
3.6 KiB
TypeScript
238 lines
3.6 KiB
TypeScript
import { css } from '@emotion/css';
|
|
|
|
export const workflowPageClass = css`
|
|
.workflow-toolbar{
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0.5rem 1rem;
|
|
background: #fff;
|
|
|
|
header{
|
|
display: flex;
|
|
align-items: center;
|
|
min-height: 2rem;
|
|
}
|
|
|
|
aside{
|
|
display: flex;
|
|
align-items: center;
|
|
gap: .5em;
|
|
}
|
|
|
|
.workflow-versions{
|
|
label{
|
|
margin-right: .5em;
|
|
}
|
|
}
|
|
}
|
|
|
|
.workflow-canvas{
|
|
width: min-content;
|
|
min-width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 2em;
|
|
}
|
|
`;
|
|
|
|
export const workflowVersionDropdownClass = css`
|
|
.ant-dropdown-menu-item{
|
|
|
|
strong{
|
|
font-weight: normal;
|
|
}
|
|
|
|
&.enabled{
|
|
strong{
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
|
|
&.unexecuted{
|
|
strong{
|
|
font-style: italic;
|
|
}
|
|
}
|
|
|
|
.ant-dropdown-menu-title-content{
|
|
text-align: right;
|
|
|
|
time{
|
|
margin-left: 0.5rem;
|
|
color: #999;
|
|
font-size: 80%;
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const branchBlockClass = css`
|
|
display: flex;
|
|
position: relative;
|
|
|
|
:before{
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: calc(50% - .5px);
|
|
width: 1px;
|
|
background-color: #f0f2f5;
|
|
}
|
|
`;
|
|
|
|
export const branchClass = css`
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
position: relative;
|
|
padding: 0 2em;
|
|
|
|
.workflow-node-list{
|
|
flex-grow: 1;
|
|
min-width: 20em;
|
|
}
|
|
|
|
.workflow-branch-lines{
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 1px;
|
|
background-color: #ddd;
|
|
}
|
|
|
|
:before,:after{
|
|
content: "";
|
|
position: absolute;
|
|
height: 1px;
|
|
background-color: #ddd;
|
|
}
|
|
|
|
:before{
|
|
top: 0;
|
|
}
|
|
|
|
:after{
|
|
bottom: 0;
|
|
}
|
|
|
|
:not(:first-child):not(:last-child){
|
|
:before,:after{
|
|
left: 0;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
:last-child:not(:first-child){
|
|
:before,:after{
|
|
right: 50%;
|
|
width: 50%;
|
|
}
|
|
}
|
|
|
|
:first-child:not(:last-child){
|
|
:before,:after{
|
|
left: 50%;
|
|
width: 50%;
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const nodeBlockClass = css`
|
|
flex-grow: 1;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
position: relative;
|
|
`;
|
|
|
|
export const nodeClass = css`
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
`;
|
|
|
|
export const nodeCardClass = css`
|
|
width: 20em;
|
|
background: #fff;
|
|
padding: 1em;
|
|
box-shadow: 0 .25em .5em rgba(0, 0, 0, .1);
|
|
|
|
.workflow-node-remove-button,
|
|
.workflow-node-job-button{
|
|
position: absolute;
|
|
right: -.5em;
|
|
top: -.5em;
|
|
}
|
|
|
|
.workflow-node-remove-button{
|
|
color: #999;
|
|
opacity: 0;
|
|
transition: opacity .3s ease;
|
|
|
|
&[disabled]{
|
|
display: none;
|
|
}
|
|
|
|
&:hover {
|
|
color: red;
|
|
}
|
|
}
|
|
|
|
.workflow-node-job-button{
|
|
display: flex;
|
|
top: 0;
|
|
right: 0;
|
|
width: 1.25rem;
|
|
height: 1.25rem;
|
|
min-width: 1.25rem;
|
|
justify-content: center;
|
|
align-items: center;
|
|
font-size: 0.8em;
|
|
color: #fff;
|
|
|
|
&[type="button"]{
|
|
border: none;
|
|
}
|
|
}
|
|
|
|
&:hover{
|
|
.workflow-node-remove-button{
|
|
opacity: 1;
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const nodeHeaderClass = css`
|
|
position: relative;
|
|
`;
|
|
|
|
export const nodeMetaClass = css`
|
|
margin-bottom: .5em;
|
|
`;
|
|
|
|
export const nodeTitleClass = css`
|
|
display: flex;
|
|
align-items: center;
|
|
font-weight: normal;
|
|
|
|
.workflow-node-id{
|
|
color: #999;
|
|
}
|
|
`;
|
|
|
|
export const nodeSubtreeClass = css`
|
|
display: flex;
|
|
flex-direction: column-reverse;
|
|
align-items: center;
|
|
`;
|
|
|
|
export const addButtonClass = css`
|
|
flex-shrink: 0;
|
|
padding: 2em 0;
|
|
`;
|