@astrato-io/visualizations 0.10.0 → 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 +21 -1
- package/README.md +22 -4
- package/THIRD_PARTY_NOTICES.md +494 -0
- package/VISUALIZATION_DEFINITIONS.md +59 -145
- package/chunks/{Button-CCF851ea.js → Button-CPG4WX8X.js} +3 -3
- package/chunks/{CircularProgress-yupH6YWs.js → CircularProgress-PSLW8HmD.js} +12 -12
- package/chunks/FieldTypeIcon-5k2bkqd0.js +22 -0
- package/chunks/{LinearProgress-CyFjN4px.js → LinearProgress-KQ2EQlGL.js} +16 -16
- package/chunks/{MenuOption-CQpT79AP.js → MenuOption-B-6K7kks.js} +151 -151
- package/chunks/{Title-C-p4ZarD.js → Title-BmvwZYkh.js} +32 -32
- package/chunks/{_createAggregator-BF4qG9XK.js → _createAggregator-CFmH6gUN.js} +11 -11
- package/chunks/{app-filter-bar.compiler-8fxCo2q7.js → app-filter-bar.compiler-BY5-T16I.js} +8 -8
- package/chunks/{bar-layout-DStC-GNV.js → bar-layout-BNou0dZF.js} +2 -2
- package/chunks/{bar.compiler-CQAu8KL8.js → bar.compiler-BkhO7sDd.js} +55 -53
- package/chunks/{builder-CScg1TOS.js → builder-CNjuqD2z.js} +107 -56
- package/chunks/category-axis-D1OVyMrr.js +20 -0
- package/chunks/{coloring-9jU3s_-p.js → coloring-BOiP0rmn.js} +54 -54
- package/chunks/{createSimplePaletteValueFilter-C4hZpCdn.js → createSimplePaletteValueFilter-BkgQ7MFE.js} +166 -166
- package/chunks/defaults-B5_8S-J-.js +3 -0
- package/chunks/{definitions-C4grxhye.js → definitions-AS9GcavE.js} +263 -242
- package/chunks/{escobar-CjirINHP.js → escobar-cQ1eQ64G.js} +8528 -8461
- package/chunks/{extend-preset-D-l9u_we.js → extend-preset-BlCbcXKR.js} +421 -421
- package/chunks/{filter.compiler-lji2Acgn.js → filter.compiler-CI7dDNM1.js} +12 -12
- package/chunks/{filtering-C1zakrrX.js → filtering-Dwi7hDPZ.js} +263 -263
- package/chunks/handlers-C63NVo7i.js +15433 -0
- package/chunks/{icon-picker-styles-Bj80ZUBK.js → icon-picker-styles-CBlxEu3s.js} +8 -8
- package/chunks/{isEqual-Ch9OEye3.js → isEqual-BdHo6wqq.js} +1 -1
- package/chunks/{isFocusVisible-CgMP0qkR.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-CKRjhSHQ.js → logger-Bc-DqDM_.js} +72 -72
- package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
- package/chunks/{map.compiler-CKzorLgK.js → map.compiler-CRO6XpdI.js} +43 -45
- package/chunks/measure-format-default-B6ghxih7.js +22 -0
- package/chunks/{metadata-Bb9pTXrq.js → metadata-CtkvZEhS.js} +1 -1
- package/chunks/number.compiler-kV4lobCZ.js +57 -0
- package/chunks/{operations-DZoY50VX.js → operations-COl9wgqi.js} +9893 -9831
- package/chunks/{range-D1BTmFMp.js → range-CMJ5yc5Z.js} +2 -2
- package/chunks/{react-dom-Dgv2azN2.js → react-dom-BjsCbYHq.js} +76 -76
- package/chunks/{render-wrappers-_P3xwu5A.js → render-wrappers-DFHi3Wkr.js} +1 -1
- package/chunks/{requirements-NHNrR8Ie.js → requirements-C5YLmHKe.js} +251 -227
- package/chunks/{shared-UitWpq1J.js → shared-DyqxOie0.js} +290 -278
- package/chunks/standalone-06i1wmIX.js +6 -0
- package/chunks/{standalone-DtBk_iUz.js → standalone-9jrQ3zJT.js} +10 -10
- package/chunks/standalone-B6zUvxNQ.js +357 -0
- package/chunks/{standalone-Bnnr87pc.js → standalone-BYK2U0Vd.js} +418 -679
- package/chunks/standalone-Be5APcVv.js +762 -0
- package/chunks/standalone-Bp4G3MDx.js +396 -0
- package/chunks/{standalone-CbPk8bKn.js → standalone-BrjtMIdd.js} +132 -132
- package/chunks/{standalone-BOzHA_d4.js → standalone-Bsfz5vnJ.js} +57 -57
- package/chunks/standalone-BuXpKMnc.js +2 -0
- package/chunks/standalone-CIjNYyya.js +8378 -0
- package/chunks/{standalone-B0U6c3su.js → standalone-CS5VGoja.js} +358 -358
- package/chunks/standalone-CUGt2FUF.js +2 -0
- package/chunks/{standalone-BapqaniK.js → standalone-ChfEHb28.js} +2299 -1072
- package/chunks/standalone-CnF2OYLQ.js +355 -0
- package/chunks/standalone-CznEEiq3.js +422 -0
- package/chunks/{standalone-Ck63MZzj.js → standalone-D9k5SCd8.js} +165 -165
- package/chunks/{standalone-CRdDZYeM.js → standalone-DYVYccmY.js} +855 -855
- package/chunks/{standalone-CVknVdUC.js → standalone-DaNxWIKn.js} +27 -27
- package/chunks/{standalone-swGs70tD.js → standalone-Db_HNuWx.js} +50 -50
- package/chunks/standalone-DcuE8KBa.js +287 -0
- package/chunks/{standalone-U0WJwFlG.js → standalone-I5kRIsp8.js} +97 -97
- package/chunks/{standalone-BBu90BhK.js → standalone-K2OvRAQM.js} +125 -125
- package/chunks/{standalone-DCFY1MAV.js → standalone-c4CPN6ug.js} +4634 -4633
- package/chunks/{standalone-ByKKqT5L.js → standalone-iOnJhCvA.js} +302 -302
- package/chunks/standalone-pCrzBiTy.js +773 -0
- package/chunks/standalone-qrZaimgC.js +689 -0
- package/chunks/standalone-yqDJ8h3K.js +1012 -0
- package/chunks/{table.compiler-OWSx5MOq.js → table.compiler-CMH_dtYs.js} +29 -29
- package/chunks/{useFieldName-B8iCYyw1.js → useFieldName-BfxBzhhH.js} +1 -1
- package/chunks/{utils-3Igg6xmO.js → utils-BdJrEeIQ.js} +4037 -4015
- package/chunks/{view-DdMLZySj.js → view-Q-_XIrWE.js} +1615 -1615
- package/chunks/{visualization-filters-CzvFHE6M.js → visualization-filters-BwS0xUqs.js} +1723 -1693
- package/chunks/{with-html-element-DOfkR3C1.js → with-html-element-D_ooGNWI.js} +4006 -3994
- 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 +48 -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 +528 -504
- package/metadata.js +2 -2
- package/operations.js +6 -6
- package/package.json +73 -68
- package/src/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +34 -53
- 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/definitions/model/definitions/types/compilation.types.d.ts +4 -1
- package/src/types.d.ts +28 -28
- package/src/visualization-catalog.d.ts +3 -0
- package/styles.css +1 -1
- package/chunks/FieldTypeIcon-D_MzsdfY.js +0 -22
- package/chunks/defaults-cyNhn37t.js +0 -3
- package/chunks/handlers-ZviIUC-j.js +0 -15387
- package/chunks/line.compiler-De5fiKuR.js +0 -198
- package/chunks/number.compiler-CaTmJkmi.js +0 -53
- package/chunks/standalone-BEekPuA12.js +0 -357
- 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-DibjA73M.js +0 -6
- package/chunks/standalone-DxBAyqAu.js +0 -772
- package/chunks/standalone-KMQPsNsq.js +0 -2
- package/chunks/standalone-MBLSvsrY.js +0 -2
- package/chunks/standalone-wgFAVnnm.js +0 -355
- package/chunks/standalone-xGV0dqPV.js +0 -689
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { l as m } from "./logger-
|
|
2
|
+
import { Na as t, oc as n, za as r } from "./visualization-filters-BwS0xUqs.js";
|
|
3
|
+
import { Br as i, G as a, Mt as o, Qt as s, ci as c, cn as l, f as u, li as d, o as f, sr as p } from "./utils-BdJrEeIQ.js";
|
|
4
|
+
import { l as m } from "./logger-Bc-DqDM_.js";
|
|
5
5
|
var h = {
|
|
6
6
|
OpenMediaPicker: "OPEN_MEDIA_PICKER",
|
|
7
7
|
OpenMediaPickerResult: "OPEN_MEDIA_PICKER_RESULT",
|
|
8
8
|
OPEN_TOP_BAR: "OPEN_TOP_BAR",
|
|
9
9
|
OPEN_CREATE_BOOKMARK_WINDOW: "OPEN_CREATE_BOOKMARK_WINDOW"
|
|
10
|
-
}, g = /* @__PURE__ */ e(
|
|
10
|
+
}, g = /* @__PURE__ */ e(d());
|
|
11
11
|
g.forwardRef(function(e, t) {
|
|
12
12
|
return g.createElement("img", {
|
|
13
13
|
...e,
|
|
@@ -15,14 +15,14 @@ g.forwardRef(function(e, t) {
|
|
|
15
15
|
src: "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"
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
-
var _ = "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", v = (e, t, n) => t?.imageSettings.image?.mediaItemId ? e.daedalus.mediaApi.getUrl(t?.imageSettings.image?.mediaItemId) : t?.imageSettings.image?.imageUrl ? t?.imageSettings.image?.imageUrl : t?.imageSettings.image?.imageVariable && n?.[t?.imageSettings.image?.imageVariable]?.value ? `${n?.[t?.imageSettings.image?.imageVariable]?.value}` : "", y = (e, t,
|
|
19
|
-
imageSrc: v(e, t,
|
|
20
|
-
imageFit: t?.imageSettings.image?.imageFit ??
|
|
18
|
+
var _ = "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", v = (e, t, n) => t?.imageSettings.image?.mediaItemId ? e.daedalus.mediaApi.getUrl(t?.imageSettings.image?.mediaItemId) : t?.imageSettings.image?.imageUrl ? t?.imageSettings.image?.imageUrl : t?.imageSettings.image?.imageVariable && n?.[t?.imageSettings.image?.imageVariable]?.value ? `${n?.[t?.imageSettings.image?.imageVariable]?.value}` : "", y = (e, t, n) => ({
|
|
19
|
+
imageSrc: v(e, t, n),
|
|
20
|
+
imageFit: t?.imageSettings.image?.imageFit ?? r.Contain,
|
|
21
21
|
opacity: t?.imageSettings.opacity ?? 1,
|
|
22
22
|
saturation: t?.imageSettings.saturation ?? 1,
|
|
23
23
|
blur: t?.imageSettings.blur ?? 0,
|
|
24
24
|
shadow: t?.imageSettings.shadow ?? !1
|
|
25
|
-
}), b =
|
|
25
|
+
}), b = a({
|
|
26
26
|
singleImageContainer: {
|
|
27
27
|
display: "flex",
|
|
28
28
|
height: "100%",
|
|
@@ -40,7 +40,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
addGalleryButton: {
|
|
43
|
-
...
|
|
43
|
+
...c.normal14,
|
|
44
44
|
padding: "10px 20px",
|
|
45
45
|
background: t.white,
|
|
46
46
|
borderRadius: 4,
|
|
@@ -52,7 +52,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
52
52
|
alignItems: "center"
|
|
53
53
|
},
|
|
54
54
|
buttonIcon: { marginRight: 5 }
|
|
55
|
-
}), x =
|
|
55
|
+
}), x = a({
|
|
56
56
|
mainContainer: {
|
|
57
57
|
display: "flex",
|
|
58
58
|
flexDirection: "column",
|
|
@@ -80,11 +80,11 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
80
80
|
"&.fill": { objectFit: "fill" },
|
|
81
81
|
"&.none": { objectFit: "none" }
|
|
82
82
|
}
|
|
83
|
-
}), S =
|
|
84
|
-
contain: e ===
|
|
85
|
-
cover: e ===
|
|
86
|
-
fill: e ===
|
|
87
|
-
none: e ===
|
|
83
|
+
}), S = i(), C = (e) => l({
|
|
84
|
+
contain: e === r.Contain,
|
|
85
|
+
cover: e === r.Cover,
|
|
86
|
+
fill: e === r.Fill,
|
|
87
|
+
none: e === r.None
|
|
88
88
|
}), w = ({ imageSrc: e, imageFit: t, opacity: n, saturation: r, blur: i, shadow: a, onLoadCallback: o }) => {
|
|
89
89
|
let s = x(), c = a ? "drop-shadow(0px 3px 6px rgba(0,0,0,0.25))" : "";
|
|
90
90
|
return /* @__PURE__ */ (0, S.jsx)("div", {
|
|
@@ -92,7 +92,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
92
92
|
children: /* @__PURE__ */ (0, S.jsx)("div", {
|
|
93
93
|
className: s.imageContainer,
|
|
94
94
|
children: /* @__PURE__ */ (0, S.jsx)("img", {
|
|
95
|
-
className:
|
|
95
|
+
className: l({
|
|
96
96
|
[s.image]: !0,
|
|
97
97
|
[C(t)]: !0
|
|
98
98
|
}),
|
|
@@ -108,25 +108,25 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
108
108
|
})
|
|
109
109
|
})
|
|
110
110
|
});
|
|
111
|
-
}, T =
|
|
112
|
-
let
|
|
111
|
+
}, T = o(({ vSpec: e }) => {
|
|
112
|
+
let r = s(), i = b(), { variablesDict: a } = f(), o = e && n(e) ? y(r, e, a) : null, c = u();
|
|
113
113
|
return (0, g.useEffect)(() => {
|
|
114
|
-
!
|
|
115
|
-
}, [e,
|
|
114
|
+
!o?.imageSrc && r.daedalus.objectCapabilities.editable && c();
|
|
115
|
+
}, [e, o?.imageSrc]), o?.imageSrc ? /* @__PURE__ */ (0, S.jsx)("div", {
|
|
116
116
|
className: i.singleImageContainer,
|
|
117
117
|
children: /* @__PURE__ */ (0, S.jsx)(w, {
|
|
118
|
-
...
|
|
119
|
-
onLoadCallback:
|
|
118
|
+
...o,
|
|
119
|
+
onLoadCallback: c
|
|
120
120
|
})
|
|
121
|
-
}) :
|
|
121
|
+
}) : r.daedalus.objectCapabilities.editable ? /* @__PURE__ */ (0, S.jsx)("div", {
|
|
122
122
|
className: i.previewImageContainer,
|
|
123
123
|
children: /* @__PURE__ */ (0, S.jsxs)("button", {
|
|
124
124
|
"data-testid": "open-media-gallery-button",
|
|
125
125
|
className: i.addGalleryButton,
|
|
126
126
|
onClick: () => {
|
|
127
|
-
|
|
127
|
+
r.emitEvent(m.SET_PROPERTY_PANEL_OBJECT_TAB, "ITEM"), r.emitEvent(h.OpenMediaPicker);
|
|
128
128
|
},
|
|
129
|
-
children: [/* @__PURE__ */ (0, S.jsx)(
|
|
129
|
+
children: [/* @__PURE__ */ (0, S.jsx)(p, {
|
|
130
130
|
fill: t.mainDarkNavy,
|
|
131
131
|
size: 16,
|
|
132
132
|
className: i.buttonIcon
|
|
@@ -137,8 +137,8 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
|
|
|
137
137
|
children: /* @__PURE__ */ (0, S.jsx)("img", {
|
|
138
138
|
src: _,
|
|
139
139
|
alt: "no image",
|
|
140
|
-
onLoad:
|
|
141
|
-
onError:
|
|
140
|
+
onLoad: c,
|
|
141
|
+
onError: c
|
|
142
142
|
})
|
|
143
143
|
});
|
|
144
144
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as e, o as t, t as n } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "./logger-
|
|
5
|
-
import {
|
|
6
|
-
import { t as j } from "./coloring-
|
|
2
|
+
import { Cc as r, Ec as i, Hc as a, ao as o, fa as s, io as c, ln as l, oo as u, ri as d, ro as f } from "./visualization-filters-BwS0xUqs.js";
|
|
3
|
+
import { Br as p, Mt as m, P as h, f as g, li as _, nn as v, s as y } from "./utils-BdJrEeIQ.js";
|
|
4
|
+
import "./logger-Bc-DqDM_.js";
|
|
5
|
+
import { Cn as b, L as x, R as S, _ as C, bt as w, i as T, jn as E, ln as D, v as O, z as k, zt as A } from "./escobar-cQ1eQ64G.js";
|
|
6
|
+
import { t as j } from "./coloring-BOiP0rmn.js";
|
|
7
7
|
import { n as M, t as N } from "./src-BOS6SqkZ.js";
|
|
8
8
|
var P = /* @__PURE__ */ n(((e, t) => {
|
|
9
9
|
(function(e, t, n) {
|
|
@@ -285,21 +285,21 @@ var P = /* @__PURE__ */ n(((e, t) => {
|
|
|
285
285
|
})), z = /* @__PURE__ */ n(((e, t) => {
|
|
286
286
|
var n = P(), r = ee(), i = te(), a = F(), o = I(), s = ne(), c = R();
|
|
287
287
|
c.alea = n, c.xor128 = r, c.xorwow = i, c.xorshift7 = a, c.xor4096 = o, c.tychei = s, t.exports = c;
|
|
288
|
-
})), B = /* @__PURE__ */ t(
|
|
288
|
+
})), B = /* @__PURE__ */ t(_()), V = .7, re = 12 * V, H = { RenderDone: "render-done" }, U = { Minimum: "Minimum" }, W = {
|
|
289
289
|
collectionKey: "coll",
|
|
290
290
|
measureValue: "size"
|
|
291
291
|
}, G = (e, t, n) => {
|
|
292
|
-
let r = e.dimensions.filter((e) =>
|
|
293
|
-
if (!r[0] || !
|
|
294
|
-
let
|
|
292
|
+
let r = e.dimensions.filter((e) => d(e)), i = e.measures.filter((e) => d(e)), o = O((e.supportingMeasures ?? []).filter((e) => d(e)));
|
|
293
|
+
if (!r[0] || !i[0]) return n;
|
|
294
|
+
let s = a(r[0].dataItem), c = a(i[0].dataItem), l = [{
|
|
295
295
|
key: W.collectionKey,
|
|
296
296
|
data: {
|
|
297
297
|
extract: [{
|
|
298
|
-
field:
|
|
298
|
+
field: s,
|
|
299
299
|
props: {
|
|
300
|
-
[W.measureValue]: { field:
|
|
301
|
-
[
|
|
302
|
-
...
|
|
300
|
+
[W.measureValue]: { field: c },
|
|
301
|
+
[c]: { field: c },
|
|
302
|
+
...o
|
|
303
303
|
}
|
|
304
304
|
}],
|
|
305
305
|
filter: (e) => e[W.measureValue].value != null && !isNaN(e[W.measureValue].value)
|
|
@@ -307,24 +307,24 @@ var P = /* @__PURE__ */ n(((e, t) => {
|
|
|
307
307
|
}];
|
|
308
308
|
return {
|
|
309
309
|
...n,
|
|
310
|
-
collections:
|
|
310
|
+
collections: l
|
|
311
311
|
};
|
|
312
312
|
}, K = {
|
|
313
313
|
size: "size",
|
|
314
314
|
gradient: "gradient"
|
|
315
315
|
}, q = (e, t, n) => {
|
|
316
|
-
let r = e.dimensions.filter((e) =>
|
|
317
|
-
if (!r[0] || !
|
|
318
|
-
let
|
|
319
|
-
return
|
|
316
|
+
let r = e.dimensions.filter((e) => d(e)), i = e.measures.filter((e) => d(e));
|
|
317
|
+
if (!r[0] || !i[0]) return n;
|
|
318
|
+
let o = { [K.size]: { data: { field: a(i[0].dataItem) } } };
|
|
319
|
+
return o = A(e, t, o), {
|
|
320
320
|
...n,
|
|
321
|
-
scales:
|
|
321
|
+
scales: o
|
|
322
322
|
};
|
|
323
|
-
}, J = (e, t, n, r,
|
|
324
|
-
let
|
|
323
|
+
}, J = (e, t, n, r, i, o, s, c) => e.filter(d).map((e, r) => {
|
|
324
|
+
let i = Object.keys(t.data).find((n) => t.data[n]?.source?.field === a(e.dataItem)), o = (t.data[String(i)] || t.data[`measure${r}`])?.value, s = l(e) || e.label || e.dataItem.name || "", u = c && !f(e.formatter) ? w(e.formatter) : e.formatter;
|
|
325
325
|
return {
|
|
326
|
-
label:
|
|
327
|
-
value:
|
|
326
|
+
label: s,
|
|
327
|
+
value: u ? n.formatter(u)(o, void 0, t.data) : o
|
|
328
328
|
};
|
|
329
329
|
}), Y = (e, t, n, r, i) => {
|
|
330
330
|
let a = {
|
|
@@ -334,13 +334,13 @@ var P = /* @__PURE__ */ n(((e, t) => {
|
|
|
334
334
|
type: "bounds"
|
|
335
335
|
}
|
|
336
336
|
};
|
|
337
|
-
return a.extract =
|
|
338
|
-
}, ie = (e, t, n, r,
|
|
339
|
-
let c = e.measures.filter((e) =>
|
|
340
|
-
|
|
337
|
+
return a.extract = S(e, t, J, k), x(e, t, n, a, "tooltip", i);
|
|
338
|
+
}, ie = (e, t, n, r, o, s) => {
|
|
339
|
+
let c = e.measures.filter((e) => d(e)), l = new j(e, t, o?.[0]?.itemsNotAffectedByFiltering), u = a(c[0].dataItem), f = D([""], s);
|
|
340
|
+
f?.trigger.forEach((e) => e.propagation = "stop");
|
|
341
341
|
let p = {
|
|
342
342
|
key: "word-cloud",
|
|
343
|
-
type:
|
|
343
|
+
type: E.WordCloud,
|
|
344
344
|
data: { collection: W.collectionKey },
|
|
345
345
|
on: { [H.RenderDone]() {
|
|
346
346
|
s?.onRenderDone?.();
|
|
@@ -359,19 +359,19 @@ var P = /* @__PURE__ */ n(((e, t) => {
|
|
|
359
359
|
ref: W.measureValue
|
|
360
360
|
},
|
|
361
361
|
fill: l.getColorDefinition({
|
|
362
|
-
ref: e.coloring?.type ===
|
|
363
|
-
dataItemId: e.coloring?.type ===
|
|
362
|
+
ref: e.coloring?.type === i.Gradient ? W.measureValue : l.MAIN_FIELD,
|
|
363
|
+
dataItemId: e.coloring?.type === i.Single ? u : void 0,
|
|
364
364
|
overwriteSources: [l.MAIN_FIELD]
|
|
365
365
|
})
|
|
366
366
|
}
|
|
367
367
|
},
|
|
368
|
-
brush:
|
|
368
|
+
brush: f || void 0
|
|
369
369
|
};
|
|
370
370
|
return {
|
|
371
371
|
...n,
|
|
372
372
|
components: [...n.components, p]
|
|
373
373
|
};
|
|
374
|
-
}, ae = class extends
|
|
374
|
+
}, ae = class extends C {
|
|
375
375
|
onRenderDone;
|
|
376
376
|
onChartUpdated;
|
|
377
377
|
constructor(e) {
|
|
@@ -386,7 +386,7 @@ var P = /* @__PURE__ */ n(((e, t) => {
|
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
preCompile(e) {
|
|
389
|
-
let t = e.dimensions.filter((e) =>
|
|
389
|
+
let t = e.dimensions.filter((e) => d(e)), n = e.measures.filter((e) => d(e)), r = t[0], i = n[0];
|
|
390
390
|
if (!r || !i) throw Error("Word cloud w/o a dimension or measure is not supported.");
|
|
391
391
|
}
|
|
392
392
|
postCompile(e) {
|
|
@@ -637,7 +637,7 @@ function pe(e, t, n) {
|
|
|
637
637
|
}
|
|
638
638
|
function me(e) {
|
|
639
639
|
return e.map((e) => ({
|
|
640
|
-
type:
|
|
640
|
+
type: b.Text,
|
|
641
641
|
text: e.text,
|
|
642
642
|
x: e.x,
|
|
643
643
|
y: e.y,
|
|
@@ -658,9 +658,9 @@ function me(e) {
|
|
|
658
658
|
}
|
|
659
659
|
var Q = {
|
|
660
660
|
fontFamily: "Arial",
|
|
661
|
-
fontScaling:
|
|
662
|
-
fontStyle:
|
|
663
|
-
fontWeight:
|
|
661
|
+
fontScaling: c.linear,
|
|
662
|
+
fontStyle: o.normal,
|
|
663
|
+
fontWeight: u.normal,
|
|
664
664
|
seed: 1,
|
|
665
665
|
maxNumChars: 32,
|
|
666
666
|
word: {
|
|
@@ -716,22 +716,22 @@ var Q = {
|
|
|
716
716
|
}
|
|
717
717
|
};
|
|
718
718
|
function ge(e) {
|
|
719
|
-
e.component(
|
|
719
|
+
e.component(E.WordCloud, he);
|
|
720
720
|
}
|
|
721
|
-
var $ =
|
|
722
|
-
let
|
|
723
|
-
...
|
|
724
|
-
valuePickerMode: !!
|
|
725
|
-
}, f = t ||
|
|
726
|
-
...
|
|
727
|
-
onRenderDone:
|
|
728
|
-
},
|
|
729
|
-
return
|
|
721
|
+
var $ = p(), _e = () => {}, ve = m(({ vSpec: e, vTheme: t, data: n, elementSize: i, vizProperties: a }) => {
|
|
722
|
+
let o = h(), c = g(), [l] = (0, B.useState)(() => new ae(c)), { activeKey: u } = y(), d = {
|
|
723
|
+
...a,
|
|
724
|
+
valuePickerMode: !!u
|
|
725
|
+
}, f = t || s, p = l.compile(e, f, n, i, {
|
|
726
|
+
...d,
|
|
727
|
+
onRenderDone: c
|
|
728
|
+
}, r.WordCloud, o);
|
|
729
|
+
return p ? /* @__PURE__ */ (0, $.jsx)(v.Provider, {
|
|
730
730
|
value: _e,
|
|
731
731
|
children: /* @__PURE__ */ (0, $.jsx)(T, {
|
|
732
|
-
config:
|
|
733
|
-
definition:
|
|
734
|
-
size:
|
|
732
|
+
config: d,
|
|
733
|
+
definition: p,
|
|
734
|
+
size: i,
|
|
735
735
|
vSpec: e,
|
|
736
736
|
escobarPlugins: [ge]
|
|
737
737
|
})
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
+
import { $t as t, Ao as n, Cc as r, Ec as i, Hc as a, Na as o, Vt as s, Wc as c, Wo as l, fa as u, js as d, ko as f, qt as p, ri as m } from "./visualization-filters-BwS0xUqs.js";
|
|
3
|
+
import { Br as h, I as g, Mt as _, P as v, li as y } from "./utils-BdJrEeIQ.js";
|
|
4
|
+
import { v_ as b } from "./handlers-C63NVo7i.js";
|
|
5
|
+
import { r as x } from "./label-format-type-C46pzgx7.js";
|
|
6
|
+
import { t as S } from "./stroke-dash-UgMEcCS4.js";
|
|
7
|
+
import "./logger-Bc-DqDM_.js";
|
|
8
|
+
import { $t as C, C as w, Cn as T, D as E, Dn as D, Dt as O, Ft as k, I as A, Kt as j, M, Mt as N, Nt as P, Ot as F, Qt as I, St as L, Ut as R, _ as z, _n as B, bn as V, i as H, jn as U, jt as W, kt as G, ln as K, n as q, rn as J, v as Y, vn as X, w as Z, wt as ee, y as Q, yn as $, zt as te } from "./escobar-cQ1eQ64G.js";
|
|
9
|
+
import { s as ne, t as re } from "./coloring-BOiP0rmn.js";
|
|
10
|
+
import { t as ie } from "./set-coloring-datafield-B3uIS1Pe.js";
|
|
11
|
+
var ae = /* @__PURE__ */ e(y()), oe = (e, n, o) => {
|
|
12
|
+
let l = e.dimensions.filter((e) => m(e)), u = e.measures.filter((e) => m(e)), d = l[0], f = u[0], p = !1, h = {}, { coloring: g } = e || {}, _ = g?.fieldId ?? null;
|
|
13
|
+
if (g?.type === i.Categorical && (_ ||= d ? a(d.dataItem) : null), g?.type === i.Gradient && (_ ||= f ? a(f.dataItem) : null), _ && N(o, 0, { color: { field: _ } }), d && e?.axes?.dimension?.continuousAxis) {
|
|
14
|
+
let e = c(d.dataItem), n = !!d.datePart, r = s(e) || t(e);
|
|
15
|
+
p = !n && r;
|
|
16
|
+
}
|
|
17
|
+
if (h = te(ie(e, _), n, h), h = M(e, h, o.collections, p, !0), u.filter((e) => e.graphType === r.Bar).length > 1 && !e.barSettings?.grouped) {
|
|
18
|
+
let t = $(e, u.find((e) => e.graphType === r.Bar));
|
|
19
|
+
h[t].data = { collection: R.ComboChartCollection };
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
...o,
|
|
23
|
+
scales: h
|
|
24
|
+
};
|
|
25
|
+
}, se = (e, t, n) => {
|
|
26
|
+
let i = e.measures.filter((e) => m(e)), o = e.dimensions.filter((e) => m(e)), s = (e.supportingMeasures ?? []).filter((e) => m(e)), c = i.reduce((e, t) => {
|
|
27
|
+
let n = a(t.dataItem);
|
|
28
|
+
return e[n] = { field: n }, e;
|
|
29
|
+
}, {}), l = Y(s), u = o.reduce((e, t) => {
|
|
30
|
+
let n = a(t.dataItem);
|
|
31
|
+
return e[n] = { field: n }, e;
|
|
32
|
+
}, {}), d = o[0];
|
|
33
|
+
if (!d) return n;
|
|
34
|
+
let f = a(d.dataItem), p = {
|
|
35
|
+
key: R.ComboChartCollection,
|
|
36
|
+
data: { extract: [] }
|
|
37
|
+
};
|
|
38
|
+
if (p.data.extract = i.map((e, t) => {
|
|
39
|
+
let n = a(e.dataItem);
|
|
40
|
+
return {
|
|
41
|
+
field: f,
|
|
42
|
+
props: {
|
|
43
|
+
end: { field: n },
|
|
44
|
+
...c,
|
|
45
|
+
...l,
|
|
46
|
+
...u,
|
|
47
|
+
start: 0,
|
|
48
|
+
graphType: e.graphType,
|
|
49
|
+
measureIndex: t,
|
|
50
|
+
fieldId: n
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}), i.filter((e) => e.graphType === r.Bar).length > 1) {
|
|
54
|
+
let t = !!i.find((e) => e.graphType === r.Bar)?.secondaryAxis, n = new Map(i.map((e) => [a(e.dataItem), !!e.secondaryAxis]));
|
|
55
|
+
e.barSettings?.grouped || (p.data.stack = {
|
|
56
|
+
stackKey: (e) => e.graphType.value === r.Bar ? `${e.value}` : `${e.value}-${e.graphType.value}-${e.measureIndex.value}`,
|
|
57
|
+
value: (e) => {
|
|
58
|
+
let r = e.fieldId?.value;
|
|
59
|
+
if (typeof r != "string" || n.get(r) !== t) return 0;
|
|
60
|
+
let i = e.end.value;
|
|
61
|
+
return typeof i == "number" || typeof i == "string" ? i : 0;
|
|
62
|
+
},
|
|
63
|
+
offset: x.Diverging
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
...n,
|
|
68
|
+
collections: [...n.collections ?? [], p]
|
|
69
|
+
};
|
|
70
|
+
}, ce = (e, t, n, i, o, s) => {
|
|
71
|
+
let c = [];
|
|
72
|
+
return e.measures.filter((e) => m(e)).forEach((i) => {
|
|
73
|
+
let l = a(i.dataItem), u = (e) => e.fieldId.value === l;
|
|
74
|
+
switch (i.graphType || e.type) {
|
|
75
|
+
case r.Bar:
|
|
76
|
+
c.push(ue(e, t, o ?? [], n, i, s, u));
|
|
77
|
+
break;
|
|
78
|
+
case r.Point:
|
|
79
|
+
c.push(G(e, t, n, i, !1, R.ComboChartCollection, u));
|
|
80
|
+
break;
|
|
81
|
+
default: c.push(le(e, t, n, i, u)), c.push(G(e, t, n, i, !i.showDataPoints, R.ComboChartCollection, u));
|
|
82
|
+
}
|
|
83
|
+
}), c.sort((e) => e.type === U.Box ? -1 : 0), {
|
|
84
|
+
...n,
|
|
85
|
+
components: [...n.components, ...c]
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
function le(e, t, n, i, o) {
|
|
89
|
+
let s = e.dimensions.filter((e) => m(e));
|
|
90
|
+
if (!s[0]) throw Error("Combo chart without dimension is not supported.");
|
|
91
|
+
if (s.length > 1) throw Error("Combo chart currently support only one dimension.");
|
|
92
|
+
let c = S(i.strokeDash), u = a(i.dataItem), f = ne(e, n, t, i, u);
|
|
93
|
+
return {
|
|
94
|
+
type: U.Line,
|
|
95
|
+
layout: { displayOrder: C.VisualizationElement },
|
|
96
|
+
key: W(e, i, r.Line),
|
|
97
|
+
data: d({
|
|
98
|
+
collection: R.ComboChartCollection,
|
|
99
|
+
filter: o
|
|
100
|
+
}),
|
|
101
|
+
settings: {
|
|
102
|
+
orientation: e.orientation === l.Horizontal ? l.Vertical : l.Horizontal,
|
|
103
|
+
coordinates: {
|
|
104
|
+
major: { scale: X(e) },
|
|
105
|
+
minor: {
|
|
106
|
+
scale: $(e, i),
|
|
107
|
+
ref: u
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
layers: {
|
|
111
|
+
curve: e.lineSettings?.lineCurve,
|
|
112
|
+
skipCollisions: !0,
|
|
113
|
+
line: {
|
|
114
|
+
stroke: f,
|
|
115
|
+
strokeWidth: i.strokeWidth,
|
|
116
|
+
strokeDasharray: c
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
animations: {
|
|
121
|
+
enabled: !0,
|
|
122
|
+
presetId: "simple-opacity"
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function ue(e, t, n, i, o, s, c) {
|
|
127
|
+
let u = e.dimensions.filter((e) => m(e)), f = e.measures.filter((e) => m(e) && e.graphType === r.Bar);
|
|
128
|
+
if (!u[0]) throw Error("Combo chart without dimension is not supported.");
|
|
129
|
+
let h = { scale: X(e) }, g = {
|
|
130
|
+
scale: $(e, o),
|
|
131
|
+
end: { ref: "end" }
|
|
132
|
+
}, _ = {
|
|
133
|
+
minWidthPx: 2,
|
|
134
|
+
rx: p(e?.barSettings.barRadius, 0),
|
|
135
|
+
roundAllEdges: e?.barSettings?.roundAllEdges,
|
|
136
|
+
useCustomBoxRounding: !0,
|
|
137
|
+
boxPadding: e?.barSettings?.barPadding ?? D.scale.padding
|
|
138
|
+
};
|
|
139
|
+
_.fill = new re(e, t, n?.[0]?.itemsNotAffectedByFiltering).getColorDefinition({ ref: "fieldId" });
|
|
140
|
+
let v = {
|
|
141
|
+
enabled: !0,
|
|
142
|
+
presetId: "bar-chart"
|
|
143
|
+
}, y = o?.graphType !== r.Bar;
|
|
144
|
+
if (f.length > 1 && e.barSettings?.grouped) {
|
|
145
|
+
let t = 1 * (1 / f.length), n = (1 - (e.barSettings?.barPadding ?? 0)) * t, r = .5 / f.length, i = (1 + 0 * (f.length - 1)) * r, s = f.findIndex((e) => a(e.dataItem) === a(o.dataItem));
|
|
146
|
+
h.fn = (n) => {
|
|
147
|
+
let r = n.resources.scale(X(e));
|
|
148
|
+
return r(n.datum.value) + i * r.bandwidth?.() + s * r.bandwidth?.() * t;
|
|
149
|
+
}, _.width = n;
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
type: U.Box,
|
|
153
|
+
layout: { displayOrder: C.VisualizationElement },
|
|
154
|
+
key: W(e, o, r.Bar),
|
|
155
|
+
data: d({
|
|
156
|
+
collection: R.ComboChartCollection,
|
|
157
|
+
filter: c
|
|
158
|
+
}),
|
|
159
|
+
settings: {
|
|
160
|
+
orientation: e.orientation ?? l.Vertical,
|
|
161
|
+
major: h,
|
|
162
|
+
minor: g,
|
|
163
|
+
box: _
|
|
164
|
+
},
|
|
165
|
+
animations: v,
|
|
166
|
+
brush: y ? null : K([""], s)
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
var de = (e, t) => {
|
|
170
|
+
let n = t ? [b.Inside] : [
|
|
171
|
+
b.Inside,
|
|
172
|
+
b.Outside,
|
|
173
|
+
b.Opposite
|
|
174
|
+
];
|
|
175
|
+
return (e || [
|
|
176
|
+
{
|
|
177
|
+
position: b.Inside,
|
|
178
|
+
justify: 1
|
|
179
|
+
},
|
|
180
|
+
{ position: b.Outside },
|
|
181
|
+
{ position: b.Opposite }
|
|
182
|
+
]).map((e) => ({
|
|
183
|
+
...e,
|
|
184
|
+
possible: n.includes(e.position)
|
|
185
|
+
}));
|
|
186
|
+
}, fe = ({ data: e }) => e ? e.end.value > e.start.value ? "up" : "down" : null, pe = ({ data: e }) => e ? e.end.value > e.start.value ? "right" : "left" : null, me = (e, t, i, s, c, l) => {
|
|
187
|
+
let u = e.measures.filter((e) => m(e)), d = u.filter((e) => e.graphType === r.Bar), p = d.filter((e) => e.dataLabels?.show), h = d.length >= 2 && !("barSettings" in e && e.barSettings?.grouped), g = V(e), _ = p.map((n) => {
|
|
188
|
+
let i = !!n.dataLabels?.barLabelPlacements, a = de(n.dataLabels?.barLabelPlacements, h).filter((e) => e.possible).map((e) => ({
|
|
189
|
+
position: e.position,
|
|
190
|
+
fill: e.position === b.Inside ? o.white : "#242424",
|
|
191
|
+
...e.justify === void 0 ? {} : { justify: e.justify },
|
|
192
|
+
...i ? { overflow: [b.Outside, b.Opposite].includes(e.position) } : {}
|
|
193
|
+
}));
|
|
194
|
+
return n.dataLabels?.showBackdrop && !h && (a = a.map((e) => Q(e, t, g))), {
|
|
195
|
+
key: `combo-bar-labels-${n.dataItem.uniqueSignature}`,
|
|
196
|
+
type: U.Labels,
|
|
197
|
+
layout: { displayOrder: C.Labels },
|
|
198
|
+
settings: { sources: [{
|
|
199
|
+
component: W(e, n, r.Bar),
|
|
200
|
+
selector: T.Rect,
|
|
201
|
+
strategy: {
|
|
202
|
+
type: "bar",
|
|
203
|
+
settings: {
|
|
204
|
+
direction: g ? pe : fe,
|
|
205
|
+
fontSize: B(n.dataLabels?.size),
|
|
206
|
+
fontFamily: t.fonts.general.fontFamily,
|
|
207
|
+
labels: [{
|
|
208
|
+
label: w(n),
|
|
209
|
+
placements: a
|
|
210
|
+
}]
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}] },
|
|
214
|
+
animations: {
|
|
215
|
+
enabled: !0,
|
|
216
|
+
presetId: "chart-labels"
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
}), v = {}, y = {}, x = u.filter((e) => e.graphType !== r.Bar).map((t) => {
|
|
220
|
+
let i = a(t.dataItem), o = W(e, t, r.Point);
|
|
221
|
+
return y[o] = i, v[o] = {
|
|
222
|
+
enabled: t.dataLabels?.show || !1,
|
|
223
|
+
fontSize: B(t.dataLabels?.size),
|
|
224
|
+
backdropColor: t.dataLabels?.backdropColor,
|
|
225
|
+
textColor: t.dataLabels?.textColor,
|
|
226
|
+
isColored: t.dataLabels?.isColored,
|
|
227
|
+
colorType: t.dataLabels?.showBackdrop ? f.Backdrop : f.Text,
|
|
228
|
+
density: t.dataLabels?.density || n.Medium
|
|
229
|
+
}, o;
|
|
230
|
+
}).filter((e) => v[e].enabled), S = x.length ? [E({
|
|
231
|
+
targetComponentKeys: x,
|
|
232
|
+
targetSelector: `.${F}`,
|
|
233
|
+
label: ({ data: e, node: t }) => e[y[t.key]]?.label,
|
|
234
|
+
skipBrush: !0
|
|
235
|
+
}, v, l, t)] : [];
|
|
236
|
+
if (_.length && S.length) {
|
|
237
|
+
let e = {
|
|
238
|
+
...S[0],
|
|
239
|
+
settings: {
|
|
240
|
+
...S[0].settings,
|
|
241
|
+
sources: [..._.flatMap((e) => e.settings?.sources ?? []), ...S[0].settings?.sources ?? []]
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
return {
|
|
245
|
+
...i,
|
|
246
|
+
components: [...i.components, e]
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
return {
|
|
250
|
+
...i,
|
|
251
|
+
components: [
|
|
252
|
+
...i.components,
|
|
253
|
+
..._,
|
|
254
|
+
...S
|
|
255
|
+
]
|
|
256
|
+
};
|
|
257
|
+
}, he = class extends z {
|
|
258
|
+
constructor() {
|
|
259
|
+
super([
|
|
260
|
+
se,
|
|
261
|
+
oe,
|
|
262
|
+
J,
|
|
263
|
+
k,
|
|
264
|
+
ce,
|
|
265
|
+
ee,
|
|
266
|
+
P,
|
|
267
|
+
me,
|
|
268
|
+
L,
|
|
269
|
+
A,
|
|
270
|
+
j,
|
|
271
|
+
I,
|
|
272
|
+
O,
|
|
273
|
+
Z
|
|
274
|
+
]);
|
|
275
|
+
}
|
|
276
|
+
}, ge = h(), _e = _(({ vSpec: e, vTheme: t, data: n, elementSize: i, vizProperties: a }) => {
|
|
277
|
+
let o = v(), [s] = (0, ae.useState)(() => new he()), c = g(), l = q();
|
|
278
|
+
if (!e || !i) return null;
|
|
279
|
+
let d = t || u, f = s.compile(e, d, n, i, a, r.Combo, o, c, l);
|
|
280
|
+
return f ? /* @__PURE__ */ (0, ge.jsx)(H, {
|
|
281
|
+
config: a,
|
|
282
|
+
definition: f,
|
|
283
|
+
size: i,
|
|
284
|
+
vSpec: e
|
|
285
|
+
}) : null;
|
|
286
|
+
});
|
|
287
|
+
export { _e as ComboChart };
|