@constructive-io/schema-builder 0.2.0 → 0.2.1
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/CHANGELOG.md +11 -0
- package/dist/card-widths-CmIxkRfh.cjs +28 -0
- package/dist/card-widths-CmIxkRfh.cjs.map +1 -0
- package/dist/card-widths-pI4Kw4Xz.js +22 -0
- package/dist/card-widths-pI4Kw4Xz.js.map +1 -0
- package/dist/core-WwCS0CKu.cjs +66 -0
- package/dist/core-WwCS0CKu.cjs.map +1 -0
- package/dist/core-kx6KjxE5.js +49 -0
- package/dist/core-kx6KjxE5.js.map +1 -0
- package/dist/core.cjs +14 -212
- package/dist/core.d.cts +3 -54
- package/dist/core.d.ts +3 -54
- package/dist/core.js +3 -200
- package/dist/create-table-card-BzNKfpXO.cjs +7726 -0
- package/dist/create-table-card-BzNKfpXO.cjs.map +1 -0
- package/dist/create-table-card-pZ0Aq6rr.js +7685 -0
- package/dist/create-table-card-pZ0Aq6rr.js.map +1 -0
- package/dist/delete-confirm-dialog-Ch4tWj6B.cjs +42 -0
- package/dist/delete-confirm-dialog-Ch4tWj6B.cjs.map +1 -0
- package/dist/delete-confirm-dialog-K0AWE643.js +37 -0
- package/dist/delete-confirm-dialog-K0AWE643.js.map +1 -0
- package/dist/empty-state-card-DMn8ADRq.cjs +62 -0
- package/dist/empty-state-card-DMn8ADRq.cjs.map +1 -0
- package/dist/empty-state-card-Dnn36JVH.js +57 -0
- package/dist/empty-state-card-Dnn36JVH.js.map +1 -0
- package/dist/fields.cjs +8 -7763
- package/dist/fields.d.cts +39 -39
- package/dist/fields.d.ts +39 -39
- package/dist/fields.js +2 -7735
- package/dist/generated-types-DZMUyNBH.d.cts +27 -0
- package/dist/generated-types-DZMUyNBH.d.ts +27 -0
- package/dist/index-9h0EROdb.d.cts +56 -0
- package/dist/index-CwQ9QpxA.d.ts +7 -0
- package/dist/index-DOWB1UBK.d.cts +56 -0
- package/dist/index-DOWB1UBK.d.ts +56 -0
- package/dist/index-Dgb_e3AP.d.cts +7 -0
- package/dist/index-p_NegPQ5.d.ts +56 -0
- package/dist/index.cjs +736 -13712
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -10
- package/dist/index.d.ts +4 -10
- package/dist/index.js +725 -13680
- package/dist/index.js.map +1 -1
- package/dist/indexes-view-CJ1WQKdp.js +736 -0
- package/dist/indexes-view-CJ1WQKdp.js.map +1 -0
- package/dist/indexes-view-peIv6QUZ.cjs +759 -0
- package/dist/indexes-view-peIv6QUZ.cjs.map +1 -0
- package/dist/indexes.cjs +6 -1041
- package/dist/indexes.d.cts +27 -27
- package/dist/indexes.d.ts +27 -27
- package/dist/indexes.js +2 -1016
- package/dist/invalidate-database-entities-9DsT5NlP.cjs +2862 -0
- package/dist/invalidate-database-entities-9DsT5NlP.cjs.map +1 -0
- package/dist/invalidate-database-entities-CmmOT3S0.js +2559 -0
- package/dist/invalidate-database-entities-CmmOT3S0.js.map +1 -0
- package/dist/keyboard-activation-BQiV0scm.js +13 -0
- package/dist/keyboard-activation-BQiV0scm.js.map +1 -0
- package/dist/keyboard-activation-D-L0IU6Y.cjs +19 -0
- package/dist/keyboard-activation-D-L0IU6Y.cjs.map +1 -0
- package/dist/policies-view-BRbpbyB6.js +1018 -0
- package/dist/policies-view-BRbpbyB6.js.map +1 -0
- package/dist/policies-view-H1HTjpmv.cjs +1023 -0
- package/dist/policies-view-H1HTjpmv.cjs.map +1 -0
- package/dist/policies.cjs +10 -5939
- package/dist/policies.d.cts +55 -50
- package/dist/policies.d.ts +55 -50
- package/dist/policies.js +4 -5911
- package/dist/policy-config-form-BwyK7DGV.js +2502 -0
- package/dist/policy-config-form-BwyK7DGV.js.map +1 -0
- package/dist/policy-config-form-CefFo6Fw.cjs +2629 -0
- package/dist/policy-config-form-CefFo6Fw.cjs.map +1 -0
- package/dist/policy-types-D_sYWb-b.d.cts +81 -0
- package/dist/policy-types-D_sYWb-b.d.ts +81 -0
- package/dist/query-BmN_qO0W.js +171 -0
- package/dist/query-BmN_qO0W.js.map +1 -0
- package/dist/query-DU-KZleN.cjs +212 -0
- package/dist/query-DU-KZleN.cjs.map +1 -0
- package/dist/relationships-view-B5TAcPHU.cjs +2452 -0
- package/dist/relationships-view-B5TAcPHU.cjs.map +1 -0
- package/dist/relationships-view-DbwFh5r-.js +2417 -0
- package/dist/relationships-view-DbwFh5r-.js.map +1 -0
- package/dist/relationships.cjs +9 -4328
- package/dist/relationships.d.cts +93 -92
- package/dist/relationships.d.ts +93 -92
- package/dist/relationships.js +2 -4300
- package/dist/rolldown-runtime-D_qnwXdH.cjs +35 -0
- package/dist/schema-builder-sidebar-Ctu621Vw.cjs +604 -0
- package/dist/schema-builder-sidebar-Ctu621Vw.cjs.map +1 -0
- package/dist/schema-builder-sidebar-VR-Ctidc.js +593 -0
- package/dist/schema-builder-sidebar-VR-Ctidc.js.map +1 -0
- package/dist/table-editor-C-hHz3DJ.cjs +1935 -0
- package/dist/table-editor-C-hHz3DJ.cjs.map +1 -0
- package/dist/table-editor-IVp3B4nG.js +1906 -0
- package/dist/table-editor-IVp3B4nG.js.map +1 -0
- package/dist/tables.cjs +6 -5643
- package/dist/tables.d.cts +22 -21
- package/dist/tables.d.ts +22 -21
- package/dist/tables.js +3 -5618
- package/dist/testing.cjs +63 -62
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +62 -61
- package/dist/testing.js.map +1 -1
- package/dist/types-GUrH1Qny.d.cts +200 -0
- package/dist/types-GUrH1Qny.d.ts +200 -0
- package/dist/use-update-table-C7v3gRyG.cjs +291 -0
- package/dist/use-update-table-C7v3gRyG.cjs.map +1 -0
- package/dist/use-update-table-Dz6knGoH.js +244 -0
- package/dist/use-update-table-Dz6knGoH.js.map +1 -0
- package/package.json +6 -6
- package/dist/core.cjs.map +0 -1
- package/dist/core.js.map +0 -1
- package/dist/fields.cjs.map +0 -1
- package/dist/fields.js.map +0 -1
- package/dist/generated-types-CnAlqHU_.d.cts +0 -25
- package/dist/generated-types-CnAlqHU_.d.ts +0 -25
- package/dist/indexes.cjs.map +0 -1
- package/dist/indexes.js.map +0 -1
- package/dist/policies.cjs.map +0 -1
- package/dist/policies.js.map +0 -1
- package/dist/policy-types-CEYAR5TN.d.cts +0 -79
- package/dist/policy-types-CEYAR5TN.d.ts +0 -79
- package/dist/relationships.cjs.map +0 -1
- package/dist/relationships.js.map +0 -1
- package/dist/tables.cjs.map +0 -1
- package/dist/tables.js.map +0 -1
- package/dist/types-Du86atZ8.d.cts +0 -199
- package/dist/types-Du86atZ8.d.ts +0 -199
- package/dist/types-bX2dCrdl.d.cts +0 -52
- package/dist/types-bX2dCrdl.d.ts +0 -52
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
|
|
30
|
+
Object.defineProperty(exports, '__toESM', {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return __toESM;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
const require_invalidate_database_entities = require('./invalidate-database-entities-9DsT5NlP.cjs');
|
|
3
|
+
const require_use_update_table = require('./use-update-table-C7v3gRyG.cjs');
|
|
4
|
+
const require_card_widths = require('./card-widths-CmIxkRfh.cjs');
|
|
5
|
+
const require_keyboard_activation = require('./keyboard-activation-D-L0IU6Y.cjs');
|
|
6
|
+
const require_create_table_card = require('./create-table-card-BzNKfpXO.cjs');
|
|
7
|
+
let _constructive_io_ui_stack = require("@constructive-io/ui/stack");
|
|
8
|
+
let motion_react = require("motion/react");
|
|
9
|
+
let react = require("react");
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
let _constructive_io_ui_tooltip = require("@constructive-io/ui/tooltip");
|
|
12
|
+
let _remixicon_react = require("@remixicon/react");
|
|
13
|
+
let lucide_react = require("lucide-react");
|
|
14
|
+
let _tanstack_react_query = require("@tanstack/react-query");
|
|
15
|
+
let _constructive_io_ui_button = require("@constructive-io/ui/button");
|
|
16
|
+
let _constructive_io_ui_toast = require("@constructive-io/ui/toast");
|
|
17
|
+
let _constructive_io_ui_alert_dialog = require("@constructive-io/ui/alert-dialog");
|
|
18
|
+
let _constructive_io_ui_collapsible = require("@constructive-io/ui/collapsible");
|
|
19
|
+
let _constructive_io_ui_dropdown_menu = require("@constructive-io/ui/dropdown-menu");
|
|
20
|
+
let _constructive_io_ui_progressive_blur = require("@constructive-io/ui/progressive-blur");
|
|
21
|
+
|
|
22
|
+
//#region src/schema/schema-builder-tables/lib/gql/hooks/schema-builder/use-delete-table.ts
|
|
23
|
+
/**
|
|
24
|
+
* Hook for deleting a table
|
|
25
|
+
* Tier 4 wrapper: adds table selection handling after deletion
|
|
26
|
+
*/
|
|
27
|
+
function useDeleteTable() {
|
|
28
|
+
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
29
|
+
const { currentSchema, selectedTableId, selectTable, selectedSchemaKey, currentDatabase } = require_invalidate_database_entities.useSchemaBuilderSelectors();
|
|
30
|
+
const deleteTableMutation = require_invalidate_database_entities.useDeleteTableMutation({ selection: { fields: { id: true } } });
|
|
31
|
+
return (0, _tanstack_react_query.useMutation)({
|
|
32
|
+
mutationFn: async (input) => {
|
|
33
|
+
await deleteTableMutation.mutateAsync({ id: input.id });
|
|
34
|
+
return input.id;
|
|
35
|
+
},
|
|
36
|
+
onSuccess: async (deletedId, variables) => {
|
|
37
|
+
await require_invalidate_database_entities.invalidateDatabaseEntities(queryClient, currentDatabase?.databaseId);
|
|
38
|
+
const isSelectedTable = selectedTableId === deletedId;
|
|
39
|
+
let newSelectedTable = null;
|
|
40
|
+
if (isSelectedTable && selectedSchemaKey) {
|
|
41
|
+
const currentTables = currentSchema?.tables || [];
|
|
42
|
+
if (currentTables.length > 1) {
|
|
43
|
+
const deletedTableIndex = currentTables.findIndex((table) => table.id === deletedId);
|
|
44
|
+
const remainingTables = currentTables.filter((table) => table.id !== deletedId);
|
|
45
|
+
if (deletedTableIndex < remainingTables.length) newSelectedTable = remainingTables[deletedTableIndex];
|
|
46
|
+
else newSelectedTable = remainingTables[remainingTables.length - 1];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (newSelectedTable) selectTable(newSelectedTable.id, newSelectedTable.name);
|
|
50
|
+
else if (isSelectedTable) selectTable(null);
|
|
51
|
+
},
|
|
52
|
+
onError: (error) => {
|
|
53
|
+
console.error("Failed to delete table:", error);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/schema/schema-builder-tables/components/tables/delete-table-dialog.tsx
|
|
60
|
+
function DeleteTableDialog({ isOpen, onOpenChange, tableId, tableName, onTableDeleted }) {
|
|
61
|
+
const deleteTableMutation = useDeleteTable();
|
|
62
|
+
const handleConfirmDelete = async () => {
|
|
63
|
+
if (!tableId || !tableName) return;
|
|
64
|
+
try {
|
|
65
|
+
await deleteTableMutation.mutateAsync({ id: tableId });
|
|
66
|
+
onOpenChange(false);
|
|
67
|
+
(0, _constructive_io_ui_toast.showSuccessToast)({
|
|
68
|
+
message: "Table deleted successfully!",
|
|
69
|
+
description: `Table "${tableName}" has been removed.`
|
|
70
|
+
});
|
|
71
|
+
if (onTableDeleted) onTableDeleted(tableId);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error("Failed to delete table:", error);
|
|
74
|
+
(0, _constructive_io_ui_toast.showErrorToast)({
|
|
75
|
+
message: "Failed to delete table",
|
|
76
|
+
description: error instanceof Error ? error.message : "An unexpected error occurred."
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const handleCancel = () => {
|
|
81
|
+
onOpenChange(false);
|
|
82
|
+
};
|
|
83
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_alert_dialog.AlertDialog, {
|
|
84
|
+
open: isOpen,
|
|
85
|
+
onOpenChange,
|
|
86
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_alert_dialog.AlertDialogContent, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_alert_dialog.AlertDialogHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_alert_dialog.AlertDialogTitle, { children: "Delete Table" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_alert_dialog.AlertDialogDescription, { children: [
|
|
87
|
+
"Are you sure you want to delete table ",
|
|
88
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", { children: [
|
|
89
|
+
"\"",
|
|
90
|
+
tableName,
|
|
91
|
+
"\""
|
|
92
|
+
] }),
|
|
93
|
+
"? This action cannot be undone and will permanently remove the table and all its data."
|
|
94
|
+
] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_alert_dialog.AlertDialogFooter, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_alert_dialog.AlertDialogCancel, {
|
|
95
|
+
onClick: handleCancel,
|
|
96
|
+
disabled: deleteTableMutation.isPending,
|
|
97
|
+
children: "Cancel"
|
|
98
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_button.Button, {
|
|
99
|
+
variant: "destructive",
|
|
100
|
+
onClick: handleConfirmDelete,
|
|
101
|
+
disabled: deleteTableMutation.isPending || !tableId,
|
|
102
|
+
children: [deleteTableMutation.isPending && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Loader2Icon, { className: "mr-2 h-4 w-4 animate-spin" }), deleteTableMutation.isPending ? "Deleting..." : "Delete Table"]
|
|
103
|
+
})] })] })
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/schema/schema-builder-tables/components/schemas/schema-builder-sidebar.tsx
|
|
109
|
+
const TABLE_ITEM_HEIGHT = 32;
|
|
110
|
+
const SECTION_HEADER_HEIGHT = 32;
|
|
111
|
+
const EMPTY_STATE_HEIGHT = 100;
|
|
112
|
+
const TABLE_NAME_ELLIPSIS = "...";
|
|
113
|
+
const SCROLL_AFFORDANCE_THRESHOLD_PX = 8;
|
|
114
|
+
function truncateMiddleToWidth(text, maxWidth, measure) {
|
|
115
|
+
if (!text) return "";
|
|
116
|
+
if (maxWidth <= 0) return text;
|
|
117
|
+
if (measure(text) <= maxWidth) return text;
|
|
118
|
+
if (measure(TABLE_NAME_ELLIPSIS) >= maxWidth) return TABLE_NAME_ELLIPSIS;
|
|
119
|
+
let low = 2;
|
|
120
|
+
let high = text.length;
|
|
121
|
+
let best = 0;
|
|
122
|
+
while (low <= high) {
|
|
123
|
+
const keptChars = Math.floor((low + high) / 2);
|
|
124
|
+
const leftChars = Math.ceil(keptChars / 2);
|
|
125
|
+
const rightChars = Math.floor(keptChars / 2);
|
|
126
|
+
if (measure(`${text.slice(0, leftChars)}${TABLE_NAME_ELLIPSIS}${text.slice(text.length - rightChars)}`) <= maxWidth) {
|
|
127
|
+
best = keptChars;
|
|
128
|
+
low = keptChars + 1;
|
|
129
|
+
} else high = keptChars - 1;
|
|
130
|
+
}
|
|
131
|
+
if (best > 0) {
|
|
132
|
+
const leftChars = Math.ceil(best / 2);
|
|
133
|
+
const rightChars = Math.floor(best / 2);
|
|
134
|
+
return `${text.slice(0, leftChars)}${TABLE_NAME_ELLIPSIS}${text.slice(text.length - rightChars)}`;
|
|
135
|
+
}
|
|
136
|
+
const oneSideCandidate = `${text.slice(0, 1)}${TABLE_NAME_ELLIPSIS}`;
|
|
137
|
+
return measure(oneSideCandidate) <= maxWidth ? oneSideCandidate : TABLE_NAME_ELLIPSIS;
|
|
138
|
+
}
|
|
139
|
+
function getTableNameDisplayState(name, maxWidth, measure) {
|
|
140
|
+
const displayName = truncateMiddleToWidth(name, maxWidth, measure);
|
|
141
|
+
return {
|
|
142
|
+
displayName,
|
|
143
|
+
isOverflowing: displayName !== name
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
function getScrollAffordanceState({ scrollTop, scrollHeight, clientHeight, threshold = SCROLL_AFFORDANCE_THRESHOLD_PX }) {
|
|
147
|
+
if (!(scrollHeight - clientHeight > threshold)) return {
|
|
148
|
+
hasOverflow: false,
|
|
149
|
+
showTopBlur: false,
|
|
150
|
+
showBottomBlur: false
|
|
151
|
+
};
|
|
152
|
+
return {
|
|
153
|
+
hasOverflow: true,
|
|
154
|
+
showTopBlur: scrollTop > threshold,
|
|
155
|
+
showBottomBlur: scrollTop + clientHeight < scrollHeight - threshold
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function SchemaBuilderSidebar({ onTableSelect, showSystemTables = false }) {
|
|
159
|
+
const containerRef = (0, react.useRef)(null);
|
|
160
|
+
const [containerHeight, setContainerHeight] = (0, react.useState)(0);
|
|
161
|
+
const stack = (0, _constructive_io_ui_stack.useCardStack)();
|
|
162
|
+
const [deleteDialog, setDeleteDialog] = (0, react.useState)({
|
|
163
|
+
isOpen: false,
|
|
164
|
+
tableId: null,
|
|
165
|
+
tableName: null
|
|
166
|
+
});
|
|
167
|
+
const { currentSchema, selectedTableId, selectTable } = require_invalidate_database_entities.useSchemaBuilderSelectors();
|
|
168
|
+
const sidebarSections = require_use_update_table.useSidebarSections();
|
|
169
|
+
const { toggleSidebarSection } = require_use_update_table.useSidebarSectionActions();
|
|
170
|
+
const tables = (0, react.useMemo)(() => currentSchema?.tables || [], [currentSchema?.tables]);
|
|
171
|
+
const hasCategoryData = (0, react.useMemo)(() => {
|
|
172
|
+
return tables.some((table) => table.category !== void 0);
|
|
173
|
+
}, [tables]);
|
|
174
|
+
const { appTables, systemTables } = (0, react.useMemo)(() => {
|
|
175
|
+
const app = [];
|
|
176
|
+
const system = [];
|
|
177
|
+
tables.forEach((table) => {
|
|
178
|
+
if (table.category === "APP") app.push(table);
|
|
179
|
+
else system.push(table);
|
|
180
|
+
});
|
|
181
|
+
return {
|
|
182
|
+
appTables: app,
|
|
183
|
+
systemTables: system
|
|
184
|
+
};
|
|
185
|
+
}, [tables]);
|
|
186
|
+
(0, react.useEffect)(() => {
|
|
187
|
+
const container = containerRef.current;
|
|
188
|
+
if (!container) return;
|
|
189
|
+
const updateHeight = () => {
|
|
190
|
+
setContainerHeight(container.clientHeight);
|
|
191
|
+
};
|
|
192
|
+
updateHeight();
|
|
193
|
+
const resizeObserver = new ResizeObserver(updateHeight);
|
|
194
|
+
resizeObserver.observe(container);
|
|
195
|
+
return () => resizeObserver.disconnect();
|
|
196
|
+
}, []);
|
|
197
|
+
const showSystemSection = systemTables.length > 0 && hasCategoryData && showSystemTables;
|
|
198
|
+
const { topMaxHeight, bottomMaxHeight } = (0, react.useMemo)(() => {
|
|
199
|
+
if (containerHeight === 0) return {
|
|
200
|
+
topMaxHeight: void 0,
|
|
201
|
+
bottomMaxHeight: void 0
|
|
202
|
+
};
|
|
203
|
+
const availableHeight = containerHeight - (SECTION_HEADER_HEIGHT + (showSystemSection ? 40 : 0));
|
|
204
|
+
const halfAvailable = availableHeight / 2;
|
|
205
|
+
const topContentHeight = appTables.length > 0 ? appTables.length * TABLE_ITEM_HEIGHT : EMPTY_STATE_HEIGHT;
|
|
206
|
+
const bottomContentHeight = showSystemSection ? systemTables.length > 0 ? systemTables.length * TABLE_ITEM_HEIGHT : EMPTY_STATE_HEIGHT : 0;
|
|
207
|
+
let topMax;
|
|
208
|
+
let bottomMax;
|
|
209
|
+
if (!showSystemSection) {
|
|
210
|
+
topMax = availableHeight;
|
|
211
|
+
bottomMax = 0;
|
|
212
|
+
} else if (!sidebarSections.system) {
|
|
213
|
+
topMax = availableHeight;
|
|
214
|
+
bottomMax = 0;
|
|
215
|
+
} else if (!sidebarSections.app) {
|
|
216
|
+
topMax = 0;
|
|
217
|
+
bottomMax = availableHeight;
|
|
218
|
+
} else if (topContentHeight <= halfAvailable && bottomContentHeight <= halfAvailable) {
|
|
219
|
+
topMax = topContentHeight;
|
|
220
|
+
bottomMax = bottomContentHeight;
|
|
221
|
+
} else if (topContentHeight <= halfAvailable) {
|
|
222
|
+
topMax = topContentHeight;
|
|
223
|
+
bottomMax = availableHeight - topContentHeight;
|
|
224
|
+
} else {
|
|
225
|
+
topMax = halfAvailable;
|
|
226
|
+
bottomMax = halfAvailable;
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
topMaxHeight: Math.max(topMax, 0),
|
|
230
|
+
bottomMaxHeight: Math.max(bottomMax, 0)
|
|
231
|
+
};
|
|
232
|
+
}, [
|
|
233
|
+
containerHeight,
|
|
234
|
+
appTables.length,
|
|
235
|
+
systemTables.length,
|
|
236
|
+
showSystemSection,
|
|
237
|
+
sidebarSections.app,
|
|
238
|
+
sidebarSections.system
|
|
239
|
+
]);
|
|
240
|
+
const handleTableSelect = (tableId) => {
|
|
241
|
+
const table = tables.find((t) => t.id === tableId);
|
|
242
|
+
if (table) selectTable(table.id, table.name);
|
|
243
|
+
onTableSelect?.(tableId);
|
|
244
|
+
};
|
|
245
|
+
const handleCreateTable = () => {
|
|
246
|
+
stack.push({
|
|
247
|
+
id: "create-table-select-model",
|
|
248
|
+
title: "Create Table",
|
|
249
|
+
description: "Securely create a new table based on its access model",
|
|
250
|
+
Component: require_create_table_card.CreateTableCard,
|
|
251
|
+
props: { onTableCreated: (table) => {
|
|
252
|
+
handleTableSelect(table.id);
|
|
253
|
+
} },
|
|
254
|
+
width: require_card_widths.CARD_WIDTHS.extraWide
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
const handleDeleteTable = (tableId, tableName) => {
|
|
258
|
+
setDeleteDialog({
|
|
259
|
+
isOpen: true,
|
|
260
|
+
tableId,
|
|
261
|
+
tableName
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
const handleTableDeleted = (_tableId) => {
|
|
265
|
+
setDeleteDialog({
|
|
266
|
+
isOpen: false,
|
|
267
|
+
tableId: null,
|
|
268
|
+
tableName: null
|
|
269
|
+
});
|
|
270
|
+
};
|
|
271
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_tooltip.TooltipProvider, {
|
|
272
|
+
delayDuration: 150,
|
|
273
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
274
|
+
"data-chat-component": "schema-builder-sidebar",
|
|
275
|
+
"data-chat-table-count": String(tables.length),
|
|
276
|
+
className: require_invalidate_database_entities.cn("border-sidebar-border flex h-full w-64 flex-col overflow-hidden border-r bg-transparent", "px-2 pt-2 2xl:w-72"),
|
|
277
|
+
children: [
|
|
278
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
|
|
279
|
+
className: "sr-only",
|
|
280
|
+
children: "Schema Builder"
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
283
|
+
className: "shrink-0 p-1",
|
|
284
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_button.Button, {
|
|
285
|
+
variant: "outline",
|
|
286
|
+
size: "sm",
|
|
287
|
+
className: "w-full",
|
|
288
|
+
onClick: handleCreateTable,
|
|
289
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: "h-4 w-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
290
|
+
className: "text-xs font-medium",
|
|
291
|
+
children: "Create Table"
|
|
292
|
+
})]
|
|
293
|
+
})
|
|
294
|
+
}),
|
|
295
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
296
|
+
ref: containerRef,
|
|
297
|
+
className: "mt-4 flex min-h-0 flex-1 flex-col gap-2 overflow-hidden",
|
|
298
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableListByCategory, {
|
|
299
|
+
title: "Your Tables",
|
|
300
|
+
tables: appTables,
|
|
301
|
+
selectedTableId,
|
|
302
|
+
isExpanded: sidebarSections.app,
|
|
303
|
+
onToggleExpand: () => toggleSidebarSection("app"),
|
|
304
|
+
onTableSelect: handleTableSelect,
|
|
305
|
+
onTableDelete: handleDeleteTable,
|
|
306
|
+
emptyMessage: "No tables yet",
|
|
307
|
+
maxContentHeight: topMaxHeight
|
|
308
|
+
}), showSystemSection && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableListByCategory, {
|
|
309
|
+
title: "System Tables",
|
|
310
|
+
tables: systemTables,
|
|
311
|
+
selectedTableId,
|
|
312
|
+
isExpanded: sidebarSections.system,
|
|
313
|
+
onToggleExpand: () => toggleSidebarSection("system"),
|
|
314
|
+
onTableSelect: handleTableSelect,
|
|
315
|
+
onTableDelete: handleDeleteTable,
|
|
316
|
+
emptyMessage: "No system tables",
|
|
317
|
+
maxContentHeight: bottomMaxHeight
|
|
318
|
+
})]
|
|
319
|
+
}),
|
|
320
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DeleteTableDialog, {
|
|
321
|
+
isOpen: deleteDialog.isOpen,
|
|
322
|
+
onOpenChange: (open) => !open && setDeleteDialog({
|
|
323
|
+
isOpen: false,
|
|
324
|
+
tableId: null,
|
|
325
|
+
tableName: null
|
|
326
|
+
}),
|
|
327
|
+
tableId: deleteDialog.tableId,
|
|
328
|
+
tableName: deleteDialog.tableName,
|
|
329
|
+
onTableDeleted: handleTableDeleted
|
|
330
|
+
})
|
|
331
|
+
]
|
|
332
|
+
})
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
function TableListByCategory({ title, tables, selectedTableId, isExpanded, onToggleExpand, onTableSelect, onTableDelete, emptyMessage = "No tables", maxContentHeight }) {
|
|
336
|
+
const hasSelectedItem = selectedTableId ? tables.some((t) => t.id === selectedTableId) : false;
|
|
337
|
+
const scrollViewportRef = (0, react.useRef)(null);
|
|
338
|
+
const [affordanceState, setAffordanceState] = (0, react.useState)({
|
|
339
|
+
hasOverflow: false,
|
|
340
|
+
showTopBlur: false,
|
|
341
|
+
showBottomBlur: false
|
|
342
|
+
});
|
|
343
|
+
const scrollViewportStyle = maxContentHeight !== void 0 ? { maxHeight: `${maxContentHeight}px` } : void 0;
|
|
344
|
+
const recomputeAffordanceState = (0, react.useCallback)(() => {
|
|
345
|
+
const viewport = scrollViewportRef.current;
|
|
346
|
+
if (!viewport) return;
|
|
347
|
+
const nextState = getScrollAffordanceState({
|
|
348
|
+
scrollTop: viewport.scrollTop,
|
|
349
|
+
scrollHeight: viewport.scrollHeight,
|
|
350
|
+
clientHeight: viewport.clientHeight
|
|
351
|
+
});
|
|
352
|
+
setAffordanceState((prevState) => prevState.hasOverflow === nextState.hasOverflow && prevState.showTopBlur === nextState.showTopBlur && prevState.showBottomBlur === nextState.showBottomBlur ? prevState : nextState);
|
|
353
|
+
}, []);
|
|
354
|
+
(0, react.useEffect)(() => {
|
|
355
|
+
if (!isExpanded || tables.length === 0) return;
|
|
356
|
+
const viewport = scrollViewportRef.current;
|
|
357
|
+
if (!viewport) return;
|
|
358
|
+
const handleScroll = () => {
|
|
359
|
+
recomputeAffordanceState();
|
|
360
|
+
};
|
|
361
|
+
viewport.addEventListener("scroll", handleScroll, { passive: true });
|
|
362
|
+
const resizeObserver = typeof ResizeObserver !== "undefined" ? new ResizeObserver(() => {
|
|
363
|
+
recomputeAffordanceState();
|
|
364
|
+
}) : null;
|
|
365
|
+
resizeObserver?.observe(viewport);
|
|
366
|
+
const rafId = requestAnimationFrame(() => {
|
|
367
|
+
recomputeAffordanceState();
|
|
368
|
+
});
|
|
369
|
+
const timeoutId = window.setTimeout(() => {
|
|
370
|
+
recomputeAffordanceState();
|
|
371
|
+
}, 220);
|
|
372
|
+
return () => {
|
|
373
|
+
viewport.removeEventListener("scroll", handleScroll);
|
|
374
|
+
resizeObserver?.disconnect();
|
|
375
|
+
cancelAnimationFrame(rafId);
|
|
376
|
+
window.clearTimeout(timeoutId);
|
|
377
|
+
};
|
|
378
|
+
}, [
|
|
379
|
+
isExpanded,
|
|
380
|
+
tables.length,
|
|
381
|
+
maxContentHeight,
|
|
382
|
+
recomputeAffordanceState
|
|
383
|
+
]);
|
|
384
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_collapsible.Collapsible, {
|
|
385
|
+
open: isExpanded,
|
|
386
|
+
onOpenChange: onToggleExpand,
|
|
387
|
+
className: "flex min-h-0 shrink-0 flex-col",
|
|
388
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_collapsible.CollapsibleTrigger, {
|
|
389
|
+
className: require_invalidate_database_entities.cn("group flex w-full items-center gap-2 rounded-lg py-1.5 pr-2 pl-1 transition-colors duration-150", "bg-card hover:bg-muted/50", isExpanded && "bg-muted/50"),
|
|
390
|
+
children: [
|
|
391
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.motion.div, {
|
|
392
|
+
animate: { rotate: isExpanded ? 90 : 0 },
|
|
393
|
+
transition: {
|
|
394
|
+
type: "spring",
|
|
395
|
+
stiffness: 400,
|
|
396
|
+
damping: 25
|
|
397
|
+
},
|
|
398
|
+
className: "flex shrink-0 items-center justify-center",
|
|
399
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: "text-muted-foreground/60 h-3.5 w-3.5" })
|
|
400
|
+
}),
|
|
401
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
402
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
403
|
+
children: title
|
|
404
|
+
}),
|
|
405
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
406
|
+
className: "ml-auto flex items-center gap-1.5",
|
|
407
|
+
children: [!isExpanded && hasSelectedItem && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
408
|
+
className: "bg-primary/50 h-1.5 w-1.5 rounded-full",
|
|
409
|
+
"aria-label": "Contains selected item"
|
|
410
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
411
|
+
className: "text-muted-foreground/70 text-[10px] tabular-nums",
|
|
412
|
+
children: tables.length
|
|
413
|
+
})]
|
|
414
|
+
})
|
|
415
|
+
]
|
|
416
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.AnimatePresence, {
|
|
417
|
+
initial: false,
|
|
418
|
+
children: isExpanded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.motion.div, {
|
|
419
|
+
"data-testid": `collapsible-content-${title}`,
|
|
420
|
+
initial: {
|
|
421
|
+
opacity: 0,
|
|
422
|
+
y: -4
|
|
423
|
+
},
|
|
424
|
+
animate: {
|
|
425
|
+
opacity: 1,
|
|
426
|
+
y: 0
|
|
427
|
+
},
|
|
428
|
+
exit: {
|
|
429
|
+
opacity: 0,
|
|
430
|
+
y: -4
|
|
431
|
+
},
|
|
432
|
+
transition: {
|
|
433
|
+
...require_use_update_table.springs.stiff,
|
|
434
|
+
opacity: {
|
|
435
|
+
duration: require_use_update_table.durations.fast,
|
|
436
|
+
ease: require_use_update_table.easings.easeOut
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
className: "min-h-0 overflow-hidden",
|
|
440
|
+
children: tables.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
441
|
+
className: "relative mt-2 min-h-0",
|
|
442
|
+
children: [
|
|
443
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
444
|
+
ref: scrollViewportRef,
|
|
445
|
+
style: scrollViewportStyle,
|
|
446
|
+
className: "scrollbar-neutral-thin min-h-0 overflow-x-hidden overflow-y-auto",
|
|
447
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
448
|
+
className: "space-y-0.5 px-1 py-2",
|
|
449
|
+
children: tables.map((table) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableItem, {
|
|
450
|
+
table,
|
|
451
|
+
isSelected: selectedTableId === table.id,
|
|
452
|
+
onSelect: onTableSelect,
|
|
453
|
+
onDelete: onTableDelete
|
|
454
|
+
}, table.id))
|
|
455
|
+
})
|
|
456
|
+
}),
|
|
457
|
+
affordanceState.showTopBlur && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_progressive_blur.ProgressiveBlur, {
|
|
458
|
+
position: "top",
|
|
459
|
+
height: "14%",
|
|
460
|
+
blurPx: 4,
|
|
461
|
+
surface: "background",
|
|
462
|
+
intensity: .1
|
|
463
|
+
}),
|
|
464
|
+
affordanceState.showBottomBlur && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_progressive_blur.ProgressiveBlur, {
|
|
465
|
+
position: "bottom",
|
|
466
|
+
height: "16%",
|
|
467
|
+
blurPx: 4,
|
|
468
|
+
surface: "background",
|
|
469
|
+
intensity: .12
|
|
470
|
+
})
|
|
471
|
+
]
|
|
472
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
473
|
+
className: "flex flex-col items-center justify-center py-6 text-center",
|
|
474
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
475
|
+
className: "bg-muted mb-2 flex h-10 w-10 items-center justify-center rounded-full",
|
|
476
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_remixicon_react.RiDatabaseLine, { className: "text-muted-foreground h-5 w-5" })
|
|
477
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
478
|
+
className: "text-muted-foreground text-xs",
|
|
479
|
+
children: emptyMessage
|
|
480
|
+
})]
|
|
481
|
+
})
|
|
482
|
+
})
|
|
483
|
+
})]
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
function TableItem({ table, isSelected, onSelect, onDelete }) {
|
|
487
|
+
const [isMenuOpen, setIsMenuOpen] = (0, react.useState)(false);
|
|
488
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
489
|
+
"data-testid": "table-item",
|
|
490
|
+
role: "button",
|
|
491
|
+
tabIndex: 0,
|
|
492
|
+
className: require_invalidate_database_entities.cn(`group relative my-1 flex min-h-10 cursor-pointer items-center justify-between rounded-lg px-2
|
|
493
|
+
transition-[background-color,color,box-shadow,scale] duration-150 ease-out motion-safe:active:scale-[0.96]`, isSelected ? "bg-primary/10 text-foreground ring-primary/30 dark:bg-primary/15 dark:ring-primary/40 ring-1" : "text-muted-foreground hover:text-foreground"),
|
|
494
|
+
onClick: () => onSelect(table.id),
|
|
495
|
+
onKeyDown: (event) => {
|
|
496
|
+
require_keyboard_activation.handleActivationKeyDown(event, () => onSelect(table.id));
|
|
497
|
+
},
|
|
498
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
499
|
+
className: "flex min-w-0 flex-1 items-center",
|
|
500
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverflowAwareTableName, { name: table.name })
|
|
501
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_dropdown_menu.DropdownMenu, {
|
|
502
|
+
open: isMenuOpen,
|
|
503
|
+
onOpenChange: setIsMenuOpen,
|
|
504
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_dropdown_menu.DropdownMenuTrigger, {
|
|
505
|
+
asChild: true,
|
|
506
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_button.Button, {
|
|
507
|
+
variant: "ghost",
|
|
508
|
+
size: "sm",
|
|
509
|
+
"aria-label": `Actions for ${table.name}`,
|
|
510
|
+
className: require_invalidate_database_entities.cn(`size-8 rounded-md p-0 transition-[background-color,opacity,scale] duration-150 ease-out
|
|
511
|
+
motion-safe:active:scale-[0.96]`, "opacity-0 group-hover:opacity-100", "hover:bg-muted-foreground/10", isMenuOpen && "bg-muted-foreground/10 opacity-100"),
|
|
512
|
+
onClick: (e) => e.stopPropagation(),
|
|
513
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MoreVertical, { className: "h-3 w-3" })
|
|
514
|
+
})
|
|
515
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_dropdown_menu.DropdownMenuContent, {
|
|
516
|
+
align: "end",
|
|
517
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_dropdown_menu.DropdownMenuItem, {
|
|
518
|
+
className: "text-destructive hover:bg-destructive/10 focus:bg-destructive/10 hover:text-destructive\n focus:text-destructive data-[disabled=true]:text-muted-foreground",
|
|
519
|
+
onClick: (e) => {
|
|
520
|
+
e.stopPropagation();
|
|
521
|
+
onDelete(table.id, table.name);
|
|
522
|
+
},
|
|
523
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2, { className: "mr-2 h-4 w-4" }), "Delete"]
|
|
524
|
+
})
|
|
525
|
+
})]
|
|
526
|
+
})]
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
function OverflowAwareTableName({ name }) {
|
|
530
|
+
const containerRef = (0, react.useRef)(null);
|
|
531
|
+
const measureRef = (0, react.useRef)(null);
|
|
532
|
+
const [displayName, setDisplayName] = (0, react.useState)(name);
|
|
533
|
+
const [isOverflowing, setIsOverflowing] = (0, react.useState)(false);
|
|
534
|
+
const recompute = (0, react.useCallback)(() => {
|
|
535
|
+
const container = containerRef.current;
|
|
536
|
+
const measureElement = measureRef.current;
|
|
537
|
+
if (!container || !measureElement) return;
|
|
538
|
+
const maxWidth = container.clientWidth;
|
|
539
|
+
if (maxWidth <= 0) {
|
|
540
|
+
setDisplayName(name);
|
|
541
|
+
setIsOverflowing(false);
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
const measure = (value) => {
|
|
545
|
+
measureElement.textContent = value;
|
|
546
|
+
return measureElement.scrollWidth;
|
|
547
|
+
};
|
|
548
|
+
const next = getTableNameDisplayState(name, maxWidth, measure);
|
|
549
|
+
setDisplayName((prev) => prev === next.displayName ? prev : next.displayName);
|
|
550
|
+
setIsOverflowing((prev) => prev === next.isOverflowing ? prev : next.isOverflowing);
|
|
551
|
+
}, [name]);
|
|
552
|
+
(0, react.useLayoutEffect)(() => {
|
|
553
|
+
recompute();
|
|
554
|
+
}, [recompute]);
|
|
555
|
+
(0, react.useEffect)(() => {
|
|
556
|
+
const element = containerRef.current;
|
|
557
|
+
if (!element || typeof ResizeObserver === "undefined") return;
|
|
558
|
+
const observer = new ResizeObserver(() => {
|
|
559
|
+
recompute();
|
|
560
|
+
});
|
|
561
|
+
observer.observe(element);
|
|
562
|
+
return () => observer.disconnect();
|
|
563
|
+
}, [recompute]);
|
|
564
|
+
const triggerLabel = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
565
|
+
ref: containerRef,
|
|
566
|
+
className: "relative block max-w-full min-w-0 text-xs",
|
|
567
|
+
"aria-label": isOverflowing ? name : void 0,
|
|
568
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
569
|
+
className: "block max-w-full min-w-0 truncate",
|
|
570
|
+
children: displayName
|
|
571
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
572
|
+
ref: measureRef,
|
|
573
|
+
"aria-hidden": "true",
|
|
574
|
+
className: "pointer-events-none invisible absolute top-0 left-0 text-xs whitespace-nowrap"
|
|
575
|
+
})]
|
|
576
|
+
});
|
|
577
|
+
if (!isOverflowing) return triggerLabel;
|
|
578
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_constructive_io_ui_tooltip.Tooltip, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_tooltip.TooltipTrigger, {
|
|
579
|
+
asChild: true,
|
|
580
|
+
children: triggerLabel
|
|
581
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_constructive_io_ui_tooltip.TooltipContent, {
|
|
582
|
+
side: "right",
|
|
583
|
+
align: "start",
|
|
584
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
585
|
+
className: "text-xs font-medium",
|
|
586
|
+
children: name
|
|
587
|
+
})
|
|
588
|
+
})] });
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
//#endregion
|
|
592
|
+
Object.defineProperty(exports, 'SchemaBuilderSidebar', {
|
|
593
|
+
enumerable: true,
|
|
594
|
+
get: function () {
|
|
595
|
+
return SchemaBuilderSidebar;
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
Object.defineProperty(exports, 'useDeleteTable', {
|
|
599
|
+
enumerable: true,
|
|
600
|
+
get: function () {
|
|
601
|
+
return useDeleteTable;
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
//# sourceMappingURL=schema-builder-sidebar-Ctu621Vw.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-builder-sidebar-Ctu621Vw.cjs","names":["useSchemaBuilderSelectors","useDeleteTableMutation","invalidateDatabaseEntities","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","Button","Loader2Icon","useSchemaBuilderSelectors","useSidebarSections","useSidebarSectionActions","CreateTableCard","CARD_WIDTHS","TooltipProvider","cn","Button","Plus","Collapsible","CollapsibleTrigger","motion","ChevronRight","AnimatePresence","springs","durations","easings","ProgressiveBlur","RiDatabaseLine","DropdownMenu","DropdownMenuTrigger","MoreVertical","DropdownMenuContent","DropdownMenuItem","Trash2","Tooltip","TooltipTrigger","TooltipContent"],"sources":["../src/schema/schema-builder-tables/lib/gql/hooks/schema-builder/use-delete-table.ts","../src/schema/schema-builder-tables/components/tables/delete-table-dialog.tsx","../src/schema/schema-builder-tables/components/schemas/schema-builder-sidebar.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,SAAgB,iBAAiB;CAChC,MAAM,wDAA6B;CACnC,MAAM,EAAE,eAAe,iBAAiB,aAAa,mBAAmB,oBAAoBA,+DAA0B;CACtH,MAAM,sBAAsBC,4DAAuB,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,KAAK,EAAE,EAAE,CAAC;CAE1F,8CAAmB;EAClB,YAAY,OAAO,UAA6C;GAC/D,MAAM,oBAAoB,YAAY,EACrC,IAAI,MAAM,GACX,CAAC;GAED,OAAO,MAAM;EACd;EACA,WAAW,OAAO,WAAW,cAAc;GAC1C,MAAMC,gEAA2B,aAAa,iBAAiB,UAAU;GAEzE,MAAM,kBAAkB,oBAAoB;GAE5C,IAAI,mB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