Update designer package

This commit is contained in:
Sipke Schoorstra 2021-05-07 13:30:36 +02:00
parent 0e9f139505
commit 70d2e21318
6 changed files with 62 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{
"name": "@elsa-workflows/elsa-workflow-designer",
"version": "2.0.0-preview-9",
"description": "Stencil Component Starter",
"version": "2.0.0-rc1.1",
"description": "Elsa Workflow Designer is a collection of web components to manage Elsa workflows stored on an Elsa Workflows server.",
"main": "dist/index.cjs.js",
"module": "dist/custom-elements/index.js",
"es2015": "dist/esm/index.mjs",
@ -15,6 +15,7 @@
"loader/"
],
"scripts": {
"push": "npm publish --access-public",
"push:preview": "npm publish --access-public --tag preview",
"build": "npm run build:tailwind:prod & stencil build",
"build:dev": "stencil build --dev --tailwind:dev",

View file

@ -141,6 +141,8 @@ export namespace Components {
"propertyDescriptor": ActivityPropertyDescriptor;
"propertyModel": ActivityDefinitionProperty;
}
interface ElsaStudioHome {
}
interface ElsaStudioRoot {
"monacoLibPath": string;
"serverUrl": string;
@ -356,6 +358,12 @@ declare global {
prototype: HTMLElsaSingleLinePropertyElement;
new (): HTMLElsaSingleLinePropertyElement;
};
interface HTMLElsaStudioHomeElement extends Components.ElsaStudioHome, HTMLStencilElement {
}
var HTMLElsaStudioHomeElement: {
prototype: HTMLElsaStudioHomeElement;
new (): HTMLElsaStudioHomeElement;
};
interface HTMLElsaStudioRootElement extends Components.ElsaStudioRoot, HTMLStencilElement {
}
var HTMLElsaStudioRootElement: {
@ -492,6 +500,7 @@ declare global {
"elsa-property-editor": HTMLElsaPropertyEditorElement;
"elsa-script-property": HTMLElsaScriptPropertyElement;
"elsa-single-line-property": HTMLElsaSingleLinePropertyElement;
"elsa-studio-home": HTMLElsaStudioHomeElement;
"elsa-studio-root": HTMLElsaStudioRootElement;
"elsa-studio-workflow-blueprint-view": HTMLElsaStudioWorkflowBlueprintViewElement;
"elsa-studio-workflow-definitions-edit": HTMLElsaStudioWorkflowDefinitionsEditElement;
@ -644,6 +653,8 @@ declare namespace LocalJSX {
"propertyDescriptor"?: ActivityPropertyDescriptor;
"propertyModel"?: ActivityDefinitionProperty;
}
interface ElsaStudioHome {
}
interface ElsaStudioRoot {
"monacoLibPath"?: string;
"serverUrl"?: string;
@ -748,6 +759,7 @@ declare namespace LocalJSX {
"elsa-property-editor": ElsaPropertyEditor;
"elsa-script-property": ElsaScriptProperty;
"elsa-single-line-property": ElsaSingleLineProperty;
"elsa-studio-home": ElsaStudioHome;
"elsa-studio-root": ElsaStudioRoot;
"elsa-studio-workflow-blueprint-view": ElsaStudioWorkflowBlueprintView;
"elsa-studio-workflow-definitions-edit": ElsaStudioWorkflowDefinitionsEdit;
@ -794,6 +806,7 @@ declare module "@stencil/core" {
"elsa-property-editor": LocalJSX.ElsaPropertyEditor & JSXBase.HTMLAttributes<HTMLElsaPropertyEditorElement>;
"elsa-script-property": LocalJSX.ElsaScriptProperty & JSXBase.HTMLAttributes<HTMLElsaScriptPropertyElement>;
"elsa-single-line-property": LocalJSX.ElsaSingleLineProperty & JSXBase.HTMLAttributes<HTMLElsaSingleLinePropertyElement>;
"elsa-studio-home": LocalJSX.ElsaStudioHome & JSXBase.HTMLAttributes<HTMLElsaStudioHomeElement>;
"elsa-studio-root": LocalJSX.ElsaStudioRoot & JSXBase.HTMLAttributes<HTMLElsaStudioRootElement>;
"elsa-studio-workflow-blueprint-view": LocalJSX.ElsaStudioWorkflowBlueprintView & JSXBase.HTMLAttributes<HTMLElsaStudioWorkflowBlueprintViewElement>;
"elsa-studio-workflow-definitions-edit": LocalJSX.ElsaStudioWorkflowDefinitionsEdit & JSXBase.HTMLAttributes<HTMLElsaStudioWorkflowDefinitionsEditElement>;

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.5 KiB

View file

@ -0,0 +1,43 @@
import {Component, h, Prop, getAssetPath} from '@stencil/core';
@Component({
tag: 'elsa-studio-home',
shadow: false,
assetsDirs: ['assets']
})
export class ElsaStudioHome {
render() {
const visualPath = getAssetPath('./assets/undraw_breaking_barriers_vnf3.svg');
return (
<div class="relative bg-gray-800 overflow-hidden h-screen">
<main class="mt-16 sm:mt-24">
<div class="mx-auto max-w-7xl">
<div class="lg:grid lg:grid-cols-12 lg:gap-8">
<div class="px-4 sm:px-6 sm:text-center md:max-w-2xl md:mx-auto lg:col-span-6 lg:text-left lg:flex lg:items-center">
<div>
<h1 class="mt-4 text-4xl tracking-tight font-extrabold text-white sm:mt-5 sm:leading-none lg:mt-6 lg:text-5xl xl:text-6xl">
<span class="md:block">Welcome to</span>
<span class="text-teal-400 md:block">Elsa Workflows</span>
</h1>
<p class="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">
Use the dashboard app to manage all the things.
</p>
</div>
</div>
<div class="mt-16 sm:mt-24 lg:mt-0 lg:col-span-6">
<div class="sm:max-w-md sm:w-full sm:mx-auto sm:rounded-lg sm:overflow-hidden">
<div class="px-4 py-8 sm:px-10">
<img src={visualPath} alt="" width={400} />
</div>
</div>
</div>
</div>
</div>
</main>
</div>
);
}
}

View file

@ -50,7 +50,7 @@ export class ElsaStudioRoot {
{/*<Tunnel.Provider state={tunnelState}>*/}
<stencil-router>
<stencil-route-switch scrollTopOffset={0}>
<stencil-route url="/" routeRender={props => <stencil-route-redirect url="/workflow-registry"/>} exact={true}/>
<stencil-route url="/" component="elsa-studio-home" exact={true}/>
<stencil-route url="/workflow-registry" component="elsa-studio-workflow-registry" componentProps={{'serverUrl': serverUrl}} exact={true}/>
<stencil-route url="/workflow-registry/:id" component="elsa-studio-workflow-blueprint-view" componentProps={{'serverUrl': serverUrl}} />
<stencil-route url="/workflow-definitions" component="elsa-studio-workflow-definitions-list" componentProps={{'serverUrl': serverUrl}} exact={true}/>

View file

@ -41,7 +41,7 @@ namespace ElsaDashboard.Samples.AspNetCore.Monolith
services
.AddElsaApiEndpoints();
// Allow arbitrary client browser apps to access the API for demo purposes only.
// Allow arbitrary client browser apps to access the API.
// In a production environment, make sure to allow only origins you trust.
services.AddCors(cors => cors.AddDefaultPolicy(policy => policy.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin().WithExposedHeaders("Content-Disposition")));
}