@operato/process 8.0.0-beta.0 → 8.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/package.json +14 -14
  3. package/.storybook/main.js +0 -3
  4. package/.storybook/preview.js +0 -52
  5. package/.storybook/server.mjs +0 -8
  6. package/src/data-storage/data-storage.ts +0 -47
  7. package/src/graphql/data-subscription.ts +0 -30
  8. package/src/graphql/favorite-process.ts +0 -25
  9. package/src/graphql/index.ts +0 -3
  10. package/src/graphql/process-group.ts +0 -138
  11. package/src/graphql/process.ts +0 -141
  12. package/src/graphql/scenario.ts +0 -79
  13. package/src/index.ts +0 -8
  14. package/src/modeller/component-toolbar/component-detail.ts +0 -58
  15. package/src/modeller/component-toolbar/component-menu.ts +0 -193
  16. package/src/modeller/component-toolbar/component-toolbar.ts +0 -196
  17. package/src/modeller/component-toolbar/mode-icons.ts +0 -88
  18. package/src/modeller/edit-toolbar-style.ts +0 -229
  19. package/src/modeller/edit-toolbar.ts +0 -576
  20. package/src/modeller/property-sidebar/abstract-property.ts +0 -69
  21. package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +0 -475
  22. package/src/modeller/property-sidebar/data-binding/data-binding.ts +0 -479
  23. package/src/modeller/property-sidebar/effects/effects-shared-style.ts +0 -62
  24. package/src/modeller/property-sidebar/effects/effects.ts +0 -52
  25. package/src/modeller/property-sidebar/effects/property-event-hover.ts +0 -201
  26. package/src/modeller/property-sidebar/effects/property-event-tap.ts +0 -212
  27. package/src/modeller/property-sidebar/effects/property-event.ts +0 -76
  28. package/src/modeller/property-sidebar/effects/property-shadow.ts +0 -114
  29. package/src/modeller/property-sidebar/effects/value-converter.ts +0 -23
  30. package/src/modeller/property-sidebar/inspector/inspector.ts +0 -408
  31. package/src/modeller/property-sidebar/property-shared-style.ts +0 -136
  32. package/src/modeller/property-sidebar/property-sidebar.ts +0 -342
  33. package/src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts +0 -94
  34. package/src/modeller/property-sidebar/shapes/shapes.ts +0 -410
  35. package/src/modeller/property-sidebar/specifics/specific-properties-builder.ts +0 -147
  36. package/src/modeller/property-sidebar/specifics/specifics.ts +0 -81
  37. package/src/modeller/property-sidebar/styles/styles.ts +0 -577
  38. package/src/ox-editor-process-selector.ts +0 -91
  39. package/src/ox-process-list.ts +0 -401
  40. package/src/ox-process-modeller.ts +0 -432
  41. package/src/ox-process-template-list.ts +0 -272
  42. package/src/ox-process-template-viewer.ts +0 -198
  43. package/src/ox-process-viewer.ts +0 -575
  44. package/src/ox-property-editor-process-selector.ts +0 -23
  45. package/src/selector/ox-process-creation-card.ts +0 -95
  46. package/src/selector/ox-process-selector.ts +0 -324
  47. package/src/selector/process-creation-popup.ts +0 -151
  48. package/src/selector/process-thumbnail-card.ts +0 -175
  49. package/src/types.ts +0 -57
  50. package/stories/index.stories.ts +0 -54
  51. package/tsconfig.json +0 -24
  52. package/web-dev-server.config.mjs +0 -30
  53. package/web-test-runner.config.mjs +0 -29
package/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [8.0.0-beta.1](https://github.com/heartyoh/ioperato/compare/v8.0.0-beta.0...v8.0.0-beta.1) (2025-01-08)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * missing .npmignore ([be05985](https://github.com/heartyoh/ioperato/commit/be05985abfae4af53501f718dd52932099f7fbcb))
12
+
13
+
14
+
6
15
  ## [8.0.0-beta.0](https://github.com/heartyoh/ioperato/compare/v8.0.0-alpha.56...v8.0.0-beta.0) (2025-01-07)
7
16
 
8
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/process",
3
- "version": "8.0.0-beta.0",
3
+ "version": "8.0.0-beta.1",
4
4
  "description": "Webcomponent for business process modeling following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "main": "dist/src/index.js",
@@ -74,18 +74,18 @@
74
74
  },
75
75
  "dependencies": {
76
76
  "@open-wc/scoped-elements": "^2.1.3",
77
- "@operato/app": "^8.0.0-beta.0",
78
- "@operato/board": "^8.0.0-beta.0",
79
- "@operato/data-grist": "^8.0.0-beta.0",
80
- "@operato/font": "^8.0.0-beta.0",
81
- "@operato/graphql": "^8.0.0-beta.0",
82
- "@operato/i18n": "^8.0.0-beta.0",
83
- "@operato/input": "^8.0.0-beta.0",
84
- "@operato/markdown": "^8.0.0-beta.0",
85
- "@operato/popup": "^8.0.0-beta.0",
86
- "@operato/property-editor": "^8.0.0-beta.0",
87
- "@operato/styles": "^8.0.0-beta.0",
88
- "@operato/utils": "^8.0.0-beta.0",
77
+ "@operato/app": "^8.0.0-beta.1",
78
+ "@operato/board": "^8.0.0-beta.1",
79
+ "@operato/data-grist": "^8.0.0-beta.1",
80
+ "@operato/font": "^8.0.0-beta.1",
81
+ "@operato/graphql": "^8.0.0-beta.1",
82
+ "@operato/i18n": "^8.0.0-beta.1",
83
+ "@operato/input": "^8.0.0-beta.1",
84
+ "@operato/markdown": "^8.0.0-beta.1",
85
+ "@operato/popup": "^8.0.0-beta.1",
86
+ "@operato/property-editor": "^8.0.0-beta.1",
87
+ "@operato/styles": "^8.0.0-beta.1",
88
+ "@operato/utils": "^8.0.0-beta.1",
89
89
  "@polymer/paper-dropdown-menu": "^3.2.0",
90
90
  "@types/file-saver": "^2.0.4",
91
91
  "@types/sortablejs": "^1.10.7",
@@ -134,5 +134,5 @@
134
134
  "prettier --write"
135
135
  ]
136
136
  },
137
- "gitHead": "c4e9cc245659d050a9ffd66542083a6daad4bcb9"
137
+ "gitHead": "d5b28a2e9deb632c0dc80132f6a7196dd6fe4220"
138
138
  }
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- stories: ['../dist/stories/**/*.stories.{js,md,mdx}']
3
- }
@@ -1,52 +0,0 @@
1
- import { i18next } from '@operato/i18n'
2
-
3
- export const globalTypes = {
4
- locale: {
5
- name: 'Locale',
6
- description: 'Internationalization locale',
7
- toolbar: {
8
- icon: 'globe',
9
- items: [
10
- { value: 'en', right: '🇺🇸', title: 'English' },
11
- { value: 'ko', right: '🇰🇷', title: '한국어' },
12
- { value: 'zh', right: '🇨🇳', title: '中文' },
13
- { value: 'ja', right: '🇯🇵', title: '日本語' },
14
- { value: 'ms', right: '🇲🇾', title: 'Bahasa Melayu' }
15
- ],
16
- showName: true
17
- }
18
- },
19
- theme: {
20
- name: 'Theme',
21
- description: 'Global theme for components',
22
- toolbar: {
23
- icon: 'paintbrush',
24
- items: [
25
- { value: 'light', title: 'Light' },
26
- { value: 'dark', title: 'Dark' }
27
- ],
28
- showName: true
29
- }
30
- }
31
- }
32
-
33
- export const decorators = [
34
- (Story, context) => {
35
- const { locale, theme } = context.globals
36
-
37
- if (locale) {
38
- i18next.changeLanguage(locale)
39
- }
40
-
41
- // Set the theme class for the document
42
- if (theme === 'dark') {
43
- document.documentElement.classList.add('dark')
44
- document.documentElement.classList.remove('light')
45
- } else {
46
- document.documentElement.classList.add('light')
47
- document.documentElement.classList.remove('dark')
48
- }
49
-
50
- return Story()
51
- }
52
- ]
@@ -1,8 +0,0 @@
1
- import { storybookPlugin } from '@web/dev-server-storybook'
2
- import baseConfig from '../web-dev-server.config.mjs'
3
-
4
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
5
- ...baseConfig,
6
- open: '/',
7
- plugins: [storybookPlugin({ type: 'web-components' }), ...baseConfig.plugins]
8
- })
@@ -1,47 +0,0 @@
1
- import Dexie from 'dexie'
2
-
3
- import { Component, PersistentDataStorage } from '@hatiolab/things-scene'
4
-
5
- class ProcessDatabase extends Dexie {
6
- process_data!: Dexie.Table<IProcessData, number> // number = type of the primkey
7
- //...other tables goes here...
8
-
9
- constructor() {
10
- super('operato-process-database')
11
- this.version(1).stores({
12
- process_data: '[process+refid]'
13
- //...other tables goes here...
14
- })
15
- }
16
- }
17
-
18
- interface IProcessData {
19
- id?: number
20
- process: string
21
- refid: string | number
22
- data: any
23
- timestamp: number
24
- }
25
-
26
- const db = new ProcessDatabase()
27
-
28
- export class DataStorage implements PersistentDataStorage {
29
- private id: string
30
-
31
- constructor(id: string) {
32
- this.id = id
33
- }
34
-
35
- public async load(key: Component): Promise<any> {
36
- const saved = await db.process_data.where({ process: this.id, refid: key.state.refid }).first()
37
- return saved?.data
38
- }
39
-
40
- public async save(key: Component, value: any): Promise<void> {
41
- await db.process_data.put({ process: this.id, refid: key.state.refid, data: value, timestamp: Date.now() })
42
- }
43
-
44
- public async clear(key: Component): Promise<void> {
45
- await db.process_data.where({ process: this.id, refid: key.state.refid }).delete()
46
- }
47
- }
@@ -1,30 +0,0 @@
1
- import { Component, DataSubscriptionProvider } from '@hatiolab/things-scene'
2
-
3
- import gql from 'graphql-tag'
4
- import { subscribe } from '@operato/graphql'
5
-
6
- export class DataSubscriptionProviderImpl implements DataSubscriptionProvider {
7
- async subscribe(tag: string, component: Component) {
8
- return await subscribe(
9
- {
10
- query: gql`
11
- subscription {
12
- data(tag: "${tag}") {
13
- tag
14
- data
15
- }
16
- }
17
- `
18
- },
19
- {
20
- next: async ({ data }: { data: any }) => {
21
- if (data) {
22
- component.data = data.data.data
23
- }
24
- }
25
- }
26
- )
27
- }
28
-
29
- dispose() {}
30
- }
@@ -1,25 +0,0 @@
1
- import { buildArgs, client } from '@operato/graphql'
2
-
3
- import gql from 'graphql-tag'
4
-
5
- export async function fetchFavoriteProcessList(listParam = {}) {
6
- const response = await client.query({
7
- query: gql`
8
- {
9
- favoriteProcesses(${buildArgs(listParam)}) {
10
- items {
11
- id
12
- name
13
- description
14
- thumbnail
15
- createdAt
16
- updatedAt
17
- }
18
- total
19
- }
20
- }
21
- `
22
- })
23
-
24
- return response.data
25
- }
@@ -1,3 +0,0 @@
1
- export * from './process'
2
- export * from './process-group'
3
- export * from './favorite-process'
@@ -1,138 +0,0 @@
1
- import { ProcessGroup } from '../types'
2
- import { client } from '@operato/graphql'
3
- import gql from 'graphql-tag'
4
-
5
- export async function fetchProcessGroup(id: string) {
6
- const response = await client.query({
7
- query: gql`
8
- query FetchProcessGroupById($id: String!) {
9
- group(id: $id) {
10
- id
11
- name
12
- description
13
- createdAt
14
- creator {
15
- id
16
- name
17
- }
18
- updatedAt
19
- updater {
20
- id
21
- name
22
- }
23
- }
24
- }
25
- `,
26
- variables: { id }
27
- })
28
-
29
- return response.data
30
- }
31
-
32
- export async function updateProcessGroup(group: ProcessGroup) {
33
- var { id, name, description } = group
34
-
35
- const response = await client.mutate({
36
- mutation: gql`
37
- mutation UpdateProcessGroup($id: String!, $patch: ProcessGroupPatch!) {
38
- updateProcessGroup(id: $id, patch: $patch) {
39
- id
40
- name
41
- description
42
- createdAt
43
- updatedAt
44
- }
45
- }
46
- `,
47
- variables: {
48
- id,
49
- patch: { name, description }
50
- }
51
- })
52
-
53
- return response.data
54
- }
55
-
56
- export async function deleteProcessGroup(id: string) {
57
- const response = await client.mutate({
58
- mutation: gql`
59
- mutation ($id: String!) {
60
- deleteProcessGroup(id: $id)
61
- }
62
- `,
63
- variables: {
64
- id
65
- }
66
- })
67
-
68
- return response.data
69
- }
70
-
71
- export async function fetchProcessGroupList() {
72
- const response = await client.query({
73
- query: gql`
74
- {
75
- processGroups {
76
- items {
77
- id
78
- name
79
- description
80
- createdAt
81
- updatedAt
82
- }
83
- total
84
- }
85
- }
86
- `
87
- })
88
-
89
- return response.data
90
- }
91
-
92
- export async function createProcessGroup(group: ProcessGroup) {
93
- const response = await client.mutate({
94
- mutation: gql`
95
- mutation CreateProcessGroup($group: NewProcessGroup!) {
96
- createProcessGroup(group: $group) {
97
- id
98
- name
99
- description
100
- createdAt
101
- updatedAt
102
- }
103
- }
104
- `,
105
- variables: { group }
106
- })
107
-
108
- return response.data
109
- }
110
-
111
- export async function joinProcessGroup(processId: string, groupId: string) {
112
- const response = await client.mutate({
113
- mutation: gql`
114
- mutation JoinProcessGroup($id: String!, $processIds: [String!]!) {
115
- joinProcessGroup(id: $id, processIds: $processIds) {
116
- id
117
- name
118
- description
119
- processes {
120
- id
121
- name
122
- description
123
- createdAt
124
- updatedAt
125
- }
126
- createdAt
127
- updatedAt
128
- }
129
- }
130
- `,
131
- variables: {
132
- id: groupId,
133
- processIds: [processId]
134
- }
135
- })
136
-
137
- return response.data
138
- }
@@ -1,141 +0,0 @@
1
- import { buildArgs, client } from '@operato/graphql'
2
-
3
- import { Process } from '../types'
4
- import gql from 'graphql-tag'
5
-
6
- export async function fetchProcessList(listParam = {}) {
7
- const response = await client.query({
8
- query: gql`
9
- {
10
- processes(${buildArgs(listParam)}) {
11
- items {
12
- id
13
- name
14
- description
15
- thumbnail
16
- createdAt
17
- updatedAt
18
- }
19
- total
20
- }
21
- }
22
- `
23
- })
24
-
25
- return response.data
26
- }
27
-
28
- export async function fetchProcess(id: string) {
29
- const response = await client.query({
30
- query: gql`
31
- query FetchProcessById($id: String!) {
32
- process(id: $id) {
33
- id
34
- name
35
- description
36
- group {
37
- id
38
- name
39
- }
40
- thumbnail
41
- model
42
- createdAt
43
- creator {
44
- id
45
- name
46
- }
47
- updatedAt
48
- updater {
49
- id
50
- name
51
- }
52
- }
53
- }
54
- `,
55
- variables: { id }
56
- })
57
-
58
- return response.data
59
- }
60
-
61
- export async function createProcess(process: Process) {
62
- /*
63
- input NewProcess {
64
- name : String!
65
- description : String
66
- model : String!
67
- groupId : String!
68
- }
69
- */
70
-
71
- const response = await client.mutate({
72
- mutation: gql`
73
- mutation CreateProcess($process: NewProcess!) {
74
- createProcess(process: $process) {
75
- id
76
- name
77
- description
78
- model
79
- createdAt
80
- updatedAt
81
- }
82
- }
83
- `,
84
- variables: {
85
- process
86
- }
87
- })
88
-
89
- return response.data
90
- }
91
-
92
- export async function updateProcess(process: Process) {
93
- /*
94
- input ProcessPatch {
95
- name : String
96
- description : String
97
- model : String
98
- }
99
- */
100
- var { id, name, description, model, groupId } = process
101
-
102
- const response = await client.mutate({
103
- mutation: gql`
104
- mutation UpdateProcess($id: String!, $patch: ProcessPatch!) {
105
- updateProcess(id: $id, patch: $patch) {
106
- id
107
- name
108
- description
109
- model
110
- group {
111
- id
112
- name
113
- }
114
- createdAt
115
- updatedAt
116
- }
117
- }
118
- `,
119
- variables: {
120
- id,
121
- patch: { name, description, model, groupId }
122
- }
123
- })
124
-
125
- return response.data
126
- }
127
-
128
- export async function deleteProcess(id: string) {
129
- const response = await client.mutate({
130
- mutation: gql`
131
- mutation ($id: String!) {
132
- deleteProcess(id: $id)
133
- }
134
- `,
135
- variables: {
136
- id
137
- }
138
- })
139
-
140
- return response.data
141
- }
@@ -1,79 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- import { client } from '@operato/graphql'
4
-
5
- export const scenarios = async (): Promise<{ name: string; description: string }[]> => {
6
- var response = await client.query({
7
- query: gql`
8
- query {
9
- scenarios {
10
- items {
11
- name
12
- description
13
- }
14
- }
15
- }
16
- `
17
- })
18
-
19
- if (response.errors) {
20
- return []
21
- }
22
-
23
- return response.data.scenarios.items
24
- }
25
-
26
- export const startScenario = async (
27
- scenarioName: string,
28
- instanceName: string,
29
- variables: string | number | object
30
- ) => {
31
- if (!scenarioName) {
32
- return
33
- }
34
-
35
- if (client) {
36
- var response = await client.query({
37
- query: gql`
38
- mutation ($instanceName: String, $scenarioName: String!, $variables: Object) {
39
- startScenario(instanceName: $instanceName, scenarioName: $scenarioName, variables: $variables) {
40
- state
41
- message
42
- data
43
- }
44
- }
45
- `,
46
- variables: {
47
- instanceName: instanceName,
48
- scenarioName: scenarioName,
49
- variables
50
- }
51
- })
52
-
53
- return response?.data?.startScenario?.data
54
- }
55
- }
56
-
57
- export const runScenario = async (scenarioName: string, variables: string | number | object) => {
58
- if (!scenarioName) return
59
-
60
- if (client) {
61
- var response = await client.query({
62
- query: gql`
63
- mutation ($scenarioName: String!, $variables: Object) {
64
- runScenario(scenarioName: $scenarioName, variables: $variables) {
65
- state
66
- message
67
- data
68
- }
69
- }
70
- `,
71
- variables: {
72
- scenarioName: scenarioName,
73
- variables
74
- }
75
- })
76
-
77
- return response?.data?.runScenario?.data
78
- }
79
- }
package/src/index.ts DELETED
@@ -1,8 +0,0 @@
1
- export * from './types.js'
2
-
3
- export { DataStorage } from './data-storage/data-storage.js'
4
-
5
- export * from './ox-process-viewer.js'
6
- export * from './ox-process-modeller.js'
7
- export * from './ox-process-list.js'
8
- export * from './ox-process-template-viewer.js'
@@ -1,58 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- import '@operato/markdown'
6
-
7
- import { css, html, LitElement } from 'lit'
8
- import { property } from 'lit/decorators.js'
9
-
10
- import { ScrollbarStyles } from '@operato/styles'
11
-
12
- export class ComponentDetail extends LitElement {
13
- static styles = [
14
- ScrollbarStyles,
15
- css`
16
- :host {
17
- display: flex;
18
- flex-direction: column;
19
- align-content: stretch;
20
-
21
- background-color: var(--component-detail-background-color, white);
22
- margin: 0px;
23
- padding: 0px;
24
-
25
- overflow: hidden;
26
-
27
- border: 2px solid var(--component-detail-border-color, gray);
28
- box-sizing: border-box;
29
-
30
- top: 0px;
31
-
32
- z-index: 1;
33
- }
34
-
35
- ox-markdown,
36
- iframe {
37
- flex: 1;
38
- padding: 10px;
39
- overflow: auto;
40
- }
41
- `
42
- ]
43
-
44
- @property({ type: Object }) template: { about: string } | null = null
45
-
46
- render() {
47
- const { about } = this.template || {}
48
-
49
- if (about) {
50
- var aboutURL = new URL(about, location.origin)
51
- if (aboutURL.origin !== location.origin) {
52
- return html`<iframe src=${about}></iframe>`
53
- }
54
- }
55
-
56
- return html` <ox-markdown .src=${about}></ox-markdown> `
57
- }
58
- }