@bagelink/vue 0.0.1004 → 0.0.1006

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
@@ -3,6 +3,42 @@ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, {
3
3
  var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { defineComponent, reactive, provide, openBlock, createElementBlock, renderSlot, ref, computed, inject, watch, normalizeClass, createElementVNode, unref, createVNode, createCommentVNode, toDisplayString, Transition, withCtx, isRef, Fragment, renderList, createBlock, useSlots, resolveDirective, withDirectives, resolveDynamicComponent, mergeProps, withModifiers, withKeys, createTextVNode, normalizeStyle, onMounted, onUnmounted, resolveComponent, mergeModels, useModel, pushScopeId, popScopeId, nextTick, normalizeProps, guardReactiveProps, withScopeId, createApp, h as h$2, onBeforeUnmount, vModelCheckbox, vModelText, toRef, createSlots, Teleport, render as render$e, onBeforeUpdate, vShow, getCurrentScope, onScopeDispose, vModelRadio, TransitionGroup, vModelDynamic, useCssVars, getCurrentInstance, shallowRef, markRaw } from "vue";
5
5
  import { RouterLink } from "vue-router";
6
+ const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7
+ __proto__: null,
8
+ get bglForm() {
9
+ return bglForm;
10
+ },
11
+ get checkField() {
12
+ return checkField;
13
+ },
14
+ get dateField() {
15
+ return dateField;
16
+ },
17
+ get findBglFieldById() {
18
+ return findBglFieldById;
19
+ },
20
+ get frmRow() {
21
+ return frmRow;
22
+ },
23
+ get getBaseField() {
24
+ return getBaseField;
25
+ },
26
+ get numField() {
27
+ return numField;
28
+ },
29
+ get richText() {
30
+ return richText;
31
+ },
32
+ get slctField() {
33
+ return slctField;
34
+ },
35
+ get telField() {
36
+ return telField;
37
+ },
38
+ get txtField() {
39
+ return txtField;
40
+ }
41
+ }, Symbol.toStringTag, { value: "Module" }));
6
42
  const _sfc_main$11 = /* @__PURE__ */ defineComponent({
7
43
  __name: "Accordion",
8
44
  setup(__props) {
@@ -19,7 +55,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
19
55
  });
20
56
  const _hoisted_1$P = ["aria-expanded", "aria-controls"];
21
57
  const _hoisted_2$v = { class: "accordion-label" };
22
- const _hoisted_3$o = ["id", "aria-hidden"];
58
+ const _hoisted_3$p = ["id", "aria-hidden"];
23
59
  const _sfc_main$10 = /* @__PURE__ */ defineComponent({
24
60
  __name: "AccordionItem",
25
61
  props: {
@@ -104,7 +140,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
104
140
  "aria-hidden": unref(isOpen) ? "false" : "true"
105
141
  }, [
106
142
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
107
- ], 8, _hoisted_3$o)) : createCommentVNode("", true)
143
+ ], 8, _hoisted_3$p)) : createCommentVNode("", true)
108
144
  ]),
109
145
  _: 3
110
146
  })
@@ -372,7 +408,8 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
372
408
  });
373
409
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-2f3caf93"]]);
374
410
  const _hoisted_1$K = ["src"];
375
- const _hoisted_2$t = ["src", "autoplay", "muted", "loop", "controls"];
411
+ const _hoisted_2$t = ["autoplay", "muted", "loop", "controls", "playsinline"];
412
+ const _hoisted_3$o = ["src", "type"];
376
413
  const _sfc_main$W = /* @__PURE__ */ defineComponent({
377
414
  __name: "BglVideo",
378
415
  props: {
@@ -381,16 +418,36 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
381
418
  mute: { type: Boolean },
382
419
  aspectRatio: {},
383
420
  controls: { type: Boolean },
384
- loop: { type: Boolean }
421
+ loop: { type: Boolean },
422
+ status: {},
423
+ playsinline: { type: Boolean }
385
424
  },
386
- setup(__props) {
425
+ setup(__props, { expose: __expose }) {
387
426
  const props2 = __props;
427
+ const videoFormat = computed(() => {
428
+ var _a2, _b, _c;
429
+ return ((_c = (_b = (_a2 = props2.src) == null ? void 0 : _a2.split(".").pop()) == null ? void 0 : _b.split("?").shift()) == null ? void 0 : _c.toLowerCase()) || "mp4";
430
+ });
388
431
  const aspectRatio = computed(
389
432
  () => {
390
433
  var _a2;
391
434
  return ((_a2 = props2.aspectRatio) == null ? void 0 : _a2.replace(":", "/")) || "16/9";
392
435
  }
393
436
  );
437
+ const video = ref();
438
+ function play() {
439
+ var _a2;
440
+ (_a2 = video.value) == null ? void 0 : _a2.play();
441
+ }
442
+ function pause() {
443
+ var _a2;
444
+ (_a2 = video.value) == null ? void 0 : _a2.pause();
445
+ }
446
+ watch(() => props2.status, (status) => {
447
+ if (status === "play") play();
448
+ if (status === "pause") pause();
449
+ });
450
+ __expose({ play, pause });
394
451
  const embedType = computed(() => {
395
452
  const youtubeRegex2 = /youtube\.com|youtu\.be/;
396
453
  if (youtubeRegex2.test(props2.src || "")) return "YouTube";
@@ -432,19 +489,25 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
432
489
  allow: "autoplay"
433
490
  }, null, 12, _hoisted_1$K)) : _ctx.src ? (openBlock(), createElementBlock("video", {
434
491
  key: 1,
435
- src: _ctx.src,
492
+ ref_key: "video",
493
+ ref: video,
436
494
  autoplay: _ctx.autoplay,
437
495
  muted: _ctx.mute,
438
496
  loop: _ctx.loop,
439
497
  style: normalizeStyle({ aspectRatio: aspectRatio.value }),
440
498
  controls: _ctx.controls,
441
- playsinline: ""
442
- }, null, 12, _hoisted_2$t)) : createCommentVNode("", true)
499
+ playsinline: _ctx.playsinline
500
+ }, [
501
+ createElementVNode("source", {
502
+ src: _ctx.src,
503
+ type: `video/${videoFormat.value}`
504
+ }, null, 8, _hoisted_3$o)
505
+ ], 12, _hoisted_2$t)) : createCommentVNode("", true)
443
506
  ], 2);
444
507
  };
445
508
  }
446
509
  });
447
- const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-732c510b"]]);
510
+ const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-006552f6"]]);
448
511
  const _hoisted_1$J = {
449
512
  key: 0,
450
513
  class: "card_label"
@@ -7488,9 +7551,10 @@ async function convertValueToCoords(state2, options) {
7488
7551
  crossAxis: 0,
7489
7552
  alignmentAxis: null
7490
7553
  } : {
7491
- mainAxis: rawValue.mainAxis || 0,
7492
- crossAxis: rawValue.crossAxis || 0,
7493
- alignmentAxis: rawValue.alignmentAxis
7554
+ mainAxis: 0,
7555
+ crossAxis: 0,
7556
+ alignmentAxis: null,
7557
+ ...rawValue
7494
7558
  };
7495
7559
  if (alignment && typeof alignmentAxis === "number") {
7496
7560
  crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
@@ -7595,11 +7659,7 @@ const shift = function(options) {
7595
7659
  ...limitedCoords,
7596
7660
  data: {
7597
7661
  x: limitedCoords.x - x2,
7598
- y: limitedCoords.y - y2,
7599
- enabled: {
7600
- [mainAxis]: checkMainAxis,
7601
- [crossAxis]: checkCrossAxis
7602
- }
7662
+ y: limitedCoords.y - y2
7603
7663
  }
7604
7664
  };
7605
7665
  }
@@ -7613,7 +7673,6 @@ const size = function(options) {
7613
7673
  name: "size",
7614
7674
  options,
7615
7675
  async fn(state2) {
7616
- var _state$middlewareData, _state$middlewareData2;
7617
7676
  const {
7618
7677
  placement,
7619
7678
  rects,
@@ -7649,11 +7708,10 @@ const size = function(options) {
7649
7708
  const noShift = !state2.middlewareData.shift;
7650
7709
  let availableHeight = overflowAvailableHeight;
7651
7710
  let availableWidth = overflowAvailableWidth;
7652
- if ((_state$middlewareData = state2.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
7653
- availableWidth = maximumClippingWidth;
7654
- }
7655
- if ((_state$middlewareData2 = state2.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
7656
- availableHeight = maximumClippingHeight;
7711
+ if (isYAxis) {
7712
+ availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
7713
+ } else {
7714
+ availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
7657
7715
  }
7658
7716
  if (noShift && !alignment) {
7659
7717
  const xMin = max(overflow.left, 0);
@@ -9680,6 +9738,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
9680
9738
  return data2;
9681
9739
  }
9682
9740
  function getFieldData(obj, key) {
9741
+ if (typeof obj !== "object" || obj === null) return obj;
9683
9742
  const keys4 = key.split(objPathRegex);
9684
9743
  let result2 = obj;
9685
9744
  for (const k2 of keys4) {
@@ -18988,10 +19047,10 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
18988
19047
  }
18989
19048
  }
18990
19049
  try {
19050
+ await appendScript("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");
18991
19051
  const response = await fetch(src);
18992
19052
  const blob = await response.blob();
18993
- const { default: heic2any } = await import("./heic2any-BrqcNzfV.js").then((n2) => n2.h);
18994
- const convertedBlob = await heic2any({ blob });
19053
+ const convertedBlob = await window.heic2any({ blob });
18995
19054
  imageSrc.value = URL.createObjectURL(convertedBlob);
18996
19055
  if ("caches" in window) {
18997
19056
  try {
@@ -19026,7 +19085,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
19026
19085
  };
19027
19086
  }
19028
19087
  });
19029
- const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-3f8cf457"]]);
19088
+ const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-a96b25a8"]]);
19030
19089
  const _hoisted_1$w = { class: "bagel-input" };
19031
19090
  const _hoisted_2$k = {
19032
19091
  key: 0,
@@ -20362,6 +20421,7 @@ function formatting(state2) {
20362
20421
  };
20363
20422
  return { text, block, list, clear };
20364
20423
  }
20424
+ const { frmRow: frmRow$1, numField: numField$1 } = bagelFormUtils;
20365
20425
  function insertImage(modal, state2) {
20366
20426
  const { range: range2, doc } = state2;
20367
20427
  if (!range2 || !doc) return;
@@ -20369,15 +20429,31 @@ function insertImage(modal, state2) {
20369
20429
  title: "Upload Image",
20370
20430
  schema: [
20371
20431
  { id: "src", $el: "file", attrs: { bindkey: "url" } },
20372
- { id: "alt", $el: "text", label: "Alt Text" }
20432
+ { id: "alt", $el: "text", label: "Alt Text" },
20433
+ frmRow$1(
20434
+ numField$1("width", "Width", { min: 1 }),
20435
+ numField$1("height", "Height", { min: 1 })
20436
+ ),
20437
+ { id: "figcaption", $el: "check", label: "Show Caption" }
20373
20438
  ],
20374
20439
  onSubmit: (data2) => {
20375
20440
  if (data2.src) {
20376
20441
  const img = doc.createElement("img");
20377
- img.src = data2.src;
20378
- img.alt = data2.alt;
20442
+ Object.assign(img, {
20443
+ src: data2.src,
20444
+ alt: data2.alt || "",
20445
+ width: data2.width || void 0,
20446
+ height: data2.height || void 0
20447
+ });
20448
+ const node = data2.figcaption ? (() => {
20449
+ const figcaption = doc.createElement("figcaption");
20450
+ figcaption.textContent = data2.alt;
20451
+ const figure = doc.createElement("figure");
20452
+ figure.append(img, figcaption);
20453
+ return figure;
20454
+ })() : img;
20379
20455
  range2.collapse(false);
20380
- range2.insertNode(img);
20456
+ range2.insertNode(node);
20381
20457
  }
20382
20458
  }
20383
20459
  });
@@ -20812,7 +20888,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
20812
20888
  __name: "SelectInput",
20813
20889
  props: {
20814
20890
  options: {},
20815
- placeholder: {},
20891
+ placeholder: { default: "Select" },
20816
20892
  disabled: { type: Boolean },
20817
20893
  modelValue: {},
20818
20894
  searchable: { type: Boolean },
@@ -20824,14 +20900,14 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
20824
20900
  hideLabel: { type: Boolean },
20825
20901
  defaultValue: {},
20826
20902
  clearable: { type: Boolean },
20827
- searchPlaceholder: {},
20828
- onSearch: { type: Function }
20903
+ searchPlaceholder: { default: "Search" },
20904
+ onSearch: {}
20829
20905
  },
20830
20906
  emits: ["update:modelValue"],
20831
20907
  setup(__props, { emit: __emit }) {
20832
20908
  const props2 = __props;
20833
20909
  const emit2 = __emit;
20834
- const searchPlaceholder = computed(() => props2.searchPlaceholder || "Search");
20910
+ const searchPlaceholder = computed(() => props2.searchPlaceholder);
20835
20911
  const searchInput = ref();
20836
20912
  let selectedItems = ref([]);
20837
20913
  const selectedItemCount = computed(() => selectedItems.value.length ?? 0);
@@ -20840,7 +20916,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
20840
20916
  let selected = ref(false);
20841
20917
  let open = ref(false);
20842
20918
  const selectedLabel = computed(() => {
20843
- if (selectedItemCount.value === 0) return props2.placeholder || "Select";
20919
+ if (selectedItemCount.value === 0) return props2.placeholder;
20844
20920
  if (selectedItemCount.value > 4) {
20845
20921
  const str = selectedItems.value.slice(0, 4).map((item) => getLabel(item)).join(", ");
20846
20922
  return `${str}... +${selectedItemCount.value - 4}`;
@@ -21112,7 +21188,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
21112
21188
  };
21113
21189
  }
21114
21190
  });
21115
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-982f5078"]]);
21191
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-9574c8a2"]]);
21116
21192
  /*!
21117
21193
  * Signature Pad v5.0.4 | https://github.com/szimek/signature_pad
21118
21194
  * (c) 2024 Szymon Nowak | Released under the MIT license
@@ -29714,8 +29790,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
29714
29790
  _directive_tooltip,
29715
29791
  {
29716
29792
  content: nav.label,
29717
- disabled: _ctx.open,
29718
- class: ["nav-tooltip"]
29793
+ disabled: _ctx.open
29719
29794
  },
29720
29795
  void 0,
29721
29796
  { right: true }
@@ -29731,7 +29806,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
29731
29806
  };
29732
29807
  }
29733
29808
  });
29734
- const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-51cedd11"]]);
29809
+ const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-0cd6a0fb"]]);
29735
29810
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
29736
29811
  __name: "Skeleton",
29737
29812
  props: {
@@ -30588,8 +30663,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
30588
30663
  },
30589
30664
  setup(__props) {
30590
30665
  useCssVars((_ctx) => ({
30591
- "5217b464": computedBackgroundColor.value,
30592
- "0b2b363f": cumputedTextColor.value
30666
+ "33699ebd": computedBackgroundColor.value,
30667
+ "bd23d150": cumputedTextColor.value
30593
30668
  }));
30594
30669
  const props2 = __props;
30595
30670
  const slots = useSlots();
@@ -30651,6 +30726,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
30651
30726
  _ctx.btn ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
30652
30727
  createVNode(unref(Btn), mergeProps({
30653
30728
  class: "bgl_pill-btn",
30729
+ round: "",
30654
30730
  thin: ""
30655
30731
  }, _ctx.btn), null, 16)
30656
30732
  ])) : createCommentVNode("", true)
@@ -30671,6 +30747,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
30671
30747
  _ctx.btnEnd ? (openBlock(), createElementBlock("div", _hoisted_8$2, [
30672
30748
  createVNode(unref(Btn), mergeProps({
30673
30749
  class: "bgl_pill-btn",
30750
+ round: "",
30674
30751
  thin: ""
30675
30752
  }, _ctx.btnEnd), null, 16)
30676
30753
  ])) : createCommentVNode("", true)
@@ -30680,7 +30757,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
30680
30757
  };
30681
30758
  }
30682
30759
  });
30683
- const Pill = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-5476be6c"]]);
30760
+ const Pill = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-4249cc3e"]]);
30684
30761
  const _sfc_main$5 = {};
30685
30762
  function _sfc_render$1(_ctx, _cache) {
30686
30763
  const _component_router_view = resolveComponent("router-view");
@@ -31301,25 +31378,26 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31301
31378
  emits: /* @__PURE__ */ mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
31302
31379
  setup(__props, { emit: __emit }) {
31303
31380
  useCssVars((_ctx) => ({
31304
- "c3b285e8": unref(computedItemHeight)
31381
+ "0469f9a7": unref(computedItemHeight)
31305
31382
  }));
31306
31383
  const emit2 = __emit;
31384
+ const NON_DIGIT_REGEX = /[^\d.-]/g;
31307
31385
  const slots = useSlots();
31308
31386
  const loading = useModel(__props, "loading");
31309
31387
  const itemHeight = useModel(__props, "itemHeight");
31310
- const computedItemHeight = computed(() => `${itemHeight.value}px`);
31311
- let sortField = ref("");
31312
- let sortDirection = ref("ASC");
31313
31388
  const selectedItems = useModel(
31314
31389
  __props,
31315
31390
  "selectedItems",
31316
31391
  {
31317
- set: (value) => {
31318
- setTimeout(updateAllSelectorState, 0);
31319
- return value;
31320
- }
31392
+ set: (value) => value
31321
31393
  }
31322
31394
  );
31395
+ let sortField = ref("");
31396
+ let sortDirection = ref("ASC");
31397
+ const allSelectorEl = ref();
31398
+ const lastItemEl = ref();
31399
+ const computedSelectedItems = computed(() => selectedItems.value);
31400
+ const computedItemHeight = computed(() => `${itemHeight.value}px`);
31323
31401
  const isSelectable = computed(() => __props.selectable === true && Array.isArray(selectedItems.value));
31324
31402
  const computedSortField = computed(() => `_transformed_${sortField.value}`);
31325
31403
  const computedSchema = computed(() => useBglSchema({
@@ -31327,21 +31405,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31327
31405
  showFields: __props.showFields,
31328
31406
  data: __props.data
31329
31407
  }));
31330
- function transform(rowData) {
31331
- var _a2;
31332
- const obj = { ...rowData };
31333
- const schemaFields = computedSchema.value.filter((f2) => f2.id);
31334
- for (const field of schemaFields) {
31335
- const fieldData = rowData[`${field.id}`];
31336
- const newFieldVal = (_a2 = field.transform) == null ? void 0 : _a2.call(field, fieldData, rowData);
31337
- Object.assign(obj, {
31338
- [`${field.id}`]: fieldData,
31339
- [`_transformed_${field.id}`]: newFieldVal
31340
- });
31341
- }
31342
- return obj;
31343
- }
31344
- const NON_DIGIT_REGEX = /[^\d.-]/g;
31345
31408
  const computedData = computed(() => {
31346
31409
  if (!sortField.value || __props.useServerSort === true) return __props.data.map(transform);
31347
31410
  return __props.data.map(transform).sort(
@@ -31367,6 +31430,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31367
31430
  }
31368
31431
  );
31369
31432
  });
31433
+ function transform(rowData) {
31434
+ var _a2;
31435
+ const obj = { ...rowData };
31436
+ const schemaFields = computedSchema.value.filter((f2) => f2.id);
31437
+ for (const field of schemaFields) {
31438
+ const fieldData = rowData[`${field.id}`];
31439
+ const newFieldVal = (_a2 = field.transform) == null ? void 0 : _a2.call(field, fieldData, rowData);
31440
+ Object.assign(obj, {
31441
+ [`${field.id}`]: fieldData,
31442
+ [`_transformed_${field.id}`]: newFieldVal
31443
+ });
31444
+ }
31445
+ return obj;
31446
+ }
31370
31447
  function sort2(fieldname) {
31371
31448
  if (sortField.value === fieldname) {
31372
31449
  if (sortDirection.value === "ASC") sortDirection.value = "DESC";
@@ -31384,50 +31461,47 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31384
31461
  overscan: 10
31385
31462
  }
31386
31463
  );
31387
- watch(
31388
- () => computedData.value.length,
31389
- (newLength, oldLength) => {
31390
- if (newLength === oldLength || __props.onLastItemVisible !== void 0) return;
31391
- scrollTo(0);
31392
- }
31393
- );
31394
- const allSelector = ref();
31395
- const computedSelectedItems = computed(() => selectedItems.value);
31396
31464
  function updateAllSelectorState() {
31397
- if (!allSelector.value) return;
31465
+ if (!allSelectorEl.value) return;
31398
31466
  const allSelected = computedData.value.length === computedSelectedItems.value.length && computedData.value.every((s2) => s2.id && computedSelectedItems.value.includes(s2.id));
31399
- allSelector.value.checked = allSelected;
31400
- allSelector.value.indeterminate = !allSelected && computedSelectedItems.value.length > 0;
31467
+ allSelectorEl.value.checked = allSelected;
31468
+ allSelectorEl.value.indeterminate = !allSelected && computedSelectedItems.value.length > 0;
31401
31469
  }
31402
31470
  function toggleSelectItem(item) {
31403
31471
  if (computedSelectedItems.value.length === 0) {
31404
31472
  const obj = { ...item };
31405
- Object.keys(obj).forEach((key) => {
31406
- if (key.startsWith("_transformed_")) delete obj[key];
31407
- });
31473
+ Object.keys(obj).forEach((key) => key.startsWith("_transformed_") && delete obj[key]);
31408
31474
  emit2("select", obj);
31409
31475
  return;
31410
31476
  }
31411
31477
  const index2 = computedSelectedItems.value.indexOf(item.id);
31412
- if (index2 > -1) {
31413
- computedSelectedItems.value.splice(index2, 1);
31414
- } else {
31415
- computedSelectedItems.value.push(item.id);
31416
- }
31478
+ index2 > -1 ? computedSelectedItems.value.splice(index2, 1) : computedSelectedItems.value.push(item.id);
31417
31479
  }
31418
31480
  function toggleSelectAll(event) {
31419
31481
  const value = event.target.checked;
31420
31482
  selectedItems.value = value ? computedData.value.map((d2) => d2.id) : [];
31421
31483
  }
31422
- const lastItem = ref();
31423
31484
  async function registerLastItemObserver() {
31424
- await until(() => lastItem.value).toBeTruthy();
31425
- useIntersectionObserver(lastItem.value, ([entry]) => {
31485
+ await until(() => lastItemEl.value).toBeTruthy();
31486
+ useIntersectionObserver(lastItemEl.value, ([entry]) => {
31426
31487
  if (entry.isIntersecting && computedData.value.length) {
31427
31488
  emit2("lastItemVisible");
31428
31489
  }
31429
31490
  });
31430
31491
  }
31492
+ watch(
31493
+ () => computedData.value.length,
31494
+ (newLength, oldLength) => {
31495
+ if (newLength === oldLength || __props.onLastItemVisible !== void 0) return;
31496
+ scrollTo(0);
31497
+ }
31498
+ );
31499
+ watch(
31500
+ () => computedSelectedItems.value.length,
31501
+ () => {
31502
+ updateAllSelectorState();
31503
+ }
31504
+ );
31431
31505
  watch(
31432
31506
  () => loading.value,
31433
31507
  (newLoadingVal, oldLoadingVal) => {
@@ -31447,8 +31521,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31447
31521
  createElementVNode("thead", _hoisted_3$1, [
31448
31522
  unref(isSelectable) ? (openBlock(), createElementBlock("th", _hoisted_4$1, [
31449
31523
  createElementVNode("input", {
31450
- ref_key: "allSelector",
31451
- ref: allSelector,
31524
+ ref_key: "allSelectorEl",
31525
+ ref: allSelectorEl,
31452
31526
  type: "checkbox",
31453
31527
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
31454
31528
  }, ["stop"])),
@@ -31519,8 +31593,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31519
31593
  }), 128)),
31520
31594
  _ctx.onLastItemVisible !== void 0 ? (openBlock(), createElementBlock("tr", {
31521
31595
  key: 0,
31522
- ref_key: "lastItem",
31523
- ref: lastItem
31596
+ ref_key: "lastItemEl",
31597
+ ref: lastItemEl,
31598
+ style: { "height": "1px" }
31524
31599
  }, null, 512)) : createCommentVNode("", true)
31525
31600
  ])
31526
31601
  ])
@@ -31529,7 +31604,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31529
31604
  };
31530
31605
  }
31531
31606
  });
31532
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-fae54756"]]);
31607
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-4a5861ed"]]);
31533
31608
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
31534
31609
  __name: "Title",
31535
31610
  props: {
@@ -32717,20 +32792,6 @@ function findBglFieldById(id, _schema) {
32717
32792
  }
32718
32793
  return void 0;
32719
32794
  }
32720
- const BagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32721
- __proto__: null,
32722
- bglForm,
32723
- checkField,
32724
- dateField,
32725
- findBglFieldById,
32726
- frmRow,
32727
- getBaseField,
32728
- numField,
32729
- richText,
32730
- slctField,
32731
- telField,
32732
- txtField
32733
- }, Symbol.toStringTag, { value: "Module" }));
32734
32795
  const state = reactive({
32735
32796
  defaultLang: "",
32736
32797
  availableLangs: [],
@@ -33546,7 +33607,7 @@ export {
33546
33607
  allCountries,
33547
33608
  appendScript,
33548
33609
  appendStyle,
33549
- BagelFormUtils as bagelFormUtils,
33610
+ bagelFormUtils,
33550
33611
  bagelInjectionKey,
33551
33612
  bindAttrs,
33552
33613
  classify,