@dxos/plugin-automation 0.8.3 → 0.8.4-main.1f223c7
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/{AutomationContainer-OGNK3HD5.mjs → AutomationContainer-BRV5AJZ3.mjs} +8 -11
- package/dist/lib/browser/AutomationContainer-BRV5AJZ3.mjs.map +7 -0
- package/dist/lib/browser/AutomationPanel-N5HFJJXW.mjs +11 -0
- package/dist/lib/browser/{FunctionsContainer-JY7V7PLF.mjs → FunctionsContainer-U4HASI4P.mjs} +6 -9
- package/dist/lib/browser/FunctionsContainer-U4HASI4P.mjs.map +7 -0
- package/dist/lib/browser/{FunctionsPanel-LY4IFKR7.mjs → FunctionsPanel-I443Y6KB.mjs} +3 -3
- package/dist/lib/browser/{app-graph-builder-T34RV5UA.mjs → app-graph-builder-4OFKIRAI.mjs} +4 -4
- package/dist/lib/{node-esm/app-graph-builder-DYWAKQM3.mjs.map → browser/app-graph-builder-4OFKIRAI.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-C5VOC5EE.mjs → chunk-4TWQV33E.mjs} +14 -18
- package/dist/lib/browser/chunk-4TWQV33E.mjs.map +7 -0
- package/dist/lib/browser/chunk-EIY2EUWC.mjs +14 -0
- package/dist/lib/browser/{chunk-IHAKPP5A.mjs → chunk-GW5U2DGT.mjs} +2 -2
- package/dist/lib/browser/{chunk-4E2KPMLB.mjs → chunk-HN7OHFCB.mjs} +5 -6
- package/dist/lib/browser/chunk-HN7OHFCB.mjs.map +7 -0
- package/dist/lib/browser/{chunk-N5VLW7UZ.mjs → chunk-S4SM663I.mjs} +20 -20
- package/dist/lib/browser/chunk-S4SM663I.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RHSCK7AU.mjs → chunk-Z5DT4MHW.mjs} +5 -5
- package/dist/lib/{node-esm/chunk-2IH4VB3R.mjs.map → browser/chunk-Z5DT4MHW.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +15 -15
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-AX46HSU7.mjs → intent-resolver-4PSYSQQG.mjs} +10 -9
- package/dist/lib/browser/intent-resolver-4PSYSQQG.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-Z7A272CA.mjs → react-surface-M52XGLXY.mjs} +5 -5
- package/dist/lib/browser/types/index.mjs +8 -0
- package/dist/lib/node-esm/{AutomationContainer-ANCUYDDA.mjs → AutomationContainer-FYRDTERM.mjs} +8 -11
- package/dist/lib/node-esm/AutomationContainer-FYRDTERM.mjs.map +7 -0
- package/dist/lib/node-esm/{AutomationPanel-Y3ODAHH7.mjs → AutomationPanel-MKOLA2FE.mjs} +4 -4
- package/dist/lib/node-esm/{FunctionsContainer-25M5VT3J.mjs → FunctionsContainer-VZIVURH6.mjs} +6 -9
- package/dist/lib/node-esm/FunctionsContainer-VZIVURH6.mjs.map +7 -0
- package/dist/lib/node-esm/{FunctionsPanel-HVGF5AJP.mjs → FunctionsPanel-ELINCXPW.mjs} +3 -3
- package/dist/lib/node-esm/{app-graph-builder-DYWAKQM3.mjs → app-graph-builder-555IHYOB.mjs} +4 -4
- package/dist/lib/{browser/app-graph-builder-T34RV5UA.mjs.map → node-esm/app-graph-builder-555IHYOB.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-2T2OZC3A.mjs → chunk-AONUBWBE.mjs} +14 -18
- package/dist/lib/node-esm/chunk-AONUBWBE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WJHKFPX2.mjs → chunk-CICQ73ZT.mjs} +6 -6
- package/dist/lib/node-esm/{chunk-2IH4VB3R.mjs → chunk-CX2AILIS.mjs} +5 -5
- package/dist/lib/{browser/chunk-RHSCK7AU.mjs.map → node-esm/chunk-CX2AILIS.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-HCCLRNMJ.mjs → chunk-NK5N3QKD.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-6JOJ2NN4.mjs → chunk-OEZNHUL2.mjs} +5 -6
- package/dist/lib/node-esm/chunk-OEZNHUL2.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UFHDB2OA.mjs → chunk-ZOJVKPCA.mjs} +20 -20
- package/dist/lib/node-esm/chunk-ZOJVKPCA.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +15 -15
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-WXHFNJJI.mjs → intent-resolver-6ZGBUILG.mjs} +10 -9
- package/dist/lib/node-esm/intent-resolver-6ZGBUILG.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-TP6IYSR4.mjs → react-surface-Y6AOXM75.mjs} +5 -5
- package/dist/lib/node-esm/{types.mjs → types/index.mjs} +3 -3
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/components/AutomationContainer.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +6 -5
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +43 -3
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsContainer.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +2 -2
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +43 -3
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +29 -29
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +3 -3
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +35 -33
- package/src/AutomationPlugin.tsx +3 -3
- package/src/capabilities/app-graph-builder.ts +2 -2
- package/src/capabilities/intent-resolver.ts +7 -7
- package/src/components/AutomationContainer.tsx +11 -13
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +11 -8
- package/src/components/AutomationPanel/AutomationPanel.tsx +15 -27
- package/src/components/FunctionsContainer.tsx +10 -12
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +2 -2
- package/src/components/TriggerEditor/SpecSelector.tsx +14 -14
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +12 -9
- package/src/components/TriggerEditor/TriggerEditor.tsx +6 -12
- package/src/translations.ts +6 -4
- package/src/types/index.ts +5 -0
- package/src/{types.ts → types/schema.ts} +2 -4
- package/dist/lib/browser/AutomationContainer-OGNK3HD5.mjs.map +0 -7
- package/dist/lib/browser/AutomationPanel-PRIIAXD5.mjs +0 -11
- package/dist/lib/browser/FunctionsContainer-JY7V7PLF.mjs.map +0 -7
- package/dist/lib/browser/chunk-4E2KPMLB.mjs.map +0 -7
- package/dist/lib/browser/chunk-C5VOC5EE.mjs.map +0 -7
- package/dist/lib/browser/chunk-N5VLW7UZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-VQWJ5UYA.mjs +0 -14
- package/dist/lib/browser/intent-resolver-AX46HSU7.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -8
- package/dist/lib/node/AutomationContainer-B7PSJFIS.cjs +0 -66
- package/dist/lib/node/AutomationContainer-B7PSJFIS.cjs.map +0 -7
- package/dist/lib/node/AutomationPanel-XYLZU4MI.cjs +0 -32
- package/dist/lib/node/AutomationPanel-XYLZU4MI.cjs.map +0 -7
- package/dist/lib/node/FunctionsContainer-4FGOQW5X.cjs +0 -67
- package/dist/lib/node/FunctionsContainer-4FGOQW5X.cjs.map +0 -7
- package/dist/lib/node/FunctionsPanel-EWWAZK3W.cjs +0 -31
- package/dist/lib/node/FunctionsPanel-EWWAZK3W.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-5XRIIV7E.cjs +0 -96
- package/dist/lib/node/app-graph-builder-5XRIIV7E.cjs.map +0 -7
- package/dist/lib/node/chunk-3EF7MLFX.cjs +0 -38
- package/dist/lib/node/chunk-3EF7MLFX.cjs.map +0 -7
- package/dist/lib/node/chunk-6X3XJ4VI.cjs +0 -122
- package/dist/lib/node/chunk-6X3XJ4VI.cjs.map +0 -7
- package/dist/lib/node/chunk-GIIVTK4O.cjs +0 -58
- package/dist/lib/node/chunk-GIIVTK4O.cjs.map +0 -7
- package/dist/lib/node/chunk-IXUCZ3YY.cjs +0 -173
- package/dist/lib/node/chunk-IXUCZ3YY.cjs.map +0 -7
- package/dist/lib/node/chunk-LQ6XK4N5.cjs +0 -253
- package/dist/lib/node/chunk-LQ6XK4N5.cjs.map +0 -7
- package/dist/lib/node/chunk-TH4XDKAY.cjs +0 -49
- package/dist/lib/node/chunk-TH4XDKAY.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -124
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-EAREQZFE.cjs +0 -92
- package/dist/lib/node/intent-resolver-EAREQZFE.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-OI6CDHEI.cjs +0 -87
- package/dist/lib/node/react-surface-OI6CDHEI.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-ANCUYDDA.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-25M5VT3J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2T2OZC3A.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6JOJ2NN4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UFHDB2OA.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-WXHFNJJI.mjs.map +0 -7
- package/dist/types/src/types.d.ts.map +0 -1
- /package/dist/lib/browser/{AutomationPanel-PRIIAXD5.mjs.map → AutomationPanel-N5HFJJXW.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsPanel-LY4IFKR7.mjs.map → FunctionsPanel-I443Y6KB.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-VQWJ5UYA.mjs.map → chunk-EIY2EUWC.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-IHAKPP5A.mjs.map → chunk-GW5U2DGT.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-Z7A272CA.mjs.map → react-surface-M52XGLXY.mjs.map} +0 -0
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{AutomationPanel-Y3ODAHH7.mjs.map → AutomationPanel-MKOLA2FE.mjs.map} +0 -0
- /package/dist/lib/node-esm/{FunctionsPanel-HVGF5AJP.mjs.map → FunctionsPanel-ELINCXPW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-WJHKFPX2.mjs.map → chunk-CICQ73ZT.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-HCCLRNMJ.mjs.map → chunk-NK5N3QKD.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-TP6IYSR4.mjs.map → react-surface-Y6AOXM75.mjs.map} +0 -0
- /package/dist/lib/node-esm/{types.mjs.map → types/index.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-automation",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.1f223c7",
|
|
4
4
|
"description": "Prompt chain plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,14 +10,16 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"source": "./src/index.ts",
|
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
|
14
15
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
16
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
17
|
},
|
|
17
18
|
"./types": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"source": "./src/types/index.ts",
|
|
20
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
21
|
+
"browser": "./dist/lib/browser/types/index.mjs",
|
|
22
|
+
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
21
23
|
}
|
|
22
24
|
},
|
|
23
25
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -32,47 +34,47 @@
|
|
|
32
34
|
"dependencies": {
|
|
33
35
|
"@preact-signals/safe-react": "^0.9.0",
|
|
34
36
|
"@preact/signals-core": "^1.9.0",
|
|
35
|
-
"@dxos/app-framework": "0.8.
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/echo
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/echo": "0.8.
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/plugin-
|
|
44
|
-
"@dxos/plugin-
|
|
45
|
-
"@dxos/plugin-graph": "0.8.
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/react-
|
|
50
|
-
"@dxos/react-ui-
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
37
|
+
"@dxos/app-framework": "0.8.4-main.1f223c7",
|
|
38
|
+
"@dxos/async": "0.8.4-main.1f223c7",
|
|
39
|
+
"@dxos/conductor": "0.8.4-main.1f223c7",
|
|
40
|
+
"@dxos/echo": "0.8.4-main.1f223c7",
|
|
41
|
+
"@dxos/functions": "0.8.4-main.1f223c7",
|
|
42
|
+
"@dxos/echo-schema": "0.8.4-main.1f223c7",
|
|
43
|
+
"@dxos/invariant": "0.8.4-main.1f223c7",
|
|
44
|
+
"@dxos/live-object": "0.8.4-main.1f223c7",
|
|
45
|
+
"@dxos/plugin-client": "0.8.4-main.1f223c7",
|
|
46
|
+
"@dxos/plugin-deck": "0.8.4-main.1f223c7",
|
|
47
|
+
"@dxos/plugin-graph": "0.8.4-main.1f223c7",
|
|
48
|
+
"@dxos/log": "0.8.4-main.1f223c7",
|
|
49
|
+
"@dxos/plugin-space": "0.8.4-main.1f223c7",
|
|
50
|
+
"@dxos/random": "0.8.4-main.1f223c7",
|
|
51
|
+
"@dxos/react-client": "0.8.4-main.1f223c7",
|
|
52
|
+
"@dxos/react-ui-form": "0.8.4-main.1f223c7",
|
|
53
|
+
"@dxos/react-ui-list": "0.8.4-main.1f223c7",
|
|
54
|
+
"@dxos/react-ui-stack": "0.8.4-main.1f223c7",
|
|
55
|
+
"@dxos/util": "0.8.4-main.1f223c7"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
56
|
-
"@effect-rx/rx-react": "
|
|
57
|
-
"@effect/platform": "0.
|
|
58
|
+
"@effect-rx/rx-react": "0.38.0",
|
|
59
|
+
"@effect/platform": "0.90.2",
|
|
58
60
|
"@types/react": "~18.2.0",
|
|
59
61
|
"@types/react-dom": "~18.2.0",
|
|
60
|
-
"effect": "3.
|
|
62
|
+
"effect": "3.17.7",
|
|
61
63
|
"react": "~18.2.0",
|
|
62
64
|
"react-dom": "~18.2.0",
|
|
63
|
-
"vite": "
|
|
64
|
-
"@dxos/react-ui
|
|
65
|
-
"@dxos/react-ui": "0.8.
|
|
66
|
-
"@dxos/storybook-utils": "0.8.
|
|
65
|
+
"vite": "7.1.1",
|
|
66
|
+
"@dxos/react-ui": "0.8.4-main.1f223c7",
|
|
67
|
+
"@dxos/react-ui-theme": "0.8.4-main.1f223c7",
|
|
68
|
+
"@dxos/storybook-utils": "0.8.4-main.1f223c7"
|
|
67
69
|
},
|
|
68
70
|
"peerDependencies": {
|
|
69
71
|
"@effect-rx/rx-react": "^0.34.1",
|
|
70
|
-
"@effect/platform": "0.80.12",
|
|
72
|
+
"@effect/platform": "^0.80.12",
|
|
71
73
|
"effect": "^3.13.3",
|
|
72
74
|
"react": "~18.2.0",
|
|
73
75
|
"react-dom": "~18.2.0",
|
|
74
|
-
"@dxos/react-ui": "0.8.
|
|
75
|
-
"@dxos/react-ui-theme": "0.8.
|
|
76
|
+
"@dxos/react-ui": "0.8.4-main.1f223c7",
|
|
77
|
+
"@dxos/react-ui-theme": "0.8.4-main.1f223c7"
|
|
76
78
|
},
|
|
77
79
|
"publishConfig": {
|
|
78
80
|
"access": "public"
|
package/src/AutomationPlugin.tsx
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes, defineModule, definePlugin
|
|
6
|
-
import {
|
|
5
|
+
import { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';
|
|
6
|
+
import { FunctionTrigger, FunctionType } from '@dxos/functions';
|
|
7
7
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
8
8
|
|
|
9
9
|
import { AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';
|
|
10
10
|
import { meta } from './meta';
|
|
11
|
-
import translations from './translations';
|
|
11
|
+
import { translations } from './translations';
|
|
12
12
|
|
|
13
13
|
export const AutomationPlugin = () =>
|
|
14
14
|
definePlugin(meta, [
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
6
|
import { Option, pipe } from 'effect';
|
|
7
7
|
|
|
8
|
-
import { Capabilities,
|
|
8
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
9
9
|
import { Obj } from '@dxos/echo';
|
|
10
10
|
import { ScriptType } from '@dxos/functions';
|
|
11
|
-
import {
|
|
11
|
+
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
12
12
|
import { createExtension } from '@dxos/plugin-graph';
|
|
13
13
|
import { SPACE_PLUGIN } from '@dxos/plugin-space';
|
|
14
14
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
contributes,
|
|
7
6
|
Capabilities,
|
|
8
|
-
|
|
7
|
+
LayoutAction,
|
|
9
8
|
type PluginContext,
|
|
9
|
+
contributes,
|
|
10
10
|
createIntent,
|
|
11
|
-
|
|
11
|
+
createResolver,
|
|
12
12
|
} from '@dxos/app-framework';
|
|
13
13
|
import { Obj, Ref } from '@dxos/echo';
|
|
14
|
-
import { FunctionTrigger, FunctionType, ScriptType
|
|
14
|
+
import { FunctionTrigger, FunctionType, ScriptType } from '@dxos/functions';
|
|
15
15
|
import { type DXN } from '@dxos/keys';
|
|
16
16
|
import { ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
17
17
|
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
@@ -43,11 +43,11 @@ export default (context: PluginContext) =>
|
|
|
43
43
|
|
|
44
44
|
switch (template.type) {
|
|
45
45
|
case 'timer': {
|
|
46
|
-
trigger.spec = { kind:
|
|
46
|
+
trigger.spec = { kind: 'timer', cron: template.cron };
|
|
47
47
|
break;
|
|
48
48
|
}
|
|
49
49
|
case 'queue': {
|
|
50
|
-
trigger.spec = { kind:
|
|
50
|
+
trigger.spec = { kind: 'queue', queue: (template.queueDXN as DXN).toString() };
|
|
51
51
|
break;
|
|
52
52
|
}
|
|
53
53
|
default: {
|
|
@@ -57,7 +57,7 @@ export default (context: PluginContext) =>
|
|
|
57
57
|
|
|
58
58
|
return {
|
|
59
59
|
intents: [
|
|
60
|
-
createIntent(SpaceAction.AddObject, { object: trigger, target: space }),
|
|
60
|
+
createIntent(SpaceAction.AddObject, { object: trigger, target: space, hidden: true }),
|
|
61
61
|
createIntent(LayoutAction.Open, {
|
|
62
62
|
part: 'main',
|
|
63
63
|
subject: [`automation-settings${ATTENDABLE_PATH_SEPARATOR}${space.id}`],
|
|
@@ -5,25 +5,23 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import {
|
|
9
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
8
|
+
import { ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
10
9
|
|
|
11
|
-
import { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';
|
|
12
10
|
import { AUTOMATION_PLUGIN } from '../meta';
|
|
13
11
|
|
|
12
|
+
import { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';
|
|
13
|
+
|
|
14
14
|
export const AutomationContainer = (props: AutomationPanelProps) => {
|
|
15
15
|
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
16
16
|
return (
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</ControlPage>
|
|
26
|
-
</StackItem.Content>
|
|
17
|
+
<ControlPage>
|
|
18
|
+
<ControlSection
|
|
19
|
+
title={t('automation verbose label', { ns: AUTOMATION_PLUGIN })}
|
|
20
|
+
description={t('automation description', { ns: AUTOMATION_PLUGIN })}
|
|
21
|
+
>
|
|
22
|
+
<AutomationPanel {...props} />
|
|
23
|
+
</ControlSection>
|
|
24
|
+
</ControlPage>
|
|
27
25
|
);
|
|
28
26
|
};
|
|
29
27
|
|
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
|
-
import {
|
|
11
|
+
import { FunctionTrigger, FunctionType } from '@dxos/functions';
|
|
12
12
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
13
13
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
14
14
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
15
15
|
|
|
16
|
-
import { AutomationPanel } from './AutomationPanel';
|
|
17
16
|
import { functions } from '../../testing';
|
|
18
|
-
import translations from '../../translations';
|
|
17
|
+
import { translations } from '../../translations';
|
|
18
|
+
|
|
19
|
+
import { AutomationPanel } from './AutomationPanel';
|
|
19
20
|
|
|
20
21
|
const DefaultStory = () => {
|
|
21
22
|
const spaces = useSpaces();
|
|
@@ -28,9 +29,9 @@ const DefaultStory = () => {
|
|
|
28
29
|
);
|
|
29
30
|
};
|
|
30
31
|
|
|
31
|
-
const meta
|
|
32
|
+
const meta = {
|
|
32
33
|
title: 'plugins/plugin-automation/AutomationPanel',
|
|
33
|
-
component: AutomationPanel,
|
|
34
|
+
component: AutomationPanel as any,
|
|
34
35
|
render: DefaultStory,
|
|
35
36
|
decorators: [
|
|
36
37
|
withClientProvider({
|
|
@@ -50,8 +51,10 @@ const meta: Meta = {
|
|
|
50
51
|
layout: 'centered',
|
|
51
52
|
translations,
|
|
52
53
|
},
|
|
53
|
-
}
|
|
54
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
54
55
|
|
|
55
56
|
export default meta;
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
type Story = StoryObj<typeof meta>;
|
|
59
|
+
|
|
60
|
+
export const Default: Story = {};
|
|
@@ -6,17 +6,10 @@ import { Schema } from 'effect';
|
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Filter, Obj } from '@dxos/echo';
|
|
9
|
-
import {
|
|
10
|
-
FunctionType,
|
|
11
|
-
FunctionTrigger,
|
|
12
|
-
FunctionTriggerSchema,
|
|
13
|
-
type FunctionTriggerType,
|
|
14
|
-
ScriptType,
|
|
15
|
-
TriggerKind,
|
|
16
|
-
} from '@dxos/functions';
|
|
9
|
+
import { FunctionTrigger, FunctionType, ScriptType } from '@dxos/functions';
|
|
17
10
|
import { type Client, useClient } from '@dxos/react-client';
|
|
18
|
-
import {
|
|
19
|
-
import { Clipboard, IconButton, Input, Separator, useTranslation } from '@dxos/react-ui';
|
|
11
|
+
import { type Space, getSpace, useQuery } from '@dxos/react-client/echo';
|
|
12
|
+
import { Clipboard, IconButton, Input, Separator, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
20
13
|
import { ControlItem, controlItemClasses } from '@dxos/react-ui-form';
|
|
21
14
|
import { List } from '@dxos/react-ui-list';
|
|
22
15
|
import { ghostHover, mx } from '@dxos/react-ui-theme';
|
|
@@ -26,32 +19,31 @@ import { TriggerEditor, type TriggerEditorProps } from '../TriggerEditor';
|
|
|
26
19
|
|
|
27
20
|
const grid = 'grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]';
|
|
28
21
|
|
|
29
|
-
export type AutomationPanelProps = {
|
|
22
|
+
export type AutomationPanelProps = ThemedClassName<{
|
|
30
23
|
space: Space;
|
|
31
24
|
object?: Obj.Any;
|
|
32
|
-
initialTrigger?:
|
|
25
|
+
initialTrigger?: FunctionTrigger;
|
|
33
26
|
onDone?: () => void;
|
|
34
|
-
}
|
|
27
|
+
}>;
|
|
35
28
|
|
|
36
29
|
// TODO(burdon): Factor out common layout with ViewEditor.
|
|
37
|
-
export const AutomationPanel = ({ space, object, initialTrigger, onDone }: AutomationPanelProps) => {
|
|
30
|
+
export const AutomationPanel = ({ classNames, space, object, initialTrigger, onDone }: AutomationPanelProps) => {
|
|
38
31
|
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
39
32
|
const client = useClient();
|
|
40
33
|
const triggers = useQuery(space, Filter.type(FunctionTrigger));
|
|
41
34
|
const functions = useQuery(space, Filter.type(FunctionType));
|
|
42
35
|
const scripts = useQuery(space, Filter.type(ScriptType));
|
|
43
36
|
|
|
44
|
-
const [trigger, setTrigger] = useState<
|
|
37
|
+
const [trigger, setTrigger] = useState<FunctionTrigger | undefined>(initialTrigger);
|
|
45
38
|
const [selected, setSelected] = useState<FunctionTrigger>();
|
|
46
39
|
|
|
47
40
|
const handleSelect = (trigger: FunctionTrigger) => {
|
|
48
|
-
|
|
49
|
-
setTrigger(values);
|
|
41
|
+
setTrigger(trigger);
|
|
50
42
|
setSelected(trigger);
|
|
51
43
|
};
|
|
52
44
|
|
|
53
45
|
const handleAdd = () => {
|
|
54
|
-
setTrigger(Obj.make(
|
|
46
|
+
setTrigger(Obj.make(FunctionTrigger, {}));
|
|
55
47
|
setSelected(undefined);
|
|
56
48
|
};
|
|
57
49
|
|
|
@@ -87,7 +79,7 @@ export const AutomationPanel = ({ space, object, initialTrigger, onDone }: Autom
|
|
|
87
79
|
}
|
|
88
80
|
|
|
89
81
|
return (
|
|
90
|
-
<div className={controlItemClasses}>
|
|
82
|
+
<div className={mx(controlItemClasses, classNames)}>
|
|
91
83
|
{triggers.length > 0 && (
|
|
92
84
|
<List.Root<FunctionTrigger> items={triggers} isItem={Schema.is(FunctionTrigger)} getId={(field) => field.id}>
|
|
93
85
|
{({ items: triggers }) => (
|
|
@@ -139,11 +131,11 @@ export const AutomationPanel = ({ space, object, initialTrigger, onDone }: Autom
|
|
|
139
131
|
};
|
|
140
132
|
|
|
141
133
|
const getCopyAction = (client: Client, trigger: FunctionTrigger | undefined) => {
|
|
142
|
-
if (trigger?.spec?.kind ===
|
|
134
|
+
if (trigger?.spec?.kind === 'email') {
|
|
143
135
|
return { translationKey: 'trigger copy email', contentProvider: () => `${getSpace(trigger)!.id}@dxos.network` };
|
|
144
136
|
}
|
|
145
137
|
|
|
146
|
-
if (trigger?.spec?.kind ===
|
|
138
|
+
if (trigger?.spec?.kind === 'webhook') {
|
|
147
139
|
return { translationKey: 'trigger copy url', contentProvider: () => getWebhookUrl(client, trigger) };
|
|
148
140
|
}
|
|
149
141
|
|
|
@@ -158,14 +150,10 @@ const getWebhookUrl = (client: Client, trigger: FunctionTrigger) => {
|
|
|
158
150
|
return new URL(`/webhook/${spaceId}:${trigger.id}`, edgeUrl).toString();
|
|
159
151
|
};
|
|
160
152
|
|
|
161
|
-
const getFunctionName = (scripts: ScriptType[], functions: FunctionType[], trigger:
|
|
153
|
+
const getFunctionName = (scripts: ScriptType[], functions: FunctionType[], trigger: FunctionTrigger) => {
|
|
162
154
|
// TODO(wittjosiah): Truncation should be done in the UI.
|
|
163
155
|
// Warning that the List component is currently a can of worms.
|
|
164
156
|
const shortId = trigger.function && `${trigger.function.dxn.toString().slice(0, 16)}…`;
|
|
165
157
|
const functionObject = functions.find((fn) => fn === trigger.function?.target);
|
|
166
|
-
|
|
167
|
-
return shortId;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;
|
|
158
|
+
return functionObject?.name ?? shortId;
|
|
171
159
|
};
|
|
@@ -7,24 +7,22 @@ import React from 'react';
|
|
|
7
7
|
import { type Space } from '@dxos/react-client/echo';
|
|
8
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
10
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
11
10
|
|
|
12
|
-
import { FunctionsPanel } from './FunctionsPanel';
|
|
13
11
|
import { AUTOMATION_PLUGIN } from '../meta';
|
|
14
12
|
|
|
13
|
+
import { FunctionsPanel } from './FunctionsPanel';
|
|
14
|
+
|
|
15
15
|
export const FunctionsContainer = ({ space }: { space: Space }) => {
|
|
16
16
|
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
17
17
|
return (
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</ControlPage>
|
|
27
|
-
</StackItem.Content>
|
|
18
|
+
<ControlPage>
|
|
19
|
+
<ControlSection
|
|
20
|
+
title={t('functions verbose label', { ns: AUTOMATION_PLUGIN })}
|
|
21
|
+
description={t('functions description', { ns: AUTOMATION_PLUGIN })}
|
|
22
|
+
>
|
|
23
|
+
<FunctionsPanel space={space} />
|
|
24
|
+
</ControlSection>
|
|
25
|
+
</ControlPage>
|
|
28
26
|
);
|
|
29
27
|
};
|
|
30
28
|
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
import React, { useCallback, useMemo } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
9
|
import { FunctionType, ScriptType } from '@dxos/functions';
|
|
10
|
-
import { Filter, fullyQualifiedId, useQuery
|
|
10
|
+
import { Filter, type Space, fullyQualifiedId, useQuery } from '@dxos/react-client/echo';
|
|
11
11
|
import { Button, useTranslation } from '@dxos/react-ui';
|
|
12
12
|
import { controlItemClasses } from '@dxos/react-ui-form';
|
|
13
13
|
import { List } from '@dxos/react-ui-list';
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type FunctionTrigger, TriggerKinds, type TriggerType } from '@dxos/functions';
|
|
8
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
9
|
-
import {
|
|
9
|
+
import { type InputProps, SelectInput, useInputProps } from '@dxos/react-ui-form';
|
|
10
10
|
|
|
11
11
|
import { AUTOMATION_PLUGIN } from '../../meta';
|
|
12
12
|
|
|
@@ -14,22 +14,22 @@ export type SpecSelectorProps = InputProps;
|
|
|
14
14
|
|
|
15
15
|
export const SpecSelector = (props: SpecSelectorProps) => {
|
|
16
16
|
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
17
|
-
const specProps = useInputProps(['spec' satisfies keyof
|
|
17
|
+
const specProps = useInputProps(['spec' satisfies keyof FunctionTrigger]);
|
|
18
18
|
|
|
19
19
|
const handleTypeChange = useCallback(
|
|
20
20
|
(_type: any, value: string): TriggerType | undefined => {
|
|
21
21
|
const getDefaultTriggerSpec = (kind: string) => {
|
|
22
22
|
switch (kind) {
|
|
23
|
-
case
|
|
24
|
-
return { kind:
|
|
25
|
-
case
|
|
26
|
-
return { kind:
|
|
27
|
-
case
|
|
28
|
-
return { kind:
|
|
29
|
-
case
|
|
30
|
-
return { kind:
|
|
31
|
-
case
|
|
32
|
-
return { kind:
|
|
23
|
+
case 'timer':
|
|
24
|
+
return { kind: 'timer', cron: '' };
|
|
25
|
+
case 'subscription':
|
|
26
|
+
return { kind: 'subscription', filter: {} };
|
|
27
|
+
case 'queue':
|
|
28
|
+
return { kind: 'queue', queue: '' };
|
|
29
|
+
case 'email':
|
|
30
|
+
return { kind: 'email' };
|
|
31
|
+
case 'webhook':
|
|
32
|
+
return { kind: 'webhook' };
|
|
33
33
|
default:
|
|
34
34
|
return undefined;
|
|
35
35
|
}
|
|
@@ -48,7 +48,7 @@ export const SpecSelector = (props: SpecSelectorProps) => {
|
|
|
48
48
|
|
|
49
49
|
const options = useMemo(
|
|
50
50
|
() =>
|
|
51
|
-
|
|
51
|
+
TriggerKinds.map((kind) => ({
|
|
52
52
|
value: kind,
|
|
53
53
|
label: t(`trigger type ${kind}`),
|
|
54
54
|
})),
|
|
@@ -4,19 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta } from '@storybook/react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
9
|
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
|
-
import {
|
|
11
|
+
import { FunctionTrigger, FunctionType } from '@dxos/functions';
|
|
12
12
|
import { faker } from '@dxos/random';
|
|
13
13
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
14
14
|
import { ContactType, withClientProvider } from '@dxos/react-client/testing';
|
|
15
15
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
16
16
|
|
|
17
|
-
import { TriggerEditor } from './TriggerEditor';
|
|
18
17
|
import { functions } from '../../testing';
|
|
19
|
-
import translations from '../../translations';
|
|
18
|
+
import { translations } from '../../translations';
|
|
19
|
+
|
|
20
|
+
import { TriggerEditor } from './TriggerEditor';
|
|
20
21
|
|
|
21
22
|
const DefaultStory = () => {
|
|
22
23
|
const spaces = useSpaces();
|
|
@@ -27,7 +28,7 @@ const DefaultStory = () => {
|
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
const trigger = space.db.add(Obj.make(FunctionTrigger, { spec: { kind:
|
|
31
|
+
const trigger = space.db.add(Obj.make(FunctionTrigger, { spec: { kind: 'timer', cron: '' } }));
|
|
31
32
|
setTrigger(trigger);
|
|
32
33
|
}, [space]);
|
|
33
34
|
|
|
@@ -42,9 +43,9 @@ const DefaultStory = () => {
|
|
|
42
43
|
);
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
const meta
|
|
46
|
+
const meta = {
|
|
46
47
|
title: 'plugins/plugin-automation/TriggerEditor',
|
|
47
|
-
component: TriggerEditor,
|
|
48
|
+
component: TriggerEditor as any,
|
|
48
49
|
render: DefaultStory,
|
|
49
50
|
decorators: [
|
|
50
51
|
withClientProvider({
|
|
@@ -71,8 +72,10 @@ const meta: Meta = {
|
|
|
71
72
|
parameters: {
|
|
72
73
|
translations,
|
|
73
74
|
},
|
|
74
|
-
}
|
|
75
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
75
76
|
|
|
76
77
|
export default meta;
|
|
77
78
|
|
|
78
|
-
|
|
79
|
+
type Story = StoryObj<typeof meta>;
|
|
80
|
+
|
|
81
|
+
export const Default: Story = {};
|
|
@@ -6,14 +6,8 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { ComputeGraph } from '@dxos/conductor';
|
|
8
8
|
import { Type } from '@dxos/echo';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
FunctionTriggerSchema,
|
|
12
|
-
type FunctionTriggerType,
|
|
13
|
-
type FunctionTrigger,
|
|
14
|
-
ScriptType,
|
|
15
|
-
} from '@dxos/functions';
|
|
16
|
-
import { Filter, Ref, useQuery, type Space } from '@dxos/react-client/echo';
|
|
9
|
+
import { FunctionTrigger, FunctionType, ScriptType } from '@dxos/functions';
|
|
10
|
+
import { Filter, Ref, type Space, useQuery } from '@dxos/react-client/echo';
|
|
17
11
|
import { type CustomInputMap, Form, SelectInput, useRefQueryLookupHandler } from '@dxos/react-ui-form';
|
|
18
12
|
|
|
19
13
|
import { FunctionInputEditor, type FunctionInputEditorProps } from './FunctionInputEditor';
|
|
@@ -21,13 +15,13 @@ import { SpecSelector } from './SpecSelector';
|
|
|
21
15
|
|
|
22
16
|
export type TriggerEditorProps = {
|
|
23
17
|
space: Space;
|
|
24
|
-
trigger:
|
|
18
|
+
trigger: FunctionTrigger;
|
|
25
19
|
onSave?: (trigger: Omit<FunctionTrigger, 'id'>) => void;
|
|
26
20
|
onCancel?: () => void;
|
|
27
21
|
};
|
|
28
22
|
|
|
29
23
|
export const TriggerEditor = ({ space, trigger, onSave, onCancel }: TriggerEditorProps) => {
|
|
30
|
-
const handleSave = (values:
|
|
24
|
+
const handleSave = (values: FunctionTrigger) => {
|
|
31
25
|
onSave?.(values);
|
|
32
26
|
};
|
|
33
27
|
|
|
@@ -38,7 +32,7 @@ export const TriggerEditor = ({ space, trigger, onSave, onCancel }: TriggerEdito
|
|
|
38
32
|
<Form
|
|
39
33
|
outerSpacing={false}
|
|
40
34
|
Custom={Custom}
|
|
41
|
-
schema={
|
|
35
|
+
schema={FunctionTrigger}
|
|
42
36
|
values={trigger}
|
|
43
37
|
onSave={handleSave}
|
|
44
38
|
onCancel={onCancel}
|
|
@@ -55,7 +49,7 @@ const useCustomInputs = (space: Space, onQueryRefOptions: FunctionInputEditorPro
|
|
|
55
49
|
return useMemo(
|
|
56
50
|
(): CustomInputMap => ({
|
|
57
51
|
// Function selector.
|
|
58
|
-
['function' satisfies keyof
|
|
52
|
+
['function' satisfies keyof FunctionTrigger]: (props) => {
|
|
59
53
|
const getValue = useCallback(() => {
|
|
60
54
|
const formValue = props.getValue();
|
|
61
55
|
if (Ref.isRef(formValue)) {
|
package/src/translations.ts
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const translations = [
|
|
8
10
|
{
|
|
9
11
|
'en-US': {
|
|
10
|
-
[
|
|
12
|
+
[meta.id]: {
|
|
11
13
|
'plugin name': 'Automation',
|
|
12
14
|
'automation panel label': 'Automations',
|
|
13
15
|
'script automation label': 'Automation',
|
|
@@ -39,4 +41,4 @@ export default [
|
|
|
39
41
|
},
|
|
40
42
|
},
|
|
41
43
|
},
|
|
42
|
-
];
|
|
44
|
+
] as const satisfies Resource[];
|
|
@@ -6,7 +6,7 @@ import { Schema } from 'effect';
|
|
|
6
6
|
|
|
7
7
|
import { SpaceSchema } from '@dxos/react-client/echo';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { meta } from '../meta';
|
|
10
10
|
|
|
11
11
|
const TriggerTemplate = Schema.Union(
|
|
12
12
|
Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),
|
|
@@ -14,10 +14,8 @@ const TriggerTemplate = Schema.Union(
|
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
export namespace AutomationAction {
|
|
17
|
-
const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;
|
|
18
|
-
|
|
19
17
|
export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(
|
|
20
|
-
`${
|
|
18
|
+
`${meta.id}/action/create-trigger-from-template`,
|
|
21
19
|
{
|
|
22
20
|
input: Schema.Struct({
|
|
23
21
|
space: SpaceSchema,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/AutomationContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlSection, ControlPage } from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport const AutomationContainer = (props: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <ControlSection\n title={t('automation verbose label', { ns: AUTOMATION_PLUGIN })}\n description={t('automation description', { ns: AUTOMATION_PLUGIN })}\n >\n <AutomationPanel {...props} />\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n );\n};\n\nexport default AutomationContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,sBAAsB;AAC/B,SAASC,gBAAgBC,mBAAmB;AAC5C,SAASC,iBAAiB;AAKnB,IAAMC,sBAAsB,CAACC,UAAAA;;;AAClC,UAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;AAC7B,WACE,sBAAA,cAACC,UAAUC,SAAO;MAACC,YAAW;OAC5B,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MACCC,OAAOR,EAAE,4BAA4B;QAAES,IAAIP;MAAkB,CAAA;MAC7DQ,aAAaV,EAAE,0BAA0B;QAAES,IAAIP;MAAkB,CAAA;OAEjE,sBAAA,cAACS,iBAAoBZ,KAAAA,CAAAA,CAAAA,CAAAA;;;;AAK/B;AAEA,IAAA,8BAAeD;",
|
|
6
|
-
"names": ["React", "useTranslation", "ControlSection", "ControlPage", "StackItem", "AutomationContainer", "props", "t", "useTranslation", "AUTOMATION_PLUGIN", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "description", "AutomationPanel"]
|
|
7
|
-
}
|