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,231 @@
|
|
|
1
|
+
import { r as ref, d as defineComponent, c as openBlock, e as createElementBlock, f as createVNode, w as withCtx, h as createBlock, u as unref, n as onMounted, R as nextTick, a6 as Teleport, i as createCommentVNode } from "./index-552863fd.js";
|
|
2
|
+
import { C as CodeLoader } from "./vue-content-loader.es-6b36f05e.js";
|
|
3
|
+
import { u as useNodeStore } from "./PopOver-b37ff9be.js";
|
|
4
|
+
import { s as selectDynamic } from "./selectDynamic-bd644891.js";
|
|
5
|
+
import { G as GenericNodeSettings } from "./genericNodeSettings-65587f20.js";
|
|
6
|
+
import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
|
|
7
|
+
import "./UnavailableFields-b41976ed.js";
|
|
8
|
+
import "./designer-e5bbe26f.js";
|
|
9
|
+
const createSelectInput = (column_name, data_type = void 0, position = void 0, original_position = void 0) => {
|
|
10
|
+
const selectInput = {
|
|
11
|
+
old_name: column_name,
|
|
12
|
+
new_name: column_name,
|
|
13
|
+
data_type,
|
|
14
|
+
keep: true,
|
|
15
|
+
join_key: false,
|
|
16
|
+
is_altered: false,
|
|
17
|
+
data_type_change: false,
|
|
18
|
+
is_available: true,
|
|
19
|
+
position: position ?? 0,
|
|
20
|
+
original_position: original_position ?? 0
|
|
21
|
+
};
|
|
22
|
+
return selectInput;
|
|
23
|
+
};
|
|
24
|
+
const updateNodeSelect = (nodeTable, nodeSelectRef) => {
|
|
25
|
+
if (!(nodeTable == null ? void 0 : nodeTable.table_schema) || !nodeSelectRef.value)
|
|
26
|
+
return;
|
|
27
|
+
const existingInputMap = /* @__PURE__ */ new Map();
|
|
28
|
+
nodeSelectRef.value.select_input.forEach((input) => {
|
|
29
|
+
existingInputMap.set(input.old_name, input);
|
|
30
|
+
});
|
|
31
|
+
nodeTable.table_schema.forEach((schema, index) => {
|
|
32
|
+
var _a;
|
|
33
|
+
const existingInput = existingInputMap.get(schema.name);
|
|
34
|
+
if (existingInput) {
|
|
35
|
+
if (!existingInput.is_altered) {
|
|
36
|
+
existingInput.data_type = schema.data_type;
|
|
37
|
+
}
|
|
38
|
+
if (!existingInput.original_position) {
|
|
39
|
+
existingInput.original_position = index;
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
const newInput = createSelectInput(schema.name, schema.data_type, index, index);
|
|
43
|
+
(_a = nodeSelectRef.value) == null ? void 0 : _a.select_input.push(newInput);
|
|
44
|
+
existingInputMap.set(schema.name, newInput);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const createNodeSelect = (flowId = -1, nodeId = -1, pos_x = 0, pos_y = 0, cache_input = false, keep_missing = false) => {
|
|
49
|
+
const selectInputData = [];
|
|
50
|
+
const nodeSelectRef = ref({
|
|
51
|
+
flow_id: flowId,
|
|
52
|
+
node_id: nodeId,
|
|
53
|
+
pos_x,
|
|
54
|
+
pos_y,
|
|
55
|
+
cache_input,
|
|
56
|
+
keep_missing,
|
|
57
|
+
select_input: selectInputData,
|
|
58
|
+
cache_results: false,
|
|
59
|
+
sorted_by: "none"
|
|
60
|
+
});
|
|
61
|
+
return nodeSelectRef;
|
|
62
|
+
};
|
|
63
|
+
const _hoisted_1$1 = {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "listbox-wrapper"
|
|
66
|
+
};
|
|
67
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
68
|
+
__name: "select",
|
|
69
|
+
setup(__props, { expose: __expose }) {
|
|
70
|
+
const keepMissing = ref(false);
|
|
71
|
+
const nodeStore = useNodeStore();
|
|
72
|
+
const nodeSelect = ref(createNodeSelect().value);
|
|
73
|
+
const dataLoaded = ref(false);
|
|
74
|
+
const loadNodeData = async (nodeId) => {
|
|
75
|
+
const result = await nodeStore.getNodeData(nodeId, false);
|
|
76
|
+
console.log("got result data");
|
|
77
|
+
if (result) {
|
|
78
|
+
const main_input = result.main_input;
|
|
79
|
+
try {
|
|
80
|
+
if (result.setting_input && main_input && result.setting_input.is_setup) {
|
|
81
|
+
nodeSelect.value = result.setting_input;
|
|
82
|
+
keepMissing.value = nodeSelect.value.keep_missing;
|
|
83
|
+
updateNodeSelect(main_input, nodeSelect);
|
|
84
|
+
} else {
|
|
85
|
+
throw new Error("Setting input not available");
|
|
86
|
+
}
|
|
87
|
+
} catch (error) {
|
|
88
|
+
console.log("doing this");
|
|
89
|
+
if (main_input && nodeSelect.value) {
|
|
90
|
+
nodeSelect.value = createNodeSelect(nodeStore.flow_id, nodeStore.node_id).value;
|
|
91
|
+
nodeSelect.value.depending_on_id = main_input.node_id;
|
|
92
|
+
nodeSelect.value.flow_id = nodeStore.flow_id;
|
|
93
|
+
nodeSelect.value.node_id = nodeStore.node_id;
|
|
94
|
+
nodeSelect.value.keep_missing = keepMissing.value;
|
|
95
|
+
updateNodeSelect(main_input, nodeSelect);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
dataLoaded.value = true;
|
|
100
|
+
};
|
|
101
|
+
const pushNodeData = async () => {
|
|
102
|
+
nodeSelect.value.select_input.sort((a, b) => a.position - b.position);
|
|
103
|
+
const originalData = nodeStore.getCurrentNodeData();
|
|
104
|
+
const newColumnSettings = nodeSelect.value.select_input;
|
|
105
|
+
nodeSelect.value.keep_missing = keepMissing.value;
|
|
106
|
+
if (originalData) {
|
|
107
|
+
newColumnSettings.forEach((newColumnSetting, index) => {
|
|
108
|
+
var _a, _b;
|
|
109
|
+
let original_index = (_a = originalData.main_input) == null ? void 0 : _a.table_schema.findIndex(
|
|
110
|
+
(column) => column.name === newColumnSetting.old_name
|
|
111
|
+
);
|
|
112
|
+
let original_object = index !== -1 ? (_b = originalData.main_input) == null ? void 0 : _b.table_schema[index] : void 0;
|
|
113
|
+
if (original_object) {
|
|
114
|
+
newColumnSetting.is_altered = (original_object == null ? void 0 : original_object.data_type) !== newColumnSetting.data_type;
|
|
115
|
+
newColumnSetting.data_type_change = newColumnSetting.is_altered;
|
|
116
|
+
newColumnSetting.position = index;
|
|
117
|
+
newColumnSetting.original_position = original_index || index;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
await nodeStore.updateSettings(nodeSelect);
|
|
122
|
+
};
|
|
123
|
+
const updateSelectInputsHandler = (updatedInputs) => {
|
|
124
|
+
nodeSelect.value.select_input = updatedInputs;
|
|
125
|
+
};
|
|
126
|
+
__expose({
|
|
127
|
+
loadNodeData,
|
|
128
|
+
pushNodeData
|
|
129
|
+
});
|
|
130
|
+
return (_ctx, _cache) => {
|
|
131
|
+
return dataLoaded.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
132
|
+
createVNode(GenericNodeSettings, {
|
|
133
|
+
modelValue: nodeSelect.value,
|
|
134
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => nodeSelect.value = $event)
|
|
135
|
+
}, {
|
|
136
|
+
default: withCtx(() => [
|
|
137
|
+
createVNode(selectDynamic, {
|
|
138
|
+
sortedBy: nodeSelect.value.sorted_by,
|
|
139
|
+
"onUpdate:sortedBy": _cache[0] || (_cache[0] = ($event) => nodeSelect.value.sorted_by = $event),
|
|
140
|
+
"select-inputs": nodeSelect.value.select_input,
|
|
141
|
+
"show-keep-option": true,
|
|
142
|
+
"show-data-type": true,
|
|
143
|
+
"show-new-columns": true,
|
|
144
|
+
"show-old-columns": true,
|
|
145
|
+
"show-headers": true,
|
|
146
|
+
"show-title": false,
|
|
147
|
+
"show-data": true,
|
|
148
|
+
title: "Select data",
|
|
149
|
+
onUpdateSelectInputs: updateSelectInputsHandler
|
|
150
|
+
}, null, 8, ["sortedBy", "select-inputs"])
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
}, 8, ["modelValue"])
|
|
154
|
+
])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }));
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
const _hoisted_1 = { ref: "el" };
|
|
159
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
160
|
+
__name: "Select",
|
|
161
|
+
props: {
|
|
162
|
+
nodeId: {
|
|
163
|
+
type: Number,
|
|
164
|
+
required: true
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
setup(__props) {
|
|
168
|
+
const nodeStore = useNodeStore();
|
|
169
|
+
const childComp = ref(null);
|
|
170
|
+
const drawer = ref(false);
|
|
171
|
+
let isSelected = ref(false);
|
|
172
|
+
const props = __props;
|
|
173
|
+
onMounted(async () => {
|
|
174
|
+
await nextTick();
|
|
175
|
+
});
|
|
176
|
+
const closeOnDrawer = () => {
|
|
177
|
+
var _a;
|
|
178
|
+
if (drawer.value) {
|
|
179
|
+
isSelected.value = false;
|
|
180
|
+
(_a = childComp.value) == null ? void 0 : _a.pushNodeData();
|
|
181
|
+
drawer.value = false;
|
|
182
|
+
nodeStore.isDrawerOpen = false;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const openDrawer = async () => {
|
|
186
|
+
if (nodeStore.node_id === props.nodeId) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
nodeStore.closeDrawer();
|
|
190
|
+
drawer.value = true;
|
|
191
|
+
const drawerOpen = nodeStore.isDrawerOpen;
|
|
192
|
+
nodeStore.isDrawerOpen = true;
|
|
193
|
+
await nextTick();
|
|
194
|
+
if (nodeStore.node_id === props.nodeId && drawerOpen) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (childComp.value) {
|
|
198
|
+
childComp.value.loadNodeData(props.nodeId);
|
|
199
|
+
nodeStore.openDrawer(closeOnDrawer);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
return (_ctx, _cache) => {
|
|
203
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
204
|
+
createVNode(NodeButton, {
|
|
205
|
+
ref: "nodeButton",
|
|
206
|
+
"node-id": __props.nodeId,
|
|
207
|
+
"image-src": "select.png",
|
|
208
|
+
title: `${__props.nodeId}: Select data`,
|
|
209
|
+
onClick: openDrawer
|
|
210
|
+
}, null, 8, ["node-id", "title"]),
|
|
211
|
+
drawer.value ? (openBlock(), createBlock(Teleport, {
|
|
212
|
+
key: 0,
|
|
213
|
+
to: "#nodesettings"
|
|
214
|
+
}, [
|
|
215
|
+
createVNode(NodeTitle, {
|
|
216
|
+
title: "Select data",
|
|
217
|
+
intro: "Select columns from the data"
|
|
218
|
+
}),
|
|
219
|
+
createVNode(_sfc_main$1, {
|
|
220
|
+
ref_key: "childComp",
|
|
221
|
+
ref: childComp,
|
|
222
|
+
"node-id": __props.nodeId
|
|
223
|
+
}, null, 8, ["node-id"])
|
|
224
|
+
])) : createCommentVNode("", true)
|
|
225
|
+
], 512);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
export {
|
|
230
|
+
_sfc_main as default
|
|
231
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { d as defineComponent, c as openBlock, e as createElementBlock, p as createBaseVNode, F as Fragment, q as renderList, s as normalizeClass, t as toDisplayString, T as normalizeStyle, _ as _export_sfc, g as createTextVNode, i as createCommentVNode } from "./index-552863fd.js";
|
|
2
|
+
const _hoisted_1$1 = ["onClick"];
|
|
3
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "ContextMenu",
|
|
5
|
+
props: {
|
|
6
|
+
position: { type: Object, required: true },
|
|
7
|
+
options: {
|
|
8
|
+
type: Array,
|
|
9
|
+
required: true
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
emits: ["select", "close"],
|
|
13
|
+
setup(__props, { emit: __emit }) {
|
|
14
|
+
const emit = __emit;
|
|
15
|
+
const selectOption = (action) => {
|
|
16
|
+
emit("select", action);
|
|
17
|
+
emit("close");
|
|
18
|
+
};
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return openBlock(), createElementBlock("div", {
|
|
21
|
+
class: "context-menu",
|
|
22
|
+
style: normalizeStyle({ top: __props.position.y + "px", left: __props.position.x + "px" })
|
|
23
|
+
}, [
|
|
24
|
+
createBaseVNode("ul", null, [
|
|
25
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
26
|
+
return openBlock(), createElementBlock("li", {
|
|
27
|
+
key: option.action,
|
|
28
|
+
class: normalizeClass({ disabled: option.disabled }),
|
|
29
|
+
onClick: ($event) => !option.disabled && selectOption(option.action)
|
|
30
|
+
}, toDisplayString(option.label), 11, _hoisted_1$1);
|
|
31
|
+
}), 128))
|
|
32
|
+
])
|
|
33
|
+
], 4);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const ContextMenu_vue_vue_type_style_index_0_scoped_a562ba5e_lang = "";
|
|
38
|
+
const ContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-a562ba5e"]]);
|
|
39
|
+
const _hoisted_1 = { class: "listbox-wrapper" };
|
|
40
|
+
const _hoisted_2 = { class: "listbox-row" };
|
|
41
|
+
const _hoisted_3 = { class: "listbox-subtitle" };
|
|
42
|
+
const _hoisted_4 = { class: "items-container" };
|
|
43
|
+
const _hoisted_5 = { key: 0 };
|
|
44
|
+
const _hoisted_6 = ["onClick"];
|
|
45
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
46
|
+
__name: "SettingsSection",
|
|
47
|
+
props: {
|
|
48
|
+
title: { type: String, required: true },
|
|
49
|
+
items: { type: Array, required: true }
|
|
50
|
+
},
|
|
51
|
+
emits: ["removeItem"],
|
|
52
|
+
setup(__props, { emit: __emit }) {
|
|
53
|
+
const emit = __emit;
|
|
54
|
+
const emitRemove = (item) => {
|
|
55
|
+
emit("removeItem", item);
|
|
56
|
+
};
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
59
|
+
createBaseVNode("div", _hoisted_2, [
|
|
60
|
+
createBaseVNode("div", _hoisted_3, toDisplayString(__props.title), 1),
|
|
61
|
+
createBaseVNode("div", _hoisted_4, [
|
|
62
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
63
|
+
return openBlock(), createElementBlock("div", {
|
|
64
|
+
key: index,
|
|
65
|
+
class: "item-box"
|
|
66
|
+
}, [
|
|
67
|
+
item !== "" ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
68
|
+
createTextVNode(toDisplayString(item) + " ", 1),
|
|
69
|
+
createBaseVNode("span", {
|
|
70
|
+
class: "remove-btn",
|
|
71
|
+
onClick: ($event) => emitRemove(item)
|
|
72
|
+
}, "x", 8, _hoisted_6)
|
|
73
|
+
])) : createCommentVNode("", true)
|
|
74
|
+
]);
|
|
75
|
+
}), 128))
|
|
76
|
+
])
|
|
77
|
+
])
|
|
78
|
+
]);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const SettingsSection_vue_vue_type_style_index_0_scoped_89e3a043_lang = "";
|
|
83
|
+
const SettingsSection = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-89e3a043"]]);
|
|
84
|
+
export {
|
|
85
|
+
ContextMenu as C,
|
|
86
|
+
SettingsSection as S
|
|
87
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
.context-menu[data-v-a562ba5e] {
|
|
3
|
+
position: fixed;
|
|
4
|
+
z-index: 1000;
|
|
5
|
+
border: 1px solid #ccc;
|
|
6
|
+
background-color: white;
|
|
7
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
user-select: none;
|
|
10
|
+
}
|
|
11
|
+
.context-menu ul[data-v-a562ba5e] {
|
|
12
|
+
list-style: none;
|
|
13
|
+
padding: 0;
|
|
14
|
+
margin: 0;
|
|
15
|
+
}
|
|
16
|
+
.context-menu li[data-v-a562ba5e] {
|
|
17
|
+
padding: 8px 16px;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
.context-menu li.disabled[data-v-a562ba5e] {
|
|
21
|
+
color: #ccc;
|
|
22
|
+
cursor: not-allowed;
|
|
23
|
+
}
|
|
24
|
+
.context-menu li[data-v-a562ba5e]:hover:not(.disabled) {
|
|
25
|
+
background-color: #f0f0f0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.items-container[data-v-89e3a043] {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
gap: 10px; /* Space between items */
|
|
32
|
+
}
|
|
33
|
+
.item-box[data-v-89e3a043] {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
padding: 5px 10px;
|
|
37
|
+
background-color: #f0f0f0;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
font-size: 12px; /* Font size set to 12px */
|
|
40
|
+
position: relative;
|
|
41
|
+
}
|
|
42
|
+
.remove-btn[data-v-89e3a043] {
|
|
43
|
+
margin-left: 8px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
color: #100f0f72;
|
|
46
|
+
font-weight: bold;
|
|
47
|
+
}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { d as defineComponent, r as ref, l as computed, n as onMounted, R as nextTick, o as onUnmounted, b as resolveComponent, c as openBlock, e as createElementBlock, f as createVNode, w as withCtx, p as createBaseVNode, F as Fragment, q as renderList, s as normalizeClass, t as toDisplayString, i as createCommentVNode, T as normalizeStyle, v as withModifiers, h as createBlock, u as unref, _ as _export_sfc, a6 as Teleport } from "./index-552863fd.js";
|
|
2
|
+
import { u as useNodeStore } from "./PopOver-b37ff9be.js";
|
|
3
|
+
import { C as CodeLoader } from "./vue-content-loader.es-6b36f05e.js";
|
|
4
|
+
import { G as GenericNodeSettings } from "./genericNodeSettings-65587f20.js";
|
|
5
|
+
import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
|
|
6
|
+
import "./designer-e5bbe26f.js";
|
|
7
|
+
const _hoisted_1$1 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "listbox-wrapper"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_2 = { class: "listbox-wrapper" };
|
|
12
|
+
const _hoisted_3 = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "listbox"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_4 = ["onClick", "onContextmenu"];
|
|
17
|
+
const _hoisted_5 = { class: "listbox-wrapper" };
|
|
18
|
+
const _hoisted_6 = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "table-wrapper"
|
|
21
|
+
};
|
|
22
|
+
const _hoisted_7 = { class: "styled-table" };
|
|
23
|
+
const _hoisted_8 = { key: 0 };
|
|
24
|
+
const _hoisted_9 = ["onContextmenu"];
|
|
25
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
26
|
+
__name: "sort",
|
|
27
|
+
setup(__props, { expose: __expose }) {
|
|
28
|
+
const nodeStore = useNodeStore();
|
|
29
|
+
const showContextMenu = ref(false);
|
|
30
|
+
const showContextMenuRemove = ref(false);
|
|
31
|
+
const dataLoaded = ref(false);
|
|
32
|
+
const contextMenuPosition = ref({ x: 0, y: 0 });
|
|
33
|
+
const contextMenuColumn = ref(null);
|
|
34
|
+
const contextMenuRef = ref(null);
|
|
35
|
+
const selectedColumns = ref([]);
|
|
36
|
+
const nodeSort = ref(null);
|
|
37
|
+
const nodeData = ref(null);
|
|
38
|
+
const sortOptions = ["Ascending", "Descending"];
|
|
39
|
+
const firstSelectedIndex = ref(null);
|
|
40
|
+
const openRowContextMenu = (event, index) => {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
contextMenuPosition.value = { x: event.clientX, y: event.clientY };
|
|
43
|
+
contextMenuRowIndex.value = index;
|
|
44
|
+
showContextMenuRemove.value = true;
|
|
45
|
+
};
|
|
46
|
+
const removeRow = () => {
|
|
47
|
+
var _a;
|
|
48
|
+
if (contextMenuRowIndex.value !== null) {
|
|
49
|
+
(_a = nodeSort.value) == null ? void 0 : _a.sort_input.splice(contextMenuRowIndex.value, 1);
|
|
50
|
+
}
|
|
51
|
+
showContextMenuRemove.value = false;
|
|
52
|
+
contextMenuRowIndex.value = null;
|
|
53
|
+
};
|
|
54
|
+
const contextMenuRowIndex = ref(null);
|
|
55
|
+
const singleColumnSelected = computed(() => selectedColumns.value.length == 1);
|
|
56
|
+
const openContextMenu = (clickedIndex, columnName, event) => {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
event.stopPropagation();
|
|
59
|
+
if (!selectedColumns.value.includes(columnName)) {
|
|
60
|
+
selectedColumns.value = [columnName];
|
|
61
|
+
}
|
|
62
|
+
contextMenuPosition.value = { x: event.clientX, y: event.clientY };
|
|
63
|
+
showContextMenu.value = true;
|
|
64
|
+
};
|
|
65
|
+
const setSortSettings = (sortType, columns) => {
|
|
66
|
+
if (columns) {
|
|
67
|
+
columns.forEach((column) => {
|
|
68
|
+
var _a;
|
|
69
|
+
(_a = nodeSort.value) == null ? void 0 : _a.sort_input.push({ column, how: sortType });
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
showContextMenu.value = false;
|
|
73
|
+
contextMenuColumn.value = null;
|
|
74
|
+
};
|
|
75
|
+
const handleItemClick = (clickedIndex, columnName, event) => {
|
|
76
|
+
if (event.shiftKey && firstSelectedIndex.value !== null) {
|
|
77
|
+
const range = getRange(firstSelectedIndex.value, clickedIndex);
|
|
78
|
+
selectedColumns.value = range.map((index) => {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
return (_b = (_a = nodeData.value) == null ? void 0 : _a.main_input) == null ? void 0 : _b.columns[index];
|
|
81
|
+
}).filter((col) => col !== void 0);
|
|
82
|
+
} else {
|
|
83
|
+
if (firstSelectedIndex.value === clickedIndex) {
|
|
84
|
+
selectedColumns.value = [];
|
|
85
|
+
} else {
|
|
86
|
+
firstSelectedIndex.value = clickedIndex;
|
|
87
|
+
selectedColumns.value = [columnName];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const getRange = (start, end) => {
|
|
92
|
+
return start < end ? [...Array(end - start + 1).keys()].map((i) => i + start) : [...Array(start - end + 1).keys()].map((i) => i + end);
|
|
93
|
+
};
|
|
94
|
+
const loadNodeData = async (nodeId) => {
|
|
95
|
+
var _a, _b, _c;
|
|
96
|
+
nodeData.value = await nodeStore.getNodeData(nodeId, false);
|
|
97
|
+
nodeSort.value = (_a = nodeData.value) == null ? void 0 : _a.setting_input;
|
|
98
|
+
if (!((_b = nodeData.value) == null ? void 0 : _b.setting_input.is_setup) && nodeSort.value) {
|
|
99
|
+
nodeSort.value.sort_input = [];
|
|
100
|
+
}
|
|
101
|
+
dataLoaded.value = true;
|
|
102
|
+
if ((_c = nodeSort.value) == null ? void 0 : _c.is_setup) {
|
|
103
|
+
nodeSort.value.is_setup = true;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const handleClickOutside = (event) => {
|
|
107
|
+
var _a;
|
|
108
|
+
if (!((_a = contextMenuRef.value) == null ? void 0 : _a.contains(event.target))) {
|
|
109
|
+
showContextMenu.value = false;
|
|
110
|
+
contextMenuColumn.value = null;
|
|
111
|
+
showContextMenuRemove.value = false;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const pushNodeData = async () => {
|
|
115
|
+
nodeStore.updateSettings(nodeSort);
|
|
116
|
+
dataLoaded.value = false;
|
|
117
|
+
nodeStore.isDrawerOpen = false;
|
|
118
|
+
};
|
|
119
|
+
__expose({
|
|
120
|
+
loadNodeData,
|
|
121
|
+
pushNodeData
|
|
122
|
+
});
|
|
123
|
+
onMounted(async () => {
|
|
124
|
+
await nextTick();
|
|
125
|
+
window.addEventListener("click", handleClickOutside);
|
|
126
|
+
});
|
|
127
|
+
onUnmounted(() => {
|
|
128
|
+
window.removeEventListener("click", handleClickOutside);
|
|
129
|
+
});
|
|
130
|
+
return (_ctx, _cache) => {
|
|
131
|
+
const _component_el_option = resolveComponent("el-option");
|
|
132
|
+
const _component_el_select = resolveComponent("el-select");
|
|
133
|
+
return dataLoaded.value && nodeSort.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
134
|
+
createVNode(GenericNodeSettings, {
|
|
135
|
+
modelValue: nodeSort.value,
|
|
136
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => nodeSort.value = $event)
|
|
137
|
+
}, {
|
|
138
|
+
default: withCtx(() => {
|
|
139
|
+
var _a, _b;
|
|
140
|
+
return [
|
|
141
|
+
createBaseVNode("div", _hoisted_2, [
|
|
142
|
+
_cache[4] || (_cache[4] = createBaseVNode("div", { class: "listbox-subtitle" }, "Columns", -1)),
|
|
143
|
+
dataLoaded.value ? (openBlock(), createElementBlock("ul", _hoisted_3, [
|
|
144
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList((_b = (_a = nodeData.value) == null ? void 0 : _a.main_input) == null ? void 0 : _b.table_schema, (col_schema, index) => {
|
|
145
|
+
return openBlock(), createElementBlock("li", {
|
|
146
|
+
key: col_schema.name,
|
|
147
|
+
class: normalizeClass({ "is-selected": selectedColumns.value.includes(col_schema.name) }),
|
|
148
|
+
onClick: ($event) => handleItemClick(index, col_schema.name, $event),
|
|
149
|
+
onContextmenu: ($event) => openContextMenu(index, col_schema.name, $event)
|
|
150
|
+
}, toDisplayString(col_schema.name) + " (" + toDisplayString(col_schema.data_type) + ") ", 43, _hoisted_4);
|
|
151
|
+
}), 128))
|
|
152
|
+
])) : createCommentVNode("", true)
|
|
153
|
+
]),
|
|
154
|
+
showContextMenu.value ? (openBlock(), createElementBlock("div", {
|
|
155
|
+
key: 0,
|
|
156
|
+
ref_key: "contextMenuRef",
|
|
157
|
+
ref: contextMenuRef,
|
|
158
|
+
class: "context-menu",
|
|
159
|
+
style: normalizeStyle({
|
|
160
|
+
top: contextMenuPosition.value.y + "px",
|
|
161
|
+
left: contextMenuPosition.value.x + "px"
|
|
162
|
+
})
|
|
163
|
+
}, [
|
|
164
|
+
!singleColumnSelected.value ? (openBlock(), createElementBlock("button", {
|
|
165
|
+
key: 0,
|
|
166
|
+
onClick: _cache[0] || (_cache[0] = ($event) => setSortSettings("Ascending", selectedColumns.value))
|
|
167
|
+
}, " Ascending ")) : createCommentVNode("", true),
|
|
168
|
+
singleColumnSelected.value ? (openBlock(), createElementBlock("button", {
|
|
169
|
+
key: 1,
|
|
170
|
+
onClick: _cache[1] || (_cache[1] = ($event) => setSortSettings("Ascending", selectedColumns.value))
|
|
171
|
+
}, " Ascending ")) : createCommentVNode("", true),
|
|
172
|
+
singleColumnSelected.value ? (openBlock(), createElementBlock("button", {
|
|
173
|
+
key: 2,
|
|
174
|
+
onClick: _cache[2] || (_cache[2] = ($event) => setSortSettings("Descending", selectedColumns.value))
|
|
175
|
+
}, " Descending ")) : createCommentVNode("", true)
|
|
176
|
+
], 4)) : createCommentVNode("", true),
|
|
177
|
+
createBaseVNode("div", _hoisted_5, [
|
|
178
|
+
_cache[6] || (_cache[6] = createBaseVNode("div", { class: "listbox-subtitle" }, "Settings", -1)),
|
|
179
|
+
dataLoaded.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
180
|
+
createBaseVNode("table", _hoisted_7, [
|
|
181
|
+
_cache[5] || (_cache[5] = createBaseVNode("thead", null, [
|
|
182
|
+
createBaseVNode("tr", null, [
|
|
183
|
+
createBaseVNode("th", null, "Field"),
|
|
184
|
+
createBaseVNode("th", null, "Action")
|
|
185
|
+
])
|
|
186
|
+
], -1)),
|
|
187
|
+
createBaseVNode("tbody", null, [
|
|
188
|
+
nodeSort.value ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
189
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(nodeSort.value.sort_input, (item, index) => {
|
|
190
|
+
return openBlock(), createElementBlock("tr", {
|
|
191
|
+
key: index,
|
|
192
|
+
onContextmenu: withModifiers(($event) => openRowContextMenu($event, index), ["prevent"])
|
|
193
|
+
}, [
|
|
194
|
+
createBaseVNode("td", null, toDisplayString(item.column), 1),
|
|
195
|
+
createBaseVNode("td", null, [
|
|
196
|
+
createVNode(_component_el_select, {
|
|
197
|
+
modelValue: item.how,
|
|
198
|
+
"onUpdate:modelValue": ($event) => item.how = $event,
|
|
199
|
+
size: "small"
|
|
200
|
+
}, {
|
|
201
|
+
default: withCtx(() => [
|
|
202
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(sortOptions, (aggOption) => {
|
|
203
|
+
return createVNode(_component_el_option, {
|
|
204
|
+
key: aggOption,
|
|
205
|
+
label: aggOption,
|
|
206
|
+
value: aggOption
|
|
207
|
+
}, null, 8, ["label", "value"]);
|
|
208
|
+
}), 64))
|
|
209
|
+
]),
|
|
210
|
+
_: 2
|
|
211
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
212
|
+
])
|
|
213
|
+
], 40, _hoisted_9);
|
|
214
|
+
}), 128))
|
|
215
|
+
])) : createCommentVNode("", true)
|
|
216
|
+
])
|
|
217
|
+
])
|
|
218
|
+
])) : createCommentVNode("", true),
|
|
219
|
+
showContextMenuRemove.value ? (openBlock(), createElementBlock("div", {
|
|
220
|
+
key: 1,
|
|
221
|
+
class: "context-menu",
|
|
222
|
+
style: normalizeStyle({
|
|
223
|
+
top: contextMenuPosition.value.y + "px",
|
|
224
|
+
left: contextMenuPosition.value.x + "px"
|
|
225
|
+
})
|
|
226
|
+
}, [
|
|
227
|
+
createBaseVNode("button", { onClick: removeRow }, "Remove")
|
|
228
|
+
], 4)) : createCommentVNode("", true)
|
|
229
|
+
])
|
|
230
|
+
];
|
|
231
|
+
}),
|
|
232
|
+
_: 1
|
|
233
|
+
}, 8, ["modelValue"])
|
|
234
|
+
])) : (openBlock(), createBlock(unref(CodeLoader), { key: 1 }));
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
const sort_vue_vue_type_style_index_0_scoped_001e3d98_lang = "";
|
|
239
|
+
const readInput = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-001e3d98"]]);
|
|
240
|
+
const _hoisted_1 = { ref: "el" };
|
|
241
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
242
|
+
__name: "Sort",
|
|
243
|
+
props: {
|
|
244
|
+
nodeId: {
|
|
245
|
+
type: Number,
|
|
246
|
+
required: true
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
setup(__props) {
|
|
250
|
+
const nodeStore = useNodeStore();
|
|
251
|
+
const childComp = ref(null);
|
|
252
|
+
const drawer = ref(false);
|
|
253
|
+
const props = __props;
|
|
254
|
+
const closeOnDrawer = () => {
|
|
255
|
+
var _a;
|
|
256
|
+
(_a = childComp.value) == null ? void 0 : _a.pushNodeData();
|
|
257
|
+
drawer.value = false;
|
|
258
|
+
nodeStore.isDrawerOpen = false;
|
|
259
|
+
};
|
|
260
|
+
const openDrawer = async () => {
|
|
261
|
+
if (nodeStore.node_id === props.nodeId) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
nodeStore.closeDrawer();
|
|
265
|
+
drawer.value = true;
|
|
266
|
+
const drawerOpen = nodeStore.isDrawerOpen;
|
|
267
|
+
nodeStore.isDrawerOpen = true;
|
|
268
|
+
await nextTick();
|
|
269
|
+
if (nodeStore.node_id === props.nodeId && drawerOpen) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
if (childComp.value) {
|
|
273
|
+
childComp.value.loadNodeData(props.nodeId);
|
|
274
|
+
nodeStore.openDrawer(closeOnDrawer);
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
onMounted(async () => {
|
|
278
|
+
await nextTick();
|
|
279
|
+
});
|
|
280
|
+
return (_ctx, _cache) => {
|
|
281
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
282
|
+
createVNode(NodeButton, {
|
|
283
|
+
ref: "nodeButton",
|
|
284
|
+
"node-id": __props.nodeId,
|
|
285
|
+
"image-src": "sort.png",
|
|
286
|
+
title: `${__props.nodeId}: Sort`,
|
|
287
|
+
onClick: openDrawer
|
|
288
|
+
}, null, 8, ["node-id", "title"]),
|
|
289
|
+
drawer.value ? (openBlock(), createBlock(Teleport, {
|
|
290
|
+
key: 0,
|
|
291
|
+
to: "#nodesettings"
|
|
292
|
+
}, [
|
|
293
|
+
createVNode(NodeTitle, {
|
|
294
|
+
title: "Sort data",
|
|
295
|
+
intro: "Sort rows in the data based on one or more columns"
|
|
296
|
+
}),
|
|
297
|
+
createVNode(readInput, {
|
|
298
|
+
ref_key: "childComp",
|
|
299
|
+
ref: childComp,
|
|
300
|
+
"node-id": __props.nodeId
|
|
301
|
+
}, null, 8, ["node-id"])
|
|
302
|
+
])) : createCommentVNode("", true)
|
|
303
|
+
], 512);
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
export {
|
|
308
|
+
_sfc_main as default
|
|
309
|
+
};
|