@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.cjs CHANGED
@@ -5,6 +5,42 @@ var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "
5
5
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
6
  const vue = require("vue");
7
7
  const vueRouter = require("vue-router");
8
+ const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9
+ __proto__: null,
10
+ get bglForm() {
11
+ return bglForm;
12
+ },
13
+ get checkField() {
14
+ return checkField;
15
+ },
16
+ get dateField() {
17
+ return dateField;
18
+ },
19
+ get findBglFieldById() {
20
+ return findBglFieldById;
21
+ },
22
+ get frmRow() {
23
+ return frmRow;
24
+ },
25
+ get getBaseField() {
26
+ return getBaseField;
27
+ },
28
+ get numField() {
29
+ return numField;
30
+ },
31
+ get richText() {
32
+ return richText;
33
+ },
34
+ get slctField() {
35
+ return slctField;
36
+ },
37
+ get telField() {
38
+ return telField;
39
+ },
40
+ get txtField() {
41
+ return txtField;
42
+ }
43
+ }, Symbol.toStringTag, { value: "Module" }));
8
44
  const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
9
45
  __name: "Accordion",
10
46
  setup(__props) {
@@ -21,7 +57,7 @@ const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
21
57
  });
22
58
  const _hoisted_1$P = ["aria-expanded", "aria-controls"];
23
59
  const _hoisted_2$v = { class: "accordion-label" };
24
- const _hoisted_3$o = ["id", "aria-hidden"];
60
+ const _hoisted_3$p = ["id", "aria-hidden"];
25
61
  const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
26
62
  __name: "AccordionItem",
27
63
  props: {
@@ -106,7 +142,7 @@ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
106
142
  "aria-hidden": vue.unref(isOpen) ? "false" : "true"
107
143
  }, [
108
144
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
109
- ], 8, _hoisted_3$o)) : vue.createCommentVNode("", true)
145
+ ], 8, _hoisted_3$p)) : vue.createCommentVNode("", true)
110
146
  ]),
111
147
  _: 3
112
148
  })
@@ -271,7 +307,7 @@ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
271
307
  };
272
308
  }
273
309
  });
274
- const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-3c0720f5"]]);
310
+ const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-521354bb"]]);
275
311
  const _hoisted_1$M = ["dismissable"];
276
312
  const _hoisted_2$u = { class: "m-0" };
277
313
  const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
@@ -374,7 +410,8 @@ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
374
410
  });
375
411
  const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-2f3caf93"]]);
376
412
  const _hoisted_1$K = ["src"];
377
- const _hoisted_2$t = ["src", "autoplay", "muted", "loop", "controls"];
413
+ const _hoisted_2$t = ["autoplay", "muted", "loop", "controls", "playsinline"];
414
+ const _hoisted_3$o = ["src", "type"];
378
415
  const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
379
416
  __name: "BglVideo",
380
417
  props: {
@@ -383,16 +420,36 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
383
420
  mute: { type: Boolean },
384
421
  aspectRatio: {},
385
422
  controls: { type: Boolean },
386
- loop: { type: Boolean }
423
+ loop: { type: Boolean },
424
+ status: {},
425
+ playsinline: { type: Boolean }
387
426
  },
388
- setup(__props) {
427
+ setup(__props, { expose: __expose }) {
389
428
  const props2 = __props;
429
+ const videoFormat = vue.computed(() => {
430
+ var _a2, _b, _c;
431
+ return ((_c = (_b = (_a2 = props2.src) == null ? void 0 : _a2.split(".").pop()) == null ? void 0 : _b.split("?").shift()) == null ? void 0 : _c.toLowerCase()) || "mp4";
432
+ });
390
433
  const aspectRatio = vue.computed(
391
434
  () => {
392
435
  var _a2;
393
436
  return ((_a2 = props2.aspectRatio) == null ? void 0 : _a2.replace(":", "/")) || "16/9";
394
437
  }
395
438
  );
439
+ const video = vue.ref();
440
+ function play() {
441
+ var _a2;
442
+ (_a2 = video.value) == null ? void 0 : _a2.play();
443
+ }
444
+ function pause() {
445
+ var _a2;
446
+ (_a2 = video.value) == null ? void 0 : _a2.pause();
447
+ }
448
+ vue.watch(() => props2.status, (status) => {
449
+ if (status === "play") play();
450
+ if (status === "pause") pause();
451
+ });
452
+ __expose({ play, pause });
396
453
  const embedType = vue.computed(() => {
397
454
  const youtubeRegex2 = /youtube\.com|youtu\.be/;
398
455
  if (youtubeRegex2.test(props2.src || "")) return "YouTube";
@@ -434,19 +491,25 @@ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
434
491
  allow: "autoplay"
435
492
  }, null, 12, _hoisted_1$K)) : _ctx.src ? (vue.openBlock(), vue.createElementBlock("video", {
436
493
  key: 1,
437
- src: _ctx.src,
494
+ ref_key: "video",
495
+ ref: video,
438
496
  autoplay: _ctx.autoplay,
439
497
  muted: _ctx.mute,
440
498
  loop: _ctx.loop,
441
499
  style: vue.normalizeStyle({ aspectRatio: aspectRatio.value }),
442
500
  controls: _ctx.controls,
443
- playsinline: ""
444
- }, null, 12, _hoisted_2$t)) : vue.createCommentVNode("", true)
501
+ playsinline: _ctx.playsinline
502
+ }, [
503
+ vue.createElementVNode("source", {
504
+ src: _ctx.src,
505
+ type: `video/${videoFormat.value}`
506
+ }, null, 8, _hoisted_3$o)
507
+ ], 12, _hoisted_2$t)) : vue.createCommentVNode("", true)
445
508
  ], 2);
446
509
  };
447
510
  }
448
511
  });
449
- const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-732c510b"]]);
512
+ const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-006552f6"]]);
450
513
  const _hoisted_1$J = {
451
514
  key: 0,
452
515
  class: "card_label"
@@ -7490,9 +7553,10 @@ async function convertValueToCoords(state2, options) {
7490
7553
  crossAxis: 0,
7491
7554
  alignmentAxis: null
7492
7555
  } : {
7493
- mainAxis: rawValue.mainAxis || 0,
7494
- crossAxis: rawValue.crossAxis || 0,
7495
- alignmentAxis: rawValue.alignmentAxis
7556
+ mainAxis: 0,
7557
+ crossAxis: 0,
7558
+ alignmentAxis: null,
7559
+ ...rawValue
7496
7560
  };
7497
7561
  if (alignment && typeof alignmentAxis === "number") {
7498
7562
  crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
@@ -7597,11 +7661,7 @@ const shift = function(options) {
7597
7661
  ...limitedCoords,
7598
7662
  data: {
7599
7663
  x: limitedCoords.x - x2,
7600
- y: limitedCoords.y - y2,
7601
- enabled: {
7602
- [mainAxis]: checkMainAxis,
7603
- [crossAxis]: checkCrossAxis
7604
- }
7664
+ y: limitedCoords.y - y2
7605
7665
  }
7606
7666
  };
7607
7667
  }
@@ -7615,7 +7675,6 @@ const size = function(options) {
7615
7675
  name: "size",
7616
7676
  options,
7617
7677
  async fn(state2) {
7618
- var _state$middlewareData, _state$middlewareData2;
7619
7678
  const {
7620
7679
  placement,
7621
7680
  rects,
@@ -7651,11 +7710,10 @@ const size = function(options) {
7651
7710
  const noShift = !state2.middlewareData.shift;
7652
7711
  let availableHeight = overflowAvailableHeight;
7653
7712
  let availableWidth = overflowAvailableWidth;
7654
- if ((_state$middlewareData = state2.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
7655
- availableWidth = maximumClippingWidth;
7656
- }
7657
- if ((_state$middlewareData2 = state2.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
7658
- availableHeight = maximumClippingHeight;
7713
+ if (isYAxis) {
7714
+ availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
7715
+ } else {
7716
+ availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
7659
7717
  }
7660
7718
  if (noShift && !alignment) {
7661
7719
  const xMin = max(overflow.left, 0);
@@ -9573,7 +9631,9 @@ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
9573
9631
  if (activeTab && tabsWrap.value) {
9574
9632
  const { offsetLeft, offsetWidth } = activeTab;
9575
9633
  tabsWrap.value.style.setProperty("--indicator-left", `${offsetLeft}px`);
9576
- tabsWrap.value.style.setProperty("--indicator-width", `${offsetWidth}px`);
9634
+ if (tabsWrap.value) {
9635
+ tabsWrap.value.style.setProperty("--indicator-width", `${offsetWidth}px`);
9636
+ }
9577
9637
  }
9578
9638
  }
9579
9639
  function selectTab(tab) {
@@ -9614,7 +9674,7 @@ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
9614
9674
  return vue.openBlock(), vue.createElementBlock("div", {
9615
9675
  ref_key: "tabsWrap",
9616
9676
  ref: tabsWrap,
9617
- class: vue.normalizeClass(["grid auto-flow-columns relative fit-content bgl_tabs_wrap", { "bgl_flat-tabs": _ctx.flat, "bgl_vertical-tabs": _ctx.vertical }])
9677
+ class: vue.normalizeClass(["grid auto-flow-columns relative fit-content bgl_tabs_wrap overflow-hidden", { "bgl_flat-tabs": _ctx.flat, "bgl_vertical-tabs": _ctx.vertical }])
9618
9678
  }, [
9619
9679
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props2.tabs, (tab, i2) => {
9620
9680
  return vue.openBlock(), vue.createElementBlock("button", {
@@ -9634,7 +9694,7 @@ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
9634
9694
  };
9635
9695
  }
9636
9696
  });
9637
- const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-90649f98"]]);
9697
+ const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-dbce6d28"]]);
9638
9698
  const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
9639
9699
  __name: "BglField",
9640
9700
  props: {
@@ -9682,6 +9742,7 @@ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
9682
9742
  return data2;
9683
9743
  }
9684
9744
  function getFieldData(obj, key) {
9745
+ if (typeof obj !== "object" || obj === null) return obj;
9685
9746
  const keys4 = key.split(objPathRegex);
9686
9747
  let result2 = obj;
9687
9748
  for (const k2 of keys4) {
@@ -18990,10 +19051,10 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
18990
19051
  }
18991
19052
  }
18992
19053
  try {
19054
+ await appendScript("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");
18993
19055
  const response = await fetch(src);
18994
19056
  const blob = await response.blob();
18995
- const { default: heic2any } = await Promise.resolve().then(() => require("./heic2any-C8KwH72N.cjs")).then((n2) => n2.heic2any);
18996
- const convertedBlob = await heic2any({ blob });
19057
+ const convertedBlob = await window.heic2any({ blob });
18997
19058
  imageSrc.value = URL.createObjectURL(convertedBlob);
18998
19059
  if ("caches" in window) {
18999
19060
  try {
@@ -19028,7 +19089,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
19028
19089
  };
19029
19090
  }
19030
19091
  });
19031
- const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-3f8cf457"]]);
19092
+ const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-a96b25a8"]]);
19032
19093
  const _hoisted_1$w = { class: "bagel-input" };
19033
19094
  const _hoisted_2$k = {
19034
19095
  key: 0,
@@ -20364,6 +20425,7 @@ function formatting(state2) {
20364
20425
  };
20365
20426
  return { text, block, list, clear };
20366
20427
  }
20428
+ const { frmRow: frmRow$1, numField: numField$1 } = bagelFormUtils;
20367
20429
  function insertImage(modal, state2) {
20368
20430
  const { range: range2, doc } = state2;
20369
20431
  if (!range2 || !doc) return;
@@ -20371,15 +20433,31 @@ function insertImage(modal, state2) {
20371
20433
  title: "Upload Image",
20372
20434
  schema: [
20373
20435
  { id: "src", $el: "file", attrs: { bindkey: "url" } },
20374
- { id: "alt", $el: "text", label: "Alt Text" }
20436
+ { id: "alt", $el: "text", label: "Alt Text" },
20437
+ frmRow$1(
20438
+ numField$1("width", "Width", { min: 1 }),
20439
+ numField$1("height", "Height", { min: 1 })
20440
+ ),
20441
+ { id: "figcaption", $el: "check", label: "Show Caption" }
20375
20442
  ],
20376
20443
  onSubmit: (data2) => {
20377
20444
  if (data2.src) {
20378
20445
  const img = doc.createElement("img");
20379
- img.src = data2.src;
20380
- img.alt = data2.alt;
20446
+ Object.assign(img, {
20447
+ src: data2.src,
20448
+ alt: data2.alt || "",
20449
+ width: data2.width || void 0,
20450
+ height: data2.height || void 0
20451
+ });
20452
+ const node = data2.figcaption ? (() => {
20453
+ const figcaption = doc.createElement("figcaption");
20454
+ figcaption.textContent = data2.alt;
20455
+ const figure = doc.createElement("figure");
20456
+ figure.append(img, figcaption);
20457
+ return figure;
20458
+ })() : img;
20381
20459
  range2.collapse(false);
20382
- range2.insertNode(img);
20460
+ range2.insertNode(node);
20383
20461
  }
20384
20462
  }
20385
20463
  });
@@ -20814,7 +20892,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
20814
20892
  __name: "SelectInput",
20815
20893
  props: {
20816
20894
  options: {},
20817
- placeholder: {},
20895
+ placeholder: { default: "Select" },
20818
20896
  disabled: { type: Boolean },
20819
20897
  modelValue: {},
20820
20898
  searchable: { type: Boolean },
@@ -20826,14 +20904,14 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
20826
20904
  hideLabel: { type: Boolean },
20827
20905
  defaultValue: {},
20828
20906
  clearable: { type: Boolean },
20829
- searchPlaceholder: {},
20830
- onSearch: { type: Function }
20907
+ searchPlaceholder: { default: "Search" },
20908
+ onSearch: {}
20831
20909
  },
20832
20910
  emits: ["update:modelValue"],
20833
20911
  setup(__props, { emit: __emit }) {
20834
20912
  const props2 = __props;
20835
20913
  const emit2 = __emit;
20836
- const searchPlaceholder = vue.computed(() => props2.searchPlaceholder || "Search");
20914
+ const searchPlaceholder = vue.computed(() => props2.searchPlaceholder);
20837
20915
  const searchInput = vue.ref();
20838
20916
  let selectedItems = vue.ref([]);
20839
20917
  const selectedItemCount = vue.computed(() => selectedItems.value.length ?? 0);
@@ -20842,7 +20920,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
20842
20920
  let selected = vue.ref(false);
20843
20921
  let open = vue.ref(false);
20844
20922
  const selectedLabel = vue.computed(() => {
20845
- if (selectedItemCount.value === 0) return props2.placeholder || "Select";
20923
+ if (selectedItemCount.value === 0) return props2.placeholder;
20846
20924
  if (selectedItemCount.value > 4) {
20847
20925
  const str = selectedItems.value.slice(0, 4).map((item) => getLabel(item)).join(", ");
20848
20926
  return `${str}... +${selectedItemCount.value - 4}`;
@@ -21114,7 +21192,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
21114
21192
  };
21115
21193
  }
21116
21194
  });
21117
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-982f5078"]]);
21195
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-9574c8a2"]]);
21118
21196
  /*!
21119
21197
  * Signature Pad v5.0.4 | https://github.com/szimek/signature_pad
21120
21198
  * (c) 2024 Szymon Nowak | Released under the MIT license
@@ -29671,10 +29749,10 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
29671
29749
  const emit2 = __emit;
29672
29750
  const slots = vue.useSlots();
29673
29751
  let isOpen = vue.ref(props2.open);
29674
- function toggleMenu() {
29752
+ const toggleMenu = useDebounceFn(() => {
29675
29753
  isOpen.value = !isOpen.value;
29676
29754
  emit2("update:open", isOpen.value);
29677
- }
29755
+ });
29678
29756
  return (_ctx, _cache) => {
29679
29757
  const _directive_tooltip = vue.resolveDirective("tooltip");
29680
29758
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -29685,8 +29763,8 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
29685
29763
  color: "white",
29686
29764
  class: "mb-05 absolute toggleNav z-2 border",
29687
29765
  icon: "keyboard_arrow_right",
29688
- onClick: toggleMenu
29689
- }),
29766
+ onClick: vue.unref(toggleMenu)
29767
+ }, null, 8, ["onClick"]),
29690
29768
  vue.createVNode(vue.unref(_sfc_main$V), { class: "py-1 px-05 h-100 flex column gap-05 rounded relative bg-primary font-light overflow-y" }, {
29691
29769
  default: vue.withCtx(() => [
29692
29770
  !vue.unref(isOpen) || !vue.unref(slots)["brand-open"] ? vue.renderSlot(_ctx.$slots, "brand", { key: 0 }, void 0, true) : vue.createCommentVNode("", true),
@@ -29716,8 +29794,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
29716
29794
  _directive_tooltip,
29717
29795
  {
29718
29796
  content: nav.label,
29719
- disabled: _ctx.open,
29720
- class: ["nav-tooltip"]
29797
+ disabled: _ctx.open
29721
29798
  },
29722
29799
  void 0,
29723
29800
  { right: true }
@@ -29733,7 +29810,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
29733
29810
  };
29734
29811
  }
29735
29812
  });
29736
- const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-51cedd11"]]);
29813
+ const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-ac02125e"]]);
29737
29814
  const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
29738
29815
  __name: "Skeleton",
29739
29816
  props: {
@@ -30227,8 +30304,8 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
30227
30304
  style: vue.normalizeStyle({ float: _ctx.side ? "left" : "right" }),
30228
30305
  flat: "",
30229
30306
  icon: "close",
30230
- onClick: closeModal,
30231
- thin: ""
30307
+ thin: "",
30308
+ onClick: closeModal
30232
30309
  }, null, 8, ["style"]),
30233
30310
  _ctx.title ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$3), {
30234
30311
  key: 0,
@@ -30325,7 +30402,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
30325
30402
  width: {},
30326
30403
  dismissable: { type: Boolean },
30327
30404
  actions: {},
30328
- schema: { type: Function },
30405
+ schema: {},
30329
30406
  onSubmit: { type: Function },
30330
30407
  onDelete: { type: Function },
30331
30408
  visible: { type: Boolean },
@@ -30432,7 +30509,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
30432
30509
  };
30433
30510
  }
30434
30511
  });
30435
- const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-6846fbe3"]]);
30512
+ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-3342a563"]]);
30436
30513
  const _hoisted_1$5 = { class: "full-nav" };
30437
30514
  const _hoisted_2$4 = { class: "nav-scroll" };
30438
30515
  const _hoisted_3$3 = { class: "nav-links-wrapper" };
@@ -30590,8 +30667,8 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
30590
30667
  },
30591
30668
  setup(__props) {
30592
30669
  vue.useCssVars((_ctx) => ({
30593
- "5217b464": computedBackgroundColor.value,
30594
- "0b2b363f": cumputedTextColor.value
30670
+ "33699ebd": computedBackgroundColor.value,
30671
+ "bd23d150": cumputedTextColor.value
30595
30672
  }));
30596
30673
  const props2 = __props;
30597
30674
  const slots = vue.useSlots();
@@ -30653,6 +30730,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
30653
30730
  _ctx.btn ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$2, [
30654
30731
  vue.createVNode(vue.unref(Btn), vue.mergeProps({
30655
30732
  class: "bgl_pill-btn",
30733
+ round: "",
30656
30734
  thin: ""
30657
30735
  }, _ctx.btn), null, 16)
30658
30736
  ])) : vue.createCommentVNode("", true)
@@ -30673,6 +30751,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
30673
30751
  _ctx.btnEnd ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$2, [
30674
30752
  vue.createVNode(vue.unref(Btn), vue.mergeProps({
30675
30753
  class: "bgl_pill-btn",
30754
+ round: "",
30676
30755
  thin: ""
30677
30756
  }, _ctx.btnEnd), null, 16)
30678
30757
  ])) : vue.createCommentVNode("", true)
@@ -30682,7 +30761,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
30682
30761
  };
30683
30762
  }
30684
30763
  });
30685
- const Pill = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-5476be6c"]]);
30764
+ const Pill = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-4249cc3e"]]);
30686
30765
  const _sfc_main$5 = {};
30687
30766
  function _sfc_render$1(_ctx, _cache) {
30688
30767
  const _component_router_view = vue.resolveComponent("router-view");
@@ -31303,25 +31382,26 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
31303
31382
  emits: /* @__PURE__ */ vue.mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
31304
31383
  setup(__props, { emit: __emit }) {
31305
31384
  vue.useCssVars((_ctx) => ({
31306
- "c3b285e8": vue.unref(computedItemHeight)
31385
+ "0469f9a7": vue.unref(computedItemHeight)
31307
31386
  }));
31308
31387
  const emit2 = __emit;
31388
+ const NON_DIGIT_REGEX = /[^\d.-]/g;
31309
31389
  const slots = vue.useSlots();
31310
31390
  const loading = vue.useModel(__props, "loading");
31311
31391
  const itemHeight = vue.useModel(__props, "itemHeight");
31312
- const computedItemHeight = vue.computed(() => `${itemHeight.value}px`);
31313
- let sortField = vue.ref("");
31314
- let sortDirection = vue.ref("ASC");
31315
31392
  const selectedItems = vue.useModel(
31316
31393
  __props,
31317
31394
  "selectedItems",
31318
31395
  {
31319
- set: (value) => {
31320
- setTimeout(updateAllSelectorState, 0);
31321
- return value;
31322
- }
31396
+ set: (value) => value
31323
31397
  }
31324
31398
  );
31399
+ let sortField = vue.ref("");
31400
+ let sortDirection = vue.ref("ASC");
31401
+ const allSelectorEl = vue.ref();
31402
+ const lastItemEl = vue.ref();
31403
+ const computedSelectedItems = vue.computed(() => selectedItems.value);
31404
+ const computedItemHeight = vue.computed(() => `${itemHeight.value}px`);
31325
31405
  const isSelectable = vue.computed(() => __props.selectable === true && Array.isArray(selectedItems.value));
31326
31406
  const computedSortField = vue.computed(() => `_transformed_${sortField.value}`);
31327
31407
  const computedSchema = vue.computed(() => useBglSchema({
@@ -31329,21 +31409,6 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
31329
31409
  showFields: __props.showFields,
31330
31410
  data: __props.data
31331
31411
  }));
31332
- function transform(rowData) {
31333
- var _a2;
31334
- const obj = { ...rowData };
31335
- const schemaFields = computedSchema.value.filter((f2) => f2.id);
31336
- for (const field of schemaFields) {
31337
- const fieldData = rowData[`${field.id}`];
31338
- const newFieldVal = (_a2 = field.transform) == null ? void 0 : _a2.call(field, fieldData, rowData);
31339
- Object.assign(obj, {
31340
- [`${field.id}`]: fieldData,
31341
- [`_transformed_${field.id}`]: newFieldVal
31342
- });
31343
- }
31344
- return obj;
31345
- }
31346
- const NON_DIGIT_REGEX = /[^\d.-]/g;
31347
31412
  const computedData = vue.computed(() => {
31348
31413
  if (!sortField.value || __props.useServerSort === true) return __props.data.map(transform);
31349
31414
  return __props.data.map(transform).sort(
@@ -31369,6 +31434,20 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
31369
31434
  }
31370
31435
  );
31371
31436
  });
31437
+ function transform(rowData) {
31438
+ var _a2;
31439
+ const obj = { ...rowData };
31440
+ const schemaFields = computedSchema.value.filter((f2) => f2.id);
31441
+ for (const field of schemaFields) {
31442
+ const fieldData = rowData[`${field.id}`];
31443
+ const newFieldVal = (_a2 = field.transform) == null ? void 0 : _a2.call(field, fieldData, rowData);
31444
+ Object.assign(obj, {
31445
+ [`${field.id}`]: fieldData,
31446
+ [`_transformed_${field.id}`]: newFieldVal
31447
+ });
31448
+ }
31449
+ return obj;
31450
+ }
31372
31451
  function sort2(fieldname) {
31373
31452
  if (sortField.value === fieldname) {
31374
31453
  if (sortDirection.value === "ASC") sortDirection.value = "DESC";
@@ -31386,50 +31465,47 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
31386
31465
  overscan: 10
31387
31466
  }
31388
31467
  );
31389
- vue.watch(
31390
- () => computedData.value.length,
31391
- (newLength, oldLength) => {
31392
- if (newLength === oldLength || __props.onLastItemVisible !== void 0) return;
31393
- scrollTo(0);
31394
- }
31395
- );
31396
- const allSelector = vue.ref();
31397
- const computedSelectedItems = vue.computed(() => selectedItems.value);
31398
31468
  function updateAllSelectorState() {
31399
- if (!allSelector.value) return;
31469
+ if (!allSelectorEl.value) return;
31400
31470
  const allSelected = computedData.value.length === computedSelectedItems.value.length && computedData.value.every((s2) => s2.id && computedSelectedItems.value.includes(s2.id));
31401
- allSelector.value.checked = allSelected;
31402
- allSelector.value.indeterminate = !allSelected && computedSelectedItems.value.length > 0;
31471
+ allSelectorEl.value.checked = allSelected;
31472
+ allSelectorEl.value.indeterminate = !allSelected && computedSelectedItems.value.length > 0;
31403
31473
  }
31404
31474
  function toggleSelectItem(item) {
31405
31475
  if (computedSelectedItems.value.length === 0) {
31406
31476
  const obj = { ...item };
31407
- Object.keys(obj).forEach((key) => {
31408
- if (key.startsWith("_transformed_")) delete obj[key];
31409
- });
31477
+ Object.keys(obj).forEach((key) => key.startsWith("_transformed_") && delete obj[key]);
31410
31478
  emit2("select", obj);
31411
31479
  return;
31412
31480
  }
31413
31481
  const index2 = computedSelectedItems.value.indexOf(item.id);
31414
- if (index2 > -1) {
31415
- computedSelectedItems.value.splice(index2, 1);
31416
- } else {
31417
- computedSelectedItems.value.push(item.id);
31418
- }
31482
+ index2 > -1 ? computedSelectedItems.value.splice(index2, 1) : computedSelectedItems.value.push(item.id);
31419
31483
  }
31420
31484
  function toggleSelectAll(event) {
31421
31485
  const value = event.target.checked;
31422
31486
  selectedItems.value = value ? computedData.value.map((d2) => d2.id) : [];
31423
31487
  }
31424
- const lastItem = vue.ref();
31425
31488
  async function registerLastItemObserver() {
31426
- await until(() => lastItem.value).toBeTruthy();
31427
- useIntersectionObserver(lastItem.value, ([entry]) => {
31489
+ await until(() => lastItemEl.value).toBeTruthy();
31490
+ useIntersectionObserver(lastItemEl.value, ([entry]) => {
31428
31491
  if (entry.isIntersecting && computedData.value.length) {
31429
31492
  emit2("lastItemVisible");
31430
31493
  }
31431
31494
  });
31432
31495
  }
31496
+ vue.watch(
31497
+ () => computedData.value.length,
31498
+ (newLength, oldLength) => {
31499
+ if (newLength === oldLength || __props.onLastItemVisible !== void 0) return;
31500
+ scrollTo(0);
31501
+ }
31502
+ );
31503
+ vue.watch(
31504
+ () => computedSelectedItems.value.length,
31505
+ () => {
31506
+ updateAllSelectorState();
31507
+ }
31508
+ );
31433
31509
  vue.watch(
31434
31510
  () => loading.value,
31435
31511
  (newLoadingVal, oldLoadingVal) => {
@@ -31449,8 +31525,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
31449
31525
  vue.createElementVNode("thead", _hoisted_3$1, [
31450
31526
  vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4$1, [
31451
31527
  vue.createElementVNode("input", {
31452
- ref_key: "allSelector",
31453
- ref: allSelector,
31528
+ ref_key: "allSelectorEl",
31529
+ ref: allSelectorEl,
31454
31530
  type: "checkbox",
31455
31531
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
31456
31532
  }, ["stop"])),
@@ -31521,8 +31597,9 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
31521
31597
  }), 128)),
31522
31598
  _ctx.onLastItemVisible !== void 0 ? (vue.openBlock(), vue.createElementBlock("tr", {
31523
31599
  key: 0,
31524
- ref_key: "lastItem",
31525
- ref: lastItem
31600
+ ref_key: "lastItemEl",
31601
+ ref: lastItemEl,
31602
+ style: { "height": "1px" }
31526
31603
  }, null, 512)) : vue.createCommentVNode("", true)
31527
31604
  ])
31528
31605
  ])
@@ -31531,7 +31608,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
31531
31608
  };
31532
31609
  }
31533
31610
  });
31534
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-fae54756"]]);
31611
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-4a5861ed"]]);
31535
31612
  const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
31536
31613
  __name: "Title",
31537
31614
  props: {
@@ -32719,20 +32796,6 @@ function findBglFieldById(id, _schema) {
32719
32796
  }
32720
32797
  return void 0;
32721
32798
  }
32722
- const BagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32723
- __proto__: null,
32724
- bglForm,
32725
- checkField,
32726
- dateField,
32727
- findBglFieldById,
32728
- frmRow,
32729
- getBaseField,
32730
- numField,
32731
- richText,
32732
- slctField,
32733
- telField,
32734
- txtField
32735
- }, Symbol.toStringTag, { value: "Module" }));
32736
32799
  const state = vue.reactive({
32737
32800
  defaultLang: "",
32738
32801
  availableLangs: [],
@@ -33410,6 +33473,7 @@ const translations = {
33410
33473
  minute: "minute",
33411
33474
  second: "second",
33412
33475
  ago: "ago",
33476
+ in: "in",
33413
33477
  justNow: "Just now"
33414
33478
  },
33415
33479
  es: {
@@ -33421,6 +33485,7 @@ const translations = {
33421
33485
  minute: "minuto",
33422
33486
  second: "segundo",
33423
33487
  ago: "hace",
33488
+ in: "en",
33424
33489
  justNow: "Justo ahora"
33425
33490
  },
33426
33491
  fr: {
@@ -33432,6 +33497,7 @@ const translations = {
33432
33497
  minute: "minute",
33433
33498
  second: "seconde",
33434
33499
  ago: "il y a",
33500
+ in: "dans",
33435
33501
  justNow: "À l’instant"
33436
33502
  },
33437
33503
  he: {
@@ -33443,6 +33509,7 @@ const translations = {
33443
33509
  minute: "דקה",
33444
33510
  second: "שנייה",
33445
33511
  ago: "לפני",
33512
+ in: "בעוד",
33446
33513
  justNow: "זה עתה"
33447
33514
  }
33448
33515
  };
@@ -33452,7 +33519,7 @@ function timeAgo(date2, lang = "en") {
33452
33519
  const now = /* @__PURE__ */ new Date();
33453
33520
  const nowNumber = now.getTime();
33454
33521
  const dateNumber = date2.getTime();
33455
- const seconds = Math.floor((nowNumber - dateNumber) / 1e3);
33522
+ const seconds = Math.floor((dateNumber - nowNumber) / 1e3);
33456
33523
  const intervals = [
33457
33524
  { label: "year", seconds: 31536e3 },
33458
33525
  { label: "month", seconds: 2592e3 },
@@ -33464,10 +33531,15 @@ function timeAgo(date2, lang = "en") {
33464
33531
  ];
33465
33532
  const selectedLang = translations[lang];
33466
33533
  for (const interval of intervals) {
33467
- const count2 = Math.floor(seconds / interval.seconds);
33534
+ const count2 = Math.floor(Math.abs(seconds) / interval.seconds);
33468
33535
  if (count2 >= 1) {
33469
- const suffix = lang === "he" ? "" : ` ${selectedLang.ago}`;
33470
- const prefix = lang === "he" ? "לפני " : "";
33536
+ const suffix = seconds < 0 ? ` ${selectedLang.ago}` : "";
33537
+ const prefix = "";
33538
+ if (interval.label === "day" && seconds > 0) {
33539
+ const hours = Math.floor(Math.abs(seconds) % 86400 / 3600);
33540
+ const hourLabel = hours > 1 ? `${selectedLang.hour}s` : selectedLang.hour;
33541
+ return `${prefix}${count2} ${selectedLang[interval.label]}${hours > 0 ? ` ${hours} ${hourLabel}` : ""}${suffix}`;
33542
+ }
33471
33543
  return `${prefix}${count2} ${selectedLang[interval.label]}${suffix}`;
33472
33544
  }
33473
33545
  }
@@ -33547,7 +33619,7 @@ exports.Zoomer = Zoomer;
33547
33619
  exports.allCountries = allCountries;
33548
33620
  exports.appendScript = appendScript;
33549
33621
  exports.appendStyle = appendStyle;
33550
- exports.bagelFormUtils = BagelFormUtils;
33622
+ exports.bagelFormUtils = bagelFormUtils;
33551
33623
  exports.bagelInjectionKey = bagelInjectionKey;
33552
33624
  exports.bindAttrs = bindAttrs;
33553
33625
  exports.classify = classify;