@astrato-io/visualizations 0.8.0 → 0.10.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 +9 -5
- package/THIRD_PARTY_NOTICES.md +403 -325
- package/VISUALIZATION_DEFINITIONS.md +319 -32
- package/chunks/{Button-BrGKp9Nm.js → Button-CCF851ea.js} +10 -10
- package/chunks/CircularProgress-yupH6YWs.js +765 -0
- package/chunks/FieldTypeIcon-D_MzsdfY.js +22 -0
- package/chunks/LinearProgress-CyFjN4px.js +327 -0
- package/chunks/{MenuOption-ByRqhRdX.js → MenuOption-CQpT79AP.js} +1391 -1008
- package/chunks/Title-C-p4ZarD.js +1804 -0
- package/chunks/_createAggregator-BF4qG9XK.js +50 -0
- package/chunks/{app-filter-bar.compiler-TwVTeoj5.js → app-filter-bar.compiler-8fxCo2q7.js} +10 -10
- package/chunks/bar-layout-DStC-GNV.js +9 -0
- package/chunks/{bar.compiler-DuQg8EUb.js → bar.compiler-CQAu8KL8.js} +102 -84
- package/chunks/{builder-DEDvNq1k.js → builder-CScg1TOS.js} +156 -60
- package/chunks/color-rules-DYJL4fIW.js +15 -0
- package/chunks/color-settings-DJFoFTip.js +5 -0
- package/chunks/{coloring-CncX_JRX.js → coloring-9jU3s_-p.js} +41 -41
- package/chunks/contains-BK-sRXcB.js +21 -0
- package/chunks/createSimplePaletteValueFilter-C4hZpCdn.js +2005 -0
- package/chunks/defaults-cyNhn37t.js +3 -0
- package/chunks/{definitions-BPJQTx16.js → definitions-C4grxhye.js} +612 -400
- package/chunks/{escobar-DRhRMYRE.js → escobar-CjirINHP.js} +5354 -5473
- package/chunks/{extend-preset-CUFNpmPe.js → extend-preset-D-l9u_we.js} +974 -909
- package/chunks/{filter.compiler-w27dlv0C.js → filter.compiler-lji2Acgn.js} +7 -7
- package/chunks/{filtering-cc7WqWpg.js → filtering-C1zakrrX.js} +570 -390
- package/chunks/handlers-ZviIUC-j.js +15387 -0
- package/chunks/{icon-picker-styles-CoJmwTRi.js → icon-picker-styles-Bj80ZUBK.js} +11 -11
- package/chunks/isEqual-Ch9OEye3.js +16 -0
- package/chunks/isFocusVisible-CgMP0qkR.js +144 -0
- package/chunks/label-format-type-C46pzgx7.js +17 -0
- package/chunks/{line.compiler-Ct1WhN2p.js → line.compiler-De5fiKuR.js} +6 -6
- package/chunks/{logger-DpQtYQnX.js → logger-CKRjhSHQ.js} +77 -66
- package/chunks/map.compiler-CKzorLgK.js +345 -0
- package/chunks/{metadata-WABZrt7Y.js → metadata-Bb9pTXrq.js} +1 -1
- package/chunks/{number.compiler-D8TPly-4.js → number.compiler-CaTmJkmi.js} +4 -4
- package/chunks/operations-DZoY50VX.js +31297 -0
- package/chunks/{range-Bi-7zT0k.js → range-D1BTmFMp.js} +2 -2
- package/chunks/react-dom-Dgv2azN2.js +368 -0
- package/chunks/{render-wrappers-OEmtaM8g.js → render-wrappers-_P3xwu5A.js} +1 -1
- package/chunks/{requirements-Dvd8jqYF.js → requirements-NHNrR8Ie.js} +55 -53
- package/chunks/responsive.styles-FItb913l.js +93 -0
- package/chunks/shared-UitWpq1J.js +1331 -0
- package/chunks/standalone-B0U6c3su.js +3638 -0
- package/chunks/{standalone-we5D5MIn.js → standalone-BBu90BhK.js} +113 -113
- package/chunks/standalone-BEekPuA12.js +357 -0
- package/chunks/{standalone-BMTCb10X.js → standalone-BOzHA_d4.js} +41 -41
- package/chunks/standalone-BR2JuRIC.js +422 -0
- package/chunks/{standalone-BGkmozIb.js → standalone-BapqaniK.js} +619 -619
- package/chunks/standalone-Bnnr87pc.js +2009 -0
- package/chunks/standalone-BwJqDj2Z.js +396 -0
- package/chunks/{standalone-BDhPQtzQ.js → standalone-ByKKqT5L.js} +308 -300
- package/chunks/{standalone-vBnBS2YC.js → standalone-CRdDZYeM.js} +1788 -1004
- package/chunks/standalone-CRfDOO1x.js +287 -0
- package/chunks/{standalone-D5Q5ngsD.js → standalone-CVknVdUC.js} +30 -27
- package/chunks/standalone-CbPk8bKn.js +580 -0
- package/chunks/{standalone-CJvIXsQE.js → standalone-Ck63MZzj.js} +234 -232
- package/chunks/{standalone-CM5XcAN5.js → standalone-DCFY1MAV.js} +8075 -7729
- package/chunks/{standalone-DW6NT205.js → standalone-DZDGX3aa.js} +168 -168
- package/chunks/standalone-DhfgeJIk.js +1012 -0
- package/chunks/{standalone-DT0wKji7.js → standalone-DibjA73M.js} +2 -2
- package/chunks/{standalone-XuGksArp.js → standalone-DtBk_iUz.js} +9 -8
- package/chunks/standalone-DxBAyqAu.js +772 -0
- package/chunks/standalone-KMQPsNsq.js +2 -0
- package/chunks/standalone-MBLSvsrY.js +2 -0
- package/chunks/standalone-U0WJwFlG.js +354 -0
- package/chunks/{standalone-C8ZAEutO.js → standalone-swGs70tD.js} +49 -51
- package/chunks/standalone-wgFAVnnm.js +355 -0
- package/chunks/standalone-xGV0dqPV.js +689 -0
- package/chunks/{table.compiler-DMeeHxb6.js → table.compiler-OWSx5MOq.js} +7 -7
- package/chunks/{typeof-CJDtcySz.js → typeof-DCq3QgvY.js} +6 -1
- package/chunks/useFieldName-B8iCYyw1.js +7 -0
- package/chunks/{utils-vdmi_2PK.js → utils-3Igg6xmO.js} +7668 -12779
- package/chunks/{view-BuwQugKb.js → view-DdMLZySj.js} +2430 -2110
- package/chunks/{visualization-filters-Cc4KU-l-.js → visualization-filters-CzvFHE6M.js} +5205 -4438
- package/chunks/with-html-element-DOfkR3C1.js +16094 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +303 -2
- package/docs/operations/combo.md +262 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +148 -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 +262 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +8 -8
- package/docs/operations/line.md +262 -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 +148 -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 +439 -157
- 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 +523 -469
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +74 -68
- package/src/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/available-fields.d.ts +2 -2
- package/src/definitions/model/definitions/compilers/compile.d.ts +1 -0
- package/src/definitions/model/definitions/data-item-resolution.d.ts +3 -3
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +535 -349
- package/src/definitions/model/definitions/index.d.ts +2 -1
- package/src/definitions/model/definitions/schema-registry.d.ts +406 -101
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +10 -8
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +33 -32
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -0
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +10 -10
- package/src/definitions/model/definitions/schemas/map.schema.d.ts +590 -0
- 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/definitions/model/definitions/types/compilation.types.d.ts +7 -2
- package/src/definitions/model/definitions/types/definition.types.d.ts +2 -2
- package/src/definitions/model/definitions/types/index.d.ts +1 -1
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +1 -1
- package/src/types.d.ts +45 -41
- 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/color-rules-CN7TcGrC.js +0 -6
- package/chunks/color-settings-3VRlf_Vw.js +0 -6
- package/chunks/colorManipulator-D8Pjy1pf.js +0 -45
- package/chunks/handlers-TOT-7INo.js +0 -12871
- package/chunks/isEqual-B8loyPsC.js +0 -12
- package/chunks/label-format-type-weq1XfcX.js +0 -8
- package/chunks/operations-Dh4v1Ovt.js +0 -26280
- package/chunks/responsive.styles-DSiOGD7u.js +0 -82
- package/chunks/shared-Bn4N5QcZ.js +0 -1218
- package/chunks/standalone-B55oyW6c.js +0 -689
- package/chunks/standalone-BXKRE_Se.js +0 -468
- package/chunks/standalone-Bes8srx1.js +0 -354
- package/chunks/standalone-BjZp0QMe.js +0 -2
- package/chunks/standalone-BlMIwpEe.js +0 -1877
- package/chunks/standalone-C8qAelL4.js +0 -2
- package/chunks/standalone-CLmGb7nn2.js +0 -355
- package/chunks/standalone-CXNP6-xD.js +0 -420
- package/chunks/standalone-DLlyRIE6.js +0 -287
- package/chunks/standalone-DMcI1afI.js +0 -396
- package/chunks/standalone-DN4S1MjT.js +0 -3874
- package/chunks/standalone-DYQIQH4c.js +0 -2095
- package/chunks/standalone-D__XCp-h.js +0 -1003
- package/chunks/standalone-XTgSsTAa.js +0 -354
- package/chunks/useFieldName-Cjn9KCVp.js +0 -7
- package/chunks/useSlotProps-DLbQp4lc.js +0 -166
- package/chunks/with-html-element-D0uY2zjI.js +0 -7328
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { $o as n, Co as r, Da as i, Ha as a, Ua as o, Va as s, dc as c, di as l, ea as u, na as d, oa as f, ps as p, ra as m, ta as h, vr as g, wo as _ } from "./visualization-filters-CzvFHE6M.js";
|
|
3
|
+
import { W as v, Zt as y, ci as b, f as x, jt as S, o as C, sn as w, xn as T, yn as E, z as D, zr as O } from "./utils-3Igg6xmO.js";
|
|
4
|
+
import { St as k } from "./handlers-ZviIUC-j.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(
|
|
8
|
-
let
|
|
6
|
+
import { t as M } from "./Title-C-p4ZarD.js";
|
|
7
|
+
var N = /* @__PURE__ */ e(b()), P = (e, t) => {
|
|
8
|
+
let n = e?.simpleTextObjectSettings || {}, r = n.fontFamily ?? l.fontFamily, i = n.textColor ?? l.textColor, o = t ? d(t, r) : r, s = t ? h(t, i) : i, { borderEnabled: c = l.borderEnabled, borderRadius: u = l.borderRadius, borderWidth: f = l.borderWidth } = n;
|
|
9
9
|
return {
|
|
10
|
-
textContentType:
|
|
11
|
-
textContent:
|
|
12
|
-
variableId:
|
|
13
|
-
representation:
|
|
14
|
-
paragraphMargin:
|
|
15
|
-
textColor:
|
|
16
|
-
fontFamily:
|
|
17
|
-
fontSize:
|
|
18
|
-
bold:
|
|
19
|
-
weight:
|
|
20
|
-
italic:
|
|
21
|
-
underlined:
|
|
22
|
-
strikethrough:
|
|
23
|
-
letterSpacing:
|
|
24
|
-
lineSpacing:
|
|
25
|
-
wordWrap:
|
|
26
|
-
linkEnabled:
|
|
27
|
-
linkUrl:
|
|
28
|
-
backgroundType:
|
|
29
|
-
backgroundColor:
|
|
30
|
-
imageOpacity:
|
|
31
|
-
backgroundBlur:
|
|
32
|
-
backgroundImage:
|
|
33
|
-
imageFitType:
|
|
34
|
-
borderEnabled:
|
|
35
|
-
borderWidth:
|
|
36
|
-
borderRadius:
|
|
37
|
-
borderStyle:
|
|
38
|
-
borderColor:
|
|
39
|
-
textPadding:
|
|
40
|
-
textShadow:
|
|
41
|
-
objectShadow:
|
|
42
|
-
responsive:
|
|
43
|
-
scaling:
|
|
44
|
-
maxLines:
|
|
45
|
-
position:
|
|
46
|
-
align:
|
|
47
|
-
richTextScaling:
|
|
48
|
-
richTextResponsive:
|
|
49
|
-
richTextMaxLines:
|
|
10
|
+
textContentType: n.textContentType ?? a.Text,
|
|
11
|
+
textContent: n.textContent ?? l.textContent,
|
|
12
|
+
variableId: n.variableId ?? l.variableId,
|
|
13
|
+
representation: n.representation ?? l.representation,
|
|
14
|
+
paragraphMargin: n.paragraphMargin ?? l.paragraphMargin,
|
|
15
|
+
textColor: s,
|
|
16
|
+
fontFamily: o,
|
|
17
|
+
fontSize: n.fontSize ?? l.fontSize,
|
|
18
|
+
bold: n.bold ?? l.bold,
|
|
19
|
+
weight: n.weight ?? l.weight,
|
|
20
|
+
italic: n.italic ?? l.italic,
|
|
21
|
+
underlined: n.underlined ?? l.underlined,
|
|
22
|
+
strikethrough: n.strikethrough ?? l.strikethrough,
|
|
23
|
+
letterSpacing: n.letterSpacing ?? l.letterSpacing,
|
|
24
|
+
lineSpacing: n.lineSpacing ?? l.lineSpacing,
|
|
25
|
+
wordWrap: n.wordWrap ?? l.wordWrap,
|
|
26
|
+
linkEnabled: n.linkEnabled ?? l.linkEnabled,
|
|
27
|
+
linkUrl: n.linkUrl ?? l.linkUrl,
|
|
28
|
+
backgroundType: n.backgroundType ?? l.backgroundType,
|
|
29
|
+
backgroundColor: n.backgroundColor ?? l.backgroundColor,
|
|
30
|
+
imageOpacity: n.imageOpacity ?? l.imageOpacity,
|
|
31
|
+
backgroundBlur: n.backgroundBlur ?? l.backgroundBlur,
|
|
32
|
+
backgroundImage: n.backgroundImage ?? void 0,
|
|
33
|
+
imageFitType: n.imageFitType ?? l.imageFitType,
|
|
34
|
+
borderEnabled: c,
|
|
35
|
+
borderWidth: c ?? !!f ? f : 0,
|
|
36
|
+
borderRadius: c ?? !!f ? u : 0,
|
|
37
|
+
borderStyle: n.borderStyle ?? l.borderStyle,
|
|
38
|
+
borderColor: n.borderColor ?? l.borderColor,
|
|
39
|
+
textPadding: n.textPadding ?? l.textPadding,
|
|
40
|
+
textShadow: n.textShadow ?? l.textShadow,
|
|
41
|
+
objectShadow: n.objectShadow ?? l.objectShadow,
|
|
42
|
+
responsive: n.responsive ?? l.responsive,
|
|
43
|
+
scaling: n.scaling ?? l.scaling,
|
|
44
|
+
maxLines: n.maxLines ?? l.maxLines,
|
|
45
|
+
position: n.position ?? l.position,
|
|
46
|
+
align: n.align ?? l.align,
|
|
47
|
+
richTextScaling: n.richTextScaling ?? l.richTextScaling,
|
|
48
|
+
richTextResponsive: n.richTextResponsive ?? l.richTextResponsive,
|
|
49
|
+
richTextMaxLines: n.richTextMaxLines ?? l.richTextMaxLines
|
|
50
50
|
};
|
|
51
51
|
}, F = 8, I = (e, t, n) => {
|
|
52
|
-
let r = t.fontSize ??
|
|
52
|
+
let r = t.fontSize ?? l.fontSize, i = t.letterSpacing ?? l.letterSpacing;
|
|
53
53
|
if (n.width === 0) return r;
|
|
54
|
-
let a =
|
|
55
|
-
for (;
|
|
56
|
-
let r = Math.floor((
|
|
54
|
+
let a = T(), o = 0, s = 0, c = r;
|
|
55
|
+
for (; s <= c;) {
|
|
56
|
+
let r = Math.floor((s + c) / 2), { width: l, height: u } = a.getTextSize({
|
|
57
57
|
size: r,
|
|
58
58
|
label: e,
|
|
59
59
|
fontFamily: t.fontFamily ?? "",
|
|
60
60
|
letterSpacing: `${t.letterSpacing}`,
|
|
61
61
|
fontWeight: t.bold ? 700 : 400,
|
|
62
62
|
lineHeight: t.lineSpacing
|
|
63
|
-
}), d = Math.ceil((
|
|
64
|
-
f || p ?
|
|
63
|
+
}), d = Math.ceil((l + i) / (n.width - F * 2)), f = !t.wordWrap && d > 1, p = u * d * 1.2 + F * 2 > n.height;
|
|
64
|
+
f || p ? c = r - 1 : (o = r, s = r + 1);
|
|
65
65
|
}
|
|
66
66
|
return a.cleanDOM(), o;
|
|
67
|
-
}, L = (e, t) => e ? t :
|
|
68
|
-
let r = t.textPadding ??
|
|
67
|
+
}, L = (e, t) => e ? t : _.None, R = (e) => e === _.ViewportWidth ? "vw" : "px", ee = (e, t, n) => {
|
|
68
|
+
let r = t.textPadding ?? l.textPadding;
|
|
69
69
|
return I(e, t, {
|
|
70
70
|
width: n.width - r * 2,
|
|
71
71
|
height: n.height - r * 2
|
|
@@ -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 = O(), ne = v({
|
|
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 = v({
|
|
160
160
|
mainContainer: {
|
|
161
161
|
width: "100%",
|
|
162
162
|
height: "100%",
|
|
@@ -173,7 +173,7 @@ var N = /* @__PURE__ */ e(y()), P = (e, t) => {
|
|
|
173
173
|
overflowX: "hidden",
|
|
174
174
|
lineHeight: 1,
|
|
175
175
|
color: "#1F1C3B",
|
|
176
|
-
fontFamily:
|
|
176
|
+
fontFamily: m("Roboto"),
|
|
177
177
|
fontStyle: "normal",
|
|
178
178
|
fontWeight: 700
|
|
179
179
|
},
|
|
@@ -191,7 +191,7 @@ var N = /* @__PURE__ */ e(y()), P = (e, t) => {
|
|
|
191
191
|
WebkitBoxOrient: "vertical"
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
-
|
|
194
|
+
m("Roboto");
|
|
195
195
|
var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto;\n", W = `
|
|
196
196
|
width: 100%;
|
|
197
197
|
height: 100%;
|
|
@@ -203,7 +203,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
203
203
|
overflow: auto;
|
|
204
204
|
line-height: 1;
|
|
205
205
|
color: #1F1C3B;
|
|
206
|
-
font-family: Roboto, ${
|
|
206
|
+
font-family: Roboto, ${u};
|
|
207
207
|
font-style: normal;
|
|
208
208
|
font-weight: 700;
|
|
209
209
|
`, G = "\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", K = /* @__PURE__ */ t(((e, t) => {
|
|
@@ -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 = g(), 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 = g(), 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
|
}
|
|
@@ -480,8 +480,8 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
480
480
|
t.exports = ce()(function(e, t, n) {
|
|
481
481
|
return e + (n ? "-" : "") + t.toLowerCase();
|
|
482
482
|
});
|
|
483
|
-
})))()), ue = (e, t =
|
|
484
|
-
let
|
|
483
|
+
})))()), ue = (e, t = l.fontSize, n = "px") => {
|
|
484
|
+
let r = [e.underlined ? "underline" : void 0, e.strikethrough ? "line-through" : void 0].filter((e) => !!e).join(" "), a = Math.ceil(t / 10);
|
|
485
485
|
return {
|
|
486
486
|
fontFamily: e.fontFamily ?? void 0,
|
|
487
487
|
fontSize: `${t}${n}`,
|
|
@@ -489,13 +489,13 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
489
489
|
fontStyle: e.italic ? "italic" : "normal",
|
|
490
490
|
color: e.textColor ?? "inherit",
|
|
491
491
|
textAlign: e.align ?? "center",
|
|
492
|
-
textDecoration:
|
|
492
|
+
textDecoration: r,
|
|
493
493
|
letterSpacing: `${e.letterSpacing}px`,
|
|
494
494
|
lineHeight: e.lineSpacing,
|
|
495
|
-
whiteSpace: e.responsive || [
|
|
496
|
-
marginTop: e.position ===
|
|
497
|
-
marginBottom: e.position ===
|
|
498
|
-
textShadow: e.textShadow ? `0px 1px 2px ${
|
|
495
|
+
whiteSpace: e.responsive || [o.HTML, o.Markdown].includes(e.representation ?? l.representation) ? e.wordWrap ? "pre-line" : "nowrap" : "pre-line",
|
|
496
|
+
marginTop: e.position === p.Top ? "unset" : "auto",
|
|
497
|
+
marginBottom: e.position === p.Bottom ? "unset" : "auto",
|
|
498
|
+
textShadow: e.textShadow ? `0px 1px 2px ${i.black}` : "none",
|
|
499
499
|
paddingTop: a,
|
|
500
500
|
paddingBottom: a,
|
|
501
501
|
overflow: e.responsive ? "visible" : "hidden",
|
|
@@ -505,29 +505,29 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
505
505
|
display: e.responsive ? "initial" : "-webkit-box"
|
|
506
506
|
};
|
|
507
507
|
}, X = (e) => {
|
|
508
|
-
let t = e.borderStyle ===
|
|
508
|
+
let t = e.borderStyle === n.Line ? "solid" : "dashed";
|
|
509
509
|
return {
|
|
510
|
-
backgroundColor: (e.backgroundType ===
|
|
510
|
+
backgroundColor: (e.backgroundType === s.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)`,
|
|
514
|
-
boxShadow: e.objectShadow ? `0px 2px 4px ${
|
|
514
|
+
boxShadow: e.objectShadow ? `0px 2px 4px ${i.alphaBlack(.25)}` : "none"
|
|
515
515
|
};
|
|
516
516
|
}, Z = (e) => ({ padding: `${e.textPadding ?? 0}px` }), de = (e, t, n) => {
|
|
517
517
|
if (!n) return {};
|
|
518
|
-
let
|
|
518
|
+
let i = e.fontSize ?? l.fontSize;
|
|
519
519
|
switch (t) {
|
|
520
|
-
case
|
|
521
|
-
case
|
|
522
|
-
case
|
|
520
|
+
case r.ViewportWidth: return { fontSize: `${z(i)}vw` };
|
|
521
|
+
case r.ViewportHeight: return { fontSize: `${B(i)}vh` };
|
|
522
|
+
case r.ViewportWidthHeight: return { fontSize: `min(${z(i)}vw, ${B(i)}vh)` };
|
|
523
523
|
}
|
|
524
524
|
return {};
|
|
525
|
-
},
|
|
525
|
+
}, fe = {
|
|
526
526
|
borderStyle: "none",
|
|
527
527
|
width: "100%",
|
|
528
528
|
height: "100%",
|
|
529
529
|
position: "absolute"
|
|
530
|
-
},
|
|
530
|
+
}, Q = (e) => ({
|
|
531
531
|
objectFit: e.imageFitType ?? "contain",
|
|
532
532
|
opacity: e.imageOpacity ?? 1
|
|
533
533
|
}), pe = (e) => Object.entries(e).map(([e, t]) => {
|
|
@@ -548,60 +548,60 @@ 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 === o.Markdown ? `${t.paragraphMargin}px` : 0};
|
|
552
552
|
}
|
|
553
553
|
.astrato-html-container li {
|
|
554
554
|
white-space: normal;
|
|
555
555
|
}`, he = (e) => `<div class="astrato-html-main-container"><div class="astrato-html-container">${e}</div></div>`, ge = (e, t, n) => {
|
|
556
|
-
let { textContent: r, variableId: i, textContentType:
|
|
557
|
-
return [
|
|
556
|
+
let { textContent: r, variableId: i, textContentType: o = a.Text } = e;
|
|
557
|
+
return [a.Text, a.Delta].includes(o) ? 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 ===
|
|
561
|
-
let m = i?.daedalus.objectCapabilities.editable, h = e.backgroundType ===
|
|
562
|
-
...
|
|
559
|
+
let r = H(), i = y(), a = x(), { variablesDict: c } = C(), [u, d] = (0, N.useState)(""), f = ge(e, c, ""), p = e.fontSize ?? l.fontSize;
|
|
560
|
+
t === _.FitToObject && n ? p = ee(f, e, n) : t === _.ViewportWidth && (p = z(p));
|
|
561
|
+
let m = i?.daedalus.objectCapabilities.editable, h = e.backgroundType === s.Image, g = [o.HTML, o.Markdown].includes(e.representation ?? l.representation), v = ue(e, p, R(t)), b = X(e), S = Z(e), w = Q(e), T = {
|
|
562
|
+
...S,
|
|
563
563
|
...v,
|
|
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 === o.Markdown ? d(await A(f)) : d(f);
|
|
569
569
|
};
|
|
570
570
|
(async () => {
|
|
571
|
-
await t(), !h && !
|
|
571
|
+
await t(), !h && !g && a();
|
|
572
572
|
})();
|
|
573
573
|
}, [
|
|
574
|
-
|
|
574
|
+
f,
|
|
575
575
|
e.representation,
|
|
576
576
|
h,
|
|
577
|
-
|
|
577
|
+
g,
|
|
578
578
|
a
|
|
579
579
|
]);
|
|
580
|
-
let D = j(e.linkUrl ??
|
|
580
|
+
let D = j(e.linkUrl ?? l.linkUrl), O = !g && !e.responsive, k = !e.responsive && !g ? _e(u) : u;
|
|
581
581
|
return /* @__PURE__ */ (0, V.jsx)(M, {
|
|
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
|
-
|
|
588
|
+
g ? /* @__PURE__ */ (0, V.jsx)(E, {
|
|
589
589
|
html: he(k),
|
|
590
|
-
css: me(
|
|
591
|
-
style:
|
|
590
|
+
css: me(T, e),
|
|
591
|
+
style: fe,
|
|
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
|
-
m || !
|
|
602
|
+
m || !g ? /* @__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
607
|
style: v,
|
|
@@ -615,7 +615,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
615
615
|
textDecoration: "inherit",
|
|
616
616
|
color: "inherit"
|
|
617
617
|
},
|
|
618
|
-
children:
|
|
618
|
+
children: g ? "" : k
|
|
619
619
|
})
|
|
620
620
|
}) : /* @__PURE__ */ (0, V.jsx)("div", {
|
|
621
621
|
className: r.spanElement,
|
|
@@ -625,53 +625,53 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
625
625
|
},
|
|
626
626
|
"data-ellipsis": !0,
|
|
627
627
|
"data-testid": "simple-text-object-content",
|
|
628
|
-
children:
|
|
628
|
+
children: g ? "" : k
|
|
629
629
|
})
|
|
630
630
|
}) }) : null
|
|
631
631
|
]
|
|
632
632
|
})
|
|
633
633
|
});
|
|
634
634
|
}, ve = S($), ye = ({ textObjectSettings: e, isRichTextScalingSet: t }) => {
|
|
635
|
-
let n =
|
|
635
|
+
let n = y(), i = D(), a = X(e), o = Z(e), s = H(), c = x(), l = e.richTextScaling ?? r.ViewportBreakpoints, u = de(e, l, t);
|
|
636
636
|
return (0, N.useEffect)(() => {
|
|
637
|
-
|
|
638
|
-
}, [
|
|
639
|
-
className:
|
|
637
|
+
c();
|
|
638
|
+
}, [c]), /* @__PURE__ */ (0, V.jsx)("div", {
|
|
639
|
+
className: s.mainContainer,
|
|
640
640
|
style: {
|
|
641
|
-
...i,
|
|
642
641
|
...a,
|
|
642
|
+
...o,
|
|
643
643
|
...u
|
|
644
644
|
},
|
|
645
645
|
"data-testid": "simple-text-object-container",
|
|
646
646
|
children: /* @__PURE__ */ (0, V.jsx)(re, {
|
|
647
647
|
value: e.textContent,
|
|
648
648
|
backendAPI: n,
|
|
649
|
-
responsive: l ===
|
|
649
|
+
responsive: l === r.ViewportBreakpoints,
|
|
650
650
|
richTextResponsive: e.richTextResponsive,
|
|
651
651
|
richTextMaxLines: e.richTextMaxLines,
|
|
652
652
|
onSubmit: (t, n) => {
|
|
653
|
-
let
|
|
654
|
-
e.textContent === t && e.richTextResponsive ===
|
|
653
|
+
let r = n.overflowBehavior === "responsive", a = n.maxLines;
|
|
654
|
+
e.textContent === t && e.richTextResponsive === r && e.richTextMaxLines === a || k(i, {
|
|
655
655
|
textContent: t,
|
|
656
|
-
richTextResponsive:
|
|
656
|
+
richTextResponsive: r,
|
|
657
657
|
richTextMaxLines: a
|
|
658
658
|
});
|
|
659
659
|
}
|
|
660
660
|
})
|
|
661
661
|
});
|
|
662
662
|
}, be = (e) => {
|
|
663
|
-
if (!e.vSpec || !
|
|
664
|
-
let t = e.vTheme ??
|
|
663
|
+
if (!e.vSpec || !c(e.vSpec)) return null;
|
|
664
|
+
let t = e.vTheme ?? f, n = P(e.vSpec, t), r = L(n.responsive ?? l.responsive, n.scaling ?? l.scaling), i = {
|
|
665
665
|
...e,
|
|
666
666
|
scaling: r,
|
|
667
667
|
textObjectSettings: n
|
|
668
668
|
};
|
|
669
|
-
if (n.textContentType ===
|
|
669
|
+
if (n.textContentType === a.Delta) return /* @__PURE__ */ (0, V.jsx)(ye, {
|
|
670
670
|
textObjectSettings: n,
|
|
671
671
|
isRichTextScalingSet: e.vSpec?.simpleTextObjectSettings?.richTextScaling !== void 0
|
|
672
672
|
});
|
|
673
673
|
switch (r) {
|
|
674
|
-
case
|
|
674
|
+
case _.FitToObject: return /* @__PURE__ */ (0, V.jsx)(ve, { ...i });
|
|
675
675
|
default: return /* @__PURE__ */ (0, V.jsx)($, { ...i });
|
|
676
676
|
}
|
|
677
677
|
};
|