@powerhousedao/workflow 6.2.3-dev.23 → 6.2.3-dev.24
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/browser/{ap-layout-DLTZBpE7.js → ap-layout-BpKqIHQt.js} +9 -3
- package/dist/browser/ap-layout-BpKqIHQt.js.map +1 -0
- package/dist/browser/assets/{entry-4ObkElbc.js → entry-CSJBrcX5.js} +10 -5
- package/dist/browser/assets/{projection-entry-4FDMlGcp.js → projection-entry-D67cdPsg.js} +4 -4
- package/dist/browser/{connection-form-B_3_LFlh.js → connection-form-B1SkwNgY.js} +2 -2
- package/dist/browser/connection-form-B1SkwNgY.js.map +1 -0
- package/dist/browser/{editor-DPQptW3F.js → editor-CCKpl-Gd.js} +4 -4
- package/dist/browser/editor-CCKpl-Gd.js.map +1 -0
- package/dist/browser/{editor-D2hD_zy5.js → editor-CIZRPdKM.js} +4 -4
- package/dist/browser/{editor-D2hD_zy5.js.map → editor-CIZRPdKM.js.map} +1 -1
- package/dist/browser/{editor-tgTc0MrV.js → editor-D0sdUxJa.js} +32 -20
- package/dist/browser/editor-D0sdUxJa.js.map +1 -0
- package/dist/browser/editors/connection-editor/module.js +1 -1
- package/dist/browser/editors/workflow-editor/module.js +1 -1
- package/dist/browser/editors/workflow-studio/module.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/{runtime-api-DQa04P3e.js → runtime-api-DKlnn45K.js} +2 -2
- package/dist/browser/{runtime-api-DQa04P3e.js.map → runtime-api-DKlnn45K.js.map} +1 -1
- package/dist/browser/{use-runtime-url-CSz0PsWV.js → use-runtime-url-By5q3sa_.js} +5 -12
- package/dist/browser/use-runtime-url-By5q3sa_.js.map +1 -0
- package/dist/node/{ap-layout-DDOX4Vxv.mjs → ap-layout-Dzhi9JFC.mjs} +9 -3
- package/dist/node/ap-layout-Dzhi9JFC.mjs.map +1 -0
- package/dist/node/{connection-form-CTNkgu_d.mjs → connection-form-DejaNF09.mjs} +2 -2
- package/dist/node/connection-form-DejaNF09.mjs.map +1 -0
- package/dist/node/{editor-sBw5dTYS.mjs → editor-DfFRZS9L.mjs} +4 -4
- package/dist/node/{editor-sBw5dTYS.mjs.map → editor-DfFRZS9L.mjs.map} +1 -1
- package/dist/node/{editor-gpF-ytd5.mjs → editor-NbAB78He.mjs} +4 -4
- package/dist/node/editor-NbAB78He.mjs.map +1 -0
- package/dist/node/{editor-iDEb5EeC.mjs → editor-sVzt1o51.mjs} +32 -20
- package/dist/node/editor-sVzt1o51.mjs.map +1 -0
- package/dist/node/editors/connection-editor/module.mjs +1 -1
- package/dist/node/editors/workflow-editor/module.mjs +1 -1
- package/dist/node/editors/workflow-studio/module.mjs +1 -1
- package/dist/node/index.mjs +1 -1
- package/dist/node/pieces/reactor/index.mjs +4 -0
- package/dist/node/pieces/reactor/index.mjs.map +1 -1
- package/dist/node/{runtime-api-JQ6lSS1Y.mjs → runtime-api-CtvvFHut.mjs} +2 -2
- package/dist/node/{runtime-api-JQ6lSS1Y.mjs.map → runtime-api-CtvvFHut.mjs.map} +1 -1
- package/dist/node/{use-runtime-url-BOooH4kU.mjs → use-runtime-url-BbFEkaZy.mjs} +5 -12
- package/dist/node/use-runtime-url-BbFEkaZy.mjs.map +1 -0
- package/dist/types/document-models/connection/v1/actions.d.ts +0 -4
- package/dist/types/document-models/connection/v1/actions.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/module.d.ts +0 -4
- package/dist/types/document-models/connection/v1/module.d.ts.map +1 -1
- package/dist/types/document-models/document-models.d.ts +0 -8
- package/dist/types/document-models/document-models.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/actions.d.ts +0 -4
- package/dist/types/document-models/workflow/v1/actions.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/module.d.ts +0 -4
- package/dist/types/document-models/workflow/v1/module.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/runtime-api.d.ts +4 -0
- package/dist/types/editors/workflow-editor/runtime-api.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/piece-source.d.ts +9 -0
- package/dist/types/editors/workflow-editor/ui/piece-source.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/ConnectionView.d.ts.map +1 -1
- package/package.json +9 -8
- package/dist/browser/ap-layout-DLTZBpE7.js.map +0 -1
- package/dist/browser/connection-form-B_3_LFlh.js.map +0 -1
- package/dist/browser/editor-DPQptW3F.js.map +0 -1
- package/dist/browser/editor-tgTc0MrV.js.map +0 -1
- package/dist/browser/use-runtime-url-CSz0PsWV.js.map +0 -1
- package/dist/node/ap-layout-DDOX4Vxv.mjs.map +0 -1
- package/dist/node/connection-form-CTNkgu_d.mjs.map +0 -1
- package/dist/node/editor-gpF-ytd5.mjs.map +0 -1
- package/dist/node/editor-iDEb5EeC.mjs.map +0 -1
- package/dist/node/use-runtime-url-BOooH4kU.mjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./chunk-BSw8zbkd.mjs";
|
|
2
|
-
import { C as connectorIdForPiece, D as planFromAuth, S as REACTOR_PIECE, _ as rotateSecret, a as fetchConnections, b as testTrigger, d as fetchWebhookEndpoint, h as loadBlockOptions, i as fetchBlockOutputTree, l as fetchRuns, m as invalidateConnections, p as getBlockForm, r as createSecret, s as fetchPieceCatalog, u as fetchSecretStat } from "./runtime-api-
|
|
2
|
+
import { C as connectorIdForPiece, D as planFromAuth, S as REACTOR_PIECE, _ as rotateSecret, a as fetchConnections, b as testTrigger, d as fetchWebhookEndpoint, h as loadBlockOptions, i as fetchBlockOutputTree, l as fetchRuns, m as invalidateConnections, p as getBlockForm, r as createSecret, s as fetchPieceCatalog, u as fetchSecretStat } from "./runtime-api-CtvvFHut.mjs";
|
|
3
3
|
import { y as actions } from "./module-IA-Ay7ig.mjs";
|
|
4
4
|
import { t as useConnectionDocumentById } from "./connection-DGsS2Db3.mjs";
|
|
5
5
|
import { y as actions$1 } from "./module-IRMgzJC1.mjs";
|
|
6
6
|
import { t as useSelectedWorkflowDocument } from "./workflow-fFvyypuu.mjs";
|
|
7
|
-
import { n as DocumentErrorBoundary, t as useSyncWorkflowRuntimeUrl } from "./use-runtime-url-
|
|
8
|
-
import { n as AutocompleteInput, r as connectionCallbacks, t as ConnectionForm } from "./connection-form-
|
|
9
|
-
import { a as reachableFrom, c as useBlockMeta, d as
|
|
7
|
+
import { n as DocumentErrorBoundary, t as useSyncWorkflowRuntimeUrl } from "./use-runtime-url-BbFEkaZy.mjs";
|
|
8
|
+
import { n as AutocompleteInput, r as connectionCallbacks, t as ConnectionForm } from "./connection-form-DejaNF09.mjs";
|
|
9
|
+
import { a as reachableFrom, c as useBlockMeta, d as getPieceSource, l as usePieceLogos, n as attachableSteps, o as blockMeta, r as layoutWorkflow, s as pieceLogo, t as acyclicTargets, u as blockUnavailable } from "./ap-layout-Dzhi9JFC.mjs";
|
|
10
10
|
import { generateId } from "document-model";
|
|
11
11
|
import { addDocument, useSelectedDocumentId, useSelectedDriveId } from "@powerhousedao/reactor-browser";
|
|
12
12
|
import * as React$11 from "react";
|
|
@@ -409,8 +409,10 @@ function PieceEntries(props) {
|
|
|
409
409
|
className: "px-3 py-2 text-xs text-slate-400",
|
|
410
410
|
children: "Loading…"
|
|
411
411
|
}) : entries.map((entry) => {
|
|
412
|
-
const
|
|
413
|
-
|
|
412
|
+
const unavailable = blockUnavailable({
|
|
413
|
+
...entry,
|
|
414
|
+
kind: props.mode === "triggers" ? "trigger" : "action"
|
|
415
|
+
});
|
|
414
416
|
return /* @__PURE__ */ jsx(Row, {
|
|
415
417
|
logo: /* @__PURE__ */ jsx(LogoFrame, {
|
|
416
418
|
src: props.piece.logoUrl,
|
|
@@ -418,8 +420,8 @@ function PieceEntries(props) {
|
|
|
418
420
|
size: ROW_LOGO
|
|
419
421
|
}),
|
|
420
422
|
label: entry.displayName,
|
|
421
|
-
description:
|
|
422
|
-
disabled:
|
|
423
|
+
description: unavailable ?? entry.description,
|
|
424
|
+
disabled: unavailable !== void 0,
|
|
423
425
|
onClick: () => props.onPick({
|
|
424
426
|
label: entry.displayName,
|
|
425
427
|
blockType: entry.blockType,
|
|
@@ -588,8 +590,7 @@ function BlockSelector(props) {
|
|
|
588
590
|
className: "px-3 py-1 text-xs text-red-500",
|
|
589
591
|
children: search.message
|
|
590
592
|
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [hits.map((hit) => {
|
|
591
|
-
const
|
|
592
|
-
const unsupported = hit.kind === "trigger" && !triggerStrategyRuns(strategy);
|
|
593
|
+
const unavailable = blockUnavailable(hit);
|
|
593
594
|
return /* @__PURE__ */ jsx(Row, {
|
|
594
595
|
logo: /* @__PURE__ */ jsx(LogoFrame, {
|
|
595
596
|
src: hit.logoUrl,
|
|
@@ -597,8 +598,8 @@ function BlockSelector(props) {
|
|
|
597
598
|
size: ROW_LOGO
|
|
598
599
|
}),
|
|
599
600
|
label: `${hit.displayName} · ${hit.pieceDisplayName}`,
|
|
600
|
-
description:
|
|
601
|
-
disabled:
|
|
601
|
+
description: unavailable ?? (hit.description || hit.pieceDisplayName),
|
|
602
|
+
disabled: unavailable !== void 0,
|
|
602
603
|
onClick: () => props.onPick({
|
|
603
604
|
label: hit.displayName,
|
|
604
605
|
blockType: hit.blockType,
|
|
@@ -633,7 +634,7 @@ function BlockSelector(props) {
|
|
|
633
634
|
size: ROW_LOGO
|
|
634
635
|
}),
|
|
635
636
|
label: entry.displayName,
|
|
636
|
-
description: mode === "triggers" ? `${entry.triggerCount} trigger${entry.triggerCount === 1 ? "" : "s"} · ${entry.description}` : `${entry.actionCount} action${entry.actionCount === 1 ? "" : "s"} · ${entry.description}
|
|
637
|
+
description: entry.unsupported ?? (mode === "triggers" ? `${entry.triggerCount} trigger${entry.triggerCount === 1 ? "" : "s"} · ${entry.description}` : `${entry.actionCount} action${entry.actionCount === 1 ? "" : "s"} · ${entry.description}`),
|
|
637
638
|
onClick: () => setPiece(entry)
|
|
638
639
|
}, entry.name))] }) : null,
|
|
639
640
|
corePresets.length + powerhousePresets.length === 0 && filteredPieces.length === 0 && filteredAttach.length === 0 && !searchActive ? /* @__PURE__ */ jsx("div", {
|
|
@@ -7780,17 +7781,22 @@ function useBlockForm(blockType, designTime) {
|
|
|
7780
7781
|
blockType,
|
|
7781
7782
|
form: result
|
|
7782
7783
|
});
|
|
7783
|
-
}, () => {
|
|
7784
|
-
if (alive)
|
|
7784
|
+
}, (error) => {
|
|
7785
|
+
if (!alive) return;
|
|
7786
|
+
setState({
|
|
7785
7787
|
blockType,
|
|
7786
|
-
form: null
|
|
7788
|
+
form: null,
|
|
7789
|
+
error: error instanceof Error ? error.message : String(error)
|
|
7787
7790
|
});
|
|
7788
7791
|
});
|
|
7789
7792
|
return () => {
|
|
7790
7793
|
alive = false;
|
|
7791
7794
|
};
|
|
7792
7795
|
}, [blockType, designTime]);
|
|
7793
|
-
return
|
|
7796
|
+
return {
|
|
7797
|
+
form: state.form,
|
|
7798
|
+
error: state.error
|
|
7799
|
+
};
|
|
7794
7800
|
}
|
|
7795
7801
|
function ConfigSection(props) {
|
|
7796
7802
|
const { form } = props;
|
|
@@ -7802,6 +7808,10 @@ function ConfigSection(props) {
|
|
|
7802
7808
|
className: "text-xs text-slate-400",
|
|
7803
7809
|
children: "Loading block properties…"
|
|
7804
7810
|
}) : null,
|
|
7811
|
+
props.formError ? /* @__PURE__ */ jsx("p", {
|
|
7812
|
+
className: "text-xs text-red-500",
|
|
7813
|
+
children: props.formError
|
|
7814
|
+
}) : null,
|
|
7805
7815
|
form && form !== "loading" && form.props.length > 0 ? /* @__PURE__ */ jsx(PropertyForm, {
|
|
7806
7816
|
props: form.props,
|
|
7807
7817
|
value: configRecord,
|
|
@@ -8185,7 +8195,7 @@ function AdvancedSection(props) {
|
|
|
8185
8195
|
}
|
|
8186
8196
|
function StepPanel(props) {
|
|
8187
8197
|
const { step, callbacks } = props;
|
|
8188
|
-
const form = useBlockForm(step.blockType, props.designTime);
|
|
8198
|
+
const { form, error: formError } = useBlockForm(step.blockType, props.designTime);
|
|
8189
8199
|
return /* @__PURE__ */ jsxs("div", {
|
|
8190
8200
|
className: "flex flex-col gap-3 p-4",
|
|
8191
8201
|
children: [
|
|
@@ -8234,6 +8244,7 @@ function StepPanel(props) {
|
|
|
8234
8244
|
/* @__PURE__ */ jsx(ConfigSection, {
|
|
8235
8245
|
blockType: step.blockType,
|
|
8236
8246
|
form,
|
|
8247
|
+
formError,
|
|
8237
8248
|
config: step.config,
|
|
8238
8249
|
onChange: (config) => callbacks.updateStep({
|
|
8239
8250
|
id: step.id,
|
|
@@ -8367,7 +8378,7 @@ function WebhookUrlSection(props) {
|
|
|
8367
8378
|
function TriggerPanel(props) {
|
|
8368
8379
|
const { trigger, callbacks } = props;
|
|
8369
8380
|
const isPieceTrigger = trigger.blockType.includes("#trigger:");
|
|
8370
|
-
const form = useBlockForm(trigger.blockType, props.designTime);
|
|
8381
|
+
const { form, error: formError } = useBlockForm(trigger.blockType, props.designTime);
|
|
8371
8382
|
const isWebhookTrigger = trigger.blockType === "core#webhook" || form !== "loading" && form?.triggerStrategy === "WEBHOOK";
|
|
8372
8383
|
const endpoint = useWebhookEndpoint(isWebhookTrigger ? props.designTime?.webhookEndpoint : void 0);
|
|
8373
8384
|
const missing = missingForBlock(form, trigger.config, trigger.connectionId);
|
|
@@ -8394,6 +8405,7 @@ function TriggerPanel(props) {
|
|
|
8394
8405
|
/* @__PURE__ */ jsx(ConfigSection, {
|
|
8395
8406
|
blockType: trigger.blockType,
|
|
8396
8407
|
form,
|
|
8408
|
+
formError,
|
|
8397
8409
|
config: trigger.config,
|
|
8398
8410
|
onChange: (config) => setTrigger({ config }),
|
|
8399
8411
|
designTime: props.designTime,
|
|
@@ -20348,4 +20360,4 @@ function Editor() {
|
|
|
20348
20360
|
//#endregion
|
|
20349
20361
|
export { Editor as default };
|
|
20350
20362
|
|
|
20351
|
-
//# sourceMappingURL=editor-
|
|
20363
|
+
//# sourceMappingURL=editor-sVzt1o51.mjs.map
|