@ironsource/shared-ui 2.1.12-rc.9 → 2.1.12-test.57

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.
Files changed (63) hide show
  1. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_0123c361_lang.css +1 -0
  2. package/Chart.vue_vue_type_style_index_0_scoped_757e7752_lang.css +1 -0
  3. package/ChartHeader.vue_vue_type_style_index_0_scoped_92052479_lang.css +1 -0
  4. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_d61ed404_lang.css +1 -0
  5. package/ChartLegend.vue_vue_type_style_index_0_scoped_da487aba_lang.css +1 -0
  6. package/ChartPlane.vue_vue_type_style_index_0_scoped_bb382dc4_lang.css +1 -0
  7. package/DataGrid.vue_vue_type_style_index_0_scoped_86ea5d2a_lang.css +1 -0
  8. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_99e51ecc_lang.css +1 -0
  9. package/SettingsHeader.vue_vue_type_style_index_0_scoped_fba2eaa4_lang.css +1 -0
  10. package/components/chart/Chart.vue.d.ts +56 -2
  11. package/components/chart/Chart.vue.js +4 -4
  12. package/components/chart/Chart.vue2.js +93 -60
  13. package/components/chart/ChartHeader.vue.d.ts +25 -0
  14. package/components/chart/ChartHeader.vue.js +2 -2
  15. package/components/chart/ChartHeader.vue2.js +75 -50
  16. package/components/chart/ChartHeaderTrend.vue.d.ts +15 -0
  17. package/components/chart/ChartHeaderTrend.vue.js +3 -3
  18. package/components/chart/ChartHeaderTrend.vue2.js +83 -19
  19. package/components/chart/ChartLegend.vue.d.ts +17 -0
  20. package/components/chart/ChartLegend.vue.js +3 -3
  21. package/components/chart/ChartLegend.vue2.js +78 -67
  22. package/components/chart/ChartPlane.vue.d.ts +43 -4
  23. package/components/chart/ChartPlane.vue.js +3 -3
  24. package/components/chart/ChartPlane.vue2.js +137 -118
  25. package/components/chart/LegendSorting.vue.d.ts +37 -0
  26. package/components/chart/LegendSorting.vue.js +45 -0
  27. package/components/chart/LegendSorting.vue2.js +4 -0
  28. package/components/chart/SettingsHeader.vue.d.ts +1 -0
  29. package/components/chart/SettingsHeader.vue.js +3 -3
  30. package/components/chart/SettingsHeader.vue2.js +17 -16
  31. package/components/chart/colorPalette.d.ts +4 -0
  32. package/components/chart/colorPalette.js +54 -0
  33. package/components/chart/composables/useColorsMap.d.ts +2 -2
  34. package/components/chart/composables/useColorsMap.js +41 -12
  35. package/components/chart/consts.d.ts +12 -1
  36. package/components/chart/consts.js +31 -26
  37. package/components/chart/index.d.ts +237 -40
  38. package/components/chart/mockData.d.ts +8 -14
  39. package/components/chart/types.d.ts +2 -1
  40. package/components/dropdown/v4/ButtonDropdownTrigger.vue.js +2 -2
  41. package/components/dropdown/v4/ButtonDropdownTrigger.vue2.js +1 -1
  42. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.d.ts +11 -0
  43. package/components/dropdown/v4/IconButtonDropdownTrigger.vue.js +4 -4
  44. package/components/dropdown/v4/IconButtonDropdownTrigger.vue2.js +12 -10
  45. package/components/dropdown/v4/index.d.ts +18 -0
  46. package/components/table/v4/DataGrid.vue.js +3 -3
  47. package/components/table/v4/DataGrid.vue2.js +35 -35
  48. package/index.d.ts +37 -1
  49. package/index.js +1 -1
  50. package/package.json +1 -1
  51. package/utils/formatNumbers.d.ts +1 -1
  52. package/utils/formatNumbers.js +14 -14
  53. package/utils/totals.d.ts +5 -0
  54. package/utils/totals.js +9 -0
  55. package/ButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_604dfc6f_lang.css +0 -1
  56. package/Chart.vue_vue_type_style_index_0_scoped_78d3f5a8_lang.css +0 -1
  57. package/ChartHeader.vue_vue_type_style_index_0_scoped_32001725_lang.css +0 -1
  58. package/ChartHeaderTrend.vue_vue_type_style_index_0_scoped_e4c673e7_lang.css +0 -1
  59. package/ChartLegend.vue_vue_type_style_index_0_scoped_532f23bc_lang.css +0 -1
  60. package/ChartPlane.vue_vue_type_style_index_0_scoped_4396faf6_lang.css +0 -1
  61. package/DataGrid.vue_vue_type_style_index_0_scoped_6b54ac22_lang.css +0 -1
  62. package/IconButtonDropdownTrigger.vue_vue_type_style_index_0_scoped_59fb505a_lang.css +0 -1
  63. package/SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css +0 -1
@@ -1,7 +1,7 @@
1
1
  import e from "./SettingsHeader.vue2.js";
2
2
  /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css"; //*');
4
- const d = /* @__PURE__ */ o(e, [["__scopeId", "data-v-9b6cd9d9"]]);
3
+ // import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_fba2eaa4_lang.css"; //*');
4
+ const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-fba2eaa4"]]);
5
5
  export {
6
- d as default
6
+ s as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_9b6cd9d9_lang.css"; import { defineComponent as h, computed as g, openBlock as y, createElementBlock as f, createElementVNode as r, normalizeClass as a, createVNode as l, unref as t, isRef as v, withCtx as T, mergeProps as w, renderSlot as p } from "vue";
2
- import b from "../dropdown/v4/DropdownV4.vue.js";
1
+ import "../../SettingsHeader.vue_vue_type_style_index_0_scoped_fba2eaa4_lang.css"; import { defineComponent as h, computed as g, openBlock as y, createElementBlock as f, createElementVNode as r, normalizeClass as l, renderSlot as i, createVNode as p, unref as t, isRef as v, withCtx as T, mergeProps as b } from "vue";
2
+ import w from "../dropdown/v4/DropdownV4.vue.js";
3
3
  import "../dropdown/v4/DefaultDropdownTrigger.vue.js";
4
4
  import "../dropdown/v4/IconButtonDropdownTrigger.vue.js";
5
5
  import "../dropdown/v4/ChipDropdownTrigger.vue.js";
@@ -10,7 +10,7 @@ import "../dropdown/v4/TreeDropdown.vue.js";
10
10
  import "../dropdown/v4/OptionV4.vue.js";
11
11
  import "../dropdown/v4/ConditionalDropdown.vue.js";
12
12
  import { DROPDOWN_TYPE_OPTIONS as c } from "./consts.js";
13
- const _ = { class: "settings-header-container" }, B = { class: "chart-type-selection" }, x = /* @__PURE__ */ h({
13
+ const B = { class: "settings-header-container" }, C = { class: "chart-type-selection" }, H = /* @__PURE__ */ h({
14
14
  __name: "SettingsHeader",
15
15
  props: {
16
16
  chartType: null,
@@ -25,41 +25,42 @@ const _ = { class: "settings-header-container" }, B = { class: "chart-type-selec
25
25
  set(e) {
26
26
  m("update:chartType", e.id);
27
27
  }
28
- }), i = (e) => `Chart: ${e.name}`;
29
- return (e, d) => (y(), f("div", _, [
28
+ }), d = (e) => `Chart: ${e.name}`;
29
+ return (e, a) => (y(), f("div", B, [
30
30
  r("div", {
31
- class: a(["settings", { "settings-spacer": !s.hideLegend }])
31
+ class: l(["settings", { "settings-spacer": !s.hideLegend }])
32
32
  }, [
33
- r("div", B, [
34
- l(t(b), {
33
+ i(e.$slots, "before-chart-type", {}, void 0, !0),
34
+ r("div", C, [
35
+ p(t(w), {
35
36
  selected: t(o),
36
- "onUpdate:selected": d[0] || (d[0] = (n) => v(o) ? o.value = n : null),
37
+ "onUpdate:selected": a[0] || (a[0] = (n) => v(o) ? o.value = n : null),
37
38
  options: t(c),
38
39
  "option-name-key": "name",
39
- "display-value": i,
40
+ "display-value": d,
40
41
  placeholder: "Select chart type",
41
42
  size: "small"
42
43
  }, {
43
44
  "dropdown-trigger": T(({ buttonTriggerProps: n }) => [
44
- l(t(k), w(n, {
45
- label: i(t(o))
45
+ p(t(k), b(n, {
46
+ label: d(t(o))
46
47
  }), null, 16, ["label"])
47
48
  ]),
48
49
  _: 1
49
50
  }, 8, ["selected", "options"])
50
51
  ]),
51
52
  r("div", null, [
52
- p(e.$slots, "metric", {}, void 0, !0)
53
+ i(e.$slots, "metric", {}, void 0, !0)
53
54
  ])
54
55
  ], 2),
55
56
  r("div", {
56
- class: a(["breakdowns", { "breakdowns-border": !s.hideLegend }])
57
+ class: l(["breakdowns", { "breakdowns-border": !s.hideLegend }])
57
58
  }, [
58
- p(e.$slots, "breakdowns", {}, void 0, !0)
59
+ i(e.$slots, "breakdowns", {}, void 0, !0)
59
60
  ], 2)
60
61
  ]));
61
62
  }
62
63
  });
63
64
  export {
64
- x as default
65
+ H as default
65
66
  };
@@ -0,0 +1,4 @@
1
+ import { HexColor } from '@is-ssp/chart/types';
2
+ export declare const DEFAULT_CHART_COLOR: HexColor;
3
+ export declare const COLOR_PALETTE: HexColor[];
4
+ export declare const RESERVED_COLORS_MAP: Record<string, HexColor>;
@@ -0,0 +1,54 @@
1
+ import { BIDDING_PREFIX as F, NETWORK_ID_UNITY_ADS as N, NETWORK_ID_AD_MOB as R, NETWORK_ID_IRON_SOURCE as $, NON_BIDDING_PREFIX as E, NETWORK_ID_MINTEGRAL as B, NETWORK_ID_APPLOVIN as _, NETWORK_ID_FACEBOOK_META as D, NETWORK_ID_LIFTOFF as A, NETWORK_ID_PANGLE as O, NETWORK_ID_INMOBI as I, NETWORK_ID_DT_EXCHANGE as C } from "./consts.js";
2
+ const t = "#c9c9c9", K = [
3
+ "#80BCFE",
4
+ "#9999FF",
5
+ "#5883E4",
6
+ "#80CBC4",
7
+ "#FFC670",
8
+ "#FF7557",
9
+ "#0D7EA0",
10
+ "#673AFF",
11
+ "#CA80DC",
12
+ "#FEBBB2"
13
+ ], W = {
14
+ total: "#646464",
15
+ // AB tests
16
+ A: "#FFC134",
17
+ B: "#4F4FF5",
18
+ // Countries
19
+ US: "#272EC4",
20
+ CN: "#F52E1E",
21
+ GB: "#0082FF",
22
+ DE: "#FFD600",
23
+ JP: "#BA0029",
24
+ AU: "#009BCB",
25
+ FR: "#34A853",
26
+ // Ad formats
27
+ Rewarded: "#0082FF",
28
+ Interstitial: "#009BCB",
29
+ Banner: "#9668FF",
30
+ Native: "#FF35A2",
31
+ // Ad sources
32
+ [`${F}-${N}`]: "#9668FF",
33
+ [`${F}-${R}`]: "#34A853",
34
+ [`${F}-${$}`]: "#272EC4",
35
+ [`${E}-${$}`]: "#5C63E7",
36
+ [`${F}-${B}`]: "#00D8B2",
37
+ [`${F}-${_}`]: "#009BCB",
38
+ [`${E}-${_}`]: "#80CDE5",
39
+ [`${F}-${D}`]: "#0082FF",
40
+ [`${E}-${D}`]: "#52AAFF",
41
+ [`${F}-${A}`]: "#FF35A2",
42
+ [`${E}-${A}`]: "#FF9AD1",
43
+ [`${F}-${O}`]: "#F52E1E",
44
+ [`${E}-${O}`]: "#FA9F97",
45
+ [`${F}-${I}`]: "#FFD600",
46
+ [`${E}-${I}`]: "#FFEC8A",
47
+ [`${F}-${C}`]: "#BA0029",
48
+ [`${E}-${C}`]: "#DD8094"
49
+ };
50
+ export {
51
+ K as COLOR_PALETTE,
52
+ t as DEFAULT_CHART_COLOR,
53
+ W as RESERVED_COLORS_MAP
54
+ };
@@ -1,10 +1,10 @@
1
1
  import { Ref } from 'vue';
2
- import { ChartDataSet } from '@is-ssp/chart';
2
+ import { ChartDataSet } from '@/components/chart';
3
3
  type UseColorsMapArgs = {
4
4
  dataSets: Ref<ChartDataSet[]>;
5
5
  visibleIds: Ref<unknown[]>;
6
6
  };
7
7
  export declare const useColorsMap: ({ dataSets, visibleIds }: UseColorsMapArgs) => {
8
- colorsMap: import("vue").ComputedRef<{}>;
8
+ colorsMap: Ref<Record<string, `#${string}`>>;
9
9
  };
10
10
  export {};
@@ -1,17 +1,46 @@
1
- import { computed as e } from "vue";
2
- import { COLOR_PALETTE as a } from "../consts.js";
3
- const n = ({ dataSets: t, visibleIds: l }) => {
4
- const c = e(
5
- () => t.value.filter(
6
- (o) => l.value.includes(o.id)
7
- )
8
- );
9
- return {
10
- colorsMap: e(
11
- () => c.value.reduce((o, r, u) => (o[r.id] = r.color || a[u] || "#000000", o), {})
1
+ import { computed as n, ref as r, watch as E } from "vue";
2
+ import { RESERVED_COLORS_MAP as c, COLOR_PALETTE as O, DEFAULT_CHART_COLOR as R } from "../colorPalette.js";
3
+ const T = ({ dataSets: u, visibleIds: i }) => {
4
+ const a = n(
5
+ () => u.value.filter(
6
+ (o) => i.value.includes(o.id)
12
7
  )
8
+ ), l = r({
9
+ ...c
10
+ // destructuring is important to avoid mutating the reserved colors object
11
+ }), s = r([]), v = n(
12
+ () => O.filter((o) => !s.value.includes(o))
13
+ ), d = () => {
14
+ a.value.forEach((o) => {
15
+ const e = String(o.id);
16
+ if (!l.value[e]) {
17
+ const t = o.color || v.value[0] || R;
18
+ C(e, t);
19
+ }
20
+ });
21
+ }, f = () => {
22
+ Object.keys(l.value).forEach((o) => {
23
+ const e = a.value.find((m) => String(m.id) === o), t = !!c[o];
24
+ !e && !t && p(o);
25
+ });
26
+ }, C = (o, e) => {
27
+ l.value[String(o)] = e, s.value.push(e);
28
+ }, p = (o) => {
29
+ const e = l.value[o];
30
+ delete l.value[o];
31
+ const t = s.value.indexOf(e);
32
+ t > -1 && s.value.splice(t, 1);
33
+ };
34
+ return E(
35
+ a,
36
+ () => {
37
+ f(), d();
38
+ },
39
+ { immediate: !0 }
40
+ ), {
41
+ colorsMap: l
13
42
  };
14
43
  };
15
44
  export {
16
- n as useColorsMap
45
+ T as useColorsMap
17
46
  };
@@ -7,7 +7,6 @@ export declare const TICK_LABEL_FONT: {
7
7
  weight: number;
8
8
  family: string;
9
9
  };
10
- export declare const COLOR_PALETTE: string[];
11
10
  export declare const DEFAULT_TICK_COUNT = 4;
12
11
  export declare const DEFAULT_MIN_VISIBLE = 1;
13
12
  export declare const DEFAULT_MAX_VISIBLE = 5;
@@ -17,3 +16,15 @@ export declare const COMPACT_HEADER_HEIGHT = 43;
17
16
  export declare const DEFAULT_CHART_PLANE_HEIGHT = 312;
18
17
  export declare const MIN_PLANE_HEIGHT = 187;
19
18
  export declare const TOTALS_HELPER_KEY = "__TOTALS_HELPER_KEY__";
19
+ export declare const BIDDING_PREFIX = "Bidding";
20
+ export declare const NON_BIDDING_PREFIX = "Non-bidding";
21
+ export declare const NETWORK_ID_IRON_SOURCE = 9899;
22
+ export declare const NETWORK_ID_UNITY_ADS = 9917;
23
+ export declare const NETWORK_ID_FACEBOOK_META = 9939;
24
+ export declare const NETWORK_ID_AD_MOB = 9942;
25
+ export declare const NETWORK_ID_MINTEGRAL = 9953;
26
+ export declare const NETWORK_ID_APPLOVIN = 9935;
27
+ export declare const NETWORK_ID_INMOBI = 9938;
28
+ export declare const NETWORK_ID_DT_EXCHANGE = 9950;
29
+ export declare const NETWORK_ID_PANGLE = 9952;
30
+ export declare const NETWORK_ID_LIFTOFF = 9962;
@@ -1,32 +1,37 @@
1
- import { ChartType as E } from "./types.js";
2
- const L = "#fcfcfc", T = "#E4E4E4", n = "#646464", t = {
1
+ import { ChartType as _ } from "./types.js";
2
+ const I = "#fcfcfc", T = "#E4E4E4", O = "#646464", n = {
3
3
  size: 12,
4
4
  weight: 400,
5
5
  family: "Inter"
6
- }, c = [
7
- "#80BCFE",
8
- "#9999FF",
9
- "#5883E4",
10
- "#80CBC4",
11
- "#FFC670"
12
- ], O = 4, I = 1, o = 5, A = [
13
- { id: E.Line, name: "Line" },
14
- { id: E.StackedLine, name: "Stack" },
15
- { id: E.Bar, name: "Bar" }
16
- ], C = 76, s = 43, H = 312, R = 187, e = "__TOTALS_HELPER_KEY__";
6
+ }, t = 4, N = 1, c = 5, o = [
7
+ { id: _.Line, name: "Line" },
8
+ { id: _.StackedLine, name: "Stack" },
9
+ { id: _.Bar, name: "Bar" }
10
+ ], D = 76, L = 43, R = 312, s = 187, A = "__TOTALS_HELPER_KEY__", K = "Bidding", i = "Non-bidding", C = 9899, H = 9917, P = 9939, B = 9942, e = 9953, F = 9935, W = 9938, G = 9950, a = 9952, S = 9962;
17
11
  export {
18
- c as COLOR_PALETTE,
19
- s as COMPACT_HEADER_HEIGHT,
20
- H as DEFAULT_CHART_PLANE_HEIGHT,
21
- o as DEFAULT_MAX_VISIBLE,
22
- I as DEFAULT_MIN_VISIBLE,
23
- O as DEFAULT_TICK_COUNT,
24
- A as DROPDOWN_TYPE_OPTIONS,
12
+ K as BIDDING_PREFIX,
13
+ L as COMPACT_HEADER_HEIGHT,
14
+ R as DEFAULT_CHART_PLANE_HEIGHT,
15
+ c as DEFAULT_MAX_VISIBLE,
16
+ N as DEFAULT_MIN_VISIBLE,
17
+ t as DEFAULT_TICK_COUNT,
18
+ o as DROPDOWN_TYPE_OPTIONS,
25
19
  T as GRID_LINE_COLOR,
26
- C as HEADER_HEIGHT,
27
- R as MIN_PLANE_HEIGHT,
28
- L as POINT_BORDER_COLOR,
29
- n as TICK_LABEL_COLOR,
30
- t as TICK_LABEL_FONT,
31
- e as TOTALS_HELPER_KEY
20
+ D as HEADER_HEIGHT,
21
+ s as MIN_PLANE_HEIGHT,
22
+ B as NETWORK_ID_AD_MOB,
23
+ F as NETWORK_ID_APPLOVIN,
24
+ G as NETWORK_ID_DT_EXCHANGE,
25
+ P as NETWORK_ID_FACEBOOK_META,
26
+ W as NETWORK_ID_INMOBI,
27
+ C as NETWORK_ID_IRON_SOURCE,
28
+ S as NETWORK_ID_LIFTOFF,
29
+ e as NETWORK_ID_MINTEGRAL,
30
+ a as NETWORK_ID_PANGLE,
31
+ H as NETWORK_ID_UNITY_ADS,
32
+ i as NON_BIDDING_PREFIX,
33
+ I as POINT_BORDER_COLOR,
34
+ O as TICK_LABEL_COLOR,
35
+ n as TICK_LABEL_FONT,
36
+ A as TOTALS_HELPER_KEY
32
37
  };