@ironsource/shared-ui 2.1.10-rc.0 → 2.1.10-rc.2

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.
@@ -1,19 +1,20 @@
1
- import "../../../MultipleDataGrid.vue_vue_type_style_index_0_scoped_cfedf78b_lang.css"; import { defineComponent as D, useCssVars as H, useSlots as O, computed as G, openBlock as n, createElementBlock as u, createElementVNode as v, normalizeClass as M, unref as s, renderSlot as d, createBlock as C, createCommentVNode as y, createVNode as P, isRef as $, Fragment as U, renderList as h, createSlots as b, withCtx as c } from "vue";
1
+ import "../../../MultipleDataGrid.vue_vue_type_style_index_0_scoped_60d4a465_lang.css"; import { defineComponent as D, useCssVars as H, useSlots as O, computed as G, openBlock as n, createElementBlock as c, createElementVNode as v, normalizeClass as M, unref as l, renderSlot as d, createBlock as C, createCommentVNode as y, createVNode as P, isRef as $, Fragment as F, renderList as g, createSlots as b, withCtx as m } from "vue";
2
2
  import I from "./DataGrid.vue.js";
3
3
  import "./DataGridMenu.vue.js";
4
- import F from "./DataGridRowsCounter.vue.js";
4
+ import U from "./DataGridRowsCounter.vue.js";
5
5
  import "./MultipleDataGrid.vue.js";
6
6
  import Q from "../../search/v4/SearchV4.vue.js";
7
7
  import { useVModel as j } from "@vueuse/core";
8
- import { TableTestIdModifiers as S } from "../../../testids/index.js";
9
- const p = ["data-testid"], q = ["data-testid"], J = ["data-testid"], K = ["data-testid"], W = {
8
+ import { TableTestIdModifiers as h } from "../../../testids/index.js";
9
+ const q = ["data-testid"], J = ["data-testid"], K = ["data-testid"], W = ["data-testid"], X = {
10
10
  key: 0,
11
11
  class: "tables-container"
12
- }, st = /* @__PURE__ */ D({
12
+ }, lt = /* @__PURE__ */ D({
13
13
  __name: "MultipleDataGrid",
14
14
  props: {
15
15
  tablesSettings: { default: () => [] },
16
16
  loadingAndEmptyStatesColumns: { default: () => [] },
17
+ getRowId: { type: Function, default: (t, i) => i },
17
18
  isSticky: { type: Boolean, default: !0 },
18
19
  isLoading: { type: Boolean, default: !1 },
19
20
  emptyStateVariant: { default: null },
@@ -32,30 +33,30 @@ const p = ["data-testid"], q = ["data-testid"], J = ["data-testid"], K = ["data-
32
33
  testId: { default: "" }
33
34
  },
34
35
  emits: ["update:search", "onScroll", "onClearSearch", "clickRow", "saveRow"],
35
- setup(t, { emit: r }) {
36
- const g = t;
36
+ setup(t, { emit: i }) {
37
+ const w = t;
37
38
  H((e) => ({
38
- "6083f45c": t.zIndexBase
39
+ b840474a: t.zIndexBase
39
40
  }));
40
41
  const R = O(), T = G(
41
- () => g.isLoading || !g.tablesSettings.flatMap((e) => e.rows).length
42
- ), i = j(g, "search", r), m = (e) => `header-${e.id}`, k = (e) => `cell-${e.id}`, x = (e) => {
43
- r("onScroll", e.target.scrollTop);
44
- }, E = () => r("onClearSearch"), V = (e, l) => r("clickRow", e, l), B = ({ value: e, rowIndex: l, cellIndex: a, confirm: f }, o) => r("saveRow", { value: e, tableIndex: o, rowIndex: l, cellIndex: a, confirm: f });
45
- return (e, l) => (n(), u("div", {
42
+ () => w.isLoading || !w.tablesSettings.flatMap((e) => e.rows).length
43
+ ), r = j(w, "search", i), f = (e) => `header-${e.id}`, k = (e) => `cell-${e.id}`, x = (e) => {
44
+ i("onScroll", e.target.scrollTop);
45
+ }, E = () => i("onClearSearch"), V = (e, s) => i("clickRow", e, s), B = ({ value: e, rowIndex: s, cellIndex: a, confirm: u }, o) => i("saveRow", { value: e, tableIndex: o, rowIndex: s, cellIndex: a, confirm: u });
46
+ return (e, s) => (n(), c("div", {
46
47
  class: "multi-table-container",
47
48
  onScrollPassive: x
48
49
  }, [
49
50
  v("div", {
50
51
  class: M(["table-header-container", { sticky: t.isSticky }]),
51
- "data-testid": `${t.testId}-${s(S).HEADER}`
52
+ "data-testid": `${t.testId}-${l(h).HEADER}`
52
53
  }, [
53
54
  v("div", {
54
55
  class: "rows-counter-container",
55
- "data-testid": `${t.testId}-${s(S).TITLE}`
56
+ "data-testid": `${t.testId}-${l(h).TITLE}`
56
57
  }, [
57
58
  d(e.$slots, "title", {}, () => [
58
- t.isLoading ? y("", !0) : (n(), C(s(F), {
59
+ t.isLoading ? y("", !0) : (n(), C(l(U), {
59
60
  key: 0,
60
61
  count: t.count,
61
62
  "total-count": t.totalCount,
@@ -65,33 +66,33 @@ const p = ["data-testid"], q = ["data-testid"], J = ["data-testid"], K = ["data-
65
66
  "test-id": t.testId
66
67
  }, null, 8, ["count", "total-count", "total-text", "displaying-text", "out-of-text", "test-id"]))
67
68
  ], !0)
68
- ], 8, q),
69
+ ], 8, J),
69
70
  v("div", {
70
71
  class: "table-header-right",
71
- "data-testid": `${t.testId}-${s(S).HEADER_RIGHT}`
72
+ "data-testid": `${t.testId}-${l(h).HEADER_RIGHT}`
72
73
  }, [
73
74
  t.showSearch ? d(e.$slots, "search", { key: 0 }, () => [
74
- P(s(Q), {
75
- modelValue: s(i),
76
- "onUpdate:modelValue": l[0] || (l[0] = (a) => $(i) ? i.value = a : null),
75
+ P(l(Q), {
76
+ modelValue: l(r),
77
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => $(r) ? r.value = a : null),
77
78
  placeholder: t.searchPlaceholder,
78
79
  "test-id": t.testId,
79
80
  onOnClear: E
80
81
  }, null, 8, ["modelValue", "placeholder", "test-id"])
81
82
  ], !0) : y("", !0),
82
- s(R)["table-header-actions"] ? (n(), u("div", {
83
+ l(R)["table-header-actions"] ? (n(), c("div", {
83
84
  key: 1,
84
85
  class: "table-header-actions",
85
- "data-testid": `${t.testId}-${s(S).ACTIONS}`
86
+ "data-testid": `${t.testId}-${l(h).ACTIONS}`
86
87
  }, [
87
88
  d(e.$slots, "table-header-actions", {}, void 0, !0)
88
- ], 8, K)) : y("", !0)
89
- ], 8, J)
90
- ], 10, p),
91
- s(T) ? (n(), C(s(I), {
89
+ ], 8, W)) : y("", !0)
90
+ ], 8, K)
91
+ ], 10, q),
92
+ l(T) ? (n(), C(l(I), {
92
93
  key: 1,
93
- search: s(i),
94
- "onUpdate:search": l[1] || (l[1] = (a) => $(i) ? i.value = a : null),
94
+ search: l(r),
95
+ "onUpdate:search": s[1] || (s[1] = (a) => $(r) ? r.value = a : null),
95
96
  rows: [],
96
97
  columns: t.loadingAndEmptyStatesColumns,
97
98
  "is-loading": t.isLoading,
@@ -101,23 +102,23 @@ const p = ["data-testid"], q = ["data-testid"], J = ["data-testid"], K = ["data-
101
102
  "empty-state-subtitle": t.emptyStateSubtitle,
102
103
  "test-id": t.testId
103
104
  }, b({
104
- "empty-state": c(() => [
105
+ "empty-state": m(() => [
105
106
  d(e.$slots, "empty-state", {}, void 0, !0)
106
107
  ]),
107
108
  _: 2
108
109
  }, [
109
- h(t.loadingAndEmptyStatesColumns, (a) => ({
110
- name: m(a),
111
- fn: c(() => [
112
- d(e.$slots, `${m(a)}`, { column: a }, void 0, !0)
110
+ g(t.loadingAndEmptyStatesColumns, (a) => ({
111
+ name: f(a),
112
+ fn: m(() => [
113
+ d(e.$slots, `${f(a)}`, { column: a }, void 0, !0)
113
114
  ])
114
115
  }))
115
- ]), 1032, ["search", "columns", "is-loading", "loading-row-count", "empty-state-variant", "empty-state-title", "empty-state-subtitle", "test-id"])) : (n(), u("div", W, [
116
- (n(!0), u(U, null, h(t.tablesSettings, (a, f) => (n(), u("div", {
116
+ ]), 1032, ["search", "columns", "is-loading", "loading-row-count", "empty-state-variant", "empty-state-title", "empty-state-subtitle", "test-id"])) : (n(), c("div", X, [
117
+ (n(!0), c(F, null, g(t.tablesSettings, (a, u) => (n(), c("div", {
117
118
  key: a.testId,
118
119
  class: "table-wrapper"
119
120
  }, [
120
- a.rows.length ? (n(), C(s(I), {
121
+ a.rows.length ? (n(), C(l(I), {
121
122
  key: 0,
122
123
  sections: a.sections,
123
124
  columns: a.columns,
@@ -125,35 +126,37 @@ const p = ["data-testid"], q = ["data-testid"], J = ["data-testid"], K = ["data-
125
126
  "row-height": a.rowHeight,
126
127
  "is-sticky": t.isSticky,
127
128
  "z-index-base": t.zIndexBase,
129
+ "get-row-id": t.getRowId,
128
130
  "test-id": a.testId,
129
- onClickRow: (o) => V(o, f),
130
- onSaveRow: (o) => B(o, f)
131
+ onClickRow: (o) => V(o, u),
132
+ onSaveRow: (o) => B(o, u)
131
133
  }, b({
132
- "floating-row": c(({ row: o, rowIndex: w }) => [
134
+ "floating-row": m(({ row: o, rowIndex: S }) => [
133
135
  d(e.$slots, "floating-row", {
134
136
  row: o,
135
- rowIndex: w
137
+ rowIndex: S,
138
+ tableIndex: u
136
139
  }, void 0, !0)
137
140
  ]),
138
141
  _: 2
139
142
  }, [
140
- h(a.columns, (o) => ({
141
- name: m(o),
142
- fn: c(() => [
143
- d(e.$slots, `${m(o)}`, { column: o }, void 0, !0)
143
+ g(a.columns, (o) => ({
144
+ name: f(o),
145
+ fn: m(() => [
146
+ d(e.$slots, `${f(o)}`, { column: o }, void 0, !0)
144
147
  ])
145
148
  })),
146
- h(a.columns, (o) => ({
149
+ g(a.columns, (o) => ({
147
150
  name: k(o),
148
- fn: c(({
149
- cell: w,
151
+ fn: m(({
152
+ cell: S,
150
153
  rowIndex: L,
151
154
  isLoading: N,
152
155
  cellIndex: z,
153
156
  row: A
154
157
  }) => [
155
158
  d(e.$slots, `${k(o)}`, {
156
- cell: w,
159
+ cell: S,
157
160
  isLoading: N,
158
161
  cellIndex: z,
159
162
  row: A,
@@ -161,12 +164,12 @@ const p = ["data-testid"], q = ["data-testid"], J = ["data-testid"], K = ["data-
161
164
  }, void 0, !0)
162
165
  ])
163
166
  }))
164
- ]), 1032, ["sections", "columns", "rows", "row-height", "is-sticky", "z-index-base", "test-id", "onClickRow", "onSaveRow"])) : y("", !0)
167
+ ]), 1032, ["sections", "columns", "rows", "row-height", "is-sticky", "z-index-base", "get-row-id", "test-id", "onClickRow", "onSaveRow"])) : y("", !0)
165
168
  ]))), 128))
166
169
  ]))
167
170
  ], 32));
168
171
  }
169
172
  });
170
173
  export {
171
- st as default
174
+ lt as default
172
175
  };
@@ -26,7 +26,7 @@ declare const DataGridTypes: () => (({
26
26
  infiniteScrollThreshold: number;
27
27
  rowHeight: number | ((index: number) => number);
28
28
  defaultScrollPosition: number;
29
- getRowId: (row: import("../common/Table.types").Row, index: number) => unknown;
29
+ getRowId: (row: import("../common/Table.types").Row, index: number) => string | number;
30
30
  selectedMatcher: (rowId: unknown, selected: unknown) => boolean;
31
31
  emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
32
32
  zIndexBase: number;
@@ -118,7 +118,7 @@ declare const DataGridTypes: () => (({
118
118
  default: any;
119
119
  };
120
120
  getRowId: {
121
- type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => unknown>;
121
+ type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => string | number>;
122
122
  default: (row: any, index: any) => any;
123
123
  };
124
124
  selectedMatcher: {
@@ -252,7 +252,7 @@ declare const DataGridTypes: () => (({
252
252
  default: any;
253
253
  };
254
254
  getRowId: {
255
- type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => unknown>;
255
+ type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => string | number>;
256
256
  default: (row: any, index: any) => any;
257
257
  };
258
258
  selectedMatcher: {
@@ -319,7 +319,7 @@ declare const DataGridTypes: () => (({
319
319
  infiniteScrollThreshold: number;
320
320
  rowHeight: number | ((index: number) => number);
321
321
  defaultScrollPosition: number;
322
- getRowId: (row: import("../common/Table.types").Row, index: number) => unknown;
322
+ getRowId: (row: import("../common/Table.types").Row, index: number) => string | number;
323
323
  selectedMatcher: (rowId: unknown, selected: unknown) => boolean;
324
324
  emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
325
325
  zIndexBase: number;
@@ -431,7 +431,7 @@ declare const DataGridTypes: () => (({
431
431
  default: any;
432
432
  };
433
433
  getRowId: {
434
- type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => unknown>;
434
+ type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => string | number>;
435
435
  default: (row: any, index: any) => any;
436
436
  };
437
437
  selectedMatcher: {
@@ -557,7 +557,7 @@ declare const DataGridTypes: () => (({
557
557
  default: any;
558
558
  };
559
559
  getRowId: {
560
- type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => unknown>;
560
+ type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => string | number>;
561
561
  default: (row: any, index: any) => any;
562
562
  };
563
563
  selectedMatcher: {
@@ -624,7 +624,7 @@ declare const DataGridTypes: () => (({
624
624
  infiniteScrollThreshold: number;
625
625
  rowHeight: number | ((index: number) => number);
626
626
  defaultScrollPosition: number;
627
- getRowId: (row: import("../common/Table.types").Row, index: number) => unknown;
627
+ getRowId: (row: import("../common/Table.types").Row, index: number) => string | number;
628
628
  selectedMatcher: (rowId: unknown, selected: unknown) => boolean;
629
629
  emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
630
630
  zIndexBase: number;
@@ -764,6 +764,7 @@ declare const DataGridTypes: () => (({
764
764
  emptyStateTitle: string;
765
765
  isSticky: boolean;
766
766
  emptyStateSubtitle: string;
767
+ getRowId: (row: import("../common/Table.types").Row, index: number) => string | number;
767
768
  emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
768
769
  zIndexBase: number;
769
770
  totalCount: number;
@@ -813,6 +814,10 @@ declare const DataGridTypes: () => (({
813
814
  type: import("vue").PropType<string>;
814
815
  default: string;
815
816
  };
817
+ getRowId: {
818
+ type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => string | number>;
819
+ default: (row: any, index: any) => any;
820
+ };
816
821
  emptyStateVariant: {
817
822
  type: import("vue").PropType<"error" | "no-access" | "no-results" | "no-data" | "files" | "settings">;
818
823
  default: any;
@@ -855,7 +860,7 @@ declare const DataGridTypes: () => (({
855
860
  }) => any;
856
861
  onOnClearSearch?: () => any;
857
862
  onClickRow?: (rowIndex: number, tableIndex: number) => any;
858
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "search" | "testId" | "isLoading" | "searchPlaceholder" | "count" | "showSearch" | "loadingRowCount" | "emptyStateTitle" | "isSticky" | "emptyStateSubtitle" | "emptyStateVariant" | "zIndexBase" | "totalCount" | "displayingText" | "outOfText" | "totalText" | "tablesSettings" | "loadingAndEmptyStatesColumns">;
863
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "search" | "testId" | "isLoading" | "searchPlaceholder" | "count" | "showSearch" | "loadingRowCount" | "emptyStateTitle" | "isSticky" | "emptyStateSubtitle" | "getRowId" | "emptyStateVariant" | "zIndexBase" | "totalCount" | "displayingText" | "outOfText" | "totalText" | "tablesSettings" | "loadingAndEmptyStatesColumns">;
859
864
  $attrs: {
860
865
  [x: string]: unknown;
861
866
  };
@@ -912,6 +917,10 @@ declare const DataGridTypes: () => (({
912
917
  type: import("vue").PropType<string>;
913
918
  default: string;
914
919
  };
920
+ getRowId: {
921
+ type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => string | number>;
922
+ default: (row: any, index: any) => any;
923
+ };
915
924
  emptyStateVariant: {
916
925
  type: import("vue").PropType<"error" | "no-access" | "no-results" | "no-data" | "files" | "settings">;
917
926
  default: any;
@@ -973,6 +982,7 @@ declare const DataGridTypes: () => (({
973
982
  emptyStateTitle: string;
974
983
  isSticky: boolean;
975
984
  emptyStateSubtitle: string;
985
+ getRowId: (row: import("../common/Table.types").Row, index: number) => string | number;
976
986
  emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
977
987
  zIndexBase: number;
978
988
  totalCount: number;
@@ -1042,6 +1052,10 @@ declare const DataGridTypes: () => (({
1042
1052
  type: import("vue").PropType<string>;
1043
1053
  default: string;
1044
1054
  };
1055
+ getRowId: {
1056
+ type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => string | number>;
1057
+ default: (row: any, index: any) => any;
1058
+ };
1045
1059
  emptyStateVariant: {
1046
1060
  type: import("vue").PropType<"error" | "no-access" | "no-results" | "no-data" | "files" | "settings">;
1047
1061
  default: any;
@@ -1129,6 +1143,10 @@ declare const DataGridTypes: () => (({
1129
1143
  type: import("vue").PropType<string>;
1130
1144
  default: string;
1131
1145
  };
1146
+ getRowId: {
1147
+ type: import("vue").PropType<(row: import("../common/Table.types").Row, index: number) => string | number>;
1148
+ default: (row: any, index: any) => any;
1149
+ };
1132
1150
  emptyStateVariant: {
1133
1151
  type: import("vue").PropType<"error" | "no-access" | "no-results" | "no-data" | "files" | "settings">;
1134
1152
  default: any;
@@ -1190,6 +1208,7 @@ declare const DataGridTypes: () => (({
1190
1208
  emptyStateTitle: string;
1191
1209
  isSticky: boolean;
1192
1210
  emptyStateSubtitle: string;
1211
+ getRowId: (row: import("../common/Table.types").Row, index: number) => string | number;
1193
1212
  emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
1194
1213
  zIndexBase: number;
1195
1214
  totalCount: number;
@@ -1216,6 +1235,7 @@ declare const DataGridTypes: () => (({
1216
1235
  "floating-row"?(_: {
1217
1236
  row: import("@vueuse/core").UseVirtualListItem<import("../common/Table.types").Row>;
1218
1237
  rowIndex: number;
1238
+ tableIndex: number;
1219
1239
  }): any;
1220
1240
  "empty-state"?(_: {}): any;
1221
1241
  };