@dxos/plugin-automation 0.8.2-main.fbd8ed0 → 0.8.2-staging.4d6ad0f
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/{node-esm/AutomationContainer-OP43F4PD.mjs.map → browser/AutomationContainer-HQK7FTN6.mjs.map} +1 -1
- package/dist/lib/browser/AutomationPanel-GU37N5LO.mjs +11 -0
- package/dist/lib/browser/FunctionsContainer-B7RDWVMX.mjs +39 -0
- package/dist/lib/{node-esm/FunctionsContainer-5TVRDIX5.mjs.map → browser/FunctionsContainer-B7RDWVMX.mjs.map} +1 -1
- package/dist/lib/browser/{FunctionsPanel-NSI3P53X.mjs → FunctionsPanel-LCCPDIT6.mjs} +3 -3
- package/dist/lib/browser/{app-graph-builder-2OGPEVBA.mjs → app-graph-builder-BYECL42X.mjs} +4 -3
- package/dist/lib/browser/{app-graph-builder-2OGPEVBA.mjs.map → app-graph-builder-BYECL42X.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-ADYCSC6Y.mjs → chunk-4E2KPMLB.mjs} +3 -3
- package/dist/lib/{node-esm/chunk-EEA6CZ6B.mjs.map → browser/chunk-4E2KPMLB.mjs.map} +1 -1
- 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-SGT76SL2.mjs → chunk-ELQ2FX5G.mjs} +5 -5
- 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/{node-esm/chunk-AD4C4IK2.mjs.map → browser/chunk-ZTRYR6RJ.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +6 -6
- package/dist/lib/browser/{intent-resolver-X3H6ZSP4.mjs → intent-resolver-ZRBBYZUX.mjs} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-MOXIHBMS.mjs → react-surface-VKO6PA2P.mjs} +4 -4
- package/dist/lib/browser/types.mjs +2 -2
- package/dist/lib/node/{AutomationContainer-FIFH4P5T.cjs → AutomationContainer-5J7LJK7L.cjs} +26 -20
- package/dist/lib/node/{AutomationContainer-FIFH4P5T.cjs.map → AutomationContainer-5J7LJK7L.cjs.map} +1 -1
- package/dist/lib/node/{AutomationPanel-HTNEWBGB.cjs → AutomationPanel-NPDBUQ7D.cjs} +9 -9
- package/dist/lib/node/{AutomationPanel-HTNEWBGB.cjs.map → AutomationPanel-NPDBUQ7D.cjs.map} +2 -2
- package/dist/lib/node/{FunctionsContainer-LF2F6CPE.cjs → FunctionsContainer-LNLDZUZ6.cjs} +25 -19
- package/dist/lib/node/{FunctionsContainer-LF2F6CPE.cjs.map → FunctionsContainer-LNLDZUZ6.cjs.map} +1 -1
- package/dist/lib/node/{FunctionsPanel-6HOAIMQ3.cjs → FunctionsPanel-7AOXIQMA.cjs} +8 -8
- package/dist/lib/node/FunctionsPanel-7AOXIQMA.cjs.map +7 -0
- package/dist/lib/node/{app-graph-builder-3XGDVWHR.cjs → app-graph-builder-DUKR2BRB.cjs} +17 -16
- package/dist/lib/node/{app-graph-builder-3XGDVWHR.cjs.map → app-graph-builder-DUKR2BRB.cjs.map} +3 -3
- 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-SV2CB3FT.cjs → chunk-DOLMQUQ5.cjs} +8 -8
- package/dist/lib/node/{chunk-GDCG2BML.cjs → chunk-GIIVTK4O.cjs} +7 -7
- package/dist/lib/node/{chunk-GDCG2BML.cjs.map → chunk-GIIVTK4O.cjs.map} +1 -1
- 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-CBHWMYKF.cjs.map → chunk-WXQAVUBJ.cjs.map} +1 -1
- package/dist/lib/node/index.cjs +20 -20
- package/dist/lib/node/{intent-resolver-Q7WJ4PZZ.cjs → intent-resolver-JC4Q4TYU.cjs} +7 -7
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-43VHU36V.cjs → react-surface-HB3MYTCK.cjs} +15 -15
- package/dist/lib/node/types.cjs +3 -3
- package/dist/lib/node/types.cjs.map +1 -1
- package/dist/lib/node-esm/AutomationContainer-OJGH76X2.mjs +41 -0
- package/dist/lib/{browser/AutomationContainer-DA6IW7O2.mjs.map → node-esm/AutomationContainer-OJGH76X2.mjs.map} +1 -1
- package/dist/lib/node-esm/{AutomationPanel-ZQKRBWP2.mjs → AutomationPanel-HIWEJUWL.mjs} +4 -4
- package/dist/lib/node-esm/FunctionsContainer-PPR6XNNR.mjs +40 -0
- package/dist/lib/{browser/FunctionsContainer-MPBMMOMS.mjs.map → node-esm/FunctionsContainer-PPR6XNNR.mjs.map} +1 -1
- package/dist/lib/node-esm/{FunctionsPanel-NMEW26KL.mjs → FunctionsPanel-SBXKWTHR.mjs} +3 -3
- package/dist/lib/node-esm/{app-graph-builder-UR2E5CQY.mjs → app-graph-builder-UAXHKKGW.mjs} +4 -3
- package/dist/lib/node-esm/{app-graph-builder-UR2E5CQY.mjs.map → app-graph-builder-UAXHKKGW.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-5IAHBEHR.mjs +95 -0
- package/dist/lib/{browser/chunk-TRC3J2I6.mjs.map → node-esm/chunk-5IAHBEHR.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-EEA6CZ6B.mjs → chunk-6JOJ2NN4.mjs} +3 -3
- package/dist/lib/{browser/chunk-ADYCSC6Y.mjs.map → node-esm/chunk-6JOJ2NN4.mjs.map} +1 -1
- 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-CUPEMOYK.mjs → chunk-Z7VAQDEE.mjs} +5 -5
- package/dist/lib/node-esm/index.mjs +6 -6
- package/dist/lib/node-esm/{intent-resolver-HEUGQ6SL.mjs → intent-resolver-KRCXJEDR.mjs} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-TER7JEF6.mjs → react-surface-TRKCIZAB.mjs} +4 -4
- package/dist/lib/node-esm/types.mjs +2 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- 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/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/package.json +27 -26
- package/src/capabilities/app-graph-builder.ts +1 -0
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +3 -2
- package/src/components/AutomationPanel/AutomationPanel.tsx +14 -10
- package/src/components/TriggerEditor/TriggerEditor.tsx +29 -27
- package/src/meta.ts +1 -1
- package/src/testing/test-functions.ts +5 -5
- package/dist/lib/browser/AutomationContainer-DA6IW7O2.mjs +0 -34
- package/dist/lib/browser/AutomationPanel-R42D3LDD.mjs +0 -11
- package/dist/lib/browser/FunctionsContainer-MPBMMOMS.mjs +0 -33
- package/dist/lib/browser/chunk-2QF27UJ2.mjs +0 -140
- package/dist/lib/browser/chunk-2QF27UJ2.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-TRC3J2I6.mjs +0 -88
- package/dist/lib/node/FunctionsPanel-6HOAIMQ3.cjs.map +0 -7
- package/dist/lib/node/chunk-CBHWMYKF.cjs +0 -116
- package/dist/lib/node/chunk-S3Z4AP77.cjs +0 -234
- package/dist/lib/node/chunk-S3Z4AP77.cjs.map +0 -7
- package/dist/lib/node/chunk-TI3WBQIB.cjs +0 -166
- package/dist/lib/node/chunk-TI3WBQIB.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationContainer-OP43F4PD.mjs +0 -35
- package/dist/lib/node-esm/FunctionsContainer-5TVRDIX5.mjs +0 -34
- package/dist/lib/node-esm/chunk-AD4C4IK2.mjs +0 -89
- package/dist/lib/node-esm/chunk-DIUPZXCQ.mjs +0 -141
- 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/browser/{AutomationPanel-R42D3LDD.mjs.map → AutomationPanel-GU37N5LO.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsPanel-NSI3P53X.mjs.map → FunctionsPanel-LCCPDIT6.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-SGT76SL2.mjs.map → chunk-ELQ2FX5G.mjs.map} +0 -0
- /package/dist/lib/browser/{intent-resolver-X3H6ZSP4.mjs.map → intent-resolver-ZRBBYZUX.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-MOXIHBMS.mjs.map → react-surface-VKO6PA2P.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-SV2CB3FT.cjs.map → chunk-DOLMQUQ5.cjs.map} +0 -0
- /package/dist/lib/node/{intent-resolver-Q7WJ4PZZ.cjs.map → intent-resolver-JC4Q4TYU.cjs.map} +0 -0
- /package/dist/lib/node/{react-surface-43VHU36V.cjs.map → react-surface-HB3MYTCK.cjs.map} +0 -0
- /package/dist/lib/node-esm/{AutomationPanel-ZQKRBWP2.mjs.map → AutomationPanel-HIWEJUWL.mjs.map} +0 -0
- /package/dist/lib/node-esm/{FunctionsPanel-NMEW26KL.mjs.map → FunctionsPanel-SBXKWTHR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-CUPEMOYK.mjs.map → chunk-Z7VAQDEE.mjs.map} +0 -0
- /package/dist/lib/node-esm/{intent-resolver-HEUGQ6SL.mjs.map → intent-resolver-KRCXJEDR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-TER7JEF6.mjs.map → react-surface-TRKCIZAB.mjs.map} +0 -0
|
@@ -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
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/TriggerEditor/TriggerEditor.tsx", "../../../src/components/TriggerEditor/FunctionInputEditor.tsx", "../../../src/components/TriggerEditor/SpecSelector.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { ComputeGraph } from '@dxos/conductor';\nimport { Type } from '@dxos/echo';\nimport {\n FunctionType,\n FunctionTriggerSchema,\n type FunctionTriggerType,\n type FunctionTrigger,\n ScriptType,\n} from '@dxos/functions';\nimport { Filter, Ref, useQuery, type Space } from '@dxos/react-client/echo';\nimport { type CustomInputMap, Form, SelectInput, useRefQueryLookupHandler } from '@dxos/react-ui-form';\n\nimport { FunctionInputEditor, type FunctionInputEditorProps } from './FunctionInputEditor';\nimport { SpecSelector } from './SpecSelector';\n\nexport type TriggerEditorProps = {\n space: Space;\n trigger: FunctionTriggerType;\n onSave?: (trigger: Omit<FunctionTrigger, 'id'>) => void;\n onCancel?: () => void;\n};\n\nexport const TriggerEditor = ({ space, trigger, onSave, onCancel }: TriggerEditorProps) => {\n const handleSave = (values: FunctionTriggerType) => {\n onSave?.(values);\n };\n\n const handleRefQueryLookup = useRefQueryLookupHandler({ space });\n const Custom = useCustomInputs(space, handleRefQueryLookup);\n\n return (\n <Form\n Custom={Custom}\n schema={FunctionTriggerSchema}\n values={trigger}\n onSave={handleSave}\n onCancel={onCancel}\n onQueryRefOptions={handleRefQueryLookup}\n />\n );\n};\n\nconst useCustomInputs = (space: Space, onQueryRefOptions: FunctionInputEditorProps['onQueryRefOptions']) => {\n const functions = useQuery(space, Filter.type(FunctionType));\n const workflows = useQuery(space, Filter.type(ComputeGraph));\n const scripts = useQuery(space, Filter.type(ScriptType));\n\n return useMemo(\n (): CustomInputMap => ({\n // Function selector.\n ['function' satisfies keyof FunctionTriggerType]: (props) => {\n const getValue = useCallback(() => {\n const formValue = props.getValue();\n if (Ref.isRef(formValue)) {\n return formValue.dxn.toString() as string;\n }\n return undefined;\n }, [props]);\n\n const handleOnValueChange = useCallback(\n (_type: any, dxnString: string) => {\n const dxn = Type.DXN.parse(dxnString);\n if (dxn) {\n const ref = Ref.fromDXN(dxn);\n props.onValueChange('object', ref);\n }\n },\n [props.onValueChange],\n );\n\n return (\n <SelectInput\n {...props}\n getValue={getValue as any}\n onValueChange={handleOnValueChange}\n options={getWorkflowOptions(workflows).concat(getFunctionOptions(scripts, functions))}\n />\n );\n },\n\n // Spec selector.\n ['spec.kind' as const]: SpecSelector,\n\n // Function input editor.\n ['input' as const]: (props) => (\n <FunctionInputEditor {...props} functions={functions} onQueryRefOptions={onQueryRefOptions} />\n ),\n }),\n [workflows, scripts, functions],\n );\n};\n\nconst getWorkflowOptions = (graphs: ComputeGraph[]) => {\n return graphs.map((graph) => ({ label: `compute-${graph.id}`, value: `dxn:echo:@:${graph.id}` }));\n};\n\nconst getFunctionOptions = (scripts: ScriptType[], functions: FunctionType[]) => {\n const getLabel = (fn: FunctionType) => scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;\n return functions.map((fn) => ({ label: getLabel(fn), value: `dxn:echo:@:${fn.id}` }));\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type JsonPath, RefImpl, toEffectSchema } from '@dxos/echo-schema';\nimport { type FunctionType } from '@dxos/functions';\nimport { useOnTransition } from '@dxos/react-ui';\nimport { Form, type FormInputStateProps, type QueryRefOptions, useFormValues } from '@dxos/react-ui-form';\n\nexport type FunctionInputEditorProps = {\n functions: FunctionType[];\n onQueryRefOptions: QueryRefOptions;\n} & FormInputStateProps;\n\n/**\n * Editor component for function input parameters.\n */\nexport const FunctionInputEditor = ({\n functions,\n getValue,\n onValueChange,\n onQueryRefOptions,\n}: FunctionInputEditorProps) => {\n const selectedFunctionValue = useFormValues(['function' as JsonPath]);\n const selectedFunctionId = useMemo(() => {\n if (selectedFunctionValue instanceof RefImpl) {\n return selectedFunctionValue.dxn.toString().split('dxn:echo:@:').at(1);\n }\n }, [selectedFunctionValue]);\n\n const selectedFunction = useMemo(\n () => functions.find((f) => f.id === selectedFunctionId),\n [functions, selectedFunctionId],\n );\n\n useOnTransition(\n // Clear function parameter input when the function changes.\n selectedFunctionValue,\n (prevValue) => prevValue !== undefined && prevValue !== selectedFunctionValue,\n (currValue) => currValue !== undefined,\n () => onValueChange('object', {}),\n );\n\n const inputSchema = useMemo(() => selectedFunction?.inputSchema, [selectedFunction]);\n const effectSchema = useMemo(() => (inputSchema ? toEffectSchema(inputSchema) : undefined), [inputSchema]);\n const propertyCount = inputSchema?.properties ? Object.keys(inputSchema.properties).length : 0;\n\n const values = useMemo(() => getValue() ?? {}, [getValue]);\n\n const handleValuesChanged = useCallback(\n (values: any) => {\n onValueChange('object', values);\n },\n [onValueChange],\n );\n\n if (selectedFunction === undefined || effectSchema === undefined || propertyCount === 0) {\n return null;\n }\n\n return (\n <>\n <h3 className='text-md'>Function parameters</h3>\n {/* TODO(ZaymonFC): Try using <FormFields /> internal component for this nesting.\n This would allow errors to flow up to the root context. */}\n <Form\n schema={effectSchema}\n values={values}\n classNames='p-0'\n onValuesChanged={handleValuesChanged}\n onQueryRefOptions={onQueryRefOptions}\n />\n </>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport { type FunctionTriggerType, TriggerKind, type TriggerType } from '@dxos/functions';\nimport { useTranslation } from '@dxos/react-ui';\nimport { SelectInput, type InputProps, useInputProps } from '@dxos/react-ui-form';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nexport type SpecSelectorProps = InputProps;\n\nexport const SpecSelector = (props: SpecSelectorProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const specProps = useInputProps(['spec' satisfies keyof FunctionTriggerType]);\n\n const handleTypeChange = useCallback(\n (_type: any, value: string): TriggerType | undefined => {\n const getDefaultTriggerSpec = (kind: string) => {\n switch (kind) {\n case TriggerKind.Timer:\n return { kind: TriggerKind.Timer, cron: '' };\n case TriggerKind.Subscription:\n return { kind: TriggerKind.Subscription, filter: {} };\n case TriggerKind.Queue:\n return { kind: TriggerKind.Queue, queue: '' };\n case TriggerKind.Email:\n return { kind: TriggerKind.Email };\n case TriggerKind.Webhook:\n return { kind: TriggerKind.Webhook };\n default:\n return undefined;\n }\n };\n\n const defaultSpec = getDefaultTriggerSpec(value);\n if (!defaultSpec) {\n return;\n }\n\n // Update the entire spec object, not just the `spec.kind`.\n specProps.onValueChange('object', defaultSpec);\n },\n [specProps],\n );\n\n const options = useMemo(\n () =>\n Object.values(TriggerKind).map((kind) => ({\n value: kind,\n label: t(`trigger type ${kind}`),\n })),\n [t],\n );\n\n return <SelectInput {...props} options={options} onValueChange={handleTypeChange} />;\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["import_echo", "import_react", "import_react_ui_form", "import_functions", "import_react_ui", "FunctionInputEditor", "functions", "getValue", "onValueChange", "onQueryRefOptions", "selectedFunctionValue", "useFormValues", "selectedFunctionId", "useMemo", "RefImpl", "dxn", "toString", "split", "at", "selectedFunction", "find", "f", "id", "useOnTransition", "prevValue", "undefined", "currValue", "inputSchema", "effectSchema", "toEffectSchema", "propertyCount", "properties", "Object", "keys", "length", "values", "handleValuesChanged", "useCallback", "React", "h3", "className", "Form", "schema", "classNames", "onValuesChanged", "SpecSelector", "props", "t", "useTranslation", "AUTOMATION_PLUGIN", "specProps", "useInputProps", "handleTypeChange", "_type", "value", "getDefaultTriggerSpec", "kind", "TriggerKind", "Timer", "cron", "Subscription", "filter", "Queue", "queue", "Email", "Webhook", "defaultSpec", "options", "map", "label", "SelectInput", "TriggerEditor", "space", "trigger", "onSave", "onCancel", "handleSave", "handleRefQueryLookup", "useRefQueryLookupHandler", "Custom", "useCustomInputs", "FunctionTriggerSchema", "useQuery", "Filter", "type", "FunctionType", "workflows", "ComputeGraph", "scripts", "ScriptType", "formValue", "Ref", "isRef", "handleOnValueChange", "dxnString", "Type", "DXN", "parse", "ref", "fromDXN", "getWorkflowOptions", "concat", "getFunctionOptions", "graphs", "graph", "getLabel", "fn", "s", "source", "target", "name"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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_WXQAVUBJ_exports = {};
|
|
30
|
+
__export(chunk_WXQAVUBJ_exports, {
|
|
31
|
+
FunctionsPanel: () => FunctionsPanel,
|
|
32
|
+
FunctionsPanel_default: () => FunctionsPanel_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(chunk_WXQAVUBJ_exports);
|
|
35
|
+
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
36
|
+
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
37
|
+
var import_effect = require("effect");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
40
|
+
var import_functions = require("@dxos/functions");
|
|
41
|
+
var import_echo = require("@dxos/react-client/echo");
|
|
42
|
+
var import_react_ui = require("@dxos/react-ui");
|
|
43
|
+
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
44
|
+
var import_react_ui_list = require("@dxos/react-ui-list");
|
|
45
|
+
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
46
|
+
var grid = "grid grid-cols-[1fr_auto] min-bs-[2.5rem]";
|
|
47
|
+
var FunctionsPanel = ({ space }) => {
|
|
48
|
+
var _effect = (0, import_tracking.useSignals)();
|
|
49
|
+
try {
|
|
50
|
+
const { t } = (0, import_react_ui.useTranslation)(import_chunk_3EF7MLFX.AUTOMATION_PLUGIN);
|
|
51
|
+
const functions = (0, import_echo.useQuery)(space, import_echo.Filter.type(import_functions.FunctionType));
|
|
52
|
+
const scripts = (0, import_echo.useQuery)(space, import_echo.Filter.type(import_functions.ScriptType));
|
|
53
|
+
const { dispatchPromise: dispatch } = (0, import_app_framework.useIntentDispatcher)();
|
|
54
|
+
const functionToScriptMap = (0, import_react.useMemo)(() => functions.reduce((map, func) => {
|
|
55
|
+
const scriptId = func.source?.target?.id;
|
|
56
|
+
if (scriptId) {
|
|
57
|
+
const script = scripts.find((s) => s.id === scriptId);
|
|
58
|
+
if (script) {
|
|
59
|
+
map[func.id] = script;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return map;
|
|
63
|
+
}, {}), [
|
|
64
|
+
functions,
|
|
65
|
+
scripts
|
|
66
|
+
]);
|
|
67
|
+
const getScriptName = (0, import_react.useCallback)((func) => {
|
|
68
|
+
const script = functionToScriptMap[func.id];
|
|
69
|
+
return script?.name;
|
|
70
|
+
}, [
|
|
71
|
+
functionToScriptMap
|
|
72
|
+
]);
|
|
73
|
+
const handleGoToScript = (0, import_react.useCallback)((func) => {
|
|
74
|
+
const script = functionToScriptMap[func.id];
|
|
75
|
+
if (script) {
|
|
76
|
+
void dispatch((0, import_app_framework.createIntent)(import_app_framework.LayoutAction.Open, {
|
|
77
|
+
part: "main",
|
|
78
|
+
subject: [
|
|
79
|
+
(0, import_echo.fullyQualifiedId)(script)
|
|
80
|
+
]
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
}, [
|
|
84
|
+
functionToScriptMap,
|
|
85
|
+
dispatch
|
|
86
|
+
]);
|
|
87
|
+
return /* @__PURE__ */ import_react.default.createElement("div", {
|
|
88
|
+
role: "none",
|
|
89
|
+
className: (0, import_react_ui_theme.mx)(import_react_ui_form.controlItemClasses)
|
|
90
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.Root, {
|
|
91
|
+
items: functions,
|
|
92
|
+
isItem: import_effect.Schema.is(import_functions.FunctionType),
|
|
93
|
+
getId: (func) => func.id
|
|
94
|
+
}, ({ items }) => /* @__PURE__ */ import_react.default.createElement("div", {
|
|
95
|
+
role: "list",
|
|
96
|
+
className: "flex flex-col w-full"
|
|
97
|
+
}, items?.map((func) => /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.Item, {
|
|
98
|
+
key: func.id,
|
|
99
|
+
item: func,
|
|
100
|
+
classNames: (0, import_react_ui_theme.mx)(grid, import_react_ui_theme.ghostHover, "items-center", "pli-2", "min-bs-[3rem]")
|
|
101
|
+
}, /* @__PURE__ */ import_react.default.createElement("div", {
|
|
102
|
+
className: "flex flex-col truncate"
|
|
103
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.ItemTitle, {
|
|
104
|
+
classNames: "truncate"
|
|
105
|
+
}, func.name), getScriptName(func) && /* @__PURE__ */ import_react.default.createElement("div", {
|
|
106
|
+
className: "text-xs text-description truncate"
|
|
107
|
+
}, getScriptName(func))), functionToScriptMap[func.id] && /* @__PURE__ */ import_react.default.createElement(import_react_ui.Button, {
|
|
108
|
+
onClick: () => handleGoToScript(func)
|
|
109
|
+
}, t("go to function source button label")))))), functions.length === 0 && /* @__PURE__ */ import_react.default.createElement("div", {
|
|
110
|
+
className: "text-center plb-4 text-gray-500"
|
|
111
|
+
}, t("no functions found")));
|
|
112
|
+
} finally {
|
|
113
|
+
_effect.f();
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
var FunctionsPanel_default = FunctionsPanel;
|
|
117
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
118
|
+
0 && (module.exports = {
|
|
119
|
+
FunctionsPanel,
|
|
120
|
+
FunctionsPanel_default
|
|
121
|
+
});
|
|
122
|
+
//# sourceMappingURL=chunk-WXQAVUBJ.cjs.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/FunctionsPanel/FunctionsPanel.tsx", "../../../src/components/FunctionsPanel/index.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';\nimport { FunctionType, ScriptType } from '@dxos/functions';\nimport { Filter, fullyQualifiedId, useQuery, type Space } from '@dxos/react-client/echo';\nimport { Button, useTranslation } from '@dxos/react-ui';\nimport { 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';\n\nconst grid = 'grid grid-cols-[1fr_auto] min-bs-[2.5rem]';\n\nexport type FunctionsPanelProps = {\n space: Space;\n};\n\nexport const FunctionsPanel = ({ space }: FunctionsPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const functions = useQuery(space, Filter.type(FunctionType));\n const scripts = useQuery(space, Filter.type(ScriptType));\n const { dispatchPromise: dispatch } = useIntentDispatcher();\n\n const functionToScriptMap = useMemo(\n () =>\n functions.reduce(\n (map, func) => {\n const scriptId = func.source?.target?.id;\n if (scriptId) {\n const script = scripts.find((s) => s.id === scriptId);\n if (script) {\n map[func.id] = script;\n }\n }\n return map;\n },\n {} as Record<string, ScriptType>,\n ),\n [functions, scripts],\n );\n\n const getScriptName = useCallback(\n (func: FunctionType) => {\n const script = functionToScriptMap[func.id];\n return script?.name;\n },\n [functionToScriptMap],\n );\n\n const handleGoToScript = useCallback(\n (func: FunctionType) => {\n const script = functionToScriptMap[func.id];\n if (script) {\n void dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [fullyQualifiedId(script)] }));\n }\n },\n [functionToScriptMap, dispatch],\n );\n\n return (\n <div role='none' className={mx(controlItemClasses)}>\n <List.Root<FunctionType> items={functions} isItem={Schema.is(FunctionType)} getId={(func) => func.id}>\n {({ items }) => (\n <div role='list' className='flex flex-col w-full'>\n {items?.map((func) => (\n <List.Item<FunctionType>\n key={func.id}\n item={func}\n classNames={mx(grid, ghostHover, 'items-center', 'pli-2', 'min-bs-[3rem]')}\n >\n <div className='flex flex-col truncate'>\n <List.ItemTitle classNames='truncate'>{func.name}</List.ItemTitle>\n {getScriptName(func) && (\n <div className='text-xs text-description truncate'>{getScriptName(func)}</div>\n )}\n </div>\n {functionToScriptMap[func.id] && (\n <Button onClick={() => handleGoToScript(func)}>{t('go to function source button label')}</Button>\n )}\n </List.Item>\n ))}\n </div>\n )}\n </List.Root>\n\n {functions.length === 0 && <div className='text-center plb-4 text-gray-500'>{t('no functions found')}</div>}\n </div>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FunctionsPanel } from './FunctionsPanel';\n\nexport * from './FunctionsPanel';\nexport default FunctionsPanel;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,oBAAuB;AACvB,mBAA4C;AAE5C,2BAAgE;AAChE,uBAAyC;AACzC,kBAA+D;AAC/D,sBAAuC;AACvC,2BAAmC;AACnC,2BAAqB;AACrB,4BAA+B;AAI/B,IAAMA,OAAO;AAMN,IAAMC,iBAAiB,CAAC,EAAEC,MAAK,MAAuB;;;AAC3D,UAAM,EAAEC,EAAC,QAAKC,gCAAeC,uCAAAA;AAC7B,UAAMC,gBAAYC,sBAASL,OAAOM,mBAAOC,KAAKC,6BAAAA,CAAAA;AAC9C,UAAMC,cAAUJ,sBAASL,OAAOM,mBAAOC,KAAKG,2BAAAA,CAAAA;AAC5C,UAAM,EAAEC,iBAAiBC,SAAQ,QAAKC,0CAAAA;AAEtC,UAAMC,0BAAsBC,sBAC1B,MACEX,UAAUY,OACR,CAACC,KAAKC,SAAAA;AACJ,YAAMC,WAAWD,KAAKE,QAAQC,QAAQC;AACtC,UAAIH,UAAU;AACZ,cAAMI,SAASd,QAAQe,KAAK,CAACC,MAAMA,EAAEH,OAAOH,QAAAA;AAC5C,YAAII,QAAQ;AACVN,cAAIC,KAAKI,EAAE,IAAIC;QACjB;MACF;AACA,aAAON;IACT,GACA,CAAC,CAAA,GAEL;MAACb;MAAWK;KAAQ;AAGtB,UAAMiB,oBAAgBC,0BACpB,CAACT,SAAAA;AACC,YAAMK,SAAST,oBAAoBI,KAAKI,EAAE;AAC1C,aAAOC,QAAQK;IACjB,GACA;MAACd;KAAoB;AAGvB,UAAMe,uBAAmBF,0BACvB,CAACT,SAAAA;AACC,YAAMK,SAAST,oBAAoBI,KAAKI,EAAE;AAC1C,UAAIC,QAAQ;AACV,aAAKX,aAASkB,mCAAaC,kCAAaC,MAAM;UAAEC,MAAM;UAAQC,SAAS;gBAACC,8BAAiBZ,MAAAA;;QAAS,CAAA,CAAA;MACpG;IACF,GACA;MAACT;MAAqBF;KAAS;AAGjC,WACE,6BAAAwB,QAAA,cAACC,OAAAA;MAAIC,MAAK;MAAOC,eAAWC,0BAAGC,uCAAAA;OAC7B,6BAAAL,QAAA,cAACM,0BAAKC,MAAI;MAAeC,OAAOxC;MAAWyC,QAAQC,qBAAOC,GAAGvC,6BAAAA;MAAewC,OAAO,CAAC9B,SAASA,KAAKI;OAC/F,CAAC,EAAEsB,MAAK,MACP,6BAAAR,QAAA,cAACC,OAAAA;MAAIC,MAAK;MAAOC,WAAU;OACxBK,OAAO3B,IAAI,CAACC,SACX,6BAAAkB,QAAA,cAACM,0BAAKO,MAAI;MACRC,KAAKhC,KAAKI;MACV6B,MAAMjC;MACNkC,gBAAYZ,0BAAG1C,MAAMuD,kCAAY,gBAAgB,SAAS,eAAA;OAE1D,6BAAAjB,QAAA,cAACC,OAAAA;MAAIE,WAAU;OACb,6BAAAH,QAAA,cAACM,0BAAKY,WAAS;MAACF,YAAW;OAAYlC,KAAKU,IAAI,GAC/CF,cAAcR,IAAAA,KACb,6BAAAkB,QAAA,cAACC,OAAAA;MAAIE,WAAU;OAAqCb,cAAcR,IAAAA,CAAAA,CAAAA,GAGrEJ,oBAAoBI,KAAKI,EAAE,KAC1B,6BAAAc,QAAA,cAACmB,wBAAAA;MAAOC,SAAS,MAAM3B,iBAAiBX,IAAAA;OAAQjB,EAAE,oCAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAQ7DG,UAAUqD,WAAW,KAAK,6BAAArB,QAAA,cAACC,OAAAA;MAAIE,WAAU;OAAmCtC,EAAE,oBAAA,CAAA,CAAA;;;;AAGrF;ACvFA,IAAA,yBAAeF;",
|
|
6
6
|
"names": ["grid", "FunctionsPanel", "space", "t", "useTranslation", "AUTOMATION_PLUGIN", "functions", "useQuery", "Filter", "type", "FunctionType", "scripts", "ScriptType", "dispatchPromise", "dispatch", "useIntentDispatcher", "functionToScriptMap", "useMemo", "reduce", "map", "func", "scriptId", "source", "target", "id", "script", "find", "s", "getScriptName", "useCallback", "name", "handleGoToScript", "createIntent", "LayoutAction", "Open", "part", "subject", "fullyQualifiedId", "React", "div", "role", "className", "mx", "controlItemClasses", "List", "Root", "items", "isItem", "Schema", "is", "getId", "Item", "key", "item", "classNames", "ghostHover", "ItemTitle", "Button", "onClick", "length"]
|
|
7
7
|
}
|
package/dist/lib/node/index.cjs
CHANGED
|
@@ -28,30 +28,30 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var node_exports = {};
|
|
30
30
|
__export(node_exports, {
|
|
31
|
-
AUTOMATION_PLUGIN: () =>
|
|
32
|
-
AutomationContainer: () =>
|
|
33
|
-
AutomationPanel: () =>
|
|
31
|
+
AUTOMATION_PLUGIN: () => import_chunk_3EF7MLFX.AUTOMATION_PLUGIN,
|
|
32
|
+
AutomationContainer: () => import_chunk_DOLMQUQ5.AutomationContainer,
|
|
33
|
+
AutomationPanel: () => import_chunk_DOLMQUQ5.AutomationPanel,
|
|
34
34
|
AutomationPlugin: () => AutomationPlugin,
|
|
35
|
-
FunctionsContainer: () =>
|
|
36
|
-
FunctionsPanel: () =>
|
|
37
|
-
TriggerEditor: () =>
|
|
38
|
-
meta: () =>
|
|
35
|
+
FunctionsContainer: () => import_chunk_DOLMQUQ5.FunctionsContainer,
|
|
36
|
+
FunctionsPanel: () => import_chunk_DOLMQUQ5.FunctionsPanel,
|
|
37
|
+
TriggerEditor: () => import_chunk_O42NQYQT.TriggerEditor,
|
|
38
|
+
meta: () => import_chunk_3EF7MLFX.meta
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(node_exports);
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
41
|
+
var import_chunk_DOLMQUQ5 = require("./chunk-DOLMQUQ5.cjs");
|
|
42
|
+
var import_chunk_O42NQYQT = require("./chunk-O42NQYQT.cjs");
|
|
43
|
+
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
44
44
|
var import_app_framework = require("@dxos/app-framework");
|
|
45
45
|
var import_functions = require("@dxos/functions");
|
|
46
46
|
var import_plugin_client = require("@dxos/plugin-client");
|
|
47
47
|
var import_app_framework2 = require("@dxos/app-framework");
|
|
48
|
-
var AppGraphBuilder = (0, import_app_framework2.lazy)(() => import("./app-graph-builder-
|
|
49
|
-
var IntentResolver = (0, import_app_framework2.lazy)(() => import("./intent-resolver-
|
|
50
|
-
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-
|
|
48
|
+
var AppGraphBuilder = (0, import_app_framework2.lazy)(() => import("./app-graph-builder-DUKR2BRB.cjs"));
|
|
49
|
+
var IntentResolver = (0, import_app_framework2.lazy)(() => import("./intent-resolver-JC4Q4TYU.cjs"));
|
|
50
|
+
var ReactSurface = (0, import_app_framework2.lazy)(() => import("./react-surface-HB3MYTCK.cjs"));
|
|
51
51
|
var translations_default = [
|
|
52
52
|
{
|
|
53
53
|
"en-US": {
|
|
54
|
-
[
|
|
54
|
+
[import_chunk_3EF7MLFX.AUTOMATION_PLUGIN]: {
|
|
55
55
|
"plugin name": "Automation",
|
|
56
56
|
"automation panel label": "Automations",
|
|
57
57
|
"script automation label": "Automation",
|
|
@@ -80,14 +80,14 @@ var translations_default = [
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
];
|
|
83
|
-
var AutomationPlugin = () => (0, import_app_framework.definePlugin)(
|
|
83
|
+
var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk_3EF7MLFX.meta, [
|
|
84
84
|
(0, import_app_framework.defineModule)({
|
|
85
|
-
id: `${
|
|
85
|
+
id: `${import_chunk_3EF7MLFX.meta.id}/module/translations`,
|
|
86
86
|
activatesOn: import_app_framework.Events.SetupTranslations,
|
|
87
87
|
activate: () => (0, import_app_framework.contributes)(import_app_framework.Capabilities.Translations, translations_default)
|
|
88
88
|
}),
|
|
89
89
|
(0, import_app_framework.defineModule)({
|
|
90
|
-
id: `${
|
|
90
|
+
id: `${import_chunk_3EF7MLFX.meta.id}/module/schema`,
|
|
91
91
|
activatesOn: import_plugin_client.ClientEvents.SetupSchema,
|
|
92
92
|
activate: () => (0, import_app_framework.contributes)(import_plugin_client.ClientCapabilities.Schema, [
|
|
93
93
|
import_functions.FunctionType,
|
|
@@ -95,17 +95,17 @@ var AutomationPlugin = () => (0, import_app_framework.definePlugin)(import_chunk
|
|
|
95
95
|
])
|
|
96
96
|
}),
|
|
97
97
|
(0, import_app_framework.defineModule)({
|
|
98
|
-
id: `${
|
|
98
|
+
id: `${import_chunk_3EF7MLFX.meta.id}/module/app-graph-builder`,
|
|
99
99
|
activatesOn: import_app_framework.Events.SetupAppGraph,
|
|
100
100
|
activate: AppGraphBuilder
|
|
101
101
|
}),
|
|
102
102
|
(0, import_app_framework.defineModule)({
|
|
103
|
-
id: `${
|
|
103
|
+
id: `${import_chunk_3EF7MLFX.meta.id}/module/intent-resolver`,
|
|
104
104
|
activatesOn: import_app_framework.Events.SetupIntentResolver,
|
|
105
105
|
activate: IntentResolver
|
|
106
106
|
}),
|
|
107
107
|
(0, import_app_framework.defineModule)({
|
|
108
|
-
id: `${
|
|
108
|
+
id: `${import_chunk_3EF7MLFX.meta.id}/module/react-surface`,
|
|
109
109
|
activatesOn: import_app_framework.Events.SetupReactSurface,
|
|
110
110
|
activate: ReactSurface
|
|
111
111
|
})
|
|
@@ -16,13 +16,13 @@ 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 intent_resolver_JC4Q4TYU_exports = {};
|
|
20
|
+
__export(intent_resolver_JC4Q4TYU_exports, {
|
|
21
21
|
default: () => intent_resolver_default
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(intent_resolver_JC4Q4TYU_exports);
|
|
24
|
+
var import_chunk_GIIVTK4O = require("./chunk-GIIVTK4O.cjs");
|
|
25
|
+
var import_chunk_3EF7MLFX = require("./chunk-3EF7MLFX.cjs");
|
|
26
26
|
var import_app_framework = require("@dxos/app-framework");
|
|
27
27
|
var import_echo = require("@dxos/echo");
|
|
28
28
|
var import_functions = require("@dxos/functions");
|
|
@@ -32,7 +32,7 @@ var import_types2 = require("@dxos/plugin-space/types");
|
|
|
32
32
|
var import_echo2 = require("@dxos/react-client/echo");
|
|
33
33
|
var intent_resolver_default = (context) => (0, import_app_framework.contributes)(import_app_framework.Capabilities.IntentResolver, [
|
|
34
34
|
(0, import_app_framework.createResolver)({
|
|
35
|
-
intent:
|
|
35
|
+
intent: import_chunk_GIIVTK4O.AutomationAction.CreateTriggerFromTemplate,
|
|
36
36
|
resolve: async ({ space, template, enabled = false, scriptName, input }) => {
|
|
37
37
|
const trigger = (0, import_live_object.live)(import_functions.FunctionTrigger, {
|
|
38
38
|
enabled,
|
|
@@ -90,4 +90,4 @@ var intent_resolver_default = (context) => (0, import_app_framework.contributes)
|
|
|
90
90
|
}
|
|
91
91
|
})
|
|
92
92
|
]);
|
|
93
|
-
//# sourceMappingURL=intent-resolver-
|
|
93
|
+
//# sourceMappingURL=intent-resolver-JC4Q4TYU.cjs.map
|