@ironsource/shared-ui 2.1.7-rc.10 → 2.1.7-rc.12

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 (45) hide show
  1. package/DataGrid.vue_vue_type_style_index_0_scoped_706b324e_lang.css +1 -0
  2. package/EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_lang.css +1 -0
  3. package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_82ba0e12_lang.css +1 -0
  4. package/SortableList.vue_vue_type_style_index_0_scoped_402063dc_lang.css +1 -0
  5. package/TextField.vue_vue_type_style_index_0_scoped_4d9bf5b2_lang.css +1 -0
  6. package/ThemeWrapper.vue_vue_type_style_index_0_scoped_66bd448a_lang.css +1 -0
  7. package/components/ThemeWrapper/ThemeWrapper.vue.js +2 -2
  8. package/components/ThemeWrapper/ThemeWrapper.vue2.js +8 -8
  9. package/components/dropdown/v3/Dropdown.vue.d.ts +1 -1
  10. package/components/dropdown/v3/index.d.ts +20 -20
  11. package/components/dropdown/v4/DropdownV4.vue.d.ts +1 -1
  12. package/components/dropdown/v4/index.d.ts +20 -20
  13. package/components/input/v4/TextField.vue.js +3 -3
  14. package/components/input/v4/TextField.vue2.js +1 -1
  15. package/components/menu/Menu.vue.d.ts +1 -1
  16. package/components/menu/index.d.ts +16 -16
  17. package/components/sortableList/SortableList.vue.d.ts +17 -0
  18. package/components/sortableList/SortableList.vue.js +3 -3
  19. package/components/sortableList/SortableList.vue2.js +122 -86
  20. package/components/sortableList/index.d.ts +60 -1
  21. package/components/table/v3/Table.vue.d.ts +2 -2
  22. package/components/table/v3/index.d.ts +39 -39
  23. package/components/table/v4/DataGrid.vue.d.ts +6 -2
  24. package/components/table/v4/DataGrid.vue.js +4 -4
  25. package/components/table/v4/DataGrid.vue2.js +131 -122
  26. package/components/table/v4/MultipleDataGrid.vue.d.ts +16 -3
  27. package/components/table/v4/MultipleDataGrid.vue.js +5 -5
  28. package/components/table/v4/MultipleDataGrid.vue2.js +112 -69
  29. package/components/table/v4/index.d.ts +92 -75
  30. package/components/table-cells/common/Editable.common.js +37 -26
  31. package/components/table-cells/common/EditableContext.d.ts +1 -0
  32. package/components/table-cells/v4/EditableV4.vue.d.ts +5 -0
  33. package/components/table-cells/v4/EditableV4.vue.js +5 -5
  34. package/components/table-cells/v4/EditableV4.vue2.js +18 -17
  35. package/components/table-cells/v4/index.d.ts +20 -1
  36. package/components/tooltip/v4/TooltipV4.vue.d.ts +1 -1
  37. package/components/tooltip/v4/index.d.ts +20 -20
  38. package/index.d.ts +502 -312
  39. package/package.json +1 -1
  40. package/DataGrid.vue_vue_type_style_index_0_scoped_63aaf3be_lang.css +0 -1
  41. package/EditableV4.vue_vue_type_style_index_0_scoped_31bfb722_lang.css +0 -1
  42. package/MultipleDataGrid.vue_vue_type_style_index_0_scoped_1bdca43d_lang.css +0 -1
  43. package/SortableList.vue_vue_type_style_index_0_scoped_21842d59_lang.css +0 -1
  44. package/TextField.vue_vue_type_style_index_0_scoped_eb472aa3_lang.css +0 -1
  45. package/ThemeWrapper.vue_vue_type_style_index_0_scoped_1cff50cb_lang.css +0 -1
@@ -1,39 +1,50 @@
1
- import { ref as a, provide as v } from "vue";
2
- import { useTableContext as s } from "../../table/common/TableContext.js";
3
- import { EditableContext as d } from "./EditableContext.js";
4
- import { onClickOutside as f } from "@vueuse/core";
5
- const g = (e) => {
6
- const l = a(!1), n = a(e.cell), u = a(null), r = s("Editable"), o = a(null);
7
- v(d, {
1
+ import { ref as t, provide as d } from "vue";
2
+ import { useTableContext as f } from "../../table/common/TableContext.js";
3
+ import { EditableContext as C } from "./EditableContext.js";
4
+ import { onClickOutside as m } from "@vueuse/core";
5
+ const k = (e) => {
6
+ const l = t(!1), n = t(e.cell), o = t(e.saveOnClickOutside), i = t(null), r = f("Editable"), a = t(null), v = () => {
7
+ if (e.cell === n.value) {
8
+ l.value = !1;
9
+ return;
10
+ }
11
+ const u = e.validateFunction?.(n.value);
12
+ a.value = u, !u && (r.onClose({
13
+ rowIndex: e.rowIndex,
14
+ cellIndex: e.cellIndex,
15
+ value: n.value
16
+ }), l.value = !1);
17
+ };
18
+ d(C, {
8
19
  focusable: !0,
9
20
  value: n,
10
- error: o,
21
+ error: a,
11
22
  confirmable: !0,
12
- onChange(t) {
13
- n.value = t, o.value = e.validateFunction?.(n.value);
23
+ saveOnClickOutside: o.value,
24
+ onChange(u) {
25
+ n.value = u, a.value = e.validateFunction?.(n.value);
14
26
  },
15
- onClose: () => {
16
- const t = e.validateFunction?.(n.value);
17
- o.value = t, !t && (r.onClose({
18
- rowIndex: e.rowIndex,
19
- cellIndex: e.cellIndex,
20
- value: n.value
21
- }), l.value = !1);
22
- }
27
+ onClose: v
23
28
  });
24
- const i = () => {
29
+ const c = () => {
25
30
  l.value || e.isLoading || (l.value = !l.value);
26
- }, c = () => {
27
- n.value = e.cell, o.value = null;
31
+ }, s = () => {
32
+ n.value = e.cell, a.value = null;
28
33
  };
29
- return f(u, () => {
30
- l.value = !1, c(), r.onClose();
34
+ return m(i, () => {
35
+ if (l.value) {
36
+ if (o.value) {
37
+ v();
38
+ return;
39
+ }
40
+ l.value = !1, s(), r.onClose();
41
+ }
31
42
  }), {
32
- onEdit: i,
33
- target: u,
43
+ onEdit: c,
44
+ target: i,
34
45
  isEditing: l
35
46
  };
36
47
  };
37
48
  export {
38
- g as editableCommon
49
+ k as editableCommon
39
50
  };
@@ -6,6 +6,7 @@ export interface EditableContextProps {
6
6
  error?: Ref<string>;
7
7
  value?: Ref<unknown>;
8
8
  confirmable?: boolean;
9
+ saveOnClickOutside?: boolean;
9
10
  }
10
11
  export declare const EditableContext: InjectionKey<EditableContextProps>;
11
12
  export declare function useEditableContext(): EditableContextProps;
@@ -4,12 +4,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
4
4
  rowIndex: number;
5
5
  cellIndex: number;
6
6
  type: "input" | "dropdown";
7
+ saveOnClickOutside?: boolean;
7
8
  validateFunction?: (value: unknown) => string | boolean;
8
9
  displayValue?: (option: unknown) => unknown;
9
10
  }>, {
10
11
  cell: string;
11
12
  isLoading: boolean;
12
13
  type: string;
14
+ saveOnClickOutside: boolean;
13
15
  validateFunction: () => false;
14
16
  displayValue: (cell: unknown) => unknown;
15
17
  }>, {}, 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<{
@@ -18,17 +20,20 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
18
20
  rowIndex: number;
19
21
  cellIndex: number;
20
22
  type: "input" | "dropdown";
23
+ saveOnClickOutside?: boolean;
21
24
  validateFunction?: (value: unknown) => string | boolean;
22
25
  displayValue?: (option: unknown) => unknown;
23
26
  }>, {
24
27
  cell: string;
25
28
  isLoading: boolean;
26
29
  type: string;
30
+ saveOnClickOutside: boolean;
27
31
  validateFunction: () => false;
28
32
  displayValue: (cell: unknown) => unknown;
29
33
  }>>>, {
30
34
  type: "input" | "dropdown";
31
35
  cell: string;
36
+ saveOnClickOutside: boolean;
32
37
  validateFunction: (value: unknown) => string | boolean;
33
38
  isLoading: boolean;
34
39
  displayValue: (option: unknown) => unknown;
@@ -1,7 +1,7 @@
1
- import o from "./EditableV4.vue2.js";
2
- /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../EditableV4.vue_vue_type_style_index_0_scoped_31bfb722_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-31bfb722"]]);
1
+ import e from "./EditableV4.vue2.js";
2
+ /* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_lang.css"; //*');
4
+ const c = /* @__PURE__ */ o(e, [["__scopeId", "data-v-e0c047b4"]]);
5
5
  export {
6
- p as default
6
+ c as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import "../../../EditableV4.vue_vue_type_style_index_0_scoped_31bfb722_lang.css"; import { defineComponent as m, openBlock as o, createElementBlock as i, unref as t, createElementVNode as f, renderSlot as r, createVNode as d, withCtx as y, createTextVNode as k, toDisplayString as V, createBlock as b, createCommentVNode as g } from "vue";
2
- import { editableCommon as x } from "../common/Editable.common.js";
3
- import v from "../../typography/v4/Typography.vue.js";
4
- import w from "../../input/v4/TextField.vue.js";
5
- import C from "../../icon/v4/IconV4.vue.js";
1
+ import "../../../EditableV4.vue_vue_type_style_index_0_scoped_e0c047b4_lang.css"; import { defineComponent as m, openBlock as o, createElementBlock as i, unref as t, createElementVNode as f, renderSlot as r, createVNode as d, withCtx as y, createTextVNode as k, toDisplayString as V, createBlock as b, createCommentVNode as g } from "vue";
2
+ import { editableCommon as v } from "../common/Editable.common.js";
3
+ import x from "../../typography/v4/Typography.vue.js";
4
+ import C from "../../input/v4/TextField.vue.js";
5
+ import w from "../../icon/v4/IconV4.vue.js";
6
6
  import "../../icon/v4/IconFlag.vue.js";
7
- const E = { class: "editable-wrapper" }, B = {
7
+ const B = { class: "editable-wrapper" }, E = {
8
8
  key: 1,
9
9
  class: "editable-content"
10
- }, _ = /* @__PURE__ */ m({
10
+ }, S = /* @__PURE__ */ m({
11
11
  __name: "EditableV4",
12
12
  props: {
13
13
  cell: { default: "" },
@@ -15,30 +15,31 @@ const E = { class: "editable-wrapper" }, B = {
15
15
  rowIndex: null,
16
16
  cellIndex: null,
17
17
  type: { default: "input" },
18
+ saveOnClickOutside: { type: Boolean, default: !0 },
18
19
  validateFunction: { type: Function, default: () => !1 },
19
20
  displayValue: { type: Function, default: (e) => e }
20
21
  },
21
22
  setup(e) {
22
- const c = e, { onEdit: n, target: s, isEditing: p } = x(c);
23
+ const s = e, { onEdit: n, target: c, isEditing: u } = v(s);
23
24
  return (l, a) => (o(), i("div", {
24
25
  ref_key: "target",
25
- ref: s,
26
+ ref: c,
26
27
  class: "editable",
27
28
  onClick: a[0] || (a[0] = //@ts-ignore
28
- (...u) => t(n) && t(n)(...u))
29
+ (...p) => t(n) && t(n)(...p))
29
30
  }, [
30
- f("div", E, [
31
- t(p) ? r(l.$slots, "input", { key: 0 }, () => [
32
- d(t(w))
33
- ], !0) : (o(), i("div", B, [
31
+ f("div", B, [
32
+ t(u) ? r(l.$slots, "input", { key: 0 }, () => [
33
+ d(t(C))
34
+ ], !0) : (o(), i("div", E, [
34
35
  r(l.$slots, "content", {}, () => [
35
- d(t(v), { variant: "body1" }, {
36
+ d(t(x), { variant: "body1" }, {
36
37
  default: y(() => [
37
38
  k(V(e.displayValue(e.cell)), 1)
38
39
  ]),
39
40
  _: 1
40
41
  }),
41
- e.type === "dropdown" ? (o(), b(t(C), {
42
+ e.type === "dropdown" ? (o(), b(t(w), {
42
43
  key: 0,
43
44
  class: "caret-icon",
44
45
  name: "caret-down",
@@ -51,5 +52,5 @@ const E = { class: "editable-wrapper" }, B = {
51
52
  }
52
53
  });
53
54
  export {
54
- _ as default
55
+ S as default
55
56
  };
@@ -6,6 +6,7 @@ declare const EditableTypes: () => ({
6
6
  $props: Partial<{
7
7
  type: "input" | "dropdown";
8
8
  cell: string;
9
+ saveOnClickOutside: boolean;
9
10
  validateFunction: (value: unknown) => string | boolean;
10
11
  isLoading: boolean;
11
12
  displayValue: (option: unknown) => unknown;
@@ -19,6 +20,10 @@ declare const EditableTypes: () => ({
19
20
  type: import("vue").PropType<string>;
20
21
  default: string;
21
22
  };
23
+ saveOnClickOutside: {
24
+ type: import("vue").PropType<boolean>;
25
+ default: boolean;
26
+ };
22
27
  validateFunction: {
23
28
  type: import("vue").PropType<(value: unknown) => string | boolean>;
24
29
  default: () => false;
@@ -39,7 +44,7 @@ declare const EditableTypes: () => ({
39
44
  type: import("vue").PropType<(option: unknown) => unknown>;
40
45
  default: (cell: unknown) => unknown;
41
46
  };
42
- }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "cell" | "validateFunction" | "isLoading" | "displayValue">;
47
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "cell" | "saveOnClickOutside" | "validateFunction" | "isLoading" | "displayValue">;
43
48
  $attrs: {
44
49
  [x: string]: unknown;
45
50
  };
@@ -63,6 +68,10 @@ declare const EditableTypes: () => ({
63
68
  type: import("vue").PropType<string>;
64
69
  default: string;
65
70
  };
71
+ saveOnClickOutside: {
72
+ type: import("vue").PropType<boolean>;
73
+ default: boolean;
74
+ };
66
75
  validateFunction: {
67
76
  type: import("vue").PropType<(value: unknown) => string | boolean>;
68
77
  default: () => false;
@@ -86,6 +95,7 @@ declare const EditableTypes: () => ({
86
95
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
87
96
  type: "input" | "dropdown";
88
97
  cell: string;
98
+ saveOnClickOutside: boolean;
89
99
  validateFunction: (value: unknown) => string | boolean;
90
100
  isLoading: boolean;
91
101
  displayValue: (option: unknown) => unknown;
@@ -119,6 +129,10 @@ declare const EditableTypes: () => ({
119
129
  type: import("vue").PropType<string>;
120
130
  default: string;
121
131
  };
132
+ saveOnClickOutside: {
133
+ type: import("vue").PropType<boolean>;
134
+ default: boolean;
135
+ };
122
136
  validateFunction: {
123
137
  type: import("vue").PropType<(value: unknown) => string | boolean>;
124
138
  default: () => false;
@@ -153,6 +167,10 @@ declare const EditableTypes: () => ({
153
167
  type: import("vue").PropType<string>;
154
168
  default: string;
155
169
  };
170
+ saveOnClickOutside: {
171
+ type: import("vue").PropType<boolean>;
172
+ default: boolean;
173
+ };
156
174
  validateFunction: {
157
175
  type: import("vue").PropType<(value: unknown) => string | boolean>;
158
176
  default: () => false;
@@ -176,6 +194,7 @@ declare const EditableTypes: () => ({
176
194
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
177
195
  type: "input" | "dropdown";
178
196
  cell: string;
197
+ saveOnClickOutside: boolean;
179
198
  validateFunction: (value: unknown) => string | boolean;
180
199
  isLoading: boolean;
181
200
  displayValue: (option: unknown) => unknown;
@@ -52,12 +52,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
52
52
  }>>> & {
53
53
  onShow?: () => any;
54
54
  }, {
55
- container: string;
56
55
  header: string;
57
56
  text: string;
58
57
  theme: string;
59
58
  disabled: boolean;
60
59
  testId: string;
60
+ container: string;
61
61
  delay: number;
62
62
  triggers: Triggers[];
63
63
  forceShowWithTruncate: boolean;
@@ -4,22 +4,18 @@ declare const TooltipTypes: () => ({
4
4
  $: import("vue").ComponentInternalInstance;
5
5
  $data: {};
6
6
  $props: Partial<{
7
- container: string;
8
7
  header: string;
9
8
  text: string;
10
9
  theme: string;
11
10
  disabled: boolean;
12
11
  testId: string;
12
+ container: string;
13
13
  delay: number;
14
14
  triggers: ("touch" | "click" | "focus" | "hover")[];
15
15
  forceShowWithTruncate: boolean;
16
16
  placement: "auto" | "left" | "right" | "bottom" | "top" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
17
17
  distance: string | number;
18
18
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
19
- container: {
20
- type: import("vue").PropType<string>;
21
- default: string;
22
- };
23
19
  header: {
24
20
  type: import("vue").PropType<string>;
25
21
  default: any;
@@ -40,6 +36,10 @@ declare const TooltipTypes: () => ({
40
36
  type: import("vue").PropType<string>;
41
37
  default: string;
42
38
  };
39
+ container: {
40
+ type: import("vue").PropType<string>;
41
+ default: string;
42
+ };
43
43
  delay: {
44
44
  type: import("vue").PropType<number>;
45
45
  default: number;
@@ -62,7 +62,7 @@ declare const TooltipTypes: () => ({
62
62
  };
63
63
  }>> & {
64
64
  onShow?: () => any;
65
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "container" | "header" | "text" | "theme" | "disabled" | "testId" | "delay" | "triggers" | "forceShowWithTruncate" | "placement" | "distance">;
65
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "header" | "text" | "theme" | "disabled" | "testId" | "container" | "delay" | "triggers" | "forceShowWithTruncate" | "placement" | "distance">;
66
66
  $attrs: {
67
67
  [x: string]: unknown;
68
68
  };
@@ -77,10 +77,6 @@ declare const TooltipTypes: () => ({
77
77
  $emit: (event: "show") => void;
78
78
  $el: any;
79
79
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
80
- container: {
81
- type: import("vue").PropType<string>;
82
- default: string;
83
- };
84
80
  header: {
85
81
  type: import("vue").PropType<string>;
86
82
  default: any;
@@ -101,6 +97,10 @@ declare const TooltipTypes: () => ({
101
97
  type: import("vue").PropType<string>;
102
98
  default: string;
103
99
  };
100
+ container: {
101
+ type: import("vue").PropType<string>;
102
+ default: string;
103
+ };
104
104
  delay: {
105
105
  type: import("vue").PropType<number>;
106
106
  default: number;
@@ -126,12 +126,12 @@ declare const TooltipTypes: () => ({
126
126
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
127
127
  show: () => void;
128
128
  }, string, {
129
- container: string;
130
129
  header: string;
131
130
  text: string;
132
131
  theme: string;
133
132
  disabled: boolean;
134
133
  testId: string;
134
+ container: string;
135
135
  delay: number;
136
136
  triggers: ("touch" | "click" | "focus" | "hover")[];
137
137
  forceShowWithTruncate: boolean;
@@ -158,10 +158,6 @@ declare const TooltipTypes: () => ({
158
158
  $nextTick: typeof import("vue").nextTick;
159
159
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
160
160
  } & Readonly<import("vue").ExtractPropTypes<{
161
- container: {
162
- type: import("vue").PropType<string>;
163
- default: string;
164
- };
165
161
  header: {
166
162
  type: import("vue").PropType<string>;
167
163
  default: any;
@@ -182,6 +178,10 @@ declare const TooltipTypes: () => ({
182
178
  type: import("vue").PropType<string>;
183
179
  default: string;
184
180
  };
181
+ container: {
182
+ type: import("vue").PropType<string>;
183
+ default: string;
184
+ };
185
185
  delay: {
186
186
  type: import("vue").PropType<number>;
187
187
  default: number;
@@ -209,10 +209,6 @@ declare const TooltipTypes: () => ({
209
209
  __isTeleport?: never;
210
210
  __isSuspense?: never;
211
211
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
212
- container: {
213
- type: import("vue").PropType<string>;
214
- default: string;
215
- };
216
212
  header: {
217
213
  type: import("vue").PropType<string>;
218
214
  default: any;
@@ -233,6 +229,10 @@ declare const TooltipTypes: () => ({
233
229
  type: import("vue").PropType<string>;
234
230
  default: string;
235
231
  };
232
+ container: {
233
+ type: import("vue").PropType<string>;
234
+ default: string;
235
+ };
236
236
  delay: {
237
237
  type: import("vue").PropType<number>;
238
238
  default: number;
@@ -258,12 +258,12 @@ declare const TooltipTypes: () => ({
258
258
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
259
259
  show: () => void;
260
260
  }, string, {
261
- container: string;
262
261
  header: string;
263
262
  text: string;
264
263
  theme: string;
265
264
  disabled: boolean;
266
265
  testId: string;
266
+ container: string;
267
267
  delay: number;
268
268
  triggers: ("touch" | "click" | "focus" | "hover")[];
269
269
  forceShowWithTruncate: boolean;