@freecallai/pro 0.0.4 → 0.0.6
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.
- package/LICENSE +20 -20
- package/README.md +23 -23
- package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang--MPtqZY_.js +193 -0
- package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-DIIFWISD.js +4995 -0
- package/dist/KnowledgeArea-CEX1esVZ.js +4 -0
- package/dist/KnowledgeArea.vue_vue_type_script_setup_true_lang-Bg1e7xYT.js +1653 -0
- package/dist/ToolForm-Ch1YRmMw.js +196 -0
- package/dist/agent-prompt-editor/index.js +917 -0
- package/dist/agent-prompt-editor/legacy-converter/index.js +490 -0
- package/dist/{choice-C1SxozNA.js → choice-2dbddjJU.js} +1 -1
- package/dist/edition-info/index.js +1 -1
- package/dist/filters/index.js +1 -1
- package/dist/{guard-CXpVx8UR.js → guard-Cr_ny-sR.js} +226 -213
- package/dist/{index-B8jg37Wj.js → index-5FRWdHnd.js} +1 -1
- package/dist/index-7x1OTv0m.js +98 -0
- package/dist/{index-CM0MN2DT.js → index-BBxrpF3v.js} +1 -1
- package/dist/index-CEjD03Kk.js +5 -0
- package/dist/{index-UjI4WA5F.js → index-CK_CrdQW.js} +1 -1
- package/dist/index-Ck8RYpuE.js +816 -0
- package/dist/{index-lNhA3N9x.js → index-DBQsQ1ZK.js} +1 -0
- package/dist/{index-BqXNMfLG.js → index-DiaPY8Db.js} +2 -2
- package/dist/{index-bSNw0XAf.js → index-DmdrsEvk.js} +1 -1
- package/dist/index-DnmCPdCI.js +168 -0
- package/dist/{index-Cy4DqT8R.js → index-DwDYy2lj.js} +1 -1
- package/dist/{index-CZc2Gyjb.js → index-aic1yCBs.js} +1 -1
- package/dist/index-sWjZ9xuV.js +5 -0
- package/dist/index.js +13 -13
- package/dist/{inline-Zj7Hqg-_.js → inline-8aNfINLF.js} +1 -1
- package/dist/knowledge-type-picker/index.js +1 -1
- package/dist/{knowledge-DaTnF2IW.js → knowledge-y2j0ijgx.js} +1 -1
- package/dist/media-id-b2dgniSy.js +15 -0
- package/dist/{media-migration-C2QLMSpd.js → media-migration-Dy_rbdkK.js} +1 -1
- package/dist/media-policy-BwKjZPWt.js +158 -0
- package/dist/{media-upload-D9MYBbLg.js → media-upload-BetGuTLJ.js} +1 -1
- package/dist/model-DvukseoR.js +146 -0
- package/dist/navigation/index.js +1 -1
- package/dist/rich-text/index.js +75 -73
- package/dist/rich-text/legacy-converter/index.js +822 -799
- package/dist/style.css +1 -1
- package/dist/switcher/index.js +1 -1
- package/dist/types/agent-prompt-editor/FkpAgentPromptEditor.vue.d.ts +550 -0
- package/dist/types/agent-prompt-editor/agent-size-chart.d.ts +3 -0
- package/dist/types/agent-prompt-editor/document-adapter.d.ts +3 -0
- package/dist/types/agent-prompt-editor/index.d.ts +6 -0
- package/dist/types/agent-prompt-editor/legacy-converter-index.d.ts +2 -0
- package/dist/types/agent-prompt-editor/legacy-converter.d.ts +26 -0
- package/dist/types/agent-prompt-editor/model.d.ts +21 -0
- package/dist/types/agent-prompt-editor/types.d.ts +56 -0
- package/dist/types/edition-info/FkpEditionInfo.vue.d.ts +1 -3
- package/dist/types/edition-info/presets.d.ts +8 -0
- package/dist/types/edition-info/types.d.ts +1 -0
- package/dist/types/filters/FkpFilter.vue.d.ts +2 -2
- package/dist/types/filters/FkpFilterDateRange.vue.d.ts +2 -2
- package/dist/types/filters/FkpFilterPeriod.vue.d.ts +2 -2
- package/dist/types/filters/FkpSearchableMultiSelect.vue.d.ts +2 -2
- package/dist/types/index.d.ts +4 -1
- package/dist/types/navigation/FkpNavigation.vue.d.ts +20 -29
- package/dist/types/navigation/NavigationButton.vue.d.ts +26 -0
- package/dist/types/navigation/NavigationGroup.vue.d.ts +45 -0
- package/dist/types/navigation/NavigationIcon.vue.d.ts +28 -0
- package/dist/types/navigation/NavigationNodes.vue.d.ts +40 -0
- package/dist/types/navigation/index.d.ts +1 -1
- package/dist/types/navigation/types.d.ts +43 -5
- package/dist/types/navigation/use-navigation-tree.d.ts +13 -0
- package/dist/types/rich-text/FkpRichText.vue.d.ts +31 -9
- package/dist/types/rich-text/config/descriptor.d.ts +1 -0
- package/dist/types/rich-text/config/resolve.d.ts +1 -1
- package/dist/types/rich-text/index.d.ts +4 -1
- package/dist/types/rich-text/knowledge-document-adapter.d.ts +2 -0
- package/dist/types/rich-text/model/question-text.d.ts +1 -1
- package/dist/types/rich-text/plugins/registry.d.ts +2 -1
- package/dist/types/rich-text/public/types.d.ts +16 -0
- package/dist/types/rich-text/runtime/document-adapter.d.ts +9 -0
- package/dist/types/rich-text/runtime/knowledge-clipboard.d.ts +9 -3
- package/dist/types/rich-text/runtime/media-sources.d.ts +7 -0
- package/dist/types/rich-text/runtime/media-upload-session.d.ts +2 -0
- package/dist/types/rich-text/ui/FkpKnowledgeTypePicker.vue.d.ts +3 -3
- package/dist/types/rich-text/ui/KnowledgeArea.vue.d.ts +18 -3
- package/dist/types/rich-text/ui/MediaSourceControls.vue.d.ts +190 -0
- package/dist/types/rich-text/ui/ToolForm.vue.d.ts +2 -2
- package/dist/types/rich-text/ui/token-renderer.d.ts +3 -0
- package/dist/types/rich-text/ui/useMediaHint.d.ts +6 -0
- package/dist/types/switcher/FkpSwitcher.vue.d.ts +2 -2
- package/dist/types-PvYB5e85.js +14 -0
- package/package.json +13 -5
- package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-DYwu7oQs.js +0 -187
- package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-BowbZoTQ.js +0 -4885
- package/dist/KnowledgeArea-BH-_uF6R.js +0 -1438
- package/dist/ToolForm-C6XW31Y7.js +0 -185
- package/dist/index-CS2xQQ8W.js +0 -168
- package/dist/index-D0bJAQSN.js +0 -327
- package/dist/index-DAZ1ulyA.js +0 -5
- package/dist/index-DCmHHi07.js +0 -71
- package/dist/index-F7lDP1lI.js +0 -5
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { defineComponent as T, ref as w, watch as q, openBlock as t, createElementBlock as n, Fragment as h, renderList as S, normalizeClass as _, createElementVNode as k, createTextVNode as c, toDisplayString as s, createCommentVNode as g, createVNode as f, unref as u, withCtx as b, createBlock as x, normalizeStyle as B } from "vue";
|
|
2
|
-
import { RadioGroup as F, Radio as E, Checkbox as P, Switch as W, Textarea as z, Input as R, Button as V } from "@freecallai/ui";
|
|
3
|
-
import { c as j } from "./FkpRichText.vue_vue_type_script_setup_true_lang-BowbZoTQ.js";
|
|
4
|
-
const D = { class: "fkp-tool-form" }, G = { key: 0 }, O = { class: "fkp-visually-hidden" }, A = {
|
|
5
|
-
key: 1,
|
|
6
|
-
class: "fkp-tool-form-checkbox"
|
|
7
|
-
}, H = { key: 0 }, J = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "fkp-tool-form-error",
|
|
10
|
-
role: "alert"
|
|
11
|
-
}, K = { class: "fkp-tool-form-actions" }, X = /* @__PURE__ */ T({
|
|
12
|
-
__name: "ToolForm",
|
|
13
|
-
props: {
|
|
14
|
-
definition: {},
|
|
15
|
-
initialParams: {},
|
|
16
|
-
submitLabel: {}
|
|
17
|
-
},
|
|
18
|
-
emits: ["submit", "cancel"],
|
|
19
|
-
setup($, { emit: I }) {
|
|
20
|
-
const d = $, C = I, o = w({}), i = w("");
|
|
21
|
-
q(
|
|
22
|
-
() => [d.definition, d.initialParams],
|
|
23
|
-
() => {
|
|
24
|
-
o.value = Object.fromEntries(
|
|
25
|
-
d.definition.fields.map((l) => [
|
|
26
|
-
l.id,
|
|
27
|
-
j(l, d.initialParams)
|
|
28
|
-
])
|
|
29
|
-
), i.value = "";
|
|
30
|
-
},
|
|
31
|
-
{ immediate: !0 }
|
|
32
|
-
);
|
|
33
|
-
function p(l) {
|
|
34
|
-
return l.visibleWhen ? o.value[l.visibleWhen.fieldId] === l.visibleWhen.equals : !0;
|
|
35
|
-
}
|
|
36
|
-
function L(l, r) {
|
|
37
|
-
o.value[l.id] = l.maxLength === void 0 ? r : r.slice(0, l.maxLength);
|
|
38
|
-
}
|
|
39
|
-
function N(l) {
|
|
40
|
-
var a;
|
|
41
|
-
const r = {};
|
|
42
|
-
for (const e of d.definition.fields) {
|
|
43
|
-
if (!p(e)) continue;
|
|
44
|
-
const y = o.value[e.id];
|
|
45
|
-
if (e.kind === "switch" || e.kind === "checkbox") {
|
|
46
|
-
if (e.required && y !== !0) {
|
|
47
|
-
i.value = `请选择${e.label}`;
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
r[e.id] = y === !0;
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
const m = String(y ?? "").trim();
|
|
54
|
-
if (e.required && !m) {
|
|
55
|
-
i.value = `请填写${e.label}`;
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (e.maxLength !== void 0 && [...m].length > e.maxLength) {
|
|
59
|
-
i.value = `${e.label}不能超过${e.maxLength}字`;
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (e.kind === "radio" && !((a = e.options) != null && a.some((v) => v.value === m))) {
|
|
63
|
-
i.value = `请选择${e.label}`;
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (e.kind === "number" && m) {
|
|
67
|
-
const v = Number(m);
|
|
68
|
-
if (!Number.isFinite(v) || e.min !== void 0 && v < e.min || e.max !== void 0 && v > e.max) {
|
|
69
|
-
i.value = `${e.label}数值无效`;
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
r[e.id] = m;
|
|
74
|
-
}
|
|
75
|
-
i.value = "", C("submit", r, l.currentTarget);
|
|
76
|
-
}
|
|
77
|
-
return (l, r) => (t(), n("div", D, [
|
|
78
|
-
(t(!0), n(h, null, S(l.definition.fields, (a) => (t(), n(h, {
|
|
79
|
-
key: a.id
|
|
80
|
-
}, [
|
|
81
|
-
p(a) && a.kind === "radio" ? (t(), n("fieldset", {
|
|
82
|
-
key: 0,
|
|
83
|
-
class: _(["fkp-tool-form-field fkp-tool-form-choice", { "fkp-tool-form-flags": a.appearance === "flag" }])
|
|
84
|
-
}, [
|
|
85
|
-
k("legend", null, [
|
|
86
|
-
c(s(a.label), 1),
|
|
87
|
-
a.required ? (t(), n("b", G, "*")) : g("", !0)
|
|
88
|
-
]),
|
|
89
|
-
f(u(F), {
|
|
90
|
-
"model-value": String(o.value[a.id] ?? ""),
|
|
91
|
-
onChange: (e) => o.value[a.id] = String(e)
|
|
92
|
-
}, {
|
|
93
|
-
default: b(() => [
|
|
94
|
-
(t(!0), n(h, null, S(a.options || [], (e) => (t(), x(u(E), {
|
|
95
|
-
key: e.value,
|
|
96
|
-
value: e.value,
|
|
97
|
-
"aria-label": e.label
|
|
98
|
-
}, {
|
|
99
|
-
default: b(() => [
|
|
100
|
-
a.appearance === "flag" && e.color ? (t(), n("span", {
|
|
101
|
-
key: 0,
|
|
102
|
-
class: "fkp-tool-form-flag",
|
|
103
|
-
style: B({ "--fkp-flag-color": e.color })
|
|
104
|
-
}, [
|
|
105
|
-
k("span", O, s(e.label), 1)
|
|
106
|
-
], 4)) : (t(), n(h, { key: 1 }, [
|
|
107
|
-
c(s(e.label), 1)
|
|
108
|
-
], 64))
|
|
109
|
-
]),
|
|
110
|
-
_: 2
|
|
111
|
-
}, 1032, ["value", "aria-label"]))), 128))
|
|
112
|
-
]),
|
|
113
|
-
_: 2
|
|
114
|
-
}, 1032, ["model-value", "onChange"])
|
|
115
|
-
], 2)) : p(a) && a.kind === "checkbox" ? (t(), n("div", A, [
|
|
116
|
-
f(u(P), {
|
|
117
|
-
"model-value": o.value[a.id] === !0,
|
|
118
|
-
onChange: (e) => o.value[a.id] = e === !0
|
|
119
|
-
}, {
|
|
120
|
-
default: b(() => [
|
|
121
|
-
c(s(a.label), 1)
|
|
122
|
-
]),
|
|
123
|
-
_: 2
|
|
124
|
-
}, 1032, ["model-value", "onChange"])
|
|
125
|
-
])) : p(a) ? (t(), n("label", {
|
|
126
|
-
key: 2,
|
|
127
|
-
class: _(["fkp-tool-form-field", { "fkp-tool-form-field--no-label": a.hideLabel }])
|
|
128
|
-
}, [
|
|
129
|
-
k("span", {
|
|
130
|
-
class: _({ "fkp-visually-hidden": a.hideLabel })
|
|
131
|
-
}, [
|
|
132
|
-
c(s(a.label), 1),
|
|
133
|
-
a.required ? (t(), n("b", H, "*")) : g("", !0)
|
|
134
|
-
], 2),
|
|
135
|
-
a.kind === "switch" ? (t(), x(u(W), {
|
|
136
|
-
key: 0,
|
|
137
|
-
"model-value": o.value[a.id] === !0,
|
|
138
|
-
"aria-label": a.label,
|
|
139
|
-
onChange: (e) => o.value[a.id] = e === !0
|
|
140
|
-
}, null, 8, ["model-value", "aria-label", "onChange"])) : a.kind === "textarea" ? (t(), x(u(z), {
|
|
141
|
-
key: 1,
|
|
142
|
-
"model-value": String(o.value[a.id] ?? ""),
|
|
143
|
-
placeholder: a.placeholder,
|
|
144
|
-
"max-length": a.maxLength,
|
|
145
|
-
"show-word-limit": !!a.maxLength,
|
|
146
|
-
"textarea-attrs": { "aria-label": a.label, rows: 4 },
|
|
147
|
-
onInput: (e) => L(a, String(e))
|
|
148
|
-
}, null, 8, ["model-value", "placeholder", "max-length", "show-word-limit", "textarea-attrs", "onInput"])) : (t(), x(u(R), {
|
|
149
|
-
key: 2,
|
|
150
|
-
"model-value": String(o.value[a.id] ?? ""),
|
|
151
|
-
placeholder: a.placeholder,
|
|
152
|
-
"input-attrs": {
|
|
153
|
-
type: a.kind === "number" ? "number" : "text",
|
|
154
|
-
"aria-label": a.label
|
|
155
|
-
},
|
|
156
|
-
onInput: (e) => L(a, String(e))
|
|
157
|
-
}, null, 8, ["model-value", "placeholder", "input-attrs", "onInput"]))
|
|
158
|
-
], 2)) : g("", !0)
|
|
159
|
-
], 64))), 128)),
|
|
160
|
-
i.value ? (t(), n("p", J, s(i.value), 1)) : g("", !0),
|
|
161
|
-
k("div", K, [
|
|
162
|
-
f(u(V), {
|
|
163
|
-
onClick: r[0] || (r[0] = (a) => C("cancel"))
|
|
164
|
-
}, {
|
|
165
|
-
default: b(() => r[1] || (r[1] = [
|
|
166
|
-
c("取消")
|
|
167
|
-
])),
|
|
168
|
-
_: 1
|
|
169
|
-
}),
|
|
170
|
-
f(u(V), {
|
|
171
|
-
type: "primary",
|
|
172
|
-
onClick: N
|
|
173
|
-
}, {
|
|
174
|
-
default: b(() => [
|
|
175
|
-
c(s(l.submitLabel), 1)
|
|
176
|
-
]),
|
|
177
|
-
_: 1
|
|
178
|
-
})
|
|
179
|
-
])
|
|
180
|
-
]));
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
export {
|
|
184
|
-
X as default
|
|
185
|
-
};
|
package/dist/index-CS2xQQ8W.js
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { defineComponent as P, computed as u, ref as c, watch as A, openBlock as j, createElementBlock as R, createVNode as m, unref as r, mergeProps as I, createSlots as K, withCtx as n, createElementVNode as a, renderSlot as b, toDisplayString as D, withModifiers as d, withKeys as k } from "vue";
|
|
2
|
-
import { Select as E, Input as N } from "@freecallai/ui";
|
|
3
|
-
const O = ["src"], Z = { class: "fkp-switcher-image" }, $ = ["src"], x = { class: "fkp-switcher-option-label" }, G = { class: "fkp-switcher-image" }, H = ["src"], W = { class: "fkp-switcher-image" }, q = ["src"], z = /* @__PURE__ */ P({
|
|
4
|
-
name: "FkpSwitcher",
|
|
5
|
-
inheritAttrs: !1,
|
|
6
|
-
__name: "FkpSwitcher",
|
|
7
|
-
props: {
|
|
8
|
-
modelValue: { type: [String, Number, Boolean] },
|
|
9
|
-
options: { default: () => [] },
|
|
10
|
-
disabled: { type: Boolean, default: !1 },
|
|
11
|
-
loading: { type: Boolean, default: !1 },
|
|
12
|
-
placeholder: { default: "请选择" },
|
|
13
|
-
ariaLabel: { default: "切换选项" },
|
|
14
|
-
iconUrl: {},
|
|
15
|
-
searchable: { type: Boolean, default: !1 },
|
|
16
|
-
searchPlaceholder: { default: "搜索选项" }
|
|
17
|
-
},
|
|
18
|
-
emits: ["update:modelValue", "change"],
|
|
19
|
-
setup(y, { emit: L }) {
|
|
20
|
-
const C = new URL("data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16.0004'%20height='16.002'%20viewBox='0%200%2016.0004%2016.002'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame%2077'%3e%3cpath%20id='Union'%20d='M3.46421%200.00195312C4.33099%20-0.0194915%205.25046%200.19045%206.14683%200.535156C6.75024%200.767259%207.37112%201.07427%207.99839%201.44336C8.62694%201.0736%209.25045%200.767614%209.85484%200.535156C10.751%200.190618%2011.6699%20-0.0185089%2012.5365%200.00292969C13.4134%200.0247296%2014.3219%200.290296%2015.0169%200.985352C15.7118%201.68041%2015.9776%202.58898%2015.9994%203.46582C16.0207%204.33239%2015.8108%205.25132%2015.4662%206.14746C15.2342%206.75045%2014.9259%207.37033%2014.557%207.99707C14.927%208.62618%2015.2335%209.24959%2015.4662%209.85449C15.8108%2010.7508%2016.0198%2011.6694%2015.9984%2012.5361C15.9766%2013.413%2015.7119%2014.3215%2015.0169%2015.0166C14.3218%2015.7115%2013.4134%2015.9773%2012.5365%2015.999C11.6699%2016.0204%2010.751%2015.8114%209.85484%2015.4668C9.25138%2015.2347%208.6309%2014.9266%208.00328%2014.5576C7.37439%2014.9275%206.75152%2015.2342%206.14683%2015.4668C5.25072%2015.8114%204.33175%2016.0213%203.46519%2016C2.58826%2015.9783%201.67986%2015.7125%200.984722%2015.0176C0.289547%2014.3224%200.0240196%2013.4142%200.00230056%2012.5371C-0.0190901%2011.6705%200.189911%2010.7517%200.534527%209.85547C0.7668%209.25164%201.07341%208.62993%201.44273%208.00195C1.07305%207.37352%200.766956%206.75077%200.534527%206.14648C0.189893%205.25028%20-0.0190565%204.33147%200.00230056%203.46484C0.0240165%202.58791%200.289762%201.67951%200.984722%200.984375C1.67968%200.289527%202.58746%200.0237982%203.46421%200.00195312ZM3.53453%202.83594C3.16381%202.84521%203.03151%202.94637%202.98863%202.98926C2.94542%203.03276%202.84552%203.16517%202.83628%203.53418C2.8269%203.91532%202.92139%204.4538%203.18101%205.12891C3.69918%206.47605%204.77647%208.11694%206.33043%209.6709C6.53888%209.87934%206.74869%2010.0794%206.95933%2010.2705C6.12185%2010.8871%205.32727%2011.3276%204.65562%2011.5859C4.54378%2011.6289%204.43889%2011.6641%204.34312%2011.6943C4.33709%2011.6883%204.33157%2011.6818%204.32554%2011.6758C3.96563%2011.3159%203.62519%2010.9465%203.30308%2010.5732C3.25943%2010.6743%203.21876%2010.774%203.18101%2010.8721C2.92141%2011.547%202.82699%2012.0856%202.83628%2012.4668C2.8455%2012.837%202.94559%2012.9695%202.98863%2013.0127C3.03161%2013.0556%203.16385%2013.1558%203.53453%2013.165C3.91567%2013.1744%204.45421%2013.0809%205.12925%2012.8213C5.22682%2012.7838%205.32562%2012.7426%205.42613%2012.6992L5.72886%2012.5615C5.82561%2012.5155%205.923%2012.4661%206.02183%2012.415C6.03487%2012.4083%206.04782%2012.4014%206.06089%2012.3945C6.25404%2012.2937%206.45113%2012.184%206.65074%2012.0645C6.66312%2012.057%206.67545%2012.0495%206.68785%2012.042C7.10819%2011.7882%207.54052%2011.4933%207.97691%2011.1592C8.54068%2010.7274%209.11223%2010.2309%209.67125%209.67187C9.8789%209.46421%2010.0775%209.25379%2010.2679%209.04395C10.8852%209.88206%2011.3267%2010.6765%2011.5853%2011.3486C11.6281%2011.46%2011.6617%2011.5647%2011.6918%2011.6602C11.6865%2011.6654%2011.6814%2011.6715%2011.6761%2011.6768C11.3168%2012.036%2010.9481%2012.3767%2010.5755%2012.6982C10.6757%2012.7415%2010.7741%2012.7829%2010.8714%2012.8203C11.5465%2013.0799%2012.085%2013.1743%2012.4662%2013.165C12.8363%2013.1558%2012.9689%2013.0548%2013.0121%2013.0117C13.055%2012.9686%2013.1551%2012.8368%2013.1644%2012.4668C13.1738%2012.0857%2013.0803%2011.5472%2012.8207%2010.8721C12.7829%2010.7739%2012.7413%2010.6744%2012.6976%2010.5732L12.6966%2010.5752C12.3536%209.78076%2011.8299%208.89921%2011.14%208.00195L11.141%208C10.7134%207.44384%2010.2225%206.88135%209.67125%206.33008C9.46351%206.12234%209.25324%205.92389%209.04332%205.7334C9.88133%205.11621%2010.676%204.67454%2011.348%204.41602C11.4591%204.3733%2011.5633%204.33954%2011.6586%204.30957C11.664%204.31505%2011.6706%204.31971%2011.6761%204.3252C12.0357%204.68478%2012.3768%205.0529%2012.6986%205.42578C12.7418%205.32571%2012.7833%205.22705%2012.8207%205.12988C13.0802%204.45477%2013.1738%203.91625%2013.1644%203.53516C13.1551%203.1647%2013.055%203.03222%2013.0121%202.98926C12.9689%202.94623%2012.836%202.84619%2012.4662%202.83691C12.0851%202.82757%2011.5463%202.92212%2010.8714%203.18164C10.7739%203.21917%2010.6741%203.25937%2010.5736%203.30273L10.5746%203.30371C10.287%203.42782%209.98789%203.57517%209.68101%203.74609C9.66058%203.75746%209.63999%203.7687%209.61949%203.78027C9.09706%204.07545%208.55231%204.43769%208.00132%204.86133L8.00035%204.86035C7.44412%205.28806%206.8819%205.77961%206.33043%206.33105C6.12228%206.5392%205.92165%206.74865%205.73082%206.95898C5.11434%206.12161%204.67367%205.32779%204.41539%204.65625C4.37233%204.54427%204.33818%204.43963%204.30796%204.34375C4.31369%204.33801%204.31981%204.33191%204.32554%204.32617C4.68561%203.96613%205.05372%203.62396%205.42711%203.30176C5.3265%203.25832%205.22693%203.21823%205.12925%203.18066C4.45399%202.92098%203.91569%202.82651%203.53453%202.83594Z'%20fill='url(%23paint0_linear_0_45)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_0_45'%20x1='-0.0410981'%20y1='-0.0418891'%20x2='16.0442'%20y2='16.0409'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230E42D2'/%3e%3cstop%20offset='1'%20stop-color='%234080FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e", import.meta.url).href, S = new URL("data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%3e%3cpath%20id='Vector'%20d='M12.916%206.6414H3.13318'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke='%2386909C'/%3e%3cpath%20id='Vector_2'%20d='M9.65508%203.38046L12.916%206.6414'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke='%2386909C'/%3e%3cpath%20id='Vector_3'%20d='M3.35033%209.3586H13.1332'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke='%2386909C'/%3e%3cpath%20id='Vector_4'%20d='M3.35033%209.3586L6.61129%2012.6195'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke='%2386909C'/%3e%3c/g%3e%3c/svg%3e", import.meta.url).href, V = new URL("data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='interactive-button/search'%3e%3cpath%20id='Vector'%20d='M9.23316%203.45857C7.63852%201.86393%205.0531%201.86393%203.45846%203.45857C1.86382%205.05321%201.86382%207.63863%203.45846%209.23327C5.0531%2010.8279%207.63852%2010.8279%209.23316%209.23327C10.8278%207.63863%2010.8278%205.05321%209.23316%203.45857ZM2.6335%202.63361C4.68375%200.583358%208.00787%200.583358%2010.0581%202.63361C11.969%204.54444%2012.0989%207.56177%2010.4479%209.62309L12.533%2011.7081L11.708%2012.5331L9.62298%2010.4481C7.56166%2012.099%204.54433%2011.9691%202.6335%2010.0582C0.583247%208.00798%200.583247%204.68386%202.6335%202.63361Z'%20fill-rule='evenodd'%20clip-rule='evenodd'%20fill='%234E5969'/%3e%3c/g%3e%3c/svg%3e", import.meta.url).href, t = y, f = L, h = u(
|
|
21
|
-
() => t.options.find((e) => e.value === t.modelValue)
|
|
22
|
-
), U = u(
|
|
23
|
-
() => {
|
|
24
|
-
var e;
|
|
25
|
-
return ((e = h.value) == null ? void 0 : e.iconUrl) || t.iconUrl || C;
|
|
26
|
-
}
|
|
27
|
-
), w = c(), s = c(!1), i = c(!1), p = c(""), _ = u(
|
|
28
|
-
() => t.options.filter(
|
|
29
|
-
(e) => !t.searchable || e.label.toLocaleLowerCase().includes(p.value.trim().toLocaleLowerCase())
|
|
30
|
-
)
|
|
31
|
-
);
|
|
32
|
-
A(s, (e) => {
|
|
33
|
-
e || (p.value = "", i.value = !1);
|
|
34
|
-
});
|
|
35
|
-
function M(e) {
|
|
36
|
-
t.disabled || t.loading || (e.key === "ArrowDown" || e.key === "ArrowUp") && (i.value = !0, s.value || (e.preventDefault(), e.stopPropagation(), s.value = !0));
|
|
37
|
-
}
|
|
38
|
-
function v() {
|
|
39
|
-
var e, o;
|
|
40
|
-
i.value = !0, (o = (e = w.value) == null ? void 0 : e.querySelector("input")) == null || o.focus();
|
|
41
|
-
}
|
|
42
|
-
function B() {
|
|
43
|
-
s.value = !1, v();
|
|
44
|
-
}
|
|
45
|
-
function F(e) {
|
|
46
|
-
const o = t.options.find((l) => l.value === e);
|
|
47
|
-
t.disabled || t.loading || !o || o.disabled || (f("update:modelValue", o.value), f("change", o.value, o));
|
|
48
|
-
}
|
|
49
|
-
return (e, o) => (j(), R("span", {
|
|
50
|
-
ref_key: "root",
|
|
51
|
-
ref: w,
|
|
52
|
-
class: "fkp-switcher-container",
|
|
53
|
-
onKeydownCapture: M
|
|
54
|
-
}, [
|
|
55
|
-
m(r(E), I({
|
|
56
|
-
"popup-visible": s.value,
|
|
57
|
-
"onUpdate:popupVisible": o[4] || (o[4] = (l) => s.value = l)
|
|
58
|
-
}, e.$attrs, {
|
|
59
|
-
class: "fkp-switcher",
|
|
60
|
-
"model-value": e.modelValue,
|
|
61
|
-
options: _.value,
|
|
62
|
-
"fallback-option": (l) => e.options.find((g) => g.value === l) || {
|
|
63
|
-
value: String(l),
|
|
64
|
-
label: String(l)
|
|
65
|
-
},
|
|
66
|
-
"show-extra-options": !1,
|
|
67
|
-
"show-header-on-empty": !0,
|
|
68
|
-
disabled: e.disabled || e.loading,
|
|
69
|
-
loading: e.loading,
|
|
70
|
-
placeholder: e.placeholder,
|
|
71
|
-
"aria-label": e.ariaLabel,
|
|
72
|
-
"trigger-props": {
|
|
73
|
-
contentClass: [
|
|
74
|
-
"fkp-switcher-popup",
|
|
75
|
-
{
|
|
76
|
-
"fkp-switcher-searchable": e.searchable,
|
|
77
|
-
"fkp-switcher-keyboard": i.value
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
autoFitPopupWidth: !1,
|
|
81
|
-
autoFitPopupMinWidth: !1,
|
|
82
|
-
position: "bottom",
|
|
83
|
-
popupOffset: 14,
|
|
84
|
-
showArrow: !0,
|
|
85
|
-
arrowClass: "fkp-switcher-arrow"
|
|
86
|
-
},
|
|
87
|
-
onChange: F
|
|
88
|
-
}), K({
|
|
89
|
-
option: n(({ data: l }) => [
|
|
90
|
-
a("span", {
|
|
91
|
-
class: "fkp-switcher-option",
|
|
92
|
-
onMousemove: o[3] || (o[3] = (g) => i.value = !1)
|
|
93
|
-
}, [
|
|
94
|
-
b(e.$slots, "option-icon", { option: l }, () => [
|
|
95
|
-
a("span", Z, [
|
|
96
|
-
a("img", {
|
|
97
|
-
src: l.iconUrl || e.iconUrl || r(C),
|
|
98
|
-
alt: ""
|
|
99
|
-
}, null, 8, $)
|
|
100
|
-
])
|
|
101
|
-
]),
|
|
102
|
-
a("span", x, D(l.label), 1)
|
|
103
|
-
], 32)
|
|
104
|
-
]),
|
|
105
|
-
prefix: n(() => [
|
|
106
|
-
b(e.$slots, "icon", { option: h.value }, () => [
|
|
107
|
-
a("span", G, [
|
|
108
|
-
a("img", {
|
|
109
|
-
src: U.value,
|
|
110
|
-
alt: ""
|
|
111
|
-
}, null, 8, H)
|
|
112
|
-
])
|
|
113
|
-
])
|
|
114
|
-
]),
|
|
115
|
-
"arrow-icon": n(() => [
|
|
116
|
-
a("span", W, [
|
|
117
|
-
a("img", {
|
|
118
|
-
src: r(S),
|
|
119
|
-
alt: ""
|
|
120
|
-
}, null, 8, q)
|
|
121
|
-
])
|
|
122
|
-
]),
|
|
123
|
-
_: 2
|
|
124
|
-
}, [
|
|
125
|
-
e.searchable ? {
|
|
126
|
-
name: "header",
|
|
127
|
-
fn: n(() => [
|
|
128
|
-
a("div", {
|
|
129
|
-
class: "fkp-switcher-search",
|
|
130
|
-
onMousedown: o[2] || (o[2] = d(() => {
|
|
131
|
-
}, ["stop"]))
|
|
132
|
-
}, [
|
|
133
|
-
m(r(N), {
|
|
134
|
-
modelValue: p.value,
|
|
135
|
-
"onUpdate:modelValue": o[0] || (o[0] = (l) => p.value = l),
|
|
136
|
-
placeholder: e.searchPlaceholder,
|
|
137
|
-
"aria-label": e.searchPlaceholder,
|
|
138
|
-
"allow-clear": "",
|
|
139
|
-
onKeydown: [
|
|
140
|
-
o[1] || (o[1] = d(() => {
|
|
141
|
-
}, ["stop"])),
|
|
142
|
-
k(d(B, ["prevent"]), ["esc"]),
|
|
143
|
-
k(d(v, ["prevent"]), ["down"])
|
|
144
|
-
]
|
|
145
|
-
}, {
|
|
146
|
-
suffix: n(() => [
|
|
147
|
-
a("img", {
|
|
148
|
-
src: r(V),
|
|
149
|
-
alt: ""
|
|
150
|
-
}, null, 8, O)
|
|
151
|
-
]),
|
|
152
|
-
_: 1
|
|
153
|
-
}, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"])
|
|
154
|
-
], 32)
|
|
155
|
-
]),
|
|
156
|
-
key: "0"
|
|
157
|
-
} : void 0
|
|
158
|
-
]), 1040, ["popup-visible", "model-value", "options", "fallback-option", "disabled", "loading", "placeholder", "aria-label", "trigger-props"])
|
|
159
|
-
], 544));
|
|
160
|
-
}
|
|
161
|
-
}), Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
162
|
-
__proto__: null,
|
|
163
|
-
FkpSwitcher: z
|
|
164
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
165
|
-
export {
|
|
166
|
-
Q as S,
|
|
167
|
-
z as _
|
|
168
|
-
};
|