@lobb-js/studio 0.3.0 → 0.3.2
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/components/Studio.svelte +1 -1
- package/dist/components/breadCrumbs.svelte +3 -2
- package/dist/components/detailView/create/createDetailView.svelte +1 -2
- package/dist/components/detailView/utils.js +3 -4
- package/dist/components/miniSidebar.svelte +4 -4
- package/dist/components/routes/collections/collections.svelte +1 -1
- package/dist/components/routes/data_model/dataModel.svelte +3 -3
- package/dist/components/routes/home.svelte +1 -1
- package/dist/components/routes/workflows/workflows.svelte +3 -3
- package/dist/components/workflowEditor.svelte +1 -1
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
const isSmall = $derived(!mediaQueries.sm.current);
|
|
8
8
|
const pathNames = $derived(
|
|
9
9
|
location.url.pathname
|
|
10
|
+
.replace("/studio", "")
|
|
10
11
|
.split("/")
|
|
11
12
|
.filter((el: any) => el !== "")
|
|
12
13
|
.slice(0, 3),
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
{:else}
|
|
27
28
|
<Breadcrumb.Link
|
|
28
29
|
class="cursor-pointer"
|
|
29
|
-
onclick={() => location.navigate(
|
|
30
|
+
onclick={() => location.navigate("/studio")}
|
|
30
31
|
>
|
|
31
32
|
Home
|
|
32
33
|
</Breadcrumb.Link>
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
<Breadcrumb.Link
|
|
46
47
|
class="cursor-pointer"
|
|
47
48
|
onclick={() =>
|
|
48
|
-
location.navigate(
|
|
49
|
+
location.navigate(`/studio/${currentFullPaths}`)}
|
|
49
50
|
>
|
|
50
51
|
{path}
|
|
51
52
|
</Breadcrumb.Link>
|
|
@@ -68,7 +68,7 @@ export function generateTransactionBody(collectionName, entry) {
|
|
|
68
68
|
function handleEntryRecursive(transactionBody, collectionName, entry, parentTransactionIndex) {
|
|
69
69
|
var _a;
|
|
70
70
|
var _b;
|
|
71
|
-
var parentCollectionName = parentTransactionIndex !== undefined ? transactionBody[parentTransactionIndex].collectionName : null;
|
|
71
|
+
var parentCollectionName = parentTransactionIndex !== undefined ? transactionBody[parentTransactionIndex].props.collectionName : null;
|
|
72
72
|
var foreignKeyFieldName = (_b = ctx.meta.relations.find(function (relation) { return relation.from.collection === collectionName && relation.to.collection === parentCollectionName; })) === null || _b === void 0 ? void 0 : _b.from.field;
|
|
73
73
|
var collectionFieldNames = Object.keys(ctx.meta.collections[collectionName].fields);
|
|
74
74
|
var payload = {};
|
|
@@ -87,9 +87,9 @@ export function generateTransactionBody(collectionName, entry) {
|
|
|
87
87
|
_a[foreignKeyFieldName] = payload[foreignKeyFieldName],
|
|
88
88
|
_a);
|
|
89
89
|
transactionBody.push({
|
|
90
|
-
collectionName: collectionName,
|
|
91
90
|
method: "updateMany",
|
|
92
91
|
props: {
|
|
92
|
+
collectionName: collectionName,
|
|
93
93
|
data: localPayload,
|
|
94
94
|
filter: { id: payload.id },
|
|
95
95
|
},
|
|
@@ -97,9 +97,8 @@ export function generateTransactionBody(collectionName, entry) {
|
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
99
|
transactionBody.push({
|
|
100
|
-
collectionName: collectionName,
|
|
101
100
|
method: "createOne",
|
|
102
|
-
props: { data: payload },
|
|
101
|
+
props: { collectionName: collectionName, data: payload },
|
|
103
102
|
});
|
|
104
103
|
}
|
|
105
104
|
var childrenRelations = ctx.meta.relations.filter(function (relation) { return relation.to.collection === collectionName; });
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
[
|
|
28
28
|
{
|
|
29
29
|
label: "Home",
|
|
30
|
-
href: "/",
|
|
30
|
+
href: "/studio",
|
|
31
31
|
icon: House,
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
label: "Collections",
|
|
35
|
-
href: "/collections",
|
|
35
|
+
href: "/studio/collections",
|
|
36
36
|
icon: Library,
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
label: "Data Model",
|
|
40
|
-
href: "/datamodel/graph",
|
|
40
|
+
href: "/studio/datamodel/graph",
|
|
41
41
|
icon: Layers,
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
label: "Workflows",
|
|
45
|
-
href: "/workflows",
|
|
45
|
+
href: "/studio/workflows",
|
|
46
46
|
icon: Workflow,
|
|
47
47
|
},
|
|
48
48
|
],
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import SyncManager from "./syncManager.svelte";
|
|
7
7
|
import SidebarTrigger from "../../sidebar/sidebarTrigger.svelte";
|
|
8
8
|
|
|
9
|
-
const currentPage = $derived(location.url.pathname.split("/")[2]);
|
|
9
|
+
const currentPage = $derived(location.url.pathname.replace("/studio", "").split("/")[2]);
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<Sidebar
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
data={[
|
|
16
16
|
{
|
|
17
17
|
name: "graph",
|
|
18
|
-
href: "/datamodel/graph",
|
|
18
|
+
href: "/studio/datamodel/graph",
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
name: "query_editor",
|
|
22
|
-
href: "/datamodel/query_editor",
|
|
22
|
+
href: "/studio/datamodel/query_editor",
|
|
23
23
|
},
|
|
24
24
|
]}
|
|
25
25
|
>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
name: workflow.name,
|
|
35
35
|
path: workflow.directory,
|
|
36
36
|
onclick: () => {
|
|
37
|
-
location.navigate(`/workflows/${workflow.name}`);
|
|
37
|
+
location.navigate(`/studio/workflows/${workflow.name}`);
|
|
38
38
|
},
|
|
39
39
|
meta: {
|
|
40
40
|
id: workflow.id,
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
await lobb.deleteOne("core_workflows", workflowId);
|
|
79
79
|
getSidebarData();
|
|
80
80
|
if (workflowEntry && workflowName === workflowEntry.name) {
|
|
81
|
-
location.navigate("/workflows");
|
|
81
|
+
location.navigate("/studio/workflows");
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
<Button
|
|
91
91
|
class="h-7 px-3 text-xs font-normal w-full"
|
|
92
92
|
variant="outline"
|
|
93
|
-
onclick={() => location.navigate("/workflows/new")}
|
|
93
|
+
onclick={() => location.navigate("/studio/workflows/new")}
|
|
94
94
|
Icon={Plus}
|
|
95
95
|
>
|
|
96
96
|
Create a Workflow
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
const reponse = await lobb.createOne("core_workflows", workflow);
|
|
95
95
|
const result = await reponse.json();
|
|
96
96
|
const workflowEntry = result.data;
|
|
97
|
-
location.navigate(`/workflows/${workflowEntry.name}`);
|
|
97
|
+
location.navigate(`/studio/workflows/${workflowEntry.name}`);
|
|
98
98
|
await refreshSidebar();
|
|
99
99
|
}
|
|
100
100
|
|