@getlupa/client 1.20.2 → 1.20.4
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/lupaSearch.iife.js +16 -3
- package/dist/lupaSearch.js +16 -3
- package/dist/lupaSearch.mjs +16 -3
- package/dist/lupaSearch.umd.js +16 -3
- package/package.json +2 -2
package/dist/lupaSearch.iife.js
CHANGED
|
@@ -20402,12 +20402,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20402
20402
|
var _a25, _b25;
|
|
20403
20403
|
return `${suggestion.display}${(_a25 = suggestion.facet) == null ? void 0 : _a25.key}${(_b25 = suggestion.facet) == null ? void 0 : _b25.title}`;
|
|
20404
20404
|
};
|
|
20405
|
+
const doesSuggestionHaveFacet = (suggestion) => {
|
|
20406
|
+
return suggestion.facet !== void 0 && suggestion.facet.key !== void 0;
|
|
20407
|
+
};
|
|
20405
20408
|
watch(highlightedItem, () => {
|
|
20406
20409
|
var _a25;
|
|
20407
20410
|
if (highlightedIndex.value < 0) {
|
|
20408
20411
|
return;
|
|
20409
20412
|
}
|
|
20410
|
-
const selected = (_a25 = props.items[highlightedIndex.value]) != null ? _a25 : {
|
|
20413
|
+
const selected = (_a25 = props.items[highlightedIndex.value]) != null ? _a25 : {
|
|
20414
|
+
suggestion: { suggestion: "" },
|
|
20415
|
+
facet: void 0
|
|
20416
|
+
};
|
|
20411
20417
|
handleSelect({
|
|
20412
20418
|
suggestion: selected.suggestion,
|
|
20413
20419
|
facet: selected.facet,
|
|
@@ -20419,7 +20425,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20419
20425
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
20420
20426
|
return openBlock(), createBlock(_sfc_main$1s, {
|
|
20421
20427
|
key: getSuggestionKey(item),
|
|
20422
|
-
class: normalizeClass([
|
|
20428
|
+
class: normalizeClass([
|
|
20429
|
+
"lupa-suggestion",
|
|
20430
|
+
index === highlightedIndex.value ? "lupa-suggestion-highlighted" : "",
|
|
20431
|
+
doesSuggestionHaveFacet(item) ? "lupa-faceted-suggestion" : "lupa-plain-suggestion"
|
|
20432
|
+
]),
|
|
20423
20433
|
suggestion: item,
|
|
20424
20434
|
highlight: highlight2.value,
|
|
20425
20435
|
labels: _ctx.labels,
|
|
@@ -47207,6 +47217,9 @@ and ensure you are accounting for this risk.
|
|
|
47207
47217
|
return;
|
|
47208
47218
|
}
|
|
47209
47219
|
const baseStyleLink = configuration.baseStyleLink;
|
|
47220
|
+
if (!baseStyleLink && !(configuration == null ? void 0 : configuration.customStyles)) {
|
|
47221
|
+
return;
|
|
47222
|
+
}
|
|
47210
47223
|
if (styleElement) {
|
|
47211
47224
|
styleElement.remove();
|
|
47212
47225
|
}
|
|
@@ -47214,7 +47227,7 @@ and ensure you are accounting for this risk.
|
|
|
47214
47227
|
if (baseStyleLink) {
|
|
47215
47228
|
styleElement.innerHTML = `
|
|
47216
47229
|
@import url('${baseStyleLink}');
|
|
47217
|
-
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css')
|
|
47230
|
+
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css');
|
|
47218
47231
|
${(_a25 = configuration.customStyles) != null ? _a25 : ""}
|
|
47219
47232
|
`;
|
|
47220
47233
|
}
|
package/dist/lupaSearch.js
CHANGED
|
@@ -20402,12 +20402,18 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
20402
20402
|
var _a25, _b25;
|
|
20403
20403
|
return `${suggestion.display}${(_a25 = suggestion.facet) == null ? void 0 : _a25.key}${(_b25 = suggestion.facet) == null ? void 0 : _b25.title}`;
|
|
20404
20404
|
};
|
|
20405
|
+
const doesSuggestionHaveFacet = (suggestion) => {
|
|
20406
|
+
return suggestion.facet !== void 0 && suggestion.facet.key !== void 0;
|
|
20407
|
+
};
|
|
20405
20408
|
watch(highlightedItem, () => {
|
|
20406
20409
|
var _a25;
|
|
20407
20410
|
if (highlightedIndex.value < 0) {
|
|
20408
20411
|
return;
|
|
20409
20412
|
}
|
|
20410
|
-
const selected = (_a25 = props.items[highlightedIndex.value]) != null ? _a25 : {
|
|
20413
|
+
const selected = (_a25 = props.items[highlightedIndex.value]) != null ? _a25 : {
|
|
20414
|
+
suggestion: { suggestion: "" },
|
|
20415
|
+
facet: void 0
|
|
20416
|
+
};
|
|
20411
20417
|
handleSelect({
|
|
20412
20418
|
suggestion: selected.suggestion,
|
|
20413
20419
|
facet: selected.facet,
|
|
@@ -20419,7 +20425,11 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
20419
20425
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
20420
20426
|
return openBlock(), createBlock(_sfc_main$1s, {
|
|
20421
20427
|
key: getSuggestionKey(item),
|
|
20422
|
-
class: normalizeClass([
|
|
20428
|
+
class: normalizeClass([
|
|
20429
|
+
"lupa-suggestion",
|
|
20430
|
+
index === highlightedIndex.value ? "lupa-suggestion-highlighted" : "",
|
|
20431
|
+
doesSuggestionHaveFacet(item) ? "lupa-faceted-suggestion" : "lupa-plain-suggestion"
|
|
20432
|
+
]),
|
|
20423
20433
|
suggestion: item,
|
|
20424
20434
|
highlight: highlight2.value,
|
|
20425
20435
|
labels: _ctx.labels,
|
|
@@ -47207,6 +47217,9 @@ const applyStyles = (configuration) => __async(null, null, function* () {
|
|
|
47207
47217
|
return;
|
|
47208
47218
|
}
|
|
47209
47219
|
const baseStyleLink = configuration.baseStyleLink;
|
|
47220
|
+
if (!baseStyleLink && !(configuration == null ? void 0 : configuration.customStyles)) {
|
|
47221
|
+
return;
|
|
47222
|
+
}
|
|
47210
47223
|
if (styleElement) {
|
|
47211
47224
|
styleElement.remove();
|
|
47212
47225
|
}
|
|
@@ -47214,7 +47227,7 @@ const applyStyles = (configuration) => __async(null, null, function* () {
|
|
|
47214
47227
|
if (baseStyleLink) {
|
|
47215
47228
|
styleElement.innerHTML = `
|
|
47216
47229
|
@import url('${baseStyleLink}');
|
|
47217
|
-
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css')
|
|
47230
|
+
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css');
|
|
47218
47231
|
${(_a25 = configuration.customStyles) != null ? _a25 : ""}
|
|
47219
47232
|
`;
|
|
47220
47233
|
}
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -20400,12 +20400,18 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
20400
20400
|
var _a25, _b25;
|
|
20401
20401
|
return `${suggestion.display}${(_a25 = suggestion.facet) == null ? void 0 : _a25.key}${(_b25 = suggestion.facet) == null ? void 0 : _b25.title}`;
|
|
20402
20402
|
};
|
|
20403
|
+
const doesSuggestionHaveFacet = (suggestion) => {
|
|
20404
|
+
return suggestion.facet !== void 0 && suggestion.facet.key !== void 0;
|
|
20405
|
+
};
|
|
20403
20406
|
watch(highlightedItem, () => {
|
|
20404
20407
|
var _a25;
|
|
20405
20408
|
if (highlightedIndex.value < 0) {
|
|
20406
20409
|
return;
|
|
20407
20410
|
}
|
|
20408
|
-
const selected = (_a25 = props.items[highlightedIndex.value]) != null ? _a25 : {
|
|
20411
|
+
const selected = (_a25 = props.items[highlightedIndex.value]) != null ? _a25 : {
|
|
20412
|
+
suggestion: { suggestion: "" },
|
|
20413
|
+
facet: void 0
|
|
20414
|
+
};
|
|
20409
20415
|
handleSelect({
|
|
20410
20416
|
suggestion: selected.suggestion,
|
|
20411
20417
|
facet: selected.facet,
|
|
@@ -20417,7 +20423,11 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
20417
20423
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
20418
20424
|
return openBlock(), createBlock(_sfc_main$1s, {
|
|
20419
20425
|
key: getSuggestionKey(item),
|
|
20420
|
-
class: normalizeClass([
|
|
20426
|
+
class: normalizeClass([
|
|
20427
|
+
"lupa-suggestion",
|
|
20428
|
+
index === highlightedIndex.value ? "lupa-suggestion-highlighted" : "",
|
|
20429
|
+
doesSuggestionHaveFacet(item) ? "lupa-faceted-suggestion" : "lupa-plain-suggestion"
|
|
20430
|
+
]),
|
|
20421
20431
|
suggestion: item,
|
|
20422
20432
|
highlight: highlight2.value,
|
|
20423
20433
|
labels: _ctx.labels,
|
|
@@ -47205,6 +47215,9 @@ const applyStyles = (configuration) => __async(null, null, function* () {
|
|
|
47205
47215
|
return;
|
|
47206
47216
|
}
|
|
47207
47217
|
const baseStyleLink = configuration.baseStyleLink;
|
|
47218
|
+
if (!baseStyleLink && !(configuration == null ? void 0 : configuration.customStyles)) {
|
|
47219
|
+
return;
|
|
47220
|
+
}
|
|
47208
47221
|
if (styleElement) {
|
|
47209
47222
|
styleElement.remove();
|
|
47210
47223
|
}
|
|
@@ -47212,7 +47225,7 @@ const applyStyles = (configuration) => __async(null, null, function* () {
|
|
|
47212
47225
|
if (baseStyleLink) {
|
|
47213
47226
|
styleElement.innerHTML = `
|
|
47214
47227
|
@import url('${baseStyleLink}');
|
|
47215
|
-
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css')
|
|
47228
|
+
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css');
|
|
47216
47229
|
${(_a25 = configuration.customStyles) != null ? _a25 : ""}
|
|
47217
47230
|
`;
|
|
47218
47231
|
}
|
package/dist/lupaSearch.umd.js
CHANGED
|
@@ -20404,12 +20404,18 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20404
20404
|
var _a25, _b25;
|
|
20405
20405
|
return `${suggestion.display}${(_a25 = suggestion.facet) == null ? void 0 : _a25.key}${(_b25 = suggestion.facet) == null ? void 0 : _b25.title}`;
|
|
20406
20406
|
};
|
|
20407
|
+
const doesSuggestionHaveFacet = (suggestion) => {
|
|
20408
|
+
return suggestion.facet !== void 0 && suggestion.facet.key !== void 0;
|
|
20409
|
+
};
|
|
20407
20410
|
watch(highlightedItem, () => {
|
|
20408
20411
|
var _a25;
|
|
20409
20412
|
if (highlightedIndex.value < 0) {
|
|
20410
20413
|
return;
|
|
20411
20414
|
}
|
|
20412
|
-
const selected = (_a25 = props.items[highlightedIndex.value]) != null ? _a25 : {
|
|
20415
|
+
const selected = (_a25 = props.items[highlightedIndex.value]) != null ? _a25 : {
|
|
20416
|
+
suggestion: { suggestion: "" },
|
|
20417
|
+
facet: void 0
|
|
20418
|
+
};
|
|
20413
20419
|
handleSelect({
|
|
20414
20420
|
suggestion: selected.suggestion,
|
|
20415
20421
|
facet: selected.facet,
|
|
@@ -20421,7 +20427,11 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20421
20427
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item, index) => {
|
|
20422
20428
|
return openBlock(), createBlock(_sfc_main$1s, {
|
|
20423
20429
|
key: getSuggestionKey(item),
|
|
20424
|
-
class: normalizeClass([
|
|
20430
|
+
class: normalizeClass([
|
|
20431
|
+
"lupa-suggestion",
|
|
20432
|
+
index === highlightedIndex.value ? "lupa-suggestion-highlighted" : "",
|
|
20433
|
+
doesSuggestionHaveFacet(item) ? "lupa-faceted-suggestion" : "lupa-plain-suggestion"
|
|
20434
|
+
]),
|
|
20425
20435
|
suggestion: item,
|
|
20426
20436
|
highlight: highlight2.value,
|
|
20427
20437
|
labels: _ctx.labels,
|
|
@@ -47209,6 +47219,9 @@ and ensure you are accounting for this risk.
|
|
|
47209
47219
|
return;
|
|
47210
47220
|
}
|
|
47211
47221
|
const baseStyleLink = configuration.baseStyleLink;
|
|
47222
|
+
if (!baseStyleLink && !(configuration == null ? void 0 : configuration.customStyles)) {
|
|
47223
|
+
return;
|
|
47224
|
+
}
|
|
47212
47225
|
if (styleElement) {
|
|
47213
47226
|
styleElement.remove();
|
|
47214
47227
|
}
|
|
@@ -47216,7 +47229,7 @@ and ensure you are accounting for this risk.
|
|
|
47216
47229
|
if (baseStyleLink) {
|
|
47217
47230
|
styleElement.innerHTML = `
|
|
47218
47231
|
@import url('${baseStyleLink}');
|
|
47219
|
-
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css')
|
|
47232
|
+
@import url('https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css');
|
|
47220
47233
|
${(_a25 = configuration.customStyles) != null ? _a25 : ""}
|
|
47221
47234
|
`;
|
|
47222
47235
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getlupa/client",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.4",
|
|
4
4
|
"main": "dist/lupaSearch.js",
|
|
5
5
|
"module": "dist/lupaSearch.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@getlupa/client-sdk": "^1.8.1",
|
|
23
|
-
"@getlupa/vue": "0.20.
|
|
23
|
+
"@getlupa/vue": "0.20.3",
|
|
24
24
|
"@rushstack/eslint-patch": "^1.12.0",
|
|
25
25
|
"@tsconfig/node18": "^18.2.4",
|
|
26
26
|
"@types/jsdom": "^21.1.7",
|