Flowfile 0.3.0__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 +13 -6
- 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.dist-info → flowfile-0.3.0.1.dist-info}/METADATA +1 -1
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/RECORD +146 -15
- {flowfile-0.3.0.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 +0 -1
- flowfile_frame/utils.py +0 -139
- flowfile_frame/__main__.py +0 -12
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/LICENSE +0 -0
- {flowfile-0.3.0.dist-info → flowfile-0.3.0.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { d as defineComponent, l as computed, e as createElementBlock, p as createBaseVNode, c as openBlock, _ as _export_sfc } from "./index-552863fd.js";
|
|
2
|
+
const _hoisted_1 = { class: "doc-wrapper" };
|
|
3
|
+
const _hoisted_2 = ["src"];
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "documentation",
|
|
6
|
+
setup(__props) {
|
|
7
|
+
const docsUrl = computed(
|
|
8
|
+
() => "https://edwardvaneechoud.github.io/Flowfile/"
|
|
9
|
+
);
|
|
10
|
+
const openFlowfile = () => {
|
|
11
|
+
window.open(docsUrl.value);
|
|
12
|
+
};
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
15
|
+
createBaseVNode("iframe", {
|
|
16
|
+
src: docsUrl.value,
|
|
17
|
+
class: "iframe-docs"
|
|
18
|
+
}, null, 8, _hoisted_2),
|
|
19
|
+
createBaseVNode("button", {
|
|
20
|
+
class: "flowfile-button",
|
|
21
|
+
onClick: openFlowfile
|
|
22
|
+
}, _cache[0] || (_cache[0] = [
|
|
23
|
+
createBaseVNode("i", { class: "fas fa-up-right-from-square" }, null, -1)
|
|
24
|
+
]))
|
|
25
|
+
]);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const documentation_vue_vue_type_style_index_0_scoped_3ea9235d_lang = "";
|
|
30
|
+
const documentation = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3ea9235d"]]);
|
|
31
|
+
export {
|
|
32
|
+
documentation as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
.doc-wrapper[data-v-3ea9235d] {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 99vh;
|
|
5
|
+
}
|
|
6
|
+
.iframe-docs[data-v-3ea9235d] {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
border: none;
|
|
10
|
+
}
|
|
11
|
+
.flowfile-button[data-v-3ea9235d] {
|
|
12
|
+
background-color: var(--color-primary);
|
|
13
|
+
color: var(--color-background);
|
|
14
|
+
border: none;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
font-size: 20px;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
width: 50px; /* Circular button */
|
|
22
|
+
height: 50px;
|
|
23
|
+
position: fixed; /* Keep it on top of everything */
|
|
24
|
+
bottom: 20px; /* Distance from bottom */
|
|
25
|
+
right: 20px; /* Distance from right */
|
|
26
|
+
z-index: 1000; /* Make sure it’s above the iframe */
|
|
27
|
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
|
28
|
+
transition:
|
|
29
|
+
background-color 0.3s ease,
|
|
30
|
+
transform 0.2s ease,
|
|
31
|
+
box-shadow 0.3s ease;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Hover & Active effects */
|
|
35
|
+
.flowfile-button[data-v-3ea9235d]:hover {
|
|
36
|
+
background-color: var(--color-primary-dark);
|
|
37
|
+
transform: scale(1.1);
|
|
38
|
+
}
|
|
39
|
+
.flowfile-button[data-v-3ea9235d]:active {
|
|
40
|
+
transform: scale(1);
|
|
41
|
+
}
|
|
42
|
+
.flowfile-button[data-v-3ea9235d]:focus {
|
|
43
|
+
outline: none;
|
|
44
|
+
box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Adjust icon size */
|
|
48
|
+
.flowfile-button i[data-v-3ea9235d] {
|
|
49
|
+
font-size: 20px;
|
|
50
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
|
|
2
|
+
.sr-only[data-v-0fe9cf29] {
|
|
3
|
+
position: absolute;
|
|
4
|
+
width: 1px;
|
|
5
|
+
height: 1px;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin: -1px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
clip: rect(0, 0, 0, 0);
|
|
10
|
+
border: 0;
|
|
11
|
+
}
|
|
12
|
+
.dropdown-container[data-v-0fe9cf29] {
|
|
13
|
+
position: relative;
|
|
14
|
+
width: 100%;
|
|
15
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
16
|
+
}
|
|
17
|
+
.input-wrapper[data-v-0fe9cf29] {
|
|
18
|
+
position: relative;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
.select-box[data-v-0fe9cf29] {
|
|
23
|
+
width: 100%;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
padding: 8px 30px 8px 12px;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
line-height: 1.4;
|
|
28
|
+
border: 1px solid #e0e0e0;
|
|
29
|
+
border-radius: 6px;
|
|
30
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
31
|
+
outline: none;
|
|
32
|
+
transition: all 0.2s ease;
|
|
33
|
+
background-color: white;
|
|
34
|
+
color: #333;
|
|
35
|
+
}
|
|
36
|
+
.select-box[data-v-0fe9cf29]:focus {
|
|
37
|
+
border-color: #3182ce;
|
|
38
|
+
box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
|
|
39
|
+
}
|
|
40
|
+
.select-box.has-error[data-v-0fe9cf29] {
|
|
41
|
+
border-color: #e53e3e;
|
|
42
|
+
box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
|
|
43
|
+
}
|
|
44
|
+
.select-box[data-v-0fe9cf29]:disabled {
|
|
45
|
+
background-color: #f9f9f9;
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
opacity: 0.7;
|
|
48
|
+
}
|
|
49
|
+
.icon-container[data-v-0fe9cf29] {
|
|
50
|
+
position: absolute;
|
|
51
|
+
right: 10px;
|
|
52
|
+
top: 50%;
|
|
53
|
+
transform: translateY(-50%);
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
}
|
|
59
|
+
.dropdown-icon[data-v-0fe9cf29] {
|
|
60
|
+
width: 16px;
|
|
61
|
+
height: 16px;
|
|
62
|
+
color: #718096;
|
|
63
|
+
transition: transform 0.2s ease;
|
|
64
|
+
}
|
|
65
|
+
.options-container[data-v-0fe9cf29] {
|
|
66
|
+
position: fixed;
|
|
67
|
+
z-index: 9999;
|
|
68
|
+
width: 100%;
|
|
69
|
+
margin-top: 4px;
|
|
70
|
+
}
|
|
71
|
+
.options-list[data-v-0fe9cf29] {
|
|
72
|
+
background: white;
|
|
73
|
+
border-radius: 6px;
|
|
74
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
75
|
+
max-height: 220px;
|
|
76
|
+
overflow-y: auto;
|
|
77
|
+
list-style: none;
|
|
78
|
+
margin: 0;
|
|
79
|
+
padding: 4px 0;
|
|
80
|
+
border: 1px solid #e2e8f0;
|
|
81
|
+
scrollbar-width: thin;
|
|
82
|
+
}
|
|
83
|
+
.options-list[data-v-0fe9cf29]::-webkit-scrollbar {
|
|
84
|
+
width: 6px;
|
|
85
|
+
}
|
|
86
|
+
.options-list[data-v-0fe9cf29]::-webkit-scrollbar-track {
|
|
87
|
+
background: #f7fafc;
|
|
88
|
+
}
|
|
89
|
+
.options-list[data-v-0fe9cf29]::-webkit-scrollbar-thumb {
|
|
90
|
+
background-color: #cbd5e0;
|
|
91
|
+
border-radius: 3px;
|
|
92
|
+
}
|
|
93
|
+
.option-item[data-v-0fe9cf29] {
|
|
94
|
+
padding: 8px 12px;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
font-size: 14px;
|
|
97
|
+
color: #4a5568;
|
|
98
|
+
line-height: 1.5;
|
|
99
|
+
transition: all 0.15s ease;
|
|
100
|
+
border-left: 2px solid transparent;
|
|
101
|
+
}
|
|
102
|
+
.option-item[data-v-0fe9cf29]:hover,
|
|
103
|
+
.option-item.is-active[data-v-0fe9cf29] {
|
|
104
|
+
background-color: #ebf8ff;
|
|
105
|
+
color: #3182ce;
|
|
106
|
+
border-left-color: #3182ce;
|
|
107
|
+
}
|
|
108
|
+
.no-options[data-v-0fe9cf29] {
|
|
109
|
+
padding: 10px 12px;
|
|
110
|
+
font-size: 14px;
|
|
111
|
+
color: #718096;
|
|
112
|
+
text-align: center;
|
|
113
|
+
font-style: italic;
|
|
114
|
+
}
|
|
115
|
+
.spinner[data-v-0fe9cf29] {
|
|
116
|
+
width: 16px;
|
|
117
|
+
height: 16px;
|
|
118
|
+
border: 2px solid rgba(49, 130, 206, 0.2);
|
|
119
|
+
border-top: 2px solid #3182ce;
|
|
120
|
+
border-radius: 50%;
|
|
121
|
+
animation: spin-0fe9cf29 0.8s linear infinite;
|
|
122
|
+
}
|
|
123
|
+
@keyframes spin-0fe9cf29 {
|
|
124
|
+
0% {
|
|
125
|
+
transform: rotate(0deg);
|
|
126
|
+
}
|
|
127
|
+
100% {
|
|
128
|
+
transform: rotate(360deg);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Fade transition for dropdown */
|
|
133
|
+
.fade-enter-active[data-v-0fe9cf29],
|
|
134
|
+
.fade-leave-active[data-v-0fe9cf29] {
|
|
135
|
+
transition:
|
|
136
|
+
opacity 0.15s,
|
|
137
|
+
transform 0.15s;
|
|
138
|
+
}
|
|
139
|
+
.fade-enter-from[data-v-0fe9cf29],
|
|
140
|
+
.fade-leave-to[data-v-0fe9cf29] {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
transform: translateY(-5px);
|
|
143
|
+
}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { d as defineComponent, r as ref, l as computed, n as onMounted, o as onUnmounted, m as watch, R as nextTick, c as openBlock, e as createElementBlock, p as createBaseVNode, t as toDisplayString, a4 as withDirectives, a5 as vModelText, s as normalizeClass, f as createVNode, w as withCtx, F as Fragment, q as renderList, v as withModifiers, i as createCommentVNode, at as Transition, _ as _export_sfc } from "./index-552863fd.js";
|
|
2
|
+
const _hoisted_1 = { class: "input-wrapper" };
|
|
3
|
+
const _hoisted_2 = ["placeholder", "aria-expanded", "aria-controls", "aria-activedescendant", "disabled"];
|
|
4
|
+
const _hoisted_3 = { class: "icon-container" };
|
|
5
|
+
const _hoisted_4 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "spinner"
|
|
8
|
+
};
|
|
9
|
+
const _hoisted_5 = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "dropdown-icon",
|
|
12
|
+
viewBox: "0 0 20 20",
|
|
13
|
+
fill: "currentColor"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_6 = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "options-container"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_7 = ["id"];
|
|
20
|
+
const _hoisted_8 = ["id", "aria-selected", "onMouseenter", "onMousedown"];
|
|
21
|
+
const _hoisted_9 = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "no-options"
|
|
24
|
+
};
|
|
25
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26
|
+
__name: "dropDown",
|
|
27
|
+
props: {
|
|
28
|
+
modelValue: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
columnOptions: {
|
|
33
|
+
type: Array,
|
|
34
|
+
required: true,
|
|
35
|
+
default: () => []
|
|
36
|
+
},
|
|
37
|
+
placeholder: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "Select an option"
|
|
40
|
+
},
|
|
41
|
+
label: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "Dropdown"
|
|
44
|
+
},
|
|
45
|
+
allowOther: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true
|
|
48
|
+
},
|
|
49
|
+
isLoading: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
emits: ["update:modelValue", "error", "update:value"],
|
|
55
|
+
setup(__props, { emit: __emit }) {
|
|
56
|
+
const props = __props;
|
|
57
|
+
const emits = __emit;
|
|
58
|
+
const isLoaded = ref(false);
|
|
59
|
+
const inputValue = ref(props.modelValue);
|
|
60
|
+
const selectedValue = ref(props.modelValue);
|
|
61
|
+
const showOptions = ref(false);
|
|
62
|
+
const activeIndex = ref(-1);
|
|
63
|
+
const hasError = ref(false);
|
|
64
|
+
const dropdownRef = ref(null);
|
|
65
|
+
const uniqueId = `dropdown-${Math.random().toString(36).substr(2, 9)}`;
|
|
66
|
+
let inputTimeout = null;
|
|
67
|
+
const column_options = computed(() => props.columnOptions || []);
|
|
68
|
+
const hasTyped = ref(false);
|
|
69
|
+
const displayedOptions = computed(() => {
|
|
70
|
+
if (!Array.isArray(column_options.value))
|
|
71
|
+
return [];
|
|
72
|
+
if (!hasTyped.value)
|
|
73
|
+
return column_options.value;
|
|
74
|
+
return column_options.value.filter(
|
|
75
|
+
(option) => option.toLowerCase().includes(inputValue.value.toLowerCase())
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
const onFocus = () => {
|
|
79
|
+
showOptions.value = true;
|
|
80
|
+
hasTyped.value = false;
|
|
81
|
+
nextTick(() => {
|
|
82
|
+
positionDropdown();
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
const onInput = () => {
|
|
86
|
+
showOptions.value = true;
|
|
87
|
+
hasError.value = false;
|
|
88
|
+
activeIndex.value = -1;
|
|
89
|
+
hasTyped.value = true;
|
|
90
|
+
if (inputTimeout)
|
|
91
|
+
clearTimeout(inputTimeout);
|
|
92
|
+
if (props.allowOther) {
|
|
93
|
+
inputTimeout = window.setTimeout(() => {
|
|
94
|
+
doUpdate();
|
|
95
|
+
}, 300);
|
|
96
|
+
}
|
|
97
|
+
nextTick(() => {
|
|
98
|
+
positionDropdown();
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
const filteredOptions = computed(() => {
|
|
102
|
+
if (!Array.isArray(column_options.value))
|
|
103
|
+
return [];
|
|
104
|
+
return column_options.value.filter(
|
|
105
|
+
(option) => option.toLowerCase().includes(inputValue.value.toLowerCase())
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
const activeDescendant = computed(
|
|
109
|
+
() => activeIndex.value >= 0 ? `${uniqueId}-option-${activeIndex.value}` : void 0
|
|
110
|
+
);
|
|
111
|
+
const selectOption = (option) => {
|
|
112
|
+
inputValue.value = option;
|
|
113
|
+
selectedValue.value = option;
|
|
114
|
+
showOptions.value = false;
|
|
115
|
+
hasError.value = false;
|
|
116
|
+
emits("update:modelValue", option);
|
|
117
|
+
emits("update:value", option);
|
|
118
|
+
};
|
|
119
|
+
const doUpdate = () => {
|
|
120
|
+
if (!props.allowOther && !column_options.value.includes(inputValue.value)) {
|
|
121
|
+
hasError.value = true;
|
|
122
|
+
emits("error", "Invalid option selected");
|
|
123
|
+
inputValue.value = selectedValue.value || "";
|
|
124
|
+
} else {
|
|
125
|
+
hasError.value = false;
|
|
126
|
+
selectedValue.value = inputValue.value;
|
|
127
|
+
emits("update:modelValue", inputValue.value);
|
|
128
|
+
emits("update:value", inputValue.value);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
const onBlur = () => {
|
|
132
|
+
setTimeout(() => {
|
|
133
|
+
showOptions.value = false;
|
|
134
|
+
doUpdate();
|
|
135
|
+
}, 150);
|
|
136
|
+
};
|
|
137
|
+
const onKeyDown = (event) => {
|
|
138
|
+
switch (event.key) {
|
|
139
|
+
case "ArrowDown":
|
|
140
|
+
event.preventDefault();
|
|
141
|
+
if (!showOptions.value) {
|
|
142
|
+
showOptions.value = true;
|
|
143
|
+
nextTick(() => {
|
|
144
|
+
positionDropdown();
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
activeIndex.value = Math.min(activeIndex.value + 1, filteredOptions.value.length - 1);
|
|
148
|
+
scrollActiveOptionIntoView();
|
|
149
|
+
break;
|
|
150
|
+
case "ArrowUp":
|
|
151
|
+
event.preventDefault();
|
|
152
|
+
activeIndex.value = Math.max(activeIndex.value - 1, 0);
|
|
153
|
+
scrollActiveOptionIntoView();
|
|
154
|
+
break;
|
|
155
|
+
case "Enter":
|
|
156
|
+
if (activeIndex.value >= 0 && filteredOptions.value[activeIndex.value]) {
|
|
157
|
+
event.preventDefault();
|
|
158
|
+
selectOption(filteredOptions.value[activeIndex.value]);
|
|
159
|
+
} else if (showOptions.value) {
|
|
160
|
+
showOptions.value = false;
|
|
161
|
+
doUpdate();
|
|
162
|
+
} else {
|
|
163
|
+
showOptions.value = true;
|
|
164
|
+
nextTick(() => {
|
|
165
|
+
positionDropdown();
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
break;
|
|
169
|
+
case "Escape":
|
|
170
|
+
event.preventDefault();
|
|
171
|
+
showOptions.value = false;
|
|
172
|
+
break;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const scrollActiveOptionIntoView = () => {
|
|
176
|
+
nextTick(() => {
|
|
177
|
+
const activeElement = document.getElementById(`${uniqueId}-option-${activeIndex.value}`);
|
|
178
|
+
if (activeElement) {
|
|
179
|
+
activeElement.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
const positionDropdown = () => {
|
|
184
|
+
var _a, _b, _c;
|
|
185
|
+
const inputEl = (_a = dropdownRef.value) == null ? void 0 : _a.querySelector(".select-box");
|
|
186
|
+
const dropdownEl = (_b = dropdownRef.value) == null ? void 0 : _b.querySelector(".options-container");
|
|
187
|
+
if (inputEl && dropdownEl) {
|
|
188
|
+
const inputRect = inputEl.getBoundingClientRect();
|
|
189
|
+
const dropdownEl2 = (_c = dropdownRef.value) == null ? void 0 : _c.querySelector(".options-container");
|
|
190
|
+
if (dropdownEl2) {
|
|
191
|
+
dropdownEl2.style.width = `${inputRect.width}px`;
|
|
192
|
+
dropdownEl2.style.top = `${inputRect.bottom}px`;
|
|
193
|
+
dropdownEl2.style.left = `${inputRect.left}px`;
|
|
194
|
+
const dropdownHeight = dropdownEl2.offsetHeight;
|
|
195
|
+
const viewportHeight = window.innerHeight;
|
|
196
|
+
const spaceBelow = viewportHeight - inputRect.bottom;
|
|
197
|
+
if (dropdownHeight > spaceBelow) {
|
|
198
|
+
dropdownEl2.style.top = `${inputRect.top - dropdownHeight}px`;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
const handleClickOutside = (event) => {
|
|
204
|
+
if (dropdownRef.value && !dropdownRef.value.contains(event.target)) {
|
|
205
|
+
showOptions.value = false;
|
|
206
|
+
doUpdate();
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
const handleScroll = () => {
|
|
210
|
+
if (showOptions.value) {
|
|
211
|
+
positionDropdown();
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
onMounted(() => {
|
|
215
|
+
document.addEventListener("click", handleClickOutside);
|
|
216
|
+
window.addEventListener("scroll", handleScroll, true);
|
|
217
|
+
window.addEventListener("resize", positionDropdown);
|
|
218
|
+
isLoaded.value = true;
|
|
219
|
+
});
|
|
220
|
+
onUnmounted(() => {
|
|
221
|
+
document.removeEventListener("click", handleClickOutside);
|
|
222
|
+
window.removeEventListener("scroll", handleScroll, true);
|
|
223
|
+
window.removeEventListener("resize", positionDropdown);
|
|
224
|
+
if (inputTimeout) {
|
|
225
|
+
clearTimeout(inputTimeout);
|
|
226
|
+
}
|
|
227
|
+
isLoaded.value = false;
|
|
228
|
+
});
|
|
229
|
+
watch(
|
|
230
|
+
() => props.modelValue,
|
|
231
|
+
(newValue) => {
|
|
232
|
+
inputValue.value = newValue || "";
|
|
233
|
+
selectedValue.value = newValue || "";
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
watch(
|
|
237
|
+
() => showOptions.value,
|
|
238
|
+
(isOpen) => {
|
|
239
|
+
if (isOpen) {
|
|
240
|
+
nextTick(() => {
|
|
241
|
+
positionDropdown();
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
return (_ctx, _cache) => {
|
|
247
|
+
return isLoaded.value ? (openBlock(), createElementBlock("div", {
|
|
248
|
+
key: 0,
|
|
249
|
+
ref_key: "dropdownRef",
|
|
250
|
+
ref: dropdownRef,
|
|
251
|
+
class: "dropdown-container"
|
|
252
|
+
}, [
|
|
253
|
+
createBaseVNode("label", {
|
|
254
|
+
for: uniqueId,
|
|
255
|
+
class: "sr-only"
|
|
256
|
+
}, toDisplayString(__props.label), 1),
|
|
257
|
+
createBaseVNode("div", _hoisted_1, [
|
|
258
|
+
withDirectives(createBaseVNode("input", {
|
|
259
|
+
id: uniqueId,
|
|
260
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
261
|
+
type: "text",
|
|
262
|
+
class: normalizeClass(["select-box", { "has-error": hasError.value && !__props.isLoading }]),
|
|
263
|
+
placeholder: __props.isLoading ? "Loading..." : __props.placeholder,
|
|
264
|
+
"aria-expanded": showOptions.value,
|
|
265
|
+
"aria-controls": `${uniqueId}-listbox`,
|
|
266
|
+
"aria-activedescendant": activeDescendant.value,
|
|
267
|
+
disabled: __props.isLoading,
|
|
268
|
+
role: "combobox",
|
|
269
|
+
onFocus,
|
|
270
|
+
onInput,
|
|
271
|
+
onBlur,
|
|
272
|
+
onKeydown: onKeyDown
|
|
273
|
+
}, null, 42, _hoisted_2), [
|
|
274
|
+
[vModelText, inputValue.value]
|
|
275
|
+
]),
|
|
276
|
+
createBaseVNode("div", _hoisted_3, [
|
|
277
|
+
__props.isLoading ? (openBlock(), createElementBlock("div", _hoisted_4)) : (openBlock(), createElementBlock("svg", _hoisted_5, _cache[1] || (_cache[1] = [
|
|
278
|
+
createBaseVNode("path", {
|
|
279
|
+
"fill-rule": "evenodd",
|
|
280
|
+
d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
|
|
281
|
+
"clip-rule": "evenodd"
|
|
282
|
+
}, null, -1)
|
|
283
|
+
])))
|
|
284
|
+
])
|
|
285
|
+
]),
|
|
286
|
+
createVNode(Transition, { name: "fade" }, {
|
|
287
|
+
default: withCtx(() => [
|
|
288
|
+
showOptions.value && !__props.isLoading && Array.isArray(column_options.value) ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
289
|
+
createBaseVNode("ul", {
|
|
290
|
+
id: `${uniqueId}-listbox`,
|
|
291
|
+
class: "options-list",
|
|
292
|
+
role: "listbox"
|
|
293
|
+
}, [
|
|
294
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(displayedOptions.value, (option, index) => {
|
|
295
|
+
return openBlock(), createElementBlock("li", {
|
|
296
|
+
id: `${uniqueId}-option-${index}`,
|
|
297
|
+
key: option,
|
|
298
|
+
class: normalizeClass(["option-item", { "is-active": index === activeIndex.value }]),
|
|
299
|
+
role: "option",
|
|
300
|
+
"aria-selected": inputValue.value === option,
|
|
301
|
+
onMouseenter: ($event) => activeIndex.value = index,
|
|
302
|
+
onMousedown: withModifiers(($event) => selectOption(option), ["prevent"])
|
|
303
|
+
}, toDisplayString(option), 43, _hoisted_8);
|
|
304
|
+
}), 128)),
|
|
305
|
+
displayedOptions.value.length === 0 ? (openBlock(), createElementBlock("li", _hoisted_9, "No options found")) : createCommentVNode("", true)
|
|
306
|
+
], 8, _hoisted_7)
|
|
307
|
+
])) : createCommentVNode("", true)
|
|
308
|
+
]),
|
|
309
|
+
_: 1
|
|
310
|
+
})
|
|
311
|
+
], 512)) : createCommentVNode("", true);
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
const dropDown_vue_vue_type_style_index_0_scoped_0fe9cf29_lang = "";
|
|
316
|
+
const ColumnSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0fe9cf29"]]);
|
|
317
|
+
export {
|
|
318
|
+
ColumnSelector as C
|
|
319
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { C as ColumnSelector } from "./dropDown-5e7e9a5a.js";
|
|
2
|
+
import { d as defineComponent, r as ref, m as watch, c as openBlock, e as createElementBlock, t as toDisplayString, i as createCommentVNode, p as createBaseVNode, f as createVNode, _ as _export_sfc } from "./index-552863fd.js";
|
|
3
|
+
const _hoisted_1 = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "label"
|
|
6
|
+
};
|
|
7
|
+
const _hoisted_2 = { class: "select-wrapper" };
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "dropDownGeneric",
|
|
10
|
+
props: {
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "NewField"
|
|
14
|
+
},
|
|
15
|
+
optionList: {
|
|
16
|
+
type: Array,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
allowOther: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true
|
|
26
|
+
},
|
|
27
|
+
placeholder: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "Select an option"
|
|
30
|
+
},
|
|
31
|
+
isLoading: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emits: ["update:modelValue", "change"],
|
|
37
|
+
setup(__props, { emit: __emit }) {
|
|
38
|
+
const props = __props;
|
|
39
|
+
const emit = __emit;
|
|
40
|
+
const localSelectedValue = ref(props.modelValue);
|
|
41
|
+
watch(
|
|
42
|
+
() => props.modelValue,
|
|
43
|
+
(newVal) => {
|
|
44
|
+
localSelectedValue.value = newVal;
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
watch(localSelectedValue, (newVal) => {
|
|
48
|
+
emit("update:modelValue", newVal);
|
|
49
|
+
emit("change", newVal);
|
|
50
|
+
});
|
|
51
|
+
return (_ctx, _cache) => {
|
|
52
|
+
return openBlock(), createElementBlock("div", null, [
|
|
53
|
+
__props.title !== "" ? (openBlock(), createElementBlock("p", _hoisted_1, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
54
|
+
createBaseVNode("div", _hoisted_2, [
|
|
55
|
+
createVNode(ColumnSelector, {
|
|
56
|
+
modelValue: localSelectedValue.value,
|
|
57
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localSelectedValue.value = $event),
|
|
58
|
+
"column-options": __props.optionList,
|
|
59
|
+
"allow-other": __props.allowOther,
|
|
60
|
+
placeholder: __props.placeholder,
|
|
61
|
+
"is-loading": __props.isLoading
|
|
62
|
+
}, null, 8, ["modelValue", "column-options", "allow-other", "placeholder", "is-loading"])
|
|
63
|
+
])
|
|
64
|
+
]);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
const dropDownGeneric_vue_vue_type_style_index_0_scoped_f2958f57_lang = "";
|
|
69
|
+
const DropDownGeneric = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f2958f57"]]);
|
|
70
|
+
export {
|
|
71
|
+
DropDownGeneric as D
|
|
72
|
+
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|