@opengis/bi 1.1.0 → 1.1.1

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.
@@ -0,0 +1,71 @@
1
+ import { _ as m, c as f, a as _, b } from "./import-file-ZfIxjCYO.js";
2
+ import { openBlock as a, createElementBlock as r, createElementVNode as s, Fragment as n, renderList as c, toDisplayString as d } from "vue";
3
+ const x = {
4
+ name: "VsTable",
5
+ mixins: [f],
6
+ data() {
7
+ return {
8
+ values: null,
9
+ xs: null,
10
+ products: null
11
+ };
12
+ },
13
+ async mounted() {
14
+ await this.getData(), this.prepareData();
15
+ },
16
+ methods: {
17
+ onChangedData() {
18
+ try {
19
+ this.sourceData && this.prepareData();
20
+ } catch {
21
+ }
22
+ },
23
+ prepareData() {
24
+ try {
25
+ const t = Array.from(
26
+ new Set(this.sourceData.map((e) => e[this.dimensions[0]]))
27
+ );
28
+ this.dimensions[0].includes("date") ? this.xs = t.map((e) => _(e)) : this.xs = [...t], this.products = this.dimensions.filter((e, o) => o != 0), this.values = this.products.map((e, o) => ({
29
+ name: e,
30
+ data: this.sourceData.filter((l) => parseFloat(l[e])).map((l) => b(parseFloat(l[e])))
31
+ }));
32
+ } catch (t) {
33
+ console.error(t);
34
+ }
35
+ }
36
+ }
37
+ }, y = { class: "flex flex-col h-full pt-[16px] pb-[16px] space-y-4 rounded-xl" }, g = { class: "overflow-auto h-full [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300" }, w = { class: "inline-block min-w-full align-middle" }, k = { class: "relative min-w-full divide-y divide-gray-200 text-[12px]" }, v = { class: "sticky top-0 bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200" }, D = { class: "space-x-2" }, $ = {
38
+ scope: "col",
39
+ class: "xl:min-w-[120px] min-w-48"
40
+ }, F = { class: "flex items-center px-1 py-3 font-medium text-gray-800 text-start gap-x-1" }, T = { class: "divide-y divide-gray-200" }, B = { class: "text-gray-600" };
41
+ function E(t, e, o, l, N, S) {
42
+ return a(), r("div", y, [
43
+ s("div", g, [
44
+ s("div", w, [
45
+ s("table", k, [
46
+ s("thead", v, [
47
+ s("tr", D, [
48
+ (a(!0), r(n, null, c(t.dimensions, (i) => (a(), r("th", $, [
49
+ s("div", F, d(i), 1)
50
+ ]))), 256))
51
+ ])
52
+ ]),
53
+ s("tbody", T, [
54
+ (a(!0), r(n, null, c(t.sourceData, (i, p) => (a(), r("tr", { key: p }, [
55
+ (a(!0), r(n, null, c(t.dimensions, (u, h) => (a(), r("td", {
56
+ key: h,
57
+ class: "py-3 whitespace-nowrap"
58
+ }, [
59
+ s("span", B, d(i == null ? void 0 : i[u]), 1)
60
+ ]))), 128))
61
+ ]))), 128))
62
+ ])
63
+ ])
64
+ ])
65
+ ])
66
+ ]);
67
+ }
68
+ const C = /* @__PURE__ */ m(x, [["render", E]]);
69
+ export {
70
+ C as default
71
+ };
@@ -0,0 +1,40 @@
1
+ import { _ as o, c as s, m as i } from "./import-file-ZfIxjCYO.js";
2
+ import { openBlock as r, createElementBlock as n, createCommentVNode as a } from "vue";
3
+ const c = {
4
+ name: "VsText",
5
+ mixins: [s],
6
+ data() {
7
+ return {
8
+ markedText: null,
9
+ uniqueID: null
10
+ };
11
+ },
12
+ async mounted() {
13
+ this.uniqueID = this.widget;
14
+ try {
15
+ await this.getData(), this.markedText = i(this.sourceData);
16
+ } catch (t) {
17
+ console.error(t);
18
+ }
19
+ },
20
+ methods: {
21
+ onChangedData() {
22
+ return null;
23
+ }
24
+ }
25
+ }, u = ["id"], d = ["innerHTML"];
26
+ function l(t, m, x, h, e, _) {
27
+ return r(), n("div", {
28
+ id: e.uniqueID,
29
+ class: "relative select-auto h-full rounded-xl text-[12px] box-border bg-white custom-scrollbar text-widget"
30
+ }, [
31
+ e.markedText ? (r(), n("div", {
32
+ key: 0,
33
+ innerHTML: e.markedText
34
+ }, null, 8, d)) : a("", !0)
35
+ ], 8, u);
36
+ }
37
+ const k = /* @__PURE__ */ o(c, [["render", l]]);
38
+ export {
39
+ k as default
40
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/bi",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "BI data visualization module",
5
5
  "main": "dist/bi.js",
6
6
  "browser": "dist/bi.umd.cjs",