@astrato-io/visualizations 0.10.1 → 0.11.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/CHANGELOG.md +11 -1
- package/README.md +19 -1
- package/THIRD_PARTY_NOTICES.md +494 -0
- package/VISUALIZATION_DEFINITIONS.md +6 -145
- package/chunks/{Button-Dn3rJrYf.js → Button-CPG4WX8X.js} +3 -3
- package/chunks/{CircularProgress-BFeu06Yb.js → CircularProgress-PSLW8HmD.js} +12 -12
- package/chunks/FieldTypeIcon-5k2bkqd0.js +22 -0
- package/chunks/{LinearProgress-ClO6GUjN.js → LinearProgress-KQ2EQlGL.js} +16 -16
- package/chunks/{MenuOption-Czc34u4q.js → MenuOption-B-6K7kks.js} +151 -151
- package/chunks/{Title-BgYnaVTR.js → Title-BmvwZYkh.js} +32 -32
- package/chunks/{_createAggregator-BMu9uRax.js → _createAggregator-CFmH6gUN.js} +16 -16
- package/chunks/{app-filter-bar.compiler-CVir0wkl.js → app-filter-bar.compiler-BY5-T16I.js} +8 -8
- package/chunks/{bar-layout-C_UgRlVl.js → bar-layout-BNou0dZF.js} +2 -2
- package/chunks/{bar.compiler-DYuFdi9J.js → bar.compiler-BkhO7sDd.js} +58 -56
- package/chunks/{builder-C-TKA-My.js → builder-CNjuqD2z.js} +107 -56
- package/chunks/category-axis-D1OVyMrr.js +20 -0
- package/chunks/{coloring-BtnPiQ_o.js → coloring-BOiP0rmn.js} +51 -51
- package/chunks/{createSimplePaletteValueFilter--zrZxRV9.js → createSimplePaletteValueFilter-BkgQ7MFE.js} +166 -166
- package/chunks/defaults-B5_8S-J-.js +3 -0
- package/chunks/{definitions-CT304NDn.js → definitions-AS9GcavE.js} +228 -233
- package/chunks/{escobar-CvEV2ES1.js → escobar-cQ1eQ64G.js} +4183 -4183
- package/chunks/{extend-preset-D9-JP92b.js → extend-preset-BlCbcXKR.js} +427 -427
- package/chunks/{filter.compiler-CXeZznks.js → filter.compiler-CI7dDNM1.js} +10 -10
- package/chunks/{filtering-8_bFv-jb.js → filtering-Dwi7hDPZ.js} +308 -308
- package/chunks/{handlers-C6CZ0XJA.js → handlers-C63NVo7i.js} +4593 -4559
- package/chunks/{icon-picker-styles-BXiJ1SZS.js → icon-picker-styles-CBlxEu3s.js} +8 -8
- package/chunks/{isEqual-D8Ay63xR.js → isEqual-BdHo6wqq.js} +1 -1
- package/chunks/{isFocusVisible-Bu8gGZu5.js → isFocusVisible-C1nlVUwL.js} +9 -9
- package/chunks/line.compiler-DCv3h42f.js +198 -0
- package/chunks/linear-Bq_r9l5S.js +264 -0
- package/chunks/{logger-DdZpR7xZ.js → logger-Bc-DqDM_.js} +64 -64
- package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
- package/chunks/{map.compiler-Q_Y1Pvat.js → map.compiler-CRO6XpdI.js} +43 -43
- package/chunks/measure-format-default-B6ghxih7.js +22 -0
- package/chunks/{metadata-BQm_TXI1.js → metadata-CtkvZEhS.js} +1 -1
- package/chunks/number.compiler-kV4lobCZ.js +57 -0
- package/chunks/{operations-DKQWuLL7.js → operations-COl9wgqi.js} +8524 -8480
- package/chunks/{range-BdhzvYQ_.js → range-CMJ5yc5Z.js} +2 -2
- package/chunks/{react-dom-BGP4tbXV.js → react-dom-BjsCbYHq.js} +76 -76
- package/chunks/{render-wrappers-BZpyDnJy.js → render-wrappers-DFHi3Wkr.js} +1 -1
- package/chunks/{requirements-e8Fe96ag.js → requirements-C5YLmHKe.js} +250 -226
- package/chunks/{shared-C_2F90xq.js → shared-DyqxOie0.js} +504 -498
- package/chunks/standalone-06i1wmIX.js +6 -0
- package/chunks/{standalone-BDrXVxlP.js → standalone-9jrQ3zJT.js} +10 -10
- package/chunks/standalone-B6zUvxNQ.js +357 -0
- package/chunks/{standalone-BkbiH-o8.js → standalone-BYK2U0Vd.js} +418 -679
- package/chunks/standalone-Be5APcVv.js +762 -0
- package/chunks/{standalone-Cl0TSfqC.js → standalone-Bp4G3MDx.js} +123 -123
- package/chunks/{standalone-DNh9NcMa.js → standalone-BrjtMIdd.js} +145 -145
- package/chunks/{standalone-BTY3w_JA.js → standalone-Bsfz5vnJ.js} +53 -53
- package/chunks/standalone-BuXpKMnc.js +2 -0
- package/chunks/standalone-CIjNYyya.js +8378 -0
- package/chunks/{standalone-CsoMmE9T.js → standalone-CS5VGoja.js} +347 -347
- package/chunks/standalone-CUGt2FUF.js +2 -0
- package/chunks/{standalone-CaTxAydz.js → standalone-ChfEHb28.js} +2296 -1069
- package/chunks/standalone-CnF2OYLQ.js +355 -0
- package/chunks/standalone-CznEEiq3.js +422 -0
- package/chunks/{standalone-DflyWtuR.js → standalone-D9k5SCd8.js} +169 -169
- package/chunks/{standalone-Cc98Pdr6.js → standalone-DYVYccmY.js} +829 -829
- package/chunks/{standalone-CY_kjarf.js → standalone-DaNxWIKn.js} +22 -22
- package/chunks/{standalone-wOWRCpdn.js → standalone-Db_HNuWx.js} +48 -48
- package/chunks/standalone-DcuE8KBa.js +287 -0
- package/chunks/{standalone-BE_ONgiG.js → standalone-I5kRIsp8.js} +76 -76
- package/chunks/{standalone-B8ZSqauS.js → standalone-K2OvRAQM.js} +113 -113
- package/chunks/{standalone-z0o52o5t.js → standalone-c4CPN6ug.js} +1719 -1718
- package/chunks/{standalone-DHRalbVO.js → standalone-iOnJhCvA.js} +312 -312
- package/chunks/{standalone-CXY4FpF7.js → standalone-pCrzBiTy.js} +222 -222
- package/chunks/standalone-qrZaimgC.js +689 -0
- package/chunks/standalone-yqDJ8h3K.js +1012 -0
- package/chunks/{table.compiler-COaHE9VD.js → table.compiler-CMH_dtYs.js} +35 -35
- package/chunks/{useFieldName-CdnCWzhd.js → useFieldName-BfxBzhhH.js} +1 -1
- package/chunks/{utils-DganVptf.js → utils-BdJrEeIQ.js} +3924 -3910
- package/chunks/{view-Bzlros43.js → view-Q-_XIrWE.js} +1680 -1680
- package/chunks/{visualization-filters-D7i6oh1Z.js → visualization-filters-BwS0xUqs.js} +1705 -1686
- package/chunks/{with-html-element-CiIhFEa5.js → with-html-element-D_ooGNWI.js} +3962 -3950
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +30 -1
- package/docs/operations/combo.md +30 -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 +5 -4
- package/docs/operations/line.md +30 -1
- package/docs/operations/map.md +5274 -0
- 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 +3 -3
- package/index.js +524 -500
- package/metadata.js +2 -2
- package/operations.js +6 -6
- package/package.json +73 -68
- package/src/definitions/index.d.ts +1 -7
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +3 -48
- package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +14 -2
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +1 -1
- package/src/visualization-catalog.d.ts +3 -0
- package/styles.css +1 -1
- package/chunks/FieldTypeIcon-DrMoGpHJ.js +0 -22
- package/chunks/defaults-Dtk7fg3C.js +0 -3
- package/chunks/line.compiler-DmHpmQCC.js +0 -198
- package/chunks/number.compiler-DQdg6zTy.js +0 -53
- package/chunks/standalone-4MsKiqs0.js +0 -355
- package/chunks/standalone-B794g9pE.js +0 -1012
- package/chunks/standalone-BA2YXyJS.js +0 -422
- package/chunks/standalone-BgumbdaJ2.js +0 -357
- package/chunks/standalone-Blh4qejk.js +0 -689
- package/chunks/standalone-DH0xTEes.js +0 -2
- package/chunks/standalone-DcnHjNnC.js +0 -2
- package/chunks/standalone-DrHdGkY7.js +0 -762
- package/chunks/standalone-c_rROMtx.js +0 -287
- package/chunks/standalone-drcFLeN6.js +0 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { fa as t, gc as n, lo as r, ss as i, uo as a } from "./visualization-filters-BwS0xUqs.js";
|
|
3
|
+
import { Br as o, G as s, Mt as c, W as l, f as u, li as d } from "./utils-BdJrEeIQ.js";
|
|
4
4
|
import { t as f } from "./stroke-dash-UgMEcCS4.js";
|
|
5
|
-
import {
|
|
6
|
-
var m = /* @__PURE__ */ e(
|
|
7
|
-
shape:
|
|
5
|
+
import { c as p } from "./coloring-BOiP0rmn.js";
|
|
6
|
+
var m = /* @__PURE__ */ e(d()), h = (e) => e === a.Line || e === a.Elbow, g = {
|
|
7
|
+
shape: a.Square,
|
|
8
8
|
backgroundColor: { code: "#c4c4c4" },
|
|
9
9
|
backgroundType: "color",
|
|
10
10
|
lineThickness: 2,
|
|
@@ -19,30 +19,30 @@ var m = /* @__PURE__ */ e(c()), h = (e) => e === t.Line || e === t.Elbow, g = {
|
|
|
19
19
|
scale: 1,
|
|
20
20
|
rotate: 0,
|
|
21
21
|
heightBasedSize: !1
|
|
22
|
-
}, _ = (e,
|
|
23
|
-
let
|
|
24
|
-
(
|
|
25
|
-
let c =
|
|
26
|
-
|
|
27
|
-
let l =
|
|
22
|
+
}, _ = (e, t) => {
|
|
23
|
+
let n = { ...e?.shapeSettings }, r = 0, o = 0, s = n?.borderEnabled ?? g.borderEnabled;
|
|
24
|
+
(n?.shape === a.Square || n?.shape === a.Rectangle) && n?.borderRadius && (r = n?.borderRadius, o = r, !n?.preserveAspectRatio && t && (t.width > t.height ? o = (t.width || 1) / (t.height || 1) * o : r = (t.height || 1) / (t.width || 1) * r)), h(n?.shape) && (n.backgroundColor = { code: "none" }, s = !0);
|
|
25
|
+
let c = n?.rotate ?? g.rotate;
|
|
26
|
+
n?.shape === a.Line && n?.heightBasedSize && (c += 90);
|
|
27
|
+
let l = n?.borderStyle === i.Line ? void 0 : n?.strokeDash ?? g.strokeDash;
|
|
28
28
|
return {
|
|
29
|
-
backgroundType:
|
|
30
|
-
shape:
|
|
31
|
-
backgroundColor:
|
|
32
|
-
imageURL:
|
|
33
|
-
imageFit:
|
|
29
|
+
backgroundType: n?.backgroundType ?? "color",
|
|
30
|
+
shape: n?.shape ?? g.shape,
|
|
31
|
+
backgroundColor: n?.backgroundColor?.code ? n?.backgroundColor : g.backgroundColor,
|
|
32
|
+
imageURL: n?.imageURL ?? g.imageURL,
|
|
33
|
+
imageFit: n?.imageFit ?? g.imageFit,
|
|
34
34
|
strokeDash: l,
|
|
35
|
-
lineThickness:
|
|
35
|
+
lineThickness: n?.lineThickness ?? g.lineThickness,
|
|
36
36
|
borderEnabled: s,
|
|
37
|
-
strokeColor:
|
|
38
|
-
preserveAspectRatio:
|
|
39
|
-
scale:
|
|
37
|
+
strokeColor: n?.strokeColor?.code ? n?.strokeColor : g.strokeColor,
|
|
38
|
+
preserveAspectRatio: n?.preserveAspectRatio ?? g.preserveAspectRatio,
|
|
39
|
+
scale: n?.scale ?? g.scale,
|
|
40
40
|
rotate: c,
|
|
41
|
-
heightBasedSize:
|
|
42
|
-
borderRadiusX:
|
|
41
|
+
heightBasedSize: n?.heightBasedSize ?? g.heightBasedSize,
|
|
42
|
+
borderRadiusX: r,
|
|
43
43
|
borderRadiusY: o
|
|
44
44
|
};
|
|
45
|
-
}, v =
|
|
45
|
+
}, v = o(), y = ({ ...e }) => /* @__PURE__ */ (0, v.jsx)("path", {
|
|
46
46
|
d: "M0,50 L70,40 L70,20 L100,50 L70,80 L70,60 Z",
|
|
47
47
|
vectorEffect: "non-scaling-stroke",
|
|
48
48
|
...e
|
|
@@ -83,14 +83,14 @@ var m = /* @__PURE__ */ e(c()), h = (e) => e === t.Line || e === t.Elbow, g = {
|
|
|
83
83
|
...e
|
|
84
84
|
}), E = (e) => {
|
|
85
85
|
switch (e) {
|
|
86
|
-
case
|
|
87
|
-
case
|
|
88
|
-
case
|
|
89
|
-
case
|
|
90
|
-
case
|
|
91
|
-
case
|
|
92
|
-
case
|
|
93
|
-
case
|
|
86
|
+
case a.Circle: return b;
|
|
87
|
+
case a.Rectangle:
|
|
88
|
+
case a.Square: return w;
|
|
89
|
+
case a.Triangle: return T;
|
|
90
|
+
case a.Hexagon: return S;
|
|
91
|
+
case a.Line: return C;
|
|
92
|
+
case a.Arrow: return y;
|
|
93
|
+
case a.Elbow: return x;
|
|
94
94
|
default: return w;
|
|
95
95
|
}
|
|
96
96
|
}, D = s({
|
|
@@ -128,47 +128,47 @@ var m = /* @__PURE__ */ e(c()), h = (e) => e === t.Line || e === t.Elbow, g = {
|
|
|
128
128
|
onLoad: n,
|
|
129
129
|
onError: n
|
|
130
130
|
})
|
|
131
|
-
}) }), k =
|
|
132
|
-
let
|
|
131
|
+
}) }), k = c(({ vSpec: e, vTheme: r, elementSize: i }) => {
|
|
132
|
+
let o = r || t, s = _(e && n(e) ? e : void 0, i), c = D(), d = u(), y = E(s.shape), b = `${l()}-background-image-fill`, x = `${l()}-insideStroke`, S = p(o, s.backgroundColor?.code), C = p(o, s.strokeColor?.code), w = f(s.strokeDash), T = s.lineThickness ?? g.lineThickness, k = s.shape === a.Line ? T / 2 : T;
|
|
133
133
|
return (0, m.useEffect)(() => {
|
|
134
|
-
(!
|
|
134
|
+
(!s.imageURL || s.backgroundType === "color") && d();
|
|
135
135
|
}, []), /* @__PURE__ */ (0, v.jsx)("div", {
|
|
136
|
-
className:
|
|
136
|
+
className: c.mainContainer,
|
|
137
137
|
"data-testid": "shape-container",
|
|
138
138
|
children: /* @__PURE__ */ (0, v.jsxs)("svg", {
|
|
139
139
|
viewBox: "0 0 100 100",
|
|
140
|
-
className:
|
|
141
|
-
style: { transform: `rotate(${
|
|
142
|
-
preserveAspectRatio:
|
|
140
|
+
className: c.svg,
|
|
141
|
+
style: { transform: `rotate(${s.rotate ?? 0}deg) scale(${s.scale ?? 1})` },
|
|
142
|
+
preserveAspectRatio: s.preserveAspectRatio ? "" : "none",
|
|
143
143
|
children: [
|
|
144
|
-
|
|
144
|
+
s.backgroundType === "image" && s.imageURL !== void 0 ? /* @__PURE__ */ (0, v.jsx)(O, {
|
|
145
145
|
patternId: b,
|
|
146
|
-
imgUrl:
|
|
147
|
-
imageFit:
|
|
146
|
+
imgUrl: s.imageURL,
|
|
147
|
+
imageFit: s.imageFit,
|
|
148
148
|
onLoadCallback: () => d()
|
|
149
149
|
}) : null,
|
|
150
150
|
/* @__PURE__ */ (0, v.jsx)("defs", { children: /* @__PURE__ */ (0, v.jsx)("clipPath", {
|
|
151
151
|
id: x,
|
|
152
|
-
className:
|
|
153
|
-
style: { opacity:
|
|
152
|
+
className: c.shapeGroup,
|
|
153
|
+
style: { opacity: s.opacity === void 0 ? 1 : s.opacity },
|
|
154
154
|
children: /* @__PURE__ */ (0, v.jsx)(y, {
|
|
155
|
-
rx: `${
|
|
156
|
-
ry: `${
|
|
155
|
+
rx: `${s.borderRadiusX ?? 0}px`,
|
|
156
|
+
ry: `${s.borderRadiusY ?? 0}px`
|
|
157
157
|
})
|
|
158
158
|
}) }),
|
|
159
159
|
/* @__PURE__ */ (0, v.jsx)("g", {
|
|
160
|
-
className:
|
|
161
|
-
style: { opacity:
|
|
162
|
-
fill:
|
|
160
|
+
className: c.shapeGroup,
|
|
161
|
+
style: { opacity: s.opacity === void 0 ? 1 : s.opacity },
|
|
162
|
+
fill: s.imageURL && s.backgroundType === "image" ? `url(#${b})` : S,
|
|
163
163
|
stroke: C,
|
|
164
|
-
strokeWidth: `${
|
|
164
|
+
strokeWidth: `${s.borderEnabled ? k : 0}px`,
|
|
165
165
|
strokeDasharray: w,
|
|
166
166
|
children: /* @__PURE__ */ (0, v.jsx)("g", {
|
|
167
|
-
clipPath: h(
|
|
167
|
+
clipPath: h(s.shape) ? void 0 : `url(#${x})`,
|
|
168
168
|
children: /* @__PURE__ */ (0, v.jsx)(y, {
|
|
169
|
-
rx: `${
|
|
170
|
-
ry: `${
|
|
171
|
-
...
|
|
169
|
+
rx: `${s.borderRadiusX ?? 0}px`,
|
|
170
|
+
ry: `${s.borderRadiusY ?? 0}px`,
|
|
171
|
+
...s.shape === a.Line ? { heightBasedSize: s.heightBasedSize } : {}
|
|
172
172
|
})
|
|
173
173
|
})
|
|
174
174
|
})
|