@seekora-ai/ui-sdk-vue 0.2.15 → 0.2.17
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/dist/index.esm.js +274 -380
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +274 -380
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -7,7 +7,7 @@ const _hoisted_1$c = {
|
|
|
7
7
|
style: { display: 'inline-flex', alignItems: 'center', gap: '2px' }
|
|
8
8
|
};
|
|
9
9
|
const _hoisted_2$a = { style: { display: 'inline-flex', alignItems: 'center', gap: '2px' } };
|
|
10
|
-
const _hoisted_3$
|
|
10
|
+
const _hoisted_3$5 = {
|
|
11
11
|
class: "seekora-rating-numeric",
|
|
12
12
|
style: { fontWeight: 600, color: 'var(--seekora-text-primary, #111827)' }
|
|
13
13
|
};
|
|
@@ -221,7 +221,7 @@ var script$i = /*@__PURE__*/ defineComponent({
|
|
|
221
221
|
: (__props.variant === 'inline')
|
|
222
222
|
? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
223
223
|
createCommentVNode(" Inline "),
|
|
224
|
-
createElementVNode("span", _hoisted_3$
|
|
224
|
+
createElementVNode("span", _hoisted_3$5, toDisplayString(clampedRating.value.toFixed(1)), 1 /* TEXT */),
|
|
225
225
|
createElementVNode("div", _hoisted_4$4, [
|
|
226
226
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.maxRating, (i) => {
|
|
227
227
|
return (openBlock(), createBlock(unref(StarIcon), {
|
|
@@ -578,12 +578,11 @@ const useQuerySuggestions = ({ client, query, enabled = true, debounceMs = 300,
|
|
|
578
578
|
};
|
|
579
579
|
|
|
580
580
|
const _hoisted_1$b = ["value", "placeholder"];
|
|
581
|
-
const _hoisted_2$9 =
|
|
582
|
-
const _hoisted_3$6 = ["onClick", "onMouseenter"];
|
|
581
|
+
const _hoisted_2$9 = ["onClick", "onMouseenter"];
|
|
583
582
|
var script$g = /*@__PURE__*/ defineComponent({
|
|
584
583
|
__name: 'SearchBar',
|
|
585
584
|
props: {
|
|
586
|
-
placeholder: { type: String, required: false, default: '
|
|
585
|
+
placeholder: { type: String, required: false, default: 'Powered by Seekora' },
|
|
587
586
|
showSuggestions: { type: Boolean, required: false, default: true },
|
|
588
587
|
debounceMs: { type: Number, required: false, default: 300 },
|
|
589
588
|
minQueryLength: { type: Number, required: false, default: 1 },
|
|
@@ -707,7 +706,7 @@ var script$g = /*@__PURE__*/ defineComponent({
|
|
|
707
706
|
};
|
|
708
707
|
const searchBarTheme = computed(() => ({}));
|
|
709
708
|
const showSuggestionsList = computed(() => isFocused.value && props.showSuggestions && localQuery.value.length >= props.minQueryLength);
|
|
710
|
-
|
|
709
|
+
computed(() => suggestionsLoading.value || searchLoading.value);
|
|
711
710
|
// Get processing time from results
|
|
712
711
|
const processingTime = computed(() => {
|
|
713
712
|
return results.value?.processingTimeMS
|
|
@@ -748,11 +747,6 @@ var script$g = /*@__PURE__*/ defineComponent({
|
|
|
748
747
|
overflowY: 'auto',
|
|
749
748
|
zIndex: 1000,
|
|
750
749
|
}));
|
|
751
|
-
const loadingStyle = computed(() => ({
|
|
752
|
-
padding: theme.value.spacing.medium,
|
|
753
|
-
textAlign: 'center',
|
|
754
|
-
color: theme.value.colors.text,
|
|
755
|
-
}));
|
|
756
750
|
const emptyStyle = computed(() => ({
|
|
757
751
|
padding: theme.value.spacing.medium,
|
|
758
752
|
textAlign: 'center',
|
|
@@ -807,40 +801,32 @@ var script$g = /*@__PURE__*/ defineComponent({
|
|
|
807
801
|
class: normalizeClass(searchBarTheme.value.suggestionsContainer),
|
|
808
802
|
style: normalizeStyle(suggestionsStyle.value)
|
|
809
803
|
}, [
|
|
810
|
-
(
|
|
811
|
-
? (openBlock(), createElementBlock(
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
], 46 /* CLASS, STYLE, PROPS, NEED_HYDRATION */, _hoisted_3$6));
|
|
837
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
838
|
-
: (localQuery.value.length >= __props.minQueryLength)
|
|
839
|
-
? (openBlock(), createElementBlock("div", {
|
|
840
|
-
key: 2,
|
|
841
|
-
style: normalizeStyle(emptyStyle.value)
|
|
842
|
-
}, " No suggestions found ", 4 /* STYLE */))
|
|
843
|
-
: createCommentVNode("v-if", true)
|
|
804
|
+
(displayedSuggestions.value.length > 0)
|
|
805
|
+
? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(displayedSuggestions.value, (suggestion, index) => {
|
|
806
|
+
return (openBlock(), createElementBlock("div", {
|
|
807
|
+
key: index,
|
|
808
|
+
class: normalizeClass([
|
|
809
|
+
searchBarTheme.value.suggestionItem,
|
|
810
|
+
index === selectedIndex.value && searchBarTheme.value.suggestionItemActive
|
|
811
|
+
]),
|
|
812
|
+
onClick: ($event) => (handleSuggestionSelect(suggestion.query)),
|
|
813
|
+
onMouseenter: ($event) => (selectedIndex.value = index),
|
|
814
|
+
style: normalizeStyle(getSuggestionStyle(index))
|
|
815
|
+
}, [
|
|
816
|
+
renderSlot(_ctx.$slots, "suggestion", {
|
|
817
|
+
suggestion: suggestion.query,
|
|
818
|
+
index: index
|
|
819
|
+
}, () => [
|
|
820
|
+
createElementVNode("div", null, toDisplayString(suggestion.query), 1 /* TEXT */)
|
|
821
|
+
])
|
|
822
|
+
], 46 /* CLASS, STYLE, PROPS, NEED_HYDRATION */, _hoisted_2$9));
|
|
823
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
824
|
+
: (localQuery.value.length >= __props.minQueryLength)
|
|
825
|
+
? (openBlock(), createElementBlock("div", {
|
|
826
|
+
key: 1,
|
|
827
|
+
style: normalizeStyle(emptyStyle.value)
|
|
828
|
+
}, " No suggestions found ", 4 /* STYLE */))
|
|
829
|
+
: createCommentVNode("v-if", true)
|
|
844
830
|
], 6 /* CLASS, STYLE */))
|
|
845
831
|
: createCommentVNode("v-if", true)
|
|
846
832
|
], 6 /* CLASS, STYLE */));
|
|
@@ -852,7 +838,7 @@ script$g.__file = "src/components/SearchBar.vue";
|
|
|
852
838
|
|
|
853
839
|
const _hoisted_1$a = ["onClick"];
|
|
854
840
|
const _hoisted_2$8 = { key: 0 };
|
|
855
|
-
const _hoisted_3$
|
|
841
|
+
const _hoisted_3$4 = ["src", "alt"];
|
|
856
842
|
const _hoisted_4$3 = ["src", "alt"];
|
|
857
843
|
var script$f = /*@__PURE__*/ defineComponent({
|
|
858
844
|
__name: 'SearchResults',
|
|
@@ -864,7 +850,6 @@ var script$f = /*@__PURE__*/ defineComponent({
|
|
|
864
850
|
fieldMapping: { type: null, required: false },
|
|
865
851
|
renderResult: { type: Function, required: false },
|
|
866
852
|
renderEmpty: { type: Function, required: false },
|
|
867
|
-
renderLoading: { type: Function, required: false },
|
|
868
853
|
renderError: { type: Function, required: false },
|
|
869
854
|
onResultClick: { type: Function, required: false },
|
|
870
855
|
className: { type: String, required: false },
|
|
@@ -881,7 +866,7 @@ var script$f = /*@__PURE__*/ defineComponent({
|
|
|
881
866
|
const { results: stateResults, loading: stateLoading, error: stateError } = useSearchState();
|
|
882
867
|
// Use props if provided, otherwise use state from state manager
|
|
883
868
|
const results = computed(() => props.results !== undefined ? props.results : stateResults.value);
|
|
884
|
-
|
|
869
|
+
computed(() => props.loading !== undefined ? props.loading : stateLoading.value);
|
|
885
870
|
const error = computed(() => props.error !== undefined ? props.error : stateError.value);
|
|
886
871
|
const searchResultsTheme = computed(() => ({}));
|
|
887
872
|
const viewModeCapitalized = computed(() => {
|
|
@@ -972,11 +957,6 @@ var script$f = /*@__PURE__*/ defineComponent({
|
|
|
972
957
|
}
|
|
973
958
|
return baseStyle;
|
|
974
959
|
});
|
|
975
|
-
const loadingStyle = computed(() => ({
|
|
976
|
-
padding: theme.value.spacing.large,
|
|
977
|
-
textAlign: 'center',
|
|
978
|
-
color: theme.value.colors.text,
|
|
979
|
-
}));
|
|
980
960
|
const errorStyle = computed(() => ({
|
|
981
961
|
padding: theme.value.spacing.large,
|
|
982
962
|
textAlign: 'center',
|
|
@@ -1084,157 +1064,142 @@ var script$f = /*@__PURE__*/ defineComponent({
|
|
|
1084
1064
|
float: 'left',
|
|
1085
1065
|
}));
|
|
1086
1066
|
return (_ctx, _cache) => {
|
|
1087
|
-
return (
|
|
1067
|
+
return (error.value)
|
|
1088
1068
|
? (openBlock(), createElementBlock("div", {
|
|
1089
1069
|
key: 0,
|
|
1090
1070
|
class: normalizeClass([searchResultsTheme.value.container, __props.className]),
|
|
1091
1071
|
style: normalizeStyle(containerStyle.value)
|
|
1092
1072
|
}, [
|
|
1093
|
-
renderSlot(_ctx.$slots, "
|
|
1094
|
-
(!__props.
|
|
1073
|
+
renderSlot(_ctx.$slots, "error", { error: error.value }, () => [
|
|
1074
|
+
(!__props.renderError)
|
|
1095
1075
|
? (openBlock(), createElementBlock("div", {
|
|
1096
1076
|
key: 0,
|
|
1097
|
-
style: normalizeStyle(
|
|
1098
|
-
}, "
|
|
1077
|
+
style: normalizeStyle(errorStyle.value)
|
|
1078
|
+
}, " Error: " + toDisplayString(error.value.message), 5 /* TEXT, STYLE */))
|
|
1099
1079
|
: createCommentVNode("v-if", true)
|
|
1100
1080
|
])
|
|
1101
1081
|
], 6 /* CLASS, STYLE */))
|
|
1102
|
-
: (
|
|
1082
|
+
: (displayedResults.value.length === 0)
|
|
1103
1083
|
? (openBlock(), createElementBlock("div", {
|
|
1104
1084
|
key: 1,
|
|
1105
1085
|
class: normalizeClass([searchResultsTheme.value.container, __props.className]),
|
|
1106
1086
|
style: normalizeStyle(containerStyle.value)
|
|
1107
1087
|
}, [
|
|
1108
|
-
renderSlot(_ctx.$slots, "
|
|
1109
|
-
(!__props.
|
|
1088
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
1089
|
+
(!__props.renderEmpty)
|
|
1110
1090
|
? (openBlock(), createElementBlock("div", {
|
|
1111
1091
|
key: 0,
|
|
1112
|
-
style: normalizeStyle(
|
|
1113
|
-
}, "
|
|
1092
|
+
style: normalizeStyle(emptyStyle.value)
|
|
1093
|
+
}, "No results found", 4 /* STYLE */))
|
|
1114
1094
|
: createCommentVNode("v-if", true)
|
|
1115
1095
|
])
|
|
1116
1096
|
], 6 /* CLASS, STYLE */))
|
|
1117
|
-
: (
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
}, "No results found", 4 /* STYLE */))
|
|
1129
|
-
: createCommentVNode("v-if", true)
|
|
1130
|
-
])
|
|
1131
|
-
], 6 /* CLASS, STYLE */))
|
|
1132
|
-
: (openBlock(), createElementBlock("div", {
|
|
1133
|
-
key: 3,
|
|
1134
|
-
class: normalizeClass([
|
|
1135
|
-
searchResultsTheme.value.container,
|
|
1136
|
-
searchResultsTheme.value[`container${viewModeCapitalized.value}`],
|
|
1137
|
-
__props.className
|
|
1138
|
-
]),
|
|
1139
|
-
style: normalizeStyle(containerStyle.value)
|
|
1097
|
+
: (openBlock(), createElementBlock("div", {
|
|
1098
|
+
key: 2,
|
|
1099
|
+
class: normalizeClass([
|
|
1100
|
+
searchResultsTheme.value.container,
|
|
1101
|
+
searchResultsTheme.value[`container${viewModeCapitalized.value}`],
|
|
1102
|
+
__props.className
|
|
1103
|
+
]),
|
|
1104
|
+
style: normalizeStyle(containerStyle.value)
|
|
1105
|
+
}, [
|
|
1106
|
+
createElementVNode("div", {
|
|
1107
|
+
style: normalizeStyle(resultsListStyle.value)
|
|
1140
1108
|
}, [
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
? (openBlock(), createElementBlock("div", {
|
|
1165
|
-
key: 0,
|
|
1166
|
-
style: normalizeStyle(imageContainerStyle.value)
|
|
1167
|
-
}, [
|
|
1168
|
-
createElementVNode("img", {
|
|
1169
|
-
src: getResultImage(result),
|
|
1170
|
-
alt: getResultTitle(result),
|
|
1171
|
-
style: normalizeStyle(imageStyle.value)
|
|
1172
|
-
}, null, 12 /* STYLE, PROPS */, _hoisted_3$5)
|
|
1173
|
-
], 4 /* STYLE */))
|
|
1174
|
-
: createCommentVNode("v-if", true),
|
|
1175
|
-
createElementVNode("div", {
|
|
1176
|
-
style: normalizeStyle(cardContentStyle.value)
|
|
1109
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(displayedResults.value, (result, index) => {
|
|
1110
|
+
return (openBlock(), createElementBlock("div", {
|
|
1111
|
+
key: getResultId(result, index),
|
|
1112
|
+
class: normalizeClass([
|
|
1113
|
+
searchResultsTheme.value.resultItem,
|
|
1114
|
+
searchResultsTheme.value[`resultItem${viewModeCapitalized.value}`]
|
|
1115
|
+
]),
|
|
1116
|
+
style: normalizeStyle(getResultStyle()),
|
|
1117
|
+
onClick: ($event) => (handleResultClick(result, index))
|
|
1118
|
+
}, [
|
|
1119
|
+
renderSlot(_ctx.$slots, "result", {
|
|
1120
|
+
result: result,
|
|
1121
|
+
index: index,
|
|
1122
|
+
extractedFields: extractFields(result)
|
|
1123
|
+
}, () => [
|
|
1124
|
+
(!__props.renderResult)
|
|
1125
|
+
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1126
|
+
(__props.viewMode === 'card' || __props.viewMode === 'grid')
|
|
1127
|
+
? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
1128
|
+
(getResultImage(result))
|
|
1129
|
+
? (openBlock(), createElementBlock("div", {
|
|
1130
|
+
key: 0,
|
|
1131
|
+
style: normalizeStyle(imageContainerStyle.value)
|
|
1177
1132
|
}, [
|
|
1178
|
-
(
|
|
1179
|
-
? (openBlock(), createElementBlock("h3", {
|
|
1180
|
-
key: 0,
|
|
1181
|
-
style: normalizeStyle(titleStyle.value)
|
|
1182
|
-
}, toDisplayString(getResultTitle(result)), 5 /* TEXT, STYLE */))
|
|
1183
|
-
: createCommentVNode("v-if", true),
|
|
1184
|
-
(getResultDescription(result))
|
|
1185
|
-
? (openBlock(), createElementBlock("p", {
|
|
1186
|
-
key: 1,
|
|
1187
|
-
style: normalizeStyle(descriptionStyle.value)
|
|
1188
|
-
}, toDisplayString(getResultDescription(result)), 5 /* TEXT, STYLE */))
|
|
1189
|
-
: createCommentVNode("v-if", true),
|
|
1190
|
-
(getResultPrice(result))
|
|
1191
|
-
? (openBlock(), createElementBlock("div", {
|
|
1192
|
-
key: 2,
|
|
1193
|
-
style: normalizeStyle(priceStyle.value)
|
|
1194
|
-
}, toDisplayString(getResultPrice(result)), 5 /* TEXT, STYLE */))
|
|
1195
|
-
: createCommentVNode("v-if", true)
|
|
1196
|
-
], 4 /* STYLE */)
|
|
1197
|
-
]))
|
|
1198
|
-
: (openBlock(), createElementBlock("div", {
|
|
1199
|
-
key: 1,
|
|
1200
|
-
style: normalizeStyle(listContentStyle.value)
|
|
1201
|
-
}, [
|
|
1202
|
-
(getResultImage(result))
|
|
1203
|
-
? (openBlock(), createElementBlock("img", {
|
|
1204
|
-
key: 0,
|
|
1133
|
+
createElementVNode("img", {
|
|
1205
1134
|
src: getResultImage(result),
|
|
1206
1135
|
alt: getResultTitle(result),
|
|
1207
|
-
style: normalizeStyle(
|
|
1208
|
-
}, null, 12 /* STYLE, PROPS */,
|
|
1136
|
+
style: normalizeStyle(imageStyle.value)
|
|
1137
|
+
}, null, 12 /* STYLE, PROPS */, _hoisted_3$4)
|
|
1138
|
+
], 4 /* STYLE */))
|
|
1139
|
+
: createCommentVNode("v-if", true),
|
|
1140
|
+
createElementVNode("div", {
|
|
1141
|
+
style: normalizeStyle(cardContentStyle.value)
|
|
1142
|
+
}, [
|
|
1143
|
+
(getResultTitle(result))
|
|
1144
|
+
? (openBlock(), createElementBlock("h3", {
|
|
1145
|
+
key: 0,
|
|
1146
|
+
style: normalizeStyle(titleStyle.value)
|
|
1147
|
+
}, toDisplayString(getResultTitle(result)), 5 /* TEXT, STYLE */))
|
|
1209
1148
|
: createCommentVNode("v-if", true),
|
|
1210
|
-
|
|
1211
|
-
(
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
(
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1149
|
+
(getResultDescription(result))
|
|
1150
|
+
? (openBlock(), createElementBlock("p", {
|
|
1151
|
+
key: 1,
|
|
1152
|
+
style: normalizeStyle(descriptionStyle.value)
|
|
1153
|
+
}, toDisplayString(getResultDescription(result)), 5 /* TEXT, STYLE */))
|
|
1154
|
+
: createCommentVNode("v-if", true),
|
|
1155
|
+
(getResultPrice(result))
|
|
1156
|
+
? (openBlock(), createElementBlock("div", {
|
|
1157
|
+
key: 2,
|
|
1158
|
+
style: normalizeStyle(priceStyle.value)
|
|
1159
|
+
}, toDisplayString(getResultPrice(result)), 5 /* TEXT, STYLE */))
|
|
1160
|
+
: createCommentVNode("v-if", true)
|
|
1161
|
+
], 4 /* STYLE */)
|
|
1162
|
+
]))
|
|
1163
|
+
: (openBlock(), createElementBlock("div", {
|
|
1164
|
+
key: 1,
|
|
1165
|
+
style: normalizeStyle(listContentStyle.value)
|
|
1166
|
+
}, [
|
|
1167
|
+
(getResultImage(result))
|
|
1168
|
+
? (openBlock(), createElementBlock("img", {
|
|
1169
|
+
key: 0,
|
|
1170
|
+
src: getResultImage(result),
|
|
1171
|
+
alt: getResultTitle(result),
|
|
1172
|
+
style: normalizeStyle(listImageStyle.value)
|
|
1173
|
+
}, null, 12 /* STYLE, PROPS */, _hoisted_4$3))
|
|
1174
|
+
: createCommentVNode("v-if", true),
|
|
1175
|
+
createElementVNode("div", null, [
|
|
1176
|
+
(getResultTitle(result))
|
|
1177
|
+
? (openBlock(), createElementBlock("h3", {
|
|
1178
|
+
key: 0,
|
|
1179
|
+
style: normalizeStyle(titleStyle.value)
|
|
1180
|
+
}, toDisplayString(getResultTitle(result)), 5 /* TEXT, STYLE */))
|
|
1181
|
+
: createCommentVNode("v-if", true),
|
|
1182
|
+
(getResultDescription(result))
|
|
1183
|
+
? (openBlock(), createElementBlock("p", {
|
|
1184
|
+
key: 1,
|
|
1185
|
+
style: normalizeStyle(descriptionStyle.value)
|
|
1186
|
+
}, toDisplayString(getResultDescription(result)), 5 /* TEXT, STYLE */))
|
|
1187
|
+
: createCommentVNode("v-if", true),
|
|
1188
|
+
(getResultPrice(result))
|
|
1189
|
+
? (openBlock(), createElementBlock("div", {
|
|
1190
|
+
key: 2,
|
|
1191
|
+
style: normalizeStyle(priceStyle.value)
|
|
1192
|
+
}, toDisplayString(getResultPrice(result)), 5 /* TEXT, STYLE */))
|
|
1193
|
+
: createCommentVNode("v-if", true)
|
|
1194
|
+
])
|
|
1195
|
+
], 4 /* STYLE */))
|
|
1196
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
1197
|
+
: createCommentVNode("v-if", true)
|
|
1198
|
+
])
|
|
1199
|
+
], 14 /* CLASS, STYLE, PROPS */, _hoisted_1$a));
|
|
1200
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
1201
|
+
], 4 /* STYLE */)
|
|
1202
|
+
], 6 /* CLASS, STYLE */));
|
|
1238
1203
|
};
|
|
1239
1204
|
}
|
|
1240
1205
|
});
|
|
@@ -1242,8 +1207,7 @@ var script$f = /*@__PURE__*/ defineComponent({
|
|
|
1242
1207
|
script$f.__file = "src/components/SearchResults.vue";
|
|
1243
1208
|
|
|
1244
1209
|
const _hoisted_1$9 = { key: 1 };
|
|
1245
|
-
const _hoisted_2$7 =
|
|
1246
|
-
const _hoisted_3$4 = ["onClick", "onMouseenter"];
|
|
1210
|
+
const _hoisted_2$7 = ["onClick", "onMouseenter"];
|
|
1247
1211
|
var script$e = /*@__PURE__*/ defineComponent({
|
|
1248
1212
|
__name: 'QuerySuggestions',
|
|
1249
1213
|
props: {
|
|
@@ -1253,7 +1217,6 @@ var script$e = /*@__PURE__*/ defineComponent({
|
|
|
1253
1217
|
minQueryLength: { type: Number, required: false, default: 2 },
|
|
1254
1218
|
onSuggestionClick: { type: Function, required: false },
|
|
1255
1219
|
renderSuggestion: { type: Function, required: false },
|
|
1256
|
-
renderLoading: { type: Function, required: false },
|
|
1257
1220
|
renderEmpty: { type: Function, required: false },
|
|
1258
1221
|
showTitle: { type: Boolean, required: false, default: false },
|
|
1259
1222
|
title: { type: String, required: false, default: 'Suggestions' },
|
|
@@ -1284,11 +1247,6 @@ var script$e = /*@__PURE__*/ defineComponent({
|
|
|
1284
1247
|
marginBottom: theme.value.spacing.medium,
|
|
1285
1248
|
color: theme.value.colors.text,
|
|
1286
1249
|
}));
|
|
1287
|
-
const loadingStyle = computed(() => ({
|
|
1288
|
-
padding: theme.value.spacing.medium,
|
|
1289
|
-
textAlign: 'center',
|
|
1290
|
-
color: theme.value.colors.text,
|
|
1291
|
-
}));
|
|
1292
1250
|
const emptyStyle = computed(() => ({
|
|
1293
1251
|
padding: theme.value.spacing.medium,
|
|
1294
1252
|
textAlign: 'center',
|
|
@@ -1329,59 +1287,48 @@ var script$e = /*@__PURE__*/ defineComponent({
|
|
|
1329
1287
|
style: normalizeStyle(titleStyle.value)
|
|
1330
1288
|
}, toDisplayString(__props.title), 7 /* TEXT, CLASS, STYLE */))
|
|
1331
1289
|
: createCommentVNode("v-if", true),
|
|
1332
|
-
(unref(
|
|
1290
|
+
(unref(error) || displayedSuggestions.value.length === 0)
|
|
1333
1291
|
? (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
1334
|
-
renderSlot(_ctx.$slots, "
|
|
1335
|
-
(!__props.
|
|
1292
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
1293
|
+
(!__props.renderEmpty)
|
|
1336
1294
|
? (openBlock(), createElementBlock("div", {
|
|
1337
1295
|
key: 0,
|
|
1338
|
-
style: normalizeStyle(
|
|
1339
|
-
}, "
|
|
1296
|
+
style: normalizeStyle(emptyStyle.value)
|
|
1297
|
+
}, " No suggestions available ", 4 /* STYLE */))
|
|
1340
1298
|
: createCommentVNode("v-if", true)
|
|
1341
1299
|
])
|
|
1342
1300
|
]))
|
|
1343
|
-
: (
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
createElementVNode("span", null, toDisplayString(suggestion.query), 1 /* TEXT */),
|
|
1375
|
-
(suggestion.count !== undefined)
|
|
1376
|
-
? (openBlock(), createElementBlock("span", {
|
|
1377
|
-
key: 0,
|
|
1378
|
-
style: normalizeStyle(countStyle.value)
|
|
1379
|
-
}, " (" + toDisplayString(suggestion.count) + ") ", 5 /* TEXT, STYLE */))
|
|
1380
|
-
: createCommentVNode("v-if", true)
|
|
1381
|
-
])
|
|
1382
|
-
], 46 /* CLASS, STYLE, PROPS, NEED_HYDRATION */, _hoisted_3$4));
|
|
1383
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
1384
|
-
], 2 /* CLASS */))
|
|
1301
|
+
: (openBlock(), createElementBlock("div", {
|
|
1302
|
+
key: 2,
|
|
1303
|
+
class: normalizeClass(querySuggestionsTheme.value.suggestionsList)
|
|
1304
|
+
}, [
|
|
1305
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(displayedSuggestions.value, (suggestion, index) => {
|
|
1306
|
+
return (openBlock(), createElementBlock("div", {
|
|
1307
|
+
key: index,
|
|
1308
|
+
class: normalizeClass([
|
|
1309
|
+
querySuggestionsTheme.value.suggestionItem,
|
|
1310
|
+
index === selectedIndex.value && querySuggestionsTheme.value.suggestionItemActive
|
|
1311
|
+
]),
|
|
1312
|
+
style: normalizeStyle(getSuggestionStyle(index)),
|
|
1313
|
+
onClick: ($event) => (handleSuggestionClick(suggestion)),
|
|
1314
|
+
onMouseenter: ($event) => (selectedIndex.value = index),
|
|
1315
|
+
onMouseleave: _cache[0] || (_cache[0] = ($event) => (selectedIndex.value = -1))
|
|
1316
|
+
}, [
|
|
1317
|
+
renderSlot(_ctx.$slots, "suggestion", {
|
|
1318
|
+
suggestion: suggestion,
|
|
1319
|
+
index: index
|
|
1320
|
+
}, () => [
|
|
1321
|
+
createElementVNode("span", null, toDisplayString(suggestion.query), 1 /* TEXT */),
|
|
1322
|
+
(suggestion.count !== undefined)
|
|
1323
|
+
? (openBlock(), createElementBlock("span", {
|
|
1324
|
+
key: 0,
|
|
1325
|
+
style: normalizeStyle(countStyle.value)
|
|
1326
|
+
}, " (" + toDisplayString(suggestion.count) + ") ", 5 /* TEXT, STYLE */))
|
|
1327
|
+
: createCommentVNode("v-if", true)
|
|
1328
|
+
])
|
|
1329
|
+
], 46 /* CLASS, STYLE, PROPS, NEED_HYDRATION */, _hoisted_2$7));
|
|
1330
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
1331
|
+
], 2 /* CLASS */))
|
|
1385
1332
|
], 6 /* CLASS, STYLE */))
|
|
1386
1333
|
: createCommentVNode("v-if", true);
|
|
1387
1334
|
};
|
|
@@ -1440,7 +1387,7 @@ var script$d = /*@__PURE__*/ defineComponent({
|
|
|
1440
1387
|
fontSize: theme.value.typography.fontSize.medium,
|
|
1441
1388
|
}));
|
|
1442
1389
|
return (_ctx, _cache) => {
|
|
1443
|
-
return (
|
|
1390
|
+
return (hasResults.value)
|
|
1444
1391
|
? (openBlock(), createElementBlock("div", {
|
|
1445
1392
|
key: 0,
|
|
1446
1393
|
class: normalizeClass([statsTheme.value.container, __props.className]),
|
|
@@ -1448,26 +1395,16 @@ var script$d = /*@__PURE__*/ defineComponent({
|
|
|
1448
1395
|
}, [
|
|
1449
1396
|
createElementVNode("span", {
|
|
1450
1397
|
style: normalizeStyle(textStyle.value)
|
|
1451
|
-
}, "Loading...", 4 /* STYLE */)
|
|
1452
|
-
], 6 /* CLASS, STYLE */))
|
|
1453
|
-
: (hasResults.value)
|
|
1454
|
-
? (openBlock(), createElementBlock("div", {
|
|
1455
|
-
key: 1,
|
|
1456
|
-
class: normalizeClass([statsTheme.value.container, __props.className]),
|
|
1457
|
-
style: normalizeStyle(containerStyle.value)
|
|
1458
1398
|
}, [
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
], 4 /* STYLE */)
|
|
1469
|
-
], 6 /* CLASS, STYLE */))
|
|
1470
|
-
: createCommentVNode("v-if", true);
|
|
1399
|
+
createTextVNode(toDisplayString(resultsText.value) + " ", 1 /* TEXT */),
|
|
1400
|
+
(__props.showProcessingTime && processingTime.value !== undefined)
|
|
1401
|
+
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1402
|
+
createTextVNode(toDisplayString(processingTimeText.value), 1 /* TEXT */)
|
|
1403
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
1404
|
+
: createCommentVNode("v-if", true)
|
|
1405
|
+
], 4 /* STYLE */)
|
|
1406
|
+
], 6 /* CLASS, STYLE */))
|
|
1407
|
+
: createCommentVNode("v-if", true);
|
|
1471
1408
|
};
|
|
1472
1409
|
}
|
|
1473
1410
|
});
|
|
@@ -2543,7 +2480,6 @@ var script$5 = /*@__PURE__*/ defineComponent({
|
|
|
2543
2480
|
scrollThreshold: { type: Number, required: false, default: 0.1 },
|
|
2544
2481
|
fieldMapping: { type: null, required: false },
|
|
2545
2482
|
showMoreLabel: { type: String, required: false, default: 'Show more' },
|
|
2546
|
-
loadingLabel: { type: String, required: false, default: 'Loading...' },
|
|
2547
2483
|
onHitClick: { type: Function, required: false },
|
|
2548
2484
|
className: { type: String, required: false },
|
|
2549
2485
|
style: { type: Object, required: false },
|
|
@@ -2694,11 +2630,6 @@ var script$5 = /*@__PURE__*/ defineComponent({
|
|
|
2694
2630
|
fontWeight: theme.value.typography.fontWeight?.bold || 700,
|
|
2695
2631
|
color: theme.value.colors.primary,
|
|
2696
2632
|
}));
|
|
2697
|
-
const loadingStyle = computed(() => ({
|
|
2698
|
-
padding: theme.value.spacing.medium,
|
|
2699
|
-
textAlign: 'center',
|
|
2700
|
-
color: theme.value.colors.textSecondary,
|
|
2701
|
-
}));
|
|
2702
2633
|
const emptyStyle = computed(() => ({
|
|
2703
2634
|
padding: theme.value.spacing.large,
|
|
2704
2635
|
textAlign: 'center',
|
|
@@ -2725,115 +2656,90 @@ var script$5 = /*@__PURE__*/ defineComponent({
|
|
|
2725
2656
|
class: normalizeClass([infiniteHitsTheme.value.root, __props.className]),
|
|
2726
2657
|
style: normalizeStyle(__props.style)
|
|
2727
2658
|
}, [
|
|
2728
|
-
createCommentVNode("
|
|
2729
|
-
(
|
|
2730
|
-
? renderSlot(_ctx.$slots, "
|
|
2731
|
-
key: 0,
|
|
2732
|
-
loading: unref(loading)
|
|
2733
|
-
}, () => [
|
|
2659
|
+
createCommentVNode(" Empty state "),
|
|
2660
|
+
(accumulatedHits.value.length === 0)
|
|
2661
|
+
? renderSlot(_ctx.$slots, "empty", { key: 0 }, () => [
|
|
2734
2662
|
createElementVNode("div", {
|
|
2735
|
-
class: normalizeClass(infiniteHitsTheme.value.
|
|
2736
|
-
style: normalizeStyle(
|
|
2737
|
-
},
|
|
2663
|
+
class: normalizeClass(infiniteHitsTheme.value.empty),
|
|
2664
|
+
style: normalizeStyle(emptyStyle.value)
|
|
2665
|
+
}, " No results found ", 6 /* CLASS, STYLE */)
|
|
2738
2666
|
])
|
|
2739
|
-
: (
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
: (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2750
|
-
createCommentVNode(" Hits list "),
|
|
2751
|
-
createElementVNode("div", {
|
|
2752
|
-
class: normalizeClass(infiniteHitsTheme.value.list)
|
|
2753
|
-
}, [
|
|
2754
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(accumulatedHits.value, (hit, index) => {
|
|
2755
|
-
return renderSlot(_ctx.$slots, "hit", {
|
|
2756
|
-
key: hit.id || index,
|
|
2757
|
-
hit: hit,
|
|
2758
|
-
index: index
|
|
2759
|
-
}, () => [
|
|
2760
|
-
createElementVNode("div", {
|
|
2761
|
-
class: normalizeClass(infiniteHitsTheme.value.item),
|
|
2762
|
-
style: normalizeStyle(hitStyle.value),
|
|
2763
|
-
onClick: ($event) => (handleHitClick(hit, index)),
|
|
2764
|
-
role: __props.onHitClick ? 'button' : undefined,
|
|
2765
|
-
tabindex: __props.onHitClick ? 0 : undefined
|
|
2766
|
-
}, [
|
|
2767
|
-
(getHitImage(hit))
|
|
2768
|
-
? (openBlock(), createElementBlock("img", {
|
|
2769
|
-
key: 0,
|
|
2770
|
-
src: getHitImage(hit),
|
|
2771
|
-
alt: getHitTitle(hit),
|
|
2772
|
-
style: normalizeStyle(imageStyle.value)
|
|
2773
|
-
}, null, 12 /* STYLE, PROPS */, _hoisted_2$1))
|
|
2774
|
-
: createCommentVNode("v-if", true),
|
|
2775
|
-
createElementVNode("div", _hoisted_3$1, [
|
|
2776
|
-
createElementVNode("h3", {
|
|
2777
|
-
style: normalizeStyle(titleStyle.value)
|
|
2778
|
-
}, toDisplayString(getHitTitle(hit)), 5 /* TEXT, STYLE */),
|
|
2779
|
-
(getHitDescription(hit))
|
|
2780
|
-
? (openBlock(), createElementBlock("p", {
|
|
2781
|
-
key: 0,
|
|
2782
|
-
style: normalizeStyle(descriptionStyle.value)
|
|
2783
|
-
}, toDisplayString(getHitDescription(hit)), 5 /* TEXT, STYLE */))
|
|
2784
|
-
: createCommentVNode("v-if", true),
|
|
2785
|
-
(getHitPrice(hit))
|
|
2786
|
-
? (openBlock(), createElementBlock("span", {
|
|
2787
|
-
key: 1,
|
|
2788
|
-
style: normalizeStyle(priceStyle.value)
|
|
2789
|
-
}, " $" + toDisplayString(formatPrice(getHitPrice(hit))), 5 /* TEXT, STYLE */))
|
|
2790
|
-
: createCommentVNode("v-if", true)
|
|
2791
|
-
])
|
|
2792
|
-
], 14 /* CLASS, STYLE, PROPS */, _hoisted_1$1)
|
|
2793
|
-
]);
|
|
2794
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
2795
|
-
], 2 /* CLASS */),
|
|
2796
|
-
createCommentVNode(" Show More button "),
|
|
2797
|
-
(__props.showMoreButton && !__props.useInfiniteScroll && !isLastPage.value)
|
|
2798
|
-
? renderSlot(_ctx.$slots, "showMore", {
|
|
2799
|
-
key: 0,
|
|
2800
|
-
isLoading: isLoadingMore.value,
|
|
2801
|
-
isLastPage: isLastPage.value,
|
|
2802
|
-
onClick: handleShowMore
|
|
2803
|
-
}, () => [
|
|
2804
|
-
createElementVNode("button", {
|
|
2805
|
-
type: "button",
|
|
2806
|
-
onClick: handleShowMore,
|
|
2807
|
-
disabled: isLoadingMore.value,
|
|
2808
|
-
class: normalizeClass([infiniteHitsTheme.value.loadMore, isLoadingMore.value && infiniteHitsTheme.value.loadMoreDisabled]),
|
|
2809
|
-
style: normalizeStyle(showMoreButtonStyle.value)
|
|
2810
|
-
}, toDisplayString(isLoadingMore.value ? __props.loadingLabel : __props.showMoreLabel), 15 /* TEXT, CLASS, STYLE, PROPS */, _hoisted_4$1)
|
|
2811
|
-
])
|
|
2812
|
-
: createCommentVNode("v-if", true),
|
|
2813
|
-
createCommentVNode(" Loading more indicator "),
|
|
2814
|
-
(isLoadingMore.value)
|
|
2815
|
-
? renderSlot(_ctx.$slots, "loading", {
|
|
2816
|
-
key: 1,
|
|
2817
|
-
loading: true
|
|
2667
|
+
: (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2668
|
+
createCommentVNode(" Hits list "),
|
|
2669
|
+
createElementVNode("div", {
|
|
2670
|
+
class: normalizeClass(infiniteHitsTheme.value.list)
|
|
2671
|
+
}, [
|
|
2672
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(accumulatedHits.value, (hit, index) => {
|
|
2673
|
+
return renderSlot(_ctx.$slots, "hit", {
|
|
2674
|
+
key: hit.id || index,
|
|
2675
|
+
hit: hit,
|
|
2676
|
+
index: index
|
|
2818
2677
|
}, () => [
|
|
2819
2678
|
createElementVNode("div", {
|
|
2820
|
-
class: normalizeClass(infiniteHitsTheme.value.
|
|
2821
|
-
style: normalizeStyle(
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2679
|
+
class: normalizeClass(infiniteHitsTheme.value.item),
|
|
2680
|
+
style: normalizeStyle(hitStyle.value),
|
|
2681
|
+
onClick: ($event) => (handleHitClick(hit, index)),
|
|
2682
|
+
role: __props.onHitClick ? 'button' : undefined,
|
|
2683
|
+
tabindex: __props.onHitClick ? 0 : undefined
|
|
2684
|
+
}, [
|
|
2685
|
+
(getHitImage(hit))
|
|
2686
|
+
? (openBlock(), createElementBlock("img", {
|
|
2687
|
+
key: 0,
|
|
2688
|
+
src: getHitImage(hit),
|
|
2689
|
+
alt: getHitTitle(hit),
|
|
2690
|
+
style: normalizeStyle(imageStyle.value)
|
|
2691
|
+
}, null, 12 /* STYLE, PROPS */, _hoisted_2$1))
|
|
2692
|
+
: createCommentVNode("v-if", true),
|
|
2693
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
2694
|
+
createElementVNode("h3", {
|
|
2695
|
+
style: normalizeStyle(titleStyle.value)
|
|
2696
|
+
}, toDisplayString(getHitTitle(hit)), 5 /* TEXT, STYLE */),
|
|
2697
|
+
(getHitDescription(hit))
|
|
2698
|
+
? (openBlock(), createElementBlock("p", {
|
|
2699
|
+
key: 0,
|
|
2700
|
+
style: normalizeStyle(descriptionStyle.value)
|
|
2701
|
+
}, toDisplayString(getHitDescription(hit)), 5 /* TEXT, STYLE */))
|
|
2702
|
+
: createCommentVNode("v-if", true),
|
|
2703
|
+
(getHitPrice(hit))
|
|
2704
|
+
? (openBlock(), createElementBlock("span", {
|
|
2705
|
+
key: 1,
|
|
2706
|
+
style: normalizeStyle(priceStyle.value)
|
|
2707
|
+
}, " $" + toDisplayString(formatPrice(getHitPrice(hit))), 5 /* TEXT, STYLE */))
|
|
2708
|
+
: createCommentVNode("v-if", true)
|
|
2709
|
+
])
|
|
2710
|
+
], 14 /* CLASS, STYLE, PROPS */, _hoisted_1$1)
|
|
2711
|
+
]);
|
|
2712
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
2713
|
+
], 2 /* CLASS */),
|
|
2714
|
+
createCommentVNode(" Show More button "),
|
|
2715
|
+
(__props.showMoreButton && !__props.useInfiniteScroll && !isLastPage.value)
|
|
2716
|
+
? renderSlot(_ctx.$slots, "showMore", {
|
|
2717
|
+
key: 0,
|
|
2718
|
+
isLoading: isLoadingMore.value,
|
|
2719
|
+
isLastPage: isLastPage.value,
|
|
2720
|
+
onClick: handleShowMore
|
|
2721
|
+
}, () => [
|
|
2722
|
+
createElementVNode("button", {
|
|
2723
|
+
type: "button",
|
|
2724
|
+
onClick: handleShowMore,
|
|
2725
|
+
disabled: isLoadingMore.value,
|
|
2726
|
+
class: normalizeClass([infiniteHitsTheme.value.loadMore, isLoadingMore.value && infiniteHitsTheme.value.loadMoreDisabled]),
|
|
2727
|
+
style: normalizeStyle(showMoreButtonStyle.value)
|
|
2728
|
+
}, toDisplayString(__props.showMoreLabel), 15 /* TEXT, CLASS, STYLE, PROPS */, _hoisted_4$1)
|
|
2729
|
+
])
|
|
2730
|
+
: createCommentVNode("v-if", true),
|
|
2731
|
+
createCommentVNode(" Infinite scroll sentinel "),
|
|
2732
|
+
(__props.useInfiniteScroll && !isLastPage.value)
|
|
2733
|
+
? (openBlock(), createElementBlock("div", {
|
|
2734
|
+
key: 1,
|
|
2735
|
+
ref_key: "sentinelRef",
|
|
2736
|
+
ref: sentinelRef,
|
|
2737
|
+
class: normalizeClass(infiniteHitsTheme.value.sentinel),
|
|
2738
|
+
style: { "height": "1px", "visibility": "hidden" },
|
|
2739
|
+
"aria-hidden": "true"
|
|
2740
|
+
}, null, 2 /* CLASS */))
|
|
2741
|
+
: createCommentVNode("v-if", true)
|
|
2742
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
2837
2743
|
], 6 /* CLASS, STYLE */));
|
|
2838
2744
|
};
|
|
2839
2745
|
}
|
|
@@ -3265,7 +3171,7 @@ var script$1 = /*@__PURE__*/ defineComponent({
|
|
|
3265
3171
|
__name: 'SearchBarWithSuggestions',
|
|
3266
3172
|
props: {
|
|
3267
3173
|
variant: { type: String, required: false, default: 'classic' },
|
|
3268
|
-
placeholder: { type: String, required: false, default: '
|
|
3174
|
+
placeholder: { type: String, required: false, default: 'Powered by Seekora' },
|
|
3269
3175
|
initialQuery: { type: String, required: false, default: '' },
|
|
3270
3176
|
value: { type: String, required: false },
|
|
3271
3177
|
showClearButton: { type: Boolean, required: false, default: true },
|
|
@@ -3547,11 +3453,6 @@ var script$1 = /*@__PURE__*/ defineComponent({
|
|
|
3547
3453
|
color: theme.value.colors.primary,
|
|
3548
3454
|
fontWeight: theme.value.typography.fontWeight?.bold || 700,
|
|
3549
3455
|
}));
|
|
3550
|
-
const loadingStyle = computed(() => ({
|
|
3551
|
-
padding: theme.value.spacing.medium,
|
|
3552
|
-
textAlign: 'center',
|
|
3553
|
-
color: theme.value.colors.textSecondary,
|
|
3554
|
-
}));
|
|
3555
3456
|
const emptyStyle = computed(() => ({
|
|
3556
3457
|
padding: theme.value.spacing.medium,
|
|
3557
3458
|
textAlign: 'center',
|
|
@@ -3703,17 +3604,10 @@ var script$1 = /*@__PURE__*/ defineComponent({
|
|
|
3703
3604
|
}), 128 /* KEYED_FRAGMENT */))
|
|
3704
3605
|
]))
|
|
3705
3606
|
: createCommentVNode("v-if", true),
|
|
3706
|
-
createCommentVNode(" Loading state "),
|
|
3707
|
-
(unref(loading))
|
|
3708
|
-
? (openBlock(), createElementBlock("div", {
|
|
3709
|
-
key: 3,
|
|
3710
|
-
style: normalizeStyle(loadingStyle.value)
|
|
3711
|
-
}, "Loading...", 4 /* STYLE */))
|
|
3712
|
-
: createCommentVNode("v-if", true),
|
|
3713
3607
|
createCommentVNode(" Empty state "),
|
|
3714
|
-
(
|
|
3608
|
+
(unref(suggestions).length === 0 && query.value.length >= __props.minQueryLength)
|
|
3715
3609
|
? (openBlock(), createElementBlock("div", {
|
|
3716
|
-
key:
|
|
3610
|
+
key: 3,
|
|
3717
3611
|
style: normalizeStyle(emptyStyle.value)
|
|
3718
3612
|
}, " No suggestions found ", 4 /* STYLE */))
|
|
3719
3613
|
: createCommentVNode("v-if", true)
|