@ironsource/shared-ui 2.1.8-rc.0 → 2.1.8-rc.3

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 (26) hide show
  1. package/DataGrid.vue_vue_type_style_index_0_scoped_7524407f_lang.css +1 -0
  2. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css +1 -0
  3. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_1726ad49_lang.css +1 -0
  4. package/TreeDropdown.vue_vue_type_style_index_0_scoped_a51b6929_lang.css +1 -0
  5. package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
  6. package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +1 -1
  7. package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
  8. package/components/dropdown/v4/TreeDropdown.vue2.js +33 -30
  9. package/components/table/common/Table.common.js +71 -68
  10. package/components/table/v4/DataGrid.vue.d.ts +10 -4
  11. package/components/table/v4/DataGrid.vue.js +3 -3
  12. package/components/table/v4/DataGrid.vue2.js +130 -136
  13. package/components/table/v4/DataGridRowsCounter.vue.js +2 -2
  14. package/components/table/v4/DataGridRowsCounter.vue2.js +14 -13
  15. package/components/table/v4/MultipleDataGrid.vue.d.ts +2 -2
  16. package/components/table/v4/index.d.ts +41 -7
  17. package/components/table/v4/storyUtils.d.ts +8 -0
  18. package/index.d.ts +82 -14
  19. package/package.json +3 -2
  20. package/utils/formatNumbers.d.ts +4 -0
  21. package/utils/formatNumbers.js +11 -0
  22. package/utils/index.d.ts +1 -0
  23. package/DataGrid.vue_vue_type_style_index_0_scoped_706b324e_lang.css +0 -1
  24. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_0ce71f73_lang.css +0 -1
  25. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_98819e5a_lang.css +0 -1
  26. package/TreeDropdown.vue_vue_type_style_index_0_scoped_ffd0b476_lang.css +0 -1
@@ -0,0 +1 @@
1
+ .sticky[data-v-7524407f]{position:sticky}.table-container[data-v-7524407f]{width:100%;position:relative;display:flex;flex-direction:column}.table-header[data-v-7524407f]{display:flex;align-items:center;height:calc(var(--spacing-800) - 1px);border-bottom:1px solid var(--common-divider);background-color:var(--background-paper-elevation-0);position:sticky;left:0;padding:var(--spacing-300)}.table-header .table-title[data-v-7524407f]{display:flex;flex:1;align-items:center;justify-content:flex-start;height:100%;color:var(--text-primary)}.table-header .table-header-right[data-v-7524407f]{display:flex;align-items:center;height:100%}.table-header .search-wrapper[data-v-7524407f]{width:13.75rem}.table-header.isStickyHeader[data-v-7524407f]{z-index:calc(var(--06b5104a) + 3);top:0}.table-head-container[data-v-7524407f]{display:flex;align-items:center;white-space:nowrap;color:var(--text-primary)}.table-footer[data-v-7524407f]{color:var(--text-primary);background-color:var(--background-paper-elevation-0);padding:0 var(--spacing-300);display:flex;align-items:center;min-height:var(--spacing-600);border:1px solid var(--common-divider);border-radius:var(--border-radius-md);border-top-right-radius:0;border-top-left-radius:0}.table-body-wrapper[data-v-7524407f]{display:inline-table}.table-header-actions[data-v-7524407f]{margin-left:var(--spacing-100);display:flex;align-items:center}.table-row[data-v-7524407f]{position:relative}.table-row.loading[data-v-7524407f]{opacity:.7}.table-row:not(.expanded):last-child>td[data-v-7524407f]{border-bottom:none}.table-row.expanded:last-child>.expanded-row[data-v-7524407f]{border-bottom:none}.expanded-row[data-v-7524407f]{grid-column:var(--bd683984);border-bottom:1px solid var(--common-divider);background-color:var(--background-default)}table[data-v-7524407f]{position:relative;display:block;overflow:auto;background:var(--background-paper-elevation-0);border:1px solid var(--common-divider);color:var(--text-primary);text-align:left;table-layout:fixed;width:100%;max-height:100%;border-radius:var(--border-radius-md);border-collapse:collapse;border-spacing:0}table.hasFooter[data-v-7524407f]{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none}table td[data-v-7524407f],table th[data-v-7524407f]{line-height:normal;padding:0 var(--spacing-200)}table td[data-v-7524407f]:first-of-type,table th[data-v-7524407f]:first-of-type{padding-left:var(--spacing-300)}table td[data-v-7524407f]:last-of-type,table th[data-v-7524407f]:last-of-type{padding-right:var(--spacing-300)}table td.expand-toggle-cell[data-v-7524407f],table th.expand-toggle-cell[data-v-7524407f]{padding-left:var(--spacing-150);padding-right:var(--spacing-75)}table>thead[data-v-7524407f]{border-bottom:none;z-index:calc(var(--06b5104a) + 1);display:inline-table;min-width:100%}table>thead>tr[data-v-7524407f]{color:var(--text-primary);border-bottom:1px solid var(--common-divider);height:var(--spacing-500);display:grid;grid-template-columns:var(--45ac1eb7)}table>thead>tr>th[data-v-7524407f]{background:var(--background-paper-elevation-0);width:100%;display:flex;align-items:center;cursor:default}table>thead>tr>th.bordered[data-v-7524407f]{border-right:1px solid var(--common-divider)}table>thead>tr>th.bordered.isStickyRight[data-v-7524407f]{border-right:none;border-left:1px solid var(--common-divider)}table>thead>tr>th.isTextRight[data-v-7524407f]{justify-content:flex-end}table>thead>tr>th.isSortable[data-v-7524407f]{cursor:pointer}table>thead.sticky[data-v-7524407f]{position:sticky;top:0;background:white}table>thead.isStickyHeader[data-v-7524407f]{z-index:calc(var(--06b5104a) + 2);top:calc(var(--spacing-800) - 1px)}table>tbody[data-v-7524407f]{display:block}table>tbody>*>tr[data-v-7524407f]{background-color:var(--background-default);min-height:var(--2737857f);height:auto;display:grid;align-items:center;grid-template-columns:var(--45ac1eb7)}table>tbody>*>tr:nth-of-type(2n)>td[data-v-7524407f]{background-color:var(--background-default)}table>tbody>*>tr:hover:not(.loading)>td[data-v-7524407f],table>tbody>*>tr.activeMenu>td[data-v-7524407f]{background-color:var(--background-paper-elevation-1)}table>tbody td[data-v-7524407f]{background-color:var(--background-default);border:none;min-width:0;display:flex;min-height:var(--2737857f);height:auto;width:100%;place-items:center;border-bottom:1px solid var(--common-divider);justify-content:start}table>tbody td.bordered[data-v-7524407f]{border-right:1px solid var(--common-divider)}table>tbody td.bordered.isStickyRight[data-v-7524407f]{border-right:none;border-left:1px solid var(--common-divider)}table>tbody td.isTextRight[data-v-7524407f]{justify-content:flex-end;text-align:right}.section-container[data-v-7524407f]{left:0}.sections[data-v-7524407f]{display:flex}.section[data-v-7524407f]{padding:0 1.5rem;background:var(--background-default);left:0;height:32px;display:flex;align-items:flex-end;border-right:1px solid var(--common-divider)}.table-cell[data-v-7524407f]{width:100%}.empty-state[data-v-7524407f]{min-height:250px}
@@ -0,0 +1 @@
1
+ .data-grid-rows-counter[data-v-ef699ec5]{color:var(--text-secondary)}.text-strong[data-v-ef699ec5]{color:var(--text-primary)}
@@ -0,0 +1 @@
1
+ .default-dropdown-wrapper[data-v-1726ad49]{position:relative}.dropdown-trigger[data-v-1726ad49]{width:100%;padding:.3125rem .4375rem;display:flex;column-gap:.25rem;max-width:100%;box-sizing:border-box;border-radius:var(--border-radius-md);border:1px solid var(--action-outlined-border);background:var(--default-main);cursor:pointer;user-select:none;position:relative}.dropdown-trigger[data-v-1726ad49]:hover{border:1px solid var(--action-active);background:var(--action-hover)}.dropdown-trigger.small[data-v-1726ad49]{padding:.1875rem .4375rem}.dropdown-trigger.large[data-v-1726ad49]{padding:.5625rem .4375rem}.dropdown-trigger.disabled[data-v-1726ad49]{border:1px solid var(--action-outlined-border, #bbb);background:var(--action-disabled-background, #f1f1f1);cursor:not-allowed}.dropdown-trigger.disabled .displayed-value[data-v-1726ad49],.dropdown-trigger.disabled .caret-down[data-v-1726ad49]{color:var(--text-disabled)}.dropdown-trigger.open[data-v-1726ad49]{padding:.25rem .375rem;border:2px solid var(--primary-main)}.dropdown-trigger.open.small[data-v-1726ad49]{padding:.125rem .375rem}.dropdown-trigger.open.large[data-v-1726ad49]{padding:.5rem .375rem}.dropdown-trigger.state-error[data-v-1726ad49],.dropdown-trigger.state-success[data-v-1726ad49],.dropdown-trigger.state-warning[data-v-1726ad49]{padding:4px 6px}.dropdown-trigger.state-error.small[data-v-1726ad49],.dropdown-trigger.state-success.small[data-v-1726ad49],.dropdown-trigger.state-warning.small[data-v-1726ad49]{padding:.1875rem .4375rem}.dropdown-trigger.state-error.large[data-v-1726ad49],.dropdown-trigger.state-success.large[data-v-1726ad49],.dropdown-trigger.state-warning.large[data-v-1726ad49]{padding:.5625rem .4375rem}.dropdown-trigger.state-error[data-v-1726ad49]{border:2px solid var(--error-main)}.dropdown-trigger.state-success[data-v-1726ad49]{border:2px solid var(--success-main)}.dropdown-trigger.state-warning[data-v-1726ad49]{border:2px solid var(--warning-dark)}.dropdown-trigger .caret-down[data-v-1726ad49]{color:var(--action-active)}.content[data-v-1726ad49]{display:flex;flex:1;gap:.25rem;align-items:center;color:var(--text-primary)}.content .displayed-value[data-v-1726ad49]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content .image[data-v-1726ad49]{width:20px;height:20px;flex:none}.content .image img[data-v-1726ad49]{border-radius:4px;width:100%;height:100%}.content .start-icon[data-v-1726ad49]{display:flex;color:var(--action-active)}.content .status-dot[data-v-1726ad49]{padding-right:.25rem}.content .status-dot>div[data-v-1726ad49]{position:relative;top:-1px}.dropdown-field-label[data-v-1726ad49]{color:var(--text-primary)}.dropdown-field-help-text[data-v-1726ad49]{margin-top:4px;position:absolute}
@@ -0,0 +1 @@
1
+ .child-options[data-v-a51b6929]{padding-left:1rem}
@@ -1,7 +1,7 @@
1
1
  import o from "./DefaultDropdownTrigger.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_98819e5a_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-98819e5a"]]);
3
+ // import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_1726ad49_lang.css"; //*');
4
+ const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-1726ad49"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_98819e5a_lang.css"; import { defineComponent as O, computed as r, openBlock as o, createElementBlock as n, createBlock as k, createCommentVNode as d, createElementVNode as c, mergeProps as m, unref as l, renderSlot as u, createVNode as i, withCtx as I, createTextVNode as B, toDisplayString as w } from "vue";
1
+ import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_1726ad49_lang.css"; import { defineComponent as O, computed as r, openBlock as o, createElementBlock as n, createBlock as k, createCommentVNode as d, createElementVNode as c, mergeProps as m, unref as l, renderSlot as u, createVNode as i, withCtx as I, createTextVNode as B, toDisplayString as w } from "vue";
2
2
  import V from "../../typography/v4/Typography.vue.js";
3
3
  import { DropdownTestIdModifiers as p } from "../../../testids/index.js";
4
4
  import h from "../../icon/v4/IconV4.vue.js";
@@ -1,7 +1,7 @@
1
1
  import o from "./TreeDropdown.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_ffd0b476_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ffd0b476"]]);
3
+ // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_a51b6929_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-a51b6929"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_ffd0b476_lang.css"; import { defineComponent as j, provide as F, ref as s, onMounted as R, watch as v, openBlock as m, createBlock as U, unref as a, withCtx as K, createVNode as k, normalizeProps as G, guardReactiveProps as H, renderSlot as J, withModifiers as q, createElementBlock as N, withDirectives as Q, createElementVNode as W, Fragment as X, renderList as Y, vShow as Z, createCommentVNode as _ } from "vue";
2
- import ee from "./DropdownV4.vue.js";
3
- import ne from "./DefaultDropdownTrigger.vue.js";
1
+ import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_a51b6929_lang.css"; import { defineComponent as j, provide as F, ref as s, onMounted as R, watch as v, openBlock as m, createBlock as U, unref as a, withCtx as K, createVNode as k, normalizeProps as G, guardReactiveProps as H, createSlots as J, renderSlot as Q, withModifiers as q, createElementBlock as N, withDirectives as W, createElementVNode as X, Fragment as Y, renderList as Z, vShow as _, createCommentVNode as ee } from "vue";
2
+ import ne from "./DropdownV4.vue.js";
3
+ import le from "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
5
5
  import "./ChipDropdownTrigger.vue.js";
6
6
  import "./AppDropdownTrigger.vue.js";
@@ -8,12 +8,12 @@ import "./ButtonDropdownTrigger.vue.js";
8
8
  import "./ButtonFilterDropdownTrigger.vue.js";
9
9
  import "./TreeDropdown.vue.js";
10
10
  import z from "./OptionV4.vue.js";
11
- import { useChildOptions as le } from "../composables/useChildOptions.js";
12
- import oe from "../../search/v4/SearchV4.vue.js";
13
- const te = {
11
+ import { useChildOptions as oe } from "../composables/useChildOptions.js";
12
+ import te from "../../search/v4/SearchV4.vue.js";
13
+ const ie = {
14
14
  key: 0,
15
15
  class: "child-options"
16
- }, me = /* @__PURE__ */ j({
16
+ }, Ke = /* @__PURE__ */ j({
17
17
  __name: "TreeDropdown",
18
18
  props: {
19
19
  options: null,
@@ -60,7 +60,7 @@ const te = {
60
60
  i.value = [...l.selected];
61
61
  }
62
62
  );
63
- const { hasChildren: p, getChildren: y, allChildrenSelected: g, someChildrenSelected: V } = le(i, l.optionChildrenKey), b = (n) => {
63
+ const { hasChildren: p, getChildren: y, allChildrenSelected: g, someChildrenSelected: V } = oe(i, l.optionChildrenKey), b = (n) => {
64
64
  if (p(n)) {
65
65
  g(n) ? i.value = i.value.filter(
66
66
  (t) => !y(n).includes(t)
@@ -73,11 +73,11 @@ const te = {
73
73
  i.value.includes(n) ? i.value = i.value.filter(
74
74
  (t) => t !== n
75
75
  ) : i.value = [...i.value, n];
76
- }, E = (n) => i.value.includes(n), D = (n) => 1 + (p(n) ? y(n).length : 0), x = () => {
76
+ }, E = (n) => i.value.includes(n), D = (n) => 1 + (p(n) ? y(n).length : 0), B = () => {
77
77
  I("update:selected", i.value);
78
- }, B = () => {
79
- i.value = [];
80
78
  }, M = () => {
79
+ i.value = [];
80
+ }, P = () => {
81
81
  const n = /* @__PURE__ */ new Set([]);
82
82
  h.value.forEach((e) => {
83
83
  if (l.selected?.includes(e))
@@ -98,10 +98,10 @@ const te = {
98
98
  v(
99
99
  () => l.isOpen,
100
100
  () => {
101
- l.isOpen ? f.value = M() : (i.value = [...l.selected], u.value = "");
101
+ l.isOpen ? f.value = P() : (i.value = [...l.selected], u.value = "");
102
102
  }
103
103
  );
104
- const d = s({}), P = (n) => {
104
+ const d = s({}), x = (n) => {
105
105
  d.value[n[l.optionUniqueIdKey]] ? delete d.value[n[l.optionUniqueIdKey]] : d.value[n[l.optionUniqueIdKey]] = 1;
106
106
  };
107
107
  function A(n, t) {
@@ -126,7 +126,7 @@ const te = {
126
126
  () => {
127
127
  L(u.value);
128
128
  }
129
- ), (n, t) => (m(), U(a(ee), {
129
+ ), (n, t) => (m(), U(a(ne), {
130
130
  multi: "",
131
131
  class: "tree-dropdown",
132
132
  "show-select-all": !1,
@@ -146,19 +146,22 @@ const te = {
146
146
  "trigger-show-all-selected-text": !1,
147
147
  "predefined-trigger": "default",
148
148
  "onUpdate:isOpen": t[1] || (t[1] = (e) => I("update:isOpen", e)),
149
- onApply: x,
150
- onClear: B
149
+ onApply: B,
150
+ onClear: M
151
151
  }, {
152
152
  "dropdown-trigger": K(({ defaultTriggerProps: e }) => [
153
- k(a(ne), G(H(e)), {
154
- "end-icon": K(() => [
155
- J(n.$slots, "trigger-end-icon", {}, void 0, !0)
156
- ]),
157
- _: 2
158
- }, 1040)
153
+ k(a(le), G(H(e)), J({ _: 2 }, [
154
+ n.$slots["trigger-end-icon"] ? {
155
+ name: "end-icon",
156
+ fn: K(() => [
157
+ Q(n.$slots, "trigger-end-icon", {}, void 0, !0)
158
+ ]),
159
+ key: "0"
160
+ } : void 0
161
+ ]), 1040)
159
162
  ]),
160
163
  "inline-search": K(() => [
161
- k(a(oe), {
164
+ k(a(te), {
162
165
  modelValue: u.value,
163
166
  "onUpdate:modelValue": t[0] || (t[0] = (e) => u.value = e),
164
167
  placeholder: o.inlineSearchPlaceholder,
@@ -184,11 +187,11 @@ const te = {
184
187
  "tree-main-option-expanded": d.value[e[o.optionUniqueIdKey]],
185
188
  "stop-option-click-event-propagation": "",
186
189
  onClick: q(() => b(e), ["stop"]),
187
- onToggleTreeCollapse: P
190
+ onToggleTreeCollapse: x
188
191
  }, null, 8, ["option", "selected-prop", "is-indeterminate", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "tree-main-option", "tree-main-option-expanded", "onClick"]),
189
- a(p)(e) ? (m(), N("div", te, [
190
- Q(W("div", null, [
191
- (m(!0), N(X, null, Y(a(y)(e), (c, C) => (m(), U(a(z), {
192
+ a(p)(e) ? (m(), N("div", ie, [
193
+ W(X("div", null, [
194
+ (m(!0), N(Y, null, Z(a(y)(e), (c, C) => (m(), U(a(z), {
192
195
  key: `${r}-${C}`,
193
196
  option: c,
194
197
  "selected-prop": E(c),
@@ -204,14 +207,14 @@ const te = {
204
207
  onClick: q(() => b(c), ["stop"])
205
208
  }, null, 8, ["option", "selected-prop", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "tree-child-shown", "onClick"]))), 128))
206
209
  ], 512), [
207
- [Z, d.value[e[o.optionUniqueIdKey]]]
210
+ [_, d.value[e[o.optionUniqueIdKey]]]
208
211
  ])
209
- ])) : _("", !0)
212
+ ])) : ee("", !0)
210
213
  ]),
211
214
  _: 3
212
215
  }, 8, ["is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "option-name-key", "size", "test-id", "disabled"]));
213
216
  }
214
217
  });
215
218
  export {
216
- me as default
219
+ Ke as default
217
220
  };
@@ -1,120 +1,123 @@
1
- import { useSlots as K, ref as c, provide as N, computed as s, onMounted as V, nextTick as j } from "vue";
1
+ import { useSlots as G, ref as c, provide as N, computed as s, onMounted as V, nextTick as j } from "vue";
2
2
  import { useVirtualList as q, useInfiniteScroll as F } from "@vueuse/core";
3
3
  import { TableContext as J } from "./TableContext.js";
4
- const Q = 46, U = 46, tt = (o, a) => {
5
- const m = K(), u = c([]);
4
+ const Q = 46, U = 46, tt = (e, u) => {
5
+ const S = G(), a = c([]);
6
6
  N(J, {
7
- onClose({ rowIndex: t, cellIndex: e, value: n } = {}) {
8
- n && (u.value = [...u.value, t], a("saveRow", {
7
+ onClose({ rowIndex: t, cellIndex: o, value: n } = {}) {
8
+ n && (a.value = [...a.value, t], u("saveRow", {
9
9
  rowIndex: t,
10
- cellIndex: e,
10
+ cellIndex: o,
11
11
  value: n,
12
12
  confirm: () => {
13
- u.value = u.value.filter(
14
- (l) => l !== t
13
+ a.value = a.value.filter(
14
+ (i) => i !== t
15
15
  );
16
16
  }
17
17
  }));
18
18
  },
19
19
  setActiveMenuRow(t) {
20
- C.value = t;
20
+ x.value = t;
21
21
  }
22
22
  });
23
- const x = s(() => !!o.selection), T = s(() => {
24
- const t = (x.value ? `${U}px ` : "") + (g.value ? `${Q}px ` : "");
25
- return o.columns.reduce((e, n) => {
26
- const l = n.width ? `${n.width}px` : `${n.colSpan || 1}fr`;
27
- return `${e} ${l}`;
23
+ const y = s(() => !!e.selection), C = s(() => {
24
+ 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}`;
28
28
  }, t);
29
- }), g = s(() => !!m.expanded), y = c(null), C = c(null), H = s(() => Array(o.loadingRowCount).fill(
30
- Array(o.columns.length).fill("")
31
- )), $ = s(() => o.isLoading ? [...o.rows, ...H.value] : o.rows), { list: R, containerProps: i, wrapperProps: b, scrollTo: k } = q(
32
- $,
29
+ }), g = s(() => !!S.expanded), A = c(null), x = c(null), R = s(() => Array(e.loadingRowCount).fill(
30
+ Array(e.columns.length).fill("")
31
+ )), H = s(() => e.rows.length && Array.isArray(e.rows[0]) ? e.isLoading ? [...e.rows, ...R.value] : e.rows : e.isLoading ? [
32
+ ...e.rows.map((o) => o[e.rowDataKey]),
33
+ ...R.value
34
+ ] : e.rows.map((o) => o[e.rowDataKey])), { list: T, containerProps: l, wrapperProps: $, scrollTo: b } = q(
35
+ H,
33
36
  {
34
- itemHeight: g.value ? (t) => w[t] ?? o.rowHeight : o.rowHeight
37
+ itemHeight: g.value ? (t) => w[t] ?? e.rowHeight : e.rowHeight
35
38
  }
36
- ), B = c(null), h = c(0), I = s(() => !!m.search), O = (t) => {
37
- i.onScroll(), h.value = t.target.scrollLeft + t.target.getBoundingClientRect().width, a("onScroll", t.target.scrollTop);
39
+ ), 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
41
  };
39
42
  V(() => {
40
- h.value = i.ref.value?.getBoundingClientRect().width, o.defaultScrollPosition && setTimeout(() => {
41
- i.ref.value?.scrollTo({
42
- top: o.defaultScrollPosition,
43
+ h.value = l.ref.value?.getBoundingClientRect().width, e.defaultScrollPosition && setTimeout(() => {
44
+ l.ref.value?.scrollTo({
45
+ top: e.defaultScrollPosition,
43
46
  behavior: "smooth"
44
47
  });
45
48
  }, 300);
46
49
  });
47
- const P = s(() => {
48
- const [t] = R.value;
50
+ const O = s(() => {
51
+ const [t] = T.value;
49
52
  return t && t.index > 0;
50
- }), A = s(() => i.style), E = s(() => o.columns.reduce((t, e) => (e.isSticky && (t[e.id] = _(e)), t), {}));
53
+ }), P = s(() => l.style), L = s(() => e.columns.reduce((t, o) => (o.isSticky && (t[o.id] = M(o)), t), {}));
51
54
  F(
52
- i.ref,
55
+ l.ref,
53
56
  () => {
54
- o.isInfiniteScroll && a("loadMore");
57
+ e.isInfiniteScroll && u("loadMore");
55
58
  },
56
- { distance: o.infiniteScrollThreshold }
59
+ { distance: e.infiniteScrollThreshold }
57
60
  );
58
- function L() {
59
- i.ref.value?.scrollTo({
61
+ function E() {
62
+ l.ref.value?.scrollTo({
60
63
  top: 0,
61
64
  behavior: "smooth"
62
65
  });
63
66
  }
64
- function M(t) {
65
- if (!o.sort)
67
+ function D(t) {
68
+ if (!e.sort)
66
69
  return;
67
- const e = o.sort.sortBy === t.id;
70
+ const o = e.sort.sortBy === t.id;
68
71
  if (!(t.isSortable || t.isSortable === void 0))
69
72
  return;
70
- let l = o.sort.sortOrder, f = o.sort.sortBy;
71
- e ? l = o.sort.sortOrder === "asc" ? "desc" : "asc" : f = t.id, a("update:sort", { sortBy: f, sortOrder: l });
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 });
72
75
  }
73
- function _(t) {
74
- const { isSticky: e, width: n } = t;
75
- if (!e || !n)
76
+ function M(t) {
77
+ const { isSticky: o, width: n } = t;
78
+ if (!o || !n)
76
79
  return null;
77
- const l = o.columns.findIndex((r) => r.id === t.id), f = o.columns.reduce((r, v, S) => S < l ? r + v.width : r, 0), G = o.columns.reduce((r, v, S) => S > l ? r + v.width : r, 0);
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
81
  return {
79
- ...t.isStickyRight ? { right: `${G}px` } : { left: `${f}px` },
82
+ ...t.isStickyRight ? { right: `${z}px` } : { left: `${f}px` },
80
83
  zIndex: 1
81
84
  };
82
85
  }
83
- const d = c([]), w = {}, D = (t) => d.value.includes(t), W = async (t, e) => {
86
+ const d = c([]), w = {}, _ = (t) => d.value.includes(t), K = async (t, o) => {
84
87
  const n = d.value.indexOf(t);
85
88
  if (n === -1) {
86
89
  d.value.push(t);
87
- const l = e.target.closest("tr");
88
- await j(), l && (w[t] = l.offsetHeight);
90
+ const i = o.target.closest("tr");
91
+ await j(), i && (w[t] = i.offsetHeight);
89
92
  } else
90
93
  d.value.splice(n, 1), delete w[t];
91
- }, X = s(() => `${o.rowHeight}px`), z = s(
92
- () => `1 / span ${o.columns.length + 1}`
94
+ }, W = s(() => `${e.rowHeight}px`), X = s(
95
+ () => `1 / span ${e.columns.length + 1}`
93
96
  );
94
97
  return {
95
- list: R,
96
- containerProps: i,
97
- wrapperProps: b,
98
- activeRow: y,
99
- gridColumnTemplate: T,
100
- floatingActionRef: B,
101
- scrollToTop: L,
102
- toggleSortOrder: M,
103
- columnsStickyPositions: E,
104
- hasSearchSlot: I,
105
- showBackToTopButton: P,
106
- containerStyle: A,
107
- onScroll: O,
108
- scrollTo: k,
109
- savingRows: u,
98
+ list: T,
99
+ containerProps: l,
100
+ wrapperProps: $,
101
+ activeRow: A,
102
+ gridColumnTemplate: C,
103
+ floatingActionRef: k,
104
+ scrollToTop: E,
105
+ toggleSortOrder: D,
106
+ columnsStickyPositions: L,
107
+ hasSearchSlot: B,
108
+ showBackToTopButton: O,
109
+ containerStyle: P,
110
+ onScroll: I,
111
+ scrollTo: b,
112
+ savingRows: a,
110
113
  floatingActionPosition: h,
111
114
  hasExpandSlot: g,
112
- hasCheckboxes: x,
113
- toggleExpandRow: W,
114
- isRowExpanded: D,
115
- cssRowHeight: X,
116
- cssExpandGridCol: z,
117
- activeMenuRow: C
115
+ hasCheckboxes: y,
116
+ toggleExpandRow: K,
117
+ isRowExpanded: _,
118
+ cssRowHeight: W,
119
+ cssExpandGridCol: X,
120
+ activeMenuRow: x
118
121
  };
119
122
  };
120
123
  export {
@@ -25,6 +25,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
25
25
  searchPlaceholder?: string;
26
26
  searchAutoFocus?: boolean;
27
27
  zIndexBase?: number;
28
+ rowCustomClassKey?: string;
29
+ rowDataKey?: string;
28
30
  }>, {
29
31
  title: string;
30
32
  sort: any;
@@ -49,6 +51,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
49
51
  searchPlaceholder: string;
50
52
  searchAutoFocus: boolean;
51
53
  zIndexBase: number;
54
+ rowCustomClassKey: string;
55
+ rowDataKey: string;
52
56
  }>, {
53
57
  scrollTo: (index: number) => void;
54
58
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -93,6 +97,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
93
97
  searchPlaceholder?: string;
94
98
  searchAutoFocus?: boolean;
95
99
  zIndexBase?: number;
100
+ rowCustomClassKey?: string;
101
+ rowDataKey?: string;
96
102
  }>, {
97
103
  title: string;
98
104
  sort: any;
@@ -117,6 +123,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
117
123
  searchPlaceholder: string;
118
124
  searchAutoFocus: boolean;
119
125
  zIndexBase: number;
126
+ rowCustomClassKey: string;
127
+ rowDataKey: string;
120
128
  }>>> & {
121
129
  onSelectAll?: (value: boolean) => any;
122
130
  "onUpdate:search"?: (query: string) => any;
@@ -157,6 +165,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
157
165
  selectedMatcher: (rowId: unknown, selected: unknown) => boolean;
158
166
  emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
159
167
  zIndexBase: number;
168
+ rowCustomClassKey: string;
169
+ rowDataKey: string;
160
170
  }>, Partial<Record<`section-${string}`, (_: {}) => any>> & Partial<Record<`header-${string}`, (_: {
161
171
  column: Column;
162
172
  }) => any>> & Partial<Record<`cell-${string}`, (_: {
@@ -175,10 +185,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
175
185
  row: import("@vueuse/core").UseVirtualListItem<Row>;
176
186
  gridColumnTemplate: any;
177
187
  }): any;
178
- "floating-row"?(_: {
179
- row: import("@vueuse/core").UseVirtualListItem<Row>;
180
- rowIndex: number;
181
- }): any;
182
188
  "empty-state"?(_: {}): any;
183
189
  footer?(_: {}): any;
184
190
  }>;
@@ -1,7 +1,7 @@
1
1
  import o from "./DataGrid.vue2.js";
2
- /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DataGrid.vue_vue_type_style_index_0_scoped_706b324e_lang.css"; //*');
4
- const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-706b324e"]]);
2
+ /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../DataGrid.vue_vue_type_style_index_0_scoped_7524407f_lang.css"; //*');
4
+ const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-7524407f"]]);
5
5
  export {
6
6
  a as default
7
7
  };