vue-data-ui
Version:
A user-empowering data visualization Vue 3 components library for eloquent data storytelling
31 lines (30 loc) • 1.04 kB
JavaScript
import { ref as d, computed as g, unref as a, watchEffect as h, createElementBlock as A, openBlock as y } from "vue";
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
function T({
config: s,
dataset: n,
skeletonDataset: o,
skeletonConfig: r,
FINAL_CONFIG: f,
prepareConfig: i,
callback: t = null,
dsIsNumber: _ = !1,
allowEmptyDataset: m = !1
}) {
const l = d(!1), c = g(() => {
const p = a(s)?.loading ?? !1, e = a(n), v = m ? !1 : _ ? [null, void 0].includes(e) : e == null || Array.isArray(e) && e.length === 0 || Object.keys(e).length === 0;
return l.value || p || v;
}), u = d(a(n));
return h(() => {
u.value = c.value ? o : a(n), f.value = c.value ? r : i(), t && t();
}), { loading: c, FINAL_DATASET: u, manualLoading: l, skeletonDataset: o, skeletonConfig: r };
}
const E = {}, L = { class: "vue-data-ui-scanner" };
function x(s, n) {
return y(), A("div", L);
}
const j = /* @__PURE__ */ B(E, [["render", x], ["__scopeId", "data-v-d6376e44"]]);
export {
j as B,
T as u
};