@useinsider/guido 3.16.0 → 3.17.0-beta.3e9d6e7

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 (88) hide show
  1. package/README.md +1 -0
  2. package/dist/@types/config/schemas.js +12 -6
  3. package/dist/components/Guido.vue.js +6 -6
  4. package/dist/components/Guido.vue2.js +63 -61
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +18 -0
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +67 -0
  7. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +20 -0
  8. package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +55 -0
  9. package/dist/composables/useCustomInterfaceAppearance.js +19 -16
  10. package/dist/composables/useRecommendation.js +43 -35
  11. package/dist/composables/useStripo.js +30 -29
  12. package/dist/config/migrator/itemsBlockMigrator.js +1 -1
  13. package/dist/config/migrator/recommendationMigrator.js +6 -4
  14. package/dist/enums/date.js +4 -3
  15. package/dist/enums/extensions/recommendationBlock.js +25 -23
  16. package/dist/enums/recommendation.js +17 -17
  17. package/dist/extensions/Blocks/Items/enums/productEnums.js +45 -45
  18. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +13 -11
  19. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +37 -26
  20. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +115 -87
  21. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +132 -0
  22. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +198 -51
  23. package/dist/extensions/Blocks/Recommendation/utils/productIds.js +6 -0
  24. package/dist/extensions/Blocks/common-control.js +22 -19
  25. package/dist/guido.css +1 -1
  26. package/dist/node_modules/@useinsider/design-system-organisms/dist/index-Dc9AygoZ.js +526 -0
  27. package/dist/node_modules/@useinsider/design-system-organisms/dist/index.js +9345 -0
  28. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InAccordion.js +174 -0
  29. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBasicTextInput.js +381 -0
  30. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBox.js +236 -0
  31. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBulkActions.js +70 -0
  32. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButton.js +350 -0
  33. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButtonV2.js +371 -0
  34. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCheckBox.js +152 -0
  35. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InChips.js +141 -0
  36. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCustomDropDown.js +1047 -0
  37. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDataTableV2.js +96050 -0
  38. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDatePicker.js +2042 -0
  39. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDrawer.js +166 -0
  40. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDropDown.js +1098 -0
  41. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InIcons.js +55 -0
  42. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InInfoBox.js +265 -0
  43. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLinks.js +184 -0
  44. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLoading.js +50 -0
  45. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InModals.js +453 -0
  46. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InNoData.js +145 -0
  47. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InOnPageMessage.js +176 -0
  48. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InProgress.js +266 -0
  49. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InRadioButton.js +114 -0
  50. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSegments.js +200 -0
  51. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSelect.js +451 -0
  52. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSkeleton.js +49 -0
  53. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InStatusText.js +119 -0
  54. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTabs.js +4309 -0
  55. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTagsText.js +129 -0
  56. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTextInput.js +503 -0
  57. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToasts.js +253 -0
  58. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToggle.js +107 -0
  59. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltip.js +134 -0
  60. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltipV2.js +464 -0
  61. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_commonjsHelpers.BItOPCY9.js +28 -0
  62. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_plugin-vue2_normalizer.WQT2Fc8L.js +23 -0
  63. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/clickOutside.qP9M0QCm.js +29 -0
  64. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/helpers.CgHNyjAJ.js +109 -0
  65. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/index.Bw_06igr.js +2339 -0
  66. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/localLocalesMixin.DYMhydo2.js +16 -0
  67. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/useLocalLocales.Ckuhy7d-.js +17 -0
  68. package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/vue-property-decorator.BtlM7Epa.js +188 -0
  69. package/dist/services/recommendationApi.js +77 -28
  70. package/dist/src/@types/config/schemas.d.ts +12 -0
  71. package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +3 -0
  72. package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBox.vue.d.ts +24 -0
  73. package/dist/src/composables/useConfig.d.ts +2 -0
  74. package/dist/src/composables/useRecommendation.d.ts +1 -0
  75. package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
  76. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +12 -3
  77. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +37 -0
  78. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +210 -10
  79. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
  80. package/dist/src/extensions/Blocks/Recommendation/utils/productIds.d.ts +6 -0
  81. package/dist/src/extensions/Blocks/common-control.d.ts +4 -1
  82. package/dist/src/mock/api/recommendation-strategies.d.ts +43 -0
  83. package/dist/src/services/recommendationApi.d.ts +4 -1
  84. package/dist/src/stores/config.d.ts +18 -0
  85. package/dist/static/styles/components/recommendation-strategy.css.js +171 -0
  86. package/dist/utils/dateUtil.js +23 -10
  87. package/dist/utils/templatePreparation.js +37 -34
  88. package/package.json +2 -1
@@ -0,0 +1,129 @@
1
+ import { InIcons as n } from "./InIcons.js";
2
+ import { p as i, a as s } from "./chunks/helpers.CgHNyjAJ.js";
3
+ import { n as p } from "./chunks/_plugin-vue2_normalizer.WQT2Fc8L.js";
4
+ /* empty css */
5
+ const l = "_in-tags-text-wrapper_default_v01428_nePpX", o = "_in-tags-text-wrapper_alert_v01428_ueDmB", _ = "_in-tags-text-wrapper_warning_v01428_DxoqM", c = "_in-tags-text-wrapper_disable_v01428_Ml2XQ", g = "_in-tags-content_v01428_GYJh2", x = {
6
+ "in-tags-text-wrapper_default": "_in-tags-text-wrapper_default_v01428_nePpX",
7
+ inTagsTextWrapperDefault: l,
8
+ "in-tags-text-wrapper_alert": "_in-tags-text-wrapper_alert_v01428_ueDmB",
9
+ inTagsTextWrapperAlert: o,
10
+ "in-tags-text-wrapper_warning": "_in-tags-text-wrapper_warning_v01428_DxoqM",
11
+ inTagsTextWrapperWarning: _,
12
+ "in-tags-text-wrapper_disable": "_in-tags-text-wrapper_disable_v01428_Ml2XQ",
13
+ inTagsTextWrapperDisable: c,
14
+ "in-tags-content": "_in-tags-content_v01428_GYJh2",
15
+ inTagsContent: g
16
+ }, u = {
17
+ components: {
18
+ InIcons: n
19
+ },
20
+ props: {
21
+ /**
22
+ * @property {string} type
23
+ */
24
+ type: {
25
+ type: String,
26
+ default: "default"
27
+ },
28
+ /**
29
+ * @property {string} text
30
+ */
31
+ text: {
32
+ type: String,
33
+ required: !0
34
+ },
35
+ /**
36
+ * @property {string|number} value
37
+ */
38
+ value: {
39
+ type: String | Number,
40
+ required: !0
41
+ },
42
+ /**
43
+ * @property {boolean} disable
44
+ */
45
+ disable: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ /**
50
+ * @property {boolean} withIcon
51
+ */
52
+ withIcon: {
53
+ type: Boolean,
54
+ default: !0
55
+ },
56
+ /**
57
+ * @property {number} maxWidth
58
+ */
59
+ maxWidth: {
60
+ type: Number,
61
+ default: null
62
+ },
63
+ /**
64
+ * @property {boolean} preventXss
65
+ */
66
+ preventXss: {
67
+ type: Boolean,
68
+ default: !0
69
+ }
70
+ },
71
+ data() {
72
+ return {
73
+ tagWrapperSpacing: 36
74
+ };
75
+ },
76
+ computed: {
77
+ /**
78
+ * @return {boolean}
79
+ */
80
+ isActiveMaxWidth() {
81
+ return !s(this.maxWidth);
82
+ },
83
+ /**
84
+ * @return {string}
85
+ */
86
+ computedTitle() {
87
+ return this.preventXss ? i(this.text) : this.text;
88
+ }
89
+ },
90
+ methods: {
91
+ /**
92
+ * @param {string | number} value
93
+ */
94
+ removeTag(t) {
95
+ this.$emit("click", t);
96
+ }
97
+ }
98
+ };
99
+ var d = function() {
100
+ var t = this, e = t._self._c;
101
+ return e("div", { staticClass: "d-i-b f-s-1 l-h-1 px-2 py-1 bor-r-1 clearfix in-tags-text-wrapper", class: [
102
+ t.disable ? ["in-tags-text-wrapper_disable", "cur-na", t.$style["in-tags-text-wrapper_disable"]] : ["in-tags-text-wrapper_" + t.type, t.$style["in-tags-text-wrapper_" + t.type]]
103
+ ], style: { "max-width": t.maxWidth + "px" }, on: { click: function(a) {
104
+ a.stopPropagation();
105
+ } } }, [e("div", { class: [
106
+ { "in-tags-content": t.withIcon },
107
+ { [t.$style["in-tags-content"]]: t.withIcon }
108
+ ] }, [e("p", { staticClass: "fl-l o-h t-o-e w-b-b-w", class: [{ "w-s-n-w": t.isActiveMaxWidth }, { "mr-1": t.withIcon }], style: { "max-width": t.maxWidth - t.tagWrapperSpacing + "px" }, attrs: { "data-value": t.value, title: t.computedTitle } }, [t._v(" " + t._s(t.text) + " ")]), t.withIcon ? e("in-icons", { class: [t.disable ? "p-e-n" : "cur-p"], attrs: { name: "line-close-netural", size: "16" }, on: { click: function(a) {
109
+ return t.removeTag(t.value);
110
+ } } }) : t._e()], 1)]);
111
+ }, w = [];
112
+ const r = {
113
+ $style: x
114
+ };
115
+ function m(t) {
116
+ for (var e in r)
117
+ this[e] = r[e];
118
+ }
119
+ var v = /* @__PURE__ */ p(
120
+ u,
121
+ d,
122
+ w,
123
+ !1,
124
+ m
125
+ );
126
+ const T = v.exports;
127
+ export {
128
+ T as InTagsText
129
+ };
@@ -0,0 +1,503 @@
1
+ import { InIcons as _ } from "./InIcons.js";
2
+ import { InSkeleton as u } from "./InSkeleton.js";
3
+ import { InTooltip as o } from "./InTooltip.js";
4
+ import { p } from "./chunks/helpers.CgHNyjAJ.js";
5
+ import { n as x } from "./chunks/_plugin-vue2_normalizer.WQT2Fc8L.js";
6
+ /* empty css */
7
+ const f = "_in-text-input-wrapper__input_v01428_57JO8", m = "_in-text-input-wrapper__input_white_v01428_DuNdb", c = "_in-text-input-wrapper__icon_v01428_Rcowj", w = "_in-text-input-wrapper__icon_left_v01428_cpz-c", d = "_in-text-input-wrapper__icon_right_v01428_iK5OB", h = "_in-text-input-wrapper__icon_small_v01428_f-bTa", v = "_in-text-input-wrapper__counter_v01428_aEgV1", g = "_in-text-input-wrapper__label_v01428_ph2v1", y = "_in-text-input-wrapper__error-message_v01428_ShTk0", b = "_in-text-input-wrapper__warning-message_v01428_sADIn", I = "_in-text-input-wrapper__label_disable_v01428_bplde", S = "_in-text-input-wrapper__input_disable_v01428_68ZEg", $ = "_in-text-input-wrapper__prefix_v01428_vDG58", k = "_in-text-input-wrapper__suffix_v01428_Je70l", T = "_in-text-input-wrapper__input_small_v01428_PLZj-", W = "_in-text-input-wrapper__prefix_small_v01428_Lv6wq", C = "_in-text-input-wrapper__suffix_small_v01428_drsWD", z = "_in-form-item_invalid_v01428_JAgz9", B = "_in-form-item_warning_v01428_-zvin", D = {
8
+ "in-text-input-wrapper__input": "_in-text-input-wrapper__input_v01428_57JO8",
9
+ inTextInputWrapperInput: f,
10
+ "in-text-input-wrapper__input_white": "_in-text-input-wrapper__input_white_v01428_DuNdb",
11
+ inTextInputWrapperInputWhite: m,
12
+ "in-text-input-wrapper__icon": "_in-text-input-wrapper__icon_v01428_Rcowj",
13
+ inTextInputWrapperIcon: c,
14
+ "in-text-input-wrapper__icon_left": "_in-text-input-wrapper__icon_left_v01428_cpz-c",
15
+ inTextInputWrapperIconLeft: w,
16
+ "in-text-input-wrapper__icon_right": "_in-text-input-wrapper__icon_right_v01428_iK5OB",
17
+ inTextInputWrapperIconRight: d,
18
+ "in-text-input-wrapper__icon_small": "_in-text-input-wrapper__icon_small_v01428_f-bTa",
19
+ inTextInputWrapperIconSmall: h,
20
+ "in-text-input-wrapper__counter": "_in-text-input-wrapper__counter_v01428_aEgV1",
21
+ inTextInputWrapperCounter: v,
22
+ "in-text-input-wrapper__label": "_in-text-input-wrapper__label_v01428_ph2v1",
23
+ inTextInputWrapperLabel: g,
24
+ "in-text-input-wrapper__error-message": "_in-text-input-wrapper__error-message_v01428_ShTk0",
25
+ inTextInputWrapperErrorMessage: y,
26
+ "in-text-input-wrapper__warning-message": "_in-text-input-wrapper__warning-message_v01428_sADIn",
27
+ inTextInputWrapperWarningMessage: b,
28
+ "in-text-input-wrapper__label_disable": "_in-text-input-wrapper__label_disable_v01428_bplde",
29
+ inTextInputWrapperLabelDisable: I,
30
+ "in-text-input-wrapper__input_disable": "_in-text-input-wrapper__input_disable_v01428_68ZEg",
31
+ inTextInputWrapperInputDisable: S,
32
+ "in-text-input-wrapper__prefix": "_in-text-input-wrapper__prefix_v01428_vDG58",
33
+ inTextInputWrapperPrefix: $,
34
+ "in-text-input-wrapper__suffix": "_in-text-input-wrapper__suffix_v01428_Je70l",
35
+ inTextInputWrapperSuffix: k,
36
+ "in-text-input-wrapper__input_small": "_in-text-input-wrapper__input_small_v01428_PLZj-",
37
+ inTextInputWrapperInputSmall: T,
38
+ "in-text-input-wrapper__prefix_small": "_in-text-input-wrapper__prefix_small_v01428_Lv6wq",
39
+ inTextInputWrapperPrefixSmall: W,
40
+ "in-text-input-wrapper__suffix_small": "_in-text-input-wrapper__suffix_small_v01428_drsWD",
41
+ inTextInputWrapperSuffixSmall: C,
42
+ "in-form-item_invalid": "_in-form-item_invalid_v01428_JAgz9",
43
+ inFormItemInvalid: z,
44
+ "in-form-item_warning": "_in-form-item_warning_v01428_-zvin",
45
+ inFormItemWarning: B
46
+ }, V = {
47
+ components: {
48
+ InIcons: _,
49
+ InSkeleton: u,
50
+ InTooltip: o
51
+ },
52
+ props: {
53
+ /**
54
+ * @property {string} id
55
+ */
56
+ id: {
57
+ type: String,
58
+ required: !0
59
+ },
60
+ /**
61
+ * @property {string} name
62
+ */
63
+ name: {
64
+ type: String,
65
+ required: !0
66
+ },
67
+ /**
68
+ * @property {string|number} value
69
+ */
70
+ value: {
71
+ type: String | Number,
72
+ default: ""
73
+ },
74
+ /**
75
+ * @property {boolean} withLabel
76
+ */
77
+ withLabel: {
78
+ type: Boolean,
79
+ default: !0
80
+ },
81
+ /**
82
+ * @property {string} label
83
+ */
84
+ label: {
85
+ type: String,
86
+ default: ""
87
+ },
88
+ /**
89
+ * @property {string} labelTooltip
90
+ */
91
+ labelTooltip: {
92
+ type: String,
93
+ default: ""
94
+ },
95
+ /**
96
+ * @property {string} type
97
+ */
98
+ type: {
99
+ type: String,
100
+ default: "text"
101
+ },
102
+ /**
103
+ * @property {string} placeholder
104
+ */
105
+ placeholder: {
106
+ type: String,
107
+ required: !0
108
+ },
109
+ /**
110
+ * @property {boolean|number} disable
111
+ */
112
+ disable: {
113
+ type: Boolean | Number,
114
+ default: !1
115
+ },
116
+ /**
117
+ * @property {boolean} invalid
118
+ */
119
+ invalid: {
120
+ type: Boolean,
121
+ default: !1
122
+ },
123
+ /**
124
+ * @property {string} invalidMessage
125
+ */
126
+ invalidMessage: {
127
+ type: String,
128
+ default: ""
129
+ },
130
+ /**
131
+ * @property {boolean} small
132
+ */
133
+ small: {
134
+ type: Boolean,
135
+ default: !1
136
+ },
137
+ /**
138
+ * @property {boolean} withIcon
139
+ */
140
+ withIcon: {
141
+ type: Boolean,
142
+ default: !1
143
+ },
144
+ /**
145
+ * @property {string} iconName
146
+ */
147
+ iconName: {
148
+ type: String,
149
+ default: "search"
150
+ },
151
+ /**
152
+ * @property {string} iconPosition
153
+ */
154
+ iconPosition: {
155
+ type: String,
156
+ default: "left"
157
+ },
158
+ /**
159
+ * @property {string} theme
160
+ */
161
+ theme: {
162
+ type: String,
163
+ default: "grey"
164
+ },
165
+ /**
166
+ * @property {string} autocomplete
167
+ */
168
+ autoComplete: {
169
+ type: String,
170
+ default: "off"
171
+ },
172
+ /**
173
+ * @property {boolean} skeletonStatus
174
+ */
175
+ skeletonStatus: {
176
+ type: Boolean,
177
+ default: !1
178
+ },
179
+ /**
180
+ * @property {number} skeletonSizing
181
+ */
182
+ skeletonSizing: {
183
+ type: Object,
184
+ default: () => ({
185
+ width: 0,
186
+ number: 0
187
+ })
188
+ },
189
+ /**
190
+ * @property {string} accept
191
+ */
192
+ accept: {
193
+ type: String,
194
+ default: ""
195
+ },
196
+ /**
197
+ * @property {boolean} warning
198
+ */
199
+ warning: {
200
+ type: Boolean,
201
+ default: !1
202
+ },
203
+ /**
204
+ * @property {boolean} warningMessage
205
+ */
206
+ warningMessage: {
207
+ type: String,
208
+ default: ""
209
+ },
210
+ /**
211
+ * @property {boolean} withSuffix
212
+ */
213
+ withSuffix: {
214
+ type: Boolean,
215
+ default: !1
216
+ },
217
+ /**
218
+ * @property {string} suffix
219
+ */
220
+ suffix: {
221
+ type: String,
222
+ default: "%"
223
+ },
224
+ /**
225
+ * @property {number|string} maxLength
226
+ */
227
+ maxLength: {
228
+ type: Number | String,
229
+ default: ""
230
+ },
231
+ /**
232
+ * @property {number|string} min
233
+ */
234
+ min: {
235
+ type: Number | String,
236
+ default: 0
237
+ },
238
+ /**
239
+ * @property {boolean} autoFocus
240
+ */
241
+ autoFocus: {
242
+ type: Boolean,
243
+ default: !1
244
+ },
245
+ /**
246
+ * @property {boolean} allowDecimal
247
+ */
248
+ allowDecimal: {
249
+ type: Boolean,
250
+ default: !1
251
+ },
252
+ /**
253
+ * @property {boolean} allowComma
254
+ */
255
+ allowComma: {
256
+ type: Boolean,
257
+ default: !0
258
+ },
259
+ /**
260
+ * @property {boolean|string} prefix
261
+ */
262
+ prefix: {
263
+ type: Boolean | String,
264
+ default: !1
265
+ },
266
+ /**
267
+ * @property {boolean} preventXss
268
+ */
269
+ preventXss: {
270
+ type: Boolean,
271
+ default: !0
272
+ }
273
+ },
274
+ data() {
275
+ return {
276
+ sizingStyles: ""
277
+ };
278
+ },
279
+ computed: {
280
+ /**
281
+ * @return {boolean}
282
+ */
283
+ hasInvalidMessage() {
284
+ return this.invalidMessage !== "" || this.warningMessage !== "";
285
+ },
286
+ /**
287
+ * @return {boolean}
288
+ */
289
+ isFileType() {
290
+ return this.type === "file";
291
+ },
292
+ /**
293
+ * @return {boolean}
294
+ */
295
+ isWarning() {
296
+ return !this.invalid && this.warning;
297
+ },
298
+ /**
299
+ * @return {string}
300
+ */
301
+ message() {
302
+ return this.isWarning ? this.warningMessage : this.invalidMessage;
303
+ },
304
+ /**
305
+ * @return {string}
306
+ */
307
+ messageClass() {
308
+ return this.isWarning ? "in-text-input-wrapper__warning-message" : "in-text-input-wrapper__error-message";
309
+ },
310
+ /**
311
+ * @return {string}
312
+ */
313
+ computedValue() {
314
+ return this.preventXss ? p(this.value) : this.value;
315
+ }
316
+ },
317
+ watch: {
318
+ autoFocus() {
319
+ this.autoFocus && this.focusToInput();
320
+ },
321
+ prefix: {
322
+ handler() {
323
+ this.setSizingStyles();
324
+ },
325
+ immediate: !0
326
+ },
327
+ suffix: {
328
+ handler() {
329
+ this.setSizingStyles();
330
+ },
331
+ immediate: !0
332
+ }
333
+ },
334
+ methods: {
335
+ /**
336
+ * @param {Event} event
337
+ */
338
+ keyup(t) {
339
+ this.$emit("keyup", this.fixValue(t));
340
+ },
341
+ /**
342
+ * @param {Event} event
343
+ */
344
+ keypress(t) {
345
+ if (t.key === "Enter" && this.$emit("enter", this.fixValue(t)), this.type === "number" && this.preventKeyPress(t.key))
346
+ return t.preventDefault(), !0;
347
+ },
348
+ /**
349
+ * @param {string} key
350
+ * @return {boolean}
351
+ */
352
+ preventKeyPress(t) {
353
+ let e = ["e", "E", "+", "\\"];
354
+ return this.min >= 0 && e.push("-"), this.allowDecimal || e.push("."), this.allowComma || e.push(","), e.includes(t);
355
+ },
356
+ /**
357
+ * @param {Event} event
358
+ */
359
+ focus(t) {
360
+ this.$emit("focus", this.fixValue(t));
361
+ },
362
+ /**
363
+ * @param {Event} event
364
+ */
365
+ blur(t) {
366
+ this.$emit("blur", this.fixValue(t));
367
+ },
368
+ /**
369
+ * @param {Event} event
370
+ */
371
+ click(t) {
372
+ this.$emit("click", this.fixValue(t));
373
+ },
374
+ /**
375
+ * @param {Event} event
376
+ */
377
+ input(t) {
378
+ var e;
379
+ this.fixValue(t), this.$emit("input", (e = t == null ? void 0 : t.target) == null ? void 0 : e.value);
380
+ },
381
+ /**
382
+ * @param {Event} event
383
+ */
384
+ change(t) {
385
+ var e, i;
386
+ this.type === "file" ? this.$emit("change", (e = t == null ? void 0 : t.target) == null ? void 0 : e.files) : (this.fixValue(t), this.$emit("change", (i = t == null ? void 0 : t.target) == null ? void 0 : i.value));
387
+ },
388
+ /**
389
+ * @param {Event} event
390
+ */
391
+ iconClick(t) {
392
+ this.click(t), this.$emit("iconClick", t);
393
+ },
394
+ /**
395
+ * @return {void}
396
+ */
397
+ focusToInput() {
398
+ this.$nextTick(() => {
399
+ this.$refs.textInput.focus();
400
+ });
401
+ },
402
+ /**
403
+ * @param {Event} event
404
+ * @return {Event}
405
+ */
406
+ fixValue(t) {
407
+ var e;
408
+ if (this.preventXss && t != null && t.target) {
409
+ const i = p((e = t == null ? void 0 : t.target) == null ? void 0 : e.value);
410
+ t.target.value !== i && (t.target.value = i);
411
+ }
412
+ return t;
413
+ },
414
+ /**
415
+ * @return {void}
416
+ */
417
+ onWheelHandler() {
418
+ this.type === "number" && this.$refs.textInput.blur();
419
+ },
420
+ /**
421
+ * @return {string}
422
+ */
423
+ setSizingStyles() {
424
+ this.$nextTick(() => {
425
+ var t, e, i, n;
426
+ const r = this.withIcon ? 36 : 16, l = (((e = (t = this.$refs) == null ? void 0 : t.prefix) == null ? void 0 : e.clientWidth) || 0) + 16, s = (((n = (i = this.$refs) == null ? void 0 : i.suffix) == null ? void 0 : n.clientWidth) || 0) + r;
427
+ this.sizingStyles = `padding-left: ${l}px; padding-right: ${s}px;`;
428
+ });
429
+ }
430
+ }
431
+ };
432
+ var L = function() {
433
+ var t = this, e = t._self._c;
434
+ return e("fieldset", { staticClass: "in-form-item in-text-input-wrapper qa-text-input", class: [
435
+ t.$style["in-text-input-wrapper"],
436
+ {
437
+ "in-form-item_invalid": t.invalid,
438
+ [t.$style["in-form-item_invalid"]]: t.invalid,
439
+ "in-form-item_warning": t.isWarning,
440
+ [t.$style["in-form-item_warning"]]: t.isWarning
441
+ }
442
+ ] }, [t.withLabel && !t.skeletonStatus ? e("div", { staticClass: "d-f a-i-c" }, [e("label", { staticClass: "in-text-input-wrapper__label mb-2 d-b", class: [
443
+ t.$style["in-text-input-wrapper__label"],
444
+ {
445
+ [t.$style["in-text-input-wrapper__label_disable"]]: t.disable,
446
+ "in-text-input-wrapper__label_disable": t.disable
447
+ }
448
+ ], attrs: { for: t.id } }, [t._v(" " + t._s(t.label) + " ")]), t.labelTooltip ? e("in-tooltip", { attrs: { text: t.labelTooltip } }) : t._e()], 1) : t._e(), t.withIcon && !t.skeletonStatus ? e("in-icons", { staticClass: "in-text-input-wrapper__icon", class: [
449
+ t.$style["in-text-input-wrapper__icon"],
450
+ t.$style[`in-text-input-wrapper__icon_${t.iconPosition}`],
451
+ `in-text-input-wrapper__icon_${t.iconPosition}`,
452
+ {
453
+ [t.$style["in-text-input-wrapper__icon_small"]]: t.small,
454
+ "in-text-input-wrapper__icon_small": t.small
455
+ }
456
+ ], attrs: { name: t.iconName }, on: { click: t.iconClick } }) : t._e(), t.withSuffix && t.suffix && !t.skeletonStatus ? e("p", { ref: "suffix", staticClass: "in-text-input-wrapper__suffix p-a r-0 px-3 bor-l-s-s bor-w-1 bor-c-6 t-c-3", class: [
457
+ t.$style["in-text-input-wrapper__suffix"],
458
+ {
459
+ [t.$style["in-text-input-wrapper__suffix_small"]]: t.small,
460
+ "in-text-input-wrapper__suffix_small": t.small
461
+ }
462
+ ] }, [t._v(" " + t._s(t.suffix) + " ")]) : t._e(), t.prefix && !t.skeletonStatus ? e("div", { ref: "prefix", staticClass: "in-text-input-wrapper__prefix p-a l-0 px-3 bor-r-s-s bor-w-1 bor-c-6 t-c-3", class: [
463
+ t.$style["in-text-input-wrapper__prefix"],
464
+ {
465
+ [t.$style["in-text-input-wrapper__prefix_small"]]: t.small,
466
+ "in-text-input-wrapper__prefix_small": t.small
467
+ }
468
+ ] }, [t._v(" " + t._s(t.prefix) + " ")]) : t._e(), t.skeletonStatus ? t._e() : e("input", { ref: "textInput", staticClass: "in-text-input-wrapper__input py-2 w-1", class: [
469
+ t.$style["in-text-input-wrapper__input"],
470
+ t.$style[`in-text-input-wrapper__input_${t.theme}`],
471
+ {
472
+ "pl-3 pr-7": t.withSuffix,
473
+ "px-3": !t.prefix && !t.withSuffix,
474
+ "h-1": t.isFileType,
475
+ [t.$style["in-text-input-wrapper__input_disable"]]: t.disable,
476
+ "in-text-input-wrapper__input_disable": t.disable,
477
+ [t.$style["in-text-input-wrapper__input_small"]]: t.small,
478
+ "in-text-input-wrapper__input_small": t.small
479
+ },
480
+ `in-text-input-wrapper__input_${t.theme}`
481
+ ], style: t.sizingStyles, attrs: { id: t.id, name: t.name, placeholder: t.placeholder, type: t.type, disabled: t.disable, autocomplete: t.autoComplete, accept: t.accept, maxlength: t.maxLength, min: t.min }, domProps: { value: t.computedValue }, on: { change: t.change, focus: t.focus, blur: t.blur, keyup: t.keyup, keypress: t.keypress, click: t.click, input: t.input, wheel: t.onWheelHandler } }), (t.invalid || t.isWarning) && !t.skeletonStatus && t.hasInvalidMessage ? e("p", { class: [
482
+ `m-0 mt-1 w-b-b-w ${t.messageClass}`,
483
+ t.$style[t.messageClass]
484
+ ] }, [t._v(" " + t._s(t.message) + " ")]) : t._e(), t.skeletonStatus ? e("in-skeleton", { attrs: { sizing: t.skeletonSizing, name: "InTextInput" } }) : t._e()], 1);
485
+ }, M = [];
486
+ const a = {
487
+ $style: D
488
+ };
489
+ function P(t) {
490
+ for (var e in a)
491
+ this[e] = a[e];
492
+ }
493
+ var E = /* @__PURE__ */ x(
494
+ V,
495
+ L,
496
+ M,
497
+ !1,
498
+ P
499
+ );
500
+ const A = E.exports;
501
+ export {
502
+ A as InTextInput
503
+ };