@ironsource/shared-ui 2.1.3-rc.1 → 2.1.3-rc.10

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 (123) hide show
  1. package/Alert.vue_vue_type_style_index_0_scoped_203b6bd1_lang.css +1 -0
  2. package/AppHeader.vue_vue_type_style_index_0_scoped_95908b8d_lang.css +1 -0
  3. package/CardPanel.vue_vue_type_style_index_0_scoped_7d0acb11_lang.css +1 -0
  4. package/CheckboxV4.vue_vue_type_style_index_0_scoped_d25514d1_lang.css +1 -0
  5. package/DataGrid.vue_vue_type_style_index_0_scoped_4baf9e57_lang.css +1 -0
  6. package/DataGridMenu.vue_vue_type_style_index_0_scoped_13f1ce76_lang.css +1 -0
  7. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_06751538_lang.css +1 -0
  8. package/EditableV4.vue_vue_type_style_index_0_scoped_31bfb722_lang.css +1 -0
  9. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_24001caa_lang.css +1 -0
  10. package/FieldLabel.vue_vue_type_style_index_0_scoped_5c2a70ad_lang.css +1 -0
  11. package/FieldMaxLength.vue_vue_type_style_index_0_scoped_f3c4001a_lang.css +1 -0
  12. package/FormCard.vue_vue_type_style_index_0_scoped_276bd901_lang.css +1 -0
  13. package/FormRow.vue_vue_type_style_index_0_scoped_c5265707_lang.css +1 -0
  14. package/InlineCopy.vue_vue_type_style_index_0_scoped_2a9e8782_lang.css +1 -0
  15. package/RadioButtonV4.vue_vue_type_style_index_0_scoped_cb3a12c6_lang.css +1 -0
  16. package/TextArea.vue_vue_type_style_index_0_scoped_eb62e4c0_lang.css +1 -0
  17. package/TextAreaV4.vue_vue_type_style_index_0_scoped_0336a92f_lang.css +1 -0
  18. package/TextField.vue_vue_type_style_index_0_scoped_dca4c102_lang.css +1 -0
  19. package/components/alert/Alert.vue.d.ts +68 -0
  20. package/components/alert/Alert.vue.js +7 -0
  21. package/components/alert/Alert.vue2.js +86 -0
  22. package/components/alert/index.d.ts +82 -0
  23. package/components/alert/index.js +6 -0
  24. package/components/appHeader/AppHeader.vue.js +3 -3
  25. package/components/appHeader/AppHeader.vue2.js +41 -35
  26. package/components/button/v3/Button.vue.d.ts +6 -6
  27. package/components/button/v3/ButtonBase.vue.d.ts +1 -1
  28. package/components/button/v3/IconButton.vue.d.ts +1 -1
  29. package/components/button/v3/index.d.ts +34 -34
  30. package/components/button/v4/ButtonV4.vue.d.ts +1 -1
  31. package/components/button/v4/IconButtonV4.vue.d.ts +1 -1
  32. package/components/button/v4/index.d.ts +40 -40
  33. package/components/checkbox/v4/CheckboxV4.vue.js +4 -4
  34. package/components/checkbox/v4/CheckboxV4.vue2.js +2 -2
  35. package/components/checkbox/v4/icons/UncheckedDisabledState.vue.js +11 -12
  36. package/components/checkbox/v4/icons/UncheckedState.vue.js +12 -11
  37. package/components/dialog/v4/index.d.ts +1 -1
  38. package/components/dropdown/common/Dropdown.common.js +93 -92
  39. package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
  40. package/components/emptyState/v3/index.d.ts +7 -7
  41. package/components/emptyState/v4/EmptyStateV4.vue.d.ts +15 -0
  42. package/components/emptyState/v4/EmptyStateV4.vue.js +3 -3
  43. package/components/emptyState/v4/EmptyStateV4.vue2.js +41 -27
  44. package/components/emptyState/v4/index.d.ts +58 -1
  45. package/components/forms/CardPanel.vue.d.ts +20 -0
  46. package/components/forms/CardPanel.vue.js +2 -2
  47. package/components/forms/CardPanel.vue2.js +26 -14
  48. package/components/forms/FormCard.vue.d.ts +5 -0
  49. package/components/forms/FormCard.vue.js +3 -3
  50. package/components/forms/FormCard.vue2.js +62 -36
  51. package/components/forms/FormRow.vue.d.ts +10 -0
  52. package/components/forms/FormRow.vue.js +3 -3
  53. package/components/forms/FormRow.vue2.js +22 -29
  54. package/components/forms/index.d.ts +136 -3
  55. package/components/inlineCopy/InlineCopy.vue.js +2 -2
  56. package/components/inlineCopy/InlineCopy.vue2.js +2 -2
  57. package/components/input/v4/TextField.vue.d.ts +1 -1
  58. package/components/input/v4/TextField.vue.js +3 -3
  59. package/components/input/v4/TextField.vue2.js +83 -90
  60. package/components/input/v4/index.d.ts +20 -20
  61. package/components/radioButton/v4/RadioButtonV4.vue.js +4 -4
  62. package/components/radioButton/v4/RadioButtonV4.vue2.js +1 -1
  63. package/components/search/v3/Search.vue.d.ts +1 -1
  64. package/components/search/v3/index.d.ts +9 -9
  65. package/components/shared/FieldLabel.vue.d.ts +5 -0
  66. package/components/shared/FieldLabel.vue.js +3 -3
  67. package/components/shared/FieldLabel.vue2.js +63 -46
  68. package/components/shared/FieldMaxLength.vue.d.ts +34 -0
  69. package/components/shared/FieldMaxLength.vue.js +7 -0
  70. package/components/shared/FieldMaxLength.vue2.js +24 -0
  71. package/components/skeleton/v4/index.d.ts +2 -2
  72. package/components/snackbar/v4/SnackbarV4.vue.d.ts +12 -12
  73. package/components/table/common/Table.common.d.ts +1 -0
  74. package/components/table/common/Table.common.js +64 -60
  75. package/components/table/common/TableContext.d.ts +1 -0
  76. package/components/table/v4/DataGrid.vue.js +4 -4
  77. package/components/table/v4/DataGrid.vue2.js +71 -69
  78. package/components/table/v4/DataGridMenu.vue.d.ts +5 -5
  79. package/components/table/v4/DataGridMenu.vue.js +4 -4
  80. package/components/table/v4/DataGridMenu.vue2.js +46 -47
  81. package/components/table/v4/DataGridRowsCounter.vue.d.ts +15 -0
  82. package/components/table/v4/DataGridRowsCounter.vue.js +3 -3
  83. package/components/table/v4/DataGridRowsCounter.vue2.js +22 -19
  84. package/components/table/v4/index.d.ts +32 -5
  85. package/components/table-cells/common/Editable.common.js +15 -15
  86. package/components/table-cells/v4/EditableV4.vue.d.ts +10 -0
  87. package/components/table-cells/v4/EditableV4.vue.js +3 -3
  88. package/components/table-cells/v4/EditableV4.vue2.js +31 -22
  89. package/components/table-cells/v4/index.d.ts +43 -1
  90. package/components/tabs/v3/Tabs.vue.d.ts +1 -1
  91. package/components/tabs/v3/index.d.ts +20 -20
  92. package/components/textArea/v3/TextArea.vue.js +7 -0
  93. package/components/textArea/{TextArea.vue2.js → v3/TextArea.vue2.js} +4 -4
  94. package/components/textArea/v4/TextAreaV4.vue.d.ts +100 -0
  95. package/components/textArea/v4/TextAreaV4.vue.js +7 -0
  96. package/components/textArea/v4/TextAreaV4.vue2.js +74 -0
  97. package/components/textArea/v4/index.d.ts +136 -0
  98. package/components/textArea/v4/index.js +6 -0
  99. package/components/typography/index.d.ts +12 -12
  100. package/index.d.ts +661 -141
  101. package/index.js +113 -109
  102. package/package.json +7 -2
  103. package/testids/index.d.ts +7 -0
  104. package/testids/index.js +26 -25
  105. package/AppHeader.vue_vue_type_style_index_0_scoped_209ecc03_lang.css +0 -1
  106. package/CardPanel.vue_vue_type_style_index_0_scoped_d2b5d12f_lang.css +0 -1
  107. package/CheckboxV4.vue_vue_type_style_index_0_scoped_ee3e6d82_lang.css +0 -1
  108. package/DataGrid.vue_vue_type_style_index_0_scoped_d5635f1b_lang.css +0 -1
  109. package/DataGridMenu.vue_vue_type_style_index_0_scoped_92d83650_lang.css +0 -1
  110. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_9e366543_lang.css +0 -1
  111. package/EditableV4.vue_vue_type_style_index_0_scoped_df325b51_lang.css +0 -1
  112. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_b8373c2d_lang.css +0 -1
  113. package/FieldLabel.vue_vue_type_style_index_0_scoped_526af548_lang.css +0 -1
  114. package/FormCard.vue_vue_type_style_index_0_scoped_ad5e4be0_lang.css +0 -1
  115. package/FormRow.vue_vue_type_style_index_0_scoped_017dc22e_lang.css +0 -1
  116. package/InlineCopy.vue_vue_type_style_index_0_scoped_2f0a0202_lang.css +0 -1
  117. package/RadioButtonV4.vue_vue_type_style_index_0_scoped_14be812e_lang.css +0 -1
  118. package/TextArea.vue_vue_type_style_index_0_scoped_889b62ac_lang.css +0 -1
  119. package/TextField.vue_vue_type_style_index_0_scoped_473bab9b_lang.css +0 -1
  120. package/components/textArea/TextArea.vue.js +0 -7
  121. /package/components/textArea/{TextArea.vue.d.ts → v3/TextArea.vue.d.ts} +0 -0
  122. /package/components/textArea/{index.d.ts → v3/index.d.ts} +0 -0
  123. /package/components/textArea/{index.js → v3/index.js} +0 -0
@@ -1,13 +1,17 @@
1
- import "../../FieldLabel.vue_vue_type_style_index_0_scoped_526af548_lang.css"; import { defineComponent as c, openBlock as r, createElementBlock as u, mergeProps as o, unref as e, createVNode as n, withCtx as d, createTextVNode as s, toDisplayString as p, createBlock as i, createCommentVNode as m } from "vue";
2
- import T from "../icon/v3/Icon.vue.js";
3
- import b from "../tooltip/v4/TooltipV4.vue.js";
4
- import f from "../typography/v4/Typography.vue.js";
1
+ import "../../FieldLabel.vue_vue_type_style_index_0_scoped_5c2a70ad_lang.css"; import { defineComponent as p, openBlock as o, createElementBlock as m, Fragment as T, createElementVNode as b, mergeProps as d, unref as e, createVNode as r, withCtx as i, createTextVNode as n, toDisplayString as f, createBlock as u, createCommentVNode as s } from "vue";
2
+ import h from "../icon/v3/Icon.vue.js";
3
+ import y from "../tooltip/v4/TooltipV4.vue.js";
4
+ import c from "../typography/v4/Typography.vue.js";
5
5
  import { FieldLabelTestIdModifiers as a } from "../../testids/index.js";
6
- import { useTestIdAttrs as x } from "../../utils/testIds.js";
7
- const H = /* @__PURE__ */ c({
6
+ import { useTestIdAttrs as v } from "../../utils/testIds.js";
7
+ const x = {
8
+ key: 0,
9
+ class: "description"
10
+ }, L = /* @__PURE__ */ p({
8
11
  __name: "FieldLabel",
9
12
  props: {
10
13
  label: { default: "" },
14
+ description: { default: "" },
11
15
  mandatory: { type: Boolean, default: !1 },
12
16
  disabled: { type: Boolean, default: !1 },
13
17
  hoverHelpText: { default: "" },
@@ -15,47 +19,60 @@ const H = /* @__PURE__ */ c({
15
19
  testId: { default: "" }
16
20
  },
17
21
  setup(t) {
18
- const l = x(t.testId, a);
19
- return (y, v) => (r(), u("div", o({
20
- class: ["field-label", { "field-label--disabled": t.disabled }]
21
- }, e(l)[e(a).CONTAINER]), [
22
- n(e(f), o({
23
- class: "label",
24
- variant: "inputLabel"
25
- }, e(l)[e(a).TEXT]), {
26
- default: d(() => [
27
- s(p(t.label), 1)
28
- ]),
29
- _: 1
30
- }, 16),
31
- t.mandatory ? (r(), i(e(f), o({
32
- key: 0,
33
- variant: "h3",
34
- class: "mandatory"
35
- }, e(l)[e(a).MANDATORY]), {
36
- default: d(() => [
37
- s("*")
38
- ]),
39
- _: 1
40
- }, 16)) : m("", !0),
41
- t.hoverHelpText ? (r(), i(e(b), o({
42
- key: 1,
43
- triggers: ["hover"],
44
- text: t.hoverHelpText,
45
- placement: t.hoverHelpTextPlacement
46
- }, e(l)[e(a).TOOLTIP], { "test-id": t.testId }), {
47
- default: d(() => [
48
- n(e(T), {
49
- class: "info-icon",
50
- name: "question",
51
- "font-size": "sm"
52
- })
53
- ]),
54
- _: 1
55
- }, 16, ["text", "placement", "test-id"])) : m("", !0)
56
- ], 16));
22
+ const l = v(t.testId, a);
23
+ return (N, g) => (o(), m(T, null, [
24
+ b("div", d({
25
+ class: ["field-label", {
26
+ "field-label--disabled": t.disabled,
27
+ "field-label--with-description": !!t.description
28
+ }]
29
+ }, e(l)[e(a).CONTAINER]), [
30
+ r(e(c), d({
31
+ class: "label",
32
+ variant: "inputLabel"
33
+ }, e(l)[e(a).TEXT]), {
34
+ default: i(() => [
35
+ n(f(t.label), 1)
36
+ ]),
37
+ _: 1
38
+ }, 16),
39
+ t.mandatory ? (o(), u(e(c), d({
40
+ key: 0,
41
+ variant: "h3",
42
+ class: "mandatory"
43
+ }, e(l)[e(a).MANDATORY]), {
44
+ default: i(() => [
45
+ n("*")
46
+ ]),
47
+ _: 1
48
+ }, 16)) : s("", !0),
49
+ t.hoverHelpText ? (o(), u(e(y), d({
50
+ key: 1,
51
+ triggers: ["hover"],
52
+ text: t.hoverHelpText,
53
+ placement: t.hoverHelpTextPlacement
54
+ }, e(l)[e(a).TOOLTIP], { "test-id": t.testId }), {
55
+ default: i(() => [
56
+ r(e(h), {
57
+ class: "info-icon",
58
+ name: "question",
59
+ "font-size": "sm"
60
+ })
61
+ ]),
62
+ _: 1
63
+ }, 16, ["text", "placement", "test-id"])) : s("", !0)
64
+ ], 16),
65
+ t.description ? (o(), m("div", x, [
66
+ r(e(c), { variant: "body2" }, {
67
+ default: i(() => [
68
+ n(f(t.description), 1)
69
+ ]),
70
+ _: 1
71
+ })
72
+ ])) : s("", !0)
73
+ ], 64));
57
74
  }
58
75
  });
59
76
  export {
60
- H as default
77
+ L as default
61
78
  };
@@ -0,0 +1,34 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
+ currentLength: number;
3
+ maxLength?: number;
4
+ }>, {
5
+ currentLength: number;
6
+ maxLength: number;
7
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
8
+ currentLength: number;
9
+ maxLength?: number;
10
+ }>, {
11
+ currentLength: number;
12
+ maxLength: number;
13
+ }>>>, {
14
+ currentLength: number;
15
+ maxLength: number;
16
+ }>;
17
+ export default _default;
18
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
19
+ type __VLS_TypePropsToRuntimeProps<T> = {
20
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
21
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
22
+ } : {
23
+ type: import('vue').PropType<T[K]>;
24
+ required: true;
25
+ };
26
+ };
27
+ type __VLS_WithDefaults<P, D> = {
28
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
29
+ default: D[K];
30
+ }> : P[K];
31
+ };
32
+ type __VLS_Prettify<T> = {
33
+ [K in keyof T]: T[K];
34
+ } & {};
@@ -0,0 +1,7 @@
1
+ import e from "./FieldMaxLength.vue2.js";
2
+ /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../FieldMaxLength.vue_vue_type_style_index_0_scoped_f3c4001a_lang.css"; //*');
4
+ const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-f3c4001a"]]);
5
+ export {
6
+ a as default
7
+ };
@@ -0,0 +1,24 @@
1
+ import "../../FieldMaxLength.vue_vue_type_style_index_0_scoped_f3c4001a_lang.css"; import { defineComponent as n, openBlock as o, createElementBlock as c, createVNode as r, unref as d, withCtx as p, createTextVNode as t, toDisplayString as a, pushScopeId as i, popScopeId as s, createElementVNode as h } from "vue";
2
+ import l from "../typography/v4/Typography.vue.js";
3
+ const m = (e) => (i("data-v-f3c4001a"), e = e(), s(), e), _ = { class: "max-length" }, u = /* @__PURE__ */ m(() => /* @__PURE__ */ h("span", { class: "max-length__divider" }, "/", -1)), v = /* @__PURE__ */ n({
4
+ __name: "FieldMaxLength",
5
+ props: {
6
+ currentLength: { default: 0 },
7
+ maxLength: { default: 100 }
8
+ },
9
+ setup(e) {
10
+ return (f, g) => (o(), c("div", _, [
11
+ r(d(l), { variant: "caption" }, {
12
+ default: p(() => [
13
+ t(a(e.currentLength) + " ", 1),
14
+ u,
15
+ t(" " + a(e.maxLength), 1)
16
+ ]),
17
+ _: 1
18
+ })
19
+ ]));
20
+ }
21
+ });
22
+ export {
23
+ v as default
24
+ };
@@ -1,3 +1,4 @@
1
+ import Skeleton from './SkeletonV4.vue';
1
2
  declare const SkeletonTypes: () => ({
2
3
  new (...args: any[]): {
3
4
  $: import("vue").ComponentInternalInstance;
@@ -90,5 +91,4 @@ declare const SkeletonTypes: () => ({
90
91
  default?(_: {}): any;
91
92
  };
92
93
  }))[];
93
- export { default as Skeleton } from './SkeletonV4.vue';
94
- export { SkeletonTypes };
94
+ export { SkeletonTypes, Skeleton };
@@ -16,10 +16,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
16
16
  title?: string;
17
17
  zIndex?: number;
18
18
  actionButtons: (Partial<{
19
+ variant: "text" | "contained" | "outlined";
19
20
  disabled: boolean;
20
21
  size: "small" | "medium" | "large" | "extraLarge";
21
22
  color: "default" | "primary" | "danger" | "info" | "success" | "warning";
22
- variant: "text" | "contained" | "outlined";
23
23
  content: string;
24
24
  loading: boolean;
25
25
  testId: string;
@@ -28,6 +28,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
28
28
  startIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
29
29
  endIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
30
30
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
31
+ variant: {
32
+ type: import("vue").PropType<"text" | "contained" | "outlined">;
33
+ default: string;
34
+ };
31
35
  disabled: {
32
36
  type: import("vue").PropType<boolean>;
33
37
  default: boolean;
@@ -40,10 +44,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
40
44
  type: import("vue").PropType<"default" | "primary" | "danger" | "info" | "success" | "warning">;
41
45
  default: string;
42
46
  };
43
- variant: {
44
- type: import("vue").PropType<"text" | "contained" | "outlined">;
45
- default: string;
46
- };
47
47
  content: {
48
48
  type: import("vue").PropType<string>;
49
49
  default: string;
@@ -72,7 +72,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
72
72
  type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test">;
73
73
  default: string;
74
74
  };
75
- }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "size" | "color" | "variant" | "content" | "loading" | "testId" | "startIconName" | "endIconName" | "startIconType" | "endIconType">)[];
75
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "variant" | "disabled" | "size" | "color" | "content" | "loading" | "testId" | "startIconName" | "endIconName" | "startIconType" | "endIconType">)[];
76
76
  testId: string;
77
77
  }>, {
78
78
  type: string;
@@ -101,10 +101,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
101
101
  title?: string;
102
102
  zIndex?: number;
103
103
  actionButtons: (Partial<{
104
+ variant: "text" | "contained" | "outlined";
104
105
  disabled: boolean;
105
106
  size: "small" | "medium" | "large" | "extraLarge";
106
107
  color: "default" | "primary" | "danger" | "info" | "success" | "warning";
107
- variant: "text" | "contained" | "outlined";
108
108
  content: string;
109
109
  loading: boolean;
110
110
  testId: string;
@@ -113,6 +113,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
113
113
  startIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
114
114
  endIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test";
115
115
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
116
+ variant: {
117
+ type: import("vue").PropType<"text" | "contained" | "outlined">;
118
+ default: string;
119
+ };
116
120
  disabled: {
117
121
  type: import("vue").PropType<boolean>;
118
122
  default: boolean;
@@ -125,10 +129,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
125
129
  type: import("vue").PropType<"default" | "primary" | "danger" | "info" | "success" | "warning">;
126
130
  default: string;
127
131
  };
128
- variant: {
129
- type: import("vue").PropType<"text" | "contained" | "outlined">;
130
- default: string;
131
- };
132
132
  content: {
133
133
  type: import("vue").PropType<string>;
134
134
  default: string;
@@ -157,7 +157,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
157
157
  type: import("vue").PropType<"fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test">;
158
158
  default: string;
159
159
  };
160
- }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "size" | "color" | "variant" | "content" | "loading" | "testId" | "startIconName" | "endIconName" | "startIconType" | "endIconType">)[];
160
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "variant" | "disabled" | "size" | "color" | "content" | "loading" | "testId" | "startIconName" | "endIconName" | "startIconType" | "endIconType">)[];
161
161
  testId: string;
162
162
  }>, {
163
163
  type: string;
@@ -32,4 +32,5 @@ export declare const tableCommon: (props: any, emit: any) => {
32
32
  isRowExpanded: (rowIndex: number) => boolean;
33
33
  cssRowHeight: import("vue").ComputedRef<string>;
34
34
  cssExpandGridCol: import("vue").ComputedRef<string>;
35
+ activeMenuRow: import("vue").Ref<number>;
35
36
  };
@@ -1,114 +1,118 @@
1
- import { useSlots as z, ref as a, provide as G, computed as s, onMounted as K, nextTick as N } from "vue";
2
- import { useVirtualList as V, useInfiniteScroll as j } from "@vueuse/core";
3
- import { TableContext as q } from "./TableContext.js";
4
- const F = 46, J = 46, Z = (o, u) => {
5
- const v = z(), c = a([]);
6
- G(q, {
7
- onClose({ rowIndex: t, cellIndex: e, value: n } = {}) {
8
- n && (c.value = [...c.value, t], u("saveRow", {
1
+ import { useSlots as G, ref as c, provide as K, computed as l, onMounted as N, nextTick as V } from "vue";
2
+ import { useVirtualList as j, useInfiniteScroll as q } from "@vueuse/core";
3
+ import { TableContext as F } from "./TableContext.js";
4
+ const J = 46, Q = 46, p = (e, a) => {
5
+ const m = G(), u = c([]);
6
+ K(F, {
7
+ onClose({ rowIndex: t, cellIndex: o, value: n } = {}) {
8
+ n && (u.value = [...u.value, t], a("saveRow", {
9
9
  rowIndex: t,
10
- cellIndex: e,
10
+ cellIndex: o,
11
11
  value: n,
12
12
  confirm: () => {
13
- c.value = c.value.filter(
13
+ u.value = u.value.filter(
14
14
  (i) => i !== t
15
15
  );
16
16
  }
17
17
  }));
18
+ },
19
+ setActiveMenuRow(t) {
20
+ C.value = t;
18
21
  }
19
22
  });
20
- const x = s(() => !!o.selection), T = s(() => {
21
- const t = (x.value ? `${J}px ` : "") + (g.value ? `${F}px ` : "");
22
- return o.columns.reduce((e, n) => {
23
+ const x = l(() => !!e.selection), T = l(() => {
24
+ const t = (x.value ? `${Q}px ` : "") + (g.value ? `${J}px ` : "");
25
+ return e.columns.reduce((o, n) => {
23
26
  const i = n.width ? `${n.width}px` : `${n.colSpan || 1}fr`;
24
- return `${e} ${i}`;
27
+ return `${o} ${i}`;
25
28
  }, t);
26
- }), g = s(() => !!v.expanded), R = a(null), y = s(() => Array(o.loadingRowCount).fill(
27
- Array(o.columns.length).fill("")
28
- )), H = s(() => o.isLoading ? [...o.rows, ...y.value] : o.rows), { list: C, containerProps: l, wrapperProps: $ } = V(H, {
29
- itemHeight: g.value ? (t) => w[t] ?? o.rowHeight : o.rowHeight
30
- }), b = a(null), h = a(0), k = s(() => !!v.search), B = (t) => {
31
- l.onScroll(), h.value = t.target.scrollLeft + t.target.getBoundingClientRect().width, u("onScroll", t.target.scrollTop);
29
+ }), g = l(() => !!m.expanded), y = c(null), C = c(null), H = l(() => Array(e.loadingRowCount).fill(
30
+ Array(e.columns.length).fill("")
31
+ )), $ = l(() => e.isLoading ? [...e.rows, ...H.value] : e.rows), { list: R, containerProps: s, wrapperProps: b } = j($, {
32
+ itemHeight: g.value ? (t) => w[t] ?? e.rowHeight : e.rowHeight
33
+ }), k = c(null), h = c(0), B = l(() => !!m.search), I = (t) => {
34
+ s.onScroll(), h.value = t.target.scrollLeft + t.target.getBoundingClientRect().width, a("onScroll", t.target.scrollTop);
32
35
  };
33
- K(() => {
34
- h.value = l.ref.value?.getBoundingClientRect().width, o.defaultScrollPosition && setTimeout(() => {
35
- l.ref.value?.scrollTo({
36
- top: o.defaultScrollPosition,
36
+ N(() => {
37
+ h.value = s.ref.value?.getBoundingClientRect().width, e.defaultScrollPosition && setTimeout(() => {
38
+ s.ref.value?.scrollTo({
39
+ top: e.defaultScrollPosition,
37
40
  behavior: "smooth"
38
41
  });
39
42
  }, 300);
40
43
  });
41
- const I = s(() => {
42
- const [t] = C.value;
44
+ const O = l(() => {
45
+ const [t] = R.value;
43
46
  return t && t.index > 0;
44
- }), O = s(() => l.style), P = s(() => o.columns.reduce((t, e) => (e.isSticky && (t[e.id] = A(e)), t), {}));
45
- j(
46
- l.ref,
47
+ }), P = l(() => s.style), A = l(() => e.columns.reduce((t, o) => (o.isSticky && (t[o.id] = M(o)), t), {}));
48
+ q(
49
+ s.ref,
47
50
  () => {
48
- o.isInfiniteScroll && u("loadMore");
51
+ e.isInfiniteScroll && a("loadMore");
49
52
  },
50
- { distance: o.infiniteScrollThreshold }
53
+ { distance: e.infiniteScrollThreshold }
51
54
  );
52
55
  function E() {
53
- l.ref.value?.scrollTo({
56
+ s.ref.value?.scrollTo({
54
57
  top: 0,
55
58
  behavior: "smooth"
56
59
  });
57
60
  }
58
61
  function L(t) {
59
- if (!o.sort)
62
+ if (!e.sort)
60
63
  return;
61
- const e = o.sort.sortBy === t.id;
64
+ const o = e.sort.sortBy === t.id;
62
65
  if (!(t.isSortable || t.isSortable === void 0))
63
66
  return;
64
- let i = o.sort.sortOrder, f = o.sort.sortBy;
65
- e ? i = o.sort.sortOrder === "asc" ? "desc" : "asc" : f = t.id, u("update:sort", { sortBy: f, sortOrder: i });
67
+ let i = e.sort.sortOrder, f = e.sort.sortBy;
68
+ o ? i = e.sort.sortOrder === "asc" ? "desc" : "asc" : f = t.id, a("update:sort", { sortBy: f, sortOrder: i });
66
69
  }
67
- function A(t) {
68
- const { isSticky: e, width: n } = t;
69
- if (!e || !n)
70
+ function M(t) {
71
+ const { isSticky: o, width: n } = t;
72
+ if (!o || !n)
70
73
  return null;
71
- const i = o.columns.findIndex((r) => r.id === t.id), f = o.columns.reduce((r, S, m) => m < i ? r + S.width : r, 0), X = o.columns.reduce((r, S, m) => m > i ? r + S.width : r, 0);
74
+ const i = e.columns.findIndex((r) => r.id === t.id), f = e.columns.reduce((r, v, S) => S < i ? r + v.width : r, 0), z = e.columns.reduce((r, v, S) => S > i ? r + v.width : r, 0);
72
75
  return {
73
- ...t.isStickyRight ? { right: `${X}px` } : { left: `${f}px` },
76
+ ...t.isStickyRight ? { right: `${z}px` } : { left: `${f}px` },
74
77
  zIndex: 1
75
78
  };
76
79
  }
77
- const d = a([]), w = {}, _ = (t) => d.value.includes(t), D = async (t, e) => {
80
+ const d = c([]), w = {}, _ = (t) => d.value.includes(t), D = async (t, o) => {
78
81
  const n = d.value.indexOf(t);
79
82
  if (n === -1) {
80
83
  d.value.push(t);
81
- const i = e.target.closest("tr");
82
- await N(), i && (w[t] = i.offsetHeight);
84
+ const i = o.target.closest("tr");
85
+ await V(), i && (w[t] = i.offsetHeight);
83
86
  } else
84
87
  d.value.splice(n, 1), delete w[t];
85
- }, M = s(() => `${o.rowHeight}px`), W = s(
86
- () => `1 / span ${o.columns.length + 1}`
88
+ }, W = l(() => `${e.rowHeight}px`), X = l(
89
+ () => `1 / span ${e.columns.length + 1}`
87
90
  );
88
91
  return {
89
- list: C,
90
- containerProps: l,
91
- wrapperProps: $,
92
- activeRow: R,
92
+ list: R,
93
+ containerProps: s,
94
+ wrapperProps: b,
95
+ activeRow: y,
93
96
  gridColumnTemplate: T,
94
- floatingActionRef: b,
97
+ floatingActionRef: k,
95
98
  scrollToTop: E,
96
99
  toggleSortOrder: L,
97
- columnsStickyPositions: P,
98
- hasSearchSlot: k,
99
- showBackToTopButton: I,
100
- containerStyle: O,
101
- onScroll: B,
102
- savingRows: c,
100
+ columnsStickyPositions: A,
101
+ hasSearchSlot: B,
102
+ showBackToTopButton: O,
103
+ containerStyle: P,
104
+ onScroll: I,
105
+ savingRows: u,
103
106
  floatingActionPosition: h,
104
107
  hasExpandSlot: g,
105
108
  hasCheckboxes: x,
106
109
  toggleExpandRow: D,
107
110
  isRowExpanded: _,
108
- cssRowHeight: M,
109
- cssExpandGridCol: W
111
+ cssRowHeight: W,
112
+ cssExpandGridCol: X,
113
+ activeMenuRow: C
110
114
  };
111
115
  };
112
116
  export {
113
- Z as tableCommon
117
+ p as tableCommon
114
118
  };
@@ -6,6 +6,7 @@ export interface TableContextProps {
6
6
  value?: unknown;
7
7
  error?: string | boolean;
8
8
  }): void;
9
+ setActiveMenuRow?(rowIndex: number | null): void;
9
10
  }
10
11
  export declare const TableContext: InjectionKey<TableContextProps>;
11
12
  export declare function useTableContext(component: string): TableContextProps;
@@ -1,7 +1,7 @@
1
1
  import o from "./DataGrid.vue2.js";
2
- /* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DataGrid.vue_vue_type_style_index_0_scoped_d5635f1b_lang.css"; //*');
4
- const a = /* @__PURE__ */ _(o, [["__scopeId", "data-v-d5635f1b"]]);
2
+ /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../DataGrid.vue_vue_type_style_index_0_scoped_4baf9e57_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-4baf9e57"]]);
5
5
  export {
6
- a as default
6
+ s as default
7
7
  };