@astrato-io/visualizations 0.6.4 → 0.6.5
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/CHANGELOG.md +0 -0
- package/THIRD_PARTY_NOTICES.md +94 -4
- package/chunks/ClickAwayListener-BbeNMAvj.js +52 -0
- package/chunks/{LinearProgress-CUZ0D8_t.js → LinearProgress-B1FeWaen.js} +54 -54
- package/chunks/app-filter-bar.compiler-BGJ7HAbr.js +64 -0
- package/chunks/bar.compiler-CT0ZbQKc.js +374 -0
- package/chunks/{src-Cum_2NLV.js → builder-B6dWSIdD.js} +5779 -5635
- package/chunks/{coloring-C16AUZEi.js → coloring-B1XAfg6b.js} +234 -233
- package/chunks/{src-BC7cGcJ-.js → definitions-D3OVqmXl.js} +438 -360
- package/chunks/{escobar-BGqT1EsE.js → escobar-eDjtGpkC.js} +4645 -4619
- package/chunks/filter.compiler-DBsyRBJt.js +70 -0
- package/chunks/{filtering-Yq4DEa0t.js → filtering-tqjAyJH5.js} +432 -313
- package/chunks/{grouping-type-BX_9Ix5q.js → grouping-type-On4s9Thj.js} +1 -1
- package/chunks/handlers-VTBfIZYZ.js +13072 -0
- package/chunks/isEqual-BDxAhUo8.js +7514 -0
- package/chunks/line.compiler-CzdM5Ld0.js +198 -0
- package/chunks/{metadata-CPXdYoln.js → metadata-BGElBy5Z.js} +1 -1
- package/chunks/number.compiler-G-R7y16P.js +53 -0
- package/chunks/{src-C0LgoUWY.js → operations-CTNUX6Sy.js} +9576 -9432
- package/chunks/{range-DrzdfBX4.js → range-CiwTbMig.js} +2 -2
- package/chunks/{registry-CExpGJ1N.js → registry-CsQQzukD.js} +153 -153
- package/chunks/{requirements-DNhuShLS.js → requirements-DYjZCFyf.js} +1 -1
- package/chunks/{shared-CKDL4hx9.js → shared-CBvcC5YV.js} +460 -413
- package/chunks/{standalone-D5vnf-9y.js → standalone-0M4HlmDW2.js} +823 -822
- package/chunks/standalone-0ashe9w1.js +411 -0
- package/chunks/{standalone-C85u7U6I.js → standalone-B7jax8wa.js} +93 -94
- package/chunks/standalone-BK0VYU-l.js +463 -0
- package/chunks/{standalone-BDCwI6Hn.js → standalone-BMIbT1b2.js} +815 -815
- package/chunks/standalone-BZV5vOwA.js +6 -0
- package/chunks/standalone-BhDrWj4p.js +1980 -0
- package/chunks/{standalone-CNyNHKVx.js → standalone-BtSHCp2U2.js} +97 -98
- package/chunks/{standalone-CDQnr6qT.js → standalone-BvaKdky9.js} +95 -96
- package/chunks/standalone-BwtM31-f.js +2 -0
- package/chunks/{standalone-CY57qwZ-.js → standalone-C3gg736V.js} +153 -153
- package/chunks/{standalone-DFPva_ku.js → standalone-CC1VUjO32.js} +60 -60
- package/chunks/{standalone-CCNtaJ7s.js → standalone-C_rYnZ0N.js} +41 -41
- package/chunks/{standalone-CZynjFG7.js → standalone-CoLrAxRV.js} +3701 -3482
- package/chunks/{standalone-jiz0L2Dg.js → standalone-DC-aUgXC.js} +104 -104
- package/chunks/standalone-DCtRoTWg.js +675 -0
- package/chunks/standalone-DUDFTBqL.js +833 -0
- package/chunks/standalone-DhZkX9Td.js +2 -0
- package/chunks/{standalone-Dx3MLlrO.js → standalone-DtLElfuM.js} +141 -141
- package/chunks/{standalone-BmfMt74U.js → standalone-G9Q4Uczu.js} +192 -192
- package/chunks/{standalone-BH5NqDwp.js → standalone-JuLF-OoH.js} +390 -391
- package/chunks/standalone-_DeX21JJ.js +383 -0
- package/chunks/{standalone-lBm9hQ-q.js → standalone-gFhKZh8m.js} +34 -34
- package/chunks/standalone-tDNy-SFH.js +281 -0
- package/chunks/{standalone-rJ45Zfl1.js → standalone-v1oxfU20.js} +10 -10
- package/chunks/{standalone-BYm1UjLr.js → standalone-vzBY6q0I2.js} +18 -18
- package/chunks/table.compiler-tb914oj3.js +222 -0
- package/chunks/{ui-D1HQNIBy.js → ui-DQWtv2iM.js} +13485 -3973
- package/chunks/{useFieldName-oqQ3bvnO.js → useFieldName-BvdcoJRl.js} +1 -1
- package/chunks/{utils-Ba9T0TqC.js → utils-Bg7K-t6K.js} +7306 -6024
- package/chunks/{src-DvX5LU9T.js → view-Bn83C8d9.js} +2555 -4831
- package/definitions.js +3 -3
- package/docs/operations/astrato-app-filter-bar.md +17 -17
- package/docs/operations/bar.md +989 -1071
- package/docs/operations/combo.md +717 -738
- package/docs/operations/date-picker.md +25 -25
- package/docs/operations/distribution-gauge.md +471 -607
- package/docs/operations/dot.md +787 -879
- package/docs/operations/filter.md +139 -163
- package/docs/operations/gauge.md +491 -627
- package/docs/operations/heatMap.md +834 -916
- package/docs/operations/histogram.md +166 -180
- package/docs/operations/iframe.md +5 -5
- package/docs/operations/image.md +16 -16
- package/docs/operations/index.md +12 -12
- package/docs/operations/line.md +811 -888
- package/docs/operations/number.md +470 -536
- package/docs/operations/pie.md +825 -958
- package/docs/operations/radar.md +599 -679
- package/docs/operations/sankey.md +462 -584
- package/docs/operations/scatter.md +823 -929
- package/docs/operations/shape.md +34 -34
- package/docs/operations/simpleTextObject.md +18 -25
- package/docs/operations/slider.md +33 -43
- package/docs/operations/table.md +1160 -1150
- package/docs/operations/tree.md +354 -361
- package/docs/operations/treemap.md +545 -637
- package/docs/operations/waterfall.md +369 -379
- package/docs/operations/word-cloud.md +512 -583
- package/getters.js +3 -3
- package/index.js +51 -51
- package/metadata.js +3 -3
- package/operations.js +7 -7
- package/package.json +80 -86
- package/src/definitions/index.d.ts +2 -2
- package/src/definitions/{shared/lib → model/definitions}/available-fields.d.ts +0 -1
- package/src/definitions/{shared/lib/compilers/index.d.ts → model/definitions/compilers/compile.d.ts} +1 -1
- package/src/definitions/model/definitions/data-item-resolution.d.ts +19 -0
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1341 -0
- package/src/definitions/model/definitions/descriptors/json-schema.d.ts +2 -0
- package/src/definitions/model/definitions/diagnostics.d.ts +5 -0
- package/src/definitions/model/definitions/field-suggestions.d.ts +2 -0
- package/src/definitions/model/definitions/index.d.ts +23 -0
- package/src/definitions/{shared/lib → model/definitions}/registry/compile.d.ts +1 -1
- package/src/definitions/model/definitions/registry/descriptor-registry.d.ts +3 -0
- package/src/definitions/model/definitions/schema-registry.d.ts +660 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/broad-chart.schema.d.ts +1 -1
- package/src/definitions/{shared/lib → model/definitions}/schemas/common.schema.d.ts +0 -1
- package/src/definitions/model/definitions/schemas/index.d.ts +9 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/object.schema.d.ts +6 -6
- package/src/definitions/{shared/lib → model/definitions}/types/definition.types.d.ts +1 -1
- package/src/definitions/model/definitions/types/index.d.ts +3 -0
- package/src/definitions/{shared/lib/registry → model/definitions}/validation.d.ts +1 -1
- package/chunks/Radio-Ciu-F4CU.js +0 -957
- package/chunks/ToggleButton-BCJc3Jlc.js +0 -153
- package/chunks/_baseFlatten-DPXPOrea.js +0 -7076
- package/chunks/app-filter-bar.compiler-j_CVoWTa.js +0 -55
- package/chunks/bar.compiler-oqaPzIut.js +0 -370
- package/chunks/data-item-resolution-1lvYB5ln.js +0 -53
- package/chunks/event-bus-KiSiCJrC.js +0 -2683
- package/chunks/filter.compiler-CuLtc_02.js +0 -60
- package/chunks/gauge-target-type-BkKXAqkX.js +0 -4
- package/chunks/interfaces-VUY4_yVO.js +0 -8742
- package/chunks/line-settings-DfYTUyPz.js +0 -4
- package/chunks/line.compiler-BpA_6Tc7.js +0 -188
- package/chunks/number.compiler-DbkWcG4S.js +0 -44
- package/chunks/pie-uv42Eqal.js +0 -10
- package/chunks/src-Dun_jXtz.js +0 -10295
- package/chunks/standalone-87YV_m9n.js +0 -687
- package/chunks/standalone-BLVAWLNJ.js +0 -385
- package/chunks/standalone-BPomtAVs.js +0 -2
- package/chunks/standalone-BXyBcUOQ.js +0 -2
- package/chunks/standalone-BllF4rDp.js +0 -383
- package/chunks/standalone-BqWyrnZI.js +0 -281
- package/chunks/standalone-DQxxNwF8.js +0 -675
- package/chunks/standalone-DS9T0FZ-.js +0 -830
- package/chunks/standalone-DzixzZAL.js +0 -411
- package/chunks/standalone-QJ1kKMnO.js +0 -6
- package/chunks/table.compiler-BrXkm4Fz.js +0 -213
- package/chunks/toInteger-DVZr-D1j.js +0 -11
- package/chunks/treemap-x_zmJoG7.js +0 -23
- package/chunks/types-dVVCsDWD.js +0 -4
- package/chunks/view-CLqWMV7Z.js +0 -156
- package/src/definitions/shared/index.d.ts +0 -5
- package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +0 -587
- package/src/definitions/shared/lib/registry/index.d.ts +0 -3
- package/src/definitions/shared/lib/schemas/index.d.ts +0 -9
- package/src/definitions/shared/lib/types/index.d.ts +0 -3
- package/src/definitions/{shared/lib → model/definitions}/schemas/app-filter-bar.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/bar.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/filter.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/line.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/number.schema.d.ts +0 -0
- package/src/definitions/{shared/lib → model/definitions}/schemas/table.schema.d.ts +4 -4
- /package/src/definitions/{shared/lib → model/definitions}/types/compilation.types.d.ts +0 -0
- /package/src/definitions/{shared/lib → model/definitions}/types/descriptor.types.d.ts +0 -0
|
@@ -1,57 +1,56 @@
|
|
|
1
1
|
import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import { Ba as n,
|
|
3
|
-
import {
|
|
4
|
-
import { gt as O } from "./
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
let n = e?.simpleTextObjectSettings || {}, r = n.fontFamily ?? o.fontFamily, i = n.textColor ?? o.textColor, a = t ? m(t, r) : r, s = t ? d(t, i) : i, { borderEnabled: c = o.borderEnabled, borderRadius: l = o.borderRadius, borderWidth: f = o.borderWidth } = n;
|
|
2
|
+
import { Ba as n, Fi as r, Ko as i, Mt as a, Ra as o, Sa as s, Ta as c, _a as l, bo as u, ga as d, os as f, va as p, xo as m, ya as h, za as g } from "./isEqual-BDxAhUo8.js";
|
|
3
|
+
import { $t as _, B as v, Cn as y, Ei as b, Fn as x, G as S, Kn as C, Wn as w, Yi as T, a as E, d as D } from "./utils-Bg7K-t6K.js";
|
|
4
|
+
import { gt as O } from "./handlers-VTBfIZYZ.js";
|
|
5
|
+
import { ht as k } from "./ui-DQWtv2iM.js";
|
|
6
|
+
import { n as A, t as j } from "./url-utils-B17gj_mr.js";
|
|
7
|
+
var M = /* @__PURE__ */ e(T()), N = (e, t) => {
|
|
8
|
+
let n = e?.simpleTextObjectSettings || {}, i = n.fontFamily ?? r.fontFamily, a = n.textColor ?? r.textColor, o = t ? p(t, i) : i, s = t ? l(t, a) : a, { borderEnabled: c = r.borderEnabled, borderRadius: u = r.borderRadius, borderWidth: d = r.borderWidth } = n;
|
|
10
9
|
return {
|
|
11
|
-
textContentType: n.textContentType ??
|
|
12
|
-
textContent: n.textContent ??
|
|
13
|
-
variableId: n.variableId ??
|
|
14
|
-
representation: n.representation ??
|
|
15
|
-
paragraphMargin: n.paragraphMargin ??
|
|
10
|
+
textContentType: n.textContentType ?? g.Text,
|
|
11
|
+
textContent: n.textContent ?? r.textContent,
|
|
12
|
+
variableId: n.variableId ?? r.variableId,
|
|
13
|
+
representation: n.representation ?? r.representation,
|
|
14
|
+
paragraphMargin: n.paragraphMargin ?? r.paragraphMargin,
|
|
16
15
|
textColor: s,
|
|
17
|
-
fontFamily:
|
|
18
|
-
fontSize: n.fontSize ??
|
|
19
|
-
bold: n.bold ??
|
|
20
|
-
weight: n.weight ??
|
|
21
|
-
italic: n.italic ??
|
|
22
|
-
underlined: n.underlined ??
|
|
23
|
-
strikethrough: n.strikethrough ??
|
|
24
|
-
letterSpacing: n.letterSpacing ??
|
|
25
|
-
lineSpacing: n.lineSpacing ??
|
|
26
|
-
wordWrap: n.wordWrap ??
|
|
27
|
-
linkEnabled: n.linkEnabled ??
|
|
28
|
-
linkUrl: n.linkUrl ??
|
|
29
|
-
backgroundType: n.backgroundType ??
|
|
30
|
-
backgroundColor: n.backgroundColor ??
|
|
31
|
-
imageOpacity: n.imageOpacity ??
|
|
32
|
-
backgroundBlur: n.backgroundBlur ??
|
|
33
|
-
backgroundImage: n.backgroundImage ??
|
|
34
|
-
imageFitType: n.imageFitType ??
|
|
16
|
+
fontFamily: o,
|
|
17
|
+
fontSize: n.fontSize ?? r.fontSize,
|
|
18
|
+
bold: n.bold ?? r.bold,
|
|
19
|
+
weight: n.weight ?? r.weight,
|
|
20
|
+
italic: n.italic ?? r.italic,
|
|
21
|
+
underlined: n.underlined ?? r.underlined,
|
|
22
|
+
strikethrough: n.strikethrough ?? r.strikethrough,
|
|
23
|
+
letterSpacing: n.letterSpacing ?? r.letterSpacing,
|
|
24
|
+
lineSpacing: n.lineSpacing ?? r.lineSpacing,
|
|
25
|
+
wordWrap: n.wordWrap ?? r.wordWrap,
|
|
26
|
+
linkEnabled: n.linkEnabled ?? r.linkEnabled,
|
|
27
|
+
linkUrl: n.linkUrl ?? r.linkUrl,
|
|
28
|
+
backgroundType: n.backgroundType ?? r.backgroundType,
|
|
29
|
+
backgroundColor: n.backgroundColor ?? r.backgroundColor,
|
|
30
|
+
imageOpacity: n.imageOpacity ?? r.imageOpacity,
|
|
31
|
+
backgroundBlur: n.backgroundBlur ?? r.backgroundBlur,
|
|
32
|
+
backgroundImage: n.backgroundImage ?? r.backgroundImage,
|
|
33
|
+
imageFitType: n.imageFitType ?? r.imageFitType,
|
|
35
34
|
borderEnabled: c,
|
|
36
|
-
borderWidth: c ?? !!
|
|
37
|
-
borderRadius: c ?? !!
|
|
38
|
-
borderStyle: n.borderStyle ??
|
|
39
|
-
borderColor: n.borderColor ??
|
|
40
|
-
textPadding: n.textPadding ??
|
|
41
|
-
textShadow: n.textShadow ??
|
|
42
|
-
objectShadow: n.objectShadow ??
|
|
43
|
-
responsive: n.responsive ??
|
|
44
|
-
scaling: n.scaling ??
|
|
45
|
-
maxLines: n.maxLines ??
|
|
46
|
-
position: n.position ??
|
|
47
|
-
align: n.align ??
|
|
48
|
-
richTextScaling: n.richTextScaling ??
|
|
49
|
-
richTextResponsive: n.richTextResponsive ??
|
|
50
|
-
richTextMaxLines: n.richTextMaxLines ??
|
|
35
|
+
borderWidth: c ?? !!d ? d : 0,
|
|
36
|
+
borderRadius: c ?? !!d ? u : 0,
|
|
37
|
+
borderStyle: n.borderStyle ?? r.borderStyle,
|
|
38
|
+
borderColor: n.borderColor ?? r.borderColor,
|
|
39
|
+
textPadding: n.textPadding ?? r.textPadding,
|
|
40
|
+
textShadow: n.textShadow ?? r.textShadow,
|
|
41
|
+
objectShadow: n.objectShadow ?? r.objectShadow,
|
|
42
|
+
responsive: n.responsive ?? r.responsive,
|
|
43
|
+
scaling: n.scaling ?? r.scaling,
|
|
44
|
+
maxLines: n.maxLines ?? r.maxLines,
|
|
45
|
+
position: n.position ?? r.position,
|
|
46
|
+
align: n.align ?? r.align,
|
|
47
|
+
richTextScaling: n.richTextScaling ?? r.richTextScaling,
|
|
48
|
+
richTextResponsive: n.richTextResponsive ?? r.richTextResponsive,
|
|
49
|
+
richTextMaxLines: n.richTextMaxLines ?? r.richTextMaxLines
|
|
51
50
|
};
|
|
52
51
|
}, P = 8, F = (e, t, n) => {
|
|
53
52
|
if (n.width === 0) return t.fontSize;
|
|
54
|
-
let r =
|
|
53
|
+
let r = C(), i = 0, a = 0, o = t.fontSize;
|
|
55
54
|
for (; a <= o;) {
|
|
56
55
|
let s = Math.floor((a + o) / 2), { width: c, height: l } = r.getTextSize({
|
|
57
56
|
size: s,
|
|
@@ -64,13 +63,13 @@ var M = /* @__PURE__ */ e(b()), N = (e, t) => {
|
|
|
64
63
|
d || f ? o = s - 1 : (i = s, a = s + 1);
|
|
65
64
|
}
|
|
66
65
|
return r.cleanDOM(), i;
|
|
67
|
-
}, I = (e, t) => e ? t :
|
|
66
|
+
}, I = (e, t) => e ? t : m.None, L = (e) => e === m.ViewportWidth ? "vw" : "px", R = (e, t, n) => F(e, t, {
|
|
68
67
|
width: n.width - t.textPadding * 2,
|
|
69
68
|
height: n.height - t.textPadding * 2
|
|
70
69
|
}), ee = {
|
|
71
70
|
width: 1920,
|
|
72
71
|
height: 1080
|
|
73
|
-
}, z = (e) => e / 1920 * 100, B = (e) => e / ee.height * 100, V =
|
|
72
|
+
}, z = (e) => e / 1920 * 100, B = (e) => e / ee.height * 100, V = b(), te = S({
|
|
74
73
|
wrapper: {
|
|
75
74
|
height: "100%",
|
|
76
75
|
position: "relative",
|
|
@@ -153,7 +152,7 @@ var M = /* @__PURE__ */ e(b()), N = (e, t) => {
|
|
|
153
152
|
}),
|
|
154
153
|
onClick: g
|
|
155
154
|
});
|
|
156
|
-
}, H =
|
|
155
|
+
}, H = S({
|
|
157
156
|
mainContainer: {
|
|
158
157
|
width: "100%",
|
|
159
158
|
height: "100%",
|
|
@@ -170,7 +169,7 @@ var M = /* @__PURE__ */ e(b()), N = (e, t) => {
|
|
|
170
169
|
overflowX: "hidden",
|
|
171
170
|
lineHeight: 1,
|
|
172
171
|
color: "#1F1C3B",
|
|
173
|
-
fontFamily:
|
|
172
|
+
fontFamily: h("Roboto"),
|
|
174
173
|
fontStyle: "normal",
|
|
175
174
|
fontWeight: 700
|
|
176
175
|
},
|
|
@@ -188,7 +187,7 @@ var M = /* @__PURE__ */ e(b()), N = (e, t) => {
|
|
|
188
187
|
WebkitBoxOrient: "vertical"
|
|
189
188
|
}
|
|
190
189
|
});
|
|
191
|
-
|
|
190
|
+
h("Roboto");
|
|
192
191
|
var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto;\n", U = `
|
|
193
192
|
width: 100%;
|
|
194
193
|
height: 100%;
|
|
@@ -200,7 +199,7 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
200
199
|
overflow: auto;
|
|
201
200
|
line-height: 1;
|
|
202
201
|
color: #1F1C3B;
|
|
203
|
-
font-family: Roboto, ${
|
|
202
|
+
font-family: Roboto, ${d};
|
|
204
203
|
font-style: normal;
|
|
205
204
|
font-weight: 700;
|
|
206
205
|
`, W = "\n cursor: default;\n width: 100%;\n height: auto;\n -webkit-flex: 1 1 auto;\n -ms-flex: 1 1 auto;\n flex: 1 1 auto;\n overflow: auto;\n overflow-wrap: break-word;\n text-overflow: ellipsis;\n -box-orient: vertical;\n", G = /* @__PURE__ */ t(((e, t) => {
|
|
@@ -411,9 +410,9 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
411
410
|
ſ: "s"
|
|
412
411
|
});
|
|
413
412
|
})), J = /* @__PURE__ */ t(((e, t) => {
|
|
414
|
-
var n = q(), r =
|
|
413
|
+
var n = q(), r = a(), i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, o = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
|
|
415
414
|
function s(e) {
|
|
416
|
-
return e = r(e), e && e.replace(
|
|
415
|
+
return e = r(e), e && e.replace(i, n).replace(o, "");
|
|
417
416
|
}
|
|
418
417
|
t.exports = s;
|
|
419
418
|
})), Y = /* @__PURE__ */ t(((e, t) => {
|
|
@@ -460,9 +459,9 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
460
459
|
}
|
|
461
460
|
t.exports = R;
|
|
462
461
|
})), oe = /* @__PURE__ */ t(((e, t) => {
|
|
463
|
-
var n = Y(), r = ie(),
|
|
464
|
-
function s(e, t,
|
|
465
|
-
return e =
|
|
462
|
+
var n = Y(), r = ie(), i = a(), o = ae();
|
|
463
|
+
function s(e, t, a) {
|
|
464
|
+
return e = i(e), t = a ? void 0 : t, t === void 0 ? r(e) ? o(e) : n(e) : e.match(t) || [];
|
|
466
465
|
}
|
|
467
466
|
t.exports = s;
|
|
468
467
|
})), se = /* @__PURE__ */ t(((e, t) => {
|
|
@@ -477,11 +476,11 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
477
476
|
t.exports = se()(function(e, t, n) {
|
|
478
477
|
return e + (n ? "-" : "") + t.toLowerCase();
|
|
479
478
|
});
|
|
480
|
-
})))()), le = (e, t,
|
|
481
|
-
let i = [e.underlined ? "underline" : void 0, e.strikethrough ? "line-through" : void 0].filter((e) => !!e).join(" "),
|
|
479
|
+
})))()), le = (e, t, r = "px") => {
|
|
480
|
+
let i = [e.underlined ? "underline" : void 0, e.strikethrough ? "line-through" : void 0].filter((e) => !!e).join(" "), a = Math.ceil(t / 10);
|
|
482
481
|
return {
|
|
483
482
|
fontFamily: e.fontFamily,
|
|
484
|
-
fontSize: `${t}${
|
|
483
|
+
fontSize: `${t}${r}`,
|
|
485
484
|
fontWeight: e.weight ?? (e.bold ? "bold" : "normal"),
|
|
486
485
|
fontStyle: e.italic ? "italic" : "normal",
|
|
487
486
|
color: e.textColor ?? "inherit",
|
|
@@ -489,12 +488,12 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
489
488
|
textDecoration: i,
|
|
490
489
|
letterSpacing: `${e.letterSpacing}px`,
|
|
491
490
|
lineHeight: e.lineSpacing,
|
|
492
|
-
whiteSpace: e.responsive || [
|
|
493
|
-
marginTop: e.position ===
|
|
494
|
-
marginBottom: e.position ===
|
|
495
|
-
textShadow: e.textShadow ? `0px 1px 2px ${
|
|
496
|
-
paddingTop:
|
|
497
|
-
paddingBottom:
|
|
491
|
+
whiteSpace: e.responsive || [n.HTML, n.Markdown].includes(e.representation) ? e.wordWrap ? "pre-line" : "nowrap" : "pre-line",
|
|
492
|
+
marginTop: e.position === f.Top ? "unset" : "auto",
|
|
493
|
+
marginBottom: e.position === f.Bottom ? "unset" : "auto",
|
|
494
|
+
textShadow: e.textShadow ? `0px 1px 2px ${c.black}` : "none",
|
|
495
|
+
paddingTop: a,
|
|
496
|
+
paddingBottom: a,
|
|
498
497
|
overflow: e.responsive ? "visible" : "hidden",
|
|
499
498
|
textOverflow: e.responsive ? "initial" : "ellipsis",
|
|
500
499
|
WebkitLineClamp: e.maxLines || 1,
|
|
@@ -502,21 +501,21 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
502
501
|
display: e.responsive ? "initial" : "-webkit-box"
|
|
503
502
|
};
|
|
504
503
|
}, X = (e) => {
|
|
505
|
-
let t = e.borderStyle ===
|
|
504
|
+
let t = e.borderStyle === i.Line ? "solid" : "dashed";
|
|
506
505
|
return {
|
|
507
|
-
backgroundColor: (e.backgroundType ===
|
|
506
|
+
backgroundColor: (e.backgroundType === o.Image ? null : e.backgroundColor) ?? "transparent",
|
|
508
507
|
border: `${e.borderWidth}px ${t} ${e.borderColor}`,
|
|
509
508
|
borderRadius: `${e.borderRadius}px`,
|
|
510
509
|
backdropFilter: `blur(${e.backgroundBlur}px)`,
|
|
511
|
-
boxShadow: e.objectShadow ? `0px 2px 4px ${
|
|
510
|
+
boxShadow: e.objectShadow ? `0px 2px 4px ${c.alphaBlack(.25)}` : "none"
|
|
512
511
|
};
|
|
513
512
|
}, Z = (e) => ({ padding: `${e.textPadding ?? 0}px` }), ue = (e, t, n) => {
|
|
514
513
|
if (!n) return {};
|
|
515
514
|
let r = e.fontSize;
|
|
516
515
|
switch (t) {
|
|
517
|
-
case
|
|
518
|
-
case
|
|
519
|
-
case
|
|
516
|
+
case u.ViewportWidth: return { fontSize: `${z(r)}vw` };
|
|
517
|
+
case u.ViewportHeight: return { fontSize: `${B(r)}vh` };
|
|
518
|
+
case u.ViewportWidthHeight: return { fontSize: `min(${z(r)}vw, ${B(r)}vh)` };
|
|
520
519
|
}
|
|
521
520
|
return {};
|
|
522
521
|
}, de = {
|
|
@@ -545,44 +544,44 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
545
544
|
${Q(e)}
|
|
546
545
|
}
|
|
547
546
|
.astrato-html-container p {
|
|
548
|
-
margin: ${t.representation ===
|
|
547
|
+
margin: ${t.representation === n.Markdown ? `${t.paragraphMargin}px` : 0};
|
|
549
548
|
}
|
|
550
549
|
.astrato-html-container li {
|
|
551
550
|
white-space: normal;
|
|
552
551
|
}`, me = (e) => `<div class="astrato-html-main-container"><div class="astrato-html-container">${e}</div></div>`, he = (e, t, n) => {
|
|
553
|
-
let { textContent: r, variableId: i, textContentType: a =
|
|
554
|
-
return [
|
|
555
|
-
}, ge = (e) => e.replace(/(\r\n|\n|\r)/g, " "), $ = ({ textObjectSettings: e, scaling: t, elementSize:
|
|
556
|
-
let
|
|
557
|
-
t ===
|
|
558
|
-
let
|
|
552
|
+
let { textContent: r, variableId: i, textContentType: a = g.Text } = e;
|
|
553
|
+
return [g.Text, g.Delta].includes(a) ? r || n : i ? `${t[i]?.value ?? ""}` : n;
|
|
554
|
+
}, ge = (e) => e.replace(/(\r\n|\n|\r)/g, " "), $ = ({ textObjectSettings: e, scaling: t, elementSize: r }) => {
|
|
555
|
+
let i = H(), a = y(), s = D(), { variablesDict: c } = E(), [l, u] = (0, M.useState)(""), d = he(e, c, ""), f = e.fontSize;
|
|
556
|
+
t === m.FitToObject ? f = R(d, e, r) : t === m.ViewportWidth && (f = z(f));
|
|
557
|
+
let p = a?.daedalus.objectCapabilities.editable, h = e.backgroundType === o.Image, g = [n.HTML, n.Markdown].includes(e.representation), _ = le(e, f, L(t)), v = X(e), b = Z(e), x = fe(e), S = {
|
|
559
558
|
...b,
|
|
560
559
|
..._,
|
|
561
560
|
fontSize: `${e.fontSize}px`
|
|
562
561
|
};
|
|
563
562
|
delete S.paddingBottom, delete S.paddingTop, delete S.display, (0, M.useEffect)(() => {
|
|
564
563
|
let t = async () => {
|
|
565
|
-
e.representation ===
|
|
564
|
+
e.representation === n.Markdown ? u(await A(d)) : u(d);
|
|
566
565
|
};
|
|
567
566
|
(async () => {
|
|
568
567
|
await t(), !h && !g && s();
|
|
569
568
|
})();
|
|
570
569
|
}, [
|
|
571
|
-
|
|
570
|
+
d,
|
|
572
571
|
e.representation,
|
|
573
572
|
h,
|
|
574
573
|
g,
|
|
575
574
|
s
|
|
576
575
|
]);
|
|
577
|
-
let C =
|
|
578
|
-
return /* @__PURE__ */ (0, V.jsx)(
|
|
579
|
-
title:
|
|
576
|
+
let C = j(e.linkUrl), T = !g && !e.responsive, O = !e.responsive && !g ? ge(l) : l;
|
|
577
|
+
return /* @__PURE__ */ (0, V.jsx)(k, {
|
|
578
|
+
title: T ? O : null,
|
|
580
579
|
children: /* @__PURE__ */ (0, V.jsxs)("div", {
|
|
581
|
-
className:
|
|
580
|
+
className: i.mainContainer,
|
|
582
581
|
style: v,
|
|
583
582
|
"data-testid": "simple-text-object-container",
|
|
584
583
|
children: [
|
|
585
|
-
g ? /* @__PURE__ */ (0, V.jsx)(
|
|
584
|
+
g ? /* @__PURE__ */ (0, V.jsx)(w, {
|
|
586
585
|
html: me(O),
|
|
587
586
|
css: pe(S, e),
|
|
588
587
|
style: de,
|
|
@@ -590,17 +589,17 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
590
589
|
}) : null,
|
|
591
590
|
h ? /* @__PURE__ */ (0, V.jsx)("img", {
|
|
592
591
|
src: e.backgroundImage,
|
|
593
|
-
className:
|
|
592
|
+
className: i.image,
|
|
594
593
|
style: x,
|
|
595
594
|
onLoad: () => s(),
|
|
596
595
|
onError: () => s(),
|
|
597
596
|
alt: "text background"
|
|
598
597
|
}) : null,
|
|
599
|
-
|
|
600
|
-
className:
|
|
598
|
+
p || !g ? /* @__PURE__ */ (0, V.jsx)(V.Fragment, { children: /* @__PURE__ */ (0, V.jsx)("div", {
|
|
599
|
+
className: i.textContainer,
|
|
601
600
|
style: b,
|
|
602
601
|
children: e.linkEnabled && C ? /* @__PURE__ */ (0, V.jsx)("div", {
|
|
603
|
-
className:
|
|
602
|
+
className: i.spanElement,
|
|
604
603
|
style: _,
|
|
605
604
|
"data-ellipsis": !0,
|
|
606
605
|
"data-testid": "simple-text-object-content",
|
|
@@ -615,7 +614,7 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
615
614
|
children: g ? "" : O
|
|
616
615
|
})
|
|
617
616
|
}) : /* @__PURE__ */ (0, V.jsx)("div", {
|
|
618
|
-
className:
|
|
617
|
+
className: i.spanElement,
|
|
619
618
|
style: {
|
|
620
619
|
..._,
|
|
621
620
|
pointerEvents: "none"
|
|
@@ -628,8 +627,8 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
628
627
|
]
|
|
629
628
|
})
|
|
630
629
|
});
|
|
631
|
-
}, _e =
|
|
632
|
-
let n =
|
|
630
|
+
}, _e = _($), ve = ({ textObjectSettings: e, isRichTextScalingSet: t }) => {
|
|
631
|
+
let n = y(), r = v(), i = X(e), a = Z(e), o = H(), s = D(), c = e.richTextScaling ?? u.ViewportBreakpoints, l = ue(e, c, t);
|
|
633
632
|
return (0, M.useEffect)(() => {
|
|
634
633
|
s();
|
|
635
634
|
}, [s]), /* @__PURE__ */ (0, V.jsx)("div", {
|
|
@@ -643,7 +642,7 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
643
642
|
children: /* @__PURE__ */ (0, V.jsx)(ne, {
|
|
644
643
|
value: e.textContent,
|
|
645
644
|
backendAPI: n,
|
|
646
|
-
responsive: c ===
|
|
645
|
+
responsive: c === u.ViewportBreakpoints,
|
|
647
646
|
richTextResponsive: e.richTextResponsive,
|
|
648
647
|
richTextMaxLines: e.richTextMaxLines,
|
|
649
648
|
onSubmit: (t, n) => {
|
|
@@ -657,17 +656,17 @@ var re = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: aut
|
|
|
657
656
|
})
|
|
658
657
|
});
|
|
659
658
|
}, ye = (e) => {
|
|
660
|
-
let t = e.vTheme ??
|
|
659
|
+
let t = e.vTheme ?? s, n = N(e.vSpec, t), r = I(n.responsive, n.scaling), i = {
|
|
661
660
|
...e,
|
|
662
661
|
scaling: r,
|
|
663
662
|
textObjectSettings: n
|
|
664
663
|
};
|
|
665
|
-
if (n.textContentType ===
|
|
664
|
+
if (n.textContentType === g.Delta) return /* @__PURE__ */ (0, V.jsx)(ve, {
|
|
666
665
|
textObjectSettings: n,
|
|
667
666
|
isRichTextScalingSet: e.vSpec?.simpleTextObjectSettings?.richTextScaling !== void 0
|
|
668
667
|
});
|
|
669
668
|
switch (r) {
|
|
670
|
-
case
|
|
669
|
+
case m.FitToObject: return /* @__PURE__ */ (0, V.jsx)(_e, { ...i });
|
|
671
670
|
default: return /* @__PURE__ */ (0, V.jsx)($, { ...i });
|
|
672
671
|
}
|
|
673
672
|
};
|