@opentiny/vue-search-box 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/dist/es/components/first-level-panel.vue.es.js +4 -0
  4. package/dist/es/components/first-level-panel.vue.es2.js +177 -0
  5. package/dist/es/components/second-level-panel.vue.es.js +4 -0
  6. package/dist/es/components/second-level-panel.vue.es2.js +466 -0
  7. package/dist/es/composables/use-checkbox.es.js +5 -18
  8. package/dist/es/composables/use-custom.es.js +1 -0
  9. package/dist/es/composables/use-datepicker.es.js +1 -1
  10. package/dist/es/composables/use-dropdown.es.js +27 -18
  11. package/dist/es/composables/use-edit.es.js +3 -1
  12. package/dist/es/composables/use-init.es.js +24 -10
  13. package/dist/es/composables/use-match.es.js +42 -42
  14. package/dist/es/composables/use-num-range.es.js +1 -1
  15. package/dist/es/composables/use-placeholder.es.js +2 -2
  16. package/dist/es/composables/use-tag.es.js +6 -1
  17. package/dist/es/{index-VrLZbD8H.css → index-BYxS8gdW.css} +56 -14
  18. package/dist/es/index.es.js +29 -6
  19. package/dist/es/index.vue.es2.js +150 -623
  20. package/dist/es/utils/dropdown.es.js +9 -5
  21. package/dist/es/utils/en_US.es.js +2 -2
  22. package/dist/es/utils/tag.es.js +2 -4
  23. package/dist/index.css +56 -14
  24. package/dist/lib/components/first-level-panel.vue.cjs.js +4 -0
  25. package/dist/lib/components/first-level-panel.vue.cjs2.js +177 -0
  26. package/dist/lib/components/second-level-panel.vue.cjs.js +4 -0
  27. package/dist/lib/components/second-level-panel.vue.cjs2.js +466 -0
  28. package/dist/lib/composables/use-checkbox.cjs.js +5 -18
  29. package/dist/lib/composables/use-custom.cjs.js +1 -0
  30. package/dist/lib/composables/use-datepicker.cjs.js +1 -1
  31. package/dist/lib/composables/use-dropdown.cjs.js +27 -18
  32. package/dist/lib/composables/use-edit.cjs.js +3 -1
  33. package/dist/lib/composables/use-init.cjs.js +24 -10
  34. package/dist/lib/composables/use-match.cjs.js +41 -41
  35. package/dist/lib/composables/use-num-range.cjs.js +1 -1
  36. package/dist/lib/composables/use-placeholder.cjs.js +2 -2
  37. package/dist/lib/composables/use-tag.cjs.js +6 -1
  38. package/dist/lib/{index-VrLZbD8H.css → index-BYxS8gdW.css} +56 -14
  39. package/dist/lib/index.cjs.js +27 -4
  40. package/dist/lib/index.vue.cjs2.js +156 -629
  41. package/dist/lib/utils/dropdown.cjs.js +9 -5
  42. package/dist/lib/utils/en_US.cjs.js +2 -2
  43. package/dist/lib/utils/tag.cjs.js +1 -3
  44. package/dist/types/composables/use-checkbox.d.ts +0 -2
  45. package/dist/types/composables/use-dropdown.d.ts +1 -0
  46. package/package.json +1 -2
package/README.md CHANGED
@@ -34,7 +34,7 @@ import TinySearchBox from '@opentiny/vue-search-box';
34
34
  Import styles:
35
35
 
36
36
  ```css
37
- @import '@opentiny/vue-search-box/index.css';
37
+ @import '@opentiny/vue-search-box/dist/index.css';
38
38
  ```
39
39
 
40
40
  html:
package/README.zh-CN.md CHANGED
@@ -35,7 +35,7 @@ import TinySearchBox from '@opentiny/vue-search-box';
35
35
  引入样式:
36
36
 
37
37
  ```css
38
- @import '@opentiny/vue-search-box/index.css';
38
+ @import '@opentiny/vue-search-box/dist/index.css';
39
39
  ```
40
40
 
41
41
  在模板中使用:
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./first-level-panel.vue.es2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,177 @@
1
+ import { defineComponent, createElementBlock, openBlock, Fragment, withDirectives, createVNode, unref, withCtx, createElementVNode, toDisplayString, vShow, renderList, createCommentVNode, createBlock, createTextVNode } from "vue";
2
+ import TinyDropdownItem from "@opentiny/vue-dropdown-item";
3
+ import { t } from "../index.es.js";
4
+ /* empty css */
5
+ const _hoisted_1 = { class: "tvp-search-box__filter-type" };
6
+ const _hoisted_2 = {
7
+ key: 0,
8
+ class: "tvp-search-box__text-highlight"
9
+ };
10
+ const _hoisted_3 = { class: "tvp-search-box__filter-type" };
11
+ const _hoisted_4 = {
12
+ key: 0,
13
+ class: "tvp-search-box__text-highlight"
14
+ };
15
+ const _hoisted_5 = { class: "tvp-search-box__filter-type" };
16
+ const _hoisted_6 = {
17
+ id: "potential-loading",
18
+ class: "tvp-search-box__potential-box"
19
+ };
20
+ const _hoisted_7 = { key: 0 };
21
+ const _hoisted_8 = { class: "tvp-search-box__text-highlight" };
22
+ const _hoisted_9 = { class: "tvp-search-box__first-panel" };
23
+ const _hoisted_10 = {
24
+ key: 0,
25
+ class: "tvp-search-box__filter-type"
26
+ };
27
+ const _hoisted_11 = ["title"];
28
+ const _sfc_main = /* @__PURE__ */ defineComponent({
29
+ ...{
30
+ name: "TinySearchBoxFirstLevelPanel"
31
+ },
32
+ __name: "first-level-panel",
33
+ props: {
34
+ state: {
35
+ type: Object,
36
+ default: () => ({})
37
+ },
38
+ potentialOptions: {
39
+ type: Array,
40
+ default: () => []
41
+ }
42
+ },
43
+ emits: ["events", "selectInputValue", "selectPropItem", "selectRadioItem"],
44
+ setup(__props, { emit: __emit }) {
45
+ const emits = __emit;
46
+ const events = (eventName, p1, p2) => {
47
+ emits("events", eventName, p1, p2);
48
+ };
49
+ const selectInputValue = (e) => {
50
+ events("selectInputValue", e);
51
+ };
52
+ const selectPropItem = (e) => {
53
+ events("selectPropItem", e);
54
+ };
55
+ const selectRadioItem = (e, v) => {
56
+ events("selectRadioItem", e, v);
57
+ };
58
+ return (_ctx, _cache) => {
59
+ return openBlock(), createElementBlock(Fragment, null, [
60
+ withDirectives(createVNode(unref(TinyDropdownItem), {
61
+ class: "tvp-search-box__filter-item tvp-search-box__dropdown-item tvp-search-box__dropdown-item-init",
62
+ onClick: _cache[0] || (_cache[0] = ($event) => selectInputValue(__props.state.inputValue))
63
+ }, {
64
+ default: withCtx(() => [
65
+ createElementVNode("span", null, toDisplayString(unref(t)("tvp.tvpSearchbox.initUse")) + """ + toDisplayString(__props.state.inputValue) + """, 1)
66
+ ]),
67
+ _: 1
68
+ }, 512), [
69
+ [vShow, __props.state.inputValue.trim()]
70
+ ]),
71
+ withDirectives(createElementVNode("div", null, [
72
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.state.matchItems, (value, key) => {
73
+ return openBlock(), createElementBlock(Fragment, { key }, [
74
+ value["attr"].length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
75
+ createElementVNode("span", _hoisted_1, toDisplayString(key === "0" ? unref(t)("tvp.tvpSearchbox.attributeType") : key), 1),
76
+ (openBlock(true), createElementBlock(Fragment, null, renderList(value["attr"], (item, index) => {
77
+ return openBlock(), createBlock(unref(TinyDropdownItem), {
78
+ key: item.label + index,
79
+ class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
80
+ onClick: ($event) => selectPropItem(item)
81
+ }, {
82
+ default: withCtx(() => [
83
+ createElementVNode("span", null, [
84
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.match, (text) => {
85
+ return openBlock(), createElementBlock(Fragment, { key: text }, [
86
+ text.toLowerCase() === item.hightlighStr ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
87
+ createTextVNode(toDisplayString(text), 1)
88
+ ], 64))
89
+ ], 64);
90
+ }), 128))
91
+ ])
92
+ ]),
93
+ _: 2
94
+ }, 1032, ["onClick"]);
95
+ }), 128))
96
+ ], 64)) : createCommentVNode("", true),
97
+ value["attrValue"].length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
98
+ createElementVNode("span", _hoisted_3, toDisplayString(unref(t)("tvp.tvpSearchbox.propertyValue", [key === "0" ? unref(t)("tvp.tvpSearchbox.attributeType") : key])), 1),
99
+ (openBlock(true), createElementBlock(Fragment, null, renderList(value["attrValue"], (item, index) => {
100
+ return openBlock(), createBlock(unref(TinyDropdownItem), {
101
+ key: item.label + index,
102
+ disabled: item.isChecked,
103
+ class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
104
+ onClick: ($event) => selectRadioItem(item, true)
105
+ }, {
106
+ default: withCtx(() => [
107
+ createElementVNode("span", null, [
108
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.match, (text) => {
109
+ return openBlock(), createElementBlock(Fragment, { key: text }, [
110
+ text.toLowerCase() === item.hightlighStr ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
111
+ createTextVNode(toDisplayString(text), 1)
112
+ ], 64))
113
+ ], 64);
114
+ }), 128))
115
+ ])
116
+ ]),
117
+ _: 2
118
+ }, 1032, ["disabled", "onClick"]);
119
+ }), 128))
120
+ ], 64)) : createCommentVNode("", true)
121
+ ], 64);
122
+ }), 128)),
123
+ withDirectives(createElementVNode("div", null, [
124
+ createElementVNode("span", _hoisted_5, toDisplayString(unref(t)("tvp.tvpSearchbox.matched")), 1),
125
+ createElementVNode("div", _hoisted_6, [
126
+ __props.state.potentialOptions ? (openBlock(), createElementBlock("div", _hoisted_7, [
127
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.state.potentialOptions, (item, index) => {
128
+ return openBlock(), createBlock(unref(TinyDropdownItem), {
129
+ key: item.label + index,
130
+ class: "tvp-search-box__filter-item tvp-search-box__dropdown-item",
131
+ onClick: ($event) => selectRadioItem(item, true)
132
+ }, {
133
+ default: withCtx(() => [
134
+ createTextVNode(toDisplayString(item.label) + ": ", 1),
135
+ createElementVNode("span", _hoisted_8, toDisplayString(item.value), 1)
136
+ ]),
137
+ _: 2
138
+ }, 1032, ["onClick"]);
139
+ }), 128))
140
+ ])) : createCommentVNode("", true)
141
+ ])
142
+ ], 512), [
143
+ [vShow, __props.state.potentialOptions]
144
+ ])
145
+ ], 512), [
146
+ [vShow, !__props.state.propItem.label && __props.state.inputValue.trim()]
147
+ ]),
148
+ withDirectives(createElementVNode("div", _hoisted_9, [
149
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.state.groupItems, (group, key) => {
150
+ return openBlock(), createElementBlock(Fragment, { key }, [
151
+ group.length ? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(key === "0" ? unref(t)("tvp.tvpSearchbox.attributeType") : key), 1)) : createCommentVNode("", true),
152
+ (openBlock(true), createElementBlock(Fragment, null, renderList(group, (item, index) => {
153
+ return openBlock(), createBlock(unref(TinyDropdownItem), {
154
+ key: (item.field || item.label) + index,
155
+ class: "tvp-search-box__dropdown-item",
156
+ onClick: ($event) => selectPropItem(item)
157
+ }, {
158
+ default: withCtx(() => [
159
+ createElementVNode("span", {
160
+ title: item.label
161
+ }, toDisplayString(item.label), 9, _hoisted_11)
162
+ ]),
163
+ _: 2
164
+ }, 1032, ["onClick"]);
165
+ }), 128))
166
+ ], 64);
167
+ }), 128))
168
+ ], 512), [
169
+ [vShow, __props.state.visible && !__props.state.propItem.label && !__props.state.inputValue.trim()]
170
+ ])
171
+ ], 64);
172
+ };
173
+ }
174
+ });
175
+ export {
176
+ _sfc_main as default
177
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./second-level-panel.vue.es2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,466 @@
1
+ import { defineComponent, computed, createElementBlock, withDirectives, createCommentVNode, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createBlock, withCtx, createTextVNode, vShow, normalizeClass, createVNode, withModifiers } from "vue";
2
+ import TinyFormItem from "@opentiny/vue-form-item";
3
+ import TinyDropdownItem from "@opentiny/vue-dropdown-item";
4
+ import TinyCheckbox from "@opentiny/vue-checkbox";
5
+ import TinyCheckboxGroup from "@opentiny/vue-checkbox-group";
6
+ import TinyDatePicker from "@opentiny/vue-date-picker";
7
+ import TinyInput from "@opentiny/vue-input";
8
+ import TinyButton from "@opentiny/vue-button";
9
+ import Loading from "@opentiny/vue-loading";
10
+ import { t } from "../index.es.js";
11
+ /* empty css */
12
+ const _hoisted_1 = { key: 0 };
13
+ const _hoisted_2 = { class: "tvp-search-box__filter-type" };
14
+ const _hoisted_3 = ["title"];
15
+ const _hoisted_4 = {
16
+ key: 0,
17
+ class: "tvp-search-box__text-highlight"
18
+ };
19
+ const _hoisted_5 = ["title"];
20
+ const _hoisted_6 = { class: "tvp-search-box__checkbox-wrap" };
21
+ const _hoisted_7 = { class: "tvp-search-box__checkbox-btn" };
22
+ const _hoisted_8 = {
23
+ key: 3,
24
+ class: "tvp-search-box__panel-box"
25
+ };
26
+ const _hoisted_9 = { class: "tvp-search-box__number" };
27
+ const _hoisted_10 = { class: "tvp-search-box__dropdown-title" };
28
+ const _hoisted_11 = { class: "tvp-search-box__dropdown-start" };
29
+ const _hoisted_12 = { class: "tvp-search-box__dropdown-end" };
30
+ const _hoisted_13 = { class: "tvp-search-box__bottom-btn" };
31
+ const _hoisted_14 = {
32
+ key: 4,
33
+ class: "tvp-search-box__panel-box"
34
+ };
35
+ const _hoisted_15 = { class: "tvp-search-box__date-wrap" };
36
+ const _hoisted_16 = { class: "tvp-search-box__dropdown-title" };
37
+ const _hoisted_17 = { class: "tvp-search-box__dropdown-start" };
38
+ const _hoisted_18 = { class: "tvp-search-box__dropdown-end" };
39
+ const _hoisted_19 = { class: "tvp-search-box__bottom-btn" };
40
+ const _hoisted_20 = {
41
+ key: 5,
42
+ class: "tvp-search-box__panel-box"
43
+ };
44
+ const _hoisted_21 = { class: "tvp-search-box__date-wrap" };
45
+ const _hoisted_22 = { class: "tvp-search-box__dropdown-title" };
46
+ const _hoisted_23 = { class: "tvp-search-box__dropdown-start" };
47
+ const _hoisted_24 = { class: "tvp-search-box__dropdown-end" };
48
+ const _hoisted_25 = { class: "tvp-search-box__bottom-btn" };
49
+ const _hoisted_26 = { key: 6 };
50
+ const _hoisted_27 = {
51
+ key: 0,
52
+ class: "tvp-search-box__filter-type"
53
+ };
54
+ const _hoisted_28 = {
55
+ key: 1,
56
+ class: "tvp-search-box__filter-type"
57
+ };
58
+ const _hoisted_29 = ["title"];
59
+ const _sfc_main = /* @__PURE__ */ defineComponent({
60
+ ...{
61
+ name: "TinySearchBoxSecondLevelPanel"
62
+ },
63
+ __name: "second-level-panel",
64
+ props: {
65
+ state: {
66
+ type: Object,
67
+ default: () => ({})
68
+ },
69
+ pickerOptions: {
70
+ type: Function,
71
+ default: () => {
72
+ }
73
+ }
74
+ },
75
+ emits: ["events"],
76
+ setup(__props, { emit: __emit }) {
77
+ const props = __props;
78
+ const isLoading = computed(() => {
79
+ var _a;
80
+ return props.state.hasBackupList && ((_a = props.state.backupList) == null ? void 0 : _a.length) === 0;
81
+ });
82
+ const vLoading = Loading.directive;
83
+ const emits = __emit;
84
+ const showCheckBoxList = computed(() => {
85
+ var _a;
86
+ return (_a = props.state.backupList) == null ? void 0 : _a.find((item) => !item.isFilter);
87
+ });
88
+ const events = (eventName, p1, p2) => {
89
+ emits("events", eventName, p1, p2);
90
+ };
91
+ const setOperator = (e) => {
92
+ events("setOperator", e);
93
+ };
94
+ const selectRadioItem = (e) => {
95
+ events("selectRadioItem", e);
96
+ };
97
+ const selectCheckbox = (e) => {
98
+ events("selectCheckbox", e);
99
+ };
100
+ const sizeChange = (e) => {
101
+ events("sizeChange", e);
102
+ };
103
+ const onConfirmDate = (e, b) => {
104
+ events("onConfirmDate", e, b);
105
+ };
106
+ const selectFirstMap = (e, b) => {
107
+ events("selectFirstMap", e, b);
108
+ };
109
+ const handleDateShow = (e) => {
110
+ events("handleDateShow", e);
111
+ };
112
+ return (_ctx, _cache) => {
113
+ var _a;
114
+ return ((_a = __props.state.currentOperators) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_1, [
115
+ createElementVNode("span", _hoisted_2, toDisplayString(unref(t)("tvp.tvpSearchbox.operator")), 1),
116
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.state.currentOperators, (item, index) => {
117
+ return withDirectives((openBlock(), createBlock(unref(TinyDropdownItem), {
118
+ key: item + index,
119
+ class: "tvp-search-box__dropdown-item",
120
+ onClick: ($event) => setOperator(item)
121
+ }, {
122
+ default: withCtx(() => [
123
+ createTextVNode(toDisplayString(item), 1)
124
+ ]),
125
+ _: 2
126
+ }, 1032, ["onClick"])), [
127
+ [vShow, item.includes(__props.state.inputValue)]
128
+ ]);
129
+ }), 128))
130
+ ])) : !__props.state.prevItem.type || __props.state.prevItem.type === "radio" ? withDirectives((openBlock(), createElementBlock("div", {
131
+ key: 1,
132
+ class: normalizeClass(["tvp-search-box__radio-wrap", isLoading.value && "tvp-search-box__loading-box"])
133
+ }, [
134
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.state.backupList, (item, index) => {
135
+ return withDirectives((openBlock(), createBlock(unref(TinyDropdownItem), {
136
+ key: index + (item.field || item.label),
137
+ disabled: item.isChecked,
138
+ class: "tvp-search-box__dropdown-item",
139
+ onClick: ($event) => selectRadioItem(item)
140
+ }, {
141
+ default: withCtx(() => [
142
+ item.match ? (openBlock(), createElementBlock("span", {
143
+ key: 0,
144
+ title: item.label
145
+ }, [
146
+ (openBlock(true), createElementBlock(Fragment, null, renderList(item.match, (text) => {
147
+ return openBlock(), createElementBlock(Fragment, { key: text }, [
148
+ text.toLowerCase() === item.hightlighStr ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
149
+ createTextVNode(toDisplayString(text), 1)
150
+ ], 64))
151
+ ], 64);
152
+ }), 128))
153
+ ], 8, _hoisted_3)) : (openBlock(), createElementBlock("span", {
154
+ key: 1,
155
+ title: item.label
156
+ }, toDisplayString(item.label), 9, _hoisted_5))
157
+ ]),
158
+ _: 2
159
+ }, 1032, ["disabled", "onClick"])), [
160
+ [vShow, !item.isFilter || !__props.state.inputValue]
161
+ ]);
162
+ }), 128))
163
+ ], 2)), [
164
+ [unref(vLoading), isLoading.value]
165
+ ]) : __props.state.prevItem.type === "checkbox" ? withDirectives((openBlock(), createElementBlock("div", {
166
+ key: 2,
167
+ class: normalizeClass(isLoading.value && "tvp-search-box__loading-box")
168
+ }, [
169
+ showCheckBoxList.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
170
+ createElementVNode("div", _hoisted_6, [
171
+ createVNode(unref(TinyCheckboxGroup), {
172
+ modelValue: __props.state.checkAll,
173
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => __props.state.checkAll = $event),
174
+ class: "tvp-search-box__checkbox"
175
+ }, {
176
+ default: withCtx(() => [
177
+ createVNode(unref(TinyDropdownItem), { class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item" }, {
178
+ default: withCtx(() => [
179
+ createVNode(unref(TinyCheckbox), {
180
+ modelValue: __props.state.checkAll,
181
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.state.checkAll = $event),
182
+ indeterminate: __props.state.isIndeterminate
183
+ }, {
184
+ default: withCtx(() => [
185
+ createTextVNode(toDisplayString(unref(t)("tvp.tvpSearchbox.selectAll")), 1)
186
+ ]),
187
+ _: 1
188
+ }, 8, ["modelValue", "indeterminate"])
189
+ ]),
190
+ _: 1
191
+ })
192
+ ]),
193
+ _: 1
194
+ }, 8, ["modelValue"]),
195
+ createVNode(unref(TinyCheckboxGroup), {
196
+ modelValue: __props.state.checkboxGroup,
197
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => __props.state.checkboxGroup = $event),
198
+ class: "tvp-search-box__checkbox"
199
+ }, {
200
+ default: withCtx(() => [
201
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.state.backupList, (item, index) => {
202
+ return withDirectives((openBlock(), createBlock(unref(TinyDropdownItem), {
203
+ key: (item.field || item.label) + index,
204
+ class: "tvp-search-box__dropdown-item tvp-search-box__checkbox-item"
205
+ }, {
206
+ default: withCtx(() => [
207
+ createVNode(unref(TinyCheckbox), {
208
+ label: __props.state.prevItem.label + item.label,
209
+ title: item.label,
210
+ class: "tvp-search-box__checkbox-item-label"
211
+ }, {
212
+ default: withCtx(() => [
213
+ createTextVNode(toDisplayString(item.label), 1)
214
+ ]),
215
+ _: 2
216
+ }, 1032, ["label", "title"])
217
+ ]),
218
+ _: 2
219
+ }, 1024)), [
220
+ [vShow, !item.isFilter]
221
+ ]);
222
+ }), 128))
223
+ ]),
224
+ _: 1
225
+ }, 8, ["modelValue"])
226
+ ]),
227
+ createElementVNode("div", _hoisted_7, [
228
+ createVNode(unref(TinyButton), {
229
+ size: "mini",
230
+ onClick: _cache[3] || (_cache[3] = ($event) => selectCheckbox(false))
231
+ }, {
232
+ default: withCtx(() => [
233
+ createTextVNode(toDisplayString(unref(t)("tvp.tvpSearchbox.cancel")), 1)
234
+ ]),
235
+ _: 1
236
+ }),
237
+ createVNode(unref(TinyButton), {
238
+ size: "mini",
239
+ onClick: _cache[4] || (_cache[4] = ($event) => selectCheckbox(true))
240
+ }, {
241
+ default: withCtx(() => [
242
+ createTextVNode(toDisplayString(unref(t)("tvp.tvpSearchbox.confirm")), 1)
243
+ ]),
244
+ _: 1
245
+ })
246
+ ])
247
+ ], 64)) : createCommentVNode("", true)
248
+ ], 2)), [
249
+ [unref(vLoading), isLoading.value]
250
+ ]) : __props.state.prevItem.type === "numRange" ? (openBlock(), createElementBlock("div", _hoisted_8, [
251
+ createElementVNode("div", _hoisted_9, [
252
+ createElementVNode("div", _hoisted_10, toDisplayString(unref(t)("tvp.tvpSearchbox.rangeNumberTitle")), 1),
253
+ createElementVNode("div", _hoisted_11, toDisplayString(unref(t)("tvp.tvpSearchbox.minValueText")) + "(" + toDisplayString(__props.state.prevItem.unit) + ") ", 1),
254
+ createVNode(unref(TinyFormItem), {
255
+ prop: __props.state.curMinNumVar,
256
+ class: "tvp-search-box__number-item",
257
+ "show-message": __props.state.numberShowMessage
258
+ }, {
259
+ default: withCtx(() => [
260
+ createVNode(unref(TinyInput), {
261
+ modelValue: __props.state[__props.state.curMinNumVar],
262
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => __props.state[__props.state.curMinNumVar] = $event),
263
+ type: "number",
264
+ class: "tvp-search-box__number-input"
265
+ }, null, 8, ["modelValue"])
266
+ ]),
267
+ _: 1
268
+ }, 8, ["prop", "show-message"]),
269
+ createElementVNode("div", _hoisted_12, toDisplayString(unref(t)("tvp.tvpSearchbox.maxValueText")) + "(" + toDisplayString(__props.state.prevItem.unit) + ") ", 1),
270
+ createVNode(unref(TinyFormItem), {
271
+ prop: __props.state.curMaxNumVar,
272
+ class: "tvp-search-box__number-item"
273
+ }, {
274
+ default: withCtx(() => [
275
+ createVNode(unref(TinyInput), {
276
+ modelValue: __props.state[__props.state.curMaxNumVar],
277
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => __props.state[__props.state.curMaxNumVar] = $event),
278
+ type: "number",
279
+ class: "tvp-search-box__number-input"
280
+ }, null, 8, ["modelValue"])
281
+ ]),
282
+ _: 1
283
+ }, 8, ["prop"])
284
+ ]),
285
+ createElementVNode("div", _hoisted_13, [
286
+ createVNode(unref(TinyButton), {
287
+ size: "mini",
288
+ onClick: _cache[7] || (_cache[7] = ($event) => sizeChange(false))
289
+ }, {
290
+ default: withCtx(() => [
291
+ createTextVNode(toDisplayString(unref(t)("tvp.tvpSearchbox.cancel")), 1)
292
+ ]),
293
+ _: 1
294
+ }),
295
+ createVNode(unref(TinyButton), {
296
+ size: "mini",
297
+ onClick: _cache[8] || (_cache[8] = withModifiers(($event) => sizeChange(true), ["stop"]))
298
+ }, {
299
+ default: withCtx(() => [
300
+ createTextVNode(toDisplayString(unref(t)("tvp.tvpSearchbox.confirm")), 1)
301
+ ]),
302
+ _: 1
303
+ })
304
+ ])
305
+ ])) : __props.state.prevItem.type === "dateRange" ? (openBlock(), createElementBlock("div", _hoisted_14, [
306
+ createElementVNode("div", _hoisted_15, [
307
+ createElementVNode("div", _hoisted_16, toDisplayString(__props.state.prevItem.maxTimeLength > 0 ? unref(t)("tvp.tvpSearchbox.timeLengthTitle", {
308
+ value: (__props.state.prevItem.maxTimeLength / 864e5).toFixed(1)
309
+ }) : unref(t)("tvp.tvpSearchbox.rangeDateTitle")), 1),
310
+ createElementVNode("div", _hoisted_17, toDisplayString(unref(t)("tvp.tvpSearchbox.rangeBeginLabel")), 1),
311
+ createVNode(unref(TinyFormItem), {
312
+ prop: "startDate",
313
+ "show-message": Boolean(__props.state.prevItem.maxTimeLength),
314
+ class: "tvp-search-box__date-item"
315
+ }, {
316
+ default: withCtx(() => [
317
+ createVNode(unref(TinyDatePicker), {
318
+ modelValue: __props.state.startDate,
319
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => __props.state.startDate = $event),
320
+ format: __props.state.prevItem.format || __props.state.dateRangeFormat,
321
+ "value-format": __props.state.prevItem.format || __props.state.dateRangeFormat,
322
+ "picker-options": __props.pickerOptions(__props.state.startDate, "endDate"),
323
+ class: "tvp-search-box__date-picker",
324
+ onChange: handleDateShow,
325
+ onBlur: handleDateShow
326
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options"])
327
+ ]),
328
+ _: 1
329
+ }, 8, ["show-message"]),
330
+ createElementVNode("div", _hoisted_18, toDisplayString(unref(t)("tvp.tvpSearchbox.rangeEndLabel")), 1),
331
+ createVNode(unref(TinyFormItem), {
332
+ prop: "endDate",
333
+ class: "tvp-search-box__date-item"
334
+ }, {
335
+ default: withCtx(() => [
336
+ createVNode(unref(TinyDatePicker), {
337
+ modelValue: __props.state.endDate,
338
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => __props.state.endDate = $event),
339
+ format: __props.state.prevItem.format || __props.state.dateRangeFormat,
340
+ "value-format": __props.state.prevItem.format || __props.state.dateRangeFormat,
341
+ "picker-options": __props.pickerOptions(__props.state.startDate),
342
+ class: "tvp-search-box__date-picker",
343
+ onChange: handleDateShow,
344
+ onBlur: handleDateShow
345
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options"])
346
+ ]),
347
+ _: 1
348
+ })
349
+ ]),
350
+ createElementVNode("div", _hoisted_19, [
351
+ createVNode(unref(TinyButton), {
352
+ size: "mini",
353
+ onClick: _cache[11] || (_cache[11] = ($event) => onConfirmDate(false))
354
+ }, {
355
+ default: withCtx(() => [
356
+ createTextVNode(toDisplayString(unref(t)("tvp.tvpSearchbox.cancel")), 1)
357
+ ]),
358
+ _: 1
359
+ }),
360
+ createVNode(unref(TinyButton), {
361
+ size: "mini",
362
+ onClick: _cache[12] || (_cache[12] = ($event) => onConfirmDate(true))
363
+ }, {
364
+ default: withCtx(() => [
365
+ createTextVNode(toDisplayString(unref(t)("tvp.tvpSearchbox.confirm")), 1)
366
+ ]),
367
+ _: 1
368
+ })
369
+ ])
370
+ ])) : __props.state.prevItem.type === "datetimeRange" ? (openBlock(), createElementBlock("div", _hoisted_20, [
371
+ createElementVNode("div", _hoisted_21, [
372
+ createElementVNode("div", _hoisted_22, toDisplayString(__props.state.prevItem.maxTimeLength > 0 ? unref(t)("tvp.tvpSearchbox.timeLengthTitle", {
373
+ value: (__props.state.prevItem.maxTimeLength / 864e5).toFixed(1)
374
+ }) : unref(t)("tvp.tvpSearchbox.rangeDateTitle")), 1),
375
+ createElementVNode("div", _hoisted_23, toDisplayString(unref(t)("tvp.tvpSearchbox.rangeBeginLabel")), 1),
376
+ createVNode(unref(TinyFormItem), {
377
+ prop: "startDateTime",
378
+ "show-message": Boolean(__props.state.prevItem.maxTimeLength),
379
+ class: "tvp-search-box__date-item"
380
+ }, {
381
+ default: withCtx(() => [
382
+ createVNode(unref(TinyDatePicker), {
383
+ modelValue: __props.state.startDateTime,
384
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => __props.state.startDateTime = $event),
385
+ type: "datetime",
386
+ isutc8: true,
387
+ format: __props.state.prevItem.format || __props.state.datetimeRangeFormat,
388
+ "value-format": __props.state.prevItem.format || __props.state.datetimeRangeFormat,
389
+ "picker-options": __props.pickerOptions(__props.state.startDateTime, "endDateTime"),
390
+ class: "tvp-search-box__date-picker",
391
+ onChange: handleDateShow,
392
+ onBlur: handleDateShow
393
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options"])
394
+ ]),
395
+ _: 1
396
+ }, 8, ["show-message"]),
397
+ createElementVNode("div", _hoisted_24, toDisplayString(unref(t)("tvp.tvpSearchbox.rangeEndLabel")), 1),
398
+ createVNode(unref(TinyFormItem), {
399
+ prop: "endDateTime",
400
+ class: "tvp-search-box__date-item"
401
+ }, {
402
+ default: withCtx(() => [
403
+ createVNode(unref(TinyDatePicker), {
404
+ modelValue: __props.state.endDateTime,
405
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => __props.state.endDateTime = $event),
406
+ type: "datetime",
407
+ isutc8: true,
408
+ format: __props.state.prevItem.format || __props.state.datetimeRangeFormat,
409
+ "value-format": __props.state.prevItem.format || __props.state.datetimeRangeFormat,
410
+ "picker-options": __props.pickerOptions(__props.state.startDateTime),
411
+ class: "tvp-search-box__date-picker",
412
+ onChange: handleDateShow,
413
+ onBlur: handleDateShow
414
+ }, null, 8, ["modelValue", "format", "value-format", "picker-options"])
415
+ ]),
416
+ _: 1
417
+ })
418
+ ]),
419
+ createElementVNode("div", _hoisted_25, [
420
+ createVNode(unref(TinyButton), {
421
+ size: "mini",
422
+ onClick: _cache[15] || (_cache[15] = ($event) => onConfirmDate(false, true))
423
+ }, {
424
+ default: withCtx(() => [
425
+ createTextVNode(toDisplayString(unref(t)("tvp.tvpSearchbox.cancel")), 1)
426
+ ]),
427
+ _: 1
428
+ }),
429
+ createVNode(unref(TinyButton), {
430
+ size: "mini",
431
+ onClick: _cache[16] || (_cache[16] = ($event) => onConfirmDate(true, true))
432
+ }, {
433
+ default: withCtx(() => [
434
+ createTextVNode(toDisplayString(unref(t)("tvp.tvpSearchbox.confirm")), 1)
435
+ ]),
436
+ _: 1
437
+ })
438
+ ])
439
+ ])) : __props.state.prevItem.type === "map" ? withDirectives((openBlock(), createElementBlock("div", _hoisted_26, [
440
+ __props.state.isShowTagKey ? (openBlock(), createElementBlock("span", _hoisted_27, toDisplayString(unref(t)("tvp.tvpSearchbox.tagKey")), 1)) : (openBlock(), createElementBlock("span", _hoisted_28, toDisplayString(unref(t)("tvp.tvpSearchbox.tagValue")), 1)),
441
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.state.backupList, (item, index) => {
442
+ return withDirectives((openBlock(), createBlock(unref(TinyDropdownItem), {
443
+ key: item.label + item.value + index,
444
+ disabled: item.isChecked,
445
+ class: "tvp-search-box__dropdown-item",
446
+ onClick: ($event) => selectFirstMap(item, __props.state.isShowTagKey)
447
+ }, {
448
+ default: withCtx(() => [
449
+ createElementVNode("span", {
450
+ title: item.label
451
+ }, toDisplayString(item.label), 9, _hoisted_29)
452
+ ]),
453
+ _: 2
454
+ }, 1032, ["disabled", "onClick"])), [
455
+ [vShow, !item.isFilter]
456
+ ]);
457
+ }), 128))
458
+ ])), [
459
+ [unref(vLoading), isLoading.value]
460
+ ]) : createCommentVNode("", true);
461
+ };
462
+ }
463
+ });
464
+ export {
465
+ _sfc_main as default
466
+ };