@ironsource/shared-ui 2.1.11-rc.13 → 2.1.11-rc.14

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.
@@ -4,17 +4,15 @@ import { TableContext as J } from "./TableContext.js";
4
4
  const Q = 46, U = 46, tt = (e, u) => {
5
5
  const S = G(), a = c([]);
6
6
  N(J, {
7
- onClose({ rowIndex: t, cellIndex: o, value: n } = {}) {
8
- n && (a.value = [...a.value, t], u("saveRow", {
7
+ onClose({ rowIndex: t, cellIndex: o, value: l } = {}) {
8
+ a.value = [...a.value, t], u("saveRow", {
9
9
  rowIndex: t,
10
10
  cellIndex: o,
11
- value: n,
11
+ value: l,
12
12
  confirm: () => {
13
- a.value = a.value.filter(
14
- (i) => i !== t
15
- );
13
+ a.value = a.value.filter((n) => n !== t);
16
14
  }
17
- }));
15
+ });
18
16
  },
19
17
  setActiveMenuRow(t) {
20
18
  x.value = t;
@@ -22,26 +20,26 @@ const Q = 46, U = 46, tt = (e, u) => {
22
20
  });
23
21
  const y = s(() => !!e.selection), C = s(() => {
24
22
  const t = (y.value ? `${U}px ` : "") + (g.value ? `${Q}px ` : "");
25
- return e.columns.reduce((o, n) => {
26
- const i = n.width ? `${n.width}px` : `${n.colSpan || 1}fr`;
27
- return `${o} ${i}`;
23
+ return e.columns.reduce((o, l) => {
24
+ const n = l.width ? `${l.width}px` : `${l.colSpan || 1}fr`;
25
+ return `${o} ${n}`;
28
26
  }, t);
29
27
  }), g = s(() => !!S.expanded), A = c(null), x = c(null), R = s(() => Array(e.loadingRowCount).fill(
30
28
  Array(e.columns.length).fill("")
31
29
  )), H = s(() => e.rows.length && Array.isArray(e.rows[0]) ? e.isLoading ? [...e.rows, ...R.value] : e.rows : e.isLoading ? [
32
30
  ...e.rows.map((o) => o[e.rowDataKey]),
33
31
  ...R.value
34
- ] : e.rows.map((o) => o[e.rowDataKey])), { list: T, containerProps: l, wrapperProps: $, scrollTo: b } = q(
32
+ ] : e.rows.map((o) => o[e.rowDataKey])), { list: T, containerProps: i, wrapperProps: $, scrollTo: b } = q(
35
33
  H,
36
34
  {
37
35
  itemHeight: g.value ? (t) => w[t] ?? e.rowHeight : e.rowHeight
38
36
  }
39
37
  ), k = c(null), h = c(0), B = s(() => !!S.search), I = (t) => {
40
- l.onScroll(), h.value = t.target.scrollLeft + t.target.getBoundingClientRect().width, u("onScroll", t.target.scrollTop);
38
+ i.onScroll(), h.value = t.target.scrollLeft + t.target.getBoundingClientRect().width, u("onScroll", t.target.scrollTop);
41
39
  };
42
40
  V(() => {
43
- h.value = l.ref.value?.getBoundingClientRect().width, e.defaultScrollPosition && setTimeout(() => {
44
- l.ref.value?.scrollTo({
41
+ h.value = i.ref.value?.getBoundingClientRect().width, e.defaultScrollPosition && setTimeout(() => {
42
+ i.ref.value?.scrollTo({
45
43
  top: e.defaultScrollPosition,
46
44
  behavior: "smooth"
47
45
  });
@@ -50,16 +48,16 @@ const Q = 46, U = 46, tt = (e, u) => {
50
48
  const O = s(() => {
51
49
  const [t] = T.value;
52
50
  return t && t.index > 0;
53
- }), P = s(() => l.style), L = s(() => e.columns.reduce((t, o) => (o.isSticky && (t[o.id] = M(o)), t), {}));
51
+ }), P = s(() => i.style), L = s(() => e.columns.reduce((t, o) => (o.isSticky && (t[o.id] = M(o)), t), {}));
54
52
  F(
55
- l.ref,
53
+ i.ref,
56
54
  () => {
57
55
  e.isInfiniteScroll && u("loadMore");
58
56
  },
59
57
  { distance: e.infiniteScrollThreshold }
60
58
  );
61
59
  function E() {
62
- l.ref.value?.scrollTo({
60
+ i.ref.value?.scrollTo({
63
61
  top: 0,
64
62
  behavior: "smooth"
65
63
  });
@@ -70,33 +68,33 @@ const Q = 46, U = 46, tt = (e, u) => {
70
68
  const o = e.sort.sortBy === t.id;
71
69
  if (!(t.isSortable || t.isSortable === void 0))
72
70
  return;
73
- let i = e.sort.sortOrder, f = e.sort.sortBy;
74
- o ? i = e.sort.sortOrder === "asc" ? "desc" : "asc" : f = t.id, u("update:sort", { sortBy: f, sortOrder: i });
71
+ let n = e.sort.sortOrder, f = e.sort.sortBy;
72
+ o ? n = e.sort.sortOrder === "asc" ? "desc" : "asc" : f = t.id, u("update:sort", { sortBy: f, sortOrder: n });
75
73
  }
76
74
  function M(t) {
77
- const { isSticky: o, width: n } = t;
78
- if (!o || !n)
75
+ const { isSticky: o, width: l } = t;
76
+ if (!o || !l)
79
77
  return null;
80
- const i = e.columns.findIndex((r) => r.id === t.id), f = e.columns.reduce((r, v, m) => m < i ? r + v.width : r, 0), z = e.columns.reduce((r, v, m) => m > i ? r + v.width : r, 0);
78
+ const n = e.columns.findIndex((r) => r.id === t.id), f = e.columns.reduce((r, v, m) => m < n ? r + v.width : r, 0), z = e.columns.reduce((r, v, m) => m > n ? r + v.width : r, 0);
81
79
  return {
82
80
  ...t.isStickyRight ? { right: `${z}px` } : { left: `${f}px` },
83
81
  zIndex: 1
84
82
  };
85
83
  }
86
84
  const d = c([]), w = {}, _ = (t) => d.value.includes(t), K = async (t, o) => {
87
- const n = d.value.indexOf(t);
88
- if (n === -1) {
85
+ const l = d.value.indexOf(t);
86
+ if (l === -1) {
89
87
  d.value.push(t);
90
- const i = o.target.closest("tr");
91
- await j(), i && (w[t] = i.offsetHeight);
88
+ const n = o.target.closest("tr");
89
+ await j(), n && (w[t] = n.offsetHeight);
92
90
  } else
93
- d.value.splice(n, 1), delete w[t];
91
+ d.value.splice(l, 1), delete w[t];
94
92
  }, W = s(() => `${e.rowHeight}px`), X = s(
95
93
  () => `1 / span ${e.columns.length + 1}`
96
94
  );
97
95
  return {
98
96
  list: T,
99
- containerProps: l,
97
+ containerProps: i,
100
98
  wrapperProps: $,
101
99
  activeRow: A,
102
100
  gridColumnTemplate: C,
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './Menu.vue_vue_type_style_index_0_scoped_eb057818_lang.css';
1
+ import './AutocompleteDropdown.vue_vue_type_style_index_0_scoped_214ddaf4_lang.css';
2
2
  import { AppTriggerTypes as ro } from "./components/appTrigger/index.js";
3
3
  import { AutocompleteDropdownTypes as mo } from "./components/autocompleteDropdown/index.js";
4
4
  import { MenuItemTypes as po } 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.11-rc.13",
3
+ "version": "2.1.11-rc.14",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"