@oomol-lab/open-flow 0.1.0-beta.53 → 0.1.0-beta.54
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/workbench.js +20 -8
- package/package.json +1 -1
|
@@ -595,12 +595,13 @@ function FlowSkeleton() {
|
|
|
595
595
|
})]
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
function FlowBrowser({ catalogWidth, createFlowDisabled, createFlowField, flowBadges, hrefForFlow, onCreateFlow, onSelectFlow, store }) {
|
|
598
|
+
function FlowBrowser({ catalogWidth, createFlowDisabled, createFlowField, flowBadges, hrefForFlow, initializing = false, onCreateFlow, onSelectFlow, store }) {
|
|
599
599
|
const t = useTranslate();
|
|
600
600
|
const busy = useVal(store.workspace.$.busy);
|
|
601
601
|
const loadFailed = useVal(store.workspace.$.flowLoadFailed);
|
|
602
602
|
const loadMoreFailed = useVal(store.workspace.$.flowLoadMoreFailed);
|
|
603
|
-
const
|
|
603
|
+
const flowLoading = useVal(store.workspace.$.flowLoading);
|
|
604
|
+
const loading = initializing || flowLoading;
|
|
604
605
|
const loadingMore = useVal(store.workspace.$.flowLoadingMore);
|
|
605
606
|
const nextCursor = useVal(store.workspace.$.flowNextCursor);
|
|
606
607
|
const refreshing = useVal(store.workspace.$.flowRefreshing);
|
|
@@ -629,6 +630,7 @@ function FlowBrowser({ catalogWidth, createFlowDisabled, createFlowField, flowBa
|
|
|
629
630
|
children: t("resource.flows")
|
|
630
631
|
}),
|
|
631
632
|
/* @__PURE__ */ jsxs("section", {
|
|
633
|
+
"aria-busy": loading || refreshing,
|
|
632
634
|
"aria-labelledby": "flow-list-title",
|
|
633
635
|
className: "resource-list-section rounded-lg",
|
|
634
636
|
children: [
|
|
@@ -657,7 +659,7 @@ function FlowBrowser({ catalogWidth, createFlowDisabled, createFlowField, flowBa
|
|
|
657
659
|
})]
|
|
658
660
|
}), /* @__PURE__ */ jsxs(Button, {
|
|
659
661
|
className: "pr-3",
|
|
660
|
-
disabled: busy != null,
|
|
662
|
+
disabled: initializing || busy != null,
|
|
661
663
|
onClick: () => setCreating(true),
|
|
662
664
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
663
665
|
"data-icon": "inline-start",
|
|
@@ -5428,6 +5430,8 @@ var WorkspaceStore = class {
|
|
|
5428
5430
|
this.#flows.dispose();
|
|
5429
5431
|
}
|
|
5430
5432
|
async start(flowId) {
|
|
5433
|
+
const current = this.#draftSession.capture();
|
|
5434
|
+
let initialLoad;
|
|
5431
5435
|
this.#started = false;
|
|
5432
5436
|
if (this.#stopCatalogWatch == null) {
|
|
5433
5437
|
const subscription = this.#client.watchFlowCatalog((event) => {
|
|
@@ -5436,11 +5440,17 @@ var WorkspaceStore = class {
|
|
|
5436
5440
|
if (event?.kind == "flow.created" && this.#started && this.#model.value.flowId == null && this.#model.value.busy == null) this.flowCreated(event.flowId);
|
|
5437
5441
|
});
|
|
5438
5442
|
this.#stopCatalogWatch = subscription.stop;
|
|
5439
|
-
|
|
5443
|
+
subscription.ready.then(async () => {
|
|
5444
|
+
if (initialLoad == null || this.#disposed) return;
|
|
5445
|
+
await initialLoad;
|
|
5446
|
+
if (!this.#disposed) await this.reloadFlows();
|
|
5447
|
+
});
|
|
5448
|
+
await Promise.resolve();
|
|
5440
5449
|
}
|
|
5441
5450
|
if (this.#disposed) return;
|
|
5442
|
-
|
|
5443
|
-
|
|
5451
|
+
initialLoad = this.reloadFlows();
|
|
5452
|
+
await initialLoad;
|
|
5453
|
+
if (!this.#disposed && current()) await this.selectFlow(flowId);
|
|
5444
5454
|
this.#started = !this.#disposed;
|
|
5445
5455
|
}
|
|
5446
5456
|
async reloadFlows() {
|
|
@@ -7015,7 +7025,7 @@ function NotificationBridge({ host, store }) {
|
|
|
7015
7025
|
useEffect(() => () => notify(void 0), [notify]);
|
|
7016
7026
|
return null;
|
|
7017
7027
|
}
|
|
7018
|
-
function Workbench({ catalogWidth, createFlow, createFlowDisabled, createFlowField, flowBadges, connectionHref, hrefFor, language, navigation, onConfigureConnector, onManageConnectorAccess, onLanguageChange, store, theme }) {
|
|
7028
|
+
function Workbench({ catalogWidth, createFlow, createFlowDisabled, createFlowField, flowBadges, connectionHref, hrefFor, initializing, language, navigation, onConfigureConnector, onManageConnectorAccess, onLanguageChange, store, theme }) {
|
|
7019
7029
|
const flowId = useVal(store.workspace.$.flowId);
|
|
7020
7030
|
return /* @__PURE__ */ jsx("div", {
|
|
7021
7031
|
className: "app-shell",
|
|
@@ -7028,6 +7038,7 @@ function Workbench({ catalogWidth, createFlow, createFlowDisabled, createFlowFie
|
|
|
7028
7038
|
flowId: flow.flowId,
|
|
7029
7039
|
view: "design"
|
|
7030
7040
|
}),
|
|
7041
|
+
initializing,
|
|
7031
7042
|
language,
|
|
7032
7043
|
onCreateFlow: (name) => navigation.createFlow(name, createFlow),
|
|
7033
7044
|
onLanguageChange,
|
|
@@ -7107,7 +7118,7 @@ function Session({ catalogWidth, createFlow, createFlowDisabled, createFlowField
|
|
|
7107
7118
|
children: [/* @__PURE__ */ jsx(NotificationBridge, {
|
|
7108
7119
|
host,
|
|
7109
7120
|
store
|
|
7110
|
-
}), started ? /* @__PURE__ */ jsx(Workbench, {
|
|
7121
|
+
}), started || location.flowId == null ? /* @__PURE__ */ jsx(Workbench, {
|
|
7111
7122
|
catalogWidth,
|
|
7112
7123
|
createFlow,
|
|
7113
7124
|
createFlowDisabled,
|
|
@@ -7115,6 +7126,7 @@ function Session({ catalogWidth, createFlow, createFlowDisabled, createFlowField
|
|
|
7115
7126
|
flowBadges,
|
|
7116
7127
|
connectionHref,
|
|
7117
7128
|
hrefFor,
|
|
7129
|
+
initializing: !started,
|
|
7118
7130
|
language,
|
|
7119
7131
|
navigation,
|
|
7120
7132
|
onConfigureConnector,
|