@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.cjs
CHANGED
|
@@ -5284,8 +5284,23 @@ function iffer(field, itemData) {
|
|
|
5284
5284
|
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);
|
|
5285
5285
|
return true;
|
|
5286
5286
|
}
|
|
5287
|
-
|
|
5287
|
+
function denullify(itemData, fieldID) {
|
|
5288
|
+
if (!fieldID) return null;
|
|
5289
|
+
return itemData ? itemData[fieldID] : null;
|
|
5290
|
+
}
|
|
5288
5291
|
const isDate$1 = (dateToTest) => !Number.isNaN(Date.parse(dateToTest));
|
|
5292
|
+
function getFallbackSchema(data2, showFields) {
|
|
5293
|
+
const keys4 = [
|
|
5294
|
+
...new Set((data2 ?? []).map(Object.keys).flat())
|
|
5295
|
+
];
|
|
5296
|
+
const schema = keys4.map(
|
|
5297
|
+
(id) => ({
|
|
5298
|
+
id,
|
|
5299
|
+
label: keyToLabel(id)
|
|
5300
|
+
})
|
|
5301
|
+
);
|
|
5302
|
+
return showFields ? schema.filter((f2) => showFields.includes(f2.id) || !f2.id) : schema;
|
|
5303
|
+
}
|
|
5289
5304
|
const bagelInjectionKey = Symbol("bagel");
|
|
5290
5305
|
const i18nTInjectionKey = Symbol("bagel");
|
|
5291
5306
|
function useBagel() {
|
|
@@ -5374,19 +5389,30 @@ const ModalPlugin = {
|
|
|
5374
5389
|
app.component("ModalContainer", ModalComponent);
|
|
5375
5390
|
}
|
|
5376
5391
|
};
|
|
5392
|
+
function useBglSchema({ schema, showFields, data: data2 } = {}) {
|
|
5393
|
+
let _schema = schema;
|
|
5394
|
+
if (typeof _schema === "function") {
|
|
5395
|
+
_schema = _schema();
|
|
5396
|
+
}
|
|
5397
|
+
if (_schema) {
|
|
5398
|
+
return showFields && showFields.length ? _schema.filter((f2) => showFields.includes(f2.id)) : _schema;
|
|
5399
|
+
}
|
|
5400
|
+
return getFallbackSchema(data2, showFields);
|
|
5401
|
+
}
|
|
5377
5402
|
const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
5378
5403
|
__name: "MaterialIcon",
|
|
5379
5404
|
props: {
|
|
5380
5405
|
icon: {},
|
|
5381
5406
|
name: {},
|
|
5382
5407
|
size: {},
|
|
5383
|
-
color: {}
|
|
5408
|
+
color: {},
|
|
5409
|
+
weight: {}
|
|
5384
5410
|
},
|
|
5385
5411
|
setup(__props) {
|
|
5386
5412
|
return (_ctx, _cache) => {
|
|
5387
|
-
return vue.openBlock(), vue.createElementBlock("
|
|
5413
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
5388
5414
|
class: "bgl_icon-font",
|
|
5389
|
-
style: vue.normalizeStyle({ fontSize: `${_ctx.size}rem`, color: _ctx.color })
|
|
5415
|
+
style: vue.normalizeStyle({ fontSize: `${_ctx.size}rem`, color: _ctx.color, "font-variation-settings": `'wght' ${_ctx.weight || 400}` })
|
|
5390
5416
|
}, vue.toDisplayString(_ctx.icon || _ctx.name), 5);
|
|
5391
5417
|
};
|
|
5392
5418
|
}
|
|
@@ -5395,7 +5421,7 @@ const _hoisted_1$J = { class: "full-nav" };
|
|
|
5395
5421
|
const _hoisted_2$A = { class: "nav-scroll" };
|
|
5396
5422
|
const _hoisted_3$n = { class: "nav-links-wrapper" };
|
|
5397
5423
|
const _hoisted_4$f = { class: "tooltip" };
|
|
5398
|
-
const _hoisted_5$
|
|
5424
|
+
const _hoisted_5$d = { class: "bot-buttons-wrapper" };
|
|
5399
5425
|
const _hoisted_6$8 = { class: "tooltip" };
|
|
5400
5426
|
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
5401
5427
|
__name: "NavBar",
|
|
@@ -5450,7 +5476,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
|
5450
5476
|
}), 128))
|
|
5451
5477
|
])
|
|
5452
5478
|
]),
|
|
5453
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
5479
|
+
vue.createElementVNode("div", _hoisted_5$d, [
|
|
5454
5480
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.footerLinks, (link) => {
|
|
5455
5481
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(link.to ? "router-link" : "div"), {
|
|
5456
5482
|
key: link.label,
|
|
@@ -5517,8 +5543,8 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
5517
5543
|
},
|
|
5518
5544
|
setup(__props) {
|
|
5519
5545
|
vue.useCssVars((_ctx) => ({
|
|
5520
|
-
"
|
|
5521
|
-
"
|
|
5546
|
+
"39397c0e": computedBackgroundColor.value,
|
|
5547
|
+
"427e8569": cumputedTextColor.value
|
|
5522
5548
|
}));
|
|
5523
5549
|
const props2 = __props;
|
|
5524
5550
|
const isComponent = vue.computed(() => {
|
|
@@ -5607,7 +5633,7 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
5607
5633
|
};
|
|
5608
5634
|
}
|
|
5609
5635
|
});
|
|
5610
|
-
const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-
|
|
5636
|
+
const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-59ea4a90"]]);
|
|
5611
5637
|
const _hoisted_1$H = {
|
|
5612
5638
|
key: 0,
|
|
5613
5639
|
class: "tool-bar"
|
|
@@ -5990,67 +6016,369 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
|
5990
6016
|
};
|
|
5991
6017
|
}
|
|
5992
6018
|
});
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6019
|
+
function tryOnScopeDispose(fn3) {
|
|
6020
|
+
if (vue.getCurrentScope()) {
|
|
6021
|
+
vue.onScopeDispose(fn3);
|
|
6022
|
+
return true;
|
|
6023
|
+
}
|
|
6024
|
+
return false;
|
|
6025
|
+
}
|
|
6026
|
+
function toValue(r2) {
|
|
6027
|
+
return typeof r2 === "function" ? r2() : vue.unref(r2);
|
|
6028
|
+
}
|
|
6029
|
+
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
6030
|
+
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
6031
|
+
function getLifeCycleTarget(target) {
|
|
6032
|
+
return target || vue.getCurrentInstance();
|
|
6033
|
+
}
|
|
6034
|
+
function tryOnMounted(fn3, sync = true, target) {
|
|
6035
|
+
const instance = getLifeCycleTarget();
|
|
6036
|
+
if (instance)
|
|
6037
|
+
vue.onMounted(fn3, target);
|
|
6038
|
+
else if (sync)
|
|
6039
|
+
fn3();
|
|
6040
|
+
else
|
|
6041
|
+
vue.nextTick(fn3);
|
|
6042
|
+
}
|
|
6043
|
+
function unrefElement(elRef) {
|
|
6044
|
+
var _a2;
|
|
6045
|
+
const plain = toValue(elRef);
|
|
6046
|
+
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
|
|
6047
|
+
}
|
|
6048
|
+
const defaultWindow = isClient ? window : void 0;
|
|
6049
|
+
function useMounted() {
|
|
6050
|
+
const isMounted = vue.ref(false);
|
|
6051
|
+
const instance = vue.getCurrentInstance();
|
|
6052
|
+
if (instance) {
|
|
6053
|
+
vue.onMounted(() => {
|
|
6054
|
+
isMounted.value = true;
|
|
6055
|
+
}, instance);
|
|
6056
|
+
}
|
|
6057
|
+
return isMounted;
|
|
6058
|
+
}
|
|
6059
|
+
function useSupported(callback) {
|
|
6060
|
+
const isMounted = useMounted();
|
|
6061
|
+
return vue.computed(() => {
|
|
6062
|
+
isMounted.value;
|
|
6063
|
+
return Boolean(callback());
|
|
6064
|
+
});
|
|
6065
|
+
}
|
|
6066
|
+
function useResizeObserver(target, callback, options = {}) {
|
|
6067
|
+
const { window: window2 = defaultWindow, ...observerOptions } = options;
|
|
6068
|
+
let observer;
|
|
6069
|
+
const isSupported = useSupported(() => window2 && "ResizeObserver" in window2);
|
|
6070
|
+
const cleanup = () => {
|
|
6071
|
+
if (observer) {
|
|
6072
|
+
observer.disconnect();
|
|
6073
|
+
observer = void 0;
|
|
6074
|
+
}
|
|
6075
|
+
};
|
|
6076
|
+
const targets = vue.computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);
|
|
6077
|
+
const stopWatch = vue.watch(
|
|
6078
|
+
targets,
|
|
6079
|
+
(els) => {
|
|
6080
|
+
cleanup();
|
|
6081
|
+
if (isSupported.value && window2) {
|
|
6082
|
+
observer = new ResizeObserver(callback);
|
|
6083
|
+
for (const _el of els)
|
|
6084
|
+
_el && observer.observe(_el, observerOptions);
|
|
6085
|
+
}
|
|
6086
|
+
},
|
|
6087
|
+
{ immediate: true, flush: "post" }
|
|
6088
|
+
);
|
|
6089
|
+
const stop = () => {
|
|
6090
|
+
cleanup();
|
|
6091
|
+
stopWatch();
|
|
6092
|
+
};
|
|
6093
|
+
tryOnScopeDispose(stop);
|
|
6094
|
+
return {
|
|
6095
|
+
isSupported,
|
|
6096
|
+
stop
|
|
6097
|
+
};
|
|
6098
|
+
}
|
|
6099
|
+
function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
|
|
6100
|
+
const { window: window2 = defaultWindow, box = "content-box" } = options;
|
|
6101
|
+
const isSVG = vue.computed(() => {
|
|
6102
|
+
var _a2, _b;
|
|
6103
|
+
return (_b = (_a2 = unrefElement(target)) == null ? void 0 : _a2.namespaceURI) == null ? void 0 : _b.includes("svg");
|
|
6104
|
+
});
|
|
6105
|
+
const width = vue.ref(initialSize.width);
|
|
6106
|
+
const height = vue.ref(initialSize.height);
|
|
6107
|
+
const { stop: stop1 } = useResizeObserver(
|
|
6108
|
+
target,
|
|
6109
|
+
([entry]) => {
|
|
6110
|
+
const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
|
|
6111
|
+
if (window2 && isSVG.value) {
|
|
6112
|
+
const $elem = unrefElement(target);
|
|
6113
|
+
if ($elem) {
|
|
6114
|
+
const rect = $elem.getBoundingClientRect();
|
|
6115
|
+
width.value = rect.width;
|
|
6116
|
+
height.value = rect.height;
|
|
6117
|
+
}
|
|
6118
|
+
} else {
|
|
6119
|
+
if (boxSize) {
|
|
6120
|
+
const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];
|
|
6121
|
+
width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
|
|
6122
|
+
height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
|
|
6123
|
+
} else {
|
|
6124
|
+
width.value = entry.contentRect.width;
|
|
6125
|
+
height.value = entry.contentRect.height;
|
|
6126
|
+
}
|
|
6127
|
+
}
|
|
6128
|
+
},
|
|
6129
|
+
options
|
|
6130
|
+
);
|
|
6131
|
+
tryOnMounted(() => {
|
|
6132
|
+
const ele = unrefElement(target);
|
|
6133
|
+
if (ele) {
|
|
6134
|
+
width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width;
|
|
6135
|
+
height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
|
|
6136
|
+
}
|
|
6137
|
+
});
|
|
6138
|
+
const stop2 = vue.watch(
|
|
6139
|
+
() => unrefElement(target),
|
|
6140
|
+
(ele) => {
|
|
6141
|
+
width.value = ele ? initialSize.width : 0;
|
|
6142
|
+
height.value = ele ? initialSize.height : 0;
|
|
6143
|
+
}
|
|
6144
|
+
);
|
|
6145
|
+
function stop() {
|
|
6146
|
+
stop1();
|
|
6147
|
+
stop2();
|
|
6148
|
+
}
|
|
6149
|
+
return {
|
|
6150
|
+
width,
|
|
6151
|
+
height,
|
|
6152
|
+
stop
|
|
6153
|
+
};
|
|
6154
|
+
}
|
|
6155
|
+
function useVirtualList(list, options) {
|
|
6156
|
+
const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = "itemHeight" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);
|
|
6157
|
+
return {
|
|
6158
|
+
list: currentList,
|
|
6159
|
+
scrollTo,
|
|
6160
|
+
containerProps: {
|
|
6161
|
+
ref: containerRef,
|
|
6162
|
+
onScroll: () => {
|
|
6163
|
+
calculateRange();
|
|
6164
|
+
},
|
|
6165
|
+
style: containerStyle
|
|
6166
|
+
},
|
|
6167
|
+
wrapperProps
|
|
6168
|
+
};
|
|
6169
|
+
}
|
|
6170
|
+
function useVirtualListResources(list) {
|
|
6171
|
+
const containerRef = vue.ref(null);
|
|
6172
|
+
const size2 = useElementSize(containerRef);
|
|
6173
|
+
const currentList = vue.ref([]);
|
|
6174
|
+
const source = vue.shallowRef(list);
|
|
6175
|
+
const state2 = vue.ref({ start: 0, end: 10 });
|
|
6176
|
+
return { state: state2, source, currentList, size: size2, containerRef };
|
|
6177
|
+
}
|
|
6178
|
+
function createGetViewCapacity(state2, source, itemSize) {
|
|
6179
|
+
return (containerSize) => {
|
|
6180
|
+
if (typeof itemSize === "number")
|
|
6181
|
+
return Math.ceil(containerSize / itemSize);
|
|
6182
|
+
const { start: start2 = 0 } = state2.value;
|
|
6183
|
+
let sum = 0;
|
|
6184
|
+
let capacity = 0;
|
|
6185
|
+
for (let i2 = start2; i2 < source.value.length; i2++) {
|
|
6186
|
+
const size2 = itemSize(i2);
|
|
6187
|
+
sum += size2;
|
|
6188
|
+
capacity = i2;
|
|
6189
|
+
if (sum > containerSize)
|
|
6190
|
+
break;
|
|
6191
|
+
}
|
|
6192
|
+
return capacity - start2;
|
|
6193
|
+
};
|
|
6194
|
+
}
|
|
6195
|
+
function createGetOffset(source, itemSize) {
|
|
6196
|
+
return (scrollDirection) => {
|
|
6197
|
+
if (typeof itemSize === "number")
|
|
6198
|
+
return Math.floor(scrollDirection / itemSize) + 1;
|
|
6199
|
+
let sum = 0;
|
|
6200
|
+
let offset2 = 0;
|
|
6201
|
+
for (let i2 = 0; i2 < source.value.length; i2++) {
|
|
6202
|
+
const size2 = itemSize(i2);
|
|
6203
|
+
sum += size2;
|
|
6204
|
+
if (sum >= scrollDirection) {
|
|
6205
|
+
offset2 = i2;
|
|
6206
|
+
break;
|
|
6207
|
+
}
|
|
6208
|
+
}
|
|
6209
|
+
return offset2 + 1;
|
|
6210
|
+
};
|
|
6211
|
+
}
|
|
6212
|
+
function createCalculateRange(type3, overscan, getOffset, getViewCapacity, { containerRef, state: state2, currentList, source }) {
|
|
6213
|
+
return () => {
|
|
6214
|
+
const element = containerRef.value;
|
|
6215
|
+
if (element) {
|
|
6216
|
+
const offset2 = getOffset(type3 === "vertical" ? element.scrollTop : element.scrollLeft);
|
|
6217
|
+
const viewCapacity = getViewCapacity(type3 === "vertical" ? element.clientHeight : element.clientWidth);
|
|
6218
|
+
const from2 = offset2 - overscan;
|
|
6219
|
+
const to2 = offset2 + viewCapacity + overscan;
|
|
6220
|
+
state2.value = {
|
|
6221
|
+
start: from2 < 0 ? 0 : from2,
|
|
6222
|
+
end: to2 > source.value.length ? source.value.length : to2
|
|
6223
|
+
};
|
|
6224
|
+
currentList.value = source.value.slice(state2.value.start, state2.value.end).map((ele, index2) => ({
|
|
6225
|
+
data: ele,
|
|
6226
|
+
index: index2 + state2.value.start
|
|
6227
|
+
}));
|
|
6228
|
+
}
|
|
6229
|
+
};
|
|
6230
|
+
}
|
|
6231
|
+
function createGetDistance(itemSize, source) {
|
|
6232
|
+
return (index2) => {
|
|
6233
|
+
if (typeof itemSize === "number") {
|
|
6234
|
+
const size22 = index2 * itemSize;
|
|
6235
|
+
return size22;
|
|
6236
|
+
}
|
|
6237
|
+
const size2 = source.value.slice(0, index2).reduce((sum, _2, i2) => sum + itemSize(i2), 0);
|
|
6238
|
+
return size2;
|
|
6239
|
+
};
|
|
6240
|
+
}
|
|
6241
|
+
function useWatchForSizes(size2, list, containerRef, calculateRange) {
|
|
6242
|
+
vue.watch([size2.width, size2.height, list, containerRef], () => {
|
|
6243
|
+
calculateRange();
|
|
6244
|
+
});
|
|
6245
|
+
}
|
|
6246
|
+
function createComputedTotalSize(itemSize, source) {
|
|
6247
|
+
return vue.computed(() => {
|
|
6248
|
+
if (typeof itemSize === "number")
|
|
6249
|
+
return source.value.length * itemSize;
|
|
6250
|
+
return source.value.reduce((sum, _2, index2) => sum + itemSize(index2), 0);
|
|
6251
|
+
});
|
|
6252
|
+
}
|
|
6253
|
+
const scrollToDictionaryForElementScrollKey = {
|
|
6254
|
+
horizontal: "scrollLeft",
|
|
6255
|
+
vertical: "scrollTop"
|
|
6256
|
+
};
|
|
6257
|
+
function createScrollTo(type3, calculateRange, getDistance, containerRef) {
|
|
6258
|
+
return (index2) => {
|
|
6259
|
+
if (containerRef.value) {
|
|
6260
|
+
containerRef.value[scrollToDictionaryForElementScrollKey[type3]] = getDistance(index2);
|
|
6261
|
+
calculateRange();
|
|
6262
|
+
}
|
|
6263
|
+
};
|
|
6264
|
+
}
|
|
6265
|
+
function useHorizontalVirtualList(options, list) {
|
|
6266
|
+
const resources = useVirtualListResources(list);
|
|
6267
|
+
const { state: state2, source, currentList, size: size2, containerRef } = resources;
|
|
6268
|
+
const containerStyle = { overflowX: "auto" };
|
|
6269
|
+
const { itemWidth, overscan = 5 } = options;
|
|
6270
|
+
const getViewCapacity = createGetViewCapacity(state2, source, itemWidth);
|
|
6271
|
+
const getOffset = createGetOffset(source, itemWidth);
|
|
6272
|
+
const calculateRange = createCalculateRange("horizontal", overscan, getOffset, getViewCapacity, resources);
|
|
6273
|
+
const getDistanceLeft = createGetDistance(itemWidth, source);
|
|
6274
|
+
const offsetLeft = vue.computed(() => getDistanceLeft(state2.value.start));
|
|
6275
|
+
const totalWidth = createComputedTotalSize(itemWidth, source);
|
|
6276
|
+
useWatchForSizes(size2, list, containerRef, calculateRange);
|
|
6277
|
+
const scrollTo = createScrollTo("horizontal", calculateRange, getDistanceLeft, containerRef);
|
|
6278
|
+
const wrapperProps = vue.computed(() => {
|
|
6279
|
+
return {
|
|
6280
|
+
style: {
|
|
6281
|
+
height: "100%",
|
|
6282
|
+
width: `${totalWidth.value - offsetLeft.value}px`,
|
|
6283
|
+
marginLeft: `${offsetLeft.value}px`,
|
|
6284
|
+
display: "flex"
|
|
6285
|
+
}
|
|
6286
|
+
};
|
|
6287
|
+
});
|
|
6288
|
+
return {
|
|
6289
|
+
scrollTo,
|
|
6290
|
+
calculateRange,
|
|
6291
|
+
wrapperProps,
|
|
6292
|
+
containerStyle,
|
|
6293
|
+
currentList,
|
|
6294
|
+
containerRef
|
|
6295
|
+
};
|
|
6296
|
+
}
|
|
6297
|
+
function useVerticalVirtualList(options, list) {
|
|
6298
|
+
const resources = useVirtualListResources(list);
|
|
6299
|
+
const { state: state2, source, currentList, size: size2, containerRef } = resources;
|
|
6300
|
+
const containerStyle = { overflowY: "auto" };
|
|
6301
|
+
const { itemHeight, overscan = 5 } = options;
|
|
6302
|
+
const getViewCapacity = createGetViewCapacity(state2, source, itemHeight);
|
|
6303
|
+
const getOffset = createGetOffset(source, itemHeight);
|
|
6304
|
+
const calculateRange = createCalculateRange("vertical", overscan, getOffset, getViewCapacity, resources);
|
|
6305
|
+
const getDistanceTop = createGetDistance(itemHeight, source);
|
|
6306
|
+
const offsetTop = vue.computed(() => getDistanceTop(state2.value.start));
|
|
6307
|
+
const totalHeight = createComputedTotalSize(itemHeight, source);
|
|
6308
|
+
useWatchForSizes(size2, list, containerRef, calculateRange);
|
|
6309
|
+
const scrollTo = createScrollTo("vertical", calculateRange, getDistanceTop, containerRef);
|
|
6310
|
+
const wrapperProps = vue.computed(() => {
|
|
6311
|
+
return {
|
|
6312
|
+
style: {
|
|
6313
|
+
width: "100%",
|
|
6314
|
+
height: `${totalHeight.value - offsetTop.value}px`,
|
|
6315
|
+
marginTop: `${offsetTop.value}px`
|
|
6316
|
+
}
|
|
6317
|
+
};
|
|
6318
|
+
});
|
|
6319
|
+
return {
|
|
6320
|
+
calculateRange,
|
|
6321
|
+
scrollTo,
|
|
6322
|
+
containerStyle,
|
|
6323
|
+
wrapperProps,
|
|
6324
|
+
currentList,
|
|
6325
|
+
containerRef
|
|
6326
|
+
};
|
|
6327
|
+
}
|
|
6328
|
+
const _withScopeId$3 = (n2) => (vue.pushScopeId("data-v-73d79ea6"), n2 = n2(), vue.popScopeId(), n2);
|
|
6329
|
+
const _hoisted_1$C = {
|
|
6330
|
+
key: 0,
|
|
6331
|
+
class: "loading-table-wrapper z-99 h-100 w-100 absolute inset"
|
|
6332
|
+
};
|
|
6333
|
+
const _hoisted_2$t = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "loading-table-animation absolute oval" }, null, -1));
|
|
6334
|
+
const _hoisted_3$j = [
|
|
6335
|
+
_hoisted_2$t
|
|
6336
|
+
];
|
|
6337
|
+
const _hoisted_4$d = { class: "infinite-wrapper" };
|
|
6338
|
+
const _hoisted_5$c = { class: "row first-row" };
|
|
6339
|
+
const _hoisted_6$7 = { key: 0 };
|
|
6340
|
+
const _hoisted_7$2 = ["onClick"];
|
|
6341
|
+
const _hoisted_8$1 = { class: "flex" };
|
|
6342
|
+
const _hoisted_9$1 = ["onClick"];
|
|
6343
|
+
const _hoisted_10$1 = { key: 0 };
|
|
6344
|
+
const _hoisted_11$1 = ["value"];
|
|
6345
|
+
const _hoisted_12$1 = { key: 1 };
|
|
6000
6346
|
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
6001
6347
|
__name: "TableSchema",
|
|
6002
|
-
props: {
|
|
6348
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
6003
6349
|
selectedItems: {},
|
|
6004
6350
|
data: {},
|
|
6005
6351
|
schema: { type: Function },
|
|
6006
6352
|
showFields: {}
|
|
6007
|
-
},
|
|
6008
|
-
|
|
6353
|
+
}, {
|
|
6354
|
+
"loading": { default: false },
|
|
6355
|
+
"loadingModifiers": {},
|
|
6356
|
+
"itemHeight": { default: 50 },
|
|
6357
|
+
"itemHeightModifiers": {}
|
|
6358
|
+
}),
|
|
6359
|
+
emits: /* @__PURE__ */ vue.mergeModels(["update:selectedItems", "orderBy", "select"], ["update:loading", "update:itemHeight"]),
|
|
6009
6360
|
setup(__props, { emit: __emit }) {
|
|
6361
|
+
vue.useCssVars((_ctx) => ({
|
|
6362
|
+
"59d71ad2": vue.unref(computedItemHiehgt)
|
|
6363
|
+
}));
|
|
6010
6364
|
const props2 = __props;
|
|
6011
6365
|
const emit2 = __emit;
|
|
6012
6366
|
const slots = vue.useSlots();
|
|
6013
|
-
const loading = vue.
|
|
6014
|
-
|
|
6015
|
-
vue.computed({
|
|
6016
|
-
get: () => selectedItems.value,
|
|
6017
|
-
set: (value) => {
|
|
6018
|
-
selectedItems.value = value;
|
|
6019
|
-
emit2("update:selectedItems", value);
|
|
6020
|
-
}
|
|
6021
|
-
});
|
|
6022
|
-
function selectElement(item) {
|
|
6023
|
-
emit2("select", item);
|
|
6024
|
-
}
|
|
6025
|
-
let sortDirection = vue.ref("ASC");
|
|
6367
|
+
const loading = vue.useModel(__props, "loading");
|
|
6368
|
+
const itemHeight = vue.useModel(__props, "itemHeight");
|
|
6369
|
+
const computedItemHiehgt = vue.computed(() => `${itemHeight.value}px`);
|
|
6026
6370
|
let sortField = vue.ref("");
|
|
6371
|
+
let sortDirection = vue.ref("ASC");
|
|
6372
|
+
let selectedItems = vue.ref(props2.selectedItems || []);
|
|
6373
|
+
const isSelectable = vue.computed(() => Array.isArray(props2.selectedItems));
|
|
6027
6374
|
const computedSortField = vue.computed(() => `_transformed_${sortField.value}`);
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
}));
|
|
6036
|
-
return props2.showFields ? schema.filter((f2) => {
|
|
6037
|
-
var _a2;
|
|
6038
|
-
return ((_a2 = props2.showFields) == null ? void 0 : _a2.includes(f2.id)) ?? !f2.id;
|
|
6039
|
-
}) : schema;
|
|
6040
|
-
}
|
|
6041
|
-
const computedSchema = vue.computed(() => {
|
|
6042
|
-
let _schema = props2.schema;
|
|
6043
|
-
if (typeof _schema === "function") {
|
|
6044
|
-
_schema = _schema();
|
|
6045
|
-
}
|
|
6046
|
-
if (_schema) {
|
|
6047
|
-
return props2.showFields ? _schema.filter((f2) => {
|
|
6048
|
-
var _a2;
|
|
6049
|
-
return (_a2 = props2.showFields) == null ? void 0 : _a2.includes(f2.id);
|
|
6050
|
-
}) : _schema;
|
|
6051
|
-
}
|
|
6052
|
-
return getFallbackSchema();
|
|
6053
|
-
});
|
|
6375
|
+
const computedSchema = vue.computed(
|
|
6376
|
+
() => useBglSchema({
|
|
6377
|
+
schema: props2.schema,
|
|
6378
|
+
showFields: props2.showFields,
|
|
6379
|
+
data: props2.data
|
|
6380
|
+
})
|
|
6381
|
+
);
|
|
6054
6382
|
function transform(rowData) {
|
|
6055
6383
|
var _a2;
|
|
6056
6384
|
const obj = { ...rowData };
|
|
@@ -6101,68 +6429,138 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
6101
6429
|
}
|
|
6102
6430
|
emit2("orderBy", `${fieldname} ${sortDirection.value}`.trim());
|
|
6103
6431
|
}
|
|
6432
|
+
const { list, containerProps, wrapperProps, scrollTo } = useVirtualList(
|
|
6433
|
+
computedData,
|
|
6434
|
+
{
|
|
6435
|
+
itemHeight: itemHeight.value,
|
|
6436
|
+
overscan: 10
|
|
6437
|
+
}
|
|
6438
|
+
);
|
|
6439
|
+
vue.watch(
|
|
6440
|
+
() => computedData.value.length,
|
|
6441
|
+
(newLength, oldLength) => {
|
|
6442
|
+
if (newLength === oldLength) return;
|
|
6443
|
+
scrollTo(0);
|
|
6444
|
+
}
|
|
6445
|
+
);
|
|
6446
|
+
const allSelector = vue.ref(null);
|
|
6447
|
+
let computedSelectedItems = vue.computed({
|
|
6448
|
+
get: () => selectedItems.value,
|
|
6449
|
+
set: (value) => {
|
|
6450
|
+
selectedItems.value = value;
|
|
6451
|
+
emit2("update:selectedItems", value);
|
|
6452
|
+
updateAllSelectorState();
|
|
6453
|
+
}
|
|
6454
|
+
});
|
|
6455
|
+
function updateAllSelectorState() {
|
|
6456
|
+
if (!allSelector.value) return;
|
|
6457
|
+
const allSelected = computedData.value.length === computedSelectedItems.value.length && computedData.value.every((s2) => computedSelectedItems.value.includes(s2.id));
|
|
6458
|
+
allSelector.value.checked = allSelected;
|
|
6459
|
+
allSelector.value.indeterminate = !allSelected && computedSelectedItems.value.length > 0;
|
|
6460
|
+
}
|
|
6461
|
+
function toggleSelectItem(item) {
|
|
6462
|
+
if (!computedSelectedItems.value.length) {
|
|
6463
|
+
emit2("select", item);
|
|
6464
|
+
return;
|
|
6465
|
+
}
|
|
6466
|
+
const index2 = computedSelectedItems.value.indexOf(item.id);
|
|
6467
|
+
if (index2 > -1) {
|
|
6468
|
+
computedSelectedItems.value.splice(index2, 1);
|
|
6469
|
+
} else {
|
|
6470
|
+
computedSelectedItems.value.push(item.id);
|
|
6471
|
+
}
|
|
6472
|
+
}
|
|
6473
|
+
function toggleSelectAll(event) {
|
|
6474
|
+
const value = event.target.checked;
|
|
6475
|
+
computedSelectedItems.value = value ? computedData.value.map((d2) => d2.id) : [];
|
|
6476
|
+
}
|
|
6104
6477
|
return (_ctx, _cache) => {
|
|
6105
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
vue.
|
|
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
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6478
|
+
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({ class: "table-list-wrap h-100" }, vue.unref(containerProps), {
|
|
6479
|
+
class: { "loading-table": loading.value }
|
|
6480
|
+
}), [
|
|
6481
|
+
loading.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$C, _hoisted_3$j)) : (vue.openBlock(), vue.createElementBlock("div", vue.normalizeProps(vue.mergeProps({ key: 1 }, vue.unref(wrapperProps))), [
|
|
6482
|
+
vue.createElementVNode("table", _hoisted_4$d, [
|
|
6483
|
+
vue.createElementVNode("thead", _hoisted_5$c, [
|
|
6484
|
+
vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_6$7, [
|
|
6485
|
+
vue.createElementVNode("input", {
|
|
6486
|
+
ref_key: "allSelector",
|
|
6487
|
+
ref: allSelector,
|
|
6488
|
+
type: "checkbox",
|
|
6489
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
6490
|
+
}, ["stop"])),
|
|
6491
|
+
onChange: toggleSelectAll
|
|
6492
|
+
}, null, 544)
|
|
6493
|
+
])) : vue.createCommentVNode("", true),
|
|
6494
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(computedSchema), (field) => {
|
|
6495
|
+
return vue.openBlock(), vue.createElementBlock("th", {
|
|
6496
|
+
key: field.id,
|
|
6497
|
+
class: "col",
|
|
6498
|
+
onClick: ($event) => sort2((field == null ? void 0 : field.id) || "")
|
|
6499
|
+
}, [
|
|
6500
|
+
vue.createElementVNode("div", _hoisted_8$1, [
|
|
6501
|
+
vue.createTextVNode(vue.toDisplayString(field.label || vue.unref(keyToLabel)(field.id)) + " ", 1),
|
|
6502
|
+
vue.createElementVNode("div", {
|
|
6503
|
+
class: vue.normalizeClass(["list-arrows", { sorted: vue.unref(sortField) === field.id }])
|
|
6504
|
+
}, [
|
|
6505
|
+
vue.createVNode(vue.unref(_sfc_main$O), {
|
|
6506
|
+
class: vue.normalizeClass({ desc: vue.unref(sortDirection) === "DESC" }),
|
|
6507
|
+
icon: "keyboard_arrow_up"
|
|
6508
|
+
}, null, 8, ["class"])
|
|
6509
|
+
], 2)
|
|
6510
|
+
])
|
|
6511
|
+
], 8, _hoisted_7$2);
|
|
6512
|
+
}), 128))
|
|
6513
|
+
]),
|
|
6514
|
+
vue.createElementVNode("tbody", null, [
|
|
6515
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(list), ({ data: row }) => {
|
|
6516
|
+
return vue.openBlock(), vue.createElementBlock("tr", {
|
|
6517
|
+
key: row.id,
|
|
6518
|
+
class: vue.normalizeClass(["row row-item position-relative", { selected: vue.unref(computedSelectedItems).includes(row.id) }]),
|
|
6519
|
+
onClick: ($event) => toggleSelectItem(row)
|
|
6520
|
+
}, [
|
|
6521
|
+
vue.unref(isSelectable) ? (vue.openBlock(), vue.createElementBlock("td", _hoisted_10$1, [
|
|
6522
|
+
vue.createElementVNode("div", {
|
|
6523
|
+
onClick: _cache[2] || (_cache[2] = vue.withModifiers(() => {
|
|
6524
|
+
}, ["stop"]))
|
|
6525
|
+
}, [
|
|
6526
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
|
6527
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(computedSelectedItems) ? computedSelectedItems.value = $event : computedSelectedItems = $event),
|
|
6528
|
+
type: "checkbox",
|
|
6529
|
+
value: row.id
|
|
6530
|
+
}, null, 8, _hoisted_11$1), [
|
|
6531
|
+
[vue.vModelCheckbox, vue.unref(computedSelectedItems)]
|
|
6532
|
+
])
|
|
6533
|
+
])
|
|
6534
|
+
])) : vue.createCommentVNode("", true),
|
|
6535
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(computedSchema), (field) => {
|
|
6536
|
+
return vue.openBlock(), vue.createElementBlock("td", {
|
|
6537
|
+
key: `${field.id}-${row.id}`,
|
|
6538
|
+
class: "col"
|
|
6539
|
+
}, [
|
|
6540
|
+
field.id && vue.unref(slots)[field.id] ? vue.renderSlot(_ctx.$slots, field.id, {
|
|
6541
|
+
key: 0,
|
|
6542
|
+
row,
|
|
6543
|
+
field
|
|
6544
|
+
}, void 0, true) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_12$1, [
|
|
6545
|
+
vue.createVNode(vue.unref(_sfc_main$p), {
|
|
6546
|
+
class: "embedded-field",
|
|
6547
|
+
field,
|
|
6548
|
+
modelValue: row,
|
|
6549
|
+
label: ""
|
|
6550
|
+
}, null, 8, ["field", "modelValue"])
|
|
6551
|
+
]))
|
|
6552
|
+
]);
|
|
6553
|
+
}), 128))
|
|
6554
|
+
], 10, _hoisted_9$1);
|
|
6555
|
+
}), 128))
|
|
6556
|
+
])
|
|
6557
|
+
])
|
|
6558
|
+
], 16))
|
|
6559
|
+
], 16);
|
|
6162
6560
|
};
|
|
6163
6561
|
}
|
|
6164
6562
|
});
|
|
6165
|
-
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
6563
|
+
const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-73d79ea6"]]);
|
|
6166
6564
|
const _sfc_main$E = {};
|
|
6167
6565
|
const _hoisted_1$B = { class: "flex space-between" };
|
|
6168
6566
|
function _sfc_render$1(_ctx, _cache) {
|
|
@@ -6204,7 +6602,7 @@ const _hoisted_2$s = {
|
|
|
6204
6602
|
};
|
|
6205
6603
|
const _hoisted_3$i = { class: "key" };
|
|
6206
6604
|
const _hoisted_4$c = { key: 1 };
|
|
6207
|
-
const _hoisted_5$
|
|
6605
|
+
const _hoisted_5$b = { class: "key" };
|
|
6208
6606
|
const _hoisted_6$6 = { class: "vlue" };
|
|
6209
6607
|
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
6210
6608
|
__name: "DataPreview",
|
|
@@ -6220,16 +6618,12 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
6220
6618
|
setup(__props) {
|
|
6221
6619
|
const props2 = __props;
|
|
6222
6620
|
const itemData = vue.useModel(__props, "data");
|
|
6223
|
-
const computedSchema = vue.computed(
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
});
|
|
6230
|
-
}
|
|
6231
|
-
return schema;
|
|
6232
|
-
});
|
|
6621
|
+
const computedSchema = vue.computed(
|
|
6622
|
+
() => getFallbackSchema(
|
|
6623
|
+
[itemData.value],
|
|
6624
|
+
props2.showFields
|
|
6625
|
+
)
|
|
6626
|
+
);
|
|
6233
6627
|
return (_ctx, _cache) => {
|
|
6234
6628
|
var _a2;
|
|
6235
6629
|
return __props.data ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, [
|
|
@@ -6254,13 +6648,13 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
6254
6648
|
], 64);
|
|
6255
6649
|
}), 128)),
|
|
6256
6650
|
!((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$c, [
|
|
6257
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, (
|
|
6651
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, ({ id, label }) => {
|
|
6258
6652
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
6259
|
-
key,
|
|
6653
|
+
key: id,
|
|
6260
6654
|
class: "data-row"
|
|
6261
6655
|
}, [
|
|
6262
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
6263
|
-
vue.createElementVNode("div", _hoisted_6$6, vue.toDisplayString(itemData.value[
|
|
6656
|
+
vue.createElementVNode("div", _hoisted_5$b, vue.toDisplayString(label), 1),
|
|
6657
|
+
vue.createElementVNode("div", _hoisted_6$6, vue.toDisplayString(itemData.value[id ?? ""]), 1)
|
|
6264
6658
|
]);
|
|
6265
6659
|
}), 128))
|
|
6266
6660
|
])) : vue.createCommentVNode("", true),
|
|
@@ -6269,7 +6663,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
|
6269
6663
|
};
|
|
6270
6664
|
}
|
|
6271
6665
|
});
|
|
6272
|
-
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-
|
|
6666
|
+
const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-2281300f"]]);
|
|
6273
6667
|
const _hoisted_1$z = {
|
|
6274
6668
|
key: 0,
|
|
6275
6669
|
class: "card_label"
|
|
@@ -16317,7 +16711,6 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
16317
16711
|
if (props2.address) {
|
|
16318
16712
|
geocodeAddress(props2.address).catch(console.error);
|
|
16319
16713
|
}
|
|
16320
|
-
console.log(props2.zoomControl, props2.center);
|
|
16321
16714
|
map4.value = L$1.map(id.value, {
|
|
16322
16715
|
center: props2.center,
|
|
16323
16716
|
zoom: props2.zoom,
|
|
@@ -16337,7 +16730,8 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
|
16337
16730
|
}
|
|
16338
16731
|
async function geocodeAddress(address) {
|
|
16339
16732
|
var _a2;
|
|
16340
|
-
const
|
|
16733
|
+
const addressURL = address.replace(/\s+/g, "+");
|
|
16734
|
+
const geocodeUrl = `https://nominatim.openstreetmap.org/search?format=json&q=${encodeURI(addressURL)}`;
|
|
16341
16735
|
const res = await fetch(geocodeUrl);
|
|
16342
16736
|
const data2 = await res.json() || [];
|
|
16343
16737
|
data2.forEach((element) => {
|
|
@@ -16622,16 +17016,20 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
16622
17016
|
id: {},
|
|
16623
17017
|
title: {},
|
|
16624
17018
|
small: { type: Boolean },
|
|
16625
|
-
required: { type: Boolean }
|
|
17019
|
+
required: { type: Boolean },
|
|
17020
|
+
defaultValue: { type: Boolean, default: false }
|
|
16626
17021
|
}, {
|
|
16627
|
-
"modelValue": { type: Boolean, ...{ default:
|
|
17022
|
+
"modelValue": { type: Boolean, ...{ default: void 0 } },
|
|
16628
17023
|
"modelModifiers": {}
|
|
16629
17024
|
}),
|
|
16630
17025
|
emits: ["update:modelValue"],
|
|
16631
17026
|
setup(__props) {
|
|
16632
17027
|
const props2 = __props;
|
|
16633
|
-
const inputId = vue.
|
|
17028
|
+
const inputId = vue.computed(() => props2.id || Math.random().toString(36).substring(7));
|
|
16634
17029
|
const checked = vue.useModel(__props, "modelValue");
|
|
17030
|
+
vue.onMounted(() => {
|
|
17031
|
+
if (checked.value === void 0) checked.value = props2.defaultValue;
|
|
17032
|
+
});
|
|
16635
17033
|
return (_ctx, _cache) => {
|
|
16636
17034
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
16637
17035
|
class: vue.normalizeClass(["bagel-input bgl-checkbox align-items-center ps-025", { small: _ctx.small }]),
|
|
@@ -16655,7 +17053,7 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
16655
17053
|
};
|
|
16656
17054
|
}
|
|
16657
17055
|
});
|
|
16658
|
-
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-
|
|
17056
|
+
const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-e8fcfd5e"]]);
|
|
16659
17057
|
function toDate(argument) {
|
|
16660
17058
|
const argStr = Object.prototype.toString.call(argument);
|
|
16661
17059
|
if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
|
|
@@ -25110,6 +25508,7 @@ const _hoisted_2$m = { key: 0 };
|
|
|
25110
25508
|
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
25111
25509
|
__name: "DateInput",
|
|
25112
25510
|
props: {
|
|
25511
|
+
required: { type: Boolean },
|
|
25113
25512
|
label: {},
|
|
25114
25513
|
editMode: { type: Boolean, default: true },
|
|
25115
25514
|
small: { type: Boolean, default: false },
|
|
@@ -25154,6 +25553,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
25154
25553
|
ref: datePicker,
|
|
25155
25554
|
modelValue: date2.value,
|
|
25156
25555
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => date2.value = $event),
|
|
25556
|
+
required: _ctx.required,
|
|
25157
25557
|
"auto-apply": true,
|
|
25158
25558
|
"enable-time-picker": _ctx.enableTime,
|
|
25159
25559
|
"allowed-dates": _ctx.allowedDates
|
|
@@ -25162,7 +25562,7 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
25162
25562
|
"minutes-increment": _ctx.minutesIncrement,
|
|
25163
25563
|
"minutes-grid-increment": _ctx.minutesGridIncrement,
|
|
25164
25564
|
"start-time": { hours: 8, minutes: 0 }
|
|
25165
|
-
}), null, 16, ["modelValue", "enable-time-picker", "allowed-dates", "time-picker-inline", "minutes-increment", "minutes-grid-increment"])
|
|
25565
|
+
}), null, 16, ["modelValue", "required", "enable-time-picker", "allowed-dates", "time-picker-inline", "minutes-increment", "minutes-grid-increment"])
|
|
25166
25566
|
], 10, _hoisted_1$s);
|
|
25167
25567
|
};
|
|
25168
25568
|
}
|
|
@@ -25224,7 +25624,8 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
25224
25624
|
fullWidth: { type: Boolean },
|
|
25225
25625
|
multiselect: { type: Boolean },
|
|
25226
25626
|
icon: {},
|
|
25227
|
-
hideLabel: { type: Boolean }
|
|
25627
|
+
hideLabel: { type: Boolean },
|
|
25628
|
+
defaultValue: {}
|
|
25228
25629
|
},
|
|
25229
25630
|
emits: ["update:modelValue"],
|
|
25230
25631
|
setup(__props, { emit: __emit }) {
|
|
@@ -25273,7 +25674,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
25273
25674
|
if (typeof option2 === "number") return option2;
|
|
25274
25675
|
return option2.value;
|
|
25275
25676
|
}
|
|
25276
|
-
const isSelected = (option2) =>
|
|
25677
|
+
const isSelected = (option2) => selectedItems.value.find((item) => getValue(option2) === getValue(item)) !== void 0;
|
|
25277
25678
|
const filteredOptions = vue.computed(() => props2.options.filter((option2) => {
|
|
25278
25679
|
const searchTerm = search.value.split(/\s+/).filter(Boolean).map((t) => new RegExp(t, "gi"));
|
|
25279
25680
|
return Boolean(option2) && searchTerm.every((s2) => getLabel(option2).match(s2));
|
|
@@ -25313,7 +25714,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
25313
25714
|
() => props2.modelValue,
|
|
25314
25715
|
(newVal) => {
|
|
25315
25716
|
if (!props2.multiselect) {
|
|
25316
|
-
const newOption = props2.options.find((o2) => getValue(o2) === newVal)
|
|
25717
|
+
const newOption = props2.options.find((o2) => getValue(o2) === newVal) ?? newVal;
|
|
25317
25718
|
if (newOption && !isSelected(newOption)) selectedItems.value = [newOption];
|
|
25318
25719
|
} else {
|
|
25319
25720
|
const isSame = compareArrays([newVal].flat(), selectedItems.value);
|
|
@@ -25331,12 +25732,21 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
25331
25732
|
const exists = props2.options.find(
|
|
25332
25733
|
(o2) => getValue(o2) === getValue(option2)
|
|
25333
25734
|
);
|
|
25334
|
-
if (
|
|
25735
|
+
if (exists === void 0) selectedItems.value.splice(i2, 1);
|
|
25335
25736
|
else selectedItems.value.splice(i2, 1, exists);
|
|
25336
25737
|
});
|
|
25337
25738
|
},
|
|
25338
25739
|
{ deep: true, immediate: true }
|
|
25339
25740
|
);
|
|
25741
|
+
vue.onMounted(() => {
|
|
25742
|
+
if (props2.defaultValue !== void 0) {
|
|
25743
|
+
const defaultOption = props2.options.find(
|
|
25744
|
+
(o2) => getValue(o2) === getValue(props2.defaultValue)
|
|
25745
|
+
);
|
|
25746
|
+
if (defaultOption === void 0) return;
|
|
25747
|
+
selectedItems.value = [defaultOption];
|
|
25748
|
+
}
|
|
25749
|
+
});
|
|
25340
25750
|
return (_ctx, _cache) => {
|
|
25341
25751
|
return vue.openBlock(), vue.createBlock(vue.unref(kt$1), {
|
|
25342
25752
|
ref_key: "dropdown",
|
|
@@ -25421,7 +25831,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
|
25421
25831
|
};
|
|
25422
25832
|
}
|
|
25423
25833
|
});
|
|
25424
|
-
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-
|
|
25834
|
+
const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-4e1d2142"]]);
|
|
25425
25835
|
/*!
|
|
25426
25836
|
* vue-draggable-next v2.2.0
|
|
25427
25837
|
* (c) 2023 Anish George
|
|
@@ -27907,7 +28317,7 @@ const _hoisted_1$p = ["title"];
|
|
|
27907
28317
|
const _hoisted_2$j = { class: "bagel-input" };
|
|
27908
28318
|
const _hoisted_3$e = { class: "table-side-scroll" };
|
|
27909
28319
|
const _hoisted_4$a = { class: "table-header" };
|
|
27910
|
-
const _hoisted_5$
|
|
28320
|
+
const _hoisted_5$a = { class: "table-reorder" };
|
|
27911
28321
|
const _hoisted_6$5 = { class: "table-action" };
|
|
27912
28322
|
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
27913
28323
|
__name: "TableField",
|
|
@@ -28005,7 +28415,7 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
|
28005
28415
|
key: row.id,
|
|
28006
28416
|
class: "flex table-row"
|
|
28007
28417
|
}, [
|
|
28008
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
28418
|
+
vue.createElementVNode("div", _hoisted_5$a, [
|
|
28009
28419
|
vue.createVNode(vue.unref(_sfc_main$O), { icon: "more_vert" })
|
|
28010
28420
|
]),
|
|
28011
28421
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a3 = vue.unref(entityMeta)) == null ? void 0 : _a3.fields, (field) => {
|
|
@@ -28058,7 +28468,7 @@ const _hoisted_1$o = ["title"];
|
|
|
28058
28468
|
const _hoisted_2$i = ["for"];
|
|
28059
28469
|
const _hoisted_3$d = ["id", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
|
|
28060
28470
|
const _hoisted_4$9 = ["id", "title", "type", "rows", "placeholder", "disabled", "required", "pattern"];
|
|
28061
|
-
const _hoisted_5$
|
|
28471
|
+
const _hoisted_5$9 = { key: 2 };
|
|
28062
28472
|
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
28063
28473
|
__name: "TextInput",
|
|
28064
28474
|
props: {
|
|
@@ -28164,7 +28574,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
28164
28574
|
}, _ctx.nativeInputAttrs, { onInput: updateInputVal }), null, 16, _hoisted_4$9)), [
|
|
28165
28575
|
[vue.vModelText, vue.unref(inputVal)]
|
|
28166
28576
|
]),
|
|
28167
|
-
_ctx.helptext ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$
|
|
28577
|
+
_ctx.helptext ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$9, vue.toDisplayString(_ctx.helptext), 1)) : vue.createCommentVNode("", true)
|
|
28168
28578
|
], 8, _hoisted_2$i),
|
|
28169
28579
|
_ctx.iconStart ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$O), {
|
|
28170
28580
|
key: 0,
|
|
@@ -28264,7 +28674,7 @@ const _hoisted_3$c = {
|
|
|
28264
28674
|
class: "time-wrap"
|
|
28265
28675
|
};
|
|
28266
28676
|
const _hoisted_4$8 = ["id", "name", "value"];
|
|
28267
|
-
const _hoisted_5$
|
|
28677
|
+
const _hoisted_5$8 = ["for"];
|
|
28268
28678
|
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
28269
28679
|
__name: "DatePicker",
|
|
28270
28680
|
props: {
|
|
@@ -28327,7 +28737,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
|
28327
28737
|
]),
|
|
28328
28738
|
vue.createElementVNode("label", {
|
|
28329
28739
|
for: `${hr2}_${_ctx.id}`
|
|
28330
|
-
}, vue.toDisplayString(hr2), 9, _hoisted_5$
|
|
28740
|
+
}, vue.toDisplayString(hr2), 9, _hoisted_5$8)
|
|
28331
28741
|
], 64);
|
|
28332
28742
|
}), 128))
|
|
28333
28743
|
])) : vue.createCommentVNode("", true)
|
|
@@ -28339,7 +28749,7 @@ const _hoisted_1$k = { class: "bagel-input" };
|
|
|
28339
28749
|
const _hoisted_2$f = { class: "pb-025" };
|
|
28340
28750
|
const _hoisted_3$b = { class: "flex gap-05 flex-wrap" };
|
|
28341
28751
|
const _hoisted_4$7 = ["id", "name", "value", "checked"];
|
|
28342
|
-
const _hoisted_5$
|
|
28752
|
+
const _hoisted_5$7 = ["for"];
|
|
28343
28753
|
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
28344
28754
|
__name: "RadioPillsInput",
|
|
28345
28755
|
props: {
|
|
@@ -28399,7 +28809,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
28399
28809
|
}, null, 40, _hoisted_4$7),
|
|
28400
28810
|
vue.createElementVNode("label", {
|
|
28401
28811
|
for: `${_ctx.id}-${getValue(option2)}`
|
|
28402
|
-
}, vue.toDisplayString(getLabel(option2)), 9, _hoisted_5$
|
|
28812
|
+
}, vue.toDisplayString(getLabel(option2)), 9, _hoisted_5$7)
|
|
28403
28813
|
]);
|
|
28404
28814
|
}), 128))
|
|
28405
28815
|
])
|
|
@@ -28408,7 +28818,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
28408
28818
|
}
|
|
28409
28819
|
});
|
|
28410
28820
|
const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-681173be"]]);
|
|
28411
|
-
const _withScopeId$2 = (n2) => (vue.pushScopeId("data-v-
|
|
28821
|
+
const _withScopeId$2 = (n2) => (vue.pushScopeId("data-v-1ce244aa"), n2 = n2(), vue.popScopeId(), n2);
|
|
28412
28822
|
const _hoisted_1$j = { class: "bagel-input" };
|
|
28413
28823
|
const _hoisted_2$e = {
|
|
28414
28824
|
key: 0,
|
|
@@ -28419,7 +28829,7 @@ const _hoisted_4$6 = {
|
|
|
28419
28829
|
key: 1,
|
|
28420
28830
|
class: "multi-image-item previewName"
|
|
28421
28831
|
};
|
|
28422
|
-
const _hoisted_5$
|
|
28832
|
+
const _hoisted_5$6 = ["src"];
|
|
28423
28833
|
const _hoisted_6$4 = { class: "no-margin" };
|
|
28424
28834
|
const _hoisted_7$1 = {
|
|
28425
28835
|
key: 0,
|
|
@@ -28436,25 +28846,23 @@ const _hoisted_12 = {
|
|
|
28436
28846
|
const _hoisted_13 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ vue.createElementVNode("p", null, "Drop files here or click to upload", -1));
|
|
28437
28847
|
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
28438
28848
|
__name: "FileUpload",
|
|
28439
|
-
props:
|
|
28849
|
+
props: {
|
|
28440
28850
|
label: {},
|
|
28441
28851
|
multiple: { type: Boolean },
|
|
28442
28852
|
files: {},
|
|
28443
28853
|
deleteEndpoint: {},
|
|
28444
28854
|
bindkey: {},
|
|
28855
|
+
modelValue: {},
|
|
28445
28856
|
width: {}
|
|
28446
|
-
},
|
|
28447
|
-
"modelValue": {},
|
|
28448
|
-
"modelModifiers": {}
|
|
28449
|
-
}),
|
|
28857
|
+
},
|
|
28450
28858
|
emits: ["update:modelValue"],
|
|
28451
|
-
setup(__props) {
|
|
28859
|
+
setup(__props, { emit: __emit }) {
|
|
28452
28860
|
const props2 = __props;
|
|
28453
28861
|
const bagel = useBagel();
|
|
28454
28862
|
const bindKey2 = props2.bindkey || "id";
|
|
28455
|
-
const
|
|
28863
|
+
const emit2 = __emit;
|
|
28864
|
+
let file_bindkeys = vue.ref(props2.modelValue || []);
|
|
28456
28865
|
const storageFiles = vue.ref([]);
|
|
28457
|
-
const compareIds = (v1, v2) => [v1].flat().join(",") === [v2].flat().join(",");
|
|
28458
28866
|
vue.onMounted(() => {
|
|
28459
28867
|
if (!props2.files && [file_bindkeys.value].flat().length) {
|
|
28460
28868
|
const ids = [file_bindkeys.value].flat().filter(Boolean);
|
|
@@ -28484,21 +28892,19 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
28484
28892
|
},
|
|
28485
28893
|
{ immediate: true }
|
|
28486
28894
|
);
|
|
28487
|
-
|
|
28488
|
-
|
|
28489
|
-
(
|
|
28490
|
-
|
|
28491
|
-
|
|
28492
|
-
|
|
28493
|
-
|
|
28494
|
-
|
|
28495
|
-
|
|
28496
|
-
|
|
28497
|
-
|
|
28498
|
-
|
|
28499
|
-
|
|
28500
|
-
{ deep: true }
|
|
28501
|
-
);
|
|
28895
|
+
function updateModelValue() {
|
|
28896
|
+
let idValue;
|
|
28897
|
+
if (props2.multiple) {
|
|
28898
|
+
idValue = storageFiles.value.map((f2) => f2[bindKey2]);
|
|
28899
|
+
} else {
|
|
28900
|
+
idValue = storageFiles.value[0][bindKey2] || "";
|
|
28901
|
+
}
|
|
28902
|
+
const isSame = [idValue].flat().every((id) => [file_bindkeys.value].flat().includes(id));
|
|
28903
|
+
if (!isSame) {
|
|
28904
|
+
file_bindkeys.value = idValue;
|
|
28905
|
+
emit2("update:modelValue", file_bindkeys.value);
|
|
28906
|
+
}
|
|
28907
|
+
}
|
|
28502
28908
|
const fileQueue = vue.ref([]);
|
|
28503
28909
|
let isDragOver = vue.ref(false);
|
|
28504
28910
|
function preventDefault(e) {
|
|
@@ -28512,16 +28918,20 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
28512
28918
|
if (props2.deleteEndpoint) {
|
|
28513
28919
|
void bagel.delete(`${props2.deleteEndpoint}/${file.id}`);
|
|
28514
28920
|
}
|
|
28921
|
+
updateModelValue();
|
|
28515
28922
|
}
|
|
28516
|
-
function flushQueue() {
|
|
28517
|
-
|
|
28923
|
+
async function flushQueue() {
|
|
28924
|
+
for (const file of fileQueue.value) {
|
|
28925
|
+
file.uploading = true;
|
|
28518
28926
|
if (!props2.multiple) storageFiles.value.splice(0, 1);
|
|
28519
28927
|
const serverFile = await bagel.uploadFile(file.file, {
|
|
28520
28928
|
onUploadProgress: (e) => file.progress = e.progress * 100 - 1
|
|
28521
28929
|
});
|
|
28522
28930
|
storageFiles.value.push(serverFile);
|
|
28931
|
+
const i2 = fileQueue.value.indexOf(file);
|
|
28523
28932
|
fileQueue.value.splice(i2, 1);
|
|
28524
|
-
}
|
|
28933
|
+
}
|
|
28934
|
+
updateModelValue();
|
|
28525
28935
|
}
|
|
28526
28936
|
function browse() {
|
|
28527
28937
|
const input = document.createElement("input");
|
|
@@ -28530,7 +28940,9 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
28530
28940
|
input.onchange = (e) => {
|
|
28531
28941
|
const target = e.target;
|
|
28532
28942
|
if (target.files) {
|
|
28533
|
-
Array.from(target.files).forEach(
|
|
28943
|
+
Array.from(target.files).forEach(
|
|
28944
|
+
(file) => fileQueue.value.push({ name: file.name, file, progress: 0 })
|
|
28945
|
+
);
|
|
28534
28946
|
}
|
|
28535
28947
|
flushQueue();
|
|
28536
28948
|
};
|
|
@@ -28549,7 +28961,9 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
28549
28961
|
function drop3(e) {
|
|
28550
28962
|
preventDefault(e);
|
|
28551
28963
|
if (e.dataTransfer) {
|
|
28552
|
-
Array.from(e.dataTransfer.files).forEach(
|
|
28964
|
+
Array.from(e.dataTransfer.files).forEach(
|
|
28965
|
+
(file) => fileQueue.value.push({ name: file.name, file, progress: 0 })
|
|
28966
|
+
);
|
|
28553
28967
|
}
|
|
28554
28968
|
isDragOver.value = false;
|
|
28555
28969
|
flushQueue();
|
|
@@ -28587,7 +29001,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
28587
29001
|
class: "preview",
|
|
28588
29002
|
src: file.url,
|
|
28589
29003
|
alt: ""
|
|
28590
|
-
}, null, 8, _hoisted_5$
|
|
29004
|
+
}, null, 8, _hoisted_5$6),
|
|
28591
29005
|
vue.createElementVNode("p", _hoisted_6$4, vue.toDisplayString(file.name), 1),
|
|
28592
29006
|
vue.createVNode(vue.unref(Btn), {
|
|
28593
29007
|
thin: "",
|
|
@@ -28644,14 +29058,15 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
28644
29058
|
};
|
|
28645
29059
|
}
|
|
28646
29060
|
});
|
|
28647
|
-
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
28648
|
-
const _withScopeId$1 = (n2) => (vue.pushScopeId("data-v-
|
|
29061
|
+
const $el = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-1ce244aa"]]);
|
|
29062
|
+
const _withScopeId$1 = (n2) => (vue.pushScopeId("data-v-eceeebfb"), n2 = n2(), vue.popScopeId(), n2);
|
|
28649
29063
|
const _hoisted_1$i = ["title"];
|
|
28650
29064
|
const _hoisted_2$d = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("span", { class: "slider round" }, null, -1));
|
|
28651
29065
|
const _hoisted_3$9 = [
|
|
28652
29066
|
_hoisted_2$d
|
|
28653
29067
|
];
|
|
28654
|
-
const _hoisted_4$5 = ["id"];
|
|
29068
|
+
const _hoisted_4$5 = ["id", "required"];
|
|
29069
|
+
const _hoisted_5$5 = ["for"];
|
|
28655
29070
|
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
28656
29071
|
__name: "ToggleInput",
|
|
28657
29072
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
@@ -28659,14 +29074,16 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
28659
29074
|
id: {},
|
|
28660
29075
|
title: {},
|
|
28661
29076
|
small: { type: Boolean },
|
|
29077
|
+
required: { type: Boolean },
|
|
28662
29078
|
defaultValue: { type: Boolean, default: false }
|
|
28663
29079
|
}, {
|
|
28664
|
-
"modelValue": { type: Boolean },
|
|
29080
|
+
"modelValue": { type: Boolean, ...{ default: void 0 } },
|
|
28665
29081
|
"modelModifiers": {}
|
|
28666
29082
|
}),
|
|
28667
29083
|
emits: ["update:modelValue"],
|
|
28668
29084
|
setup(__props) {
|
|
28669
29085
|
const props2 = __props;
|
|
29086
|
+
const inputId = vue.ref(props2.id || Math.random().toString(36).substring(7));
|
|
28670
29087
|
const checked = vue.useModel(__props, "modelValue");
|
|
28671
29088
|
vue.onMounted(() => {
|
|
28672
29089
|
if (checked.value === void 0) checked.value = props2.defaultValue;
|
|
@@ -28674,26 +29091,30 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
|
28674
29091
|
return (_ctx, _cache) => {
|
|
28675
29092
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
28676
29093
|
class: vue.normalizeClass(["bagel-input bgl-checkbox justify-content-center gap-1", { small: _ctx.small }]),
|
|
28677
|
-
title: _ctx.title
|
|
29094
|
+
title: _ctx.title,
|
|
29095
|
+
onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => checked.value = !checked.value, ["prevent"]))
|
|
28678
29096
|
}, [
|
|
28679
29097
|
vue.createElementVNode("div", {
|
|
28680
29098
|
class: vue.normalizeClass(["switch", { checked: checked.value }])
|
|
28681
29099
|
}, _hoisted_3$9, 2),
|
|
28682
|
-
vue.createElementVNode("
|
|
28683
|
-
|
|
28684
|
-
|
|
28685
|
-
|
|
28686
|
-
|
|
28687
|
-
|
|
28688
|
-
|
|
28689
|
-
|
|
28690
|
-
|
|
28691
|
-
|
|
29100
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
|
29101
|
+
id: inputId.value,
|
|
29102
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checked.value = $event),
|
|
29103
|
+
type: "checkbox",
|
|
29104
|
+
required: _ctx.required
|
|
29105
|
+
}, null, 8, _hoisted_4$5), [
|
|
29106
|
+
[vue.vModelCheckbox, checked.value]
|
|
29107
|
+
]),
|
|
29108
|
+
vue.createElementVNode("label", { for: inputId.value }, [
|
|
29109
|
+
vue.renderSlot(_ctx.$slots, "label", {}, () => [
|
|
29110
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
|
|
29111
|
+
], true)
|
|
29112
|
+
], 8, _hoisted_5$5)
|
|
28692
29113
|
], 10, _hoisted_1$i);
|
|
28693
29114
|
};
|
|
28694
29115
|
}
|
|
28695
29116
|
});
|
|
28696
|
-
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
29117
|
+
const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-eceeebfb"]]);
|
|
28697
29118
|
function OrderedMap(content) {
|
|
28698
29119
|
this.content = content;
|
|
28699
29120
|
}
|
|
@@ -62527,7 +62948,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
62527
62948
|
};
|
|
62528
62949
|
}
|
|
62529
62950
|
});
|
|
62530
|
-
const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
62951
|
+
const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-70d6cf78"]]);
|
|
62531
62952
|
const countryArray = [
|
|
62532
62953
|
["Afghanistan (افغانستان)", "AF", "93"],
|
|
62533
62954
|
["Albania (Shqipëri)", "AL", "355"],
|
|
@@ -62914,12 +63335,14 @@ exports.copyText = copyText;
|
|
|
62914
63335
|
exports.debounce = debounce$2;
|
|
62915
63336
|
exports.denullify = denullify;
|
|
62916
63337
|
exports.formatString = formatString;
|
|
63338
|
+
exports.getFallbackSchema = getFallbackSchema;
|
|
62917
63339
|
exports.i18nTInjectionKey = i18nTInjectionKey;
|
|
62918
63340
|
exports.iffer = iffer;
|
|
62919
63341
|
exports.initials = initials;
|
|
62920
63342
|
exports.isDate = isDate$1;
|
|
62921
63343
|
exports.keyToLabel = keyToLabel;
|
|
62922
63344
|
exports.useBagel = useBagel;
|
|
63345
|
+
exports.useBglSchema = useBglSchema;
|
|
62923
63346
|
exports.useEscape = useEscape;
|
|
62924
63347
|
exports.useI18nT = useI18nT;
|
|
62925
63348
|
exports.useLang = useLang;
|