@embeddable.com/remarkable-pro 0.2.6 → 0.2.7
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/dist/BarChartDefaultHorizontalPro.js +1 -1
- package/dist/BarChartDefaultPro.js +1 -1
- package/dist/BarChartGroupedHorizontalPro.js +1 -1
- package/dist/BarChartGroupedPro.js +1 -1
- package/dist/BarChartStackedHorizontalPro.js +1 -1
- package/dist/BarChartStackedPro.js +1 -1
- package/dist/DonutChartPro.js +1 -1
- package/dist/DonutLabelChartPro.js +1 -1
- package/dist/LineChartComparisonDefaultPro.js +1 -1
- package/dist/LineChartDefaultPro.js +1 -1
- package/dist/LineChartGroupedPro.js +1 -1
- package/dist/LineChartWithKpiTabsPro.js +1 -1
- package/dist/PieChartPro.js +1 -1
- package/dist/bars.utils-DR-ga7ps.js +176 -0
- package/dist/bars.utils-DR-ga7ps.js.map +1 -0
- package/dist/charts.utils-BEwWG4s2.js +25 -0
- package/dist/charts.utils-BEwWG4s2.js.map +1 -0
- package/dist/components/charts/bars/BarChartGroupedHorizontalPro/index.d.ts.map +1 -1
- package/dist/components/charts/bars/BarChartGroupedPro/index.d.ts.map +1 -1
- package/dist/components/charts/bars/BarChartStackedHorizontalPro/index.d.ts.map +1 -1
- package/dist/components/charts/bars/BarChartStackedPro/index.d.ts.map +1 -1
- package/dist/components/charts/bars/bars.utils.d.ts +11 -0
- package/dist/components/charts/bars/bars.utils.d.ts.map +1 -1
- package/dist/components/charts/charts.utils.d.ts +1 -0
- package/dist/components/charts/charts.utils.d.ts.map +1 -1
- package/dist/components/charts/lines/LineChartComparisonDefaultPro/LineChartComparisonDefaultPro.utils.d.ts.map +1 -1
- package/dist/components/charts/lines/LineChartDefaultPro/LineChartDefaultPro.utils.d.ts.map +1 -1
- package/dist/components/charts/lines/LineChartGroupedPro/LineChartGroupedPro.utils.d.ts +1 -0
- package/dist/components/charts/lines/LineChartGroupedPro/LineChartGroupedPro.utils.d.ts.map +1 -1
- package/dist/components/charts/lines/LineChartGroupedPro/LineChartGroupedPro.utils.test.d.ts +2 -0
- package/dist/components/charts/lines/LineChartGroupedPro/LineChartGroupedPro.utils.test.d.ts.map +1 -0
- package/dist/components/charts/lines/lines.utils.d.ts +4 -1
- package/dist/components/charts/lines/lines.utils.d.ts.map +1 -1
- package/dist/components/charts/pies/pies.utils.d.ts +4 -1
- package/dist/components/charts/pies/pies.utils.d.ts.map +1 -1
- package/dist/{definition-1rawu7CS.js → definition-5MQbWUXL.js} +10 -10
- package/dist/definition-5MQbWUXL.js.map +1 -0
- package/dist/{definition-6V_kjo0t.js → definition-BNffWCqm.js} +42 -35
- package/dist/definition-BNffWCqm.js.map +1 -0
- package/dist/{definition-BbZF9oV3.js → definition-CMvwdXRu.js} +51 -44
- package/dist/definition-CMvwdXRu.js.map +1 -0
- package/dist/{definition-CuY7y9zK.js → definition-Ce2VcCyv.js} +2 -2
- package/dist/{definition-CuY7y9zK.js.map → definition-Ce2VcCyv.js.map} +1 -1
- package/dist/{definition-Cv0Wy617.js → definition-D1YtBczb.js} +40 -33
- package/dist/definition-D1YtBczb.js.map +1 -0
- package/dist/{definition-BjBVobf-.js → definition-D2bJQDNh.js} +29 -22
- package/dist/definition-D2bJQDNh.js.map +1 -0
- package/dist/{definition-flvbz5lg.js → definition-DIH0gF4I.js} +2 -2
- package/dist/{definition-flvbz5lg.js.map → definition-DIH0gF4I.js.map} +1 -1
- package/dist/definition-DOaQylZq.js +281 -0
- package/dist/definition-DOaQylZq.js.map +1 -0
- package/dist/{definition-cOQtp0ke.js → definition-DQP0JMyo.js} +114 -100
- package/dist/definition-DQP0JMyo.js.map +1 -0
- package/dist/{definition-HZ3fanxl.js → definition-DwouHcfu.js} +10 -10
- package/dist/definition-DwouHcfu.js.map +1 -0
- package/dist/{definition-BSKYvKCi.js → definition-HByuRICY.js} +78 -77
- package/dist/definition-HByuRICY.js.map +1 -0
- package/dist/{definition-kavZZeUh.js → definition-_hl_uvEW.js} +10 -10
- package/dist/definition-_hl_uvEW.js.map +1 -0
- package/dist/{definition-cEG06qae.js → definition-mz09xu8Q.js} +2 -2
- package/dist/{definition-cEG06qae.js.map → definition-mz09xu8Q.js.map} +1 -1
- package/dist/embeddable-components.json +52 -52
- package/dist/embeddable-theme-0137e.js +1 -1
- package/dist/index.js +202 -199
- package/dist/index.js.map +1 -1
- package/dist/lines.utils-CEGfmIHB.js.map +1 -1
- package/dist/pies.utils-Bb2EFei6.js +99 -0
- package/dist/pies.utils-Bb2EFei6.js.map +1 -0
- package/dist/{charts.utils-B_axoMNF.js → theme.constants-Cl6fOHv-.js} +638 -654
- package/dist/theme.constants-Cl6fOHv-.js.map +1 -0
- package/package.json +1 -2
- package/dist/bars.utils-Dw_DLpHV.js +0 -158
- package/dist/bars.utils-Dw_DLpHV.js.map +0 -1
- package/dist/charts.utils-B_axoMNF.js.map +0 -1
- package/dist/definition-1rawu7CS.js.map +0 -1
- package/dist/definition-6V_kjo0t.js.map +0 -1
- package/dist/definition-BSKYvKCi.js.map +0 -1
- package/dist/definition-BbZF9oV3.js.map +0 -1
- package/dist/definition-BjBVobf-.js.map +0 -1
- package/dist/definition-Cv0Wy617.js.map +0 -1
- package/dist/definition-D-KGeUhT.js +0 -277
- package/dist/definition-D-KGeUhT.js.map +0 -1
- package/dist/definition-HZ3fanxl.js.map +0 -1
- package/dist/definition-cOQtp0ke.js.map +0 -1
- package/dist/definition-kavZZeUh.js.map +0 -1
- package/dist/pies.utils-COX5fEMR.js +0 -76
- package/dist/pies.utils-COX5fEMR.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,250 +1,253 @@
|
|
|
1
1
|
import { a as h, g as C, b, i as x } from "./styles.utils-C8CnV0SB.js";
|
|
2
|
-
import { i as
|
|
2
|
+
import { i as D, s as F } from "./color.utils-BSg_DFOh.js";
|
|
3
3
|
import { c as y, a as R, b as k, g as L, i as O } from "./formatter.utils-BZMmas2O.js";
|
|
4
4
|
import { b as E, c as M, a as A, g as B, l as v, d as w, u as $ } from "./dates.utils-Dai9OZEP.js";
|
|
5
|
-
import { d as
|
|
6
|
-
import { i as
|
|
7
|
-
import { C as
|
|
8
|
-
import { g as
|
|
9
|
-
import { p as
|
|
10
|
-
import { i as
|
|
11
|
-
import { i as
|
|
12
|
-
import { i as
|
|
13
|
-
import { i as
|
|
14
|
-
import { i as
|
|
15
|
-
import { i as
|
|
16
|
-
import { g as
|
|
17
|
-
import { i as He, k as
|
|
18
|
-
import { i as
|
|
19
|
-
import { g as
|
|
20
|
-
import { i as
|
|
21
|
-
import { i as
|
|
22
|
-
import { i as
|
|
23
|
-
import { g as
|
|
24
|
-
import { i as
|
|
25
|
-
import { i as
|
|
26
|
-
import { i as
|
|
27
|
-
import { i as
|
|
28
|
-
import { i as Da, d as
|
|
29
|
-
import { g as
|
|
30
|
-
import { i as
|
|
31
|
-
import { i as
|
|
32
|
-
import { i as
|
|
33
|
-
import { T as
|
|
34
|
-
import { b as
|
|
35
|
-
import { g as
|
|
36
|
-
import { C as
|
|
37
|
-
import { C as
|
|
38
|
-
import { i as
|
|
39
|
-
import { i as
|
|
40
|
-
import { i as
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { i as
|
|
44
|
-
import { i as
|
|
45
|
-
import { i as
|
|
46
|
-
import { i as
|
|
47
|
-
import { i as
|
|
48
|
-
import { i as
|
|
49
|
-
import { i as
|
|
50
|
-
import { i as
|
|
51
|
-
import { i as
|
|
52
|
-
import { i as
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import { g as
|
|
57
|
-
import {
|
|
58
|
-
import { i as
|
|
5
|
+
import { d as H, a as j, b as N, c as _, e as z, f as K, g as V, r as W, h as q, i as U } from "./theme.constants-Cl6fOHv-.js";
|
|
6
|
+
import { i as Y, a as Z, r as J, b as Q } from "./component.utils-Dua9clQJ.js";
|
|
7
|
+
import { C as ae, G as te, d as re, a as oe, b as se, i as ie, s as ne, t as le, c as pe } from "./component.inputs.constants-DnFrZzR7.js";
|
|
8
|
+
import { g as de, a as ce } from "./timeRange.utils-CcP33PfM.js";
|
|
9
|
+
import { p as ge } from "./preview.data.constants-Cf1TpbZu.js";
|
|
10
|
+
import { i as fe, b as he } from "./definition-mz09xu8Q.js";
|
|
11
|
+
import { i as be, b as xe } from "./definition-D1YtBczb.js";
|
|
12
|
+
import { i as De, b as Fe } from "./definition-BNffWCqm.js";
|
|
13
|
+
import { i as ye, b as Re } from "./definition-Ce2VcCyv.js";
|
|
14
|
+
import { i as Le, b as Oe } from "./definition-CMvwdXRu.js";
|
|
15
|
+
import { i as Ee, b as Me } from "./definition-D2bJQDNh.js";
|
|
16
|
+
import { g as Be, a as ve, b as we, c as $e } from "./bars.utils-DR-ga7ps.js";
|
|
17
|
+
import { i as He, k as je } from "./definition-Bm1ec3cN.js";
|
|
18
|
+
import { i as _e, k as ze } from "./definition-BNOhKWNT.js";
|
|
19
|
+
import { g as Ve } from "./kpis.utils-DsZ2GzuB.js";
|
|
20
|
+
import { i as qe, g as Ue, a as Xe, l as Ye } from "./definition-HByuRICY.js";
|
|
21
|
+
import { i as Je, g as Qe, a as ea, l as aa } from "./definition-DOaQylZq.js";
|
|
22
|
+
import { i as ra, g as oa, a as sa, l as ia } from "./definition-DQP0JMyo.js";
|
|
23
|
+
import { g as la } from "./lines.utils-CEGfmIHB.js";
|
|
24
|
+
import { i as ma, l as da } from "./definition-DIH0gF4I.js";
|
|
25
|
+
import { i as ua, s as ga } from "./definition-vdBo_sz-.js";
|
|
26
|
+
import { i as fa, d as ha } from "./definition-_hl_uvEW.js";
|
|
27
|
+
import { i as ba, p as xa } from "./definition-DwouHcfu.js";
|
|
28
|
+
import { i as Da, d as Fa } from "./definition-5MQbWUXL.js";
|
|
29
|
+
import { g as ya, a as Ra } from "./pies.utils-Bb2EFei6.js";
|
|
30
|
+
import { i as La, h as Oa } from "./definition-D30Z62sw.js";
|
|
31
|
+
import { i as Ea, g as Ma, a as Aa, b as Ba, c as va, p as wa } from "./definition-DvM-bBHc.js";
|
|
32
|
+
import { i as Ia, d as Ha, t as ja } from "./definition-DIkjRBmH.js";
|
|
33
|
+
import { T as _a, i as za, d as Ka, t as Va } from "./definition-nEosVAA3.js";
|
|
34
|
+
import { b as qa, c as Ua, g as Xa, a as Ya } from "./tables.utils-CigVmDOc.js";
|
|
35
|
+
import { g as Ja, u as Qa } from "./tables.hooks-fVC_4V5K.js";
|
|
36
|
+
import { C as at } from "./ChartCard-Cv9hqNdM.js";
|
|
37
|
+
import { C as rt, g as ot } from "./granularity.utils-B2u5dfRk.js";
|
|
38
|
+
import { i as it, e as nt } from "./definition-B4ALO0PD.js";
|
|
39
|
+
import { i as pt, h as mt } from "./definition-DMI3MDQJ.js";
|
|
40
|
+
import { i as ct, m as ut } from "./definition-Dd4MdyW4.js";
|
|
41
|
+
import { a as Pt, b as ft, g as ht } from "./charts.utils-BEwWG4s2.js";
|
|
42
|
+
import { u as bt } from "./charts.fillGaps.hooks-DgH30vXI.js";
|
|
43
|
+
import { i as St, c as Dt, g as Ft, a as Tt } from "./definition-Ba7J1LGI.js";
|
|
44
|
+
import { i as Rt, d as kt, g as Lt } from "./definition-HLAKpAEj.js";
|
|
45
|
+
import { i as Gt, d as Et } from "./definition-NZLRzHFa.js";
|
|
46
|
+
import { i as At, m as Bt } from "./definition-DISg7Yca.js";
|
|
47
|
+
import { i as wt, s as $t } from "./definition-CfCvupyD.js";
|
|
48
|
+
import { i as Ht, d as jt } from "./definition-BZVoO8bb.js";
|
|
49
|
+
import { i as _t, m as zt } from "./definition-CJR0UaGt.js";
|
|
50
|
+
import { i as Vt, d as Wt } from "./definition-B66i_lHu.js";
|
|
51
|
+
import { i as Ut, m as Xt } from "./definition-D59NL3vt.js";
|
|
52
|
+
import { i as Zt, g as Jt } from "./definition-luwVk1GE.js";
|
|
53
|
+
import { i as er, t as ar } from "./definition-BpHv0bRb.js";
|
|
54
|
+
import { E as rr } from "./EditorCard-DdYPPSGd.js";
|
|
55
|
+
import { D as sr } from "./DimensionAndMeasureSingleSelectField-B-HiSZ1m.js";
|
|
56
|
+
import { G as nr, g as lr, a as pr, b as mr } from "./GranularitySelectField-DpQLHVFc.js";
|
|
57
|
+
import { g as cr } from "./dimensionsAndMeasures.utils-DsVzuJ1x.js";
|
|
58
|
+
import { i as gr } from "./index-BikfLMXU.js";
|
|
59
|
+
import { i as fr } from "./index-ZWtLBqwf.js";
|
|
59
60
|
const n = "remarkable-theme-fonts", i = "data-remarkable-preconnect", l = "data-remarkable-google-fonts", m = (e) => {
|
|
60
61
|
if (document.querySelector(`link[${i}]`)) return;
|
|
61
62
|
const a = document.createElement("link");
|
|
62
63
|
a.rel = "preconnect", a.href = "https://fonts.googleapis.com", a.setAttribute(i, "1"), e.appendChild(a);
|
|
63
|
-
const
|
|
64
|
-
|
|
64
|
+
const t = document.createElement("link");
|
|
65
|
+
t.rel = "preconnect", t.href = "https://fonts.gstatic.com", t.crossOrigin = "anonymous", t.setAttribute(i, "1"), e.appendChild(t);
|
|
65
66
|
}, d = (e) => {
|
|
66
67
|
if (!e || e.length === 0 || typeof document > "u" || !document.head || document.querySelector(`link[${l}]`)) return;
|
|
67
68
|
const a = document.head;
|
|
68
69
|
m(a);
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
return `family=${
|
|
70
|
+
const t = e.map((s) => {
|
|
71
|
+
const r = encodeURIComponent(s.name.replace(/\s+/g, " ")), p = s.weights ?? "100..900";
|
|
72
|
+
return `family=${r}:wght@${p}`;
|
|
72
73
|
}).join("&"), o = document.createElement("link");
|
|
73
|
-
o.rel = "stylesheet", o.href = `https://fonts.googleapis.com/css2?${
|
|
74
|
+
o.rel = "stylesheet", o.href = `https://fonts.googleapis.com/css2?${t}&display=swap`, o.setAttribute(l, "1"), a.appendChild(o);
|
|
74
75
|
}, c = (e) => {
|
|
75
|
-
const a = e.family.replace(/'/g, "\\'"),
|
|
76
|
+
const a = e.family.replace(/'/g, "\\'"), t = [];
|
|
76
77
|
if (e.descriptors) {
|
|
77
|
-
const
|
|
78
|
-
|
|
78
|
+
const r = e.descriptors;
|
|
79
|
+
r.style != null && t.push(`font-style: ${r.style}`), r.weight != null && t.push(`font-weight: ${r.weight}`), r.stretch != null && t.push(`font-stretch: ${r.stretch}`), r.unicodeRange != null && t.push(`unicode-range: ${r.unicodeRange}`);
|
|
79
80
|
}
|
|
80
|
-
const o =
|
|
81
|
+
const o = t.join("; "), s = o ? `; ${o}` : "";
|
|
81
82
|
return `@font-face { font-family: '${a}'; src: url(${e.src})${s}; }`;
|
|
82
83
|
}, u = (e) => {
|
|
83
84
|
if (!e || e.length === 0 || typeof document > "u" || !document.head || e.length === 0) return;
|
|
84
85
|
let a = document.getElementById(n);
|
|
85
|
-
const
|
|
86
|
+
const t = e.map(c).join(`
|
|
86
87
|
`);
|
|
87
|
-
a ? a.textContent =
|
|
88
|
+
a ? a.textContent = t : (a = document.createElement("style"), a.id = n, a.textContent = t, document.head.appendChild(a));
|
|
88
89
|
}, g = (e) => {
|
|
89
90
|
e && (d(e.google), u(e.custom));
|
|
90
91
|
};
|
|
91
92
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
93
|
+
ye as BarChartDefaultHorizontalPro,
|
|
94
|
+
fe as BarChartDefaultPro,
|
|
95
|
+
Ee as BarChartGroupedHorizontalPro,
|
|
96
|
+
De as BarChartGroupedPro,
|
|
97
|
+
Le as BarChartStackedHorizontalPro,
|
|
98
|
+
be as BarChartStackedPro,
|
|
99
|
+
at as ChartCard,
|
|
100
|
+
rt as ChartGranularitySelectField,
|
|
101
|
+
gr as ColorEditorPro,
|
|
102
|
+
St as ComparisonPeriodSelectFieldPro,
|
|
103
|
+
ae as ComparisonPeriodType,
|
|
104
|
+
Gt as DateRangePickerCustomPro,
|
|
105
|
+
Rt as DateRangeSelectFieldPro,
|
|
106
|
+
sr as DimensionAndMeasureSingleSelectField,
|
|
107
|
+
Vt as DimensionMeasureMultiSelectFieldPro,
|
|
108
|
+
Ht as DimensionSingleSelectFieldPro,
|
|
109
|
+
fa as DonutChartPro,
|
|
109
110
|
Da as DonutLabelChartPro,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
rr as EditorCard,
|
|
112
|
+
it as EmptyContainerPro,
|
|
113
|
+
te as Granularity,
|
|
114
|
+
nr as GranularitySelectField,
|
|
115
|
+
Zt as GranularitySelectFieldPro,
|
|
116
|
+
La as HeatMapPro,
|
|
117
|
+
pt as HorizontalDividerPro,
|
|
118
|
+
_e as KpiChartNumberComparisonPro,
|
|
118
119
|
He as KpiChartNumberPro,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
120
|
+
ra as LineChartComparisonDefaultPro,
|
|
121
|
+
qe as LineChartDefaultPro,
|
|
122
|
+
Je as LineChartGroupedPro,
|
|
123
|
+
ma as LineChartTabbedPro,
|
|
124
|
+
fr as MarkdownEditorPro,
|
|
125
|
+
ct as MarkdownPro,
|
|
126
|
+
Ut as MeasureMultiSelectFieldPro,
|
|
127
|
+
_t as MeasureSingleSelectFieldPro,
|
|
128
|
+
At as MultiSelectFieldPro,
|
|
129
|
+
ba as PieChartPro,
|
|
130
|
+
Ea as PivotTablePro,
|
|
131
|
+
ua as ScatterChartPro,
|
|
132
|
+
wt as SingleSelectFieldPro,
|
|
133
|
+
_a as TABLE_SCROLLABLE_SIZE,
|
|
134
|
+
Ia as TableChartPaginatedPro,
|
|
135
|
+
za as TableScrollablePro,
|
|
136
|
+
er as TextFieldPro,
|
|
137
|
+
Re as barChartDefaultHorizontalPro,
|
|
138
|
+
he as barChartDefaultPro,
|
|
139
|
+
Me as barChartGroupedHorizontalPro,
|
|
140
|
+
Fe as barChartGroupedPro,
|
|
141
|
+
Oe as barChartStackedHorizontalPro,
|
|
142
|
+
xe as barChartStackedPro,
|
|
142
143
|
y as cache,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
Dt as comparisonPeriodSelectFieldPro,
|
|
145
|
+
Et as dateRangePickerCustomPro,
|
|
146
|
+
kt as dateRangeSelectFieldPro,
|
|
147
|
+
H as defaultChartMenuProOptions,
|
|
148
|
+
j as defaultComparisonPeriodOptions,
|
|
148
149
|
N as defaultDateRangeOptions,
|
|
149
|
-
|
|
150
|
+
re as defaultGranularitySelectFieldOptions,
|
|
150
151
|
_ as defaultTableCellStyleOptions,
|
|
151
152
|
Ha as defaultTableChartPaginatedState,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
153
|
+
Ka as defaultTableScrollableState,
|
|
154
|
+
Wt as dimensionMeasureMultiSelectFieldPro,
|
|
155
|
+
oe as dimensionMeasureSubInputs,
|
|
156
|
+
jt as dimensionSingleSelectFieldPro,
|
|
157
|
+
ha as donutChartPro,
|
|
158
|
+
Fa as donutLabelChartPro,
|
|
159
|
+
nt as emptyBlockPro,
|
|
159
160
|
z as exportCSV,
|
|
160
161
|
K as exportPNG,
|
|
161
162
|
V as exportXLSX,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
lr as getAvailableGranularityOptionsFromTimeRange,
|
|
164
|
+
Be as getBarChartProData,
|
|
165
|
+
ve as getBarChartProOptions,
|
|
166
|
+
we as getBarStackedChartProData,
|
|
167
|
+
$e as getBarStackedChartProOptions,
|
|
166
168
|
h as getColor,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
de as getComparisonPeriodDateRange,
|
|
170
|
+
ce as getComparisonPeriodLabel,
|
|
171
|
+
Ft as getComparisonPeriodSelectFieldProOptions,
|
|
172
|
+
Pt as getDatalabelPercentage,
|
|
171
173
|
E as getDateRangeFromTimeRange,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
+
Lt as getDateRangeSelectFieldProOptions,
|
|
175
|
+
cr as getDimensionAndMeasureOptions,
|
|
174
176
|
R as getDimensionFieldName,
|
|
175
177
|
C as getDimensionMeasureColor,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
178
|
+
ot as getDimensionWithGranularity,
|
|
179
|
+
ft as getDimensionWithoutTruncation,
|
|
180
|
+
pr as getGranularitySelectFieldOptions,
|
|
181
|
+
Ve as getKpiResults,
|
|
182
|
+
oa as getLineChartComparisonProData,
|
|
183
|
+
sa as getLineChartComparisonProOptions,
|
|
184
|
+
Qe as getLineChartGroupedProData,
|
|
185
|
+
ea as getLineChartGroupedProOptions,
|
|
186
|
+
Ue as getLineChartProData,
|
|
187
|
+
Xe as getLineChartProOptions,
|
|
188
|
+
la as getLineChartProOptionsOnClick,
|
|
186
189
|
b as getObjectStableKey,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
ya as getPieChartProData,
|
|
191
|
+
Ra as getPieChartProOptions,
|
|
192
|
+
Ma as getPivotColumnTotalsFor,
|
|
193
|
+
Aa as getPivotDimension,
|
|
194
|
+
Ba as getPivotMeasures,
|
|
195
|
+
va as getPivotRowTotalsFor,
|
|
196
|
+
mr as getSafeSelection,
|
|
194
197
|
k as getSubInputValue,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
qa as getTableHeaderAlign,
|
|
199
|
+
Ua as getTableHeaderMinWidth,
|
|
200
|
+
Xa as getTableHeaders,
|
|
201
|
+
Ya as getTableRows,
|
|
202
|
+
Ja as getTableSortedResults,
|
|
200
203
|
L as getThemeFormatter,
|
|
201
204
|
M as getTimeRangeFromDateRange,
|
|
202
205
|
A as getTimeRangeFromPresets,
|
|
203
206
|
B as getTimeRangeLabel,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
se as granularities,
|
|
208
|
+
Jt as granularitySelectFieldPro,
|
|
209
|
+
ht as groupTailAsOther,
|
|
210
|
+
Oa as heatMapPro,
|
|
211
|
+
mt as horizontalDividerPro,
|
|
212
|
+
Y as i18n,
|
|
213
|
+
Z as i18nSetup,
|
|
211
214
|
x as injectCssVariables,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
+
ie as inputs,
|
|
216
|
+
D as isColorValid,
|
|
217
|
+
Tt as isComparisonPeriodAvailable,
|
|
215
218
|
O as isValidISODate,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
ze as kpiChartNumberComparisonPro,
|
|
220
|
+
je as kpiChartNumberPro,
|
|
221
|
+
ia as lineChartComparisonDefaultPro,
|
|
222
|
+
Ye as lineChartDefaultPro,
|
|
223
|
+
aa as lineChartGroupedPro,
|
|
224
|
+
da as lineChartWithKpiTabsPro,
|
|
222
225
|
v as loadDayjsLocale,
|
|
223
226
|
g as loadThemeFonts,
|
|
224
227
|
w as localToUtcDate,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
228
|
+
ut as markdownPro,
|
|
229
|
+
Xt as measureMultiSelectFieldPro,
|
|
230
|
+
zt as measureSingleSelectFieldPro,
|
|
231
|
+
Bt as multiSelectFieldPro,
|
|
232
|
+
xa as pieChartPro,
|
|
233
|
+
wa as pivotTablePro,
|
|
234
|
+
ge as previewData,
|
|
235
|
+
W as remarkableTheme,
|
|
236
|
+
q as remarkableThemeFormatter,
|
|
237
|
+
U as remarkableThemeStyles,
|
|
238
|
+
J as resolveI18nProps,
|
|
239
|
+
Q as resolveI18nString,
|
|
240
|
+
ga as scatterChartPro,
|
|
241
|
+
F as setColorAlpha,
|
|
242
|
+
$t as singleSelectFieldPro,
|
|
243
|
+
ne as subInputs,
|
|
244
|
+
ja as tableChartPaginated,
|
|
245
|
+
Va as tableScrollable,
|
|
246
|
+
ar as textFieldPro,
|
|
247
|
+
le as timeDimensionSubInputs,
|
|
248
|
+
pe as timeDimensionWithGranularitySelectFieldSubInputs,
|
|
249
|
+
bt as useFillGaps,
|
|
250
|
+
Qa as useGetTableSortedResults,
|
|
248
251
|
$ as useLoadDayjsLocale
|
|
249
252
|
};
|
|
250
253
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/theme/fonts/fonts.utils.ts"],"sourcesContent":["import { ThemeFonts, ThemeFontCustom } from './fonts.types';\n\nconst REMARKABLE_FONTS_STYLE_ID = 'remarkable-theme-fonts';\nconst REMARKABLE_PRECONNECT_ATTR = 'data-remarkable-preconnect';\nconst REMARKABLE_GOOGLE_FONTS_ATTR = 'data-remarkable-google-fonts';\n\nconst injectGooglePreconnect = (head: HTMLHeadElement): void => {\n if (document.querySelector(`link[${REMARKABLE_PRECONNECT_ATTR}]`)) return;\n\n const pre1 = document.createElement('link');\n pre1.rel = 'preconnect';\n pre1.href = 'https://fonts.googleapis.com';\n pre1.setAttribute(REMARKABLE_PRECONNECT_ATTR, '1');\n head.appendChild(pre1);\n\n const pre2 = document.createElement('link');\n pre2.rel = 'preconnect';\n pre2.href = 'https://fonts.gstatic.com';\n pre2.crossOrigin = 'anonymous';\n pre2.setAttribute(REMARKABLE_PRECONNECT_ATTR, '1');\n head.appendChild(pre2);\n};\n\nconst injectGoogleFonts = (fonts: ThemeFonts['google']): void => {\n if (!fonts || fonts.length === 0) return;\n if (typeof document === 'undefined' || !document.head) return;\n if (document.querySelector(`link[${REMARKABLE_GOOGLE_FONTS_ATTR}]`)) return;\n\n const head = document.head;\n injectGooglePreconnect(head);\n\n const query = fonts\n .map((f) => {\n const encoded = encodeURIComponent(f.name.replace(/\\s+/g, ' '));\n const weights = f.weights ?? '100..900';\n return `family=${encoded}:wght@${weights}`;\n })\n .join('&');\n\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = `https://fonts.googleapis.com/css2?${query}&display=swap`;\n link.setAttribute(REMARKABLE_GOOGLE_FONTS_ATTR, '1');\n head.appendChild(link);\n};\n\nconst fontFaceCss = (font: ThemeFontCustom): string => {\n const family = font.family.replace(/'/g, \"\\\\'\");\n\n const descriptorParts: string[] = [];\n if (font.descriptors) {\n const d = font.descriptors;\n if (d.style != null) descriptorParts.push(`font-style: ${d.style}`);\n if (d.weight != null) descriptorParts.push(`font-weight: ${d.weight}`);\n if (d.stretch != null) descriptorParts.push(`font-stretch: ${d.stretch}`);\n if (d.unicodeRange != null) descriptorParts.push(`unicode-range: ${d.unicodeRange}`);\n }\n\n const descriptors = descriptorParts.join('; ');\n const decl = descriptors ? `; ${descriptors}` : '';\n\n return `@font-face { font-family: '${family}'; src: url(${font.src})${decl}; }`;\n};\n\nconst injectCustomFonts = (custom: ThemeFonts['custom']): void => {\n if (!custom || custom.length === 0) return;\n if (typeof document === 'undefined' || !document.head || custom.length === 0) return;\n\n let styleEl = document.getElementById(REMARKABLE_FONTS_STYLE_ID) as HTMLStyleElement | null;\n const css = custom.map(fontFaceCss).join('\\n');\n\n if (styleEl) {\n styleEl.textContent = css;\n } else {\n styleEl = document.createElement('style');\n styleEl.id = REMARKABLE_FONTS_STYLE_ID;\n styleEl.textContent = css;\n document.head.appendChild(styleEl);\n }\n};\n\nexport const loadThemeFonts = (fonts?: ThemeFonts): void => {\n if (!fonts) return;\n\n injectGoogleFonts(fonts.google);\n injectCustomFonts(fonts.custom);\n};\n"],"names":["REMARKABLE_FONTS_STYLE_ID","REMARKABLE_PRECONNECT_ATTR","REMARKABLE_GOOGLE_FONTS_ATTR","injectGooglePreconnect","head","pre1","pre2","injectGoogleFonts","fonts","query","f","encoded","weights","link","fontFaceCss","font","family","descriptorParts","d","descriptors","decl","injectCustomFonts","custom","styleEl","css","loadThemeFonts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/theme/fonts/fonts.utils.ts"],"sourcesContent":["import { ThemeFonts, ThemeFontCustom } from './fonts.types';\n\nconst REMARKABLE_FONTS_STYLE_ID = 'remarkable-theme-fonts';\nconst REMARKABLE_PRECONNECT_ATTR = 'data-remarkable-preconnect';\nconst REMARKABLE_GOOGLE_FONTS_ATTR = 'data-remarkable-google-fonts';\n\nconst injectGooglePreconnect = (head: HTMLHeadElement): void => {\n if (document.querySelector(`link[${REMARKABLE_PRECONNECT_ATTR}]`)) return;\n\n const pre1 = document.createElement('link');\n pre1.rel = 'preconnect';\n pre1.href = 'https://fonts.googleapis.com';\n pre1.setAttribute(REMARKABLE_PRECONNECT_ATTR, '1');\n head.appendChild(pre1);\n\n const pre2 = document.createElement('link');\n pre2.rel = 'preconnect';\n pre2.href = 'https://fonts.gstatic.com';\n pre2.crossOrigin = 'anonymous';\n pre2.setAttribute(REMARKABLE_PRECONNECT_ATTR, '1');\n head.appendChild(pre2);\n};\n\nconst injectGoogleFonts = (fonts: ThemeFonts['google']): void => {\n if (!fonts || fonts.length === 0) return;\n if (typeof document === 'undefined' || !document.head) return;\n if (document.querySelector(`link[${REMARKABLE_GOOGLE_FONTS_ATTR}]`)) return;\n\n const head = document.head;\n injectGooglePreconnect(head);\n\n const query = fonts\n .map((f) => {\n const encoded = encodeURIComponent(f.name.replace(/\\s+/g, ' '));\n const weights = f.weights ?? '100..900';\n return `family=${encoded}:wght@${weights}`;\n })\n .join('&');\n\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = `https://fonts.googleapis.com/css2?${query}&display=swap`;\n link.setAttribute(REMARKABLE_GOOGLE_FONTS_ATTR, '1');\n head.appendChild(link);\n};\n\nconst fontFaceCss = (font: ThemeFontCustom): string => {\n const family = font.family.replace(/'/g, \"\\\\'\");\n\n const descriptorParts: string[] = [];\n if (font.descriptors) {\n const d = font.descriptors;\n if (d.style != null) descriptorParts.push(`font-style: ${d.style}`);\n if (d.weight != null) descriptorParts.push(`font-weight: ${d.weight}`);\n if (d.stretch != null) descriptorParts.push(`font-stretch: ${d.stretch}`);\n if (d.unicodeRange != null) descriptorParts.push(`unicode-range: ${d.unicodeRange}`);\n }\n\n const descriptors = descriptorParts.join('; ');\n const decl = descriptors ? `; ${descriptors}` : '';\n\n return `@font-face { font-family: '${family}'; src: url(${font.src})${decl}; }`;\n};\n\nconst injectCustomFonts = (custom: ThemeFonts['custom']): void => {\n if (!custom || custom.length === 0) return;\n if (typeof document === 'undefined' || !document.head || custom.length === 0) return;\n\n let styleEl = document.getElementById(REMARKABLE_FONTS_STYLE_ID) as HTMLStyleElement | null;\n const css = custom.map(fontFaceCss).join('\\n');\n\n if (styleEl) {\n styleEl.textContent = css;\n } else {\n styleEl = document.createElement('style');\n styleEl.id = REMARKABLE_FONTS_STYLE_ID;\n styleEl.textContent = css;\n document.head.appendChild(styleEl);\n }\n};\n\nexport const loadThemeFonts = (fonts?: ThemeFonts): void => {\n if (!fonts) return;\n\n injectGoogleFonts(fonts.google);\n injectCustomFonts(fonts.custom);\n};\n"],"names":["REMARKABLE_FONTS_STYLE_ID","REMARKABLE_PRECONNECT_ATTR","REMARKABLE_GOOGLE_FONTS_ATTR","injectGooglePreconnect","head","pre1","pre2","injectGoogleFonts","fonts","query","f","encoded","weights","link","fontFaceCss","font","family","descriptorParts","d","descriptors","decl","injectCustomFonts","custom","styleEl","css","loadThemeFonts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAMA,IAA4B,0BAC5BC,IAA6B,8BAC7BC,IAA+B,gCAE/BC,IAAyB,CAACC,MAAgC;AAC9D,MAAI,SAAS,cAAc,QAAQH,CAA0B,GAAG,EAAG;AAEnE,QAAMI,IAAO,SAAS,cAAc,MAAM;AAC1C,EAAAA,EAAK,MAAM,cACXA,EAAK,OAAO,gCACZA,EAAK,aAAaJ,GAA4B,GAAG,GACjDG,EAAK,YAAYC,CAAI;AAErB,QAAMC,IAAO,SAAS,cAAc,MAAM;AAC1C,EAAAA,EAAK,MAAM,cACXA,EAAK,OAAO,6BACZA,EAAK,cAAc,aACnBA,EAAK,aAAaL,GAA4B,GAAG,GACjDG,EAAK,YAAYE,CAAI;AACvB,GAEMC,IAAoB,CAACC,MAAsC;AAG/D,MAFI,CAACA,KAASA,EAAM,WAAW,KAC3B,OAAO,WAAa,OAAe,CAAC,SAAS,QAC7C,SAAS,cAAc,QAAQN,CAA4B,GAAG,EAAG;AAErE,QAAME,IAAO,SAAS;AACtB,EAAAD,EAAuBC,CAAI;AAE3B,QAAMK,IAAQD,EACX,IAAI,CAACE,MAAM;AACV,UAAMC,IAAU,mBAAmBD,EAAE,KAAK,QAAQ,QAAQ,GAAG,CAAC,GACxDE,IAAUF,EAAE,WAAW;AAC7B,WAAO,UAAUC,CAAO,SAASC,CAAO;AAAA,EAC1C,CAAC,EACA,KAAK,GAAG,GAELC,IAAO,SAAS,cAAc,MAAM;AAC1C,EAAAA,EAAK,MAAM,cACXA,EAAK,OAAO,qCAAqCJ,CAAK,iBACtDI,EAAK,aAAaX,GAA8B,GAAG,GACnDE,EAAK,YAAYS,CAAI;AACvB,GAEMC,IAAc,CAACC,MAAkC;AACrD,QAAMC,IAASD,EAAK,OAAO,QAAQ,MAAM,KAAK,GAExCE,IAA4B,CAAA;AAClC,MAAIF,EAAK,aAAa;AACpB,UAAMG,IAAIH,EAAK;AACf,IAAIG,EAAE,SAAS,QAAMD,EAAgB,KAAK,eAAeC,EAAE,KAAK,EAAE,GAC9DA,EAAE,UAAU,QAAMD,EAAgB,KAAK,gBAAgBC,EAAE,MAAM,EAAE,GACjEA,EAAE,WAAW,QAAMD,EAAgB,KAAK,iBAAiBC,EAAE,OAAO,EAAE,GACpEA,EAAE,gBAAgB,QAAMD,EAAgB,KAAK,kBAAkBC,EAAE,YAAY,EAAE;AAAA,EACrF;AAEA,QAAMC,IAAcF,EAAgB,KAAK,IAAI,GACvCG,IAAOD,IAAc,KAAKA,CAAW,KAAK;AAEhD,SAAO,8BAA8BH,CAAM,eAAeD,EAAK,GAAG,IAAIK,CAAI;AAC5E,GAEMC,IAAoB,CAACC,MAAuC;AAEhE,MADI,CAACA,KAAUA,EAAO,WAAW,KAC7B,OAAO,WAAa,OAAe,CAAC,SAAS,QAAQA,EAAO,WAAW,EAAG;AAE9E,MAAIC,IAAU,SAAS,eAAevB,CAAyB;AAC/D,QAAMwB,IAAMF,EAAO,IAAIR,CAAW,EAAE,KAAK;AAAA,CAAI;AAE7C,EAAIS,IACFA,EAAQ,cAAcC,KAEtBD,IAAU,SAAS,cAAc,OAAO,GACxCA,EAAQ,KAAKvB,GACbuB,EAAQ,cAAcC,GACtB,SAAS,KAAK,YAAYD,CAAO;AAErC,GAEaE,IAAiB,CAACjB,MAA6B;AAC1D,EAAKA,MAELD,EAAkBC,EAAM,MAAM,GAC9Ba,EAAkBb,EAAM,MAAM;AAChC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lines.utils-CEGfmIHB.js","sources":["../src/components/charts/lines/lines.utils.ts"],"sourcesContent":["import { ChartDataset, ChartOptions, InteractionItem } from 'chart.js';\n\nexport type LineChartProOptionsClickArg = {\n dimensionValue: string | number | null;\n groupingDimensionValue?: string | boolean | null;\n};\nexport type LineChartProOptionsClick = (arg: LineChartProOptionsClickArg) => void;\n\
|
|
1
|
+
{"version":3,"file":"lines.utils-CEGfmIHB.js","sources":["../src/components/charts/lines/lines.utils.ts"],"sourcesContent":["import { ChartDataset, ChartOptions, InteractionItem } from 'chart.js';\n\nexport type LineChartProOptionsClickArg = {\n dimensionValue: string | number | null;\n groupingDimensionValue?: string | boolean | null;\n};\nexport type LineChartProOptionsClick = (arg: LineChartProOptionsClickArg) => void;\n\nexport type LineDataset = ChartDataset<'line'> & {\n rawLabel?: string;\n};\n\nexport const getLineChartProOptionsOnClick = (props: {\n onLineClicked?: LineChartProOptionsClick;\n}): ChartOptions<'line'> => {\n const { onLineClicked } = props;\n\n if (!onLineClicked) return {};\n\n return {\n onClick: (event, _elements, chart) => {\n const native = (event as unknown as { native?: Event }).native ?? (event as unknown as Event);\n\n // 1. Resolve the X-axis slice (all datasets at the same X)\n const slice = chart.getElementsAtEventForMode(native, 'x', { intersect: false }, false);\n\n if (!slice?.length) {\n onLineClicked({\n dimensionValue: null,\n groupingDimensionValue: null,\n });\n return;\n }\n\n const xIndex = slice[0]!.index;\n const dimensionValue = (chart.data.labels?.[xIndex] ?? null) as string | number | null;\n\n // 2. Resolve the specific series (group) via nearest point\n let nearest: InteractionItem | undefined = chart.getElementsAtEventForMode(\n native,\n 'nearest',\n { intersect: true },\n false,\n )[0];\n\n // If nearest is missing or points to a different X, fall back to an element in the slice\n if (!nearest || nearest.index !== xIndex) {\n nearest = slice.find((el) => {\n const ds: LineDataset = chart.data.datasets[el.datasetIndex] as LineDataset;\n const val = Array.isArray(ds?.data) ? ds.data[xIndex] : undefined;\n return val !== null && val !== undefined;\n });\n }\n\n // 3. Compute the grouping key with the requested fallbacks\n let groupingDimensionValue; // default when X is found but no nearest\n\n if (!nearest) {\n // No nearest even after fallback — keep false to signal \"no series picked\"\n // (axisDimensionValue is valid because slice existed)\n } else {\n const ds: LineDataset = chart.data.datasets[nearest.datasetIndex] as LineDataset;\n groupingDimensionValue = (ds?.rawLabel ?? null) as string | boolean | null;\n }\n\n onLineClicked({\n dimensionValue,\n groupingDimensionValue,\n });\n },\n };\n};\n"],"names":["getLineChartProOptionsOnClick","props","onLineClicked","event","_elements","chart","_a","native","slice","xIndex","dimensionValue","nearest","el","ds","val","groupingDimensionValue"],"mappings":"AAYO,MAAMA,IAAgC,CAACC,MAElB;AAC1B,QAAM,EAAE,eAAAC,MAAkBD;AAE1B,SAAKC,IAEE;AAAA,IACL,SAAS,CAACC,GAAOC,GAAWC,MAAU;AARnC,UAAAC;AASD,YAAMC,IAAUJ,EAAwC,UAAWA,GAG7DK,IAAQH,EAAM,0BAA0BE,GAAQ,KAAK,EAAE,WAAW,GAAA,GAAS,EAAK;AAEtF,UAAI,EAACC,KAAA,QAAAA,EAAO,SAAQ;AAClB,QAAAN,EAAc;AAAA,UACZ,gBAAgB;AAAA,UAChB,wBAAwB;AAAA,QAAA,CACzB;AACD;AAAA,MACF;AAEA,YAAMO,IAASD,EAAM,CAAC,EAAG,OACnBE,MAAkBJ,IAAAD,EAAM,KAAK,WAAX,gBAAAC,EAAoBG,OAAW;AAGvD,UAAIE,IAAuCN,EAAM;AAAA,QAC/CE;AAAA,QACA;AAAA,QACA,EAAE,WAAW,GAAA;AAAA,QACb;AAAA,MAAA,EACA,CAAC;AAGH,OAAI,CAACI,KAAWA,EAAQ,UAAUF,OAChCE,IAAUH,EAAM,KAAK,CAACI,MAAO;AAC3B,cAAMC,IAAkBR,EAAM,KAAK,SAASO,EAAG,YAAY,GACrDE,IAAM,MAAM,QAAQD,KAAA,gBAAAA,EAAI,IAAI,IAAIA,EAAG,KAAKJ,CAAM,IAAI;AACxD,eAAOK,KAAQ;AAAA,MACjB,CAAC;AAIH,UAAIC;AAEJ,UAAKJ,GAGE;AACL,cAAME,IAAkBR,EAAM,KAAK,SAASM,EAAQ,YAAY;AAChE,QAAAI,KAA0BF,KAAA,gBAAAA,EAAI,aAAY;AAAA,MAC5C;AAEA,MAAAX,EAAc;AAAA,QACZ,gBAAAQ;AAAA,QACA,wBAAAK;AAAA,MAAA,CACD;AAAA,IACH;AAAA,EAAA,IApDyB,CAAA;AAsD7B;"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { g as h, b as g, a as u } from "./charts.utils-BEwWG4s2.js";
|
|
2
|
+
import { r as b } from "./theme.constants-Cl6fOHv-.js";
|
|
3
|
+
import { g as f } from "./formatter.utils-BZMmas2O.js";
|
|
4
|
+
import { g as c } from "./styles.utils-C8CnV0SB.js";
|
|
5
|
+
import { t as C } from "./index-B9eYAQkT.js";
|
|
6
|
+
import { i as D } from "./component.utils-Dua9clQJ.js";
|
|
7
|
+
const T = (e, s = b) => {
|
|
8
|
+
if (!e.data)
|
|
9
|
+
return {
|
|
10
|
+
labels: [],
|
|
11
|
+
datasets: [{ data: [] }]
|
|
12
|
+
};
|
|
13
|
+
const o = h(
|
|
14
|
+
e.data,
|
|
15
|
+
e.dimension,
|
|
16
|
+
[e.measure],
|
|
17
|
+
e.maxLegendItems
|
|
18
|
+
), i = C(), l = o.map(
|
|
19
|
+
(a, n) => c({
|
|
20
|
+
dimensionOrMeasure: e.dimension,
|
|
21
|
+
theme: s,
|
|
22
|
+
color: "background",
|
|
23
|
+
value: `${e.dimension.name}.${a[e.dimension.name]}`,
|
|
24
|
+
chartColors: i,
|
|
25
|
+
index: n
|
|
26
|
+
})
|
|
27
|
+
), t = o.map(
|
|
28
|
+
(a, n) => c({
|
|
29
|
+
dimensionOrMeasure: e.dimension,
|
|
30
|
+
theme: s,
|
|
31
|
+
color: "border",
|
|
32
|
+
value: `${e.dimension.name}.${a[e.dimension.name]}`,
|
|
33
|
+
chartColors: i,
|
|
34
|
+
index: n
|
|
35
|
+
})
|
|
36
|
+
), r = f(s);
|
|
37
|
+
return {
|
|
38
|
+
labels: o.map((a) => {
|
|
39
|
+
const n = a[e.dimension.name], m = r.data(
|
|
40
|
+
g(e.dimension),
|
|
41
|
+
n
|
|
42
|
+
);
|
|
43
|
+
return n === m ? D.t(n) : m;
|
|
44
|
+
}),
|
|
45
|
+
datasets: [
|
|
46
|
+
{
|
|
47
|
+
data: o.map((a) => a[e.measure.name]),
|
|
48
|
+
backgroundColor: l,
|
|
49
|
+
borderColor: t
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
};
|
|
53
|
+
}, w = (e, s = b) => {
|
|
54
|
+
const { dimension: o, measure: i } = e, l = f(s);
|
|
55
|
+
return {
|
|
56
|
+
plugins: {
|
|
57
|
+
legend: {
|
|
58
|
+
position: s.charts.legendPosition ?? "bottom",
|
|
59
|
+
labels: {
|
|
60
|
+
generateLabels: (t) => (t.data.labels ?? []).map((a, n) => {
|
|
61
|
+
const d = t.getDatasetMeta(0).controller.getStyle(n, !1);
|
|
62
|
+
return {
|
|
63
|
+
text: l.data(o, a),
|
|
64
|
+
fillStyle: d.backgroundColor,
|
|
65
|
+
strokeStyle: d.borderColor,
|
|
66
|
+
lineWidth: d.borderWidth,
|
|
67
|
+
hidden: !t.getDataVisibility(n),
|
|
68
|
+
index: n
|
|
69
|
+
};
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
datalabels: {
|
|
74
|
+
formatter: (t, r) => {
|
|
75
|
+
var a;
|
|
76
|
+
return (a = i.inputs) != null && a.showValueAsPercentage ? u(Number(t), r.dataset.data) : l.data(i, t);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
tooltip: {
|
|
80
|
+
callbacks: {
|
|
81
|
+
title: (t) => {
|
|
82
|
+
var a;
|
|
83
|
+
const r = (a = t[0]) == null ? void 0 : a.label;
|
|
84
|
+
return l.data(g(o), r);
|
|
85
|
+
},
|
|
86
|
+
label(t) {
|
|
87
|
+
const r = t.raw;
|
|
88
|
+
return `${l.data(i, r)} (${u(r, t.dataset.data)})`;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
w as a,
|
|
97
|
+
T as g
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=pies.utils-Bb2EFei6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pies.utils-Bb2EFei6.js","sources":["../src/components/charts/pies/pies.utils.ts"],"sourcesContent":["import { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { ChartData, ChartOptions } from 'chart.js';\nimport {\n getDatalabelPercentage,\n getDimensionWithoutTruncation,\n groupTailAsOther,\n} from '../charts.utils';\nimport { Theme } from '../../../theme/theme.types';\nimport { remarkableTheme } from '../../../theme/theme.constants';\nimport { getThemeFormatter } from '../../../theme/formatter/formatter.utils';\nimport { getDimensionMeasureColor } from '../../../theme/styles/styles.utils';\nimport { getChartColors } from '@embeddable.com/remarkable-ui';\nimport { i18n } from '../../../theme/i18n/i18n';\n\nexport const getPieChartProData = (\n props: {\n data: DataResponse['data'];\n dimension: Dimension;\n measure: Measure;\n maxLegendItems?: number;\n },\n theme: Theme = remarkableTheme,\n): ChartData<'pie'> => {\n if (!props.data)\n return {\n labels: [],\n datasets: [{ data: [] }],\n };\n\n const groupedData = groupTailAsOther(\n props.data,\n props.dimension,\n [props.measure],\n props.maxLegendItems,\n );\n\n const chartColors = getChartColors();\n const backgroundColor = groupedData.map((item, index) =>\n getDimensionMeasureColor({\n dimensionOrMeasure: props.dimension,\n theme,\n color: 'background',\n value: `${props.dimension.name}.${item[props.dimension.name]}`,\n chartColors,\n index,\n }),\n );\n\n const borderColor = groupedData.map((item, index) =>\n getDimensionMeasureColor({\n dimensionOrMeasure: props.dimension,\n theme,\n color: 'border',\n value: `${props.dimension.name}.${item[props.dimension.name]}`,\n chartColors,\n index,\n }),\n );\n\n const themeFormatter = getThemeFormatter(theme);\n\n return {\n labels: groupedData.map((item) => {\n const value = item[props.dimension.name];\n const formattedValue = themeFormatter.data(\n getDimensionWithoutTruncation(props.dimension),\n value,\n );\n\n // If formatter did not work, try i18n translation\n if (value === formattedValue) {\n return i18n.t(value);\n }\n return formattedValue;\n }),\n datasets: [\n {\n data: groupedData.map((item) => item[props.measure.name]),\n backgroundColor,\n borderColor,\n },\n ],\n };\n};\n\nexport const getPieChartProOptions = (\n props: { measure: Measure; dimension: Dimension },\n theme: Theme = remarkableTheme,\n): Partial<ChartOptions<'pie'>> => {\n const { dimension, measure } = props;\n const themeFormatter = getThemeFormatter(theme);\n\n return {\n plugins: {\n legend: {\n position: theme.charts.legendPosition ?? 'bottom',\n labels: {\n generateLabels: (chart) => {\n const labels = chart.data.labels ?? [];\n return labels.map((label, i) => {\n const meta = chart.getDatasetMeta(0);\n const style = meta.controller.getStyle(i, false);\n return {\n text: themeFormatter.data(dimension, label as string),\n fillStyle: style.backgroundColor as string,\n strokeStyle: style.borderColor as string,\n lineWidth: style.borderWidth,\n hidden: !chart.getDataVisibility(i),\n index: i,\n };\n });\n },\n },\n },\n datalabels: {\n formatter: (value: string | number, context) => {\n if (measure.inputs?.showValueAsPercentage) {\n return getDatalabelPercentage(Number(value), context.dataset.data);\n }\n return themeFormatter.data(measure, value);\n },\n },\n tooltip: {\n callbacks: {\n title: (context) => {\n const label = context[0]?.label;\n return themeFormatter.data(getDimensionWithoutTruncation(dimension), label);\n },\n label(context) {\n const raw = context.raw as number;\n return `${themeFormatter.data(measure, raw)} (${getDatalabelPercentage(raw, context.dataset.data)})`;\n },\n },\n },\n },\n };\n};\n"],"names":["getPieChartProData","props","theme","remarkableTheme","groupedData","groupTailAsOther","chartColors","getChartColors","backgroundColor","item","index","getDimensionMeasureColor","borderColor","themeFormatter","getThemeFormatter","value","formattedValue","getDimensionWithoutTruncation","i18n","getPieChartProOptions","dimension","measure","chart","label","i","style","context","_a","getDatalabelPercentage","raw"],"mappings":";;;;;;AAcO,MAAMA,IAAqB,CAChCC,GAMAC,IAAeC,MACM;AACrB,MAAI,CAACF,EAAM;AACT,WAAO;AAAA,MACL,QAAQ,CAAA;AAAA,MACR,UAAU,CAAC,EAAE,MAAM,IAAI;AAAA,IAAA;AAG3B,QAAMG,IAAcC;AAAA,IAClBJ,EAAM;AAAA,IACNA,EAAM;AAAA,IACN,CAACA,EAAM,OAAO;AAAA,IACdA,EAAM;AAAA,EAAA,GAGFK,IAAcC,EAAA,GACdC,IAAkBJ,EAAY;AAAA,IAAI,CAACK,GAAMC,MAC7CC,EAAyB;AAAA,MACvB,oBAAoBV,EAAM;AAAA,MAC1B,OAAAC;AAAA,MACA,OAAO;AAAA,MACP,OAAO,GAAGD,EAAM,UAAU,IAAI,IAAIQ,EAAKR,EAAM,UAAU,IAAI,CAAC;AAAA,MAC5D,aAAAK;AAAA,MACA,OAAAI;AAAA,IAAA,CACD;AAAA,EAAA,GAGGE,IAAcR,EAAY;AAAA,IAAI,CAACK,GAAMC,MACzCC,EAAyB;AAAA,MACvB,oBAAoBV,EAAM;AAAA,MAC1B,OAAAC;AAAA,MACA,OAAO;AAAA,MACP,OAAO,GAAGD,EAAM,UAAU,IAAI,IAAIQ,EAAKR,EAAM,UAAU,IAAI,CAAC;AAAA,MAC5D,aAAAK;AAAA,MACA,OAAAI;AAAA,IAAA,CACD;AAAA,EAAA,GAGGG,IAAiBC,EAAkBZ,CAAK;AAE9C,SAAO;AAAA,IACL,QAAQE,EAAY,IAAI,CAACK,MAAS;AAChC,YAAMM,IAAQN,EAAKR,EAAM,UAAU,IAAI,GACjCe,IAAiBH,EAAe;AAAA,QACpCI,EAA8BhB,EAAM,SAAS;AAAA,QAC7Cc;AAAA,MAAA;AAIF,aAAIA,MAAUC,IACLE,EAAK,EAAEH,CAAK,IAEdC;AAAA,IACT,CAAC;AAAA,IACD,UAAU;AAAA,MACR;AAAA,QACE,MAAMZ,EAAY,IAAI,CAACK,MAASA,EAAKR,EAAM,QAAQ,IAAI,CAAC;AAAA,QACxD,iBAAAO;AAAA,QACA,aAAAI;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ,GAEaO,IAAwB,CACnClB,GACAC,IAAeC,MACkB;AACjC,QAAM,EAAE,WAAAiB,GAAW,SAAAC,EAAA,IAAYpB,GACzBY,IAAiBC,EAAkBZ,CAAK;AAE9C,SAAO;AAAA,IACL,SAAS;AAAA,MACP,QAAQ;AAAA,QACN,UAAUA,EAAM,OAAO,kBAAkB;AAAA,QACzC,QAAQ;AAAA,UACN,gBAAgB,CAACoB,OACAA,EAAM,KAAK,UAAU,CAAA,GACtB,IAAI,CAACC,GAAOC,MAAM;AAE9B,kBAAMC,IADOH,EAAM,eAAe,CAAC,EAChB,WAAW,SAASE,GAAG,EAAK;AAC/C,mBAAO;AAAA,cACL,MAAMX,EAAe,KAAKO,GAAWG,CAAe;AAAA,cACpD,WAAWE,EAAM;AAAA,cACjB,aAAaA,EAAM;AAAA,cACnB,WAAWA,EAAM;AAAA,cACjB,QAAQ,CAACH,EAAM,kBAAkBE,CAAC;AAAA,cAClC,OAAOA;AAAA,YAAA;AAAA,UAEX,CAAC;AAAA,QACH;AAAA,MACF;AAAA,MAEF,YAAY;AAAA,QACV,WAAW,CAACT,GAAwBW,MAAY;;AAC9C,kBAAIC,IAAAN,EAAQ,WAAR,QAAAM,EAAgB,wBACXC,EAAuB,OAAOb,CAAK,GAAGW,EAAQ,QAAQ,IAAI,IAE5Db,EAAe,KAAKQ,GAASN,CAAK;AAAA,QAC3C;AAAA,MAAA;AAAA,MAEF,SAAS;AAAA,QACP,WAAW;AAAA,UACT,OAAO,CAACW,MAAY;;AAClB,kBAAMH,KAAQI,IAAAD,EAAQ,CAAC,MAAT,gBAAAC,EAAY;AAC1B,mBAAOd,EAAe,KAAKI,EAA8BG,CAAS,GAAGG,CAAK;AAAA,UAC5E;AAAA,UACA,MAAMG,GAAS;AACb,kBAAMG,IAAMH,EAAQ;AACpB,mBAAO,GAAGb,EAAe,KAAKQ,GAASQ,CAAG,CAAC,KAAKD,EAAuBC,GAAKH,EAAQ,QAAQ,IAAI,CAAC;AAAA,UACnG;AAAA,QAAA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEJ;"}
|