@robosystems/core 0.22.6 → 0.22.8
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/package.json
CHANGED
|
@@ -47,7 +47,7 @@ export declare function useGraphCreation(): {
|
|
|
47
47
|
schema_extensions?: string[];
|
|
48
48
|
/**
|
|
49
49
|
* Generic graphs only, and required for them: the node/relationship
|
|
50
|
-
* schema to apply, with at least one node
|
|
50
|
+
* schema to apply, with at least one node unless it extends `base`.
|
|
51
51
|
*/
|
|
52
52
|
custom_schema?: Record<string, unknown>;
|
|
53
53
|
create_entity?: boolean;
|
|
@@ -127,15 +127,17 @@ export function useOperationMonitoring() {
|
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
129
|
* The schema of a generic graph. A graph cannot be provisioned without a node
|
|
130
|
-
* table, so
|
|
130
|
+
* table, so the API's rule is applied before any request: a schema defines at
|
|
131
|
+
* least one node, or extends `base`, which brings the base tables with it.
|
|
131
132
|
*/
|
|
132
133
|
function genericSchema(graphData) {
|
|
133
|
-
|
|
134
|
-
const nodes =
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
const schema = graphData.custom_schema;
|
|
135
|
+
const nodes = schema === null || schema === void 0 ? void 0 : schema.nodes;
|
|
136
|
+
const hasNodes = Array.isArray(nodes) && nodes.length > 0;
|
|
137
|
+
if (!schema || (!hasNodes && schema.extends !== 'base')) {
|
|
138
|
+
throw new Error("A generic graph needs a schema that defines at least one node, or extends 'base'.");
|
|
137
139
|
}
|
|
138
|
-
return
|
|
140
|
+
return schema;
|
|
139
141
|
}
|
|
140
142
|
/**
|
|
141
143
|
* Hook for graph creation using the new unified endpoint
|
package/ui/Sidebar.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare const t: {
|
|
|
7
7
|
readonly on: "w-16";
|
|
8
8
|
readonly off: "w-64";
|
|
9
9
|
};
|
|
10
|
-
readonly inner: "h-full overflow-y-auto overflow-x-hidden rounded-sm px-3 py-4 bg-white dark:bg-zinc-950";
|
|
10
|
+
readonly inner: "h-full overflow-y-auto overflow-x-hidden rounded-sm px-3 py-4 bg-white dark:bg-zinc-950 [scrollbar-width:thin] [scrollbar-color:var(--color-zinc-300)_transparent] dark:[scrollbar-color:var(--color-zinc-700)_transparent]";
|
|
11
11
|
};
|
|
12
12
|
readonly collapse: {
|
|
13
13
|
readonly button: "group flex w-full items-center rounded-lg p-2 text-base font-normal text-gray-900 transition duration-75 hover:bg-zinc-100 dark:text-gray-200 dark:hover:bg-zinc-700/50";
|
package/ui/theme-defaults.d.ts
CHANGED
|
@@ -480,7 +480,7 @@ export declare const themeDefaults: {
|
|
|
480
480
|
readonly on: "w-16";
|
|
481
481
|
readonly off: "w-64";
|
|
482
482
|
};
|
|
483
|
-
readonly inner: "h-full overflow-y-auto overflow-x-hidden rounded-sm px-3 py-4 bg-white dark:bg-zinc-950";
|
|
483
|
+
readonly inner: "h-full overflow-y-auto overflow-x-hidden rounded-sm px-3 py-4 bg-white dark:bg-zinc-950 [scrollbar-width:thin] [scrollbar-color:var(--color-zinc-300)_transparent] dark:[scrollbar-color:var(--color-zinc-700)_transparent]";
|
|
484
484
|
};
|
|
485
485
|
readonly collapse: {
|
|
486
486
|
readonly button: "group flex w-full items-center rounded-lg p-2 text-base font-normal text-gray-900 transition duration-75 hover:bg-zinc-100 dark:text-gray-200 dark:hover:bg-zinc-700/50";
|
package/ui/theme-defaults.js
CHANGED
|
@@ -484,7 +484,7 @@ export const themeDefaults = {
|
|
|
484
484
|
on: 'w-16',
|
|
485
485
|
off: 'w-64',
|
|
486
486
|
},
|
|
487
|
-
inner: 'h-full overflow-y-auto overflow-x-hidden rounded-sm px-3 py-4 bg-white dark:bg-zinc-950',
|
|
487
|
+
inner: 'h-full overflow-y-auto overflow-x-hidden rounded-sm px-3 py-4 bg-white dark:bg-zinc-950 [scrollbar-width:thin] [scrollbar-color:var(--color-zinc-300)_transparent] dark:[scrollbar-color:var(--color-zinc-700)_transparent]',
|
|
488
488
|
},
|
|
489
489
|
collapse: {
|
|
490
490
|
button: 'group flex w-full items-center rounded-lg p-2 text-base font-normal text-gray-900 transition duration-75 hover:bg-zinc-100 dark:text-gray-200 dark:hover:bg-zinc-700/50',
|