@astrato-io/visualizations 0.8.0 → 0.9.0
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 +1 -1
- package/THIRD_PARTY_NOTICES.md +307 -378
- package/chunks/{Button-BrGKp9Nm.js → Button-5CxPEACP.js} +11 -11
- package/chunks/CircularProgress-DFS-LQb7.js +765 -0
- package/chunks/FieldTypeIcon-pSVQFemC.js +22 -0
- package/chunks/LinearProgress-CjIQfkNA.js +327 -0
- package/chunks/{MenuOption-ByRqhRdX.js → MenuOption-Cb7B7x6z.js} +1384 -1002
- package/chunks/Title-CtFw1bVg.js +1804 -0
- package/chunks/ToggleButton-Br9HCPCv.js +150 -0
- package/chunks/{app-filter-bar.compiler-TwVTeoj5.js → app-filter-bar.compiler-B9775gLJ.js} +3 -3
- package/chunks/{bar.compiler-DuQg8EUb.js → bar.compiler-B7wlH_Ro.js} +4 -4
- package/chunks/{builder-DEDvNq1k.js → builder-Dxo7D7c6.js} +118 -55
- package/chunks/{coloring-CncX_JRX.js → coloring-B-Wa8D5P.js} +3 -3
- package/chunks/contains-BK-sRXcB.js +21 -0
- package/chunks/{definitions-BPJQTx16.js → definitions-DNpzD9tY.js} +26 -26
- package/chunks/{escobar-DRhRMYRE.js → escobar-C4Nm3eJ7.js} +4436 -4802
- package/chunks/{extend-preset-CUFNpmPe.js → extend-preset-BVKFtoe-.js} +46 -46
- package/chunks/{filter.compiler-w27dlv0C.js → filter.compiler-BlS3zoy_.js} +7 -7
- package/chunks/{filtering-cc7WqWpg.js → filtering-CGuLpg7u.js} +494 -270
- package/chunks/{handlers-TOT-7INo.js → handlers-CMbyj5y1.js} +1513 -1454
- package/chunks/{icon-picker-styles-CoJmwTRi.js → icon-picker-styles-DYQgVEKG.js} +8 -8
- package/chunks/{isEqual-B8loyPsC.js → isEqual-DBg_b35N.js} +1 -1
- package/chunks/isFocusVisible-B1_z03UT.js +144 -0
- package/chunks/{line.compiler-Ct1WhN2p.js → line.compiler-Bo9i9qag.js} +7 -7
- package/chunks/{logger-DpQtYQnX.js → logger-3lng-wOw.js} +7 -3
- package/chunks/{metadata-WABZrt7Y.js → metadata-Fmx1swpK.js} +1 -1
- package/chunks/{number.compiler-D8TPly-4.js → number.compiler-CdLd5aGW.js} +7 -7
- package/chunks/{operations-Dh4v1Ovt.js → operations-HSqnCRvv.js} +9156 -9112
- package/chunks/{range-Bi-7zT0k.js → range-CzO4isKK.js} +2 -2
- package/chunks/react-dom-BwZT0N3F.js +368 -0
- package/chunks/{render-wrappers-OEmtaM8g.js → render-wrappers-CAuvgMxi.js} +1 -1
- package/chunks/{requirements-Dvd8jqYF.js → requirements-CYpVh65U.js} +52 -52
- package/chunks/responsive.styles-FItb913l.js +93 -0
- package/chunks/{shared-Bn4N5QcZ.js → shared-DFoJxjVN.js} +401 -401
- package/chunks/{standalone-D__XCp-h.js → standalone-530a5lvf.js} +306 -306
- package/chunks/{standalone-CXNP6-xD.js → standalone-5DnapeHH.js} +112 -112
- package/chunks/{standalone-XTgSsTAa.js → standalone-B4jrf4KE.js} +70 -70
- package/chunks/{standalone-Bes8srx1.js → standalone-B6s_xG2u.js} +14 -14
- package/chunks/{standalone-vBnBS2YC.js → standalone-BDrQMxLi.js} +98 -98
- package/chunks/standalone-BMoJXGYe.js +2 -0
- package/chunks/{standalone-CLmGb7nn2.js → standalone-BfvGggeM2.js} +76 -76
- package/chunks/{standalone-D5Q5ngsD.js → standalone-BvWdpUL3.js} +26 -26
- package/chunks/{standalone-we5D5MIn.js → standalone-C6XDHYAM.js} +31 -31
- package/chunks/standalone-CMJJIi9v.js +2 -0
- package/chunks/{standalone-C8ZAEutO.js → standalone-CNkHsynO.js} +28 -28
- package/chunks/{standalone-BMTCb10X.js → standalone-CPUiiWNP.js} +5 -5
- package/chunks/{standalone-XuGksArp.js → standalone-CXniic5x.js} +9 -9
- package/chunks/standalone-C_Jd4gkj.js +6 -0
- package/chunks/{standalone-DW6NT205.js → standalone-CiaaibTa.js} +142 -142
- package/chunks/standalone-CoQxJ6ov.js +3638 -0
- package/chunks/{standalone-CM5XcAN5.js → standalone-Cu73fzSr.js} +7660 -7534
- package/chunks/standalone-DBeXQrwH.js +468 -0
- package/chunks/{standalone-DMcI1afI.js → standalone-DMCwtebn.js} +81 -81
- package/chunks/{standalone-BlMIwpEe.js → standalone-DWPfdP0A.js} +800 -668
- package/chunks/{standalone-DLlyRIE6.js → standalone-DpSRmAWx.js} +59 -59
- package/chunks/{standalone-BGkmozIb.js → standalone-DuwTOBXH.js} +256 -256
- package/chunks/{standalone-BDhPQtzQ.js → standalone-LFVgLhia.js} +234 -234
- package/chunks/{standalone-B55oyW6c.js → standalone-kzAhwH19.js} +149 -149
- package/chunks/{standalone-DN4S1MjT.js → standalone-mb7LwEiq.js} +885 -885
- package/chunks/{standalone-CJvIXsQE.js → standalone-r4ObFvys.js} +155 -155
- package/chunks/{table.compiler-DMeeHxb6.js → table.compiler-C1qjqXaT.js} +7 -7
- package/chunks/{typeof-CJDtcySz.js → typeof-DCq3QgvY.js} +6 -1
- package/chunks/useFieldName-mWrD_uk_.js +7 -0
- package/chunks/{utils-vdmi_2PK.js → utils-DYYD4Zzf.js} +7593 -12707
- package/chunks/{view-BuwQugKb.js → view-7fH6mGmY.js} +2034 -2070
- package/chunks/{visualization-filters-Cc4KU-l-.js → visualization-filters-mVnsnvLP.js} +3581 -3555
- package/chunks/with-html-element-B0Clt4jY.js +15901 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +1 -1
- package/docs/operations/combo.md +1 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +1 -1
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +1 -1
- package/docs/operations/heatMap.md +1 -1
- package/docs/operations/histogram.md +1 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +2 -2
- package/docs/operations/line.md +1 -1
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +1 -1
- package/docs/operations/radar.md +1 -1
- package/docs/operations/sankey.md +1 -1
- package/docs/operations/scatter.md +1 -1
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +66 -1
- package/docs/operations/tree.md +1 -1
- package/docs/operations/treemap.md +1 -1
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +1 -1
- package/getters.js +2 -2
- package/index.js +74 -68
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +67 -66
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +348 -348
- package/src/definitions/model/definitions/schema-registry.d.ts +101 -101
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +8 -8
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +29 -29
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +10 -10
- package/src/definitions/model/definitions/schemas/number.schema.d.ts +4 -4
- package/src/definitions/model/definitions/schemas/object.schema.d.ts +38 -38
- package/src/definitions/model/definitions/schemas/table.schema.d.ts +61 -61
- package/src/visualization-catalog.d.ts +26 -26
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +0 -257
- package/chunks/FieldTypeIcon-Drs6hSJF.js +0 -22
- package/chunks/LinearProgress-VtfFx2vJ.js +0 -253
- package/chunks/Title-CO5dP1ma.js +0 -1691
- package/chunks/ToggleButton-KOBAimC1.js +0 -112
- package/chunks/colorManipulator-D8Pjy1pf.js +0 -45
- package/chunks/responsive.styles-DSiOGD7u.js +0 -82
- package/chunks/standalone-BXKRE_Se.js +0 -468
- package/chunks/standalone-BjZp0QMe.js +0 -2
- package/chunks/standalone-C8qAelL4.js +0 -2
- package/chunks/standalone-DT0wKji7.js +0 -6
- package/chunks/standalone-DYQIQH4c.js +0 -2095
- package/chunks/useFieldName-Cjn9KCVp.js +0 -7
- package/chunks/useSlotProps-DLbQp4lc.js +0 -166
- package/chunks/with-html-element-D0uY2zjI.js +0 -7328
- /package/chunks/{src-BOS6SqkZ.js → src-BOS6SqkZ2.js} +0 -0
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import { $i as t, Ds as n,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { $i as t, Ds as n, Gn as r, Kt as i, Us as a, Xa as o, _c as s, fs as c, ws as l, zi as u, zr as d } from "./visualization-filters-mVnsnvLP.js";
|
|
3
|
+
import { N as f, Ot as p, ei as m, jr as h, s as g } from "./utils-DYYD4Zzf.js";
|
|
4
|
+
import { Pm as _, _m as v } from "./handlers-CMbyj5y1.js";
|
|
5
5
|
import { t as y } from "./label-format-type-weq1XfcX.js";
|
|
6
|
-
import "./logger-
|
|
7
|
-
import { Bt as b, Et as x, F as S, I as C, Kt as w, R as T, Yt as E,
|
|
8
|
-
import { _ as I } from "./MenuOption-
|
|
9
|
-
import { t as L } from "./coloring-
|
|
6
|
+
import "./logger-3lng-wOw.js";
|
|
7
|
+
import { Bt as b, Et as x, F as S, I as C, Kt as w, R as T, Yt as E, _n as D, at as O, cn as ee, ct as k, et as A, i as j, it as te, ln as ne, n as re, nt as ie, rn as ae, sn as M, st as oe, tt as se, xt as N, yt as P, z as F } from "./escobar-C4Nm3eJ7.js";
|
|
8
|
+
import { _ as I } from "./MenuOption-Cb7B7x6z.js";
|
|
9
|
+
import { t as L } from "./coloring-B-Wa8D5P.js";
|
|
10
10
|
import { t as R } from "./set-coloring-datafield-B3uIS1Pe.js";
|
|
11
|
-
var z = /* @__PURE__ */ e(
|
|
11
|
+
var z = /* @__PURE__ */ e(m()), B = (e, r, i) => {
|
|
12
12
|
let { coloring: o } = e || {}, s = o?.fieldId, c = e.dimensions.filter((e) => d(e)), l = e.measures.filter((e) => d(e)), u = l.filter((e) => e.role === t.PIE_CHART_SLICE), f = l.filter((e) => e.role === t.PIE_CHART_LENGTH);
|
|
13
|
-
s || (e.coloring?.type === n.Gradient ? s =
|
|
14
|
-
let p = x(R(e, s ?? null),
|
|
13
|
+
s || (e.coloring?.type === n.Gradient ? s = a(u[0]?.dataItem) : e.coloring?.type === n.Categorical && (s = a(c[0]?.dataItem))), P(i, 0, { color: { field: s } });
|
|
14
|
+
let p = x(R(e, s ?? null), r, {});
|
|
15
15
|
if (f.length > 0) {
|
|
16
|
-
let e =
|
|
16
|
+
let e = a(f[0]?.dataItem);
|
|
17
17
|
p[e] = { data: { field: e } };
|
|
18
18
|
}
|
|
19
19
|
return {
|
|
20
|
-
...
|
|
20
|
+
...i,
|
|
21
21
|
scales: p
|
|
22
22
|
};
|
|
23
23
|
}, V = /* @__PURE__ */ function(e) {
|
|
24
24
|
return e.num = "num", e.rad = "rad", e.group = "group", e;
|
|
25
|
-
}({}), H = (e, n,
|
|
26
|
-
if (!e.dimensions[0]) return
|
|
27
|
-
let
|
|
25
|
+
}({}), H = (e, n, r) => {
|
|
26
|
+
if (!e.dimensions[0]) return r;
|
|
27
|
+
let i = e.measures.filter((e) => d(e)), o = C((e.supportingMeasures ?? []).filter((e) => d(e))), s = e.dimensions.filter((e) => d(e))?.[0], c = i.filter((e) => e.role === t.PIE_CHART_SLICE)?.[0], l = i.filter((e) => e.role === t.PIE_CHART_LENGTH)?.[0], u = a(c?.dataItem), f = a(l?.dataItem), p = a(s?.dataItem), m = {
|
|
28
28
|
num: c?.dataItem?.name ? { field: u } : void 0,
|
|
29
29
|
rad: l?.dataItem?.name ? { field: f } : void 0,
|
|
30
30
|
...o
|
|
31
31
|
};
|
|
32
32
|
u && (m[u] = { field: u }), f && (m[f] = { field: f });
|
|
33
33
|
let h = [{
|
|
34
|
-
key:
|
|
34
|
+
key: M.Collection,
|
|
35
35
|
data: { extract: [{
|
|
36
36
|
field: p,
|
|
37
37
|
props: m
|
|
38
38
|
}] }
|
|
39
39
|
}];
|
|
40
40
|
return {
|
|
41
|
-
...
|
|
41
|
+
...r,
|
|
42
42
|
collections: h
|
|
43
43
|
};
|
|
44
|
-
}, U = "pie-alternates-switcher", W = "pie-alternates-switcher", G = (e) =>
|
|
45
|
-
let
|
|
44
|
+
}, U = "pie-alternates-switcher", W = "pie-alternates-switcher", G = (e) => i(e) || e.label || e.dataItem?.name || "Field", K = (e, t, n, r) => {
|
|
45
|
+
let i = n ? a(n.dataItem) : void 0;
|
|
46
46
|
return {
|
|
47
47
|
type: "native",
|
|
48
48
|
key: `${W}-interaction`,
|
|
49
|
-
events: { click(
|
|
50
|
-
let
|
|
51
|
-
x:
|
|
52
|
-
y:
|
|
49
|
+
events: { click(a) {
|
|
50
|
+
let o = this.element.getBoundingClientRect(), c = {
|
|
51
|
+
x: a.clientX - o.left,
|
|
52
|
+
y: a.clientY - o.top
|
|
53
53
|
}, l = this.chart.shapesAt(c, {
|
|
54
54
|
components: [{
|
|
55
55
|
key: W,
|
|
@@ -57,38 +57,38 @@ var z = /* @__PURE__ */ e(f()), B = (e, i, a) => {
|
|
|
57
57
|
}],
|
|
58
58
|
propagation: "stop"
|
|
59
59
|
}).find((e) => e.data?.target === "measure" || e.data?.target === "dimension");
|
|
60
|
-
if (l?.data?.target === "measure" && n &&
|
|
61
|
-
|
|
62
|
-
dataItemType:
|
|
60
|
+
if (l?.data?.target === "measure" && n && i) {
|
|
61
|
+
r(D.Text, "click", `text-${i}`, a, l, {
|
|
62
|
+
dataItemType: s.Measure,
|
|
63
63
|
dataItemRole: n.role
|
|
64
64
|
});
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
l?.data?.target === "dimension" && e &&
|
|
68
|
-
dataItemType:
|
|
67
|
+
l?.data?.target === "dimension" && e && r(D.Text, "click", `text-${e}`, a, l, {
|
|
68
|
+
dataItemType: s.Dimension,
|
|
69
69
|
dataItemRole: t
|
|
70
70
|
});
|
|
71
71
|
} }
|
|
72
72
|
};
|
|
73
|
-
}, ce = (e, n,
|
|
74
|
-
let m =
|
|
75
|
-
if (!x && !S) return
|
|
73
|
+
}, ce = (e, n, i, c, l, u, f, p) => {
|
|
74
|
+
let m = r(e.dimensions, e.enableAlternate, u?.isPrintMode), h = e.dimensions.filter((e) => d(e)), g = h[0], _ = g ? a(g.dataItem) : void 0, v = e.measures.filter((e) => e.role === t.PIE_CHART_SLICE), y = r(v, e.enableAlternate, u?.isPrintMode), b = v.filter((e) => d(e))[0], x = m && h.length ? h.map((e) => G(e)).join(", ") : void 0, S = y && b ? G(b) : void 0;
|
|
75
|
+
if (!x && !S) return i;
|
|
76
76
|
let C = {
|
|
77
77
|
type: U,
|
|
78
78
|
key: W,
|
|
79
|
-
dimensionDataItemType: _ ?
|
|
79
|
+
dimensionDataItemType: _ ? s.Dimension : void 0,
|
|
80
80
|
dimensionDataItemRole: g?.role,
|
|
81
|
-
measureDataItemType: b ?
|
|
81
|
+
measureDataItemType: b ? s.Measure : void 0,
|
|
82
82
|
measureDataItemRole: b?.role,
|
|
83
83
|
layout: {
|
|
84
|
-
dock:
|
|
84
|
+
dock: o.Bottom,
|
|
85
85
|
displayOrder: 0
|
|
86
86
|
},
|
|
87
87
|
settings: {
|
|
88
88
|
dimensionLabel: x ? w(x) : void 0,
|
|
89
89
|
measureLabel: S ? w(S) : void 0,
|
|
90
90
|
fontFamily: n.fonts.general.fontFamily ?? void 0,
|
|
91
|
-
fontSize: `${
|
|
91
|
+
fontSize: `${ee.fieldTitle.fontSize}px`,
|
|
92
92
|
color: n.fonts.general.color,
|
|
93
93
|
paddingLeft: 5,
|
|
94
94
|
paddingRight: 5,
|
|
@@ -97,9 +97,9 @@ var z = /* @__PURE__ */ e(f()), B = (e, i, a) => {
|
|
|
97
97
|
}
|
|
98
98
|
}, T = p ? [K(_, g?.role, b, p)] : [];
|
|
99
99
|
return {
|
|
100
|
-
...
|
|
101
|
-
components: [...
|
|
102
|
-
interactions:
|
|
100
|
+
...i,
|
|
101
|
+
components: [...i.components, C],
|
|
102
|
+
interactions: i.interactions ? [...i.interactions, ...T] : T
|
|
103
103
|
};
|
|
104
104
|
}, q = {
|
|
105
105
|
outerRadius: .8,
|
|
@@ -118,16 +118,16 @@ var z = /* @__PURE__ */ e(f()), B = (e, i, a) => {
|
|
|
118
118
|
function J(e) {
|
|
119
119
|
return e.pieSettings?.donut ?? !1;
|
|
120
120
|
}
|
|
121
|
-
var le = (e, n,
|
|
121
|
+
var le = (e, n, r, i, o, s) => {
|
|
122
122
|
let c = e.measures.filter((e) => d(e)), l = c.filter((e) => e.role === t.PIE_CHART_SLICE), u = c.filter((e) => e.role === t.PIE_CHART_LENGTH), f = l[0], p = u[0], m = new L(e, n, o?.[0]?.itemsNotAffectedByFiltering), h = J(e) ? q.donut.innerRadius : 0, g = f?.dataLabels?.show === !1 ? q.outerRadiusWithoutLabels : q.outerRadius, _ = e.pieSettings?.cornerRadius ?? (J(e) ? q.donut.cornerRadius : q.cornerRadius), v = e.pieSettings?.strokeEnabled ?? q.strokeEnabled, y = e.pieSettings?.strokeWidth ?? q.strokeWidth, b = e.pieSettings?.strokeColor ?? q.strokeColor;
|
|
123
123
|
if (p) {
|
|
124
124
|
let t = g, n = J(e) ? q.donut.multiMeasureMinRadius : q.multiMeasureMinRadius;
|
|
125
|
-
g = (e) => e.resources.scale(
|
|
125
|
+
g = (e) => e.resources.scale(a(p.dataItem))(e.datum.rad.value) * (t - n) + n;
|
|
126
126
|
}
|
|
127
127
|
let x = {
|
|
128
|
-
type:
|
|
129
|
-
key: `${
|
|
130
|
-
data: { collection:
|
|
128
|
+
type: D.Pie,
|
|
129
|
+
key: `${D.Pie}`,
|
|
130
|
+
data: { collection: M.Collection },
|
|
131
131
|
animations: {
|
|
132
132
|
enabled: !0,
|
|
133
133
|
presetId: "pie-chart"
|
|
@@ -144,11 +144,11 @@ var le = (e, n, i, a, o, s) => {
|
|
|
144
144
|
brush: E([""], s, { valuePickerMode: s?.valuePickerMode })
|
|
145
145
|
};
|
|
146
146
|
return {
|
|
147
|
-
...
|
|
148
|
-
components: [...
|
|
147
|
+
...r,
|
|
148
|
+
components: [...r.components, x]
|
|
149
149
|
};
|
|
150
150
|
}, ue = (e, t, n) => ({ data: r, formatter: i }) => {
|
|
151
|
-
let a = e.dimensions.filter((e) => d(e))[0], o = r.value, s = r[V.num].value, c = a.formatter && o && i ? i(a.formatter)(o) : `${o}`, l = t.formatter && s && i ? i(t.formatter)(s, void 0, r) : `${s}`, u = s != null && n && i ? i(
|
|
151
|
+
let a = e.dimensions.filter((e) => d(e))[0], o = r.value, s = r[V.num].value, c = a.formatter && o && i ? i(a.formatter)(o) : `${o}`, l = t.formatter && s && i ? i(t.formatter)(s, void 0, r) : `${s}`, u = s != null && n && i ? i(k)(s / n) : null, f = () => t.dataLabels?.measureLabelFormat === _.Percentage ? u === null ? [] : [u] : t.dataLabels?.measureLabelFormat === _.ValueAndPercentage ? u === null ? [l] : [l, u] : [l];
|
|
152
152
|
switch (t.dataLabels?.labelFormat) {
|
|
153
153
|
case y.Measure: {
|
|
154
154
|
let e = f();
|
|
@@ -161,7 +161,7 @@ var le = (e, n, i, a, o, s) => {
|
|
|
161
161
|
let s = e.dimensions.filter((e) => d(e)), c = e.measures.filter((e) => d(e)), l = s[0], u = c.find((e) => e.role === t.PIE_CHART_SLICE) ?? c[0];
|
|
162
162
|
if (!l || !u || !u.dataLabels?.show) return r;
|
|
163
163
|
let f = new I(n.fonts.general.color), p = u.dataLabels.showBackdrop ? T(u.dataLabels.backdropColor ? { fill: u.dataLabels.backdropColor } : void 0) : void 0, m = p ? F(f) : u.dataLabels.textColor || "#000", { strokeEnabled: h, strokeWidth: g = q.strokeWidth } = e.pieSettings, _ = h ? g / 2 : 0, v = {
|
|
164
|
-
type:
|
|
164
|
+
type: D.Labels,
|
|
165
165
|
key: "pie-labels",
|
|
166
166
|
animations: {
|
|
167
167
|
enabled: !0,
|
|
@@ -169,12 +169,12 @@ var le = (e, n, i, a, o, s) => {
|
|
|
169
169
|
},
|
|
170
170
|
layout: { displayOrder: b.Labels },
|
|
171
171
|
settings: { sources: [{
|
|
172
|
-
component: `${
|
|
173
|
-
selector:
|
|
172
|
+
component: `${D.Pie}`,
|
|
173
|
+
selector: ne.Path,
|
|
174
174
|
strategy: {
|
|
175
175
|
type: "slice",
|
|
176
176
|
settings: {
|
|
177
|
-
fontSize:
|
|
177
|
+
fontSize: ae(u.dataLabels.size),
|
|
178
178
|
fontFamily: n.fonts.general.fontFamily,
|
|
179
179
|
labels: [{
|
|
180
180
|
label: ue(e, u, a?.[0]?.sum),
|
|
@@ -195,34 +195,34 @@ var le = (e, n, i, a, o, s) => {
|
|
|
195
195
|
...r,
|
|
196
196
|
components: [...r.components, v]
|
|
197
197
|
};
|
|
198
|
-
}, Y = (e, t, n, r,
|
|
199
|
-
let
|
|
200
|
-
return !
|
|
201
|
-
label:
|
|
198
|
+
}, Y = (e, t, n, r, a) => {
|
|
199
|
+
let o = n.data[t]?.value, s = i(e) || e.label || e.dataItem.name || "", c = o;
|
|
200
|
+
return !a && e.formatter ? c = r.formatter(e.formatter)(o, void 0, n.data) : a && (c = r.formatter(oe(e.formatter))(o, void 0, n.data)), {
|
|
201
|
+
label: s,
|
|
202
202
|
value: c
|
|
203
203
|
};
|
|
204
204
|
}, fe = (e, n, r, i, a) => {
|
|
205
205
|
let o = !!e.measures.filter(d).filter((e) => e.role === t.PIE_CHART_LENGTH)?.[0], s = {
|
|
206
|
-
filter: (e) => e.filter((e) => e.key ===
|
|
206
|
+
filter: (e) => e.filter((e) => e.key === D.Pie),
|
|
207
207
|
placement: {
|
|
208
208
|
type: "slice",
|
|
209
209
|
area: "target"
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
|
-
if (o) return
|
|
213
|
-
let c =
|
|
214
|
-
return
|
|
212
|
+
if (o) return A(e, n, r, s, "tooltip", a);
|
|
213
|
+
let c = O(e, a), l = se(e, n, pe, ie, a?.[0]?.sum, c);
|
|
214
|
+
return A(e, n, r, {
|
|
215
215
|
...s,
|
|
216
216
|
extract: l
|
|
217
217
|
}, "tooltip", a);
|
|
218
|
-
}, pe = (e, t, n,
|
|
219
|
-
let l = [], u = e.filter(d), f = te(n), p = u.filter((e) => !f.has(
|
|
218
|
+
}, pe = (e, t, n, r, i, o, s, c) => {
|
|
219
|
+
let l = [], u = e.filter(d), f = te(n), p = u.filter((e) => !f.has(a(e.dataItem)))?.[0] ?? u?.[0], m = Object.keys(t.data).find((e) => t.data[e]?.source?.field === a(p?.dataItem));
|
|
220
220
|
if (!m || !p ? l.push({
|
|
221
221
|
label: "",
|
|
222
222
|
value: ""
|
|
223
|
-
}) : l.push(Y(p, m, t, n, c)), u.filter((e) => f.has(
|
|
224
|
-
let
|
|
225
|
-
|
|
223
|
+
}) : l.push(Y(p, m, t, n, c)), u.filter((e) => f.has(a(e.dataItem))).forEach((e) => {
|
|
224
|
+
let r = a(e.dataItem), i = Object.keys(t.data).find((e) => t.data[e]?.source?.field === r);
|
|
225
|
+
i && l.push(Y(e, i, t, n, c));
|
|
226
226
|
}), s) return l;
|
|
227
227
|
let h = Object.values(o ?? {}).reduce((e, t) => e + Number(t), 0);
|
|
228
228
|
return l.push({
|
|
@@ -331,22 +331,22 @@ function $(e) {
|
|
|
331
331
|
e.component(U, ge);
|
|
332
332
|
}
|
|
333
333
|
var _e = (e, n) => {
|
|
334
|
-
let
|
|
335
|
-
if (!
|
|
336
|
-
let
|
|
337
|
-
return n.reduce((e, t) => e + t[
|
|
338
|
-
}, ve =
|
|
339
|
-
let a =
|
|
340
|
-
if (!e || !
|
|
341
|
-
let
|
|
334
|
+
let r = e.find((e) => e.role === t.PIE_CHART_SLICE && d(e));
|
|
335
|
+
if (!r) return;
|
|
336
|
+
let i = a(r.dataItem);
|
|
337
|
+
return n.reduce((e, t) => e + t[i], 0);
|
|
338
|
+
}, ve = h(), ye = p(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
|
|
339
|
+
let a = f(), [o] = (0, z.useState)(() => new me()), { activeKey: s } = g(), d = re();
|
|
340
|
+
if (!e || !c(e) || !n || !r) return null;
|
|
341
|
+
let p = {
|
|
342
342
|
...i,
|
|
343
|
-
valuePickerMode: !!
|
|
343
|
+
valuePickerMode: !!s
|
|
344
344
|
}, m = t || u;
|
|
345
345
|
n[0] && (n[0].sum = _e(e.measures, n[0].items));
|
|
346
|
-
let
|
|
347
|
-
return
|
|
348
|
-
config:
|
|
349
|
-
definition:
|
|
346
|
+
let h = o.compile(e, m, n, r, p, l.Pie, a, void 0, d);
|
|
347
|
+
return h ? /* @__PURE__ */ (0, ve.jsx)(j, {
|
|
348
|
+
config: p,
|
|
349
|
+
definition: h,
|
|
350
350
|
size: r,
|
|
351
351
|
vSpec: e,
|
|
352
352
|
escobarPlugins: [$]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import { Hi as t, Ji as n, ss as r } from "./visualization-filters-
|
|
3
|
-
import {
|
|
4
|
-
import { l as m } from "./logger-
|
|
2
|
+
import { Hi as t, Ji as n, ss as r } from "./visualization-filters-mVnsnvLP.js";
|
|
3
|
+
import { $r as i, Jt as a, Ot as o, Qn as s, W as c, ei as l, f as u, in as d, jr as f, o as p } from "./utils-DYYD4Zzf.js";
|
|
4
|
+
import { l as m } from "./logger-3lng-wOw.js";
|
|
5
5
|
var h = /* @__PURE__ */ function(e) {
|
|
6
6
|
return e.OpenMediaPicker = "OPEN_MEDIA_PICKER", e.OpenMediaPickerResult = "OPEN_MEDIA_PICKER_RESULT", e.OPEN_TOP_BAR = "OPEN_TOP_BAR", e.OPEN_CREATE_BOOKMARK_WINDOW = "OPEN_CREATE_BOOKMARK_WINDOW", e;
|
|
7
|
-
}({}), g = /* @__PURE__ */ e(
|
|
7
|
+
}({}), g = /* @__PURE__ */ e(l());
|
|
8
8
|
g.forwardRef(function(e, t) {
|
|
9
9
|
return g.createElement("img", {
|
|
10
10
|
...e,
|
|
@@ -19,7 +19,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
19
19
|
saturation: t?.imageSettings.saturation ?? 1,
|
|
20
20
|
blur: t?.imageSettings.blur ?? 0,
|
|
21
21
|
shadow: t?.imageSettings.shadow ?? !1
|
|
22
|
-
}), b =
|
|
22
|
+
}), b = c({
|
|
23
23
|
singleImageContainer: {
|
|
24
24
|
display: "flex",
|
|
25
25
|
height: "100%",
|
|
@@ -37,7 +37,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
addGalleryButton: {
|
|
40
|
-
...
|
|
40
|
+
...i.normal14,
|
|
41
41
|
padding: "10px 20px",
|
|
42
42
|
background: t.white,
|
|
43
43
|
borderRadius: 4,
|
|
@@ -49,7 +49,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
49
49
|
alignItems: "center"
|
|
50
50
|
},
|
|
51
51
|
buttonIcon: { marginRight: 5 }
|
|
52
|
-
}), x =
|
|
52
|
+
}), x = c({
|
|
53
53
|
mainContainer: {
|
|
54
54
|
display: "flex",
|
|
55
55
|
flexDirection: "column",
|
|
@@ -77,43 +77,43 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
77
77
|
"&.fill": { objectFit: "fill" },
|
|
78
78
|
"&.none": { objectFit: "none" }
|
|
79
79
|
}
|
|
80
|
-
}), S = f(), C = (e) =>
|
|
80
|
+
}), S = f(), C = (e) => d({
|
|
81
81
|
contain: e === n.Contain,
|
|
82
82
|
cover: e === n.Cover,
|
|
83
83
|
fill: e === n.Fill,
|
|
84
84
|
none: e === n.None
|
|
85
|
-
}), w = ({ imageSrc: e, imageFit: t, opacity: n, saturation: r, blur:
|
|
86
|
-
let
|
|
85
|
+
}), w = ({ imageSrc: e, imageFit: t, opacity: n, saturation: r, blur: i, shadow: a, onLoadCallback: o }) => {
|
|
86
|
+
let s = x(), c = a ? "drop-shadow(0px 3px 6px rgba(0,0,0,0.25))" : "";
|
|
87
87
|
return /* @__PURE__ */ (0, S.jsx)("div", {
|
|
88
|
-
className:
|
|
88
|
+
className: s.mainContainer,
|
|
89
89
|
children: /* @__PURE__ */ (0, S.jsx)("div", {
|
|
90
|
-
className:
|
|
90
|
+
className: s.imageContainer,
|
|
91
91
|
children: /* @__PURE__ */ (0, S.jsx)("img", {
|
|
92
|
-
className:
|
|
93
|
-
[
|
|
92
|
+
className: d({
|
|
93
|
+
[s.image]: !0,
|
|
94
94
|
[C(t)]: !0
|
|
95
95
|
}),
|
|
96
96
|
style: {
|
|
97
|
-
filter: `blur(${
|
|
97
|
+
filter: `blur(${i}px) saturate(${r}) ${c}`,
|
|
98
98
|
opacity: n
|
|
99
99
|
},
|
|
100
100
|
alt: "",
|
|
101
101
|
title: e.trim() ? "" : "Add Image",
|
|
102
102
|
src: e.trim() || "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20viewBox%3D%220%200%20177%20177%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Cpath%20d%3D%22M177%2041.2427V164.357C177%20167.71%20175.668%20170.926%20173.297%20173.297C170.926%20175.668%20167.71%20177%20164.357%20177H12.6429C9.28976%20177%206.074%20175.668%203.70301%20173.297C1.33201%20170.926%200%20167.71%200%20164.357V12.6429C0%209.28976%201.33201%206.074%203.70301%203.70301C6.074%201.33201%209.28976%200%2012.6429%200L135.757%200C139.11%200%20152.289%2016.5319%20154.66%2018.9029C157.031%2021.2739%20177%2037.8896%20177%2041.2427Z%22%20fill%3D%22%23F2F2F2%22%2F%3E%0A%20%20%3Cmask%20id%3D%22mask0%22%20mask-type%3D%22alpha%22%20maskUnits%3D%22userSpaceOnUse%22%20x%3D%2225%22%20y%3D%2225%22%20width%3D%22127%22%20height%3D%22127%22%3E%0A%20%20%20%20%3Crect%20x%3D%2225.2857%22%20y%3D%2225.2857%22%20width%3D%22126.429%22%20height%3D%22126.429%22%20fill%3D%22%23F2F2F2%22%2F%3E%0A%20%20%3C%2Fmask%3E%0A%20%20%3Cg%20mask%3D%22url(%23mask0)%22%3E%0A%20%20%20%20%3Cpath%20d%3D%22M135.703%20147.315L126.644%20123.059L90.9439%2027.4276C90.4703%2026.1541%2089.227%2025.2857%2087.8653%2025.2857C86.4444%2025.2857%2085.201%2026.0962%2084.7274%2027.3118L61.2231%2083.9847L44.3497%2069.7441C43.3432%2068.8758%2041.8631%2068.7021%2040.679%2069.281C39.4949%2069.8599%2038.7252%2071.0756%2038.8436%2072.407L42.3367%20130.469C42.3959%20131.685%2043.1656%20132.727%2044.2905%20133.248C45.4154%20133.769%2046.7179%20133.595%2047.7244%20132.901L80.287%20108.645L130.493%20150.904C131.144%20151.425%20131.914%20151.714%20132.683%20151.714C133.335%20151.714%20133.986%20151.541%20134.578%20151.135C135.703%20150.267%20136.236%20148.704%20135.703%20147.315ZM58.5589%2090.4103L48.0796%20115.65L45.9482%2079.8167L58.5589%2090.4103ZM53.2896%20120.454L63.8873%2094.9257L75.0178%20104.304L53.2896%20120.454ZM66.5515%2088.5L87.6284%2037.616L104.324%2082.3638L80.4055%20100.136L66.5515%2088.5ZM85.6155%20104.593L106.752%2088.8474L120.369%20125.259L125.046%20137.763L85.6155%20104.593Z%22%20fill%3D%22%23BDBDBD%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M137.419%200H135.757V28.5999C135.757%2031.953%20137.089%2035.1687%20139.46%2037.5397C141.831%2039.9107%20145.047%2041.2427%20148.4%2041.2427H177V39.581L137.419%200Z%22%20fill%3D%22%23E0E0E0%22%2F%3E%0A%3C%2Fsvg%3E%0A",
|
|
103
|
-
onLoad:
|
|
104
|
-
onError:
|
|
103
|
+
onLoad: o,
|
|
104
|
+
onError: o
|
|
105
105
|
})
|
|
106
106
|
})
|
|
107
107
|
});
|
|
108
|
-
}, T =
|
|
109
|
-
let n =
|
|
108
|
+
}, T = o(({ vSpec: e }) => {
|
|
109
|
+
let n = a(), i = b(), { variablesDict: o } = p(), c = e && r(e) ? y(n, e, o) : null, l = u();
|
|
110
110
|
return (0, g.useEffect)(() => {
|
|
111
|
-
!
|
|
112
|
-
}, [e,
|
|
111
|
+
!c?.imageSrc && n.daedalus.objectCapabilities.editable && l();
|
|
112
|
+
}, [e, c?.imageSrc]), c?.imageSrc ? /* @__PURE__ */ (0, S.jsx)("div", {
|
|
113
113
|
className: i.singleImageContainer,
|
|
114
114
|
children: /* @__PURE__ */ (0, S.jsx)(w, {
|
|
115
|
-
...
|
|
116
|
-
onLoadCallback:
|
|
115
|
+
...c,
|
|
116
|
+
onLoadCallback: l
|
|
117
117
|
})
|
|
118
118
|
}) : n.daedalus.objectCapabilities.editable ? /* @__PURE__ */ (0, S.jsx)("div", {
|
|
119
119
|
className: i.previewImageContainer,
|
|
@@ -123,7 +123,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
123
123
|
onClick: () => {
|
|
124
124
|
n.emitEvent(m.SET_PROPERTY_PANEL_OBJECT_TAB, "ITEM"), n.emitEvent(h.OpenMediaPicker);
|
|
125
125
|
},
|
|
126
|
-
children: [/* @__PURE__ */ (0, S.jsx)(
|
|
126
|
+
children: [/* @__PURE__ */ (0, S.jsx)(s, {
|
|
127
127
|
fill: t.mainDarkNavy,
|
|
128
128
|
size: 16,
|
|
129
129
|
className: i.buttonIcon
|
|
@@ -134,8 +134,8 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
134
134
|
children: /* @__PURE__ */ (0, S.jsx)("img", {
|
|
135
135
|
src: _,
|
|
136
136
|
alt: "no image",
|
|
137
|
-
onLoad:
|
|
138
|
-
onError:
|
|
137
|
+
onLoad: l,
|
|
138
|
+
onError: l
|
|
139
139
|
})
|
|
140
140
|
});
|
|
141
141
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import { Fi as n, Hi as r, Ii as i, Ni as a, Pi as o, Qr as s, Ra as c, bs as l,
|
|
3
|
-
import {
|
|
4
|
-
import { gt as k } from "./handlers-
|
|
2
|
+
import { Fi as n, Hi as r, Ii as i, Ni as a, Pi as o, Qr as s, Ra as c, bs as l, ia as u, na as d, nr as f, ra as p, uo as m, wo as h, za as g, zi as _ } from "./visualization-filters-mVnsnvLP.js";
|
|
3
|
+
import { Jt as v, Ot as y, W as b, dn as x, ei as S, f as C, in as w, jr as T, o as E, pn as D, z as O } from "./utils-DYYD4Zzf.js";
|
|
4
|
+
import { gt as k } from "./handlers-CMbyj5y1.js";
|
|
5
5
|
import { n as A, t as j } from "./url-utils-B17gj_mr.js";
|
|
6
|
-
import { t as M } from "./Title-
|
|
7
|
-
var N = /* @__PURE__ */ e(
|
|
6
|
+
import { t as M } from "./Title-CtFw1bVg.js";
|
|
7
|
+
var N = /* @__PURE__ */ e(S()), P = (e, t) => {
|
|
8
8
|
let r = e?.simpleTextObjectSettings || {}, i = r.fontFamily ?? s.fontFamily, a = r.textColor ?? s.textColor, c = t ? n(t, i) : i, l = t ? o(t, a) : a, { borderEnabled: u = s.borderEnabled, borderRadius: d = s.borderRadius, borderWidth: f = s.borderWidth } = r;
|
|
9
9
|
return {
|
|
10
10
|
textContentType: r.textContentType ?? p.Text,
|
|
@@ -51,7 +51,7 @@ var N = /* @__PURE__ */ e(y()), P = (e, t) => {
|
|
|
51
51
|
}, F = 8, I = (e, t, n) => {
|
|
52
52
|
let r = t.fontSize ?? s.fontSize, i = t.letterSpacing ?? s.letterSpacing;
|
|
53
53
|
if (n.width === 0) return r;
|
|
54
|
-
let a =
|
|
54
|
+
let a = D(), o = 0, c = 0, l = r;
|
|
55
55
|
for (; c <= l;) {
|
|
56
56
|
let r = Math.floor((c + l) / 2), { width: s, height: u } = a.getTextSize({
|
|
57
57
|
size: r,
|
|
@@ -73,7 +73,7 @@ var N = /* @__PURE__ */ e(y()), P = (e, t) => {
|
|
|
73
73
|
}, te = {
|
|
74
74
|
width: 1920,
|
|
75
75
|
height: 1080
|
|
76
|
-
}, z = (e) => e / 1920 * 100, B = (e) => e / te.height * 100, V =
|
|
76
|
+
}, z = (e) => e / 1920 * 100, B = (e) => e / te.height * 100, V = T(), ne = b({
|
|
77
77
|
wrapper: {
|
|
78
78
|
height: "100%",
|
|
79
79
|
position: "relative",
|
|
@@ -149,14 +149,14 @@ var N = /* @__PURE__ */ e(y()), P = (e, t) => {
|
|
|
149
149
|
};
|
|
150
150
|
return /* @__PURE__ */ (0, V.jsx)("div", {
|
|
151
151
|
ref: l,
|
|
152
|
-
className:
|
|
152
|
+
className: w({
|
|
153
153
|
[h.wrapper]: !0,
|
|
154
154
|
[h.changed]: p,
|
|
155
155
|
"ast-advanced-text-editor": !1
|
|
156
156
|
}),
|
|
157
157
|
onClick: g
|
|
158
158
|
});
|
|
159
|
-
}, H =
|
|
159
|
+
}, H = b({
|
|
160
160
|
mainContainer: {
|
|
161
161
|
width: "100%",
|
|
162
162
|
height: "100%",
|
|
@@ -414,7 +414,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
414
414
|
ſ: "s"
|
|
415
415
|
});
|
|
416
416
|
})), Y = /* @__PURE__ */ t(((e, t) => {
|
|
417
|
-
var n = J(), r =
|
|
417
|
+
var n = J(), r = f(), i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, a = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
|
|
418
418
|
function o(e) {
|
|
419
419
|
return e = r(e), e && e.replace(i, n).replace(a, "");
|
|
420
420
|
}
|
|
@@ -463,7 +463,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
463
463
|
}
|
|
464
464
|
t.exports = R;
|
|
465
465
|
})), se = /* @__PURE__ */ t(((e, t) => {
|
|
466
|
-
var n = ie(), r = ae(), i =
|
|
466
|
+
var n = ie(), r = ae(), i = f(), a = oe();
|
|
467
467
|
function o(e, t, o) {
|
|
468
468
|
return e = i(e), t = o ? void 0 : t, t === void 0 ? r(e) ? a(e) : n(e) : e.match(t) || [];
|
|
469
469
|
}
|
|
@@ -492,7 +492,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
492
492
|
textDecoration: i,
|
|
493
493
|
letterSpacing: `${e.letterSpacing}px`,
|
|
494
494
|
lineHeight: e.lineSpacing,
|
|
495
|
-
whiteSpace: e.responsive || [
|
|
495
|
+
whiteSpace: e.responsive || [u.HTML, u.Markdown].includes(e.representation ?? s.representation) ? e.wordWrap ? "pre-line" : "nowrap" : "pre-line",
|
|
496
496
|
marginTop: e.position === h.Top ? "unset" : "auto",
|
|
497
497
|
marginBottom: e.position === h.Bottom ? "unset" : "auto",
|
|
498
498
|
textShadow: e.textShadow ? `0px 1px 2px ${r.black}` : "none",
|
|
@@ -507,7 +507,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
507
507
|
}, X = (e) => {
|
|
508
508
|
let t = e.borderStyle === m.Line ? "solid" : "dashed";
|
|
509
509
|
return {
|
|
510
|
-
backgroundColor: (e.backgroundType ===
|
|
510
|
+
backgroundColor: (e.backgroundType === d.Image ? null : e.backgroundColor) ?? "transparent",
|
|
511
511
|
border: `${e.borderWidth}px ${t} ${e.borderColor}`,
|
|
512
512
|
borderRadius: `${e.borderRadius}px`,
|
|
513
513
|
backdropFilter: `blur(${e.backgroundBlur}px)`,
|
|
@@ -548,7 +548,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
548
548
|
${pe(e)}
|
|
549
549
|
}
|
|
550
550
|
.astrato-html-container p {
|
|
551
|
-
margin: ${t.representation ===
|
|
551
|
+
margin: ${t.representation === u.Markdown ? `${t.paragraphMargin}px` : 0};
|
|
552
552
|
}
|
|
553
553
|
.astrato-html-container li {
|
|
554
554
|
white-space: normal;
|
|
@@ -556,22 +556,22 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
556
556
|
let { textContent: r, variableId: i, textContentType: a = p.Text } = e;
|
|
557
557
|
return [p.Text, p.Delta].includes(a) ? r || n : i ? `${t[i]?.value ?? ""}` : n;
|
|
558
558
|
}, _e = (e) => e.replace(/(\r\n|\n|\r)/g, " "), $ = ({ textObjectSettings: e, scaling: t, elementSize: n }) => {
|
|
559
|
-
let r = H(), i =
|
|
560
|
-
t === g.FitToObject && n ? p = ee(
|
|
561
|
-
let m = i?.daedalus.objectCapabilities.editable, h = e.backgroundType ===
|
|
562
|
-
...
|
|
563
|
-
...
|
|
559
|
+
let r = H(), i = v(), a = C(), { variablesDict: o } = E(), [c, l] = (0, N.useState)(""), f = ge(e, o, ""), p = e.fontSize ?? s.fontSize;
|
|
560
|
+
t === g.FitToObject && n ? p = ee(f, e, n) : t === g.ViewportWidth && (p = z(p));
|
|
561
|
+
let m = i?.daedalus.objectCapabilities.editable, h = e.backgroundType === d.Image, _ = [u.HTML, u.Markdown].includes(e.representation ?? s.representation), y = ue(e, p, R(t)), b = X(e), S = Z(e), w = fe(e), T = {
|
|
562
|
+
...S,
|
|
563
|
+
...y,
|
|
564
564
|
fontSize: `${e.fontSize}px`
|
|
565
565
|
};
|
|
566
|
-
delete
|
|
566
|
+
delete T.paddingBottom, delete T.paddingTop, delete T.display, (0, N.useEffect)(() => {
|
|
567
567
|
let t = async () => {
|
|
568
|
-
e.representation ===
|
|
568
|
+
e.representation === u.Markdown ? l(await A(f)) : l(f);
|
|
569
569
|
};
|
|
570
570
|
(async () => {
|
|
571
571
|
await t(), !h && !_ && a();
|
|
572
572
|
})();
|
|
573
573
|
}, [
|
|
574
|
-
|
|
574
|
+
f,
|
|
575
575
|
e.representation,
|
|
576
576
|
h,
|
|
577
577
|
_,
|
|
@@ -582,29 +582,29 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
582
582
|
title: O ? k : null,
|
|
583
583
|
children: /* @__PURE__ */ (0, V.jsxs)("div", {
|
|
584
584
|
className: r.mainContainer,
|
|
585
|
-
style:
|
|
585
|
+
style: b,
|
|
586
586
|
"data-testid": "simple-text-object-container",
|
|
587
587
|
children: [
|
|
588
|
-
_ ? /* @__PURE__ */ (0, V.jsx)(
|
|
588
|
+
_ ? /* @__PURE__ */ (0, V.jsx)(x, {
|
|
589
589
|
html: he(k),
|
|
590
|
-
css: me(
|
|
590
|
+
css: me(T, e),
|
|
591
591
|
style: Q,
|
|
592
592
|
onRendered: a
|
|
593
593
|
}) : null,
|
|
594
594
|
h ? /* @__PURE__ */ (0, V.jsx)("img", {
|
|
595
595
|
src: e.backgroundImage,
|
|
596
596
|
className: r.image,
|
|
597
|
-
style:
|
|
597
|
+
style: w,
|
|
598
598
|
onLoad: () => a(),
|
|
599
599
|
onError: () => a(),
|
|
600
600
|
alt: "text background"
|
|
601
601
|
}) : null,
|
|
602
602
|
m || !_ ? /* @__PURE__ */ (0, V.jsx)(V.Fragment, { children: /* @__PURE__ */ (0, V.jsx)("div", {
|
|
603
603
|
className: r.textContainer,
|
|
604
|
-
style:
|
|
604
|
+
style: S,
|
|
605
605
|
children: e.linkEnabled && D ? /* @__PURE__ */ (0, V.jsx)("div", {
|
|
606
606
|
className: r.spanElement,
|
|
607
|
-
style:
|
|
607
|
+
style: y,
|
|
608
608
|
"data-ellipsis": !0,
|
|
609
609
|
"data-testid": "simple-text-object-content",
|
|
610
610
|
children: /* @__PURE__ */ (0, V.jsx)("a", {
|
|
@@ -620,7 +620,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
620
620
|
}) : /* @__PURE__ */ (0, V.jsx)("div", {
|
|
621
621
|
className: r.spanElement,
|
|
622
622
|
style: {
|
|
623
|
-
...
|
|
623
|
+
...y,
|
|
624
624
|
pointerEvents: "none"
|
|
625
625
|
},
|
|
626
626
|
"data-ellipsis": !0,
|
|
@@ -631,8 +631,8 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
631
631
|
]
|
|
632
632
|
})
|
|
633
633
|
});
|
|
634
|
-
}, ve =
|
|
635
|
-
let n =
|
|
634
|
+
}, ve = y($), ye = ({ textObjectSettings: e, isRichTextScalingSet: t }) => {
|
|
635
|
+
let n = v(), r = O(), i = X(e), a = Z(e), o = H(), s = C(), l = e.richTextScaling ?? c.ViewportBreakpoints, u = de(e, l, t);
|
|
636
636
|
return (0, N.useEffect)(() => {
|
|
637
637
|
s();
|
|
638
638
|
}, [s]), /* @__PURE__ */ (0, V.jsx)("div", {
|