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.
- flowfile/__init__.py +14 -7
- flowfile/__main__.py +51 -15
- flowfile/api.py +379 -0
- flowfile/web/__init__.py +155 -0
- flowfile/web/static/assets/AirbyteReader-1ac35765.css +314 -0
- flowfile/web/static/assets/AirbyteReader-cb0c1d4a.js +921 -0
- flowfile/web/static/assets/CrossJoin-41efa4cb.css +100 -0
- flowfile/web/static/assets/CrossJoin-a514fa59.js +153 -0
- flowfile/web/static/assets/DatabaseConnectionSettings-0c04b2e5.css +77 -0
- flowfile/web/static/assets/DatabaseConnectionSettings-f2cecf33.js +151 -0
- flowfile/web/static/assets/DatabaseManager-30fa27e5.css +64 -0
- flowfile/web/static/assets/DatabaseManager-83ee3c98.js +484 -0
- flowfile/web/static/assets/DatabaseReader-dc0c6881.js +426 -0
- flowfile/web/static/assets/DatabaseReader-f50c6558.css +158 -0
- flowfile/web/static/assets/DatabaseWriter-2f570e53.css +96 -0
- flowfile/web/static/assets/DatabaseWriter-5afe9f8d.js +312 -0
- flowfile/web/static/assets/ExploreData-5bdae813.css +45 -0
- flowfile/web/static/assets/ExploreData-c7ee19cf.js +118306 -0
- flowfile/web/static/assets/ExternalSource-17b23a01.js +225 -0
- flowfile/web/static/assets/ExternalSource-e37b6275.css +94 -0
- flowfile/web/static/assets/Filter-90856b4f.js +238 -0
- flowfile/web/static/assets/Filter-a9d08ba1.css +20 -0
- flowfile/web/static/assets/Formula-38b71e9e.js +197 -0
- flowfile/web/static/assets/Formula-d60a74f4.css +17 -0
- flowfile/web/static/assets/FuzzyMatch-6857de82.css +254 -0
- flowfile/web/static/assets/FuzzyMatch-d0f1fe81.js +422 -0
- flowfile/web/static/assets/GoogleSheet-854294a4.js +2616 -0
- flowfile/web/static/assets/GoogleSheet-92084da7.css +233 -0
- flowfile/web/static/assets/GraphSolver-0c86bbc6.js +382 -0
- flowfile/web/static/assets/GraphSolver-17fd26db.css +68 -0
- flowfile/web/static/assets/GroupBy-ab1ea74b.css +51 -0
- flowfile/web/static/assets/GroupBy-f2772e9f.js +413 -0
- flowfile/web/static/assets/Join-41c0f331.css +109 -0
- flowfile/web/static/assets/Join-bc3e1cf7.js +247 -0
- flowfile/web/static/assets/ManualInput-03aa0245.js +391 -0
- flowfile/web/static/assets/ManualInput-ac7b9972.css +84 -0
- flowfile/web/static/assets/Output-48f81019.css +2642 -0
- flowfile/web/static/assets/Output-5b35eee8.js +536 -0
- flowfile/web/static/assets/Pivot-7164087c.js +408 -0
- flowfile/web/static/assets/Pivot-f415e85f.css +35 -0
- flowfile/web/static/assets/PolarsCode-3abf6507.js +2863 -0
- flowfile/web/static/assets/PolarsCode-650322d1.css +35 -0
- flowfile/web/static/assets/PopOver-b37ff9be.js +577 -0
- flowfile/web/static/assets/PopOver-bccfde04.css +32 -0
- flowfile/web/static/assets/Read-65966a3e.js +701 -0
- flowfile/web/static/assets/Read-80dc1675.css +197 -0
- flowfile/web/static/assets/RecordCount-c66c6d6d.js +121 -0
- flowfile/web/static/assets/RecordId-826dc095.js +339 -0
- flowfile/web/static/assets/Sample-4ed555c8.js +184 -0
- flowfile/web/static/assets/SecretManager-eac1e97d.js +382 -0
- flowfile/web/static/assets/Select-085f05cc.js +231 -0
- flowfile/web/static/assets/SettingsSection-1f5e79c1.js +87 -0
- flowfile/web/static/assets/SettingsSection-9c836ecc.css +47 -0
- flowfile/web/static/assets/Sort-3e6cb414.js +309 -0
- flowfile/web/static/assets/Sort-7ccfa0fe.css +51 -0
- flowfile/web/static/assets/TextToRows-606349bc.js +307 -0
- flowfile/web/static/assets/TextToRows-c92d1ec2.css +48 -0
- flowfile/web/static/assets/UnavailableFields-5edd5322.css +49 -0
- flowfile/web/static/assets/UnavailableFields-b41976ed.js +36 -0
- flowfile/web/static/assets/Union-8d9ac7f9.css +30 -0
- flowfile/web/static/assets/Union-fca91665.js +145 -0
- flowfile/web/static/assets/Unique-a59f830e.js +273 -0
- flowfile/web/static/assets/Unique-b5615727.css +51 -0
- flowfile/web/static/assets/Unpivot-246e9bbd.css +77 -0
- flowfile/web/static/assets/Unpivot-c3815565.js +441 -0
- flowfile/web/static/assets/airbyte-292aa232.png +0 -0
- flowfile/web/static/assets/api-22b338bd.js +60 -0
- flowfile/web/static/assets/cross_join-d30c0290.png +0 -0
- flowfile/web/static/assets/database_reader-ce1e55f3.svg +24 -0
- flowfile/web/static/assets/database_writer-b4ad0753.svg +23 -0
- flowfile/web/static/assets/designer-2394122a.css +10697 -0
- flowfile/web/static/assets/designer-e5bbe26f.js +69712 -0
- flowfile/web/static/assets/documentation-08045cf2.js +33 -0
- flowfile/web/static/assets/documentation-12216a74.css +50 -0
- flowfile/web/static/assets/dropDown-35135ba8.css +143 -0
- flowfile/web/static/assets/dropDown-5e7e9a5a.js +319 -0
- flowfile/web/static/assets/dropDownGeneric-50a91b99.js +72 -0
- flowfile/web/static/assets/dropDownGeneric-895680d6.css +10 -0
- flowfile/web/static/assets/element-icons-9c88a535.woff +0 -0
- flowfile/web/static/assets/element-icons-de5eb258.ttf +0 -0
- flowfile/web/static/assets/explore_data-8a0a2861.png +0 -0
- flowfile/web/static/assets/fa-brands-400-808443ae.ttf +0 -0
- flowfile/web/static/assets/fa-brands-400-d7236a19.woff2 +0 -0
- flowfile/web/static/assets/fa-regular-400-54cf6086.ttf +0 -0
- flowfile/web/static/assets/fa-regular-400-e3456d12.woff2 +0 -0
- flowfile/web/static/assets/fa-solid-900-aa759986.woff2 +0 -0
- flowfile/web/static/assets/fa-solid-900-d2f05935.ttf +0 -0
- flowfile/web/static/assets/fa-v4compatibility-0ce9033c.woff2 +0 -0
- flowfile/web/static/assets/fa-v4compatibility-30f6abf6.ttf +0 -0
- flowfile/web/static/assets/filter-d7708bda.png +0 -0
- flowfile/web/static/assets/formula-eeeb1611.png +0 -0
- flowfile/web/static/assets/fullEditor-178376bb.css +256 -0
- flowfile/web/static/assets/fullEditor-705c6ccb.js +630 -0
- flowfile/web/static/assets/fuzzy_match-40c161b2.png +0 -0
- flowfile/web/static/assets/genericNodeSettings-65587f20.js +137 -0
- flowfile/web/static/assets/genericNodeSettings-924759c7.css +46 -0
- flowfile/web/static/assets/graph_solver-8b7888b8.png +0 -0
- flowfile/web/static/assets/group_by-80561fc3.png +0 -0
- flowfile/web/static/assets/index-552863fd.js +58652 -0
- flowfile/web/static/assets/index-681a3ed0.css +8843 -0
- flowfile/web/static/assets/input_data-ab2eb678.png +0 -0
- flowfile/web/static/assets/join-349043ae.png +0 -0
- flowfile/web/static/assets/manual_input-ae98f31d.png +0 -0
- flowfile/web/static/assets/nodeTitle-cf9bae3c.js +227 -0
- flowfile/web/static/assets/nodeTitle-f4b12bcb.css +134 -0
- flowfile/web/static/assets/old_join-5d0eb604.png +0 -0
- flowfile/web/static/assets/output-06ec0371.png +0 -0
- flowfile/web/static/assets/pivot-9660df51.png +0 -0
- flowfile/web/static/assets/polars_code-05ce5dc6.png +0 -0
- flowfile/web/static/assets/record_count-dab44eb5.png +0 -0
- flowfile/web/static/assets/record_id-0b15856b.png +0 -0
- flowfile/web/static/assets/sample-693a88b5.png +0 -0
- flowfile/web/static/assets/secretApi-3ad510e1.js +46 -0
- flowfile/web/static/assets/select-b0d0437a.png +0 -0
- flowfile/web/static/assets/selectDynamic-b062bc9b.css +107 -0
- flowfile/web/static/assets/selectDynamic-bd644891.js +302 -0
- flowfile/web/static/assets/sort-2aa579f0.png +0 -0
- flowfile/web/static/assets/summarize-2a099231.png +0 -0
- flowfile/web/static/assets/text_to_rows-859b29ea.png +0 -0
- flowfile/web/static/assets/union-2d8609f4.png +0 -0
- flowfile/web/static/assets/unique-1958b98a.png +0 -0
- flowfile/web/static/assets/unpivot-d3cb4b5b.png +0 -0
- flowfile/web/static/assets/view-7a0f0be1.png +0 -0
- flowfile/web/static/assets/vue-codemirror.esm-dd17b478.js +22281 -0
- flowfile/web/static/assets/vue-content-loader.es-6b36f05e.js +210 -0
- flowfile/web/static/flowfile.svg +47 -0
- flowfile/web/static/icons/flowfile.png +0 -0
- flowfile/web/static/images/airbyte.png +0 -0
- flowfile/web/static/images/flowfile.svg +47 -0
- flowfile/web/static/images/google.svg +1 -0
- flowfile/web/static/images/sheets.png +0 -0
- flowfile/web/static/index.html +22 -0
- flowfile/web/static/vite.svg +1 -0
- flowfile/web/static/vue.svg +1 -0
- flowfile-0.3.0.1.dist-info/METADATA +219 -0
- {flowfile-0.2.2.dist-info → flowfile-0.3.0.1.dist-info}/RECORD +147 -16
- {flowfile-0.2.2.dist-info → flowfile-0.3.0.1.dist-info}/entry_points.txt +1 -1
- flowfile_core/configs/settings.py +7 -32
- flowfile_core/flowfile/FlowfileFlow.py +4 -2
- flowfile_core/flowfile/analytics/analytics_processor.py +1 -1
- flowfile_core/main.py +4 -1
- flowfile_core/schemas/input_schema.py +1 -8
- flowfile_frame/__init__.py +1 -2
- flowfile_frame/flow_frame.py +6 -6
- flowfile_frame/utils.py +1 -140
- flowfile-0.2.2.dist-info/METADATA +0 -225
- flowfile_frame/__main__.py +0 -12
- {flowfile-0.2.2.dist-info → flowfile-0.3.0.1.dist-info}/LICENSE +0 -0
- {flowfile-0.2.2.dist-info → flowfile-0.3.0.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,701 @@
|
|
|
1
|
+
import { C as CodeLoader } from "./vue-content-loader.es-6b36f05e.js";
|
|
2
|
+
import { a as axios, d as defineComponent, r as ref, l as computed, n as onMounted, m as watch, b as resolveComponent, c as openBlock, e as createElementBlock, p as createBaseVNode, f as createVNode, w as withCtx, i as createCommentVNode, t as toDisplayString, a4 as withDirectives, a5 as vModelText, h as createBlock, u as unref, _ as _export_sfc, ar as ElCheckbox, F as Fragment, q as renderList, an as ElOption, ao as ElSelect, as as ElSlider, R as nextTick, a6 as Teleport } from "./index-552863fd.js";
|
|
3
|
+
import { C as ColumnSelector } from "./dropDown-5e7e9a5a.js";
|
|
4
|
+
import { u as useNodeStore } from "./PopOver-b37ff9be.js";
|
|
5
|
+
import { F as FileBrowser } from "./designer-e5bbe26f.js";
|
|
6
|
+
import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
|
|
7
|
+
const getXlsxSheetNamesForPath = async (path) => {
|
|
8
|
+
const response = await axios.get(`/api/get_xlsx_sheet_names?path=${path}`);
|
|
9
|
+
return response.data;
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_1$3 = { key: 0 };
|
|
12
|
+
const _hoisted_2$2 = { class: "table" };
|
|
13
|
+
const _hoisted_3$2 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "selectors"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_4$2 = { class: "row" };
|
|
18
|
+
const _hoisted_5$2 = { class: "input-wrapper" };
|
|
19
|
+
const _hoisted_6$2 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "warning-sign"
|
|
22
|
+
};
|
|
23
|
+
const _hoisted_7$2 = { class: "row" };
|
|
24
|
+
const _hoisted_8$1 = { class: "button-container" };
|
|
25
|
+
const _hoisted_9$1 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "optional-section"
|
|
28
|
+
};
|
|
29
|
+
const _hoisted_10 = { class: "row" };
|
|
30
|
+
const _hoisted_11 = { class: "input-wrapper" };
|
|
31
|
+
const _hoisted_12 = { class: "input-wrapper" };
|
|
32
|
+
const _hoisted_13 = { class: "row" };
|
|
33
|
+
const _hoisted_14 = { class: "input-wrapper" };
|
|
34
|
+
const _hoisted_15 = { class: "input-wrapper" };
|
|
35
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
36
|
+
__name: "readExcel",
|
|
37
|
+
props: {
|
|
38
|
+
modelValue: {
|
|
39
|
+
type: Object,
|
|
40
|
+
required: true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
emits: ["update:modelValue"],
|
|
44
|
+
setup(__props, { emit: __emit }) {
|
|
45
|
+
const props = __props;
|
|
46
|
+
const isLoaded = ref(false);
|
|
47
|
+
const emit = __emit;
|
|
48
|
+
const localExcelTable = ref({ ...props.modelValue });
|
|
49
|
+
const showOptionalSettings = ref(false);
|
|
50
|
+
const sheetNames = ref([]);
|
|
51
|
+
const sheetNamesLoaded = ref(false);
|
|
52
|
+
const getSheetNames = async () => {
|
|
53
|
+
sheetNames.value = await getXlsxSheetNamesForPath(localExcelTable.value.path);
|
|
54
|
+
sheetNamesLoaded.value = true;
|
|
55
|
+
};
|
|
56
|
+
const toggleOptionalSettings = () => {
|
|
57
|
+
showOptionalSettings.value = !showOptionalSettings.value;
|
|
58
|
+
};
|
|
59
|
+
const showWarning = computed(() => {
|
|
60
|
+
if (!sheetNamesLoaded.value) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
return !sheetNames.value.includes(localExcelTable.value.sheet_name);
|
|
64
|
+
});
|
|
65
|
+
onMounted(() => {
|
|
66
|
+
if (localExcelTable.value.path) {
|
|
67
|
+
getSheetNames();
|
|
68
|
+
}
|
|
69
|
+
isLoaded.value = true;
|
|
70
|
+
});
|
|
71
|
+
watch(
|
|
72
|
+
() => localExcelTable.value,
|
|
73
|
+
(newValue) => {
|
|
74
|
+
emit("update:modelValue", { ...newValue });
|
|
75
|
+
},
|
|
76
|
+
{ deep: true }
|
|
77
|
+
);
|
|
78
|
+
return (_ctx, _cache) => {
|
|
79
|
+
const _component_el_row = resolveComponent("el-row");
|
|
80
|
+
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
81
|
+
return isLoaded.value ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
82
|
+
createBaseVNode("div", _hoisted_2$2, [
|
|
83
|
+
localExcelTable.value ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
84
|
+
createBaseVNode("div", _hoisted_4$2, [
|
|
85
|
+
createVNode(_component_el_row, null, {
|
|
86
|
+
default: withCtx(() => [
|
|
87
|
+
createBaseVNode("div", _hoisted_5$2, [
|
|
88
|
+
_cache[7] || (_cache[7] = createBaseVNode("label", null, "Sheet Name", -1)),
|
|
89
|
+
createVNode(ColumnSelector, {
|
|
90
|
+
modelValue: localExcelTable.value.sheet_name,
|
|
91
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localExcelTable.value.sheet_name = $event),
|
|
92
|
+
placeholder: "Select or type sheet name",
|
|
93
|
+
"column-options": sheetNames.value,
|
|
94
|
+
"is-loading": !sheetNamesLoaded.value
|
|
95
|
+
}, null, 8, ["modelValue", "column-options", "is-loading"]),
|
|
96
|
+
showWarning.value ? (openBlock(), createElementBlock("span", _hoisted_6$2, "⚠️")) : createCommentVNode("", true)
|
|
97
|
+
])
|
|
98
|
+
]),
|
|
99
|
+
_: 1
|
|
100
|
+
})
|
|
101
|
+
]),
|
|
102
|
+
createBaseVNode("div", _hoisted_7$2, [
|
|
103
|
+
createVNode(_component_el_checkbox, {
|
|
104
|
+
modelValue: localExcelTable.value.has_headers,
|
|
105
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => localExcelTable.value.has_headers = $event),
|
|
106
|
+
label: "Has headers",
|
|
107
|
+
size: "large"
|
|
108
|
+
}, null, 8, ["modelValue"]),
|
|
109
|
+
createVNode(_component_el_checkbox, {
|
|
110
|
+
modelValue: localExcelTable.value.type_inference,
|
|
111
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => localExcelTable.value.type_inference = $event),
|
|
112
|
+
label: "Type inference",
|
|
113
|
+
size: "large"
|
|
114
|
+
}, null, 8, ["modelValue"])
|
|
115
|
+
]),
|
|
116
|
+
_cache[15] || (_cache[15] = createBaseVNode("hr", { class: "section-divider" }, null, -1)),
|
|
117
|
+
createBaseVNode("div", _hoisted_8$1, [
|
|
118
|
+
createBaseVNode("button", {
|
|
119
|
+
class: "toggle-button",
|
|
120
|
+
onClick: toggleOptionalSettings
|
|
121
|
+
}, toDisplayString(showOptionalSettings.value ? "Hide" : "Show") + " Optional Settings ", 1)
|
|
122
|
+
]),
|
|
123
|
+
showOptionalSettings.value ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
|
|
124
|
+
_cache[12] || (_cache[12] = createBaseVNode("hr", { class: "section-divider" }, null, -1)),
|
|
125
|
+
_cache[13] || (_cache[13] = createBaseVNode("div", { class: "table-sizes" }, "Table sizes", -1)),
|
|
126
|
+
createBaseVNode("div", _hoisted_10, [
|
|
127
|
+
createBaseVNode("div", _hoisted_11, [
|
|
128
|
+
_cache[8] || (_cache[8] = createBaseVNode("label", { for: "start-row" }, "Start Row", -1)),
|
|
129
|
+
withDirectives(createBaseVNode("input", {
|
|
130
|
+
id: "start-row",
|
|
131
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => localExcelTable.value.start_row = $event),
|
|
132
|
+
type: "number",
|
|
133
|
+
class: "compact-input"
|
|
134
|
+
}, null, 512), [
|
|
135
|
+
[
|
|
136
|
+
vModelText,
|
|
137
|
+
localExcelTable.value.start_row,
|
|
138
|
+
void 0,
|
|
139
|
+
{ number: true }
|
|
140
|
+
]
|
|
141
|
+
])
|
|
142
|
+
]),
|
|
143
|
+
createBaseVNode("div", _hoisted_12, [
|
|
144
|
+
_cache[9] || (_cache[9] = createBaseVNode("label", { for: "end-row" }, "End Row", -1)),
|
|
145
|
+
withDirectives(createBaseVNode("input", {
|
|
146
|
+
id: "end-row",
|
|
147
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => localExcelTable.value.end_row = $event),
|
|
148
|
+
type: "number",
|
|
149
|
+
class: "compact-input"
|
|
150
|
+
}, null, 512), [
|
|
151
|
+
[
|
|
152
|
+
vModelText,
|
|
153
|
+
localExcelTable.value.end_row,
|
|
154
|
+
void 0,
|
|
155
|
+
{ number: true }
|
|
156
|
+
]
|
|
157
|
+
])
|
|
158
|
+
])
|
|
159
|
+
]),
|
|
160
|
+
_cache[14] || (_cache[14] = createBaseVNode("hr", { class: "section-divider" }, null, -1)),
|
|
161
|
+
createBaseVNode("div", _hoisted_13, [
|
|
162
|
+
createBaseVNode("div", _hoisted_14, [
|
|
163
|
+
_cache[10] || (_cache[10] = createBaseVNode("label", { for: "start-column" }, "Start Column", -1)),
|
|
164
|
+
withDirectives(createBaseVNode("input", {
|
|
165
|
+
id: "start-column",
|
|
166
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => localExcelTable.value.start_column = $event),
|
|
167
|
+
type: "number",
|
|
168
|
+
class: "compact-input"
|
|
169
|
+
}, null, 512), [
|
|
170
|
+
[
|
|
171
|
+
vModelText,
|
|
172
|
+
localExcelTable.value.start_column,
|
|
173
|
+
void 0,
|
|
174
|
+
{ number: true }
|
|
175
|
+
]
|
|
176
|
+
])
|
|
177
|
+
]),
|
|
178
|
+
createBaseVNode("div", _hoisted_15, [
|
|
179
|
+
_cache[11] || (_cache[11] = createBaseVNode("label", { for: "end-column" }, "End Column", -1)),
|
|
180
|
+
withDirectives(createBaseVNode("input", {
|
|
181
|
+
id: "end-column",
|
|
182
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => localExcelTable.value.end_column = $event),
|
|
183
|
+
type: "number",
|
|
184
|
+
class: "compact-input"
|
|
185
|
+
}, null, 512), [
|
|
186
|
+
[
|
|
187
|
+
vModelText,
|
|
188
|
+
localExcelTable.value.end_column,
|
|
189
|
+
void 0,
|
|
190
|
+
{ number: true }
|
|
191
|
+
]
|
|
192
|
+
])
|
|
193
|
+
])
|
|
194
|
+
])
|
|
195
|
+
])) : createCommentVNode("", true)
|
|
196
|
+
])) : createCommentVNode("", true)
|
|
197
|
+
])
|
|
198
|
+
])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }));
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
const readExcel_vue_vue_type_style_index_0_scoped_e7395814_lang = "";
|
|
203
|
+
const ExcelTableConfig = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e7395814"]]);
|
|
204
|
+
const _hoisted_1$2 = { class: "csv-table-settings" };
|
|
205
|
+
const _hoisted_2$1 = { class: "row" };
|
|
206
|
+
const _hoisted_3$1 = { class: "row" };
|
|
207
|
+
const _hoisted_4$1 = { class: "row" };
|
|
208
|
+
const _hoisted_5$1 = { class: "row" };
|
|
209
|
+
const _hoisted_6$1 = { class: "row" };
|
|
210
|
+
const _hoisted_7$1 = { class: "row" };
|
|
211
|
+
const _hoisted_8 = { class: "row" };
|
|
212
|
+
const _hoisted_9 = { class: "row" };
|
|
213
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
214
|
+
__name: "readCsv",
|
|
215
|
+
props: {
|
|
216
|
+
modelValue: {
|
|
217
|
+
type: Object,
|
|
218
|
+
required: true
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
emits: ["update:modelValue"],
|
|
222
|
+
setup(__props, { emit: __emit }) {
|
|
223
|
+
const props = __props;
|
|
224
|
+
const emit = __emit;
|
|
225
|
+
const localCsvTable = ref(props.modelValue);
|
|
226
|
+
const updateParent = () => {
|
|
227
|
+
emit("update:modelValue", localCsvTable.value);
|
|
228
|
+
};
|
|
229
|
+
const csv_settings = {
|
|
230
|
+
delimiter_options: [",", ";", "|", "tab"],
|
|
231
|
+
encoding_options: ["utf-8", "ISO-8859-1", "ASCII"],
|
|
232
|
+
row_delimiter: ["\\n", "\\r\\n", "\\r"],
|
|
233
|
+
quote_char: ['"', "'", "auto"]
|
|
234
|
+
};
|
|
235
|
+
watch(
|
|
236
|
+
() => props.modelValue,
|
|
237
|
+
(newVal) => {
|
|
238
|
+
localCsvTable.value = newVal;
|
|
239
|
+
},
|
|
240
|
+
{ deep: true }
|
|
241
|
+
);
|
|
242
|
+
return (_ctx, _cache) => {
|
|
243
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
244
|
+
createBaseVNode("div", _hoisted_2$1, [
|
|
245
|
+
_cache[8] || (_cache[8] = createBaseVNode("label", { for: "has-headers" }, "Has Headers:", -1)),
|
|
246
|
+
createVNode(unref(ElCheckbox), {
|
|
247
|
+
modelValue: localCsvTable.value.has_headers,
|
|
248
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localCsvTable.value.has_headers = $event),
|
|
249
|
+
size: "large",
|
|
250
|
+
onChange: updateParent
|
|
251
|
+
}, null, 8, ["modelValue"])
|
|
252
|
+
]),
|
|
253
|
+
createBaseVNode("div", _hoisted_3$1, [
|
|
254
|
+
_cache[9] || (_cache[9] = createBaseVNode("label", { for: "delimiter" }, "Delimiter:", -1)),
|
|
255
|
+
createVNode(unref(ElSelect), {
|
|
256
|
+
modelValue: localCsvTable.value.delimiter,
|
|
257
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => localCsvTable.value.delimiter = $event),
|
|
258
|
+
placeholder: "Select delimiter",
|
|
259
|
+
clearable: "",
|
|
260
|
+
size: "small",
|
|
261
|
+
onChange: updateParent
|
|
262
|
+
}, {
|
|
263
|
+
default: withCtx(() => [
|
|
264
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(csv_settings.delimiter_options, (option) => {
|
|
265
|
+
return openBlock(), createBlock(unref(ElOption), {
|
|
266
|
+
key: option,
|
|
267
|
+
label: option,
|
|
268
|
+
value: option
|
|
269
|
+
}, null, 8, ["label", "value"]);
|
|
270
|
+
}), 128))
|
|
271
|
+
]),
|
|
272
|
+
_: 1
|
|
273
|
+
}, 8, ["modelValue"])
|
|
274
|
+
]),
|
|
275
|
+
createBaseVNode("div", _hoisted_4$1, [
|
|
276
|
+
_cache[10] || (_cache[10] = createBaseVNode("label", { for: "encoding" }, "Encoding:", -1)),
|
|
277
|
+
createVNode(unref(ElSelect), {
|
|
278
|
+
modelValue: localCsvTable.value.encoding,
|
|
279
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => localCsvTable.value.encoding = $event),
|
|
280
|
+
placeholder: "Select encoding",
|
|
281
|
+
clearable: "",
|
|
282
|
+
size: "small",
|
|
283
|
+
onChange: updateParent
|
|
284
|
+
}, {
|
|
285
|
+
default: withCtx(() => [
|
|
286
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(csv_settings.encoding_options, (option) => {
|
|
287
|
+
return openBlock(), createBlock(unref(ElOption), {
|
|
288
|
+
key: option,
|
|
289
|
+
label: option,
|
|
290
|
+
value: option
|
|
291
|
+
}, null, 8, ["label", "value"]);
|
|
292
|
+
}), 128))
|
|
293
|
+
]),
|
|
294
|
+
_: 1
|
|
295
|
+
}, 8, ["modelValue"])
|
|
296
|
+
]),
|
|
297
|
+
createBaseVNode("div", _hoisted_5$1, [
|
|
298
|
+
_cache[11] || (_cache[11] = createBaseVNode("label", { for: "quote-char" }, "Quote Character:", -1)),
|
|
299
|
+
createVNode(unref(ElSelect), {
|
|
300
|
+
modelValue: localCsvTable.value.quote_char,
|
|
301
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => localCsvTable.value.quote_char = $event),
|
|
302
|
+
placeholder: "Select quote character",
|
|
303
|
+
clearable: "",
|
|
304
|
+
size: "small",
|
|
305
|
+
onChange: updateParent
|
|
306
|
+
}, {
|
|
307
|
+
default: withCtx(() => [
|
|
308
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(csv_settings.quote_char, (option) => {
|
|
309
|
+
return openBlock(), createBlock(unref(ElOption), {
|
|
310
|
+
key: option,
|
|
311
|
+
label: option,
|
|
312
|
+
value: option
|
|
313
|
+
}, null, 8, ["label", "value"]);
|
|
314
|
+
}), 128))
|
|
315
|
+
]),
|
|
316
|
+
_: 1
|
|
317
|
+
}, 8, ["modelValue"])
|
|
318
|
+
]),
|
|
319
|
+
createBaseVNode("div", _hoisted_6$1, [
|
|
320
|
+
_cache[12] || (_cache[12] = createBaseVNode("label", { for: "row-delimiter" }, "New Line Delimiter:", -1)),
|
|
321
|
+
createVNode(unref(ElSelect), {
|
|
322
|
+
modelValue: localCsvTable.value.row_delimiter,
|
|
323
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => localCsvTable.value.row_delimiter = $event),
|
|
324
|
+
placeholder: "Select new line delimiter",
|
|
325
|
+
clearable: "",
|
|
326
|
+
size: "small",
|
|
327
|
+
onChange: updateParent
|
|
328
|
+
}, {
|
|
329
|
+
default: withCtx(() => [
|
|
330
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(csv_settings.row_delimiter, (option) => {
|
|
331
|
+
return openBlock(), createBlock(unref(ElOption), {
|
|
332
|
+
key: option,
|
|
333
|
+
label: option,
|
|
334
|
+
value: option
|
|
335
|
+
}, null, 8, ["label", "value"]);
|
|
336
|
+
}), 128))
|
|
337
|
+
]),
|
|
338
|
+
_: 1
|
|
339
|
+
}, 8, ["modelValue"])
|
|
340
|
+
]),
|
|
341
|
+
createBaseVNode("div", _hoisted_7$1, [
|
|
342
|
+
_cache[13] || (_cache[13] = createBaseVNode("label", { for: "infer-schema-length" }, "Schema Infer Length:", -1)),
|
|
343
|
+
createVNode(unref(ElSlider), {
|
|
344
|
+
modelValue: localCsvTable.value.infer_schema_length,
|
|
345
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => localCsvTable.value.infer_schema_length = $event),
|
|
346
|
+
step: 1e3,
|
|
347
|
+
max: 1e5,
|
|
348
|
+
min: 0,
|
|
349
|
+
"show-stops": "",
|
|
350
|
+
size: "small",
|
|
351
|
+
onChange: updateParent
|
|
352
|
+
}, null, 8, ["modelValue"])
|
|
353
|
+
]),
|
|
354
|
+
createBaseVNode("div", _hoisted_8, [
|
|
355
|
+
_cache[14] || (_cache[14] = createBaseVNode("label", { for: "truncate-long-lines" }, "Truncate Long Lines:", -1)),
|
|
356
|
+
createVNode(unref(ElCheckbox), {
|
|
357
|
+
modelValue: localCsvTable.value.truncate_ragged_lines,
|
|
358
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => localCsvTable.value.truncate_ragged_lines = $event),
|
|
359
|
+
size: "large",
|
|
360
|
+
onChange: updateParent
|
|
361
|
+
}, null, 8, ["modelValue"])
|
|
362
|
+
]),
|
|
363
|
+
createBaseVNode("div", _hoisted_9, [
|
|
364
|
+
_cache[15] || (_cache[15] = createBaseVNode("label", { for: "ignore-errors" }, "Ignore Errors:", -1)),
|
|
365
|
+
createVNode(unref(ElCheckbox), {
|
|
366
|
+
modelValue: localCsvTable.value.ignore_errors,
|
|
367
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => localCsvTable.value.ignore_errors = $event),
|
|
368
|
+
size: "large",
|
|
369
|
+
onChange: updateParent
|
|
370
|
+
}, null, 8, ["modelValue"])
|
|
371
|
+
])
|
|
372
|
+
]);
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
const readCsv_vue_vue_type_style_index_0_scoped_d0b76f7b_lang = "";
|
|
377
|
+
const CsvTableConfig = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-d0b76f7b"]]);
|
|
378
|
+
const _hoisted_1$1 = { class: "parquet-table-settings" };
|
|
379
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
380
|
+
__name: "readParquet",
|
|
381
|
+
props: {
|
|
382
|
+
modelValue: {
|
|
383
|
+
type: Object,
|
|
384
|
+
required: true
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
setup(__props) {
|
|
388
|
+
return (_ctx, _cache) => {
|
|
389
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, _cache[0] || (_cache[0] = [
|
|
390
|
+
createBaseVNode("div", { class: "message" }, [
|
|
391
|
+
createBaseVNode("h2", null, "You are ready to flow!"),
|
|
392
|
+
createBaseVNode("p", null, "Your Parquet table setup is complete. Enjoy the smooth data processing experience.")
|
|
393
|
+
], -1)
|
|
394
|
+
]));
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
const readParquet_vue_vue_type_style_index_0_scoped_0faf0508_lang = "";
|
|
399
|
+
const ParquetTableConfig = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-0faf0508"]]);
|
|
400
|
+
const _hoisted_1 = {
|
|
401
|
+
key: 0,
|
|
402
|
+
class: "listbox-wrapper"
|
|
403
|
+
};
|
|
404
|
+
const _hoisted_2 = { class: "listbox-wrapper" };
|
|
405
|
+
const _hoisted_3 = { class: "file-upload-container" };
|
|
406
|
+
const _hoisted_4 = {
|
|
407
|
+
for: "file-upload",
|
|
408
|
+
class: "file-upload-label"
|
|
409
|
+
};
|
|
410
|
+
const _hoisted_5 = { class: "file-label-text" };
|
|
411
|
+
const _hoisted_6 = { key: 0 };
|
|
412
|
+
const _hoisted_7 = { class: "listbox-wrapper" };
|
|
413
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
414
|
+
__name: "read",
|
|
415
|
+
setup(__props, { expose: __expose }) {
|
|
416
|
+
const nodeStore = useNodeStore();
|
|
417
|
+
const selectedFile = ref(null);
|
|
418
|
+
const isExcelFile = ref(false);
|
|
419
|
+
const isCsvFile = ref(false);
|
|
420
|
+
const isParquetFile = ref(false);
|
|
421
|
+
const nodeRead = ref(null);
|
|
422
|
+
const dataLoaded = ref(false);
|
|
423
|
+
const selectedPath = ref("");
|
|
424
|
+
const modalVisibleForOpen = ref(false);
|
|
425
|
+
const getDisplayFileName = computed(() => {
|
|
426
|
+
var _a, _b, _c;
|
|
427
|
+
if ((_a = selectedFile.value) == null ? void 0 : _a.name) {
|
|
428
|
+
return selectedFile.value.name;
|
|
429
|
+
}
|
|
430
|
+
if ((_c = (_b = nodeRead.value) == null ? void 0 : _b.received_file) == null ? void 0 : _c.name) {
|
|
431
|
+
return nodeRead.value.received_file.name;
|
|
432
|
+
}
|
|
433
|
+
return "Choose a file...";
|
|
434
|
+
});
|
|
435
|
+
const receivedExcelTable = ref({
|
|
436
|
+
name: "",
|
|
437
|
+
path: "",
|
|
438
|
+
file_type: "excel",
|
|
439
|
+
sheet_name: "",
|
|
440
|
+
start_row: 0,
|
|
441
|
+
start_column: 0,
|
|
442
|
+
end_row: 0,
|
|
443
|
+
end_column: 0,
|
|
444
|
+
has_headers: true,
|
|
445
|
+
type_inference: false
|
|
446
|
+
});
|
|
447
|
+
const receivedCsvTable = ref({
|
|
448
|
+
name: "",
|
|
449
|
+
path: "",
|
|
450
|
+
file_type: "csv",
|
|
451
|
+
reference: "",
|
|
452
|
+
starting_from_line: 0,
|
|
453
|
+
delimiter: ",",
|
|
454
|
+
has_headers: true,
|
|
455
|
+
encoding: "utf-8",
|
|
456
|
+
row_delimiter: "",
|
|
457
|
+
quote_char: "",
|
|
458
|
+
infer_schema_length: 1e3,
|
|
459
|
+
truncate_ragged_lines: false,
|
|
460
|
+
ignore_errors: false
|
|
461
|
+
});
|
|
462
|
+
const receivedParquetTable = ref({
|
|
463
|
+
name: "",
|
|
464
|
+
path: "",
|
|
465
|
+
file_type: "parquet"
|
|
466
|
+
});
|
|
467
|
+
const handleFileChange = (fileInfo) => {
|
|
468
|
+
var _a;
|
|
469
|
+
try {
|
|
470
|
+
if (!fileInfo) {
|
|
471
|
+
console.warn("No file info provided");
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
const fileType = (_a = fileInfo.name.split(".").pop()) == null ? void 0 : _a.toLowerCase();
|
|
475
|
+
if (!fileType) {
|
|
476
|
+
console.warn("No file type detected");
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
isExcelFile.value = false;
|
|
480
|
+
isCsvFile.value = false;
|
|
481
|
+
isParquetFile.value = false;
|
|
482
|
+
switch (fileType) {
|
|
483
|
+
case "xlsx":
|
|
484
|
+
isExcelFile.value = true;
|
|
485
|
+
receivedExcelTable.value.path = fileInfo.path;
|
|
486
|
+
receivedExcelTable.value.name = fileInfo.name;
|
|
487
|
+
break;
|
|
488
|
+
case "csv":
|
|
489
|
+
case "txt":
|
|
490
|
+
isCsvFile.value = true;
|
|
491
|
+
receivedCsvTable.value.path = fileInfo.path;
|
|
492
|
+
receivedCsvTable.value.name = fileInfo.name;
|
|
493
|
+
break;
|
|
494
|
+
case "parquet":
|
|
495
|
+
isParquetFile.value = true;
|
|
496
|
+
receivedParquetTable.value.path = fileInfo.path;
|
|
497
|
+
receivedParquetTable.value.name = fileInfo.name;
|
|
498
|
+
break;
|
|
499
|
+
default:
|
|
500
|
+
console.warn("Unsupported file type:", fileType);
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
selectedFile.value = fileInfo;
|
|
504
|
+
selectedPath.value = fileInfo.path;
|
|
505
|
+
modalVisibleForOpen.value = false;
|
|
506
|
+
} catch (error) {
|
|
507
|
+
console.error("Error handling file change:", error);
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
const loadNodeData = async (nodeId) => {
|
|
511
|
+
var _a;
|
|
512
|
+
try {
|
|
513
|
+
const nodeResult = await nodeStore.getNodeData(nodeId, false);
|
|
514
|
+
if (!nodeResult) {
|
|
515
|
+
console.warn("No node result received");
|
|
516
|
+
dataLoaded.value = true;
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
nodeRead.value = nodeResult.setting_input;
|
|
520
|
+
if (((_a = nodeResult.setting_input) == null ? void 0 : _a.is_setup) && nodeResult.setting_input.received_file) {
|
|
521
|
+
const { file_type } = nodeResult.setting_input.received_file;
|
|
522
|
+
isExcelFile.value = false;
|
|
523
|
+
isCsvFile.value = false;
|
|
524
|
+
isParquetFile.value = false;
|
|
525
|
+
switch (file_type) {
|
|
526
|
+
case "excel":
|
|
527
|
+
isExcelFile.value = true;
|
|
528
|
+
receivedExcelTable.value = nodeResult.setting_input.received_file;
|
|
529
|
+
break;
|
|
530
|
+
case "csv":
|
|
531
|
+
isCsvFile.value = true;
|
|
532
|
+
receivedCsvTable.value = nodeResult.setting_input.received_file;
|
|
533
|
+
break;
|
|
534
|
+
case "parquet":
|
|
535
|
+
isParquetFile.value = true;
|
|
536
|
+
receivedParquetTable.value = nodeResult.setting_input.received_file;
|
|
537
|
+
break;
|
|
538
|
+
}
|
|
539
|
+
selectedPath.value = nodeResult.setting_input.received_file.path;
|
|
540
|
+
}
|
|
541
|
+
dataLoaded.value = true;
|
|
542
|
+
} catch (error) {
|
|
543
|
+
console.error("Error loading node data:", error);
|
|
544
|
+
dataLoaded.value = true;
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
const pushNodeData = async () => {
|
|
548
|
+
try {
|
|
549
|
+
dataLoaded.value = false;
|
|
550
|
+
if (!nodeRead.value) {
|
|
551
|
+
console.warn("No node read value available");
|
|
552
|
+
dataLoaded.value = true;
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
nodeRead.value.is_setup = true;
|
|
556
|
+
if (isExcelFile.value) {
|
|
557
|
+
nodeRead.value.received_file = receivedExcelTable.value;
|
|
558
|
+
} else if (isCsvFile.value) {
|
|
559
|
+
nodeRead.value.received_file = receivedCsvTable.value;
|
|
560
|
+
} else if (isParquetFile.value) {
|
|
561
|
+
nodeRead.value.cache_results = false;
|
|
562
|
+
nodeRead.value.received_file = receivedParquetTable.value;
|
|
563
|
+
}
|
|
564
|
+
await nodeStore.updateSettings(nodeRead);
|
|
565
|
+
} catch (error) {
|
|
566
|
+
console.error("Error pushing node data:", error);
|
|
567
|
+
} finally {
|
|
568
|
+
dataLoaded.value = true;
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
__expose({
|
|
572
|
+
loadNodeData,
|
|
573
|
+
pushNodeData
|
|
574
|
+
});
|
|
575
|
+
return (_ctx, _cache) => {
|
|
576
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
577
|
+
return dataLoaded.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
578
|
+
createBaseVNode("div", _hoisted_2, [
|
|
579
|
+
createBaseVNode("div", _hoisted_3, [
|
|
580
|
+
createBaseVNode("div", {
|
|
581
|
+
class: "file-upload-wrapper",
|
|
582
|
+
onClick: _cache[0] || (_cache[0] = ($event) => modalVisibleForOpen.value = true)
|
|
583
|
+
}, [
|
|
584
|
+
createBaseVNode("label", _hoisted_4, [
|
|
585
|
+
_cache[5] || (_cache[5] = createBaseVNode("i", { class: "fas fa-table file-icon" }, null, -1)),
|
|
586
|
+
createBaseVNode("span", _hoisted_5, toDisplayString(getDisplayFileName.value), 1)
|
|
587
|
+
])
|
|
588
|
+
])
|
|
589
|
+
])
|
|
590
|
+
]),
|
|
591
|
+
isCsvFile.value || isExcelFile.value || isParquetFile.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
592
|
+
createBaseVNode("div", _hoisted_7, [
|
|
593
|
+
_cache[6] || (_cache[6] = createBaseVNode("div", { class: "listbox-subtitle" }, "File Specs", -1)),
|
|
594
|
+
isExcelFile.value ? (openBlock(), createBlock(ExcelTableConfig, {
|
|
595
|
+
key: 0,
|
|
596
|
+
modelValue: receivedExcelTable.value,
|
|
597
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => receivedExcelTable.value = $event)
|
|
598
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
599
|
+
isCsvFile.value ? (openBlock(), createBlock(CsvTableConfig, {
|
|
600
|
+
key: 1,
|
|
601
|
+
modelValue: receivedCsvTable.value,
|
|
602
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => receivedCsvTable.value = $event)
|
|
603
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
604
|
+
isParquetFile.value ? (openBlock(), createBlock(ParquetTableConfig, {
|
|
605
|
+
key: 2,
|
|
606
|
+
modelValue: receivedParquetTable.value,
|
|
607
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => receivedParquetTable.value = $event)
|
|
608
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
609
|
+
])
|
|
610
|
+
])) : createCommentVNode("", true),
|
|
611
|
+
createVNode(_component_el_dialog, {
|
|
612
|
+
modelValue: modalVisibleForOpen.value,
|
|
613
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => modalVisibleForOpen.value = $event),
|
|
614
|
+
title: "Select a file to Read",
|
|
615
|
+
width: "70%"
|
|
616
|
+
}, {
|
|
617
|
+
default: withCtx(() => [
|
|
618
|
+
createVNode(FileBrowser, {
|
|
619
|
+
"allowed-file-types": ["csv", "txt", "parquet", "xlsx"],
|
|
620
|
+
mode: "open",
|
|
621
|
+
onFileSelected: handleFileChange
|
|
622
|
+
})
|
|
623
|
+
]),
|
|
624
|
+
_: 1
|
|
625
|
+
}, 8, ["modelValue"])
|
|
626
|
+
])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }));
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
const read_vue_vue_type_style_index_0_scoped_221ad292_lang = "";
|
|
631
|
+
const readInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-221ad292"]]);
|
|
632
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
633
|
+
__name: "Read",
|
|
634
|
+
props: {
|
|
635
|
+
nodeId: {
|
|
636
|
+
type: Number,
|
|
637
|
+
required: true
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
setup(__props) {
|
|
641
|
+
const props = __props;
|
|
642
|
+
const nodeStore = useNodeStore();
|
|
643
|
+
const childComp = ref(null);
|
|
644
|
+
const closeOnDrawer = () => {
|
|
645
|
+
var _a;
|
|
646
|
+
if (drawer.value) {
|
|
647
|
+
(_a = childComp.value) == null ? void 0 : _a.pushNodeData();
|
|
648
|
+
drawer.value = false;
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
const drawer = ref(false);
|
|
652
|
+
const openDrawer = async () => {
|
|
653
|
+
if (nodeStore.node_id === props.nodeId) {
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
656
|
+
nodeStore.closeDrawer();
|
|
657
|
+
drawer.value = true;
|
|
658
|
+
const drawerOpen = nodeStore.isDrawerOpen;
|
|
659
|
+
nodeStore.isDrawerOpen = true;
|
|
660
|
+
await nextTick();
|
|
661
|
+
if (nodeStore.node_id === props.nodeId && drawerOpen) {
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
if (childComp.value) {
|
|
665
|
+
childComp.value.loadNodeData(props.nodeId);
|
|
666
|
+
nodeStore.openDrawer(closeOnDrawer);
|
|
667
|
+
}
|
|
668
|
+
};
|
|
669
|
+
onMounted(async () => {
|
|
670
|
+
await nextTick();
|
|
671
|
+
});
|
|
672
|
+
return (_ctx, _cache) => {
|
|
673
|
+
return openBlock(), createElementBlock("div", null, [
|
|
674
|
+
createVNode(NodeButton, {
|
|
675
|
+
ref: "nodeButton",
|
|
676
|
+
"node-id": __props.nodeId,
|
|
677
|
+
"image-src": "input_data.png",
|
|
678
|
+
title: `${__props.nodeId}: Read data`,
|
|
679
|
+
onClick: openDrawer
|
|
680
|
+
}, null, 8, ["node-id", "title"]),
|
|
681
|
+
drawer.value ? (openBlock(), createBlock(Teleport, {
|
|
682
|
+
key: 0,
|
|
683
|
+
to: "#nodesettings"
|
|
684
|
+
}, [
|
|
685
|
+
createVNode(NodeTitle, {
|
|
686
|
+
title: "Read data",
|
|
687
|
+
intro: "Read data from a file"
|
|
688
|
+
}),
|
|
689
|
+
createVNode(readInput, {
|
|
690
|
+
ref_key: "childComp",
|
|
691
|
+
ref: childComp,
|
|
692
|
+
"node-id": __props.nodeId
|
|
693
|
+
}, null, 8, ["node-id"])
|
|
694
|
+
])) : createCommentVNode("", true)
|
|
695
|
+
]);
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
export {
|
|
700
|
+
_sfc_main as default
|
|
701
|
+
};
|