@coveo/atomic 3.64.1 → 3.65.0

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.
Files changed (53) hide show
  1. package/custom-elements.json +236 -102
  2. package/dist/cjs/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.cjs +108 -13
  3. package/dist/cjs/components/commerce/product-list/product-template-provider.cjs +2 -0
  4. package/dist/cjs/components/common/atomic-modal/atomic-modal.cjs +8 -1
  5. package/dist/cjs/components/common/atomic-tab-popover/atomic-tab-popover.cjs +1 -0
  6. package/dist/cjs/components/common/facets/timeframe-facet-common.cjs +2 -2
  7. package/dist/cjs/components/common/generated-answer/generated-content/markdown-utils.cjs +1 -0
  8. package/dist/cjs/components/common/item-list/result-template-provider.cjs +1 -0
  9. package/dist/cjs/components/common/result-templates/result-template-controller.cjs +1 -0
  10. package/dist/cjs/components/common/suggestions/suggestion-manager.cjs +3 -0
  11. package/dist/cjs/components/insight/atomic-insight-facet/atomic-insight-facet.cjs +2 -2
  12. package/dist/cjs/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.cjs +1 -0
  13. package/dist/cjs/components/insight/atomic-insight-user-actions-session/atomic-insight-user-actions-session.cjs +1 -0
  14. package/dist/cjs/components/insight/atomic-insight-user-actions-session/user-action.cjs +1 -0
  15. package/dist/cjs/components/search/atomic-rating-range-facet/atomic-rating-range-facet.cjs +3 -4
  16. package/dist/cjs/components/search/atomic-search-box/atomic-search-box.cjs +107 -13
  17. package/dist/cjs/components/search/atomic-search-box-instant-results/atomic-search-box-instant-results.cjs +1 -0
  18. package/dist/cjs/global/environment.cjs +1 -1
  19. package/dist/cjs/utils/tailwind.global.tw.css.cjs +1 -1
  20. package/dist/cjs/versions.cjs +1 -1
  21. package/dist/esm/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +109 -14
  22. package/dist/esm/components/commerce/product-list/product-template-provider.js +2 -0
  23. package/dist/esm/components/common/atomic-modal/atomic-modal.js +9 -2
  24. package/dist/esm/components/common/atomic-tab-popover/atomic-tab-popover.js +1 -0
  25. package/dist/esm/components/common/facets/timeframe-facet-common.js +2 -2
  26. package/dist/esm/components/common/generated-answer/generated-content/markdown-utils.js +1 -0
  27. package/dist/esm/components/common/item-list/result-template-provider.js +1 -0
  28. package/dist/esm/components/common/result-templates/result-template-controller.js +1 -0
  29. package/dist/esm/components/common/suggestions/suggestion-manager.js +3 -0
  30. package/dist/esm/components/insight/atomic-insight-facet/atomic-insight-facet.js +2 -2
  31. package/dist/esm/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.js +1 -0
  32. package/dist/esm/components/insight/atomic-insight-user-actions-session/atomic-insight-user-actions-session.js +1 -0
  33. package/dist/esm/components/insight/atomic-insight-user-actions-session/user-action.js +1 -0
  34. package/dist/esm/components/search/atomic-rating-range-facet/atomic-rating-range-facet.js +3 -4
  35. package/dist/esm/components/search/atomic-search-box/atomic-search-box.js +109 -15
  36. package/dist/esm/components/search/atomic-search-box-instant-results/atomic-search-box-instant-results.js +1 -0
  37. package/dist/esm/global/environment.js +1 -1
  38. package/dist/esm/utils/tailwind.global.tw.css.js +1 -1
  39. package/dist/esm/versions.js +1 -1
  40. package/dist/types/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.d.ts +23 -6
  41. package/dist/types/components/commerce/product-list/product-template-provider.d.ts +2 -0
  42. package/dist/types/components/common/atomic-modal/atomic-modal.d.ts +6 -0
  43. package/dist/types/components/common/atomic-tab-popover/atomic-tab-popover.d.ts +1 -0
  44. package/dist/types/components/common/generated-answer/generated-content/markdown-utils.d.ts +1 -0
  45. package/dist/types/components/common/item-list/result-template-provider.d.ts +1 -0
  46. package/dist/types/components/common/layout/item-layout-sections.d.ts +1 -1
  47. package/dist/types/components/common/result-templates/result-template-controller.d.ts +1 -0
  48. package/dist/types/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.d.ts +1 -0
  49. package/dist/types/components/insight/atomic-insight-user-actions-session/atomic-insight-user-actions-session.d.ts +1 -0
  50. package/dist/types/components/insight/atomic-insight-user-actions-session/user-action.d.ts +1 -0
  51. package/dist/types/components/search/atomic-search-box/atomic-search-box.d.ts +23 -6
  52. package/dist/types/components/search/atomic-search-box-instant-results/atomic-search-box-instant-results.d.ts +1 -0
  53. package/package.json +26 -25
@@ -2,6 +2,7 @@ import type { UserAction as IUserAction } from '@coveo/headless/insight';
2
2
  import { LitElement } from 'lit';
3
3
  import type { InsightBindings } from '../atomic-insight-interface/atomic-insight-interface';
4
4
  import type { InitializableComponent } from '../../../decorators/types';
5
+ import '../../common/atomic-icon/atomic-icon.js';
5
6
  /**
6
7
  * Internal component used by the `atomic-insight-user-actions-modal`. Do not use directly.
7
8
  *
@@ -1,6 +1,7 @@
1
1
  import type { UserAction as IUserAction } from '@coveo/headless/insight';
2
2
  import type { InsightBindings } from '../atomic-insight-interface/atomic-insight-interface';
3
3
  import type { FunctionalComponent } from '../../../utils/functional-component-utils';
4
+ import '../../common/atomic-icon/atomic-icon.js';
4
5
  interface UserActionProps {
5
6
  action: IUserAction;
6
7
  bindings: InsightBindings;
@@ -1,5 +1,5 @@
1
1
  import { type SearchBox, type StandaloneSearchBox } from '@coveo/headless';
2
- import { type CSSResultGroup, LitElement } from 'lit';
2
+ import { type CSSResultGroup, LitElement, type TemplateResult } from 'lit';
3
3
  import type { Bindings } from '../atomic-search-interface/atomic-search-interface';
4
4
  import type { InitializableComponent } from '../../../decorators/types';
5
5
  import { AriaLiveRegionController } from '../../../utils/accessibility-utils';
@@ -39,10 +39,11 @@ import '@coveo/atomic-legacy/atomic-suggestion-renderer';
39
39
  * @part recent-query-icon - The icon of a suggestion from the `atomic-search-box-recent-queries` component.
40
40
  * @part recent-query-text - The text of a suggestion from the `atomic-search-box-recent-queries` component.
41
41
  * @part recent-query-text-highlight - The highlighted portion of the text of a suggestion from the `atomic-search-box-recent-queries` component.
42
- * @part recent-query-title-item - The clear button above suggestions from the `atomic-search-box-recent-queries` component.
43
- * @part recent-query-title-content - The contents of the clear button above suggestions from the `atomic-search-box-recent-queries` component.
44
- * @part recent-query-title - The "recent searches" text of the clear button above suggestions from the `atomic-search-box-recent-queries` component.
45
- * @part recent-query-clear - The "clear" text of the clear button above suggestions from the `atomic-search-box-recent-queries` component.
42
+ * @part recent-query-title-item - The clear button above suggestions from the `atomic-search-box-recent-queries` component, when `clear-recent-button-position` is `top`.
43
+ * @part recent-query-title-content - The contents of the clear button above suggestions from the `atomic-search-box-recent-queries` component, when `clear-recent-button-position` is `top`.
44
+ * @part recent-query-title - The "recent searches" title above the recent queries from the `atomic-search-box-recent-queries` component.
45
+ * @part recent-query-clear - The "clear" text of the clear button above suggestions from the `atomic-search-box-recent-queries` component, when `clear-recent-button-position` is `top`.
46
+ * @part recent-query-clear-button - The button below suggestions to clear the recent queries from the `atomic-search-box-recent-queries` component, when `clear-recent-button-position` is `bottom`.
46
47
  *
47
48
  * @part instant-results-item - An instant result rendered by an `atomic-search-box-instant-results` component.
48
49
  * @part instant-results-show-all - The clickable suggestion to show all items for the current instant results search rendered by an `atomic-search-box-instant-results` component.
@@ -51,6 +52,7 @@ import '@coveo/atomic-legacy/atomic-suggestion-renderer';
51
52
  * @event redirect - Event that is emitted when a standalone search box redirection is triggered. By default, the search box will directly change the URL and redirect accordingly, so if you want to handle the redirection differently, use this event.
52
53
  */
53
54
  export declare class AtomicSearchBox extends LitElement implements InitializableComponent<Bindings> {
55
+ private static readonly propsSchema;
54
56
  static shadowRootOptions: {
55
57
  delegatesFocus: boolean;
56
58
  clonable?: boolean;
@@ -65,6 +67,8 @@ export declare class AtomicSearchBox extends LitElement implements Initializable
65
67
  isExpanded: boolean;
66
68
  private searchBoxState;
67
69
  private textAreaRef;
70
+ private setLeftPanel;
71
+ private setRightPanel;
68
72
  private searchBoxSuggestionEventsQueue;
69
73
  private suggestionManager;
70
74
  searchBox: SearchBox | StandaloneSearchBox;
@@ -127,6 +131,16 @@ export declare class AtomicSearchBox extends LitElement implements Initializable
127
131
  * When the `redirection-url` property is set and redirects to a page with more `atomic-search-box` components, all `atomic-search-box` components need to have the same `enable-query-syntax` value.
128
132
  */
129
133
  enableQuerySyntax: boolean;
134
+ /**
135
+ * The position of the option to clear the recent queries.
136
+ *
137
+ * - `top`: The option is the first suggestion, next to the "Recent searches" title.
138
+ * - `bottom`: The option is a button below the suggestions, so the arrow keys only navigate through the suggestions and the button is reached with the Tab key.
139
+ *
140
+ * In the next major version of Atomic (v4), `bottom` will become the default behavior. To adopt it ahead of time, set this property to `bottom`.
141
+ */
142
+ clearRecentButtonPosition: 'top' | 'bottom';
143
+ constructor();
130
144
  connectedCallback(): void;
131
145
  disconnectedCallback(): void;
132
146
  willUpdate(): void;
@@ -153,11 +167,14 @@ export declare class AtomicSearchBox extends LitElement implements Initializable
153
167
  private announceClearSearchBoxToScreenReader;
154
168
  private renderAbsolutePositionSpacer;
155
169
  private renderTextBox;
170
+ private get clearRecentQueriesElement();
171
+ private renderRecentQueriesTitle;
172
+ private renderClearRecentQueriesButton;
156
173
  private renderSuggestions;
157
174
  private renderPanel;
158
175
  private renderSuggestion;
159
176
  private renderSlotContent;
160
- render(): import("lit-html").TemplateResult<1>;
177
+ render(): TemplateResult<1>;
161
178
  }
162
179
  declare global {
163
180
  interface HTMLElementTagNameMap {
@@ -5,6 +5,7 @@ import type { ItemDisplayDensity, ItemDisplayImageSize } from '../../common/layo
5
5
  import type { SearchBoxSuggestions, SearchBoxSuggestionsBindings } from '../../common/suggestions/suggestions-types';
6
6
  import type { Bindings } from '../atomic-search-interface/interfaces';
7
7
  import type { SearchBoxSuggestionsComponent } from '../../../decorators/types';
8
+ import '../atomic-result/atomic-result.js';
8
9
  type AriaLabelGenerator = (bindings: Bindings, result: Result) => string | undefined;
9
10
  /**
10
11
  * The `atomic-search-box-instant-results` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of instant results behavior.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
- "version": "3.64.1",
3
+ "version": "3.65.0",
4
4
  "description": "A web-component library for building modern UIs interfacing with the Coveo platform",
5
5
  "homepage": "https://docs.coveo.com/en/atomic/latest/",
6
6
  "license": "Apache-2.0",
@@ -55,9 +55,9 @@
55
55
  "./custom-elements-manifest": "./custom-elements.json"
56
56
  },
57
57
  "dependencies": {
58
- "@coveo/atomic-legacy": "0.1.9",
58
+ "@coveo/atomic-legacy": "0.1.10",
59
59
  "@coveo/bueno": "1.1.9",
60
- "@coveo/headless": "3.58.0",
60
+ "@coveo/headless": "3.58.1",
61
61
  "@coveo/relay-event-types": "20.7.1",
62
62
  "@lit/context": "1.1.6",
63
63
  "@open-wc/lit-helpers": "0.7.0",
@@ -66,9 +66,9 @@
66
66
  "@stencil/core": "4.20.0",
67
67
  "cssnano": "8.0.10",
68
68
  "dayjs": "1.11.23",
69
- "dompurify": "3.4.15",
69
+ "dompurify": "3.4.17",
70
70
  "escape-html": "1.0.3",
71
- "i18next": "26.4.2",
71
+ "i18next": "26.5.3",
72
72
  "i18next-http-backend": "4.0.2",
73
73
  "lit": "3.3.3",
74
74
  "marked": "12.0.2"
@@ -81,47 +81,47 @@
81
81
  "@rollup/plugin-replace": "6.0.3",
82
82
  "@rslib/core": "0.23.2",
83
83
  "@size-limit/preset-small-lib": "14.1.0",
84
- "@storybook/addon-a11y": "10.6.2",
85
- "@storybook/addon-docs": "10.6.2",
86
- "@storybook/addon-mcp": "10.6.2",
87
- "@storybook/addon-vitest": "10.6.2",
88
- "@storybook/icons": "2.1.0",
89
- "@storybook/web-components-vite": "10.6.2",
84
+ "@storybook/addon-a11y": "10.6.3",
85
+ "@storybook/addon-docs": "10.6.3",
86
+ "@storybook/addon-mcp": "10.6.3",
87
+ "@storybook/addon-vitest": "10.6.3",
88
+ "@storybook/icons": "2.2.0",
89
+ "@storybook/web-components-vite": "10.6.3",
90
90
  "@tailwindcss/postcss": "4.3.3",
91
91
  "@tailwindcss/vite": "4.3.3",
92
92
  "@types/escape-html": "1.0.4",
93
93
  "@types/node": "24.13.6",
94
- "@vitest/browser-playwright": "4.1.11",
94
+ "@vitest/browser-playwright": "4.1.12",
95
95
  "@wc-toolkit/storybook-helpers": "10.5.1",
96
- "chromatic": "18.9.4",
97
- "handlebars": "4.7.9",
96
+ "chromatic": "18.13.0",
97
+ "handlebars": "4.7.10",
98
98
  "lit-html": "3.3.3",
99
- "local-web-server": "5.4.0",
99
+ "local-web-server": "5.4.2",
100
100
  "msw": "2.15.0",
101
101
  "msw-storybook-addon": "2.0.7",
102
102
  "natural-orderby": "5.0.0",
103
103
  "playwright": "1.62.1",
104
- "postcss": "8.5.28",
104
+ "postcss": "8.5.31",
105
105
  "postcss-load-config": "6.0.1",
106
- "prettier": "3.9.8",
107
- "publint": "0.3.24",
106
+ "prettier": "3.9.10",
107
+ "publint": "0.3.25",
108
108
  "puppeteer": "25.9.0",
109
109
  "react": "19.2.8",
110
110
  "remark-gfm": "4.0.1",
111
- "shadow-dom-testing-library": "1.14.1",
111
+ "shadow-dom-testing-library": "1.14.2",
112
112
  "size-limit": "14.1.0",
113
- "storybook": "10.6.2",
114
- "storybook-addon-pseudo-states": "10.6.2",
113
+ "storybook": "10.6.3",
114
+ "storybook-addon-pseudo-states": "10.6.3",
115
115
  "tailwindcss": "4.3.3",
116
116
  "ts-dedent": "2.3.0",
117
117
  "ts-lit-plugin": "2.0.2",
118
118
  "typescript": "6.0.3",
119
- "vite": "8.3.0",
120
- "vitest": "4.1.11"
119
+ "vite": "8.3.4",
120
+ "vitest": "4.1.12"
121
121
  },
122
122
  "peerDependencies": {
123
123
  "@coveo/bueno": "^1.1.9",
124
- "@coveo/headless": "^3.58.0",
124
+ "@coveo/headless": "^3.58.1",
125
125
  "typescript": ">=5.0.0"
126
126
  },
127
127
  "peerDependenciesMeta": {
@@ -157,8 +157,9 @@
157
157
  "web:cdn": "node ./scripts/start-cdn.mjs",
158
158
  "e2e": "playwright test",
159
159
  "e2e:csp": "node ./csp/test.mjs || exit 0",
160
- "test": "pnpm run test:lit",
160
+ "test": "pnpm run test:lit && pnpm run test:node",
161
161
  "test:lit": "vitest run --project=atomic-default",
162
+ "test:node": "vitest run --project=atomic-node",
162
163
  "test:watch": "vitest --project=atomic-default",
163
164
  "test:storybook": "vitest run --project=storybook",
164
165
  "test:storybook-utils": "vitest run --project=storybookPure",