@astrato-io/visualizations 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +3 -3
- package/VISUALIZATION_DEFINITIONS.md +65 -12
- package/chunks/{Button-CCF851ea.js → Button-Dn3rJrYf.js} +2 -2
- package/chunks/{CircularProgress-yupH6YWs.js → CircularProgress-BFeu06Yb.js} +4 -4
- package/chunks/{FieldTypeIcon-D_MzsdfY.js → FieldTypeIcon-DrMoGpHJ.js} +2 -2
- package/chunks/{LinearProgress-CyFjN4px.js → LinearProgress-ClO6GUjN.js} +2 -2
- package/chunks/{MenuOption-CQpT79AP.js → MenuOption-Czc34u4q.js} +7 -7
- package/chunks/{Title-C-p4ZarD.js → Title-BgYnaVTR.js} +3 -3
- package/chunks/{_createAggregator-BF4qG9XK.js → _createAggregator-BMu9uRax.js} +8 -8
- package/chunks/{app-filter-bar.compiler-8fxCo2q7.js → app-filter-bar.compiler-CVir0wkl.js} +3 -3
- package/chunks/{bar-layout-DStC-GNV.js → bar-layout-C_UgRlVl.js} +2 -2
- package/chunks/{bar.compiler-CQAu8KL8.js → bar.compiler-DYuFdi9J.js} +8 -8
- package/chunks/{builder-CScg1TOS.js → builder-C-TKA-My.js} +11 -11
- package/chunks/{coloring-9jU3s_-p.js → coloring-BtnPiQ_o.js} +16 -16
- package/chunks/{createSimplePaletteValueFilter-C4hZpCdn.js → createSimplePaletteValueFilter--zrZxRV9.js} +1 -1
- package/chunks/defaults-Dtk7fg3C.js +3 -0
- package/chunks/{definitions-C4grxhye.js → definitions-CT304NDn.js} +77 -51
- package/chunks/{escobar-CjirINHP.js → escobar-CvEV2ES1.js} +6126 -6059
- package/chunks/{extend-preset-D-l9u_we.js → extend-preset-D9-JP92b.js} +396 -396
- package/chunks/{filter.compiler-lji2Acgn.js → filter.compiler-CXeZznks.js} +7 -7
- package/chunks/{filtering-C1zakrrX.js → filtering-8_bFv-jb.js} +84 -84
- package/chunks/{handlers-ZviIUC-j.js → handlers-C6CZ0XJA.js} +5620 -5608
- package/chunks/{icon-picker-styles-Bj80ZUBK.js → icon-picker-styles-BXiJ1SZS.js} +2 -2
- package/chunks/{isEqual-Ch9OEye3.js → isEqual-D8Ay63xR.js} +1 -1
- package/chunks/{isFocusVisible-CgMP0qkR.js → isFocusVisible-Bu8gGZu5.js} +1 -1
- package/chunks/{line.compiler-De5fiKuR.js → line.compiler-DmHpmQCC.js} +4 -4
- package/chunks/{logger-CKRjhSHQ.js → logger-DdZpR7xZ.js} +65 -65
- package/chunks/{map.compiler-CKzorLgK.js → map.compiler-Q_Y1Pvat.js} +12 -14
- package/chunks/{metadata-Bb9pTXrq.js → metadata-BQm_TXI1.js} +1 -1
- package/chunks/{number.compiler-CaTmJkmi.js → number.compiler-DQdg6zTy.js} +4 -4
- package/chunks/{operations-DZoY50VX.js → operations-DKQWuLL7.js} +9469 -9451
- package/chunks/{range-D1BTmFMp.js → range-BdhzvYQ_.js} +2 -2
- package/chunks/{react-dom-Dgv2azN2.js → react-dom-BGP4tbXV.js} +1 -1
- package/chunks/{render-wrappers-_P3xwu5A.js → render-wrappers-BZpyDnJy.js} +1 -1
- package/chunks/{requirements-NHNrR8Ie.js → requirements-e8Fe96ag.js} +29 -29
- package/chunks/{shared-UitWpq1J.js → shared-C_2F90xq.js} +478 -472
- package/chunks/{standalone-wgFAVnnm.js → standalone-4MsKiqs0.js} +130 -130
- package/chunks/standalone-B794g9pE.js +1012 -0
- package/chunks/{standalone-BBu90BhK.js → standalone-B8ZSqauS.js} +59 -59
- package/chunks/standalone-BA2YXyJS.js +422 -0
- package/chunks/{standalone-DtBk_iUz.js → standalone-BDrXVxlP.js} +4 -4
- package/chunks/{standalone-U0WJwFlG.js → standalone-BE_ONgiG.js} +64 -64
- package/chunks/{standalone-BOzHA_d4.js → standalone-BTY3w_JA.js} +24 -24
- package/chunks/{standalone-BEekPuA12.js → standalone-BgumbdaJ2.js} +101 -101
- package/chunks/{standalone-Bnnr87pc.js → standalone-BkbiH-o8.js} +174 -174
- package/chunks/{standalone-xGV0dqPV.js → standalone-Blh4qejk.js} +197 -197
- package/chunks/{standalone-DxBAyqAu.js → standalone-CXY4FpF7.js} +278 -277
- package/chunks/{standalone-CVknVdUC.js → standalone-CY_kjarf.js} +18 -18
- package/chunks/{standalone-BapqaniK.js → standalone-CaTxAydz.js} +54 -54
- package/chunks/{standalone-CRdDZYeM.js → standalone-Cc98Pdr6.js} +829 -829
- package/chunks/standalone-Cl0TSfqC.js +396 -0
- package/chunks/{standalone-B0U6c3su.js → standalone-CsoMmE9T.js} +80 -80
- package/chunks/standalone-DH0xTEes.js +2 -0
- package/chunks/{standalone-ByKKqT5L.js → standalone-DHRalbVO.js} +268 -268
- package/chunks/{standalone-CbPk8bKn.js → standalone-DNh9NcMa.js} +109 -109
- package/chunks/standalone-DcnHjNnC.js +2 -0
- package/chunks/{standalone-Ck63MZzj.js → standalone-DflyWtuR.js} +107 -107
- package/chunks/standalone-DrHdGkY7.js +762 -0
- package/chunks/standalone-c_rROMtx.js +287 -0
- package/chunks/{standalone-DibjA73M.js → standalone-drcFLeN6.js} +2 -2
- package/chunks/{standalone-swGs70tD.js → standalone-wOWRCpdn.js} +26 -26
- package/chunks/{standalone-DCFY1MAV.js → standalone-z0o52o5t.js} +4191 -4191
- package/chunks/{table.compiler-OWSx5MOq.js → table.compiler-COaHE9VD.js} +18 -18
- package/chunks/{useFieldName-B8iCYyw1.js → useFieldName-CdnCWzhd.js} +1 -1
- package/chunks/{utils-3Igg6xmO.js → utils-DganVptf.js} +491 -483
- package/chunks/{view-DdMLZySj.js → view-Bzlros43.js} +158 -158
- package/chunks/{visualization-filters-CzvFHE6M.js → visualization-filters-D7i6oh1Z.js} +23 -12
- package/chunks/{with-html-element-DOfkR3C1.js → with-html-element-CiIhFEa5.js} +2497 -2497
- 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 +19 -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 +1 -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 +54 -54
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +67 -67
- package/src/definitions/index.d.ts +7 -1
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +31 -5
- package/src/definitions/model/definitions/types/compilation.types.d.ts +4 -1
- package/src/types.d.ts +28 -28
- package/chunks/defaults-cyNhn37t.js +0 -3
- package/chunks/standalone-BR2JuRIC.js +0 -422
- package/chunks/standalone-BwJqDj2Z.js +0 -396
- package/chunks/standalone-CRfDOO1x.js +0 -287
- package/chunks/standalone-DZDGX3aa.js +0 -518
- package/chunks/standalone-DhfgeJIk.js +0 -1012
- package/chunks/standalone-KMQPsNsq.js +0 -2
- package/chunks/standalone-MBLSvsrY.js +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
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-
|
|
4
|
-
import { St as k } from "./handlers-
|
|
2
|
+
import { Ha as n, Oa as r, To as i, Ua as a, Wa as o, es as s, fc as c, fi as l, ia as u, ms as d, na as f, ra as p, sa as m, ta as h, vr as g, wo as _ } from "./visualization-filters-D7i6oh1Z.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-DganVptf.js";
|
|
4
|
+
import { St as k } from "./handlers-C6CZ0XJA.js";
|
|
5
5
|
import { n as A, t as j } from "./url-utils-B17gj_mr.js";
|
|
6
|
-
import { t as M } from "./Title-
|
|
6
|
+
import { t as M } from "./Title-BgYnaVTR.js";
|
|
7
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 ?
|
|
8
|
+
let n = e?.simpleTextObjectSettings || {}, r = n.fontFamily ?? l.fontFamily, i = n.textColor ?? l.textColor, o = t ? p(t, r) : r, s = t ? f(t, i) : i, { borderEnabled: c = l.borderEnabled, borderRadius: u = l.borderRadius, borderWidth: d = l.borderWidth } = n;
|
|
9
9
|
return {
|
|
10
10
|
textContentType: n.textContentType ?? a.Text,
|
|
11
11
|
textContent: n.textContent ?? l.textContent,
|
|
@@ -32,8 +32,8 @@ var N = /* @__PURE__ */ e(b()), P = (e, t) => {
|
|
|
32
32
|
backgroundImage: n.backgroundImage ?? void 0,
|
|
33
33
|
imageFitType: n.imageFitType ?? l.imageFitType,
|
|
34
34
|
borderEnabled: c,
|
|
35
|
-
borderWidth: c ?? !!
|
|
36
|
-
borderRadius: c ?? !!
|
|
35
|
+
borderWidth: c ?? !!d ? d : 0,
|
|
36
|
+
borderRadius: c ?? !!d ? u : 0,
|
|
37
37
|
borderStyle: n.borderStyle ?? l.borderStyle,
|
|
38
38
|
borderColor: n.borderColor ?? l.borderColor,
|
|
39
39
|
textPadding: n.textPadding ?? l.textPadding,
|
|
@@ -64,7 +64,7 @@ var N = /* @__PURE__ */ e(b()), P = (e, t) => {
|
|
|
64
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 :
|
|
67
|
+
}, L = (e, t) => e ? t : i.None, R = (e) => e === i.ViewportWidth ? "vw" : "px", ee = (e, t, n) => {
|
|
68
68
|
let r = t.textPadding ?? l.textPadding;
|
|
69
69
|
return I(e, t, {
|
|
70
70
|
width: n.width - r * 2,
|
|
@@ -173,7 +173,7 @@ var N = /* @__PURE__ */ e(b()), P = (e, t) => {
|
|
|
173
173
|
overflowX: "hidden",
|
|
174
174
|
lineHeight: 1,
|
|
175
175
|
color: "#1F1C3B",
|
|
176
|
-
fontFamily:
|
|
176
|
+
fontFamily: u("Roboto"),
|
|
177
177
|
fontStyle: "normal",
|
|
178
178
|
fontWeight: 700
|
|
179
179
|
},
|
|
@@ -191,7 +191,7 @@ var N = /* @__PURE__ */ e(b()), P = (e, t) => {
|
|
|
191
191
|
WebkitBoxOrient: "vertical"
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
-
|
|
194
|
+
u("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, ${h};
|
|
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) => {
|
|
@@ -481,7 +481,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
481
481
|
return e + (n ? "-" : "") + t.toLowerCase();
|
|
482
482
|
});
|
|
483
483
|
})))()), ue = (e, t = l.fontSize, n = "px") => {
|
|
484
|
-
let
|
|
484
|
+
let i = [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: i,
|
|
493
493
|
letterSpacing: `${e.letterSpacing}px`,
|
|
494
494
|
lineHeight: e.lineSpacing,
|
|
495
495
|
whiteSpace: e.responsive || [o.HTML, o.Markdown].includes(e.representation ?? l.representation) ? e.wordWrap ? "pre-line" : "nowrap" : "pre-line",
|
|
496
|
-
marginTop: e.position ===
|
|
497
|
-
marginBottom: e.position ===
|
|
498
|
-
textShadow: e.textShadow ? `0px 1px 2px ${
|
|
496
|
+
marginTop: e.position === d.Top ? "unset" : "auto",
|
|
497
|
+
marginBottom: e.position === d.Bottom ? "unset" : "auto",
|
|
498
|
+
textShadow: e.textShadow ? `0px 1px 2px ${r.black}` : "none",
|
|
499
499
|
paddingTop: a,
|
|
500
500
|
paddingBottom: a,
|
|
501
501
|
overflow: e.responsive ? "visible" : "hidden",
|
|
@@ -505,21 +505,21 @@ 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 === s.Line ? "solid" : "dashed";
|
|
509
509
|
return {
|
|
510
|
-
backgroundColor: (e.backgroundType ===
|
|
510
|
+
backgroundColor: (e.backgroundType === n.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 ${r.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 r = e.fontSize ?? l.fontSize;
|
|
519
519
|
switch (t) {
|
|
520
|
-
case
|
|
521
|
-
case
|
|
522
|
-
case
|
|
520
|
+
case _.ViewportWidth: return { fontSize: `${z(r)}vw` };
|
|
521
|
+
case _.ViewportHeight: return { fontSize: `${B(r)}vh` };
|
|
522
|
+
case _.ViewportWidthHeight: return { fontSize: `min(${z(r)}vw, ${B(r)}vh)` };
|
|
523
523
|
}
|
|
524
524
|
return {};
|
|
525
525
|
}, fe = {
|
|
@@ -555,55 +555,55 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
555
555
|
}`, he = (e) => `<div class="astrato-html-main-container"><div class="astrato-html-container">${e}</div></div>`, ge = (e, t, n) => {
|
|
556
556
|
let { textContent: r, variableId: i, textContentType: o = a.Text } = e;
|
|
557
557
|
return [a.Text, a.Delta].includes(o) ? r || n : i ? `${t[i]?.value ?? ""}` : n;
|
|
558
|
-
}, _e = (e) => e.replace(/(\r\n|\n|\r)/g, " "), $ = ({ textObjectSettings: e, scaling: t, elementSize:
|
|
559
|
-
let
|
|
560
|
-
t ===
|
|
561
|
-
let
|
|
558
|
+
}, _e = (e) => e.replace(/(\r\n|\n|\r)/g, " "), $ = ({ textObjectSettings: e, scaling: t, elementSize: r }) => {
|
|
559
|
+
let a = H(), s = y(), c = x(), { variablesDict: u } = C(), [d, f] = (0, N.useState)(""), p = ge(e, u, ""), m = e.fontSize ?? l.fontSize;
|
|
560
|
+
t === i.FitToObject && r ? m = ee(p, e, r) : t === i.ViewportWidth && (m = z(m));
|
|
561
|
+
let h = s?.daedalus.objectCapabilities.editable, g = e.backgroundType === n.Image, _ = [o.HTML, o.Markdown].includes(e.representation ?? l.representation), v = ue(e, m, R(t)), b = X(e), S = Z(e), w = Q(e), T = {
|
|
562
562
|
...S,
|
|
563
563
|
...v,
|
|
564
564
|
fontSize: `${e.fontSize}px`
|
|
565
565
|
};
|
|
566
566
|
delete T.paddingBottom, delete T.paddingTop, delete T.display, (0, N.useEffect)(() => {
|
|
567
567
|
let t = async () => {
|
|
568
|
-
e.representation === o.Markdown ?
|
|
568
|
+
e.representation === o.Markdown ? f(await A(p)) : f(p);
|
|
569
569
|
};
|
|
570
570
|
(async () => {
|
|
571
|
-
await t(), !
|
|
571
|
+
await t(), !g && !_ && c();
|
|
572
572
|
})();
|
|
573
573
|
}, [
|
|
574
|
-
|
|
574
|
+
p,
|
|
575
575
|
e.representation,
|
|
576
|
-
h,
|
|
577
576
|
g,
|
|
578
|
-
|
|
577
|
+
_,
|
|
578
|
+
c
|
|
579
579
|
]);
|
|
580
|
-
let D = j(e.linkUrl ?? l.linkUrl), O = !
|
|
580
|
+
let D = j(e.linkUrl ?? l.linkUrl), O = !_ && !e.responsive, k = !e.responsive && !_ ? _e(d) : d;
|
|
581
581
|
return /* @__PURE__ */ (0, V.jsx)(M, {
|
|
582
582
|
title: O ? k : null,
|
|
583
583
|
children: /* @__PURE__ */ (0, V.jsxs)("div", {
|
|
584
|
-
className:
|
|
584
|
+
className: a.mainContainer,
|
|
585
585
|
style: b,
|
|
586
586
|
"data-testid": "simple-text-object-container",
|
|
587
587
|
children: [
|
|
588
|
-
|
|
588
|
+
_ ? /* @__PURE__ */ (0, V.jsx)(E, {
|
|
589
589
|
html: he(k),
|
|
590
590
|
css: me(T, e),
|
|
591
591
|
style: fe,
|
|
592
|
-
onRendered:
|
|
592
|
+
onRendered: c
|
|
593
593
|
}) : null,
|
|
594
|
-
|
|
594
|
+
g ? /* @__PURE__ */ (0, V.jsx)("img", {
|
|
595
595
|
src: e.backgroundImage,
|
|
596
|
-
className:
|
|
596
|
+
className: a.image,
|
|
597
597
|
style: w,
|
|
598
|
-
onLoad: () =>
|
|
599
|
-
onError: () =>
|
|
598
|
+
onLoad: () => c(),
|
|
599
|
+
onError: () => c(),
|
|
600
600
|
alt: "text background"
|
|
601
601
|
}) : null,
|
|
602
|
-
|
|
603
|
-
className:
|
|
602
|
+
h || !_ ? /* @__PURE__ */ (0, V.jsx)(V.Fragment, { children: /* @__PURE__ */ (0, V.jsx)("div", {
|
|
603
|
+
className: a.textContainer,
|
|
604
604
|
style: S,
|
|
605
605
|
children: e.linkEnabled && D ? /* @__PURE__ */ (0, V.jsx)("div", {
|
|
606
|
-
className:
|
|
606
|
+
className: a.spanElement,
|
|
607
607
|
style: v,
|
|
608
608
|
"data-ellipsis": !0,
|
|
609
609
|
"data-testid": "simple-text-object-content",
|
|
@@ -615,45 +615,45 @@ 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: _ ? "" : k
|
|
619
619
|
})
|
|
620
620
|
}) : /* @__PURE__ */ (0, V.jsx)("div", {
|
|
621
|
-
className:
|
|
621
|
+
className: a.spanElement,
|
|
622
622
|
style: {
|
|
623
623
|
...v,
|
|
624
624
|
pointerEvents: "none"
|
|
625
625
|
},
|
|
626
626
|
"data-ellipsis": !0,
|
|
627
627
|
"data-testid": "simple-text-object-content",
|
|
628
|
-
children:
|
|
628
|
+
children: _ ? "" : k
|
|
629
629
|
})
|
|
630
630
|
}) }) : null
|
|
631
631
|
]
|
|
632
632
|
})
|
|
633
633
|
});
|
|
634
634
|
}, ve = S($), ye = ({ textObjectSettings: e, isRichTextScalingSet: t }) => {
|
|
635
|
-
let n = y(),
|
|
635
|
+
let n = y(), r = D(), i = X(e), a = Z(e), o = H(), s = x(), c = e.richTextScaling ?? _.ViewportBreakpoints, l = de(e, c, t);
|
|
636
636
|
return (0, N.useEffect)(() => {
|
|
637
|
-
|
|
638
|
-
}, [
|
|
639
|
-
className:
|
|
637
|
+
s();
|
|
638
|
+
}, [s]), /* @__PURE__ */ (0, V.jsx)("div", {
|
|
639
|
+
className: o.mainContainer,
|
|
640
640
|
style: {
|
|
641
|
+
...i,
|
|
641
642
|
...a,
|
|
642
|
-
...
|
|
643
|
-
...u
|
|
643
|
+
...l
|
|
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:
|
|
649
|
+
responsive: c === _.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 i = n.overflowBehavior === "responsive", a = n.maxLines;
|
|
654
|
+
e.textContent === t && e.richTextResponsive === i && e.richTextMaxLines === a || k(r, {
|
|
655
655
|
textContent: t,
|
|
656
|
-
richTextResponsive:
|
|
656
|
+
richTextResponsive: i,
|
|
657
657
|
richTextMaxLines: a
|
|
658
658
|
});
|
|
659
659
|
}
|
|
@@ -661,7 +661,7 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
661
661
|
});
|
|
662
662
|
}, be = (e) => {
|
|
663
663
|
if (!e.vSpec || !c(e.vSpec)) return null;
|
|
664
|
-
let t = e.vTheme ??
|
|
664
|
+
let t = e.vTheme ?? m, n = P(e.vSpec, t), r = L(n.responsive ?? l.responsive, n.scaling ?? l.scaling), o = {
|
|
665
665
|
...e,
|
|
666
666
|
scaling: r,
|
|
667
667
|
textObjectSettings: n
|
|
@@ -671,8 +671,8 @@ var U = "\n height: 100%; \n width: 100%;\n display: block;\n overflow: auto
|
|
|
671
671
|
isRichTextScalingSet: e.vSpec?.simpleTextObjectSettings?.richTextScaling !== void 0
|
|
672
672
|
});
|
|
673
673
|
switch (r) {
|
|
674
|
-
case
|
|
675
|
-
default: return /* @__PURE__ */ (0, V.jsx)($, { ...
|
|
674
|
+
case i.FitToObject: return /* @__PURE__ */ (0, V.jsx)(ve, { ...o });
|
|
675
|
+
default: return /* @__PURE__ */ (0, V.jsx)($, { ...o });
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
678
|
export { be as SimpleTextObject };
|