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,422 @@
|
|
|
1
|
+
import { d as defineComponent, r as ref, l as computed, n as onMounted, R as nextTick, c as openBlock, e as createElementBlock, f as createVNode, w as withCtx, p as createBaseVNode, s as normalizeClass, F as Fragment, q as renderList, h as createBlock, i as createCommentVNode, g as createTextVNode, t as toDisplayString, a4 as withDirectives, a5 as vModelText, ae as vModelSelect, u as unref, _ as _export_sfc, a6 as Teleport } from "./index-552863fd.js";
|
|
2
|
+
import { u as useNodeStore } from "./PopOver-b37ff9be.js";
|
|
3
|
+
import { C as ColumnSelector } from "./dropDown-5e7e9a5a.js";
|
|
4
|
+
import { s as selectDynamic } from "./selectDynamic-bd644891.js";
|
|
5
|
+
import { u as unavailableField } from "./UnavailableFields-b41976ed.js";
|
|
6
|
+
import { G as GenericNodeSettings } from "./genericNodeSettings-65587f20.js";
|
|
7
|
+
import { C as CodeLoader } from "./vue-content-loader.es-6b36f05e.js";
|
|
8
|
+
import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
|
|
9
|
+
import "./designer-e5bbe26f.js";
|
|
10
|
+
const _hoisted_1$1 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "fuzzy-join-container"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_2 = { class: "tabs-navigation" };
|
|
15
|
+
const _hoisted_3 = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "tab-content"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_4 = { class: "settings-card" };
|
|
20
|
+
const _hoisted_5 = { class: "card-content" };
|
|
21
|
+
const _hoisted_6 = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "join-settings"
|
|
24
|
+
};
|
|
25
|
+
const _hoisted_7 = { class: "setting-header" };
|
|
26
|
+
const _hoisted_8 = { class: "setting-title" };
|
|
27
|
+
const _hoisted_9 = ["onClick"];
|
|
28
|
+
const _hoisted_10 = { class: "columns-grid" };
|
|
29
|
+
const _hoisted_11 = { class: "column-field" };
|
|
30
|
+
const _hoisted_12 = { class: "column-field" };
|
|
31
|
+
const _hoisted_13 = { class: "settings-grid" };
|
|
32
|
+
const _hoisted_14 = { class: "threshold-field" };
|
|
33
|
+
const _hoisted_15 = { class: "range-container" };
|
|
34
|
+
const _hoisted_16 = ["id", "onUpdate:modelValue"];
|
|
35
|
+
const _hoisted_17 = { class: "range-value" };
|
|
36
|
+
const _hoisted_18 = { class: "select-field" };
|
|
37
|
+
const _hoisted_19 = { class: "select-wrapper" };
|
|
38
|
+
const _hoisted_20 = ["id", "onUpdate:modelValue"];
|
|
39
|
+
const _hoisted_21 = ["value"];
|
|
40
|
+
const _hoisted_22 = {
|
|
41
|
+
key: 1,
|
|
42
|
+
class: "tab-content"
|
|
43
|
+
};
|
|
44
|
+
const _hoisted_23 = { class: "settings-card" };
|
|
45
|
+
const _hoisted_24 = { class: "card-content" };
|
|
46
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
47
|
+
__name: "fuzzyMatch",
|
|
48
|
+
setup(__props, { expose: __expose }) {
|
|
49
|
+
const activeTab = ref("match");
|
|
50
|
+
const containsVal = (arr, val) => {
|
|
51
|
+
return arr.includes(val);
|
|
52
|
+
};
|
|
53
|
+
const result = ref(null);
|
|
54
|
+
const nodeStore = useNodeStore();
|
|
55
|
+
const isLoaded = ref(false);
|
|
56
|
+
const nodeFuzzyJoin = ref(null);
|
|
57
|
+
const createSelectInput = (field) => {
|
|
58
|
+
return {
|
|
59
|
+
old_name: field,
|
|
60
|
+
new_name: field,
|
|
61
|
+
position: 0,
|
|
62
|
+
keep: true,
|
|
63
|
+
is_altered: false,
|
|
64
|
+
data_type_change: false,
|
|
65
|
+
is_available: true,
|
|
66
|
+
original_position: 0
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
const updateSelectInputsHandler = (updatedInputs, isLeft) => {
|
|
70
|
+
if (isLeft && nodeFuzzyJoin.value) {
|
|
71
|
+
nodeFuzzyJoin.value.join_input.left_select.renames = updatedInputs;
|
|
72
|
+
} else if (nodeFuzzyJoin.value) {
|
|
73
|
+
nodeFuzzyJoin.value.join_input.right_select.renames = updatedInputs;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const fuzzyMatchOptions = [
|
|
77
|
+
{ value: "levenshtein", label: "Levenshtein" },
|
|
78
|
+
{ value: "jaro", label: "Jaro" },
|
|
79
|
+
{ value: "jaro_winkler", label: "Jaro Winkler" },
|
|
80
|
+
{ value: "hamming", label: "Hamming" },
|
|
81
|
+
{ value: "damerau_levenshtein", label: "Damerau Levenshtein" },
|
|
82
|
+
{ value: "indel", label: "Indel" }
|
|
83
|
+
];
|
|
84
|
+
const hasInvalidFields = computed(() => {
|
|
85
|
+
var _a;
|
|
86
|
+
if (!((_a = nodeFuzzyJoin.value) == null ? void 0 : _a.join_input) || !result.value) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
return nodeFuzzyJoin.value.join_input.join_mapping.some((fuzzyMap) => {
|
|
90
|
+
var _a2, _b, _c, _d;
|
|
91
|
+
const leftValid = containsVal(((_b = (_a2 = result.value) == null ? void 0 : _a2.main_input) == null ? void 0 : _b.columns) ?? [], fuzzyMap.left_col);
|
|
92
|
+
const rightValid = containsVal(((_d = (_c = result.value) == null ? void 0 : _c.right_input) == null ? void 0 : _d.columns) ?? [], fuzzyMap.right_col);
|
|
93
|
+
return !(leftValid && rightValid);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
const getEmptySetup = (left_fields, right_fields) => {
|
|
97
|
+
return {
|
|
98
|
+
join_mapping: [
|
|
99
|
+
{
|
|
100
|
+
left_col: "",
|
|
101
|
+
right_col: "",
|
|
102
|
+
threshold_score: 75,
|
|
103
|
+
fuzzy_type: "levenshtein",
|
|
104
|
+
valid: true
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
left_select: {
|
|
108
|
+
renames: left_fields.map(createSelectInput)
|
|
109
|
+
},
|
|
110
|
+
right_select: {
|
|
111
|
+
renames: right_fields.map(createSelectInput)
|
|
112
|
+
},
|
|
113
|
+
aggregate_output: false
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
const loadNodeData = async (nodeId) => {
|
|
117
|
+
var _a, _b, _c, _d, _e, _f;
|
|
118
|
+
result.value = await nodeStore.getNodeData(nodeId, true);
|
|
119
|
+
nodeFuzzyJoin.value = (_a = result.value) == null ? void 0 : _a.setting_input;
|
|
120
|
+
if (!((_b = nodeFuzzyJoin.value) == null ? void 0 : _b.is_setup) && ((_c = result.value) == null ? void 0 : _c.main_input)) {
|
|
121
|
+
if (nodeFuzzyJoin.value) {
|
|
122
|
+
if (((_d = result.value) == null ? void 0 : _d.main_input.columns) && ((_f = (_e = result.value) == null ? void 0 : _e.right_input) == null ? void 0 : _f.columns)) {
|
|
123
|
+
nodeFuzzyJoin.value.join_input = getEmptySetup(
|
|
124
|
+
result.value.main_input.columns,
|
|
125
|
+
result.value.right_input.columns
|
|
126
|
+
);
|
|
127
|
+
isLoaded.value = true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
} else {
|
|
131
|
+
isLoaded.value = true;
|
|
132
|
+
console.log("Data reloaded");
|
|
133
|
+
}
|
|
134
|
+
isLoaded.value = true;
|
|
135
|
+
};
|
|
136
|
+
const addJoinCondition = () => {
|
|
137
|
+
var _a, _b;
|
|
138
|
+
const newCondition = {
|
|
139
|
+
left_col: "",
|
|
140
|
+
right_col: "",
|
|
141
|
+
threshold_score: 75,
|
|
142
|
+
fuzzy_type: "levenshtein",
|
|
143
|
+
valid: true
|
|
144
|
+
};
|
|
145
|
+
(_b = (_a = nodeFuzzyJoin.value) == null ? void 0 : _a.join_input) == null ? void 0 : _b.join_mapping.push(newCondition);
|
|
146
|
+
};
|
|
147
|
+
const removeJoinCondition = (index) => {
|
|
148
|
+
var _a, _b;
|
|
149
|
+
(_b = (_a = nodeFuzzyJoin.value) == null ? void 0 : _a.join_input) == null ? void 0 : _b.join_mapping.splice(index, 1);
|
|
150
|
+
};
|
|
151
|
+
const handleChange = (newValue, index, side) => {
|
|
152
|
+
var _a, _b;
|
|
153
|
+
if (side === "left") {
|
|
154
|
+
if ((_a = nodeFuzzyJoin.value) == null ? void 0 : _a.join_input) {
|
|
155
|
+
nodeFuzzyJoin.value.join_input.join_mapping[index].left_col = newValue;
|
|
156
|
+
}
|
|
157
|
+
} else {
|
|
158
|
+
if ((_b = nodeFuzzyJoin.value) == null ? void 0 : _b.join_input) {
|
|
159
|
+
nodeFuzzyJoin.value.join_input.join_mapping[index].right_col = newValue;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
const pushNodeData = async () => {
|
|
164
|
+
isLoaded.value = false;
|
|
165
|
+
nodeStore.isDrawerOpen = false;
|
|
166
|
+
if (nodeFuzzyJoin.value) {
|
|
167
|
+
nodeFuzzyJoin.value.is_setup = true;
|
|
168
|
+
}
|
|
169
|
+
nodeStore.updateSettings(nodeFuzzyJoin);
|
|
170
|
+
if (hasInvalidFields.value && nodeFuzzyJoin.value) {
|
|
171
|
+
nodeStore.setNodeValidation(nodeFuzzyJoin.value.node_id, {
|
|
172
|
+
isValid: false,
|
|
173
|
+
error: "Join fields are not valid"
|
|
174
|
+
});
|
|
175
|
+
} else if (nodeFuzzyJoin.value) {
|
|
176
|
+
nodeStore.setNodeValidation(nodeFuzzyJoin.value.node_id, {
|
|
177
|
+
isValid: true,
|
|
178
|
+
error: ""
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
__expose({
|
|
183
|
+
loadNodeData,
|
|
184
|
+
pushNodeData,
|
|
185
|
+
hasInvalidFields
|
|
186
|
+
});
|
|
187
|
+
onMounted(async () => {
|
|
188
|
+
await nextTick();
|
|
189
|
+
});
|
|
190
|
+
return (_ctx, _cache) => {
|
|
191
|
+
return isLoaded.value && nodeFuzzyJoin.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
192
|
+
createVNode(GenericNodeSettings, {
|
|
193
|
+
modelValue: nodeFuzzyJoin.value,
|
|
194
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => nodeFuzzyJoin.value = $event)
|
|
195
|
+
}, {
|
|
196
|
+
default: withCtx(() => {
|
|
197
|
+
var _a, _b, _c, _d, _e, _f;
|
|
198
|
+
return [
|
|
199
|
+
createBaseVNode("div", _hoisted_2, [
|
|
200
|
+
createBaseVNode("button", {
|
|
201
|
+
class: normalizeClass(["tab-button", { active: activeTab.value === "match" }]),
|
|
202
|
+
onClick: _cache[0] || (_cache[0] = ($event) => activeTab.value = "match")
|
|
203
|
+
}, " Match Settings ", 2),
|
|
204
|
+
createBaseVNode("button", {
|
|
205
|
+
class: normalizeClass(["tab-button", { active: activeTab.value === "fields" }]),
|
|
206
|
+
onClick: _cache[1] || (_cache[1] = ($event) => activeTab.value = "fields")
|
|
207
|
+
}, " Select Fields ", 2)
|
|
208
|
+
]),
|
|
209
|
+
activeTab.value === "match" ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
210
|
+
createBaseVNode("div", _hoisted_4, [
|
|
211
|
+
_cache[10] || (_cache[10] = createBaseVNode("div", { class: "card-header" }, [
|
|
212
|
+
createBaseVNode("h3", { class: "section-title" }, "Fuzzy match settings")
|
|
213
|
+
], -1)),
|
|
214
|
+
createBaseVNode("div", _hoisted_5, [
|
|
215
|
+
((_a = nodeFuzzyJoin.value) == null ? void 0 : _a.join_input) ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
216
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList((_b = nodeFuzzyJoin.value) == null ? void 0 : _b.join_input.join_mapping, (fuzzyMap, index) => {
|
|
217
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i;
|
|
218
|
+
return openBlock(), createElementBlock("div", {
|
|
219
|
+
key: index,
|
|
220
|
+
class: "setting-panel"
|
|
221
|
+
}, [
|
|
222
|
+
createBaseVNode("div", _hoisted_7, [
|
|
223
|
+
createBaseVNode("h4", _hoisted_8, [
|
|
224
|
+
!(containsVal(((_b2 = (_a2 = result.value) == null ? void 0 : _a2.main_input) == null ? void 0 : _b2.columns) ?? [], fuzzyMap.left_col) && containsVal(((_d2 = (_c2 = result.value) == null ? void 0 : _c2.right_input) == null ? void 0 : _d2.columns) ?? [], fuzzyMap.right_col)) ? (openBlock(), createBlock(unavailableField, {
|
|
225
|
+
key: 0,
|
|
226
|
+
"tooltip-text": "Join is not valid",
|
|
227
|
+
class: "unavailable-field"
|
|
228
|
+
})) : createCommentVNode("", true),
|
|
229
|
+
createTextVNode(" Setting " + toDisplayString(index + 1), 1)
|
|
230
|
+
]),
|
|
231
|
+
((_e2 = nodeFuzzyJoin.value) == null ? void 0 : _e2.join_input.join_mapping.length) > 1 ? (openBlock(), createElementBlock("button", {
|
|
232
|
+
key: 0,
|
|
233
|
+
class: "remove-button",
|
|
234
|
+
type: "button",
|
|
235
|
+
"aria-label": "Remove setting",
|
|
236
|
+
onClick: ($event) => removeJoinCondition(index)
|
|
237
|
+
}, " Remove setting ", 8, _hoisted_9)) : createCommentVNode("", true)
|
|
238
|
+
]),
|
|
239
|
+
createBaseVNode("div", _hoisted_10, [
|
|
240
|
+
createBaseVNode("div", _hoisted_11, [
|
|
241
|
+
_cache[6] || (_cache[6] = createBaseVNode("label", null, "Left column", -1)),
|
|
242
|
+
createVNode(ColumnSelector, {
|
|
243
|
+
modelValue: fuzzyMap.left_col,
|
|
244
|
+
"onUpdate:modelValue": ($event) => fuzzyMap.left_col = $event,
|
|
245
|
+
value: fuzzyMap.left_col,
|
|
246
|
+
"column-options": (_g = (_f2 = result.value) == null ? void 0 : _f2.main_input) == null ? void 0 : _g.columns,
|
|
247
|
+
"onUpdate:value": (value) => handleChange(value, index, "left")
|
|
248
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "column-options", "onUpdate:value"])
|
|
249
|
+
]),
|
|
250
|
+
createBaseVNode("div", _hoisted_12, [
|
|
251
|
+
_cache[7] || (_cache[7] = createBaseVNode("label", null, "Right column", -1)),
|
|
252
|
+
createVNode(ColumnSelector, {
|
|
253
|
+
modelValue: fuzzyMap.right_col,
|
|
254
|
+
"onUpdate:modelValue": ($event) => fuzzyMap.right_col = $event,
|
|
255
|
+
value: fuzzyMap.right_col,
|
|
256
|
+
"column-options": (_i = (_h = result.value) == null ? void 0 : _h.right_input) == null ? void 0 : _i.columns,
|
|
257
|
+
"onUpdate:value": (value) => handleChange(value, index, "right")
|
|
258
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "column-options", "onUpdate:value"])
|
|
259
|
+
])
|
|
260
|
+
]),
|
|
261
|
+
createBaseVNode("div", _hoisted_13, [
|
|
262
|
+
createBaseVNode("div", _hoisted_14, [
|
|
263
|
+
_cache[8] || (_cache[8] = createBaseVNode("label", { for: "threshold-score" }, "Threshold score", -1)),
|
|
264
|
+
createBaseVNode("div", _hoisted_15, [
|
|
265
|
+
withDirectives(createBaseVNode("input", {
|
|
266
|
+
id: `threshold-score-${index}`,
|
|
267
|
+
"onUpdate:modelValue": ($event) => fuzzyMap.threshold_score = $event,
|
|
268
|
+
type: "range",
|
|
269
|
+
min: "0",
|
|
270
|
+
max: "100",
|
|
271
|
+
step: "1",
|
|
272
|
+
class: "range-slider"
|
|
273
|
+
}, null, 8, _hoisted_16), [
|
|
274
|
+
[vModelText, fuzzyMap.threshold_score]
|
|
275
|
+
]),
|
|
276
|
+
createBaseVNode("div", _hoisted_17, toDisplayString(fuzzyMap.threshold_score) + "%", 1)
|
|
277
|
+
])
|
|
278
|
+
]),
|
|
279
|
+
createBaseVNode("div", _hoisted_18, [
|
|
280
|
+
_cache[9] || (_cache[9] = createBaseVNode("label", { for: "fuzzy-type" }, "Match algorithm", -1)),
|
|
281
|
+
createBaseVNode("div", _hoisted_19, [
|
|
282
|
+
withDirectives(createBaseVNode("select", {
|
|
283
|
+
id: `fuzzy-type-${index}`,
|
|
284
|
+
"onUpdate:modelValue": ($event) => fuzzyMap.fuzzy_type = $event,
|
|
285
|
+
class: "select-input"
|
|
286
|
+
}, [
|
|
287
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(fuzzyMatchOptions, (option) => {
|
|
288
|
+
return createBaseVNode("option", {
|
|
289
|
+
key: option.value,
|
|
290
|
+
value: option.value
|
|
291
|
+
}, toDisplayString(option.label), 9, _hoisted_21);
|
|
292
|
+
}), 64))
|
|
293
|
+
], 8, _hoisted_20), [
|
|
294
|
+
[vModelSelect, fuzzyMap.fuzzy_type]
|
|
295
|
+
])
|
|
296
|
+
])
|
|
297
|
+
])
|
|
298
|
+
])
|
|
299
|
+
]);
|
|
300
|
+
}), 128)),
|
|
301
|
+
createBaseVNode("button", {
|
|
302
|
+
class: "add-button",
|
|
303
|
+
type: "button",
|
|
304
|
+
onClick: _cache[2] || (_cache[2] = ($event) => addJoinCondition())
|
|
305
|
+
}, " Add setting ")
|
|
306
|
+
])) : createCommentVNode("", true)
|
|
307
|
+
])
|
|
308
|
+
])
|
|
309
|
+
])) : createCommentVNode("", true),
|
|
310
|
+
activeTab.value === "fields" ? (openBlock(), createElementBlock("div", _hoisted_22, [
|
|
311
|
+
createBaseVNode("div", _hoisted_23, [
|
|
312
|
+
_cache[11] || (_cache[11] = createBaseVNode("div", { class: "card-header" }, [
|
|
313
|
+
createBaseVNode("h3", { class: "section-title" }, "Select fields to include")
|
|
314
|
+
], -1)),
|
|
315
|
+
createBaseVNode("div", _hoisted_24, [
|
|
316
|
+
((_c = nodeFuzzyJoin.value) == null ? void 0 : _c.join_input) ? (openBlock(), createBlock(selectDynamic, {
|
|
317
|
+
key: 0,
|
|
318
|
+
"select-inputs": (_d = nodeFuzzyJoin.value) == null ? void 0 : _d.join_input.right_select.renames,
|
|
319
|
+
"show-keep-option": true,
|
|
320
|
+
"show-headers": true,
|
|
321
|
+
"show-new-columns": false,
|
|
322
|
+
"show-title": true,
|
|
323
|
+
"show-data": true,
|
|
324
|
+
title: "Right data",
|
|
325
|
+
class: "select-section",
|
|
326
|
+
onUpdateSelectInputs: _cache[3] || (_cache[3] = (updatedInputs) => updateSelectInputsHandler(updatedInputs, false))
|
|
327
|
+
}, null, 8, ["select-inputs"])) : createCommentVNode("", true),
|
|
328
|
+
((_e = nodeFuzzyJoin.value) == null ? void 0 : _e.join_input) ? (openBlock(), createBlock(selectDynamic, {
|
|
329
|
+
key: 1,
|
|
330
|
+
"select-inputs": (_f = nodeFuzzyJoin.value) == null ? void 0 : _f.join_input.left_select.renames,
|
|
331
|
+
"show-keep-option": true,
|
|
332
|
+
"show-title": true,
|
|
333
|
+
"show-headers": true,
|
|
334
|
+
"show-new-columns": false,
|
|
335
|
+
"show-data": true,
|
|
336
|
+
title: "Left data",
|
|
337
|
+
class: "select-section",
|
|
338
|
+
onUpdateSelectInputs: _cache[4] || (_cache[4] = (updatedInputs) => updateSelectInputsHandler(updatedInputs, true))
|
|
339
|
+
}, null, 8, ["select-inputs"])) : createCommentVNode("", true)
|
|
340
|
+
])
|
|
341
|
+
])
|
|
342
|
+
])) : createCommentVNode("", true)
|
|
343
|
+
];
|
|
344
|
+
}),
|
|
345
|
+
_: 1
|
|
346
|
+
}, 8, ["modelValue"])
|
|
347
|
+
])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }));
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
const fuzzyMatch_vue_vue_type_style_index_0_scoped_99f9b22f_lang = "";
|
|
352
|
+
const joinInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-99f9b22f"]]);
|
|
353
|
+
const _hoisted_1 = { ref: "el" };
|
|
354
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
355
|
+
__name: "FuzzyMatch",
|
|
356
|
+
props: {
|
|
357
|
+
nodeId: {
|
|
358
|
+
type: Number,
|
|
359
|
+
required: true
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
setup(__props) {
|
|
363
|
+
const nodeStore = useNodeStore();
|
|
364
|
+
const props = __props;
|
|
365
|
+
const childComp = ref(null);
|
|
366
|
+
const drawer = ref(false);
|
|
367
|
+
const closeOnDrawer = () => {
|
|
368
|
+
var _a;
|
|
369
|
+
(_a = childComp.value) == null ? void 0 : _a.pushNodeData();
|
|
370
|
+
drawer.value = false;
|
|
371
|
+
nodeStore.isDrawerOpen = false;
|
|
372
|
+
};
|
|
373
|
+
const openDrawer = async () => {
|
|
374
|
+
if (nodeStore.node_id === props.nodeId) {
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
nodeStore.closeDrawer();
|
|
378
|
+
drawer.value = true;
|
|
379
|
+
const drawerOpen = nodeStore.isDrawerOpen;
|
|
380
|
+
nodeStore.isDrawerOpen = true;
|
|
381
|
+
await nextTick();
|
|
382
|
+
if (nodeStore.node_id === props.nodeId && drawerOpen) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
if (childComp.value) {
|
|
386
|
+
childComp.value.loadNodeData(props.nodeId);
|
|
387
|
+
nodeStore.openDrawer(closeOnDrawer);
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
onMounted(async () => {
|
|
391
|
+
await nextTick();
|
|
392
|
+
});
|
|
393
|
+
return (_ctx, _cache) => {
|
|
394
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
395
|
+
createVNode(NodeButton, {
|
|
396
|
+
ref: "nodeButton",
|
|
397
|
+
"node-id": __props.nodeId,
|
|
398
|
+
"image-src": "fuzzy_match.png",
|
|
399
|
+
title: `${__props.nodeId}: Fuzzy match`,
|
|
400
|
+
onClick: openDrawer
|
|
401
|
+
}, null, 8, ["node-id", "title"]),
|
|
402
|
+
drawer.value ? (openBlock(), createBlock(Teleport, {
|
|
403
|
+
key: 0,
|
|
404
|
+
to: "#nodesettings"
|
|
405
|
+
}, [
|
|
406
|
+
createVNode(NodeTitle, {
|
|
407
|
+
title: "Fuzzy match",
|
|
408
|
+
intro: "Match data based on string similarity"
|
|
409
|
+
}),
|
|
410
|
+
createVNode(joinInput, {
|
|
411
|
+
ref_key: "childComp",
|
|
412
|
+
ref: childComp,
|
|
413
|
+
"node-id": __props.nodeId
|
|
414
|
+
}, null, 8, ["node-id"])
|
|
415
|
+
])) : createCommentVNode("", true)
|
|
416
|
+
], 512);
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
export {
|
|
421
|
+
_sfc_main as default
|
|
422
|
+
};
|