@ironsource/shared-ui 2.1.6-rc.37 → 2.1.6-rc.38

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.
@@ -0,0 +1 @@
1
+ .child-options[data-v-54adec1e]{padding-left:1rem}
@@ -5,6 +5,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
5
5
  isOpen?: boolean;
6
6
  placeholder?: string;
7
7
  inlineSearchPlaceholder?: string;
8
+ size?: 'small' | 'medium' | 'large';
9
+ disabled?: boolean;
10
+ testId?: string;
8
11
  displayValue: (option: unknown) => string;
9
12
  optionNameKey?: string;
10
13
  optionIconKey?: string;
@@ -19,6 +22,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
19
22
  selected: any;
20
23
  placeholder: string;
21
24
  inlineSearchPlaceholder: string;
25
+ size: string;
26
+ disabled: boolean;
27
+ testId: string;
22
28
  optionNameKey: string;
23
29
  optionIconKey: string;
24
30
  optionImageKey: string;
@@ -37,6 +43,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
37
43
  isOpen?: boolean;
38
44
  placeholder?: string;
39
45
  inlineSearchPlaceholder?: string;
46
+ size?: 'small' | 'medium' | 'large';
47
+ disabled?: boolean;
48
+ testId?: string;
40
49
  displayValue: (option: unknown) => string;
41
50
  optionNameKey?: string;
42
51
  optionIconKey?: string;
@@ -51,6 +60,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
51
60
  selected: any;
52
61
  placeholder: string;
53
62
  inlineSearchPlaceholder: string;
63
+ size: string;
64
+ disabled: boolean;
65
+ testId: string;
54
66
  optionNameKey: string;
55
67
  optionIconKey: string;
56
68
  optionImageKey: string;
@@ -64,6 +76,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
64
76
  "onUpdate:selected"?: (value: unknown) => any;
65
77
  "onUpdate:isOpen"?: (value: unknown) => any;
66
78
  }, {
79
+ disabled: boolean;
80
+ size: 'small' | 'medium' | 'large';
81
+ testId: string;
67
82
  selected: unknown[];
68
83
  placeholder: string;
69
84
  inlineSearchPlaceholder: string;
@@ -1,7 +1,7 @@
1
- import o from "./TreeDropdown.vue2.js";
2
- /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_4492426c_lang.css"; //*');
4
- const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-4492426c"]]);
1
+ import e from "./TreeDropdown.vue2.js";
2
+ /* empty css */import o from "../../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_54adec1e_lang.css"; //*');
4
+ const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-54adec1e"]]);
5
5
  export {
6
6
  s as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_4492426c_lang.css"; import { defineComponent as w, ref as S, watch as T, computed as E, openBlock as s, createBlock as f, unref as i, withCtx as N, createVNode as B, withModifiers as k, createElementBlock as h, Fragment as V, renderList as x, createCommentVNode as L } from "vue";
2
- import D from "./DropdownV4.vue.js";
1
+ import "../../../TreeDropdown.vue_vue_type_style_index_0_scoped_54adec1e_lang.css"; import { defineComponent as O, ref as S, watch as T, openBlock as s, createBlock as f, unref as d, withCtx as w, createVNode as E, withModifiers as k, createElementBlock as h, Fragment as N, renderList as B, createCommentVNode as z } from "vue";
2
+ import V from "./DropdownV4.vue.js";
3
3
  import "./DefaultDropdownTrigger.vue.js";
4
4
  import "./IconButtonDropdownTrigger.vue.js";
5
5
  import "./ChipDropdownTrigger.vue.js";
@@ -8,11 +8,11 @@ import "./ButtonDropdownTrigger.vue.js";
8
8
  import "./ButtonFilterDropdownTrigger.vue.js";
9
9
  import "./TreeDropdown.vue.js";
10
10
  import v from "./OptionV4.vue.js";
11
- import { useChildOptions as P } from "../composables/useChildOptions.js";
12
- const U = {
11
+ import { useChildOptions as x } from "../composables/useChildOptions.js";
12
+ const D = {
13
13
  key: 0,
14
14
  class: "child-options"
15
- }, R = /* @__PURE__ */ w({
15
+ }, J = /* @__PURE__ */ O({
16
16
  __name: "TreeDropdown",
17
17
  props: {
18
18
  options: null,
@@ -20,6 +20,9 @@ const U = {
20
20
  isOpen: { type: Boolean },
21
21
  placeholder: { default: "Select" },
22
22
  inlineSearchPlaceholder: { default: "Search" },
23
+ size: { default: "medium" },
24
+ disabled: { type: Boolean, default: !1 },
25
+ testId: { default: "" },
23
26
  displayValue: null,
24
27
  optionNameKey: { default: "" },
25
28
  optionIconKey: { default: "" },
@@ -33,32 +36,32 @@ const U = {
33
36
  },
34
37
  emits: ["update:selected", "update:isOpen"],
35
38
  setup(e, { emit: u }) {
36
- const a = e, n = S(a.selected);
39
+ const o = e, l = S(o.selected);
37
40
  T(
38
- () => a.selected,
41
+ () => o.selected,
39
42
  () => {
40
- n.value = [...a.selected];
43
+ l.value = [...o.selected];
41
44
  }
42
45
  );
43
- const { hasChildren: r, getChildren: d, allChildrenSelected: y, someChildrenSelected: C } = P(n, a.optionChildrenKey), p = (t) => {
44
- if (r(t)) {
45
- y(t) ? n.value = n.value.filter(
46
- (o) => !d(t).includes(o)
47
- ) : n.value = [
48
- ...n.value.filter((o) => !d(t).includes(o)),
49
- ...d(t)
46
+ const { hasChildren: y, getChildren: a, allChildrenSelected: r, someChildrenSelected: K } = x(l, o.optionChildrenKey), p = (t) => {
47
+ if (y(t)) {
48
+ r(t) ? l.value = l.value.filter(
49
+ (i) => !a(t).includes(i)
50
+ ) : l.value = [
51
+ ...l.value.filter((i) => !a(t).includes(i)),
52
+ ...a(t)
50
53
  ];
51
54
  return;
52
55
  }
53
- n.value.includes(t) ? n.value = n.value.filter(
54
- (o) => o !== t
55
- ) : n.value = [...n.value, t];
56
- }, m = (t) => n.value.includes(t), K = () => {
57
- u("update:selected", n.value);
58
- }, I = () => {
59
- n.value = [];
60
- }, g = E(() => ({ text: t }, o) => t.toLowerCase().replace(/\s+/g, "").includes(o.toLowerCase().replace(/\s+/g, "")));
61
- return (t, o) => (s(), f(i(D), {
56
+ l.value.includes(t) ? l.value = l.value.filter(
57
+ (i) => i !== t
58
+ ) : l.value = [...l.value, t];
59
+ }, m = (t) => l.value.includes(t), I = () => {
60
+ u("update:selected", l.value);
61
+ }, C = () => {
62
+ l.value = [];
63
+ };
64
+ return (t, i) => (s(), f(d(V), {
62
65
  multi: "",
63
66
  class: "tree-dropdown",
64
67
  "show-select-all": !1,
@@ -68,31 +71,33 @@ const U = {
68
71
  "display-value": e.displayValue,
69
72
  placeholder: e.placeholder,
70
73
  "inline-search-placeholder": e.inlineSearchPlaceholder,
71
- "on-search": i(g),
72
74
  "option-name-key": e.optionNameKey,
75
+ size: e.size,
76
+ "test-id": e.testId,
77
+ disabled: e.disabled,
73
78
  "disable-virtual-scroll": "",
74
- "onUpdate:selected": o[0] || (o[0] = (l) => u("update:selected", l)),
75
- "onUpdate:isOpen": o[1] || (o[1] = (l) => u("update:isOpen", l)),
76
- onApply: K,
77
- onClear: I
79
+ "onUpdate:selected": i[0] || (i[0] = (n) => u("update:selected", n)),
80
+ "onUpdate:isOpen": i[1] || (i[1] = (n) => u("update:isOpen", n)),
81
+ onApply: I,
82
+ onClear: C
78
83
  }, {
79
- default: N(({ option: l, index: O }) => [
80
- B(i(v), {
81
- option: l,
82
- "selected-prop": i(r)(l) ? i(y)(l) : m(l),
83
- "is-indeterminate": !i(y)(l) && i(C)(l),
84
- disabled: l[e.disabledOptionKey],
84
+ default: w(({ option: n, index: b }) => [
85
+ E(d(v), {
86
+ option: n,
87
+ "selected-prop": d(y)(n) ? d(r)(n) : m(n),
88
+ "is-indeterminate": !d(r)(n) && d(K)(n),
89
+ disabled: n[e.disabledOptionKey],
85
90
  "name-key": e.optionNameKey,
86
91
  "image-key": e.optionImageKey,
87
92
  "icon-key": e.optionIconKey,
88
93
  "icon-type": e.optionIconType,
89
94
  "end-icon-key": e.optionEndIconKey,
90
95
  "end-icon-type": e.optionEndIconType,
91
- onClick: k(() => p(l), ["stop"])
96
+ onClick: k(() => p(n), ["stop"])
92
97
  }, null, 8, ["option", "selected-prop", "is-indeterminate", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "onClick"]),
93
- i(r)(l) ? (s(), h("div", U, [
94
- (s(!0), h(V, null, x(i(d)(l), (c, b) => (s(), f(i(v), {
95
- key: `${O}-${b}`,
98
+ d(y)(n) ? (s(), h("div", D, [
99
+ (s(!0), h(N, null, B(d(a)(n), (c, g) => (s(), f(d(v), {
100
+ key: `${b}-${g}`,
96
101
  option: c,
97
102
  "selected-prop": m(c),
98
103
  disabled: c[e.disabledOptionKey],
@@ -104,12 +109,12 @@ const U = {
104
109
  "end-icon-type": e.optionEndIconType,
105
110
  onClick: k(() => p(c), ["stop"])
106
111
  }, null, 8, ["option", "selected-prop", "disabled", "name-key", "image-key", "icon-key", "icon-type", "end-icon-key", "end-icon-type", "onClick"]))), 128))
107
- ])) : L("", !0)
112
+ ])) : z("", !0)
108
113
  ]),
109
114
  _: 1
110
- }, 8, ["is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "on-search", "option-name-key"]));
115
+ }, 8, ["is-open", "options", "selected", "display-value", "placeholder", "inline-search-placeholder", "option-name-key", "size", "test-id", "disabled"]));
111
116
  }
112
117
  });
113
118
  export {
114
- R as default
119
+ J as default
115
120
  };
@@ -2561,6 +2561,18 @@ declare const DropdownTypes: () => (({
2561
2561
  startIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
2562
2562
  hideEndIcon: boolean;
2563
2563
  }> | import("vue").DefineComponent<{
2564
+ disabled: {
2565
+ type: import("vue").PropType<boolean>;
2566
+ default: boolean;
2567
+ };
2568
+ size: {
2569
+ type: import("vue").PropType<"small" | "medium" | "large">;
2570
+ default: string;
2571
+ };
2572
+ testId: {
2573
+ type: import("vue").PropType<string>;
2574
+ default: string;
2575
+ };
2564
2576
  selected: {
2565
2577
  type: import("vue").PropType<unknown[]>;
2566
2578
  default: any;
@@ -2624,6 +2636,18 @@ declare const DropdownTypes: () => (({
2624
2636
  "update:selected": (value: unknown) => void;
2625
2637
  "update:isOpen": (value: unknown) => void;
2626
2638
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
2639
+ disabled: {
2640
+ type: import("vue").PropType<boolean>;
2641
+ default: boolean;
2642
+ };
2643
+ size: {
2644
+ type: import("vue").PropType<"small" | "medium" | "large">;
2645
+ default: string;
2646
+ };
2647
+ testId: {
2648
+ type: import("vue").PropType<string>;
2649
+ default: string;
2650
+ };
2627
2651
  selected: {
2628
2652
  type: import("vue").PropType<unknown[]>;
2629
2653
  default: any;
@@ -2687,6 +2711,9 @@ declare const DropdownTypes: () => (({
2687
2711
  "onUpdate:selected"?: (value: unknown) => any;
2688
2712
  "onUpdate:isOpen"?: (value: unknown) => any;
2689
2713
  }, {
2714
+ disabled: boolean;
2715
+ size: "small" | "medium" | "large";
2716
+ testId: string;
2690
2717
  selected: unknown[];
2691
2718
  placeholder: string;
2692
2719
  inlineSearchPlaceholder: string;
package/index.d.ts CHANGED
@@ -16658,6 +16658,18 @@ declare const _default: {
16658
16658
  startIconType: "fill" | "bold" | "regular" | "branded" | "ad-unit" | "ab-test" | "ad-networks" | "ad-networks/flat";
16659
16659
  hideEndIcon: boolean;
16660
16660
  }> | import("vue").DefineComponent<{
16661
+ disabled: {
16662
+ type: import("vue").PropType<boolean>;
16663
+ default: boolean;
16664
+ };
16665
+ size: {
16666
+ type: import("vue").PropType<"small" | "medium" | "large">;
16667
+ default: string;
16668
+ };
16669
+ testId: {
16670
+ type: import("vue").PropType<string>;
16671
+ default: string;
16672
+ };
16661
16673
  selected: {
16662
16674
  type: import("vue").PropType<unknown[]>;
16663
16675
  default: any;
@@ -16721,6 +16733,18 @@ declare const _default: {
16721
16733
  "update:selected": (value: unknown) => void;
16722
16734
  "update:isOpen": (value: unknown) => void;
16723
16735
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
16736
+ disabled: {
16737
+ type: import("vue").PropType<boolean>;
16738
+ default: boolean;
16739
+ };
16740
+ size: {
16741
+ type: import("vue").PropType<"small" | "medium" | "large">;
16742
+ default: string;
16743
+ };
16744
+ testId: {
16745
+ type: import("vue").PropType<string>;
16746
+ default: string;
16747
+ };
16724
16748
  selected: {
16725
16749
  type: import("vue").PropType<unknown[]>;
16726
16750
  default: any;
@@ -16784,6 +16808,9 @@ declare const _default: {
16784
16808
  "onUpdate:selected"?: (value: unknown) => any;
16785
16809
  "onUpdate:isOpen"?: (value: unknown) => any;
16786
16810
  }, {
16811
+ disabled: boolean;
16812
+ size: "small" | "medium" | "large";
16813
+ testId: string;
16787
16814
  selected: unknown[];
16788
16815
  placeholder: string;
16789
16816
  inlineSearchPlaceholder: string;
@@ -17114,6 +17141,18 @@ declare const _default: {
17114
17141
  };
17115
17142
  });
17116
17143
  TreeDropdown: import("vue").DefineComponent<{
17144
+ disabled: {
17145
+ type: import("vue").PropType<boolean>;
17146
+ default: boolean;
17147
+ };
17148
+ size: {
17149
+ type: import("vue").PropType<"small" | "medium" | "large">;
17150
+ default: string;
17151
+ };
17152
+ testId: {
17153
+ type: import("vue").PropType<string>;
17154
+ default: string;
17155
+ };
17117
17156
  selected: {
17118
17157
  type: import("vue").PropType<unknown[]>;
17119
17158
  default: any;
@@ -17177,6 +17216,18 @@ declare const _default: {
17177
17216
  "update:selected": (value: unknown) => void;
17178
17217
  "update:isOpen": (value: unknown) => void;
17179
17218
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
17219
+ disabled: {
17220
+ type: import("vue").PropType<boolean>;
17221
+ default: boolean;
17222
+ };
17223
+ size: {
17224
+ type: import("vue").PropType<"small" | "medium" | "large">;
17225
+ default: string;
17226
+ };
17227
+ testId: {
17228
+ type: import("vue").PropType<string>;
17229
+ default: string;
17230
+ };
17180
17231
  selected: {
17181
17232
  type: import("vue").PropType<unknown[]>;
17182
17233
  default: any;
@@ -17240,6 +17291,9 @@ declare const _default: {
17240
17291
  "onUpdate:selected"?: (value: unknown) => any;
17241
17292
  "onUpdate:isOpen"?: (value: unknown) => any;
17242
17293
  }, {
17294
+ disabled: boolean;
17295
+ size: "small" | "medium" | "large";
17296
+ testId: string;
17243
17297
  selected: unknown[];
17244
17298
  placeholder: string;
17245
17299
  inlineSearchPlaceholder: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.6-rc.37",
3
+ "version": "2.1.6-rc.38",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- .child-options[data-v-4492426c]{padding-left:1rem}