@ironsource/shared-ui 2.0.0 → 2.0.1-test.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 (101) hide show
  1. package/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_c48dc06e_lang.css +1 -0
  2. package/ButtonV4.vue_vue_type_style_index_0_scoped_cca772e9_lang.css +1 -0
  3. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e5202bb9_lang.css +1 -0
  4. package/DataGrid.vue_vue_type_style_index_0_scoped_4e432056_lang.css +1 -0
  5. package/DataGridMenu.vue_vue_type_style_index_0_scoped_92d83650_lang.css +1 -0
  6. package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_11c1bb3f_lang.css +1 -0
  7. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c6156fa0_lang.css +1 -0
  8. package/DialogV4.vue_vue_type_style_index_0_scoped_7422cf08_lang.css +1 -0
  9. package/DropdownV4.vue_vue_type_style_index_0_scoped_19f8fedd_lang.css +1 -0
  10. package/DropdownV4.vue_vue_type_style_index_1_lang.css +1 -1
  11. package/IncludeExclude.vue_vue_type_style_index_0_scoped_fb054d88_lang.css +1 -0
  12. package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_5764fd61_lang.css +1 -0
  13. package/OptionV4.vue_vue_type_style_index_0_scoped_2a214b95_lang.css +1 -0
  14. package/{Skeleton.vue_vue_type_style_index_0_scoped_9837f0ce_lang.css → Skeleton.vue_vue_type_style_index_0_scoped_5ed40068_lang.css} +1 -1
  15. package/SkeletonV4.vue_vue_type_style_index_0_scoped_2f3b3470_lang.css +1 -0
  16. package/Table.vue_vue_type_style_index_0_scoped_76fef9bd_lang.css +1 -0
  17. package/TextField.vue_vue_type_style_index_0_scoped_473bab9b_lang.css +1 -0
  18. package/components/button/v4/ButtonV4.vue.js +4 -4
  19. package/components/button/v4/ButtonV4.vue2.js +1 -1
  20. package/components/dialog/v4/DialogV4.vue.d.ts +34 -0
  21. package/components/dialog/v4/DialogV4.vue.js +3 -3
  22. package/components/dialog/v4/DialogV4.vue2.js +87 -56
  23. package/components/dialog/v4/index.d.ts +128 -2
  24. package/components/dropdown/common/Dropdown.common.js +29 -29
  25. package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +136 -0
  26. package/components/dropdown/v4/AppDropdownTrigger.vue.js +7 -0
  27. package/components/dropdown/v4/AppDropdownTrigger.vue2.js +147 -0
  28. package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
  29. package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +8 -8
  30. package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +39 -11
  31. package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
  32. package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +77 -47
  33. package/components/dropdown/v4/Dropdown.types.d.ts +1 -1
  34. package/components/dropdown/v4/Dropdown.types.js +2 -1
  35. package/components/dropdown/v4/DropdownV4.vue.d.ts +42 -7
  36. package/components/dropdown/v4/DropdownV4.vue.js +4 -4
  37. package/components/dropdown/v4/DropdownV4.vue2.js +193 -163
  38. package/components/dropdown/v4/OptionV4.vue.d.ts +20 -0
  39. package/components/dropdown/v4/OptionV4.vue.js +2 -2
  40. package/components/dropdown/v4/OptionV4.vue2.js +54 -37
  41. package/components/dropdown/v4/index.d.ts +824 -70
  42. package/components/dropdown/v4/index.js +11 -8
  43. package/components/includeExclude/IncludeExclude.vue.js +3 -3
  44. package/components/includeExclude/IncludeExclude.vue2.js +2 -2
  45. package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +1 -1
  46. package/components/includeExclude/IncludeExcludeDragDrop.vue.js +3 -3
  47. package/components/includeExclude/IncludeExcludeDragDrop.vue2.js +2 -2
  48. package/components/includeExclude/index.d.ts +20 -20
  49. package/components/input/v4/TextField.vue.d.ts +1 -1
  50. package/components/input/v4/TextField.vue.js +3 -3
  51. package/components/input/v4/TextField.vue2.js +9 -10
  52. package/components/input/v4/index.d.ts +20 -20
  53. package/components/layout/FormCard.vue.d.ts +1 -1
  54. package/components/layout/index.d.ts +12 -12
  55. package/components/multibar/MultiBarMenu.vue2.js +7 -6
  56. package/components/skeleton/v3/Skeleton.vue.js +7 -0
  57. package/components/skeleton/{Skeleton.vue2.js → v3/Skeleton.vue2.js} +1 -1
  58. package/components/skeleton/v4/SkeletonV4.vue.d.ts +41 -0
  59. package/components/skeleton/v4/SkeletonV4.vue.js +7 -0
  60. package/components/skeleton/v4/SkeletonV4.vue2.js +23 -0
  61. package/components/skeleton/v4/index.d.ts +94 -0
  62. package/components/skeleton/v4/index.js +6 -0
  63. package/components/table/v3/Table.vue.js +5 -5
  64. package/components/table/v3/Table.vue2.js +3 -3
  65. package/components/table/v4/DataGrid.vue.d.ts +7 -2
  66. package/components/table/v4/DataGrid.vue.js +4 -4
  67. package/components/table/v4/DataGrid.vue2.js +175 -169
  68. package/components/table/v4/DataGridMenu.vue.d.ts +5 -0
  69. package/components/table/v4/DataGridMenu.vue.js +3 -3
  70. package/components/table/v4/DataGridMenu.vue2.js +49 -38
  71. package/components/table/v4/DataGridRowsCounter.vue.d.ts +34 -0
  72. package/components/table/v4/DataGridRowsCounter.vue.js +7 -0
  73. package/components/table/v4/DataGridRowsCounter.vue2.js +36 -0
  74. package/components/table/v4/index.d.ts +56 -6
  75. package/components/table/v4/index.js +6 -4
  76. package/components/table/v4/storyUtils.d.ts +1 -0
  77. package/components/toggle/v4/ToggleV4.vue.d.ts +1 -1
  78. package/components/toggle/v4/index.d.ts +20 -20
  79. package/index.d.ts +2401 -360
  80. package/index.js +119 -119
  81. package/mocks/apps.d.ts +7 -0
  82. package/package.json +6 -2
  83. package/testids/index.d.ts +3 -1
  84. package/testids/index.js +10 -10
  85. package/utils/array.js +1 -1
  86. package/ButtonV4.vue_vue_type_style_index_0_scoped_31e553e8_lang.css +0 -1
  87. package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_14dcdae5_lang.css +0 -1
  88. package/DataGrid.vue_vue_type_style_index_0_scoped_7a670808_lang.css +0 -1
  89. package/DataGridMenu.vue_vue_type_style_index_0_scoped_99f1dcca_lang.css +0 -1
  90. package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c218ef1f_lang.css +0 -1
  91. package/DialogV4.vue_vue_type_style_index_0_scoped_c0c12287_lang.css +0 -1
  92. package/DropdownV4.vue_vue_type_style_index_0_scoped_571b7c2f_lang.css +0 -1
  93. package/IncludeExclude.vue_vue_type_style_index_0_scoped_2a01a791_lang.css +0 -1
  94. package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_85bff8f4_lang.css +0 -1
  95. package/OptionV4.vue_vue_type_style_index_0_scoped_92add735_lang.css +0 -1
  96. package/Table.vue_vue_type_style_index_0_scoped_6b769df2_lang.css +0 -1
  97. package/TextField.vue_vue_type_style_index_0_scoped_d4dc4582_lang.css +0 -1
  98. package/components/skeleton/Skeleton.vue.js +0 -7
  99. /package/components/skeleton/{Skeleton.vue.d.ts → v3/Skeleton.vue.d.ts} +0 -0
  100. /package/components/skeleton/{index.d.ts → v3/index.d.ts} +0 -0
  101. /package/components/skeleton/{index.js → v3/index.js} +0 -0
@@ -0,0 +1,147 @@
1
+ import "../../../AppDropdownTrigger.vue_vue_type_style_index_0_scoped_c48dc06e_lang.css"; import { defineComponent as b, computed as r, openBlock as n, createElementBlock as a, normalizeClass as w, createElementVNode as o, mergeProps as h, unref as l, renderSlot as v, createCommentVNode as s, createVNode as i, withCtx as C, toDisplayString as A, pushScopeId as B, popScopeId as x } from "vue";
2
+ import p from "../../icon/v4/IconV4.vue.js";
3
+ import S from "../../typography/v4/Typography.vue.js";
4
+ import { DropdownTestIdModifiers as u } from "../../../testids/index.js";
5
+ import { useTestIdAttrs as K } from "../../../utils/testIds.js";
6
+ import N from "../../tooltip/v4/TooltipV4.vue.js";
7
+ import { useClipboard as $ } from "@vueuse/core";
8
+ import { Snackbar as z } from "../../snackbar/v4/index.js";
9
+ const D = (t) => (B("data-v-c48dc06e"), t = t(), x(), t), E = { class: "app-trigger--content" }, H = {
10
+ key: 0,
11
+ class: "image"
12
+ }, M = ["src"], P = {
13
+ key: 1,
14
+ class: "start-icon"
15
+ }, R = { class: "label-text" }, U = { key: 0 }, Z = { class: "text-content" }, W = { class: "text-content-value" }, j = {
16
+ key: 0,
17
+ class: "is-mandatory"
18
+ }, q = /* @__PURE__ */ D(() => /* @__PURE__ */ o("div", { class: "app-trigger-key--content" }, [
19
+ /* @__PURE__ */ o("svg", {
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ width: "16",
22
+ height: "16",
23
+ viewBox: "0 0 16 16",
24
+ fill: "none"
25
+ }, [
26
+ /* @__PURE__ */ o("path", {
27
+ d: "M8.43317 6.66667C7.8865 5.11333 6.4065 4 4.6665 4C2.45984 4 0.666504 5.79333 0.666504 8C0.666504 10.2067 2.45984 12 4.6665 12C6.4065 12 7.8865 10.8867 8.43317 9.33333H11.3332V12H13.9998V9.33333H15.3332V6.66667H8.43317ZM4.6665 9.33333C3.93317 9.33333 3.33317 8.73333 3.33317 8C3.33317 7.26667 3.93317 6.66667 4.6665 6.66667C5.39984 6.66667 5.99984 7.26667 5.99984 8C5.99984 8.73333 5.39984 9.33333 4.6665 9.33333Z",
28
+ fill: "#808080"
29
+ })
30
+ ])
31
+ ], -1)), te = /* @__PURE__ */ b({
32
+ __name: "AppDropdownTrigger",
33
+ props: {
34
+ placeholder: { default: "Select app" },
35
+ selectedOption: { default: null },
36
+ options: { default: null },
37
+ multi: { type: Boolean, default: !1 },
38
+ size: { default: "medium" },
39
+ open: { type: Boolean, default: !1 },
40
+ disabled: { type: Boolean, default: !1 },
41
+ testId: { default: "" },
42
+ valueToCopy: { default: null },
43
+ label: { default: "" },
44
+ mandatory: { type: Boolean, default: !1 },
45
+ loading: { type: Boolean, default: !1 },
46
+ singleAppSelection: { type: Boolean, default: !1 },
47
+ brandIconType: { default: null },
48
+ displayValue: null,
49
+ optionNameKey: { default: null },
50
+ optionImageKey: { default: null },
51
+ optionIconKey: { default: null },
52
+ optionIconType: { default: null }
53
+ },
54
+ emits: ["click"],
55
+ setup(t, { emit: T }) {
56
+ const e = t, { copy: k } = $({}), I = r(
57
+ () => e.feedbackVariant ? `state-${e.feedbackVariant}` : ""
58
+ ), O = () => {
59
+ T("click");
60
+ }, y = K(e.testId, u), f = "All apps selected", m = r(() => e.multi ? !Array.isArray(e.selectedOption) || !e.selectedOption?.length ? e.placeholder : e.options?.length === e.selectedOption.length ? f : e.selectedOption?.length === 1 && e.displayValue ? e.displayValue(e.selectedOption[0]) : `${e.selectedOption.length} selected` : e.selectedOption ? e.displayValue(e.selectedOption) : e.placeholder), d = r(() => {
61
+ if (!e.selectedOption)
62
+ return null;
63
+ if (!e.multi)
64
+ return e.selectedOption;
65
+ if (Array.isArray(e.selectedOption))
66
+ return e.selectedOption.length === 1 ? e.selectedOption[0] : null;
67
+ }), V = () => {
68
+ k(e.valueToCopy), z({
69
+ title: "Copied successfully",
70
+ type: "success",
71
+ duration: 2e3
72
+ });
73
+ };
74
+ return (c, g) => (n(), a("div", {
75
+ class: w(["app-trigger-wrapper", { "with-copy": !!t.valueToCopy }])
76
+ }, [
77
+ o("div", h({
78
+ class: ["app-trigger", [t.size, l(I), { open: t.open, disabled: t.disabled }]]
79
+ }, l(y)[l(u).BUTTON_WRAPPER], {
80
+ onClick: g[0] || (g[0] = (F) => O())
81
+ }), [
82
+ o("div", E, [
83
+ c.$slots.image || l(d) && t.optionImageKey ? (n(), a("div", H, [
84
+ v(c.$slots, "image", {}, () => [
85
+ t.optionImageKey ? (n(), a("img", {
86
+ key: 0,
87
+ src: l(d)[t.optionImageKey]
88
+ }, null, 8, M)) : s("", !0)
89
+ ], !0)
90
+ ])) : s("", !0),
91
+ c.$slots["icon-start"] || l(d) && t.optionIconKey ? (n(), a("div", P, [
92
+ v(c.$slots, "icon-start", {}, () => [
93
+ i(l(p), {
94
+ type: t.optionIconType,
95
+ name: l(d)[t.optionIconKey],
96
+ size: "16px"
97
+ }, null, 8, ["type", "name"])
98
+ ], !0)
99
+ ])) : s("", !0),
100
+ i(l(S), h({ variant: "button" }, l(y)[l(u).BUTTON_CONTENT], { class: "displayed-value" }), {
101
+ default: C(() => [
102
+ o("div", R, [
103
+ l(m) === f ? (n(), a("span", U, [
104
+ i(l(p), {
105
+ name: "cube",
106
+ size: "20px",
107
+ type: "fill"
108
+ })
109
+ ])) : s("", !0),
110
+ o("div", Z, [
111
+ o("div", W, A(l(m)), 1),
112
+ t.mandatory ? (n(), a("span", j, "*")) : s("", !0)
113
+ ])
114
+ ])
115
+ ]),
116
+ _: 1
117
+ }, 16)
118
+ ]),
119
+ o("div", null, [
120
+ i(l(p), {
121
+ name: "caret-down",
122
+ size: "20px",
123
+ class: "app-trigger--icon"
124
+ })
125
+ ])
126
+ ], 16),
127
+ t.valueToCopy ? (n(), a("div", {
128
+ key: 0,
129
+ class: "app-trigger-key",
130
+ onClick: V
131
+ }, [
132
+ i(l(N), {
133
+ text: t.valueToCopy,
134
+ header: "App key"
135
+ }, {
136
+ default: C(() => [
137
+ q
138
+ ]),
139
+ _: 1
140
+ }, 8, ["text"])
141
+ ])) : s("", !0)
142
+ ], 2));
143
+ }
144
+ });
145
+ export {
146
+ te as default
147
+ };
@@ -1,7 +1,7 @@
1
1
  import o from "./ChipDropdownTrigger.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_14dcdae5_lang.css"; //*');
4
- const d = /* @__PURE__ */ e(o, [["__scopeId", "data-v-14dcdae5"]]);
3
+ // import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e5202bb9_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e5202bb9"]]);
5
5
  export {
6
- d as default
6
+ s as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_14dcdae5_lang.css"; import { defineComponent as V, ref as b, computed as p, openBlock as _, createElementBlock as C, mergeProps as n, unref as t, createElementVNode as c, createVNode as d, withCtx as w, createTextVNode as k, toDisplayString as v, withDirectives as u, vShow as f, withModifiers as x } from "vue";
1
+ import "../../../ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e5202bb9_lang.css"; import { defineComponent as V, ref as b, computed as p, openBlock as _, createElementBlock as C, mergeProps as s, unref as t, createElementVNode as c, createVNode as d, withCtx as w, createTextVNode as k, toDisplayString as v, withDirectives as u, vShow as f, withModifiers as x } from "vue";
2
2
  import m from "../../icon/v4/IconV4.vue.js";
3
3
  import A from "../../typography/v4/Typography.vue.js";
4
4
  import { DropdownTestIdModifiers as o } from "../../../testids/index.js";
@@ -26,20 +26,20 @@ const N = { class: "chip-trigger--content" }, I = { class: "chip-trigger--icon"
26
26
  return Array.isArray(l) && (l.length > 1 ? a = `${l[0]}, +${l[1]}` : a = l[0] ? `${l[0]}` : ""), i.value = !!a, a ? `${e.label}: ${a}` : e.label;
27
27
  }, O = p(
28
28
  () => e.feedbackVariant ? `state-${e.feedbackVariant}` : ""
29
- ), s = B(e.testId, o), T = p(() => {
29
+ ), n = B(e.testId, o), T = p(() => {
30
30
  if (!e.multi)
31
31
  return e.selectedOption ? e.displayValue(e.selectedOption) : "";
32
32
  if (Array.isArray(e.selectedOption))
33
33
  return e.selectedOption.length ? e.options.length === e.selectedOption.length ? ["All"] : e.selectedOption.length == 1 && e.displayValue ? [e.displayValue(e.selectedOption[0])] : [
34
34
  e.displayValue(e.selectedOption[0]),
35
- e.selectedOption.length
35
+ e.selectedOption.length - 1
36
36
  ] : [];
37
37
  });
38
- return (l, a) => (_(), C("div", n({
39
- class: ["chip-trigger", [t(O), { active: r.open || i.value, disabled: r.disabled }]]
40
- }, t(s)[t(o).BUTTON]), [
38
+ return (l, a) => (_(), C("div", s({
39
+ class: ["chip-trigger", [t(O), { active: i.value, disabled: r.disabled, open: r.open }]]
40
+ }, t(n)[t(o).BUTTON]), [
41
41
  c("div", N, [
42
- d(t(A), n({ variant: "chipLabel" }, t(s)[t(o).BUTTON_CONTENT]), {
42
+ d(t(A), s({ variant: "chipLabel" }, t(n)[t(o).BUTTON_CONTENT]), {
43
43
  default: w(() => [
44
44
  k(v(g(t(T))), 1)
45
45
  ]),
@@ -53,7 +53,7 @@ const N = { class: "chip-trigger--content" }, I = { class: "chip-trigger--icon"
53
53
  ], 512), [
54
54
  [f, !i.value]
55
55
  ]),
56
- u(c("div", n({ class: "x-circle-wrapper" }, t(s)[t(o).BUTTON_CLEAR], {
56
+ u(c("div", s({ class: "x-circle-wrapper" }, t(n)[t(o).BUTTON_CLEAR], {
57
57
  onClick: x(y, ["stop"])
58
58
  }), [
59
59
  d(t(m), {
@@ -1,7 +1,8 @@
1
1
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
2
2
  placeholder?: string;
3
- selected?: unknown;
4
- options?: unknown;
3
+ selectedOption?: unknown;
4
+ options?: unknown[];
5
+ multi?: boolean;
5
6
  size?: "small" | "medium" | "large";
6
7
  open: boolean;
7
8
  disabled?: boolean;
@@ -15,14 +16,20 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
15
16
  loading?: boolean;
16
17
  singleAppSelection?: boolean;
17
18
  brandIconType?: "android" | "ios";
19
+ displayValue: (option: unknown) => string;
20
+ optionNameKey?: string;
21
+ optionImageKey?: string;
22
+ optionIconKey?: string;
23
+ optionIconType?: "fill" | "bold" | "ab-test" | "regular" | "branded" | "ad-unit";
18
24
  }>, {
19
25
  placeholder: string;
20
- selected: any;
26
+ selectedOption: any;
21
27
  options: any;
22
28
  size: string;
23
29
  open: boolean;
24
30
  disabled: boolean;
25
31
  testId: string;
32
+ multi: boolean;
26
33
  label: string;
27
34
  mandatory: boolean;
28
35
  hoverHelpText: string;
@@ -32,12 +39,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
32
39
  loading: boolean;
33
40
  singleAppSelection: boolean;
34
41
  brandIconType: any;
42
+ optionNameKey: any;
43
+ optionImageKey: any;
44
+ optionIconKey: any;
45
+ optionIconType: any;
35
46
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
47
  click: () => void;
37
48
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
38
49
  placeholder?: string;
39
- selected?: unknown;
40
- options?: unknown;
50
+ selectedOption?: unknown;
51
+ options?: unknown[];
52
+ multi?: boolean;
41
53
  size?: "small" | "medium" | "large";
42
54
  open: boolean;
43
55
  disabled?: boolean;
@@ -51,14 +63,20 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
51
63
  loading?: boolean;
52
64
  singleAppSelection?: boolean;
53
65
  brandIconType?: "android" | "ios";
66
+ displayValue: (option: unknown) => string;
67
+ optionNameKey?: string;
68
+ optionImageKey?: string;
69
+ optionIconKey?: string;
70
+ optionIconType?: "fill" | "bold" | "ab-test" | "regular" | "branded" | "ad-unit";
54
71
  }>, {
55
72
  placeholder: string;
56
- selected: any;
73
+ selectedOption: any;
57
74
  options: any;
58
75
  size: string;
59
76
  open: boolean;
60
77
  disabled: boolean;
61
78
  testId: string;
79
+ multi: boolean;
62
80
  label: string;
63
81
  mandatory: boolean;
64
82
  hoverHelpText: string;
@@ -68,6 +86,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
68
86
  loading: boolean;
69
87
  singleAppSelection: boolean;
70
88
  brandIconType: any;
89
+ optionNameKey: any;
90
+ optionImageKey: any;
91
+ optionIconKey: any;
92
+ optionIconType: any;
71
93
  }>>> & {
72
94
  onClick?: () => any;
73
95
  }, {
@@ -76,19 +98,25 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
76
98
  testId: string;
77
99
  loading: boolean;
78
100
  disabled: boolean;
79
- selected: any;
80
- options: any;
101
+ options: unknown[];
81
102
  singleAppSelection: boolean;
82
103
  placeholder: string;
83
104
  open: boolean;
84
105
  mandatory: boolean;
85
- feedbackVariant: "error" | "success" | "warning";
106
+ multi: boolean;
107
+ selectedOption: any;
108
+ brandIconType: "android" | "ios";
109
+ optionNameKey: string;
110
+ optionImageKey: string;
111
+ optionIconKey: string;
112
+ optionIconType: "fill" | "bold" | "ab-test" | "regular" | "branded" | "ad-unit";
86
113
  hoverHelpText: string;
87
114
  hoverHelpTextPlacement: "auto" | "auto-start" | "auto-end" | "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
88
115
  feedbackText: string;
89
- brandIconType: "android" | "ios";
116
+ feedbackVariant: "error" | "success" | "warning";
90
117
  }>, {
91
- "brand-icon"?(_: {}): any;
118
+ image?(_: {}): any;
119
+ "icon-start"?(_: {}): any;
92
120
  }>;
93
121
  export default _default;
94
122
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -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_c218ef1f_lang.css"; //*');
4
- const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-c218ef1f"]]);
3
+ // import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c6156fa0_lang.css"; //*');
4
+ const p = /* @__PURE__ */ e(o, [["__scopeId", "data-v-c6156fa0"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,17 +1,24 @@
1
- import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c218ef1f_lang.css"; import { defineComponent as h, computed as p, openBlock as a, createElementBlock as d, Fragment as s, createBlock as f, createCommentVNode as l, createElementVNode as o, mergeProps as u, unref as t, renderSlot as x, createVNode as m, withCtx as v, createTextVNode as I, toDisplayString as g } from "vue";
2
- import B from "../../typography/v4/Typography.vue.js";
3
- import { DropdownTestIdModifiers as r } from "../../../testids/index.js";
4
- import V from "../../icon/v4/IconV4.vue.js";
1
+ import "../../../DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c6156fa0_lang.css"; import { defineComponent as O, computed as r, openBlock as a, createElementBlock as i, Fragment as I, createBlock as m, createCommentVNode as n, createElementVNode as s, mergeProps as y, unref as l, renderSlot as h, createVNode as c, withCtx as x, createTextVNode as V, toDisplayString as B } from "vue";
2
+ import A from "../../typography/v4/Typography.vue.js";
3
+ import { DropdownTestIdModifiers as u } from "../../../testids/index.js";
4
+ import g from "../../icon/v4/IconV4.vue.js";
5
5
  import N from "../../shared/FieldLabel.vue.js";
6
- import C from "../../shared/FieldHelpText.vue.js";
7
- import { useTestIdAttrs as w } from "../../../utils/testIds.js";
8
- const A = { class: "content" }, H = { key: 0 }, P = { key: 1 }, U = /* @__PURE__ */ h({
6
+ import K from "../../shared/FieldHelpText.vue.js";
7
+ import { useTestIdAttrs as C } from "../../../utils/testIds.js";
8
+ const $ = { class: "content" }, D = {
9
+ key: 0,
10
+ class: "image"
11
+ }, w = ["src"], H = {
12
+ key: 1,
13
+ class: "start-icon"
14
+ }, M = /* @__PURE__ */ O({
9
15
  __name: "DefaultDropdownTrigger",
10
16
  props: {
11
17
  placeholder: { default: "Select" },
12
- selected: { default: null },
18
+ selectedOption: { default: null },
13
19
  options: { default: null },
14
- size: { default: "small" },
20
+ multi: { type: Boolean, default: !1 },
21
+ size: { default: "medium" },
15
22
  open: { type: Boolean, default: !1 },
16
23
  disabled: { type: Boolean, default: !1 },
17
24
  testId: { default: "" },
@@ -23,60 +30,83 @@ const A = { class: "content" }, H = { key: 0 }, P = { key: 1 }, U = /* @__PURE__
23
30
  feedbackText: { default: "" },
24
31
  loading: { type: Boolean, default: !1 },
25
32
  singleAppSelection: { type: Boolean, default: !1 },
26
- brandIconType: { default: null }
33
+ brandIconType: { default: null },
34
+ displayValue: null,
35
+ optionNameKey: { default: null },
36
+ optionImageKey: { default: null },
37
+ optionIconKey: { default: null },
38
+ optionIconType: { default: null }
27
39
  },
28
40
  emits: ["click"],
29
- setup(e, { emit: b }) {
30
- const n = e, T = p(
31
- () => n.feedbackVariant ? `state-${n.feedbackVariant}` : ""
32
- ), y = () => {
33
- b("click");
34
- }, i = w(n.testId, r);
35
- return (k, c) => (a(), d(s, null, [
36
- e.label ? (a(), f(N, {
41
+ setup(t, { emit: T }) {
42
+ const e = t, b = r(
43
+ () => e.feedbackVariant ? `state-${e.feedbackVariant}` : ""
44
+ ), k = () => {
45
+ T("click");
46
+ }, f = C(e.testId, u), v = r(() => e.multi ? !Array.isArray(e.selectedOption) || !e.selectedOption?.length ? e.placeholder : e.options?.length === e.selectedOption.length ? "All" : e.selectedOption?.length === 1 && e.displayValue ? e.displayValue(e.selectedOption[0]) : `${e.selectedOption.length} selected` : e.selectedOption ? e.displayValue(e.selectedOption) : e.placeholder), o = r(() => {
47
+ if (!e.selectedOption)
48
+ return null;
49
+ if (!e.multi)
50
+ return e.selectedOption;
51
+ if (Array.isArray(e.selectedOption))
52
+ return e.selectedOption.length === 1 ? e.selectedOption[0] : null;
53
+ });
54
+ return (d, p) => (a(), i(I, null, [
55
+ t.label ? (a(), m(N, {
37
56
  key: 0,
38
- label: e.label,
39
- mandatory: e.mandatory,
40
- "hover-help-text": e.hoverHelpText,
41
- "hover-help-text-placement": e.hoverHelpTextPlacement,
42
- disabled: e.disabled,
43
- "test-id": e.testId
44
- }, null, 8, ["label", "mandatory", "hover-help-text", "hover-help-text-placement", "disabled", "test-id"])) : l("", !0),
45
- o("div", u({
46
- class: ["dropdown-trigger", [e.size, t(T), { open: e.open, disabled: e.disabled }]]
47
- }, t(i)[t(r).BUTTON_WRAPPER], {
48
- onClick: c[0] || (c[0] = (D) => y())
57
+ label: t.label,
58
+ mandatory: t.mandatory,
59
+ "hover-help-text": t.hoverHelpText,
60
+ "hover-help-text-placement": t.hoverHelpTextPlacement,
61
+ disabled: t.disabled,
62
+ "test-id": t.testId
63
+ }, null, 8, ["label", "mandatory", "hover-help-text", "hover-help-text-placement", "disabled", "test-id"])) : n("", !0),
64
+ s("div", y({
65
+ class: ["dropdown-trigger", [t.size, l(b), { open: t.open, disabled: t.disabled }]]
66
+ }, l(f)[l(u).BUTTON_WRAPPER], {
67
+ onClick: p[0] || (p[0] = (P) => k())
49
68
  }), [
50
- o("div", A, [
51
- x(k.$slots, "brand-icon", {}, () => [
52
- e.brandIconType ? (a(), d(s, { key: 0 }, [
53
- e.brandIconType === "android" ? (a(), d("span", H, "A")) : l("", !0),
54
- e.brandIconType === "ios" ? (a(), d("span", P, "I")) : l("", !0)
55
- ], 64)) : l("", !0)
56
- ], !0),
57
- m(t(B), u({ variant: "body1" }, t(i)[t(r).BUTTON_CONTENT]), {
58
- default: v(() => [
59
- I(g(e.placeholder), 1)
69
+ s("div", $, [
70
+ d.$slots.image || l(o) && t.optionImageKey ? (a(), i("div", D, [
71
+ h(d.$slots, "image", {}, () => [
72
+ t.optionImageKey ? (a(), i("img", {
73
+ key: 0,
74
+ src: l(o)[t.optionImageKey]
75
+ }, null, 8, w)) : n("", !0)
76
+ ], !0)
77
+ ])) : n("", !0),
78
+ d.$slots["icon-start"] || l(o) && t.optionIconKey ? (a(), i("div", H, [
79
+ h(d.$slots, "icon-start", {}, () => [
80
+ c(l(g), {
81
+ type: t.optionIconType,
82
+ name: l(o)[t.optionIconKey],
83
+ size: "16px"
84
+ }, null, 8, ["type", "name"])
85
+ ], !0)
86
+ ])) : n("", !0),
87
+ c(l(A), y({ variant: "body1" }, l(f)[l(u).BUTTON_CONTENT], { class: "displayed-value" }), {
88
+ default: x(() => [
89
+ V(B(l(v)), 1)
60
90
  ]),
61
91
  _: 1
62
92
  }, 16)
63
93
  ]),
64
- o("div", null, [
65
- m(t(V), {
94
+ s("div", null, [
95
+ c(l(g), {
66
96
  name: "caret-down",
67
97
  size: "20px"
68
98
  })
69
99
  ])
70
100
  ], 16),
71
- e.feedbackText ? (a(), f(C, {
101
+ t.feedbackText ? (a(), m(K, {
72
102
  key: 1,
73
- text: e.feedbackText,
74
- variant: e.feedbackVariant,
75
- "test-id": e.testId
76
- }, null, 8, ["text", "variant", "test-id"])) : l("", !0)
103
+ text: t.feedbackText,
104
+ variant: t.feedbackVariant,
105
+ "test-id": t.testId
106
+ }, null, 8, ["text", "variant", "test-id"])) : n("", !0)
77
107
  ], 64));
78
108
  }
79
109
  });
80
110
  export {
81
- U as default
111
+ M as default
82
112
  };
@@ -1,3 +1,3 @@
1
- export declare const TRIGGER_TYPES: readonly ["default", "icon-button", "chip"];
1
+ export declare const TRIGGER_TYPES: readonly ["default", "icon-button", "chip", "app"];
2
2
  export type TriggerType = (typeof TRIGGER_TYPES)[number];
3
3
  export declare const TRIGGERS: Record<string, TriggerType>;
@@ -1,7 +1,8 @@
1
1
  const t = {
2
2
  DEFAULT: "default",
3
3
  ICON_BUTTON: "icon-button",
4
- CHIP: "chip"
4
+ CHIP: "chip",
5
+ APP: "app"
5
6
  };
6
7
  export {
7
8
  t as TRIGGERS
@@ -30,7 +30,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
30
30
  triggerFeedbackVariant?: "error" | "success" | "warning";
31
31
  size?: "sm" | "lg";
32
32
  mandatory?: boolean;
33
- predefinedTrigger?: "default" | "icon-button" | "chip";
33
+ predefinedTrigger?: "default" | "icon-button" | "chip" | "app";
34
34
  inlineSearch?: boolean;
35
35
  inlineSearchPlaceholder?: string;
36
36
  onSearch?: (option: any, term: string) => boolean;
@@ -38,7 +38,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
38
38
  searchAutoFocus?: boolean;
39
39
  onClear?: () => void;
40
40
  displayValue: (option: unknown) => string;
41
+ optionNameKey?: string;
42
+ optionIconKey?: string;
43
+ optionImageKey?: string;
44
+ optionIconType?: "fill" | "bold" | "ab-test" | "regular" | "branded" | "ad-unit";
45
+ valueToCopy?: string;
41
46
  theme?: string;
47
+ fullWidth?: boolean;
48
+ optionsListWidth?: string;
42
49
  }>, {
43
50
  multi: boolean;
44
51
  inlineSearchPlaceholder: string;
@@ -57,7 +64,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
57
64
  disabled: boolean;
58
65
  placeholder: string;
59
66
  size: string;
60
- onSearch: () => true;
67
+ onSearch: any;
61
68
  onClear: () => true;
62
69
  theme: string;
63
70
  container: string;
@@ -71,7 +78,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
71
78
  triggerFeedbackText: string;
72
79
  triggerFeedbackVariant: any;
73
80
  searchAutoFocus: boolean;
74
- predefinedTrigger: "default" | "icon-button" | "chip";
81
+ predefinedTrigger: "default" | "icon-button" | "chip" | "app";
82
+ optionNameKey: string;
83
+ optionIconKey: string;
84
+ optionImageKey: string;
85
+ optionIconType: any;
86
+ valueToCopy: any;
87
+ fullWidth: boolean;
88
+ optionsListWidth: any;
75
89
  }>, {
76
90
  selectItem: (option: any, index?: number) => void;
77
91
  scrollTo: (index: number) => void;
@@ -112,7 +126,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
112
126
  triggerFeedbackVariant?: "error" | "success" | "warning";
113
127
  size?: "sm" | "lg";
114
128
  mandatory?: boolean;
115
- predefinedTrigger?: "default" | "icon-button" | "chip";
129
+ predefinedTrigger?: "default" | "icon-button" | "chip" | "app";
116
130
  inlineSearch?: boolean;
117
131
  inlineSearchPlaceholder?: string;
118
132
  onSearch?: (option: any, term: string) => boolean;
@@ -120,7 +134,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
120
134
  searchAutoFocus?: boolean;
121
135
  onClear?: () => void;
122
136
  displayValue: (option: unknown) => string;
137
+ optionNameKey?: string;
138
+ optionIconKey?: string;
139
+ optionImageKey?: string;
140
+ optionIconType?: "fill" | "bold" | "ab-test" | "regular" | "branded" | "ad-unit";
141
+ valueToCopy?: string;
123
142
  theme?: string;
143
+ fullWidth?: boolean;
144
+ optionsListWidth?: string;
124
145
  }>, {
125
146
  multi: boolean;
126
147
  inlineSearchPlaceholder: string;
@@ -139,7 +160,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
139
160
  disabled: boolean;
140
161
  placeholder: string;
141
162
  size: string;
142
- onSearch: () => true;
163
+ onSearch: any;
143
164
  onClear: () => true;
144
165
  theme: string;
145
166
  container: string;
@@ -153,7 +174,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
153
174
  triggerFeedbackText: string;
154
175
  triggerFeedbackVariant: any;
155
176
  searchAutoFocus: boolean;
156
- predefinedTrigger: "default" | "icon-button" | "chip";
177
+ predefinedTrigger: "default" | "icon-button" | "chip" | "app";
178
+ optionNameKey: string;
179
+ optionIconKey: string;
180
+ optionImageKey: string;
181
+ optionIconType: any;
182
+ valueToCopy: any;
183
+ fullWidth: boolean;
184
+ optionsListWidth: any;
157
185
  }>>> & {
158
186
  onApply?: (value: unknown) => any;
159
187
  "onUpdate:selected"?: (value: unknown) => any;
@@ -184,6 +212,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
184
212
  keepOpen: boolean;
185
213
  autoSize: boolean;
186
214
  disableKeyboardEvents: boolean;
215
+ valueToCopy: string;
216
+ optionNameKey: string;
217
+ optionImageKey: string;
218
+ optionIconKey: string;
219
+ optionIconType: "fill" | "bold" | "ab-test" | "regular" | "branded" | "ad-unit";
187
220
  onClear: () => void;
188
221
  inlineSearchPlaceholder: string;
189
222
  triggerLabel: string;
@@ -191,7 +224,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
191
224
  triggerFeedbackText: string;
192
225
  triggerFeedbackVariant: "error" | "success" | "warning";
193
226
  searchAutoFocus: boolean;
194
- predefinedTrigger: "default" | "icon-button" | "chip";
227
+ predefinedTrigger: "default" | "icon-button" | "chip" | "app";
228
+ fullWidth: boolean;
229
+ optionsListWidth: string;
195
230
  }>, {
196
231
  label?(_: {}): any;
197
232
  "dropdown-trigger"?(_: {}): any;
@@ -1,8 +1,8 @@
1
1
  import o from "./DropdownV4.vue2.js";
2
- /* empty css *//* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_571b7c2f_lang.css"; //*');
2
+ /* empty css *//* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../DropdownV4.vue_vue_type_style_index_0_scoped_19f8fedd_lang.css"; //*');
4
4
  // import "../../../DropdownV4.vue_vue_type_style_index_1_lang.css"; //');
5
- const r = /* @__PURE__ */ _(o, [["__scopeId", "data-v-571b7c2f"]]);
5
+ const d = /* @__PURE__ */ e(o, [["__scopeId", "data-v-19f8fedd"]]);
6
6
  export {
7
- r as default
7
+ d as default
8
8
  };