@ironsource/shared-ui 2.1.12-test.78 → 2.1.12-test.80

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.
@@ -0,0 +1 @@
1
+ .chart-plane-container[data-v-e2c0c2af]{--headerHeight: var(--1ade29c0);width:100%;height:var(--0866490b);position:relative}.header-wrapper[data-v-e2c0c2af]{position:absolute;width:100%;height:var(--headerHeight);top:0;z-index:1}.chart-plane[data-v-e2c0c2af]{padding-top:var(--headerHeight);height:100%}.chart[data-v-e2c0c2af]{width:100%;height:100%;position:relative}.chart__canvas[data-v-e2c0c2af]{width:100%;height:100%}.chart__tooltip[data-v-e2c0c2af]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px;z-index:1}
@@ -1,7 +1,7 @@
1
1
  import e from "./ChartPlane.vue2.js";
2
2
  /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../ChartPlane.vue_vue_type_style_index_0_scoped_e31a8fcd_lang.css"; //*');
4
- const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-e31a8fcd"]]);
3
+ // import "../../ChartPlane.vue_vue_type_style_index_0_scoped_e2c0c2af_lang.css"; //*');
4
+ const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-e2c0c2af"]]);
5
5
  export {
6
- s as default
6
+ c as default
7
7
  };
@@ -1,19 +1,19 @@
1
- import "../../ChartPlane.vue_vue_type_style_index_0_scoped_e31a8fcd_lang.css"; import { defineComponent as re, useCssVars as ie, unref as s, computed as l, ref as S, onMounted as ne, watch as T, nextTick as se, openBlock as f, createElementBlock as A, createVNode as ue, isRef as ce, createSlots as de, withCtx as pe, renderSlot as fe, createCommentVNode as L, createElementVNode as E, normalizeStyle as he, createBlock as R } from "vue";
2
- import { Chart as N, ArcElement as me, LineElement as ve, BarElement as ye, PointElement as Te, LineController as Ce, BarController as ge, PieController as be, ScatterController as xe, CategoryScale as ke, LinearScale as Se, Filler as Ae, Tooltip as Le } from "chart.js";
1
+ import "../../ChartPlane.vue_vue_type_style_index_0_scoped_e2c0c2af_lang.css"; import { defineComponent as re, useCssVars as ie, unref as s, computed as l, ref as A, onMounted as ne, watch as T, nextTick as se, openBlock as f, createElementBlock as L, createVNode as ue, isRef as ce, createSlots as de, withCtx as pe, renderSlot as fe, createCommentVNode as E, createElementVNode as R, normalizeStyle as he, createBlock as B } from "vue";
2
+ import { Chart as F, ArcElement as ve, LineElement as me, BarElement as ye, PointElement as Te, LineController as Ce, BarController as ge, PieController as be, ScatterController as xe, CategoryScale as ke, LinearScale as Se, Filler as Ae, Tooltip as Le } from "chart.js";
3
3
  import { HoverVerticalLine as Ee } from "./plugins/HoverVerticalLine.js";
4
4
  import { prepareTickLabel as Re, formatValue as Be, calcStepSize as De } from "./utils/utils.js";
5
- import { DEFAULT_TICK_COUNT as Oe, TOTALS_HELPER_KEY as F, BASE_COLOR_KEY as K, CHART_PADDING as Ie, POINT_BORDER_COLOR as He, TICK_LABEL_COLOR as M, TICK_LABEL_FONT as U, TICKS_EXTRA_PADDING as Pe, GRID_LINE_COLOR as z, HEADER_HEIGHT as Ve, COMPACT_HEADER_HEIGHT as we, HOVER_AREA_TRANSPARENCY as Ne, HOVER_TRANSPARENCY as C } from "./consts.js";
6
- import { ChartType as u, DateInterval as Fe, TooltipOrder as Y, TrendDirection as Ke } from "./types.js";
5
+ import { DEFAULT_TICK_COUNT as Oe, TOTALS_HELPER_KEY as K, BASE_COLOR_KEY as M, CHART_PADDING as Ie, POINT_BORDER_COLOR as He, TICK_LABEL_COLOR as z, TICK_LABEL_FONT as U, TICKS_EXTRA_PADDING as Pe, GRID_LINE_COLOR as Y, HEADER_HEIGHT as Ve, COMPACT_HEADER_HEIGHT as Ne, HOVER_AREA_TRANSPARENCY as we, HOVER_TRANSPARENCY as C } from "./consts.js";
6
+ import { ChartType as u, DateInterval as Fe, TooltipOrder as _, TrendDirection as Ke } from "./types.js";
7
7
  import { useTooltipPosition as Me } from "./composables/useTooltipPosition.js";
8
- import Ue from "./ChartTooltip.vue.js";
8
+ import ze from "./ChartTooltip.vue.js";
9
9
  import { hexColorToRgba as h } from "../../utils/color.js";
10
- import { useChartValues as ze } from "./composables/useChartValues.js";
10
+ import { useChartValues as Ue } from "./composables/useChartValues.js";
11
11
  import Ye from "./ChartHeader.vue.js";
12
12
  import { useMemoize as _e, useVModel as Ge } from "@vueuse/core";
13
13
  import $e from "../emptyState/v4/EmptyStateV4.vue.js";
14
14
  import We from "./ChartLoader.vue.js";
15
15
  import { DEFAULT_CHART_COLOR as Ze } from "./colorPalette.js";
16
- import { TotalType as _, calculateTotal as Xe } from "../../utils/totals.js";
16
+ import { TotalType as G, calculateTotal as Xe } from "../../utils/totals.js";
17
17
  import { isNullOrUndefined as je } from "../../utils/utils.js";
18
18
  import { storeOriginalDatasetColors as qe, restoreOriginalDatasetColors as Je } from "./utils/highlightUtils.js";
19
19
  const Qe = { class: "chart-plane-container" }, et = {
@@ -49,9 +49,9 @@ const Qe = { class: "chart-plane-container" }, et = {
49
49
  height: { default: "100%" },
50
50
  compactHeader: { type: Boolean, default: !1 },
51
51
  tooltipRespectsTopEdge: { type: Boolean, default: !0 },
52
- tooltipTotalType: { default: _.Total },
52
+ tooltipTotalType: { default: G.Total },
53
53
  tooltipTotalCalcFn: { type: Function, default: Xe },
54
- tooltipOrder: { default: Y.Legend },
54
+ tooltipOrder: { default: _.Legend },
55
55
  trendValue: { default: null },
56
56
  trendDirection: { default: Ke.UP },
57
57
  trendTooltip: { default: null },
@@ -61,16 +61,16 @@ const Qe = { class: "chart-plane-container" }, et = {
61
61
  valuePrefix: { default: "" }
62
62
  },
63
63
  emits: ["update:chartType"],
64
- setup(o, { emit: G }) {
64
+ setup(o, { emit: $ }) {
65
65
  const e = o;
66
66
  ie((t) => ({
67
- e6d08782: s(ee),
68
- "7183a92a": o.height
67
+ "1ade29c0": s(ee),
68
+ "0866490b": o.height
69
69
  }));
70
- const $ = _e(Re);
71
- N.register(
72
- me,
70
+ const W = _e(Re);
71
+ F.register(
73
72
  ve,
73
+ me,
74
74
  ye,
75
75
  Te,
76
76
  Ce,
@@ -83,14 +83,14 @@ const Qe = { class: "chart-plane-container" }, et = {
83
83
  Le,
84
84
  Ee
85
85
  );
86
- const g = Ge(e, "chartType", G), W = l(
86
+ const g = Ge(e, "chartType", $), Z = l(
87
87
  () => e.withAnimation ? "" : "none"
88
- ), m = S(null);
88
+ ), v = A(null);
89
89
  let n = null;
90
- const B = l(() => e.empty || e.dataSets.length === 0), d = l(() => !e.loading && !B.value), b = () => {
91
- m.value && (n && n.destroy(), n = new N(m.value, H.value));
92
- }, Z = () => {
93
- n && (n.data.datasets = I.value, n.options = H.value.options, n.update(W.value));
90
+ const D = l(() => e.empty || e.dataSets.length === 0), d = l(() => !e.loading && !D.value), b = () => {
91
+ v.value && (n && n.destroy(), n = new F(v.value, P.value));
92
+ }, X = () => {
93
+ n && (n.data.datasets = H.value, n.options = P.value.options, n.update(Z.value));
94
94
  };
95
95
  ne(b), T(() => e.chartType, b), T(d, async (t) => {
96
96
  t && (await se(), b());
@@ -101,26 +101,26 @@ const Qe = { class: "chart-plane-container" }, et = {
101
101
  () => e.valuePrefix,
102
102
  () => e.valueSuffix
103
103
  ],
104
- Z
104
+ X
105
105
  );
106
- const p = l(() => e.totalsChart), v = l(
106
+ const p = l(() => e.totalsChart), m = l(
107
107
  () => e.chartType === u.StackedLine || e.chartType === u.StackedBar || p.value
108
108
  ), x = l(
109
109
  () => e.chartType === u.Line || e.chartType === u.StackedLine
110
- ), D = l(() => p.value && !e.parsing.xAxisKey ? { ...e.parsing, xAxisKey: F } : e.parsing), X = l(() => p.value ? e.dataSets.map((t) => ({
110
+ ), O = l(() => p.value && !e.parsing.xAxisKey ? { ...e.parsing, xAxisKey: K } : e.parsing), j = l(() => p.value ? e.dataSets.map((t) => ({
111
111
  ...t,
112
112
  data: t.data.map((i) => ({
113
113
  ...i,
114
- [F]: t.label
114
+ [K]: t.label
115
115
  }))
116
116
  })) : e.dataSets), y = l(
117
- () => X.value.filter((t) => e.visibleIds.includes(t.id))
118
- ), j = (t) => e.colorsMap[t] || Ze, O = l(
117
+ () => j.value.filter((t) => e.visibleIds.includes(t.id))
118
+ ), q = (t) => e.colorsMap[t] || Ze, I = l(
119
119
  () => y.value.length && y.value.every(
120
120
  (t) => t.data.length === 1
121
121
  )
122
- ), I = l(() => y.value.map((t, i) => {
123
- const a = j(t.id), r = v.value ? i !== 0 ? "-1" : "start" : void 0;
122
+ ), H = l(() => y.value.map((t, i) => {
123
+ const a = q(t.id), r = m.value ? i !== 0 ? "-1" : "start" : void 0;
124
124
  return {
125
125
  ...t,
126
126
  fill: r,
@@ -136,20 +136,20 @@ const Qe = { class: "chart-plane-container" }, et = {
136
136
  // draw a bit outside the chart area
137
137
  icon: t.icon || null,
138
138
  iconType: t.iconType || "branded",
139
- [K]: a
139
+ [M]: a
140
140
  // store base color for later use
141
141
  };
142
- })), q = l(
143
- () => e.tooltipTotalType === _.Total ? "Total" : "Mean"
144
- ), H = l(() => ({
142
+ })), J = l(
143
+ () => e.tooltipTotalType === G.Total ? "Total" : "Mean"
144
+ ), P = l(() => ({
145
145
  type: e.chartType == u.Bar || e.chartType === u.StackedBar ? "bar" : "line",
146
146
  // Chart Data
147
147
  data: {
148
- datasets: I.value
148
+ datasets: H.value
149
149
  },
150
150
  // Chart Options
151
151
  options: {
152
- parsing: D.value,
152
+ parsing: O.value,
153
153
  interaction: {
154
154
  intersect: !1,
155
155
  mode: p.value ? "point" : "index",
@@ -173,11 +173,11 @@ const Qe = { class: "chart-plane-container" }, et = {
173
173
  i,
174
174
  e.tooltipTotalType
175
175
  );
176
- return [q.value, String(a)];
176
+ return [J.value, String(a)];
177
177
  }
178
178
  },
179
179
  itemSort: (t, i) => {
180
- if (e.tooltipOrder === Y.YAxis) {
180
+ if (e.tooltipOrder === _.YAxis) {
181
181
  const a = t.parsed.y || 0, r = i.parsed.y || 0;
182
182
  return a === r ? 0 : a > r ? -1 : 1;
183
183
  }
@@ -198,7 +198,7 @@ const Qe = { class: "chart-plane-container" }, et = {
198
198
  tension: 0.3
199
199
  },
200
200
  point: {
201
- radius: O.value ? 3 : 1,
201
+ radius: I.value ? 3 : 1,
202
202
  hitRadius: 8,
203
203
  borderWidth: 0,
204
204
  hoverRadius: 4,
@@ -213,13 +213,13 @@ const Qe = { class: "chart-plane-container" }, et = {
213
213
  // Horizontal Axis (X)
214
214
  x: {
215
215
  beginAtZero: !0,
216
- offset: !x.value || O.value,
216
+ offset: !x.value || I.value,
217
217
  border: { display: !1 },
218
- stacked: v.value,
218
+ stacked: m.value,
219
219
  // stack on top of each other
220
220
  // ticks
221
221
  ticks: {
222
- color: M,
222
+ color: z,
223
223
  font: U,
224
224
  padding: 4,
225
225
  maxRotation: 0,
@@ -227,7 +227,7 @@ const Qe = { class: "chart-plane-container" }, et = {
227
227
  autoSkipPadding: 8,
228
228
  callback: function(t, i, a) {
229
229
  const r = this.getLabelForValue(t), oe = x.value && !p.value ? a.length - 1 : a.length, le = this.chart.scales?.x?.width / oe - Pe;
230
- return $({
230
+ return W({
231
231
  label: r,
232
232
  format: e.xAxisFormat,
233
233
  availableSpace: le,
@@ -237,7 +237,7 @@ const Qe = { class: "chart-plane-container" }, et = {
237
237
  },
238
238
  // grid lines
239
239
  grid: {
240
- color: z,
240
+ color: Y,
241
241
  drawOnChartArea: !1,
242
242
  drawTicks: !0,
243
243
  drawBorder: !1,
@@ -249,44 +249,49 @@ const Qe = { class: "chart-plane-container" }, et = {
249
249
  beginAtZero: !0,
250
250
  border: { display: !1 },
251
251
  // hide left borderline
252
- stacked: v.value,
252
+ stacked: m.value,
253
253
  // stack on top of each other
254
254
  // ticks
255
255
  ticks: {
256
- color: M,
256
+ color: z,
257
257
  font: U,
258
258
  padding: 8,
259
- stepSize: k.value,
260
- min: w.value,
261
- max: k.value * e.tickCount,
262
- callback: (t) => e.valuePrefix + Be(t, e.yAxisFormat, k.value < 1) + e.valueSuffix
259
+ stepSize: S.value,
260
+ min: k.value,
261
+ max: S.value * e.tickCount,
262
+ callback: (t) => e.valuePrefix + Be(t, e.yAxisFormat, S.value < 1) + e.valueSuffix
263
263
  },
264
264
  // grid lines
265
265
  grid: {
266
- color: z,
266
+ color: Y,
267
267
  drawOnChartArea: !0,
268
268
  drawTicks: !1
269
269
  }
270
270
  }
271
271
  }
272
272
  }
273
- })), P = S(null), c = S(null), { position: V } = Me(
274
- m,
275
- P,
273
+ })), V = A(null), c = A(null), { position: N } = Me(
274
+ v,
275
+ V,
276
276
  c,
277
277
  e.tooltipRespectsTopEdge
278
- ), J = l(() => ({
279
- left: `${V.value.left}px`,
280
- top: `${V.value.top}px`,
278
+ ), Q = l(() => ({
279
+ left: `${N.value.left}px`,
280
+ top: `${N.value.top}px`,
281
281
  opacity: c.value?.opacity || 0
282
- })), { minValue: w, maxValue: Q } = ze({
283
- parsingConfig: D.value,
282
+ })), { minValue: k, maxValue: w } = Ue({
283
+ parsingConfig: O.value,
284
284
  dataSets: y,
285
- isStacked: v
286
- }), k = l(
287
- () => De(w.value, Q.value, e.tickCount)
288
- ), ee = l(
289
- () => (e.compactHeader ? we : Ve) + "px"
285
+ isStacked: m
286
+ }), S = l(() => {
287
+ const t = De(
288
+ isNaN(k.value) ? 0 : k.value,
289
+ isNaN(w.value) ? 0 : w.value,
290
+ e.tickCount
291
+ );
292
+ return console.log("stepSize", t), t;
293
+ }), ee = l(
294
+ () => (e.compactHeader ? Ne : Ve) + "px"
290
295
  );
291
296
  T(
292
297
  () => e.highlightedId,
@@ -297,17 +302,17 @@ const Qe = { class: "chart-plane-container" }, et = {
297
302
  const te = (t) => {
298
303
  (n?.data.datasets || []).forEach((a) => {
299
304
  qe(a);
300
- const r = a[K];
305
+ const r = a[M];
301
306
  a.id === t ? e.chartType === u.StackedLine && (a.backgroundColor = h(
302
307
  r,
303
- Ne
308
+ we
304
309
  )) : (a.backgroundColor = h(r, C), a.borderColor = h(r, C), a.pointBackgroundColor = h(r, C), a.pointHoverBorderColor = h(r, C));
305
310
  });
306
311
  }, ae = () => {
307
312
  (n?.data.datasets || []).forEach(Je);
308
313
  };
309
- return (t, i) => (f(), A("div", Qe, [
310
- s(d) || o.keepSubheaderVisible ? (f(), A("div", et, [
314
+ return (t, i) => (f(), L("div", Qe, [
315
+ s(d) || o.keepSubheaderVisible ? (f(), L("div", et, [
311
316
  ue(Ye, {
312
317
  "chart-type": s(g),
313
318
  "onUpdate:chart-type": i[0] || (i[0] = (a) => ce(g) ? g.value = a : null),
@@ -328,21 +333,21 @@ const Qe = { class: "chart-plane-container" }, et = {
328
333
  key: "0"
329
334
  } : void 0
330
335
  ]), 1032, ["chart-type", "type-switcher", "header", "subheader", "subheader-tooltip", "trend-tooltip", "compact", "trend-value", "trend-direction"])
331
- ])) : L("", !0),
332
- s(d) ? (f(), A("section", tt, [
333
- E("div", at, [
334
- E("canvas", {
336
+ ])) : E("", !0),
337
+ s(d) ? (f(), L("section", tt, [
338
+ R("div", at, [
339
+ R("canvas", {
335
340
  ref_key: "chartRef",
336
- ref: m,
341
+ ref: v,
337
342
  class: "chart__canvas"
338
343
  }, null, 512),
339
- E("div", {
344
+ R("div", {
340
345
  ref_key: "tooltipRef",
341
- ref: P,
346
+ ref: V,
342
347
  class: "chart__tooltip",
343
- style: he(s(J))
348
+ style: he(s(Q))
344
349
  }, [
345
- c.value ? (f(), R(Ue, {
350
+ c.value ? (f(), B(ze, {
346
351
  key: 0,
347
352
  "totals-chart": s(p),
348
353
  title: String(c.value.title),
@@ -354,20 +359,20 @@ const Qe = { class: "chart-plane-container" }, et = {
354
359
  "total-value": Number(c.value.footer?.[1]),
355
360
  "value-suffix": o.valueSuffix,
356
361
  "value-prefix": o.valuePrefix
357
- }, null, 8, ["totals-chart", "title", "data-points", "x-axis-format", "y-axis-format", "x-axis-date-interval", "total-label", "total-value", "value-suffix", "value-prefix"])) : L("", !0)
362
+ }, null, 8, ["totals-chart", "title", "data-points", "x-axis-format", "y-axis-format", "x-axis-date-interval", "total-label", "total-value", "value-suffix", "value-prefix"])) : E("", !0)
358
363
  ], 4)
359
364
  ])
360
- ])) : o.loading ? (f(), R(We, {
365
+ ])) : o.loading ? (f(), B(We, {
361
366
  key: 2,
362
367
  class: "chart-loading"
363
- })) : s(B) ? (f(), R(s($e), {
368
+ })) : s(D) ? (f(), B(s($e), {
364
369
  key: 3,
365
370
  class: "chart-empty",
366
371
  variant: null,
367
372
  title: o.noDataTitle,
368
373
  subtitle: o.noDataSubtitle,
369
374
  "icon-name": o.noDataIcon
370
- }, null, 8, ["title", "subtitle", "icon-name"])) : L("", !0)
375
+ }, null, 8, ["title", "subtitle", "icon-name"])) : E("", !0)
371
376
  ]));
372
377
  }
373
378
  });
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './AppTrigger.vue_vue_type_style_index_0_scoped_121aac8b_lang.css';
1
+ import './AutocompleteDropdown.vue_vue_type_style_index_0_scoped_214ddaf4_lang.css';
2
2
  import { AppTriggerTypes as eo } from "./components/appTrigger/index.js";
3
3
  import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
4
4
  import { MenuItemTypes as ao } from "./components/menuItem/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.12-test.78",
3
+ "version": "2.1.12-test.80",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- .chart-plane-container[data-v-e31a8fcd]{--headerHeight: var(--e6d08782);width:100%;height:var(--7183a92a);position:relative}.header-wrapper[data-v-e31a8fcd]{position:absolute;width:100%;height:var(--headerHeight);top:0;z-index:1}.chart-plane[data-v-e31a8fcd]{padding-top:var(--headerHeight);height:100%}.chart[data-v-e31a8fcd]{width:100%;height:100%;position:relative}.chart__canvas[data-v-e31a8fcd]{width:100%;height:100%}.chart__tooltip[data-v-e31a8fcd]{position:absolute;pointer-events:none;transition:all .1s ease;min-width:214px;max-width:270px;z-index:1}