@coveo/atomic 3.31.2-pre.1c8be76f9e → 3.31.2-pre.220482c28a

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 (52) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/atomic.esm.js.map +1 -1
  3. package/dist/atomic/components/_index.d.ts +2 -0
  4. package/dist/atomic/components/_index.js +1 -0
  5. package/dist/atomic/components/analytics-config.js +1 -1
  6. package/dist/atomic/components/atomic-product-field-condition.d.ts +11 -0
  7. package/dist/atomic/components/atomic-product-field-condition.js +131 -0
  8. package/dist/atomic/components/atomic-product-field-condition.js.map +1 -0
  9. package/dist/atomic/components/components/commerce/atomic-product-template/atomic-product-template.js +0 -1
  10. package/dist/atomic/components/components/commerce/index.js +0 -1
  11. package/dist/atomic/components/components/commerce/lazy-index.js +0 -1
  12. package/dist/atomic/components/global/environment.js +1 -1
  13. package/dist/atomic/components/index.js.map +1 -1
  14. package/dist/atomic/{p-16aba904.entry.js → p-4174e6e1.entry.js} +2 -2
  15. package/dist/atomic/{p-9e77e09f.entry.js → p-6a02181d.entry.js} +2 -2
  16. package/dist/atomic/{p-5cb01552.js → p-86a93900.js} +2 -2
  17. package/dist/atomic/{p-b573855a.entry.js → p-8d337129.entry.js} +2 -2
  18. package/dist/atomic/p-a0b3c6e2.entry.js +2 -0
  19. package/dist/atomic/p-a0b3c6e2.entry.js.map +1 -0
  20. package/dist/cjs/_loader.cjs.js +1 -1
  21. package/dist/cjs/{analytics-config-aabaf235.js → analytics-config-be5b58ae.js} +2 -2
  22. package/dist/cjs/{analytics-config-aabaf235.js.map → analytics-config-be5b58ae.js.map} +1 -1
  23. package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
  24. package/dist/cjs/atomic-product-field-condition.cjs.entry.js +119 -0
  25. package/dist/cjs/atomic-product-field-condition.cjs.entry.js.map +1 -0
  26. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  27. package/dist/cjs/atomic-search-interface.cjs.entry.js +1 -1
  28. package/dist/cjs/atomic.cjs.js +1 -1
  29. package/dist/cjs/index-757bc886.js +4 -0
  30. package/dist/cjs/version.cjs.js +2 -2
  31. package/dist/esm/_loader.js +1 -1
  32. package/dist/esm/{analytics-config-8adc1641.js → analytics-config-39f762f7.js} +2 -2
  33. package/dist/esm/{analytics-config-8adc1641.js.map → analytics-config-39f762f7.js.map} +1 -1
  34. package/dist/esm/atomic-insight-interface.entry.js +1 -1
  35. package/dist/esm/atomic-product-field-condition.entry.js +115 -0
  36. package/dist/esm/atomic-product-field-condition.entry.js.map +1 -0
  37. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  38. package/dist/esm/atomic-search-interface.entry.js +1 -1
  39. package/dist/esm/atomic.js +1 -1
  40. package/dist/esm/index-3f35faca.js +4 -0
  41. package/dist/esm/version.js +2 -2
  42. package/dist/types/components/commerce/atomic-product-field-condition/atomic-product-field-condition.d.ts +13 -24
  43. package/dist/types/components/commerce/atomic-product-template/atomic-product-template.d.ts +0 -1
  44. package/dist/types/components/commerce/index.d.ts +0 -1
  45. package/dist/types/components.d.ts +69 -0
  46. package/docs/atomic-docs.json +134 -1
  47. package/package.json +3 -3
  48. package/dist/atomic/components/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +0 -70
  49. /package/dist/atomic/{p-16aba904.entry.js.map → p-4174e6e1.entry.js.map} +0 -0
  50. /package/dist/atomic/{p-9e77e09f.entry.js.map → p-6a02181d.entry.js.map} +0 -0
  51. /package/dist/atomic/{p-5cb01552.js.map → p-86a93900.js.map} +0 -0
  52. /package/dist/atomic/{p-b573855a.entry.js.map → p-8d337129.entry.js.map} +0 -0
@@ -1584,6 +1584,31 @@ export namespace Components {
1584
1584
  */
1585
1585
  interface AtomicPopover {
1586
1586
  }
1587
+ /**
1588
+ * The `atomic-product-field-condition` component takes a list of conditions that, if fulfilled, apply the template in which it's defined.
1589
+ * The condition properties can be based on any top-level product property of the `product` object, not restricted to fields (e.g., `ec_name`).
1590
+ * @alpha
1591
+ */
1592
+ interface AtomicProductFieldCondition {
1593
+ /**
1594
+ * Verifies whether the specified fields are defined.
1595
+ */
1596
+ "ifDefined"?: string;
1597
+ /**
1598
+ * Verifies whether the specified fields are not defined.
1599
+ */
1600
+ "ifNotDefined"?: string;
1601
+ /**
1602
+ * Verifies whether the specified fields match the specified values.
1603
+ * @type {Record<string, string[]>}
1604
+ */
1605
+ "mustMatch": Record<string, string[]>;
1606
+ /**
1607
+ * Verifies whether the specified fields do not match the specified values.
1608
+ * @type {Record<string, string[]>}
1609
+ */
1610
+ "mustNotMatch": Record<string, string[]>;
1611
+ }
1587
1612
  /**
1588
1613
  * The `atomic-product-image` component renders an image from a product field.
1589
1614
  * @alpha
@@ -4055,6 +4080,17 @@ declare global {
4055
4080
  prototype: HTMLAtomicPopoverElement;
4056
4081
  new (): HTMLAtomicPopoverElement;
4057
4082
  };
4083
+ /**
4084
+ * The `atomic-product-field-condition` component takes a list of conditions that, if fulfilled, apply the template in which it's defined.
4085
+ * The condition properties can be based on any top-level product property of the `product` object, not restricted to fields (e.g., `ec_name`).
4086
+ * @alpha
4087
+ */
4088
+ interface HTMLAtomicProductFieldConditionElement extends Components.AtomicProductFieldCondition, HTMLStencilElement {
4089
+ }
4090
+ var HTMLAtomicProductFieldConditionElement: {
4091
+ prototype: HTMLAtomicProductFieldConditionElement;
4092
+ new (): HTMLAtomicProductFieldConditionElement;
4093
+ };
4058
4094
  /**
4059
4095
  * The `atomic-product-image` component renders an image from a product field.
4060
4096
  * @alpha
@@ -5144,6 +5180,7 @@ declare global {
5144
5180
  "atomic-numeric-range": HTMLAtomicNumericRangeElement;
5145
5181
  "atomic-pager": HTMLAtomicPagerElement;
5146
5182
  "atomic-popover": HTMLAtomicPopoverElement;
5183
+ "atomic-product-field-condition": HTMLAtomicProductFieldConditionElement;
5147
5184
  "atomic-product-image": HTMLAtomicProductImageElement;
5148
5185
  "atomic-product-rating": HTMLAtomicProductRatingElement;
5149
5186
  "atomic-product-section-actions": HTMLAtomicProductSectionActionsElement;
@@ -6700,6 +6737,31 @@ declare namespace LocalJSX {
6700
6737
  */
6701
6738
  interface AtomicPopover {
6702
6739
  }
6740
+ /**
6741
+ * The `atomic-product-field-condition` component takes a list of conditions that, if fulfilled, apply the template in which it's defined.
6742
+ * The condition properties can be based on any top-level product property of the `product` object, not restricted to fields (e.g., `ec_name`).
6743
+ * @alpha
6744
+ */
6745
+ interface AtomicProductFieldCondition {
6746
+ /**
6747
+ * Verifies whether the specified fields are defined.
6748
+ */
6749
+ "ifDefined"?: string;
6750
+ /**
6751
+ * Verifies whether the specified fields are not defined.
6752
+ */
6753
+ "ifNotDefined"?: string;
6754
+ /**
6755
+ * Verifies whether the specified fields match the specified values.
6756
+ * @type {Record<string, string[]>}
6757
+ */
6758
+ "mustMatch"?: Record<string, string[]>;
6759
+ /**
6760
+ * Verifies whether the specified fields do not match the specified values.
6761
+ * @type {Record<string, string[]>}
6762
+ */
6763
+ "mustNotMatch"?: Record<string, string[]>;
6764
+ }
6703
6765
  /**
6704
6766
  * The `atomic-product-image` component renders an image from a product field.
6705
6767
  * @alpha
@@ -8314,6 +8376,7 @@ declare namespace LocalJSX {
8314
8376
  "atomic-numeric-range": AtomicNumericRange;
8315
8377
  "atomic-pager": AtomicPager;
8316
8378
  "atomic-popover": AtomicPopover;
8379
+ "atomic-product-field-condition": AtomicProductFieldCondition;
8317
8380
  "atomic-product-image": AtomicProductImage;
8318
8381
  "atomic-product-rating": AtomicProductRating;
8319
8382
  "atomic-product-section-actions": AtomicProductSectionActions;
@@ -8626,6 +8689,12 @@ declare module "@stencil/core" {
8626
8689
  * The `atomic-popover` component displays any facet as a popover menu.
8627
8690
  */
8628
8691
  "atomic-popover": LocalJSX.AtomicPopover & JSXBase.HTMLAttributes<HTMLAtomicPopoverElement>;
8692
+ /**
8693
+ * The `atomic-product-field-condition` component takes a list of conditions that, if fulfilled, apply the template in which it's defined.
8694
+ * The condition properties can be based on any top-level product property of the `product` object, not restricted to fields (e.g., `ec_name`).
8695
+ * @alpha
8696
+ */
8697
+ "atomic-product-field-condition": LocalJSX.AtomicProductFieldCondition & JSXBase.HTMLAttributes<HTMLAtomicProductFieldConditionElement>;
8629
8698
  /**
8630
8699
  * The `atomic-product-image` component renders an image from a product field.
8631
8700
  * @alpha
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-07-31T16:54:54",
2
+ "timestamp": "2025-07-31T14:48:16",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.20.0",
@@ -6562,6 +6562,139 @@
6562
6562
  ]
6563
6563
  }
6564
6564
  },
6565
+ {
6566
+ "filePath": "src/components/commerce/atomic-product-field-condition/atomic-product-field-condition.tsx",
6567
+ "encapsulation": "none",
6568
+ "tag": "atomic-product-field-condition",
6569
+ "docs": "The `atomic-product-field-condition` component takes a list of conditions that, if fulfilled, apply the template in which it's defined.\nThe condition properties can be based on any top-level product property of the `product` object, not restricted to fields (e.g., `ec_name`).",
6570
+ "docsTags": [
6571
+ {
6572
+ "name": "alpha"
6573
+ }
6574
+ ],
6575
+ "usage": {},
6576
+ "props": [
6577
+ {
6578
+ "name": "ifDefined",
6579
+ "type": "string | undefined",
6580
+ "complexType": {
6581
+ "original": "string",
6582
+ "resolved": "string | undefined",
6583
+ "references": {}
6584
+ },
6585
+ "mutable": false,
6586
+ "attr": "if-defined",
6587
+ "reflectToAttr": true,
6588
+ "docs": "Verifies whether the specified fields are defined.",
6589
+ "docsTags": [],
6590
+ "values": [
6591
+ {
6592
+ "type": "string"
6593
+ },
6594
+ {
6595
+ "type": "undefined"
6596
+ }
6597
+ ],
6598
+ "optional": true,
6599
+ "required": false
6600
+ },
6601
+ {
6602
+ "name": "ifNotDefined",
6603
+ "type": "string | undefined",
6604
+ "complexType": {
6605
+ "original": "string",
6606
+ "resolved": "string | undefined",
6607
+ "references": {}
6608
+ },
6609
+ "mutable": false,
6610
+ "attr": "if-not-defined",
6611
+ "reflectToAttr": true,
6612
+ "docs": "Verifies whether the specified fields are not defined.",
6613
+ "docsTags": [],
6614
+ "values": [
6615
+ {
6616
+ "type": "string"
6617
+ },
6618
+ {
6619
+ "type": "undefined"
6620
+ }
6621
+ ],
6622
+ "optional": true,
6623
+ "required": false
6624
+ },
6625
+ {
6626
+ "name": "mustMatch",
6627
+ "type": "{ [x: string]: string[]; }",
6628
+ "complexType": {
6629
+ "original": "Record<string, string[]>",
6630
+ "resolved": "{ [x: string]: string[]; }",
6631
+ "references": {
6632
+ "Record": {
6633
+ "location": "global",
6634
+ "id": "global::Record"
6635
+ }
6636
+ }
6637
+ },
6638
+ "mutable": false,
6639
+ "reflectToAttr": false,
6640
+ "docs": "Verifies whether the specified fields match the specified values.",
6641
+ "docsTags": [
6642
+ {
6643
+ "name": "type",
6644
+ "text": "{Record<string, string[]>}"
6645
+ }
6646
+ ],
6647
+ "default": "{}",
6648
+ "values": [
6649
+ {
6650
+ "type": "{ [x: string]: string[]; }"
6651
+ }
6652
+ ],
6653
+ "optional": false,
6654
+ "required": false
6655
+ },
6656
+ {
6657
+ "name": "mustNotMatch",
6658
+ "type": "{ [x: string]: string[]; }",
6659
+ "complexType": {
6660
+ "original": "Record<string, string[]>",
6661
+ "resolved": "{ [x: string]: string[]; }",
6662
+ "references": {
6663
+ "Record": {
6664
+ "location": "global",
6665
+ "id": "global::Record"
6666
+ }
6667
+ }
6668
+ },
6669
+ "mutable": false,
6670
+ "reflectToAttr": false,
6671
+ "docs": "Verifies whether the specified fields do not match the specified values.",
6672
+ "docsTags": [
6673
+ {
6674
+ "name": "type",
6675
+ "text": "{Record<string, string[]>}"
6676
+ }
6677
+ ],
6678
+ "default": "{}",
6679
+ "values": [
6680
+ {
6681
+ "type": "{ [x: string]: string[]; }"
6682
+ }
6683
+ ],
6684
+ "optional": false,
6685
+ "required": false
6686
+ }
6687
+ ],
6688
+ "methods": [],
6689
+ "events": [],
6690
+ "listeners": [],
6691
+ "styles": [],
6692
+ "slots": [],
6693
+ "parts": [],
6694
+ "dependents": [],
6695
+ "dependencies": [],
6696
+ "dependencyGraph": {}
6697
+ },
6565
6698
  {
6566
6699
  "filePath": "src/components/commerce/atomic-product-image/atomic-product-image.tsx",
6567
6700
  "encapsulation": "shadow",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
3
  "type": "module",
4
- "version": "3.31.2-pre.1c8be76f9e",
4
+ "version": "3.31.2-pre.220482c28a",
5
5
  "description": "A web-component library for building modern UIs interfacing with the Coveo platform",
6
6
  "homepage": "https://docs.coveo.com/en/atomic/latest/",
7
7
  "repository": {
@@ -72,7 +72,7 @@
72
72
  "dependencies": {
73
73
  "@lit/context": "1.1.6",
74
74
  "@coveo/bueno": "1.0.24",
75
- "@coveo/headless": "3.27.8-pre.1c8be76f9e",
75
+ "@coveo/headless": "3.27.8-pre.220482c28a",
76
76
  "@popperjs/core": "2.11.8",
77
77
  "@salesforce-ux/design-system": "2.27.2",
78
78
  "@stencil/core": "4.20.0",
@@ -158,7 +158,7 @@
158
158
  },
159
159
  "peerDependencies": {
160
160
  "@coveo/bueno": "1.0.24",
161
- "@coveo/headless": "3.27.8-pre.1c8be76f9e",
161
+ "@coveo/headless": "3.27.8-pre.220482c28a",
162
162
  "typescript": ">=5.0.0"
163
163
  },
164
164
  "peerDependenciesMeta": {
@@ -1,70 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, LitElement } from 'lit';
8
- import { customElement, property, state } from 'lit/decorators.js';
9
- import { bindings } from "../../../decorators/bindings";
10
- import { createProductContextController } from "../../../decorators/commerce/product-template-decorators";
11
- import { errorGuard } from "../../../decorators/error-guard";
12
- import { mapProperty } from "../../../utils/props-utils";
13
- import { makeDefinedConditions, makeMatchConditions, } from '../../common/product-template/product-template-common';
14
- /**
15
- * The `atomic-product-field-condition` component renders its children only when all of the conditions specified through its props are satisfied.
16
- * The condition properties can be based on any top-level product property of the `product` object, not restricted to fields (e.g., `ec_name`).
17
- *
18
- * @slot default - The content to render if the conditions are met.
19
- *
20
- * @alpha
21
- */
22
- let AtomicProductFieldCondition = class AtomicProductFieldCondition extends LitElement {
23
- constructor() {
24
- super(...arguments);
25
- this.productController = createProductContextController(this);
26
- }
27
- createRenderRoot() {
28
- return this;
29
- }
30
- initialize() { }
31
- get conditions() {
32
- return [
33
- ...makeDefinedConditions(this.ifDefined, this.ifNotDefined),
34
- ...makeMatchConditions(this.mustMatch, this.mustNotMatch),
35
- ];
36
- }
37
- render() {
38
- const product = this.productController.item;
39
- if (!product || !this.conditions.every((condition) => condition(product))) {
40
- this.remove();
41
- }
42
- return html `<slot></slot>`;
43
- }
44
- };
45
- __decorate([
46
- state()
47
- ], AtomicProductFieldCondition.prototype, "bindings", void 0);
48
- __decorate([
49
- state()
50
- ], AtomicProductFieldCondition.prototype, "error", void 0);
51
- __decorate([
52
- property({ type: String, attribute: 'if-defined' })
53
- ], AtomicProductFieldCondition.prototype, "ifDefined", void 0);
54
- __decorate([
55
- property({ type: String, attribute: 'if-not-defined' })
56
- ], AtomicProductFieldCondition.prototype, "ifNotDefined", void 0);
57
- __decorate([
58
- mapProperty({ splitValues: true, attributePrefix: 'must-match' })
59
- ], AtomicProductFieldCondition.prototype, "mustMatch", void 0);
60
- __decorate([
61
- mapProperty({ splitValues: true, attributePrefix: 'must-not-match' })
62
- ], AtomicProductFieldCondition.prototype, "mustNotMatch", void 0);
63
- __decorate([
64
- errorGuard()
65
- ], AtomicProductFieldCondition.prototype, "render", null);
66
- AtomicProductFieldCondition = __decorate([
67
- customElement('atomic-product-field-condition'),
68
- bindings()
69
- ], AtomicProductFieldCondition);
70
- export { AtomicProductFieldCondition };