Flowfile 0.2.2__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 (149) hide show
  1. flowfile/__init__.py +14 -7
  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.1.dist-info/METADATA +219 -0
  136. {flowfile-0.2.2.dist-info → flowfile-0.3.0.1.dist-info}/RECORD +147 -16
  137. {flowfile-0.2.2.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 +1 -2
  144. flowfile_frame/flow_frame.py +6 -6
  145. flowfile_frame/utils.py +1 -140
  146. flowfile-0.2.2.dist-info/METADATA +0 -225
  147. flowfile_frame/__main__.py +0 -12
  148. {flowfile-0.2.2.dist-info → flowfile-0.3.0.1.dist-info}/LICENSE +0 -0
  149. {flowfile-0.2.2.dist-info → flowfile-0.3.0.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,51 @@
1
+
2
+ .context-menu[data-v-f29b10dc] {
3
+ position: fixed;
4
+ z-index: 1000;
5
+ border: 1px solid #ccc;
6
+ background-color: white;
7
+ padding: 8px;
8
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
9
+ border-radius: 4px;
10
+ user-select: none;
11
+ }
12
+ .context-menu button[data-v-f29b10dc] {
13
+ display: block;
14
+ background: none;
15
+ border: none;
16
+ padding: 4px 8px;
17
+ text-align: left;
18
+ width: 100%;
19
+ cursor: pointer;
20
+ z-index: 100;
21
+ }
22
+ .context-menu button[data-v-f29b10dc]:hover {
23
+ background-color: #f0f0f0;
24
+ }
25
+ .table-wrapper[data-v-f29b10dc] {
26
+ max-height: 300px; /* Adjust this value as needed */
27
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* subtle shadow for depth */
28
+ border-radius: 8px; /* rounded corners */
29
+ overflow: auto; /* ensures the rounded corners are applied to the child elements */
30
+ margin: 5px; /* adds a small margin around the table */
31
+ }
32
+ .context-menu[data-v-f29b10dc] {
33
+ position: fixed;
34
+ z-index: 1000;
35
+ border: 1px solid #ccc;
36
+ background-color: white;
37
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
38
+ border-radius: 4px;
39
+ }
40
+ .context-menu ul[data-v-f29b10dc] {
41
+ list-style: none;
42
+ padding: 0;
43
+ margin: 0;
44
+ }
45
+ .context-menu li[data-v-f29b10dc] {
46
+ padding: 8px 16px;
47
+ cursor: pointer;
48
+ }
49
+ .context-menu li[data-v-f29b10dc]:hover {
50
+ background-color: #f0f0f0;
51
+ }
@@ -0,0 +1,413 @@
1
+ import { d as defineComponent, r as ref, l as computed, n as onMounted, R as nextTick, o as onUnmounted, b as resolveComponent, c as openBlock, e as createElementBlock, f as createVNode, w as withCtx, p as createBaseVNode, F as Fragment, q as renderList, s as normalizeClass, t as toDisplayString, i as createCommentVNode, T as normalizeStyle, v as withModifiers, h as createBlock, u as unref, _ as _export_sfc, a6 as Teleport } from "./index-552863fd.js";
2
+ import { C as CodeLoader } from "./vue-content-loader.es-6b36f05e.js";
3
+ import { u as useNodeStore } from "./PopOver-b37ff9be.js";
4
+ import { G as GenericNodeSettings } from "./genericNodeSettings-65587f20.js";
5
+ import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
6
+ import "./designer-e5bbe26f.js";
7
+ const _hoisted_1$1 = { key: 0 };
8
+ const _hoisted_2 = { class: "listbox-wrapper" };
9
+ const _hoisted_3 = {
10
+ key: 0,
11
+ class: "listbox"
12
+ };
13
+ const _hoisted_4 = ["onClick", "onContextmenu"];
14
+ const _hoisted_5 = ["onClick"];
15
+ const _hoisted_6 = {
16
+ key: 1,
17
+ class: "table-wrapper"
18
+ };
19
+ const _hoisted_7 = { class: "styled-table" };
20
+ const _hoisted_8 = ["onContextmenu"];
21
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
22
+ __name: "groupBy",
23
+ setup(__props, { expose: __expose }) {
24
+ const nodeStore = useNodeStore();
25
+ const showContextMenu = ref(false);
26
+ const showContextMenuRemove = ref(false);
27
+ const dataLoaded = ref(false);
28
+ const contextMenuPosition = ref({ x: 0, y: 0 });
29
+ const contextMenuColumn = ref(null);
30
+ const contextMenuRef = ref(null);
31
+ const selectedColumns = ref([]);
32
+ const nodeGroupBy = ref(null);
33
+ const nodeData = ref(null);
34
+ const aggOptions = [
35
+ "groupby",
36
+ "sum",
37
+ "max",
38
+ "median",
39
+ "min",
40
+ "count",
41
+ "n_unique",
42
+ "first",
43
+ "last",
44
+ "concat"
45
+ ];
46
+ const firstSelectedIndex = ref(null);
47
+ const groupByInput = ref({
48
+ agg_cols: []
49
+ });
50
+ const openRowContextMenu = (event, index) => {
51
+ event.preventDefault();
52
+ contextMenuPosition.value = { x: event.clientX, y: event.clientY };
53
+ contextMenuRowIndex.value = index;
54
+ showContextMenuRemove.value = true;
55
+ };
56
+ const removeRow = () => {
57
+ if (contextMenuRowIndex.value !== null) {
58
+ groupByInput.value.agg_cols.splice(contextMenuRowIndex.value, 1);
59
+ }
60
+ showContextMenuRemove.value = false;
61
+ contextMenuRowIndex.value = null;
62
+ };
63
+ const contextMenuRowIndex = ref(null);
64
+ const singleColumnSelected = computed(() => selectedColumns.value.length == 1);
65
+ const openContextMenu = (clickedIndex, columnName, event) => {
66
+ event.preventDefault();
67
+ event.stopPropagation();
68
+ if (!selectedColumns.value.includes(columnName)) {
69
+ selectedColumns.value = [columnName];
70
+ }
71
+ contextMenuPosition.value = { x: event.clientX, y: event.clientY };
72
+ showContextMenu.value = true;
73
+ };
74
+ const setAggregations = (aggType, columns) => {
75
+ if (columns) {
76
+ columns.forEach((column) => {
77
+ const new_column_name = aggType !== "groupby" ? column + "_" + aggType : column;
78
+ groupByInput.value.agg_cols.push({
79
+ old_name: column,
80
+ agg: aggType,
81
+ new_name: new_column_name
82
+ });
83
+ });
84
+ }
85
+ showContextMenu.value = false;
86
+ contextMenuColumn.value = null;
87
+ };
88
+ const handleItemClick = (clickedIndex, columnName, event) => {
89
+ if (event.shiftKey && firstSelectedIndex.value !== null) {
90
+ const range = getRange(firstSelectedIndex.value, clickedIndex);
91
+ selectedColumns.value = range.map((index) => {
92
+ var _a, _b;
93
+ return (_b = (_a = nodeData.value) == null ? void 0 : _a.main_input) == null ? void 0 : _b.columns[index];
94
+ }).filter((col) => col !== void 0);
95
+ } else {
96
+ if (firstSelectedIndex.value === clickedIndex) {
97
+ selectedColumns.value = [];
98
+ } else {
99
+ firstSelectedIndex.value = clickedIndex;
100
+ selectedColumns.value = [columnName];
101
+ }
102
+ }
103
+ };
104
+ const singleColumnAggOptions = [
105
+ { value: "count", label: "Count" },
106
+ { value: "max", label: "Max" },
107
+ { value: "median", label: "Median" },
108
+ { value: "min", label: "Min" },
109
+ { value: "sum", label: "Sum" },
110
+ { value: "n_unique", label: "N_unique" },
111
+ { value: "first", label: "First" },
112
+ { value: "last", label: "Last" },
113
+ { value: "concat", label: "Concat" }
114
+ ];
115
+ const getRange = (start, end) => {
116
+ return start < end ? [...Array(end - start + 1).keys()].map((i) => i + start) : [...Array(start - end + 1).keys()].map((i) => i + end);
117
+ };
118
+ const loadData = async (nodeId) => {
119
+ var _a;
120
+ nodeData.value = await nodeStore.getNodeData(nodeId, false);
121
+ nodeGroupBy.value = (_a = nodeData.value) == null ? void 0 : _a.setting_input;
122
+ if (nodeData.value) {
123
+ if (nodeGroupBy.value) {
124
+ if (nodeGroupBy.value.groupby_input) {
125
+ groupByInput.value = nodeGroupBy.value.groupby_input;
126
+ } else {
127
+ nodeGroupBy.value.groupby_input = groupByInput.value;
128
+ }
129
+ }
130
+ }
131
+ };
132
+ const loadNodeData = async (nodeId) => {
133
+ loadData(nodeId);
134
+ dataLoaded.value = true;
135
+ nodeStore.isDrawerOpen = true;
136
+ };
137
+ const handleClickOutside = (event) => {
138
+ var _a;
139
+ if (!((_a = contextMenuRef.value) == null ? void 0 : _a.contains(event.target))) {
140
+ showContextMenu.value = false;
141
+ contextMenuColumn.value = null;
142
+ showContextMenuRemove.value = false;
143
+ }
144
+ };
145
+ const getMissingColumns = (availableColumns, usedColumns) => {
146
+ const availableSet = new Set(availableColumns);
147
+ return Array.from(new Set(usedColumns.filter((usedColumn) => !availableSet.has(usedColumn))));
148
+ };
149
+ const missingColumns = computed(() => {
150
+ var _a, _b;
151
+ if (nodeData.value && ((_a = nodeData.value.main_input) == null ? void 0 : _a.columns)) {
152
+ return getMissingColumns(
153
+ (_b = nodeData.value.main_input) == null ? void 0 : _b.columns,
154
+ groupByInput.value.agg_cols.map((col) => col.old_name)
155
+ );
156
+ }
157
+ return [];
158
+ });
159
+ const calculateMissingColumns = () => {
160
+ var _a, _b;
161
+ if (nodeData.value && ((_a = nodeData.value.main_input) == null ? void 0 : _a.columns)) {
162
+ return getMissingColumns(
163
+ (_b = nodeData.value.main_input) == null ? void 0 : _b.columns,
164
+ groupByInput.value.agg_cols.map((col) => col.old_name)
165
+ );
166
+ }
167
+ return [];
168
+ };
169
+ const validateNode = async () => {
170
+ var _a, _b;
171
+ if ((_a = nodeGroupBy.value) == null ? void 0 : _a.groupby_input) {
172
+ await loadData(Number(nodeGroupBy.value.node_id));
173
+ }
174
+ const missingColumnsLocal = calculateMissingColumns();
175
+ if (missingColumnsLocal.length > 0 && nodeGroupBy.value) {
176
+ nodeStore.setNodeValidation(nodeGroupBy.value.node_id, {
177
+ isValid: false,
178
+ error: `The fields ${missingColumns.value.join(", ")} are missing in the available columns.`
179
+ });
180
+ } else if (((_b = nodeGroupBy.value) == null ? void 0 : _b.groupby_input.agg_cols.length) == 0) {
181
+ nodeStore.setNodeValidation(nodeGroupBy.value.node_id, {
182
+ isValid: false,
183
+ error: "Please select at least one field."
184
+ });
185
+ } else if (nodeGroupBy.value) {
186
+ nodeStore.setNodeValidation(nodeGroupBy.value.node_id, {
187
+ isValid: true,
188
+ error: ""
189
+ });
190
+ }
191
+ };
192
+ const instantValidate = async () => {
193
+ var _a;
194
+ if (missingColumns.value.length > 0 && nodeGroupBy.value) {
195
+ nodeStore.setNodeValidation(nodeGroupBy.value.node_id, {
196
+ isValid: false,
197
+ error: `The fields ${missingColumns.value.join(", ")} are missing in the available columns.`
198
+ });
199
+ } else if (((_a = nodeGroupBy.value) == null ? void 0 : _a.groupby_input.agg_cols.length) == 0) {
200
+ nodeStore.setNodeValidation(nodeGroupBy.value.node_id, {
201
+ isValid: false,
202
+ error: "Please select at least one field."
203
+ });
204
+ } else if (nodeGroupBy.value) {
205
+ nodeStore.setNodeValidation(nodeGroupBy.value.node_id, {
206
+ isValid: true,
207
+ error: ""
208
+ });
209
+ }
210
+ };
211
+ const pushNodeData = async () => {
212
+ var _a, _b, _c;
213
+ dataLoaded.value = false;
214
+ nodeStore.isDrawerOpen = false;
215
+ if ((_a = nodeGroupBy.value) == null ? void 0 : _a.is_setup) {
216
+ nodeGroupBy.value.is_setup = true;
217
+ }
218
+ nodeStore.updateSettings(nodeGroupBy);
219
+ await instantValidate();
220
+ if ((_b = nodeGroupBy.value) == null ? void 0 : _b.groupby_input) {
221
+ nodeStore.setNodeValidateFunc((_c = nodeGroupBy.value) == null ? void 0 : _c.node_id, validateNode);
222
+ }
223
+ };
224
+ __expose({
225
+ loadNodeData,
226
+ pushNodeData
227
+ });
228
+ onMounted(async () => {
229
+ await nextTick();
230
+ window.addEventListener("click", handleClickOutside);
231
+ });
232
+ onUnmounted(() => {
233
+ window.removeEventListener("click", handleClickOutside);
234
+ });
235
+ return (_ctx, _cache) => {
236
+ const _component_el_option = resolveComponent("el-option");
237
+ const _component_el_select = resolveComponent("el-select");
238
+ const _component_el_input = resolveComponent("el-input");
239
+ return dataLoaded.value && nodeGroupBy.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
240
+ createVNode(GenericNodeSettings, {
241
+ modelValue: nodeGroupBy.value,
242
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => nodeGroupBy.value = $event)
243
+ }, {
244
+ default: withCtx(() => {
245
+ var _a, _b;
246
+ return [
247
+ createBaseVNode("div", _hoisted_2, [
248
+ dataLoaded.value ? (openBlock(), createElementBlock("ul", _hoisted_3, [
249
+ (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) => {
250
+ return openBlock(), createElementBlock("li", {
251
+ key: col_schema.name,
252
+ class: normalizeClass({ "is-selected": selectedColumns.value.includes(col_schema.name) }),
253
+ onClick: ($event) => handleItemClick(index, col_schema.name, $event),
254
+ onContextmenu: ($event) => openContextMenu(index, col_schema.name, $event)
255
+ }, toDisplayString(col_schema.name) + " (" + toDisplayString(col_schema.data_type) + ") ", 43, _hoisted_4);
256
+ }), 128))
257
+ ])) : createCommentVNode("", true)
258
+ ]),
259
+ showContextMenu.value ? (openBlock(), createElementBlock("div", {
260
+ key: 0,
261
+ ref_key: "contextMenuRef",
262
+ ref: contextMenuRef,
263
+ class: "context-menu",
264
+ style: normalizeStyle({
265
+ top: contextMenuPosition.value.y + "px",
266
+ left: contextMenuPosition.value.x + "px"
267
+ })
268
+ }, [
269
+ createBaseVNode("button", {
270
+ onClick: _cache[0] || (_cache[0] = ($event) => setAggregations("groupby", selectedColumns.value))
271
+ }, "Group by"),
272
+ (openBlock(), createElementBlock(Fragment, null, renderList(singleColumnAggOptions, (option) => {
273
+ return openBlock(), createElementBlock(Fragment, {
274
+ key: option.value
275
+ }, [
276
+ singleColumnSelected.value ? (openBlock(), createElementBlock("button", {
277
+ key: 0,
278
+ onClick: ($event) => setAggregations(option.value, selectedColumns.value)
279
+ }, toDisplayString(option.label), 9, _hoisted_5)) : createCommentVNode("", true)
280
+ ], 64);
281
+ }), 64))
282
+ ], 4)) : createCommentVNode("", true),
283
+ _cache[3] || (_cache[3] = createBaseVNode("div", { class: "listbox-subtitle" }, "Settings", -1)),
284
+ dataLoaded.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
285
+ createBaseVNode("table", _hoisted_7, [
286
+ _cache[2] || (_cache[2] = createBaseVNode("thead", null, [
287
+ createBaseVNode("tr", null, [
288
+ createBaseVNode("th", null, "Field"),
289
+ createBaseVNode("th", null, "Action"),
290
+ createBaseVNode("th", null, "Output Field Name")
291
+ ])
292
+ ], -1)),
293
+ createBaseVNode("tbody", null, [
294
+ (openBlock(true), createElementBlock(Fragment, null, renderList(groupByInput.value.agg_cols, (item, index) => {
295
+ return openBlock(), createElementBlock("tr", {
296
+ key: index,
297
+ onContextmenu: withModifiers(($event) => openRowContextMenu($event, index), ["prevent"])
298
+ }, [
299
+ createBaseVNode("td", null, toDisplayString(item.old_name), 1),
300
+ createBaseVNode("td", null, [
301
+ createVNode(_component_el_select, {
302
+ modelValue: item.agg,
303
+ "onUpdate:modelValue": ($event) => item.agg = $event,
304
+ size: "small"
305
+ }, {
306
+ default: withCtx(() => [
307
+ (openBlock(), createElementBlock(Fragment, null, renderList(aggOptions, (aggOption) => {
308
+ return createVNode(_component_el_option, {
309
+ key: aggOption,
310
+ label: aggOption,
311
+ value: aggOption
312
+ }, null, 8, ["label", "value"]);
313
+ }), 64))
314
+ ]),
315
+ _: 2
316
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
317
+ ]),
318
+ createBaseVNode("td", null, [
319
+ createVNode(_component_el_input, {
320
+ modelValue: item.new_name,
321
+ "onUpdate:modelValue": ($event) => item.new_name = $event,
322
+ class: "w-50 m-2",
323
+ size: "small"
324
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
325
+ ])
326
+ ], 40, _hoisted_8);
327
+ }), 128))
328
+ ])
329
+ ])
330
+ ])) : createCommentVNode("", true),
331
+ showContextMenuRemove.value ? (openBlock(), createElementBlock("div", {
332
+ key: 2,
333
+ class: "context-menu",
334
+ style: normalizeStyle({
335
+ top: contextMenuPosition.value.y + "px",
336
+ left: contextMenuPosition.value.x + "px"
337
+ })
338
+ }, [
339
+ createBaseVNode("button", { onClick: removeRow }, "Remove")
340
+ ], 4)) : createCommentVNode("", true)
341
+ ];
342
+ }),
343
+ _: 1
344
+ }, 8, ["modelValue"])
345
+ ])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }));
346
+ };
347
+ }
348
+ });
349
+ const groupBy_vue_vue_type_style_index_0_scoped_f29b10dc_lang = "";
350
+ const readInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f29b10dc"]]);
351
+ const _hoisted_1 = { ref: "el" };
352
+ const _sfc_main = /* @__PURE__ */ defineComponent({
353
+ __name: "GroupBy",
354
+ props: {
355
+ nodeId: {
356
+ type: Number,
357
+ required: true
358
+ }
359
+ },
360
+ setup(__props) {
361
+ const nodeStore = useNodeStore();
362
+ const childComp = ref(null);
363
+ const props = __props;
364
+ const drawer = ref(false);
365
+ const closeOnDrawer = () => {
366
+ var _a;
367
+ drawer.value = false;
368
+ (_a = childComp.value) == null ? void 0 : _a.pushNodeData();
369
+ };
370
+ const openDrawer = async () => {
371
+ nodeStore.closeDrawer();
372
+ drawer.value = true;
373
+ nodeStore.isDrawerOpen;
374
+ nodeStore.isDrawerOpen = true;
375
+ await nextTick();
376
+ if (childComp.value) {
377
+ childComp.value.loadNodeData(props.nodeId);
378
+ nodeStore.openDrawer(closeOnDrawer);
379
+ }
380
+ };
381
+ onMounted(async () => {
382
+ await nextTick();
383
+ });
384
+ return (_ctx, _cache) => {
385
+ return openBlock(), createElementBlock("div", _hoisted_1, [
386
+ createVNode(NodeButton, {
387
+ ref: "nodeButton",
388
+ "node-id": __props.nodeId,
389
+ "image-src": "group_by.png",
390
+ title: `${__props.nodeId}: Group by`,
391
+ onClick: openDrawer
392
+ }, null, 8, ["node-id", "title"]),
393
+ drawer.value ? (openBlock(), createBlock(Teleport, {
394
+ key: 0,
395
+ to: "#nodesettings"
396
+ }, [
397
+ createVNode(NodeTitle, {
398
+ title: "Group by",
399
+ intro: "Group data by a column"
400
+ }),
401
+ createVNode(readInput, {
402
+ ref_key: "childComp",
403
+ ref: childComp,
404
+ "node-id": __props.nodeId
405
+ }, null, 8, ["node-id"])
406
+ ])) : createCommentVNode("", true)
407
+ ], 512);
408
+ };
409
+ }
410
+ });
411
+ export {
412
+ _sfc_main as default
413
+ };
@@ -0,0 +1,109 @@
1
+
2
+ /* Join Type Selector */
3
+ .join-type-selector[data-v-ed38aa97] {
4
+ display: flex;
5
+ align-items: center;
6
+ margin: 12px;
7
+ gap: 10px;
8
+ }
9
+ .join-type-label[data-v-ed38aa97] {
10
+ font-size: 12px;
11
+ color: #333;
12
+ font-weight: 500;
13
+ min-width: 70px;
14
+ }
15
+
16
+ /* Join Mapping Section */
17
+ .table-wrapper[data-v-ed38aa97] {
18
+ border: 1px solid #eee;
19
+ border-radius: 6px;
20
+ overflow: hidden;
21
+ margin: 5px;
22
+ }
23
+ .selectors-header[data-v-ed38aa97] {
24
+ display: flex;
25
+ justify-content: space-between;
26
+ padding: 8px 16px;
27
+ background-color: #fafafa;
28
+ border-bottom: 1px solid #eee;
29
+ }
30
+ .selectors-title[data-v-ed38aa97] {
31
+ flex: 1;
32
+ text-align: center;
33
+ font-size: 12px;
34
+ color: #666;
35
+ font-weight: 500;
36
+ }
37
+ .selectors-container[data-v-ed38aa97] {
38
+ padding: 12px;
39
+ box-sizing: border-box;
40
+ width: 100%;
41
+ display: flex;
42
+ justify-content: space-between;
43
+ flex-direction: column;
44
+ }
45
+ .selectors-row[data-v-ed38aa97] {
46
+ display: flex;
47
+ gap: 12px;
48
+ margin-bottom: 8px;
49
+ width: 100%;
50
+ display: flex;
51
+ justify-content: space-between;
52
+ }
53
+ .selectors-row[data-v-ed38aa97]:last-child {
54
+ margin-bottom: 0;
55
+ }
56
+
57
+ /* Action Buttons */
58
+ .action-buttons[data-v-ed38aa97] {
59
+ display: flex;
60
+ gap: 4px;
61
+ min-width: 60px;
62
+ justify-content: center;
63
+ }
64
+ .action-button[data-v-ed38aa97],
65
+ .add-join-button[data-v-ed38aa97],
66
+ .remove-join-button[data-v-ed38aa97] {
67
+ cursor: pointer;
68
+ width: 24px;
69
+ height: 24px;
70
+ border-radius: 4px;
71
+ border: 1px solid #ddd;
72
+ background-color: #fff;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ font-size: 14px;
77
+ transition: all 0.2s ease;
78
+ }
79
+ .add-join-button[data-v-ed38aa97] {
80
+ color: #45a049;
81
+ border-color: #45a049;
82
+ }
83
+ .add-join-button[data-v-ed38aa97]:hover {
84
+ background-color: #45a049;
85
+ color: #fff;
86
+ }
87
+ .remove-join-button[data-v-ed38aa97] {
88
+ color: #d32f2f;
89
+ border-color: #d32f2f;
90
+ }
91
+ .remove-join-button[data-v-ed38aa97]:hover {
92
+ background-color: #d32f2f;
93
+ color: #fff;
94
+ }
95
+
96
+ /* Custom scrollbar */
97
+ .selectors-container[data-v-ed38aa97]::-webkit-scrollbar {
98
+ width: 8px;
99
+ }
100
+ .selectors-container[data-v-ed38aa97]::-webkit-scrollbar-track {
101
+ background: transparent;
102
+ }
103
+ .selectors-container[data-v-ed38aa97]::-webkit-scrollbar-thumb {
104
+ background-color: rgba(0, 0, 0, 0.1);
105
+ border-radius: 4px;
106
+ }
107
+ .selectors-container[data-v-ed38aa97]::-webkit-scrollbar-thumb:hover {
108
+ background-color: rgba(0, 0, 0, 0.2);
109
+ }