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

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 (67) hide show
  1. package/AppHeader.vue_vue_type_style_index_0_scoped_95908b8d_lang.css +1 -0
  2. package/CardPanel.vue_vue_type_style_index_0_scoped_7d0acb11_lang.css +1 -0
  3. package/CheckboxV4.vue_vue_type_style_index_0_scoped_d25514d1_lang.css +1 -0
  4. package/DataGrid.vue_vue_type_style_index_0_scoped_4baf9e57_lang.css +1 -0
  5. package/DataGridMenu.vue_vue_type_style_index_0_scoped_13f1ce76_lang.css +1 -0
  6. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_06751538_lang.css +1 -0
  7. package/EditableV4.vue_vue_type_style_index_0_scoped_31bfb722_lang.css +1 -0
  8. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_24001caa_lang.css +1 -0
  9. package/FieldLabel.vue_vue_type_style_index_0_scoped_5c2a70ad_lang.css +1 -0
  10. package/FormRow.vue_vue_type_style_index_0_scoped_39f48410_lang.css +1 -0
  11. package/InlineCopy.vue_vue_type_style_index_0_scoped_2a9e8782_lang.css +1 -0
  12. package/RadioButtonV4.vue_vue_type_style_index_0_scoped_cb3a12c6_lang.css +1 -0
  13. package/components/appHeader/AppHeader.vue.js +3 -3
  14. package/components/appHeader/AppHeader.vue2.js +41 -35
  15. package/components/checkbox/v4/CheckboxV4.vue.js +4 -4
  16. package/components/checkbox/v4/CheckboxV4.vue2.js +2 -2
  17. package/components/checkbox/v4/icons/UncheckedDisabledState.vue.js +11 -12
  18. package/components/checkbox/v4/icons/UncheckedState.vue.js +12 -11
  19. package/components/dropdown/common/Dropdown.common.js +93 -92
  20. package/components/emptyState/v4/EmptyStateV4.vue.d.ts +15 -0
  21. package/components/emptyState/v4/EmptyStateV4.vue.js +3 -3
  22. package/components/emptyState/v4/EmptyStateV4.vue2.js +41 -27
  23. package/components/emptyState/v4/index.d.ts +58 -1
  24. package/components/forms/CardPanel.vue.d.ts +20 -0
  25. package/components/forms/CardPanel.vue.js +2 -2
  26. package/components/forms/CardPanel.vue2.js +26 -14
  27. package/components/forms/FormRow.vue.js +4 -4
  28. package/components/forms/FormRow.vue2.js +1 -1
  29. package/components/forms/index.d.ts +77 -1
  30. package/components/inlineCopy/InlineCopy.vue.js +2 -2
  31. package/components/inlineCopy/InlineCopy.vue2.js +2 -2
  32. package/components/radioButton/v4/RadioButtonV4.vue.js +4 -4
  33. package/components/radioButton/v4/RadioButtonV4.vue2.js +1 -1
  34. package/components/shared/FieldLabel.vue.d.ts +5 -0
  35. package/components/shared/FieldLabel.vue.js +3 -3
  36. package/components/shared/FieldLabel.vue2.js +63 -46
  37. package/components/table/common/Table.common.d.ts +1 -0
  38. package/components/table/common/Table.common.js +64 -60
  39. package/components/table/common/TableContext.d.ts +1 -0
  40. package/components/table/v4/DataGrid.vue.js +4 -4
  41. package/components/table/v4/DataGrid.vue2.js +71 -69
  42. package/components/table/v4/DataGridMenu.vue.d.ts +5 -5
  43. package/components/table/v4/DataGridMenu.vue.js +4 -4
  44. package/components/table/v4/DataGridMenu.vue2.js +46 -47
  45. package/components/table/v4/DataGridRowsCounter.vue.d.ts +15 -0
  46. package/components/table/v4/DataGridRowsCounter.vue.js +3 -3
  47. package/components/table/v4/DataGridRowsCounter.vue2.js +22 -19
  48. package/components/table/v4/index.d.ts +32 -5
  49. package/components/table-cells/common/Editable.common.js +15 -15
  50. package/components/table-cells/v4/EditableV4.vue.d.ts +10 -0
  51. package/components/table-cells/v4/EditableV4.vue.js +3 -3
  52. package/components/table-cells/v4/EditableV4.vue2.js +31 -22
  53. package/components/table-cells/v4/index.d.ts +43 -1
  54. package/index.d.ts +266 -14
  55. package/package.json +1 -1
  56. package/AppHeader.vue_vue_type_style_index_0_scoped_209ecc03_lang.css +0 -1
  57. package/CardPanel.vue_vue_type_style_index_0_scoped_d2b5d12f_lang.css +0 -1
  58. package/CheckboxV4.vue_vue_type_style_index_0_scoped_ee3e6d82_lang.css +0 -1
  59. package/DataGrid.vue_vue_type_style_index_0_scoped_d5635f1b_lang.css +0 -1
  60. package/DataGridMenu.vue_vue_type_style_index_0_scoped_92d83650_lang.css +0 -1
  61. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_9e366543_lang.css +0 -1
  62. package/EditableV4.vue_vue_type_style_index_0_scoped_df325b51_lang.css +0 -1
  63. package/EmptyStateV4.vue_vue_type_style_index_0_scoped_b8373c2d_lang.css +0 -1
  64. package/FieldLabel.vue_vue_type_style_index_0_scoped_526af548_lang.css +0 -1
  65. package/FormRow.vue_vue_type_style_index_0_scoped_017dc22e_lang.css +0 -1
  66. package/InlineCopy.vue_vue_type_style_index_0_scoped_2f0a0202_lang.css +0 -1
  67. package/RadioButtonV4.vue_vue_type_style_index_0_scoped_14be812e_lang.css +0 -1
@@ -1,61 +1,60 @@
1
- import "../../../DataGridMenu.vue_vue_type_style_index_0_scoped_92d83650_lang.css"; import { defineComponent as p, ref as u, computed as f, openBlock as x, createElementBlock as g, createVNode as o, unref as t, withCtx as n, createSlots as k, createTextVNode as v, toDisplayString as y } from "vue";
2
- import _ from "../../dropdown/v4/DropdownV4.vue.js";
1
+ import "../../../DataGridMenu.vue_vue_type_style_index_0_scoped_13f1ce76_lang.css"; import { defineComponent as p, onBeforeUnmount as f, openBlock as x, createBlock as w, unref as n, withCtx as o, createVNode as m, createSlots as I, createTextVNode as v, toDisplayString as M } from "vue";
2
+ import g from "../../dropdown/v4/DropdownV4.vue.js";
3
3
  import "../../dropdown/v4/DefaultDropdownTrigger.vue.js";
4
4
  import "../../dropdown/v4/IconButtonDropdownTrigger.vue.js";
5
5
  import "../../dropdown/v4/ChipDropdownTrigger.vue.js";
6
6
  import "../../dropdown/v4/AppDropdownTrigger.vue.js";
7
- import D from "../../dropdown/v4/OptionV4.vue.js";
8
- import I from "../../icon/v4/IconV4.vue.js";
9
- const b = /* @__PURE__ */ p({
7
+ import C from "../../dropdown/v4/OptionV4.vue.js";
8
+ import k from "../../icon/v4/IconV4.vue.js";
9
+ import { useTableContext as y } from "../common/TableContext.js";
10
+ const O = /* @__PURE__ */ p({
10
11
  __name: "DataGridMenu",
11
12
  props: {
12
13
  menuItems: { default: () => [] },
13
- container: { default: null }
14
+ rowIndex: { default: null }
14
15
  },
15
16
  emits: ["selected"],
16
- setup(r, { emit: l }) {
17
- const m = r, a = (c) => c.text, i = u(null), d = f(
18
- () => m.container ?? (i.value || void 0)
19
- );
20
- return (c, s) => (x(), g("div", {
21
- ref_key: "rootRef",
22
- ref: i
23
- }, [
24
- o(t(_), {
25
- class: "data-grid-menu",
26
- options: r.menuItems,
27
- "display-value": a,
28
- "predefined-trigger": "icon-button",
29
- placement: "left-start",
30
- skidding: -4,
31
- container: t(d),
32
- "onUpdate:selected": s[0] || (s[0] = (e) => l("selected", e))
33
- }, {
34
- default: n(({ option: e }) => [
35
- o(t(D), { option: e }, k({
36
- default: n(() => [
37
- v(" " + y(a(e)), 1)
17
+ setup(r, { emit: u }) {
18
+ const t = r, i = y("DataGridMenu"), s = (d) => d.text, c = () => {
19
+ t.rowIndex && i.setActiveMenuRow(t.rowIndex);
20
+ }, a = () => {
21
+ t.rowIndex && i.setActiveMenuRow(null);
22
+ };
23
+ return f(a), (d, l) => (x(), w(n(g), {
24
+ class: "data-grid-menu",
25
+ options: r.menuItems,
26
+ "display-value": s,
27
+ "predefined-trigger": "icon-button",
28
+ placement: "left-start",
29
+ skidding: -4,
30
+ "onUpdate:selected": l[0] || (l[0] = (e) => u("selected", e)),
31
+ onOpened: c,
32
+ onClosed: a
33
+ }, {
34
+ default: o(({ option: e }) => [
35
+ m(n(C), { option: e }, I({
36
+ default: o(() => [
37
+ v(" " + M(s(e)), 1)
38
+ ]),
39
+ _: 2
40
+ }, [
41
+ e.icon ? {
42
+ name: "icon-start",
43
+ fn: o(() => [
44
+ m(n(k), {
45
+ class: "menu-icon",
46
+ name: e.icon,
47
+ size: "20px"
48
+ }, null, 8, ["name"])
38
49
  ]),
39
- _: 2
40
- }, [
41
- e.icon ? {
42
- name: "icon-start",
43
- fn: n(() => [
44
- o(t(I), {
45
- class: "menu-icon",
46
- name: e.icon,
47
- size: "20px"
48
- }, null, 8, ["name"])
49
- ]),
50
- key: "0"
51
- } : void 0
52
- ]), 1032, ["option"])
53
- ]),
54
- _: 1
55
- }, 8, ["options", "container"])
56
- ], 512));
50
+ key: "0"
51
+ } : void 0
52
+ ]), 1032, ["option"])
53
+ ]),
54
+ _: 1
55
+ }, 8, ["options"]));
57
56
  }
58
57
  });
59
58
  export {
60
- b as default
59
+ O as default
61
60
  };
@@ -1,18 +1,33 @@
1
1
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
2
  count?: number;
3
3
  totalCount?: number;
4
+ displayingText?: string;
5
+ outOfText?: string;
6
+ totalText?: string;
4
7
  }>, {
5
8
  count: number;
6
9
  totalCount: number;
10
+ displayingText: string;
11
+ outOfText: string;
12
+ totalText: string;
7
13
  }>, {}, 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
14
  count?: number;
9
15
  totalCount?: number;
16
+ displayingText?: string;
17
+ outOfText?: string;
18
+ totalText?: string;
10
19
  }>, {
11
20
  count: number;
12
21
  totalCount: number;
22
+ displayingText: string;
23
+ outOfText: string;
24
+ totalText: string;
13
25
  }>>>, {
14
26
  count: number;
15
27
  totalCount: number;
28
+ displayingText: string;
29
+ outOfText: string;
30
+ totalText: string;
16
31
  }>;
17
32
  export default _default;
18
33
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1,7 +1,7 @@
1
1
  import o from "./DataGridRowsCounter.vue2.js";
2
- /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_9e366543_lang.css"; //*');
4
- const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-9e366543"]]);
2
+ /* empty css */import t from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_06751538_lang.css"; //*');
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-06751538"]]);
5
5
  export {
6
6
  r as default
7
7
  };
@@ -1,36 +1,39 @@
1
- import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_9e366543_lang.css"; import { defineComponent as l, openBlock as u, createElementBlock as i, createVNode as e, unref as o, withCtx as a, createTextVNode as t, toDisplayString as s } from "vue";
2
- import r from "../../typography/v4/Typography.vue.js";
3
- const c = { class: "data-grid-rows-counter" }, m = /* @__PURE__ */ l({
1
+ import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_06751538_lang.css"; import { defineComponent as r, openBlock as i, createElementBlock as d, createVNode as o, unref as n, withCtx as l, createTextVNode as e, toDisplayString as a } from "vue";
2
+ import u from "../../typography/v4/Typography.vue.js";
3
+ const s = { class: "data-grid-rows-counter" }, m = /* @__PURE__ */ r({
4
4
  __name: "DataGridRowsCounter",
5
5
  props: {
6
6
  count: { default: 0 },
7
- totalCount: { default: 0 }
7
+ totalCount: { default: 0 },
8
+ displayingText: { default: "Displaying" },
9
+ outOfText: { default: "out of" },
10
+ totalText: { default: "total rows" }
8
11
  },
9
- setup(n) {
10
- return (d, f) => (u(), i("div", c, [
11
- e(o(r), { variant: "body2" }, {
12
- default: a(() => [
13
- t(" Displaying "),
14
- e(o(r), {
12
+ setup(t) {
13
+ return (c, f) => (i(), d("div", s, [
14
+ o(n(u), { variant: "body1" }, {
15
+ default: l(() => [
16
+ e(a(t.displayingText) + " ", 1),
17
+ o(n(u), {
15
18
  class: "text-strong",
16
- variant: "subtitle2"
19
+ variant: "subtitle1"
17
20
  }, {
18
- default: a(() => [
19
- t(s(n.count), 1)
21
+ default: l(() => [
22
+ e(a(t.count), 1)
20
23
  ]),
21
24
  _: 1
22
25
  }),
23
- t(" out of "),
24
- e(o(r), {
26
+ e(" " + a(t.outOfText) + " ", 1),
27
+ o(n(u), {
25
28
  class: "text-strong",
26
- variant: "subtitle2"
29
+ variant: "subtitle1"
27
30
  }, {
28
- default: a(() => [
29
- t(s(n.totalCount), 1)
31
+ default: l(() => [
32
+ e(a(t.totalCount), 1)
30
33
  ]),
31
34
  _: 1
32
35
  }),
33
- t(" total rows ")
36
+ e(" " + a(t.totalText), 1)
34
37
  ]),
35
38
  _: 1
36
39
  })
@@ -619,8 +619,8 @@ declare const DataGridTypes: () => (({
619
619
  footer?(_: {}): any;
620
620
  };
621
621
  })) | import("vue").DefineComponent<{
622
- container: {
623
- type: import("vue").PropType<string>;
622
+ rowIndex: {
623
+ type: import("vue").PropType<number>;
624
624
  default: any;
625
625
  };
626
626
  menuItems: {
@@ -631,8 +631,8 @@ declare const DataGridTypes: () => (({
631
631
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
632
632
  selected: (option: unknown) => void;
633
633
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
634
- container: {
635
- type: import("vue").PropType<string>;
634
+ rowIndex: {
635
+ type: import("vue").PropType<number>;
636
636
  default: any;
637
637
  };
638
638
  menuItems: {
@@ -643,7 +643,7 @@ declare const DataGridTypes: () => (({
643
643
  }>> & {
644
644
  onSelected?: (option: unknown) => any;
645
645
  }, {
646
- container: string;
646
+ rowIndex: number;
647
647
  menuItems: import("../common/Table.types").MenuItem[];
648
648
  }> | import("vue").DefineComponent<{
649
649
  count: {
@@ -654,6 +654,18 @@ declare const DataGridTypes: () => (({
654
654
  type: import("vue").PropType<number>;
655
655
  default: number;
656
656
  };
657
+ displayingText: {
658
+ type: import("vue").PropType<string>;
659
+ default: string;
660
+ };
661
+ outOfText: {
662
+ type: import("vue").PropType<string>;
663
+ default: string;
664
+ };
665
+ totalText: {
666
+ type: import("vue").PropType<string>;
667
+ default: string;
668
+ };
657
669
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
658
670
  count: {
659
671
  type: import("vue").PropType<number>;
@@ -663,9 +675,24 @@ declare const DataGridTypes: () => (({
663
675
  type: import("vue").PropType<number>;
664
676
  default: number;
665
677
  };
678
+ displayingText: {
679
+ type: import("vue").PropType<string>;
680
+ default: string;
681
+ };
682
+ outOfText: {
683
+ type: import("vue").PropType<string>;
684
+ default: string;
685
+ };
686
+ totalText: {
687
+ type: import("vue").PropType<string>;
688
+ default: string;
689
+ };
666
690
  }>>, {
667
691
  count: number;
668
692
  totalCount: number;
693
+ displayingText: string;
694
+ outOfText: string;
695
+ totalText: string;
669
696
  }>)[];
670
697
  export type { Column, Sort, MenuItem } from '../common/Table.types';
671
698
  export { DataGrid, DataGridMenu, DataGridRowsCounter, DataGridTypes };
@@ -2,38 +2,38 @@ import { ref as a, provide as v } from "vue";
2
2
  import { useTableContext as s } from "../../table/common/TableContext.js";
3
3
  import { EditableContext as d } from "./EditableContext.js";
4
4
  import { onClickOutside as f } from "@vueuse/core";
5
- const E = (e) => {
6
- const l = a(!1), o = a(e.cell), r = a(null), u = s("Editable"), t = a(null);
5
+ const g = (e) => {
6
+ const l = a(!1), n = a(e.cell), u = a(null), r = s("Editable"), o = a(null);
7
7
  v(d, {
8
8
  focusable: !0,
9
- value: o,
10
- error: t,
9
+ value: n,
10
+ error: o,
11
11
  confirmable: !0,
12
- onChange(n) {
13
- o.value = n, t.value = e.validateFunction?.(o.value);
12
+ onChange(t) {
13
+ n.value = t, o.value = e.validateFunction?.(n.value);
14
14
  },
15
15
  onClose: () => {
16
- const n = e.validateFunction?.(o.value);
17
- t.value = n, !n && (u.onClose({
16
+ const t = e.validateFunction?.(n.value);
17
+ o.value = t, !t && (r.onClose({
18
18
  rowIndex: e.rowIndex,
19
19
  cellIndex: e.cellIndex,
20
- value: o.value
20
+ value: n.value
21
21
  }), l.value = !1);
22
22
  }
23
23
  });
24
24
  const i = () => {
25
- l.value || (l.value = !l.value);
25
+ l.value || e.isLoading || (l.value = !l.value);
26
26
  }, c = () => {
27
- o.value = e.cell, t.value = null;
27
+ n.value = e.cell, o.value = null;
28
28
  };
29
- return f(r, () => {
30
- l.value = !1, c(), u.onClose();
29
+ return f(u, () => {
30
+ l.value = !1, c(), r.onClose();
31
31
  }), {
32
32
  onEdit: i,
33
- target: r,
33
+ target: u,
34
34
  isEditing: l
35
35
  };
36
36
  };
37
37
  export {
38
- E as editableCommon
38
+ g as editableCommon
39
39
  };
@@ -3,23 +3,33 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
3
3
  isLoading?: boolean;
4
4
  rowIndex: number;
5
5
  cellIndex: number;
6
+ type: "input" | "dropdown";
6
7
  validateFunction?: (value: unknown) => string | boolean;
8
+ displayValue?: (option: unknown) => unknown;
7
9
  }>, {
8
10
  cell: string;
9
11
  isLoading: boolean;
12
+ type: string;
10
13
  validateFunction: () => false;
14
+ displayValue: (cell: unknown) => unknown;
11
15
  }>, {}, 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<{
12
16
  cell?: string;
13
17
  isLoading?: boolean;
14
18
  rowIndex: number;
15
19
  cellIndex: number;
20
+ type: "input" | "dropdown";
16
21
  validateFunction?: (value: unknown) => string | boolean;
22
+ displayValue?: (option: unknown) => unknown;
17
23
  }>, {
18
24
  cell: string;
19
25
  isLoading: boolean;
26
+ type: string;
20
27
  validateFunction: () => false;
28
+ displayValue: (cell: unknown) => unknown;
21
29
  }>>>, {
30
+ type: "input" | "dropdown";
22
31
  cell: string;
32
+ displayValue: (option: unknown) => unknown;
23
33
  validateFunction: (value: unknown) => string | boolean;
24
34
  isLoading: boolean;
25
35
  }>, {
@@ -1,7 +1,7 @@
1
1
  import o from "./EditableV4.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../EditableV4.vue_vue_type_style_index_0_scoped_df325b51_lang.css"; //*');
4
- const d = /* @__PURE__ */ e(o, [["__scopeId", "data-v-df325b51"]]);
3
+ // import "../../../EditableV4.vue_vue_type_style_index_0_scoped_31bfb722_lang.css"; //*');
4
+ const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-31bfb722"]]);
5
5
  export {
6
- d as default
6
+ p as default
7
7
  };
@@ -1,39 +1,48 @@
1
- import "../../../EditableV4.vue_vue_type_style_index_0_scoped_df325b51_lang.css"; import { defineComponent as u, openBlock as r, createElementBlock as a, unref as e, createElementVNode as m, renderSlot as i, createVNode as d, withCtx as y, createTextVNode as b, toDisplayString as g } from "vue";
2
- import { editableCommon as k } from "../common/Editable.common.js";
3
- import _ from "../../typography/v4/Typography.vue.js";
4
- import v from "../../input/v4/TextField.vue.js";
5
- const x = { class: "editable-wrapper" }, E = {
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";
6
+ const E = { class: "editable-wrapper" }, B = {
6
7
  key: 1,
7
8
  class: "editable-content"
8
- }, B = /* @__PURE__ */ u({
9
+ }, S = /* @__PURE__ */ m({
9
10
  __name: "EditableV4",
10
11
  props: {
11
12
  cell: { default: "" },
12
13
  isLoading: { type: Boolean, default: !1 },
13
14
  rowIndex: null,
14
15
  cellIndex: null,
15
- validateFunction: { type: Function, default: () => !1 }
16
+ type: { default: "input" },
17
+ validateFunction: { type: Function, default: () => !1 },
18
+ displayValue: { type: Function, default: (e) => e }
16
19
  },
17
- setup(t) {
18
- const s = t, { onEdit: o, target: c, isEditing: p } = k(s);
19
- return (n, l) => (r(), a("div", {
20
+ setup(e) {
21
+ const c = e, { onEdit: n, target: s, isEditing: p } = x(c);
22
+ return (l, a) => (o(), i("div", {
20
23
  ref_key: "target",
21
- ref: c,
24
+ ref: s,
22
25
  class: "editable",
23
- onClick: l[0] || (l[0] = //@ts-ignore
24
- (...f) => e(o) && e(o)(...f))
26
+ onClick: a[0] || (a[0] = //@ts-ignore
27
+ (...u) => t(n) && t(n)(...u))
25
28
  }, [
26
- m("div", x, [
27
- e(p) ? i(n.$slots, "input", { key: 0 }, () => [
28
- d(e(v))
29
- ], !0) : (r(), a("div", E, [
30
- i(n.$slots, "content", {}, () => [
31
- d(e(_), { variant: "body1" }, {
29
+ f("div", E, [
30
+ t(p) ? r(l.$slots, "input", { key: 0 }, () => [
31
+ d(t(w))
32
+ ], !0) : (o(), i("div", B, [
33
+ r(l.$slots, "content", {}, () => [
34
+ d(t(v), { variant: "body1" }, {
32
35
  default: y(() => [
33
- b(g(t.cell), 1)
36
+ k(V(e.displayValue(e.cell)), 1)
34
37
  ]),
35
38
  _: 1
36
- })
39
+ }),
40
+ e.type === "dropdown" ? (o(), b(t(C), {
41
+ key: 0,
42
+ class: "caret-icon",
43
+ name: "caret-down",
44
+ size: "20px"
45
+ })) : g("", !0)
37
46
  ], !0)
38
47
  ]))
39
48
  ])
@@ -41,5 +50,5 @@ const x = { class: "editable-wrapper" }, E = {
41
50
  }
42
51
  });
43
52
  export {
44
- B as default
53
+ S as default
45
54
  };
@@ -4,14 +4,25 @@ declare const EditableTypes: () => ({
4
4
  $: import("vue").ComponentInternalInstance;
5
5
  $data: {};
6
6
  $props: Partial<{
7
+ type: "input" | "dropdown";
7
8
  cell: string;
9
+ displayValue: (option: unknown) => unknown;
8
10
  validateFunction: (value: unknown) => string | boolean;
9
11
  isLoading: boolean;
10
12
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
13
+ type: {
14
+ type: import("vue").PropType<"input" | "dropdown">;
15
+ required: true;
16
+ default: string;
17
+ };
11
18
  cell: {
12
19
  type: import("vue").PropType<string>;
13
20
  default: string;
14
21
  };
22
+ displayValue: {
23
+ type: import("vue").PropType<(option: unknown) => unknown>;
24
+ default: (cell: unknown) => unknown;
25
+ };
15
26
  validateFunction: {
16
27
  type: import("vue").PropType<(value: unknown) => string | boolean>;
17
28
  default: () => false;
@@ -28,7 +39,7 @@ declare const EditableTypes: () => ({
28
39
  type: import("vue").PropType<number>;
29
40
  required: true;
30
41
  };
31
- }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "cell" | "validateFunction" | "isLoading">;
42
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "cell" | "displayValue" | "validateFunction" | "isLoading">;
32
43
  $attrs: {
33
44
  [x: string]: unknown;
34
45
  };
@@ -43,10 +54,19 @@ declare const EditableTypes: () => ({
43
54
  $emit: (event: string, ...args: any[]) => void;
44
55
  $el: any;
45
56
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
57
+ type: {
58
+ type: import("vue").PropType<"input" | "dropdown">;
59
+ required: true;
60
+ default: string;
61
+ };
46
62
  cell: {
47
63
  type: import("vue").PropType<string>;
48
64
  default: string;
49
65
  };
66
+ displayValue: {
67
+ type: import("vue").PropType<(option: unknown) => unknown>;
68
+ default: (cell: unknown) => unknown;
69
+ };
50
70
  validateFunction: {
51
71
  type: import("vue").PropType<(value: unknown) => string | boolean>;
52
72
  default: () => false;
@@ -64,7 +84,9 @@ declare const EditableTypes: () => ({
64
84
  required: true;
65
85
  };
66
86
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
87
+ type: "input" | "dropdown";
67
88
  cell: string;
89
+ displayValue: (option: unknown) => unknown;
68
90
  validateFunction: (value: unknown) => string | boolean;
69
91
  isLoading: boolean;
70
92
  }, {}, string> & {
@@ -88,10 +110,19 @@ declare const EditableTypes: () => ({
88
110
  $nextTick: typeof import("vue").nextTick;
89
111
  $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;
90
112
  } & Readonly<import("vue").ExtractPropTypes<{
113
+ type: {
114
+ type: import("vue").PropType<"input" | "dropdown">;
115
+ required: true;
116
+ default: string;
117
+ };
91
118
  cell: {
92
119
  type: import("vue").PropType<string>;
93
120
  default: string;
94
121
  };
122
+ displayValue: {
123
+ type: import("vue").PropType<(option: unknown) => unknown>;
124
+ default: (cell: unknown) => unknown;
125
+ };
95
126
  validateFunction: {
96
127
  type: import("vue").PropType<(value: unknown) => string | boolean>;
97
128
  default: () => false;
@@ -113,10 +144,19 @@ declare const EditableTypes: () => ({
113
144
  __isTeleport?: never;
114
145
  __isSuspense?: never;
115
146
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
147
+ type: {
148
+ type: import("vue").PropType<"input" | "dropdown">;
149
+ required: true;
150
+ default: string;
151
+ };
116
152
  cell: {
117
153
  type: import("vue").PropType<string>;
118
154
  default: string;
119
155
  };
156
+ displayValue: {
157
+ type: import("vue").PropType<(option: unknown) => unknown>;
158
+ default: (cell: unknown) => unknown;
159
+ };
120
160
  validateFunction: {
121
161
  type: import("vue").PropType<(value: unknown) => string | boolean>;
122
162
  default: () => false;
@@ -134,7 +174,9 @@ declare const EditableTypes: () => ({
134
174
  required: true;
135
175
  };
136
176
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
177
+ type: "input" | "dropdown";
137
178
  cell: string;
179
+ displayValue: (option: unknown) => unknown;
138
180
  validateFunction: (value: unknown) => string | boolean;
139
181
  isLoading: boolean;
140
182
  }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {