Skip to content

Commit

Permalink
added changes to the html listeners on something....
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonMilord committed Sep 12, 2024
1 parent 90b5ccb commit 2072e62
Show file tree
Hide file tree
Showing 34 changed files with 56 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('quantic-recommendation-list', () => {
const defaultHeadingLevel = 1;

const registerRecommendationTemplatesEvent =
'registerrecommendationtemplates';
'quantic__registerrecommendationtemplates';

const recommendationsAlias = '@recommendations';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('quantic-folded-result-list', () => {
const defaultParentField = 'foldingchild';
const defaultChildField = 'foldingparent';
const defaultNumberOfFoldedResults = 2;
const registerResultTemplatesEvent = 'registerresulttemplates';
const registerResultTemplatesEvent = 'quantic__registerresulttemplates';

function visitFoldedResultList(
options: Partial<FoldedResultListOptions> = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('quantic-resultlist', () => {

const defaultFieldsToInclude =
'date,author,source,language,filetype,parents,sfknowledgearticleid';
const registerResultTemplatesEvent = 'registerresulttemplates';
const registerResultTemplatesEvent = 'quantic__registerresulttemplates';

const indexResultsAlias = '@indexResults';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface ResultQuickviewOptions {
describe('quantic-result-quickview', () => {
const pageUrl = 's/quantic-result-quickview';

const haspreview = 'haspreview';
const haspreview = 'quantic__haspreview';
const resultActionRegister = 'quantic__resultactionregister';

function visitResultQuickview(options: Partial<ResultQuickviewOptions> = {}) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div onregisterresulttemplates={handleResultTemplateRegistration}>
<div onquantic__registerresulttemplates={handleResultTemplateRegistration}>
<c-quantic-insight-interface engine-id={engineId} insight-id={insightId}>
<c-quantic-aria-live></c-quantic-aria-live>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use-case={config.useCase}
engine-id={engineId}
>
<div onregisterresulttemplates={handleResultTemplateRegistration}>
<div onquantic__registerresulttemplates={handleResultTemplateRegistration}>
<div>
<c-quantic-tab
label="Thread"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class ExampleQuanticFoldedResultList extends LightningElement {
defaultValue: 'search',
},
];
expectedEvents = ['registerresulttemplates'];
expectedEvents = ['quantic__registerresulttemplates'];

handleResultTemplateRegistration(event) {
const resultTemplatesManager = event.detail;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class ExampleQuanticRecommendationtList extends LightningElement
defaultValue: 'grid',
},
];
expectedEvents = ['registerrecommendationtemplates'];
expectedEvents = ['quantic__registerrecommendationtemplates'];

handleTryItNow(evt) {
this.config = evt.detail;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class ExampleQuanticResultList extends LightningElement {
defaultValue: 'search',
},
];
expectedEvents = ['registerresulttemplates'];
expectedEvents = ['quantic__registerresulttemplates'];

handleTryItNow(evt) {
this.config = evt.detail;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div
class="search__container slds-p-around_medium"
onregisterresulttemplates={handleResultTemplateRegistration}
onquantic__registerresulttemplates={handleResultTemplateRegistration}
>
<c-quantic-search-interface
engine-id={engineId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ul class="slds-col slds-truncate slds-list_horizontal slds-grid slds-wrap">
<template for:each={breadcrumb.values} for:item="breadcrumbValue">
<li key={breadcrumbValue.value.value} class="breadcrumb__container">
<c-quantic-pill label={breadcrumbValue.formattedValue} ondeselect={breadcrumbValue.deselect} group-name={breadcrumb.label} action-name={labels.clearFilter}></c-quantic-pill>
<c-quantic-pill label={breadcrumbValue.formattedValue} onquantic__deselect={breadcrumbValue.deselect} group-name={breadcrumb.label} action-name={labels.clearFilter}></c-quantic-pill>
</li>
</template>
<template if:true={breadcrumb.showMoreButton}>
Expand All @@ -31,7 +31,7 @@
<ul class="slds-col slds-truncate slds-list_horizontal slds-grid slds-wrap">
<template for:each={breadcrumb.values} for:item="breadcrumbValue">
<li key={breadcrumbValue.value} class="breadcrumb__container">
<c-quantic-pill label={breadcrumbValue.formattedValue} ondeselect={breadcrumbValue.deselect} group-name={breadcrumb.label} action-name={labels.clearFilter}></c-quantic-pill>
<c-quantic-pill label={breadcrumbValue.formattedValue} onquantic__deselect={breadcrumbValue.deselect} group-name={breadcrumb.label} action-name={labels.clearFilter}></c-quantic-pill>
</li>
</template>
<template if:true={breadcrumb.showMoreButton}>
Expand All @@ -47,7 +47,7 @@
<span class="slds-col breadcrumb-manager__field-name">{breadcrumbValue.label}{labels.colon} </span>
<ul class="slds-col slds-truncate slds-list_horizontal slds-grid slds-wrap">
<li class="breadcrumb__container">
<c-quantic-pill label={breadcrumbValue.value} ondeselect={breadcrumbValue.deselect} group-name={breadcrumbValue.label} action-name={labels.clearFilter}></c-quantic-pill>
<c-quantic-pill label={breadcrumbValue.value} onquantic__deselect={breadcrumbValue.deselect} group-name={breadcrumbValue.label} action-name={labels.clearFilter}></c-quantic-pill>
</li>
</ul>
</li>
Expand All @@ -58,7 +58,7 @@
<ul class="slds-col slds-truncate slds-list_horizontal slds-grid slds-wrap">
<template for:each={breadcrumb.values} for:item="breadcrumbValue">
<li key={breadcrumbValue.value} class="breadcrumb__container">
<c-quantic-pill label={breadcrumbValue.value} ondeselect={breadcrumbValue.deselect} group-name={breadcrumb.label} action-name={labels.clearFilter}></c-quantic-pill>
<c-quantic-pill label={breadcrumbValue.value} onquantic__deselect={breadcrumbValue.deselect} group-name={breadcrumb.label} action-name={labels.clearFilter}></c-quantic-pill>
</li>
</template>
<template if:true={breadcrumb.showMoreButton}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>
<template if:true={hasParentsOrValues}>
<div class="slds-size_1-of-1 slds-var-m-bottom_large">
<c-quantic-card-container title={label} onheaderclick={toggleFacetVisibility} onheaderkeydown={toggleFacetVisibility}>
<c-quantic-card-container title={label} onquantic__headerclick={toggleFacetVisibility} onquantic__headerkeydown={toggleFacetVisibility}>
<lightning-button-icon
class={actionButtonCssClasses}
slot="actions"
Expand Down Expand Up @@ -53,7 +53,7 @@
<template for:each={nonActiveParents} for:item="v">
<li class="slds-grid facet__non-active-parent" key={v.value}>
<c-quantic-category-facet-value
onselectvalue={onSelectValue}
onquantic__selectvalue={onSelectValue}
item={v}
non-active-parent="true"
formatting-function={remoteGetValueCaption}
Expand Down Expand Up @@ -83,7 +83,7 @@
item={v}
active-parent={activeParent}
formatting-function={remoteGetValueCaption}
onselectvalue={onSelectValue}>
onquantic__selectvalue={onSelectValue}>
</c-quantic-category-facet-value>
</li>
</template>
Expand All @@ -99,7 +99,7 @@
item={result}
is-search-result="true"
formatting-function={remoteGetValueCaption}
onselectvalue={onSelectValue}>
onquantic__selectvalue={onSelectValue}>
</c-quantic-category-facet-value>
</template>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {api, LightningElement} from 'lwc';
* @category Search
* @category Insight Panel
* @example
* <c-quantic-category-facet-value onselectvalue={onSelect} item={result} is-search-result active-parent></c-quantic-category-facet-value>
* <c-quantic-category-facet-value onquantic__selectvalue={onSelect} item={result} is-search-result active-parent></c-quantic-category-facet-value>
*/
export default class QuanticCategoryFacetValue extends LightningElement {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>
<template if:true={hasValues}>
<div class="slds-size_1-of-1">
<c-quantic-card-container title={label} onheaderclick={toggleFacetVisibility} onheaderkeydown={toggleFacetVisibility}>
<c-quantic-card-container title={label} onquantic__headerclick={toggleFacetVisibility} onquantic__headerkeydown={toggleFacetVisibility}>
<lightning-button-icon
class="actionButtonCssClasses"
slot="actions"
Expand Down Expand Up @@ -44,7 +44,7 @@
<template for:each={values} for:item="v">
<li class="slds-grid" key={v.value}>
<c-quantic-facet-value
onselectvalue={onSelectValue}
onquantic__selectvalue={onSelectValue}
key={v.start}
item={v}
is-checked={v.checked}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<div class="slds-size_1-of-1 slds-var-m-bottom_large">
<c-quantic-card-container
title={label}
onheaderclick={toggleFacetVisibility}
onheaderkeydown={toggleFacetVisibility}
onquantic__headerclick={toggleFacetVisibility}
onquantic__headerkeydown={toggleFacetVisibility}
>
<lightning-button-icon
class={actionButtonCssClasses}
Expand Down Expand Up @@ -68,7 +68,7 @@
<template for:each={values} for:item="v">
<li class="slds-grid" key={v.value}>
<c-quantic-facet-value
onselectvalue={onSelectValue}
onquantic__selectvalue={onSelectValue}
item={v}
key={v.value}
is-checked={v.checked}
Expand Down Expand Up @@ -117,7 +117,7 @@
<template if:true={hasSearchResults}>
<template for:each={facetSearchResults} for:item="result">
<c-quantic-facet-value
onselectvalue={onSelectValue}
onquantic__selectvalue={onSelectValue}
key={result.value}
item={result}
is-checked={result.checked}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {LightningElement, api} from 'lwc';
* @category Search
* @category Insight Panel
* @example
* <c-quantic-facet-value onselectvalue={onSelect} item={result} is-checked={result.checked} display-as-link={displayAsLink} formatting-function={formattingFunction}></c-quantic-facet-value>
* <c-quantic-facet-value onquantic__selectvalue={onSelect} item={result} is-checked={result.checked} display-as-link={displayAsLink} formatting-function={formattingFunction}></c-quantic-facet-value>
*/
export default class QuanticFacetValue extends LightningElement {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe('c-quantic-feedback', () => {
});

describe('when the like button is clicked', () => {
it('should dispatch the "like" event', async () => {
it('should dispatch the quantic__like" event', async () => {
const element = createTestComponent();
setupEventListeners(element);
await flushPromises();
Expand All @@ -159,7 +159,7 @@ describe('c-quantic-feedback', () => {
});

describe('when the dislike button is clicked', () => {
it('should dispatch the "dislike" event', async () => {
it('should dispatch the "quantic__dislike" event', async () => {
const element = createTestComponent();
setupEventListeners(element);
await flushPromises();
Expand Down Expand Up @@ -270,7 +270,7 @@ describe('c-quantic-feedback', () => {
});

describe('when the explain why button is clicked', () => {
it('should dispatch the "pressexplainwhy" event', async () => {
it('should dispatch the "quantic__pressexplainwhy" event', async () => {
const element = createTestComponent({
...defaultOptions,
state: 'liked',
Expand Down Expand Up @@ -349,7 +349,7 @@ describe('c-quantic-feedback', () => {
});

describe('when the explain why button is clicked', () => {
it('should dispatch the "pressexplainwhy" event', async () => {
it('should dispatch the "quantic__pressexplainwhy" event', async () => {
const element = createTestComponent({
...defaultOptions,
state: 'disliked',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<span class="slds-var-p-right_small slds-text-color_weak feedback__question"
id="feedback__question">{question}</span>
<c-quantic-stateful-button selected={liked} data-cy="feedback__like-button" tooltip={likeLabel}
icon-name={likeIconName} onselect={handleLike} ondeselect={handleLike} without-borders selected-state-color="#2e844a"
icon-name={likeIconName} onquantic__select={handleLike} onquantic__deselect={handleLike} without-borders selected-state-color="#2e844a"
label={likeButtonLabel} icon-size={size}></c-quantic-stateful-button>
<c-quantic-stateful-button selected={disliked} data-cy="feedback__dislike-button" tooltip={dislikeLabel}
icon-name={dislikeIconName} onselect={handleDislike} ondeselect={handleDislike} without-borders selected-state-color="#ea001e"
icon-name={dislikeIconName} onquantic__select={handleDislike} onquantic__deselect={handleDislike} without-borders selected-state-color="#ea001e"
label={dislikeButtonLabel} icon-size={size}></c-quantic-stateful-button>
</div>
<template if:true={displaySuccessMessage}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div class="slds-grid flex-one slds-grid_align-end">
<c-quantic-feedback
state={feedbackState}
onlike={handleLike}
ondislike={handleDislike}
onquantic__like={handleLike}
onquantic__dislike={handleDislike}
like-icon-name="utility:like"
like-label={labels.thisAnswerWasHelpful}
dislike-icon-name="utility:dislike"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
selected={isSelected}
tooltip={tooltip}
icon-name="utility:copy"
onselect={handleCopyToClipboard}
onquantic__select={handleCopyToClipboard}
without-borders
selected-state-color="#2e844a"
icon-size="xx-small"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
legend={labels.rephrase}
hide-labels={hideLabels}
options={rephraseOptions}
onchange={handleRephraseChange}
onquantic__change={handleRephraseChange}
value={value}
></c-quantic-radio-buttons-group>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {LightningElement, api} from 'lwc';
* @fires CustomEvent#quantic__select
* @category Utility
* @example
* <c-quantic-number-button number="1" selected onselect={select}></c-quantic-number-button>
* <c-quantic-number-button number="1" selected onquantic__select={select}></c-quantic-number-button>
*/
export default class QuanticNumberButton extends LightningElement {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>
<template if:true={shouldRenderFacet}>
<div data-cy="numeric-facet__card" class="slds-size_1-of-1 slds-var-m-bottom_large">
<c-quantic-card-container title={label} onheaderclick={toggleFacetVisibility} onheaderkeydown={toggleFacetVisibility}>
<c-quantic-card-container title={label} onquantic__headerclick={toggleFacetVisibility} onquantic__headerkeydown={toggleFacetVisibility}>
<lightning-button-icon
class={actionButtonCssClasses}
slot="actions"
Expand Down Expand Up @@ -94,7 +94,7 @@
<template for:each={values} for:item="v">
<li class="slds-grid" key={v.key}>
<c-quantic-facet-value
onselectvalue={onSelectValue}
onquantic__selectvalue={onSelectValue}
item={v}
is-checked={v.checked}
formatting-function={formattingFunction}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
onclick={previous}
aria-label={labels.previousPage}
></lightning-button>

<template for:each={currentPagesObjects} for:item="page">
<c-quantic-number-button key={page.number} number={page.number} selected={page.selected} onselect={goto} aria-label-value={page.ariaLabelValue}></c-quantic-number-button>
<c-quantic-number-button key={page.number} number={page.number} selected={page.selected} onquantic__select={goto} aria-label-value={page.ariaLabelValue}></c-quantic-number-button>
</template>

<lightning-button
disabled={nextDisabled}
variant="base"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {LightningElement, api} from 'lwc';
* @fires CustomEvent#quantic__deselect
* @category Utility
* @example
* <c-quantic-pill label="Case" alt-text="Remove Case filter" ondeselect={myDeselectFunction}></c-quantic-pill>
* <c-quantic-pill label="Case" alt-text="Remove Case filter" onquantic__deselect={myDeselectFunction}></c-quantic-pill>
*/
export default class QuanticPill extends LightningElement {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>
<template if:false={showPlaceholder}>
<template lwc:if={shouldDisplayRecentQueriesCard}>
<c-quantic-card-container data-cy="recent-queries-card" title={label} onheaderclick={toggleVisibility} onheaderkeydown={toggleVisibility}>
<c-quantic-card-container data-cy="recent-queries-card" title={label} onquantic__headerclick={toggleVisibility} onquantic__headerkeydown={toggleVisibility}>
<lightning-button-icon class="slds-p-bottom_small" slot="actions" icon-name={actionButtonIcon}
alternative-text={actionButtonLabel} variant="bare" tabindex="-1" aria-hidden="true">
</lightning-button-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>
<template if:false={showPlaceholder}>
<template lwc:if={shouldDisplayRecentResultsCard}>
<c-quantic-card-container data-cy="recent-results-card" title={label} onheaderclick={toggleVisibility} onheaderkeydown={toggleVisibility}>
<c-quantic-card-container data-cy="recent-results-card" title={label} onquantic__headerclick={toggleVisibility} onquantic__headerkeydown={toggleVisibility}>
<lightning-button-icon class="slds-p-bottom_small" slot="actions" icon-name={actionButtonIcon}
alternative-text={actionButtonLabel} variant="bare" tabindex="-1" aria-hidden="true">
</lightning-button-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class QuanticResult extends LightningElement {
quickviewIsOpen = false;

connectedCallback() {
this.template.addEventListener('haspreview', this.onHasPreview);
this.template.addEventListener('quantic__haspreview', this.onHasPreview);
this.template.host.addEventListener('mouseenter', this.setHoverState);
this.template.host.addEventListener('mouseleave', this.removeHoverState);
this.template.addEventListener(
Expand All @@ -75,7 +75,7 @@ export default class QuanticResult extends LightningElement {
}

disconnectedCallback() {
this.template.removeEventListener('haspreview', this.onHasPreview);
this.template.removeEventListener('quantic__haspreview', this.onHasPreview);
this.template.host.removeEventListener('mouseenter', this.setHoverState);
this.template.host.removeEventListener('mouseleave', this.removeHoverState);
this.template.removeEventListener(
Expand Down
Loading

0 comments on commit 2072e62

Please sign in to comment.