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,197 @@
|
|
|
1
|
+
|
|
2
|
+
.selectors[data-v-e7395814] {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 12px;
|
|
6
|
+
}
|
|
7
|
+
.input-wrapper[data-v-e7395814] {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 4px;
|
|
11
|
+
flex: 1;
|
|
12
|
+
}
|
|
13
|
+
label[data-v-e7395814] {
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
color: #333;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
}
|
|
18
|
+
input[data-v-e7395814] {
|
|
19
|
+
padding: 6px;
|
|
20
|
+
border: 1px solid #ccc;
|
|
21
|
+
border-radius: 4px;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
width: 99%;
|
|
24
|
+
}
|
|
25
|
+
.row[data-v-e7395814] {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
gap: 16px;
|
|
30
|
+
}
|
|
31
|
+
.compact-input[data-v-e7395814] {
|
|
32
|
+
width: 96%;
|
|
33
|
+
padding: 6px;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
border: 1px solid #ccc;
|
|
36
|
+
border-radius: 4px;
|
|
37
|
+
}
|
|
38
|
+
.button-container[data-v-e7395814] {
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
margin: 16px 0;
|
|
42
|
+
}
|
|
43
|
+
.optional-section[data-v-e7395814] {
|
|
44
|
+
margin-top: 20px;
|
|
45
|
+
}
|
|
46
|
+
.section-divider[data-v-e7395814] {
|
|
47
|
+
margin: 16px 0;
|
|
48
|
+
border: none;
|
|
49
|
+
border-top: 1px solid #ddd;
|
|
50
|
+
}
|
|
51
|
+
.table-sizes[data-v-e7395814] {
|
|
52
|
+
font-weight: bold;
|
|
53
|
+
margin-bottom: 10px;
|
|
54
|
+
}
|
|
55
|
+
.warning-sign[data-v-e7395814] {
|
|
56
|
+
color: #e74c3c;
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
margin-left: 8px;
|
|
59
|
+
}
|
|
60
|
+
@media (max-width: 600px) {
|
|
61
|
+
.row[data-v-e7395814] {
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[data-v-d0b76f7b] {
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
}
|
|
69
|
+
.csv-table-settings[data-v-d0b76f7b] {
|
|
70
|
+
background: #fff;
|
|
71
|
+
border-radius: 6px;
|
|
72
|
+
padding: 16px;
|
|
73
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
74
|
+
margin: 20px auto;
|
|
75
|
+
max-width: 600px;
|
|
76
|
+
overflow-x: hidden; /* Prevent horizontal scroll */
|
|
77
|
+
}
|
|
78
|
+
.row[data-v-d0b76f7b] {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
margin-bottom: 12px;
|
|
83
|
+
gap: 20px;
|
|
84
|
+
max-width: 100%; /* Prevent overflow */
|
|
85
|
+
}
|
|
86
|
+
label[data-v-d0b76f7b] {
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
color: #333;
|
|
89
|
+
font-size: 14px;
|
|
90
|
+
flex: 1;
|
|
91
|
+
max-width: 100%;
|
|
92
|
+
}
|
|
93
|
+
.el-select[data-v-d0b76f7b],
|
|
94
|
+
.el-slider[data-v-d0b76f7b],
|
|
95
|
+
.el-checkbox[data-v-d0b76f7b] {
|
|
96
|
+
flex: 2;
|
|
97
|
+
max-width: 100%; /* Prevent overflow */
|
|
98
|
+
}
|
|
99
|
+
.el-slider[data-v-d0b76f7b] {
|
|
100
|
+
padding-top: 10px;
|
|
101
|
+
}
|
|
102
|
+
.el-checkbox[data-v-d0b76f7b] {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
}
|
|
106
|
+
@media (max-width: 600px) {
|
|
107
|
+
.row[data-v-d0b76f7b] {
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
align-items: flex-start;
|
|
110
|
+
}
|
|
111
|
+
.el-select[data-v-d0b76f7b],
|
|
112
|
+
.el-slider[data-v-d0b76f7b],
|
|
113
|
+
.el-checkbox[data-v-d0b76f7b] {
|
|
114
|
+
width: 100%;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.parquet-table-settings[data-v-0faf0508] {
|
|
119
|
+
background: #f9fafb;
|
|
120
|
+
border-radius: 8px;
|
|
121
|
+
padding: 20px;
|
|
122
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
123
|
+
max-width: 600px;
|
|
124
|
+
margin: 20px auto;
|
|
125
|
+
text-align: center; /* Center the text */
|
|
126
|
+
}
|
|
127
|
+
.message h2[data-v-0faf0508] {
|
|
128
|
+
font-size: 24px;
|
|
129
|
+
color: #3498db;
|
|
130
|
+
margin-bottom: 10px;
|
|
131
|
+
}
|
|
132
|
+
.message p[data-v-0faf0508] {
|
|
133
|
+
font-size: 16px;
|
|
134
|
+
color: #333;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.context-menu[data-v-221ad292] {
|
|
138
|
+
position: fixed;
|
|
139
|
+
z-index: 1000;
|
|
140
|
+
border: 1px solid #ccc;
|
|
141
|
+
background-color: white;
|
|
142
|
+
padding: 8px;
|
|
143
|
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
144
|
+
border-radius: 4px;
|
|
145
|
+
}
|
|
146
|
+
.context-menu button[data-v-221ad292] {
|
|
147
|
+
display: block;
|
|
148
|
+
background: none;
|
|
149
|
+
border: none;
|
|
150
|
+
padding: 4px 8px;
|
|
151
|
+
text-align: left;
|
|
152
|
+
width: 100%;
|
|
153
|
+
cursor: pointer;
|
|
154
|
+
}
|
|
155
|
+
.context-menu button[data-v-221ad292]:hover {
|
|
156
|
+
background-color: #f0f0f0;
|
|
157
|
+
}
|
|
158
|
+
.file-upload-wrapper[data-v-221ad292] {
|
|
159
|
+
position: relative;
|
|
160
|
+
width: 100%;
|
|
161
|
+
}
|
|
162
|
+
.file-upload-label[data-v-221ad292] {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
background-color: #f5f5f5;
|
|
166
|
+
border: 1px solid #ddd;
|
|
167
|
+
border-radius: 4px;
|
|
168
|
+
padding: 10px 15px;
|
|
169
|
+
color: #333;
|
|
170
|
+
font-size: 16px;
|
|
171
|
+
font-weight: 500;
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
transition: background-color 0.3s ease;
|
|
174
|
+
}
|
|
175
|
+
.file-upload-label[data-v-221ad292]:hover {
|
|
176
|
+
background-color: #e4e4e4;
|
|
177
|
+
}
|
|
178
|
+
.file-icon[data-v-221ad292] {
|
|
179
|
+
margin-right: 10px;
|
|
180
|
+
font-size: 20px;
|
|
181
|
+
}
|
|
182
|
+
.file-label-text[data-v-221ad292] {
|
|
183
|
+
flex-grow: 1;
|
|
184
|
+
margin-left: 10px;
|
|
185
|
+
}
|
|
186
|
+
input[type="text"][data-v-221ad292] {
|
|
187
|
+
width: 100%;
|
|
188
|
+
padding: 8px;
|
|
189
|
+
border: 1px solid #ddd;
|
|
190
|
+
border-radius: 4px;
|
|
191
|
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
192
|
+
transition: border-color 0.2s ease;
|
|
193
|
+
}
|
|
194
|
+
input[type="text"][data-v-221ad292]:focus {
|
|
195
|
+
border-color: #3498db;
|
|
196
|
+
outline: none;
|
|
197
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { u as useNodeStore } from "./PopOver-b37ff9be.js";
|
|
2
|
+
import { G as GenericNodeSettings } from "./genericNodeSettings-65587f20.js";
|
|
3
|
+
import { d as defineComponent, r as ref, n as onMounted, R as nextTick, c as openBlock, e as createElementBlock, f as createVNode, w as withCtx, p as createBaseVNode, i as createCommentVNode, h as createBlock, a6 as Teleport } from "./index-552863fd.js";
|
|
4
|
+
import { N as NodeButton, a as NodeTitle } from "./nodeTitle-cf9bae3c.js";
|
|
5
|
+
import "./designer-e5bbe26f.js";
|
|
6
|
+
const _hoisted_1$1 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "listbox-wrapper"
|
|
9
|
+
};
|
|
10
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
11
|
+
__name: "RecordCount",
|
|
12
|
+
setup(__props, { expose: __expose }) {
|
|
13
|
+
const nodeStore = useNodeStore();
|
|
14
|
+
const dataLoaded = ref(false);
|
|
15
|
+
const nodeData = ref(null);
|
|
16
|
+
const nodeRecordCount = ref(null);
|
|
17
|
+
const loadNodeData = async (nodeId) => {
|
|
18
|
+
var _a;
|
|
19
|
+
nodeData.value = await nodeStore.getNodeData(nodeId, false);
|
|
20
|
+
nodeRecordCount.value = (_a = nodeData.value) == null ? void 0 : _a.setting_input;
|
|
21
|
+
dataLoaded.value = true;
|
|
22
|
+
nodeStore.isDrawerOpen = true;
|
|
23
|
+
};
|
|
24
|
+
const pushNodeData = async () => {
|
|
25
|
+
if (nodeRecordCount.value) {
|
|
26
|
+
nodeStore.updateSettings(nodeRecordCount);
|
|
27
|
+
}
|
|
28
|
+
nodeStore.isDrawerOpen = false;
|
|
29
|
+
};
|
|
30
|
+
__expose({
|
|
31
|
+
loadNodeData,
|
|
32
|
+
pushNodeData
|
|
33
|
+
});
|
|
34
|
+
onMounted(async () => {
|
|
35
|
+
await nextTick();
|
|
36
|
+
});
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return dataLoaded.value && nodeRecordCount.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
39
|
+
createVNode(GenericNodeSettings, {
|
|
40
|
+
modelValue: nodeRecordCount.value,
|
|
41
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => nodeRecordCount.value = $event)
|
|
42
|
+
}, {
|
|
43
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
44
|
+
createBaseVNode("p", null, " This node helps you quickly retrieve the total number of records from the selected table. It's a simple yet powerful tool to keep track of the data volume as you work through your tasks. ", -1),
|
|
45
|
+
createBaseVNode("p", null, "This node does not need a setup", -1)
|
|
46
|
+
])),
|
|
47
|
+
_: 1
|
|
48
|
+
}, 8, ["modelValue"])
|
|
49
|
+
])) : createCommentVNode("", true);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const _hoisted_1 = { ref: "el" };
|
|
54
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
55
|
+
__name: "RecordCount",
|
|
56
|
+
props: {
|
|
57
|
+
nodeId: {
|
|
58
|
+
type: Number,
|
|
59
|
+
required: true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
setup(__props) {
|
|
63
|
+
const nodeStore = useNodeStore();
|
|
64
|
+
const childComp = ref(null);
|
|
65
|
+
const props = __props;
|
|
66
|
+
const drawer = ref(false);
|
|
67
|
+
const closeOnDrawer = () => {
|
|
68
|
+
var _a;
|
|
69
|
+
drawer.value = false;
|
|
70
|
+
(_a = childComp.value) == null ? void 0 : _a.pushNodeData();
|
|
71
|
+
};
|
|
72
|
+
const openDrawer = async () => {
|
|
73
|
+
if (nodeStore.node_id === props.nodeId) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
nodeStore.closeDrawer();
|
|
77
|
+
drawer.value = true;
|
|
78
|
+
const drawerOpen = nodeStore.isDrawerOpen;
|
|
79
|
+
nodeStore.isDrawerOpen = true;
|
|
80
|
+
await nextTick();
|
|
81
|
+
if (nodeStore.node_id === props.nodeId && drawerOpen) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (childComp.value) {
|
|
85
|
+
childComp.value.loadNodeData(props.nodeId);
|
|
86
|
+
nodeStore.openDrawer(closeOnDrawer);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
onMounted(async () => {
|
|
90
|
+
await nextTick();
|
|
91
|
+
});
|
|
92
|
+
return (_ctx, _cache) => {
|
|
93
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
94
|
+
createVNode(NodeButton, {
|
|
95
|
+
ref: "nodeButton",
|
|
96
|
+
"node-id": __props.nodeId,
|
|
97
|
+
"image-src": "record_count.png",
|
|
98
|
+
title: `${__props.nodeId}: Count records`,
|
|
99
|
+
onClick: openDrawer
|
|
100
|
+
}, null, 8, ["node-id", "title"]),
|
|
101
|
+
drawer.value ? (openBlock(), createBlock(Teleport, {
|
|
102
|
+
key: 0,
|
|
103
|
+
to: "#nodesettings"
|
|
104
|
+
}, [
|
|
105
|
+
createVNode(NodeTitle, {
|
|
106
|
+
title: "Count records",
|
|
107
|
+
intro: "Get the count of the number of reocrds"
|
|
108
|
+
}),
|
|
109
|
+
createVNode(_sfc_main$1, {
|
|
110
|
+
ref_key: "childComp",
|
|
111
|
+
ref: childComp,
|
|
112
|
+
"node-id": __props.nodeId
|
|
113
|
+
}, null, 8, ["node-id"])
|
|
114
|
+
])) : createCommentVNode("", true)
|
|
115
|
+
], 512);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
export {
|
|
120
|
+
_sfc_main as default
|
|
121
|
+
};
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { d as defineComponent, r as ref, 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, g as createTextVNode, a4 as withDirectives, a5 as vModelText, F as Fragment, q as renderList, s as normalizeClass, v as withModifiers, t as toDisplayString, h as createBlock, i as createCommentVNode, a6 as Teleport } from "./index-552863fd.js";
|
|
2
|
+
import { u as useNodeStore } from "./PopOver-b37ff9be.js";
|
|
3
|
+
import { C as ContextMenu, S as SettingsSection } from "./SettingsSection-1f5e79c1.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 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "listbox-wrapper"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_2 = { class: "listbox-wrapper" };
|
|
12
|
+
const _hoisted_3 = { class: "listbox-wrapper" };
|
|
13
|
+
const _hoisted_4 = { key: 0 };
|
|
14
|
+
const _hoisted_5 = { class: "listbox" };
|
|
15
|
+
const _hoisted_6 = { class: "column-options" };
|
|
16
|
+
const _hoisted_7 = ["onClick", "onContextmenu", "onDragstart", "onDrop"];
|
|
17
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
18
|
+
__name: "recordId",
|
|
19
|
+
setup(__props, { expose: __expose }) {
|
|
20
|
+
const nodeStore = useNodeStore();
|
|
21
|
+
const showContextMenu = ref(false);
|
|
22
|
+
const contextMenuPosition = ref({ x: 0, y: 0 });
|
|
23
|
+
const dataLoaded = ref(false);
|
|
24
|
+
const contextMenuRef = ref(null);
|
|
25
|
+
const nodeRecordId = ref(null);
|
|
26
|
+
const nodeData = ref(null);
|
|
27
|
+
const contextMenuOptions = ref([]);
|
|
28
|
+
const draggedColumnName = ref(null);
|
|
29
|
+
const selectedColumns = ref([]);
|
|
30
|
+
const getColumnClass = (columnName) => {
|
|
31
|
+
return selectedColumns.value.includes(columnName) ? "is-selected" : "";
|
|
32
|
+
};
|
|
33
|
+
const onDropInSection = (section) => {
|
|
34
|
+
var _a, _b;
|
|
35
|
+
if (draggedColumnName.value) {
|
|
36
|
+
if (section === "add" && !((_a = nodeRecordId.value) == null ? void 0 : _a.record_id_input.group_by_columns.includes(draggedColumnName.value))) {
|
|
37
|
+
(_b = nodeRecordId.value) == null ? void 0 : _b.record_id_input.group_by_columns.push(draggedColumnName.value);
|
|
38
|
+
}
|
|
39
|
+
draggedColumnName.value = null;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const closeContextMenu = () => {
|
|
43
|
+
showContextMenu.value = false;
|
|
44
|
+
};
|
|
45
|
+
const handleItemClick = (columnName) => {
|
|
46
|
+
selectedColumns.value = [columnName];
|
|
47
|
+
};
|
|
48
|
+
const loadNodeData = async (nodeId) => {
|
|
49
|
+
var _a, _b, _c;
|
|
50
|
+
nodeData.value = await nodeStore.getNodeData(nodeId, false);
|
|
51
|
+
nodeRecordId.value = (_a = nodeData.value) == null ? void 0 : _a.setting_input;
|
|
52
|
+
if (!((_b = nodeData.value) == null ? void 0 : _b.setting_input.is_setup) && nodeRecordId.value) {
|
|
53
|
+
nodeRecordId.value.record_id_input = {
|
|
54
|
+
offset: 1,
|
|
55
|
+
output_column_name: "record_id",
|
|
56
|
+
group_by: false,
|
|
57
|
+
group_by_columns: []
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
dataLoaded.value = true;
|
|
61
|
+
if ((_c = nodeRecordId.value) == null ? void 0 : _c.is_setup) {
|
|
62
|
+
nodeRecordId.value.is_setup = true;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const onDragStart = (columnName, event) => {
|
|
66
|
+
var _a;
|
|
67
|
+
draggedColumnName.value = columnName;
|
|
68
|
+
(_a = event.dataTransfer) == null ? void 0 : _a.setData("text/plain", columnName);
|
|
69
|
+
};
|
|
70
|
+
const onDrop = (index) => {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
if (draggedColumnName.value) {
|
|
73
|
+
const colSchema = (_b = (_a = nodeData.value) == null ? void 0 : _a.main_input) == null ? void 0 : _b.table_schema;
|
|
74
|
+
if (colSchema) {
|
|
75
|
+
const fromIndex = colSchema.findIndex((col) => col.name === draggedColumnName.value);
|
|
76
|
+
if (fromIndex !== -1 && fromIndex !== index) {
|
|
77
|
+
const [movedColumn] = colSchema.splice(fromIndex, 1);
|
|
78
|
+
colSchema.splice(index, 0, movedColumn);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
draggedColumnName.value = null;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const openContextMenu = (columnName, event) => {
|
|
85
|
+
selectedColumns.value = [columnName];
|
|
86
|
+
contextMenuPosition.value = { x: event.clientX, y: event.clientY };
|
|
87
|
+
contextMenuOptions.value = [
|
|
88
|
+
{
|
|
89
|
+
label: "Group by",
|
|
90
|
+
action: "add",
|
|
91
|
+
disabled: isColumnAssigned(columnName)
|
|
92
|
+
}
|
|
93
|
+
];
|
|
94
|
+
showContextMenu.value = true;
|
|
95
|
+
};
|
|
96
|
+
const handleClickOutside = (event) => {
|
|
97
|
+
var _a;
|
|
98
|
+
if (!((_a = contextMenuRef.value) == null ? void 0 : _a.contains(event.target))) {
|
|
99
|
+
showContextMenu.value = false;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const isColumnAssigned = (columnName) => {
|
|
103
|
+
if (nodeRecordId.value) {
|
|
104
|
+
return nodeRecordId.value.record_id_input.group_by_columns.includes(columnName);
|
|
105
|
+
}
|
|
106
|
+
return false;
|
|
107
|
+
};
|
|
108
|
+
const handleContextMenuSelect = (action) => {
|
|
109
|
+
const nodeRecord = nodeRecordId.value;
|
|
110
|
+
if (nodeRecord && action === "add") {
|
|
111
|
+
selectedColumns.value.filter((col) => !isColumnAssigned(col)).forEach((col) => {
|
|
112
|
+
nodeRecord.record_id_input.group_by_columns.push(col);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
const removeColumn = (type, column) => {
|
|
117
|
+
if (nodeRecordId.value) {
|
|
118
|
+
if (type === "add") {
|
|
119
|
+
nodeRecordId.value.record_id_input.group_by_columns = nodeRecordId.value.record_id_input.group_by_columns.filter((col) => col !== column);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const pushNodeData = async () => {
|
|
124
|
+
nodeStore.updateSettings(nodeRecordId);
|
|
125
|
+
dataLoaded.value = false;
|
|
126
|
+
nodeStore.isDrawerOpen = false;
|
|
127
|
+
};
|
|
128
|
+
__expose({
|
|
129
|
+
loadNodeData,
|
|
130
|
+
pushNodeData
|
|
131
|
+
});
|
|
132
|
+
onMounted(async () => {
|
|
133
|
+
await nextTick();
|
|
134
|
+
window.addEventListener("click", handleClickOutside);
|
|
135
|
+
});
|
|
136
|
+
onUnmounted(() => {
|
|
137
|
+
window.removeEventListener("click", handleClickOutside);
|
|
138
|
+
});
|
|
139
|
+
return (_ctx, _cache) => {
|
|
140
|
+
const _component_el_col = resolveComponent("el-col");
|
|
141
|
+
const _component_el_row = resolveComponent("el-row");
|
|
142
|
+
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
143
|
+
return dataLoaded.value && nodeRecordId.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
144
|
+
createVNode(GenericNodeSettings, {
|
|
145
|
+
modelValue: nodeRecordId.value,
|
|
146
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => nodeRecordId.value = $event)
|
|
147
|
+
}, {
|
|
148
|
+
default: withCtx(() => {
|
|
149
|
+
var _a, _b;
|
|
150
|
+
return [
|
|
151
|
+
createBaseVNode("div", _hoisted_2, [
|
|
152
|
+
_cache[10] || (_cache[10] = createBaseVNode("div", { class: "listbox-subtitle" }, "Settings", -1)),
|
|
153
|
+
createVNode(_component_el_row, null, {
|
|
154
|
+
default: withCtx(() => [
|
|
155
|
+
createVNode(_component_el_col, {
|
|
156
|
+
span: 10,
|
|
157
|
+
class: "grid-content"
|
|
158
|
+
}, {
|
|
159
|
+
default: withCtx(() => _cache[8] || (_cache[8] = [
|
|
160
|
+
createTextVNode("Offset")
|
|
161
|
+
])),
|
|
162
|
+
_: 1
|
|
163
|
+
}),
|
|
164
|
+
createVNode(_component_el_col, {
|
|
165
|
+
span: 8,
|
|
166
|
+
class: "grid-content"
|
|
167
|
+
}, {
|
|
168
|
+
default: withCtx(() => [
|
|
169
|
+
withDirectives(createBaseVNode("input", {
|
|
170
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => nodeRecordId.value.record_id_input.offset = $event),
|
|
171
|
+
type: "number",
|
|
172
|
+
min: "0",
|
|
173
|
+
step: "1"
|
|
174
|
+
}, null, 512), [
|
|
175
|
+
[vModelText, nodeRecordId.value.record_id_input.offset]
|
|
176
|
+
])
|
|
177
|
+
]),
|
|
178
|
+
_: 1
|
|
179
|
+
})
|
|
180
|
+
]),
|
|
181
|
+
_: 1
|
|
182
|
+
}),
|
|
183
|
+
createVNode(_component_el_row, null, {
|
|
184
|
+
default: withCtx(() => [
|
|
185
|
+
createVNode(_component_el_col, {
|
|
186
|
+
span: 10,
|
|
187
|
+
class: "grid-content"
|
|
188
|
+
}, {
|
|
189
|
+
default: withCtx(() => _cache[9] || (_cache[9] = [
|
|
190
|
+
createTextVNode("Output name")
|
|
191
|
+
])),
|
|
192
|
+
_: 1
|
|
193
|
+
}),
|
|
194
|
+
createVNode(_component_el_col, {
|
|
195
|
+
span: 8,
|
|
196
|
+
class: "grid-content"
|
|
197
|
+
}, {
|
|
198
|
+
default: withCtx(() => [
|
|
199
|
+
withDirectives(createBaseVNode("input", {
|
|
200
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => nodeRecordId.value.record_id_input.output_column_name = $event),
|
|
201
|
+
type: "text"
|
|
202
|
+
}, null, 512), [
|
|
203
|
+
[vModelText, nodeRecordId.value.record_id_input.output_column_name]
|
|
204
|
+
])
|
|
205
|
+
]),
|
|
206
|
+
_: 1
|
|
207
|
+
})
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
})
|
|
211
|
+
]),
|
|
212
|
+
createBaseVNode("div", _hoisted_3, [
|
|
213
|
+
createVNode(_component_el_checkbox, {
|
|
214
|
+
modelValue: nodeRecordId.value.record_id_input.group_by,
|
|
215
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => nodeRecordId.value.record_id_input.group_by = $event),
|
|
216
|
+
label: "Assign record id by group",
|
|
217
|
+
size: "large"
|
|
218
|
+
}, null, 8, ["modelValue"]),
|
|
219
|
+
nodeRecordId.value.record_id_input.group_by ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
220
|
+
_cache[11] || (_cache[11] = createBaseVNode("div", { class: "listbox-subtitle" }, "Optional Settings", -1)),
|
|
221
|
+
createBaseVNode("ul", _hoisted_5, [
|
|
222
|
+
createBaseVNode("div", _hoisted_6, [
|
|
223
|
+
(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) => {
|
|
224
|
+
return openBlock(), createElementBlock("li", {
|
|
225
|
+
key: col_schema.name,
|
|
226
|
+
class: normalizeClass(getColumnClass(col_schema.name)),
|
|
227
|
+
draggable: "true",
|
|
228
|
+
onClick: ($event) => handleItemClick(col_schema.name),
|
|
229
|
+
onContextmenu: withModifiers(($event) => openContextMenu(col_schema.name, $event), ["prevent"]),
|
|
230
|
+
onDragstart: ($event) => onDragStart(col_schema.name, $event),
|
|
231
|
+
onDragover: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
232
|
+
}, ["prevent"])),
|
|
233
|
+
onDrop: ($event) => onDrop(index)
|
|
234
|
+
}, toDisplayString(col_schema.name) + " (" + toDisplayString(col_schema.data_type) + ") ", 43, _hoisted_7);
|
|
235
|
+
}), 128))
|
|
236
|
+
]),
|
|
237
|
+
showContextMenu.value ? (openBlock(), createBlock(ContextMenu, {
|
|
238
|
+
key: 0,
|
|
239
|
+
id: "record-id-menu",
|
|
240
|
+
ref_key: "contextMenuRef",
|
|
241
|
+
ref: contextMenuRef,
|
|
242
|
+
position: contextMenuPosition.value,
|
|
243
|
+
options: contextMenuOptions.value,
|
|
244
|
+
onSelect: handleContextMenuSelect,
|
|
245
|
+
onClose: closeContextMenu
|
|
246
|
+
}, null, 8, ["position", "options"])) : createCommentVNode("", true),
|
|
247
|
+
createVNode(SettingsSection, {
|
|
248
|
+
title: "Group by columns",
|
|
249
|
+
items: nodeRecordId.value.record_id_input.group_by_columns,
|
|
250
|
+
droppable: "true",
|
|
251
|
+
onRemoveItem: _cache[4] || (_cache[4] = ($event) => removeColumn("add", $event)),
|
|
252
|
+
onDragover: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
253
|
+
}, ["prevent"])),
|
|
254
|
+
onDrop: _cache[6] || (_cache[6] = ($event) => onDropInSection("add"))
|
|
255
|
+
}, null, 8, ["items"])
|
|
256
|
+
])
|
|
257
|
+
])) : createCommentVNode("", true)
|
|
258
|
+
])
|
|
259
|
+
];
|
|
260
|
+
}),
|
|
261
|
+
_: 1
|
|
262
|
+
}, 8, ["modelValue"])
|
|
263
|
+
])) : createCommentVNode("", true);
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
268
|
+
__name: "RecordId",
|
|
269
|
+
props: {
|
|
270
|
+
nodeId: {
|
|
271
|
+
type: Number,
|
|
272
|
+
required: true
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
setup(__props) {
|
|
276
|
+
const nodeStore = useNodeStore();
|
|
277
|
+
const childComp = ref(null);
|
|
278
|
+
const props = __props;
|
|
279
|
+
const el = ref(null);
|
|
280
|
+
const drawer = ref(false);
|
|
281
|
+
const closeOnDrawer = () => {
|
|
282
|
+
var _a;
|
|
283
|
+
(_a = childComp.value) == null ? void 0 : _a.pushNodeData();
|
|
284
|
+
drawer.value = false;
|
|
285
|
+
nodeStore.isDrawerOpen = false;
|
|
286
|
+
};
|
|
287
|
+
const openDrawer = async () => {
|
|
288
|
+
if (nodeStore.node_id === props.nodeId) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
nodeStore.closeDrawer();
|
|
292
|
+
drawer.value = true;
|
|
293
|
+
const drawerOpen = nodeStore.isDrawerOpen;
|
|
294
|
+
nodeStore.isDrawerOpen = true;
|
|
295
|
+
await nextTick();
|
|
296
|
+
if (nodeStore.node_id === props.nodeId && drawerOpen) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (childComp.value) {
|
|
300
|
+
childComp.value.loadNodeData(props.nodeId);
|
|
301
|
+
nodeStore.openDrawer(closeOnDrawer);
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
onMounted(async () => {
|
|
305
|
+
await nextTick();
|
|
306
|
+
});
|
|
307
|
+
return (_ctx, _cache) => {
|
|
308
|
+
return openBlock(), createElementBlock("div", {
|
|
309
|
+
ref_key: "el",
|
|
310
|
+
ref: el
|
|
311
|
+
}, [
|
|
312
|
+
createVNode(NodeButton, {
|
|
313
|
+
ref: "nodeButton",
|
|
314
|
+
"node-id": __props.nodeId,
|
|
315
|
+
"image-src": "record_id.png",
|
|
316
|
+
title: `${__props.nodeId}: Add record Id`,
|
|
317
|
+
onClick: openDrawer
|
|
318
|
+
}, null, 8, ["node-id", "title"]),
|
|
319
|
+
drawer.value ? (openBlock(), createBlock(Teleport, {
|
|
320
|
+
key: 0,
|
|
321
|
+
to: "#nodesettings"
|
|
322
|
+
}, [
|
|
323
|
+
createVNode(NodeTitle, {
|
|
324
|
+
title: "Add record Id",
|
|
325
|
+
intro: "<p>\n <strong>Record ID:</strong> This is a unique number or identifier for each entry in our database, like a personal ID number that ensures every record is distinct.<br><br>\n <strong>Offset:</strong> Think of this as the starting point or position where a record is found. It's like telling you on which page to find a word in a book.<br><br>\n <strong>Column Name:</strong> This is the name of the category or type of information stored in each column, similar to how a label on a box tells you what's inside.</p>"
|
|
326
|
+
}),
|
|
327
|
+
createVNode(_sfc_main$1, {
|
|
328
|
+
ref_key: "childComp",
|
|
329
|
+
ref: childComp,
|
|
330
|
+
"node-id": __props.nodeId
|
|
331
|
+
}, null, 8, ["node-id"])
|
|
332
|
+
])) : createCommentVNode("", true)
|
|
333
|
+
], 512);
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
export {
|
|
338
|
+
_sfc_main as default
|
|
339
|
+
};
|