@bagelink/vue 0.0.564 → 0.0.568
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/SelectInput.vue.d.ts +2 -0
- package/dist/components/form/inputs/SelectInput.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 +623 -200
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +624 -201
- package/dist/style.css +267 -124
- package/dist/types/BagelForm.d.ts +1 -0
- package/dist/types/BagelForm.d.ts.map +1 -1
- package/dist/utils/index.d.ts +3 -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 +283 -104
- 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/SelectInput.vue +17 -7
- 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 +22 -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]), []);
|
|
@@ -5282,8 +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
|
+
}
|
|
5286
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
|
+
}
|
|
5287
5302
|
const bagelInjectionKey = Symbol("bagel");
|
|
5288
5303
|
const i18nTInjectionKey = Symbol("bagel");
|
|
5289
5304
|
function useBagel() {
|
|
@@ -5372,19 +5387,30 @@ const ModalPlugin = {
|
|
|
5372
5387
|
app.component("ModalContainer", ModalComponent);
|
|
5373
5388
|
}
|
|
5374
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
|
+
}
|
|
5375
5400
|
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
5376
5401
|
__name: "MaterialIcon",
|
|
5377
5402
|
props: {
|
|
5378
5403
|
icon: {},
|
|
5379
5404
|
name: {},
|
|
5380
5405
|
size: {},
|
|
5381
|
-
color: {}
|
|
5406
|
+
color: {},
|
|
5407
|
+
weight: {}
|
|
5382
5408
|
},
|
|
5383
5409
|
setup(__props) {
|
|
5384
5410
|
return (_ctx, _cache) => {
|
|
5385
|
-
return openBlock(), createElementBlock("
|
|
5411
|
+
return openBlock(), createElementBlock("span", {
|
|
5386
5412
|
class: "bgl_icon-font",
|
|
5387
|
-
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}` })
|
|
5388
5414
|
}, toDisplayString(_ctx.icon || _ctx.name), 5);
|
|
5389
5415
|
};
|
|
5390
5416
|
}
|
|
@@ -5393,7 +5419,7 @@ const _hoisted_1$J = { class: "full-nav" };
|
|
|
5393
5419
|
const _hoisted_2$A = { class: "nav-scroll" };
|
|
5394
5420
|
const _hoisted_3$n = { class: "nav-links-wrapper" };
|
|
5395
5421
|
const _hoisted_4$f = { class: "tooltip" };
|
|
5396
|
-
const _hoisted_5$
|
|
5422
|
+
const _hoisted_5$d = { class: "bot-buttons-wrapper" };
|
|
5397
5423
|
const _hoisted_6$8 = { class: "tooltip" };
|
|
5398
5424
|
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
5399
5425
|
__name: "NavBar",
|
|
@@ -5448,7 +5474,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
5448
5474
|
}), 128))
|
|
5449
5475
|
])
|
|
5450
5476
|
]),
|
|
5451
|
-
createElementVNode("div", _hoisted_5$
|
|
5477
|
+
createElementVNode("div", _hoisted_5$d, [
|
|
5452
5478
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.footerLinks, (link) => {
|
|
5453
5479
|
return openBlock(), createBlock(resolveDynamicComponent(link.to ? "router-link" : "div"), {
|
|
5454
5480
|
key: link.label,
|
|
@@ -5515,8 +5541,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5515
5541
|
},
|
|
5516
5542
|
setup(__props) {
|
|
5517
5543
|
useCssVars((_ctx) => ({
|
|
5518
|
-
"
|
|
5519
|
-
"
|
|
5544
|
+
"39397c0e": computedBackgroundColor.value,
|
|
5545
|
+
"427e8569": cumputedTextColor.value
|
|
5520
5546
|
}));
|
|
5521
5547
|
const props2 = __props;
|
|
5522
5548
|
const isComponent = computed(() => {
|
|
@@ -5605,7 +5631,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
5605
5631
|
};
|
|
5606
5632
|
}
|
|
5607
5633
|
});
|
|
5608
|
-
const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
5634
|
+
const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-59ea4a90"]]);
|
|
5609
5635
|
const _hoisted_1$H = {
|
|
5610
5636
|
key: 0,
|
|
5611
5637
|
class: "tool-bar"
|
|
@@ -5988,67 +6014,369 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
5988
6014
|
};
|
|
5989
6015
|
}
|
|
5990
6016
|
});
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
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 };
|
|
5998
6344
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
5999
6345
|
__name: "TableSchema",
|
|
6000
|
-
props: {
|
|
6346
|
+
props: /* @__PURE__ */ mergeModels({
|
|
6001
6347
|
selectedItems: {},
|
|
6002
6348
|
data: {},
|
|
6003
6349
|
schema: { type: Function },
|
|
6004
6350
|
showFields: {}
|
|
6005
|
-
},
|
|
6006
|
-
|
|
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"]),
|
|
6007
6358
|
setup(__props, { emit: __emit }) {
|
|
6359
|
+
useCssVars((_ctx) => ({
|
|
6360
|
+
"59d71ad2": unref(computedItemHiehgt)
|
|
6361
|
+
}));
|
|
6008
6362
|
const props2 = __props;
|
|
6009
6363
|
const emit2 = __emit;
|
|
6010
6364
|
const slots = useSlots();
|
|
6011
|
-
const loading =
|
|
6012
|
-
|
|
6013
|
-
computed({
|
|
6014
|
-
get: () => selectedItems.value,
|
|
6015
|
-
set: (value) => {
|
|
6016
|
-
selectedItems.value = value;
|
|
6017
|
-
emit2("update:selectedItems", value);
|
|
6018
|
-
}
|
|
6019
|
-
});
|
|
6020
|
-
function selectElement(item) {
|
|
6021
|
-
emit2("select", item);
|
|
6022
|
-
}
|
|
6023
|
-
let sortDirection = ref("ASC");
|
|
6365
|
+
const loading = useModel(__props, "loading");
|
|
6366
|
+
const itemHeight = useModel(__props, "itemHeight");
|
|
6367
|
+
const computedItemHiehgt = computed(() => `${itemHeight.value}px`);
|
|
6024
6368
|
let sortField = ref("");
|
|
6369
|
+
let sortDirection = ref("ASC");
|
|
6370
|
+
let selectedItems = ref(props2.selectedItems || []);
|
|
6371
|
+
const isSelectable = computed(() => Array.isArray(props2.selectedItems));
|
|
6025
6372
|
const computedSortField = computed(() => `_transformed_${sortField.value}`);
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
}));
|
|
6034
|
-
return props2.showFields ? schema.filter((f2) => {
|
|
6035
|
-
var _a2;
|
|
6036
|
-
return ((_a2 = props2.showFields) == null ? void 0 : _a2.includes(f2.id)) ?? !f2.id;
|
|
6037
|
-
}) : schema;
|
|
6038
|
-
}
|
|
6039
|
-
const computedSchema = computed(() => {
|
|
6040
|
-
let _schema = props2.schema;
|
|
6041
|
-
if (typeof _schema === "function") {
|
|
6042
|
-
_schema = _schema();
|
|
6043
|
-
}
|
|
6044
|
-
if (_schema) {
|
|
6045
|
-
return props2.showFields ? _schema.filter((f2) => {
|
|
6046
|
-
var _a2;
|
|
6047
|
-
return (_a2 = props2.showFields) == null ? void 0 : _a2.includes(f2.id);
|
|
6048
|
-
}) : _schema;
|
|
6049
|
-
}
|
|
6050
|
-
return getFallbackSchema();
|
|
6051
|
-
});
|
|
6373
|
+
const computedSchema = computed(
|
|
6374
|
+
() => useBglSchema({
|
|
6375
|
+
schema: props2.schema,
|
|
6376
|
+
showFields: props2.showFields,
|
|
6377
|
+
data: props2.data
|
|
6378
|
+
})
|
|
6379
|
+
);
|
|
6052
6380
|
function transform(rowData) {
|
|
6053
6381
|
var _a2;
|
|
6054
6382
|
const obj = { ...rowData };
|
|
@@ -6099,68 +6427,138 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
6099
6427
|
}
|
|
6100
6428
|
emit2("orderBy", `${fieldname} ${sortDirection.value}`.trim());
|
|
6101
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
|
+
}
|
|
6102
6475
|
return (_ctx, _cache) => {
|
|
6103
|
-
return openBlock(), createElementBlock("div",
|
|
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
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
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);
|
|
6160
6558
|
};
|
|
6161
6559
|
}
|
|
6162
6560
|
});
|
|
6163
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
6561
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-73d79ea6"]]);
|
|
6164
6562
|
const _sfc_main$E = {};
|
|
6165
6563
|
const _hoisted_1$B = { class: "flex space-between" };
|
|
6166
6564
|
function _sfc_render$1(_ctx, _cache) {
|
|
@@ -6202,7 +6600,7 @@ const _hoisted_2$s = {
|
|
|
6202
6600
|
};
|
|
6203
6601
|
const _hoisted_3$i = { class: "key" };
|
|
6204
6602
|
const _hoisted_4$c = { key: 1 };
|
|
6205
|
-
const _hoisted_5$
|
|
6603
|
+
const _hoisted_5$b = { class: "key" };
|
|
6206
6604
|
const _hoisted_6$6 = { class: "vlue" };
|
|
6207
6605
|
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
6208
6606
|
__name: "DataPreview",
|
|
@@ -6218,16 +6616,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6218
6616
|
setup(__props) {
|
|
6219
6617
|
const props2 = __props;
|
|
6220
6618
|
const itemData = useModel(__props, "data");
|
|
6221
|
-
const computedSchema = computed(
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
});
|
|
6228
|
-
}
|
|
6229
|
-
return schema;
|
|
6230
|
-
});
|
|
6619
|
+
const computedSchema = computed(
|
|
6620
|
+
() => getFallbackSchema(
|
|
6621
|
+
[itemData.value],
|
|
6622
|
+
props2.showFields
|
|
6623
|
+
)
|
|
6624
|
+
);
|
|
6231
6625
|
return (_ctx, _cache) => {
|
|
6232
6626
|
var _a2;
|
|
6233
6627
|
return __props.data ? (openBlock(), createElementBlock("div", _hoisted_1$A, [
|
|
@@ -6252,13 +6646,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6252
6646
|
], 64);
|
|
6253
6647
|
}), 128)),
|
|
6254
6648
|
!((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_4$c, [
|
|
6255
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, (
|
|
6649
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, ({ id, label }) => {
|
|
6256
6650
|
return openBlock(), createElementBlock("div", {
|
|
6257
|
-
key,
|
|
6651
|
+
key: id,
|
|
6258
6652
|
class: "data-row"
|
|
6259
6653
|
}, [
|
|
6260
|
-
createElementVNode("div", _hoisted_5$
|
|
6261
|
-
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)
|
|
6262
6656
|
]);
|
|
6263
6657
|
}), 128))
|
|
6264
6658
|
])) : createCommentVNode("", true),
|
|
@@ -6267,7 +6661,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6267
6661
|
};
|
|
6268
6662
|
}
|
|
6269
6663
|
});
|
|
6270
|
-
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-
|
|
6664
|
+
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-2281300f"]]);
|
|
6271
6665
|
const _hoisted_1$z = {
|
|
6272
6666
|
key: 0,
|
|
6273
6667
|
class: "card_label"
|
|
@@ -16315,7 +16709,6 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
16315
16709
|
if (props2.address) {
|
|
16316
16710
|
geocodeAddress(props2.address).catch(console.error);
|
|
16317
16711
|
}
|
|
16318
|
-
console.log(props2.zoomControl, props2.center);
|
|
16319
16712
|
map4.value = L$1.map(id.value, {
|
|
16320
16713
|
center: props2.center,
|
|
16321
16714
|
zoom: props2.zoom,
|
|
@@ -16335,7 +16728,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
16335
16728
|
}
|
|
16336
16729
|
async function geocodeAddress(address) {
|
|
16337
16730
|
var _a2;
|
|
16338
|
-
const
|
|
16731
|
+
const addressURL = address.replace(/\s+/g, "+");
|
|
16732
|
+
const geocodeUrl = `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURI(addressURL)}`;
|
|
16339
16733
|
const res = await fetch(geocodeUrl);
|
|
16340
16734
|
const data2 = await res.json() || [];
|
|
16341
16735
|
data2.forEach((element) => {
|
|
@@ -16620,16 +17014,20 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
16620
17014
|
id: {},
|
|
16621
17015
|
title: {},
|
|
16622
17016
|
small: { type: Boolean },
|
|
16623
|
-
required: { type: Boolean }
|
|
17017
|
+
required: { type: Boolean },
|
|
17018
|
+
defaultValue: { type: Boolean, default: false }
|
|
16624
17019
|
}, {
|
|
16625
|
-
"modelValue": { type: Boolean, ...{ default:
|
|
17020
|
+
"modelValue": { type: Boolean, ...{ default: void 0 } },
|
|
16626
17021
|
"modelModifiers": {}
|
|
16627
17022
|
}),
|
|
16628
17023
|
emits: ["update:modelValue"],
|
|
16629
17024
|
setup(__props) {
|
|
16630
17025
|
const props2 = __props;
|
|
16631
|
-
const inputId =
|
|
17026
|
+
const inputId = computed(() => props2.id || Math.random().toString(36).substring(7));
|
|
16632
17027
|
const checked = useModel(__props, "modelValue");
|
|
17028
|
+
onMounted(() => {
|
|
17029
|
+
if (checked.value === void 0) checked.value = props2.defaultValue;
|
|
17030
|
+
});
|
|
16633
17031
|
return (_ctx, _cache) => {
|
|
16634
17032
|
return openBlock(), createElementBlock("div", {
|
|
16635
17033
|
class: normalizeClass(["bagel-input bgl-checkbox align-items-center ps-025", { small: _ctx.small }]),
|
|
@@ -16653,7 +17051,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
16653
17051
|
};
|
|
16654
17052
|
}
|
|
16655
17053
|
});
|
|
16656
|
-
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-
|
|
17054
|
+
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-e8fcfd5e"]]);
|
|
16657
17055
|
function toDate(argument) {
|
|
16658
17056
|
const argStr = Object.prototype.toString.call(argument);
|
|
16659
17057
|
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
@@ -25108,6 +25506,7 @@ const _hoisted_2$m = { key: 0 };
|
|
|
25108
25506
|
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
25109
25507
|
__name: "DateInput",
|
|
25110
25508
|
props: {
|
|
25509
|
+
required: { type: Boolean },
|
|
25111
25510
|
label: {},
|
|
25112
25511
|
editMode: { type: Boolean, default: true },
|
|
25113
25512
|
small: { type: Boolean, default: false },
|
|
@@ -25152,6 +25551,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
25152
25551
|
ref: datePicker,
|
|
25153
25552
|
modelValue: date2.value,
|
|
25154
25553
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => date2.value = $event),
|
|
25554
|
+
required: _ctx.required,
|
|
25155
25555
|
"auto-apply": true,
|
|
25156
25556
|
"enable-time-picker": _ctx.enableTime,
|
|
25157
25557
|
"allowed-dates": _ctx.allowedDates
|
|
@@ -25160,7 +25560,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
25160
25560
|
"minutes-increment": _ctx.minutesIncrement,
|
|
25161
25561
|
"minutes-grid-increment": _ctx.minutesGridIncrement,
|
|
25162
25562
|
"start-time": { hours: 8, minutes: 0 }
|
|
25163
|
-
}), 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"])
|
|
25164
25564
|
], 10, _hoisted_1$s);
|
|
25165
25565
|
};
|
|
25166
25566
|
}
|
|
@@ -25222,7 +25622,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
25222
25622
|
fullWidth: { type: Boolean },
|
|
25223
25623
|
multiselect: { type: Boolean },
|
|
25224
25624
|
icon: {},
|
|
25225
|
-
hideLabel: { type: Boolean }
|
|
25625
|
+
hideLabel: { type: Boolean },
|
|
25626
|
+
defaultValue: {}
|
|
25226
25627
|
},
|
|
25227
25628
|
emits: ["update:modelValue"],
|
|
25228
25629
|
setup(__props, { emit: __emit }) {
|
|
@@ -25271,7 +25672,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
25271
25672
|
if (typeof option2 === "number") return option2;
|
|
25272
25673
|
return option2.value;
|
|
25273
25674
|
}
|
|
25274
|
-
const isSelected = (option2) =>
|
|
25675
|
+
const isSelected = (option2) => selectedItems.value.find((item) => getValue(option2) === getValue(item)) !== void 0;
|
|
25275
25676
|
const filteredOptions = computed(() => props2.options.filter((option2) => {
|
|
25276
25677
|
const searchTerm = search.value.split(/\s+/).filter(Boolean).map((t) => new RegExp(t, "gi"));
|
|
25277
25678
|
return Boolean(option2) && searchTerm.every((s2) => getLabel(option2).match(s2));
|
|
@@ -25311,7 +25712,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
25311
25712
|
() => props2.modelValue,
|
|
25312
25713
|
(newVal) => {
|
|
25313
25714
|
if (!props2.multiselect) {
|
|
25314
|
-
const newOption = props2.options.find((o2) => getValue(o2) === newVal)
|
|
25715
|
+
const newOption = props2.options.find((o2) => getValue(o2) === newVal) ?? newVal;
|
|
25315
25716
|
if (newOption && !isSelected(newOption)) selectedItems.value = [newOption];
|
|
25316
25717
|
} else {
|
|
25317
25718
|
const isSame = compareArrays([newVal].flat(), selectedItems.value);
|
|
@@ -25329,12 +25730,21 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
25329
25730
|
const exists = props2.options.find(
|
|
25330
25731
|
(o2) => getValue(o2) === getValue(option2)
|
|
25331
25732
|
);
|
|
25332
|
-
if (
|
|
25733
|
+
if (exists === void 0) selectedItems.value.splice(i2, 1);
|
|
25333
25734
|
else selectedItems.value.splice(i2, 1, exists);
|
|
25334
25735
|
});
|
|
25335
25736
|
},
|
|
25336
25737
|
{ deep: true, immediate: true }
|
|
25337
25738
|
);
|
|
25739
|
+
onMounted(() => {
|
|
25740
|
+
if (props2.defaultValue !== void 0) {
|
|
25741
|
+
const defaultOption = props2.options.find(
|
|
25742
|
+
(o2) => getValue(o2) === getValue(props2.defaultValue)
|
|
25743
|
+
);
|
|
25744
|
+
if (defaultOption === void 0) return;
|
|
25745
|
+
selectedItems.value = [defaultOption];
|
|
25746
|
+
}
|
|
25747
|
+
});
|
|
25338
25748
|
return (_ctx, _cache) => {
|
|
25339
25749
|
return openBlock(), createBlock(unref(kt$1), {
|
|
25340
25750
|
ref_key: "dropdown",
|
|
@@ -25419,7 +25829,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
25419
25829
|
};
|
|
25420
25830
|
}
|
|
25421
25831
|
});
|
|
25422
|
-
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-
|
|
25832
|
+
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-4e1d2142"]]);
|
|
25423
25833
|
/*!
|
|
25424
25834
|
* vue-draggable-next v2.2.0
|
|
25425
25835
|
* (c) 2023 Anish George
|
|
@@ -27905,7 +28315,7 @@ const _hoisted_1$p = ["title"];
|
|
|
27905
28315
|
const _hoisted_2$j = { class: "bagel-input" };
|
|
27906
28316
|
const _hoisted_3$e = { class: "table-side-scroll" };
|
|
27907
28317
|
const _hoisted_4$a = { class: "table-header" };
|
|
27908
|
-
const _hoisted_5$
|
|
28318
|
+
const _hoisted_5$a = { class: "table-reorder" };
|
|
27909
28319
|
const _hoisted_6$5 = { class: "table-action" };
|
|
27910
28320
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
27911
28321
|
__name: "TableField",
|
|
@@ -28003,7 +28413,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
28003
28413
|
key: row.id,
|
|
28004
28414
|
class: "flex table-row"
|
|
28005
28415
|
}, [
|
|
28006
|
-
createElementVNode("div", _hoisted_5$
|
|
28416
|
+
createElementVNode("div", _hoisted_5$a, [
|
|
28007
28417
|
createVNode(unref(_sfc_main$O), { icon: "more_vert" })
|
|
28008
28418
|
]),
|
|
28009
28419
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList((_a3 = unref(entityMeta)) == null ? void 0 : _a3.fields, (field) => {
|
|
@@ -28056,7 +28466,7 @@ const _hoisted_1$o = ["title"];
|
|
|
28056
28466
|
const _hoisted_2$i = ["for"];
|
|
28057
28467
|
const _hoisted_3$d = ["id", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
|
|
28058
28468
|
const _hoisted_4$9 = ["id", "title", "type", "rows", "placeholder", "disabled", "required", "pattern"];
|
|
28059
|
-
const _hoisted_5$
|
|
28469
|
+
const _hoisted_5$9 = { key: 2 };
|
|
28060
28470
|
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
28061
28471
|
__name: "TextInput",
|
|
28062
28472
|
props: {
|
|
@@ -28162,7 +28572,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
28162
28572
|
}, _ctx.nativeInputAttrs, { onInput: updateInputVal }), null, 16, _hoisted_4$9)), [
|
|
28163
28573
|
[vModelText, unref(inputVal)]
|
|
28164
28574
|
]),
|
|
28165
|
-
_ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_5$
|
|
28575
|
+
_ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_5$9, toDisplayString(_ctx.helptext), 1)) : createCommentVNode("", true)
|
|
28166
28576
|
], 8, _hoisted_2$i),
|
|
28167
28577
|
_ctx.iconStart ? (openBlock(), createBlock(unref(_sfc_main$O), {
|
|
28168
28578
|
key: 0,
|
|
@@ -28262,7 +28672,7 @@ const _hoisted_3$c = {
|
|
|
28262
28672
|
class: "time-wrap"
|
|
28263
28673
|
};
|
|
28264
28674
|
const _hoisted_4$8 = ["id", "name", "value"];
|
|
28265
|
-
const _hoisted_5$
|
|
28675
|
+
const _hoisted_5$8 = ["for"];
|
|
28266
28676
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
28267
28677
|
__name: "DatePicker",
|
|
28268
28678
|
props: {
|
|
@@ -28325,7 +28735,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
28325
28735
|
]),
|
|
28326
28736
|
createElementVNode("label", {
|
|
28327
28737
|
for: `${hr2}_${_ctx.id}`
|
|
28328
|
-
}, toDisplayString(hr2), 9, _hoisted_5$
|
|
28738
|
+
}, toDisplayString(hr2), 9, _hoisted_5$8)
|
|
28329
28739
|
], 64);
|
|
28330
28740
|
}), 128))
|
|
28331
28741
|
])) : createCommentVNode("", true)
|
|
@@ -28337,7 +28747,7 @@ const _hoisted_1$k = { class: "bagel-input" };
|
|
|
28337
28747
|
const _hoisted_2$f = { class: "pb-025" };
|
|
28338
28748
|
const _hoisted_3$b = { class: "flex gap-05 flex-wrap" };
|
|
28339
28749
|
const _hoisted_4$7 = ["id", "name", "value", "checked"];
|
|
28340
|
-
const _hoisted_5$
|
|
28750
|
+
const _hoisted_5$7 = ["for"];
|
|
28341
28751
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
28342
28752
|
__name: "RadioPillsInput",
|
|
28343
28753
|
props: {
|
|
@@ -28397,7 +28807,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
28397
28807
|
}, null, 40, _hoisted_4$7),
|
|
28398
28808
|
createElementVNode("label", {
|
|
28399
28809
|
for: `${_ctx.id}-${getValue(option2)}`
|
|
28400
|
-
}, toDisplayString(getLabel(option2)), 9, _hoisted_5$
|
|
28810
|
+
}, toDisplayString(getLabel(option2)), 9, _hoisted_5$7)
|
|
28401
28811
|
]);
|
|
28402
28812
|
}), 128))
|
|
28403
28813
|
])
|
|
@@ -28406,7 +28816,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
28406
28816
|
}
|
|
28407
28817
|
});
|
|
28408
28818
|
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-681173be"]]);
|
|
28409
|
-
const _withScopeId$2 = (n2) => (pushScopeId("data-v-
|
|
28819
|
+
const _withScopeId$2 = (n2) => (pushScopeId("data-v-1ce244aa"), n2 = n2(), popScopeId(), n2);
|
|
28410
28820
|
const _hoisted_1$j = { class: "bagel-input" };
|
|
28411
28821
|
const _hoisted_2$e = {
|
|
28412
28822
|
key: 0,
|
|
@@ -28417,7 +28827,7 @@ const _hoisted_4$6 = {
|
|
|
28417
28827
|
key: 1,
|
|
28418
28828
|
class: "multi-image-item previewName"
|
|
28419
28829
|
};
|
|
28420
|
-
const _hoisted_5$
|
|
28830
|
+
const _hoisted_5$6 = ["src"];
|
|
28421
28831
|
const _hoisted_6$4 = { class: "no-margin" };
|
|
28422
28832
|
const _hoisted_7$1 = {
|
|
28423
28833
|
key: 0,
|
|
@@ -28434,25 +28844,23 @@ const _hoisted_12 = {
|
|
|
28434
28844
|
const _hoisted_13 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("p", null, "Drop files here or click to upload", -1));
|
|
28435
28845
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
28436
28846
|
__name: "FileUpload",
|
|
28437
|
-
props:
|
|
28847
|
+
props: {
|
|
28438
28848
|
label: {},
|
|
28439
28849
|
multiple: { type: Boolean },
|
|
28440
28850
|
files: {},
|
|
28441
28851
|
deleteEndpoint: {},
|
|
28442
28852
|
bindkey: {},
|
|
28853
|
+
modelValue: {},
|
|
28443
28854
|
width: {}
|
|
28444
|
-
},
|
|
28445
|
-
"modelValue": {},
|
|
28446
|
-
"modelModifiers": {}
|
|
28447
|
-
}),
|
|
28855
|
+
},
|
|
28448
28856
|
emits: ["update:modelValue"],
|
|
28449
|
-
setup(__props) {
|
|
28857
|
+
setup(__props, { emit: __emit }) {
|
|
28450
28858
|
const props2 = __props;
|
|
28451
28859
|
const bagel = useBagel();
|
|
28452
28860
|
const bindKey2 = props2.bindkey || "id";
|
|
28453
|
-
const
|
|
28861
|
+
const emit2 = __emit;
|
|
28862
|
+
let file_bindkeys = ref(props2.modelValue || []);
|
|
28454
28863
|
const storageFiles = ref([]);
|
|
28455
|
-
const compareIds = (v1, v2) => [v1].flat().join(",") === [v2].flat().join(",");
|
|
28456
28864
|
onMounted(() => {
|
|
28457
28865
|
if (!props2.files && [file_bindkeys.value].flat().length) {
|
|
28458
28866
|
const ids = [file_bindkeys.value].flat().filter(Boolean);
|
|
@@ -28482,21 +28890,19 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28482
28890
|
},
|
|
28483
28891
|
{ immediate: true }
|
|
28484
28892
|
);
|
|
28485
|
-
|
|
28486
|
-
|
|
28487
|
-
(
|
|
28488
|
-
|
|
28489
|
-
|
|
28490
|
-
|
|
28491
|
-
|
|
28492
|
-
|
|
28493
|
-
|
|
28494
|
-
|
|
28495
|
-
|
|
28496
|
-
|
|
28497
|
-
|
|
28498
|
-
{ deep: true }
|
|
28499
|
-
);
|
|
28893
|
+
function updateModelValue() {
|
|
28894
|
+
let idValue;
|
|
28895
|
+
if (props2.multiple) {
|
|
28896
|
+
idValue = storageFiles.value.map((f2) => f2[bindKey2]);
|
|
28897
|
+
} else {
|
|
28898
|
+
idValue = storageFiles.value[0][bindKey2] || "";
|
|
28899
|
+
}
|
|
28900
|
+
const isSame = [idValue].flat().every((id) => [file_bindkeys.value].flat().includes(id));
|
|
28901
|
+
if (!isSame) {
|
|
28902
|
+
file_bindkeys.value = idValue;
|
|
28903
|
+
emit2("update:modelValue", file_bindkeys.value);
|
|
28904
|
+
}
|
|
28905
|
+
}
|
|
28500
28906
|
const fileQueue = ref([]);
|
|
28501
28907
|
let isDragOver = ref(false);
|
|
28502
28908
|
function preventDefault(e) {
|
|
@@ -28510,16 +28916,20 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28510
28916
|
if (props2.deleteEndpoint) {
|
|
28511
28917
|
void bagel.delete(`${props2.deleteEndpoint}/${file.id}`);
|
|
28512
28918
|
}
|
|
28919
|
+
updateModelValue();
|
|
28513
28920
|
}
|
|
28514
|
-
function flushQueue() {
|
|
28515
|
-
|
|
28921
|
+
async function flushQueue() {
|
|
28922
|
+
for (const file of fileQueue.value) {
|
|
28923
|
+
file.uploading = true;
|
|
28516
28924
|
if (!props2.multiple) storageFiles.value.splice(0, 1);
|
|
28517
28925
|
const serverFile = await bagel.uploadFile(file.file, {
|
|
28518
28926
|
onUploadProgress: (e) => file.progress = e.progress * 100 - 1
|
|
28519
28927
|
});
|
|
28520
28928
|
storageFiles.value.push(serverFile);
|
|
28929
|
+
const i2 = fileQueue.value.indexOf(file);
|
|
28521
28930
|
fileQueue.value.splice(i2, 1);
|
|
28522
|
-
}
|
|
28931
|
+
}
|
|
28932
|
+
updateModelValue();
|
|
28523
28933
|
}
|
|
28524
28934
|
function browse() {
|
|
28525
28935
|
const input = document.createElement("input");
|
|
@@ -28528,7 +28938,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28528
28938
|
input.onchange = (e) => {
|
|
28529
28939
|
const target = e.target;
|
|
28530
28940
|
if (target.files) {
|
|
28531
|
-
Array.from(target.files).forEach(
|
|
28941
|
+
Array.from(target.files).forEach(
|
|
28942
|
+
(file) => fileQueue.value.push({ name: file.name, file, progress: 0 })
|
|
28943
|
+
);
|
|
28532
28944
|
}
|
|
28533
28945
|
flushQueue();
|
|
28534
28946
|
};
|
|
@@ -28547,7 +28959,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28547
28959
|
function drop3(e) {
|
|
28548
28960
|
preventDefault(e);
|
|
28549
28961
|
if (e.dataTransfer) {
|
|
28550
|
-
Array.from(e.dataTransfer.files).forEach(
|
|
28962
|
+
Array.from(e.dataTransfer.files).forEach(
|
|
28963
|
+
(file) => fileQueue.value.push({ name: file.name, file, progress: 0 })
|
|
28964
|
+
);
|
|
28551
28965
|
}
|
|
28552
28966
|
isDragOver.value = false;
|
|
28553
28967
|
flushQueue();
|
|
@@ -28585,7 +28999,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28585
28999
|
class: "preview",
|
|
28586
29000
|
src: file.url,
|
|
28587
29001
|
alt: ""
|
|
28588
|
-
}, null, 8, _hoisted_5$
|
|
29002
|
+
}, null, 8, _hoisted_5$6),
|
|
28589
29003
|
createElementVNode("p", _hoisted_6$4, toDisplayString(file.name), 1),
|
|
28590
29004
|
createVNode(unref(Btn), {
|
|
28591
29005
|
thin: "",
|
|
@@ -28642,14 +29056,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
28642
29056
|
};
|
|
28643
29057
|
}
|
|
28644
29058
|
});
|
|
28645
|
-
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
28646
|
-
const _withScopeId$1 = (n2) => (pushScopeId("data-v-
|
|
29059
|
+
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-1ce244aa"]]);
|
|
29060
|
+
const _withScopeId$1 = (n2) => (pushScopeId("data-v-eceeebfb"), n2 = n2(), popScopeId(), n2);
|
|
28647
29061
|
const _hoisted_1$i = ["title"];
|
|
28648
29062
|
const _hoisted_2$d = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "slider round" }, null, -1));
|
|
28649
29063
|
const _hoisted_3$9 = [
|
|
28650
29064
|
_hoisted_2$d
|
|
28651
29065
|
];
|
|
28652
|
-
const _hoisted_4$5 = ["id"];
|
|
29066
|
+
const _hoisted_4$5 = ["id", "required"];
|
|
29067
|
+
const _hoisted_5$5 = ["for"];
|
|
28653
29068
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
28654
29069
|
__name: "ToggleInput",
|
|
28655
29070
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -28657,14 +29072,16 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
28657
29072
|
id: {},
|
|
28658
29073
|
title: {},
|
|
28659
29074
|
small: { type: Boolean },
|
|
29075
|
+
required: { type: Boolean },
|
|
28660
29076
|
defaultValue: { type: Boolean, default: false }
|
|
28661
29077
|
}, {
|
|
28662
|
-
"modelValue": { type: Boolean },
|
|
29078
|
+
"modelValue": { type: Boolean, ...{ default: void 0 } },
|
|
28663
29079
|
"modelModifiers": {}
|
|
28664
29080
|
}),
|
|
28665
29081
|
emits: ["update:modelValue"],
|
|
28666
29082
|
setup(__props) {
|
|
28667
29083
|
const props2 = __props;
|
|
29084
|
+
const inputId = ref(props2.id || Math.random().toString(36).substring(7));
|
|
28668
29085
|
const checked = useModel(__props, "modelValue");
|
|
28669
29086
|
onMounted(() => {
|
|
28670
29087
|
if (checked.value === void 0) checked.value = props2.defaultValue;
|
|
@@ -28672,26 +29089,30 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
28672
29089
|
return (_ctx, _cache) => {
|
|
28673
29090
|
return openBlock(), createElementBlock("div", {
|
|
28674
29091
|
class: normalizeClass(["bagel-input bgl-checkbox justify-content-center gap-1", { small: _ctx.small }]),
|
|
28675
|
-
title: _ctx.title
|
|
29092
|
+
title: _ctx.title,
|
|
29093
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => checked.value = !checked.value, ["prevent"]))
|
|
28676
29094
|
}, [
|
|
28677
29095
|
createElementVNode("div", {
|
|
28678
29096
|
class: normalizeClass(["switch", { checked: checked.value }])
|
|
28679
29097
|
}, _hoisted_3$9, 2),
|
|
28680
|
-
createElementVNode("
|
|
28681
|
-
|
|
28682
|
-
|
|
28683
|
-
|
|
28684
|
-
|
|
28685
|
-
|
|
28686
|
-
|
|
28687
|
-
|
|
28688
|
-
|
|
28689
|
-
|
|
29098
|
+
withDirectives(createElementVNode("input", {
|
|
29099
|
+
id: inputId.value,
|
|
29100
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checked.value = $event),
|
|
29101
|
+
type: "checkbox",
|
|
29102
|
+
required: _ctx.required
|
|
29103
|
+
}, null, 8, _hoisted_4$5), [
|
|
29104
|
+
[vModelCheckbox, checked.value]
|
|
29105
|
+
]),
|
|
29106
|
+
createElementVNode("label", { for: inputId.value }, [
|
|
29107
|
+
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
29108
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
29109
|
+
], true)
|
|
29110
|
+
], 8, _hoisted_5$5)
|
|
28690
29111
|
], 10, _hoisted_1$i);
|
|
28691
29112
|
};
|
|
28692
29113
|
}
|
|
28693
29114
|
});
|
|
28694
|
-
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
29115
|
+
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-eceeebfb"]]);
|
|
28695
29116
|
function OrderedMap(content) {
|
|
28696
29117
|
this.content = content;
|
|
28697
29118
|
}
|
|
@@ -62525,7 +62946,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62525
62946
|
};
|
|
62526
62947
|
}
|
|
62527
62948
|
});
|
|
62528
|
-
const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
62949
|
+
const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-70d6cf78"]]);
|
|
62529
62950
|
const countryArray = [
|
|
62530
62951
|
["Afghanistan (افغانستان)", "AF", "93"],
|
|
62531
62952
|
["Albania (Shqipëri)", "AL", "355"],
|
|
@@ -62913,12 +63334,14 @@ export {
|
|
|
62913
63334
|
debounce$2 as debounce,
|
|
62914
63335
|
denullify,
|
|
62915
63336
|
formatString,
|
|
63337
|
+
getFallbackSchema,
|
|
62916
63338
|
i18nTInjectionKey,
|
|
62917
63339
|
iffer,
|
|
62918
63340
|
initials,
|
|
62919
63341
|
isDate$1 as isDate,
|
|
62920
63342
|
keyToLabel,
|
|
62921
63343
|
useBagel,
|
|
63344
|
+
useBglSchema,
|
|
62922
63345
|
useEscape,
|
|
62923
63346
|
useI18nT,
|
|
62924
63347
|
useLang,
|