@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.
- package/README.md +1 -0
- package/dist/@types/config/schemas.js +12 -6
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +63 -61
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +18 -0
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +67 -0
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBox.vue2.js +55 -0
- package/dist/composables/useCustomInterfaceAppearance.js +19 -16
- package/dist/composables/useRecommendation.js +43 -35
- package/dist/composables/useStripo.js +30 -29
- package/dist/config/migrator/itemsBlockMigrator.js +1 -1
- package/dist/config/migrator/recommendationMigrator.js +6 -4
- package/dist/enums/date.js +4 -3
- package/dist/enums/extensions/recommendationBlock.js +25 -23
- package/dist/enums/recommendation.js +17 -17
- package/dist/extensions/Blocks/Items/enums/productEnums.js +45 -45
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +13 -11
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +37 -26
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +115 -87
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +132 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +198 -51
- package/dist/extensions/Blocks/Recommendation/utils/productIds.js +6 -0
- package/dist/extensions/Blocks/common-control.js +22 -19
- package/dist/guido.css +1 -1
- package/dist/node_modules/@useinsider/design-system-organisms/dist/index-Dc9AygoZ.js +526 -0
- package/dist/node_modules/@useinsider/design-system-organisms/dist/index.js +9345 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InAccordion.js +174 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBasicTextInput.js +381 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBox.js +236 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InBulkActions.js +70 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButton.js +350 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InButtonV2.js +371 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCheckBox.js +152 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InChips.js +141 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InCustomDropDown.js +1047 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDataTableV2.js +96050 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDatePicker.js +2042 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDrawer.js +166 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InDropDown.js +1098 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InIcons.js +55 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InInfoBox.js +265 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLinks.js +184 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InLoading.js +50 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InModals.js +453 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InNoData.js +145 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InOnPageMessage.js +176 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InProgress.js +266 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InRadioButton.js +114 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSegments.js +200 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSelect.js +451 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InSkeleton.js +49 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InStatusText.js +119 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTabs.js +4309 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTagsText.js +129 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTextInput.js +503 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToasts.js +253 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InToggle.js +107 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltip.js +134 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/InTooltipV2.js +464 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_commonjsHelpers.BItOPCY9.js +28 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/_plugin-vue2_normalizer.WQT2Fc8L.js +23 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/clickOutside.qP9M0QCm.js +29 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/helpers.CgHNyjAJ.js +109 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/index.Bw_06igr.js +2339 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/localLocalesMixin.DYMhydo2.js +16 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/useLocalLocales.Ckuhy7d-.js +17 -0
- package/dist/node_modules/@useinsider/design-system-organisms/node_modules/@useinsider/design-system-vue/dist/chunks/vue-property-decorator.BtlM7Epa.js +188 -0
- package/dist/services/recommendationApi.js +77 -28
- package/dist/src/@types/config/schemas.d.ts +12 -0
- package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +3 -0
- package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBox.vue.d.ts +24 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useRecommendation.d.ts +1 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +12 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +37 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +210 -10
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/productIds.d.ts +6 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +4 -1
- package/dist/src/mock/api/recommendation-strategies.d.ts +43 -0
- package/dist/src/services/recommendationApi.d.ts +4 -1
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +171 -0
- package/dist/utils/dateUtil.js +23 -10
- package/dist/utils/templatePreparation.js +37 -34
- package/package.json +2 -1
|
@@ -0,0 +1,1098 @@
|
|
|
1
|
+
import { o as d, h as c, l as m, b as v, q as f, d as y } from "./chunks/helpers.CgHNyjAJ.js";
|
|
2
|
+
import { InTextInput as g } from "./InTextInput.js";
|
|
3
|
+
import { InButtonV2 as O } from "./InButtonV2.js";
|
|
4
|
+
import { InBox as C } from "./InBox.js";
|
|
5
|
+
import { InIcons as b } from "./InIcons.js";
|
|
6
|
+
import { InSkeleton as L } from "./InSkeleton.js";
|
|
7
|
+
import { c as x } from "./chunks/clickOutside.qP9M0QCm.js";
|
|
8
|
+
import { InTooltip as S } from "./InTooltip.js";
|
|
9
|
+
import { n as $ } from "./chunks/_plugin-vue2_normalizer.WQT2Fc8L.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
const k = "_in-dropdown-wrapper_v01428_diFx-", I = "_in-dropdown-wrapper_invalid_v01428_xYj-N", T = "_in-dropdown-wrapper_warning_v01428_MCbqg", D = "_in-dropdown-wrapper__error-message_v01428_EKdF2", B = "_in-dropdown-wrapper__warning-message_v01428_vwv9S", V = "_in-dropdown-wrapper__text-type_v01428_Ee5Ij", P = "_in-dropdown-wrapper__item-list-wrapper_top_v01428_S4jF0", W = "_in-dropdown-wrapper__black-item-list_v01428_FVF-r", A = "_in-dropdown-wrapper__item-list_checkbox_v01428_3vB54", K = "_create-new-option_v01428_4NWFy", E = {
|
|
12
|
+
"in-dropdown-wrapper": "_in-dropdown-wrapper_v01428_diFx-",
|
|
13
|
+
inDropdownWrapper: k,
|
|
14
|
+
"in-dropdown-wrapper_invalid": "_in-dropdown-wrapper_invalid_v01428_xYj-N",
|
|
15
|
+
inDropdownWrapperInvalid: I,
|
|
16
|
+
"in-dropdown-wrapper_warning": "_in-dropdown-wrapper_warning_v01428_MCbqg",
|
|
17
|
+
inDropdownWrapperWarning: T,
|
|
18
|
+
"in-dropdown-wrapper__error-message": "_in-dropdown-wrapper__error-message_v01428_EKdF2",
|
|
19
|
+
inDropdownWrapperErrorMessage: D,
|
|
20
|
+
"in-dropdown-wrapper__warning-message": "_in-dropdown-wrapper__warning-message_v01428_vwv9S",
|
|
21
|
+
inDropdownWrapperWarningMessage: B,
|
|
22
|
+
"in-dropdown-wrapper__text-type": "_in-dropdown-wrapper__text-type_v01428_Ee5Ij",
|
|
23
|
+
inDropdownWrapperTextType: V,
|
|
24
|
+
"in-dropdown-wrapper__item-list-wrapper_top": "_in-dropdown-wrapper__item-list-wrapper_top_v01428_S4jF0",
|
|
25
|
+
inDropdownWrapperItemListWrapperTop: P,
|
|
26
|
+
"in-dropdown-wrapper__black-item-list": "_in-dropdown-wrapper__black-item-list_v01428_FVF-r",
|
|
27
|
+
inDropdownWrapperBlackItemList: W,
|
|
28
|
+
"in-dropdown-wrapper__item-list_checkbox": "_in-dropdown-wrapper__item-list_checkbox_v01428_3vB54",
|
|
29
|
+
inDropdownWrapperItemListCheckbox: A,
|
|
30
|
+
"create-new-option": "_create-new-option_v01428_4NWFy",
|
|
31
|
+
createNewOption: K
|
|
32
|
+
}, R = 1, w = [38, 40], M = "category", H = ".router-view", r = Object.freeze({ Top: "top", Bottom: "bottom" }), N = [
|
|
33
|
+
["primary", "solid|primary"],
|
|
34
|
+
["secondary", "solid|subtle-primary"],
|
|
35
|
+
["text", "text|primary"],
|
|
36
|
+
["dropdown", "solid|primary"]
|
|
37
|
+
], q = {
|
|
38
|
+
directives: { clickOutside: x },
|
|
39
|
+
components: {
|
|
40
|
+
InTextInput: g,
|
|
41
|
+
InButtonV2: O,
|
|
42
|
+
InBox: C,
|
|
43
|
+
InSkeleton: L,
|
|
44
|
+
InIcons: b,
|
|
45
|
+
InTooltip: S
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
/**
|
|
49
|
+
* @property {string} id
|
|
50
|
+
*/
|
|
51
|
+
id: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "qa-drop-down"
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* @property {array} options
|
|
57
|
+
*/
|
|
58
|
+
options: {
|
|
59
|
+
type: Array,
|
|
60
|
+
default: () => []
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* @property {array} customOptionsKey
|
|
64
|
+
*/
|
|
65
|
+
customOptionsKey: {
|
|
66
|
+
type: Array,
|
|
67
|
+
default: () => []
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* @property {string|number|boolean} value
|
|
71
|
+
*/
|
|
72
|
+
value: {
|
|
73
|
+
type: String | Number | Boolean,
|
|
74
|
+
default: ""
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* @property {string} label
|
|
78
|
+
*/
|
|
79
|
+
label: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: ""
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* @property {string|boolean} labelTooltip
|
|
85
|
+
*/
|
|
86
|
+
labelTooltip: {
|
|
87
|
+
type: String | Boolean,
|
|
88
|
+
default: !1
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* @property {boolean} searchStatus
|
|
92
|
+
*/
|
|
93
|
+
searchStatus: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: !0
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* @property {string} theme
|
|
99
|
+
*/
|
|
100
|
+
theme: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: "grey"
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
* @property {boolean} disable
|
|
106
|
+
*/
|
|
107
|
+
disable: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: !1
|
|
110
|
+
},
|
|
111
|
+
/**
|
|
112
|
+
* @property {boolean} skeletonStatus
|
|
113
|
+
*/
|
|
114
|
+
skeletonStatus: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: !1
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
* @property {string} fetchUrl
|
|
120
|
+
*/
|
|
121
|
+
fetchUrl: {
|
|
122
|
+
type: String,
|
|
123
|
+
default: ""
|
|
124
|
+
},
|
|
125
|
+
/**
|
|
126
|
+
* @property {boolean} autoComplete
|
|
127
|
+
*/
|
|
128
|
+
autoComplete: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
default: !1
|
|
131
|
+
},
|
|
132
|
+
/**
|
|
133
|
+
* @property {boolean} visibleLabel
|
|
134
|
+
*/
|
|
135
|
+
visibleLabel: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
default: !0
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* @property {string} queryString
|
|
141
|
+
*/
|
|
142
|
+
queryString: {
|
|
143
|
+
type: String,
|
|
144
|
+
default: ""
|
|
145
|
+
},
|
|
146
|
+
/**
|
|
147
|
+
* @property {boolean} invalid
|
|
148
|
+
*/
|
|
149
|
+
invalid: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
default: !1
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* @property {boolean} invalidMessage
|
|
155
|
+
*/
|
|
156
|
+
invalidMessage: {
|
|
157
|
+
type: String,
|
|
158
|
+
default: ""
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
* @property {number} skeletonSizing
|
|
162
|
+
*/
|
|
163
|
+
skeletonSizing: {
|
|
164
|
+
type: Object,
|
|
165
|
+
default: () => ({
|
|
166
|
+
width: 0,
|
|
167
|
+
number: 0
|
|
168
|
+
})
|
|
169
|
+
},
|
|
170
|
+
/**
|
|
171
|
+
* @property {string} overriddenListPosition
|
|
172
|
+
*/
|
|
173
|
+
overriddenListPosition: {
|
|
174
|
+
type: String,
|
|
175
|
+
default: "",
|
|
176
|
+
validator: (t) => Object.values({ ...r, default: "" }).includes(t)
|
|
177
|
+
},
|
|
178
|
+
/**
|
|
179
|
+
* @property {string} placeholder
|
|
180
|
+
*/
|
|
181
|
+
placeholder: {
|
|
182
|
+
type: String,
|
|
183
|
+
default: ""
|
|
184
|
+
},
|
|
185
|
+
/**
|
|
186
|
+
* @property {boolean} placeHolderStatus
|
|
187
|
+
*/
|
|
188
|
+
placeHolderStatus: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
default: !1
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* @property {boolean} createOptionStatus
|
|
194
|
+
*/
|
|
195
|
+
createOptionStatus: {
|
|
196
|
+
type: Boolean,
|
|
197
|
+
default: !1
|
|
198
|
+
},
|
|
199
|
+
/**
|
|
200
|
+
* @property {boolean} responseHasData
|
|
201
|
+
*/
|
|
202
|
+
responseHasData: {
|
|
203
|
+
type: Boolean,
|
|
204
|
+
default: !0
|
|
205
|
+
},
|
|
206
|
+
/**
|
|
207
|
+
* @property {string} responseKey
|
|
208
|
+
*/
|
|
209
|
+
responseKey: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: ""
|
|
212
|
+
},
|
|
213
|
+
/**
|
|
214
|
+
* @property {boolean} warning
|
|
215
|
+
*/
|
|
216
|
+
warning: {
|
|
217
|
+
type: Boolean,
|
|
218
|
+
default: !1
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
* @property {string} warningMessage
|
|
222
|
+
*/
|
|
223
|
+
warningMessage: {
|
|
224
|
+
type: String,
|
|
225
|
+
default: ""
|
|
226
|
+
},
|
|
227
|
+
/**
|
|
228
|
+
* @property {string} buttonType
|
|
229
|
+
*/
|
|
230
|
+
buttonType: {
|
|
231
|
+
type: String,
|
|
232
|
+
default: "dropdown"
|
|
233
|
+
},
|
|
234
|
+
/**
|
|
235
|
+
* @property {boolean} canRemoveSelectedItem
|
|
236
|
+
*/
|
|
237
|
+
canRemoveSelectedItem: {
|
|
238
|
+
type: Boolean,
|
|
239
|
+
default: !0
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
* @property {string} type
|
|
243
|
+
*/
|
|
244
|
+
type: {
|
|
245
|
+
type: String,
|
|
246
|
+
default: "default"
|
|
247
|
+
},
|
|
248
|
+
/**
|
|
249
|
+
* @property {number|string} childOptionsLeftPosition
|
|
250
|
+
*/
|
|
251
|
+
childOptionsLeftPosition: {
|
|
252
|
+
type: String | Number,
|
|
253
|
+
default: ""
|
|
254
|
+
},
|
|
255
|
+
/**
|
|
256
|
+
* @property {string} noDataText
|
|
257
|
+
*/
|
|
258
|
+
noDataText: {
|
|
259
|
+
type: String,
|
|
260
|
+
default: "No Data to Show"
|
|
261
|
+
},
|
|
262
|
+
/**
|
|
263
|
+
* @property {string} noSearchResultText
|
|
264
|
+
*/
|
|
265
|
+
noSearchResultText: {
|
|
266
|
+
type: String,
|
|
267
|
+
default: "No Search Result"
|
|
268
|
+
},
|
|
269
|
+
/**
|
|
270
|
+
* @property {string} buttonSize
|
|
271
|
+
*/
|
|
272
|
+
buttonSize: {
|
|
273
|
+
type: String,
|
|
274
|
+
default: "default"
|
|
275
|
+
},
|
|
276
|
+
/**
|
|
277
|
+
* @property {boolean} attributeVisible
|
|
278
|
+
*/
|
|
279
|
+
attributeVisible: {
|
|
280
|
+
type: Boolean,
|
|
281
|
+
default: !1
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
provide() {
|
|
285
|
+
return {
|
|
286
|
+
__disableTriggerButtonMultiline: !0
|
|
287
|
+
};
|
|
288
|
+
},
|
|
289
|
+
data() {
|
|
290
|
+
return {
|
|
291
|
+
search: "",
|
|
292
|
+
selectedText: "",
|
|
293
|
+
selectedValue: "",
|
|
294
|
+
statusList: !1,
|
|
295
|
+
visibleChildOption: !1,
|
|
296
|
+
focusStatus: !1,
|
|
297
|
+
searchInFocus: !1,
|
|
298
|
+
trianglePosition: r.Top,
|
|
299
|
+
optionListPosition: r.Bottom,
|
|
300
|
+
childOptions: [],
|
|
301
|
+
optionList: [],
|
|
302
|
+
fetchPage: 1,
|
|
303
|
+
activeItem: 0,
|
|
304
|
+
activeChild: 0,
|
|
305
|
+
createdOption: {},
|
|
306
|
+
childListPosition: "",
|
|
307
|
+
childMenuRenderCounter: 0
|
|
308
|
+
};
|
|
309
|
+
},
|
|
310
|
+
computed: {
|
|
311
|
+
/**
|
|
312
|
+
* @return {boolean}
|
|
313
|
+
*/
|
|
314
|
+
isCategory() {
|
|
315
|
+
return this.type === M;
|
|
316
|
+
},
|
|
317
|
+
/**
|
|
318
|
+
* @return {boolean}
|
|
319
|
+
*/
|
|
320
|
+
emptyOptions() {
|
|
321
|
+
return this.mappedOptionList.length === 0;
|
|
322
|
+
},
|
|
323
|
+
/**
|
|
324
|
+
* @return boolean
|
|
325
|
+
*/
|
|
326
|
+
noSearchResult() {
|
|
327
|
+
return this.emptyOptions && this.hasSearchValue;
|
|
328
|
+
},
|
|
329
|
+
/**
|
|
330
|
+
* @return {string}
|
|
331
|
+
*/
|
|
332
|
+
emptyOptionsText() {
|
|
333
|
+
return this.noSearchResult ? this.noSearchResultText : this.noDataText;
|
|
334
|
+
},
|
|
335
|
+
/**
|
|
336
|
+
* @return {string}
|
|
337
|
+
*/
|
|
338
|
+
emptyOptionsIcon() {
|
|
339
|
+
return this.noSearchResult ? "line-architect-predefined-segments-channel-actions-40" : "line-dropdown-empty";
|
|
340
|
+
},
|
|
341
|
+
/**
|
|
342
|
+
* @return {array}
|
|
343
|
+
*/
|
|
344
|
+
mappedOptionList() {
|
|
345
|
+
var t;
|
|
346
|
+
let e = 0;
|
|
347
|
+
return (t = this.optionList) == null ? void 0 : t.map((i) => {
|
|
348
|
+
const s = this.customOptionsKey[0], o = this.customOptionsKey[1];
|
|
349
|
+
return i.children ? {
|
|
350
|
+
...i,
|
|
351
|
+
text: o ? i[o] : i.text,
|
|
352
|
+
optionIndex: this.isCategory ? e++ : "",
|
|
353
|
+
children: i.children.map((n) => ({
|
|
354
|
+
...n,
|
|
355
|
+
text: o ? n[o] : n.text,
|
|
356
|
+
value: s ? n[s] : n.value,
|
|
357
|
+
optionIndex: this.isCategory ? "" : e++,
|
|
358
|
+
disable: n.disabled || n.disable
|
|
359
|
+
}))
|
|
360
|
+
} : {
|
|
361
|
+
text: o ? i[o] : i.text,
|
|
362
|
+
value: s ? i[s] : i.value,
|
|
363
|
+
optionIndex: e++,
|
|
364
|
+
disable: i.disabled
|
|
365
|
+
};
|
|
366
|
+
});
|
|
367
|
+
},
|
|
368
|
+
/**
|
|
369
|
+
* @return {boolean}
|
|
370
|
+
*/
|
|
371
|
+
isBlackTheme() {
|
|
372
|
+
return this.theme === "black";
|
|
373
|
+
},
|
|
374
|
+
/**
|
|
375
|
+
* @return {string}
|
|
376
|
+
*/
|
|
377
|
+
url() {
|
|
378
|
+
const t = this.fetchUrl.includes("?") ? "&" : "?", e = `${this.fetchUrl}${t}page=${this.fetchPage}${this.queryString}`;
|
|
379
|
+
return this.hasSearchValue ? `${e}&term=${this.searchTrim}` : (this.selectedValue || this.value) !== "" && this.fetchPage === R ? `${e}&selected=${this.selectedValue || this.value}` : e;
|
|
380
|
+
},
|
|
381
|
+
/**
|
|
382
|
+
* @return {boolean}
|
|
383
|
+
*/
|
|
384
|
+
hasChildren() {
|
|
385
|
+
return d(this.optionList) && this.optionList[0].hasOwnProperty("children");
|
|
386
|
+
},
|
|
387
|
+
/**
|
|
388
|
+
* @return {boolean}
|
|
389
|
+
*/
|
|
390
|
+
hasChildrenInNotMappedOptions() {
|
|
391
|
+
return d(this.options) && this.options[0].hasOwnProperty("children");
|
|
392
|
+
},
|
|
393
|
+
/**
|
|
394
|
+
* @return {boolean}
|
|
395
|
+
*/
|
|
396
|
+
activePlaceholder() {
|
|
397
|
+
return this.placeHolderStatus && this.selectedText === this.placeholder;
|
|
398
|
+
},
|
|
399
|
+
/**
|
|
400
|
+
* @return {string}
|
|
401
|
+
*/
|
|
402
|
+
icon() {
|
|
403
|
+
return !this.placeHolderStatus || !this.canRemoveSelectedItem || this.activePlaceholder ? "filled-dropdown-down" : "line-architect-segments-closed";
|
|
404
|
+
},
|
|
405
|
+
/**
|
|
406
|
+
* @return {string}
|
|
407
|
+
*/
|
|
408
|
+
iconSize() {
|
|
409
|
+
return this.isBlackTheme ? "20" : "24";
|
|
410
|
+
},
|
|
411
|
+
/**
|
|
412
|
+
* @return {boolean}
|
|
413
|
+
*/
|
|
414
|
+
hasSearchValue() {
|
|
415
|
+
return this.searchTrim !== "";
|
|
416
|
+
},
|
|
417
|
+
/**
|
|
418
|
+
* @return {string}
|
|
419
|
+
*/
|
|
420
|
+
searchTrim() {
|
|
421
|
+
return this.search.trim();
|
|
422
|
+
},
|
|
423
|
+
/**
|
|
424
|
+
* @return {boolean}
|
|
425
|
+
*/
|
|
426
|
+
isWarning() {
|
|
427
|
+
return !this.invalid && this.warning;
|
|
428
|
+
},
|
|
429
|
+
/**
|
|
430
|
+
* @return {string}
|
|
431
|
+
*/
|
|
432
|
+
message() {
|
|
433
|
+
return this.isWarning ? this.warningMessage : this.invalidMessage;
|
|
434
|
+
},
|
|
435
|
+
/**
|
|
436
|
+
* @return {string}
|
|
437
|
+
*/
|
|
438
|
+
messageClass() {
|
|
439
|
+
return this.isWarning ? "in-dropdown-wrapper__warning-message" : "in-dropdown-wrapper__error-message";
|
|
440
|
+
},
|
|
441
|
+
/**
|
|
442
|
+
* @return {number}
|
|
443
|
+
*/
|
|
444
|
+
optionLengthWithChildren() {
|
|
445
|
+
return this.optionList.reduce((t, e) => e.children ? t + e.children.length : t + 1, 0);
|
|
446
|
+
},
|
|
447
|
+
/**
|
|
448
|
+
* @return {object}
|
|
449
|
+
*/
|
|
450
|
+
activeOption() {
|
|
451
|
+
let t = null;
|
|
452
|
+
return this.mappedOptionList.forEach((e) => {
|
|
453
|
+
e.children && (t = e.children.find((i) => i.optionIndex === this.activeItem) || t);
|
|
454
|
+
}), t || this.mappedOptionList.find((e) => e.optionIndex === this.activeItem);
|
|
455
|
+
},
|
|
456
|
+
/**
|
|
457
|
+
* @return {boolean}
|
|
458
|
+
*/
|
|
459
|
+
activeOptionHasChild() {
|
|
460
|
+
return d(this.activeOption) && this.activeOption.children && this.activeOption.children.length;
|
|
461
|
+
},
|
|
462
|
+
/**
|
|
463
|
+
* @return {boolean}
|
|
464
|
+
*/
|
|
465
|
+
visibleCategoryList() {
|
|
466
|
+
return this.statusList && this.visibleChildOption;
|
|
467
|
+
},
|
|
468
|
+
/**
|
|
469
|
+
* @return {array}
|
|
470
|
+
*/
|
|
471
|
+
categoryOptions() {
|
|
472
|
+
return this.visibleCategoryList ? this.cloneOptions[this.activeItem].children : this.cloneOptions;
|
|
473
|
+
},
|
|
474
|
+
/**
|
|
475
|
+
* @return {array}
|
|
476
|
+
*/
|
|
477
|
+
cloneOptions() {
|
|
478
|
+
if (this.searchTrim) {
|
|
479
|
+
const t = c(this.optionList).filter((e) => !e.children || e.children.length === 0 ? !1 : e.children.find((i) => i.text ? i.text.toLowerCase().includes(this.searchTrim.toLowerCase()) : !1));
|
|
480
|
+
return t.forEach((e) => {
|
|
481
|
+
e.children = e.children.filter(
|
|
482
|
+
(i) => i.text ? i.text.toLowerCase().includes(this.searchTrim.toLowerCase()) : !1
|
|
483
|
+
);
|
|
484
|
+
}), t;
|
|
485
|
+
}
|
|
486
|
+
return this.optionList;
|
|
487
|
+
},
|
|
488
|
+
/**
|
|
489
|
+
* @return {boolean}
|
|
490
|
+
*/
|
|
491
|
+
hasMatchedTag() {
|
|
492
|
+
return this.optionList.some((t) => t.children ? t.children.some((e) => {
|
|
493
|
+
var i;
|
|
494
|
+
return ((i = e.text) == null ? void 0 : i.toLowerCase()) === this.searchTrim.toLowerCase();
|
|
495
|
+
}) : t.text === this.searchTrim);
|
|
496
|
+
},
|
|
497
|
+
/**
|
|
498
|
+
* @return {boolean}
|
|
499
|
+
*/
|
|
500
|
+
isCreateButtonVisible() {
|
|
501
|
+
return this.createOptionStatus && this.hasSearchValue && !this.hasMatchedTag;
|
|
502
|
+
},
|
|
503
|
+
/**
|
|
504
|
+
* @return {array}
|
|
505
|
+
*/
|
|
506
|
+
filteredOptions() {
|
|
507
|
+
if (this.searchTrim) {
|
|
508
|
+
let t = c(this.options);
|
|
509
|
+
return t = t.filter((e) => this.toLowerCase(e.text).includes(this.toLowerCase(this.searchTrim)) || e.children), t.forEach((e) => {
|
|
510
|
+
e.children && (e.children = e.children.filter(
|
|
511
|
+
(i) => this.toLowerCase(i.text).includes(this.toLowerCase(this.searchTrim))
|
|
512
|
+
));
|
|
513
|
+
}), t.filter((e) => !e.children || e.children.length > 0);
|
|
514
|
+
}
|
|
515
|
+
return this.options;
|
|
516
|
+
},
|
|
517
|
+
/**
|
|
518
|
+
* @return {object}
|
|
519
|
+
*/
|
|
520
|
+
buttonStyling() {
|
|
521
|
+
const t = N.find((e) => e[0] === this.buttonType)[1].split("|");
|
|
522
|
+
return {
|
|
523
|
+
styling: t[0],
|
|
524
|
+
type: t[1]
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
watch: {
|
|
529
|
+
skeletonStatus() {
|
|
530
|
+
this.skeletonStatus || this.setScrollEvent();
|
|
531
|
+
},
|
|
532
|
+
value() {
|
|
533
|
+
this.value === "" && this.placeHolderStatus && (this.selectedText = this.placeholder, this.attributeVisible && (this.selectedValue = "")), this.setValue();
|
|
534
|
+
},
|
|
535
|
+
options() {
|
|
536
|
+
this.prepareOptions(), this.setValue();
|
|
537
|
+
},
|
|
538
|
+
search: y(function() {
|
|
539
|
+
this.fetchPage = 1, d(this.createdOption) && this.autoComplete && this.$emit("change", this.convertKey(this.createdOption).value), this.prepareOptions();
|
|
540
|
+
}, 300),
|
|
541
|
+
autoComplete() {
|
|
542
|
+
this.fetchPage = 1, this.prepareOptions(), this.setDefaultValue();
|
|
543
|
+
},
|
|
544
|
+
statusList() {
|
|
545
|
+
var t;
|
|
546
|
+
(t = this.$refs.dropDownList) == null || t.scrollTo(0, 0), this.$nextTick(() => {
|
|
547
|
+
var e, i;
|
|
548
|
+
this.statusList && ((i = (e = this.$refs.dropDownListWrapper) == null ? void 0 : e.$el) == null || i.focus());
|
|
549
|
+
});
|
|
550
|
+
},
|
|
551
|
+
fetchUrl() {
|
|
552
|
+
this.fetchPage = 1, this.createOptionsWithApi(), this.setDefaultValue();
|
|
553
|
+
},
|
|
554
|
+
childOptions: {
|
|
555
|
+
handler() {
|
|
556
|
+
this.childMenuRenderCounter++;
|
|
557
|
+
},
|
|
558
|
+
deep: !0
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
mounted() {
|
|
562
|
+
if (this.optionList = this.options, this.placeHolderStatus) {
|
|
563
|
+
this.optionList = this.filteredOptions, this.selectedText = this.placeholder, this.setDefaultValue();
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
this.optionList.length !== 0 && (this.hasChildren && this.optionList[0].children.length > 0 ? (this.selectedValue = this.convertKey(this.optionList[0].children[0]).value, this.selectedText = this.convertKey(this.optionList[0].children[0]).text) : (this.selectedValue = this.convertKey(this.optionList[0]).value, this.selectedText = this.convertKey(this.optionList[0]).text)), this.setDefaultValue(), this.prepareOptions(), this.skeletonStatus || this.setScrollEvent(), this.$el.addEventListener("keydown", (t) => {
|
|
567
|
+
w.includes(t.keyCode) && t.preventDefault();
|
|
568
|
+
}, !1);
|
|
569
|
+
},
|
|
570
|
+
methods: {
|
|
571
|
+
/**
|
|
572
|
+
* @param {object} option
|
|
573
|
+
* @return {object}
|
|
574
|
+
*/
|
|
575
|
+
convertKey(t) {
|
|
576
|
+
const e = this.customOptionsKey[0] || "value", i = this.customOptionsKey[1] || "text";
|
|
577
|
+
return {
|
|
578
|
+
text: t[i] || t.text,
|
|
579
|
+
value: t[e] || t.value
|
|
580
|
+
};
|
|
581
|
+
},
|
|
582
|
+
/**
|
|
583
|
+
* @return {void}
|
|
584
|
+
*/
|
|
585
|
+
openList() {
|
|
586
|
+
this.$emit("openList"), this.overriddenListPosition ? (this.optionListPosition = this.overriddenListPosition, this.trianglePosition = this.overriddenListPosition === r.Top ? r.Bottom : r.Top) : this.calculatePosition(), this.createdOption = {}, this.statusList = !this.statusList, this.search = "", this.focusStatus = this.statusList !== !1, this.visibleChildOption && this.closeChildOption();
|
|
587
|
+
},
|
|
588
|
+
/**
|
|
589
|
+
* @return {void}
|
|
590
|
+
*/
|
|
591
|
+
calculatePosition() {
|
|
592
|
+
this.$nextTick(() => {
|
|
593
|
+
const t = document.querySelector(H), e = window.innerHeight, i = f(this.$el), s = t ? parseInt(window.getComputedStyle(t).paddingBottom) : 0, o = 115, n = 75, l = window.pageYOffset, a = 240;
|
|
594
|
+
i.top - l + s < a + o ? (this.trianglePosition = r.Top, this.optionListPosition = r.Bottom) : e - (i.top - l + s) < a + n ? (this.trianglePosition = r.Bottom, this.optionListPosition = r.Top) : (this.trianglePosition = r.Top, this.optionListPosition = r.Bottom);
|
|
595
|
+
});
|
|
596
|
+
},
|
|
597
|
+
/**
|
|
598
|
+
* @return {void}
|
|
599
|
+
*/
|
|
600
|
+
closeList() {
|
|
601
|
+
this.statusList && (this.resetScroll(), this.closeChildOption(), this.resetToInitialValues(), this.$emit("closeList"));
|
|
602
|
+
},
|
|
603
|
+
/**
|
|
604
|
+
* @param {string|number|boolean} value
|
|
605
|
+
* @param {string} text
|
|
606
|
+
* @return {void}
|
|
607
|
+
*/
|
|
608
|
+
selectItem(t, e) {
|
|
609
|
+
this.selectedText = e, this.selectedValue = t, this.$emit("change", t);
|
|
610
|
+
},
|
|
611
|
+
/**
|
|
612
|
+
* @param {string|number|boolean} value
|
|
613
|
+
* @param {string} text
|
|
614
|
+
* @return {void}
|
|
615
|
+
*/
|
|
616
|
+
selectItemAndClose(t, e) {
|
|
617
|
+
this.selectItem(t, e), this.closeList();
|
|
618
|
+
},
|
|
619
|
+
/**
|
|
620
|
+
* @param {object} option
|
|
621
|
+
* @return {void}
|
|
622
|
+
*/
|
|
623
|
+
select(t) {
|
|
624
|
+
if (d(t)) {
|
|
625
|
+
if (t.inActive) {
|
|
626
|
+
this.$emit("selectedInActiveOption", t), this.closeList();
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
629
|
+
t.children || (this.$emit("select", t.value), this.selectItemAndClose(t.value, t.text));
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
/**
|
|
633
|
+
*
|
|
634
|
+
* @param {object} event
|
|
635
|
+
* @return {valid}
|
|
636
|
+
*/
|
|
637
|
+
searchOption(t) {
|
|
638
|
+
w.includes(t.keyCode) && this.$refs.dropDownListWrapper.$el.focus(), this.search = t.target.value, this.closeChildOption();
|
|
639
|
+
},
|
|
640
|
+
/**
|
|
641
|
+
* @return {void}
|
|
642
|
+
*/
|
|
643
|
+
setDefaultValue() {
|
|
644
|
+
this.setValue(), this.selectItemAndClose(this.selectedValue, this.selectedText);
|
|
645
|
+
},
|
|
646
|
+
/**
|
|
647
|
+
* @return {void}
|
|
648
|
+
*/
|
|
649
|
+
setValue() {
|
|
650
|
+
var t, e, i, s;
|
|
651
|
+
let o = { text: this.selectedText, value: this.selectedValue }, n = null, l = null;
|
|
652
|
+
if (this.autoComplete) {
|
|
653
|
+
const p = this.optionList[0] || {};
|
|
654
|
+
o = {
|
|
655
|
+
text: ((t = this.convertKey(p)) == null ? void 0 : t.text) || (this.placeHolderStatus ? this.placeholder : ""),
|
|
656
|
+
value: ((e = this.convertKey(p)) == null ? void 0 : e.value) || ""
|
|
657
|
+
};
|
|
658
|
+
} else this.fetchUrl && (o = {
|
|
659
|
+
text: this.placeHolderStatus ? this.placeholder : "",
|
|
660
|
+
value: ""
|
|
661
|
+
});
|
|
662
|
+
this.optionList.forEach((p) => {
|
|
663
|
+
p.children && (l = p.children.find((h) => {
|
|
664
|
+
var u;
|
|
665
|
+
return ((u = this.convertKey(h)) == null ? void 0 : u.value) === this.value;
|
|
666
|
+
}) || l);
|
|
667
|
+
}), n = this.optionList.find((p) => {
|
|
668
|
+
const h = this.convertKey(p) || {};
|
|
669
|
+
return v(h.value) ? !1 : h.value.toString() === this.value.toString();
|
|
670
|
+
});
|
|
671
|
+
const a = l || n || o;
|
|
672
|
+
this.selectedValue = (i = this.convertKey(a)) == null ? void 0 : i.value, this.selectedText = (s = this.convertKey(a)) == null ? void 0 : s.text;
|
|
673
|
+
},
|
|
674
|
+
/**
|
|
675
|
+
* @return {void}
|
|
676
|
+
*/
|
|
677
|
+
prepareOptions() {
|
|
678
|
+
if (this.autoComplete) {
|
|
679
|
+
this.createOptionsWithApi();
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
this.optionList = this.filteredOptions;
|
|
683
|
+
},
|
|
684
|
+
/**
|
|
685
|
+
* @param {array|null} data
|
|
686
|
+
* @return {void}
|
|
687
|
+
*/
|
|
688
|
+
async appendOptionWithApi(t = null) {
|
|
689
|
+
(t || await this.getResponseData()).forEach((e) => {
|
|
690
|
+
const i = this.convertKey(e);
|
|
691
|
+
this.optionList.find(
|
|
692
|
+
(s) => this.convertKey(s).value === i.value
|
|
693
|
+
) || this.optionList.push({
|
|
694
|
+
text: i.text,
|
|
695
|
+
value: i.value,
|
|
696
|
+
disabled: e.disabled
|
|
697
|
+
});
|
|
698
|
+
});
|
|
699
|
+
},
|
|
700
|
+
/**
|
|
701
|
+
* @return {void}
|
|
702
|
+
*/
|
|
703
|
+
async createOptionsWithApi() {
|
|
704
|
+
this.optionList = await this.getResponseData(), this.appendOptionWithApi(this.optionList.slice()), this.setValue(), this.selectItem(this.selectedValue, this.selectedText), this.addOptionManuelAddedOption();
|
|
705
|
+
},
|
|
706
|
+
/**
|
|
707
|
+
* @param {object} target
|
|
708
|
+
* @return {boolean}
|
|
709
|
+
*/
|
|
710
|
+
isEndOfScroll(t) {
|
|
711
|
+
return t.offsetHeight + t.scrollTop === t.scrollHeight;
|
|
712
|
+
},
|
|
713
|
+
/**
|
|
714
|
+
* @param {string} value
|
|
715
|
+
* @return {string}
|
|
716
|
+
*/
|
|
717
|
+
toLowerCase(t) {
|
|
718
|
+
return String(t).toLowerCase();
|
|
719
|
+
},
|
|
720
|
+
/**
|
|
721
|
+
* @param {string} text
|
|
722
|
+
* @return {string}
|
|
723
|
+
*/
|
|
724
|
+
optionNames(t) {
|
|
725
|
+
return t ? `${m(t.toString())}` : "";
|
|
726
|
+
},
|
|
727
|
+
/**
|
|
728
|
+
* @return {void}
|
|
729
|
+
*/
|
|
730
|
+
deleteSelectedOption() {
|
|
731
|
+
!this.placeHolderStatus || !this.canRemoveSelectedItem || (this.$emit("unSelect", this.selectedValue), this.$emit("select", ""), this.$emit("change", ""), this.selectedText = this.placeholder, this.selectedValue = "");
|
|
732
|
+
},
|
|
733
|
+
/**
|
|
734
|
+
* @param {string} value
|
|
735
|
+
* @return {void}
|
|
736
|
+
*/
|
|
737
|
+
addNewOption(t) {
|
|
738
|
+
this.createdOption = {
|
|
739
|
+
[this.customOptionsKey[1] || "text"]: t,
|
|
740
|
+
[this.customOptionsKey[0] || "value"]: t
|
|
741
|
+
}, this.optionExists(this.convertKey(this.createdOption).value) || (this.autoComplete ? this.optionList.push(c(this.createdOption)) : this.options.push(c(this.createdOption)), this.$emit("addNewOption", { value: t, text: t }), this.selectItem(t, t));
|
|
742
|
+
},
|
|
743
|
+
/**
|
|
744
|
+
* @return {Promise<array>}
|
|
745
|
+
*/
|
|
746
|
+
async getResponseData() {
|
|
747
|
+
try {
|
|
748
|
+
this.$emit("loadingDropDownOptions", !0);
|
|
749
|
+
const t = await fetch(this.url, {
|
|
750
|
+
headers: {
|
|
751
|
+
"X-Requested-With": "XMLHttpRequest"
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
if (!t.ok)
|
|
755
|
+
return [];
|
|
756
|
+
if (this.responseHasData) {
|
|
757
|
+
const { data: e } = await t.json();
|
|
758
|
+
return e;
|
|
759
|
+
}
|
|
760
|
+
return this.responseKey ? (await t.json())[this.responseKey] : await t.json();
|
|
761
|
+
} catch {
|
|
762
|
+
return [];
|
|
763
|
+
} finally {
|
|
764
|
+
this.$emit("loadingDropDownOptions", !1);
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
/**
|
|
768
|
+
* This block should run only mounted hook. We want to add options, if the option is not in fetchedData
|
|
769
|
+
* @return {void}
|
|
770
|
+
*/
|
|
771
|
+
addOptionManuelAddedOption() {
|
|
772
|
+
this.createOptionStatus && !this.optionExists(this.value) && this.value !== "" && (this.optionList = this.optionList.concat({
|
|
773
|
+
[this.customOptionsKey[1] || "text"]: this.value,
|
|
774
|
+
[this.customOptionsKey[0] || "value"]: this.value
|
|
775
|
+
}), this.selectItem(this.value, this.value));
|
|
776
|
+
},
|
|
777
|
+
/**
|
|
778
|
+
* @param {string} value
|
|
779
|
+
* @return {boolean}
|
|
780
|
+
*/
|
|
781
|
+
optionExists(t) {
|
|
782
|
+
return this.optionList.some((e) => e.children ? e.children.some((i) => this.convertKey(i).value === t) : this.convertKey(e).value === t);
|
|
783
|
+
},
|
|
784
|
+
/**
|
|
785
|
+
* @return {void}
|
|
786
|
+
*/
|
|
787
|
+
setScrollEvent() {
|
|
788
|
+
setTimeout(() => {
|
|
789
|
+
this.$refs.dropDownList && (this.$refs.dropDownList.removeEventListener("scroll", this.scrollEvent), this.$refs.dropDownList.addEventListener("scroll", this.scrollEvent));
|
|
790
|
+
}, 5);
|
|
791
|
+
},
|
|
792
|
+
/**
|
|
793
|
+
* @param {object} target
|
|
794
|
+
* @return {void}
|
|
795
|
+
*/
|
|
796
|
+
scrollEvent({ target: t }) {
|
|
797
|
+
this.autoComplete && this.isEndOfScroll(t) && (this.fetchPage++, this.appendOptionWithApi());
|
|
798
|
+
},
|
|
799
|
+
/**
|
|
800
|
+
* @param {object} option
|
|
801
|
+
* @param {number} index
|
|
802
|
+
* @return {void}
|
|
803
|
+
*/
|
|
804
|
+
openChildOption(t, e) {
|
|
805
|
+
if (this.setActiveItem(e), t.children && t.children.length) {
|
|
806
|
+
this.childOptions = t.children, this.visibleChildOption = !0, this.calculateChildOptionPosition();
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
this.visibleChildOption = !1;
|
|
810
|
+
},
|
|
811
|
+
/**
|
|
812
|
+
* @return {void}
|
|
813
|
+
*/
|
|
814
|
+
closeChildOption() {
|
|
815
|
+
this.visibleChildOption = !1;
|
|
816
|
+
},
|
|
817
|
+
/**
|
|
818
|
+
* @param {array} arr
|
|
819
|
+
* @param {boolean} children
|
|
820
|
+
* @return {void}
|
|
821
|
+
*/
|
|
822
|
+
increaseActiveItem(t, e = !1) {
|
|
823
|
+
if (!t.length)
|
|
824
|
+
return;
|
|
825
|
+
if (e)
|
|
826
|
+
this.activeChild = this.activeChild < t.length - 1 ? ++this.activeChild : 0;
|
|
827
|
+
else {
|
|
828
|
+
const n = this.isCategory ? t.length : this.optionLengthWithChildren;
|
|
829
|
+
this.activeItem = this.activeItem < n - 1 ? ++this.activeItem : 0;
|
|
830
|
+
}
|
|
831
|
+
const i = e ? this.activeChild : this.activeItem, s = this.$el.querySelector(`.in-dropdown-wrapper__item-list${e ? "-child" : ""}`), o = `.option__${i}${e ? "-child" : ""}`;
|
|
832
|
+
this.scrollDown(i, s, o);
|
|
833
|
+
},
|
|
834
|
+
/**
|
|
835
|
+
* @param {array} arr
|
|
836
|
+
* @param {boolean} children
|
|
837
|
+
* @return {void}
|
|
838
|
+
*/
|
|
839
|
+
decreaseActiveItem(t, e = !1) {
|
|
840
|
+
if (!t.length)
|
|
841
|
+
return;
|
|
842
|
+
let i = 0;
|
|
843
|
+
e ? this.activeChild = this.activeChild === 0 ? t.length - 1 : --this.activeChild : (i = this.isCategory ? t.length : this.optionLengthWithChildren, this.activeItem = this.activeItem === 0 ? i - 1 : --this.activeItem);
|
|
844
|
+
const s = e ? this.activeChild : this.activeItem, o = this.$el.querySelector(`.in-dropdown-wrapper__item-list${e ? "-child" : ""}`), n = `.option__${s}${e ? "-child" : ""}`;
|
|
845
|
+
this.scrollUp(s, o, n, i);
|
|
846
|
+
},
|
|
847
|
+
/**
|
|
848
|
+
* @param {number} activeIndex
|
|
849
|
+
* @param {HTMLElement} list
|
|
850
|
+
* @param {string} selector
|
|
851
|
+
* @return {void}
|
|
852
|
+
*/
|
|
853
|
+
scrollDown(t, e, i) {
|
|
854
|
+
const s = this.$el.querySelector(i).getBoundingClientRect().bottom, o = e.getBoundingClientRect().bottom, n = s - o;
|
|
855
|
+
if (t > 0) {
|
|
856
|
+
n > 0 && e.scrollBy(0, n);
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
e.scrollTop = 0;
|
|
860
|
+
},
|
|
861
|
+
/**
|
|
862
|
+
* @param {number} activeIndex
|
|
863
|
+
* @param {HTMLElement} list
|
|
864
|
+
* @param {string} selector
|
|
865
|
+
* @param {number} optionsLength
|
|
866
|
+
* @return {void}
|
|
867
|
+
*/
|
|
868
|
+
scrollUp(t, e, i, s) {
|
|
869
|
+
const o = this.$el.querySelector(i).getBoundingClientRect().top, n = e.getBoundingClientRect().top, l = e.scrollHeight, a = n - o;
|
|
870
|
+
if (t < s - 1) {
|
|
871
|
+
a > 0 && e.scrollBy(0, -a);
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
e.scrollBy(0, l);
|
|
875
|
+
},
|
|
876
|
+
/**
|
|
877
|
+
* @return {void}
|
|
878
|
+
*/
|
|
879
|
+
resetToInitialValues() {
|
|
880
|
+
this.activeItem = 0, this.activeChild = 0, this.statusList = !1, this.focusStatus = !1;
|
|
881
|
+
},
|
|
882
|
+
/**
|
|
883
|
+
* @return {void}
|
|
884
|
+
*/
|
|
885
|
+
resetScroll() {
|
|
886
|
+
const t = this.$refs.dropDownList, e = this.$refs.categoryDropdown;
|
|
887
|
+
t && (t.scrollTop = 0), e && (e.scrollTop = 0);
|
|
888
|
+
},
|
|
889
|
+
/**
|
|
890
|
+
* @param {object} option
|
|
891
|
+
* @return {array}
|
|
892
|
+
*/
|
|
893
|
+
createOptionClasses(t) {
|
|
894
|
+
const e = t.value === this.selectedValue, i = [
|
|
895
|
+
`option__${t.optionIndex}`,
|
|
896
|
+
`${this.id}-${this.optionNames(t.text)}`
|
|
897
|
+
];
|
|
898
|
+
return e && i.push("in-dropdown-wrapper__item-list_selected"), t.disable && i.push("in-dropdown-wrapper__item-list_disabled"), this.activeItem === t.optionIndex && (i.push("option_active"), i.push(this.$style.option_active)), i;
|
|
899
|
+
},
|
|
900
|
+
/**
|
|
901
|
+
* @param {object} option
|
|
902
|
+
* @param {boolean} hovered
|
|
903
|
+
* @return {void}
|
|
904
|
+
*/
|
|
905
|
+
openChildInCategory(t, e = !1) {
|
|
906
|
+
if (this.searchInFocus || !t)
|
|
907
|
+
return;
|
|
908
|
+
const i = !t.withoutChildren && t.children && t.children.length > 0;
|
|
909
|
+
if (!i && !e) {
|
|
910
|
+
this.$emit("select", t);
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
this.activeChild = 0, this.visibleChildOption = i, this.childOptions = t.children;
|
|
914
|
+
},
|
|
915
|
+
/**
|
|
916
|
+
* @param {number} index
|
|
917
|
+
* @return {void}
|
|
918
|
+
*/
|
|
919
|
+
setActiveChild(t) {
|
|
920
|
+
this.activeChild = t;
|
|
921
|
+
},
|
|
922
|
+
/**
|
|
923
|
+
* @param {number} index
|
|
924
|
+
* @return {void}
|
|
925
|
+
*/
|
|
926
|
+
setActiveItem(t) {
|
|
927
|
+
this.activeItem = t;
|
|
928
|
+
},
|
|
929
|
+
/**
|
|
930
|
+
* @return {void}
|
|
931
|
+
*/
|
|
932
|
+
selectChildOption() {
|
|
933
|
+
if (!this.activeOptionHasChild) {
|
|
934
|
+
this.select(this.activeOption), this.closeList();
|
|
935
|
+
return;
|
|
936
|
+
}
|
|
937
|
+
if (d(this.childOptions) && this.visibleCategoryList) {
|
|
938
|
+
const t = this.childOptions[this.activeChild];
|
|
939
|
+
this.$emit("select", t), t.emit || this.select(t), this.closeList();
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
/**
|
|
943
|
+
* @return {void}
|
|
944
|
+
*/
|
|
945
|
+
focusOnSearch() {
|
|
946
|
+
this.searchInFocus = !0;
|
|
947
|
+
},
|
|
948
|
+
/**
|
|
949
|
+
* @return {void}
|
|
950
|
+
*/
|
|
951
|
+
unfocusSearch() {
|
|
952
|
+
this.searchInFocus = !1;
|
|
953
|
+
},
|
|
954
|
+
/**
|
|
955
|
+
* @return {string}
|
|
956
|
+
*/
|
|
957
|
+
calculateChildOptionPosition() {
|
|
958
|
+
const t = this.childOptionsLeftPosition || this.$refs.dropDownListWrapper.$el.clientWidth;
|
|
959
|
+
let e = 0;
|
|
960
|
+
this.$nextTick(() => {
|
|
961
|
+
const i = this.$refs.dropDownListWrapper.$el.offsetTop, s = this.$el.querySelector(".option_active").offsetTop, o = this.$refs.dropDownList.scrollTop, n = window.getComputedStyle(this.$refs.categoryDropdown.$el).paddingTop;
|
|
962
|
+
e = i + s - o - parseInt(n), this.childListPosition = `left: ${t}px; top: ${e}px;`;
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
var F = function() {
|
|
968
|
+
var t = this, e = t._self._c;
|
|
969
|
+
return e("div", { directives: [{ name: "click-outside", rawName: "v-click-outside", value: t.closeList, expression: "closeList" }], staticClass: "in-dropdown-wrapper qa-drop-down", class: [
|
|
970
|
+
t.$style["in-dropdown-wrapper"],
|
|
971
|
+
{
|
|
972
|
+
[t.$style["in-dropdown-wrapper_invalid"]]: t.invalid,
|
|
973
|
+
"in-dropdown-wrapper_invalid": t.invalid,
|
|
974
|
+
[t.$style["in-dropdown-wrapper_warning"]]: t.isWarning,
|
|
975
|
+
"in-dropdown-wrapper_warning": t.isWarning,
|
|
976
|
+
"no-hover-effect": t.buttonType === "dropdown",
|
|
977
|
+
[t.$style["in-dropdown-wrapper__text-type"]]: t.buttonType === "text",
|
|
978
|
+
"in-dropdown-wrapper__text-type": t.buttonType === "text"
|
|
979
|
+
}
|
|
980
|
+
], on: { mouseleave: function(i) {
|
|
981
|
+
return t.$emit("mouseleave");
|
|
982
|
+
}, mouseover: function(i) {
|
|
983
|
+
return t.$emit("mouseover");
|
|
984
|
+
} } }, [!t.skeletonStatus && t.visibleLabel ? e("label", { staticClass: "in-dropdown-wrapper__label mb-2 d-b", class: [
|
|
985
|
+
t.$style["in-dropdown-wrapper__label"],
|
|
986
|
+
{
|
|
987
|
+
[t.$style["in-dropdown-wrapper__label_disable"]]: t.disable,
|
|
988
|
+
"in-dropdown-wrapper__label_disable": t.disable
|
|
989
|
+
}
|
|
990
|
+
], on: { click: t.closeList } }, [t._v(" " + t._s(t.label) + " "), t.labelTooltip ? e("in-tooltip", { staticClass: "in-dropdown-wrapper__label__tooltip t-2", class: t.$style["in-dropdown-wrapper__label__tooltip"], attrs: { text: t.labelTooltip, align: "center", "with-icon": !1 } }, [e("in-icons", { staticClass: "i-c-3", attrs: { slot: "element", name: "line-tooltip", size: "24" }, slot: "element" })], 1) : t._e()], 1) : t._e(), t.skeletonStatus ? t._e() : e("in-button-v2", { ref: "dropdownButton", staticClass: "dropdown-button w-1 d-f", class: [
|
|
991
|
+
{
|
|
992
|
+
"bor-c-7": t.statusList && !t.isBlackTheme,
|
|
993
|
+
placeholder: t.activePlaceholder,
|
|
994
|
+
"in-dropdown-button-opened": t.statusList,
|
|
995
|
+
"in-dropdown-button": t.buttonType === "dropdown",
|
|
996
|
+
"in-dropdown-button_white": t.buttonType === "dropdown" && t.theme === "white",
|
|
997
|
+
"in-dropdown-button_grey": t.buttonType === "dropdown" && t.theme === "grey",
|
|
998
|
+
"in-dropdown-button_black": t.buttonType === "dropdown" && t.theme === "black"
|
|
999
|
+
}
|
|
1000
|
+
], attrs: { id: t.id, styling: t.buttonStyling.styling, type: t.buttonStyling.type, "icon-click": t.placeHolderStatus && t.canRemoveSelectedItem, "icon-size": t.iconSize, "label-text": t.selectedText, "disabled-status": t.disable, "right-icon": t.icon, size: t.buttonSize }, on: { clickIcon: t.deleteSelectedOption, click: t.openList } }), (t.invalid || t.isWarning) && !t.skeletonStatus ? e("p", { class: [
|
|
1001
|
+
"m-0 mt-1",
|
|
1002
|
+
t.messageClass,
|
|
1003
|
+
t.isWarning ? t.$style["in-dropdown-wrapper__warning-message"] : t.$style["in-dropdown-wrapper__error-message"]
|
|
1004
|
+
] }, [t._v(" " + t._s(t.message) + " ")]) : t._e(), !t.skeletonStatus && !t.isCategory ? e("in-box", { directives: [{ name: "show", rawName: "v-show", value: t.statusList, expression: "statusList" }], ref: "dropDownListWrapper", staticClass: "qa-dropdown-list-wrapper w-1", class: [
|
|
1005
|
+
"mt-1",
|
|
1006
|
+
"in-dropdown-wrapper__item-list-wrapper",
|
|
1007
|
+
t.$style["in-dropdown-wrapper__item-list-wrapper"],
|
|
1008
|
+
`in-dropdown-wrapper__item-list-wrapper_${t.optionListPosition}`,
|
|
1009
|
+
t.$style[`in-dropdown-wrapper__item-list-wrapper_${t.optionListPosition}`],
|
|
1010
|
+
{
|
|
1011
|
+
"in-dropdown-wrapper__item-list-wrapper_top_hidden-label": !t.visibleLabel,
|
|
1012
|
+
"in-dropdown-wrapper__item-list-black": t.isBlackTheme,
|
|
1013
|
+
[t.$style["in-dropdown-wrapper__black-item-list"]]: t.isBlackTheme,
|
|
1014
|
+
"in-dropdown-wrapper__item-list-wrapper-tag-status": t.isCreateButtonVisible
|
|
1015
|
+
}
|
|
1016
|
+
], attrs: { border: "bor-w-0 bor-s-n", tabindex: "0" }, nativeOn: { keyup: [function(i) {
|
|
1017
|
+
return !i.type.indexOf("key") && t._k(i.keyCode, "down", 40, i.key, ["Down", "ArrowDown"]) ? null : t.increaseActiveItem(t.mappedOptionList);
|
|
1018
|
+
}, function(i) {
|
|
1019
|
+
return !i.type.indexOf("key") && t._k(i.keyCode, "up", 38, i.key, ["Up", "ArrowUp"]) ? null : t.decreaseActiveItem(t.mappedOptionList);
|
|
1020
|
+
}, function(i) {
|
|
1021
|
+
return !i.type.indexOf("key") && t._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : t.select(t.activeOption);
|
|
1022
|
+
}] } }, [t.searchStatus && (t.options.length !== 0 || t.autoComplete) ? e("in-text-input", { staticClass: "mx-2 mb-2", attrs: { id: `${t.id}-search`, name: "drop-down-search", "icon-name": "line-menu-search", "icon-position": "right", placeholder: "Search", value: t.search, "with-icon": !0, "with-label": !1, "auto-focus": t.focusStatus }, on: { focus: t.focusOnSearch, blur: t.unfocusSearch, keyup: t.searchOption } }) : t._e(), t.emptyOptions ? e("div", { staticClass: "d-f f-d-c a-i-c mt-4" }, [e("in-icons", { staticClass: "i-c-2", attrs: { name: t.emptyOptionsIcon, size: "40" } }), e("p", { staticClass: "in-dropdown-wrapper__no-search-result t-c-2 cur-t", class: t.$style["in-dropdown-wrapper__no-search-result"] }, [t._v(" " + t._s(t.emptyOptionsText) + " ")])], 1) : t._e(), t.isCreateButtonVisible ? e("div", { staticClass: "create-new-option clearfix cur-p d-f px-3 py-2 o-h p-a b-0 bor-t-w-1 bor-t-s-s bor-c-6 w-1 o-h", class: t.$style["create-new-option"], on: { click: function(i) {
|
|
1023
|
+
return t.addNewOption(t.searchTrim);
|
|
1024
|
+
} } }, [e("in-icons", { staticClass: "fl-l i-c-7 min-w-4-s", attrs: { name: "line-plus-netural" } }), e("span", { staticClass: "ml-1 fl-l t-c-7 l-h-2 o-h w-s-n-w t-o-e" }, [t._v(" Create: " + t._s(t.searchTrim) + " ")])], 1) : t._e(), e("div", { ref: "dropDownList", staticClass: "in-dropdown-wrapper__item-list", class: [
|
|
1025
|
+
t.$style["in-dropdown-wrapper__item-list"],
|
|
1026
|
+
{
|
|
1027
|
+
"in-dropdown-wrapper__black-item-list": t.isBlackTheme,
|
|
1028
|
+
[t.$style["in-dropdown-wrapper__black-item-list"]]: t.isBlackTheme
|
|
1029
|
+
}
|
|
1030
|
+
] }, t._l(t.mappedOptionList, function(i, s) {
|
|
1031
|
+
return e("div", { key: s }, [i.children ? e("div", [e("p", { staticClass: "in-dropdown-wrapper__item-list-title f-s-1 l-h-1 m-0 t-t-u l-s-5 p-e-n", class: t.$style["in-dropdown-wrapper__item-list-title"] }, [t._v(" " + t._s(i.text) + " ")]), t._l(i.children, function(o, n) {
|
|
1032
|
+
return e("a", { key: n, class: t.createOptionClasses(o), on: { click: function(l) {
|
|
1033
|
+
return t.select(o);
|
|
1034
|
+
} } }, [t._v(" " + t._s(o.text) + " ")]);
|
|
1035
|
+
})], 2) : t._e(), i.children ? t._e() : e("a", { class: t.createOptionClasses(i), on: { click: function(o) {
|
|
1036
|
+
return t.select(i);
|
|
1037
|
+
} } }, [t._v(" " + t._s(i.text) + " ")])]);
|
|
1038
|
+
}), 0)], 1) : t._e(), !t.skeletonStatus && t.isCategory ? e("in-box", { directives: [{ name: "show", rawName: "v-show", value: t.statusList, expression: "statusList" }], ref: "dropDownListWrapper", staticClass: "qa-dropdown-list-wrapper-category w-1", class: [
|
|
1039
|
+
"mt-1",
|
|
1040
|
+
"in-dropdown-wrapper__item-list-wrapper",
|
|
1041
|
+
t.$style["in-dropdown-wrapper__item-list-wrapper"],
|
|
1042
|
+
`in-dropdown-wrapper__item-list-wrapper_${t.optionListPosition}`,
|
|
1043
|
+
t.$style[`in-dropdown-wrapper__item-list-wrapper_${t.optionListPosition}`],
|
|
1044
|
+
{
|
|
1045
|
+
"in-dropdown-wrapper__item-list-wrapper_top_hidden-label": !t.visibleLabel
|
|
1046
|
+
}
|
|
1047
|
+
], attrs: { tabindex: "0", border: "bor-w-0 bor-s-n" }, nativeOn: { keyup: [function(i) {
|
|
1048
|
+
return !i.type.indexOf("key") && t._k(i.keyCode, "down", 40, i.key, ["Down", "ArrowDown"]) ? null : t.increaseActiveItem(t.categoryOptions, t.visibleChildOption);
|
|
1049
|
+
}, function(i) {
|
|
1050
|
+
return !i.type.indexOf("key") && t._k(i.keyCode, "up", 38, i.key, ["Up", "ArrowUp"]) ? null : t.decreaseActiveItem(t.categoryOptions, t.visibleChildOption);
|
|
1051
|
+
}, function(i) {
|
|
1052
|
+
return !i.type.indexOf("key") && t._k(i.keyCode, "right", 39, i.key, ["Right", "ArrowRight"]) || "button" in i && i.button !== 2 ? null : t.openChildInCategory(t.cloneOptions[t.activeItem]);
|
|
1053
|
+
}, function(i) {
|
|
1054
|
+
return !i.type.indexOf("key") && t._k(i.keyCode, "left", 37, i.key, ["Left", "ArrowLeft"]) || "button" in i && i.button !== 0 ? null : t.closeChildOption.apply(null, arguments);
|
|
1055
|
+
}, function(i) {
|
|
1056
|
+
return !i.type.indexOf("key") && t._k(i.keyCode, "enter", 13, i.key, "Enter") ? null : t.selectChildOption.apply(null, arguments);
|
|
1057
|
+
}] } }, [t.searchStatus ? e("in-text-input", { staticClass: "mx-2 mb-2", attrs: { id: `${t.id}-search`, name: "drop-down-search", placeholder: "Search", "icon-name": "line-menu-search", "icon-position": "right", value: t.search, "with-icon": !0, "with-label": !1 }, on: { focus: t.focusOnSearch, blur: t.unfocusSearch, keyup: t.searchOption } }) : t._e(), e("div", { ref: "dropDownList", staticClass: "in-dropdown-wrapper__item-list", class: t.$style["in-dropdown-wrapper__item-list"] }, t._l(t.cloneOptions, function(i, s) {
|
|
1058
|
+
return e("div", { key: s, staticClass: "option option_category-dropdown f-s-2 l-h-2 m-0", class: [
|
|
1059
|
+
`option__${s}`,
|
|
1060
|
+
{ option_active: t.activeItem === s },
|
|
1061
|
+
...t.createOptionClasses(i)
|
|
1062
|
+
], on: { mouseover: function(o) {
|
|
1063
|
+
return t.openChildOption(i, s);
|
|
1064
|
+
}, click: function(o) {
|
|
1065
|
+
return t.select(i);
|
|
1066
|
+
} } }, [e("span", { staticClass: "f-s-2 l-h-2 m-0" }, [t._v(" " + t._s(i.text) + " ")]), i.children && i.children.length ? e("in-icons", { staticClass: "fl-r mt-1", attrs: { name: "line-chevron-right", size: "18" } }) : t._e()], 1);
|
|
1067
|
+
}), 0)], 1) : t._e(), t.visibleChildOption ? e("in-box", { key: t.childMenuRenderCounter, ref: "categoryDropdown", staticClass: "in-dropdown-wrapper__item-list-wrapper in-dropdown-wrapper__item-list-child p-a max-h-21-s w-22-s o-y-s", class: [
|
|
1068
|
+
t.$style["in-dropdown-wrapper__item-list-wrapper"],
|
|
1069
|
+
t.$style["in-dropdown-wrapper__item-list-child"]
|
|
1070
|
+
], style: t.childListPosition, attrs: { border: "bor-w-0 bor-s-n" } }, t._l(t.childOptions, function(i, s) {
|
|
1071
|
+
return e("p", { key: s, staticClass: "option option_category-dropdown f-s-2 l-h-2 m-0", class: [
|
|
1072
|
+
{ "option_active-child": t.selectedValue === i.value },
|
|
1073
|
+
{ option_active: t.activeChild === s },
|
|
1074
|
+
`option__${s}-child`,
|
|
1075
|
+
...t.createOptionClasses(i)
|
|
1076
|
+
], on: { mouseenter: function(o) {
|
|
1077
|
+
return t.setActiveChild(s);
|
|
1078
|
+
}, click: t.selectChildOption } }, [t._v(" " + t._s(i.text) + " ")]);
|
|
1079
|
+
}), 0) : t._e(), t.skeletonStatus ? e("in-skeleton", { attrs: { sizing: t.skeletonSizing, name: "InDropDown" } }) : t._e()], 1);
|
|
1080
|
+
}, z = [];
|
|
1081
|
+
const _ = {
|
|
1082
|
+
$style: E
|
|
1083
|
+
};
|
|
1084
|
+
function j(t) {
|
|
1085
|
+
for (var e in _)
|
|
1086
|
+
this[e] = _[e];
|
|
1087
|
+
}
|
|
1088
|
+
var U = /* @__PURE__ */ $(
|
|
1089
|
+
q,
|
|
1090
|
+
F,
|
|
1091
|
+
z,
|
|
1092
|
+
!1,
|
|
1093
|
+
j
|
|
1094
|
+
);
|
|
1095
|
+
const ot = U.exports;
|
|
1096
|
+
export {
|
|
1097
|
+
ot as InDropDown
|
|
1098
|
+
};
|