Flowfile 0.3.0__py3-none-any.whl → 0.3.0.2__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 +13 -6
- flowfile/__main__.py +50 -15
- flowfile/api.py +383 -0
- flowfile/readme.md +130 -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.2.dist-info/METADATA +235 -0
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.2.dist-info}/RECORD +147 -15
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.2.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 +0 -1
- flowfile_frame/utils.py +0 -139
- flowfile-0.3.0.dist-info/METADATA +0 -219
- flowfile_frame/__main__.py +0 -12
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.2.dist-info}/LICENSE +0 -0
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.2.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { C as CodeLoader } from "./vue-content-loader.es-6b36f05e.js";
|
|
2
|
+
import { u as useNodeStore } from "./PopOver-b37ff9be.js";
|
|
3
|
+
import { G as GenericNodeSettings } from "./genericNodeSettings-65587f20.js";
|
|
4
|
+
import { d as defineComponent, r as ref, a2 as watchEffect, b as resolveComponent, c as openBlock, e as createElementBlock, f as createVNode, w as withCtx, p as createBaseVNode, F as Fragment, q as renderList, i as createCommentVNode, h as createBlock, u as unref, _ as _export_sfc, n as onMounted, R as nextTick, a6 as Teleport } from "./index-552863fd.js";
|
|
5
|
+
import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
|
|
6
|
+
import "./designer-e5bbe26f.js";
|
|
7
|
+
function get_template_source_type(type, options) {
|
|
8
|
+
switch (type) {
|
|
9
|
+
case "SAMPLE_USERS":
|
|
10
|
+
return {
|
|
11
|
+
SAMPLE_USERS: true,
|
|
12
|
+
size: (options == null ? void 0 : options.size) || 100,
|
|
13
|
+
// Default size is 100 if not provided
|
|
14
|
+
orientation: (options == null ? void 0 : options.orientation) || "row",
|
|
15
|
+
// Default orientation is 'ROWS'
|
|
16
|
+
fields: []
|
|
17
|
+
};
|
|
18
|
+
case "GOOGLE_SHEET":
|
|
19
|
+
return {
|
|
20
|
+
GOOGLE_SHEET: true,
|
|
21
|
+
class_name: "GoogleSheet",
|
|
22
|
+
access_token: (options == null ? void 0 : options.access_token) || "",
|
|
23
|
+
// Expecting options to have access_token, else default is empty
|
|
24
|
+
sheet_id: (options == null ? void 0 : options.sheet_id) || "",
|
|
25
|
+
// Expecting options to have sheet_id, else default is empty
|
|
26
|
+
worksheet_name: (options == null ? void 0 : options.worksheet_name) || "",
|
|
27
|
+
// Default worksheet name is empty if not provided
|
|
28
|
+
orientation: (options == null ? void 0 : options.orientation) || "row",
|
|
29
|
+
sheet_name: (options == null ? void 0 : options.sheet_name) || "",
|
|
30
|
+
fields: []
|
|
31
|
+
};
|
|
32
|
+
default:
|
|
33
|
+
throw new Error("Unsupported configuration type");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const _hoisted_1 = {
|
|
37
|
+
key: 0,
|
|
38
|
+
class: "listbox-wrapper"
|
|
39
|
+
};
|
|
40
|
+
const _hoisted_2 = {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: "file-upload-container"
|
|
43
|
+
};
|
|
44
|
+
const _hoisted_3 = {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "file-upload-wrapper"
|
|
47
|
+
};
|
|
48
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
49
|
+
__name: "ExternalSource",
|
|
50
|
+
setup(__props, { expose: __expose }) {
|
|
51
|
+
const nodeStore = useNodeStore();
|
|
52
|
+
const sampleUsers = ref(null);
|
|
53
|
+
const nodeExternalSource = ref(null);
|
|
54
|
+
const dataLoaded = ref(false);
|
|
55
|
+
const typeSelected = ref(false);
|
|
56
|
+
const writingOptions = ["sample_users"];
|
|
57
|
+
const selectedExternalSource = ref(null);
|
|
58
|
+
const isDirty = ref(false);
|
|
59
|
+
watchEffect(() => {
|
|
60
|
+
});
|
|
61
|
+
const loadNodeData = async (nodeId) => {
|
|
62
|
+
var _a, _b, _c;
|
|
63
|
+
const nodeResult = await nodeStore.getNodeData(nodeId, false);
|
|
64
|
+
nodeExternalSource.value = nodeResult == null ? void 0 : nodeResult.setting_input;
|
|
65
|
+
if ((_a = nodeExternalSource.value) == null ? void 0 : _a.is_setup) {
|
|
66
|
+
if (((_b = nodeExternalSource.value) == null ? void 0 : _b.identifier) == "sample_users") {
|
|
67
|
+
sampleUsers.value = (_c = nodeExternalSource.value) == null ? void 0 : _c.source_settings;
|
|
68
|
+
selectedExternalSource.value = "sample_users";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
typeSelected.value = true;
|
|
72
|
+
dataLoaded.value = true;
|
|
73
|
+
isDirty.value = false;
|
|
74
|
+
};
|
|
75
|
+
const loadTemplateValue = () => {
|
|
76
|
+
console.log(selectedExternalSource.value);
|
|
77
|
+
if (selectedExternalSource.value === "sample_users") {
|
|
78
|
+
sampleUsers.value = get_template_source_type("SAMPLE_USERS");
|
|
79
|
+
if (nodeExternalSource.value) {
|
|
80
|
+
nodeExternalSource.value.source_settings = sampleUsers.value;
|
|
81
|
+
}
|
|
82
|
+
isDirty.value = true;
|
|
83
|
+
}
|
|
84
|
+
typeSelected.value = true;
|
|
85
|
+
if (nodeExternalSource.value && selectedExternalSource.value) {
|
|
86
|
+
nodeExternalSource.value.identifier = selectedExternalSource.value;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const pushNodeDataAction = async () => {
|
|
90
|
+
if (nodeExternalSource.value && isDirty.value) {
|
|
91
|
+
nodeExternalSource.value.is_setup = true;
|
|
92
|
+
nodeExternalSource.value.source_settings.fields = [];
|
|
93
|
+
isDirty.value = false;
|
|
94
|
+
}
|
|
95
|
+
await nodeStore.updateSettings(nodeExternalSource);
|
|
96
|
+
if (nodeExternalSource.value) {
|
|
97
|
+
await nodeStore.getNodeData(Number(nodeExternalSource.value.node_id), false);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const pushNodeData = async () => {
|
|
101
|
+
dataLoaded.value = false;
|
|
102
|
+
if (nodeExternalSource.value) {
|
|
103
|
+
if (isDirty.value || nodeExternalSource.value.identifier) {
|
|
104
|
+
await pushNodeDataAction();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
__expose({
|
|
109
|
+
loadNodeData,
|
|
110
|
+
pushNodeData
|
|
111
|
+
});
|
|
112
|
+
return (_ctx, _cache) => {
|
|
113
|
+
const _component_el_option = resolveComponent("el-option");
|
|
114
|
+
const _component_el_select = resolveComponent("el-select");
|
|
115
|
+
return dataLoaded.value && nodeExternalSource.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
116
|
+
createVNode(GenericNodeSettings, {
|
|
117
|
+
modelValue: nodeExternalSource.value,
|
|
118
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => nodeExternalSource.value = $event)
|
|
119
|
+
}, {
|
|
120
|
+
default: withCtx(() => [
|
|
121
|
+
_cache[2] || (_cache[2] = createBaseVNode("div", { class: "listbox-subtitle" }, "Select the type of external source", -1)),
|
|
122
|
+
createVNode(_component_el_select, {
|
|
123
|
+
modelValue: selectedExternalSource.value,
|
|
124
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedExternalSource.value = $event),
|
|
125
|
+
class: "m-2",
|
|
126
|
+
placeholder: "Select type of external source",
|
|
127
|
+
size: "small",
|
|
128
|
+
onChange: loadTemplateValue
|
|
129
|
+
}, {
|
|
130
|
+
default: withCtx(() => [
|
|
131
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(writingOptions, (item) => {
|
|
132
|
+
return createVNode(_component_el_option, {
|
|
133
|
+
key: item,
|
|
134
|
+
label: item,
|
|
135
|
+
value: item
|
|
136
|
+
}, null, 8, ["label", "value"]);
|
|
137
|
+
}), 64))
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
}, 8, ["modelValue"]),
|
|
141
|
+
typeSelected.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
142
|
+
selectedExternalSource.value === "sample_users" && sampleUsers.value ? (openBlock(), createElementBlock("div", _hoisted_3)) : createCommentVNode("", true)
|
|
143
|
+
])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }))
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
}, 8, ["modelValue"])
|
|
147
|
+
])) : createCommentVNode("", true);
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
const ExternalSource_vue_vue_type_style_index_0_scoped_62f1d8e0_lang = "";
|
|
152
|
+
const externalSource = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-62f1d8e0"]]);
|
|
153
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
154
|
+
__name: "ExternalSource",
|
|
155
|
+
props: {
|
|
156
|
+
nodeId: {
|
|
157
|
+
type: Number,
|
|
158
|
+
required: true
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
setup(__props) {
|
|
162
|
+
const nodeStore = useNodeStore();
|
|
163
|
+
const childComp = ref(null);
|
|
164
|
+
const props = __props;
|
|
165
|
+
const el = ref(null);
|
|
166
|
+
const drawer = ref(false);
|
|
167
|
+
const closeOnDrawer = () => {
|
|
168
|
+
var _a;
|
|
169
|
+
(_a = childComp.value) == null ? void 0 : _a.pushNodeData();
|
|
170
|
+
drawer.value = false;
|
|
171
|
+
nodeStore.isDrawerOpen = false;
|
|
172
|
+
};
|
|
173
|
+
const openDrawer = async () => {
|
|
174
|
+
if (nodeStore.node_id === props.nodeId) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
nodeStore.closeDrawer();
|
|
178
|
+
drawer.value = true;
|
|
179
|
+
const drawerOpen = nodeStore.isDrawerOpen;
|
|
180
|
+
nodeStore.isDrawerOpen = true;
|
|
181
|
+
await nextTick();
|
|
182
|
+
if (nodeStore.node_id === props.nodeId && drawerOpen) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (childComp.value) {
|
|
186
|
+
childComp.value.loadNodeData(props.nodeId);
|
|
187
|
+
nodeStore.openDrawer(closeOnDrawer);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
onMounted(async () => {
|
|
191
|
+
await nextTick();
|
|
192
|
+
});
|
|
193
|
+
return (_ctx, _cache) => {
|
|
194
|
+
return openBlock(), createElementBlock("div", {
|
|
195
|
+
ref_key: "el",
|
|
196
|
+
ref: el
|
|
197
|
+
}, [
|
|
198
|
+
createVNode(NodeButton, {
|
|
199
|
+
ref: "nodeButton",
|
|
200
|
+
"node-id": __props.nodeId,
|
|
201
|
+
"image-src": "external_source.png",
|
|
202
|
+
title: `${__props.nodeId}: External source`,
|
|
203
|
+
onClick: openDrawer
|
|
204
|
+
}, null, 8, ["node-id", "title"]),
|
|
205
|
+
drawer.value ? (openBlock(), createBlock(Teleport, {
|
|
206
|
+
key: 0,
|
|
207
|
+
to: "#nodesettings"
|
|
208
|
+
}, [
|
|
209
|
+
createVNode(NodeTitle, {
|
|
210
|
+
title: "External source",
|
|
211
|
+
intro: "Import data from an external source"
|
|
212
|
+
}),
|
|
213
|
+
createVNode(externalSource, {
|
|
214
|
+
ref_key: "childComp",
|
|
215
|
+
ref: childComp,
|
|
216
|
+
"node-id": __props.nodeId
|
|
217
|
+
}, null, 8, ["node-id"])
|
|
218
|
+
])) : createCommentVNode("", true)
|
|
219
|
+
], 512);
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
export {
|
|
224
|
+
_sfc_main as default
|
|
225
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
|
|
2
|
+
.context-menu[data-v-62f1d8e0] {
|
|
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-62f1d8e0] {
|
|
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-62f1d8e0]:hover {
|
|
23
|
+
background-color: #f0f0f0;
|
|
24
|
+
}
|
|
25
|
+
.table-wrapper[data-v-62f1d8e0] {
|
|
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-62f1d8e0] {
|
|
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-62f1d8e0] {
|
|
41
|
+
list-style: none;
|
|
42
|
+
padding: 0;
|
|
43
|
+
margin: 0;
|
|
44
|
+
}
|
|
45
|
+
.context-menu li[data-v-62f1d8e0] {
|
|
46
|
+
padding: 8px 16px;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
.context-menu li[data-v-62f1d8e0]:hover {
|
|
50
|
+
background-color: #f0f0f0;
|
|
51
|
+
}
|
|
52
|
+
.file-upload-wrapper[data-v-62f1d8e0] {
|
|
53
|
+
position: relative;
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
.file-upload-input[data-v-62f1d8e0] {
|
|
57
|
+
width: 100%;
|
|
58
|
+
height: 40px;
|
|
59
|
+
opacity: 0;
|
|
60
|
+
position: absolute;
|
|
61
|
+
top: 0;
|
|
62
|
+
left: 0;
|
|
63
|
+
z-index: 1;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
}
|
|
66
|
+
.file-upload-label[data-v-62f1d8e0] {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: flex-start;
|
|
70
|
+
background-color: #f5f5f5;
|
|
71
|
+
border: 1px solid #ddd;
|
|
72
|
+
border-radius: 4px;
|
|
73
|
+
padding: 10px 15px;
|
|
74
|
+
color: #333;
|
|
75
|
+
font-size: 16px;
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
text-align: left;
|
|
78
|
+
user-select: none;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
transition: background-color 0.3s ease;
|
|
81
|
+
}
|
|
82
|
+
.file-upload-label[data-v-62f1d8e0]:hover {
|
|
83
|
+
background-color: #e4e4e4;
|
|
84
|
+
}
|
|
85
|
+
.file-icon[data-v-62f1d8e0] {
|
|
86
|
+
margin-right: 10px;
|
|
87
|
+
font-size: 20px; /* Slightly larger icon for better visual balance */
|
|
88
|
+
}
|
|
89
|
+
.file-label-text[data-v-62f1d8e0] {
|
|
90
|
+
flex-grow: 1; /* Ensures text takes the available space */
|
|
91
|
+
margin-left: 10px; /* Spacing between icon and text */
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Additional styling to align with Vuestic's modern and minimalistic design */
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { d as defineComponent, r as ref, b as resolveComponent, c as openBlock, e as createElementBlock, f as createVNode, w as withCtx, p as createBaseVNode, g as createTextVNode, i as createCommentVNode, u as unref, a4 as withDirectives, a5 as vModelText, h as createBlock, _ as _export_sfc, n as onMounted, R as nextTick, a6 as Teleport } from "./index-552863fd.js";
|
|
2
|
+
import { C as CodeLoader } from "./vue-content-loader.es-6b36f05e.js";
|
|
3
|
+
import { C as ColumnSelector } from "./dropDown-5e7e9a5a.js";
|
|
4
|
+
import { u as useNodeStore } from "./PopOver-b37ff9be.js";
|
|
5
|
+
import mainEditorRef from "./fullEditor-705c6ccb.js";
|
|
6
|
+
import { G as GenericNodeSettings } from "./genericNodeSettings-65587f20.js";
|
|
7
|
+
import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
|
|
8
|
+
import "./vue-codemirror.esm-dd17b478.js";
|
|
9
|
+
import "./designer-e5bbe26f.js";
|
|
10
|
+
const _hoisted_1 = { key: 0 };
|
|
11
|
+
const _hoisted_2 = { class: "listbox-wrapper" };
|
|
12
|
+
const _hoisted_3 = { style: { "border-radius": "20px" } };
|
|
13
|
+
const _hoisted_4 = { key: 0 };
|
|
14
|
+
const _hoisted_5 = { key: 1 };
|
|
15
|
+
const _hoisted_6 = { class: "selectors-row" };
|
|
16
|
+
const _hoisted_7 = { key: 0 };
|
|
17
|
+
const _hoisted_8 = { key: 1 };
|
|
18
|
+
const _hoisted_9 = { key: 2 };
|
|
19
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
20
|
+
__name: "filter",
|
|
21
|
+
setup(__props, { expose: __expose }) {
|
|
22
|
+
const editorString = ref("");
|
|
23
|
+
const isLoaded = ref(false);
|
|
24
|
+
const isAdvancedFilter = ref(true);
|
|
25
|
+
const nodeStore = useNodeStore();
|
|
26
|
+
const nodeFilter = ref(null);
|
|
27
|
+
const nodeData = ref(null);
|
|
28
|
+
const showOptions = ref(false);
|
|
29
|
+
const editorChild = ref(null);
|
|
30
|
+
const comparisonMapping = {
|
|
31
|
+
Equals: "=",
|
|
32
|
+
"Smaller then": "<",
|
|
33
|
+
"Greater then": ">",
|
|
34
|
+
Contains: "contains",
|
|
35
|
+
// or any other representation you prefer
|
|
36
|
+
"Does not equal": "!=",
|
|
37
|
+
"Smaller or equal": "<=",
|
|
38
|
+
"Greater or equal": ">="
|
|
39
|
+
};
|
|
40
|
+
const reversedMapping = {};
|
|
41
|
+
Object.entries(comparisonMapping).forEach(([key, value]) => {
|
|
42
|
+
reversedMapping[value] = key;
|
|
43
|
+
});
|
|
44
|
+
const translateSymbolToDes = (symbol) => {
|
|
45
|
+
return reversedMapping[symbol] ?? symbol;
|
|
46
|
+
};
|
|
47
|
+
const comparisonOptions = Object.keys(comparisonMapping);
|
|
48
|
+
const handleFieldChange = (newValue) => {
|
|
49
|
+
var _a;
|
|
50
|
+
if ((_a = nodeFilter.value) == null ? void 0 : _a.filter_input.basic_filter) {
|
|
51
|
+
nodeFilter.value.filter_input.basic_filter.field = newValue;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
function translateComparison(input) {
|
|
55
|
+
return comparisonMapping[input] ?? input;
|
|
56
|
+
}
|
|
57
|
+
const handleFilterTypeChange = (newValue) => {
|
|
58
|
+
var _a;
|
|
59
|
+
if ((_a = nodeFilter.value) == null ? void 0 : _a.filter_input.basic_filter) {
|
|
60
|
+
const symbolicType = translateComparison(newValue);
|
|
61
|
+
nodeFilter.value.filter_input.basic_filter.filter_type = symbolicType;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const loadNodeData = async (nodeId) => {
|
|
65
|
+
var _a, _b, _c;
|
|
66
|
+
nodeData.value = await nodeStore.getNodeData(nodeId, false);
|
|
67
|
+
if (nodeData.value) {
|
|
68
|
+
nodeFilter.value = nodeData.value.setting_input;
|
|
69
|
+
if ((_a = nodeFilter.value) == null ? void 0 : _a.filter_input.advanced_filter) {
|
|
70
|
+
editorString.value = (_b = nodeFilter.value) == null ? void 0 : _b.filter_input.advanced_filter;
|
|
71
|
+
}
|
|
72
|
+
isAdvancedFilter.value = ((_c = nodeFilter.value) == null ? void 0 : _c.filter_input.filter_type) === "advanced";
|
|
73
|
+
}
|
|
74
|
+
isLoaded.value = true;
|
|
75
|
+
};
|
|
76
|
+
const updateAdvancedFilter = () => {
|
|
77
|
+
if (nodeFilter.value) {
|
|
78
|
+
nodeFilter.value.filter_input.advanced_filter = nodeStore.inputCode;
|
|
79
|
+
console.log(nodeFilter.value);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const pushNodeData = async () => {
|
|
83
|
+
if (nodeFilter.value) {
|
|
84
|
+
if (isAdvancedFilter.value) {
|
|
85
|
+
updateAdvancedFilter();
|
|
86
|
+
nodeFilter.value.filter_input.filter_type = "advanced";
|
|
87
|
+
} else {
|
|
88
|
+
nodeFilter.value.filter_input.filter_type = "basic";
|
|
89
|
+
}
|
|
90
|
+
nodeStore.updateSettings(nodeFilter);
|
|
91
|
+
}
|
|
92
|
+
isLoaded.value = false;
|
|
93
|
+
nodeStore.isDrawerOpen = false;
|
|
94
|
+
};
|
|
95
|
+
__expose({ loadNodeData, pushNodeData });
|
|
96
|
+
return (_ctx, _cache) => {
|
|
97
|
+
const _component_el_switch = resolveComponent("el-switch");
|
|
98
|
+
return isLoaded.value && nodeFilter.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
99
|
+
createVNode(GenericNodeSettings, {
|
|
100
|
+
modelValue: nodeFilter.value,
|
|
101
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => nodeFilter.value = $event)
|
|
102
|
+
}, {
|
|
103
|
+
default: withCtx(() => {
|
|
104
|
+
var _a, _b, _c, _d, _e;
|
|
105
|
+
return [
|
|
106
|
+
createBaseVNode("div", _hoisted_2, [
|
|
107
|
+
createBaseVNode("div", _hoisted_3, [
|
|
108
|
+
createVNode(_component_el_switch, {
|
|
109
|
+
modelValue: isAdvancedFilter.value,
|
|
110
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isAdvancedFilter.value = $event),
|
|
111
|
+
class: "mb-2",
|
|
112
|
+
"active-text": "Advanced filter options",
|
|
113
|
+
"inactive-text": "Basic filter"
|
|
114
|
+
}, null, 8, ["modelValue"])
|
|
115
|
+
]),
|
|
116
|
+
isAdvancedFilter.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
117
|
+
_cache[7] || (_cache[7] = createTextVNode(" Advanced filter ")),
|
|
118
|
+
createVNode(mainEditorRef, {
|
|
119
|
+
ref_key: "editorChild",
|
|
120
|
+
ref: editorChild,
|
|
121
|
+
"editor-string": editorString.value
|
|
122
|
+
}, null, 8, ["editor-string"])
|
|
123
|
+
])) : createCommentVNode("", true),
|
|
124
|
+
!isAdvancedFilter.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
125
|
+
_cache[8] || (_cache[8] = createTextVNode(" Standard Filter ")),
|
|
126
|
+
createBaseVNode("div", _hoisted_6, [
|
|
127
|
+
((_a = nodeFilter.value) == null ? void 0 : _a.filter_input.basic_filter) ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
128
|
+
createVNode(ColumnSelector, {
|
|
129
|
+
modelValue: nodeFilter.value.filter_input.basic_filter.field,
|
|
130
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => nodeFilter.value.filter_input.basic_filter.field = $event),
|
|
131
|
+
value: nodeFilter.value.filter_input.basic_filter.field,
|
|
132
|
+
"column-options": (_c = (_b = nodeData.value) == null ? void 0 : _b.main_input) == null ? void 0 : _c.columns,
|
|
133
|
+
"onUpdate:value": _cache[2] || (_cache[2] = (value) => handleFieldChange(value))
|
|
134
|
+
}, null, 8, ["modelValue", "value", "column-options"])
|
|
135
|
+
])) : createCommentVNode("", true),
|
|
136
|
+
((_d = nodeFilter.value) == null ? void 0 : _d.filter_input.basic_filter) ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
137
|
+
createVNode(ColumnSelector, {
|
|
138
|
+
value: translateSymbolToDes(nodeFilter.value.filter_input.basic_filter.filter_type),
|
|
139
|
+
"column-options": unref(comparisonOptions),
|
|
140
|
+
"onUpdate:value": _cache[3] || (_cache[3] = (value) => handleFilterTypeChange(value))
|
|
141
|
+
}, null, 8, ["value", "column-options"])
|
|
142
|
+
])) : createCommentVNode("", true),
|
|
143
|
+
((_e = nodeFilter.value) == null ? void 0 : _e.filter_input.basic_filter) ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
144
|
+
withDirectives(createBaseVNode("input", {
|
|
145
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => nodeFilter.value.filter_input.basic_filter.filter_value = $event),
|
|
146
|
+
type: "text",
|
|
147
|
+
class: "input-field",
|
|
148
|
+
onFocus: _cache[5] || (_cache[5] = ($event) => showOptions.value = true)
|
|
149
|
+
}, null, 544), [
|
|
150
|
+
[vModelText, nodeFilter.value.filter_input.basic_filter.filter_value]
|
|
151
|
+
])
|
|
152
|
+
])) : createCommentVNode("", true)
|
|
153
|
+
])
|
|
154
|
+
])) : createCommentVNode("", true)
|
|
155
|
+
])
|
|
156
|
+
];
|
|
157
|
+
}),
|
|
158
|
+
_: 1
|
|
159
|
+
}, 8, ["modelValue"])
|
|
160
|
+
])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }));
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
const filter_vue_vue_type_style_index_0_scoped_84dc735d_lang = "";
|
|
165
|
+
const filterInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-84dc735d"]]);
|
|
166
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
167
|
+
__name: "Filter",
|
|
168
|
+
props: {
|
|
169
|
+
nodeId: {
|
|
170
|
+
type: Number,
|
|
171
|
+
required: true
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
setup(__props) {
|
|
175
|
+
const nodeStore = useNodeStore();
|
|
176
|
+
const childComp = ref(null);
|
|
177
|
+
const props = __props;
|
|
178
|
+
const el = ref(null);
|
|
179
|
+
const drawer = ref(false);
|
|
180
|
+
const closeOnDrawer = () => {
|
|
181
|
+
var _a;
|
|
182
|
+
(_a = childComp.value) == null ? void 0 : _a.pushNodeData();
|
|
183
|
+
drawer.value = false;
|
|
184
|
+
nodeStore.isDrawerOpen = false;
|
|
185
|
+
};
|
|
186
|
+
const openDrawer = async () => {
|
|
187
|
+
if (nodeStore.node_id === props.nodeId) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
nodeStore.closeDrawer();
|
|
191
|
+
drawer.value = true;
|
|
192
|
+
const drawerOpen = nodeStore.isDrawerOpen;
|
|
193
|
+
nodeStore.isDrawerOpen = true;
|
|
194
|
+
await nextTick();
|
|
195
|
+
if (nodeStore.node_id === props.nodeId && drawerOpen) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (childComp.value) {
|
|
199
|
+
childComp.value.loadNodeData(props.nodeId);
|
|
200
|
+
nodeStore.openDrawer(closeOnDrawer);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
onMounted(async () => {
|
|
204
|
+
await nextTick();
|
|
205
|
+
});
|
|
206
|
+
return (_ctx, _cache) => {
|
|
207
|
+
return openBlock(), createElementBlock("div", {
|
|
208
|
+
ref_key: "el",
|
|
209
|
+
ref: el
|
|
210
|
+
}, [
|
|
211
|
+
createVNode(NodeButton, {
|
|
212
|
+
ref: "nodeButton",
|
|
213
|
+
"node-id": __props.nodeId,
|
|
214
|
+
"image-src": "filter.png",
|
|
215
|
+
title: `${__props.nodeId}: Filter`,
|
|
216
|
+
onClick: openDrawer
|
|
217
|
+
}, null, 8, ["node-id", "title"]),
|
|
218
|
+
drawer.value ? (openBlock(), createBlock(Teleport, {
|
|
219
|
+
key: 0,
|
|
220
|
+
to: "#nodesettings"
|
|
221
|
+
}, [
|
|
222
|
+
createVNode(NodeTitle, {
|
|
223
|
+
title: "Filter data",
|
|
224
|
+
intro: "Filter rows in the data"
|
|
225
|
+
}),
|
|
226
|
+
createVNode(filterInput, {
|
|
227
|
+
ref_key: "childComp",
|
|
228
|
+
ref: childComp,
|
|
229
|
+
"node-id": __props.nodeId
|
|
230
|
+
}, null, 8, ["node-id"])
|
|
231
|
+
])) : createCommentVNode("", true)
|
|
232
|
+
], 512);
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
export {
|
|
237
|
+
_sfc_main as default
|
|
238
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.x-flip[data-v-84dc735d] {
|
|
2
|
+
transform: scaleX(-100%);
|
|
3
|
+
}
|
|
4
|
+
.input-field[data-v-84dc735d] {
|
|
5
|
+
width: 100%; /* Full width to fit container */
|
|
6
|
+
padding: 6px 10px; /* Reduced padding */
|
|
7
|
+
font-size: 14px; /* Smaller font size */
|
|
8
|
+
line-height: 1.4; /* Adjust line height for better text alignment */
|
|
9
|
+
border: 1px solid #e0e0e0; /* Lighter border color */
|
|
10
|
+
border-radius: 4px; /* Slightly rounded corners for a softer look */
|
|
11
|
+
box-shadow: none; /* Remove shadow for a flatter style */
|
|
12
|
+
outline: none; /* Remove the default focus outline */
|
|
13
|
+
transition: border-color 0.2s, box-shadow 0.2s; /* Smooth transition for focus */
|
|
14
|
+
}
|
|
15
|
+
.selectors-row[data-v-84dc735d] {
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
margin-bottom: 20px; /* Spacing between rows */
|
|
19
|
+
margin-left: 20px;
|
|
20
|
+
}
|