UNPKG

vue-data-ui

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

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