From 86519d1317ecdfb62328c2df1b3ce44a730bcd6d Mon Sep 17 00:00:00 2001 From: Simon Milord Date: Tue, 17 Sep 2024 12:26:31 -0400 Subject: [PATCH] feat(quantic)!: Change names of DOM Events used, to add the 'quantic__' prefix (#4383) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [SFINT-5351](https://coveord.atlassian.net/browse/SFINT-5351) ### IN THIS PR: Changed the prefix of custom DOM events in the quantic package to have the ‘quantic__’ prefix so that the naming convention is standard across the package. ### TESTS: image [SFINT-5351]: https://coveord.atlassian.net/browse/SFINT-5351?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- .../recommendation-list.cypress.ts | 2 +- .../folded-result-list.cypress.ts | 2 +- .../result-list/result-list.cypress.ts | 2 +- .../result-quickview.cypress.ts | 2 +- .../lwc/actionSendRating/actionSendRating.js | 2 +- .../exampleInsightPanel.html | 2 +- .../exampleQuanticFoldedResultList.html | 2 +- .../exampleQuanticFoldedResultList.js | 2 +- .../exampleQuanticRecommendationList.js | 2 +- .../exampleQuanticResultList.js | 2 +- .../exampleQuanticResultQuickview.js | 2 +- .../main/lwc/exampleSearch/exampleSearch.html | 2 +- .../quanticBreadcrumbManager.html | 8 +++---- .../quanticCardContainer.js | 6 ++++-- .../quanticCategoryFacet.html | 8 +++---- .../quanticCategoryFacet.js | 2 +- .../quanticCategoryFacetValue.js | 8 +++---- .../__tests__/quanticCitation.test.js | 4 ++-- .../lwc/quanticCitation/quanticCitation.js | 6 +++--- .../quanticDateFacet/quanticDateFacet.html | 4 ++-- .../lwc/quanticDateFacet/quanticDateFacet.js | 2 +- .../quanticDocumentSuggestion.js | 4 ++-- .../lwc/quanticFacet/quanticFacet.html | 8 +++---- .../default/lwc/quanticFacet/quanticFacet.js | 2 +- .../quanticFacetValue/quanticFacetValue.js | 8 +++---- .../__tests__/quanticFeedback.test.js | 21 +++++++++++-------- .../lwc/quanticFeedback/quanticFeedback.html | 4 ++-- .../lwc/quanticFeedback/quanticFeedback.js | 18 ++++++++-------- .../quanticFoldedResultList.js | 4 ++-- .../templates/generatedAnswer.html | 4 ++-- ...quanticGeneratedAnswerCopyToClipboard.html | 2 +- .../quanticInsightInterface.js | 11 ++++++---- .../quanticNumberButton.js | 8 ++++--- .../quanticNumericFacet.html | 4 ++-- .../quanticNumericFacet.js | 2 +- .../lwc/quanticPager/quanticPager.html | 6 +++--- .../default/lwc/quanticPill/quanticPill.js | 6 +++--- .../__tests__/quanticQuickviewContent.test.js | 2 +- .../quanticQuickviewContent.js | 2 +- .../quanticRadioButtonsGroup.test.js | 4 ++-- .../quanticRadioButtonsGroup.js | 4 ++-- .../quanticRecentQueriesList.html | 2 +- .../quanticRecentResultsList.html | 2 +- .../quanticRecommendationInterface.js | 11 ++++++---- .../quanticRecommendationList.js | 4 ++-- .../quanticRefineModalContent.js | 7 +++++-- .../quanticRefineToggle.js | 7 +++++-- .../lwc/quanticResult/quanticResult.js | 4 ++-- .../quanticResultList/quanticResultList.js | 4 ++-- .../quanticResultQuickview.js | 11 ++++++---- .../quanticResultsPerPage.html | 2 +- .../quanticSearchBoxInput.js | 4 ++-- .../templates/defaultSearchBoxInput.html | 2 +- .../templates/expandableSearchBoxInput.html | 2 +- .../quanticSearchBoxSuggestionsList.js | 20 ++++++++++-------- .../quanticSearchInterface.js | 11 ++++++---- .../quanticSmartSnippet.html | 4 ++-- .../quanticSourceCitations.html | 2 +- .../__tests__/quanticStatefulButton.test.js | 10 +++++++-- .../quanticStatefulButton.js | 4 ++-- .../main/default/lwc/quanticTab/quanticTab.js | 4 +++- .../lwc/quanticTabBar/quanticTabBar.js | 2 +- .../quanticTimeframeFacet.html | 6 +++--- .../quanticTimeframeFacet.js | 4 ++-- .../default/lwc/quanticUtils/quanticUtils.js | 4 ++-- 65 files changed, 182 insertions(+), 147 deletions(-) diff --git a/packages/quantic/cypress/e2e/default-2/recommendation-list/recommendation-list.cypress.ts b/packages/quantic/cypress/e2e/default-2/recommendation-list/recommendation-list.cypress.ts index 71e0cf215d9..a4c933f7f89 100644 --- a/packages/quantic/cypress/e2e/default-2/recommendation-list/recommendation-list.cypress.ts +++ b/packages/quantic/cypress/e2e/default-2/recommendation-list/recommendation-list.cypress.ts @@ -35,7 +35,7 @@ describe('quantic-recommendation-list', () => { const defaultHeadingLevel = 1; const registerRecommendationTemplatesEvent = - 'registerrecommendationtemplates'; + 'quantic__registerrecommendationtemplates'; const recommendationsAlias = '@recommendations'; diff --git a/packages/quantic/cypress/e2e/default-2/result-list/folded-result-list/folded-result-list.cypress.ts b/packages/quantic/cypress/e2e/default-2/result-list/folded-result-list/folded-result-list.cypress.ts index 4843ada2d75..a0bba4476c6 100644 --- a/packages/quantic/cypress/e2e/default-2/result-list/folded-result-list/folded-result-list.cypress.ts +++ b/packages/quantic/cypress/e2e/default-2/result-list/folded-result-list/folded-result-list.cypress.ts @@ -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 = {}, diff --git a/packages/quantic/cypress/e2e/default-2/result-list/result-list.cypress.ts b/packages/quantic/cypress/e2e/default-2/result-list/result-list.cypress.ts index 7608be658c9..c8f4b7473f6 100644 --- a/packages/quantic/cypress/e2e/default-2/result-list/result-list.cypress.ts +++ b/packages/quantic/cypress/e2e/default-2/result-list/result-list.cypress.ts @@ -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'; diff --git a/packages/quantic/cypress/e2e/default-2/result-quickview/result-quickview.cypress.ts b/packages/quantic/cypress/e2e/default-2/result-quickview/result-quickview.cypress.ts index 1c3d8695a41..d63bc5c088f 100644 --- a/packages/quantic/cypress/e2e/default-2/result-quickview/result-quickview.cypress.ts +++ b/packages/quantic/cypress/e2e/default-2/result-quickview/result-quickview.cypress.ts @@ -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 = {}) { diff --git a/packages/quantic/force-app/examples/main/lwc/actionSendRating/actionSendRating.js b/packages/quantic/force-app/examples/main/lwc/actionSendRating/actionSendRating.js index 5679a2c4dd9..c640269c4e4 100644 --- a/packages/quantic/force-app/examples/main/lwc/actionSendRating/actionSendRating.js +++ b/packages/quantic/force-app/examples/main/lwc/actionSendRating/actionSendRating.js @@ -9,7 +9,7 @@ export default class ActionSendRating extends LightningElement { }, 0); } handleSendRating() { - const customEvent = new CustomEvent('rating', { + const customEvent = new CustomEvent('quantic__rating', { detail: { id: this._id, score: 1, diff --git a/packages/quantic/force-app/examples/main/lwc/exampleInsightPanel/exampleInsightPanel.html b/packages/quantic/force-app/examples/main/lwc/exampleInsightPanel/exampleInsightPanel.html index 1cb8f9488ba..a5d0d45eba2 100644 --- a/packages/quantic/force-app/examples/main/lwc/exampleInsightPanel/exampleInsightPanel.html +++ b/packages/quantic/force-app/examples/main/lwc/exampleInsightPanel/exampleInsightPanel.html @@ -1,5 +1,5 @@