@bagelink/vue 0.0.562 → 0.0.566
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/DataPreview.vue.d.ts.map +1 -1
- package/dist/components/MaterialIcon.vue.d.ts +2 -0
- package/dist/components/MaterialIcon.vue.d.ts.map +1 -1
- package/dist/components/TableSchema.vue.d.ts +34 -21
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/form/BglForm.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/CheckInput.vue.d.ts +21 -11
- package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DateInput.vue.d.ts +2 -0
- package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/FileUpload.vue.d.ts +31 -41
- package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TelInput.vue.d.ts +11 -11
- package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ToggleInput.vue.d.ts +18 -3
- package/dist/components/form/inputs/ToggleInput.vue.d.ts.map +1 -1
- package/dist/components/layout/TabbedLayout.vue.d.ts.map +1 -1
- package/dist/composables/index.d.ts +10 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/index.cjs +620 -201
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +621 -202
- package/dist/style.css +262 -119
- package/dist/types/BagelForm.d.ts +1 -0
- package/dist/types/BagelForm.d.ts.map +1 -1
- package/dist/utils/index.d.ts +4 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +15 -14
- package/src/components/Btn.vue +1 -1
- package/src/components/DataPreview.vue +12 -13
- package/src/components/MapEmbed.vue +2 -2
- package/src/components/MaterialIcon.vue +7 -3
- package/src/components/TableSchema.vue +294 -108
- package/src/components/form/BglFieldSet.vue +0 -2
- package/src/components/form/BglForm.vue +2 -4
- package/src/components/form/inputs/CheckInput.vue +13 -6
- package/src/components/form/inputs/DateInput.vue +2 -0
- package/src/components/form/inputs/FileUpload.vue +63 -47
- package/src/components/form/inputs/ToggleInput.vue +22 -5
- package/src/components/layout/TabbedLayout.vue +1 -1
- package/src/composables/index.ts +24 -0
- package/src/index.ts +1 -0
- package/src/styles/layout.css +24 -0
- package/src/styles/mobilLayout.css +23 -0
- package/src/styles/text.css +0 -2
- package/src/styles/theme.css +2 -1
- package/src/types/BagelForm.ts +2 -0
- package/src/utils/index.ts +24 -2
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp2 = Object.defineProperty;
|
|
2
2
|
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { pushScopeId, popScopeId, defineComponent, nextTick, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, mergeProps, withCtx, createVNode, ref, createApp, h as h$2, toDisplayString, reactive, computed, inject, unref, renderList, resolveDynamicComponent, useCssVars, useSlots, withModifiers, createTextVNode, watch, onMounted, onUnmounted, mergeModels, useModel, createSlots, Transition,
|
|
4
|
+
import { pushScopeId, popScopeId, defineComponent, nextTick, openBlock, createBlock, createElementBlock, normalizeClass, renderSlot, normalizeProps, guardReactiveProps, withScopeId, resolveComponent, normalizeStyle, withKeys, createElementVNode, Fragment as Fragment$1, createCommentVNode, mergeProps, withCtx, createVNode, ref, createApp, h as h$2, toDisplayString, reactive, computed, inject, unref, renderList, resolveDynamicComponent, useCssVars, useSlots, withModifiers, createTextVNode, watch, onMounted, onUnmounted, mergeModels, useModel, createSlots, Transition, getCurrentScope, onScopeDispose, getCurrentInstance, shallowRef, withDirectives, isRef, vModelCheckbox, provide, toRef, Teleport, render as render$f, onBeforeUpdate, vShow, TransitionGroup, vModelDynamic, vModelText, vModelRadio, onBeforeUnmount, watchEffect, markRaw, customRef, resolveDirective } from "vue";
|
|
5
5
|
const sides = ["top", "right", "bottom", "left"];
|
|
6
6
|
const alignments = ["start", "end"];
|
|
7
7
|
const placements$1 = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
@@ -2566,7 +2566,7 @@ const isPlainObject$1 = (val) => {
|
|
|
2566
2566
|
const prototype2 = getPrototypeOf(val);
|
|
2567
2567
|
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
2568
2568
|
};
|
|
2569
|
-
const isDate$
|
|
2569
|
+
const isDate$2 = kindOfTest("Date");
|
|
2570
2570
|
const isFile = kindOfTest("File");
|
|
2571
2571
|
const isBlob = kindOfTest("Blob");
|
|
2572
2572
|
const isFileList = kindOfTest("FileList");
|
|
@@ -2841,7 +2841,7 @@ const utils$1 = {
|
|
|
2841
2841
|
isResponse,
|
|
2842
2842
|
isHeaders,
|
|
2843
2843
|
isUndefined,
|
|
2844
|
-
isDate: isDate$
|
|
2844
|
+
isDate: isDate$2,
|
|
2845
2845
|
isFile,
|
|
2846
2846
|
isBlob,
|
|
2847
2847
|
isRegExp: isRegExp$1,
|
|
@@ -5282,7 +5282,23 @@ function iffer(field, itemData) {
|
|
|
5282
5282
|
if (typeof field["v-if"] === "function") return (_a2 = field["v-if"]) == null ? void 0 : _a2.call(field, itemData == null ? void 0 : itemData[field.id], itemData);
|
|
5283
5283
|
return true;
|
|
5284
5284
|
}
|
|
5285
|
-
|
|
5285
|
+
function denullify(itemData, fieldID) {
|
|
5286
|
+
if (!fieldID) return null;
|
|
5287
|
+
return itemData ? itemData[fieldID] : null;
|
|
5288
|
+
}
|
|
5289
|
+
const isDate$1 = (dateToTest) => !Number.isNaN(Date.parse(dateToTest));
|
|
5290
|
+
function getFallbackSchema(data2, showFields) {
|
|
5291
|
+
const keys4 = [
|
|
5292
|
+
...new Set((data2 ?? []).map(Object.keys).flat())
|
|
5293
|
+
];
|
|
5294
|
+
const schema = keys4.map(
|
|
5295
|
+
(id) => ({
|
|
5296
|
+
id,
|
|
5297
|
+
label: keyToLabel(id)
|
|
5298
|
+
})
|
|
5299
|
+
);
|
|
5300
|
+
return showFields ? schema.filter((f2) => showFields.includes(f2.id) || !f2.id) : schema;
|
|
5301
|
+
}
|
|
5286
5302
|
const bagelInjectionKey = Symbol("bagel");
|
|
5287
5303
|
const i18nTInjectionKey = Symbol("bagel");
|
|
5288
5304
|
function useBagel() {
|
|
@@ -5371,19 +5387,30 @@ const ModalPlugin = {
|
|
|
5371
5387
|
app.component("ModalContainer", ModalComponent);
|
|
5372
5388
|
}
|
|
5373
5389
|
};
|
|
5390
|
+
function useBglSchema({ schema, showFields, data: data2 } = {}) {
|
|
5391
|
+
let _schema = schema;
|
|
5392
|
+
if (typeof _schema === "function") {
|
|
5393
|
+
_schema = _schema();
|
|
5394
|
+
}
|
|
5395
|
+
if (_schema) {
|
|
5396
|
+
return showFields && showFields.length ? _schema.filter((f2) => showFields.includes(f2.id)) : _schema;
|
|
5397
|
+
}
|
|
5398
|
+
return getFallbackSchema(data2, showFields);
|
|
5399
|
+
}
|
|
5374
5400
|
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
5375
5401
|
__name: "MaterialIcon",
|
|
5376
5402
|
props: {
|
|
5377
5403
|
icon: {},
|
|
5378
5404
|
name: {},
|
|
5379
5405
|
size: {},
|
|
5380
|
-
color: {}
|
|
5406
|
+
color: {},
|
|
5407
|
+
weight: {}
|
|
5381
5408
|
},
|
|
5382
5409
|
setup(__props) {
|
|
5383
5410
|
return (_ctx, _cache) => {
|
|
5384
|
-
return openBlock(), createElementBlock("
|
|
5411
|
+
return openBlock(), createElementBlock("span", {
|
|
5385
5412
|
class: "bgl_icon-font",
|
|
5386
|
-
style: normalizeStyle({ fontSize: `${_ctx.size}rem`, color: _ctx.color })
|
|
5413
|
+
style: normalizeStyle({ fontSize: `${_ctx.size}rem`, color: _ctx.color, "font-variation-settings": `'wght' ${_ctx.weight || 400}` })
|
|
5387
5414
|
}, toDisplayString(_ctx.icon || _ctx.name), 5);
|
|
5388
5415
|
};
|
|
5389
5416
|
}
|
|
@@ -5392,7 +5419,7 @@ const _hoisted_1$J = { class: "full-nav" };
|
|
|
5392
5419
|
const _hoisted_2$A = { class: "nav-scroll" };
|
|
5393
5420
|
const _hoisted_3$n = { class: "nav-links-wrapper" };
|
|
5394
5421
|
const _hoisted_4$f = { class: "tooltip" };
|
|
5395
|
-
const _hoisted_5$
|
|
5422
|
+
const _hoisted_5$d = { class: "bot-buttons-wrapper" };
|
|
5396
5423
|
const _hoisted_6$8 = { class: "tooltip" };
|
|
5397
5424
|
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
5398
5425
|
__name: "NavBar",
|
|
@@ -5447,7 +5474,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
5447
5474
|
}), 128))
|
|
5448
5475
|
])
|
|
5449
5476
|
]),
|
|
5450
|
-
createElementVNode("div", _hoisted_5$
|
|
5477
|
+
createElementVNode("div", _hoisted_5$d, [
|
|
5451
5478
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.footerLinks, (link) => {
|
|
5452
5479
|
return openBlock(), createBlock(resolveDynamicComponent(link.to ? "router-link" : "div"), {
|
|
5453
5480
|
key: link.label,
|
|
@@ -5514,8 +5541,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5514
5541
|
},
|
|
5515
5542
|
setup(__props) {
|
|
5516
5543
|
useCssVars((_ctx) => ({
|
|
5517
|
-
"
|
|
5518
|
-
"
|
|
5544
|
+
"39397c0e": computedBackgroundColor.value,
|
|
5545
|
+
"427e8569": cumputedTextColor.value
|
|
5519
5546
|
}));
|
|
5520
5547
|
const props2 = __props;
|
|
5521
5548
|
const isComponent = computed(() => {
|
|
@@ -5604,7 +5631,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5604
5631
|
};
|
|
5605
5632
|
}
|
|
5606
5633
|
});
|
|
5607
|
-
const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
5634
|
+
const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-59ea4a90"]]);
|
|
5608
5635
|
const _hoisted_1$H = {
|
|
5609
5636
|
key: 0,
|
|
5610
5637
|
class: "tool-bar"
|
|
@@ -5987,67 +6014,369 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5987
6014
|
};
|
|
5988
6015
|
}
|
|
5989
6016
|
});
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
6017
|
+
function tryOnScopeDispose(fn3) {
|
|
6018
|
+
if (getCurrentScope()) {
|
|
6019
|
+
onScopeDispose(fn3);
|
|
6020
|
+
return true;
|
|
6021
|
+
}
|
|
6022
|
+
return false;
|
|
6023
|
+
}
|
|
6024
|
+
function toValue(r2) {
|
|
6025
|
+
return typeof r2 === "function" ? r2() : unref(r2);
|
|
6026
|
+
}
|
|
6027
|
+
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
6028
|
+
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
6029
|
+
function getLifeCycleTarget(target) {
|
|
6030
|
+
return target || getCurrentInstance();
|
|
6031
|
+
}
|
|
6032
|
+
function tryOnMounted(fn3, sync = true, target) {
|
|
6033
|
+
const instance = getLifeCycleTarget();
|
|
6034
|
+
if (instance)
|
|
6035
|
+
onMounted(fn3, target);
|
|
6036
|
+
else if (sync)
|
|
6037
|
+
fn3();
|
|
6038
|
+
else
|
|
6039
|
+
nextTick(fn3);
|
|
6040
|
+
}
|
|
6041
|
+
function unrefElement(elRef) {
|
|
6042
|
+
var _a2;
|
|
6043
|
+
const plain = toValue(elRef);
|
|
6044
|
+
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
|
|
6045
|
+
}
|
|
6046
|
+
const defaultWindow = isClient ? window : void 0;
|
|
6047
|
+
function useMounted() {
|
|
6048
|
+
const isMounted = ref(false);
|
|
6049
|
+
const instance = getCurrentInstance();
|
|
6050
|
+
if (instance) {
|
|
6051
|
+
onMounted(() => {
|
|
6052
|
+
isMounted.value = true;
|
|
6053
|
+
}, instance);
|
|
6054
|
+
}
|
|
6055
|
+
return isMounted;
|
|
6056
|
+
}
|
|
6057
|
+
function useSupported(callback) {
|
|
6058
|
+
const isMounted = useMounted();
|
|
6059
|
+
return computed(() => {
|
|
6060
|
+
isMounted.value;
|
|
6061
|
+
return Boolean(callback());
|
|
6062
|
+
});
|
|
6063
|
+
}
|
|
6064
|
+
function useResizeObserver(target, callback, options = {}) {
|
|
6065
|
+
const { window: window2 = defaultWindow, ...observerOptions } = options;
|
|
6066
|
+
let observer;
|
|
6067
|
+
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
|
|
6068
|
+
const cleanup = () => {
|
|
6069
|
+
if (observer) {
|
|
6070
|
+
observer.disconnect();
|
|
6071
|
+
observer = void 0;
|
|
6072
|
+
}
|
|
6073
|
+
};
|
|
6074
|
+
const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);
|
|
6075
|
+
const stopWatch = watch(
|
|
6076
|
+
targets,
|
|
6077
|
+
(els) => {
|
|
6078
|
+
cleanup();
|
|
6079
|
+
if (isSupported.value && window2) {
|
|
6080
|
+
observer = new ResizeObserver(callback);
|
|
6081
|
+
for (const _el of els)
|
|
6082
|
+
_el && observer.observe(_el, observerOptions);
|
|
6083
|
+
}
|
|
6084
|
+
},
|
|
6085
|
+
{ immediate: true, flush: "post" }
|
|
6086
|
+
);
|
|
6087
|
+
const stop = () => {
|
|
6088
|
+
cleanup();
|
|
6089
|
+
stopWatch();
|
|
6090
|
+
};
|
|
6091
|
+
tryOnScopeDispose(stop);
|
|
6092
|
+
return {
|
|
6093
|
+
isSupported,
|
|
6094
|
+
stop
|
|
6095
|
+
};
|
|
6096
|
+
}
|
|
6097
|
+
function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
|
|
6098
|
+
const { window: window2 = defaultWindow, box = "content-box" } = options;
|
|
6099
|
+
const isSVG = computed(() => {
|
|
6100
|
+
var _a2, _b;
|
|
6101
|
+
return (_b = (_a2 = unrefElement(target)) == null ? void 0 : _a2.namespaceURI) == null ? void 0 : _b.includes("svg");
|
|
6102
|
+
});
|
|
6103
|
+
const width = ref(initialSize.width);
|
|
6104
|
+
const height = ref(initialSize.height);
|
|
6105
|
+
const { stop: stop1 } = useResizeObserver(
|
|
6106
|
+
target,
|
|
6107
|
+
([entry]) => {
|
|
6108
|
+
const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
|
|
6109
|
+
if (window2 && isSVG.value) {
|
|
6110
|
+
const $elem = unrefElement(target);
|
|
6111
|
+
if ($elem) {
|
|
6112
|
+
const rect = $elem.getBoundingClientRect();
|
|
6113
|
+
width.value = rect.width;
|
|
6114
|
+
height.value = rect.height;
|
|
6115
|
+
}
|
|
6116
|
+
} else {
|
|
6117
|
+
if (boxSize) {
|
|
6118
|
+
const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];
|
|
6119
|
+
width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
|
|
6120
|
+
height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
|
|
6121
|
+
} else {
|
|
6122
|
+
width.value = entry.contentRect.width;
|
|
6123
|
+
height.value = entry.contentRect.height;
|
|
6124
|
+
}
|
|
6125
|
+
}
|
|
6126
|
+
},
|
|
6127
|
+
options
|
|
6128
|
+
);
|
|
6129
|
+
tryOnMounted(() => {
|
|
6130
|
+
const ele = unrefElement(target);
|
|
6131
|
+
if (ele) {
|
|
6132
|
+
width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width;
|
|
6133
|
+
height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
|
|
6134
|
+
}
|
|
6135
|
+
});
|
|
6136
|
+
const stop2 = watch(
|
|
6137
|
+
() => unrefElement(target),
|
|
6138
|
+
(ele) => {
|
|
6139
|
+
width.value = ele ? initialSize.width : 0;
|
|
6140
|
+
height.value = ele ? initialSize.height : 0;
|
|
6141
|
+
}
|
|
6142
|
+
);
|
|
6143
|
+
function stop() {
|
|
6144
|
+
stop1();
|
|
6145
|
+
stop2();
|
|
6146
|
+
}
|
|
6147
|
+
return {
|
|
6148
|
+
width,
|
|
6149
|
+
height,
|
|
6150
|
+
stop
|
|
6151
|
+
};
|
|
6152
|
+
}
|
|
6153
|
+
function useVirtualList(list, options) {
|
|
6154
|
+
const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = "itemHeight" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);
|
|
6155
|
+
return {
|
|
6156
|
+
list: currentList,
|
|
6157
|
+
scrollTo,
|
|
6158
|
+
containerProps: {
|
|
6159
|
+
ref: containerRef,
|
|
6160
|
+
onScroll: () => {
|
|
6161
|
+
calculateRange();
|
|
6162
|
+
},
|
|
6163
|
+
style: containerStyle
|
|
6164
|
+
},
|
|
6165
|
+
wrapperProps
|
|
6166
|
+
};
|
|
6167
|
+
}
|
|
6168
|
+
function useVirtualListResources(list) {
|
|
6169
|
+
const containerRef = ref(null);
|
|
6170
|
+
const size2 = useElementSize(containerRef);
|
|
6171
|
+
const currentList = ref([]);
|
|
6172
|
+
const source = shallowRef(list);
|
|
6173
|
+
const state2 = ref({ start: 0, end: 10 });
|
|
6174
|
+
return { state: state2, source, currentList, size: size2, containerRef };
|
|
6175
|
+
}
|
|
6176
|
+
function createGetViewCapacity(state2, source, itemSize) {
|
|
6177
|
+
return (containerSize) => {
|
|
6178
|
+
if (typeof itemSize === "number")
|
|
6179
|
+
return Math.ceil(containerSize / itemSize);
|
|
6180
|
+
const { start: start2 = 0 } = state2.value;
|
|
6181
|
+
let sum = 0;
|
|
6182
|
+
let capacity = 0;
|
|
6183
|
+
for (let i2 = start2; i2 < source.value.length; i2++) {
|
|
6184
|
+
const size2 = itemSize(i2);
|
|
6185
|
+
sum += size2;
|
|
6186
|
+
capacity = i2;
|
|
6187
|
+
if (sum > containerSize)
|
|
6188
|
+
break;
|
|
6189
|
+
}
|
|
6190
|
+
return capacity - start2;
|
|
6191
|
+
};
|
|
6192
|
+
}
|
|
6193
|
+
function createGetOffset(source, itemSize) {
|
|
6194
|
+
return (scrollDirection) => {
|
|
6195
|
+
if (typeof itemSize === "number")
|
|
6196
|
+
return Math.floor(scrollDirection / itemSize) + 1;
|
|
6197
|
+
let sum = 0;
|
|
6198
|
+
let offset2 = 0;
|
|
6199
|
+
for (let i2 = 0; i2 < source.value.length; i2++) {
|
|
6200
|
+
const size2 = itemSize(i2);
|
|
6201
|
+
sum += size2;
|
|
6202
|
+
if (sum >= scrollDirection) {
|
|
6203
|
+
offset2 = i2;
|
|
6204
|
+
break;
|
|
6205
|
+
}
|
|
6206
|
+
}
|
|
6207
|
+
return offset2 + 1;
|
|
6208
|
+
};
|
|
6209
|
+
}
|
|
6210
|
+
function createCalculateRange(type3, overscan, getOffset, getViewCapacity, { containerRef, state: state2, currentList, source }) {
|
|
6211
|
+
return () => {
|
|
6212
|
+
const element = containerRef.value;
|
|
6213
|
+
if (element) {
|
|
6214
|
+
const offset2 = getOffset(type3 === "vertical" ? element.scrollTop : element.scrollLeft);
|
|
6215
|
+
const viewCapacity = getViewCapacity(type3 === "vertical" ? element.clientHeight : element.clientWidth);
|
|
6216
|
+
const from2 = offset2 - overscan;
|
|
6217
|
+
const to2 = offset2 + viewCapacity + overscan;
|
|
6218
|
+
state2.value = {
|
|
6219
|
+
start: from2 < 0 ? 0 : from2,
|
|
6220
|
+
end: to2 > source.value.length ? source.value.length : to2
|
|
6221
|
+
};
|
|
6222
|
+
currentList.value = source.value.slice(state2.value.start, state2.value.end).map((ele, index2) => ({
|
|
6223
|
+
data: ele,
|
|
6224
|
+
index: index2 + state2.value.start
|
|
6225
|
+
}));
|
|
6226
|
+
}
|
|
6227
|
+
};
|
|
6228
|
+
}
|
|
6229
|
+
function createGetDistance(itemSize, source) {
|
|
6230
|
+
return (index2) => {
|
|
6231
|
+
if (typeof itemSize === "number") {
|
|
6232
|
+
const size22 = index2 * itemSize;
|
|
6233
|
+
return size22;
|
|
6234
|
+
}
|
|
6235
|
+
const size2 = source.value.slice(0, index2).reduce((sum, _2, i2) => sum + itemSize(i2), 0);
|
|
6236
|
+
return size2;
|
|
6237
|
+
};
|
|
6238
|
+
}
|
|
6239
|
+
function useWatchForSizes(size2, list, containerRef, calculateRange) {
|
|
6240
|
+
watch([size2.width, size2.height, list, containerRef], () => {
|
|
6241
|
+
calculateRange();
|
|
6242
|
+
});
|
|
6243
|
+
}
|
|
6244
|
+
function createComputedTotalSize(itemSize, source) {
|
|
6245
|
+
return computed(() => {
|
|
6246
|
+
if (typeof itemSize === "number")
|
|
6247
|
+
return source.value.length * itemSize;
|
|
6248
|
+
return source.value.reduce((sum, _2, index2) => sum + itemSize(index2), 0);
|
|
6249
|
+
});
|
|
6250
|
+
}
|
|
6251
|
+
const scrollToDictionaryForElementScrollKey = {
|
|
6252
|
+
horizontal: "scrollLeft",
|
|
6253
|
+
vertical: "scrollTop"
|
|
6254
|
+
};
|
|
6255
|
+
function createScrollTo(type3, calculateRange, getDistance, containerRef) {
|
|
6256
|
+
return (index2) => {
|
|
6257
|
+
if (containerRef.value) {
|
|
6258
|
+
containerRef.value[scrollToDictionaryForElementScrollKey[type3]] = getDistance(index2);
|
|
6259
|
+
calculateRange();
|
|
6260
|
+
}
|
|
6261
|
+
};
|
|
6262
|
+
}
|
|
6263
|
+
function useHorizontalVirtualList(options, list) {
|
|
6264
|
+
const resources = useVirtualListResources(list);
|
|
6265
|
+
const { state: state2, source, currentList, size: size2, containerRef } = resources;
|
|
6266
|
+
const containerStyle = { overflowX: "auto" };
|
|
6267
|
+
const { itemWidth, overscan = 5 } = options;
|
|
6268
|
+
const getViewCapacity = createGetViewCapacity(state2, source, itemWidth);
|
|
6269
|
+
const getOffset = createGetOffset(source, itemWidth);
|
|
6270
|
+
const calculateRange = createCalculateRange("horizontal", overscan, getOffset, getViewCapacity, resources);
|
|
6271
|
+
const getDistanceLeft = createGetDistance(itemWidth, source);
|
|
6272
|
+
const offsetLeft = computed(() => getDistanceLeft(state2.value.start));
|
|
6273
|
+
const totalWidth = createComputedTotalSize(itemWidth, source);
|
|
6274
|
+
useWatchForSizes(size2, list, containerRef, calculateRange);
|
|
6275
|
+
const scrollTo = createScrollTo("horizontal", calculateRange, getDistanceLeft, containerRef);
|
|
6276
|
+
const wrapperProps = computed(() => {
|
|
6277
|
+
return {
|
|
6278
|
+
style: {
|
|
6279
|
+
height: "100%",
|
|
6280
|
+
width: `${totalWidth.value - offsetLeft.value}px`,
|
|
6281
|
+
marginLeft: `${offsetLeft.value}px`,
|
|
6282
|
+
display: "flex"
|
|
6283
|
+
}
|
|
6284
|
+
};
|
|
6285
|
+
});
|
|
6286
|
+
return {
|
|
6287
|
+
scrollTo,
|
|
6288
|
+
calculateRange,
|
|
6289
|
+
wrapperProps,
|
|
6290
|
+
containerStyle,
|
|
6291
|
+
currentList,
|
|
6292
|
+
containerRef
|
|
6293
|
+
};
|
|
6294
|
+
}
|
|
6295
|
+
function useVerticalVirtualList(options, list) {
|
|
6296
|
+
const resources = useVirtualListResources(list);
|
|
6297
|
+
const { state: state2, source, currentList, size: size2, containerRef } = resources;
|
|
6298
|
+
const containerStyle = { overflowY: "auto" };
|
|
6299
|
+
const { itemHeight, overscan = 5 } = options;
|
|
6300
|
+
const getViewCapacity = createGetViewCapacity(state2, source, itemHeight);
|
|
6301
|
+
const getOffset = createGetOffset(source, itemHeight);
|
|
6302
|
+
const calculateRange = createCalculateRange("vertical", overscan, getOffset, getViewCapacity, resources);
|
|
6303
|
+
const getDistanceTop = createGetDistance(itemHeight, source);
|
|
6304
|
+
const offsetTop = computed(() => getDistanceTop(state2.value.start));
|
|
6305
|
+
const totalHeight = createComputedTotalSize(itemHeight, source);
|
|
6306
|
+
useWatchForSizes(size2, list, containerRef, calculateRange);
|
|
6307
|
+
const scrollTo = createScrollTo("vertical", calculateRange, getDistanceTop, containerRef);
|
|
6308
|
+
const wrapperProps = computed(() => {
|
|
6309
|
+
return {
|
|
6310
|
+
style: {
|
|
6311
|
+
width: "100%",
|
|
6312
|
+
height: `${totalHeight.value - offsetTop.value}px`,
|
|
6313
|
+
marginTop: `${offsetTop.value}px`
|
|
6314
|
+
}
|
|
6315
|
+
};
|
|
6316
|
+
});
|
|
6317
|
+
return {
|
|
6318
|
+
calculateRange,
|
|
6319
|
+
scrollTo,
|
|
6320
|
+
containerStyle,
|
|
6321
|
+
wrapperProps,
|
|
6322
|
+
currentList,
|
|
6323
|
+
containerRef
|
|
6324
|
+
};
|
|
6325
|
+
}
|
|
6326
|
+
const _withScopeId$3 = (n2) => (pushScopeId("data-v-73d79ea6"), n2 = n2(), popScopeId(), n2);
|
|
6327
|
+
const _hoisted_1$C = {
|
|
6328
|
+
key: 0,
|
|
6329
|
+
class: "loading-table-wrapper z-99 h-100 w-100 absolute inset"
|
|
6330
|
+
};
|
|
6331
|
+
const _hoisted_2$t = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("div", { class: "loading-table-animation absolute oval" }, null, -1));
|
|
6332
|
+
const _hoisted_3$j = [
|
|
6333
|
+
_hoisted_2$t
|
|
6334
|
+
];
|
|
6335
|
+
const _hoisted_4$d = { class: "infinite-wrapper" };
|
|
6336
|
+
const _hoisted_5$c = { class: "row first-row" };
|
|
6337
|
+
const _hoisted_6$7 = { key: 0 };
|
|
6338
|
+
const _hoisted_7$2 = ["onClick"];
|
|
6339
|
+
const _hoisted_8$1 = { class: "flex" };
|
|
6340
|
+
const _hoisted_9$1 = ["onClick"];
|
|
6341
|
+
const _hoisted_10$1 = { key: 0 };
|
|
6342
|
+
const _hoisted_11$1 = ["value"];
|
|
6343
|
+
const _hoisted_12$1 = { key: 1 };
|
|
5997
6344
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
5998
6345
|
__name: "TableSchema",
|
|
5999
|
-
props: {
|
|
6346
|
+
props: /* @__PURE__ */ mergeModels({
|
|
6000
6347
|
selectedItems: {},
|
|
6001
6348
|
data: {},
|
|
6002
6349
|
schema: { type: Function },
|
|
6003
6350
|
showFields: {}
|
|
6004
|
-
},
|
|
6005
|
-
|
|
6351
|
+
}, {
|
|
6352
|
+
"loading": { default: false },
|
|
6353
|
+
"loadingModifiers": {},
|
|
6354
|
+
"itemHeight": { default: 50 },
|
|
6355
|
+
"itemHeightModifiers": {}
|
|
6356
|
+
}),
|
|
6357
|
+
emits: /* @__PURE__ */ mergeModels(["update:selectedItems", "orderBy", "select"], ["update:loading", "update:itemHeight"]),
|
|
6006
6358
|
setup(__props, { emit: __emit }) {
|
|
6359
|
+
useCssVars((_ctx) => ({
|
|
6360
|
+
"59d71ad2": unref(computedItemHiehgt)
|
|
6361
|
+
}));
|
|
6007
6362
|
const props2 = __props;
|
|
6008
6363
|
const emit2 = __emit;
|
|
6009
6364
|
const slots = useSlots();
|
|
6010
|
-
const loading =
|
|
6011
|
-
|
|
6012
|
-
computed({
|
|
6013
|
-
get: () => selectedItems.value,
|
|
6014
|
-
set: (value) => {
|
|
6015
|
-
selectedItems.value = value;
|
|
6016
|
-
emit2("update:selectedItems", value);
|
|
6017
|
-
}
|
|
6018
|
-
});
|
|
6019
|
-
function selectElement(item) {
|
|
6020
|
-
emit2("select", item);
|
|
6021
|
-
}
|
|
6022
|
-
let sortDirection = ref("ASC");
|
|
6365
|
+
const loading = useModel(__props, "loading");
|
|
6366
|
+
const itemHeight = useModel(__props, "itemHeight");
|
|
6367
|
+
const computedItemHiehgt = computed(() => `${itemHeight.value}px`);
|
|
6023
6368
|
let sortField = ref("");
|
|
6369
|
+
let sortDirection = ref("ASC");
|
|
6370
|
+
let selectedItems = ref(props2.selectedItems || []);
|
|
6371
|
+
const isSelectable = computed(() => Array.isArray(props2.selectedItems));
|
|
6024
6372
|
const computedSortField = computed(() => `_transformed_${sortField.value}`);
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
}));
|
|
6033
|
-
return props2.showFields ? schema.filter((f2) => {
|
|
6034
|
-
var _a2;
|
|
6035
|
-
return ((_a2 = props2.showFields) == null ? void 0 : _a2.includes(f2.id)) ?? !f2.id;
|
|
6036
|
-
}) : schema;
|
|
6037
|
-
}
|
|
6038
|
-
const computedSchema = computed(() => {
|
|
6039
|
-
let _schema = props2.schema;
|
|
6040
|
-
if (typeof _schema === "function") {
|
|
6041
|
-
_schema = _schema();
|
|
6042
|
-
}
|
|
6043
|
-
if (_schema) {
|
|
6044
|
-
return props2.showFields ? _schema.filter((f2) => {
|
|
6045
|
-
var _a2;
|
|
6046
|
-
return (_a2 = props2.showFields) == null ? void 0 : _a2.includes(f2.id);
|
|
6047
|
-
}) : _schema;
|
|
6048
|
-
}
|
|
6049
|
-
return getFallbackSchema();
|
|
6050
|
-
});
|
|
6373
|
+
const computedSchema = computed(
|
|
6374
|
+
() => useBglSchema({
|
|
6375
|
+
schema: props2.schema,
|
|
6376
|
+
showFields: props2.showFields,
|
|
6377
|
+
data: props2.data
|
|
6378
|
+
})
|
|
6379
|
+
);
|
|
6051
6380
|
function transform(rowData) {
|
|
6052
6381
|
var _a2;
|
|
6053
6382
|
const obj = { ...rowData };
|
|
@@ -6066,10 +6395,14 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6066
6395
|
const dta = [...props2.data].map(transform);
|
|
6067
6396
|
if (sortField.value) {
|
|
6068
6397
|
return dta.sort((a2, b2) => {
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6398
|
+
let aValue = a2[computedSortField.value] ?? a2[sortField.value] ?? "";
|
|
6399
|
+
let bValue = b2[computedSortField.value] ?? b2[sortField.value] ?? "";
|
|
6400
|
+
if (isDate$1(aValue) && isDate$1(bValue)) {
|
|
6401
|
+
aValue = new Date(aValue).getTime();
|
|
6402
|
+
bValue = new Date(bValue).getTime();
|
|
6403
|
+
}
|
|
6404
|
+
const numAValue = Number.parseInt(`${aValue}`.replace(/[^\d.-]/g, ""), 10);
|
|
6405
|
+
const numBValue = Number.parseInt(`${bValue}`.replace(/[^\d.-]/g, ""), 10);
|
|
6073
6406
|
if (!Number.isNaN(numAValue) && !Number.isNaN(numBValue)) {
|
|
6074
6407
|
if (sortDirection.value === "ASC") return numAValue - numBValue;
|
|
6075
6408
|
return numBValue - numAValue;
|
|
@@ -6094,68 +6427,138 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6094
6427
|
}
|
|
6095
6428
|
emit2("orderBy", `${fieldname} ${sortDirection.value}`.trim());
|
|
6096
6429
|
}
|
|
6430
|
+
const { list, containerProps, wrapperProps, scrollTo } = useVirtualList(
|
|
6431
|
+
computedData,
|
|
6432
|
+
{
|
|
6433
|
+
itemHeight: itemHeight.value,
|
|
6434
|
+
overscan: 10
|
|
6435
|
+
}
|
|
6436
|
+
);
|
|
6437
|
+
watch(
|
|
6438
|
+
() => computedData.value.length,
|
|
6439
|
+
(newLength, oldLength) => {
|
|
6440
|
+
if (newLength === oldLength) return;
|
|
6441
|
+
scrollTo(0);
|
|
6442
|
+
}
|
|
6443
|
+
);
|
|
6444
|
+
const allSelector = ref(null);
|
|
6445
|
+
let computedSelectedItems = computed({
|
|
6446
|
+
get: () => selectedItems.value,
|
|
6447
|
+
set: (value) => {
|
|
6448
|
+
selectedItems.value = value;
|
|
6449
|
+
emit2("update:selectedItems", value);
|
|
6450
|
+
updateAllSelectorState();
|
|
6451
|
+
}
|
|
6452
|
+
});
|
|
6453
|
+
function updateAllSelectorState() {
|
|
6454
|
+
if (!allSelector.value) return;
|
|
6455
|
+
const allSelected = computedData.value.length === computedSelectedItems.value.length && computedData.value.every((s2) => computedSelectedItems.value.includes(s2.id));
|
|
6456
|
+
allSelector.value.checked = allSelected;
|
|
6457
|
+
allSelector.value.indeterminate = !allSelected && computedSelectedItems.value.length > 0;
|
|
6458
|
+
}
|
|
6459
|
+
function toggleSelectItem(item) {
|
|
6460
|
+
if (!computedSelectedItems.value.length) {
|
|
6461
|
+
emit2("select", item);
|
|
6462
|
+
return;
|
|
6463
|
+
}
|
|
6464
|
+
const index2 = computedSelectedItems.value.indexOf(item.id);
|
|
6465
|
+
if (index2 > -1) {
|
|
6466
|
+
computedSelectedItems.value.splice(index2, 1);
|
|
6467
|
+
} else {
|
|
6468
|
+
computedSelectedItems.value.push(item.id);
|
|
6469
|
+
}
|
|
6470
|
+
}
|
|
6471
|
+
function toggleSelectAll(event) {
|
|
6472
|
+
const value = event.target.checked;
|
|
6473
|
+
computedSelectedItems.value = value ? computedData.value.map((d2) => d2.id) : [];
|
|
6474
|
+
}
|
|
6097
6475
|
return (_ctx, _cache) => {
|
|
6098
|
-
return openBlock(), createElementBlock("div",
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6476
|
+
return openBlock(), createElementBlock("div", mergeProps({ class: "table-list-wrap h-100" }, unref(containerProps), {
|
|
6477
|
+
class: { "loading-table": loading.value }
|
|
6478
|
+
}), [
|
|
6479
|
+
loading.value ? (openBlock(), createElementBlock("div", _hoisted_1$C, _hoisted_3$j)) : (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ key: 1 }, unref(wrapperProps))), [
|
|
6480
|
+
createElementVNode("table", _hoisted_4$d, [
|
|
6481
|
+
createElementVNode("thead", _hoisted_5$c, [
|
|
6482
|
+
unref(isSelectable) ? (openBlock(), createElementBlock("th", _hoisted_6$7, [
|
|
6483
|
+
createElementVNode("input", {
|
|
6484
|
+
ref_key: "allSelector",
|
|
6485
|
+
ref: allSelector,
|
|
6486
|
+
type: "checkbox",
|
|
6487
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
6488
|
+
}, ["stop"])),
|
|
6489
|
+
onChange: toggleSelectAll
|
|
6490
|
+
}, null, 544)
|
|
6491
|
+
])) : createCommentVNode("", true),
|
|
6492
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(computedSchema), (field) => {
|
|
6493
|
+
return openBlock(), createElementBlock("th", {
|
|
6494
|
+
key: field.id,
|
|
6495
|
+
class: "col",
|
|
6496
|
+
onClick: ($event) => sort2((field == null ? void 0 : field.id) || "")
|
|
6497
|
+
}, [
|
|
6498
|
+
createElementVNode("div", _hoisted_8$1, [
|
|
6499
|
+
createTextVNode(toDisplayString(field.label || unref(keyToLabel)(field.id)) + " ", 1),
|
|
6500
|
+
createElementVNode("div", {
|
|
6501
|
+
class: normalizeClass(["list-arrows", { sorted: unref(sortField) === field.id }])
|
|
6502
|
+
}, [
|
|
6503
|
+
createVNode(unref(_sfc_main$O), {
|
|
6504
|
+
class: normalizeClass({ desc: unref(sortDirection) === "DESC" }),
|
|
6505
|
+
icon: "keyboard_arrow_up"
|
|
6506
|
+
}, null, 8, ["class"])
|
|
6507
|
+
], 2)
|
|
6508
|
+
])
|
|
6509
|
+
], 8, _hoisted_7$2);
|
|
6510
|
+
}), 128))
|
|
6511
|
+
]),
|
|
6512
|
+
createElementVNode("tbody", null, [
|
|
6513
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(list), ({ data: row }) => {
|
|
6514
|
+
return openBlock(), createElementBlock("tr", {
|
|
6515
|
+
key: row.id,
|
|
6516
|
+
class: normalizeClass(["row row-item position-relative", { selected: unref(computedSelectedItems).includes(row.id) }]),
|
|
6517
|
+
onClick: ($event) => toggleSelectItem(row)
|
|
6518
|
+
}, [
|
|
6519
|
+
unref(isSelectable) ? (openBlock(), createElementBlock("td", _hoisted_10$1, [
|
|
6520
|
+
createElementVNode("div", {
|
|
6521
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
6522
|
+
}, ["stop"]))
|
|
6523
|
+
}, [
|
|
6524
|
+
withDirectives(createElementVNode("input", {
|
|
6525
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(computedSelectedItems) ? computedSelectedItems.value = $event : computedSelectedItems = $event),
|
|
6526
|
+
type: "checkbox",
|
|
6527
|
+
value: row.id
|
|
6528
|
+
}, null, 8, _hoisted_11$1), [
|
|
6529
|
+
[vModelCheckbox, unref(computedSelectedItems)]
|
|
6530
|
+
])
|
|
6531
|
+
])
|
|
6532
|
+
])) : createCommentVNode("", true),
|
|
6533
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(computedSchema), (field) => {
|
|
6534
|
+
return openBlock(), createElementBlock("td", {
|
|
6535
|
+
key: `${field.id}-${row.id}`,
|
|
6536
|
+
class: "col"
|
|
6537
|
+
}, [
|
|
6538
|
+
field.id && unref(slots)[field.id] ? renderSlot(_ctx.$slots, field.id, {
|
|
6539
|
+
key: 0,
|
|
6540
|
+
row,
|
|
6541
|
+
field
|
|
6542
|
+
}, void 0, true) : (openBlock(), createElementBlock("div", _hoisted_12$1, [
|
|
6543
|
+
createVNode(unref(_sfc_main$p), {
|
|
6544
|
+
class: "embedded-field",
|
|
6545
|
+
field,
|
|
6546
|
+
modelValue: row,
|
|
6547
|
+
label: ""
|
|
6548
|
+
}, null, 8, ["field", "modelValue"])
|
|
6549
|
+
]))
|
|
6550
|
+
]);
|
|
6551
|
+
}), 128))
|
|
6552
|
+
], 10, _hoisted_9$1);
|
|
6553
|
+
}), 128))
|
|
6554
|
+
])
|
|
6555
|
+
])
|
|
6556
|
+
], 16))
|
|
6557
|
+
], 16);
|
|
6155
6558
|
};
|
|
6156
6559
|
}
|
|
6157
6560
|
});
|
|
6158
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
6561
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-73d79ea6"]]);
|
|
6159
6562
|
const _sfc_main$E = {};
|
|
6160
6563
|
const _hoisted_1$B = { class: "flex space-between" };
|
|
6161
6564
|
function _sfc_render$1(_ctx, _cache) {
|
|
@@ -6197,7 +6600,7 @@ const _hoisted_2$s = {
|
|
|
6197
6600
|
};
|
|
6198
6601
|
const _hoisted_3$i = { class: "key" };
|
|
6199
6602
|
const _hoisted_4$c = { key: 1 };
|
|
6200
|
-
const _hoisted_5$
|
|
6603
|
+
const _hoisted_5$b = { class: "key" };
|
|
6201
6604
|
const _hoisted_6$6 = { class: "vlue" };
|
|
6202
6605
|
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
6203
6606
|
__name: "DataPreview",
|
|
@@ -6213,16 +6616,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6213
6616
|
setup(__props) {
|
|
6214
6617
|
const props2 = __props;
|
|
6215
6618
|
const itemData = useModel(__props, "data");
|
|
6216
|
-
const computedSchema = computed(
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
});
|
|
6223
|
-
}
|
|
6224
|
-
return schema;
|
|
6225
|
-
});
|
|
6619
|
+
const computedSchema = computed(
|
|
6620
|
+
() => getFallbackSchema(
|
|
6621
|
+
[itemData.value],
|
|
6622
|
+
props2.showFields
|
|
6623
|
+
)
|
|
6624
|
+
);
|
|
6226
6625
|
return (_ctx, _cache) => {
|
|
6227
6626
|
var _a2;
|
|
6228
6627
|
return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$A, [
|
|
@@ -6247,13 +6646,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6247
6646
|
], 64);
|
|
6248
6647
|
}), 128)),
|
|
6249
6648
|
!((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_4$c, [
|
|
6250
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, (
|
|
6649
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, ({ id, label }) => {
|
|
6251
6650
|
return openBlock(), createElementBlock("div", {
|
|
6252
|
-
key,
|
|
6651
|
+
key: id,
|
|
6253
6652
|
class: "data-row"
|
|
6254
6653
|
}, [
|
|
6255
|
-
createElementVNode("div", _hoisted_5$
|
|
6256
|
-
createElementVNode("div", _hoisted_6$6, toDisplayString(itemData.value[
|
|
6654
|
+
createElementVNode("div", _hoisted_5$b, toDisplayString(label), 1),
|
|
6655
|
+
createElementVNode("div", _hoisted_6$6, toDisplayString(itemData.value[id ?? ""]), 1)
|
|
6257
6656
|
]);
|
|
6258
6657
|
}), 128))
|
|
6259
6658
|
])) : createCommentVNode("", true),
|
|
@@ -6262,7 +6661,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6262
6661
|
};
|
|
6263
6662
|
}
|
|
6264
6663
|
});
|
|
6265
|
-
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-
|
|
6664
|
+
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-2281300f"]]);
|
|
6266
6665
|
const _hoisted_1$z = {
|
|
6267
6666
|
key: 0,
|
|
6268
6667
|
class: "card_label"
|
|
@@ -16310,7 +16709,6 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
16310
16709
|
if (props2.address) {
|
|
16311
16710
|
geocodeAddress(props2.address).catch(console.error);
|
|
16312
16711
|
}
|
|
16313
|
-
console.log(props2.zoomControl, props2.center);
|
|
16314
16712
|
map4.value = L$1.map(id.value, {
|
|
16315
16713
|
center: props2.center,
|
|
16316
16714
|
zoom: props2.zoom,
|
|
@@ -16330,7 +16728,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
16330
16728
|
}
|
|
16331
16729
|
async function geocodeAddress(address) {
|
|
16332
16730
|
var _a2;
|
|
16333
|
-
const
|
|
16731
|
+
const addressURL = address.replace(/\s+/g, "+");
|
|
16732
|
+
const geocodeUrl = `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURI(addressURL)}`;
|
|
16334
16733
|
const res = await fetch(geocodeUrl);
|
|
16335
16734
|
const data2 = await res.json() || [];
|
|
16336
16735
|
data2.forEach((element) => {
|
|
@@ -16615,16 +17014,20 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
16615
17014
|
id: {},
|
|
16616
17015
|
title: {},
|
|
16617
17016
|
small: { type: Boolean },
|
|
16618
|
-
required: { type: Boolean }
|
|
17017
|
+
required: { type: Boolean },
|
|
17018
|
+
defaultValue: { type: Boolean, default: false }
|
|
16619
17019
|
}, {
|
|
16620
|
-
"modelValue": { type: Boolean, ...{ default:
|
|
17020
|
+
"modelValue": { type: Boolean, ...{ default: void 0 } },
|
|
16621
17021
|
"modelModifiers": {}
|
|
16622
17022
|
}),
|
|
16623
17023
|
emits: ["update:modelValue"],
|
|
16624
17024
|
setup(__props) {
|
|
16625
17025
|
const props2 = __props;
|
|
16626
|
-
const inputId =
|
|
17026
|
+
const inputId = computed(() => props2.id || Math.random().toString(36).substring(7));
|
|
16627
17027
|
const checked = useModel(__props, "modelValue");
|
|
17028
|
+
onMounted(() => {
|
|
17029
|
+
if (checked.value === void 0) checked.value = props2.defaultValue;
|
|
17030
|
+
});
|
|
16628
17031
|
return (_ctx, _cache) => {
|
|
16629
17032
|
return openBlock(), createElementBlock("div", {
|
|
16630
17033
|
class: normalizeClass(["bagel-input bgl-checkbox align-items-center ps-025", { small: _ctx.small }]),
|
|
@@ -16648,7 +17051,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
16648
17051
|
};
|
|
16649
17052
|
}
|
|
16650
17053
|
});
|
|
16651
|
-
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-
|
|
17054
|
+
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-e8fcfd5e"]]);
|
|
16652
17055
|
function toDate(argument) {
|
|
16653
17056
|
const argStr = Object.prototype.toString.call(argument);
|
|
16654
17057
|
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
@@ -25103,6 +25506,7 @@ const _hoisted_2$m = { key: 0 };
|
|
|
25103
25506
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
25104
25507
|
__name: "DateInput",
|
|
25105
25508
|
props: {
|
|
25509
|
+
required: { type: Boolean },
|
|
25106
25510
|
label: {},
|
|
25107
25511
|
editMode: { type: Boolean, default: true },
|
|
25108
25512
|
small: { type: Boolean, default: false },
|
|
@@ -25147,6 +25551,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
25147
25551
|
ref: datePicker,
|
|
25148
25552
|
modelValue: date2.value,
|
|
25149
25553
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => date2.value = $event),
|
|
25554
|
+
required: _ctx.required,
|
|
25150
25555
|
"auto-apply": true,
|
|
25151
25556
|
"enable-time-picker": _ctx.enableTime,
|
|
25152
25557
|
"allowed-dates": _ctx.allowedDates
|
|
@@ -25155,7 +25560,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
25155
25560
|
"minutes-increment": _ctx.minutesIncrement,
|
|
25156
25561
|
"minutes-grid-increment": _ctx.minutesGridIncrement,
|
|
25157
25562
|
"start-time": { hours: 8, minutes: 0 }
|
|
25158
|
-
}), null, 16, ["modelValue", "enable-time-picker", "allowed-dates", "time-picker-inline", "minutes-increment", "minutes-grid-increment"])
|
|
25563
|
+
}), null, 16, ["modelValue", "required", "enable-time-picker", "allowed-dates", "time-picker-inline", "minutes-increment", "minutes-grid-increment"])
|
|
25159
25564
|
], 10, _hoisted_1$s);
|
|
25160
25565
|
};
|
|
25161
25566
|
}
|
|
@@ -27900,7 +28305,7 @@ const _hoisted_1$p = ["title"];
|
|
|
27900
28305
|
const _hoisted_2$j = { class: "bagel-input" };
|
|
27901
28306
|
const _hoisted_3$e = { class: "table-side-scroll" };
|
|
27902
28307
|
const _hoisted_4$a = { class: "table-header" };
|
|
27903
|
-
const _hoisted_5$
|
|
28308
|
+
const _hoisted_5$a = { class: "table-reorder" };
|
|
27904
28309
|
const _hoisted_6$5 = { class: "table-action" };
|
|
27905
28310
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
27906
28311
|
__name: "TableField",
|
|
@@ -27998,7 +28403,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
27998
28403
|
key: row.id,
|
|
27999
28404
|
class: "flex table-row"
|
|
28000
28405
|
}, [
|
|
28001
|
-
createElementVNode("div", _hoisted_5$
|
|
28406
|
+
createElementVNode("div", _hoisted_5$a, [
|
|
28002
28407
|
createVNode(unref(_sfc_main$O), { icon: "more_vert" })
|
|
28003
28408
|
]),
|
|
28004
28409
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList((_a3 = unref(entityMeta)) == null ? void 0 : _a3.fields, (field) => {
|
|
@@ -28051,7 +28456,7 @@ const _hoisted_1$o = ["title"];
|
|
|
28051
28456
|
const _hoisted_2$i = ["for"];
|
|
28052
28457
|
const _hoisted_3$d = ["id", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
|
|
28053
28458
|
const _hoisted_4$9 = ["id", "title", "type", "rows", "placeholder", "disabled", "required", "pattern"];
|
|
28054
|
-
const _hoisted_5$
|
|
28459
|
+
const _hoisted_5$9 = { key: 2 };
|
|
28055
28460
|
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
28056
28461
|
__name: "TextInput",
|
|
28057
28462
|
props: {
|
|
@@ -28157,7 +28562,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
28157
28562
|
}, _ctx.nativeInputAttrs, { onInput: updateInputVal }), null, 16, _hoisted_4$9)), [
|
|
28158
28563
|
[vModelText, unref(inputVal)]
|
|
28159
28564
|
]),
|
|
28160
|
-
_ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_5$
|
|
28565
|
+
_ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_5$9, toDisplayString(_ctx.helptext), 1)) : createCommentVNode("", true)
|
|
28161
28566
|
], 8, _hoisted_2$i),
|
|
28162
28567
|
_ctx.iconStart ? (openBlock(), createBlock(unref(_sfc_main$O), {
|
|
28163
28568
|
key: 0,
|
|
@@ -28257,7 +28662,7 @@ const _hoisted_3$c = {
|
|
|
28257
28662
|
class: "time-wrap"
|
|
28258
28663
|
};
|
|
28259
28664
|
const _hoisted_4$8 = ["id", "name", "value"];
|
|
28260
|
-
const _hoisted_5$
|
|
28665
|
+
const _hoisted_5$8 = ["for"];
|
|
28261
28666
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
28262
28667
|
__name: "DatePicker",
|
|
28263
28668
|
props: {
|
|
@@ -28320,7 +28725,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
28320
28725
|
]),
|
|
28321
28726
|
createElementVNode("label", {
|
|
28322
28727
|
for: `${hr2}_${_ctx.id}`
|
|
28323
|
-
}, toDisplayString(hr2), 9, _hoisted_5$
|
|
28728
|
+
}, toDisplayString(hr2), 9, _hoisted_5$8)
|
|
28324
28729
|
], 64);
|
|
28325
28730
|
}), 128))
|
|
28326
28731
|
])) : createCommentVNode("", true)
|
|
@@ -28332,7 +28737,7 @@ const _hoisted_1$k = { class: "bagel-input" };
|
|
|
28332
28737
|
const _hoisted_2$f = { class: "pb-025" };
|
|
28333
28738
|
const _hoisted_3$b = { class: "flex gap-05 flex-wrap" };
|
|
28334
28739
|
const _hoisted_4$7 = ["id", "name", "value", "checked"];
|
|
28335
|
-
const _hoisted_5$
|
|
28740
|
+
const _hoisted_5$7 = ["for"];
|
|
28336
28741
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
28337
28742
|
__name: "RadioPillsInput",
|
|
28338
28743
|
props: {
|
|
@@ -28392,7 +28797,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
28392
28797
|
}, null, 40, _hoisted_4$7),
|
|
28393
28798
|
createElementVNode("label", {
|
|
28394
28799
|
for: `${_ctx.id}-${getValue(option2)}`
|
|
28395
|
-
}, toDisplayString(getLabel(option2)), 9, _hoisted_5$
|
|
28800
|
+
}, toDisplayString(getLabel(option2)), 9, _hoisted_5$7)
|
|
28396
28801
|
]);
|
|
28397
28802
|
}), 128))
|
|
28398
28803
|
])
|
|
@@ -28401,7 +28806,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
28401
28806
|
}
|
|
28402
28807
|
});
|
|
28403
28808
|
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-681173be"]]);
|
|
28404
|
-
const _withScopeId$2 = (n2) => (pushScopeId("data-v-
|
|
28809
|
+
const _withScopeId$2 = (n2) => (pushScopeId("data-v-1ce244aa"), n2 = n2(), popScopeId(), n2);
|
|
28405
28810
|
const _hoisted_1$j = { class: "bagel-input" };
|
|
28406
28811
|
const _hoisted_2$e = {
|
|
28407
28812
|
key: 0,
|
|
@@ -28412,7 +28817,7 @@ const _hoisted_4$6 = {
|
|
|
28412
28817
|
key: 1,
|
|
28413
28818
|
class: "multi-image-item previewName"
|
|
28414
28819
|
};
|
|
28415
|
-
const _hoisted_5$
|
|
28820
|
+
const _hoisted_5$6 = ["src"];
|
|
28416
28821
|
const _hoisted_6$4 = { class: "no-margin" };
|
|
28417
28822
|
const _hoisted_7$1 = {
|
|
28418
28823
|
key: 0,
|
|
@@ -28429,25 +28834,23 @@ const _hoisted_12 = {
|
|
|
28429
28834
|
const _hoisted_13 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("p", null, "Drop files here or click to upload", -1));
|
|
28430
28835
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
28431
28836
|
__name: "FileUpload",
|
|
28432
|
-
props:
|
|
28837
|
+
props: {
|
|
28433
28838
|
label: {},
|
|
28434
28839
|
multiple: { type: Boolean },
|
|
28435
28840
|
files: {},
|
|
28436
28841
|
deleteEndpoint: {},
|
|
28437
28842
|
bindkey: {},
|
|
28843
|
+
modelValue: {},
|
|
28438
28844
|
width: {}
|
|
28439
|
-
},
|
|
28440
|
-
"modelValue": {},
|
|
28441
|
-
"modelModifiers": {}
|
|
28442
|
-
}),
|
|
28845
|
+
},
|
|
28443
28846
|
emits: ["update:modelValue"],
|
|
28444
|
-
setup(__props) {
|
|
28847
|
+
setup(__props, { emit: __emit }) {
|
|
28445
28848
|
const props2 = __props;
|
|
28446
28849
|
const bagel = useBagel();
|
|
28447
28850
|
const bindKey2 = props2.bindkey || "id";
|
|
28448
|
-
const
|
|
28851
|
+
const emit2 = __emit;
|
|
28852
|
+
let file_bindkeys = ref(props2.modelValue || []);
|
|
28449
28853
|
const storageFiles = ref([]);
|
|
28450
|
-
const compareIds = (v1, v2) => [v1].flat().join(",") === [v2].flat().join(",");
|
|
28451
28854
|
onMounted(() => {
|
|
28452
28855
|
if (!props2.files && [file_bindkeys.value].flat().length) {
|
|
28453
28856
|
const ids = [file_bindkeys.value].flat().filter(Boolean);
|
|
@@ -28477,21 +28880,19 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28477
28880
|
},
|
|
28478
28881
|
{ immediate: true }
|
|
28479
28882
|
);
|
|
28480
|
-
|
|
28481
|
-
|
|
28482
|
-
(
|
|
28483
|
-
|
|
28484
|
-
|
|
28485
|
-
|
|
28486
|
-
|
|
28487
|
-
|
|
28488
|
-
|
|
28489
|
-
|
|
28490
|
-
|
|
28491
|
-
|
|
28492
|
-
|
|
28493
|
-
{ deep: true }
|
|
28494
|
-
);
|
|
28883
|
+
function updateModelValue() {
|
|
28884
|
+
let idValue;
|
|
28885
|
+
if (props2.multiple) {
|
|
28886
|
+
idValue = storageFiles.value.map((f2) => f2[bindKey2]);
|
|
28887
|
+
} else {
|
|
28888
|
+
idValue = storageFiles.value[0][bindKey2] || "";
|
|
28889
|
+
}
|
|
28890
|
+
const isSame = [idValue].flat().every((id) => [file_bindkeys.value].flat().includes(id));
|
|
28891
|
+
if (!isSame) {
|
|
28892
|
+
file_bindkeys.value = idValue;
|
|
28893
|
+
emit2("update:modelValue", file_bindkeys.value);
|
|
28894
|
+
}
|
|
28895
|
+
}
|
|
28495
28896
|
const fileQueue = ref([]);
|
|
28496
28897
|
let isDragOver = ref(false);
|
|
28497
28898
|
function preventDefault(e) {
|
|
@@ -28505,16 +28906,20 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28505
28906
|
if (props2.deleteEndpoint) {
|
|
28506
28907
|
void bagel.delete(`${props2.deleteEndpoint}/${file.id}`);
|
|
28507
28908
|
}
|
|
28909
|
+
updateModelValue();
|
|
28508
28910
|
}
|
|
28509
|
-
function flushQueue() {
|
|
28510
|
-
|
|
28911
|
+
async function flushQueue() {
|
|
28912
|
+
for (const file of fileQueue.value) {
|
|
28913
|
+
file.uploading = true;
|
|
28511
28914
|
if (!props2.multiple) storageFiles.value.splice(0, 1);
|
|
28512
28915
|
const serverFile = await bagel.uploadFile(file.file, {
|
|
28513
28916
|
onUploadProgress: (e) => file.progress = e.progress * 100 - 1
|
|
28514
28917
|
});
|
|
28515
28918
|
storageFiles.value.push(serverFile);
|
|
28919
|
+
const i2 = fileQueue.value.indexOf(file);
|
|
28516
28920
|
fileQueue.value.splice(i2, 1);
|
|
28517
|
-
}
|
|
28921
|
+
}
|
|
28922
|
+
updateModelValue();
|
|
28518
28923
|
}
|
|
28519
28924
|
function browse() {
|
|
28520
28925
|
const input = document.createElement("input");
|
|
@@ -28523,7 +28928,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28523
28928
|
input.onchange = (e) => {
|
|
28524
28929
|
const target = e.target;
|
|
28525
28930
|
if (target.files) {
|
|
28526
|
-
Array.from(target.files).forEach(
|
|
28931
|
+
Array.from(target.files).forEach(
|
|
28932
|
+
(file) => fileQueue.value.push({ name: file.name, file, progress: 0 })
|
|
28933
|
+
);
|
|
28527
28934
|
}
|
|
28528
28935
|
flushQueue();
|
|
28529
28936
|
};
|
|
@@ -28542,7 +28949,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28542
28949
|
function drop3(e) {
|
|
28543
28950
|
preventDefault(e);
|
|
28544
28951
|
if (e.dataTransfer) {
|
|
28545
|
-
Array.from(e.dataTransfer.files).forEach(
|
|
28952
|
+
Array.from(e.dataTransfer.files).forEach(
|
|
28953
|
+
(file) => fileQueue.value.push({ name: file.name, file, progress: 0 })
|
|
28954
|
+
);
|
|
28546
28955
|
}
|
|
28547
28956
|
isDragOver.value = false;
|
|
28548
28957
|
flushQueue();
|
|
@@ -28580,7 +28989,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28580
28989
|
class: "preview",
|
|
28581
28990
|
src: file.url,
|
|
28582
28991
|
alt: ""
|
|
28583
|
-
}, null, 8, _hoisted_5$
|
|
28992
|
+
}, null, 8, _hoisted_5$6),
|
|
28584
28993
|
createElementVNode("p", _hoisted_6$4, toDisplayString(file.name), 1),
|
|
28585
28994
|
createVNode(unref(Btn), {
|
|
28586
28995
|
thin: "",
|
|
@@ -28637,14 +29046,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28637
29046
|
};
|
|
28638
29047
|
}
|
|
28639
29048
|
});
|
|
28640
|
-
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
28641
|
-
const _withScopeId$1 = (n2) => (pushScopeId("data-v-
|
|
29049
|
+
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-1ce244aa"]]);
|
|
29050
|
+
const _withScopeId$1 = (n2) => (pushScopeId("data-v-eceeebfb"), n2 = n2(), popScopeId(), n2);
|
|
28642
29051
|
const _hoisted_1$i = ["title"];
|
|
28643
29052
|
const _hoisted_2$d = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "slider round" }, null, -1));
|
|
28644
29053
|
const _hoisted_3$9 = [
|
|
28645
29054
|
_hoisted_2$d
|
|
28646
29055
|
];
|
|
28647
|
-
const _hoisted_4$5 = ["id"];
|
|
29056
|
+
const _hoisted_4$5 = ["id", "required"];
|
|
29057
|
+
const _hoisted_5$5 = ["for"];
|
|
28648
29058
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
28649
29059
|
__name: "ToggleInput",
|
|
28650
29060
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -28652,14 +29062,16 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
28652
29062
|
id: {},
|
|
28653
29063
|
title: {},
|
|
28654
29064
|
small: { type: Boolean },
|
|
29065
|
+
required: { type: Boolean },
|
|
28655
29066
|
defaultValue: { type: Boolean, default: false }
|
|
28656
29067
|
}, {
|
|
28657
|
-
"modelValue": { type: Boolean },
|
|
29068
|
+
"modelValue": { type: Boolean, ...{ default: void 0 } },
|
|
28658
29069
|
"modelModifiers": {}
|
|
28659
29070
|
}),
|
|
28660
29071
|
emits: ["update:modelValue"],
|
|
28661
29072
|
setup(__props) {
|
|
28662
29073
|
const props2 = __props;
|
|
29074
|
+
const inputId = ref(props2.id || Math.random().toString(36).substring(7));
|
|
28663
29075
|
const checked = useModel(__props, "modelValue");
|
|
28664
29076
|
onMounted(() => {
|
|
28665
29077
|
if (checked.value === void 0) checked.value = props2.defaultValue;
|
|
@@ -28667,26 +29079,30 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
28667
29079
|
return (_ctx, _cache) => {
|
|
28668
29080
|
return openBlock(), createElementBlock("div", {
|
|
28669
29081
|
class: normalizeClass(["bagel-input bgl-checkbox justify-content-center gap-1", { small: _ctx.small }]),
|
|
28670
|
-
title: _ctx.title
|
|
29082
|
+
title: _ctx.title,
|
|
29083
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => checked.value = !checked.value, ["prevent"]))
|
|
28671
29084
|
}, [
|
|
28672
29085
|
createElementVNode("div", {
|
|
28673
29086
|
class: normalizeClass(["switch", { checked: checked.value }])
|
|
28674
29087
|
}, _hoisted_3$9, 2),
|
|
28675
|
-
createElementVNode("
|
|
28676
|
-
|
|
28677
|
-
|
|
28678
|
-
|
|
28679
|
-
|
|
28680
|
-
|
|
28681
|
-
|
|
28682
|
-
|
|
28683
|
-
|
|
28684
|
-
|
|
29088
|
+
withDirectives(createElementVNode("input", {
|
|
29089
|
+
id: inputId.value,
|
|
29090
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checked.value = $event),
|
|
29091
|
+
type: "checkbox",
|
|
29092
|
+
required: _ctx.required
|
|
29093
|
+
}, null, 8, _hoisted_4$5), [
|
|
29094
|
+
[vModelCheckbox, checked.value]
|
|
29095
|
+
]),
|
|
29096
|
+
createElementVNode("label", { for: inputId.value }, [
|
|
29097
|
+
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
29098
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
29099
|
+
], true)
|
|
29100
|
+
], 8, _hoisted_5$5)
|
|
28685
29101
|
], 10, _hoisted_1$i);
|
|
28686
29102
|
};
|
|
28687
29103
|
}
|
|
28688
29104
|
});
|
|
28689
|
-
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
29105
|
+
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-eceeebfb"]]);
|
|
28690
29106
|
function OrderedMap(content) {
|
|
28691
29107
|
this.content = content;
|
|
28692
29108
|
}
|
|
@@ -62520,7 +62936,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62520
62936
|
};
|
|
62521
62937
|
}
|
|
62522
62938
|
});
|
|
62523
|
-
const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
62939
|
+
const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-70d6cf78"]]);
|
|
62524
62940
|
const countryArray = [
|
|
62525
62941
|
["Afghanistan (افغانستان)", "AF", "93"],
|
|
62526
62942
|
["Albania (Shqipëri)", "AL", "355"],
|
|
@@ -62908,11 +63324,14 @@ export {
|
|
|
62908
63324
|
debounce$2 as debounce,
|
|
62909
63325
|
denullify,
|
|
62910
63326
|
formatString,
|
|
63327
|
+
getFallbackSchema,
|
|
62911
63328
|
i18nTInjectionKey,
|
|
62912
63329
|
iffer,
|
|
62913
63330
|
initials,
|
|
63331
|
+
isDate$1 as isDate,
|
|
62914
63332
|
keyToLabel,
|
|
62915
63333
|
useBagel,
|
|
63334
|
+
useBglSchema,
|
|
62916
63335
|
useEscape,
|
|
62917
63336
|
useI18nT,
|
|
62918
63337
|
useLang,
|