@opentiny/vue-search-box 0.1.1-alpha.3 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/es/components/first-level-panel.vue.es.js +4 -0
- package/dist/es/components/first-level-panel.vue.es2.js +177 -0
- package/dist/es/components/second-level-panel.vue.es.js +4 -0
- package/dist/es/components/second-level-panel.vue.es2.js +466 -0
- package/dist/es/composables/use-checkbox.es.js +5 -18
- package/dist/es/composables/use-custom.es.js +1 -0
- package/dist/es/composables/use-datepicker.es.js +1 -1
- package/dist/es/composables/use-dropdown.es.js +27 -18
- package/dist/es/composables/use-edit.es.js +3 -1
- package/dist/es/composables/use-init.es.js +24 -10
- package/dist/es/composables/use-match.es.js +42 -42
- package/dist/es/composables/use-num-range.es.js +1 -1
- package/dist/es/composables/use-placeholder.es.js +2 -2
- package/dist/es/composables/use-tag.es.js +6 -1
- package/dist/es/{index-VrLZbD8H.css → index-BYxS8gdW.css} +56 -14
- package/dist/es/index.es.js +6 -0
- package/dist/es/index.vue.es2.js +150 -623
- package/dist/es/utils/dropdown.es.js +9 -5
- package/dist/es/utils/tag.es.js +2 -4
- package/dist/index.css +56 -14
- package/dist/lib/components/first-level-panel.vue.cjs.js +4 -0
- package/dist/lib/components/first-level-panel.vue.cjs2.js +177 -0
- package/dist/lib/components/second-level-panel.vue.cjs.js +4 -0
- package/dist/lib/components/second-level-panel.vue.cjs2.js +466 -0
- package/dist/lib/composables/use-checkbox.cjs.js +5 -18
- package/dist/lib/composables/use-custom.cjs.js +1 -0
- package/dist/lib/composables/use-datepicker.cjs.js +1 -1
- package/dist/lib/composables/use-dropdown.cjs.js +27 -18
- package/dist/lib/composables/use-edit.cjs.js +3 -1
- package/dist/lib/composables/use-init.cjs.js +24 -10
- package/dist/lib/composables/use-match.cjs.js +41 -41
- package/dist/lib/composables/use-num-range.cjs.js +1 -1
- package/dist/lib/composables/use-placeholder.cjs.js +2 -2
- package/dist/lib/composables/use-tag.cjs.js +6 -1
- package/dist/lib/{index-VrLZbD8H.css → index-BYxS8gdW.css} +56 -14
- package/dist/lib/index.cjs.js +6 -0
- package/dist/lib/index.vue.cjs2.js +156 -629
- package/dist/lib/utils/dropdown.cjs.js +9 -5
- package/dist/lib/utils/tag.cjs.js +1 -3
- package/dist/types/composables/use-checkbox.d.ts +0 -2
- package/dist/types/composables/use-dropdown.d.ts +1 -0
- package/package.json +1 -2
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
const showDropdown = (state, isShow = true) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
if (isShow) {
|
|
3
|
+
state.visibleTimer = setTimeout(() => {
|
|
4
|
+
state.visible = true;
|
|
5
|
+
}, 0);
|
|
6
|
+
} else {
|
|
7
|
+
clearTimeout(state.visibleTimer);
|
|
8
|
+
state.visibleTimer = null;
|
|
9
|
+
state.visible = false;
|
|
10
|
+
}
|
|
7
11
|
};
|
|
8
12
|
const showPopover = (state, isShow = true) => {
|
|
9
13
|
state.popoverVisible = isShow;
|
package/dist/es/utils/tag.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { deepClone } from "./clone.es.js";
|
|
2
|
-
import {
|
|
2
|
+
import { showPopover } from "./dropdown.es.js";
|
|
3
3
|
const hasTagItem = (state, itemValue, itemLabel = "") => {
|
|
4
4
|
const { valueMap, prevItem } = state;
|
|
5
5
|
const value = (prevItem.label || itemLabel) + itemValue;
|
|
6
6
|
return valueMap.has(value);
|
|
7
7
|
};
|
|
8
8
|
const resetInput = (state) => {
|
|
9
|
-
state.isResetFlag = false;
|
|
10
9
|
state.propItem = {};
|
|
11
10
|
state.inputValue = "";
|
|
12
11
|
};
|
|
13
12
|
const emitChangeModelEvent = ({ emits, state, ...args }) => {
|
|
13
|
+
showPopover(state, false);
|
|
14
14
|
const { tagList = null, index = -1, newTag = null, newValue = null, oldValue = null, isEdit } = args;
|
|
15
15
|
if (!isEdit) {
|
|
16
16
|
resetInput(state);
|
|
@@ -27,8 +27,6 @@ const emitChangeModelEvent = ({ emits, state, ...args }) => {
|
|
|
27
27
|
state.innerModelValue.push(...tagList);
|
|
28
28
|
}
|
|
29
29
|
const { innerModelValue } = state;
|
|
30
|
-
showDropdown(state, false);
|
|
31
|
-
showPopover(state, false);
|
|
32
30
|
emits("update:modelValue", innerModelValue);
|
|
33
31
|
emits("change", deepClone(state.innerModelValue), oldVal);
|
|
34
32
|
};
|
package/dist/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.tvp-search-box__dropdown-menu,
|
|
1
|
+
.tiny-popper.tvp-search-box__dropdown-menu,
|
|
2
2
|
.tvp-search-box__popover {
|
|
3
3
|
--tvp-SearchBox-bg-color: var(--tv-color-bg-secondary, #ffffff);
|
|
4
4
|
--tvp-SearchBox-border-color: var(--tv-color-bg-control-unactive, #c2c2c2);
|
|
@@ -29,17 +29,48 @@
|
|
|
29
29
|
--tvp-SearchBox-dropdown-desc-text-color: var(--tv-color-info-text-primary, #191919);
|
|
30
30
|
width: 232px;
|
|
31
31
|
overflow: auto;
|
|
32
|
-
overflow-x: hidden;
|
|
33
32
|
}
|
|
34
|
-
.
|
|
33
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar,
|
|
34
|
+
.tvp-search-box__popover::-webkit-scrollbar {
|
|
35
|
+
width: 8px;
|
|
36
|
+
height: 8px;
|
|
37
|
+
}
|
|
38
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-corner,
|
|
39
|
+
.tvp-search-box__popover::-webkit-scrollbar-corner {
|
|
40
|
+
background: transparent;
|
|
41
|
+
}
|
|
42
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-track,
|
|
43
|
+
.tvp-search-box__popover::-webkit-scrollbar-track {
|
|
44
|
+
background: transparent;
|
|
45
|
+
}
|
|
46
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-thumb,
|
|
47
|
+
.tvp-search-box__popover::-webkit-scrollbar-thumb {
|
|
48
|
+
background: var(--tvp-SearchBox-color-bg-scrollbar-thumb);
|
|
49
|
+
border-radius: var(--tvp-SearchBox-border-radius-scrollbar-thumb);
|
|
50
|
+
}
|
|
51
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-thumb:hover,
|
|
52
|
+
.tvp-search-box__popover::-webkit-scrollbar-thumb:hover {
|
|
53
|
+
background: var(--tv-color-bg-scrollbar-thumb-hover);
|
|
54
|
+
}
|
|
55
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-thumb:active,
|
|
56
|
+
.tvp-search-box__popover::-webkit-scrollbar-thumb:active {
|
|
57
|
+
background: var(--tvp-SearchBox-color-bg-scrollbar-thumb-active);
|
|
58
|
+
}
|
|
59
|
+
.tiny-popper.tvp-search-box__dropdown-menu.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box__date-picker .baseClearicon,
|
|
60
|
+
.tiny-popper.tvp-search-box__dropdown-menu.tvp-search-box__popover .tvp-search-box__date-picker .baseClearicon,
|
|
61
|
+
.tvp-search-box__popover.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box__date-picker .baseClearicon,
|
|
62
|
+
.tvp-search-box__popover.tvp-search-box__popover .tvp-search-box__date-picker .baseClearicon {
|
|
63
|
+
background-color: var(--tvp-SearchBox-date-picker-clear-icon-bg);
|
|
64
|
+
}
|
|
65
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tiny-form-item.is-error .tvp-search-box-select .tiny-select__tags-group,
|
|
35
66
|
.tvp-search-box__popover .tiny-form-item.is-error .tvp-search-box-select .tiny-select__tags-group {
|
|
36
67
|
border-color: #f23030;
|
|
37
68
|
}
|
|
38
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select .tiny-svg,
|
|
69
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select .tiny-svg,
|
|
39
70
|
.tvp-search-box__popover .tvp-search-box-select .tiny-select .tiny-svg {
|
|
40
71
|
z-index: 1000;
|
|
41
72
|
}
|
|
42
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select__tags-group,
|
|
73
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select__tags-group,
|
|
43
74
|
.tvp-search-box__popover .tvp-search-box-select .tiny-select__tags-group {
|
|
44
75
|
min-height: 32px;
|
|
45
76
|
max-height: 82px;
|
|
@@ -48,7 +79,7 @@
|
|
|
48
79
|
border: 1px solid #c2c2c2;
|
|
49
80
|
border-radius: 6px;
|
|
50
81
|
}
|
|
51
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select__tags.is-show-tag,
|
|
82
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select__tags.is-show-tag,
|
|
52
83
|
.tvp-search-box__popover .tvp-search-box-select .tiny-select__tags.is-show-tag {
|
|
53
84
|
max-width: 276px !important;
|
|
54
85
|
width: calc(100% - 8px) !important;
|
|
@@ -57,24 +88,24 @@
|
|
|
57
88
|
max-height: 76px;
|
|
58
89
|
overflow: auto;
|
|
59
90
|
}
|
|
60
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-input__suffix,
|
|
91
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-input__suffix,
|
|
61
92
|
.tvp-search-box__popover .tvp-search-box-select .tiny-input__suffix {
|
|
62
93
|
z-index: 1000;
|
|
63
94
|
}
|
|
64
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-input__inner,
|
|
95
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-input__inner,
|
|
65
96
|
.tvp-search-box__popover .tvp-search-box-select .tiny-input__inner {
|
|
66
97
|
border: 0px;
|
|
67
98
|
overflow: hidden;
|
|
68
99
|
}
|
|
69
|
-
.tvp-search-box__dropdown-menu input[type='number'],
|
|
100
|
+
.tiny-popper.tvp-search-box__dropdown-menu input[type='number'],
|
|
70
101
|
.tvp-search-box__popover input[type='number'] {
|
|
71
102
|
-moz-appearance: textfield;
|
|
72
103
|
/* Firefox */
|
|
73
104
|
appearance: textfield;
|
|
74
105
|
}
|
|
75
|
-
.tvp-search-box__dropdown-menu input[type='number']::-webkit-inner-spin-button,
|
|
106
|
+
.tiny-popper.tvp-search-box__dropdown-menu input[type='number']::-webkit-inner-spin-button,
|
|
76
107
|
.tvp-search-box__popover input[type='number']::-webkit-inner-spin-button,
|
|
77
|
-
.tvp-search-box__dropdown-menu input[type='number']::-webkit-outer-spin-button,
|
|
108
|
+
.tiny-popper.tvp-search-box__dropdown-menu input[type='number']::-webkit-outer-spin-button,
|
|
78
109
|
.tvp-search-box__popover input[type='number']::-webkit-outer-spin-button {
|
|
79
110
|
-webkit-appearance: none;
|
|
80
111
|
/* Safari */
|
|
@@ -178,7 +209,7 @@
|
|
|
178
209
|
margin-right: var(--tvp-SearchBox-separator-icon-margin-right);
|
|
179
210
|
height: 14px;
|
|
180
211
|
width: 1px;
|
|
181
|
-
background-color:
|
|
212
|
+
background-color: var(--tvp-SearchBox-color-border-divider);
|
|
182
213
|
}
|
|
183
214
|
.tvp-search-box__input-help {
|
|
184
215
|
margin-right: 0px;
|
|
@@ -215,6 +246,9 @@
|
|
|
215
246
|
.tvp-search-box .tiny-dropdown__trigger {
|
|
216
247
|
display: block;
|
|
217
248
|
}
|
|
249
|
+
.tvp-search-box .tiny-dropdown__trigger:focus-visible {
|
|
250
|
+
outline: none;
|
|
251
|
+
}
|
|
218
252
|
.tvp-search-box .tiny-dropdown__trigger .tiny-dropdown__title {
|
|
219
253
|
width: 100%;
|
|
220
254
|
}
|
|
@@ -222,6 +256,9 @@
|
|
|
222
256
|
display: block;
|
|
223
257
|
flex: 1;
|
|
224
258
|
}
|
|
259
|
+
.tvp-search-box__loading-box {
|
|
260
|
+
min-height: 32px;
|
|
261
|
+
}
|
|
225
262
|
.tvp-search-box__radio-wrap {
|
|
226
263
|
max-height: 240px;
|
|
227
264
|
overflow: auto;
|
|
@@ -241,6 +278,8 @@
|
|
|
241
278
|
margin-top: var(--tvp-SearchBox-dropdown-btn-group-margin-top);
|
|
242
279
|
padding-top: var(--tvp-SearchBox-dropdown-btn-group-padding-top);
|
|
243
280
|
padding-right: 10px;
|
|
281
|
+
gap: 5px;
|
|
282
|
+
justify-content: flex-end;
|
|
244
283
|
padding-bottom: var(--tvp-SearchBox-dropdown-btn-group-padding-bottom);
|
|
245
284
|
}
|
|
246
285
|
.tvp-search-box__bottom-btn .tiny-button,
|
|
@@ -267,12 +306,11 @@
|
|
|
267
306
|
}
|
|
268
307
|
.tvp-search-box__filter-item {
|
|
269
308
|
color: var(--tvp-SearchBox-search-filter-text-color);
|
|
270
|
-
border-bottom: 1px solid #fff;
|
|
271
309
|
}
|
|
272
310
|
.tvp-search-box__dropdown-item.tiny-dropdown-item {
|
|
273
311
|
width: 100%;
|
|
274
312
|
max-width: 100%;
|
|
275
|
-
|
|
313
|
+
background: inherit;
|
|
276
314
|
}
|
|
277
315
|
.tvp-search-box__dropdown-item.tiny-dropdown-item > div {
|
|
278
316
|
white-space: nowrap;
|
|
@@ -282,6 +320,9 @@
|
|
|
282
320
|
.tvp-search-box__dropdown-item.tiny-dropdown-item.tvp-search-box__checkbox-item .tiny-checkbox__inner > .tiny-svg {
|
|
283
321
|
margin-right: 0;
|
|
284
322
|
}
|
|
323
|
+
.tvp-search-box__dropdown-item-init {
|
|
324
|
+
background-color: #f5f5f5;
|
|
325
|
+
}
|
|
285
326
|
.tvp-search-box__checkbox-item .tvp-search-box__checkbox-item-label,
|
|
286
327
|
.tvp-search-box__checkbox-item .tiny-checkbox,
|
|
287
328
|
.tvp-search-box__checkbox-item .tiny-dropdown-item__label {
|
|
@@ -315,6 +356,7 @@
|
|
|
315
356
|
.tvp-search-box__panel-box {
|
|
316
357
|
width: 100%;
|
|
317
358
|
padding: 0px 10px;
|
|
359
|
+
color: var(--tvp-SearchBox-dropdown-desc-text-color);
|
|
318
360
|
}
|
|
319
361
|
.tvp-search-box__date-item.tiny-form-item,
|
|
320
362
|
.tvp-search-box__number-item.tiny-form-item {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const firstLevelPanel_vue_vue_type_script_setup_true_lang = require("./first-level-panel.vue.cjs2.js");
|
|
4
|
+
exports.default = firstLevelPanel_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const TinyDropdownItem = require("@opentiny/vue-dropdown-item");
|
|
5
|
+
const index = require("../index.cjs.js");
|
|
6
|
+
;/* empty css */
|
|
7
|
+
const _hoisted_1 = { class: "tvp-search-box__filter-type" };
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "tvp-search-box__text-highlight"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = { class: "tvp-search-box__filter-type" };
|
|
13
|
+
const _hoisted_4 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "tvp-search-box__text-highlight"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_5 = { class: "tvp-search-box__filter-type" };
|
|
18
|
+
const _hoisted_6 = {
|
|
19
|
+
id: "potential-loading",
|
|
20
|
+
class: "tvp-search-box__potential-box"
|
|
21
|
+
};
|
|
22
|
+
const _hoisted_7 = { key: 0 };
|
|
23
|
+
const _hoisted_8 = { class: "tvp-search-box__text-highlight" };
|
|
24
|
+
const _hoisted_9 = { class: "tvp-search-box__first-panel" };
|
|
25
|
+
const _hoisted_10 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "tvp-search-box__filter-type"
|
|
28
|
+
};
|
|
29
|
+
const _hoisted_11 = ["title"];
|
|
30
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
31
|
+
...{
|
|
32
|
+
name: "TinySearchBoxFirstLevelPanel"
|
|
33
|
+
},
|
|
34
|
+
__name: "first-level-panel",
|
|
35
|
+
props: {
|
|
36
|
+
state: {
|
|
37
|
+
type: Object,
|
|
38
|
+
default: () => ({})
|
|
39
|
+
},
|
|
40
|
+
potentialOptions: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default: () => []
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
emits: ["events", "selectInputValue", "selectPropItem", "selectRadioItem"],
|
|
46
|
+
setup(__props, { emit: __emit }) {
|
|
47
|
+
const emits = __emit;
|
|
48
|
+
const events = (eventName, p1, p2) => {
|
|
49
|
+
emits("events", eventName, p1, p2);
|
|
50
|
+
};
|
|
51
|
+
const selectInputValue = (e) => {
|
|
52
|
+
events("selectInputValue", e);
|
|
53
|
+
};
|
|
54
|
+
const selectPropItem = (e) => {
|
|
55
|
+
events("selectPropItem", e);
|
|
56
|
+
};
|
|
57
|
+
const selectRadioItem = (e, v) => {
|
|
58
|
+
events("selectRadioItem", e, v);
|
|
59
|
+
};
|
|
60
|
+
return (_ctx, _cache) => {
|
|
61
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
62
|
+
vue.withDirectives(vue.createVNode(vue.unref(TinyDropdownItem), {
|
|
63
|
+
class: "tvp-search-box__filter-item tvp-search-box__dropdown-item tvp-search-box__dropdown-item-init",
|
|
64
|
+
onClick: _cache[0] || (_cache[0] = ($event) => selectInputValue(__props.state.inputValue))
|
|
65
|
+
}, {
|
|
66
|
+
default: vue.withCtx(() => [
|
|
67
|
+
vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(index.t)("tvp.tvpSearchbox.initUse")) + """ + vue.toDisplayString(__props.state.inputValue) + """, 1)
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
}, 512), [
|
|
71
|
+
[vue.vShow, __props.state.inputValue.trim()]
|
|
72
|
+
]),
|
|
73
|
+
vue.withDirectives(vue.createElementVNode("div", null, [
|
|
74
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.state.matchItems, (value, key) => {
|
|
75
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key }, [
|
|
76
|
+
value["attr"].length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
77
|
+
vue.createElementVNode("span", _hoisted_1, vue.toDisplayString(key === "0" ? vue.unref(index.t)("tvp.tvpSearchbox.attributeType") : key), 1),
|
|
78
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(value["attr"], (item, index2) => {
|
|
79
|
+
return vue.openBlock(), vue.createBlock(vue.unref(TinyDropdownItem), {
|
|
80
|
+
key: item.label + index2,
|
|
81
|
+
class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
|
|
82
|
+
onClick: ($event) => selectPropItem(item)
|
|
83
|
+
}, {
|
|
84
|
+
default: vue.withCtx(() => [
|
|
85
|
+
vue.createElementVNode("span", null, [
|
|
86
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.match, (text) => {
|
|
87
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: text }, [
|
|
88
|
+
text.toLowerCase() === item.hightlighStr ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(text), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
89
|
+
vue.createTextVNode(vue.toDisplayString(text), 1)
|
|
90
|
+
], 64))
|
|
91
|
+
], 64);
|
|
92
|
+
}), 128))
|
|
93
|
+
])
|
|
94
|
+
]),
|
|
95
|
+
_: 2
|
|
96
|
+
}, 1032, ["onClick"]);
|
|
97
|
+
}), 128))
|
|
98
|
+
], 64)) : vue.createCommentVNode("", true),
|
|
99
|
+
value["attrValue"].length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
100
|
+
vue.createElementVNode("span", _hoisted_3, vue.toDisplayString(vue.unref(index.t)("tvp.tvpSearchbox.propertyValue", [key === "0" ? vue.unref(index.t)("tvp.tvpSearchbox.attributeType") : key])), 1),
|
|
101
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(value["attrValue"], (item, index2) => {
|
|
102
|
+
return vue.openBlock(), vue.createBlock(vue.unref(TinyDropdownItem), {
|
|
103
|
+
key: item.label + index2,
|
|
104
|
+
disabled: item.isChecked,
|
|
105
|
+
class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
|
|
106
|
+
onClick: ($event) => selectRadioItem(item, true)
|
|
107
|
+
}, {
|
|
108
|
+
default: vue.withCtx(() => [
|
|
109
|
+
vue.createElementVNode("span", null, [
|
|
110
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.match, (text) => {
|
|
111
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: text }, [
|
|
112
|
+
text.toLowerCase() === item.hightlighStr ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4, vue.toDisplayString(text), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
113
|
+
vue.createTextVNode(vue.toDisplayString(text), 1)
|
|
114
|
+
], 64))
|
|
115
|
+
], 64);
|
|
116
|
+
}), 128))
|
|
117
|
+
])
|
|
118
|
+
]),
|
|
119
|
+
_: 2
|
|
120
|
+
}, 1032, ["disabled", "onClick"]);
|
|
121
|
+
}), 128))
|
|
122
|
+
], 64)) : vue.createCommentVNode("", true)
|
|
123
|
+
], 64);
|
|
124
|
+
}), 128)),
|
|
125
|
+
vue.withDirectives(vue.createElementVNode("div", null, [
|
|
126
|
+
vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(vue.unref(index.t)("tvp.tvpSearchbox.matched")), 1),
|
|
127
|
+
vue.createElementVNode("div", _hoisted_6, [
|
|
128
|
+
__props.state.potentialOptions ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
129
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.state.potentialOptions, (item, index2) => {
|
|
130
|
+
return vue.openBlock(), vue.createBlock(vue.unref(TinyDropdownItem), {
|
|
131
|
+
key: item.label + index2,
|
|
132
|
+
class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
|
|
133
|
+
onClick: ($event) => selectRadioItem(item, true)
|
|
134
|
+
}, {
|
|
135
|
+
default: vue.withCtx(() => [
|
|
136
|
+
vue.createTextVNode(vue.toDisplayString(item.label) + ": ", 1),
|
|
137
|
+
vue.createElementVNode("span", _hoisted_8, vue.toDisplayString(item.value), 1)
|
|
138
|
+
]),
|
|
139
|
+
_: 2
|
|
140
|
+
}, 1032, ["onClick"]);
|
|
141
|
+
}), 128))
|
|
142
|
+
])) : vue.createCommentVNode("", true)
|
|
143
|
+
])
|
|
144
|
+
], 512), [
|
|
145
|
+
[vue.vShow, __props.state.potentialOptions]
|
|
146
|
+
])
|
|
147
|
+
], 512), [
|
|
148
|
+
[vue.vShow, !__props.state.propItem.label && __props.state.inputValue.trim()]
|
|
149
|
+
]),
|
|
150
|
+
vue.withDirectives(vue.createElementVNode("div", _hoisted_9, [
|
|
151
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.state.groupItems, (group, key) => {
|
|
152
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key }, [
|
|
153
|
+
group.length ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_10, vue.toDisplayString(key === "0" ? vue.unref(index.t)("tvp.tvpSearchbox.attributeType") : key), 1)) : vue.createCommentVNode("", true),
|
|
154
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, (item, index2) => {
|
|
155
|
+
return vue.openBlock(), vue.createBlock(vue.unref(TinyDropdownItem), {
|
|
156
|
+
key: (item.field || item.label) + index2,
|
|
157
|
+
class: "tvp-search-box__dropdown-item",
|
|
158
|
+
onClick: ($event) => selectPropItem(item)
|
|
159
|
+
}, {
|
|
160
|
+
default: vue.withCtx(() => [
|
|
161
|
+
vue.createElementVNode("span", {
|
|
162
|
+
title: item.label
|
|
163
|
+
}, vue.toDisplayString(item.label), 9, _hoisted_11)
|
|
164
|
+
]),
|
|
165
|
+
_: 2
|
|
166
|
+
}, 1032, ["onClick"]);
|
|
167
|
+
}), 128))
|
|
168
|
+
], 64);
|
|
169
|
+
}), 128))
|
|
170
|
+
], 512), [
|
|
171
|
+
[vue.vShow, __props.state.visible && !__props.state.propItem.label && !__props.state.inputValue.trim()]
|
|
172
|
+
])
|
|
173
|
+
], 64);
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const secondLevelPanel_vue_vue_type_script_setup_true_lang = require("./second-level-panel.vue.cjs2.js");
|
|
4
|
+
exports.default = secondLevelPanel_vue_vue_type_script_setup_true_lang.default;
|