@bagelink/vue 1.2.58 → 1.2.61
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 +277 -76
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +277 -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 +10 -39
- package/src/index.ts +1 -0
- package/src/styles/layout.css +1461 -1489
- package/src/utils/search.ts +409 -0
- package/dist/types/timeago.d.ts +0 -23
- package/dist/types/timeago.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -334,7 +334,7 @@ const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
|
|
|
334
334
|
setup(__props) {
|
|
335
335
|
return (_ctx, _cache) => {
|
|
336
336
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
337
|
-
class: "avatar flex justify-content-center",
|
|
337
|
+
class: "round overflow-hidden txt-center p-0 avatar flex justify-content-center",
|
|
338
338
|
style: vue.normalizeStyle({ width: `${_ctx.size}px`, height: `${_ctx.size}px` })
|
|
339
339
|
}, [
|
|
340
340
|
_ctx.src ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
@@ -349,7 +349,7 @@ const _sfc_main$19 = /* @__PURE__ */ vue.defineComponent({
|
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
});
|
|
352
|
-
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-
|
|
352
|
+
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-b73b9e30"]]);
|
|
353
353
|
const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
|
|
354
354
|
__name: "Badge",
|
|
355
355
|
props: {
|
|
@@ -551,7 +551,7 @@ const _hoisted_1$X = { class: "agenda-view" };
|
|
|
551
551
|
const _hoisted_2$I = ["data-date", "onClick"];
|
|
552
552
|
const _hoisted_3$C = { class: "event-content" };
|
|
553
553
|
const _hoisted_4$q = { class: "event-time" };
|
|
554
|
-
const _hoisted_5$
|
|
554
|
+
const _hoisted_5$p = { class: "event-details" };
|
|
555
555
|
const _hoisted_6$l = { class: "event-title" };
|
|
556
556
|
const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
|
|
557
557
|
__name: "AgendaView",
|
|
@@ -674,7 +674,7 @@ const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
|
|
|
674
674
|
}, [
|
|
675
675
|
vue.createElementVNode("div", _hoisted_3$C, [
|
|
676
676
|
vue.createElementVNode("div", _hoisted_4$q, vue.toDisplayString(vue.unref(formatDate)(event.start_time, { fmt: "HH:mm" })), 1),
|
|
677
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
677
|
+
vue.createElementVNode("div", _hoisted_5$p, [
|
|
678
678
|
vue.createElementVNode("div", _hoisted_6$l, vue.toDisplayString(event.title), 1),
|
|
679
679
|
vue.createElementVNode("div", {
|
|
680
680
|
class: vue.normalizeClass(["event-day", { today: event.isToday }])
|
|
@@ -693,7 +693,7 @@ const _hoisted_1$W = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
|
|
|
693
693
|
const _hoisted_2$H = { class: "border-bottom me-1 txt-center p-05 dayGrid" };
|
|
694
694
|
const _hoisted_3$B = { class: "overflow h-100p pe-05" };
|
|
695
695
|
const _hoisted_4$p = { class: "time-column" };
|
|
696
|
-
const _hoisted_5$
|
|
696
|
+
const _hoisted_5$o = { class: "events-column" };
|
|
697
697
|
const _hoisted_6$k = ["onClick"];
|
|
698
698
|
const _hoisted_7$g = { class: "event-content" };
|
|
699
699
|
const _hoisted_8$9 = { class: "white-space ellipsis-1" };
|
|
@@ -854,7 +854,7 @@ const _sfc_main$14 = /* @__PURE__ */ vue.defineComponent({
|
|
|
854
854
|
}, vue.toDisplayString(slot.time), 5);
|
|
855
855
|
}), 128))
|
|
856
856
|
]),
|
|
857
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
857
|
+
vue.createElementVNode("div", _hoisted_5$o, [
|
|
858
858
|
isToday.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
859
859
|
key: 0,
|
|
860
860
|
class: "absolute end w-100p z-2 flex pointer-events-none",
|
|
@@ -905,7 +905,7 @@ const _hoisted_1$V = { class: "month-view" };
|
|
|
905
905
|
const _hoisted_2$G = { class: "month-header" };
|
|
906
906
|
const _hoisted_3$A = { class: "month-grid" };
|
|
907
907
|
const _hoisted_4$o = { class: "day-number" };
|
|
908
|
-
const _hoisted_5$
|
|
908
|
+
const _hoisted_5$n = { class: "day-events" };
|
|
909
909
|
const _hoisted_6$j = {
|
|
910
910
|
key: 0,
|
|
911
911
|
class: "event-dot"
|
|
@@ -1007,7 +1007,7 @@ const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1007
1007
|
}])
|
|
1008
1008
|
}, [
|
|
1009
1009
|
vue.createElementVNode("div", _hoisted_4$o, vue.toDisplayString(vue.unref(fmtDate)(day.date, { fmt: "DD" })), 1),
|
|
1010
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
1010
|
+
vue.createElementVNode("div", _hoisted_5$n, [
|
|
1011
1011
|
isMobile.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
1012
1012
|
day.events.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$j)) : vue.createCommentVNode("", true)
|
|
1013
1013
|
], 64)) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(day.events, (event) => {
|
|
@@ -1034,7 +1034,7 @@ const _hoisted_1$U = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
|
|
|
1034
1034
|
const _hoisted_2$F = { class: "overflow h-100p pe-05" };
|
|
1035
1035
|
const _hoisted_3$z = ["onMousedown"];
|
|
1036
1036
|
const _hoisted_4$n = ["onClick"];
|
|
1037
|
-
const _hoisted_5$
|
|
1037
|
+
const _hoisted_5$m = { class: "overflow-hidden color-white p-025 txt12 h-100p" };
|
|
1038
1038
|
const _hoisted_6$i = { class: "white-space ellipsis-1" };
|
|
1039
1039
|
const _hoisted_7$e = { class: "txt10 opacity-8 user-select-none" };
|
|
1040
1040
|
const _hoisted_8$7 = { class: "color-primary txt-12 p-025" };
|
|
@@ -1365,7 +1365,7 @@ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1365
1365
|
}, ["stop"])),
|
|
1366
1366
|
onClick: vue.withModifiers(($event) => handleEventSelection(event, $event), ["stop"])
|
|
1367
1367
|
}, [
|
|
1368
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
1368
|
+
vue.createElementVNode("div", _hoisted_5$m, [
|
|
1369
1369
|
vue.createElementVNode("div", _hoisted_6$i, vue.toDisplayString(event.title), 1),
|
|
1370
1370
|
vue.createElementVNode("div", _hoisted_7$e, vue.toDisplayString(vue.unref(formatDate)(event.start_time, { fmt: "HH:mm" })) + " - " + vue.toDisplayString(vue.unref(formatDate)(event.end_time, { fmt: "HH:mm" })), 1)
|
|
1371
1371
|
])
|
|
@@ -7917,7 +7917,7 @@ const _hoisted_1$1$1 = {
|
|
|
7917
7917
|
const _hoisted_2$1$1 = ["width", "height", "viewBox"];
|
|
7918
7918
|
const _hoisted_3$w = { class: "layer-rectangles" };
|
|
7919
7919
|
const _hoisted_4$l = ["transform", "onMouseover"];
|
|
7920
|
-
const _hoisted_5$
|
|
7920
|
+
const _hoisted_5$l = ["width", "height"];
|
|
7921
7921
|
const _hoisted_6$h = {
|
|
7922
7922
|
x: 0 + 10,
|
|
7923
7923
|
y: 0 + 20,
|
|
@@ -7954,7 +7954,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7954
7954
|
y: 0,
|
|
7955
7955
|
width: r2.width,
|
|
7956
7956
|
height: r2.height
|
|
7957
|
-
}), null, 16, _hoisted_5$
|
|
7957
|
+
}), null, 16, _hoisted_5$l),
|
|
7958
7958
|
vue.renderSlot(_ctx.$slots, "text", {
|
|
7959
7959
|
r: r2,
|
|
7960
7960
|
selected: _ctx.selected === i2
|
|
@@ -9522,7 +9522,7 @@ const _hoisted_2$A = {
|
|
|
9522
9522
|
};
|
|
9523
9523
|
const _hoisted_3$v = { class: "infinite-wrapper" };
|
|
9524
9524
|
const _hoisted_4$k = { class: "row first-row" };
|
|
9525
|
-
const _hoisted_5$
|
|
9525
|
+
const _hoisted_5$k = { key: 0 };
|
|
9526
9526
|
const _hoisted_6$g = ["onClick"];
|
|
9527
9527
|
const _hoisted_7$c = { class: "flex" };
|
|
9528
9528
|
const _hoisted_8$6 = ["onClick"];
|
|
@@ -9658,7 +9658,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
|
9658
9658
|
}), [
|
|
9659
9659
|
vue.createElementVNode("table", _hoisted_3$v, [
|
|
9660
9660
|
vue.createElementVNode("thead", _hoisted_4$k, [
|
|
9661
|
-
vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_5$
|
|
9661
|
+
vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_5$k, [
|
|
9662
9662
|
vue.createElementVNode("input", {
|
|
9663
9663
|
ref_key: "allSelectorEl",
|
|
9664
9664
|
ref: allSelectorEl,
|
|
@@ -13620,7 +13620,7 @@ const _hoisted_2$y = {
|
|
|
13620
13620
|
};
|
|
13621
13621
|
const _hoisted_3$u = { class: "bgl-steps-indicator" };
|
|
13622
13622
|
const _hoisted_4$j = ["onClick"];
|
|
13623
|
-
const _hoisted_5$
|
|
13623
|
+
const _hoisted_5$j = {
|
|
13624
13624
|
key: 0,
|
|
13625
13625
|
class: "bgl-step-label"
|
|
13626
13626
|
};
|
|
@@ -13804,7 +13804,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
13804
13804
|
onClick: ($event) => props2.allowStepNavigation && goToStep(index2)
|
|
13805
13805
|
}, [
|
|
13806
13806
|
vue.createElementVNode("span", null, vue.toDisplayString(index2 + 1), 1),
|
|
13807
|
-
props2.stepLabels && props2.stepLabels[index2] ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$
|
|
13807
|
+
props2.stepLabels && props2.stepLabels[index2] ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$j, vue.toDisplayString(props2.stepLabels[index2]), 1)) : vue.createCommentVNode("", true)
|
|
13808
13808
|
], 10, _hoisted_4$j);
|
|
13809
13809
|
}), 128))
|
|
13810
13810
|
])
|
|
@@ -13893,7 +13893,7 @@ const _hoisted_4$i = {
|
|
|
13893
13893
|
key: 1,
|
|
13894
13894
|
class: "py-1"
|
|
13895
13895
|
};
|
|
13896
|
-
const _hoisted_5$
|
|
13896
|
+
const _hoisted_5$i = {
|
|
13897
13897
|
key: 0,
|
|
13898
13898
|
class: "minimizedText txt14 p-025 opacity-7"
|
|
13899
13899
|
};
|
|
@@ -14025,7 +14025,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
14025
14025
|
thin: "",
|
|
14026
14026
|
class: vue.normalizeClass(["mb-05 itemBox transition ps-05 pb-025 pt-025 radius-05 gap-05 overflow-hidden", { minimized: minimizedItems.value[i2] }])
|
|
14027
14027
|
}, [
|
|
14028
|
-
minimizedItems.value[i2] ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$
|
|
14028
|
+
minimizedItems.value[i2] ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$i, vue.toDisplayString(_ctx.label) + " " + vue.toDisplayString(i2 + 1), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$T), {
|
|
14029
14029
|
key: 1,
|
|
14030
14030
|
"model-value": isPrimitiveType.value ? { value: item } : item,
|
|
14031
14031
|
schema: resolvedSchemaData.value,
|
|
@@ -14155,7 +14155,7 @@ const _hoisted_3$r = {
|
|
|
14155
14155
|
class: "code-editor-wrap grid rounded p-1 overflow hm-300px ltr txt-start relative h-100p"
|
|
14156
14156
|
};
|
|
14157
14157
|
const _hoisted_4$h = { class: "overflow-hidden absolute inset-0 p-0 m-0 h-100 codeText" };
|
|
14158
|
-
const _hoisted_5$
|
|
14158
|
+
const _hoisted_5$h = ["innerHTML"];
|
|
14159
14159
|
const _hoisted_6$d = ["onKeydown"];
|
|
14160
14160
|
const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
14161
14161
|
__name: "Index",
|
|
@@ -14251,7 +14251,7 @@ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
|
14251
14251
|
vue.createElementVNode("code", {
|
|
14252
14252
|
class: vue.normalizeClass(["absolute inset-0", className.value]),
|
|
14253
14253
|
innerHTML: highlightedCode.value
|
|
14254
|
-
}, null, 10, _hoisted_5$
|
|
14254
|
+
}, null, 10, _hoisted_5$h),
|
|
14255
14255
|
_cache[3] || (_cache[3] = vue.createTextVNode("\n "))
|
|
14256
14256
|
]),
|
|
14257
14257
|
!_ctx.readonly ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", {
|
|
@@ -14860,11 +14860,11 @@ class Time {
|
|
|
14860
14860
|
return number2 < 10 ? `0${number2}` : String(number2);
|
|
14861
14861
|
}
|
|
14862
14862
|
}
|
|
14863
|
-
const _hoisted_1$F = { class: "ltr flex gap-075
|
|
14863
|
+
const _hoisted_1$F = { class: "ltr flex gap-075 m_flex-wrap calendar-container justify-content-center h-100p" };
|
|
14864
14864
|
const _hoisted_2$t = { class: "calendar-section m_border-none pe-05 m_p-0" };
|
|
14865
14865
|
const _hoisted_3$p = { class: "flex space-between pb-1" };
|
|
14866
14866
|
const _hoisted_4$g = { class: "flex gap-05" };
|
|
14867
|
-
const _hoisted_5$
|
|
14867
|
+
const _hoisted_5$g = { class: "month-year" };
|
|
14868
14868
|
const _hoisted_6$c = {
|
|
14869
14869
|
key: 0,
|
|
14870
14870
|
class: "calendar-grid grid gap-025"
|
|
@@ -14969,7 +14969,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
14969
14969
|
}));
|
|
14970
14970
|
const years2 = vue.computed(() => {
|
|
14971
14971
|
const startYear = currentMonthValue2.value.year - 10;
|
|
14972
|
-
return Array.from({ length:
|
|
14972
|
+
return Array.from({ length: 18 }, (_2, i2) => ({
|
|
14973
14973
|
value: startYear + i2,
|
|
14974
14974
|
disabled: isYearDisabled(startYear + i2)
|
|
14975
14975
|
}));
|
|
@@ -15140,7 +15140,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
15140
15140
|
icon: "chevron_left",
|
|
15141
15141
|
onClick: vue.unref(previousYear)
|
|
15142
15142
|
}, null, 8, ["onClick"]),
|
|
15143
|
-
vue.createElementVNode("span", _hoisted_5$
|
|
15143
|
+
vue.createElementVNode("span", _hoisted_5$g, vue.toDisplayString(vue.unref(currentMonthValue).formatted.year), 1),
|
|
15144
15144
|
vue.createVNode(vue.unref(Btn), {
|
|
15145
15145
|
flat: "",
|
|
15146
15146
|
thin: "",
|
|
@@ -15223,7 +15223,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
15223
15223
|
};
|
|
15224
15224
|
}
|
|
15225
15225
|
});
|
|
15226
|
-
const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
15226
|
+
const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-8b7bd9b8"]]);
|
|
15227
15227
|
const _hoisted_1$E = ["title"];
|
|
15228
15228
|
const _hoisted_2$s = { key: 0 };
|
|
15229
15229
|
const _hoisted_3$o = {
|
|
@@ -15419,7 +15419,7 @@ const _hoisted_2$r = {
|
|
|
15419
15419
|
};
|
|
15420
15420
|
const _hoisted_3$n = { class: "m-05 flex opacity-7 z-99" };
|
|
15421
15421
|
const _hoisted_4$f = { class: "ellipsis-1 word-break-all h-20 m-0 color-black" };
|
|
15422
|
-
const _hoisted_5$
|
|
15422
|
+
const _hoisted_5$f = { class: "flex gap-025 rounded pe-1 ps-05 py-025 bg-gray-80 -my-1" };
|
|
15423
15423
|
const _hoisted_6$b = { class: "ellipsis-1 word-break-all h-20 m-0 color-black txt16" };
|
|
15424
15424
|
const _hoisted_7$9 = {
|
|
15425
15425
|
key: 1,
|
|
@@ -15683,7 +15683,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
|
15683
15683
|
])), [
|
|
15684
15684
|
[_directive_lightbox, { src: file.url, download: true }]
|
|
15685
15685
|
]),
|
|
15686
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
15686
|
+
vue.createElementVNode("div", _hoisted_5$f, [
|
|
15687
15687
|
vue.createVNode(vue.unref(_sfc_main$s), {
|
|
15688
15688
|
icon: "draft",
|
|
15689
15689
|
size: 1.5
|
|
@@ -15933,7 +15933,7 @@ const _hoisted_4$e = {
|
|
|
15933
15933
|
key: 1,
|
|
15934
15934
|
class: "opacity-7 light"
|
|
15935
15935
|
};
|
|
15936
|
-
const _hoisted_5$
|
|
15936
|
+
const _hoisted_5$e = {
|
|
15937
15937
|
key: 5,
|
|
15938
15938
|
class: "flex column spinner"
|
|
15939
15939
|
};
|
|
@@ -16109,7 +16109,7 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
|
16109
16109
|
tabindex: "-1",
|
|
16110
16110
|
onClick: decrement
|
|
16111
16111
|
}, null, 8, ["class"])) : vue.createCommentVNode("", true),
|
|
16112
|
-
_ctx.spinner && (!_ctx.layout || !btnLayouts.includes(_ctx.layout)) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
16112
|
+
_ctx.spinner && (!_ctx.layout || !btnLayouts.includes(_ctx.layout)) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$e, [
|
|
16113
16113
|
vue.createVNode(vue.unref(Btn), {
|
|
16114
16114
|
icon: "add",
|
|
16115
16115
|
flat: "",
|
|
@@ -20792,7 +20792,7 @@ const _hoisted_4$d = {
|
|
|
20792
20792
|
class: "overflow-y p-0 max-h-300px",
|
|
20793
20793
|
role: "listbox"
|
|
20794
20794
|
};
|
|
20795
|
-
const _hoisted_5$
|
|
20795
|
+
const _hoisted_5$d = ["aria-selected", "onClick"];
|
|
20796
20796
|
const _hoisted_6$a = { class: "tel-country" };
|
|
20797
20797
|
const _hoisted_7$8 = ["id", "required", "placeholder", "disabled", "name"];
|
|
20798
20798
|
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -21019,7 +21019,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
21019
21019
|
}, null, 8, ["country"]),
|
|
21020
21020
|
vue.createElementVNode("p", _hoisted_6$a, vue.toDisplayString(pb.name), 1),
|
|
21021
21021
|
vue.createElementVNode("span", null, " +" + vue.toDisplayString(pb.dialCode), 1)
|
|
21022
|
-
], 8, _hoisted_5$
|
|
21022
|
+
], 8, _hoisted_5$d);
|
|
21023
21023
|
}), 128))
|
|
21024
21024
|
])
|
|
21025
21025
|
])
|
|
@@ -21064,7 +21064,7 @@ const _hoisted_1$x = ["for"];
|
|
|
21064
21064
|
const _hoisted_2$m = ["id", "disabled", "name", "value", "required"];
|
|
21065
21065
|
const _hoisted_3$j = { class: "flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025" };
|
|
21066
21066
|
const _hoisted_4$c = ["src", "alt"];
|
|
21067
|
-
const _hoisted_5$
|
|
21067
|
+
const _hoisted_5$c = { class: "" };
|
|
21068
21068
|
const _hoisted_6$9 = {
|
|
21069
21069
|
key: 0,
|
|
21070
21070
|
class: "m-0 m_txt-14"
|
|
@@ -21142,7 +21142,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
|
21142
21142
|
src: opt.imgSrc,
|
|
21143
21143
|
alt: opt.imgAlt
|
|
21144
21144
|
}, null, 8, _hoisted_4$c)) : vue.createCommentVNode("", true),
|
|
21145
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
21145
|
+
vue.createElementVNode("div", _hoisted_5$c, [
|
|
21146
21146
|
opt.label ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_6$9, vue.toDisplayString(opt.label), 1)) : vue.createCommentVNode("", true),
|
|
21147
21147
|
opt.subLabel ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$7, vue.toDisplayString(opt.subLabel), 1)) : vue.createCommentVNode("", true)
|
|
21148
21148
|
]),
|
|
@@ -21167,7 +21167,7 @@ const _hoisted_1$w = { class: "bagel-input" };
|
|
|
21167
21167
|
const _hoisted_2$l = { class: "pb-025" };
|
|
21168
21168
|
const _hoisted_3$i = { class: "flex gap-05 flex-wrap" };
|
|
21169
21169
|
const _hoisted_4$b = ["id", "name", "value", "checked"];
|
|
21170
|
-
const _hoisted_5$
|
|
21170
|
+
const _hoisted_5$b = ["for"];
|
|
21171
21171
|
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
21172
21172
|
__name: "RadioPillsInput",
|
|
21173
21173
|
props: {
|
|
@@ -21229,7 +21229,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
|
21229
21229
|
}, null, 40, _hoisted_4$b),
|
|
21230
21230
|
vue.createElementVNode("label", {
|
|
21231
21231
|
for: `${_ctx.id}-${getValue(option2)}`
|
|
21232
|
-
}, vue.toDisplayString(getLabel(option2)), 9, _hoisted_5$
|
|
21232
|
+
}, vue.toDisplayString(getLabel(option2)), 9, _hoisted_5$b)
|
|
21233
21233
|
]);
|
|
21234
21234
|
}), 128))
|
|
21235
21235
|
])
|
|
@@ -21245,7 +21245,7 @@ const _hoisted_2$k = {
|
|
|
21245
21245
|
};
|
|
21246
21246
|
const _hoisted_3$h = { class: "range-slider relative w-100" };
|
|
21247
21247
|
const _hoisted_4$a = ["id", "value", "min", "max", "step", "required", "disabled", "aria-label"];
|
|
21248
|
-
const _hoisted_5$
|
|
21248
|
+
const _hoisted_5$a = ["value", "min", "max", "step", "required", "disabled"];
|
|
21249
21249
|
const _hoisted_6$8 = { class: "track absolute pointer-events-none overflow-hidden round" };
|
|
21250
21250
|
const _hoisted_7$6 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
|
|
21251
21251
|
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -21339,7 +21339,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
21339
21339
|
disabled: _ctx.disabled,
|
|
21340
21340
|
"aria-label": "Maximum value",
|
|
21341
21341
|
onInput: _cache[1] || (_cache[1] = (e) => handleInput(+e.target.value, false))
|
|
21342
|
-
}, null, 40, _hoisted_5$
|
|
21342
|
+
}, null, 40, _hoisted_5$a)) : vue.createCommentVNode("", true),
|
|
21343
21343
|
vue.createElementVNode("div", _hoisted_6$8, [
|
|
21344
21344
|
vue.createElementVNode("div", {
|
|
21345
21345
|
class: "active-range absolute h-100 pointer-events-none bg-primary",
|
|
@@ -23375,7 +23375,7 @@ const _hoisted_4$9 = {
|
|
|
23375
23375
|
key: 2,
|
|
23376
23376
|
class: "ms-auto ps-05 me-05"
|
|
23377
23377
|
};
|
|
23378
|
-
const _hoisted_5$
|
|
23378
|
+
const _hoisted_5$9 = ["value"];
|
|
23379
23379
|
const _hoisted_6$7 = ["aria-selected", "onClick", "onKeydown"];
|
|
23380
23380
|
const _hoisted_7$5 = { class: "block" };
|
|
23381
23381
|
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -23405,7 +23405,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
23405
23405
|
const searchInput = vue.ref();
|
|
23406
23406
|
let selectedItems = vue.ref([]);
|
|
23407
23407
|
const selectedItemCount = vue.computed(() => selectedItems.value.length ?? 0);
|
|
23408
|
-
const
|
|
23408
|
+
const searchTerm = vue.ref("");
|
|
23409
23409
|
const dropdown = vue.ref();
|
|
23410
23410
|
let selected = vue.ref(false);
|
|
23411
23411
|
let open = vue.ref(false);
|
|
@@ -23418,26 +23418,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
23418
23418
|
return selectedItems.value.map((item) => getLabel(item)).join(", ");
|
|
23419
23419
|
});
|
|
23420
23420
|
const searchPlaceholder = vue.computed(() => props2.searchPlaceholder ?? selectedLabel.value ?? "Search");
|
|
23421
|
-
|
|
23422
|
-
let isSearching = vue.ref(false);
|
|
23423
|
-
async function runServerSearch() {
|
|
23424
|
-
if (props2.onSearch !== void 0) {
|
|
23425
|
-
isSearching.value = true;
|
|
23426
|
-
serverOptions.value = await props2.onSearch(search.value);
|
|
23427
|
-
isSearching.value = false;
|
|
23428
|
-
}
|
|
23429
|
-
}
|
|
23430
|
-
const filteredOptions = vue.computed(() => {
|
|
23431
|
-
if (props2.onSearch !== void 0) {
|
|
23432
|
-
if (isSearching.value) return [];
|
|
23433
|
-
if (search.value.trim().length) return serverOptions.value;
|
|
23434
|
-
return props2.options;
|
|
23435
|
-
}
|
|
23436
|
-
return props2.options.filter((option2) => {
|
|
23437
|
-
const searchTerm = search.value.split(/\s+/).filter(Boolean).map((t) => new RegExp(t.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&"), "gi"));
|
|
23438
|
-
return Boolean(option2) && searchTerm.every((s2) => getLabel(option2).match(s2));
|
|
23439
|
-
});
|
|
23440
|
-
});
|
|
23421
|
+
const { results, isLoading } = useSearch({ searchTerm, serverSearch: props2.onSearch, items: props2.options });
|
|
23441
23422
|
let highlightedIndex = vue.ref(-1);
|
|
23442
23423
|
const selectOptions = vue.ref();
|
|
23443
23424
|
function navigate(direction) {
|
|
@@ -23449,9 +23430,9 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
23449
23430
|
return;
|
|
23450
23431
|
}
|
|
23451
23432
|
if (direction === "up") {
|
|
23452
|
-
highlightedIndex.value = highlightedIndex.value > 0 ? highlightedIndex.value - 1 :
|
|
23433
|
+
highlightedIndex.value = highlightedIndex.value > 0 ? highlightedIndex.value - 1 : results.value.length - 1;
|
|
23453
23434
|
} else if (direction === "down") {
|
|
23454
|
-
highlightedIndex.value = highlightedIndex.value <
|
|
23435
|
+
highlightedIndex.value = highlightedIndex.value < results.value.length - 1 ? highlightedIndex.value + 1 : 0;
|
|
23455
23436
|
}
|
|
23456
23437
|
setTimeout(() => {
|
|
23457
23438
|
var _a;
|
|
@@ -23576,12 +23557,11 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
23576
23557
|
key: 0,
|
|
23577
23558
|
ref_key: "searchInput",
|
|
23578
23559
|
ref: searchInput,
|
|
23579
|
-
modelValue:
|
|
23580
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
23560
|
+
modelValue: searchTerm.value,
|
|
23561
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchTerm.value = $event),
|
|
23581
23562
|
class: "mb-0",
|
|
23582
23563
|
placeholder: searchPlaceholder.value,
|
|
23583
23564
|
icon: "search",
|
|
23584
|
-
onDebounce: runServerSearch,
|
|
23585
23565
|
onInput: _cache[1] || (_cache[1] = ($event) => vue.isRef(selected) ? selected.value = false : selected = false),
|
|
23586
23566
|
onClick: focusInput,
|
|
23587
23567
|
onKeydown: [
|
|
@@ -23626,12 +23606,12 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
23626
23606
|
style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
|
|
23627
23607
|
value: vue.unref(selectedItems),
|
|
23628
23608
|
required: ""
|
|
23629
|
-
}, null, 8, _hoisted_5$
|
|
23609
|
+
}, null, 8, _hoisted_5$9)) : vue.createCommentVNode("", true)
|
|
23630
23610
|
])
|
|
23631
23611
|
])
|
|
23632
23612
|
]),
|
|
23633
23613
|
default: vue.withCtx(() => [
|
|
23634
|
-
vue.unref(
|
|
23614
|
+
vue.unref(isLoading) ? (vue.openBlock(), vue.createBlock(vue.unref(Skeleton), {
|
|
23635
23615
|
key: 0,
|
|
23636
23616
|
count: 6,
|
|
23637
23617
|
width: "200px",
|
|
@@ -23650,7 +23630,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
23650
23630
|
ref: selectOptions,
|
|
23651
23631
|
class: vue.normalizeClass(["selectinput-options", { multiselect: _ctx.multiselect }])
|
|
23652
23632
|
}, [
|
|
23653
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
23633
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(results), (option2, i2) => {
|
|
23654
23634
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
23655
23635
|
key: `${option2}${i2}`,
|
|
23656
23636
|
class: vue.normalizeClass(["selectinput-option hover gap-1 align-items-center", { selected: isSelected(option2) }]),
|
|
@@ -23691,7 +23671,7 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
|
23691
23671
|
};
|
|
23692
23672
|
}
|
|
23693
23673
|
});
|
|
23694
|
-
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
23674
|
+
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-ce2e19d8"]]);
|
|
23695
23675
|
/*!
|
|
23696
23676
|
* Signature Pad v5.0.7 | https://github.com/szimek/signature_pad
|
|
23697
23677
|
* (c) 2025 Szymon Nowak | Released under the MIT license
|
|
@@ -26981,7 +26961,7 @@ const _hoisted_1$p = ["title"];
|
|
|
26981
26961
|
const _hoisted_2$f = { class: "bagel-input" };
|
|
26982
26962
|
const _hoisted_3$d = { class: "table-side-scroll" };
|
|
26983
26963
|
const _hoisted_4$8 = { class: "table-header" };
|
|
26984
|
-
const _hoisted_5$
|
|
26964
|
+
const _hoisted_5$8 = { class: "table-reorder" };
|
|
26985
26965
|
const _hoisted_6$6 = { class: "table-action" };
|
|
26986
26966
|
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
26987
26967
|
__name: "TableField",
|
|
@@ -27079,7 +27059,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
|
27079
27059
|
key: row.id,
|
|
27080
27060
|
class: "flex table-row"
|
|
27081
27061
|
}, [
|
|
27082
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
27062
|
+
vue.createElementVNode("div", _hoisted_5$8, [
|
|
27083
27063
|
vue.createVNode(vue.unref(_sfc_main$s), { icon: "more_vert" })
|
|
27084
27064
|
]),
|
|
27085
27065
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a2 = vue.unref(entityMeta)) == null ? void 0 : _a2.fields, (field) => {
|
|
@@ -27132,7 +27112,7 @@ const _hoisted_1$o = ["title"];
|
|
|
27132
27112
|
const _hoisted_2$e = ["for"];
|
|
27133
27113
|
const _hoisted_3$c = ["id", "name", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
|
|
27134
27114
|
const _hoisted_4$7 = ["id", "name", "title", "type", "rows", "placeholder", "disabled", "required", "pattern"];
|
|
27135
|
-
const _hoisted_5$
|
|
27115
|
+
const _hoisted_5$7 = {
|
|
27136
27116
|
key: 2,
|
|
27137
27117
|
class: "opacity-7 light"
|
|
27138
27118
|
};
|
|
@@ -27277,7 +27257,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
|
27277
27257
|
}), null, 16, _hoisted_4$7)), [
|
|
27278
27258
|
[vue.vModelText, vue.unref(inputVal)]
|
|
27279
27259
|
]),
|
|
27280
|
-
_ctx.helptext ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$
|
|
27260
|
+
_ctx.helptext ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$7, vue.toDisplayString(_ctx.helptext), 1)) : vue.createCommentVNode("", true),
|
|
27281
27261
|
_ctx.iconStart ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$s), {
|
|
27282
27262
|
key: 3,
|
|
27283
27263
|
class: "iconStart",
|
|
@@ -27383,7 +27363,7 @@ const _hoisted_3$a = {
|
|
|
27383
27363
|
class: "pixel"
|
|
27384
27364
|
};
|
|
27385
27365
|
const _hoisted_4$6 = { class: "m-05 flex opacity-7 z-99" };
|
|
27386
|
-
const _hoisted_5$
|
|
27366
|
+
const _hoisted_5$6 = { class: "flex gap-025 rounded pe-1 ps-05 py-025 bg-gray-80 -my-1" };
|
|
27387
27367
|
const _hoisted_6$5 = { class: "ellipsis-1 word-break-all h-20 m-0 color-black txt16" };
|
|
27388
27368
|
const _hoisted_7$4 = {
|
|
27389
27369
|
key: 1,
|
|
@@ -27571,7 +27551,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
|
27571
27551
|
href: vue.unref(pathKeyToURL)(path_key),
|
|
27572
27552
|
download: path_key.split("/").pop()
|
|
27573
27553
|
}, null, 8, ["href", "download"]),
|
|
27574
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
27554
|
+
vue.createElementVNode("div", _hoisted_5$6, [
|
|
27575
27555
|
vue.createVNode(vue.unref(_sfc_main$s), {
|
|
27576
27556
|
icon: "draft",
|
|
27577
27557
|
size: 1.5
|
|
@@ -32836,6 +32816,7 @@ const _hoisted_4$5 = {
|
|
|
32836
32816
|
key: 1,
|
|
32837
32817
|
class: "txt12 m-0 p-0 opacity-7 ellipsis-1"
|
|
32838
32818
|
};
|
|
32819
|
+
const _hoisted_5$5 = ["textContent"];
|
|
32839
32820
|
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
32840
32821
|
__name: "ListItem",
|
|
32841
32822
|
props: {
|
|
@@ -32849,6 +32830,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
32849
32830
|
flat: { type: Boolean },
|
|
32850
32831
|
disabled: { type: Boolean },
|
|
32851
32832
|
lead: {},
|
|
32833
|
+
end: {},
|
|
32852
32834
|
iconEnd: {},
|
|
32853
32835
|
target: {},
|
|
32854
32836
|
thin: { type: Boolean },
|
|
@@ -32918,12 +32900,17 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
32918
32900
|
])) : vue.createCommentVNode("", true)
|
|
32919
32901
|
]),
|
|
32920
32902
|
_cache[0] || (_cache[0] = vue.createElementVNode("div", { class: "flex-grow-1" }, null, -1)),
|
|
32921
|
-
vue.renderSlot(_ctx.$slots, "
|
|
32903
|
+
vue.renderSlot(_ctx.$slots, "end", {}, () => [
|
|
32922
32904
|
_ctx.iconEnd ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$s), {
|
|
32923
32905
|
key: 0,
|
|
32924
32906
|
icon: _ctx.iconEnd,
|
|
32925
32907
|
class: "transition-400"
|
|
32926
|
-
}, null, 8, ["icon"])) : vue.createCommentVNode("", true)
|
|
32908
|
+
}, null, 8, ["icon"])) : vue.createCommentVNode("", true),
|
|
32909
|
+
_ctx.end ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
32910
|
+
key: 1,
|
|
32911
|
+
class: "txt12 m-0 p-0 opacity-7 ellipsis-1",
|
|
32912
|
+
textContent: vue.toDisplayString(_ctx.end)
|
|
32913
|
+
}, null, 8, _hoisted_5$5)) : vue.createCommentVNode("", true)
|
|
32927
32914
|
])
|
|
32928
32915
|
]),
|
|
32929
32916
|
_: 3
|
|
@@ -36631,6 +36618,216 @@ const IMAGE_FORMATS = ["jpeg", "png", "webp", "avif", "apng", "gif", "avifs", "s
|
|
|
36631
36618
|
const IMAGE_FORMATS_REGEXP = new RegExp(`(${IMAGE_FORMATS.join("|")})$`, "i");
|
|
36632
36619
|
const VIDEO_FORMATS = ["mp4", "webm", "ogg", "mov", "avi", "flv", "wmv", "mkv", "ts", "m3u8"];
|
|
36633
36620
|
const VIDEO_FORMATS_REGEXP = new RegExp(`(${VIDEO_FORMATS.join("|")})$`, "i");
|
|
36621
|
+
function clearHtml(value) {
|
|
36622
|
+
if (!value) return "";
|
|
36623
|
+
return value.replace(/<[^>]*>?/g, "").replace(/ /g, " ").replace(/"/g, '"').replace(/'/g, `'`).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
36624
|
+
}
|
|
36625
|
+
function normalizeText(text) {
|
|
36626
|
+
const specialChars = /['()\-.,׳"״:*+?^${}|[\]\\]/g;
|
|
36627
|
+
return text.replace(specialChars, "").toLowerCase();
|
|
36628
|
+
}
|
|
36629
|
+
function getValueByPath(obj, path) {
|
|
36630
|
+
const keys4 = path.split(".");
|
|
36631
|
+
let result2 = obj;
|
|
36632
|
+
for (const key of keys4) {
|
|
36633
|
+
if (result2 === null || result2 === void 0 || typeof result2 !== "object") {
|
|
36634
|
+
return void 0;
|
|
36635
|
+
}
|
|
36636
|
+
result2 = result2[key];
|
|
36637
|
+
}
|
|
36638
|
+
return result2;
|
|
36639
|
+
}
|
|
36640
|
+
function calculateRelevance(stringValue, searchTerms) {
|
|
36641
|
+
let score = 0;
|
|
36642
|
+
if (stringValue.length === 0) return 0;
|
|
36643
|
+
let totalMatchedChars = 0;
|
|
36644
|
+
for (const term of searchTerms) {
|
|
36645
|
+
if (stringValue.includes(term)) {
|
|
36646
|
+
const regex2 = new RegExp(term, "g");
|
|
36647
|
+
const matches2 = stringValue.match(regex2);
|
|
36648
|
+
if (matches2) {
|
|
36649
|
+
totalMatchedChars += matches2.length * term.length;
|
|
36650
|
+
}
|
|
36651
|
+
score += 1;
|
|
36652
|
+
const words = stringValue.split(/\s+/);
|
|
36653
|
+
if (words.includes(term)) {
|
|
36654
|
+
score += 0.5;
|
|
36655
|
+
}
|
|
36656
|
+
if (stringValue.startsWith(term)) {
|
|
36657
|
+
score += 0.5;
|
|
36658
|
+
}
|
|
36659
|
+
}
|
|
36660
|
+
}
|
|
36661
|
+
const matchDensity = Math.min(1, totalMatchedChars / stringValue.length);
|
|
36662
|
+
score *= 1 + matchDensity * 2;
|
|
36663
|
+
return score;
|
|
36664
|
+
}
|
|
36665
|
+
function isPrimitive(value) {
|
|
36666
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
36667
|
+
}
|
|
36668
|
+
function unwrapValue(value) {
|
|
36669
|
+
if (value === null || value === void 0) return [];
|
|
36670
|
+
return typeof value === "object" && "value" in value ? value.value : value;
|
|
36671
|
+
}
|
|
36672
|
+
function toSearchableString(value) {
|
|
36673
|
+
if (value === null || value === void 0) return "";
|
|
36674
|
+
if (typeof value === "string") return clearHtml(value);
|
|
36675
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
36676
|
+
if (typeof value === "object" && value instanceof Date) return value.toISOString();
|
|
36677
|
+
return "";
|
|
36678
|
+
}
|
|
36679
|
+
function searchItems(params) {
|
|
36680
|
+
const { searchTerm, items = [], keysToSearch, fieldWeights = {}, minChars = 2 } = params;
|
|
36681
|
+
const searchValue = unwrapValue(searchTerm);
|
|
36682
|
+
const itemsArray = Array.isArray(items) ? items : unwrapValue(items) || [];
|
|
36683
|
+
if (!searchValue || searchValue.length < minChars) return itemsArray;
|
|
36684
|
+
const searchTerms = normalizeText(searchValue).split(/\s+/).filter((term) => term.length > 1);
|
|
36685
|
+
if (searchTerms.length === 0) return itemsArray;
|
|
36686
|
+
const defaultWeights = {
|
|
36687
|
+
// Give higher weight to name/title fields
|
|
36688
|
+
name: 2,
|
|
36689
|
+
first_name: 2,
|
|
36690
|
+
last_name: 2,
|
|
36691
|
+
title: 2,
|
|
36692
|
+
headline: 2,
|
|
36693
|
+
// Lower weight for longer text fields
|
|
36694
|
+
description: 0.7,
|
|
36695
|
+
subtitle: 0.7,
|
|
36696
|
+
bio: 0.7,
|
|
36697
|
+
content: 0.7,
|
|
36698
|
+
body: 0.7,
|
|
36699
|
+
email: 0.7,
|
|
36700
|
+
phone: 0.7,
|
|
36701
|
+
// Even lower for metadata
|
|
36702
|
+
id: 0.3,
|
|
36703
|
+
created_at: 0.3,
|
|
36704
|
+
updated_at: 0.3
|
|
36705
|
+
};
|
|
36706
|
+
function getFieldWeight(path) {
|
|
36707
|
+
if (path in fieldWeights) {
|
|
36708
|
+
const customWeight = fieldWeights[path];
|
|
36709
|
+
if (typeof customWeight === "number") {
|
|
36710
|
+
return customWeight;
|
|
36711
|
+
}
|
|
36712
|
+
}
|
|
36713
|
+
const leafKey = path.split(".").pop() || "";
|
|
36714
|
+
if (leafKey in defaultWeights) {
|
|
36715
|
+
return defaultWeights[leafKey];
|
|
36716
|
+
}
|
|
36717
|
+
return 1;
|
|
36718
|
+
}
|
|
36719
|
+
function collectAllKeys(obj, prefix = "") {
|
|
36720
|
+
if (!obj || typeof obj !== "object") return [];
|
|
36721
|
+
return Object.keys(obj).flatMap((key) => {
|
|
36722
|
+
const value = obj[key];
|
|
36723
|
+
const newPrefix = prefix ? `${prefix}.${key}` : key;
|
|
36724
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
36725
|
+
return [newPrefix, ...collectAllKeys(value, newPrefix)];
|
|
36726
|
+
}
|
|
36727
|
+
return [newPrefix];
|
|
36728
|
+
});
|
|
36729
|
+
}
|
|
36730
|
+
function calculateItemRelevance(item) {
|
|
36731
|
+
let totalRelevance = 0;
|
|
36732
|
+
if (isPrimitive(item)) {
|
|
36733
|
+
const normalizedValue = normalizeText(String(item));
|
|
36734
|
+
return calculateRelevance(normalizedValue, searchTerms);
|
|
36735
|
+
}
|
|
36736
|
+
if (Array.isArray(item)) {
|
|
36737
|
+
for (const element of item) {
|
|
36738
|
+
if (isPrimitive(element)) {
|
|
36739
|
+
const normalizedValue = normalizeText(String(element));
|
|
36740
|
+
totalRelevance += calculateRelevance(normalizedValue, searchTerms);
|
|
36741
|
+
}
|
|
36742
|
+
}
|
|
36743
|
+
return totalRelevance;
|
|
36744
|
+
}
|
|
36745
|
+
const keysToProcess = keysToSearch || collectAllKeys(item);
|
|
36746
|
+
for (const keyPath of keysToProcess) {
|
|
36747
|
+
const value = getValueByPath(item, String(keyPath));
|
|
36748
|
+
if (value === null || value === void 0) continue;
|
|
36749
|
+
if (Array.isArray(value)) {
|
|
36750
|
+
for (const element of value) {
|
|
36751
|
+
if (isPrimitive(element)) {
|
|
36752
|
+
const cleanValue = clearHtml(String(element));
|
|
36753
|
+
const normalizedValue2 = normalizeText(cleanValue);
|
|
36754
|
+
const relevance = calculateRelevance(normalizedValue2, searchTerms);
|
|
36755
|
+
const fieldWeight2 = getFieldWeight(String(keyPath));
|
|
36756
|
+
totalRelevance += relevance * fieldWeight2;
|
|
36757
|
+
}
|
|
36758
|
+
}
|
|
36759
|
+
continue;
|
|
36760
|
+
}
|
|
36761
|
+
if (typeof value === "object" && !isPrimitive(value)) {
|
|
36762
|
+
continue;
|
|
36763
|
+
}
|
|
36764
|
+
const stringValue = toSearchableString(value);
|
|
36765
|
+
const normalizedValue = normalizeText(stringValue);
|
|
36766
|
+
const baseRelevance = calculateRelevance(normalizedValue, searchTerms);
|
|
36767
|
+
const fieldWeight = getFieldWeight(String(keyPath));
|
|
36768
|
+
totalRelevance += baseRelevance * fieldWeight;
|
|
36769
|
+
}
|
|
36770
|
+
return totalRelevance;
|
|
36771
|
+
}
|
|
36772
|
+
const scoredItems = itemsArray.map((item) => {
|
|
36773
|
+
const relevance = calculateItemRelevance(item);
|
|
36774
|
+
return [item, relevance];
|
|
36775
|
+
});
|
|
36776
|
+
return scoredItems.filter(([, score]) => score > 0).sort(([, scoreA], [, scoreB]) => scoreB - scoreA).map(([item]) => item);
|
|
36777
|
+
}
|
|
36778
|
+
function useSearch(params) {
|
|
36779
|
+
const { searchTerm, minChars = 2, serverSearch, debounceMs = 300 } = params;
|
|
36780
|
+
const isLoading = vue.ref(false);
|
|
36781
|
+
const serverResults = vue.ref([]);
|
|
36782
|
+
let debounceTimeout = null;
|
|
36783
|
+
if (serverSearch) {
|
|
36784
|
+
vue.watch(
|
|
36785
|
+
() => unwrapValue(searchTerm),
|
|
36786
|
+
async (newTerm) => {
|
|
36787
|
+
if (debounceTimeout !== null) {
|
|
36788
|
+
clearTimeout(debounceTimeout);
|
|
36789
|
+
}
|
|
36790
|
+
if (!newTerm || typeof newTerm !== "string" || newTerm.length < minChars) {
|
|
36791
|
+
serverResults.value = [];
|
|
36792
|
+
return;
|
|
36793
|
+
}
|
|
36794
|
+
debounceTimeout = window.setTimeout(async () => {
|
|
36795
|
+
try {
|
|
36796
|
+
isLoading.value = true;
|
|
36797
|
+
serverResults.value = await serverSearch(newTerm);
|
|
36798
|
+
} catch (error) {
|
|
36799
|
+
console.error("Server search error:", error);
|
|
36800
|
+
serverResults.value = [];
|
|
36801
|
+
} finally {
|
|
36802
|
+
isLoading.value = false;
|
|
36803
|
+
}
|
|
36804
|
+
}, debounceMs);
|
|
36805
|
+
}
|
|
36806
|
+
);
|
|
36807
|
+
}
|
|
36808
|
+
const getSearchTermValue = () => unwrapValue(searchTerm);
|
|
36809
|
+
const getFilteredResults = () => {
|
|
36810
|
+
const term = getSearchTermValue();
|
|
36811
|
+
if (serverSearch && term && typeof term === "string" && term.length >= minChars) {
|
|
36812
|
+
return serverResults.value;
|
|
36813
|
+
}
|
|
36814
|
+
return searchItems(params);
|
|
36815
|
+
};
|
|
36816
|
+
const results = vue.computed(() => getFilteredResults());
|
|
36817
|
+
const resultCount = vue.computed(() => results.value.length);
|
|
36818
|
+
const hasResults = vue.computed(() => resultCount.value > 0);
|
|
36819
|
+
const isSearching = vue.computed(() => {
|
|
36820
|
+
const term = getSearchTermValue();
|
|
36821
|
+
return !!term && typeof term === "string" && term.length >= minChars;
|
|
36822
|
+
});
|
|
36823
|
+
return {
|
|
36824
|
+
results,
|
|
36825
|
+
resultCount,
|
|
36826
|
+
hasResults,
|
|
36827
|
+
isSearching,
|
|
36828
|
+
isLoading: vue.computed(() => isLoading.value)
|
|
36829
|
+
};
|
|
36830
|
+
}
|
|
36634
36831
|
exports.Accordion = _sfc_main$1e;
|
|
36635
36832
|
exports.AccordionItem = AccordionItem;
|
|
36636
36833
|
exports.AddressSearch = _sfc_main$1c;
|
|
@@ -36717,6 +36914,7 @@ exports.bagelFormUtils = BagelFormUtils;
|
|
|
36717
36914
|
exports.bagelInjectionKey = bagelInjectionKey;
|
|
36718
36915
|
exports.bindAttrs = bindAttrs;
|
|
36719
36916
|
exports.classify = classify;
|
|
36917
|
+
exports.clearHtml = clearHtml;
|
|
36720
36918
|
exports.copyText = copyText;
|
|
36721
36919
|
exports.debounce = debounce;
|
|
36722
36920
|
exports.denullify = denullify;
|
|
@@ -36734,9 +36932,11 @@ exports.isDate = isDate$1;
|
|
|
36734
36932
|
exports.keyToLabel = keyToLabel;
|
|
36735
36933
|
exports.localRef = localRef;
|
|
36736
36934
|
exports.normalizeDimension = normalizeDimension;
|
|
36935
|
+
exports.normalizeText = normalizeText;
|
|
36737
36936
|
exports.normalizeURL = normalizeURL;
|
|
36738
36937
|
exports.pathKeyToURL = pathKeyToURL;
|
|
36739
36938
|
exports.provideBagelFormState = provideBagelFormState;
|
|
36939
|
+
exports.searchItems = searchItems;
|
|
36740
36940
|
exports.sleep = sleep;
|
|
36741
36941
|
exports.slugify = slugify;
|
|
36742
36942
|
exports.timeAgo = timeAgo;
|
|
@@ -36754,5 +36954,6 @@ exports.useLang = useLang;
|
|
|
36754
36954
|
exports.useLocalStorage = useLocalStorage;
|
|
36755
36955
|
exports.useModal = useModal;
|
|
36756
36956
|
exports.usePolling = usePolling;
|
|
36957
|
+
exports.useSearch = useSearch;
|
|
36757
36958
|
exports.useValidateFieldValue = useValidateFieldValue;
|
|
36758
36959
|
exports.vDraggable = vDraggable;
|