Update references
This commit is contained in:
parent
691565ed98
commit
6ed138d4eb
|
|
@ -7,7 +7,7 @@
|
|||
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
|
||||
import { ActivityDefinition, ActivityDefinitionPropsUpdatedArgs, ActivityDefinitionSummary, ActivityDefinitionUpdatedArgs } from "./modules/activity-definitions/models";
|
||||
import { ActivityDriverRegistry, ContainerActivityComponent } from "./services";
|
||||
import { ActionDefinition, ActionInvokedArgs, Activity, ActivityDeletedArgs, ActivitySelectedArgs, ChildActivitySelectedArgs, ContainerSelectedArgs, EditChildActivityArgs, GraphUpdatedArgs, IntellisenseContext, SelectListItem, TabChangedArgs, TabDefinition, Variable, WorkflowInstance, WorkflowInstanceSummary } from "./models";
|
||||
import { Activity, ActivityDeletedArgs, ActivitySelectedArgs, ChildActivitySelectedArgs, ContainerSelectedArgs, EditChildActivityArgs, GraphUpdatedArgs, IntellisenseContext, SelectListItem, TabChangedArgs, TabDefinition, Variable, WorkflowInstance, WorkflowInstanceSummary } from "./models";
|
||||
import { ActivityUpdatedArgs, DeleteActivityRequestedArgs } from "./modules/workflow-definitions/components/activity-properties-editor";
|
||||
import { PublishClickedArgs } from "./modules/activity-definitions/components/publish-button";
|
||||
import { Button } from "./components/shared/button-group/models";
|
||||
|
|
@ -19,8 +19,10 @@ import { Flowchart, FlowchartNavigationItem } from "./modules/flowchart/models";
|
|||
import { Graph } from "@antv/x6";
|
||||
import { AddActivityArgs as AddActivityArgs1, RenameActivityArgs as RenameActivityArgs1, UpdateActivityArgs as UpdateActivityArgs1 } from "./components/designer/canvas/canvas";
|
||||
import { ActivityNodeShape } from "./modules/flowchart/shapes";
|
||||
import { ActionDefinition, ActionInvokedArgs } from "./components/shared/modal-dialog";
|
||||
import { ExpressionChangedArs } from "./components/designer/input-control-switch/input-control-switch";
|
||||
import { CreateLabelEventArgs, DeleteLabelEventArgs, Label, UpdateLabelEventArgs } from "./modules/labels/models";
|
||||
import { ActionDefinition as ActionDefinition1, ActionInvokedArgs as ActionInvokedArgs1 } from "./components/shared/modal-dialog/models";
|
||||
import { MonacoLib, MonacoValueChangedArgs } from "./components/shared/monaco-editor/monaco-editor";
|
||||
import { PagerData } from "./components/shared/pager/pager";
|
||||
import { PanelPosition, PanelStateChangedArgs } from "./components/panel/models";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import {Component, Event, EventEmitter, h, Prop} from '@stencil/core';
|
||||
import {ActionDefinition, ActionInvokedArgs, ActionType, TabChangedArgs, TabDefinition} from '../../../models';
|
||||
import {TabChangedArgs, TabDefinition} from '../../../models';
|
||||
import {isNullOrWhitespace} from "../../../utils";
|
||||
import {ActionDefinition, ActionInvokedArgs, ActionType} from "../../shared/modal-dialog";
|
||||
|
||||
@Component({
|
||||
tag: 'elsa-form-panel'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import {Component, Event, EventEmitter, h, Method, Prop, State, Watch} from '@stencil/core';
|
||||
import {ActionDefinition, ActionType, TabDefinition} from '../../../models';
|
||||
import {TabDefinition} from '../../../models';
|
||||
import {ActionDefinition, ActionType} from "../../shared/modal-dialog";
|
||||
|
||||
@Component({
|
||||
tag: 'elsa-slide-over-panel'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {Component, h, Prop, Event, EventEmitter, Method} from "@stencil/core";
|
||||
import {DefaultActions, StorageDriverDescriptor, Variable} from "../../../models";
|
||||
import {StorageDriverDescriptor, Variable} from "../../../models";
|
||||
import {FormEntry} from "../../shared/forms/form-entry";
|
||||
import {isNullOrWhitespace} from "../../../utils";
|
||||
import descriptorsStore from '../../../data/descriptors-store';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {Component, Host, h, State, Listen, Method, Event, EventEmitter, Prop} from '@stencil/core';
|
||||
import {enter, leave} from 'el-transition'
|
||||
import {ActionDefinition, ActionInvokedArgs, ActionType} from '../../../models';
|
||||
import {ActionDefinition, ActionInvokedArgs, ActionType} from "./models";
|
||||
|
||||
@Component({
|
||||
tag: 'elsa-modal-dialog',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,67 @@
|
|||
import {ActionDefinition} from "../../../models";
|
||||
|
||||
export interface ModalDialogInstance {
|
||||
content: () => any;
|
||||
actions: Array<ActionDefinition>;
|
||||
}
|
||||
|
||||
export type ActionClickArgs = (e: Event, action: ActionDefinition) => void;
|
||||
|
||||
export interface ActionDefinition {
|
||||
text: string;
|
||||
name?: string;
|
||||
isPrimary?: boolean;
|
||||
isDangerous?: boolean;
|
||||
type?: ActionType;
|
||||
onClick?: ActionClickArgs;
|
||||
display?: (button: ActionDefinition) => any;
|
||||
}
|
||||
|
||||
export interface ActionInvokedArgs {
|
||||
action: ActionDefinition;
|
||||
}
|
||||
|
||||
export enum ActionType {
|
||||
Button,
|
||||
Submit,
|
||||
Cancel
|
||||
}
|
||||
|
||||
export class DefaultActions {
|
||||
|
||||
public static Cancel = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'Cancel',
|
||||
name: 'Cancel',
|
||||
type: ActionType.Cancel,
|
||||
onClick: handler
|
||||
});
|
||||
|
||||
public static Close = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'Close',
|
||||
name: 'Close',
|
||||
type: ActionType.Cancel,
|
||||
onClick: handler
|
||||
});
|
||||
|
||||
public static Save = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'Save',
|
||||
name: 'Save',
|
||||
type: ActionType.Submit,
|
||||
isPrimary: true,
|
||||
onClick: handler
|
||||
});
|
||||
|
||||
public static Delete = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'Delete',
|
||||
name: 'Delete',
|
||||
type: ActionType.Button,
|
||||
isDangerous: true,
|
||||
onClick: handler
|
||||
});
|
||||
|
||||
public static New = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'New',
|
||||
name: 'New',
|
||||
type: ActionType.Button,
|
||||
isPrimary: true,
|
||||
onClick: handler
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import 'reflect-metadata';
|
||||
import {Service} from "typedi";
|
||||
import state from "./state";
|
||||
import {ModalDialogInstance} from "./models";
|
||||
import {ActionDefinition, ModalDialogInstance} from "./models";
|
||||
|
||||
@Service()
|
||||
export class ModalDialogService {
|
||||
|
||||
show(content: () => any): ModalDialogInstance {
|
||||
show(content: () => any, actions?: Array<ActionDefinition>): ModalDialogInstance {
|
||||
const newInstance: ModalDialogInstance = {
|
||||
content: content,
|
||||
actions: []
|
||||
|
|
|
|||
|
|
@ -11,69 +11,6 @@ export interface TabChangedArgs {
|
|||
selectedTabIndex: number;
|
||||
}
|
||||
|
||||
export enum ActionType {
|
||||
Button,
|
||||
Submit,
|
||||
Cancel
|
||||
}
|
||||
|
||||
export type ActionClickArgs = (e: Event, action: ActionDefinition) => void;
|
||||
|
||||
export interface ActionDefinition {
|
||||
text: string;
|
||||
name?: string;
|
||||
isPrimary?: boolean;
|
||||
isDangerous?: boolean;
|
||||
type?: ActionType;
|
||||
onClick?: ActionClickArgs;
|
||||
display?: (button: ActionDefinition) => any;
|
||||
}
|
||||
|
||||
export interface ActionInvokedArgs {
|
||||
action: ActionDefinition;
|
||||
}
|
||||
|
||||
export class DefaultActions {
|
||||
|
||||
public static Cancel = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'Cancel',
|
||||
name: 'Cancel',
|
||||
type: ActionType.Cancel,
|
||||
onClick: handler
|
||||
});
|
||||
|
||||
public static Close = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'Close',
|
||||
name: 'Close',
|
||||
type: ActionType.Cancel,
|
||||
onClick: handler
|
||||
});
|
||||
|
||||
public static Save = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'Save',
|
||||
name: 'Save',
|
||||
type: ActionType.Submit,
|
||||
isPrimary: true,
|
||||
onClick: handler
|
||||
});
|
||||
|
||||
public static Delete = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'Delete',
|
||||
name: 'Delete',
|
||||
type: ActionType.Button,
|
||||
isDangerous: true,
|
||||
onClick: handler
|
||||
});
|
||||
|
||||
public static New = (handler?: ActionClickArgs): ActionDefinition => ({
|
||||
text: 'New',
|
||||
name: 'New',
|
||||
type: ActionType.Button,
|
||||
isPrimary: true,
|
||||
onClick: handler
|
||||
});
|
||||
}
|
||||
|
||||
export interface RenderActivityPropsContext {
|
||||
activity: Activity;
|
||||
activityDescriptor: ActivityDescriptor;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@ import {Container} from 'typedi';
|
|||
import {Filter, FilterProps} from './filter';
|
||||
import {ActivityDefinitionsApi} from "../services/api";
|
||||
import {ActivityDefinitionsOrderBy, ActivityDefinitionSummary} from "../models";
|
||||
import {DefaultActions, PagedList, VersionOptions} from "../../../models";
|
||||
import {PagedList, VersionOptions} from "../../../models";
|
||||
import {DeleteIcon, EditIcon, PublishIcon, UnPublishIcon} from "../../../components/icons/tooling";
|
||||
import {PagerData} from "../../../components/shared/pager/pager";
|
||||
import {updateSelectedActivityDefinitions} from "../services/utils";
|
||||
import {DefaultActions} from "../../../components/shared/modal-dialog";
|
||||
|
||||
@Component({
|
||||
tag: 'elsa-activity-definition-browser',
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import {Component, h, Host, Method, State} from '@stencil/core';
|
||||
import {debounce} from 'lodash';
|
||||
import {DefaultActions, EventTypes} from "../../models";
|
||||
import {EventTypes} from "../../models";
|
||||
import {Container} from "typedi";
|
||||
import labelStore from "./label-store";
|
||||
import {ElsaApiClientProvider, ElsaClient, EventBus} from "../../services";
|
||||
import {CreateLabelEventArgs, DeleteLabelEventArgs, UpdateLabelEventArgs} from "./models";
|
||||
import {LabelsApi, WorkflowDefinitionLabelsApi} from "./labels-api";
|
||||
import {ToolbarDisplayingArgs, ToolbarEventTypes} from "../../components/toolbar/workflow-toolbar-menu/models";
|
||||
import {isNullOrWhitespace} from "../../utils";
|
||||
import {FormEntry} from "../../components/shared/forms/form-entry";
|
||||
import {WorkflowDefinitionManager} from "../workflow-definitions/services/manager";
|
||||
import {PropertiesTabModel, WorkflowDefinitionImportedArgs, WorkflowEditorEventTypes, WorkflowEditorReadyArgs, WorkflowPropertiesEditorDisplayingArgs, WorkflowPropertiesEditorEventTypes} from "../workflow-definitions/models/ui";
|
||||
import {DefaultActions} from "../../components/shared/modal-dialog";
|
||||
|
||||
@Component({
|
||||
tag: 'elsa-labels-manager',
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import {Component, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from '@stencil/core';
|
||||
import {DefaultActions, OrderBy, PagedList, VersionOptions} from '../../../models';
|
||||
import {OrderBy, PagedList, VersionOptions} from '../../../models';
|
||||
import {Container} from 'typedi';
|
||||
import {ElsaApiClientProvider, ElsaClient} from '../../../services';
|
||||
import {DeleteIcon, EditIcon, PublishIcon, UnPublishIcon} from '../../../components/icons/tooling';
|
||||
import {Filter, FilterProps} from './filter';
|
||||
import {PagerData} from '../../../components/shared/pager/pager';
|
||||
import {updateSelectedWorkflowDefinitions} from '../services/utils';
|
||||
import {WorkflowDefinitionSummary} from "../models/entities";
|
||||
import {WorkflowDefinitionsApi, WorkflowDefinitionsOrderBy} from "../services/api";
|
||||
import {DefaultActions} from "../../../components/shared/modal-dialog";
|
||||
|
||||
@Component({
|
||||
tag: 'elsa-workflow-definition-browser',
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@ import {Search} from "./search";
|
|||
import {Filter, FilterProps} from "./filter";
|
||||
import {ListWorkflowInstancesRequest, WorkflowInstancesApi} from "../services/api";
|
||||
import {WorkflowDefinitionSummary} from "../../workflow-definitions/models/entities";
|
||||
import {DefaultActions, OrderBy, OrderDirection, PagedList, VersionOptions, WorkflowInstanceSummary, WorkflowStatus, WorkflowSubStatus} from "../../../models";
|
||||
import {OrderBy, OrderDirection, PagedList, VersionOptions, WorkflowInstanceSummary, WorkflowStatus, WorkflowSubStatus} from "../../../models";
|
||||
import {Container} from "typedi";
|
||||
import {WorkflowDefinitionsApi} from "../../workflow-definitions/services/api";
|
||||
import {getSubStatusColor, updateSelectedWorkflowInstances} from "../services/utils";
|
||||
import {formatTimestamp} from "../../../utils";
|
||||
import {DeleteIcon, EditIcon} from "../../../components/icons/tooling";
|
||||
import {PagerData} from "../../../components/shared/pager/pager";
|
||||
import {DefaultActions} from "../../../components/shared/modal-dialog";
|
||||
|
||||
@Component({
|
||||
tag: 'elsa-workflow-instance-browser',
|
||||
|
|
|
|||
Loading…
Reference in a new issue