@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/components/BglVideo.vue.d.ts +8 -1
- package/dist/components/BglVideo.vue.d.ts.map +1 -1
- package/dist/components/Image.vue.d.ts +5 -0
- package/dist/components/Image.vue.d.ts.map +1 -1
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/form/BglField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText/composables/useEditor.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText/utils/media.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts +23 -35
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/layout/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/index.cjs +169 -108
- package/dist/index.mjs +169 -108
- package/dist/style.css +85 -85
- package/package.json +1 -2
- package/src/components/BglVideo.vue +28 -3
- package/src/components/Image.vue +11 -6
- package/src/components/Pill.vue +2 -2
- package/src/components/TableSchema.vue +60 -71
- package/src/components/form/BglField.vue +2 -1
- package/src/components/form/inputs/RichText/composables/useEditor.ts +0 -1
- package/src/components/form/inputs/RichText/utils/media.ts +27 -5
- package/src/components/form/inputs/SelectInput.vue +9 -4
- package/src/components/layout/SidebarMenu.vue +0 -1
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$
|
|
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$
|
|
145
|
+
], 8, _hoisted_3$p)) : vue.createCommentVNode("", true)
|
|
110
146
|
]),
|
|
111
147
|
_: 3
|
|
112
148
|
})
|
|
@@ -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 = ["
|
|
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
|
-
|
|
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
|
-
},
|
|
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-
|
|
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:
|
|
7494
|
-
crossAxis:
|
|
7495
|
-
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 (
|
|
7655
|
-
availableWidth = maximumClippingWidth;
|
|
7656
|
-
}
|
|
7657
|
-
|
|
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);
|
|
@@ -9682,6 +9740,7 @@ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
|
9682
9740
|
return data2;
|
|
9683
9741
|
}
|
|
9684
9742
|
function getFieldData(obj, key) {
|
|
9743
|
+
if (typeof obj !== "object" || obj === null) return obj;
|
|
9685
9744
|
const keys4 = key.split(objPathRegex);
|
|
9686
9745
|
let result2 = obj;
|
|
9687
9746
|
for (const k2 of keys4) {
|
|
@@ -18990,10 +19049,10 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
18990
19049
|
}
|
|
18991
19050
|
}
|
|
18992
19051
|
try {
|
|
19052
|
+
await appendScript("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");
|
|
18993
19053
|
const response = await fetch(src);
|
|
18994
19054
|
const blob = await response.blob();
|
|
18995
|
-
const
|
|
18996
|
-
const convertedBlob = await heic2any({ blob });
|
|
19055
|
+
const convertedBlob = await window.heic2any({ blob });
|
|
18997
19056
|
imageSrc.value = URL.createObjectURL(convertedBlob);
|
|
18998
19057
|
if ("caches" in window) {
|
|
18999
19058
|
try {
|
|
@@ -19028,7 +19087,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
19028
19087
|
};
|
|
19029
19088
|
}
|
|
19030
19089
|
});
|
|
19031
|
-
const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
19090
|
+
const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-a96b25a8"]]);
|
|
19032
19091
|
const _hoisted_1$w = { class: "bagel-input" };
|
|
19033
19092
|
const _hoisted_2$k = {
|
|
19034
19093
|
key: 0,
|
|
@@ -20364,6 +20423,7 @@ function formatting(state2) {
|
|
|
20364
20423
|
};
|
|
20365
20424
|
return { text, block, list, clear };
|
|
20366
20425
|
}
|
|
20426
|
+
const { frmRow: frmRow$1, numField: numField$1 } = bagelFormUtils;
|
|
20367
20427
|
function insertImage(modal, state2) {
|
|
20368
20428
|
const { range: range2, doc } = state2;
|
|
20369
20429
|
if (!range2 || !doc) return;
|
|
@@ -20371,15 +20431,31 @@ function insertImage(modal, state2) {
|
|
|
20371
20431
|
title: "Upload Image",
|
|
20372
20432
|
schema: [
|
|
20373
20433
|
{ id: "src", $el: "file", attrs: { bindkey: "url" } },
|
|
20374
|
-
{ 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" }
|
|
20375
20440
|
],
|
|
20376
20441
|
onSubmit: (data2) => {
|
|
20377
20442
|
if (data2.src) {
|
|
20378
20443
|
const img = doc.createElement("img");
|
|
20379
|
-
img
|
|
20380
|
-
|
|
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;
|
|
20381
20457
|
range2.collapse(false);
|
|
20382
|
-
range2.insertNode(
|
|
20458
|
+
range2.insertNode(node);
|
|
20383
20459
|
}
|
|
20384
20460
|
}
|
|
20385
20461
|
});
|
|
@@ -20814,7 +20890,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
20814
20890
|
__name: "SelectInput",
|
|
20815
20891
|
props: {
|
|
20816
20892
|
options: {},
|
|
20817
|
-
placeholder: {},
|
|
20893
|
+
placeholder: { default: "Select" },
|
|
20818
20894
|
disabled: { type: Boolean },
|
|
20819
20895
|
modelValue: {},
|
|
20820
20896
|
searchable: { type: Boolean },
|
|
@@ -20826,14 +20902,14 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
20826
20902
|
hideLabel: { type: Boolean },
|
|
20827
20903
|
defaultValue: {},
|
|
20828
20904
|
clearable: { type: Boolean },
|
|
20829
|
-
searchPlaceholder: {},
|
|
20830
|
-
onSearch: {
|
|
20905
|
+
searchPlaceholder: { default: "Search" },
|
|
20906
|
+
onSearch: {}
|
|
20831
20907
|
},
|
|
20832
20908
|
emits: ["update:modelValue"],
|
|
20833
20909
|
setup(__props, { emit: __emit }) {
|
|
20834
20910
|
const props2 = __props;
|
|
20835
20911
|
const emit2 = __emit;
|
|
20836
|
-
const searchPlaceholder = vue.computed(() => props2.searchPlaceholder
|
|
20912
|
+
const searchPlaceholder = vue.computed(() => props2.searchPlaceholder);
|
|
20837
20913
|
const searchInput = vue.ref();
|
|
20838
20914
|
let selectedItems = vue.ref([]);
|
|
20839
20915
|
const selectedItemCount = vue.computed(() => selectedItems.value.length ?? 0);
|
|
@@ -20842,7 +20918,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
20842
20918
|
let selected = vue.ref(false);
|
|
20843
20919
|
let open = vue.ref(false);
|
|
20844
20920
|
const selectedLabel = vue.computed(() => {
|
|
20845
|
-
if (selectedItemCount.value === 0) return props2.placeholder
|
|
20921
|
+
if (selectedItemCount.value === 0) return props2.placeholder;
|
|
20846
20922
|
if (selectedItemCount.value > 4) {
|
|
20847
20923
|
const str = selectedItems.value.slice(0, 4).map((item) => getLabel(item)).join(", ");
|
|
20848
20924
|
return `${str}... +${selectedItemCount.value - 4}`;
|
|
@@ -21114,7 +21190,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
|
21114
21190
|
};
|
|
21115
21191
|
}
|
|
21116
21192
|
});
|
|
21117
|
-
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-
|
|
21193
|
+
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-9574c8a2"]]);
|
|
21118
21194
|
/*!
|
|
21119
21195
|
* Signature Pad v5.0.4 | https://github.com/szimek/signature_pad
|
|
21120
21196
|
* (c) 2024 Szymon Nowak | Released under the MIT license
|
|
@@ -29716,8 +29792,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
29716
29792
|
_directive_tooltip,
|
|
29717
29793
|
{
|
|
29718
29794
|
content: nav.label,
|
|
29719
|
-
disabled: _ctx.open
|
|
29720
|
-
class: ["nav-tooltip"]
|
|
29795
|
+
disabled: _ctx.open
|
|
29721
29796
|
},
|
|
29722
29797
|
void 0,
|
|
29723
29798
|
{ right: true }
|
|
@@ -29733,7 +29808,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
29733
29808
|
};
|
|
29734
29809
|
}
|
|
29735
29810
|
});
|
|
29736
|
-
const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-
|
|
29811
|
+
const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-0cd6a0fb"]]);
|
|
29737
29812
|
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
29738
29813
|
__name: "Skeleton",
|
|
29739
29814
|
props: {
|
|
@@ -30590,8 +30665,8 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
30590
30665
|
},
|
|
30591
30666
|
setup(__props) {
|
|
30592
30667
|
vue.useCssVars((_ctx) => ({
|
|
30593
|
-
"
|
|
30594
|
-
"
|
|
30668
|
+
"33699ebd": computedBackgroundColor.value,
|
|
30669
|
+
"bd23d150": cumputedTextColor.value
|
|
30595
30670
|
}));
|
|
30596
30671
|
const props2 = __props;
|
|
30597
30672
|
const slots = vue.useSlots();
|
|
@@ -30653,6 +30728,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
30653
30728
|
_ctx.btn ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$2, [
|
|
30654
30729
|
vue.createVNode(vue.unref(Btn), vue.mergeProps({
|
|
30655
30730
|
class: "bgl_pill-btn",
|
|
30731
|
+
round: "",
|
|
30656
30732
|
thin: ""
|
|
30657
30733
|
}, _ctx.btn), null, 16)
|
|
30658
30734
|
])) : vue.createCommentVNode("", true)
|
|
@@ -30673,6 +30749,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
30673
30749
|
_ctx.btnEnd ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$2, [
|
|
30674
30750
|
vue.createVNode(vue.unref(Btn), vue.mergeProps({
|
|
30675
30751
|
class: "bgl_pill-btn",
|
|
30752
|
+
round: "",
|
|
30676
30753
|
thin: ""
|
|
30677
30754
|
}, _ctx.btnEnd), null, 16)
|
|
30678
30755
|
])) : vue.createCommentVNode("", true)
|
|
@@ -30682,7 +30759,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
|
|
|
30682
30759
|
};
|
|
30683
30760
|
}
|
|
30684
30761
|
});
|
|
30685
|
-
const Pill = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
30762
|
+
const Pill = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-4249cc3e"]]);
|
|
30686
30763
|
const _sfc_main$5 = {};
|
|
30687
30764
|
function _sfc_render$1(_ctx, _cache) {
|
|
30688
30765
|
const _component_router_view = vue.resolveComponent("router-view");
|
|
@@ -31303,25 +31380,26 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31303
31380
|
emits: /* @__PURE__ */ vue.mergeModels(["update:selectedItems", "orderBy", "select", "lastItemVisible"], ["update:loading", "update:itemHeight", "update:selectedItems"]),
|
|
31304
31381
|
setup(__props, { emit: __emit }) {
|
|
31305
31382
|
vue.useCssVars((_ctx) => ({
|
|
31306
|
-
"
|
|
31383
|
+
"0469f9a7": vue.unref(computedItemHeight)
|
|
31307
31384
|
}));
|
|
31308
31385
|
const emit2 = __emit;
|
|
31386
|
+
const NON_DIGIT_REGEX = /[^\d.-]/g;
|
|
31309
31387
|
const slots = vue.useSlots();
|
|
31310
31388
|
const loading = vue.useModel(__props, "loading");
|
|
31311
31389
|
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
31390
|
const selectedItems = vue.useModel(
|
|
31316
31391
|
__props,
|
|
31317
31392
|
"selectedItems",
|
|
31318
31393
|
{
|
|
31319
|
-
set: (value) =>
|
|
31320
|
-
setTimeout(updateAllSelectorState, 0);
|
|
31321
|
-
return value;
|
|
31322
|
-
}
|
|
31394
|
+
set: (value) => value
|
|
31323
31395
|
}
|
|
31324
31396
|
);
|
|
31397
|
+
let sortField = vue.ref("");
|
|
31398
|
+
let sortDirection = vue.ref("ASC");
|
|
31399
|
+
const allSelectorEl = vue.ref();
|
|
31400
|
+
const lastItemEl = vue.ref();
|
|
31401
|
+
const computedSelectedItems = vue.computed(() => selectedItems.value);
|
|
31402
|
+
const computedItemHeight = vue.computed(() => `${itemHeight.value}px`);
|
|
31325
31403
|
const isSelectable = vue.computed(() => __props.selectable === true && Array.isArray(selectedItems.value));
|
|
31326
31404
|
const computedSortField = vue.computed(() => `_transformed_${sortField.value}`);
|
|
31327
31405
|
const computedSchema = vue.computed(() => useBglSchema({
|
|
@@ -31329,21 +31407,6 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31329
31407
|
showFields: __props.showFields,
|
|
31330
31408
|
data: __props.data
|
|
31331
31409
|
}));
|
|
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
31410
|
const computedData = vue.computed(() => {
|
|
31348
31411
|
if (!sortField.value || __props.useServerSort === true) return __props.data.map(transform);
|
|
31349
31412
|
return __props.data.map(transform).sort(
|
|
@@ -31369,6 +31432,20 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31369
31432
|
}
|
|
31370
31433
|
);
|
|
31371
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
|
+
}
|
|
31372
31449
|
function sort2(fieldname) {
|
|
31373
31450
|
if (sortField.value === fieldname) {
|
|
31374
31451
|
if (sortDirection.value === "ASC") sortDirection.value = "DESC";
|
|
@@ -31386,50 +31463,47 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31386
31463
|
overscan: 10
|
|
31387
31464
|
}
|
|
31388
31465
|
);
|
|
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
31466
|
function updateAllSelectorState() {
|
|
31399
|
-
if (!
|
|
31467
|
+
if (!allSelectorEl.value) return;
|
|
31400
31468
|
const allSelected = computedData.value.length === computedSelectedItems.value.length && computedData.value.every((s2) => s2.id && computedSelectedItems.value.includes(s2.id));
|
|
31401
|
-
|
|
31402
|
-
|
|
31469
|
+
allSelectorEl.value.checked = allSelected;
|
|
31470
|
+
allSelectorEl.value.indeterminate = !allSelected && computedSelectedItems.value.length > 0;
|
|
31403
31471
|
}
|
|
31404
31472
|
function toggleSelectItem(item) {
|
|
31405
31473
|
if (computedSelectedItems.value.length === 0) {
|
|
31406
31474
|
const obj = { ...item };
|
|
31407
|
-
Object.keys(obj).forEach((key) =>
|
|
31408
|
-
if (key.startsWith("_transformed_")) delete obj[key];
|
|
31409
|
-
});
|
|
31475
|
+
Object.keys(obj).forEach((key) => key.startsWith("_transformed_") && delete obj[key]);
|
|
31410
31476
|
emit2("select", obj);
|
|
31411
31477
|
return;
|
|
31412
31478
|
}
|
|
31413
31479
|
const index2 = computedSelectedItems.value.indexOf(item.id);
|
|
31414
|
-
|
|
31415
|
-
computedSelectedItems.value.splice(index2, 1);
|
|
31416
|
-
} else {
|
|
31417
|
-
computedSelectedItems.value.push(item.id);
|
|
31418
|
-
}
|
|
31480
|
+
index2 > -1 ? computedSelectedItems.value.splice(index2, 1) : computedSelectedItems.value.push(item.id);
|
|
31419
31481
|
}
|
|
31420
31482
|
function toggleSelectAll(event) {
|
|
31421
31483
|
const value = event.target.checked;
|
|
31422
31484
|
selectedItems.value = value ? computedData.value.map((d2) => d2.id) : [];
|
|
31423
31485
|
}
|
|
31424
|
-
const lastItem = vue.ref();
|
|
31425
31486
|
async function registerLastItemObserver() {
|
|
31426
|
-
await until(() =>
|
|
31427
|
-
useIntersectionObserver(
|
|
31487
|
+
await until(() => lastItemEl.value).toBeTruthy();
|
|
31488
|
+
useIntersectionObserver(lastItemEl.value, ([entry]) => {
|
|
31428
31489
|
if (entry.isIntersecting && computedData.value.length) {
|
|
31429
31490
|
emit2("lastItemVisible");
|
|
31430
31491
|
}
|
|
31431
31492
|
});
|
|
31432
31493
|
}
|
|
31494
|
+
vue.watch(
|
|
31495
|
+
() => computedData.value.length,
|
|
31496
|
+
(newLength, oldLength) => {
|
|
31497
|
+
if (newLength === oldLength || __props.onLastItemVisible !== void 0) return;
|
|
31498
|
+
scrollTo(0);
|
|
31499
|
+
}
|
|
31500
|
+
);
|
|
31501
|
+
vue.watch(
|
|
31502
|
+
() => computedSelectedItems.value.length,
|
|
31503
|
+
() => {
|
|
31504
|
+
updateAllSelectorState();
|
|
31505
|
+
}
|
|
31506
|
+
);
|
|
31433
31507
|
vue.watch(
|
|
31434
31508
|
() => loading.value,
|
|
31435
31509
|
(newLoadingVal, oldLoadingVal) => {
|
|
@@ -31449,8 +31523,8 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31449
31523
|
vue.createElementVNode("thead", _hoisted_3$1, [
|
|
31450
31524
|
vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4$1, [
|
|
31451
31525
|
vue.createElementVNode("input", {
|
|
31452
|
-
ref_key: "
|
|
31453
|
-
ref:
|
|
31526
|
+
ref_key: "allSelectorEl",
|
|
31527
|
+
ref: allSelectorEl,
|
|
31454
31528
|
type: "checkbox",
|
|
31455
31529
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
31456
31530
|
}, ["stop"])),
|
|
@@ -31521,8 +31595,9 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31521
31595
|
}), 128)),
|
|
31522
31596
|
_ctx.onLastItemVisible !== void 0 ? (vue.openBlock(), vue.createElementBlock("tr", {
|
|
31523
31597
|
key: 0,
|
|
31524
|
-
ref_key: "
|
|
31525
|
-
ref:
|
|
31598
|
+
ref_key: "lastItemEl",
|
|
31599
|
+
ref: lastItemEl,
|
|
31600
|
+
style: { "height": "1px" }
|
|
31526
31601
|
}, null, 512)) : vue.createCommentVNode("", true)
|
|
31527
31602
|
])
|
|
31528
31603
|
])
|
|
@@ -31531,7 +31606,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
31531
31606
|
};
|
|
31532
31607
|
}
|
|
31533
31608
|
});
|
|
31534
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
31609
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-4a5861ed"]]);
|
|
31535
31610
|
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
31536
31611
|
__name: "Title",
|
|
31537
31612
|
props: {
|
|
@@ -32719,20 +32794,6 @@ function findBglFieldById(id, _schema) {
|
|
|
32719
32794
|
}
|
|
32720
32795
|
return void 0;
|
|
32721
32796
|
}
|
|
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
32797
|
const state = vue.reactive({
|
|
32737
32798
|
defaultLang: "",
|
|
32738
32799
|
availableLangs: [],
|
|
@@ -33547,7 +33608,7 @@ exports.Zoomer = Zoomer;
|
|
|
33547
33608
|
exports.allCountries = allCountries;
|
|
33548
33609
|
exports.appendScript = appendScript;
|
|
33549
33610
|
exports.appendStyle = appendStyle;
|
|
33550
|
-
exports.bagelFormUtils =
|
|
33611
|
+
exports.bagelFormUtils = bagelFormUtils;
|
|
33551
33612
|
exports.bagelInjectionKey = bagelInjectionKey;
|
|
33552
33613
|
exports.bindAttrs = bindAttrs;
|
|
33553
33614
|
exports.classify = classify;
|