@dxos/plugin-automation 0.8.2-main.fbd8ed0 → 0.8.2-staging.7ac8446
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.
- package/dist/lib/browser/{chunk-2QF27UJ2.mjs → AutomationPanel-YAHFXQX6.mjs} +23 -24
- package/dist/lib/browser/AutomationPanel-YAHFXQX6.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-K3BIQFWW.mjs +40 -0
- package/dist/lib/browser/app-graph-builder-K3BIQFWW.mjs.map +7 -0
- package/dist/lib/browser/chunk-FALBBJNO.mjs +138 -0
- package/dist/lib/browser/chunk-FALBBJNO.mjs.map +7 -0
- package/dist/lib/browser/chunk-MT3FZH4V.mjs +8 -0
- package/dist/lib/browser/chunk-MT3FZH4V.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +19 -25
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-4QQSJR4A.mjs +42 -0
- package/dist/lib/browser/react-surface-4QQSJR4A.mjs.map +7 -0
- package/dist/lib/node/{chunk-TI3WBQIB.cjs → AutomationPanel-ZKAMIU6O.cjs} +26 -31
- package/dist/lib/node/AutomationPanel-ZKAMIU6O.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-HO4FPGZ5.cjs +56 -0
- package/dist/lib/node/app-graph-builder-HO4FPGZ5.cjs.map +7 -0
- package/dist/lib/node/{chunk-SV2CB3FT.cjs → chunk-AGJ6XTDN.cjs} +7 -16
- package/dist/lib/node/chunk-AGJ6XTDN.cjs.map +7 -0
- package/dist/lib/node/chunk-FTEDH5Q6.cjs +167 -0
- package/dist/lib/node/chunk-FTEDH5Q6.cjs.map +7 -0
- package/dist/lib/node/index.cjs +22 -28
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-43VHU36V.cjs → react-surface-52M54VWV.cjs} +15 -39
- package/dist/lib/node/react-surface-52M54VWV.cjs.map +7 -0
- package/dist/lib/node-esm/{chunk-DIUPZXCQ.mjs → AutomationPanel-XF7YPSKM.mjs} +23 -24
- package/dist/lib/node-esm/AutomationPanel-XF7YPSKM.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-XCJR33VS.mjs +41 -0
- package/dist/lib/node-esm/app-graph-builder-XCJR33VS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-M4QXMIIB.mjs +139 -0
- package/dist/lib/node-esm/chunk-M4QXMIIB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-OA75PSGH.mjs +10 -0
- package/dist/lib/node-esm/chunk-OA75PSGH.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +19 -25
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-MGKM3OO3.mjs +43 -0
- package/dist/lib/node-esm/react-surface-MGKM3OO3.mjs.map +7 -0
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +179 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +177 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +3 -6
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/index.d.ts +0 -1
- package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -8
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +0 -8
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -36
- package/src/AutomationPlugin.tsx +10 -5
- package/src/capabilities/app-graph-builder.ts +17 -71
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/react-surface.tsx +8 -32
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +5 -5
- package/src/components/AutomationPanel/AutomationPanel.tsx +72 -72
- package/src/components/AutomationPanel/index.ts +0 -2
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +10 -19
- package/src/components/TriggerEditor/TriggerEditor.tsx +93 -53
- package/src/components/index.ts +0 -3
- package/src/testing/test-functions.ts +9 -23
- package/src/translations.ts +1 -10
- package/dist/lib/browser/AutomationContainer-DA6IW7O2.mjs +0 -34
- package/dist/lib/browser/AutomationContainer-DA6IW7O2.mjs.map +0 -7
- package/dist/lib/browser/AutomationPanel-R42D3LDD.mjs +0 -11
- package/dist/lib/browser/AutomationPanel-R42D3LDD.mjs.map +0 -7
- package/dist/lib/browser/FunctionsContainer-MPBMMOMS.mjs +0 -33
- package/dist/lib/browser/FunctionsContainer-MPBMMOMS.mjs.map +0 -7
- package/dist/lib/browser/FunctionsPanel-NSI3P53X.mjs +0 -10
- package/dist/lib/browser/FunctionsPanel-NSI3P53X.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-2OGPEVBA.mjs +0 -79
- package/dist/lib/browser/app-graph-builder-2OGPEVBA.mjs.map +0 -7
- package/dist/lib/browser/chunk-2QF27UJ2.mjs.map +0 -7
- package/dist/lib/browser/chunk-ADYCSC6Y.mjs +0 -39
- package/dist/lib/browser/chunk-ADYCSC6Y.mjs.map +0 -7
- package/dist/lib/browser/chunk-BNQNURZN.mjs +0 -211
- package/dist/lib/browser/chunk-BNQNURZN.mjs.map +0 -7
- package/dist/lib/browser/chunk-SGT76SL2.mjs +0 -14
- package/dist/lib/browser/chunk-SGT76SL2.mjs.map +0 -7
- package/dist/lib/browser/chunk-TRC3J2I6.mjs +0 -88
- package/dist/lib/browser/chunk-TRC3J2I6.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-X3H6ZSP4.mjs +0 -77
- package/dist/lib/browser/intent-resolver-X3H6ZSP4.mjs.map +0 -7
- package/dist/lib/browser/react-surface-MOXIHBMS.mjs +0 -68
- package/dist/lib/browser/react-surface-MOXIHBMS.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -8
- package/dist/lib/browser/types.mjs.map +0 -7
- package/dist/lib/node/AutomationContainer-FIFH4P5T.cjs +0 -62
- package/dist/lib/node/AutomationContainer-FIFH4P5T.cjs.map +0 -7
- package/dist/lib/node/AutomationPanel-HTNEWBGB.cjs +0 -32
- package/dist/lib/node/AutomationPanel-HTNEWBGB.cjs.map +0 -7
- package/dist/lib/node/FunctionsContainer-LF2F6CPE.cjs +0 -61
- package/dist/lib/node/FunctionsContainer-LF2F6CPE.cjs.map +0 -7
- package/dist/lib/node/FunctionsPanel-6HOAIMQ3.cjs +0 -31
- package/dist/lib/node/FunctionsPanel-6HOAIMQ3.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-3XGDVWHR.cjs +0 -95
- package/dist/lib/node/app-graph-builder-3XGDVWHR.cjs.map +0 -7
- package/dist/lib/node/chunk-CBHWMYKF.cjs +0 -116
- package/dist/lib/node/chunk-CBHWMYKF.cjs.map +0 -7
- package/dist/lib/node/chunk-GDCG2BML.cjs +0 -58
- package/dist/lib/node/chunk-GDCG2BML.cjs.map +0 -7
- package/dist/lib/node/chunk-S3Z4AP77.cjs +0 -234
- package/dist/lib/node/chunk-S3Z4AP77.cjs.map +0 -7
- package/dist/lib/node/chunk-SV2CB3FT.cjs.map +0 -7
- package/dist/lib/node/chunk-TI3WBQIB.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-Q7WJ4PZZ.cjs +0 -93
- package/dist/lib/node/intent-resolver-Q7WJ4PZZ.cjs.map +0 -7
- package/dist/lib/node/react-surface-43VHU36V.cjs.map +0 -7
- package/dist/lib/node/types.cjs +0 -30
- package/dist/lib/node/types.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationContainer-OP43F4PD.mjs +0 -35
- package/dist/lib/node-esm/AutomationContainer-OP43F4PD.mjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-ZQKRBWP2.mjs +0 -12
- package/dist/lib/node-esm/AutomationPanel-ZQKRBWP2.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-5TVRDIX5.mjs +0 -34
- package/dist/lib/node-esm/FunctionsContainer-5TVRDIX5.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsPanel-NMEW26KL.mjs +0 -11
- package/dist/lib/node-esm/FunctionsPanel-NMEW26KL.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-UR2E5CQY.mjs +0 -80
- package/dist/lib/node-esm/app-graph-builder-UR2E5CQY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AD4C4IK2.mjs +0 -89
- package/dist/lib/node-esm/chunk-AD4C4IK2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CUPEMOYK.mjs +0 -16
- package/dist/lib/node-esm/chunk-CUPEMOYK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DIUPZXCQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DZ7RKC52.mjs +0 -212
- package/dist/lib/node-esm/chunk-DZ7RKC52.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EEA6CZ6B.mjs +0 -40
- package/dist/lib/node-esm/chunk-EEA6CZ6B.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-HEUGQ6SL.mjs +0 -78
- package/dist/lib/node-esm/intent-resolver-HEUGQ6SL.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-TER7JEF6.mjs +0 -69
- package/dist/lib/node-esm/react-surface-TER7JEF6.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -9
- package/dist/lib/node-esm/types.mjs.map +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/AutomationContainer.d.ts +0 -7
- package/dist/types/src/components/AutomationContainer.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsContainer.d.ts +0 -7
- package/dist/types/src/components/FunctionsContainer.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts +0 -7
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +0 -1
- package/dist/types/src/components/FunctionsPanel/index.d.ts +0 -4
- package/dist/types/src/components/FunctionsPanel/index.d.ts.map +0 -1
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +0 -12
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +0 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +0 -5
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -25
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -73
- package/src/components/AutomationContainer.tsx +0 -31
- package/src/components/FunctionsContainer.tsx +0 -31
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +0 -95
- package/src/components/FunctionsPanel/index.ts +0 -8
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +0 -77
- package/src/components/TriggerEditor/SpecSelector.tsx +0 -59
- package/src/types.ts +0 -33
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutomationPanel/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutomationPanel/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAe,eAAe,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type FunctionTriggerType, type FunctionTrigger } from '@dxos/functions';
|
|
2
|
+
import { type FunctionTriggerType, type FunctionTrigger } from '@dxos/functions/types';
|
|
3
3
|
import { type Space } from '@dxos/react-client/echo';
|
|
4
4
|
export type TriggerEditorProps = {
|
|
5
5
|
space: Space;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/TriggerEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"TriggerEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/TriggerEditor.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAGrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAMvE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,mBAAmB,CAAC;IAC7B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AA0BF,eAAO,MAAM,aAAa,yCAA0C,kBAAkB,sBAkFrF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggerEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/TriggerEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"TriggerEditor.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/TriggerEditor/TriggerEditor.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAqC7C,QAAA,MAAM,IAAI,EAAE,IAqBX,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,IAAK,CAAC"}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
export * from './TriggerEditor';
|
|
2
|
-
export declare const
|
|
3
|
-
space: import("@dxos/client-protocol").Space;
|
|
4
|
-
}) => import("react").JSX.Element>;
|
|
5
|
-
export declare const AutomationPanel: import("react").LazyExoticComponent<({ space, object, initialTrigger, onDone }: import("./AutomationPanel").AutomationPanelProps) => import("react").JSX.Element>;
|
|
6
|
-
export declare const FunctionsContainer: import("react").LazyExoticComponent<({ space }: {
|
|
7
|
-
space: import("@dxos/client-protocol").Space;
|
|
8
|
-
}) => import("react").JSX.Element>;
|
|
9
|
-
export declare const FunctionsPanel: import("react").LazyExoticComponent<({ space }: import("./FunctionsPanel").FunctionsPanelProps) => import("react").JSX.Element>;
|
|
2
|
+
export declare const AutomationPanel: import("react").LazyExoticComponent<({ space, object }: import("./AutomationPanel/AutomationPanel").AutomationPanelProps) => import("react").JSX.Element>;
|
|
10
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,cAAc,iBAAiB,CAAC;AAEhC,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAMA,cAAc,iBAAiB,CAAC;AAEhC,eAAO,MAAM,eAAe,2JAA0C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-functions.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-functions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-functions.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-functions.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS;;;;;;;;;;IA2BrB,CAAC"}
|
|
@@ -4,14 +4,6 @@ declare const _default: {
|
|
|
4
4
|
'plugin name': string;
|
|
5
5
|
'automation panel label': string;
|
|
6
6
|
'script automation label': string;
|
|
7
|
-
'automation verbose label': string;
|
|
8
|
-
'automation description': string;
|
|
9
|
-
'functions panel label': string;
|
|
10
|
-
'functions verbose label': string;
|
|
11
|
-
'functions description': string;
|
|
12
|
-
'function copy id': string;
|
|
13
|
-
'no functions found': string;
|
|
14
|
-
'go to function source button label': string;
|
|
15
7
|
'trigger editor title': string;
|
|
16
8
|
'new trigger label': string;
|
|
17
9
|
'trigger type timer': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,wBA0BE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.
|
|
1
|
+
{"version":"5.7.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-automation",
|
|
3
|
-
"version": "0.8.2-
|
|
3
|
+
"version": "0.8.2-staging.7ac8446",
|
|
4
4
|
"description": "Prompt chain plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -13,11 +13,6 @@
|
|
|
13
13
|
"types": "./dist/types/src/index.d.ts",
|
|
14
14
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
15
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
|
-
},
|
|
17
|
-
"./types": {
|
|
18
|
-
"types": "./dist/types/src/types.d.ts",
|
|
19
|
-
"browser": "./dist/lib/browser/types.mjs",
|
|
20
|
-
"node": "./dist/lib/node-esm/types.mjs"
|
|
21
16
|
}
|
|
22
17
|
},
|
|
23
18
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -31,47 +26,40 @@
|
|
|
31
26
|
],
|
|
32
27
|
"dependencies": {
|
|
33
28
|
"@preact/signals-core": "^1.6.0",
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/conductor": "0.8.2-
|
|
37
|
-
"@dxos/echo-schema": "0.8.2-
|
|
38
|
-
"@dxos/functions": "0.8.2-
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/plugin-client": "0.8.2-
|
|
43
|
-
"@dxos/plugin-deck": "0.8.2-
|
|
44
|
-
"@dxos/plugin-graph": "0.8.2-
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/plugin-space": "0.8.2-
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/react-
|
|
49
|
-
"@dxos/react-ui-
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/react-ui-list": "0.8.2-main.fbd8ed0"
|
|
29
|
+
"@dxos/async": "0.8.2-staging.7ac8446",
|
|
30
|
+
"@dxos/app-framework": "0.8.2-staging.7ac8446",
|
|
31
|
+
"@dxos/conductor": "0.8.2-staging.7ac8446",
|
|
32
|
+
"@dxos/echo-schema": "0.8.2-staging.7ac8446",
|
|
33
|
+
"@dxos/functions": "0.8.2-staging.7ac8446",
|
|
34
|
+
"@dxos/invariant": "0.8.2-staging.7ac8446",
|
|
35
|
+
"@dxos/live-object": "0.8.2-staging.7ac8446",
|
|
36
|
+
"@dxos/log": "0.8.2-staging.7ac8446",
|
|
37
|
+
"@dxos/plugin-client": "0.8.2-staging.7ac8446",
|
|
38
|
+
"@dxos/plugin-deck": "0.8.2-staging.7ac8446",
|
|
39
|
+
"@dxos/plugin-graph": "0.8.2-staging.7ac8446",
|
|
40
|
+
"@dxos/plugin-script": "0.8.2-staging.7ac8446",
|
|
41
|
+
"@dxos/plugin-space": "0.8.2-staging.7ac8446",
|
|
42
|
+
"@dxos/react-client": "0.8.2-staging.7ac8446",
|
|
43
|
+
"@dxos/react-ui-form": "0.8.2-staging.7ac8446",
|
|
44
|
+
"@dxos/react-ui-list": "0.8.2-staging.7ac8446",
|
|
45
|
+
"@dxos/react-ui-stack": "0.8.2-staging.7ac8446",
|
|
46
|
+
"@dxos/util": "0.8.2-staging.7ac8446"
|
|
53
47
|
},
|
|
54
48
|
"devDependencies": {
|
|
55
|
-
"@effect-rx/rx-react": "^0.34.1",
|
|
56
|
-
"@effect/platform": "0.80.12",
|
|
57
49
|
"@types/react": "~18.2.0",
|
|
58
50
|
"@types/react-dom": "~18.2.0",
|
|
59
|
-
"effect": "3.14.21",
|
|
60
51
|
"react": "~18.2.0",
|
|
61
52
|
"react-dom": "~18.2.0",
|
|
62
53
|
"vite": "5.4.7",
|
|
63
|
-
"@dxos/react-ui
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
54
|
+
"@dxos/react-ui": "0.8.2-staging.7ac8446",
|
|
55
|
+
"@dxos/react-ui-theme": "0.8.2-staging.7ac8446",
|
|
56
|
+
"@dxos/storybook-utils": "0.8.2-staging.7ac8446"
|
|
66
57
|
},
|
|
67
58
|
"peerDependencies": {
|
|
68
|
-
"@effect-rx/rx-react": "^0.34.1",
|
|
69
|
-
"@effect/platform": "0.80.12",
|
|
70
|
-
"effect": "^3.13.3",
|
|
71
59
|
"react": "~18.2.0",
|
|
72
60
|
"react-dom": "~18.2.0",
|
|
73
|
-
"@dxos/react-ui": "0.8.2-
|
|
74
|
-
"@dxos/react-ui-theme": "0.8.2-
|
|
61
|
+
"@dxos/react-ui": "0.8.2-staging.7ac8446",
|
|
62
|
+
"@dxos/react-ui-theme": "0.8.2-staging.7ac8446"
|
|
75
63
|
},
|
|
76
64
|
"publishConfig": {
|
|
77
65
|
"access": "public"
|
package/src/AutomationPlugin.tsx
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, contributes, defineModule, definePlugin, Events } from '@dxos/app-framework';
|
|
6
|
-
import { FunctionType, FunctionTrigger } from '@dxos/functions';
|
|
6
|
+
import { FunctionType, FunctionTrigger } from '@dxos/functions/types';
|
|
7
7
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
8
|
+
import { SpaceCapabilities, SpaceEvents } from '@dxos/plugin-space';
|
|
8
9
|
|
|
9
|
-
import { AppGraphBuilder,
|
|
10
|
+
import { AppGraphBuilder, ReactSurface } from './capabilities';
|
|
10
11
|
import { meta } from './meta';
|
|
11
12
|
import translations from './translations';
|
|
12
13
|
|
|
@@ -28,9 +29,13 @@ export const AutomationPlugin = () =>
|
|
|
28
29
|
activate: AppGraphBuilder,
|
|
29
30
|
}),
|
|
30
31
|
defineModule({
|
|
31
|
-
id: `${meta.id}/module/
|
|
32
|
-
activatesOn:
|
|
33
|
-
activate:
|
|
32
|
+
id: `${meta.id}/module/space-settings`,
|
|
33
|
+
activatesOn: SpaceEvents.SetupSettingsPanel,
|
|
34
|
+
activate: () =>
|
|
35
|
+
contributes(SpaceCapabilities.SettingsSection, {
|
|
36
|
+
id: 'automation',
|
|
37
|
+
label: ['automation panel label', { ns: meta.id }],
|
|
38
|
+
}),
|
|
34
39
|
}),
|
|
35
40
|
defineModule({
|
|
36
41
|
id: `${meta.id}/module/react-surface`,
|
|
@@ -2,84 +2,30 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Option, pipe } from 'effect';
|
|
7
|
-
|
|
8
|
-
import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
|
|
5
|
+
import { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';
|
|
9
6
|
import { isInstanceOf } from '@dxos/echo-schema';
|
|
10
7
|
import { ScriptType } from '@dxos/functions';
|
|
11
8
|
import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
12
|
-
import { createExtension } from '@dxos/plugin-graph';
|
|
13
|
-
import {
|
|
9
|
+
import { createExtension, type Node } from '@dxos/plugin-graph';
|
|
10
|
+
import { SCRIPT_PLUGIN } from '@dxos/plugin-script/types';
|
|
14
11
|
|
|
15
12
|
import { meta } from '../meta';
|
|
16
13
|
|
|
17
|
-
export default (context:
|
|
14
|
+
export default (context: PluginsContext) =>
|
|
18
15
|
contributes(Capabilities.AppGraphBuilder, [
|
|
19
16
|
createExtension({
|
|
20
|
-
id: `${
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
icon: 'ph--lightning--regular',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
]),
|
|
37
|
-
Option.getOrElse(() => []),
|
|
38
|
-
),
|
|
39
|
-
),
|
|
40
|
-
}),
|
|
41
|
-
createExtension({
|
|
42
|
-
id: `${meta.id}/space-settings-functions`,
|
|
43
|
-
connector: (node) =>
|
|
44
|
-
Rx.make((get) =>
|
|
45
|
-
pipe(
|
|
46
|
-
get(node),
|
|
47
|
-
Option.flatMap((node) => (node.type === `${SPACE_PLUGIN}/settings` ? Option.some(node) : Option.none())),
|
|
48
|
-
Option.map((node) => [
|
|
49
|
-
{
|
|
50
|
-
id: `functions-${node.id}`,
|
|
51
|
-
type: `${meta.id}/space-settings-functions`,
|
|
52
|
-
data: `${meta.id}/space-settings-functions`,
|
|
53
|
-
properties: {
|
|
54
|
-
label: ['functions panel label', { ns: meta.id }],
|
|
55
|
-
icon: 'ph--function--regular',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
]),
|
|
59
|
-
Option.getOrElse(() => []),
|
|
60
|
-
),
|
|
61
|
-
),
|
|
62
|
-
}),
|
|
63
|
-
createExtension({
|
|
64
|
-
id: `${meta.id}/script-companion`,
|
|
65
|
-
connector: (node) =>
|
|
66
|
-
Rx.make((get) =>
|
|
67
|
-
pipe(
|
|
68
|
-
get(node),
|
|
69
|
-
Option.flatMap((node) => (isInstanceOf(ScriptType, node.data) ? Option.some(node) : Option.none())),
|
|
70
|
-
Option.map((node) => [
|
|
71
|
-
{
|
|
72
|
-
id: [node.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
73
|
-
type: PLANK_COMPANION_TYPE,
|
|
74
|
-
data: 'automation',
|
|
75
|
-
properties: {
|
|
76
|
-
label: ['script automation label', { ns: meta.id }],
|
|
77
|
-
icon: 'ph--lightning--regular',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
]),
|
|
81
|
-
Option.getOrElse(() => []),
|
|
82
|
-
),
|
|
83
|
-
),
|
|
17
|
+
id: `${SCRIPT_PLUGIN}/script-companion`,
|
|
18
|
+
filter: (node): node is Node<ScriptType> => isInstanceOf(ScriptType, node.data),
|
|
19
|
+
connector: ({ node }) => [
|
|
20
|
+
{
|
|
21
|
+
id: [node.id, 'automation'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
22
|
+
type: PLANK_COMPANION_TYPE,
|
|
23
|
+
data: 'automation',
|
|
24
|
+
properties: {
|
|
25
|
+
label: ['script automation label', { ns: meta.id }],
|
|
26
|
+
icon: 'ph--lightning--regular',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
],
|
|
84
30
|
}),
|
|
85
31
|
]);
|
|
@@ -4,46 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createSurface
|
|
7
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
8
|
import { isInstanceOf } from '@dxos/echo-schema';
|
|
9
|
-
import { ScriptType } from '@dxos/functions';
|
|
10
|
-
import { getSpace,
|
|
9
|
+
import { ScriptType } from '@dxos/functions/types';
|
|
10
|
+
import { getSpace, isSpace, type Space } from '@dxos/react-client/echo';
|
|
11
11
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { AutomationPanel } from '../components';
|
|
14
14
|
import { meta } from '../meta';
|
|
15
15
|
|
|
16
16
|
export default () =>
|
|
17
17
|
contributes(Capabilities.ReactSurface, [
|
|
18
18
|
createSurface({
|
|
19
|
-
id: `${meta.id}/
|
|
20
|
-
role: '
|
|
21
|
-
filter: (data): data is { subject:
|
|
22
|
-
component: () => {
|
|
23
|
-
const layout = useLayout();
|
|
24
|
-
const { spaceId } = parseId(layout.workspace);
|
|
25
|
-
const space = useSpace(spaceId);
|
|
26
|
-
if (!space || !spaceId) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return <AutomationContainer space={space} />;
|
|
31
|
-
},
|
|
32
|
-
}),
|
|
33
|
-
createSurface({
|
|
34
|
-
id: `${meta.id}/space-settings-functions`,
|
|
35
|
-
role: 'article',
|
|
36
|
-
filter: (data): data is { subject: string } => data.subject === `${meta.id}/space-settings-functions`,
|
|
37
|
-
component: () => {
|
|
38
|
-
const layout = useLayout();
|
|
39
|
-
const { spaceId } = parseId(layout.workspace);
|
|
40
|
-
const space = useSpace(spaceId);
|
|
41
|
-
if (!space || !spaceId) {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return <FunctionsContainer space={space} />;
|
|
46
|
-
},
|
|
19
|
+
id: `${meta.id}/automation`,
|
|
20
|
+
role: 'space-settings--automation',
|
|
21
|
+
filter: (data): data is { subject: Space } => isSpace(data.subject),
|
|
22
|
+
component: ({ data }) => <AutomationPanel space={data.subject} />,
|
|
47
23
|
}),
|
|
48
24
|
createSurface({
|
|
49
25
|
id: `${meta.id}/companion/automation`,
|
|
@@ -7,8 +7,8 @@ import '@dxos-theme';
|
|
|
7
7
|
import { type Meta } from '@storybook/react';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
|
-
import { FunctionType, FunctionTrigger } from '@dxos/functions';
|
|
11
|
-
import {
|
|
10
|
+
import { FunctionType, FunctionTrigger } from '@dxos/functions/types';
|
|
11
|
+
import { create, useSpaces } from '@dxos/react-client/echo';
|
|
12
12
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
13
13
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ const DefaultStory = () => {
|
|
|
21
21
|
const space = spaces[1];
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
|
-
<div role='none' className='w-
|
|
24
|
+
<div role='none' className='flex w-[350px] border border-separator overflow-hidden'>
|
|
25
25
|
<AutomationPanel space={space} />
|
|
26
26
|
</div>
|
|
27
27
|
);
|
|
@@ -38,11 +38,11 @@ const meta: Meta = {
|
|
|
38
38
|
types: [FunctionType, FunctionTrigger],
|
|
39
39
|
onSpaceCreated: ({ space }) => {
|
|
40
40
|
for (const fn of functions) {
|
|
41
|
-
space.db.add(
|
|
41
|
+
space.db.add(create(FunctionType, fn));
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
}),
|
|
45
|
-
withLayout({ fullscreen: true, classNames: 'flex
|
|
45
|
+
withLayout({ fullscreen: true, tooltips: true, classNames: 'flex justify-center m-2' }),
|
|
46
46
|
withTheme,
|
|
47
47
|
],
|
|
48
48
|
parameters: {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Schema } from 'effect';
|
|
6
5
|
import React, { useState } from 'react';
|
|
7
6
|
|
|
7
|
+
import { S } from '@dxos/echo-schema';
|
|
8
8
|
import {
|
|
9
9
|
FunctionType,
|
|
10
10
|
FunctionTrigger,
|
|
@@ -12,12 +12,13 @@ import {
|
|
|
12
12
|
TriggerKind,
|
|
13
13
|
type FunctionTriggerType,
|
|
14
14
|
ScriptType,
|
|
15
|
-
} from '@dxos/functions';
|
|
15
|
+
} from '@dxos/functions/types';
|
|
16
16
|
import { type Client, useClient } from '@dxos/react-client';
|
|
17
|
-
import {
|
|
17
|
+
import { create, Filter, useQuery, type Space, type ReactiveObject, getSpace } from '@dxos/react-client/echo';
|
|
18
18
|
import { Clipboard, IconButton, Input, Separator, useTranslation } from '@dxos/react-ui';
|
|
19
19
|
import { ControlItem, controlItemClasses } from '@dxos/react-ui-form';
|
|
20
20
|
import { List } from '@dxos/react-ui-list';
|
|
21
|
+
import { StackItem } from '@dxos/react-ui-stack';
|
|
21
22
|
import { ghostHover, mx } from '@dxos/react-ui-theme';
|
|
22
23
|
|
|
23
24
|
import { AUTOMATION_PLUGIN } from '../../meta';
|
|
@@ -27,20 +28,18 @@ const grid = 'grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]';
|
|
|
27
28
|
|
|
28
29
|
export type AutomationPanelProps = {
|
|
29
30
|
space: Space;
|
|
30
|
-
object?:
|
|
31
|
-
initialTrigger?: FunctionTriggerType;
|
|
32
|
-
onDone?: () => void;
|
|
31
|
+
object?: ReactiveObject<any>;
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
// TODO(burdon): Factor out common layout with ViewEditor.
|
|
36
|
-
export const AutomationPanel = ({ space, object
|
|
35
|
+
export const AutomationPanel = ({ space, object }: AutomationPanelProps) => {
|
|
37
36
|
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
38
37
|
const client = useClient();
|
|
39
|
-
const triggers = useQuery(space, Filter.
|
|
40
|
-
const functions = useQuery(space, Filter.
|
|
41
|
-
const scripts = useQuery(space, Filter.
|
|
38
|
+
const triggers = useQuery(space, Filter.schema(FunctionTrigger));
|
|
39
|
+
const functions = useQuery(space, Filter.schema(FunctionType));
|
|
40
|
+
const scripts = useQuery(space, Filter.schema(ScriptType));
|
|
42
41
|
|
|
43
|
-
const [trigger, setTrigger] = useState<FunctionTriggerType
|
|
42
|
+
const [trigger, setTrigger] = useState<FunctionTriggerType>();
|
|
44
43
|
const [selected, setSelected] = useState<FunctionTrigger>();
|
|
45
44
|
|
|
46
45
|
const handleSelect = (trigger: FunctionTrigger) => {
|
|
@@ -50,7 +49,7 @@ export const AutomationPanel = ({ space, object, initialTrigger, onDone }: Autom
|
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
const handleAdd = () => {
|
|
53
|
-
setTrigger(
|
|
52
|
+
setTrigger(create(FunctionTriggerSchema, {}));
|
|
54
53
|
setSelected(undefined);
|
|
55
54
|
};
|
|
56
55
|
|
|
@@ -64,83 +63,85 @@ export const AutomationPanel = ({ space, object, initialTrigger, onDone }: Autom
|
|
|
64
63
|
if (selected) {
|
|
65
64
|
Object.assign(selected, trigger);
|
|
66
65
|
} else {
|
|
67
|
-
space.db.add(
|
|
66
|
+
space.db.add(create(FunctionTrigger, trigger));
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
setTrigger(undefined);
|
|
71
70
|
setSelected(undefined);
|
|
72
|
-
onDone?.();
|
|
73
71
|
};
|
|
74
72
|
|
|
75
73
|
const handleCancel: TriggerEditorProps['onCancel'] = () => {
|
|
76
74
|
setTrigger(undefined);
|
|
77
|
-
onDone?.();
|
|
78
75
|
};
|
|
79
76
|
|
|
80
77
|
return (
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<
|
|
91
|
-
{triggers
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
<Input.Switch
|
|
101
|
-
checked={trigger.enabled}
|
|
102
|
-
onCheckedChange={(checked) => (trigger.enabled = checked)}
|
|
103
|
-
/>
|
|
104
|
-
</Input.Root>
|
|
105
|
-
|
|
106
|
-
<div className={'flex'}>
|
|
107
|
-
<List.ItemTitle
|
|
108
|
-
classNames='px-1 cursor-pointer w-0 shrink truncate'
|
|
109
|
-
onClick={() => handleSelect(trigger)}
|
|
78
|
+
<Clipboard.Provider>
|
|
79
|
+
<StackItem.Content classNames='block overflow-y-auto'>
|
|
80
|
+
<div className='flex flex-col w-full'>
|
|
81
|
+
{trigger ? (
|
|
82
|
+
<ControlItem title={t('trigger editor title')}>
|
|
83
|
+
<TriggerEditor space={space} trigger={trigger} onSave={handleSave} onCancel={handleCancel} />
|
|
84
|
+
</ControlItem>
|
|
85
|
+
) : (
|
|
86
|
+
<div role='none' className={controlItemClasses}>
|
|
87
|
+
<List.Root<FunctionTrigger> items={triggers} isItem={S.is(FunctionTrigger)} getId={(field) => field.id}>
|
|
88
|
+
{({ items: triggers }) => (
|
|
89
|
+
<div role='list' className='flex flex-col w-full'>
|
|
90
|
+
{triggers?.map((trigger) => {
|
|
91
|
+
const copyAction = getCopyAction(client, trigger);
|
|
92
|
+
return (
|
|
93
|
+
<List.Item<FunctionTrigger>
|
|
94
|
+
key={trigger.id}
|
|
95
|
+
item={trigger}
|
|
96
|
+
classNames={mx(grid, ghostHover, 'items-center', 'px-2')}
|
|
110
97
|
>
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
98
|
+
<Input.Root>
|
|
99
|
+
<Input.Switch
|
|
100
|
+
checked={trigger.enabled}
|
|
101
|
+
onCheckedChange={(checked) => (trigger.enabled = checked)}
|
|
102
|
+
/>
|
|
103
|
+
</Input.Root>
|
|
104
|
+
|
|
105
|
+
<div className={'flex'}>
|
|
106
|
+
<List.ItemTitle
|
|
107
|
+
classNames='px-1 cursor-pointer w-0 shrink truncate'
|
|
108
|
+
onClick={() => handleSelect(trigger)}
|
|
109
|
+
>
|
|
110
|
+
{getFunctionName(scripts, functions, trigger) ?? '∅'}
|
|
111
|
+
</List.ItemTitle>
|
|
112
|
+
|
|
113
|
+
{/* TODO: a better way to expose copy action */}
|
|
114
|
+
{copyAction && (
|
|
115
|
+
<Clipboard.IconButton
|
|
116
|
+
label={t(copyAction.translationKey)}
|
|
117
|
+
value={copyAction.contentProvider()}
|
|
118
|
+
/>
|
|
119
|
+
)}
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<List.ItemDeleteButton onClick={() => handleDelete(trigger)} />
|
|
123
|
+
</List.Item>
|
|
124
|
+
);
|
|
125
|
+
})}
|
|
126
|
+
</div>
|
|
127
|
+
)}
|
|
128
|
+
</List.Root>
|
|
129
|
+
{triggers.length > 0 && <Separator classNames='mlb-4' />}
|
|
130
|
+
<IconButton icon='ph--plus--regular' label={t('new trigger label')} onClick={handleAdd} />
|
|
131
|
+
</div>
|
|
132
|
+
)}
|
|
132
133
|
</div>
|
|
133
|
-
|
|
134
|
-
</
|
|
134
|
+
</StackItem.Content>
|
|
135
|
+
</Clipboard.Provider>
|
|
135
136
|
);
|
|
136
137
|
};
|
|
137
138
|
|
|
138
139
|
const getCopyAction = (client: Client, trigger: FunctionTrigger | undefined) => {
|
|
139
|
-
if (trigger?.spec?.
|
|
140
|
+
if (trigger?.spec?.type === TriggerKind.Email) {
|
|
140
141
|
return { translationKey: 'trigger copy email', contentProvider: () => `${getSpace(trigger)!.id}@dxos.network` };
|
|
141
142
|
}
|
|
142
143
|
|
|
143
|
-
if (trigger?.spec?.
|
|
144
|
+
if (trigger?.spec?.type === TriggerKind.Webhook) {
|
|
144
145
|
return { translationKey: 'trigger copy url', contentProvider: () => getWebhookUrl(client, trigger) };
|
|
145
146
|
}
|
|
146
147
|
|
|
@@ -158,11 +159,10 @@ const getWebhookUrl = (client: Client, trigger: FunctionTrigger) => {
|
|
|
158
159
|
const getFunctionName = (scripts: ScriptType[], functions: FunctionType[], trigger: FunctionTriggerType) => {
|
|
159
160
|
// TODO(wittjosiah): Truncation should be done in the UI.
|
|
160
161
|
// Warning that the List component is currently a can of worms.
|
|
161
|
-
const shortId = trigger.function && `${trigger.function
|
|
162
|
-
const functionObject = functions.find((fn) => fn === trigger.function
|
|
162
|
+
const shortId = trigger.function && `${trigger.function?.slice(0, 16)}…`;
|
|
163
|
+
const functionObject = functions.find((fn) => `dxn:worker:${fn.name}` === trigger.function);
|
|
163
164
|
if (!functionObject) {
|
|
164
165
|
return shortId;
|
|
165
166
|
}
|
|
166
|
-
|
|
167
167
|
return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;
|
|
168
168
|
};
|