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

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-a089480a]{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-a089480a]{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-a089480a]{position:sticky;top:0;z-index:calc(var(--13cc4a84) + 3)}.multi-table-container[data-v-a089480a] table{display:table;border:unset;border-radius:unset}.multi-table-container[data-v-a089480a] thead{border-top:1px solid var(--common-divider)}.multi-table-container .tables-container[data-v-a089480a] 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_a089480a_lang.css"; //*');
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a089480a"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,120 @@
1
+ import "../../../MultipleDataGrid.vue_vue_type_style_index_0_scoped_a089480a_lang.css"; import { defineComponent as I, useCssVars as R, computed as T, openBlock as l, createElementBlock as d, createElementVNode as p, normalizeClass as L, createVNode as z, unref as o, createBlock as r, isRef as E, createCommentVNode as f, Fragment as N, renderList as y, createSlots as D, withCtx as O, renderSlot as G } from "vue";
2
+ import g from "./DataGrid.vue.js";
3
+ import "./DataGridMenu.vue.js";
4
+ import M from "./DataGridRowsCounter.vue.js";
5
+ import "./MultipleDataGrid.vue.js";
6
+ import P from "../../search/v4/SearchV4.vue.js";
7
+ import { useVModel as $ } from "@vueuse/core";
8
+ const A = {
9
+ key: 0,
10
+ class: "tables-container"
11
+ }, K = /* @__PURE__ */ I({
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 c = t;
36
+ R((e) => ({
37
+ "13cc4a84": t.zIndexBase
38
+ }));
39
+ const S = T(
40
+ () => c.isLoading || !c.tablesSettings.flatMap((e) => e.rows).length
41
+ ), u = $(c, "search", n), m = (e) => `cell-${e.id}`, h = (e) => {
42
+ n("onScroll", e.target.scrollTop);
43
+ }, w = () => n("onClearSearch"), x = (e, s) => n("clickRow", e, s);
44
+ return (e, s) => (l(), d("div", {
45
+ class: "multi-table-container",
46
+ onScrollPassive: h
47
+ }, [
48
+ p("div", {
49
+ class: L(["table-header-container", { sticky: t.isSticky }])
50
+ }, [
51
+ z(o(M), {
52
+ count: t.count,
53
+ "total-count": t.totalCount,
54
+ "total-text": t.totalText,
55
+ "displaying-text": t.displayingText,
56
+ "out-of-text": t.outOfText,
57
+ "data-testid": t.testId
58
+ }, null, 8, ["count", "total-count", "total-text", "displaying-text", "out-of-text", "data-testid"]),
59
+ t.showSearch ? (l(), r(o(P), {
60
+ key: 0,
61
+ modelValue: o(u),
62
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => E(u) ? u.value = a : null),
63
+ placeholder: t.searchPlaceholder,
64
+ "test-id": t.testId,
65
+ onOnClear: w
66
+ }, null, 8, ["modelValue", "placeholder", "test-id"])) : f("", !0)
67
+ ], 2),
68
+ o(S) ? (l(), r(o(g), {
69
+ key: 1,
70
+ "is-loading": t.isLoading,
71
+ columns: t.loadingAndEmptyStatesColumns,
72
+ rows: [],
73
+ "test-id": t.testId,
74
+ "empty-state-variant": t.emptyStateVariant,
75
+ "empty-state-title": t.emptyStateTitle,
76
+ "empty-state-subtitle": t.emptyStateSubtitle,
77
+ "loading-row-count": t.loadingRowCount
78
+ }, null, 8, ["is-loading", "columns", "test-id", "empty-state-variant", "empty-state-title", "empty-state-subtitle", "loading-row-count"])) : (l(), d("div", A, [
79
+ (l(!0), d(N, null, y(t.tablesSettings, (a, k) => (l(), d("div", {
80
+ key: a.testId,
81
+ class: "table-wrapper"
82
+ }, [
83
+ a.rows.length ? (l(), r(o(g), {
84
+ key: 0,
85
+ sections: a.sections,
86
+ columns: a.columns,
87
+ rows: a.rows,
88
+ "row-height": a.rowHeight,
89
+ "is-sticky": t.isSticky,
90
+ "z-index-base": t.zIndexBase,
91
+ "test-id": a.testId,
92
+ onClickRow: (i) => x(i, k)
93
+ }, D({ _: 2 }, [
94
+ y(a.columns, (i) => ({
95
+ name: m(i),
96
+ fn: O(({
97
+ cell: C,
98
+ rowIndex: b,
99
+ isLoading: V,
100
+ cellIndex: v,
101
+ row: B
102
+ }) => [
103
+ G(e.$slots, `${m(i)}`, {
104
+ cell: C,
105
+ isLoading: V,
106
+ cellIndex: v,
107
+ row: B,
108
+ rowIndex: b
109
+ }, void 0, !0)
110
+ ])
111
+ }))
112
+ ]), 1032, ["sections", "columns", "rows", "row-height", "is-sticky", "z-index-base", "test-id", "onClickRow"])) : f("", !0)
113
+ ]))), 128))
114
+ ]))
115
+ ], 32));
116
+ }
117
+ });
118
+ export {
119
+ K as default
120
+ };