@ovalbee/reportifact 0.0.2 → 0.0.3
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/README.md +15 -15
- package/dist/{Chart.vue_vue_type_style_index_0_lang-Bp14Es_r.js → Chart.vue_vue_type_style_index_0_lang-Bxrsp8Oz.js} +53 -43
- package/dist/{Chart.vue_vue_type_style_index_0_lang-Dj7m6i3v.cjs → Chart.vue_vue_type_style_index_0_lang-mN1IaQ_U.cjs} +1 -1
- package/dist/ImageGallery.vue_vue_type_style_index_0_lang-Ak_OUL_c.js +197 -0
- package/dist/ImageGallery.vue_vue_type_style_index_0_lang-Ch0UPxhs.cjs +1 -0
- package/dist/MetricCallout.vue_vue_type_style_index_0_lang-ANFFq7CE.js +62 -0
- package/dist/MetricCallout.vue_vue_type_style_index_0_lang-CT9lFI28.cjs +1 -0
- package/dist/MetricCards.vue_vue_type_style_index_0_lang-1hn2BMbU.js +46 -0
- package/dist/MetricCards.vue_vue_type_style_index_0_lang-BDU7pisC.cjs +1 -0
- package/dist/MetricsTable.vue_vue_type_style_index_0_lang-BfxK3vcz.js +140 -0
- package/dist/MetricsTable.vue_vue_type_style_index_0_lang-CS7xiHRk.cjs +1 -0
- package/dist/{Timeline.vue_vue_type_style_index_0_lang-BTA6fIp9.js → Timeline.vue_vue_type_style_index_0_lang-EmkZbKjQ.js} +9 -3
- package/dist/{Timeline.vue_vue_type_style_index_0_lang-CZ8Y2pXG.cjs → Timeline.vue_vue_type_style_index_0_lang-HOC43_F3.cjs} +2 -2
- package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-BY2t_Hvs.cjs +1 -0
- package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-BbnW8GXT.js +72 -0
- package/dist/portable/contracts.d.ts +6 -1
- package/dist/reportifact.cjs +24 -24
- package/dist/reportifact.js +1408 -1403
- package/dist/style.css +1 -1
- package/dist/widgets/Chart.vue.d.ts +7 -4
- package/dist/widgets/ImageGallery.vue.d.ts +7 -4
- package/dist/widgets/Markdown.vue.d.ts +1 -1
- package/dist/widgets/MetricCallout.vue.d.ts +5 -2
- package/dist/widgets/MetricCards.vue.d.ts +6 -3
- package/dist/widgets/MetricsTable.vue.d.ts +7 -4
- package/dist/widgets/ModelClassComparison.vue.d.ts +1 -1
- package/dist/widgets/ModelComparisonGallery.vue.d.ts +1 -1
- package/dist/widgets/Table.vue.d.ts +1 -1
- package/dist/widgets/Tensorboard.vue.d.ts +1 -1
- package/dist/widgets/Timeline.vue.d.ts +7 -4
- package/dist/widgets/WidgetWrapper.vue.d.ts +11 -5
- package/dist/widgets/chart.cjs +1 -1
- package/dist/widgets/chart.js +1 -1
- package/dist/widgets/image-gallery.cjs +1 -1
- package/dist/widgets/image-gallery.js +1 -1
- package/dist/widgets/metric-callout.cjs +1 -1
- package/dist/widgets/metric-callout.js +1 -1
- package/dist/widgets/metric-cards.cjs +1 -1
- package/dist/widgets/metric-cards.js +1 -1
- package/dist/widgets/metrics-table.cjs +1 -1
- package/dist/widgets/metrics-table.js +1 -1
- package/dist/widgets/timeline.cjs +1 -1
- package/dist/widgets/timeline.js +1 -1
- package/package.json +1 -6
- package/dist/ImageGallery.vue_vue_type_style_index_0_lang-BB4dG0CB.cjs +0 -1
- package/dist/ImageGallery.vue_vue_type_style_index_0_lang-DPY6mSdA.js +0 -191
- package/dist/MetricCallout.vue_vue_type_style_index_0_lang-BZbc-Wkf.js +0 -49
- package/dist/MetricCallout.vue_vue_type_style_index_0_lang-WpuALh8Z.cjs +0 -1
- package/dist/MetricCards.vue_vue_type_style_index_0_lang-CDPSu7no.cjs +0 -1
- package/dist/MetricCards.vue_vue_type_style_index_0_lang-CfxCCXmB.js +0 -33
- package/dist/MetricsTable.vue_vue_type_style_index_0_lang-BzrxoJW4.cjs +0 -1
- package/dist/MetricsTable.vue_vue_type_style_index_0_lang-CO9HvYfr.js +0 -132
- package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs +0 -1
- package/dist/WidgetWrapper.vue_vue_type_style_index_0_lang-D-oXqmI2.js +0 -59
- package/dist/entries/figure.d.ts +0 -1
- package/dist/portable/ReportifactFigure.vue.d.ts +0 -40
- package/dist/widgets/figure.cjs +0 -1
- package/dist/widgets/figure.d.ts +0 -6
- package/dist/widgets/figure.js +0 -84
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m, computed as u, createElementBlock as c, openBlock as s, Fragment as f, renderList as _, normalizeClass as v, unref as n, createElementVNode as t, normalizeStyle as h, toDisplayString as o } from "vue";
|
|
2
|
-
import { p as g, m as b, a as k } from "./markdownTable-B5207r3E.js";
|
|
3
|
-
const y = { class: "reportifact-metric-cards" }, C = { class: "reportifact-metric-card-label" }, x = { class: "reportifact-metric-card-value" }, z = { class: "reportifact-metric-card-description" }, S = /* @__PURE__ */ m({
|
|
4
|
-
__name: "MetricCards",
|
|
5
|
-
props: {
|
|
6
|
-
widget: { default: void 0 },
|
|
7
|
-
content: { default: void 0 },
|
|
8
|
-
data: { default: void 0 }
|
|
9
|
-
},
|
|
10
|
-
setup(i) {
|
|
11
|
-
const r = i, l = u(() => {
|
|
12
|
-
var a;
|
|
13
|
-
return r.data ?? g(r.content ?? ((a = r.widget) == null ? void 0 : a.content) ?? "");
|
|
14
|
-
}), d = b, p = k;
|
|
15
|
-
return (a, B) => (s(), c("div", y, [
|
|
16
|
-
(s(!0), c(f, null, _(l.value, (e) => (s(), c("article", {
|
|
17
|
-
key: e.label,
|
|
18
|
-
class: v(["reportifact-metric-card", `reportifact-metric-card--${n(d)(e.value)}`])
|
|
19
|
-
}, [
|
|
20
|
-
t("span", {
|
|
21
|
-
class: "reportifact-metric-card-fill",
|
|
22
|
-
style: h({ height: `${n(p)(e.value)}%` })
|
|
23
|
-
}, null, 4),
|
|
24
|
-
t("span", C, o(e.label), 1),
|
|
25
|
-
t("strong", x, o(e.value), 1),
|
|
26
|
-
t("p", z, o(e.description), 1)
|
|
27
|
-
], 2))), 128))
|
|
28
|
-
]));
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
export {
|
|
32
|
-
S as _
|
|
33
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),b=require("./useFetch-BfOAq-Kg.cjs"),F=require("./WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs"),C={class:"rm-skeleton"},D={key:0,class:"rm-title"},S={key:0,class:"rm-empty"},L={class:"rm-name"},A={class:"rm-value"},M={class:"rm-bar-track"},R={key:0,class:"rm-pct"},q={key:2,class:"rm-table"},W=e.defineComponent({__name:"MetricsTable",props:{url:{default:void 0},src:{default:void 0},data:{default:void 0},options:{default:void 0}},setup(d,{expose:m}){const l=d,c=e.computed(()=>{var t;return typeof((t=l.options)==null?void 0:t.title)=="string"?l.options.title:""}),s=e.computed(()=>{var t;return((t=l.options)==null?void 0:t.show_pct)===!0}),n=e.ref(null),p=e.computed(()=>l.data===void 0?l.src??l.url??"":""),{loading:v,error:k,fetchData:f}=b.useFetch(p,{async onSuccess(t){n.value=await t.json()}}),y=e.computed(()=>l.data===void 0&&v.value),_=e.computed(()=>l.data!==void 0?null:l.src||l.url?k.value:"Resource not found in asset");e.watch(()=>l.data,t=>{t!==void 0&&(n.value=t)},{immediate:!0,deep:!0});function B(){l.data!==void 0?n.value=l.data:f()}m({refresh:B});const i=e.computed(()=>{const t=n.value;if(!t||!Array.isArray(t.rows))return!1;const r=t.rows[0];return r===void 0||typeof r=="object"&&"value"in r}),a=e.computed(()=>{const t=n.value;return!!t&&Array.isArray(t.columns)}),u=e.computed(()=>i.value?n.value.rows:[]),E=e.computed(()=>a.value?n.value.columns:[]),h=e.computed(()=>a.value?n.value.rows:[]);function g(t){return t.toFixed(3)}function V(t,r){return Math.min(100,Math.max(0,t/(r??1)*100))}return(t,r)=>(e.openBlock(),e.createBlock(F._sfc_main,{loading:y.value,error:_.value},{skeleton:e.withCtx(()=>[e.createElementVNode("div",C,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(4,o=>e.createElementVNode("div",{key:o,class:"rm-skeleton-row"},[...r[0]||(r[0]=[e.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"80px"}},null,-1),e.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"40px"}},null,-1),e.createElementVNode("div",{class:"reportifact-skeleton-line",style:{flex:"1"}},null,-1)])])),64))])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",D,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rm-metrics",{"rm-metrics--with-pct":s.value}])},[u.value.length===0?(e.openBlock(),e.createElementBlock("div",S," Waiting for first evaluation… ")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.name,class:"rm-row"},[e.createElementVNode("span",L,e.toDisplayString(o.name),1),e.createElementVNode("span",A,e.toDisplayString(g(o.value)),1),e.createElementVNode("div",M,[e.createElementVNode("div",{class:"rm-bar-fill",style:e.normalizeStyle({width:V(o.value,o.max)+"%"})},null,4)]),s.value?(e.openBlock(),e.createElementBlock("span",R,e.toDisplayString((o.value*100).toFixed(1))+"%",1)):e.createCommentVNode("",!0)]))),128))],2)):a.value?(e.openBlock(),e.createElementBlock("table",q,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,o=>(e.openBlock(),e.createElementBlock("th",{key:o},e.toDisplayString(o),1))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,N)=>(e.openBlock(),e.createElementBlock("tr",{key:N},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(w,x)=>(e.openBlock(),e.createElementBlock("td",{key:x},e.toDisplayString(w),1))),128))]))),128))])])):e.createCommentVNode("",!0)]),_:1},8,["loading","error"]))}});exports._sfc_main=W;
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { defineComponent as z, computed as o, ref as L, watch as N, createBlock as P, openBlock as t, withCtx as h, createElementBlock as s, createCommentVNode as m, toDisplayString as u, normalizeClass as T, Fragment as c, renderList as d, createElementVNode as a, normalizeStyle as W } from "vue";
|
|
2
|
-
import { u as $ } from "./useFetch-CHQm_TmB.js";
|
|
3
|
-
import { _ as q } from "./WidgetWrapper.vue_vue_type_style_index_0_lang-D-oXqmI2.js";
|
|
4
|
-
const G = { class: "rm-skeleton" }, H = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "rm-title"
|
|
7
|
-
}, I = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "rm-empty"
|
|
10
|
-
}, J = { class: "rm-name" }, K = { class: "rm-value" }, O = { class: "rm-bar-track" }, Q = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "rm-pct"
|
|
13
|
-
}, U = {
|
|
14
|
-
key: 2,
|
|
15
|
-
class: "rm-table"
|
|
16
|
-
}, ee = /* @__PURE__ */ z({
|
|
17
|
-
__name: "MetricsTable",
|
|
18
|
-
props: {
|
|
19
|
-
url: { default: void 0 },
|
|
20
|
-
src: { default: void 0 },
|
|
21
|
-
data: { default: void 0 },
|
|
22
|
-
options: { default: void 0 }
|
|
23
|
-
},
|
|
24
|
-
setup(k, { expose: w }) {
|
|
25
|
-
const l = k, f = o(() => {
|
|
26
|
-
var e;
|
|
27
|
-
return typeof ((e = l.options) == null ? void 0 : e.title) == "string" ? l.options.title : "";
|
|
28
|
-
}), p = o(() => {
|
|
29
|
-
var e;
|
|
30
|
-
return ((e = l.options) == null ? void 0 : e.show_pct) === !0;
|
|
31
|
-
}), n = L(null), b = o(() => l.data === void 0 ? l.src ?? l.url ?? "" : ""), { loading: x, error: g, fetchData: C } = $(b, {
|
|
32
|
-
async onSuccess(e) {
|
|
33
|
-
n.value = await e.json();
|
|
34
|
-
}
|
|
35
|
-
}), A = o(() => l.data === void 0 && x.value), F = o(() => l.data !== void 0 ? null : l.src || l.url ? g.value : "Resource not found in asset");
|
|
36
|
-
N(
|
|
37
|
-
() => l.data,
|
|
38
|
-
(e) => {
|
|
39
|
-
e !== void 0 && (n.value = e);
|
|
40
|
-
},
|
|
41
|
-
{ immediate: !0, deep: !0 }
|
|
42
|
-
);
|
|
43
|
-
function M() {
|
|
44
|
-
l.data !== void 0 ? n.value = l.data : C();
|
|
45
|
-
}
|
|
46
|
-
w({ refresh: M });
|
|
47
|
-
const y = o(() => {
|
|
48
|
-
const e = n.value;
|
|
49
|
-
if (!e || !Array.isArray(e.rows)) return !1;
|
|
50
|
-
const i = e.rows[0];
|
|
51
|
-
return i === void 0 || typeof i == "object" && "value" in i;
|
|
52
|
-
}), v = o(() => {
|
|
53
|
-
const e = n.value;
|
|
54
|
-
return !!e && Array.isArray(e.columns);
|
|
55
|
-
}), _ = o(
|
|
56
|
-
() => y.value ? n.value.rows : []
|
|
57
|
-
), R = o(
|
|
58
|
-
() => v.value ? n.value.columns : []
|
|
59
|
-
), B = o(
|
|
60
|
-
() => v.value ? n.value.rows : []
|
|
61
|
-
);
|
|
62
|
-
function D(e) {
|
|
63
|
-
return e.toFixed(3);
|
|
64
|
-
}
|
|
65
|
-
function E(e, i) {
|
|
66
|
-
return Math.min(100, Math.max(0, e / (i ?? 1) * 100));
|
|
67
|
-
}
|
|
68
|
-
return (e, i) => (t(), P(q, {
|
|
69
|
-
loading: A.value,
|
|
70
|
-
error: F.value
|
|
71
|
-
}, {
|
|
72
|
-
skeleton: h(() => [
|
|
73
|
-
a("div", G, [
|
|
74
|
-
(t(), s(c, null, d(4, (r) => a("div", {
|
|
75
|
-
key: r,
|
|
76
|
-
class: "rm-skeleton-row"
|
|
77
|
-
}, [...i[0] || (i[0] = [
|
|
78
|
-
a("div", {
|
|
79
|
-
class: "reportifact-skeleton-line",
|
|
80
|
-
style: { width: "80px" }
|
|
81
|
-
}, null, -1),
|
|
82
|
-
a("div", {
|
|
83
|
-
class: "reportifact-skeleton-line",
|
|
84
|
-
style: { width: "40px" }
|
|
85
|
-
}, null, -1),
|
|
86
|
-
a("div", {
|
|
87
|
-
class: "reportifact-skeleton-line",
|
|
88
|
-
style: { flex: "1" }
|
|
89
|
-
}, null, -1)
|
|
90
|
-
])])), 64))
|
|
91
|
-
])
|
|
92
|
-
]),
|
|
93
|
-
default: h(() => [
|
|
94
|
-
f.value ? (t(), s("div", H, u(f.value), 1)) : m("", !0),
|
|
95
|
-
y.value ? (t(), s("div", {
|
|
96
|
-
key: 1,
|
|
97
|
-
class: T(["rm-metrics", { "rm-metrics--with-pct": p.value }])
|
|
98
|
-
}, [
|
|
99
|
-
_.value.length === 0 ? (t(), s("div", I, " Waiting for first evaluation… ")) : (t(!0), s(c, { key: 1 }, d(_.value, (r) => (t(), s("div", {
|
|
100
|
-
key: r.name,
|
|
101
|
-
class: "rm-row"
|
|
102
|
-
}, [
|
|
103
|
-
a("span", J, u(r.name), 1),
|
|
104
|
-
a("span", K, u(D(r.value)), 1),
|
|
105
|
-
a("div", O, [
|
|
106
|
-
a("div", {
|
|
107
|
-
class: "rm-bar-fill",
|
|
108
|
-
style: W({ width: E(r.value, r.max) + "%" })
|
|
109
|
-
}, null, 4)
|
|
110
|
-
]),
|
|
111
|
-
p.value ? (t(), s("span", Q, u((r.value * 100).toFixed(1)) + "%", 1)) : m("", !0)
|
|
112
|
-
]))), 128))
|
|
113
|
-
], 2)) : v.value ? (t(), s("table", U, [
|
|
114
|
-
a("thead", null, [
|
|
115
|
-
a("tr", null, [
|
|
116
|
-
(t(!0), s(c, null, d(R.value, (r) => (t(), s("th", { key: r }, u(r), 1))), 128))
|
|
117
|
-
])
|
|
118
|
-
]),
|
|
119
|
-
a("tbody", null, [
|
|
120
|
-
(t(!0), s(c, null, d(B.value, (r, S) => (t(), s("tr", { key: S }, [
|
|
121
|
-
(t(!0), s(c, null, d(r, (V, j) => (t(), s("td", { key: j }, u(V), 1))), 128))
|
|
122
|
-
]))), 128))
|
|
123
|
-
])
|
|
124
|
-
])) : m("", !0)
|
|
125
|
-
]),
|
|
126
|
-
_: 1
|
|
127
|
-
}, 8, ["loading", "error"]));
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
export {
|
|
131
|
-
ee as _
|
|
132
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue");function i(r,o=30){const n=e.ref(!1);let t=null;function s(){t&&clearTimeout(t),t=setTimeout(()=>{r.value&&(n.value=!0)},o)}function a(){n.value=!1,t&&(clearTimeout(t),t=null)}return{showOverlay:n,startLoading:s,stopLoading:a}}const c={class:"reportifact-widget-wrapper"},d={key:0,class:"reportifact-widget-skeleton"},u={key:1,class:"reportifact-widget-error"},f={class:"reportifact-widget-error-message"},g={key:2,class:"reportifact-widget-content"},p=e.defineComponent({__name:"WidgetWrapper",props:{loading:{type:Boolean},error:{},showSkeleton:{type:Boolean,default:!0}},setup(r){const o=r,n=e.computed(()=>o.loading&&o.showSkeleton),{showOverlay:t,startLoading:s,stopLoading:a}=i(n,30);return e.watch(()=>o.loading&&o.showSkeleton,l=>{l?s():a()}),e.onMounted(()=>{o.loading&&o.showSkeleton&&s()}),(l,k)=>(e.openBlock(),e.createElementBlock("div",c,[e.unref(t)?(e.openBlock(),e.createElementBlock("div",d,[e.renderSlot(l.$slots,"skeleton")])):r.error?(e.openBlock(),e.createElementBlock("div",u,[e.renderSlot(l.$slots,"fallback",{error:r.error},()=>[e.createElementVNode("div",f,e.toDisplayString(r.error),1)])])):(e.openBlock(),e.createElementBlock("div",g,[e.renderSlot(l.$slots,"default")]))]))}});exports._sfc_main=p;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { ref as c, defineComponent as f, computed as u, watch as g, onMounted as p, createElementBlock as a, openBlock as i, unref as h, renderSlot as d, createElementVNode as w, toDisplayString as m } from "vue";
|
|
2
|
-
function k(t, e = 30) {
|
|
3
|
-
const r = c(!1);
|
|
4
|
-
let o = null;
|
|
5
|
-
function s() {
|
|
6
|
-
o && clearTimeout(o), o = setTimeout(() => {
|
|
7
|
-
t.value && (r.value = !0);
|
|
8
|
-
}, e);
|
|
9
|
-
}
|
|
10
|
-
function l() {
|
|
11
|
-
r.value = !1, o && (clearTimeout(o), o = null);
|
|
12
|
-
}
|
|
13
|
-
return {
|
|
14
|
-
showOverlay: r,
|
|
15
|
-
startLoading: s,
|
|
16
|
-
stopLoading: l
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
const v = { class: "reportifact-widget-wrapper" }, y = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "reportifact-widget-skeleton"
|
|
22
|
-
}, _ = {
|
|
23
|
-
key: 1,
|
|
24
|
-
class: "reportifact-widget-error"
|
|
25
|
-
}, L = { class: "reportifact-widget-error-message" }, S = {
|
|
26
|
-
key: 2,
|
|
27
|
-
class: "reportifact-widget-content"
|
|
28
|
-
}, O = /* @__PURE__ */ f({
|
|
29
|
-
__name: "WidgetWrapper",
|
|
30
|
-
props: {
|
|
31
|
-
loading: { type: Boolean },
|
|
32
|
-
error: {},
|
|
33
|
-
showSkeleton: { type: Boolean, default: !0 }
|
|
34
|
-
},
|
|
35
|
-
setup(t) {
|
|
36
|
-
const e = t, r = u(() => e.loading && e.showSkeleton), { showOverlay: o, startLoading: s, stopLoading: l } = k(
|
|
37
|
-
r,
|
|
38
|
-
30
|
|
39
|
-
);
|
|
40
|
-
return g(() => e.loading && e.showSkeleton, (n) => {
|
|
41
|
-
n ? s() : l();
|
|
42
|
-
}), p(() => {
|
|
43
|
-
e.loading && e.showSkeleton && s();
|
|
44
|
-
}), (n, B) => (i(), a("div", v, [
|
|
45
|
-
h(o) ? (i(), a("div", y, [
|
|
46
|
-
d(n.$slots, "skeleton")
|
|
47
|
-
])) : t.error ? (i(), a("div", _, [
|
|
48
|
-
d(n.$slots, "fallback", { error: t.error }, () => [
|
|
49
|
-
w("div", L, m(t.error), 1)
|
|
50
|
-
])
|
|
51
|
-
])) : (i(), a("div", S, [
|
|
52
|
-
d(n.$slots, "default")
|
|
53
|
-
]))
|
|
54
|
-
]));
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export {
|
|
58
|
-
O as _
|
|
59
|
-
};
|
package/dist/entries/figure.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, default as ReportifactFigure } from '../portable/ReportifactFigure.vue';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
title?: string;
|
|
3
|
-
caption?: string;
|
|
4
|
-
loading?: boolean;
|
|
5
|
-
error?: string | null;
|
|
6
|
-
/** Static fallback. `fallbackImage` is the preferred portable API name. */
|
|
7
|
-
fallbackImage?: string;
|
|
8
|
-
/** Backward-compatible alias for `fallbackImage`. */
|
|
9
|
-
fallbackSrc?: string;
|
|
10
|
-
fallbackAlt?: string;
|
|
11
|
-
sourceHref?: string;
|
|
12
|
-
sourceLabel?: string;
|
|
13
|
-
};
|
|
14
|
-
declare function __VLS_template(): {
|
|
15
|
-
attrs: Partial<{}>;
|
|
16
|
-
slots: {
|
|
17
|
-
default?(_: {}): any;
|
|
18
|
-
};
|
|
19
|
-
refs: {};
|
|
20
|
-
rootEl: HTMLElement;
|
|
21
|
-
};
|
|
22
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
-
title: string;
|
|
25
|
-
loading: boolean;
|
|
26
|
-
error: string | null;
|
|
27
|
-
caption: string;
|
|
28
|
-
fallbackImage: string;
|
|
29
|
-
fallbackSrc: string;
|
|
30
|
-
fallbackAlt: string;
|
|
31
|
-
sourceHref: string;
|
|
32
|
-
sourceLabel: string;
|
|
33
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
34
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
35
|
-
export default _default;
|
|
36
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
|
-
new (): {
|
|
38
|
-
$slots: S;
|
|
39
|
-
};
|
|
40
|
-
};
|
package/dist/widgets/figure.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("../ReportifactWidgetHost-A73gQ3bT.cjs"),d=require("../WidgetWrapper.vue_vue_type_style_index_0_lang-BQQ4Vv5j.cjs"),s={class:"reportifact-figure"},u={key:0,class:"reportifact-figure-title"},f={class:"reportifact-widget-error-message"},k=["src","alt"],m={key:2},g=["src","alt"],v={key:0,class:"reportifact-figure-caption"},y={key:0},b=["href"],r=e.defineComponent({__name:"ReportifactFigure",props:{title:{default:void 0},caption:{default:void 0},loading:{type:Boolean,default:!1},error:{default:null},fallbackImage:{default:void 0},fallbackSrc:{default:void 0},fallbackAlt:{default:void 0},sourceHref:{default:void 0},sourceLabel:{default:"View source data"}},setup(t){const a=t,l=e.computed(()=>a.fallbackImage??a.fallbackSrc);return(c,o)=>(e.openBlock(),e.createElementBlock("figure",s,[e.createVNode(n.ReportifactWidgetHost,null,{default:e.withCtx(()=>[t.title?(e.openBlock(),e.createElementBlock("div",u,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createVNode(d._sfc_main,{loading:t.loading,error:t.error},{skeleton:e.withCtx(()=>[...o[0]||(o[0]=[e.createElementVNode("div",{class:"reportifact-figure-skeleton"},[e.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"42%"}}),e.createElementVNode("div",{class:"reportifact-skeleton-line",style:{width:"100%",flex:"1"}})],-1)])]),fallback:e.withCtx(({error:i})=>[e.createElementVNode("div",f,e.toDisplayString(i),1)]),default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["loading","error"]),l.value?(e.openBlock(),e.createElementBlock("img",{key:1,class:"reportifact-figure-fallback reportifact-figure-runtime-fallback",src:l.value,alt:t.fallbackAlt||t.title||t.caption||"Widget preview",loading:"lazy"},null,8,k)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("noscript",m,[e.createElementVNode("img",{class:"reportifact-figure-fallback",src:l.value,alt:t.fallbackAlt||t.title||t.caption||"Widget preview",loading:"lazy"},null,8,g)])):e.createCommentVNode("",!0)]),_:3}),t.caption||t.sourceHref?(e.openBlock(),e.createElementBlock("figcaption",v,[t.caption?(e.openBlock(),e.createElementBlock("span",y,e.toDisplayString(t.caption),1)):e.createCommentVNode("",!0),t.sourceHref?(e.openBlock(),e.createElementBlock("a",{key:1,href:t.sourceHref},e.toDisplayString(t.sourceLabel),9,b)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}});exports.ReportifactFigure=r;exports.default=r;
|
package/dist/widgets/figure.d.ts
DELETED
package/dist/widgets/figure.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, computed as k, createElementBlock as t, openBlock as a, createVNode as n, createCommentVNode as l, withCtx as o, toDisplayString as c, renderSlot as m, createElementVNode as i } from "vue";
|
|
2
|
-
import { R as v } from "../ReportifactWidgetHost-BjKBwCWI.js";
|
|
3
|
-
import { _ as b } from "../WidgetWrapper.vue_vue_type_style_index_0_lang-D-oXqmI2.js";
|
|
4
|
-
const h = { class: "reportifact-figure" }, y = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "reportifact-figure-title"
|
|
7
|
-
}, w = { class: "reportifact-widget-error-message" }, p = ["src", "alt"], H = { key: 2 }, S = ["src", "alt"], R = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "reportifact-figure-caption"
|
|
10
|
-
}, V = { key: 0 }, x = ["href"], F = /* @__PURE__ */ g({
|
|
11
|
-
__name: "ReportifactFigure",
|
|
12
|
-
props: {
|
|
13
|
-
title: { default: void 0 },
|
|
14
|
-
caption: { default: void 0 },
|
|
15
|
-
loading: { type: Boolean, default: !1 },
|
|
16
|
-
error: { default: null },
|
|
17
|
-
fallbackImage: { default: void 0 },
|
|
18
|
-
fallbackSrc: { default: void 0 },
|
|
19
|
-
fallbackAlt: { default: void 0 },
|
|
20
|
-
sourceHref: { default: void 0 },
|
|
21
|
-
sourceLabel: { default: "View source data" }
|
|
22
|
-
},
|
|
23
|
-
setup(e) {
|
|
24
|
-
const f = e, r = k(() => f.fallbackImage ?? f.fallbackSrc);
|
|
25
|
-
return (d, s) => (a(), t("figure", h, [
|
|
26
|
-
n(v, null, {
|
|
27
|
-
default: o(() => [
|
|
28
|
-
e.title ? (a(), t("div", y, c(e.title), 1)) : l("", !0),
|
|
29
|
-
n(b, {
|
|
30
|
-
loading: e.loading,
|
|
31
|
-
error: e.error
|
|
32
|
-
}, {
|
|
33
|
-
skeleton: o(() => [...s[0] || (s[0] = [
|
|
34
|
-
i("div", { class: "reportifact-figure-skeleton" }, [
|
|
35
|
-
i("div", {
|
|
36
|
-
class: "reportifact-skeleton-line",
|
|
37
|
-
style: { width: "42%" }
|
|
38
|
-
}),
|
|
39
|
-
i("div", {
|
|
40
|
-
class: "reportifact-skeleton-line",
|
|
41
|
-
style: { width: "100%", flex: "1" }
|
|
42
|
-
})
|
|
43
|
-
], -1)
|
|
44
|
-
])]),
|
|
45
|
-
fallback: o(({ error: u }) => [
|
|
46
|
-
i("div", w, c(u), 1)
|
|
47
|
-
]),
|
|
48
|
-
default: o(() => [
|
|
49
|
-
m(d.$slots, "default")
|
|
50
|
-
]),
|
|
51
|
-
_: 3
|
|
52
|
-
}, 8, ["loading", "error"]),
|
|
53
|
-
r.value ? (a(), t("img", {
|
|
54
|
-
key: 1,
|
|
55
|
-
class: "reportifact-figure-fallback reportifact-figure-runtime-fallback",
|
|
56
|
-
src: r.value,
|
|
57
|
-
alt: e.fallbackAlt || e.title || e.caption || "Widget preview",
|
|
58
|
-
loading: "lazy"
|
|
59
|
-
}, null, 8, p)) : l("", !0),
|
|
60
|
-
r.value ? (a(), t("noscript", H, [
|
|
61
|
-
i("img", {
|
|
62
|
-
class: "reportifact-figure-fallback",
|
|
63
|
-
src: r.value,
|
|
64
|
-
alt: e.fallbackAlt || e.title || e.caption || "Widget preview",
|
|
65
|
-
loading: "lazy"
|
|
66
|
-
}, null, 8, S)
|
|
67
|
-
])) : l("", !0)
|
|
68
|
-
]),
|
|
69
|
-
_: 3
|
|
70
|
-
}),
|
|
71
|
-
e.caption || e.sourceHref ? (a(), t("figcaption", R, [
|
|
72
|
-
e.caption ? (a(), t("span", V, c(e.caption), 1)) : l("", !0),
|
|
73
|
-
e.sourceHref ? (a(), t("a", {
|
|
74
|
-
key: 1,
|
|
75
|
-
href: e.sourceHref
|
|
76
|
-
}, c(e.sourceLabel), 9, x)) : l("", !0)
|
|
77
|
-
])) : l("", !0)
|
|
78
|
-
]));
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
export {
|
|
82
|
-
F as ReportifactFigure,
|
|
83
|
-
F as default
|
|
84
|
-
};
|