Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@coveops/case-context-trigger
Advanced tools
The CaseContextTrigger component renders **ONLY** if a Trigger Rule has been added into the corresponding query pipeline. The Trigger Rule must be an ``Execute`` Rule that will call the following JavaScript Function:
The CaseContextTrigger component renders ONLY if a Trigger Rule has been added into the corresponding query pipeline.
The Trigger Rule must be an Execute
Rule that will call the following JavaScript Function:
CaseContextTrigger(notification_msg, case_number, case_subject)
Note: This Trigger Rule should ALWAYS be associated to a condition related to the current Context and you also do not want to see that notification if the query is not empty.
This component will allow you to execute CaseContextTrigger
JavasScript Function from a Trigger Rule in your pipeline.
When the Trigger Rule is being executed, depending on its current mode (Large or Small), this component renders a Banner (Large mode)
or a Badge (Small mode) based on the infos passed to the JavaScript Function in order to notify the user that current query is using a certain context.
When caseNumber
and/or caseSubject
options are undefined, parameters case_number
and case_subject
that are passed
to the CaseContextTrigger
Function will be considered as Key value of the current Context Object which mean the Subject that will be
displayed in the Banner will be the result of Context[case_subject].
CaseContextTrigger (Large Mode) |
---|
CaseContextTrigger (Small Mode) |
---|
npm i @coveops/case-context-trigger
Typescript:
import { CaseContextTrigger, ICaseContextTriggerOptions } from '@coveops/case-context-trigger';
Javascript
const CaseContextTrigger = require('@coveops/case-context-trigger').CaseContextTrigger;
export * from '@coveops/case-context-trigger'
Add the following markup to your template:
<div class="CoveoCaseContextTrigger"></div>
The following options can be configured:
Option | Required | Type | Default | Notes |
---|---|---|---|---|
notificationMsg | No | localized string | CaseContextTrigger_NotificationMsg | Specifies the notification message of the Case Context Banner. |
enableNotificationMsg | No | boolean | true | Specifies whether to display the notification message in the Case Context Banner when large mode is activated. |
caseNumber | No | string | | Specifies the case Number that will be displayed in the Case Context Banner. |
caseSubject | No | string | | Specifies the case Subject / title that will be displayed in the Case Context Banner. |
enableResponsiveMode | No | boolean | true | Specifies whether to enable responsive mode for CaseContextTrigger |
Extending the component can be done as follows:
import { CaseContextTrigger, ICaseContextTriggerOptions } from "@coveops/case-context-trigger";
export interface IExtendedCaseContextTriggerOptions extends ICaseContextTriggerOptions {}
export class ExtendedCaseContextTrigger extends CaseContextTrigger {}
.env.dist
to .env
and update the COVEO_ORG_ID and COVEO_TOKEN fields in the .env
file to use your Coveo credentials and SERVER_PORT to configure the port of the sandbox - it will use 8080 by default.npm run build
npm run serve
FAQs
The CaseContextTrigger component renders **ONLY** if a Trigger Rule has been added into the corresponding query pipeline. The Trigger Rule must be an ``Execute`` Rule that will call the following JavaScript Function:
The npm package @coveops/case-context-trigger receives a total of 1 weekly downloads. As such, @coveops/case-context-trigger popularity was classified as not popular.
We found that @coveops/case-context-trigger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.