@bagelink/vue 0.0.1004 → 0.0.1008

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.
Files changed (37) hide show
  1. package/dist/components/BglVideo.vue.d.ts +8 -1
  2. package/dist/components/BglVideo.vue.d.ts.map +1 -1
  3. package/dist/components/Image.vue.d.ts +5 -0
  4. package/dist/components/Image.vue.d.ts.map +1 -1
  5. package/dist/components/Modal.vue.d.ts.map +1 -1
  6. package/dist/components/ModalForm.vue.d.ts +2 -2
  7. package/dist/components/ModalForm.vue.d.ts.map +1 -1
  8. package/dist/components/TableSchema.vue.d.ts.map +1 -1
  9. package/dist/components/form/BglField.vue.d.ts.map +1 -1
  10. package/dist/components/form/inputs/RichText/composables/useEditor.d.ts.map +1 -1
  11. package/dist/components/form/inputs/RichText/utils/media.d.ts.map +1 -1
  12. package/dist/components/form/inputs/SelectInput.vue.d.ts +23 -35
  13. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  14. package/dist/components/layout/SidebarMenu.vue.d.ts.map +1 -1
  15. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  16. package/dist/index.cjs +196 -124
  17. package/dist/index.mjs +196 -124
  18. package/dist/style.css +766 -169
  19. package/dist/utils/timeAgo.d.ts.map +1 -1
  20. package/package.json +1 -2
  21. package/src/components/BglVideo.vue +28 -3
  22. package/src/components/Btn.vue +2 -2
  23. package/src/components/Image.vue +11 -6
  24. package/src/components/Modal.vue +3 -1
  25. package/src/components/ModalForm.vue +2 -2
  26. package/src/components/Pill.vue +2 -2
  27. package/src/components/TableSchema.vue +60 -71
  28. package/src/components/form/BglField.vue +2 -1
  29. package/src/components/form/inputs/RichText/composables/useEditor.ts +0 -1
  30. package/src/components/form/inputs/RichText/utils/media.ts +27 -5
  31. package/src/components/form/inputs/SelectInput.vue +9 -4
  32. package/src/components/layout/SidebarMenu.vue +3 -5
  33. package/src/components/layout/Tabs.vue +2 -2
  34. package/src/components/layout/TabsNav.vue +4 -2
  35. package/src/styles/layout.css +350 -0
  36. package/src/styles/mobilLayout.css +347 -32
  37. package/src/utils/timeAgo.ts +13 -5
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
  })
@@ -269,7 +305,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
269
305
  };
270
306
  }
271
307
  });
272
- const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-3c0720f5"]]);
308
+ const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-521354bb"]]);
273
309
  const _hoisted_1$M = ["dismissable"];
274
310
  const _hoisted_2$u = { class: "m-0" };
275
311
  const _sfc_main$Z = /* @__PURE__ */ defineComponent({
@@ -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);
@@ -9571,7 +9629,9 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
9571
9629
  if (activeTab && tabsWrap.value) {
9572
9630
  const { offsetLeft, offsetWidth } = activeTab;
9573
9631
  tabsWrap.value.style.setProperty("--indicator-left", `${offsetLeft}px`);
9574
- tabsWrap.value.style.setProperty("--indicator-width", `${offsetWidth}px`);
9632
+ if (tabsWrap.value) {
9633
+ tabsWrap.value.style.setProperty("--indicator-width", `${offsetWidth}px`);
9634
+ }
9575
9635
  }
9576
9636
  }
9577
9637
  function selectTab(tab) {
@@ -9612,7 +9672,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
9612
9672
  return openBlock(), createElementBlock("div", {
9613
9673
  ref_key: "tabsWrap",
9614
9674
  ref: tabsWrap,
9615
- class: normalizeClass(["grid auto-flow-columns relative fit-content bgl_tabs_wrap", { "bgl_flat-tabs": _ctx.flat, "bgl_vertical-tabs": _ctx.vertical }])
9675
+ class: normalizeClass(["grid auto-flow-columns relative fit-content bgl_tabs_wrap overflow-hidden", { "bgl_flat-tabs": _ctx.flat, "bgl_vertical-tabs": _ctx.vertical }])
9616
9676
  }, [
9617
9677
  (openBlock(true), createElementBlock(Fragment, null, renderList(props2.tabs, (tab, i2) => {
9618
9678
  return openBlock(), createElementBlock("button", {
@@ -9632,7 +9692,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
9632
9692
  };
9633
9693
  }
9634
9694
  });
9635
- const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-90649f98"]]);
9695
+ const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-dbce6d28"]]);
9636
9696
  const _sfc_main$O = /* @__PURE__ */ defineComponent({
9637
9697
  __name: "BglField",
9638
9698
  props: {
@@ -9680,6 +9740,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
9680
9740
  return data2;
9681
9741
  }
9682
9742
  function getFieldData(obj, key) {
9743
+ if (typeof obj !== "object" || obj === null) return obj;
9683
9744
  const keys4 = key.split(objPathRegex);
9684
9745
  let result2 = obj;
9685
9746
  for (const k2 of keys4) {
@@ -18988,10 +19049,10 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
18988
19049
  }
18989
19050
  }
18990
19051
  try {
19052
+ await appendScript("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");
18991
19053
  const response = await fetch(src);
18992
19054
  const blob = await response.blob();
18993
- const { default: heic2any } = await import("./heic2any-BrqcNzfV.js").then((n2) => n2.h);
18994
- const convertedBlob = await heic2any({ blob });
19055
+ const convertedBlob = await window.heic2any({ blob });
18995
19056
  imageSrc.value = URL.createObjectURL(convertedBlob);
18996
19057
  if ("caches" in window) {
18997
19058
  try {
@@ -19026,7 +19087,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
19026
19087
  };
19027
19088
  }
19028
19089
  });
19029
- const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-3f8cf457"]]);
19090
+ const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-a96b25a8"]]);
19030
19091
  const _hoisted_1$w = { class: "bagel-input" };
19031
19092
  const _hoisted_2$k = {
19032
19093
  key: 0,
@@ -20362,6 +20423,7 @@ function formatting(state2) {
20362
20423
  };
20363
20424
  return { text, block, list, clear };
20364
20425
  }
20426
+ const { frmRow: frmRow$1, numField: numField$1 } = bagelFormUtils;
20365
20427
  function insertImage(modal, state2) {
20366
20428
  const { range: range2, doc } = state2;
20367
20429
  if (!range2 || !doc) return;
@@ -20369,15 +20431,31 @@ function insertImage(modal, state2) {
20369
20431
  title: "Upload Image",
20370
20432
  schema: [
20371
20433
  { id: "src", $el: "file", attrs: { bindkey: "url" } },
20372
- { id: "alt", $el: "text", label: "Alt Text" }
20434
+ { id: "alt", $el: "text", label: "Alt Text" },
20435
+ frmRow$1(
20436
+ numField$1("width", "Width", { min: 1 }),
20437
+ numField$1("height", "Height", { min: 1 })
20438
+ ),
20439
+ { id: "figcaption", $el: "check", label: "Show Caption" }
20373
20440
  ],
20374
20441
  onSubmit: (data2) => {
20375
20442
  if (data2.src) {
20376
20443
  const img = doc.createElement("img");
20377
- img.src = data2.src;
20378
- img.alt = data2.alt;
20444
+ Object.assign(img, {
20445
+ src: data2.src,
20446
+ alt: data2.alt || "",
20447
+ width: data2.width || void 0,
20448
+ height: data2.height || void 0
20449
+ });
20450
+ const node = data2.figcaption ? (() => {
20451
+ const figcaption = doc.createElement("figcaption");
20452
+ figcaption.textContent = data2.alt;
20453
+ const figure = doc.createElement("figure");
20454
+ figure.append(img, figcaption);
20455
+ return figure;
20456
+ })() : img;
20379
20457
  range2.collapse(false);
20380
- range2.insertNode(img);
20458
+ range2.insertNode(node);
20381
20459
  }
20382
20460
  }
20383
20461
  });
@@ -20812,7 +20890,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
20812
20890
  __name: "SelectInput",
20813
20891
  props: {
20814
20892
  options: {},
20815
- placeholder: {},
20893
+ placeholder: { default: "Select" },
20816
20894
  disabled: { type: Boolean },
20817
20895
  modelValue: {},
20818
20896
  searchable: { type: Boolean },
@@ -20824,14 +20902,14 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
20824
20902
  hideLabel: { type: Boolean },
20825
20903
  defaultValue: {},
20826
20904
  clearable: { type: Boolean },
20827
- searchPlaceholder: {},
20828
- onSearch: { type: Function }
20905
+ searchPlaceholder: { default: "Search" },
20906
+ onSearch: {}
20829
20907
  },
20830
20908
  emits: ["update:modelValue"],
20831
20909
  setup(__props, { emit: __emit }) {
20832
20910
  const props2 = __props;
20833
20911
  const emit2 = __emit;
20834
- const searchPlaceholder = computed(() => props2.searchPlaceholder || "Search");
20912
+ const searchPlaceholder = computed(() => props2.searchPlaceholder);
20835
20913
  const searchInput = ref();
20836
20914
  let selectedItems = ref([]);
20837
20915
  const selectedItemCount = computed(() => selectedItems.value.length ?? 0);
@@ -20840,7 +20918,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
20840
20918
  let selected = ref(false);
20841
20919
  let open = ref(false);
20842
20920
  const selectedLabel = computed(() => {
20843
- if (selectedItemCount.value === 0) return props2.placeholder || "Select";
20921
+ if (selectedItemCount.value === 0) return props2.placeholder;
20844
20922
  if (selectedItemCount.value > 4) {
20845
20923
  const str = selectedItems.value.slice(0, 4).map((item) => getLabel(item)).join(", ");
20846
20924
  return `${str}... +${selectedItemCount.value - 4}`;
@@ -21112,7 +21190,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
21112
21190
  };
21113
21191
  }
21114
21192
  });
21115
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-982f5078"]]);
21193
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-9574c8a2"]]);
21116
21194
  /*!
21117
21195
  * Signature Pad v5.0.4 | https://github.com/szimek/signature_pad
21118
21196
  * (c) 2024 Szymon Nowak | Released under the MIT license
@@ -29669,10 +29747,10 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
29669
29747
  const emit2 = __emit;
29670
29748
  const slots = useSlots();
29671
29749
  let isOpen = ref(props2.open);
29672
- function toggleMenu() {
29750
+ const toggleMenu = useDebounceFn(() => {
29673
29751
  isOpen.value = !isOpen.value;
29674
29752
  emit2("update:open", isOpen.value);
29675
- }
29753
+ });
29676
29754
  return (_ctx, _cache) => {
29677
29755
  const _directive_tooltip = resolveDirective("tooltip");
29678
29756
  return openBlock(), createElementBlock("div", {
@@ -29683,8 +29761,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
29683
29761
  color: "white",
29684
29762
  class: "mb-05 absolute toggleNav z-2 border",
29685
29763
  icon: "keyboard_arrow_right",
29686
- onClick: toggleMenu
29687
- }),
29764
+ onClick: unref(toggleMenu)
29765
+ }, null, 8, ["onClick"]),
29688
29766
  createVNode(unref(_sfc_main$V), { class: "py-1 px-05 h-100 flex column gap-05 rounded relative bg-primary font-light overflow-y" }, {
29689
29767
  default: withCtx(() => [
29690
29768
  !unref(isOpen) || !unref(slots)["brand-open"] ? renderSlot(_ctx.$slots, "brand", { key: 0 }, void 0, true) : createCommentVNode("", true),
@@ -29714,8 +29792,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
29714
29792
  _directive_tooltip,
29715
29793
  {
29716
29794
  content: nav.label,
29717
- disabled: _ctx.open,
29718
- class: ["nav-tooltip"]
29795
+ disabled: _ctx.open
29719
29796
  },
29720
29797
  void 0,
29721
29798
  { right: true }
@@ -29731,7 +29808,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
29731
29808
  };
29732
29809
  }
29733
29810
  });
29734
- const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-51cedd11"]]);
29811
+ const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-ac02125e"]]);
29735
29812
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
29736
29813
  __name: "Skeleton",
29737
29814
  props: {
@@ -30225,8 +30302,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
30225
30302
  style: normalizeStyle({ float: _ctx.side ? "left" : "right" }),
30226
30303
  flat: "",
30227
30304
  icon: "close",
30228
- onClick: closeModal,
30229
- thin: ""
30305
+ thin: "",
30306
+ onClick: closeModal
30230
30307
  }, null, 8, ["style"]),
30231
30308
  _ctx.title ? (openBlock(), createBlock(unref(_sfc_main$3), {
30232
30309
  key: 0,
@@ -30323,7 +30400,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
30323
30400
  width: {},
30324
30401
  dismissable: { type: Boolean },
30325
30402
  actions: {},
30326
- schema: { type: Function },
30403
+ schema: {},
30327
30404
  onSubmit: { type: Function },
30328
30405
  onDelete: { type: Function },
30329
30406
  visible: { type: Boolean },
@@ -30430,7 +30507,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
30430
30507
  };
30431
30508
  }
30432
30509
  });
30433
- const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-6846fbe3"]]);
30510
+ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-3342a563"]]);
30434
30511
  const _hoisted_1$5 = { class: "full-nav" };
30435
30512
  const _hoisted_2$4 = { class: "nav-scroll" };
30436
30513
  const _hoisted_3$3 = { class: "nav-links-wrapper" };
@@ -30588,8 +30665,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
30588
30665
  },
30589
30666
  setup(__props) {
30590
30667
  useCssVars((_ctx) => ({
30591
- "5217b464": computedBackgroundColor.value,
30592
- "0b2b363f": cumputedTextColor.value
30668
+ "33699ebd": computedBackgroundColor.value,
30669
+ "bd23d150": cumputedTextColor.value
30593
30670
  }));
30594
30671
  const props2 = __props;
30595
30672
  const slots = useSlots();
@@ -30651,6 +30728,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
30651
30728
  _ctx.btn ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
30652
30729
  createVNode(unref(Btn), mergeProps({
30653
30730
  class: "bgl_pill-btn",
30731
+ round: "",
30654
30732
  thin: ""
30655
30733
  }, _ctx.btn), null, 16)
30656
30734
  ])) : createCommentVNode("", true)
@@ -30671,6 +30749,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
30671
30749
  _ctx.btnEnd ? (openBlock(), createElementBlock("div", _hoisted_8$2, [
30672
30750
  createVNode(unref(Btn), mergeProps({
30673
30751
  class: "bgl_pill-btn",
30752
+ round: "",
30674
30753
  thin: ""
30675
30754
  }, _ctx.btnEnd), null, 16)
30676
30755
  ])) : createCommentVNode("", true)
@@ -30680,7 +30759,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
30680
30759
  };
30681
30760
  }
30682
30761
  });
30683
- const Pill = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-5476be6c"]]);
30762
+ const Pill = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-4249cc3e"]]);
30684
30763
  const _sfc_main$5 = {};
30685
30764
  function _sfc_render$1(_ctx, _cache) {
30686
30765
  const _component_router_view = resolveComponent("router-view");
@@ -31301,25 +31380,26 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31301
31380
  emits: /* @__PURE__ */ mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
31302
31381
  setup(__props, { emit: __emit }) {
31303
31382
  useCssVars((_ctx) => ({
31304
- "c3b285e8": unref(computedItemHeight)
31383
+ "0469f9a7": unref(computedItemHeight)
31305
31384
  }));
31306
31385
  const emit2 = __emit;
31386
+ const NON_DIGIT_REGEX = /[^\d.-]/g;
31307
31387
  const slots = useSlots();
31308
31388
  const loading = useModel(__props, "loading");
31309
31389
  const itemHeight = useModel(__props, "itemHeight");
31310
- const computedItemHeight = computed(() => `${itemHeight.value}px`);
31311
- let sortField = ref("");
31312
- let sortDirection = ref("ASC");
31313
31390
  const selectedItems = useModel(
31314
31391
  __props,
31315
31392
  "selectedItems",
31316
31393
  {
31317
- set: (value) => {
31318
- setTimeout(updateAllSelectorState, 0);
31319
- return value;
31320
- }
31394
+ set: (value) => value
31321
31395
  }
31322
31396
  );
31397
+ let sortField = ref("");
31398
+ let sortDirection = ref("ASC");
31399
+ const allSelectorEl = ref();
31400
+ const lastItemEl = ref();
31401
+ const computedSelectedItems = computed(() => selectedItems.value);
31402
+ const computedItemHeight = computed(() => `${itemHeight.value}px`);
31323
31403
  const isSelectable = computed(() => __props.selectable === true && Array.isArray(selectedItems.value));
31324
31404
  const computedSortField = computed(() => `_transformed_${sortField.value}`);
31325
31405
  const computedSchema = computed(() => useBglSchema({
@@ -31327,21 +31407,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31327
31407
  showFields: __props.showFields,
31328
31408
  data: __props.data
31329
31409
  }));
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
31410
  const computedData = computed(() => {
31346
31411
  if (!sortField.value || __props.useServerSort === true) return __props.data.map(transform);
31347
31412
  return __props.data.map(transform).sort(
@@ -31367,6 +31432,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31367
31432
  }
31368
31433
  );
31369
31434
  });
31435
+ function transform(rowData) {
31436
+ var _a2;
31437
+ const obj = { ...rowData };
31438
+ const schemaFields = computedSchema.value.filter((f2) => f2.id);
31439
+ for (const field of schemaFields) {
31440
+ const fieldData = rowData[`${field.id}`];
31441
+ const newFieldVal = (_a2 = field.transform) == null ? void 0 : _a2.call(field, fieldData, rowData);
31442
+ Object.assign(obj, {
31443
+ [`${field.id}`]: fieldData,
31444
+ [`_transformed_${field.id}`]: newFieldVal
31445
+ });
31446
+ }
31447
+ return obj;
31448
+ }
31370
31449
  function sort2(fieldname) {
31371
31450
  if (sortField.value === fieldname) {
31372
31451
  if (sortDirection.value === "ASC") sortDirection.value = "DESC";
@@ -31384,50 +31463,47 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31384
31463
  overscan: 10
31385
31464
  }
31386
31465
  );
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
31466
  function updateAllSelectorState() {
31397
- if (!allSelector.value) return;
31467
+ if (!allSelectorEl.value) return;
31398
31468
  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;
31469
+ allSelectorEl.value.checked = allSelected;
31470
+ allSelectorEl.value.indeterminate = !allSelected && computedSelectedItems.value.length > 0;
31401
31471
  }
31402
31472
  function toggleSelectItem(item) {
31403
31473
  if (computedSelectedItems.value.length === 0) {
31404
31474
  const obj = { ...item };
31405
- Object.keys(obj).forEach((key) => {
31406
- if (key.startsWith("_transformed_")) delete obj[key];
31407
- });
31475
+ Object.keys(obj).forEach((key) => key.startsWith("_transformed_") && delete obj[key]);
31408
31476
  emit2("select", obj);
31409
31477
  return;
31410
31478
  }
31411
31479
  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
- }
31480
+ index2 > -1 ? computedSelectedItems.value.splice(index2, 1) : computedSelectedItems.value.push(item.id);
31417
31481
  }
31418
31482
  function toggleSelectAll(event) {
31419
31483
  const value = event.target.checked;
31420
31484
  selectedItems.value = value ? computedData.value.map((d2) => d2.id) : [];
31421
31485
  }
31422
- const lastItem = ref();
31423
31486
  async function registerLastItemObserver() {
31424
- await until(() => lastItem.value).toBeTruthy();
31425
- useIntersectionObserver(lastItem.value, ([entry]) => {
31487
+ await until(() => lastItemEl.value).toBeTruthy();
31488
+ useIntersectionObserver(lastItemEl.value, ([entry]) => {
31426
31489
  if (entry.isIntersecting && computedData.value.length) {
31427
31490
  emit2("lastItemVisible");
31428
31491
  }
31429
31492
  });
31430
31493
  }
31494
+ watch(
31495
+ () => computedData.value.length,
31496
+ (newLength, oldLength) => {
31497
+ if (newLength === oldLength || __props.onLastItemVisible !== void 0) return;
31498
+ scrollTo(0);
31499
+ }
31500
+ );
31501
+ watch(
31502
+ () => computedSelectedItems.value.length,
31503
+ () => {
31504
+ updateAllSelectorState();
31505
+ }
31506
+ );
31431
31507
  watch(
31432
31508
  () => loading.value,
31433
31509
  (newLoadingVal, oldLoadingVal) => {
@@ -31447,8 +31523,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31447
31523
  createElementVNode("thead", _hoisted_3$1, [
31448
31524
  unref(isSelectable) ? (openBlock(), createElementBlock("th", _hoisted_4$1, [
31449
31525
  createElementVNode("input", {
31450
- ref_key: "allSelector",
31451
- ref: allSelector,
31526
+ ref_key: "allSelectorEl",
31527
+ ref: allSelectorEl,
31452
31528
  type: "checkbox",
31453
31529
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
31454
31530
  }, ["stop"])),
@@ -31519,8 +31595,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31519
31595
  }), 128)),
31520
31596
  _ctx.onLastItemVisible !== void 0 ? (openBlock(), createElementBlock("tr", {
31521
31597
  key: 0,
31522
- ref_key: "lastItem",
31523
- ref: lastItem
31598
+ ref_key: "lastItemEl",
31599
+ ref: lastItemEl,
31600
+ style: { "height": "1px" }
31524
31601
  }, null, 512)) : createCommentVNode("", true)
31525
31602
  ])
31526
31603
  ])
@@ -31529,7 +31606,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
31529
31606
  };
31530
31607
  }
31531
31608
  });
31532
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-fae54756"]]);
31609
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-4a5861ed"]]);
31533
31610
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
31534
31611
  __name: "Title",
31535
31612
  props: {
@@ -32717,20 +32794,6 @@ function findBglFieldById(id, _schema) {
32717
32794
  }
32718
32795
  return void 0;
32719
32796
  }
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
32797
  const state = reactive({
32735
32798
  defaultLang: "",
32736
32799
  availableLangs: [],
@@ -33408,6 +33471,7 @@ const translations = {
33408
33471
  minute: "minute",
33409
33472
  second: "second",
33410
33473
  ago: "ago",
33474
+ in: "in",
33411
33475
  justNow: "Just now"
33412
33476
  },
33413
33477
  es: {
@@ -33419,6 +33483,7 @@ const translations = {
33419
33483
  minute: "minuto",
33420
33484
  second: "segundo",
33421
33485
  ago: "hace",
33486
+ in: "en",
33422
33487
  justNow: "Justo ahora"
33423
33488
  },
33424
33489
  fr: {
@@ -33430,6 +33495,7 @@ const translations = {
33430
33495
  minute: "minute",
33431
33496
  second: "seconde",
33432
33497
  ago: "il y a",
33498
+ in: "dans",
33433
33499
  justNow: "À l’instant"
33434
33500
  },
33435
33501
  he: {
@@ -33441,6 +33507,7 @@ const translations = {
33441
33507
  minute: "דקה",
33442
33508
  second: "שנייה",
33443
33509
  ago: "לפני",
33510
+ in: "בעוד",
33444
33511
  justNow: "זה עתה"
33445
33512
  }
33446
33513
  };
@@ -33450,7 +33517,7 @@ function timeAgo(date2, lang = "en") {
33450
33517
  const now = /* @__PURE__ */ new Date();
33451
33518
  const nowNumber = now.getTime();
33452
33519
  const dateNumber = date2.getTime();
33453
- const seconds = Math.floor((nowNumber - dateNumber) / 1e3);
33520
+ const seconds = Math.floor((dateNumber - nowNumber) / 1e3);
33454
33521
  const intervals = [
33455
33522
  { label: "year", seconds: 31536e3 },
33456
33523
  { label: "month", seconds: 2592e3 },
@@ -33462,10 +33529,15 @@ function timeAgo(date2, lang = "en") {
33462
33529
  ];
33463
33530
  const selectedLang = translations[lang];
33464
33531
  for (const interval of intervals) {
33465
- const count2 = Math.floor(seconds / interval.seconds);
33532
+ const count2 = Math.floor(Math.abs(seconds) / interval.seconds);
33466
33533
  if (count2 >= 1) {
33467
- const suffix = lang === "he" ? "" : ` ${selectedLang.ago}`;
33468
- const prefix = lang === "he" ? "לפני " : "";
33534
+ const suffix = seconds < 0 ? ` ${selectedLang.ago}` : "";
33535
+ const prefix = "";
33536
+ if (interval.label === "day" && seconds > 0) {
33537
+ const hours = Math.floor(Math.abs(seconds) % 86400 / 3600);
33538
+ const hourLabel = hours > 1 ? `${selectedLang.hour}s` : selectedLang.hour;
33539
+ return `${prefix}${count2} ${selectedLang[interval.label]}${hours > 0 ? ` ${hours} ${hourLabel}` : ""}${suffix}`;
33540
+ }
33469
33541
  return `${prefix}${count2} ${selectedLang[interval.label]}${suffix}`;
33470
33542
  }
33471
33543
  }
@@ -33546,7 +33618,7 @@ export {
33546
33618
  allCountries,
33547
33619
  appendScript,
33548
33620
  appendStyle,
33549
- BagelFormUtils as bagelFormUtils,
33621
+ bagelFormUtils,
33550
33622
  bagelInjectionKey,
33551
33623
  bindAttrs,
33552
33624
  classify,