@ironsource/shared-ui 2.1.6-rc.44 → 2.1.6-rc.46

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
+ .multi-table-container[data-v-260b9cdc]{border-radius:var(--border-radius-md);border:1px solid var(--common-divider);display:flex;flex-direction:column;overflow-y:auto;width:100%}.multi-table-container .table-header-container[data-v-260b9cdc]{align-items:center;background-color:var(--background-paper-elevation-0);display:flex;height:calc(var(--spacing-800) - 2px);justify-content:space-between;padding:var(--spacing-300);width:100%}.multi-table-container .table-header-container.sticky[data-v-260b9cdc]{position:sticky;top:0;z-index:calc(var(--6bca14de) + 3)}.multi-table-container[data-v-260b9cdc] table{display:table;border:unset;border-radius:unset}.multi-table-container[data-v-260b9cdc] thead{border-top:1px solid var(--common-divider)}.multi-table-container .tables-container[data-v-260b9cdc] thead.sticky{top:62px}
@@ -29,3 +29,10 @@ export type MenuItem = {
29
29
  text: string;
30
30
  icon?: string;
31
31
  };
32
+ export type TableSettings = {
33
+ columns: Column[];
34
+ rows: Row[];
35
+ sections?: Section[];
36
+ rowHeight?: number;
37
+ testId?: string;
38
+ };
@@ -0,0 +1,137 @@
1
+ import { Column } from '@/components/table/v4';
2
+ import { TableSettings } from '@is-ssp/table/common/Table.types';
3
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ tablesSettings: TableSettings[];
5
+ loadingAndEmptyStatesColumns: Column[];
6
+ isSticky?: boolean;
7
+ isLoading?: boolean;
8
+ emptyStateVariant?: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
9
+ emptyStateTitle?: string;
10
+ emptyStateSubtitle?: string;
11
+ loadingRowCount?: number;
12
+ search?: string;
13
+ showSearch?: boolean;
14
+ searchPlaceholder?: string;
15
+ zIndexBase?: number;
16
+ count?: number;
17
+ totalCount?: number;
18
+ displayingText?: string;
19
+ outOfText?: string;
20
+ totalText?: string;
21
+ testId?: string;
22
+ }>, {
23
+ tablesSettings: () => any[];
24
+ loadingAndEmptyStatesColumns: () => any[];
25
+ isSticky: boolean;
26
+ isLoading: boolean;
27
+ emptyStateVariant: any;
28
+ emptyStateTitle: string;
29
+ emptyStateSubtitle: string;
30
+ loadingRowCount: number;
31
+ search: any;
32
+ showSearch: boolean;
33
+ searchPlaceholder: string;
34
+ zIndexBase: number;
35
+ count: number;
36
+ totalCount: number;
37
+ displayingText: string;
38
+ outOfText: string;
39
+ totalText: string;
40
+ testId: string;
41
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
42
+ "update:search": (query: string) => void;
43
+ onScroll: (scrollTop: number) => void;
44
+ onClearSearch: () => void;
45
+ clickRow: (rowIndex: number, tableIndex: number) => void;
46
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
47
+ tablesSettings: TableSettings[];
48
+ loadingAndEmptyStatesColumns: Column[];
49
+ isSticky?: boolean;
50
+ isLoading?: boolean;
51
+ emptyStateVariant?: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
52
+ emptyStateTitle?: string;
53
+ emptyStateSubtitle?: string;
54
+ loadingRowCount?: number;
55
+ search?: string;
56
+ showSearch?: boolean;
57
+ searchPlaceholder?: string;
58
+ zIndexBase?: number;
59
+ count?: number;
60
+ totalCount?: number;
61
+ displayingText?: string;
62
+ outOfText?: string;
63
+ totalText?: string;
64
+ testId?: string;
65
+ }>, {
66
+ tablesSettings: () => any[];
67
+ loadingAndEmptyStatesColumns: () => any[];
68
+ isSticky: boolean;
69
+ isLoading: boolean;
70
+ emptyStateVariant: any;
71
+ emptyStateTitle: string;
72
+ emptyStateSubtitle: string;
73
+ loadingRowCount: number;
74
+ search: any;
75
+ showSearch: boolean;
76
+ searchPlaceholder: string;
77
+ zIndexBase: number;
78
+ count: number;
79
+ totalCount: number;
80
+ displayingText: string;
81
+ outOfText: string;
82
+ totalText: string;
83
+ testId: string;
84
+ }>>> & {
85
+ onOnScroll?: (scrollTop: number) => any;
86
+ "onUpdate:search"?: (query: string) => any;
87
+ onOnClearSearch?: () => any;
88
+ onClickRow?: (rowIndex: number, tableIndex: number) => any;
89
+ }, {
90
+ search: string;
91
+ testId: string;
92
+ isLoading: boolean;
93
+ searchPlaceholder: string;
94
+ count: number;
95
+ isSticky: boolean;
96
+ emptyStateTitle: string;
97
+ emptyStateSubtitle: string;
98
+ loadingRowCount: number;
99
+ emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
100
+ showSearch: boolean;
101
+ zIndexBase: number;
102
+ totalCount: number;
103
+ displayingText: string;
104
+ outOfText: string;
105
+ totalText: string;
106
+ tablesSettings: TableSettings[];
107
+ loadingAndEmptyStatesColumns: Column[];
108
+ }>, Partial<Record<string, (_: {
109
+ cell: any;
110
+ isLoading: any;
111
+ cellIndex: any;
112
+ row: any;
113
+ rowIndex: any;
114
+ }) => any>>>;
115
+ export default _default;
116
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
117
+ type __VLS_TypePropsToRuntimeProps<T> = {
118
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
119
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
120
+ } : {
121
+ type: import('vue').PropType<T[K]>;
122
+ required: true;
123
+ };
124
+ };
125
+ type __VLS_WithDefaults<P, D> = {
126
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
127
+ default: D[K];
128
+ }> : P[K];
129
+ };
130
+ type __VLS_Prettify<T> = {
131
+ [K in keyof T]: T[K];
132
+ } & {};
133
+ type __VLS_WithTemplateSlots<T, S> = T & {
134
+ new (): {
135
+ $slots: S;
136
+ };
137
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./MultipleDataGrid.vue2.js";
2
+ /* empty css */import t from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../MultipleDataGrid.vue_vue_type_style_index_0_scoped_260b9cdc_lang.css"; //*');
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-260b9cdc"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,123 @@
1
+ import "../../../MultipleDataGrid.vue_vue_type_style_index_0_scoped_260b9cdc_lang.css"; import { defineComponent as T, useCssVars as V, computed as L, openBlock as l, createElementBlock as d, createElementVNode as f, normalizeClass as z, createBlock as c, unref as o, createCommentVNode as m, isRef as p, Fragment as E, renderList as g, createSlots as D, withCtx as N, renderSlot as O } from "vue";
2
+ import S from "./DataGrid.vue.js";
3
+ import "./DataGridMenu.vue.js";
4
+ import G from "./DataGridRowsCounter.vue.js";
5
+ import "./MultipleDataGrid.vue.js";
6
+ import M from "../../search/v4/SearchV4.vue.js";
7
+ import { useVModel as P } from "@vueuse/core";
8
+ const $ = { class: "rows-counter-container" }, A = {
9
+ key: 0,
10
+ class: "tables-container"
11
+ }, K = /* @__PURE__ */ T({
12
+ __name: "MultipleDataGrid",
13
+ props: {
14
+ tablesSettings: { default: () => [] },
15
+ loadingAndEmptyStatesColumns: { default: () => [] },
16
+ isSticky: { type: Boolean, default: !0 },
17
+ isLoading: { type: Boolean, default: !1 },
18
+ emptyStateVariant: { default: null },
19
+ emptyStateTitle: { default: "No data to display" },
20
+ emptyStateSubtitle: { default: "" },
21
+ loadingRowCount: { default: 3 },
22
+ search: { default: null },
23
+ showSearch: { type: Boolean, default: !0 },
24
+ searchPlaceholder: { default: "Search" },
25
+ zIndexBase: { default: 100 },
26
+ count: { default: 0 },
27
+ totalCount: { default: 0 },
28
+ displayingText: { default: "Displaying" },
29
+ outOfText: { default: "out of" },
30
+ totalText: { default: "total rows" },
31
+ testId: { default: "" }
32
+ },
33
+ emits: ["update:search", "onScroll", "onClearSearch", "clickRow"],
34
+ setup(t, { emit: n }) {
35
+ const u = t;
36
+ V((e) => ({
37
+ "6bca14de": t.zIndexBase
38
+ }));
39
+ const h = L(
40
+ () => u.isLoading || !u.tablesSettings.flatMap((e) => e.rows).length
41
+ ), r = P(u, "search", n), y = (e) => `cell-${e.id}`, w = (e) => {
42
+ n("onScroll", e.target.scrollTop);
43
+ }, k = () => n("onClearSearch"), x = (e, s) => n("clickRow", e, s);
44
+ return (e, s) => (l(), d("div", {
45
+ class: "multi-table-container",
46
+ onScrollPassive: w
47
+ }, [
48
+ f("div", {
49
+ class: z(["table-header-container", { sticky: t.isSticky }])
50
+ }, [
51
+ f("div", $, [
52
+ t.isLoading ? m("", !0) : (l(), c(o(G), {
53
+ key: 0,
54
+ count: t.count,
55
+ "total-count": t.totalCount,
56
+ "total-text": t.totalText,
57
+ "displaying-text": t.displayingText,
58
+ "out-of-text": t.outOfText,
59
+ "data-testid": t.testId
60
+ }, null, 8, ["count", "total-count", "total-text", "displaying-text", "out-of-text", "data-testid"]))
61
+ ]),
62
+ t.showSearch ? (l(), c(o(M), {
63
+ key: 0,
64
+ modelValue: o(r),
65
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => p(r) ? r.value = a : null),
66
+ placeholder: t.searchPlaceholder,
67
+ "test-id": t.testId,
68
+ onOnClear: k
69
+ }, null, 8, ["modelValue", "placeholder", "test-id"])) : m("", !0)
70
+ ], 2),
71
+ o(h) ? (l(), c(o(S), {
72
+ key: 1,
73
+ "is-loading": t.isLoading,
74
+ columns: t.loadingAndEmptyStatesColumns,
75
+ rows: [],
76
+ "test-id": t.testId,
77
+ "empty-state-variant": t.emptyStateVariant,
78
+ "empty-state-title": t.emptyStateTitle,
79
+ "empty-state-subtitle": t.emptyStateSubtitle,
80
+ "loading-row-count": t.loadingRowCount
81
+ }, null, 8, ["is-loading", "columns", "test-id", "empty-state-variant", "empty-state-title", "empty-state-subtitle", "loading-row-count"])) : (l(), d("div", A, [
82
+ (l(!0), d(E, null, g(t.tablesSettings, (a, C) => (l(), d("div", {
83
+ key: a.testId,
84
+ class: "table-wrapper"
85
+ }, [
86
+ a.rows.length ? (l(), c(o(S), {
87
+ key: 0,
88
+ sections: a.sections,
89
+ columns: a.columns,
90
+ rows: a.rows,
91
+ "row-height": a.rowHeight,
92
+ "is-sticky": t.isSticky,
93
+ "z-index-base": t.zIndexBase,
94
+ "test-id": a.testId,
95
+ onClickRow: (i) => x(i, C)
96
+ }, D({ _: 2 }, [
97
+ g(a.columns, (i) => ({
98
+ name: y(i),
99
+ fn: N(({
100
+ cell: b,
101
+ rowIndex: v,
102
+ isLoading: B,
103
+ cellIndex: I,
104
+ row: R
105
+ }) => [
106
+ O(e.$slots, `${y(i)}`, {
107
+ cell: b,
108
+ isLoading: B,
109
+ cellIndex: I,
110
+ row: R,
111
+ rowIndex: v
112
+ }, void 0, !0)
113
+ ])
114
+ }))
115
+ ]), 1032, ["sections", "columns", "rows", "row-height", "is-sticky", "z-index-base", "test-id", "onClickRow"])) : m("", !0)
116
+ ]))), 128))
117
+ ]))
118
+ ], 32));
119
+ }
120
+ });
121
+ export {
122
+ K as default
123
+ };