@salesforcedevs/dx-components 1.3.37-alpha05 → 1.3.37-alpha09
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/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LightningElement, api, track } from "lwc";
|
|
1
|
+
import { createElement, LightningElement, api, track } from "lwc";
|
|
2
2
|
import type * as CoveoSDK from "coveo-search-ui";
|
|
3
3
|
|
|
4
4
|
interface CoveoSearch {
|
|
@@ -176,7 +176,8 @@ export default class SearchResults extends LightningElement {
|
|
|
176
176
|
|
|
177
177
|
Coveo.TemplateHelpers.registerTemplateHelper(
|
|
178
178
|
"badge",
|
|
179
|
-
(value: string) =>
|
|
179
|
+
(value: string) =>
|
|
180
|
+
`<dx-type-badge variant="${value}"></dx-type-badge>`
|
|
180
181
|
);
|
|
181
182
|
|
|
182
183
|
Coveo.init(this.root);
|
|
@@ -186,15 +187,18 @@ export default class SearchResults extends LightningElement {
|
|
|
186
187
|
this.template.querySelectorAll(".type-badge-shell")?.forEach((el) => {
|
|
187
188
|
el.classList.remove("type-badge-shell");
|
|
188
189
|
el.classList.forEach((cl) => {
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
const component = createElement("dx-type-badge", {
|
|
191
|
+
is: LightningElement
|
|
192
|
+
});
|
|
193
|
+
Object.assign(component, { variant: cl });
|
|
194
|
+
document.body.appendChild(component as unknown as Node);
|
|
195
|
+
el.appendChild(component);
|
|
192
196
|
});
|
|
193
197
|
});
|
|
194
198
|
};
|
|
195
199
|
|
|
196
200
|
connectedCallback(): void {
|
|
197
|
-
setInterval(this.appendTypeBadges,
|
|
201
|
+
setInterval(this.appendTypeBadges, 50);
|
|
198
202
|
}
|
|
199
203
|
|
|
200
204
|
renderedCallback() {
|