@dxos/plugin-automation 0.8.1-staging.9eaf14f → 0.8.2-main.10c050d
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-HQK7FTN6.mjs +40 -0
- package/dist/lib/browser/AutomationContainer-HQK7FTN6.mjs.map +7 -0
- package/dist/lib/browser/AutomationPanel-GU37N5LO.mjs +11 -0
- package/dist/lib/browser/AutomationPanel-GU37N5LO.mjs.map +7 -0
- package/dist/lib/browser/FunctionsContainer-B7RDWVMX.mjs +39 -0
- package/dist/lib/browser/FunctionsContainer-B7RDWVMX.mjs.map +7 -0
- package/dist/lib/browser/FunctionsPanel-LCCPDIT6.mjs +10 -0
- package/dist/lib/browser/FunctionsPanel-LCCPDIT6.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-BYECL42X.mjs +80 -0
- package/dist/lib/browser/app-graph-builder-BYECL42X.mjs.map +7 -0
- package/dist/lib/browser/chunk-4E2KPMLB.mjs +39 -0
- package/dist/lib/browser/chunk-4E2KPMLB.mjs.map +7 -0
- package/dist/lib/browser/chunk-4QTXMPBC.mjs +229 -0
- package/dist/lib/browser/chunk-4QTXMPBC.mjs.map +7 -0
- package/dist/lib/browser/chunk-D2ESAYQD.mjs +149 -0
- package/dist/lib/browser/chunk-D2ESAYQD.mjs.map +7 -0
- package/dist/lib/browser/chunk-ELQ2FX5G.mjs +14 -0
- package/dist/lib/browser/chunk-ELQ2FX5G.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WKKQV4PC.mjs → chunk-IHAKPP5A.mjs} +2 -2
- package/dist/lib/browser/{chunk-WKKQV4PC.mjs.map → chunk-IHAKPP5A.mjs.map} +1 -1
- package/dist/lib/browser/chunk-ZTRYR6RJ.mjs +94 -0
- package/dist/lib/browser/chunk-ZTRYR6RJ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +26 -20
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-ZRBBYZUX.mjs +77 -0
- package/dist/lib/browser/intent-resolver-ZRBBYZUX.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-VKO6PA2P.mjs +68 -0
- package/dist/lib/browser/react-surface-VKO6PA2P.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +8 -0
- package/dist/lib/browser/types.mjs.map +7 -0
- package/dist/lib/node/AutomationContainer-5J7LJK7L.cjs +68 -0
- package/dist/lib/node/AutomationContainer-5J7LJK7L.cjs.map +7 -0
- package/dist/lib/node/AutomationPanel-NPDBUQ7D.cjs +32 -0
- package/dist/lib/node/AutomationPanel-NPDBUQ7D.cjs.map +7 -0
- package/dist/lib/node/FunctionsContainer-LNLDZUZ6.cjs +67 -0
- package/dist/lib/node/FunctionsContainer-LNLDZUZ6.cjs.map +7 -0
- package/dist/lib/node/FunctionsPanel-7AOXIQMA.cjs +31 -0
- package/dist/lib/node/FunctionsPanel-7AOXIQMA.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-DUKR2BRB.cjs +96 -0
- package/dist/lib/node/app-graph-builder-DUKR2BRB.cjs.map +7 -0
- package/dist/lib/node/{chunk-7GXNXMSM.cjs → chunk-3EF7MLFX.cjs} +5 -5
- package/dist/lib/node/{chunk-7GXNXMSM.cjs.map → chunk-3EF7MLFX.cjs.map} +1 -1
- package/dist/lib/node/chunk-4O627QZU.cjs +175 -0
- package/dist/lib/node/chunk-4O627QZU.cjs.map +7 -0
- package/dist/lib/node/{chunk-AGJ6XTDN.cjs → chunk-DOLMQUQ5.cjs} +16 -7
- package/dist/lib/node/chunk-DOLMQUQ5.cjs.map +7 -0
- package/dist/lib/node/chunk-GIIVTK4O.cjs +58 -0
- package/dist/lib/node/chunk-GIIVTK4O.cjs.map +7 -0
- package/dist/lib/node/chunk-O42NQYQT.cjs +252 -0
- package/dist/lib/node/chunk-O42NQYQT.cjs.map +7 -0
- package/dist/lib/node/chunk-WXQAVUBJ.cjs +122 -0
- package/dist/lib/node/chunk-WXQAVUBJ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +37 -31
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/intent-resolver-JC4Q4TYU.cjs +93 -0
- package/dist/lib/node/intent-resolver-JC4Q4TYU.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-52M54VWV.cjs → react-surface-HB3MYTCK.cjs} +41 -17
- package/dist/lib/node/react-surface-HB3MYTCK.cjs.map +7 -0
- package/dist/lib/node/types.cjs +30 -0
- package/dist/lib/node/types.cjs.map +7 -0
- package/dist/lib/node-esm/AutomationContainer-OJGH76X2.mjs +41 -0
- package/dist/lib/node-esm/AutomationContainer-OJGH76X2.mjs.map +7 -0
- package/dist/lib/node-esm/AutomationPanel-HIWEJUWL.mjs +12 -0
- package/dist/lib/node-esm/AutomationPanel-HIWEJUWL.mjs.map +7 -0
- package/dist/lib/node-esm/FunctionsContainer-PPR6XNNR.mjs +40 -0
- package/dist/lib/node-esm/FunctionsContainer-PPR6XNNR.mjs.map +7 -0
- package/dist/lib/node-esm/FunctionsPanel-SBXKWTHR.mjs +11 -0
- package/dist/lib/node-esm/FunctionsPanel-SBXKWTHR.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-UAXHKKGW.mjs +81 -0
- package/dist/lib/node-esm/app-graph-builder-UAXHKKGW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-5IAHBEHR.mjs +95 -0
- package/dist/lib/node-esm/chunk-5IAHBEHR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6JOJ2NN4.mjs +40 -0
- package/dist/lib/node-esm/chunk-6JOJ2NN4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-D5HK4XLC.mjs +230 -0
- package/dist/lib/node-esm/chunk-D5HK4XLC.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-DZ44LGYT.mjs → chunk-HCCLRNMJ.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-DZ44LGYT.mjs.map → chunk-HCCLRNMJ.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-P2FKMPRE.mjs +150 -0
- package/dist/lib/node-esm/chunk-P2FKMPRE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Z7VAQDEE.mjs +16 -0
- package/dist/lib/node-esm/chunk-Z7VAQDEE.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +26 -20
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-KRCXJEDR.mjs +78 -0
- package/dist/lib/node-esm/intent-resolver-KRCXJEDR.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-TRKCIZAB.mjs +69 -0
- package/dist/lib/node-esm/react-surface-TRKCIZAB.mjs.map +7 -0
- package/dist/lib/node-esm/types.mjs +9 -0
- package/dist/lib/node-esm/types.mjs.map +7 -0
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -177
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/AutomationContainer.d.ts +7 -0
- package/dist/types/src/components/AutomationContainer.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +6 -3
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/index.d.ts +1 -0
- package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsContainer.d.ts +7 -0
- package/dist/types/src/components/FunctionsContainer.d.ts.map +1 -0
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts +7 -0
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -0
- package/dist/types/src/components/FunctionsPanel/index.d.ts +4 -0
- package/dist/types/src/components/FunctionsPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +12 -0
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -0
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +5 -0
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -0
- 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 +8 -1
- 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 +8 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +25 -0
- package/dist/types/src/types.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -25
- package/src/AutomationPlugin.tsx +5 -10
- package/src/capabilities/app-graph-builder.ts +72 -17
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +73 -0
- package/src/capabilities/react-surface.tsx +32 -8
- package/src/components/AutomationContainer.tsx +31 -0
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +6 -5
- package/src/components/AutomationPanel/AutomationPanel.tsx +77 -73
- package/src/components/AutomationPanel/index.ts +2 -0
- package/src/components/FunctionsContainer.tsx +31 -0
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +95 -0
- package/src/components/FunctionsPanel/index.ts +8 -0
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +77 -0
- package/src/components/TriggerEditor/SpecSelector.tsx +59 -0
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +19 -10
- package/src/components/TriggerEditor/TriggerEditor.tsx +64 -102
- package/src/components/index.ts +3 -0
- package/src/meta.ts +1 -1
- package/src/testing/test-functions.ts +23 -9
- package/src/translations.ts +10 -1
- package/src/types.ts +33 -0
- package/dist/lib/browser/AutomationPanel-YAHFXQX6.mjs +0 -139
- package/dist/lib/browser/AutomationPanel-YAHFXQX6.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-K3BIQFWW.mjs +0 -40
- package/dist/lib/browser/app-graph-builder-K3BIQFWW.mjs.map +0 -7
- package/dist/lib/browser/chunk-FALBBJNO.mjs +0 -138
- package/dist/lib/browser/chunk-FALBBJNO.mjs.map +0 -7
- package/dist/lib/browser/chunk-MT3FZH4V.mjs +0 -8
- package/dist/lib/browser/chunk-MT3FZH4V.mjs.map +0 -7
- package/dist/lib/browser/react-surface-4QQSJR4A.mjs +0 -42
- package/dist/lib/browser/react-surface-4QQSJR4A.mjs.map +0 -7
- package/dist/lib/node/AutomationPanel-ZKAMIU6O.cjs +0 -161
- package/dist/lib/node/AutomationPanel-ZKAMIU6O.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-HO4FPGZ5.cjs +0 -56
- package/dist/lib/node/app-graph-builder-HO4FPGZ5.cjs.map +0 -7
- package/dist/lib/node/chunk-AGJ6XTDN.cjs.map +0 -7
- package/dist/lib/node/chunk-FTEDH5Q6.cjs +0 -167
- package/dist/lib/node/chunk-FTEDH5Q6.cjs.map +0 -7
- package/dist/lib/node/react-surface-52M54VWV.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-XF7YPSKM.mjs +0 -140
- package/dist/lib/node-esm/AutomationPanel-XF7YPSKM.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-XCJR33VS.mjs +0 -41
- package/dist/lib/node-esm/app-graph-builder-XCJR33VS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-M4QXMIIB.mjs +0 -139
- package/dist/lib/node-esm/chunk-M4QXMIIB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OA75PSGH.mjs +0 -10
- package/dist/lib/node-esm/chunk-OA75PSGH.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-MGKM3OO3.mjs +0 -43
- package/dist/lib/node-esm/react-surface-MGKM3OO3.mjs.map +0 -7
|
@@ -16,23 +16,23 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_3EF7MLFX_exports = {};
|
|
20
|
+
__export(chunk_3EF7MLFX_exports, {
|
|
21
21
|
AUTOMATION_PLUGIN: () => AUTOMATION_PLUGIN,
|
|
22
22
|
meta: () => meta
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_3EF7MLFX_exports);
|
|
25
25
|
var AUTOMATION_PLUGIN = "dxos.org/plugin/automation";
|
|
26
26
|
var meta = {
|
|
27
27
|
id: AUTOMATION_PLUGIN,
|
|
28
28
|
name: "Automation",
|
|
29
29
|
description: "The Automation tab allows you to trigger pre-defined workflows related to the element you are interacting with inside of Composer.",
|
|
30
30
|
icon: "ph--robot--regular",
|
|
31
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/
|
|
31
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation"
|
|
32
32
|
};
|
|
33
33
|
// Annotate the CommonJS export names for ESM import in node:
|
|
34
34
|
0 && (module.exports = {
|
|
35
35
|
AUTOMATION_PLUGIN,
|
|
36
36
|
meta
|
|
37
37
|
});
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-3EF7MLFX.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const AUTOMATION_PLUGIN = 'dxos.org/plugin/automation';\n\nexport const meta: PluginMeta = {\n id: AUTOMATION_PLUGIN,\n name: 'Automation',\n description:\n 'The Automation tab allows you to trigger pre-defined workflows related to the element you are interacting with inside of Composer.',\n icon: 'ph--robot--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const AUTOMATION_PLUGIN = 'dxos.org/plugin/automation';\n\nexport const meta: PluginMeta = {\n id: AUTOMATION_PLUGIN,\n name: 'Automation',\n description:\n 'The Automation tab allows you to trigger pre-defined workflows related to the element you are interacting with inside of Composer.',\n icon: 'ph--robot--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-automation',\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAMA,oBAAoB;AAE1B,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aACE;EACFC,MAAM;EACNC,QAAQ;AACV;",
|
|
6
6
|
"names": ["AUTOMATION_PLUGIN", "meta", "id", "name", "description", "icon", "source"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_4O627QZU_exports = {};
|
|
30
|
+
__export(chunk_4O627QZU_exports, {
|
|
31
|
+
AutomationPanel: () => AutomationPanel,
|
|
32
|
+
AutomationPanel_default: () => AutomationPanel_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(chunk_4O627QZU_exports);
|
|
35
|
+
var import_chunk_O42NQYQT = require("./chunk-O42NQYQT.cjs");
|
|
36
|
+
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
37
|
+
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
38
|
+
var import_effect = require("effect");
|
|
39
|
+
var import_react = __toESM(require("react"));
|
|
40
|
+
var import_functions = require("@dxos/functions");
|
|
41
|
+
var import_react_client = require("@dxos/react-client");
|
|
42
|
+
var import_echo = require("@dxos/react-client/echo");
|
|
43
|
+
var import_react_ui = require("@dxos/react-ui");
|
|
44
|
+
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
45
|
+
var import_react_ui_list = require("@dxos/react-ui-list");
|
|
46
|
+
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
47
|
+
var grid = "grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]";
|
|
48
|
+
var AutomationPanel = ({ space, object, initialTrigger, onDone }) => {
|
|
49
|
+
var _effect = (0, import_tracking.useSignals)();
|
|
50
|
+
try {
|
|
51
|
+
const { t } = (0, import_react_ui.useTranslation)(import_chunk_3EF7MLFX.AUTOMATION_PLUGIN);
|
|
52
|
+
const client = (0, import_react_client.useClient)();
|
|
53
|
+
const triggers = (0, import_echo.useQuery)(space, import_echo.Filter.type(import_functions.FunctionTrigger));
|
|
54
|
+
const functions = (0, import_echo.useQuery)(space, import_echo.Filter.type(import_functions.FunctionType));
|
|
55
|
+
const scripts = (0, import_echo.useQuery)(space, import_echo.Filter.type(import_functions.ScriptType));
|
|
56
|
+
const [trigger, setTrigger] = (0, import_react.useState)(initialTrigger);
|
|
57
|
+
const [selected, setSelected] = (0, import_react.useState)();
|
|
58
|
+
const handleSelect = (trigger2) => {
|
|
59
|
+
const { id: _, ...values } = trigger2;
|
|
60
|
+
setTrigger(values);
|
|
61
|
+
setSelected(trigger2);
|
|
62
|
+
};
|
|
63
|
+
const handleAdd = () => {
|
|
64
|
+
setTrigger((0, import_echo.live)(import_functions.FunctionTriggerSchema, {}));
|
|
65
|
+
setSelected(void 0);
|
|
66
|
+
};
|
|
67
|
+
const handleDelete = (trigger2) => {
|
|
68
|
+
space.db.remove(trigger2);
|
|
69
|
+
setTrigger(void 0);
|
|
70
|
+
setSelected(void 0);
|
|
71
|
+
};
|
|
72
|
+
const handleSave = (trigger2) => {
|
|
73
|
+
if (selected) {
|
|
74
|
+
Object.assign(selected, trigger2);
|
|
75
|
+
} else {
|
|
76
|
+
space.db.add((0, import_echo.live)(import_functions.FunctionTrigger, trigger2));
|
|
77
|
+
}
|
|
78
|
+
setTrigger(void 0);
|
|
79
|
+
setSelected(void 0);
|
|
80
|
+
onDone?.();
|
|
81
|
+
};
|
|
82
|
+
const handleCancel = () => {
|
|
83
|
+
setTrigger(void 0);
|
|
84
|
+
onDone?.();
|
|
85
|
+
};
|
|
86
|
+
if (trigger) {
|
|
87
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.ControlItem, {
|
|
88
|
+
title: t("trigger editor title")
|
|
89
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_chunk_O42NQYQT.TriggerEditor, {
|
|
90
|
+
space,
|
|
91
|
+
trigger,
|
|
92
|
+
onSave: handleSave,
|
|
93
|
+
onCancel: handleCancel
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
97
|
+
className: "flex flex-col w-full"
|
|
98
|
+
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
99
|
+
role: "none",
|
|
100
|
+
className: import_react_ui_form.controlItemClasses
|
|
101
|
+
}, triggers.length > 0 && /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.Root, {
|
|
102
|
+
items: triggers,
|
|
103
|
+
isItem: import_effect.Schema.is(import_functions.FunctionTrigger),
|
|
104
|
+
getId: (field) => field.id
|
|
105
|
+
}, ({ items: triggers2 }) => /* @__PURE__ */ import_react.default.createElement("div", {
|
|
106
|
+
role: "list",
|
|
107
|
+
className: "flex flex-col w-full"
|
|
108
|
+
}, triggers2?.map((trigger2) => {
|
|
109
|
+
const copyAction = getCopyAction(client, trigger2);
|
|
110
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.Item, {
|
|
111
|
+
key: trigger2.id,
|
|
112
|
+
item: trigger2,
|
|
113
|
+
classNames: (0, import_react_ui_theme.mx)(grid, import_react_ui_theme.ghostHover, "items-center", "px-2")
|
|
114
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui.Input.Root, null, /* @__PURE__ */ import_react.default.createElement(import_react_ui.Input.Switch, {
|
|
115
|
+
checked: trigger2.enabled,
|
|
116
|
+
onCheckedChange: (checked) => trigger2.enabled = checked
|
|
117
|
+
})), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
118
|
+
className: "flex"
|
|
119
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.ItemTitle, {
|
|
120
|
+
classNames: "px-1 cursor-pointer w-0 shrink truncate",
|
|
121
|
+
onClick: () => handleSelect(trigger2)
|
|
122
|
+
}, getFunctionName(scripts, functions, trigger2) ?? "\u2205"), copyAction && /* @__PURE__ */ import_react.default.createElement(import_react_ui.Clipboard.IconButton, {
|
|
123
|
+
label: t(copyAction.translationKey),
|
|
124
|
+
value: copyAction.contentProvider()
|
|
125
|
+
})), /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.ItemDeleteButton, {
|
|
126
|
+
onClick: () => handleDelete(trigger2)
|
|
127
|
+
}));
|
|
128
|
+
}))), triggers.length > 0 && /* @__PURE__ */ import_react.default.createElement(import_react_ui.Separator, {
|
|
129
|
+
classNames: "mlb-4"
|
|
130
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_react_ui.IconButton, {
|
|
131
|
+
icon: "ph--plus--regular",
|
|
132
|
+
label: t("new trigger label"),
|
|
133
|
+
onClick: handleAdd
|
|
134
|
+
})));
|
|
135
|
+
} finally {
|
|
136
|
+
_effect.f();
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
var getCopyAction = (client, trigger) => {
|
|
140
|
+
if (trigger?.spec?.kind === import_functions.TriggerKind.Email) {
|
|
141
|
+
return {
|
|
142
|
+
translationKey: "trigger copy email",
|
|
143
|
+
contentProvider: () => `${(0, import_echo.getSpace)(trigger).id}@dxos.network`
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
if (trigger?.spec?.kind === import_functions.TriggerKind.Webhook) {
|
|
147
|
+
return {
|
|
148
|
+
translationKey: "trigger copy url",
|
|
149
|
+
contentProvider: () => getWebhookUrl(client, trigger)
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return void 0;
|
|
153
|
+
};
|
|
154
|
+
var getWebhookUrl = (client, trigger) => {
|
|
155
|
+
const spaceId = (0, import_echo.getSpace)(trigger).id;
|
|
156
|
+
const edgeUrl = new URL(client.config.values.runtime.services.edge.url);
|
|
157
|
+
const isSecure = edgeUrl.protocol.startsWith("https") || edgeUrl.protocol.startsWith("wss");
|
|
158
|
+
edgeUrl.protocol = isSecure ? "https" : "http";
|
|
159
|
+
return new URL(`/webhook/${spaceId}:${trigger.id}`, edgeUrl).toString();
|
|
160
|
+
};
|
|
161
|
+
var getFunctionName = (scripts, functions, trigger) => {
|
|
162
|
+
const shortId = trigger.function && `${trigger.function.dxn.toString().slice(0, 16)}\u2026`;
|
|
163
|
+
const functionObject = functions.find((fn) => fn === trigger.function?.target);
|
|
164
|
+
if (!functionObject) {
|
|
165
|
+
return shortId;
|
|
166
|
+
}
|
|
167
|
+
return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;
|
|
168
|
+
};
|
|
169
|
+
var AutomationPanel_default = AutomationPanel;
|
|
170
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
171
|
+
0 && (module.exports = {
|
|
172
|
+
AutomationPanel,
|
|
173
|
+
AutomationPanel_default
|
|
174
|
+
});
|
|
175
|
+
//# sourceMappingURL=chunk-4O627QZU.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/AutomationPanel/AutomationPanel.tsx", "../../../src/components/AutomationPanel/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Schema } from 'effect';\nimport React, { useState } from 'react';\n\nimport {\n FunctionType,\n FunctionTrigger,\n FunctionTriggerSchema,\n TriggerKind,\n type FunctionTriggerType,\n ScriptType,\n} from '@dxos/functions';\nimport { type Client, useClient } from '@dxos/react-client';\nimport { live, Filter, useQuery, type Space, type Live, getSpace } from '@dxos/react-client/echo';\nimport { Clipboard, IconButton, Input, Separator, useTranslation } from '@dxos/react-ui';\nimport { ControlItem, controlItemClasses } from '@dxos/react-ui-form';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/react-ui-theme';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\nimport { TriggerEditor, type TriggerEditorProps } from '../TriggerEditor';\n\nconst grid = 'grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]';\n\nexport type AutomationPanelProps = {\n space: Space;\n object?: Live<any>;\n initialTrigger?: FunctionTriggerType;\n onDone?: () => void;\n};\n\n// TODO(burdon): Factor out common layout with ViewEditor.\nexport const AutomationPanel = ({ space, object, initialTrigger, onDone }: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const client = useClient();\n const triggers = useQuery(space, Filter.type(FunctionTrigger));\n const functions = useQuery(space, Filter.type(FunctionType));\n const scripts = useQuery(space, Filter.type(ScriptType));\n\n const [trigger, setTrigger] = useState<FunctionTriggerType | undefined>(initialTrigger);\n const [selected, setSelected] = useState<FunctionTrigger>();\n\n const handleSelect = (trigger: FunctionTrigger) => {\n const { id: _, ...values } = trigger;\n setTrigger(values);\n setSelected(trigger);\n };\n\n const handleAdd = () => {\n setTrigger(live(FunctionTriggerSchema, {}));\n setSelected(undefined);\n };\n\n const handleDelete = (trigger: FunctionTrigger) => {\n space.db.remove(trigger);\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleSave: TriggerEditorProps['onSave'] = (trigger) => {\n if (selected) {\n Object.assign(selected, trigger);\n } else {\n space.db.add(live(FunctionTrigger, trigger));\n }\n\n setTrigger(undefined);\n setSelected(undefined);\n onDone?.();\n };\n\n const handleCancel: TriggerEditorProps['onCancel'] = () => {\n setTrigger(undefined);\n onDone?.();\n };\n\n if (trigger) {\n return (\n <ControlItem title={t('trigger editor title')}>\n <TriggerEditor space={space} trigger={trigger} onSave={handleSave} onCancel={handleCancel} />\n </ControlItem>\n );\n }\n\n return (\n <div className='flex flex-col w-full'>\n <div role='none' className={controlItemClasses}>\n {triggers.length > 0 && (\n <List.Root<FunctionTrigger> items={triggers} isItem={Schema.is(FunctionTrigger)} getId={(field) => field.id}>\n {({ items: triggers }) => (\n <div role='list' className='flex flex-col w-full'>\n {triggers?.map((trigger) => {\n const copyAction = getCopyAction(client, trigger);\n return (\n <List.Item<FunctionTrigger>\n key={trigger.id}\n item={trigger}\n classNames={mx(grid, ghostHover, 'items-center', 'px-2')}\n >\n <Input.Root>\n <Input.Switch\n checked={trigger.enabled}\n onCheckedChange={(checked) => (trigger.enabled = checked)}\n />\n </Input.Root>\n\n <div className={'flex'}>\n <List.ItemTitle\n classNames='px-1 cursor-pointer w-0 shrink truncate'\n onClick={() => handleSelect(trigger)}\n >\n {getFunctionName(scripts, functions, trigger) ?? '∅'}\n </List.ItemTitle>\n\n {/* TODO: a better way to expose copy action */}\n {copyAction && (\n <Clipboard.IconButton\n label={t(copyAction.translationKey)}\n value={copyAction.contentProvider()}\n />\n )}\n </div>\n\n <List.ItemDeleteButton onClick={() => handleDelete(trigger)} />\n </List.Item>\n );\n })}\n </div>\n )}\n </List.Root>\n )}\n {triggers.length > 0 && <Separator classNames='mlb-4' />}\n <IconButton icon='ph--plus--regular' label={t('new trigger label')} onClick={handleAdd} />\n </div>\n </div>\n );\n};\n\nconst getCopyAction = (client: Client, trigger: FunctionTrigger | undefined) => {\n if (trigger?.spec?.kind === TriggerKind.Email) {\n return { translationKey: 'trigger copy email', contentProvider: () => `${getSpace(trigger)!.id}@dxos.network` };\n }\n\n if (trigger?.spec?.kind === TriggerKind.Webhook) {\n return { translationKey: 'trigger copy url', contentProvider: () => getWebhookUrl(client, trigger) };\n }\n\n return undefined;\n};\n\nconst getWebhookUrl = (client: Client, trigger: FunctionTrigger) => {\n const spaceId = getSpace(trigger)!.id;\n const edgeUrl = new URL(client.config.values.runtime!.services!.edge!.url!);\n const isSecure = edgeUrl.protocol.startsWith('https') || edgeUrl.protocol.startsWith('wss');\n edgeUrl.protocol = isSecure ? 'https' : 'http';\n return new URL(`/webhook/${spaceId}:${trigger.id}`, edgeUrl).toString();\n};\n\nconst getFunctionName = (scripts: ScriptType[], functions: FunctionType[], trigger: FunctionTriggerType) => {\n // TODO(wittjosiah): Truncation should be done in the UI.\n // Warning that the List component is currently a can of worms.\n const shortId = trigger.function && `${trigger.function.dxn.toString().slice(0, 16)}…`;\n const functionObject = functions.find((fn) => fn === trigger.function?.target);\n if (!functionObject) {\n return shortId;\n }\n\n return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AutomationPanel } from './AutomationPanel';\n\nexport * from './AutomationPanel';\n\nexport default AutomationPanel;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["grid", "AutomationPanel", "space", "object", "initialTrigger", "onDone", "t", "useTranslation", "AUTOMATION_PLUGIN", "client", "useClient", "triggers", "useQuery", "Filter", "type", "FunctionTrigger", "functions", "FunctionType", "scripts", "ScriptType", "trigger", "setTrigger", "useState", "selected", "setSelected", "handleSelect", "id", "_", "values", "handleAdd", "live", "FunctionTriggerSchema", "undefined", "handleDelete", "db", "remove", "handleSave", "Object", "assign", "add", "handleCancel", "React", "ControlItem", "title", "TriggerEditor", "onSave", "onCancel", "div", "className", "role", "controlItemClasses", "length", "List", "Root", "items", "isItem", "Schema", "is", "getId", "field", "map", "copyAction", "getCopyAction", "Item", "key", "item", "classNames", "mx", "ghostHover", "Input", "Switch", "checked", "enabled", "onCheckedChange", "ItemTitle", "onClick", "getFunctionName", "Clipboard", "IconButton", "label", "translationKey", "value", "contentProvider", "ItemDeleteButton", "Separator", "icon", "spec", "kind", "TriggerKind", "Email", "getSpace", "Webhook", "getWebhookUrl", "spaceId", "edgeUrl", "URL", "config", "runtime", "services", "edge", "url", "isSecure", "protocol", "startsWith", "toString", "shortId", "function", "dxn", "slice", "functionObject", "find", "fn", "target", "s", "source", "name"]
|
|
7
|
+
}
|
|
@@ -26,15 +26,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
29
|
+
var chunk_DOLMQUQ5_exports = {};
|
|
30
|
+
__export(chunk_DOLMQUQ5_exports, {
|
|
31
|
+
AutomationContainer: () => AutomationContainer,
|
|
32
|
+
AutomationPanel: () => AutomationPanel,
|
|
33
|
+
FunctionsContainer: () => FunctionsContainer,
|
|
34
|
+
FunctionsPanel: () => FunctionsPanel
|
|
32
35
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(chunk_DOLMQUQ5_exports);
|
|
34
37
|
var import_react = require("react");
|
|
35
|
-
var
|
|
38
|
+
var AutomationContainer = (0, import_react.lazy)(() => import("./AutomationContainer-5J7LJK7L.cjs"));
|
|
39
|
+
var AutomationPanel = (0, import_react.lazy)(() => import("./AutomationPanel-NPDBUQ7D.cjs"));
|
|
40
|
+
var FunctionsContainer = (0, import_react.lazy)(() => import("./FunctionsContainer-LNLDZUZ6.cjs"));
|
|
41
|
+
var FunctionsPanel = (0, import_react.lazy)(() => import("./FunctionsPanel-7AOXIQMA.cjs"));
|
|
36
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
43
|
0 && (module.exports = {
|
|
38
|
-
|
|
44
|
+
AutomationContainer,
|
|
45
|
+
AutomationPanel,
|
|
46
|
+
FunctionsContainer,
|
|
47
|
+
FunctionsPanel
|
|
39
48
|
});
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-DOLMQUQ5.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './TriggerEditor';\n\nexport const AutomationContainer = lazy(() => import('./AutomationContainer'));\nexport const AutomationPanel = lazy(() => import('./AutomationPanel'));\nexport const FunctionsContainer = lazy(() => import('./FunctionsContainer'));\nexport const FunctionsPanel = lazy(() => import('./FunctionsPanel'));\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAqB;AAId,IAAMA,0BAAsBC,mBAAK,MAAM,OAAO,oCAAA,CAAA;AAC9C,IAAMC,sBAAkBD,mBAAK,MAAM,OAAO,gCAAA,CAAA;AAC1C,IAAME,yBAAqBF,mBAAK,MAAM,OAAO,mCAAA,CAAA;AAC7C,IAAMG,qBAAiBH,mBAAK,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
+
"names": ["AutomationContainer", "lazy", "AutomationPanel", "FunctionsContainer", "FunctionsPanel"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var chunk_GIIVTK4O_exports = {};
|
|
20
|
+
__export(chunk_GIIVTK4O_exports, {
|
|
21
|
+
AutomationAction: () => AutomationAction
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(chunk_GIIVTK4O_exports);
|
|
24
|
+
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
25
|
+
var import_effect = require("effect");
|
|
26
|
+
var import_echo = require("@dxos/react-client/echo");
|
|
27
|
+
var TriggerTemplate = import_effect.Schema.Union(import_effect.Schema.Struct({
|
|
28
|
+
type: import_effect.Schema.Literal("timer"),
|
|
29
|
+
cron: import_effect.Schema.String
|
|
30
|
+
}), import_effect.Schema.Struct({
|
|
31
|
+
type: import_effect.Schema.Literal("queue"),
|
|
32
|
+
queueDXN: import_effect.Schema.Any
|
|
33
|
+
}));
|
|
34
|
+
(function(AutomationAction2) {
|
|
35
|
+
const AUTOMATION_ACTION = `${import_chunk_3EF7MLFX.AUTOMATION_PLUGIN}/action`;
|
|
36
|
+
class CreateTriggerFromTemplate extends import_effect.Schema.TaggedClass()(`${AUTOMATION_ACTION}/create-trigger-from-template`, {
|
|
37
|
+
input: import_effect.Schema.Struct({
|
|
38
|
+
space: import_echo.SpaceSchema,
|
|
39
|
+
template: TriggerTemplate,
|
|
40
|
+
enabled: import_effect.Schema.optional(import_effect.Schema.Boolean),
|
|
41
|
+
// TODO(wittjosiah): Improve how this lookup is done.
|
|
42
|
+
scriptName: import_effect.Schema.optional(import_effect.Schema.String),
|
|
43
|
+
input: import_effect.Schema.optional(import_effect.Schema.Record({
|
|
44
|
+
key: import_effect.Schema.String,
|
|
45
|
+
value: import_effect.Schema.Any
|
|
46
|
+
}))
|
|
47
|
+
}),
|
|
48
|
+
output: import_effect.Schema.Void
|
|
49
|
+
}) {
|
|
50
|
+
}
|
|
51
|
+
AutomationAction2.CreateTriggerFromTemplate = CreateTriggerFromTemplate;
|
|
52
|
+
})(AutomationAction || (AutomationAction = {}));
|
|
53
|
+
var AutomationAction;
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
AutomationAction
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=chunk-GIIVTK4O.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { SpaceSchema } from '@dxos/react-client/echo';\n\nimport { AUTOMATION_PLUGIN } from './meta';\n\nconst TriggerTemplate = Schema.Union(\n Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),\n Schema.Struct({ type: Schema.Literal('queue'), queueDXN: Schema.Any }),\n);\n\nexport namespace AutomationAction {\n const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;\n\n export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(\n `${AUTOMATION_ACTION}/create-trigger-from-template`,\n {\n input: Schema.Struct({\n space: SpaceSchema,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n // TODO(wittjosiah): Improve how this lookup is done.\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n },\n ) {}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,oBAAuB;AAEvB,kBAA4B;AAI5B,IAAMA,kBAAkBC,qBAAOC,MAC7BD,qBAAOE,OAAO;EAAEC,MAAMH,qBAAOI,QAAQ,OAAA;EAAUC,MAAML,qBAAOM;AAAO,CAAA,GACnEN,qBAAOE,OAAO;EAAEC,MAAMH,qBAAOI,QAAQ,OAAA;EAAUG,UAAUP,qBAAOQ;AAAI,CAAA,CAAA;UAGrDC,mBAAAA;AACf,QAAMC,oBAAoB,GAAGC,uCAAAA;EAEtB,MAAMC,kCAAkCZ,qBAAOa,YAAW,EAC/D,GAAGH,iBAAAA,iCACH;IACEI,OAAOd,qBAAOE,OAAO;MACnBa,OAAOC;MACPC,UAAUlB;MACVmB,SAASlB,qBAAOmB,SAASnB,qBAAOoB,OAAO;;MAEvCC,YAAYrB,qBAAOmB,SAASnB,qBAAOM,MAAM;MACzCQ,OAAOd,qBAAOmB,SAASnB,qBAAOsB,OAAO;QAAEC,KAAKvB,qBAAOM;QAAQkB,OAAOxB,qBAAOQ;MAAI,CAAA,CAAA;IAC/E,CAAA;IACAiB,QAAQzB,qBAAO0B;EACjB,CAAA,EAAA;EACC;oBAbUd,4BAAAA;AAcf,GAjBiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;;",
|
|
6
|
+
"names": ["TriggerTemplate", "Schema", "Union", "Struct", "type", "Literal", "cron", "String", "queueDXN", "Any", "AutomationAction", "AUTOMATION_ACTION", "AUTOMATION_PLUGIN", "CreateTriggerFromTemplate", "TaggedClass", "input", "space", "SpaceSchema", "template", "enabled", "optional", "Boolean", "scriptName", "Record", "key", "value", "output", "Void"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_O42NQYQT_exports = {};
|
|
30
|
+
__export(chunk_O42NQYQT_exports, {
|
|
31
|
+
TriggerEditor: () => TriggerEditor
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(chunk_O42NQYQT_exports);
|
|
34
|
+
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
35
|
+
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_conductor = require("@dxos/conductor");
|
|
38
|
+
var import_echo = require("@dxos/echo");
|
|
39
|
+
var import_functions = require("@dxos/functions");
|
|
40
|
+
var import_echo2 = require("@dxos/react-client/echo");
|
|
41
|
+
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
42
|
+
var import_tracking2 = require("@preact-signals/safe-react/tracking");
|
|
43
|
+
var import_react2 = __toESM(require("react"));
|
|
44
|
+
var import_echo_schema = require("@dxos/echo-schema");
|
|
45
|
+
var import_react_ui = require("@dxos/react-ui");
|
|
46
|
+
var import_react_ui_form2 = require("@dxos/react-ui-form");
|
|
47
|
+
var import_tracking3 = require("@preact-signals/safe-react/tracking");
|
|
48
|
+
var import_react3 = __toESM(require("react"));
|
|
49
|
+
var import_functions2 = require("@dxos/functions");
|
|
50
|
+
var import_react_ui2 = require("@dxos/react-ui");
|
|
51
|
+
var import_react_ui_form3 = require("@dxos/react-ui-form");
|
|
52
|
+
var FunctionInputEditor = ({ functions, getValue, onValueChange, onQueryRefOptions }) => {
|
|
53
|
+
var _effect = (0, import_tracking2.useSignals)();
|
|
54
|
+
try {
|
|
55
|
+
const selectedFunctionValue = (0, import_react_ui_form2.useFormValues)([
|
|
56
|
+
"function"
|
|
57
|
+
]);
|
|
58
|
+
const selectedFunctionId = (0, import_react2.useMemo)(() => {
|
|
59
|
+
if (selectedFunctionValue instanceof import_echo_schema.RefImpl) {
|
|
60
|
+
return selectedFunctionValue.dxn.toString().split("dxn:echo:@:").at(1);
|
|
61
|
+
}
|
|
62
|
+
}, [
|
|
63
|
+
selectedFunctionValue
|
|
64
|
+
]);
|
|
65
|
+
const selectedFunction = (0, import_react2.useMemo)(() => functions.find((f) => f.id === selectedFunctionId), [
|
|
66
|
+
functions,
|
|
67
|
+
selectedFunctionId
|
|
68
|
+
]);
|
|
69
|
+
(0, import_react_ui.useOnTransition)(
|
|
70
|
+
// Clear function parameter input when the function changes.
|
|
71
|
+
selectedFunctionValue,
|
|
72
|
+
(prevValue) => prevValue !== void 0 && prevValue !== selectedFunctionValue,
|
|
73
|
+
(currValue) => currValue !== void 0,
|
|
74
|
+
() => onValueChange("object", {})
|
|
75
|
+
);
|
|
76
|
+
const inputSchema = (0, import_react2.useMemo)(() => selectedFunction?.inputSchema, [
|
|
77
|
+
selectedFunction
|
|
78
|
+
]);
|
|
79
|
+
const effectSchema = (0, import_react2.useMemo)(() => inputSchema ? (0, import_echo_schema.toEffectSchema)(inputSchema) : void 0, [
|
|
80
|
+
inputSchema
|
|
81
|
+
]);
|
|
82
|
+
const propertyCount = inputSchema?.properties ? Object.keys(inputSchema.properties).length : 0;
|
|
83
|
+
const values = (0, import_react2.useMemo)(() => getValue() ?? {}, [
|
|
84
|
+
getValue
|
|
85
|
+
]);
|
|
86
|
+
const handleValuesChanged = (0, import_react2.useCallback)((values2) => {
|
|
87
|
+
onValueChange("object", values2);
|
|
88
|
+
}, [
|
|
89
|
+
onValueChange
|
|
90
|
+
]);
|
|
91
|
+
if (selectedFunction === void 0 || effectSchema === void 0 || propertyCount === 0) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("h3", {
|
|
95
|
+
className: "text-md"
|
|
96
|
+
}, "Function parameters"), /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form2.Form, {
|
|
97
|
+
schema: effectSchema,
|
|
98
|
+
values,
|
|
99
|
+
classNames: "p-0",
|
|
100
|
+
onValuesChanged: handleValuesChanged,
|
|
101
|
+
onQueryRefOptions
|
|
102
|
+
}));
|
|
103
|
+
} finally {
|
|
104
|
+
_effect.f();
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
var SpecSelector = (props) => {
|
|
108
|
+
var _effect = (0, import_tracking3.useSignals)();
|
|
109
|
+
try {
|
|
110
|
+
const { t } = (0, import_react_ui2.useTranslation)(import_chunk_3EF7MLFX.AUTOMATION_PLUGIN);
|
|
111
|
+
const specProps = (0, import_react_ui_form3.useInputProps)([
|
|
112
|
+
"spec"
|
|
113
|
+
]);
|
|
114
|
+
const handleTypeChange = (0, import_react3.useCallback)((_type, value) => {
|
|
115
|
+
const getDefaultTriggerSpec = (kind) => {
|
|
116
|
+
switch (kind) {
|
|
117
|
+
case import_functions2.TriggerKind.Timer:
|
|
118
|
+
return {
|
|
119
|
+
kind: import_functions2.TriggerKind.Timer,
|
|
120
|
+
cron: ""
|
|
121
|
+
};
|
|
122
|
+
case import_functions2.TriggerKind.Subscription:
|
|
123
|
+
return {
|
|
124
|
+
kind: import_functions2.TriggerKind.Subscription,
|
|
125
|
+
filter: {}
|
|
126
|
+
};
|
|
127
|
+
case import_functions2.TriggerKind.Queue:
|
|
128
|
+
return {
|
|
129
|
+
kind: import_functions2.TriggerKind.Queue,
|
|
130
|
+
queue: ""
|
|
131
|
+
};
|
|
132
|
+
case import_functions2.TriggerKind.Email:
|
|
133
|
+
return {
|
|
134
|
+
kind: import_functions2.TriggerKind.Email
|
|
135
|
+
};
|
|
136
|
+
case import_functions2.TriggerKind.Webhook:
|
|
137
|
+
return {
|
|
138
|
+
kind: import_functions2.TriggerKind.Webhook
|
|
139
|
+
};
|
|
140
|
+
default:
|
|
141
|
+
return void 0;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
const defaultSpec = getDefaultTriggerSpec(value);
|
|
145
|
+
if (!defaultSpec) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
specProps.onValueChange("object", defaultSpec);
|
|
149
|
+
}, [
|
|
150
|
+
specProps
|
|
151
|
+
]);
|
|
152
|
+
const options = (0, import_react3.useMemo)(() => Object.values(import_functions2.TriggerKind).map((kind) => ({
|
|
153
|
+
value: kind,
|
|
154
|
+
label: t(`trigger type ${kind}`)
|
|
155
|
+
})), [
|
|
156
|
+
t
|
|
157
|
+
]);
|
|
158
|
+
return /* @__PURE__ */ import_react3.default.createElement(import_react_ui_form3.SelectInput, {
|
|
159
|
+
...props,
|
|
160
|
+
options,
|
|
161
|
+
onValueChange: handleTypeChange
|
|
162
|
+
});
|
|
163
|
+
} finally {
|
|
164
|
+
_effect.f();
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
var TriggerEditor = ({ space, trigger, onSave, onCancel }) => {
|
|
168
|
+
var _effect = (0, import_tracking.useSignals)();
|
|
169
|
+
try {
|
|
170
|
+
const handleSave = (values) => {
|
|
171
|
+
onSave?.(values);
|
|
172
|
+
};
|
|
173
|
+
const handleRefQueryLookup = (0, import_react_ui_form.useRefQueryLookupHandler)({
|
|
174
|
+
space
|
|
175
|
+
});
|
|
176
|
+
const Custom = useCustomInputs(space, handleRefQueryLookup);
|
|
177
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.Form, {
|
|
178
|
+
Custom,
|
|
179
|
+
schema: import_functions.FunctionTriggerSchema,
|
|
180
|
+
values: trigger,
|
|
181
|
+
onSave: handleSave,
|
|
182
|
+
onCancel,
|
|
183
|
+
onQueryRefOptions: handleRefQueryLookup
|
|
184
|
+
});
|
|
185
|
+
} finally {
|
|
186
|
+
_effect.f();
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
var useCustomInputs = (space, onQueryRefOptions) => {
|
|
190
|
+
const functions = (0, import_echo2.useQuery)(space, import_echo2.Filter.type(import_functions.FunctionType));
|
|
191
|
+
const workflows = (0, import_echo2.useQuery)(space, import_echo2.Filter.type(import_conductor.ComputeGraph));
|
|
192
|
+
const scripts = (0, import_echo2.useQuery)(space, import_echo2.Filter.type(import_functions.ScriptType));
|
|
193
|
+
return (0, import_react.useMemo)(() => ({
|
|
194
|
+
// Function selector.
|
|
195
|
+
["function"]: (props) => {
|
|
196
|
+
const getValue = (0, import_react.useCallback)(() => {
|
|
197
|
+
const formValue = props.getValue();
|
|
198
|
+
if (import_echo2.Ref.isRef(formValue)) {
|
|
199
|
+
return formValue.dxn.toString();
|
|
200
|
+
}
|
|
201
|
+
return void 0;
|
|
202
|
+
}, [
|
|
203
|
+
props
|
|
204
|
+
]);
|
|
205
|
+
const handleOnValueChange = (0, import_react.useCallback)((_type, dxnString) => {
|
|
206
|
+
const dxn = import_echo.Type.DXN.parse(dxnString);
|
|
207
|
+
if (dxn) {
|
|
208
|
+
const ref = import_echo2.Ref.fromDXN(dxn);
|
|
209
|
+
props.onValueChange("object", ref);
|
|
210
|
+
}
|
|
211
|
+
}, [
|
|
212
|
+
props.onValueChange
|
|
213
|
+
]);
|
|
214
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_form.SelectInput, {
|
|
215
|
+
...props,
|
|
216
|
+
getValue,
|
|
217
|
+
onValueChange: handleOnValueChange,
|
|
218
|
+
options: getWorkflowOptions(workflows).concat(getFunctionOptions(scripts, functions))
|
|
219
|
+
});
|
|
220
|
+
},
|
|
221
|
+
// Spec selector.
|
|
222
|
+
["spec.kind"]: SpecSelector,
|
|
223
|
+
// Function input editor.
|
|
224
|
+
["input"]: (props) => /* @__PURE__ */ import_react.default.createElement(FunctionInputEditor, {
|
|
225
|
+
...props,
|
|
226
|
+
functions,
|
|
227
|
+
onQueryRefOptions
|
|
228
|
+
})
|
|
229
|
+
}), [
|
|
230
|
+
workflows,
|
|
231
|
+
scripts,
|
|
232
|
+
functions
|
|
233
|
+
]);
|
|
234
|
+
};
|
|
235
|
+
var getWorkflowOptions = (graphs) => {
|
|
236
|
+
return graphs.map((graph) => ({
|
|
237
|
+
label: `compute-${graph.id}`,
|
|
238
|
+
value: `dxn:echo:@:${graph.id}`
|
|
239
|
+
}));
|
|
240
|
+
};
|
|
241
|
+
var getFunctionOptions = (scripts, functions) => {
|
|
242
|
+
const getLabel = (fn) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;
|
|
243
|
+
return functions.map((fn) => ({
|
|
244
|
+
label: getLabel(fn),
|
|
245
|
+
value: `dxn:echo:@:${fn.id}`
|
|
246
|
+
}));
|
|
247
|
+
};
|
|
248
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
249
|
+
0 && (module.exports = {
|
|
250
|
+
TriggerEditor
|
|
251
|
+
});
|
|
252
|
+
//# sourceMappingURL=chunk-O42NQYQT.cjs.map
|