@bagelink/vue 1.2.56 → 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/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-46ad8c25"]]);
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$o = { class: "event-details" };
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$o, [
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$n = { class: "events-column" };
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$n, [
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$m = { class: "day-events" };
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$m, [
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$l = { class: "overflow-hidden color-white p-025 txt12 h-100p" };
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$l, [
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$k = ["width", "height"];
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$k),
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$j = { key: 0 };
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$j, [
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$i = {
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$i, toDisplayString(props2.stepLabels[index2]), 1)) : createCommentVNode("", true)
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$h = {
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$h, toDisplayString(_ctx.label) + " " + toDisplayString(i2 + 1), 1)) : (openBlock(), createBlock(unref(_sfc_main$T), {
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$g = ["innerHTML"];
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$g),
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 p-05 m_flex-wrap calendar-container justify-content-center h-100p" };
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$f = { class: "month-year" };
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: 21 }, (_2, i2) => ({
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$f, toDisplayString(unref(currentMonthValue).formatted.year), 1),
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-17319f4d"]]);
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$e = { class: "flex gap-025 rounded pe-1 ps-05 py-025 bg-gray-80 -my-1" };
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$e, [
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$d = {
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$d, [
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$c = ["aria-selected", "onClick"];
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$c);
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$b = { class: "" };
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$b, [
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$a = ["for"];
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$a)
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$9 = ["value", "min", "max", "step", "required", "disabled"];
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$9)) : createCommentVNode("", true),
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$8 = ["value"];
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 search = ref("");
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
- let serverOptions = ref([]);
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, 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 : filteredOptions.value.length - 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 < filteredOptions.value.length - 1 ? highlightedIndex.value + 1 : 0;
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: search.value,
23578
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => search.value = $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$8)) : createCommentVNode("", true)
23607
+ }, null, 8, _hoisted_5$9)) : createCommentVNode("", true)
23628
23608
  ])
23629
23609
  ])
23630
23610
  ]),
23631
23611
  default: withCtx(() => [
23632
- unref(isSearching) ? (openBlock(), createBlock(unref(Skeleton), {
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(filteredOptions.value, (option2, i2) => {
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-0432625c"]]);
23672
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-ce2e19d8"]]);
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$7 = { class: "table-reorder" };
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$7, [
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$6 = {
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$6, toDisplayString(_ctx.helptext), 1)) : createCommentVNode("", true),
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$5 = { class: "flex gap-025 rounded pe-1 ps-05 py-025 bg-gray-80 -my-1" };
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$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, "action", {}, () => [
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,216 @@ 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(/&nbsp;/g, " ").replace(/&quot;/g, '"').replace(/&apos;/g, `'`).replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">");
36622
+ }
36623
+ function normalizeText(text) {
36624
+ const specialChars = /['()\-.,׳"״:*+?^${}|[\]\\]/g;
36625
+ return text.replace(specialChars, "").toLowerCase();
36626
+ }
36627
+ function getValueByPath(obj, path) {
36628
+ const keys4 = path.split(".");
36629
+ let result2 = obj;
36630
+ for (const key of keys4) {
36631
+ if (result2 === null || result2 === void 0 || typeof result2 !== "object") {
36632
+ return void 0;
36633
+ }
36634
+ result2 = result2[key];
36635
+ }
36636
+ return result2;
36637
+ }
36638
+ function calculateRelevance(stringValue, searchTerms) {
36639
+ let score = 0;
36640
+ if (stringValue.length === 0) return 0;
36641
+ let totalMatchedChars = 0;
36642
+ for (const term of searchTerms) {
36643
+ if (stringValue.includes(term)) {
36644
+ const regex2 = new RegExp(term, "g");
36645
+ const matches2 = stringValue.match(regex2);
36646
+ if (matches2) {
36647
+ totalMatchedChars += matches2.length * term.length;
36648
+ }
36649
+ score += 1;
36650
+ const words = stringValue.split(/\s+/);
36651
+ if (words.includes(term)) {
36652
+ score += 0.5;
36653
+ }
36654
+ if (stringValue.startsWith(term)) {
36655
+ score += 0.5;
36656
+ }
36657
+ }
36658
+ }
36659
+ const matchDensity = Math.min(1, totalMatchedChars / stringValue.length);
36660
+ score *= 1 + matchDensity * 2;
36661
+ return score;
36662
+ }
36663
+ function isPrimitive(value) {
36664
+ return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
36665
+ }
36666
+ function unwrapValue(value) {
36667
+ if (value === null || value === void 0) return [];
36668
+ return typeof value === "object" && "value" in value ? value.value : value;
36669
+ }
36670
+ function toSearchableString(value) {
36671
+ if (value === null || value === void 0) return "";
36672
+ if (typeof value === "string") return clearHtml(value);
36673
+ if (typeof value === "number" || typeof value === "boolean") return String(value);
36674
+ if (typeof value === "object" && value instanceof Date) return value.toISOString();
36675
+ return "";
36676
+ }
36677
+ function searchItems(params) {
36678
+ const { searchTerm, items = [], keysToSearch, fieldWeights = {}, minChars = 2 } = params;
36679
+ const searchValue = unwrapValue(searchTerm);
36680
+ const itemsArray = Array.isArray(items) ? items : unwrapValue(items) || [];
36681
+ if (!searchValue || searchValue.length < minChars) return itemsArray;
36682
+ const searchTerms = normalizeText(searchValue).split(/\s+/).filter((term) => term.length > 1);
36683
+ if (searchTerms.length === 0) return itemsArray;
36684
+ const defaultWeights = {
36685
+ // Give higher weight to name/title fields
36686
+ name: 2,
36687
+ first_name: 2,
36688
+ last_name: 2,
36689
+ title: 2,
36690
+ headline: 2,
36691
+ // Lower weight for longer text fields
36692
+ description: 0.7,
36693
+ subtitle: 0.7,
36694
+ bio: 0.7,
36695
+ content: 0.7,
36696
+ body: 0.7,
36697
+ email: 0.7,
36698
+ phone: 0.7,
36699
+ // Even lower for metadata
36700
+ id: 0.3,
36701
+ created_at: 0.3,
36702
+ updated_at: 0.3
36703
+ };
36704
+ function getFieldWeight(path) {
36705
+ if (path in fieldWeights) {
36706
+ const customWeight = fieldWeights[path];
36707
+ if (typeof customWeight === "number") {
36708
+ return customWeight;
36709
+ }
36710
+ }
36711
+ const leafKey = path.split(".").pop() || "";
36712
+ if (leafKey in defaultWeights) {
36713
+ return defaultWeights[leafKey];
36714
+ }
36715
+ return 1;
36716
+ }
36717
+ function collectAllKeys(obj, prefix = "") {
36718
+ if (!obj || typeof obj !== "object") return [];
36719
+ return Object.keys(obj).flatMap((key) => {
36720
+ const value = obj[key];
36721
+ const newPrefix = prefix ? `${prefix}.${key}` : key;
36722
+ if (value && typeof value === "object" && !Array.isArray(value)) {
36723
+ return [newPrefix, ...collectAllKeys(value, newPrefix)];
36724
+ }
36725
+ return [newPrefix];
36726
+ });
36727
+ }
36728
+ function calculateItemRelevance(item) {
36729
+ let totalRelevance = 0;
36730
+ if (isPrimitive(item)) {
36731
+ const normalizedValue = normalizeText(String(item));
36732
+ return calculateRelevance(normalizedValue, searchTerms);
36733
+ }
36734
+ if (Array.isArray(item)) {
36735
+ for (const element of item) {
36736
+ if (isPrimitive(element)) {
36737
+ const normalizedValue = normalizeText(String(element));
36738
+ totalRelevance += calculateRelevance(normalizedValue, searchTerms);
36739
+ }
36740
+ }
36741
+ return totalRelevance;
36742
+ }
36743
+ const keysToProcess = keysToSearch || collectAllKeys(item);
36744
+ for (const keyPath of keysToProcess) {
36745
+ const value = getValueByPath(item, String(keyPath));
36746
+ if (value === null || value === void 0) continue;
36747
+ if (Array.isArray(value)) {
36748
+ for (const element of value) {
36749
+ if (isPrimitive(element)) {
36750
+ const cleanValue = clearHtml(String(element));
36751
+ const normalizedValue2 = normalizeText(cleanValue);
36752
+ const relevance = calculateRelevance(normalizedValue2, searchTerms);
36753
+ const fieldWeight2 = getFieldWeight(String(keyPath));
36754
+ totalRelevance += relevance * fieldWeight2;
36755
+ }
36756
+ }
36757
+ continue;
36758
+ }
36759
+ if (typeof value === "object" && !isPrimitive(value)) {
36760
+ continue;
36761
+ }
36762
+ const stringValue = toSearchableString(value);
36763
+ const normalizedValue = normalizeText(stringValue);
36764
+ const baseRelevance = calculateRelevance(normalizedValue, searchTerms);
36765
+ const fieldWeight = getFieldWeight(String(keyPath));
36766
+ totalRelevance += baseRelevance * fieldWeight;
36767
+ }
36768
+ return totalRelevance;
36769
+ }
36770
+ const scoredItems = itemsArray.map((item) => {
36771
+ const relevance = calculateItemRelevance(item);
36772
+ return [item, relevance];
36773
+ });
36774
+ return scoredItems.filter(([, score]) => score > 0).sort(([, scoreA], [, scoreB]) => scoreB - scoreA).map(([item]) => item);
36775
+ }
36776
+ function useSearch(params) {
36777
+ const { searchTerm, minChars = 2, serverSearch, debounceMs = 300 } = params;
36778
+ const isLoading = ref(false);
36779
+ const serverResults = ref([]);
36780
+ let debounceTimeout = null;
36781
+ if (serverSearch) {
36782
+ watch(
36783
+ () => unwrapValue(searchTerm),
36784
+ async (newTerm) => {
36785
+ if (debounceTimeout !== null) {
36786
+ clearTimeout(debounceTimeout);
36787
+ }
36788
+ if (!newTerm || typeof newTerm !== "string" || newTerm.length < minChars) {
36789
+ serverResults.value = [];
36790
+ return;
36791
+ }
36792
+ debounceTimeout = window.setTimeout(async () => {
36793
+ try {
36794
+ isLoading.value = true;
36795
+ serverResults.value = await serverSearch(newTerm);
36796
+ } catch (error) {
36797
+ console.error("Server search error:", error);
36798
+ serverResults.value = [];
36799
+ } finally {
36800
+ isLoading.value = false;
36801
+ }
36802
+ }, debounceMs);
36803
+ }
36804
+ );
36805
+ }
36806
+ const getSearchTermValue = () => unwrapValue(searchTerm);
36807
+ const getFilteredResults = () => {
36808
+ const term = getSearchTermValue();
36809
+ if (serverSearch && term && typeof term === "string" && term.length >= minChars) {
36810
+ return serverResults.value;
36811
+ }
36812
+ return searchItems(params);
36813
+ };
36814
+ const results = computed(() => getFilteredResults());
36815
+ const resultCount = computed(() => results.value.length);
36816
+ const hasResults = computed(() => resultCount.value > 0);
36817
+ const isSearching = computed(() => {
36818
+ const term = getSearchTermValue();
36819
+ return !!term && typeof term === "string" && term.length >= minChars;
36820
+ });
36821
+ return {
36822
+ results,
36823
+ resultCount,
36824
+ hasResults,
36825
+ isSearching,
36826
+ isLoading: computed(() => isLoading.value)
36827
+ };
36828
+ }
36632
36829
  export {
36633
36830
  _sfc_main$1e as Accordion,
36634
36831
  AccordionItem,
@@ -36716,6 +36913,7 @@ export {
36716
36913
  bagelInjectionKey,
36717
36914
  bindAttrs,
36718
36915
  classify,
36916
+ clearHtml,
36719
36917
  copyText,
36720
36918
  debounce,
36721
36919
  denullify,
@@ -36733,9 +36931,11 @@ export {
36733
36931
  keyToLabel,
36734
36932
  localRef,
36735
36933
  normalizeDimension,
36934
+ normalizeText,
36736
36935
  normalizeURL,
36737
36936
  pathKeyToURL,
36738
36937
  provideBagelFormState,
36938
+ searchItems,
36739
36939
  sleep,
36740
36940
  slugify,
36741
36941
  timeAgo,
@@ -36753,6 +36953,7 @@ export {
36753
36953
  useLocalStorage,
36754
36954
  useModal,
36755
36955
  usePolling,
36956
+ useSearch,
36756
36957
  useValidateFieldValue,
36757
36958
  vDraggable
36758
36959
  };