Flowfile 0.3.0__py3-none-any.whl → 0.3.0.1__py3-none-any.whl

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.

Potentially problematic release.


This version of Flowfile might be problematic. Click here for more details.

Files changed (147) hide show
  1. flowfile/__init__.py +13 -6
  2. flowfile/__main__.py +51 -15
  3. flowfile/api.py +379 -0
  4. flowfile/web/__init__.py +155 -0
  5. flowfile/web/static/assets/AirbyteReader-1ac35765.css +314 -0
  6. flowfile/web/static/assets/AirbyteReader-cb0c1d4a.js +921 -0
  7. flowfile/web/static/assets/CrossJoin-41efa4cb.css +100 -0
  8. flowfile/web/static/assets/CrossJoin-a514fa59.js +153 -0
  9. flowfile/web/static/assets/DatabaseConnectionSettings-0c04b2e5.css +77 -0
  10. flowfile/web/static/assets/DatabaseConnectionSettings-f2cecf33.js +151 -0
  11. flowfile/web/static/assets/DatabaseManager-30fa27e5.css +64 -0
  12. flowfile/web/static/assets/DatabaseManager-83ee3c98.js +484 -0
  13. flowfile/web/static/assets/DatabaseReader-dc0c6881.js +426 -0
  14. flowfile/web/static/assets/DatabaseReader-f50c6558.css +158 -0
  15. flowfile/web/static/assets/DatabaseWriter-2f570e53.css +96 -0
  16. flowfile/web/static/assets/DatabaseWriter-5afe9f8d.js +312 -0
  17. flowfile/web/static/assets/ExploreData-5bdae813.css +45 -0
  18. flowfile/web/static/assets/ExploreData-c7ee19cf.js +118306 -0
  19. flowfile/web/static/assets/ExternalSource-17b23a01.js +225 -0
  20. flowfile/web/static/assets/ExternalSource-e37b6275.css +94 -0
  21. flowfile/web/static/assets/Filter-90856b4f.js +238 -0
  22. flowfile/web/static/assets/Filter-a9d08ba1.css +20 -0
  23. flowfile/web/static/assets/Formula-38b71e9e.js +197 -0
  24. flowfile/web/static/assets/Formula-d60a74f4.css +17 -0
  25. flowfile/web/static/assets/FuzzyMatch-6857de82.css +254 -0
  26. flowfile/web/static/assets/FuzzyMatch-d0f1fe81.js +422 -0
  27. flowfile/web/static/assets/GoogleSheet-854294a4.js +2616 -0
  28. flowfile/web/static/assets/GoogleSheet-92084da7.css +233 -0
  29. flowfile/web/static/assets/GraphSolver-0c86bbc6.js +382 -0
  30. flowfile/web/static/assets/GraphSolver-17fd26db.css +68 -0
  31. flowfile/web/static/assets/GroupBy-ab1ea74b.css +51 -0
  32. flowfile/web/static/assets/GroupBy-f2772e9f.js +413 -0
  33. flowfile/web/static/assets/Join-41c0f331.css +109 -0
  34. flowfile/web/static/assets/Join-bc3e1cf7.js +247 -0
  35. flowfile/web/static/assets/ManualInput-03aa0245.js +391 -0
  36. flowfile/web/static/assets/ManualInput-ac7b9972.css +84 -0
  37. flowfile/web/static/assets/Output-48f81019.css +2642 -0
  38. flowfile/web/static/assets/Output-5b35eee8.js +536 -0
  39. flowfile/web/static/assets/Pivot-7164087c.js +408 -0
  40. flowfile/web/static/assets/Pivot-f415e85f.css +35 -0
  41. flowfile/web/static/assets/PolarsCode-3abf6507.js +2863 -0
  42. flowfile/web/static/assets/PolarsCode-650322d1.css +35 -0
  43. flowfile/web/static/assets/PopOver-b37ff9be.js +577 -0
  44. flowfile/web/static/assets/PopOver-bccfde04.css +32 -0
  45. flowfile/web/static/assets/Read-65966a3e.js +701 -0
  46. flowfile/web/static/assets/Read-80dc1675.css +197 -0
  47. flowfile/web/static/assets/RecordCount-c66c6d6d.js +121 -0
  48. flowfile/web/static/assets/RecordId-826dc095.js +339 -0
  49. flowfile/web/static/assets/Sample-4ed555c8.js +184 -0
  50. flowfile/web/static/assets/SecretManager-eac1e97d.js +382 -0
  51. flowfile/web/static/assets/Select-085f05cc.js +231 -0
  52. flowfile/web/static/assets/SettingsSection-1f5e79c1.js +87 -0
  53. flowfile/web/static/assets/SettingsSection-9c836ecc.css +47 -0
  54. flowfile/web/static/assets/Sort-3e6cb414.js +309 -0
  55. flowfile/web/static/assets/Sort-7ccfa0fe.css +51 -0
  56. flowfile/web/static/assets/TextToRows-606349bc.js +307 -0
  57. flowfile/web/static/assets/TextToRows-c92d1ec2.css +48 -0
  58. flowfile/web/static/assets/UnavailableFields-5edd5322.css +49 -0
  59. flowfile/web/static/assets/UnavailableFields-b41976ed.js +36 -0
  60. flowfile/web/static/assets/Union-8d9ac7f9.css +30 -0
  61. flowfile/web/static/assets/Union-fca91665.js +145 -0
  62. flowfile/web/static/assets/Unique-a59f830e.js +273 -0
  63. flowfile/web/static/assets/Unique-b5615727.css +51 -0
  64. flowfile/web/static/assets/Unpivot-246e9bbd.css +77 -0
  65. flowfile/web/static/assets/Unpivot-c3815565.js +441 -0
  66. flowfile/web/static/assets/airbyte-292aa232.png +0 -0
  67. flowfile/web/static/assets/api-22b338bd.js +60 -0
  68. flowfile/web/static/assets/cross_join-d30c0290.png +0 -0
  69. flowfile/web/static/assets/database_reader-ce1e55f3.svg +24 -0
  70. flowfile/web/static/assets/database_writer-b4ad0753.svg +23 -0
  71. flowfile/web/static/assets/designer-2394122a.css +10697 -0
  72. flowfile/web/static/assets/designer-e5bbe26f.js +69712 -0
  73. flowfile/web/static/assets/documentation-08045cf2.js +33 -0
  74. flowfile/web/static/assets/documentation-12216a74.css +50 -0
  75. flowfile/web/static/assets/dropDown-35135ba8.css +143 -0
  76. flowfile/web/static/assets/dropDown-5e7e9a5a.js +319 -0
  77. flowfile/web/static/assets/dropDownGeneric-50a91b99.js +72 -0
  78. flowfile/web/static/assets/dropDownGeneric-895680d6.css +10 -0
  79. flowfile/web/static/assets/element-icons-9c88a535.woff +0 -0
  80. flowfile/web/static/assets/element-icons-de5eb258.ttf +0 -0
  81. flowfile/web/static/assets/explore_data-8a0a2861.png +0 -0
  82. flowfile/web/static/assets/fa-brands-400-808443ae.ttf +0 -0
  83. flowfile/web/static/assets/fa-brands-400-d7236a19.woff2 +0 -0
  84. flowfile/web/static/assets/fa-regular-400-54cf6086.ttf +0 -0
  85. flowfile/web/static/assets/fa-regular-400-e3456d12.woff2 +0 -0
  86. flowfile/web/static/assets/fa-solid-900-aa759986.woff2 +0 -0
  87. flowfile/web/static/assets/fa-solid-900-d2f05935.ttf +0 -0
  88. flowfile/web/static/assets/fa-v4compatibility-0ce9033c.woff2 +0 -0
  89. flowfile/web/static/assets/fa-v4compatibility-30f6abf6.ttf +0 -0
  90. flowfile/web/static/assets/filter-d7708bda.png +0 -0
  91. flowfile/web/static/assets/formula-eeeb1611.png +0 -0
  92. flowfile/web/static/assets/fullEditor-178376bb.css +256 -0
  93. flowfile/web/static/assets/fullEditor-705c6ccb.js +630 -0
  94. flowfile/web/static/assets/fuzzy_match-40c161b2.png +0 -0
  95. flowfile/web/static/assets/genericNodeSettings-65587f20.js +137 -0
  96. flowfile/web/static/assets/genericNodeSettings-924759c7.css +46 -0
  97. flowfile/web/static/assets/graph_solver-8b7888b8.png +0 -0
  98. flowfile/web/static/assets/group_by-80561fc3.png +0 -0
  99. flowfile/web/static/assets/index-552863fd.js +58652 -0
  100. flowfile/web/static/assets/index-681a3ed0.css +8843 -0
  101. flowfile/web/static/assets/input_data-ab2eb678.png +0 -0
  102. flowfile/web/static/assets/join-349043ae.png +0 -0
  103. flowfile/web/static/assets/manual_input-ae98f31d.png +0 -0
  104. flowfile/web/static/assets/nodeTitle-cf9bae3c.js +227 -0
  105. flowfile/web/static/assets/nodeTitle-f4b12bcb.css +134 -0
  106. flowfile/web/static/assets/old_join-5d0eb604.png +0 -0
  107. flowfile/web/static/assets/output-06ec0371.png +0 -0
  108. flowfile/web/static/assets/pivot-9660df51.png +0 -0
  109. flowfile/web/static/assets/polars_code-05ce5dc6.png +0 -0
  110. flowfile/web/static/assets/record_count-dab44eb5.png +0 -0
  111. flowfile/web/static/assets/record_id-0b15856b.png +0 -0
  112. flowfile/web/static/assets/sample-693a88b5.png +0 -0
  113. flowfile/web/static/assets/secretApi-3ad510e1.js +46 -0
  114. flowfile/web/static/assets/select-b0d0437a.png +0 -0
  115. flowfile/web/static/assets/selectDynamic-b062bc9b.css +107 -0
  116. flowfile/web/static/assets/selectDynamic-bd644891.js +302 -0
  117. flowfile/web/static/assets/sort-2aa579f0.png +0 -0
  118. flowfile/web/static/assets/summarize-2a099231.png +0 -0
  119. flowfile/web/static/assets/text_to_rows-859b29ea.png +0 -0
  120. flowfile/web/static/assets/union-2d8609f4.png +0 -0
  121. flowfile/web/static/assets/unique-1958b98a.png +0 -0
  122. flowfile/web/static/assets/unpivot-d3cb4b5b.png +0 -0
  123. flowfile/web/static/assets/view-7a0f0be1.png +0 -0
  124. flowfile/web/static/assets/vue-codemirror.esm-dd17b478.js +22281 -0
  125. flowfile/web/static/assets/vue-content-loader.es-6b36f05e.js +210 -0
  126. flowfile/web/static/flowfile.svg +47 -0
  127. flowfile/web/static/icons/flowfile.png +0 -0
  128. flowfile/web/static/images/airbyte.png +0 -0
  129. flowfile/web/static/images/flowfile.svg +47 -0
  130. flowfile/web/static/images/google.svg +1 -0
  131. flowfile/web/static/images/sheets.png +0 -0
  132. flowfile/web/static/index.html +22 -0
  133. flowfile/web/static/vite.svg +1 -0
  134. flowfile/web/static/vue.svg +1 -0
  135. {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/METADATA +1 -1
  136. {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/RECORD +146 -15
  137. {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/entry_points.txt +1 -1
  138. flowfile_core/configs/settings.py +7 -32
  139. flowfile_core/flowfile/FlowfileFlow.py +4 -2
  140. flowfile_core/flowfile/analytics/analytics_processor.py +1 -1
  141. flowfile_core/main.py +4 -1
  142. flowfile_core/schemas/input_schema.py +1 -8
  143. flowfile_frame/__init__.py +0 -1
  144. flowfile_frame/utils.py +0 -139
  145. flowfile_frame/__main__.py +0 -12
  146. {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/LICENSE +0 -0
  147. {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,441 @@
1
+ import { d as defineComponent, c as openBlock, e as createElementBlock, p as createBaseVNode, F as Fragment, q as renderList, s as normalizeClass, t as toDisplayString, T as normalizeStyle, _ as _export_sfc, g as createTextVNode, i as createCommentVNode, r as ref, n as onMounted, R as nextTick, o as onUnmounted, b as resolveComponent, f as createVNode, w as withCtx, v as withModifiers, h as createBlock, a6 as Teleport } from "./index-552863fd.js";
2
+ import { u as useNodeStore } from "./PopOver-b37ff9be.js";
3
+ import { G as GenericNodeSettings } from "./genericNodeSettings-65587f20.js";
4
+ import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
5
+ import "./designer-e5bbe26f.js";
6
+ const _hoisted_1$3 = ["onClick"];
7
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8
+ __name: "ContextMenu",
9
+ props: {
10
+ position: { type: Object, required: true },
11
+ options: {
12
+ type: Array,
13
+ required: true
14
+ }
15
+ },
16
+ emits: ["select", "close"],
17
+ setup(__props, { emit: __emit }) {
18
+ const emit = __emit;
19
+ const selectOption = (action) => {
20
+ emit("select", action);
21
+ emit("close");
22
+ };
23
+ return (_ctx, _cache) => {
24
+ return openBlock(), createElementBlock("div", {
25
+ class: "context-menu",
26
+ style: normalizeStyle({ top: __props.position.y + "px", left: __props.position.x + "px" })
27
+ }, [
28
+ createBaseVNode("ul", null, [
29
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
30
+ return openBlock(), createElementBlock("li", {
31
+ key: option.action,
32
+ class: normalizeClass({ disabled: option.disabled }),
33
+ onClick: ($event) => !option.disabled && selectOption(option.action)
34
+ }, toDisplayString(option.label), 11, _hoisted_1$3);
35
+ }), 128))
36
+ ])
37
+ ], 4);
38
+ };
39
+ }
40
+ });
41
+ const ContextMenu_vue_vue_type_style_index_0_scoped_4f9e01e5_lang = "";
42
+ const ContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4f9e01e5"]]);
43
+ const _hoisted_1$2 = { class: "listbox-wrapper" };
44
+ const _hoisted_2$1 = { class: "listbox-row" };
45
+ const _hoisted_3$1 = { class: "items-container" };
46
+ const _hoisted_4$1 = { key: 0 };
47
+ const _hoisted_5$1 = ["onClick"];
48
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
49
+ __name: "SettingsSection",
50
+ props: {
51
+ title: { type: String, required: true },
52
+ titleFontSize: { type: String, default: "15px" },
53
+ items: { type: Array, required: true }
54
+ },
55
+ emits: ["removeItem"],
56
+ setup(__props, { emit: __emit }) {
57
+ const props = __props;
58
+ const emit = __emit;
59
+ const emitRemove = (item) => {
60
+ emit("removeItem", item);
61
+ };
62
+ return (_ctx, _cache) => {
63
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
64
+ createBaseVNode("div", _hoisted_2$1, [
65
+ createBaseVNode("div", {
66
+ class: "listbox-title",
67
+ style: normalizeStyle({ fontSize: props.titleFontSize })
68
+ }, toDisplayString(__props.title), 5),
69
+ createBaseVNode("div", _hoisted_3$1, [
70
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
71
+ return openBlock(), createElementBlock("div", {
72
+ key: index,
73
+ class: "item-box"
74
+ }, [
75
+ item !== "" ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
76
+ createTextVNode(toDisplayString(item) + " ", 1),
77
+ createBaseVNode("span", {
78
+ class: "remove-btn",
79
+ onClick: ($event) => emitRemove(item)
80
+ }, "x", 8, _hoisted_5$1)
81
+ ])) : createCommentVNode("", true)
82
+ ]);
83
+ }), 128))
84
+ ])
85
+ ])
86
+ ]);
87
+ };
88
+ }
89
+ });
90
+ const SettingsSection_vue_vue_type_style_index_0_scoped_fd7e6af1_lang = "";
91
+ const SettingsSection = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-fd7e6af1"]]);
92
+ const _hoisted_1$1 = {
93
+ key: 0,
94
+ class: "listbox-wrapper"
95
+ };
96
+ const _hoisted_2 = { class: "listbox-wrapper" };
97
+ const _hoisted_3 = { class: "listbox" };
98
+ const _hoisted_4 = ["onClick", "onContextmenu", "onDragstart", "onDrop"];
99
+ const _hoisted_5 = { class: "listbox-wrapper" };
100
+ const _hoisted_6 = { class: "listbox-wrapper" };
101
+ const _hoisted_7 = { class: "switch-container" };
102
+ const _hoisted_8 = {
103
+ key: 1,
104
+ class: "listbox-wrapper"
105
+ };
106
+ const _hoisted_9 = { class: "listbox-wrapper" };
107
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
108
+ __name: "Unpivot",
109
+ setup(__props, { expose: __expose }) {
110
+ const nodeStore = useNodeStore();
111
+ const showContextMenu = ref(false);
112
+ const dataLoaded = ref(false);
113
+ const contextMenuPosition = ref({ x: 0, y: 0 });
114
+ const selectedColumns = ref([]);
115
+ const contextMenuOptions = ref([]);
116
+ const contextMenuRef = ref(null);
117
+ const nodeData = ref(null);
118
+ const draggedColumnName = ref(null);
119
+ const dataTypeSelectorOptions = ["all", "numeric", "string", "date", "all"];
120
+ const unpivotInput = ref({
121
+ index_columns: [],
122
+ value_columns: [],
123
+ data_type_selector: null,
124
+ data_type_selector_mode: "column"
125
+ });
126
+ const nodeUnpivot = ref(null);
127
+ const getColumnClass = (columnName) => {
128
+ return selectedColumns.value.includes(columnName) ? "is-selected" : "";
129
+ };
130
+ const onDragStart = (columnName, event) => {
131
+ var _a;
132
+ draggedColumnName.value = columnName;
133
+ (_a = event.dataTransfer) == null ? void 0 : _a.setData("text/plain", columnName);
134
+ };
135
+ const onDrop = (index) => {
136
+ var _a, _b;
137
+ if (draggedColumnName.value) {
138
+ const colSchema = (_b = (_a = nodeData.value) == null ? void 0 : _a.main_input) == null ? void 0 : _b.table_schema;
139
+ if (colSchema) {
140
+ const fromIndex = colSchema.findIndex((col) => col.name === draggedColumnName.value);
141
+ if (fromIndex !== -1 && fromIndex !== index) {
142
+ const [movedColumn] = colSchema.splice(fromIndex, 1);
143
+ colSchema.splice(index, 0, movedColumn);
144
+ }
145
+ }
146
+ draggedColumnName.value = null;
147
+ }
148
+ };
149
+ const onDropInSection = (section) => {
150
+ if (draggedColumnName.value) {
151
+ removeColumnIfExists(draggedColumnName.value);
152
+ console.log("section", unpivotInput.value.index_columns);
153
+ if (section === "index" && !unpivotInput.value.index_columns.includes(draggedColumnName.value)) {
154
+ unpivotInput.value.index_columns.push(draggedColumnName.value);
155
+ } else if (section === "value" && !unpivotInput.value.value_columns.includes(draggedColumnName.value)) {
156
+ unpivotInput.value.value_columns.push(draggedColumnName.value);
157
+ }
158
+ draggedColumnName.value = null;
159
+ }
160
+ };
161
+ const openContextMenu = (columnName, event) => {
162
+ selectedColumns.value = [columnName];
163
+ contextMenuPosition.value = { x: event.clientX, y: event.clientY };
164
+ contextMenuOptions.value = [
165
+ {
166
+ label: "Add to Index",
167
+ action: "index",
168
+ disabled: isColumnAssigned(columnName)
169
+ },
170
+ {
171
+ label: "Add to Value",
172
+ action: "value",
173
+ disabled: isColumnAssigned(columnName) || !(unpivotInput.value.data_type_selector_mode === "column")
174
+ }
175
+ ];
176
+ showContextMenu.value = true;
177
+ };
178
+ const handleContextMenuSelect = (action) => {
179
+ const column = selectedColumns.value[0];
180
+ if (action === "index" && !unpivotInput.value.index_columns.includes(column)) {
181
+ removeColumnIfExists(column);
182
+ unpivotInput.value.index_columns.push(column);
183
+ } else if (action === "value" && !unpivotInput.value.index_columns.includes(column)) {
184
+ removeColumnIfExists(column);
185
+ unpivotInput.value.value_columns.push(column);
186
+ }
187
+ closeContextMenu();
188
+ };
189
+ const isColumnAssigned = (columnName) => {
190
+ return unpivotInput.value.index_columns.includes(columnName) || unpivotInput.value.value_columns.includes(columnName);
191
+ };
192
+ const removeColumnIfExists = (column) => {
193
+ unpivotInput.value.index_columns = unpivotInput.value.index_columns.filter(
194
+ (col) => col !== column
195
+ );
196
+ unpivotInput.value.value_columns = unpivotInput.value.value_columns.filter(
197
+ (col) => col !== column
198
+ );
199
+ };
200
+ const removeColumn = (type, column) => {
201
+ if (type === "index") {
202
+ unpivotInput.value.index_columns = unpivotInput.value.index_columns.filter(
203
+ (col) => col !== column
204
+ );
205
+ } else if (type === "value") {
206
+ unpivotInput.value.value_columns = unpivotInput.value.value_columns.filter(
207
+ (col) => col !== column
208
+ );
209
+ }
210
+ };
211
+ const handleItemClick = (columnName) => {
212
+ selectedColumns.value = [columnName];
213
+ };
214
+ const loadNodeData = async (nodeId) => {
215
+ var _a;
216
+ console.log("loadNodeData from unpivot ");
217
+ nodeData.value = await nodeStore.getNodeData(nodeId, false);
218
+ nodeUnpivot.value = (_a = nodeData.value) == null ? void 0 : _a.setting_input;
219
+ console.log(nodeUnpivot.value);
220
+ if (nodeData.value) {
221
+ if (nodeUnpivot.value) {
222
+ if (nodeUnpivot.value.unpivot_input) {
223
+ unpivotInput.value = nodeUnpivot.value.unpivot_input;
224
+ } else {
225
+ nodeUnpivot.value.unpivot_input = unpivotInput.value;
226
+ }
227
+ }
228
+ }
229
+ dataLoaded.value = true;
230
+ nodeStore.isDrawerOpen = true;
231
+ console.log("loadNodeData from groupby");
232
+ };
233
+ const handleClickOutside = (event) => {
234
+ const targetEvent = event.target;
235
+ if (targetEvent.id === "pivot-context-menu")
236
+ return;
237
+ showContextMenu.value = false;
238
+ };
239
+ const closeContextMenu = () => {
240
+ showContextMenu.value = false;
241
+ };
242
+ const pushNodeData = async () => {
243
+ if (unpivotInput.value) {
244
+ if (unpivotInput.value.data_type_selector_mode === "data_type") {
245
+ unpivotInput.value.value_columns = [];
246
+ } else {
247
+ unpivotInput.value.data_type_selector = null;
248
+ }
249
+ nodeUnpivot.value.unpivot_input = unpivotInput.value;
250
+ nodeStore.updateSettings(nodeUnpivot);
251
+ }
252
+ nodeStore.isDrawerOpen = false;
253
+ };
254
+ __expose({
255
+ loadNodeData,
256
+ pushNodeData
257
+ });
258
+ onMounted(async () => {
259
+ await nextTick();
260
+ window.addEventListener("click", handleClickOutside);
261
+ });
262
+ onUnmounted(() => {
263
+ window.removeEventListener("click", handleClickOutside);
264
+ });
265
+ return (_ctx, _cache) => {
266
+ const _component_el_switch = resolveComponent("el-switch");
267
+ const _component_el_option = resolveComponent("el-option");
268
+ const _component_el_select = resolveComponent("el-select");
269
+ return dataLoaded.value && nodeUnpivot.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
270
+ createVNode(GenericNodeSettings, {
271
+ modelValue: nodeUnpivot.value,
272
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => nodeUnpivot.value = $event)
273
+ }, {
274
+ default: withCtx(() => {
275
+ var _a, _b;
276
+ return [
277
+ createBaseVNode("div", _hoisted_2, [
278
+ createBaseVNode("ul", _hoisted_3, [
279
+ (openBlock(true), createElementBlock(Fragment, null, renderList((_b = (_a = nodeData.value) == null ? void 0 : _a.main_input) == null ? void 0 : _b.table_schema, (col_schema, index) => {
280
+ return openBlock(), createElementBlock("li", {
281
+ key: col_schema.name,
282
+ class: normalizeClass(getColumnClass(col_schema.name)),
283
+ draggable: "true",
284
+ onClick: ($event) => handleItemClick(col_schema.name),
285
+ onContextmenu: withModifiers(($event) => openContextMenu(col_schema.name, $event), ["prevent"]),
286
+ onDragstart: ($event) => onDragStart(col_schema.name, $event),
287
+ onDragover: _cache[0] || (_cache[0] = withModifiers(() => {
288
+ }, ["prevent"])),
289
+ onDrop: ($event) => onDrop(index)
290
+ }, toDisplayString(col_schema.name) + " (" + toDisplayString(col_schema.data_type) + ") ", 43, _hoisted_4);
291
+ }), 128))
292
+ ])
293
+ ]),
294
+ showContextMenu.value ? (openBlock(), createBlock(ContextMenu, {
295
+ key: 0,
296
+ id: "pivot-context-menu",
297
+ ref_key: "contextMenuRef",
298
+ ref: contextMenuRef,
299
+ position: contextMenuPosition.value,
300
+ options: contextMenuOptions.value,
301
+ onSelect: handleContextMenuSelect,
302
+ onClose: closeContextMenu
303
+ }, null, 8, ["position", "options"])) : createCommentVNode("", true),
304
+ createBaseVNode("div", _hoisted_5, [
305
+ createVNode(SettingsSection, {
306
+ title: "Index Keys",
307
+ items: unpivotInput.value.index_columns,
308
+ droppable: "true",
309
+ onRemoveItem: _cache[1] || (_cache[1] = ($event) => removeColumn("index", $event)),
310
+ onDragover: _cache[2] || (_cache[2] = withModifiers(() => {
311
+ }, ["prevent"])),
312
+ onDrop: _cache[3] || (_cache[3] = ($event) => onDropInSection("index"))
313
+ }, null, 8, ["items"])
314
+ ]),
315
+ createBaseVNode("div", _hoisted_6, [
316
+ createBaseVNode("div", _hoisted_7, [
317
+ _cache[10] || (_cache[10] = createBaseVNode("span", null, "Value selector", -1)),
318
+ createVNode(_component_el_switch, {
319
+ modelValue: unpivotInput.value.data_type_selector_mode,
320
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unpivotInput.value.data_type_selector_mode = $event),
321
+ "active-value": "column",
322
+ "inactive-value": "data_type",
323
+ "active-text": "Column",
324
+ "inactive-text": "Data Type",
325
+ "inline-prompt": ""
326
+ }, null, 8, ["modelValue"])
327
+ ]),
328
+ unpivotInput.value.data_type_selector_mode === "column" ? (openBlock(), createBlock(SettingsSection, {
329
+ key: 0,
330
+ title: "Columns to unpivot",
331
+ "title-font-size": "14px",
332
+ items: unpivotInput.value.value_columns,
333
+ droppable: "true",
334
+ onRemoveItem: _cache[5] || (_cache[5] = ($event) => removeColumn("value", $event)),
335
+ onDragover: _cache[6] || (_cache[6] = withModifiers(() => {
336
+ }, ["prevent"])),
337
+ onDrop: _cache[7] || (_cache[7] = ($event) => onDropInSection("value"))
338
+ }, null, 8, ["items"])) : (openBlock(), createElementBlock("div", _hoisted_8, [
339
+ _cache[11] || (_cache[11] = createBaseVNode("div", { class: "listbox-subtitle" }, "Dynamic data type selector", -1)),
340
+ createBaseVNode("div", _hoisted_9, [
341
+ createVNode(_component_el_select, {
342
+ modelValue: unpivotInput.value.data_type_selector,
343
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => unpivotInput.value.data_type_selector = $event),
344
+ placeholder: "Select",
345
+ size: "small",
346
+ style: { "width": "100%" }
347
+ }, {
348
+ default: withCtx(() => [
349
+ (openBlock(), createElementBlock(Fragment, null, renderList(dataTypeSelectorOptions, (item) => {
350
+ return createVNode(_component_el_option, {
351
+ key: item,
352
+ label: item,
353
+ value: item,
354
+ style: { "width": "400px" }
355
+ }, null, 8, ["label", "value"]);
356
+ }), 64))
357
+ ]),
358
+ _: 1
359
+ }, 8, ["modelValue"])
360
+ ])
361
+ ]))
362
+ ])
363
+ ];
364
+ }),
365
+ _: 1
366
+ }, 8, ["modelValue"])
367
+ ])) : createCommentVNode("", true);
368
+ };
369
+ }
370
+ });
371
+ const Unpivot_vue_vue_type_style_index_0_scoped_9746d208_lang = "";
372
+ const readInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-9746d208"]]);
373
+ const _hoisted_1 = { ref: "el" };
374
+ const _sfc_main = /* @__PURE__ */ defineComponent({
375
+ __name: "Unpivot",
376
+ props: {
377
+ nodeId: {
378
+ type: Number,
379
+ required: true
380
+ }
381
+ },
382
+ setup(__props) {
383
+ const nodeStore = useNodeStore();
384
+ const childComp = ref(null);
385
+ const props = __props;
386
+ const drawer = ref(false);
387
+ const closeOnDrawer = () => {
388
+ var _a;
389
+ drawer.value = false;
390
+ (_a = childComp.value) == null ? void 0 : _a.pushNodeData();
391
+ };
392
+ const openDrawer = async () => {
393
+ if (nodeStore.node_id === props.nodeId) {
394
+ return;
395
+ }
396
+ nodeStore.closeDrawer();
397
+ drawer.value = true;
398
+ const drawerOpen = nodeStore.isDrawerOpen;
399
+ nodeStore.isDrawerOpen = true;
400
+ await nextTick();
401
+ if (nodeStore.node_id === props.nodeId && drawerOpen) {
402
+ return;
403
+ }
404
+ if (childComp.value) {
405
+ childComp.value.loadNodeData(props.nodeId);
406
+ nodeStore.openDrawer(closeOnDrawer);
407
+ }
408
+ };
409
+ onMounted(async () => {
410
+ await nextTick();
411
+ });
412
+ return (_ctx, _cache) => {
413
+ return openBlock(), createElementBlock("div", _hoisted_1, [
414
+ createVNode(NodeButton, {
415
+ ref: "nodeButton",
416
+ "node-id": __props.nodeId,
417
+ "image-src": "unpivot.png",
418
+ title: `${__props.nodeId}: Unpivot data`,
419
+ onClick: openDrawer
420
+ }, null, 8, ["node-id", "title"]),
421
+ drawer.value ? (openBlock(), createBlock(Teleport, {
422
+ key: 0,
423
+ to: "#nodesettings"
424
+ }, [
425
+ createVNode(NodeTitle, {
426
+ title: "Unpivot data",
427
+ intro: "Pivot columns to rows"
428
+ }),
429
+ createVNode(readInput, {
430
+ ref_key: "childComp",
431
+ ref: childComp,
432
+ "node-id": __props.nodeId
433
+ }, null, 8, ["node-id"])
434
+ ])) : createCommentVNode("", true)
435
+ ], 512);
436
+ };
437
+ }
438
+ });
439
+ export {
440
+ _sfc_main as default
441
+ };
@@ -0,0 +1,60 @@
1
+ import { a as axios } from "./index-552863fd.js";
2
+ const API_BASE_URL = "/db_connection_lib";
3
+ const toPythonFormat = (connection) => {
4
+ return {
5
+ connection_name: connection.connectionName,
6
+ database_type: connection.databaseType,
7
+ username: connection.username,
8
+ password: connection.password,
9
+ host: connection.host,
10
+ port: connection.port,
11
+ database: connection.database,
12
+ ssl_enabled: connection.sslEnabled,
13
+ url: connection.url
14
+ };
15
+ };
16
+ const fetchDatabaseConnectionsInterfaces = async () => {
17
+ try {
18
+ const response = await axios.get(API_BASE_URL);
19
+ return response.data.map(convertConnectionInterfacePytoTs);
20
+ } catch (error) {
21
+ console.error("API Error: Failed to load database connections:", error);
22
+ throw error;
23
+ }
24
+ };
25
+ const convertConnectionInterfacePytoTs = (pythonConnectionInterface) => {
26
+ return {
27
+ username: pythonConnectionInterface.username,
28
+ connectionName: pythonConnectionInterface.connection_name,
29
+ databaseType: pythonConnectionInterface.database_type,
30
+ host: pythonConnectionInterface.host,
31
+ port: pythonConnectionInterface.port,
32
+ sslEnabled: pythonConnectionInterface.ssl_enabled,
33
+ url: pythonConnectionInterface.url,
34
+ database: pythonConnectionInterface.database
35
+ };
36
+ };
37
+ const createDatabaseConnectionApi = async (connectionData) => {
38
+ var _a, _b;
39
+ try {
40
+ const pythonFormattedData = toPythonFormat(connectionData);
41
+ await axios.post(API_BASE_URL, pythonFormattedData);
42
+ } catch (error) {
43
+ console.error("API Error: Failed to create database connection:", error);
44
+ const errorMsg = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.detail) || "Failed to create database connection";
45
+ throw new Error(errorMsg);
46
+ }
47
+ };
48
+ const deleteDatabaseConnectionApi = async (connectionName) => {
49
+ try {
50
+ await axios.delete(`${API_BASE_URL}?connection_name=${encodeURIComponent(connectionName)}`);
51
+ } catch (error) {
52
+ console.error("API Error: Failed to delete database connection:", error);
53
+ throw error;
54
+ }
55
+ };
56
+ export {
57
+ createDatabaseConnectionApi as c,
58
+ deleteDatabaseConnectionApi as d,
59
+ fetchDatabaseConnectionsInterfaces as f
60
+ };
@@ -0,0 +1,24 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
2
+ <!-- Background circular shape for consistency with Image 2 -->
3
+ <circle cx="100" cy="100" r="85" fill="#00A99D" />
4
+
5
+ <!-- Database cylinder with better proportions -->
6
+ <ellipse cx="100" cy="70" rx="45" ry="15" fill="#FFFFFF" fill-opacity="0.3" stroke="#FFFFFF" stroke-width="3" />
7
+ <path d="M55 70 L55 130 C55 142 75 155 100 155 C125 155 145 142 145 130 L145 70" fill="none" stroke="#FFFFFF" stroke-width="3" />
8
+
9
+ <!-- Middle section line of database -->
10
+ <path d="M55 100 C55 112 75 125 100 125 C125 125 145 112 145 100" fill="none" stroke="#FFFFFF" stroke-width="2" />
11
+
12
+ <!-- SQL text in the center of the database -->
13
+ <text x="100" y="76" font-family="Arial" font-size="18" font-weight="bold" text-anchor="middle" fill="#FFFFFF">SQL</text>
14
+
15
+ <!-- Data rows with perfect alignment - removed one line -->
16
+ <line x1="70" y1="95" x2="130" y2="95" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" />
17
+ <line x1="70" y1="115" x2="130" y2="115" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" />
18
+
19
+ <!-- Source text below database -->
20
+ <text x="100" y="175" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#FFFFFF">SOURCE</text>
21
+
22
+ <!-- Connector line below database -->
23
+ <line x1="100" y1="155" x2="100" y2="160" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" />
24
+ </svg>
@@ -0,0 +1,23 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
2
+ <!-- Background circular shape for consistency -->
3
+ <circle cx="100" cy="100" r="85" fill="#00A99D" />
4
+
5
+ <!-- Database cylinder with better proportions -->
6
+ <ellipse cx="100" cy="70" rx="45" ry="15" fill="#FFFFFF" fill-opacity="0.3" stroke="#FFFFFF" stroke-width="3" />
7
+ <path d="M55 70 L55 130 C55 142 75 155 100 155 C125 155 145 142 145 130 L145 70" fill="none" stroke="#FFFFFF" stroke-width="3" />
8
+
9
+ <!-- Middle section line of database -->
10
+ <path d="M55 100 C55 112 75 125 100 125 C125 125 145 112 145 100" fill="none" stroke="#FFFFFF" stroke-width="2" />
11
+
12
+ <!-- SQL text in the center of the database -->
13
+ <text x="100" y="76" font-family="Arial" font-size="18" font-weight="bold" text-anchor="middle" fill="#FFFFFF">SQL</text>
14
+
15
+ <!-- Data rows with perfect alignment -->
16
+ <line x1="70" y1="95" x2="130" y2="95" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" />
17
+ <line x1="70" y1="115" x2="130" y2="115" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" />
18
+
19
+ <!-- Writer text below database - removed arrow -->
20
+ <text x="100" y="175" font-family="Arial" font-size="14" font-weight="bold" text-anchor="middle" fill="#FFFFFF">WRITER</text>
21
+
22
+
23
+ </svg>