@bagelink/vue 1.2.58 → 1.2.63
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/dist/components/AddressSearch.vue.d.ts.map +1 -1
- package/dist/components/Avatar.vue.d.ts.map +1 -1
- package/dist/components/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/ListItem.vue.d.ts +2 -1
- package/dist/components/ListItem.vue.d.ts.map +1 -1
- package/dist/components/calendar/views/CalendarPopover.vue.d.ts +2 -2
- package/dist/components/calendar/views/CalendarPopover.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +274 -76
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +274 -76
- package/dist/style.css +1488 -1491
- package/dist/utils/search.d.ts +44 -0
- package/dist/utils/search.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/Avatar.vue +1 -5
- package/src/components/ListItem.vue +3 -1
- package/src/components/form/inputs/DatePicker.vue +3 -3
- package/src/components/form/inputs/SelectInput.vue +8 -45
- package/src/index.ts +1 -0
- package/src/styles/layout.css +1461 -1489
- package/src/utils/search.ts +398 -0
- package/dist/types/timeago.d.ts +0 -23
- package/dist/types/timeago.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -332,7 +332,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
332
332
|
setup(__props) {
|
|
333
333
|
return (_ctx, _cache) => {
|
|
334
334
|
return openBlock(), createElementBlock("div", {
|
|
335
|
-
class: "avatar flex justify-content-center",
|
|
335
|
+
class: "round overflow-hidden txt-center p-0 avatar flex justify-content-center",
|
|
336
336
|
style: normalizeStyle({ width: `${_ctx.size}px`, height: `${_ctx.size}px` })
|
|
337
337
|
}, [
|
|
338
338
|
_ctx.src ? (openBlock(), createElementBlock("img", {
|
|
@@ -347,7 +347,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
|
-
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-
|
|
350
|
+
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-b73b9e30"]]);
|
|
351
351
|
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
352
352
|
__name: "Badge",
|
|
353
353
|
props: {
|
|
@@ -549,7 +549,7 @@ const _hoisted_1$X = { class: "agenda-view" };
|
|
|
549
549
|
const _hoisted_2$I = ["data-date", "onClick"];
|
|
550
550
|
const _hoisted_3$C = { class: "event-content" };
|
|
551
551
|
const _hoisted_4$q = { class: "event-time" };
|
|
552
|
-
const _hoisted_5$
|
|
552
|
+
const _hoisted_5$p = { class: "event-details" };
|
|
553
553
|
const _hoisted_6$l = { class: "event-title" };
|
|
554
554
|
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
555
555
|
__name: "AgendaView",
|
|
@@ -672,7 +672,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
672
672
|
}, [
|
|
673
673
|
createElementVNode("div", _hoisted_3$C, [
|
|
674
674
|
createElementVNode("div", _hoisted_4$q, toDisplayString(unref(formatDate)(event.start_time, { fmt: "HH:mm" })), 1),
|
|
675
|
-
createElementVNode("div", _hoisted_5$
|
|
675
|
+
createElementVNode("div", _hoisted_5$p, [
|
|
676
676
|
createElementVNode("div", _hoisted_6$l, toDisplayString(event.title), 1),
|
|
677
677
|
createElementVNode("div", {
|
|
678
678
|
class: normalizeClass(["event-day", { today: event.isToday }])
|
|
@@ -691,7 +691,7 @@ const _hoisted_1$W = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
|
|
|
691
691
|
const _hoisted_2$H = { class: "border-bottom me-1 txt-center p-05 dayGrid" };
|
|
692
692
|
const _hoisted_3$B = { class: "overflow h-100p pe-05" };
|
|
693
693
|
const _hoisted_4$p = { class: "time-column" };
|
|
694
|
-
const _hoisted_5$
|
|
694
|
+
const _hoisted_5$o = { class: "events-column" };
|
|
695
695
|
const _hoisted_6$k = ["onClick"];
|
|
696
696
|
const _hoisted_7$g = { class: "event-content" };
|
|
697
697
|
const _hoisted_8$9 = { class: "white-space ellipsis-1" };
|
|
@@ -852,7 +852,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
852
852
|
}, toDisplayString(slot.time), 5);
|
|
853
853
|
}), 128))
|
|
854
854
|
]),
|
|
855
|
-
createElementVNode("div", _hoisted_5$
|
|
855
|
+
createElementVNode("div", _hoisted_5$o, [
|
|
856
856
|
isToday.value ? (openBlock(), createElementBlock("div", {
|
|
857
857
|
key: 0,
|
|
858
858
|
class: "absolute end w-100p z-2 flex pointer-events-none",
|
|
@@ -903,7 +903,7 @@ const _hoisted_1$V = { class: "month-view" };
|
|
|
903
903
|
const _hoisted_2$G = { class: "month-header" };
|
|
904
904
|
const _hoisted_3$A = { class: "month-grid" };
|
|
905
905
|
const _hoisted_4$o = { class: "day-number" };
|
|
906
|
-
const _hoisted_5$
|
|
906
|
+
const _hoisted_5$n = { class: "day-events" };
|
|
907
907
|
const _hoisted_6$j = {
|
|
908
908
|
key: 0,
|
|
909
909
|
class: "event-dot"
|
|
@@ -1005,7 +1005,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1005
1005
|
}])
|
|
1006
1006
|
}, [
|
|
1007
1007
|
createElementVNode("div", _hoisted_4$o, toDisplayString(unref(fmtDate)(day.date, { fmt: "DD" })), 1),
|
|
1008
|
-
createElementVNode("div", _hoisted_5$
|
|
1008
|
+
createElementVNode("div", _hoisted_5$n, [
|
|
1009
1009
|
isMobile.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1010
1010
|
day.events.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6$j)) : createCommentVNode("", true)
|
|
1011
1011
|
], 64)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(day.events, (event) => {
|
|
@@ -1032,7 +1032,7 @@ const _hoisted_1$U = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
|
|
|
1032
1032
|
const _hoisted_2$F = { class: "overflow h-100p pe-05" };
|
|
1033
1033
|
const _hoisted_3$z = ["onMousedown"];
|
|
1034
1034
|
const _hoisted_4$n = ["onClick"];
|
|
1035
|
-
const _hoisted_5$
|
|
1035
|
+
const _hoisted_5$m = { class: "overflow-hidden color-white p-025 txt12 h-100p" };
|
|
1036
1036
|
const _hoisted_6$i = { class: "white-space ellipsis-1" };
|
|
1037
1037
|
const _hoisted_7$e = { class: "txt10 opacity-8 user-select-none" };
|
|
1038
1038
|
const _hoisted_8$7 = { class: "color-primary txt-12 p-025" };
|
|
@@ -1363,7 +1363,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
1363
1363
|
}, ["stop"])),
|
|
1364
1364
|
onClick: withModifiers(($event) => handleEventSelection(event, $event), ["stop"])
|
|
1365
1365
|
}, [
|
|
1366
|
-
createElementVNode("div", _hoisted_5$
|
|
1366
|
+
createElementVNode("div", _hoisted_5$m, [
|
|
1367
1367
|
createElementVNode("div", _hoisted_6$i, toDisplayString(event.title), 1),
|
|
1368
1368
|
createElementVNode("div", _hoisted_7$e, toDisplayString(unref(formatDate)(event.start_time, { fmt: "HH:mm" })) + " - " + toDisplayString(unref(formatDate)(event.end_time, { fmt: "HH:mm" })), 1)
|
|
1369
1369
|
])
|
|
@@ -7915,7 +7915,7 @@ const _hoisted_1$1$1 = {
|
|
|
7915
7915
|
const _hoisted_2$1$1 = ["width", "height", "viewBox"];
|
|
7916
7916
|
const _hoisted_3$w = { class: "layer-rectangles" };
|
|
7917
7917
|
const _hoisted_4$l = ["transform", "onMouseover"];
|
|
7918
|
-
const _hoisted_5$
|
|
7918
|
+
const _hoisted_5$l = ["width", "height"];
|
|
7919
7919
|
const _hoisted_6$h = {
|
|
7920
7920
|
x: 0 + 10,
|
|
7921
7921
|
y: 0 + 20,
|
|
@@ -7952,7 +7952,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7952
7952
|
y: 0,
|
|
7953
7953
|
width: r2.width,
|
|
7954
7954
|
height: r2.height
|
|
7955
|
-
}), null, 16, _hoisted_5$
|
|
7955
|
+
}), null, 16, _hoisted_5$l),
|
|
7956
7956
|
renderSlot(_ctx.$slots, "text", {
|
|
7957
7957
|
r: r2,
|
|
7958
7958
|
selected: _ctx.selected === i2
|
|
@@ -9520,7 +9520,7 @@ const _hoisted_2$A = {
|
|
|
9520
9520
|
};
|
|
9521
9521
|
const _hoisted_3$v = { class: "infinite-wrapper" };
|
|
9522
9522
|
const _hoisted_4$k = { class: "row first-row" };
|
|
9523
|
-
const _hoisted_5$
|
|
9523
|
+
const _hoisted_5$k = { key: 0 };
|
|
9524
9524
|
const _hoisted_6$g = ["onClick"];
|
|
9525
9525
|
const _hoisted_7$c = { class: "flex" };
|
|
9526
9526
|
const _hoisted_8$6 = ["onClick"];
|
|
@@ -9656,7 +9656,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
9656
9656
|
}), [
|
|
9657
9657
|
createElementVNode("table", _hoisted_3$v, [
|
|
9658
9658
|
createElementVNode("thead", _hoisted_4$k, [
|
|
9659
|
-
unref(isSelectable) ? (openBlock(), createElementBlock("th", _hoisted_5$
|
|
9659
|
+
unref(isSelectable) ? (openBlock(), createElementBlock("th", _hoisted_5$k, [
|
|
9660
9660
|
createElementVNode("input", {
|
|
9661
9661
|
ref_key: "allSelectorEl",
|
|
9662
9662
|
ref: allSelectorEl,
|
|
@@ -13618,7 +13618,7 @@ const _hoisted_2$y = {
|
|
|
13618
13618
|
};
|
|
13619
13619
|
const _hoisted_3$u = { class: "bgl-steps-indicator" };
|
|
13620
13620
|
const _hoisted_4$j = ["onClick"];
|
|
13621
|
-
const _hoisted_5$
|
|
13621
|
+
const _hoisted_5$j = {
|
|
13622
13622
|
key: 0,
|
|
13623
13623
|
class: "bgl-step-label"
|
|
13624
13624
|
};
|
|
@@ -13802,7 +13802,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
13802
13802
|
onClick: ($event) => props2.allowStepNavigation && goToStep(index2)
|
|
13803
13803
|
}, [
|
|
13804
13804
|
createElementVNode("span", null, toDisplayString(index2 + 1), 1),
|
|
13805
|
-
props2.stepLabels && props2.stepLabels[index2] ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
13805
|
+
props2.stepLabels && props2.stepLabels[index2] ? (openBlock(), createElementBlock("span", _hoisted_5$j, toDisplayString(props2.stepLabels[index2]), 1)) : createCommentVNode("", true)
|
|
13806
13806
|
], 10, _hoisted_4$j);
|
|
13807
13807
|
}), 128))
|
|
13808
13808
|
])
|
|
@@ -13891,7 +13891,7 @@ const _hoisted_4$i = {
|
|
|
13891
13891
|
key: 1,
|
|
13892
13892
|
class: "py-1"
|
|
13893
13893
|
};
|
|
13894
|
-
const _hoisted_5$
|
|
13894
|
+
const _hoisted_5$i = {
|
|
13895
13895
|
key: 0,
|
|
13896
13896
|
class: "minimizedText txt14 p-025 opacity-7"
|
|
13897
13897
|
};
|
|
@@ -14023,7 +14023,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
14023
14023
|
thin: "",
|
|
14024
14024
|
class: normalizeClass(["mb-05 itemBox transition ps-05 pb-025 pt-025 radius-05 gap-05 overflow-hidden", { minimized: minimizedItems.value[i2] }])
|
|
14025
14025
|
}, [
|
|
14026
|
-
minimizedItems.value[i2] ? (openBlock(), createElementBlock("p", _hoisted_5$
|
|
14026
|
+
minimizedItems.value[i2] ? (openBlock(), createElementBlock("p", _hoisted_5$i, toDisplayString(_ctx.label) + " " + toDisplayString(i2 + 1), 1)) : (openBlock(), createBlock(unref(_sfc_main$T), {
|
|
14027
14027
|
key: 1,
|
|
14028
14028
|
"model-value": isPrimitiveType.value ? { value: item } : item,
|
|
14029
14029
|
schema: resolvedSchemaData.value,
|
|
@@ -14153,7 +14153,7 @@ const _hoisted_3$r = {
|
|
|
14153
14153
|
class: "code-editor-wrap grid rounded p-1 overflow hm-300px ltr txt-start relative h-100p"
|
|
14154
14154
|
};
|
|
14155
14155
|
const _hoisted_4$h = { class: "overflow-hidden absolute inset-0 p-0 m-0 h-100 codeText" };
|
|
14156
|
-
const _hoisted_5$
|
|
14156
|
+
const _hoisted_5$h = ["innerHTML"];
|
|
14157
14157
|
const _hoisted_6$d = ["onKeydown"];
|
|
14158
14158
|
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
14159
14159
|
__name: "Index",
|
|
@@ -14249,7 +14249,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
14249
14249
|
createElementVNode("code", {
|
|
14250
14250
|
class: normalizeClass(["absolute inset-0", className.value]),
|
|
14251
14251
|
innerHTML: highlightedCode.value
|
|
14252
|
-
}, null, 10, _hoisted_5$
|
|
14252
|
+
}, null, 10, _hoisted_5$h),
|
|
14253
14253
|
_cache[3] || (_cache[3] = createTextVNode("\n "))
|
|
14254
14254
|
]),
|
|
14255
14255
|
!_ctx.readonly ? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
@@ -14858,11 +14858,11 @@ class Time {
|
|
|
14858
14858
|
return number2 < 10 ? `0${number2}` : String(number2);
|
|
14859
14859
|
}
|
|
14860
14860
|
}
|
|
14861
|
-
const _hoisted_1$F = { class: "ltr flex gap-075
|
|
14861
|
+
const _hoisted_1$F = { class: "ltr flex gap-075 m_flex-wrap calendar-container justify-content-center h-100p" };
|
|
14862
14862
|
const _hoisted_2$t = { class: "calendar-section m_border-none pe-05 m_p-0" };
|
|
14863
14863
|
const _hoisted_3$p = { class: "flex space-between pb-1" };
|
|
14864
14864
|
const _hoisted_4$g = { class: "flex gap-05" };
|
|
14865
|
-
const _hoisted_5$
|
|
14865
|
+
const _hoisted_5$g = { class: "month-year" };
|
|
14866
14866
|
const _hoisted_6$c = {
|
|
14867
14867
|
key: 0,
|
|
14868
14868
|
class: "calendar-grid grid gap-025"
|
|
@@ -14967,7 +14967,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
14967
14967
|
}));
|
|
14968
14968
|
const years2 = computed(() => {
|
|
14969
14969
|
const startYear = currentMonthValue2.value.year - 10;
|
|
14970
|
-
return Array.from({ length:
|
|
14970
|
+
return Array.from({ length: 18 }, (_2, i2) => ({
|
|
14971
14971
|
value: startYear + i2,
|
|
14972
14972
|
disabled: isYearDisabled(startYear + i2)
|
|
14973
14973
|
}));
|
|
@@ -15138,7 +15138,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
15138
15138
|
icon: "chevron_left",
|
|
15139
15139
|
onClick: unref(previousYear)
|
|
15140
15140
|
}, null, 8, ["onClick"]),
|
|
15141
|
-
createElementVNode("span", _hoisted_5$
|
|
15141
|
+
createElementVNode("span", _hoisted_5$g, toDisplayString(unref(currentMonthValue).formatted.year), 1),
|
|
15142
15142
|
createVNode(unref(Btn), {
|
|
15143
15143
|
flat: "",
|
|
15144
15144
|
thin: "",
|
|
@@ -15221,7 +15221,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
15221
15221
|
};
|
|
15222
15222
|
}
|
|
15223
15223
|
});
|
|
15224
|
-
const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
15224
|
+
const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-8b7bd9b8"]]);
|
|
15225
15225
|
const _hoisted_1$E = ["title"];
|
|
15226
15226
|
const _hoisted_2$s = { key: 0 };
|
|
15227
15227
|
const _hoisted_3$o = {
|
|
@@ -15417,7 +15417,7 @@ const _hoisted_2$r = {
|
|
|
15417
15417
|
};
|
|
15418
15418
|
const _hoisted_3$n = { class: "m-05 flex opacity-7 z-99" };
|
|
15419
15419
|
const _hoisted_4$f = { class: "ellipsis-1 word-break-all h-20 m-0 color-black" };
|
|
15420
|
-
const _hoisted_5$
|
|
15420
|
+
const _hoisted_5$f = { class: "flex gap-025 rounded pe-1 ps-05 py-025 bg-gray-80 -my-1" };
|
|
15421
15421
|
const _hoisted_6$b = { class: "ellipsis-1 word-break-all h-20 m-0 color-black txt16" };
|
|
15422
15422
|
const _hoisted_7$9 = {
|
|
15423
15423
|
key: 1,
|
|
@@ -15681,7 +15681,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
15681
15681
|
])), [
|
|
15682
15682
|
[_directive_lightbox, { src: file.url, download: true }]
|
|
15683
15683
|
]),
|
|
15684
|
-
createElementVNode("div", _hoisted_5$
|
|
15684
|
+
createElementVNode("div", _hoisted_5$f, [
|
|
15685
15685
|
createVNode(unref(_sfc_main$s), {
|
|
15686
15686
|
icon: "draft",
|
|
15687
15687
|
size: 1.5
|
|
@@ -15931,7 +15931,7 @@ const _hoisted_4$e = {
|
|
|
15931
15931
|
key: 1,
|
|
15932
15932
|
class: "opacity-7 light"
|
|
15933
15933
|
};
|
|
15934
|
-
const _hoisted_5$
|
|
15934
|
+
const _hoisted_5$e = {
|
|
15935
15935
|
key: 5,
|
|
15936
15936
|
class: "flex column spinner"
|
|
15937
15937
|
};
|
|
@@ -16107,7 +16107,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
16107
16107
|
tabindex: "-1",
|
|
16108
16108
|
onClick: decrement
|
|
16109
16109
|
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
16110
|
-
_ctx.spinner && (!_ctx.layout || !btnLayouts.includes(_ctx.layout)) ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
16110
|
+
_ctx.spinner && (!_ctx.layout || !btnLayouts.includes(_ctx.layout)) ? (openBlock(), createElementBlock("div", _hoisted_5$e, [
|
|
16111
16111
|
createVNode(unref(Btn), {
|
|
16112
16112
|
icon: "add",
|
|
16113
16113
|
flat: "",
|
|
@@ -20790,7 +20790,7 @@ const _hoisted_4$d = {
|
|
|
20790
20790
|
class: "overflow-y p-0 max-h-300px",
|
|
20791
20791
|
role: "listbox"
|
|
20792
20792
|
};
|
|
20793
|
-
const _hoisted_5$
|
|
20793
|
+
const _hoisted_5$d = ["aria-selected", "onClick"];
|
|
20794
20794
|
const _hoisted_6$a = { class: "tel-country" };
|
|
20795
20795
|
const _hoisted_7$8 = ["id", "required", "placeholder", "disabled", "name"];
|
|
20796
20796
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
@@ -21017,7 +21017,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
21017
21017
|
}, null, 8, ["country"]),
|
|
21018
21018
|
createElementVNode("p", _hoisted_6$a, toDisplayString(pb.name), 1),
|
|
21019
21019
|
createElementVNode("span", null, " +" + toDisplayString(pb.dialCode), 1)
|
|
21020
|
-
], 8, _hoisted_5$
|
|
21020
|
+
], 8, _hoisted_5$d);
|
|
21021
21021
|
}), 128))
|
|
21022
21022
|
])
|
|
21023
21023
|
])
|
|
@@ -21062,7 +21062,7 @@ const _hoisted_1$x = ["for"];
|
|
|
21062
21062
|
const _hoisted_2$m = ["id", "disabled", "name", "value", "required"];
|
|
21063
21063
|
const _hoisted_3$j = { class: "flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025" };
|
|
21064
21064
|
const _hoisted_4$c = ["src", "alt"];
|
|
21065
|
-
const _hoisted_5$
|
|
21065
|
+
const _hoisted_5$c = { class: "" };
|
|
21066
21066
|
const _hoisted_6$9 = {
|
|
21067
21067
|
key: 0,
|
|
21068
21068
|
class: "m-0 m_txt-14"
|
|
@@ -21140,7 +21140,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
21140
21140
|
src: opt.imgSrc,
|
|
21141
21141
|
alt: opt.imgAlt
|
|
21142
21142
|
}, null, 8, _hoisted_4$c)) : createCommentVNode("", true),
|
|
21143
|
-
createElementVNode("div", _hoisted_5$
|
|
21143
|
+
createElementVNode("div", _hoisted_5$c, [
|
|
21144
21144
|
opt.label ? (openBlock(), createElementBlock("p", _hoisted_6$9, toDisplayString(opt.label), 1)) : createCommentVNode("", true),
|
|
21145
21145
|
opt.subLabel ? (openBlock(), createElementBlock("p", _hoisted_7$7, toDisplayString(opt.subLabel), 1)) : createCommentVNode("", true)
|
|
21146
21146
|
]),
|
|
@@ -21165,7 +21165,7 @@ const _hoisted_1$w = { class: "bagel-input" };
|
|
|
21165
21165
|
const _hoisted_2$l = { class: "pb-025" };
|
|
21166
21166
|
const _hoisted_3$i = { class: "flex gap-05 flex-wrap" };
|
|
21167
21167
|
const _hoisted_4$b = ["id", "name", "value", "checked"];
|
|
21168
|
-
const _hoisted_5$
|
|
21168
|
+
const _hoisted_5$b = ["for"];
|
|
21169
21169
|
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
21170
21170
|
__name: "RadioPillsInput",
|
|
21171
21171
|
props: {
|
|
@@ -21227,7 +21227,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
21227
21227
|
}, null, 40, _hoisted_4$b),
|
|
21228
21228
|
createElementVNode("label", {
|
|
21229
21229
|
for: `${_ctx.id}-${getValue(option2)}`
|
|
21230
|
-
}, toDisplayString(getLabel(option2)), 9, _hoisted_5$
|
|
21230
|
+
}, toDisplayString(getLabel(option2)), 9, _hoisted_5$b)
|
|
21231
21231
|
]);
|
|
21232
21232
|
}), 128))
|
|
21233
21233
|
])
|
|
@@ -21243,7 +21243,7 @@ const _hoisted_2$k = {
|
|
|
21243
21243
|
};
|
|
21244
21244
|
const _hoisted_3$h = { class: "range-slider relative w-100" };
|
|
21245
21245
|
const _hoisted_4$a = ["id", "value", "min", "max", "step", "required", "disabled", "aria-label"];
|
|
21246
|
-
const _hoisted_5$
|
|
21246
|
+
const _hoisted_5$a = ["value", "min", "max", "step", "required", "disabled"];
|
|
21247
21247
|
const _hoisted_6$8 = { class: "track absolute pointer-events-none overflow-hidden round" };
|
|
21248
21248
|
const _hoisted_7$6 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
|
|
21249
21249
|
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
@@ -21337,7 +21337,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
21337
21337
|
disabled: _ctx.disabled,
|
|
21338
21338
|
"aria-label": "Maximum value",
|
|
21339
21339
|
onInput: _cache[1] || (_cache[1] = (e) => handleInput(+e.target.value, false))
|
|
21340
|
-
}, null, 40, _hoisted_5$
|
|
21340
|
+
}, null, 40, _hoisted_5$a)) : createCommentVNode("", true),
|
|
21341
21341
|
createElementVNode("div", _hoisted_6$8, [
|
|
21342
21342
|
createElementVNode("div", {
|
|
21343
21343
|
class: "active-range absolute h-100 pointer-events-none bg-primary",
|
|
@@ -23373,7 +23373,7 @@ const _hoisted_4$9 = {
|
|
|
23373
23373
|
key: 2,
|
|
23374
23374
|
class: "ms-auto ps-05 me-05"
|
|
23375
23375
|
};
|
|
23376
|
-
const _hoisted_5$
|
|
23376
|
+
const _hoisted_5$9 = ["value"];
|
|
23377
23377
|
const _hoisted_6$7 = ["aria-selected", "onClick", "onKeydown"];
|
|
23378
23378
|
const _hoisted_7$5 = { class: "block" };
|
|
23379
23379
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
@@ -23403,7 +23403,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
23403
23403
|
const searchInput = ref();
|
|
23404
23404
|
let selectedItems = ref([]);
|
|
23405
23405
|
const selectedItemCount = computed(() => selectedItems.value.length ?? 0);
|
|
23406
|
-
const
|
|
23406
|
+
const searchTerm = ref("");
|
|
23407
23407
|
const dropdown = ref();
|
|
23408
23408
|
let selected = ref(false);
|
|
23409
23409
|
let open = ref(false);
|
|
@@ -23416,26 +23416,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
23416
23416
|
return selectedItems.value.map((item) => getLabel(item)).join(", ");
|
|
23417
23417
|
});
|
|
23418
23418
|
const searchPlaceholder = computed(() => props2.searchPlaceholder ?? selectedLabel.value ?? "Search");
|
|
23419
|
-
|
|
23420
|
-
let isSearching = ref(false);
|
|
23421
|
-
async function runServerSearch() {
|
|
23422
|
-
if (props2.onSearch !== void 0) {
|
|
23423
|
-
isSearching.value = true;
|
|
23424
|
-
serverOptions.value = await props2.onSearch(search.value);
|
|
23425
|
-
isSearching.value = false;
|
|
23426
|
-
}
|
|
23427
|
-
}
|
|
23428
|
-
const filteredOptions = computed(() => {
|
|
23429
|
-
if (props2.onSearch !== void 0) {
|
|
23430
|
-
if (isSearching.value) return [];
|
|
23431
|
-
if (search.value.trim().length) return serverOptions.value;
|
|
23432
|
-
return props2.options;
|
|
23433
|
-
}
|
|
23434
|
-
return props2.options.filter((option2) => {
|
|
23435
|
-
const searchTerm = search.value.split(/\s+/).filter(Boolean).map((t) => new RegExp(t.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gi"));
|
|
23436
|
-
return Boolean(option2) && searchTerm.every((s2) => getLabel(option2).match(s2));
|
|
23437
|
-
});
|
|
23438
|
-
});
|
|
23419
|
+
const { results, isLoading } = useSearch({ searchTerm: () => searchTerm.value, serverSearch: props2.onSearch, items: props2.options });
|
|
23439
23420
|
let highlightedIndex = ref(-1);
|
|
23440
23421
|
const selectOptions = ref();
|
|
23441
23422
|
function navigate(direction) {
|
|
@@ -23447,9 +23428,9 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
23447
23428
|
return;
|
|
23448
23429
|
}
|
|
23449
23430
|
if (direction === "up") {
|
|
23450
|
-
highlightedIndex.value = highlightedIndex.value > 0 ? highlightedIndex.value - 1 :
|
|
23431
|
+
highlightedIndex.value = highlightedIndex.value > 0 ? highlightedIndex.value - 1 : results.value.length - 1;
|
|
23451
23432
|
} else if (direction === "down") {
|
|
23452
|
-
highlightedIndex.value = highlightedIndex.value <
|
|
23433
|
+
highlightedIndex.value = highlightedIndex.value < results.value.length - 1 ? highlightedIndex.value + 1 : 0;
|
|
23453
23434
|
}
|
|
23454
23435
|
setTimeout(() => {
|
|
23455
23436
|
var _a;
|
|
@@ -23574,12 +23555,11 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
23574
23555
|
key: 0,
|
|
23575
23556
|
ref_key: "searchInput",
|
|
23576
23557
|
ref: searchInput,
|
|
23577
|
-
modelValue:
|
|
23578
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
23558
|
+
modelValue: searchTerm.value,
|
|
23559
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchTerm.value = $event),
|
|
23579
23560
|
class: "mb-0",
|
|
23580
23561
|
placeholder: searchPlaceholder.value,
|
|
23581
23562
|
icon: "search",
|
|
23582
|
-
onDebounce: runServerSearch,
|
|
23583
23563
|
onInput: _cache[1] || (_cache[1] = ($event) => isRef(selected) ? selected.value = false : selected = false),
|
|
23584
23564
|
onClick: focusInput,
|
|
23585
23565
|
onKeydown: [
|
|
@@ -23624,12 +23604,12 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
23624
23604
|
style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
|
|
23625
23605
|
value: unref(selectedItems),
|
|
23626
23606
|
required: ""
|
|
23627
|
-
}, null, 8, _hoisted_5$
|
|
23607
|
+
}, null, 8, _hoisted_5$9)) : createCommentVNode("", true)
|
|
23628
23608
|
])
|
|
23629
23609
|
])
|
|
23630
23610
|
]),
|
|
23631
23611
|
default: withCtx(() => [
|
|
23632
|
-
unref(
|
|
23612
|
+
unref(isLoading) ? (openBlock(), createBlock(unref(Skeleton), {
|
|
23633
23613
|
key: 0,
|
|
23634
23614
|
count: 6,
|
|
23635
23615
|
width: "200px",
|
|
@@ -23648,7 +23628,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
23648
23628
|
ref: selectOptions,
|
|
23649
23629
|
class: normalizeClass(["selectinput-options", { multiselect: _ctx.multiselect }])
|
|
23650
23630
|
}, [
|
|
23651
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
23631
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(results), (option2, i2) => {
|
|
23652
23632
|
return openBlock(), createElementBlock("div", {
|
|
23653
23633
|
key: `${option2}${i2}`,
|
|
23654
23634
|
class: normalizeClass(["selectinput-option hover gap-1 align-items-center", { selected: isSelected(option2) }]),
|
|
@@ -23689,7 +23669,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
23689
23669
|
};
|
|
23690
23670
|
}
|
|
23691
23671
|
});
|
|
23692
|
-
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
23672
|
+
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-504416a9"]]);
|
|
23693
23673
|
/*!
|
|
23694
23674
|
* Signature Pad v5.0.7 | https://github.com/szimek/signature_pad
|
|
23695
23675
|
* (c) 2025 Szymon Nowak | Released under the MIT license
|
|
@@ -26979,7 +26959,7 @@ const _hoisted_1$p = ["title"];
|
|
|
26979
26959
|
const _hoisted_2$f = { class: "bagel-input" };
|
|
26980
26960
|
const _hoisted_3$d = { class: "table-side-scroll" };
|
|
26981
26961
|
const _hoisted_4$8 = { class: "table-header" };
|
|
26982
|
-
const _hoisted_5$
|
|
26962
|
+
const _hoisted_5$8 = { class: "table-reorder" };
|
|
26983
26963
|
const _hoisted_6$6 = { class: "table-action" };
|
|
26984
26964
|
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
26985
26965
|
__name: "TableField",
|
|
@@ -27077,7 +27057,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
27077
27057
|
key: row.id,
|
|
27078
27058
|
class: "flex table-row"
|
|
27079
27059
|
}, [
|
|
27080
|
-
createElementVNode("div", _hoisted_5$
|
|
27060
|
+
createElementVNode("div", _hoisted_5$8, [
|
|
27081
27061
|
createVNode(unref(_sfc_main$s), { icon: "more_vert" })
|
|
27082
27062
|
]),
|
|
27083
27063
|
(openBlock(true), createElementBlock(Fragment, null, renderList((_a2 = unref(entityMeta)) == null ? void 0 : _a2.fields, (field) => {
|
|
@@ -27130,7 +27110,7 @@ const _hoisted_1$o = ["title"];
|
|
|
27130
27110
|
const _hoisted_2$e = ["for"];
|
|
27131
27111
|
const _hoisted_3$c = ["id", "name", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
|
|
27132
27112
|
const _hoisted_4$7 = ["id", "name", "title", "type", "rows", "placeholder", "disabled", "required", "pattern"];
|
|
27133
|
-
const _hoisted_5$
|
|
27113
|
+
const _hoisted_5$7 = {
|
|
27134
27114
|
key: 2,
|
|
27135
27115
|
class: "opacity-7 light"
|
|
27136
27116
|
};
|
|
@@ -27275,7 +27255,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
27275
27255
|
}), null, 16, _hoisted_4$7)), [
|
|
27276
27256
|
[vModelText, unref(inputVal)]
|
|
27277
27257
|
]),
|
|
27278
|
-
_ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_5$
|
|
27258
|
+
_ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_5$7, toDisplayString(_ctx.helptext), 1)) : createCommentVNode("", true),
|
|
27279
27259
|
_ctx.iconStart ? (openBlock(), createBlock(unref(_sfc_main$s), {
|
|
27280
27260
|
key: 3,
|
|
27281
27261
|
class: "iconStart",
|
|
@@ -27381,7 +27361,7 @@ const _hoisted_3$a = {
|
|
|
27381
27361
|
class: "pixel"
|
|
27382
27362
|
};
|
|
27383
27363
|
const _hoisted_4$6 = { class: "m-05 flex opacity-7 z-99" };
|
|
27384
|
-
const _hoisted_5$
|
|
27364
|
+
const _hoisted_5$6 = { class: "flex gap-025 rounded pe-1 ps-05 py-025 bg-gray-80 -my-1" };
|
|
27385
27365
|
const _hoisted_6$5 = { class: "ellipsis-1 word-break-all h-20 m-0 color-black txt16" };
|
|
27386
27366
|
const _hoisted_7$4 = {
|
|
27387
27367
|
key: 1,
|
|
@@ -27569,7 +27549,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
27569
27549
|
href: unref(pathKeyToURL)(path_key),
|
|
27570
27550
|
download: path_key.split("/").pop()
|
|
27571
27551
|
}, null, 8, ["href", "download"]),
|
|
27572
|
-
createElementVNode("div", _hoisted_5$
|
|
27552
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
27573
27553
|
createVNode(unref(_sfc_main$s), {
|
|
27574
27554
|
icon: "draft",
|
|
27575
27555
|
size: 1.5
|
|
@@ -32834,6 +32814,7 @@ const _hoisted_4$5 = {
|
|
|
32834
32814
|
key: 1,
|
|
32835
32815
|
class: "txt12 m-0 p-0 opacity-7 ellipsis-1"
|
|
32836
32816
|
};
|
|
32817
|
+
const _hoisted_5$5 = ["textContent"];
|
|
32837
32818
|
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
32838
32819
|
__name: "ListItem",
|
|
32839
32820
|
props: {
|
|
@@ -32847,6 +32828,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
32847
32828
|
flat: { type: Boolean },
|
|
32848
32829
|
disabled: { type: Boolean },
|
|
32849
32830
|
lead: {},
|
|
32831
|
+
end: {},
|
|
32850
32832
|
iconEnd: {},
|
|
32851
32833
|
target: {},
|
|
32852
32834
|
thin: { type: Boolean },
|
|
@@ -32916,12 +32898,17 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
32916
32898
|
])) : createCommentVNode("", true)
|
|
32917
32899
|
]),
|
|
32918
32900
|
_cache[0] || (_cache[0] = createElementVNode("div", { class: "flex-grow-1" }, null, -1)),
|
|
32919
|
-
renderSlot(_ctx.$slots, "
|
|
32901
|
+
renderSlot(_ctx.$slots, "end", {}, () => [
|
|
32920
32902
|
_ctx.iconEnd ? (openBlock(), createBlock(unref(_sfc_main$s), {
|
|
32921
32903
|
key: 0,
|
|
32922
32904
|
icon: _ctx.iconEnd,
|
|
32923
32905
|
class: "transition-400"
|
|
32924
|
-
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
32906
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
32907
|
+
_ctx.end ? (openBlock(), createElementBlock("p", {
|
|
32908
|
+
key: 1,
|
|
32909
|
+
class: "txt12 m-0 p-0 opacity-7 ellipsis-1",
|
|
32910
|
+
textContent: toDisplayString(_ctx.end)
|
|
32911
|
+
}, null, 8, _hoisted_5$5)) : createCommentVNode("", true)
|
|
32925
32912
|
])
|
|
32926
32913
|
]),
|
|
32927
32914
|
_: 3
|
|
@@ -36629,6 +36616,213 @@ const IMAGE_FORMATS = ["jpeg", "png", "webp", "avif", "apng", "gif", "avifs", "s
|
|
|
36629
36616
|
const IMAGE_FORMATS_REGEXP = new RegExp(`(${IMAGE_FORMATS.join("|")})$`, "i");
|
|
36630
36617
|
const VIDEO_FORMATS = ["mp4", "webm", "ogg", "mov", "avi", "flv", "wmv", "mkv", "ts", "m3u8"];
|
|
36631
36618
|
const VIDEO_FORMATS_REGEXP = new RegExp(`(${VIDEO_FORMATS.join("|")})$`, "i");
|
|
36619
|
+
function clearHtml(value) {
|
|
36620
|
+
if (!value) return "";
|
|
36621
|
+
return value.replace(/<[^>]*>?/g, "").replace(/ /g, " ").replace(/"/g, '"').replace(/'/g, `'`).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
36622
|
+
}
|
|
36623
|
+
function normalizeText(text) {
|
|
36624
|
+
var _a;
|
|
36625
|
+
const searchChars = /[\p{N}\p{L}\s]/gu;
|
|
36626
|
+
return ((_a = text.match(searchChars)) == null ? void 0 : _a.join("").toLowerCase()) ?? "";
|
|
36627
|
+
}
|
|
36628
|
+
function getValueByPath(obj, path) {
|
|
36629
|
+
const keys4 = path.split(".");
|
|
36630
|
+
let result2 = obj;
|
|
36631
|
+
for (const key of keys4) {
|
|
36632
|
+
if (result2 === null || result2 === void 0 || typeof result2 !== "object") {
|
|
36633
|
+
return void 0;
|
|
36634
|
+
}
|
|
36635
|
+
result2 = result2[key];
|
|
36636
|
+
}
|
|
36637
|
+
return result2;
|
|
36638
|
+
}
|
|
36639
|
+
function calculateRelevance(stringValue, searchTerms) {
|
|
36640
|
+
let score = 0;
|
|
36641
|
+
if (stringValue.length === 0) return 0;
|
|
36642
|
+
let totalMatchedChars = 0;
|
|
36643
|
+
for (const term of searchTerms) {
|
|
36644
|
+
if (stringValue.includes(term)) {
|
|
36645
|
+
const regex2 = new RegExp(term, "g");
|
|
36646
|
+
const matches2 = stringValue.match(regex2);
|
|
36647
|
+
if (matches2) {
|
|
36648
|
+
totalMatchedChars += matches2.length * term.length;
|
|
36649
|
+
}
|
|
36650
|
+
score += 1;
|
|
36651
|
+
const words = stringValue.split(/\s+/);
|
|
36652
|
+
if (words.includes(term)) {
|
|
36653
|
+
score += 0.5;
|
|
36654
|
+
}
|
|
36655
|
+
if (stringValue.startsWith(term)) {
|
|
36656
|
+
score += 0.5;
|
|
36657
|
+
}
|
|
36658
|
+
}
|
|
36659
|
+
}
|
|
36660
|
+
const matchDensity = Math.min(1, totalMatchedChars / stringValue.length);
|
|
36661
|
+
score *= 1 + matchDensity * 2;
|
|
36662
|
+
return score;
|
|
36663
|
+
}
|
|
36664
|
+
function isPrimitive(value) {
|
|
36665
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
36666
|
+
}
|
|
36667
|
+
function toSearchableString(value) {
|
|
36668
|
+
if (value === null || value === void 0) return "";
|
|
36669
|
+
if (typeof value === "string") return clearHtml(value);
|
|
36670
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
36671
|
+
if (typeof value === "object" && value instanceof Date) return value.toISOString();
|
|
36672
|
+
return "";
|
|
36673
|
+
}
|
|
36674
|
+
function searchItems(params) {
|
|
36675
|
+
const { searchTerm, items = [], keysToSearch, fieldWeights = {}, minChars = 2 } = params;
|
|
36676
|
+
const searchValue = toValue(searchTerm);
|
|
36677
|
+
const itemsArray = Array.isArray(items) ? items : toValue(items) || [];
|
|
36678
|
+
if (!searchValue || searchValue.length < minChars) return itemsArray;
|
|
36679
|
+
const searchTerms = normalizeText(searchValue).split(/\s+/).filter((term) => term.length > 1);
|
|
36680
|
+
if (searchTerms.length === 0) return itemsArray;
|
|
36681
|
+
const defaultWeights = {
|
|
36682
|
+
// Give higher weight to name/title fields
|
|
36683
|
+
name: 2,
|
|
36684
|
+
first_name: 2,
|
|
36685
|
+
last_name: 2,
|
|
36686
|
+
title: 2,
|
|
36687
|
+
headline: 2,
|
|
36688
|
+
// Lower weight for longer text fields
|
|
36689
|
+
description: 0.7,
|
|
36690
|
+
subtitle: 0.7,
|
|
36691
|
+
bio: 0.7,
|
|
36692
|
+
content: 0.7,
|
|
36693
|
+
body: 0.7,
|
|
36694
|
+
email: 0.7,
|
|
36695
|
+
phone: 0.7,
|
|
36696
|
+
// Even lower for metadata
|
|
36697
|
+
id: 0.3,
|
|
36698
|
+
created_at: 0.3,
|
|
36699
|
+
updated_at: 0.3
|
|
36700
|
+
};
|
|
36701
|
+
function getFieldWeight(path) {
|
|
36702
|
+
if (path in fieldWeights) {
|
|
36703
|
+
const customWeight = fieldWeights[path];
|
|
36704
|
+
if (typeof customWeight === "number") {
|
|
36705
|
+
return customWeight;
|
|
36706
|
+
}
|
|
36707
|
+
}
|
|
36708
|
+
const leafKey = path.split(".").pop() || "";
|
|
36709
|
+
if (leafKey in defaultWeights) {
|
|
36710
|
+
return defaultWeights[leafKey];
|
|
36711
|
+
}
|
|
36712
|
+
return 1;
|
|
36713
|
+
}
|
|
36714
|
+
function collectAllKeys(obj, prefix = "") {
|
|
36715
|
+
if (!obj || typeof obj !== "object") return [];
|
|
36716
|
+
return Object.keys(obj).flatMap((key) => {
|
|
36717
|
+
const value = obj[key];
|
|
36718
|
+
const newPrefix = prefix ? `${prefix}.${key}` : key;
|
|
36719
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
36720
|
+
return [newPrefix, ...collectAllKeys(value, newPrefix)];
|
|
36721
|
+
}
|
|
36722
|
+
return [newPrefix];
|
|
36723
|
+
});
|
|
36724
|
+
}
|
|
36725
|
+
function calculateItemRelevance(item) {
|
|
36726
|
+
let totalRelevance = 0;
|
|
36727
|
+
if (isPrimitive(item)) {
|
|
36728
|
+
const normalizedValue = normalizeText(String(item));
|
|
36729
|
+
return calculateRelevance(normalizedValue, searchTerms);
|
|
36730
|
+
}
|
|
36731
|
+
if (Array.isArray(item)) {
|
|
36732
|
+
for (const element of item) {
|
|
36733
|
+
if (isPrimitive(element)) {
|
|
36734
|
+
const normalizedValue = normalizeText(String(element));
|
|
36735
|
+
totalRelevance += calculateRelevance(normalizedValue, searchTerms);
|
|
36736
|
+
}
|
|
36737
|
+
}
|
|
36738
|
+
return totalRelevance;
|
|
36739
|
+
}
|
|
36740
|
+
const keysToProcess = keysToSearch || collectAllKeys(item);
|
|
36741
|
+
for (const keyPath of keysToProcess) {
|
|
36742
|
+
const value = getValueByPath(item, String(keyPath));
|
|
36743
|
+
if (value === null || value === void 0) continue;
|
|
36744
|
+
if (Array.isArray(value)) {
|
|
36745
|
+
for (const element of value) {
|
|
36746
|
+
if (isPrimitive(element)) {
|
|
36747
|
+
const cleanValue = clearHtml(String(element));
|
|
36748
|
+
const normalizedValue2 = normalizeText(cleanValue);
|
|
36749
|
+
const relevance = calculateRelevance(normalizedValue2, searchTerms);
|
|
36750
|
+
const fieldWeight2 = getFieldWeight(String(keyPath));
|
|
36751
|
+
totalRelevance += relevance * fieldWeight2;
|
|
36752
|
+
}
|
|
36753
|
+
}
|
|
36754
|
+
continue;
|
|
36755
|
+
}
|
|
36756
|
+
if (typeof value === "object" && !isPrimitive(value)) {
|
|
36757
|
+
continue;
|
|
36758
|
+
}
|
|
36759
|
+
const stringValue = toSearchableString(value);
|
|
36760
|
+
const normalizedValue = normalizeText(stringValue);
|
|
36761
|
+
const baseRelevance = calculateRelevance(normalizedValue, searchTerms);
|
|
36762
|
+
const fieldWeight = getFieldWeight(String(keyPath));
|
|
36763
|
+
totalRelevance += baseRelevance * fieldWeight;
|
|
36764
|
+
}
|
|
36765
|
+
return totalRelevance;
|
|
36766
|
+
}
|
|
36767
|
+
const scoredItems = itemsArray.map((item) => {
|
|
36768
|
+
const relevance = calculateItemRelevance(item);
|
|
36769
|
+
return [item, relevance];
|
|
36770
|
+
});
|
|
36771
|
+
return scoredItems.filter(([, score]) => score > 0).sort(([, scoreA], [, scoreB]) => scoreB - scoreA).map(([item]) => item);
|
|
36772
|
+
}
|
|
36773
|
+
function useSearch(params) {
|
|
36774
|
+
const { searchTerm, minChars = 2, serverSearch, debounceMs = 300 } = params;
|
|
36775
|
+
const isLoading = ref(false);
|
|
36776
|
+
const serverResults = ref([]);
|
|
36777
|
+
let debounceTimeout = null;
|
|
36778
|
+
if (serverSearch) {
|
|
36779
|
+
watch(
|
|
36780
|
+
() => toValue(searchTerm),
|
|
36781
|
+
async (newTerm) => {
|
|
36782
|
+
if (debounceTimeout !== null) {
|
|
36783
|
+
clearTimeout(debounceTimeout);
|
|
36784
|
+
}
|
|
36785
|
+
if (!newTerm || typeof newTerm !== "string" || newTerm.length < minChars) {
|
|
36786
|
+
serverResults.value = [];
|
|
36787
|
+
return;
|
|
36788
|
+
}
|
|
36789
|
+
debounceTimeout = window.setTimeout(async () => {
|
|
36790
|
+
try {
|
|
36791
|
+
isLoading.value = true;
|
|
36792
|
+
serverResults.value = await serverSearch(newTerm);
|
|
36793
|
+
} catch (error) {
|
|
36794
|
+
console.error("Server search error:", error);
|
|
36795
|
+
serverResults.value = [];
|
|
36796
|
+
} finally {
|
|
36797
|
+
isLoading.value = false;
|
|
36798
|
+
}
|
|
36799
|
+
}, debounceMs);
|
|
36800
|
+
}
|
|
36801
|
+
);
|
|
36802
|
+
}
|
|
36803
|
+
const getSearchTermValue = () => toValue(searchTerm);
|
|
36804
|
+
const getFilteredResults = () => {
|
|
36805
|
+
const term = getSearchTermValue();
|
|
36806
|
+
if (serverSearch && term && typeof term === "string" && term.length >= minChars) {
|
|
36807
|
+
return serverResults.value;
|
|
36808
|
+
}
|
|
36809
|
+
return searchItems(params);
|
|
36810
|
+
};
|
|
36811
|
+
const results = computed(() => getFilteredResults());
|
|
36812
|
+
const resultCount = computed(() => results.value.length);
|
|
36813
|
+
const hasResults = computed(() => resultCount.value > 0);
|
|
36814
|
+
const isSearching = computed(() => {
|
|
36815
|
+
const term = getSearchTermValue();
|
|
36816
|
+
return !!term && typeof term === "string" && term.length >= minChars;
|
|
36817
|
+
});
|
|
36818
|
+
return {
|
|
36819
|
+
results,
|
|
36820
|
+
resultCount,
|
|
36821
|
+
hasResults,
|
|
36822
|
+
isSearching,
|
|
36823
|
+
isLoading: computed(() => isLoading.value)
|
|
36824
|
+
};
|
|
36825
|
+
}
|
|
36632
36826
|
export {
|
|
36633
36827
|
_sfc_main$1e as Accordion,
|
|
36634
36828
|
AccordionItem,
|
|
@@ -36716,6 +36910,7 @@ export {
|
|
|
36716
36910
|
bagelInjectionKey,
|
|
36717
36911
|
bindAttrs,
|
|
36718
36912
|
classify,
|
|
36913
|
+
clearHtml,
|
|
36719
36914
|
copyText,
|
|
36720
36915
|
debounce,
|
|
36721
36916
|
denullify,
|
|
@@ -36733,9 +36928,11 @@ export {
|
|
|
36733
36928
|
keyToLabel,
|
|
36734
36929
|
localRef,
|
|
36735
36930
|
normalizeDimension,
|
|
36931
|
+
normalizeText,
|
|
36736
36932
|
normalizeURL,
|
|
36737
36933
|
pathKeyToURL,
|
|
36738
36934
|
provideBagelFormState,
|
|
36935
|
+
searchItems,
|
|
36739
36936
|
sleep,
|
|
36740
36937
|
slugify,
|
|
36741
36938
|
timeAgo,
|
|
@@ -36753,6 +36950,7 @@ export {
|
|
|
36753
36950
|
useLocalStorage,
|
|
36754
36951
|
useModal,
|
|
36755
36952
|
usePolling,
|
|
36953
|
+
useSearch,
|
|
36756
36954
|
useValidateFieldValue,
|
|
36757
36955
|
vDraggable
|
|
36758
36956
|
};
|