@ironsource/shared-ui 2.1.7-test.1 → 2.1.7-test.3

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 (63) hide show
  1. package/Autocomplete.vue_vue_type_style_index_0_scoped_e361f9fd_lang.css +1 -0
  2. package/Chart.vue_vue_type_style_index_0_scoped_f06a4764_lang.css +1 -0
  3. package/ChartHeader.vue_vue_type_style_index_0_scoped_88d4532f_lang.css +1 -0
  4. package/ChartLegend.vue_vue_type_style_index_0_scoped_efc608f9_lang.css +1 -0
  5. package/ChartLoader.vue_vue_type_style_index_0_scoped_142c444a_lang.css +1 -0
  6. package/ChartTooltip.vue_vue_type_style_index_0_scoped_ec636f18_lang.css +1 -0
  7. package/FieldMaxLength.vue_vue_type_style_index_0_scoped_47877984_lang.css +1 -0
  8. package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +1 -0
  9. package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +1 -0
  10. package/SortableList.vue_vue_type_style_index_0_scoped_21842d59_lang.css +1 -0
  11. package/TextAreaV4.vue_vue_type_style_index_0_scoped_4114ef89_lang.css +1 -0
  12. package/TextField.vue_vue_type_style_index_0_scoped_eb472aa3_lang.css +1 -0
  13. package/components/autocomplete/Autocomplete.vue.d.ts +5 -0
  14. package/components/autocomplete/Autocomplete.vue.js +2 -2
  15. package/components/autocomplete/Autocomplete.vue2.js +57 -45
  16. package/components/autocomplete/index.d.ts +20 -1
  17. package/components/chart/Chart.vue.js +7 -0
  18. package/components/chart/Chart.vue2.js +281 -0
  19. package/components/chart/ChartHeader.vue.js +7 -0
  20. package/components/chart/ChartHeader.vue2.js +51 -0
  21. package/components/chart/ChartLegend.vue.js +7 -0
  22. package/components/chart/ChartLegend.vue2.js +65 -0
  23. package/components/chart/ChartLoader.vue.js +25 -0
  24. package/components/chart/ChartLoader.vue2.js +0 -0
  25. package/components/chart/ChartTooltip.vue.js +7 -0
  26. package/components/chart/ChartTooltip.vue2.js +81 -0
  27. package/components/chart/composables/useChartValues.js +32 -0
  28. package/components/chart/composables/useTooltipPosition.js +22 -0
  29. package/components/chart/consts.js +21 -0
  30. package/components/chart/index.js +6 -0
  31. package/components/chart/plugins/HoverVerticalLine.js +12 -0
  32. package/components/chart/types.js +4 -0
  33. package/components/chart/utils/formatNumber.js +11 -0
  34. package/components/chart/utils/utils.js +12 -0
  35. package/components/input/v4/TextField.vue.d.ts +6 -1
  36. package/components/input/v4/TextField.vue.js +3 -3
  37. package/components/input/v4/TextField.vue2.js +95 -90
  38. package/components/input/v4/index.d.ts +20 -1
  39. package/components/shared/FieldMaxLength.vue.js +3 -3
  40. package/components/shared/FieldMaxLength.vue2.js +2 -2
  41. package/components/shared/commonTypes.d.ts +2 -0
  42. package/components/sortableList/SortableItem.vue.js +7 -0
  43. package/components/sortableList/SortableItem.vue2.js +140 -0
  44. package/components/sortableList/SortableItemLabel.vue.js +7 -0
  45. package/components/sortableList/SortableItemLabel.vue2.js +60 -0
  46. package/components/sortableList/SortableList.vue.js +7 -0
  47. package/components/sortableList/SortableList.vue2.js +120 -0
  48. package/components/sortableList/composables/useHoverEffect.js +19 -0
  49. package/components/sortableList/consts.js +4 -0
  50. package/components/sortableList/index.js +6 -0
  51. package/components/textArea/v4/TextAreaV4.vue.d.ts +6 -1
  52. package/components/textArea/v4/TextAreaV4.vue.js +3 -3
  53. package/components/textArea/v4/TextAreaV4.vue2.js +18 -12
  54. package/components/textArea/v4/index.d.ts +9 -0
  55. package/index.d.ts +651 -2
  56. package/index.js +131 -126
  57. package/package.json +9 -1
  58. package/testids/index.js +5 -4
  59. package/utils/search.js +4 -0
  60. package/Autocomplete.vue_vue_type_style_index_0_scoped_a7bfd237_lang.css +0 -1
  61. package/FieldMaxLength.vue_vue_type_style_index_0_scoped_f3c4001a_lang.css +0 -1
  62. package/TextAreaV4.vue_vue_type_style_index_0_scoped_f3b2c01d_lang.css +0 -1
  63. package/TextField.vue_vue_type_style_index_0_scoped_a6457440_lang.css +0 -1
@@ -1,27 +1,27 @@
1
- import "../../../TextField.vue_vue_type_style_index_0_scoped_a6457440_lang.css"; import { defineComponent as M, computed as b, ref as G, openBlock as l, createElementBlock as r, mergeProps as y, unref as t, createBlock as d, createCommentVNode as n, createElementVNode as E, normalizeClass as L, renderSlot as P, withCtx as h, createTextVNode as V, toDisplayString as C, withKeys as W, withModifiers as F, createVNode as p } from "vue";
1
+ import "../../../TextField.vue_vue_type_style_index_0_scoped_eb472aa3_lang.css"; import { defineComponent as J, computed as f, ref as Q, openBlock as l, createElementBlock as d, mergeProps as c, unref as t, createBlock as r, createCommentVNode as n, createElementVNode as A, normalizeClass as E, renderSlot as F, withCtx as b, createTextVNode as V, toDisplayString as $, withKeys as U, withModifiers as z, normalizeProps as O, createVNode as p } from "vue";
2
2
  import v from "../../icon/v4/IconV4.vue.js";
3
3
  import "../../icon/v4/IconFlag.vue.js";
4
- import j from "../../tooltip/v4/TooltipV4.vue.js";
5
- import $ from "../../typography/v4/Typography.vue.js";
6
- import { InputTestIdModifiers as f } from "../../../testids/index.js";
7
- import { inputCommon as q } from "../common/Input.common.js";
8
- import J from "../../shared/FieldLabel.vue.js";
9
- import Q from "../../shared/FieldHelpText.vue.js";
10
- import U from "../../shared/FieldMaxLength.vue.js";
11
- import { useTestIdAttrs as X } from "../../../utils/testIds.js";
12
- const Y = {
4
+ import X from "../../tooltip/v4/TooltipV4.vue.js";
5
+ import D from "../../typography/v4/Typography.vue.js";
6
+ import { InputTestIdModifiers as m } from "../../../testids/index.js";
7
+ import { inputCommon as Y } from "../common/Input.common.js";
8
+ import Z from "../../shared/FieldLabel.vue.js";
9
+ import _ from "../../shared/FieldHelpText.vue.js";
10
+ import N from "../../shared/FieldMaxLength.vue.js";
11
+ import { useTestIdAttrs as ee } from "../../../utils/testIds.js";
12
+ const te = {
13
13
  key: 0,
14
14
  class: "icon-container icon-before"
15
- }, Z = ["maxlength", "value", "placeholder", "disabled", "type", "step"], _ = ["onClick"], ee = {
16
- key: 3,
15
+ }, le = ["maxlength", "value", "placeholder", "disabled", "type", "step"], ae = ["onClick"], ne = {
16
+ key: 4,
17
17
  class: "inline-error"
18
- }, te = {
19
- key: 6,
18
+ }, oe = {
19
+ key: 7,
20
20
  class: "icon-container icon-after"
21
- }, le = {
21
+ }, ie = {
22
22
  inheritAttrs: !1
23
- }, ye = /* @__PURE__ */ M({
24
- ...le,
23
+ }, be = /* @__PURE__ */ J({
24
+ ...ie,
25
25
  __name: "TextField",
26
26
  props: {
27
27
  modelValue: { default: "" },
@@ -47,37 +47,45 @@ const Y = {
47
47
  prefix: { default: "" },
48
48
  suffix: { default: "" },
49
49
  maxLength: { default: null },
50
+ maxLengthCounterPosition: { default: "inside" },
50
51
  showApply: { type: Boolean, default: !1 },
51
52
  inlineError: { type: Boolean, default: !1 },
52
53
  inlineErrorText: { default: "" },
53
54
  inlineErrorTextPlacement: { default: "top" }
54
55
  },
55
56
  emits: ["update:modelValue", "apply"],
56
- setup(e, { expose: z, emit: k }) {
57
- const s = e, c = X(s.testId, f), O = () => {
58
- s.showApply ? k("apply") : o?.confirmable && N();
59
- }, D = () => w.value.focus(), {
60
- onConfirm: N,
57
+ setup(e, { expose: S, emit: k }) {
58
+ const o = e, y = ee(o.testId, m), H = () => {
59
+ o.showApply ? k("apply") : s?.confirmable && K();
60
+ }, R = () => g.value.focus(), {
61
+ onConfirm: K,
61
62
  onEnter: T,
62
- inputRef: w,
63
- isFocused: x,
64
- showLabelInside: g,
65
- api: o,
66
- labelText: S,
67
- sizeClass: H,
68
- handleInput: I,
69
- handleKeypress: B
70
- } = q(s, k), A = b(() => o.value?.value ?? s.modelValue), R = b(() => (A.value || "").length), m = G(!1), K = b(() => m.value && s.type === "password" ? "text" : s.type);
71
- return z({
72
- manualFocus: D
73
- }), (u, a) => (l(), r("div", y({
63
+ inputRef: g,
64
+ isFocused: h,
65
+ showLabelInside: w,
66
+ api: s,
67
+ labelText: M,
68
+ sizeClass: G,
69
+ handleInput: L,
70
+ handleKeypress: I
71
+ } = Y(o, k), P = f(() => s.value?.value ?? o.modelValue), W = f(() => (P.value || "").length), B = f(() => ({
72
+ currentLength: W.value,
73
+ maxLength: o.maxLength
74
+ })), C = f(
75
+ () => o.maxLength && o.maxLengthCounterPosition === "outside"
76
+ ), j = f(
77
+ () => o.feedbackText || C.value
78
+ ), x = Q(!1), q = f(() => x.value && o.type === "password" ? "text" : o.type);
79
+ return S({
80
+ manualFocus: R
81
+ }), (u, a) => (l(), d("div", c({
74
82
  class: {
75
83
  "input-with-label-container": !0,
76
84
  disabled: e.disabled,
77
85
  [`variant-${e.feedbackVariant}`]: !0
78
86
  }
79
- }, t(c)[t(f).WRAPPER]), [
80
- e.label && e.labelDirection !== "inside" ? (l(), d(J, {
87
+ }, t(y)[t(m).WRAPPER]), [
88
+ e.label && e.labelDirection !== "inside" ? (l(), r(Z, {
81
89
  key: 0,
82
90
  label: e.label,
83
91
  mandatory: e.mandatory,
@@ -86,73 +94,74 @@ const Y = {
86
94
  disabled: e.disabled,
87
95
  "test-id": e.testId
88
96
  }, null, 8, ["label", "mandatory", "hover-help-text", "hover-help-text-placement", "disabled", "test-id"])) : n("", !0),
89
- E("div", {
90
- class: L({
97
+ A("div", {
98
+ class: E({
91
99
  "input-container": !0,
92
- "label-inside": t(g),
93
- focused: t(x)
100
+ "label-inside": t(w),
101
+ focused: t(h)
94
102
  })
95
103
  }, [
96
- u.$slots.iconBefore ? (l(), r("div", Y, [
97
- P(u.$slots, "iconBefore", {}, void 0, !0)
104
+ u.$slots.iconBefore ? (l(), d("div", te, [
105
+ F(u.$slots, "iconBefore", {}, void 0, !0)
98
106
  ])) : n("", !0),
99
- e.prefix ? (l(), d(t($), {
107
+ e.prefix ? (l(), r(t(D), {
100
108
  key: 1,
101
109
  class: "prefix-text",
102
110
  variant: "body1"
103
111
  }, {
104
- default: h(() => [
105
- V(C(e.prefix), 1)
112
+ default: b(() => [
113
+ V($(e.prefix), 1)
106
114
  ]),
107
115
  _: 1
108
116
  })) : n("", !0),
109
- E("input", y({
117
+ A("input", c({
110
118
  ref_key: "inputRef",
111
- ref: w,
119
+ ref: g,
112
120
  maxlength: e.maxLength
113
- }, { ...u.$attrs, ...t(c)[t(f).FIELD] }, {
114
- value: t(A),
115
- placeholder: t(S),
121
+ }, { ...u.$attrs, ...t(y)[t(m).FIELD] }, {
122
+ value: t(P),
123
+ placeholder: t(M),
116
124
  disabled: e.disabled || e.viewOnly,
117
- type: t(K),
125
+ type: t(q),
118
126
  class: ["input", {
119
- [t(H)]: !0,
127
+ [t(G)]: !0,
120
128
  "view-only": e.viewOnly,
121
- "label-inside": t(g),
129
+ "label-inside": t(w),
122
130
  "hide-arrows": e.hideNumberArrows,
123
131
  "input-type": e.type
124
132
  }],
125
133
  step: e.step,
126
134
  onInput: a[0] || (a[0] = //@ts-ignore
127
- (...i) => t(I) && t(I)(...i)),
128
- onFocus: a[1] || (a[1] = (i) => x.value = !0),
129
- onBlur: a[2] || (a[2] = (i) => x.value = !1),
130
- onKeyup: a[3] || (a[3] = W(F(
135
+ (...i) => t(L) && t(L)(...i)),
136
+ onFocus: a[1] || (a[1] = (i) => h.value = !0),
137
+ onBlur: a[2] || (a[2] = (i) => h.value = !1),
138
+ onKeyup: a[3] || (a[3] = U(z(
131
139
  //@ts-ignore
132
140
  (...i) => t(T) && t(T)(...i),
133
141
  ["prevent"]
134
142
  ), ["enter"])),
135
143
  onKeypress: a[4] || (a[4] = //@ts-ignore
136
- (...i) => t(B) && t(B)(...i))
137
- }), null, 16, Z),
138
- e.showApply || t(o)?.confirmable && !t(o)?.error?.value ? (l(), r("div", {
139
- key: 2,
144
+ (...i) => t(I) && t(I)(...i))
145
+ }), null, 16, le),
146
+ e.maxLength && e.maxLengthCounterPosition === "inside" ? (l(), r(N, O(c({ key: 2 }, t(B))), null, 16)) : n("", !0),
147
+ e.showApply || t(s)?.confirmable && !t(s)?.error?.value ? (l(), d("div", {
148
+ key: 3,
140
149
  class: "apply-button",
141
- onClick: F(O, ["stop", "prevent"])
150
+ onClick: z(H, ["stop", "prevent"])
142
151
  }, [
143
152
  p(t(v), {
144
153
  name: "check",
145
154
  size: "20px"
146
155
  })
147
- ], 8, _)) : n("", !0),
148
- e.inlineError || t(o)?.error?.value ? (l(), r("div", ee, [
149
- p(t(j), y({
150
- disabled: !e.inlineErrorText && !t(o)?.error?.value,
151
- text: e.inlineErrorText || t(o)?.error?.value,
156
+ ], 8, ae)) : n("", !0),
157
+ e.inlineError || t(s)?.error?.value ? (l(), d("div", ne, [
158
+ p(t(X), c({
159
+ disabled: !e.inlineErrorText && !t(s)?.error?.value,
160
+ text: e.inlineErrorText || t(s)?.error?.value,
152
161
  "test-id": e.testId,
153
162
  placement: e.inlineErrorTextPlacement
154
- }, t(c)[t(f).TOOLTIP]), {
155
- default: h(() => [
163
+ }, t(y)[t(m).TOOLTIP]), {
164
+ default: b(() => [
156
165
  p(t(v), {
157
166
  name: "warning-circle",
158
167
  size: "16px"
@@ -161,56 +170,52 @@ const Y = {
161
170
  _: 1
162
171
  }, 16, ["disabled", "text", "test-id", "placement"])
163
172
  ])) : n("", !0),
164
- e.suffix ? (l(), d(t($), {
165
- key: 4,
173
+ e.suffix ? (l(), r(t(D), {
174
+ key: 5,
166
175
  class: "suffix-text",
167
176
  variant: "body1"
168
177
  }, {
169
- default: h(() => [
170
- V(C(e.suffix), 1)
178
+ default: b(() => [
179
+ V($(e.suffix), 1)
171
180
  ]),
172
181
  _: 1
173
182
  })) : n("", !0),
174
- e.type === "password" ? (l(), r("div", y({
175
- key: 5,
183
+ e.type === "password" ? (l(), d("div", c({
184
+ key: 6,
176
185
  class: "password-visibility-toggle"
177
- }, t(c)[t(f).TOGGLE_PASSWORD], {
178
- onClick: a[5] || (a[5] = (i) => m.value = !m.value)
186
+ }, t(y)[t(m).TOGGLE_PASSWORD], {
187
+ onClick: a[5] || (a[5] = (i) => x.value = !x.value)
179
188
  }), [
180
- m.value ? (l(), d(t(v), {
189
+ x.value ? (l(), r(t(v), {
181
190
  key: 0,
182
191
  name: "eye",
183
192
  size: "16px"
184
- })) : (l(), d(t(v), {
193
+ })) : (l(), r(t(v), {
185
194
  key: 1,
186
195
  name: "eye-slash",
187
196
  size: "16px"
188
197
  }))
189
198
  ], 16)) : n("", !0),
190
- u.$slots.iconAfter ? (l(), r("div", te, [
191
- P(u.$slots, "iconAfter", {}, void 0, !0)
199
+ u.$slots.iconAfter ? (l(), d("div", oe, [
200
+ F(u.$slots, "iconAfter", {}, void 0, !0)
192
201
  ])) : n("", !0)
193
202
  ], 2),
194
- e.feedbackText || e.maxLength ? (l(), r("div", {
203
+ t(j) ? (l(), d("div", {
195
204
  key: 1,
196
- class: L(["footer", e.feedbackPositionAbsolute && "footer-absolute"])
205
+ class: E(["footer", e.feedbackPositionAbsolute && "footer-absolute"])
197
206
  }, [
198
- e.feedbackText ? (l(), d(Q, {
207
+ e.feedbackText ? (l(), r(_, {
199
208
  key: 0,
200
209
  text: e.feedbackText,
201
210
  variant: e.feedbackVariant,
202
211
  "show-icon": e.showFeedbackTextIcon,
203
212
  "test-id": e.testId
204
213
  }, null, 8, ["text", "variant", "show-icon", "test-id"])) : n("", !0),
205
- e.maxLength ? (l(), d(U, {
206
- key: 1,
207
- "current-length": t(R),
208
- "max-length": e.maxLength
209
- }, null, 8, ["current-length", "max-length"])) : n("", !0)
214
+ t(C) ? (l(), r(N, O(c({ key: 1 }, t(B))), null, 16)) : n("", !0)
210
215
  ], 2)) : n("", !0)
211
216
  ], 16));
212
217
  }
213
218
  });
214
219
  export {
215
- ye as default
220
+ be as default
216
221
  };
@@ -23,6 +23,7 @@ declare const TextFieldTypes: () => ({
23
23
  onlyDigits: boolean;
24
24
  prefix: string;
25
25
  suffix: string;
26
+ maxLengthCounterPosition: "inside" | "outside";
26
27
  showApply: boolean;
27
28
  inlineError: boolean;
28
29
  inlineErrorText: string;
@@ -108,6 +109,10 @@ declare const TextFieldTypes: () => ({
108
109
  type: import("vue").PropType<string>;
109
110
  default: string;
110
111
  };
112
+ maxLengthCounterPosition: {
113
+ type: import("vue").PropType<"inside" | "outside">;
114
+ default: string;
115
+ };
111
116
  showApply: {
112
117
  type: import("vue").PropType<boolean>;
113
118
  default: boolean;
@@ -143,7 +148,7 @@ declare const TextFieldTypes: () => ({
143
148
  }>> & {
144
149
  "onUpdate:modelValue"?: (value: string | number) => any;
145
150
  onApply?: () => any;
146
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "maxLength" | "modelValue" | "placeholder" | "viewOnly" | "labelDirection" | "autoFocus" | "hideNumberArrows" | "step" | "onlyDigits" | "prefix" | "suffix" | "showApply" | "inlineError" | "inlineErrorText" | "inlineErrorTextPlacement" | "feedbackText" | "feedbackVariant" | "showFeedbackTextIcon" | "feedbackPositionAbsolute">;
151
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "label" | "disabled" | "size" | "mandatory" | "testId" | "hoverHelpText" | "hoverHelpTextPlacement" | "maxLength" | "modelValue" | "placeholder" | "viewOnly" | "labelDirection" | "autoFocus" | "hideNumberArrows" | "step" | "onlyDigits" | "prefix" | "suffix" | "maxLengthCounterPosition" | "showApply" | "inlineError" | "inlineErrorText" | "inlineErrorTextPlacement" | "feedbackText" | "feedbackVariant" | "showFeedbackTextIcon" | "feedbackPositionAbsolute">;
147
152
  $attrs: {
148
153
  [x: string]: unknown;
149
154
  };
@@ -234,6 +239,10 @@ declare const TextFieldTypes: () => ({
234
239
  type: import("vue").PropType<string>;
235
240
  default: string;
236
241
  };
242
+ maxLengthCounterPosition: {
243
+ type: import("vue").PropType<"inside" | "outside">;
244
+ default: string;
245
+ };
237
246
  showApply: {
238
247
  type: import("vue").PropType<boolean>;
239
248
  default: boolean;
@@ -294,6 +303,7 @@ declare const TextFieldTypes: () => ({
294
303
  onlyDigits: boolean;
295
304
  prefix: string;
296
305
  suffix: string;
306
+ maxLengthCounterPosition: "inside" | "outside";
297
307
  showApply: boolean;
298
308
  inlineError: boolean;
299
309
  inlineErrorText: string;
@@ -399,6 +409,10 @@ declare const TextFieldTypes: () => ({
399
409
  type: import("vue").PropType<string>;
400
410
  default: string;
401
411
  };
412
+ maxLengthCounterPosition: {
413
+ type: import("vue").PropType<"inside" | "outside">;
414
+ default: string;
415
+ };
402
416
  showApply: {
403
417
  type: import("vue").PropType<boolean>;
404
418
  default: boolean;
@@ -517,6 +531,10 @@ declare const TextFieldTypes: () => ({
517
531
  type: import("vue").PropType<string>;
518
532
  default: string;
519
533
  };
534
+ maxLengthCounterPosition: {
535
+ type: import("vue").PropType<"inside" | "outside">;
536
+ default: string;
537
+ };
520
538
  showApply: {
521
539
  type: import("vue").PropType<boolean>;
522
540
  default: boolean;
@@ -577,6 +595,7 @@ declare const TextFieldTypes: () => ({
577
595
  onlyDigits: boolean;
578
596
  prefix: string;
579
597
  suffix: string;
598
+ maxLengthCounterPosition: "inside" | "outside";
580
599
  showApply: boolean;
581
600
  inlineError: boolean;
582
601
  inlineErrorText: string;
@@ -1,7 +1,7 @@
1
1
  import e from "./FieldMaxLength.vue2.js";
2
2
  /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
- // import "../../FieldMaxLength.vue_vue_type_style_index_0_scoped_f3c4001a_lang.css"; //*');
4
- const a = /* @__PURE__ */ o(e, [["__scopeId", "data-v-f3c4001a"]]);
3
+ // import "../../FieldMaxLength.vue_vue_type_style_index_0_scoped_47877984_lang.css"; //*');
4
+ const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-47877984"]]);
5
5
  export {
6
- a as default
6
+ p as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import "../../FieldMaxLength.vue_vue_type_style_index_0_scoped_f3c4001a_lang.css"; import { defineComponent as n, openBlock as o, createElementBlock as c, createVNode as r, unref as d, withCtx as p, createTextVNode as t, toDisplayString as a, pushScopeId as i, popScopeId as s, createElementVNode as h } from "vue";
1
+ import "../../FieldMaxLength.vue_vue_type_style_index_0_scoped_47877984_lang.css"; import { defineComponent as n, openBlock as o, createElementBlock as c, createVNode as r, unref as d, withCtx as p, createTextVNode as t, toDisplayString as a, pushScopeId as i, popScopeId as s, createElementVNode as h } from "vue";
2
2
  import l from "../typography/v4/Typography.vue.js";
3
- const m = (e) => (i("data-v-f3c4001a"), e = e(), s(), e), _ = { class: "max-length" }, u = /* @__PURE__ */ m(() => /* @__PURE__ */ h("span", { class: "max-length__divider" }, "/", -1)), v = /* @__PURE__ */ n({
3
+ const m = (e) => (i("data-v-47877984"), e = e(), s(), e), _ = { class: "max-length" }, u = /* @__PURE__ */ m(() => /* @__PURE__ */ h("span", { class: "max-length__divider" }, "/", -1)), v = /* @__PURE__ */ n({
4
4
  __name: "FieldMaxLength",
5
5
  props: {
6
6
  currentLength: { default: 0 },
@@ -1,2 +1,4 @@
1
1
  export declare const FEEDBACK_VARIANTS: readonly ["error", "success", "warning"];
2
2
  export type FeedbackVariant = (typeof FEEDBACK_VARIANTS)[number];
3
+ export declare const MAX_LENGTH_COUNTER_POSITION: readonly ["inside", "outside"];
4
+ export type MaxLengthCounterPositions = (typeof MAX_LENGTH_COUNTER_POSITION)[number];
@@ -0,0 +1,7 @@
1
+ import o from "./SortableItem.vue2.js";
2
+ /* empty css */import e from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css"; //*');
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-9dd4d372"]]);
5
+ export {
6
+ s as default
7
+ };
@@ -0,0 +1,140 @@
1
+ import "../../SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css"; import { defineComponent as P, computed as x, watch as E, ref as $, openBlock as o, createElementBlock as a, normalizeClass as f, unref as e, withModifiers as c, createElementVNode as r, createVNode as h, createBlock as s, withCtx as b, createTextVNode as w, toDisplayString as F, createCommentVNode as u, renderSlot as z, mergeProps as S, normalizeProps as I, Fragment as R, renderList as D } from "vue";
2
+ import V from "../typography/v4/Typography.vue.js";
3
+ import m from "../icon/v4/IconV4.vue.js";
4
+ import L from "../icon/v4/IconFlag.vue.js";
5
+ import j from "./SortableItemLabel.vue.js";
6
+ import { useVirtualList as q } from "@vueuse/core";
7
+ import { matchString as A } from "../../utils/search.js";
8
+ import { useHoverEffect as G } from "./composables/useHoverEffect.js";
9
+ const J = { class: "draggable-handle" }, K = { class: "item__prefix" }, U = ["onClick"], W = { class: "item__text" }, X = ["onClick"], re = /* @__PURE__ */ P({
10
+ __name: "SortableItem",
11
+ props: {
12
+ item: null,
13
+ index: { default: null },
14
+ isOpen: { type: Boolean, default: !1 },
15
+ isSelected: { type: Boolean, default: !1 },
16
+ selectedChildId: { default: null },
17
+ searchQuery: { default: null },
18
+ searchHandler: { type: Function, default: null },
19
+ displayValue: null
20
+ },
21
+ emits: ["toggle", "select", "selectChild"],
22
+ setup(t, { emit: y }) {
23
+ const n = t, Q = () => {
24
+ y("toggle", !n.isOpen);
25
+ }, g = x(() => (n.item.children || []).filter(
26
+ (l) => n.searchHandler ? n.searchHandler(l, n.searchQuery) : A(l.displayText, n.searchQuery)
27
+ )), p = x(() => g.value.length > 0), B = (d) => d.id === n.selectedChildId, {
28
+ list: H,
29
+ containerProps: M,
30
+ wrapperProps: T,
31
+ scrollTo: N
32
+ } = q(g, {
33
+ itemHeight: 34
34
+ });
35
+ E(
36
+ () => n.searchQuery,
37
+ () => N(0)
38
+ );
39
+ const k = $(null), { handleMouseout: v, handleMouseover: C } = G(
40
+ k,
41
+ "sortable-item--hovered"
42
+ );
43
+ return (d, l) => (o(), a("div", {
44
+ ref_key: "itemRef",
45
+ ref: k,
46
+ class: f(["sortable-item", { "sortable-item--selected": t.isSelected }]),
47
+ onMouseover: l[1] || (l[1] = //@ts-ignore
48
+ (...i) => e(C) && e(C)(...i)),
49
+ onMouseout: l[2] || (l[2] = //@ts-ignore
50
+ (...i) => e(v) && e(v)(...i)),
51
+ onClick: l[3] || (l[3] = c((i) => y("select"), ["stop"]))
52
+ }, [
53
+ r("div", {
54
+ class: f(["item", { "drag-allowed": !t.item.isLocked && !t.searchQuery }])
55
+ }, [
56
+ r("div", J, [
57
+ h(e(m), {
58
+ name: "dots-six-vertical",
59
+ width: "20px",
60
+ type: "bold"
61
+ })
62
+ ]),
63
+ r("div", K, [
64
+ t.item.isLocked ? (o(), s(e(m), {
65
+ key: 1,
66
+ class: "locked-icon",
67
+ name: "lock",
68
+ width: "16px"
69
+ })) : (o(), s(e(V), {
70
+ key: 0,
71
+ class: "order-num",
72
+ variant: "subtitle2"
73
+ }, {
74
+ default: b(() => [
75
+ w(F(t.index + 1) + ". ", 1)
76
+ ]),
77
+ _: 1
78
+ }))
79
+ ]),
80
+ e(p) && !t.searchQuery ? (o(), a("div", {
81
+ key: 0,
82
+ class: "expand-icon",
83
+ onClick: c(Q, ["stop"])
84
+ }, [
85
+ t.isOpen ? (o(), s(e(m), {
86
+ key: 0,
87
+ name: "caret-down",
88
+ width: "16px"
89
+ })) : (o(), s(e(m), {
90
+ key: 1,
91
+ name: "caret-right",
92
+ width: "16px"
93
+ }))
94
+ ], 8, U)) : u("", !0),
95
+ r("div", W, [
96
+ t.item.countryFlag ? (o(), s(e(L), {
97
+ key: 0,
98
+ class: "country-flag",
99
+ "country-code": t.item.countryFlag
100
+ }, null, 8, ["country-code"])) : u("", !0),
101
+ h(j, {
102
+ "display-value": t.displayValue,
103
+ item: t.item
104
+ }, null, 8, ["display-value", "item"])
105
+ ]),
106
+ r("div", {
107
+ class: "item__menu",
108
+ onClick: l[0] || (l[0] = c(() => {
109
+ }, ["stop"]))
110
+ }, [
111
+ z(d.$slots, "menu", {}, void 0, !0)
112
+ ])
113
+ ], 2),
114
+ r("div", S(e(M), { class: "child-list" }), [
115
+ e(p) && t.isOpen ? (o(), a("ul", I(S({ key: 0 }, e(T))), [
116
+ (o(!0), a(R, null, D(e(H), ({ data: i, index: O }) => (o(), a("li", {
117
+ key: O,
118
+ class: f({ selected: B(i) }),
119
+ onClick: c((Y) => y("selectChild", i), ["stop"])
120
+ }, [
121
+ i.countryFlag ? (o(), s(e(L), {
122
+ key: 0,
123
+ class: "country-flag",
124
+ "country-code": i.countryFlag
125
+ }, null, 8, ["country-code"])) : u("", !0),
126
+ h(e(V), { variant: "body2" }, {
127
+ default: b(() => [
128
+ w(F(t.displayValue(i)), 1)
129
+ ]),
130
+ _: 2
131
+ }, 1024)
132
+ ], 10, X))), 128))
133
+ ], 16)) : u("", !0)
134
+ ], 16)
135
+ ], 34));
136
+ }
137
+ });
138
+ export {
139
+ re as default
140
+ };
@@ -0,0 +1,7 @@
1
+ import e from "./SortableItemLabel.vue2.js";
2
+ /* empty css */import o from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css"; //*');
4
+ const s = /* @__PURE__ */ o(e, [["__scopeId", "data-v-1386ae20"]]);
5
+ export {
6
+ s as default
7
+ };
@@ -0,0 +1,60 @@
1
+ import "../../SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css"; import { defineComponent as m, openBlock as a, createBlock as u, unref as l, withCtx as t, createElementVNode as p, createElementBlock as c, Fragment as h, renderList as f, createVNode as i, createTextVNode as o, toDisplayString as r, normalizeClass as x } from "vue";
2
+ import n from "../typography/v4/Typography.vue.js";
3
+ import y from "../tooltip/v4/TooltipV4.vue.js";
4
+ const _ = { class: "tooltip-content" }, k = /* @__PURE__ */ m({
5
+ __name: "SortableItemLabel",
6
+ props: {
7
+ item: null,
8
+ displayValue: null
9
+ },
10
+ setup(e) {
11
+ return (b, T) => (a(), u(l(y), {
12
+ class: "item-label",
13
+ placement: "right",
14
+ disabled: !e.item.helpText
15
+ }, {
16
+ tooltip: t(() => [
17
+ p("div", _, [
18
+ (a(!0), c(h, null, f(e.item.helpText, (s, d) => (a(), c("div", {
19
+ key: d,
20
+ class: "help"
21
+ }, [
22
+ i(l(n), {
23
+ class: "help__title",
24
+ variant: "h5"
25
+ }, {
26
+ default: t(() => [
27
+ o(r(s.title), 1)
28
+ ]),
29
+ _: 2
30
+ }, 1024),
31
+ i(l(n), {
32
+ class: "help__text",
33
+ variant: "body2"
34
+ }, {
35
+ default: t(() => [
36
+ o(r(s.text), 1)
37
+ ]),
38
+ _: 2
39
+ }, 1024)
40
+ ]))), 128))
41
+ ])
42
+ ]),
43
+ default: t(() => [
44
+ i(l(n), {
45
+ variant: "body2",
46
+ class: x({ "decorated-text": e.item.helpText?.length })
47
+ }, {
48
+ default: t(() => [
49
+ o(r(e.displayValue(e.item)), 1)
50
+ ]),
51
+ _: 1
52
+ }, 8, ["class"])
53
+ ]),
54
+ _: 1
55
+ }, 8, ["disabled"]));
56
+ }
57
+ });
58
+ export {
59
+ k as default
60
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./SortableList.vue2.js";
2
+ /* empty css */import t from "../../_virtual/_plugin-vue_export-helper.js";
3
+ // import "../../SortableList.vue_vue_type_style_index_0_scoped_21842d59_lang.css"; //*');
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-21842d59"]]);
5
+ export {
6
+ p as default
7
+ };