@sisense/sdk-ui-preact 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +15 -11
- package/dist/index.umd.js +4 -4
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -71212,7 +71212,7 @@ const dle = (t, e, n) => [{ type: t.type, startOnTick: !1, endOnTick: !(t.max ||
|
|
|
71212
71212
|
default:
|
|
71213
71213
|
throw new Error("Unexpected chart type");
|
|
71214
71214
|
}
|
|
71215
|
-
}, Rle = { legend: { enabled: !0, position: "bottom" }, navigator: { enabled: !0 }, markers: { enabled: !1, fill: "filled", size: "small" }, seriesLabels: { enabled: !1, rotation: 0 }, xAxis: { enabled: !0, gridLines: !1, isIntervalEnabled: !1, labels: { enabled: !0 }, logarithmic: !1, title: { enabled: !1, text: "X Axis title" } }, yAxis: { enabled: !0, gridLines: !0, isIntervalEnabled: !1, labels: { enabled: !0 }, logarithmic: !1, title: { enabled: !1, text: "Y Axis title" } }, y2Axis: { enabled: !0, gridLines: !0, isIntervalEnabled: !1, labels: { enabled: !0 }, logarithmic: !1, title: { enabled: !1, text: "Y2 Axis title" } }, convolution: { enabled: !1, selectedConvolutionType: "byPercentage", minimalIndependentSlicePercentage: 3, independentSlicesCount: 7 }, labels: { categories: !0, enabled: !0, percent: !0, decimals: !1, value: !1 } }, jle = () => Eu(Rle), zle = 600, Ble = 300, Hle = (t) => uo(t, { chart: { animation: { duration: Ble } }, plotOptions: { series: { animation: { duration: zle } } }, boost: { useGPUTranslations: !0, usePreAllocated: !0 } }), Fle = "_alert_box_10ttx_1", Wle = "_content_10ttx_8", Ule = "_alert_10ttx_1", UD = { alert_box: Fle, content: Wle, alert: Ule }, Vle = ({ alerts: t = [] }) => /* @__PURE__ */ bt("div", { className: UD.alert_box, children: /* @__PURE__ */ bt("div", {
|
|
71215
|
+
}, Rle = { legend: { enabled: !0, position: "bottom" }, navigator: { enabled: !0 }, markers: { enabled: !1, fill: "filled", size: "small" }, seriesLabels: { enabled: !1, rotation: 0 }, xAxis: { enabled: !0, gridLines: !1, isIntervalEnabled: !1, labels: { enabled: !0 }, logarithmic: !1, title: { enabled: !1, text: "X Axis title" } }, yAxis: { enabled: !0, gridLines: !0, isIntervalEnabled: !1, labels: { enabled: !0 }, logarithmic: !1, title: { enabled: !1, text: "Y Axis title" } }, y2Axis: { enabled: !0, gridLines: !0, isIntervalEnabled: !1, labels: { enabled: !0 }, logarithmic: !1, title: { enabled: !1, text: "Y2 Axis title" } }, convolution: { enabled: !1, selectedConvolutionType: "byPercentage", minimalIndependentSlicePercentage: 3, independentSlicesCount: 7 }, labels: { categories: !0, enabled: !0, percent: !0, decimals: !1, value: !1 } }, jle = () => Eu(Rle), zle = 600, Ble = 300, Hle = (t, e) => uo(t, { accessibility: { enabled: e }, chart: { animation: { duration: Ble } }, plotOptions: { series: { animation: { duration: zle } } }, boost: { useGPUTranslations: !0, usePreAllocated: !0 } }), Fle = "_alert_box_10ttx_1", Wle = "_content_10ttx_8", Ule = "_alert_10ttx_1", UD = { alert_box: Fle, content: Wle, alert: Ule }, Vle = ({ alerts: t = [] }) => /* @__PURE__ */ bt("div", { className: UD.alert_box, children: /* @__PURE__ */ bt("div", {
|
|
71216
71216
|
className: UD.content,
|
|
71217
71217
|
// prevents alert duplication
|
|
71218
71218
|
children: [...new Set(t)].map((e, n) => /* @__PURE__ */ bt("div", { className: UD.alert, children: e }, `alert-${n}`))
|
|
@@ -71369,10 +71369,11 @@ const Kle = F0(
|
|
|
71369
71369
|
(t, e) => $le(t, e, (n, r) => Tw(n) && Tw(r) ? n.toString() === r.toString() : void 0)
|
|
71370
71370
|
), Qle = (t) => t, Zle = ({ chartType: t, chartData: e, chartDataOptions: n, chartDesignOptions: r, themeSettings: i, onDataPointClick: o, onDataPointContextMenu: a, onDataPointsSelected: s, onBeforeRender: l = Qle }) => {
|
|
71371
71371
|
const { app: c } = $r(), { t: d } = Au(), y = [], u = We((v, m) => RC(v, m, c == null ? void 0 : c.settings.locale, c == null ? void 0 : c.settings.dateConfig), []), z = Ge(() => {
|
|
71372
|
-
|
|
71373
|
-
|
|
71374
|
-
|
|
71375
|
-
|
|
71372
|
+
var v;
|
|
71373
|
+
const { options: m, alerts: w } = Ile(e, t, r, n, d, i, u);
|
|
71374
|
+
y.push(...w);
|
|
71375
|
+
const W = ((v = c == null ? void 0 : c.settings.accessibilityConfig) == null ? void 0 : v.enabled) || !1, U = Hle(m, W), Y = lae(U, { onDataPointClick: o, onDataPointContextMenu: a, onDataPointsSelected: s }), V = fZt(Y, i);
|
|
71376
|
+
return l(V);
|
|
71376
71377
|
}, [t, e, n, r, i, o, a, l, d]);
|
|
71377
71378
|
return z && /* @__PURE__ */ bt("div", { "aria-label": "chart-root", style: { display: "flex", justifyContent: "center", height: "100%", width: "100%" }, children: [!!y.length && /* @__PURE__ */ bt(Vle, { alerts: y }), /* @__PURE__ */ bt(Kle, { options: z })] });
|
|
71378
71379
|
};
|
|
@@ -71425,7 +71426,7 @@ const TX = "composesdk", nk = (t, e, n, r = !1) => Jle(void 0, void 0, void 0, f
|
|
|
71425
71426
|
const { app: n, tracking: r } = $r(), i = Xn(nat), o = ie(!1);
|
|
71426
71427
|
me(() => {
|
|
71427
71428
|
if (n != null && n.httpClient && !o.current && !i) {
|
|
71428
|
-
const a = { packageName: r.packageName, packageVersion: "1.7.
|
|
71429
|
+
const a = { packageName: r.packageName, packageVersion: "1.7.1", componentName: t, attributesUsed: Object.entries(e).filter(([, s]) => !!s).map(([s]) => s).join(", ") };
|
|
71429
71430
|
nk(nce, a, n.httpClient, !r.enabled).catch((s) => console.warn("An error occurred when sending the sdkComponentInit event", s)).finally(() => o.current = !0);
|
|
71430
71431
|
}
|
|
71431
71432
|
}, [t, e, n, r, i]);
|
|
@@ -71442,7 +71443,7 @@ class rat extends fi {
|
|
|
71442
71443
|
throw this.context.tracking.enabled && (this.httpClient ? this.sendErrorTracking(e, this.httpClient) : this.postponedErrors.push(e)), e;
|
|
71443
71444
|
}
|
|
71444
71445
|
sendErrorTracking(e, n) {
|
|
71445
|
-
ece({ packageVersion: "1.7.
|
|
71446
|
+
ece({ packageVersion: "1.7.1", component: this.componentName, error: e }, n).catch((r) => console.log("Failed to send tracking error event: ", r));
|
|
71446
71447
|
}
|
|
71447
71448
|
render() {
|
|
71448
71449
|
return this.httpClient && this.postponedErrors.length > 0 && this.postponedErrors.forEach((e) => this.sendErrorTracking(e, this.httpClient)), this.postponedErrors = [], this.props.children;
|
|
@@ -88638,13 +88639,13 @@ const PK = (t) => t % 2 === 1, DK = ({ colIndex: t = 0, rowIndex: e = 0, themeSe
|
|
|
88638
88639
|
const [o, a] = pe(0), { topSlot: s, bottomSlot: l, title: c, description: d, styleOptions: y } = t, { themeSettings: u } = Ki(), z = u3("table", { hasHeader: !((e = y == null ? void 0 : y.header) != null && e.hidden) }), v = t.styleOptions || {}, { width: m, height: w } = v, W = fo(v, ["width", "height"]);
|
|
88639
88640
|
return t.dataOptions ? /* @__PURE__ */ bt(Tg, { defaultSize: z, size: { width: m, height: w }, children: /* @__PURE__ */ bt("div", { className: "csdk-w-full csdk-h-full csdk-overflow-hidden", children: /* @__PURE__ */ bt("div", { className: "csdk-h-full", style: { padding: Ok[(y == null ? void 0 : y.spaceAround) || "None"] }, children: /* @__PURE__ */ bt("div", { className: "csdk-h-full csdk-overflow-hidden", style: { borderWidth: y != null && y.border ? "1px" : 0, borderColor: (y == null ? void 0 : y.borderColor) || u.chart.textColor, borderRadius: y != null && y.cornerRadius ? Ak[y.cornerRadius] : 0, boxShadow: ez(y), display: "flex", flexDirection: "column" }, children: [!((n = y == null ? void 0 : y.header) != null && n.hidden) && /* @__PURE__ */ bt(tz, { title: c, description: d, dataSetName: t.dataSource ? Ud(t.dataSource) : void 0, styleOptions: y == null ? void 0 : y.header, onRefresh: () => a(o + 1) }), s, /* @__PURE__ */ bt($m, { theme: { chart: { backgroundColor: (y == null ? void 0 : y.backgroundColor) || ((r = u.chart) == null ? void 0 : r.backgroundColor) } }, children: /* @__PURE__ */ bt("div", { style: { flexGrow: 1, backgroundColor: (y == null ? void 0 : y.backgroundColor) || ((i = u.chart) == null ? void 0 : i.backgroundColor) }, children: /* @__PURE__ */ bt(vke, { dataSet: t.dataSource, dataOptions: t.dataOptions, styleOptions: W, filters: t.filters, refreshCounter: o }) }) }), l] }) }) }) }) : null;
|
|
88640
88641
|
}), bct = "sdkHookInit", eLe = (t, e, n, r) => aa(void 0, null, function* () {
|
|
88641
|
-
n && nk(bct, { packageName: e, packageVersion: "1.7.
|
|
88642
|
+
n && nk(bct, { packageName: e, packageVersion: "1.7.1", hookName: t }, n.httpClient).catch((i) => console.warn("An error occurred when sending the sdkHookInit event", i)).finally(r);
|
|
88642
88643
|
});
|
|
88643
88644
|
function bke(t) {
|
|
88644
88645
|
const { app: e, tracking: n } = $r(), r = ie(!1);
|
|
88645
88646
|
me(() => {
|
|
88646
88647
|
if (e != null && e.httpClient && !r.current) {
|
|
88647
|
-
const i = { packageName: n.packageName, packageVersion: "1.7.
|
|
88648
|
+
const i = { packageName: n.packageName, packageVersion: "1.7.1", hookName: t };
|
|
88648
88649
|
nk(bct, i, e.httpClient, !n.enabled).catch((o) => console.warn("An error occurred when sending the sdkHookInit event", o)).finally(() => r.current = !0);
|
|
88649
88650
|
}
|
|
88650
88651
|
}, [e, n, t]);
|
|
@@ -93853,7 +93854,10 @@ const wAe = 2e4, _Ae = {
|
|
|
93853
93854
|
queryCacheConfig: {
|
|
93854
93855
|
enabled: !1
|
|
93855
93856
|
},
|
|
93856
|
-
queryLimit: wAe
|
|
93857
|
+
queryLimit: wAe,
|
|
93858
|
+
accessibilityConfig: {
|
|
93859
|
+
enabled: !1
|
|
93860
|
+
}
|
|
93857
93861
|
};
|
|
93858
93862
|
function SAe(t, e, n) {
|
|
93859
93863
|
return Xl(this, null, function* () {
|
|
@@ -93886,7 +93890,7 @@ class kAe {
|
|
|
93886
93890
|
constructor(e, n, r) {
|
|
93887
93891
|
Ui(this, "httpClient"), Ui(this, "pivotClient"), Ui(this, "queryClient"), Ui(this, "defaultDataSource"), Ui(this, "settings"), Ui(this, "queryCache"), window.addEventListener("unhandledrejection", (i) => {
|
|
93888
93892
|
i.reason instanceof Error ? console.error(i.reason.message) : console.error(i.reason);
|
|
93889
|
-
}), this.httpClient = new jTe(e, n, "sdk-ui-1.7.
|
|
93893
|
+
}), this.httpClient = new jTe(e, n, "sdk-ui-1.7.1"), this.pivotClient = new Qrt(this.httpClient), this.queryClient = new lVt(this.httpClient, this.pivotClient), this.queryCache = {
|
|
93890
93894
|
clear: pit
|
|
93891
93895
|
}, r !== void 0 && (this.defaultDataSource = r);
|
|
93892
93896
|
}
|