Skip to content

Commit

Permalink
Merge branch 'master' into KIT-3576
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprudhomme authored Sep 23, 2024
2 parents ad5eef4 + d0aa1fc commit 7f43b21
Show file tree
Hide file tree
Showing 105 changed files with 1,461 additions and 342 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ AtomicFormatUnit,
AtomicGeneratedAnswer,
AtomicHtml,
AtomicIcon,
AtomicInsightUserActionsTimeline,
AtomicLayoutSection,
AtomicLoadMoreResults,
AtomicNoResults,
Expand Down Expand Up @@ -195,7 +194,6 @@ AtomicFormatUnit,
AtomicGeneratedAnswer,
AtomicHtml,
AtomicIcon,
AtomicInsightUserActionsTimeline,
AtomicLayoutSection,
AtomicLoadMoreResults,
AtomicNoResults,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -984,14 +984,14 @@ export declare interface AtomicFormatUnit extends Components.AtomicFormatUnit {}


@ProxyCmp({
inputs: ['collapsible', 'withToggle']
inputs: ['collapsible', 'tabsExcluded', 'tabsIncluded', 'withToggle']
})
@Component({
selector: 'atomic-generated-answer',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['collapsible', 'withToggle'],
inputs: ['collapsible', 'tabsExcluded', 'tabsIncluded', 'withToggle'],
})
export class AtomicGeneratedAnswer {
protected el: HTMLElement;
Expand Down Expand Up @@ -1049,28 +1049,6 @@ export class AtomicIcon {
export declare interface AtomicIcon extends Components.AtomicIcon {}


@ProxyCmp({
inputs: ['ticketCreationDateTime', 'userId']
})
@Component({
selector: 'atomic-insight-user-actions-timeline',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['ticketCreationDateTime', 'userId'],
})
export class AtomicInsightUserActionsTimeline {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
}
}


export declare interface AtomicInsightUserActionsTimeline extends Components.AtomicInsightUserActionsTimeline {}


@ProxyCmp({
inputs: ['maxWidth', 'minWidth', 'section']
})
Expand Down
10 changes: 7 additions & 3 deletions packages/atomic-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,11 @@ import {
AtomicResultLink,
AtomicSearchInterface,
AtomicResultList,
} from '@coveo/atomic-react';
import {
buildSearchEngine,
getSampleSearchEngineConfiguration,
} from '@coveo/atomic-react';
} from '@coveo/headless';
import {useMemo} from 'react';

const MyStyledResultLink: React.FC<
Expand Down Expand Up @@ -242,12 +244,14 @@ The following is an example that makes the text of an `AtomicResultBadge` pink:

```tsx
import {
buildSearchEngine,
getSampleSearchEngineConfiguration,
AtomicSearchInterface,
AtomicResultList,
AtomicResultBadge,
} from '@coveo/atomic-react';
import {
buildSearchEngine,
getSampleSearchEngineConfiguration,
} from '@coveo/headless';
import {useMemo} from 'react';

const myStyles = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const AtomicCommerceSortDropdown = /*@__PURE__*/createReactComponent<JSX.
export const AtomicCommerceText = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceText, HTMLAtomicCommerceTextElement>('atomic-commerce-text');
export const AtomicCommerceTimeframeFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceTimeframeFacet, HTMLAtomicCommerceTimeframeFacetElement>('atomic-commerce-timeframe-facet');
export const AtomicIcon = /*@__PURE__*/createReactComponent<JSX.AtomicIcon, HTMLAtomicIconElement>('atomic-icon');
export const AtomicInsightUserActionsTimeline = /*@__PURE__*/createReactComponent<JSX.AtomicInsightUserActionsTimeline, HTMLAtomicInsightUserActionsTimelineElement>('atomic-insight-user-actions-timeline');
export const AtomicLayoutSection = /*@__PURE__*/createReactComponent<JSX.AtomicLayoutSection, HTMLAtomicLayoutSectionElement>('atomic-layout-section');
export const AtomicNumericRange = /*@__PURE__*/createReactComponent<JSX.AtomicNumericRange, HTMLAtomicNumericRangeElement>('atomic-numeric-range');
export const AtomicProduct = /*@__PURE__*/createReactComponent<JSX.AtomicProduct, HTMLAtomicProductElement>('atomic-product');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const AtomicFormatUnit = /*@__PURE__*/createReactComponent<JSX.AtomicForm
export const AtomicGeneratedAnswer = /*@__PURE__*/createReactComponent<JSX.AtomicGeneratedAnswer, HTMLAtomicGeneratedAnswerElement>('atomic-generated-answer');
export const AtomicHtml = /*@__PURE__*/createReactComponent<JSX.AtomicHtml, HTMLAtomicHtmlElement>('atomic-html');
export const AtomicIcon = /*@__PURE__*/createReactComponent<JSX.AtomicIcon, HTMLAtomicIconElement>('atomic-icon');
export const AtomicInsightUserActionsTimeline = /*@__PURE__*/createReactComponent<JSX.AtomicInsightUserActionsTimeline, HTMLAtomicInsightUserActionsTimelineElement>('atomic-insight-user-actions-timeline');
export const AtomicLayoutSection = /*@__PURE__*/createReactComponent<JSX.AtomicLayoutSection, HTMLAtomicLayoutSectionElement>('atomic-layout-section');
export const AtomicLoadMoreResults = /*@__PURE__*/createReactComponent<JSX.AtomicLoadMoreResults, HTMLAtomicLoadMoreResultsElement>('atomic-load-more-results');
export const AtomicNoResults = /*@__PURE__*/createReactComponent<JSX.AtomicNoResults, HTMLAtomicNoResultsElement>('atomic-no-results');
Expand Down
94 changes: 80 additions & 14 deletions packages/atomic/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,14 @@ export namespace Components {
* @default false
*/
"collapsible"?: boolean;
/**
* The tabs on which this generated answer must not be displayed. This property should not be used at the same time as `tabs-included`. Set this property as a stringified JSON array, e.g., ```html <atomic-generated-answer tabs-excluded='["tabIDA", "tabIDB"]'></atomic-generated-answer> ``` If you don't set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer won't be displayed on any of the specified tabs.
*/
"tabsExcluded": string[] | string;
/**
* The tabs on which the generated answer can be displayed. This property should not be used at the same time as `tabs-excluded`. Set this property as a stringified JSON array, e.g., ```html <atomic-generated-answer tabs-included='["tabIDA", "tabIDB"]'></atomic-generated-answer> ``` If you don't set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer can only be displayed on the specified tabs.
*/
"tabsIncluded": string[] | string;
/**
* Whether to render a toggle button that lets the user hide or show the answer.
* @default false
Expand Down Expand Up @@ -1573,6 +1581,18 @@ export namespace Components {
*/
"withDatePicker": boolean;
}
interface AtomicInsightUserActionsModal {
"isOpen": boolean;
"openButton"?: HTMLElement;
/**
* The date and time when the case was created. For example "2024-01-01T00:00:00Z"
*/
"ticketCreationDateTime": string;
/**
* The ID of the user whose actions are being displayed.
*/
"userId": string;
}
/**
* @category Insight Panel
* @example <atomic-insight-user-actions-session userActions={actions} startTimestamp={1723035731}></atomic-insight-user-actions-session>
Expand All @@ -1588,9 +1608,6 @@ export namespace Components {
"userActions": Array<IUserAction>;
}
/**
* This component displays all the actions performed by a user around the time they created a case.
* The actions are grouped into multiple sessions, including the session during which the case was created,
* the sessions preceding the case creation and the sessions following the case creation.
* @component
* @example <AtomicInsightUserActionsTimeline userId={'123'} caseCreationDate={'2024-08-15T10:00:00Z'} />
*/
Expand All @@ -1604,6 +1621,16 @@ export namespace Components {
*/
"userId": string;
}
interface AtomicInsightUserActionsToggle {
/**
* The date and time when the case was created. For example "2024-01-01T00:00:00Z"
*/
"ticketCreationDateTime": string;
/**
* The ID of the user whose actions are being displayed.
*/
"userId": string;
}
interface AtomicIpxBody {
"displayFooterSlot": boolean;
"isOpen"?: boolean;
Expand Down Expand Up @@ -2044,7 +2071,7 @@ export namespace Components {
*/
interface AtomicProductLink {
/**
* The [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals) from which to generate the `href` attribute value The template literal can reference any number of product properties from the parent product. It can also reference the window object. For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the product's `clickUri` and `itemtitle` fields. ```html <atomic-product-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-product-link> ```
* The [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals) from which to generate the `href` attribute value The template literal can reference any number of product properties from the parent product. It can also reference the window object. For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the product's `clickUri` and `itemtitle` fields. ```html <atomic-product-link href-template='${clickUri}?id=${permanentId}'></atomic-product-link> ```
*/
"hrefTemplate"?: string;
}
Expand Down Expand Up @@ -4482,6 +4509,12 @@ declare global {
prototype: HTMLAtomicInsightTimeframeFacetElement;
new (): HTMLAtomicInsightTimeframeFacetElement;
};
interface HTMLAtomicInsightUserActionsModalElement extends Components.AtomicInsightUserActionsModal, HTMLStencilElement {
}
var HTMLAtomicInsightUserActionsModalElement: {
prototype: HTMLAtomicInsightUserActionsModalElement;
new (): HTMLAtomicInsightUserActionsModalElement;
};
/**
* @category Insight Panel
* @example <atomic-insight-user-actions-session userActions={actions} startTimestamp={1723035731}></atomic-insight-user-actions-session>
Expand All @@ -4493,9 +4526,6 @@ declare global {
new (): HTMLAtomicInsightUserActionsSessionElement;
};
/**
* This component displays all the actions performed by a user around the time they created a case.
* The actions are grouped into multiple sessions, including the session during which the case was created,
* the sessions preceding the case creation and the sessions following the case creation.
* @component
* @example <AtomicInsightUserActionsTimeline userId={'123'} caseCreationDate={'2024-08-15T10:00:00Z'} />
*/
Expand All @@ -4505,6 +4535,12 @@ declare global {
prototype: HTMLAtomicInsightUserActionsTimelineElement;
new (): HTMLAtomicInsightUserActionsTimelineElement;
};
interface HTMLAtomicInsightUserActionsToggleElement extends Components.AtomicInsightUserActionsToggle, HTMLStencilElement {
}
var HTMLAtomicInsightUserActionsToggleElement: {
prototype: HTMLAtomicInsightUserActionsToggleElement;
new (): HTMLAtomicInsightUserActionsToggleElement;
};
interface HTMLAtomicIpxBodyElementEventMap {
"animationEnded": never;
}
Expand Down Expand Up @@ -5873,8 +5909,10 @@ declare global {
"atomic-insight-tab": HTMLAtomicInsightTabElement;
"atomic-insight-tabs": HTMLAtomicInsightTabsElement;
"atomic-insight-timeframe-facet": HTMLAtomicInsightTimeframeFacetElement;
"atomic-insight-user-actions-modal": HTMLAtomicInsightUserActionsModalElement;
"atomic-insight-user-actions-session": HTMLAtomicInsightUserActionsSessionElement;
"atomic-insight-user-actions-timeline": HTMLAtomicInsightUserActionsTimelineElement;
"atomic-insight-user-actions-toggle": HTMLAtomicInsightUserActionsToggleElement;
"atomic-ipx-body": HTMLAtomicIpxBodyElement;
"atomic-ipx-button": HTMLAtomicIpxButtonElement;
"atomic-ipx-embedded": HTMLAtomicIpxEmbeddedElement;
Expand Down Expand Up @@ -6957,6 +6995,14 @@ declare namespace LocalJSX {
* @default false
*/
"collapsible"?: boolean;
/**
* The tabs on which this generated answer must not be displayed. This property should not be used at the same time as `tabs-included`. Set this property as a stringified JSON array, e.g., ```html <atomic-generated-answer tabs-excluded='["tabIDA", "tabIDB"]'></atomic-generated-answer> ``` If you don't set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer won't be displayed on any of the specified tabs.
*/
"tabsExcluded"?: string[] | string;
/**
* The tabs on which the generated answer can be displayed. This property should not be used at the same time as `tabs-excluded`. Set this property as a stringified JSON array, e.g., ```html <atomic-generated-answer tabs-included='["tabIDA", "tabIDB"]'></atomic-generated-answer> ``` If you don't set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer can only be displayed on the specified tabs.
*/
"tabsIncluded"?: string[] | string;
/**
* Whether to render a toggle button that lets the user hide or show the answer.
* @default false
Expand Down Expand Up @@ -7428,6 +7474,18 @@ declare namespace LocalJSX {
*/
"withDatePicker"?: boolean;
}
interface AtomicInsightUserActionsModal {
"isOpen"?: boolean;
"openButton"?: HTMLElement;
/**
* The date and time when the case was created. For example "2024-01-01T00:00:00Z"
*/
"ticketCreationDateTime": string;
/**
* The ID of the user whose actions are being displayed.
*/
"userId": string;
}
/**
* @category Insight Panel
* @example <atomic-insight-user-actions-session userActions={actions} startTimestamp={1723035731}></atomic-insight-user-actions-session>
Expand All @@ -7443,9 +7501,6 @@ declare namespace LocalJSX {
"userActions": Array<IUserAction>;
}
/**
* This component displays all the actions performed by a user around the time they created a case.
* The actions are grouped into multiple sessions, including the session during which the case was created,
* the sessions preceding the case creation and the sessions following the case creation.
* @component
* @example <AtomicInsightUserActionsTimeline userId={'123'} caseCreationDate={'2024-08-15T10:00:00Z'} />
*/
Expand All @@ -7459,6 +7514,16 @@ declare namespace LocalJSX {
*/
"userId": string;
}
interface AtomicInsightUserActionsToggle {
/**
* The date and time when the case was created. For example "2024-01-01T00:00:00Z"
*/
"ticketCreationDateTime": string;
/**
* The ID of the user whose actions are being displayed.
*/
"userId": string;
}
interface AtomicIpxBody {
"displayFooterSlot"?: boolean;
"isOpen"?: boolean;
Expand Down Expand Up @@ -7875,7 +7940,7 @@ declare namespace LocalJSX {
*/
interface AtomicProductLink {
/**
* The [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals) from which to generate the `href` attribute value The template literal can reference any number of product properties from the parent product. It can also reference the window object. For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the product's `clickUri` and `itemtitle` fields. ```html <atomic-product-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-product-link> ```
* The [template literal](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals) from which to generate the `href` attribute value The template literal can reference any number of product properties from the parent product. It can also reference the window object. For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the product's `clickUri` and `itemtitle` fields. ```html <atomic-product-link href-template='${clickUri}?id=${permanentId}'></atomic-product-link> ```
*/
"hrefTemplate"?: string;
}
Expand Down Expand Up @@ -9464,8 +9529,10 @@ declare namespace LocalJSX {
"atomic-insight-tab": AtomicInsightTab;
"atomic-insight-tabs": AtomicInsightTabs;
"atomic-insight-timeframe-facet": AtomicInsightTimeframeFacet;
"atomic-insight-user-actions-modal": AtomicInsightUserActionsModal;
"atomic-insight-user-actions-session": AtomicInsightUserActionsSession;
"atomic-insight-user-actions-timeline": AtomicInsightUserActionsTimeline;
"atomic-insight-user-actions-toggle": AtomicInsightUserActionsToggle;
"atomic-ipx-body": AtomicIpxBody;
"atomic-ipx-button": AtomicIpxButton;
"atomic-ipx-embedded": AtomicIpxEmbedded;
Expand Down Expand Up @@ -9858,19 +9925,18 @@ declare module "@stencil/core" {
"atomic-insight-tab": LocalJSX.AtomicInsightTab & JSXBase.HTMLAttributes<HTMLAtomicInsightTabElement>;
"atomic-insight-tabs": LocalJSX.AtomicInsightTabs & JSXBase.HTMLAttributes<HTMLAtomicInsightTabsElement>;
"atomic-insight-timeframe-facet": LocalJSX.AtomicInsightTimeframeFacet & JSXBase.HTMLAttributes<HTMLAtomicInsightTimeframeFacetElement>;
"atomic-insight-user-actions-modal": LocalJSX.AtomicInsightUserActionsModal & JSXBase.HTMLAttributes<HTMLAtomicInsightUserActionsModalElement>;
/**
* @category Insight Panel
* @example <atomic-insight-user-actions-session userActions={actions} startTimestamp={1723035731}></atomic-insight-user-actions-session>
*/
"atomic-insight-user-actions-session": LocalJSX.AtomicInsightUserActionsSession & JSXBase.HTMLAttributes<HTMLAtomicInsightUserActionsSessionElement>;
/**
* This component displays all the actions performed by a user around the time they created a case.
* The actions are grouped into multiple sessions, including the session during which the case was created,
* the sessions preceding the case creation and the sessions following the case creation.
* @component
* @example <AtomicInsightUserActionsTimeline userId={'123'} caseCreationDate={'2024-08-15T10:00:00Z'} />
*/
"atomic-insight-user-actions-timeline": LocalJSX.AtomicInsightUserActionsTimeline & JSXBase.HTMLAttributes<HTMLAtomicInsightUserActionsTimelineElement>;
"atomic-insight-user-actions-toggle": LocalJSX.AtomicInsightUserActionsToggle & JSXBase.HTMLAttributes<HTMLAtomicInsightUserActionsToggleElement>;
"atomic-ipx-body": LocalJSX.AtomicIpxBody & JSXBase.HTMLAttributes<HTMLAtomicIpxBodyElement>;
"atomic-ipx-button": LocalJSX.AtomicIpxButton & JSXBase.HTMLAttributes<HTMLAtomicIpxButtonElement>;
"atomic-ipx-embedded": LocalJSX.AtomicIpxEmbedded & JSXBase.HTMLAttributes<HTMLAtomicIpxEmbeddedElement>;
Expand Down
Loading

0 comments on commit 7f43b21

Please sign in to comment.