@coveo/atomic 3.63.0 → 3.64.1

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 (85) hide show
  1. package/custom-elements.json +194 -8
  2. package/dist/cjs/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.cjs +1 -0
  3. package/dist/cjs/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.cjs +1 -1
  4. package/dist/cjs/components/commerce/atomic-commerce-facet/atomic-commerce-facet.cjs +1 -1
  5. package/dist/cjs/components/commerce/atomic-product-field-condition/atomic-product-field-condition.cjs +1 -4
  6. package/dist/cjs/components/commerce/atomic-product-template/atomic-product-template.cjs +15 -1
  7. package/dist/cjs/components/common/atomic-focus-trap/atomic-focus-trap.cjs +11 -1
  8. package/dist/cjs/components/common/atomic-layout-section/layout.cjs +6 -2
  9. package/dist/cjs/components/common/facets/facet-common.cjs +21 -2
  10. package/dist/cjs/components/common/facets/facet-search/facet-search-aria-live.cjs +21 -8
  11. package/dist/cjs/components/common/query-error/icon.cjs +7 -26
  12. package/dist/cjs/components/common/query-error/icons.cjs +68 -0
  13. package/dist/cjs/components/common/template-controller/template-utils.cjs +9 -0
  14. package/dist/cjs/components/insight/atomic-insight-facet/atomic-insight-facet.cjs +1 -1
  15. package/dist/cjs/components/insight/atomic-insight-result-children-template/atomic-insight-result-children-template.cjs +1 -5
  16. package/dist/cjs/components/insight/atomic-insight-result-template/atomic-insight-result-template.cjs +15 -1
  17. package/dist/cjs/components/insight/atomic-insight-smart-snippet/atomic-insight-smart-snippet.cjs +3 -3
  18. package/dist/cjs/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.cjs +15 -1
  19. package/dist/cjs/components/search/atomic-category-facet/atomic-category-facet.cjs +1 -1
  20. package/dist/cjs/components/search/atomic-color-facet/atomic-color-facet.cjs +1 -1
  21. package/dist/cjs/components/search/atomic-facet/atomic-facet.cjs +1 -1
  22. package/dist/cjs/components/search/atomic-facet-manager/atomic-facet-manager.cjs +7 -3
  23. package/dist/cjs/components/search/atomic-field-condition/atomic-field-condition.cjs +1 -4
  24. package/dist/cjs/components/search/atomic-popover/atomic-popover.cjs +1 -2
  25. package/dist/cjs/components/search/atomic-result-children-template/atomic-result-children-template.cjs +15 -1
  26. package/dist/cjs/components/search/atomic-result-template/atomic-result-template.cjs +15 -1
  27. package/dist/cjs/components/search/atomic-search-layout/atomic-search-layout.tw.css.cjs +12 -2
  28. package/dist/cjs/decorators/bind-state.cjs +38 -8
  29. package/dist/cjs/decorators/with-tailwind-styles.cjs +2 -1
  30. package/dist/cjs/global/environment.cjs +1 -1
  31. package/dist/cjs/utils/init-queue.cjs +6 -4
  32. package/dist/cjs/utils/replace-breakpoint-utils.cjs +9 -4
  33. package/dist/cjs/versions.cjs +1 -1
  34. package/dist/esm/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.js +1 -0
  35. package/dist/esm/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.js +1 -1
  36. package/dist/esm/components/commerce/atomic-commerce-facet/atomic-commerce-facet.js +1 -1
  37. package/dist/esm/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +1 -1
  38. package/dist/esm/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +2 -5
  39. package/dist/esm/components/commerce/atomic-product-template/atomic-product-template.js +16 -2
  40. package/dist/esm/components/common/atomic-focus-trap/atomic-focus-trap.js +11 -1
  41. package/dist/esm/components/common/atomic-layout-section/layout.js +6 -2
  42. package/dist/esm/components/common/facets/facet-common.js +16 -3
  43. package/dist/esm/components/common/facets/facet-search/facet-search-aria-live.js +21 -8
  44. package/dist/esm/components/common/query-error/icon.js +5 -23
  45. package/dist/esm/components/common/query-error/icons.js +17 -0
  46. package/dist/esm/components/common/template-controller/template-utils.js +7 -1
  47. package/dist/esm/components/insight/atomic-insight-facet/atomic-insight-facet.js +1 -1
  48. package/dist/esm/components/insight/atomic-insight-result-children/atomic-insight-result-children.js +1 -1
  49. package/dist/esm/components/insight/atomic-insight-result-children-template/atomic-insight-result-children-template.js +2 -6
  50. package/dist/esm/components/insight/atomic-insight-result-template/atomic-insight-result-template.js +16 -2
  51. package/dist/esm/components/insight/atomic-insight-smart-snippet/atomic-insight-smart-snippet.js +3 -3
  52. package/dist/esm/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.js +16 -2
  53. package/dist/esm/components/search/atomic-category-facet/atomic-category-facet.js +1 -1
  54. package/dist/esm/components/search/atomic-color-facet/atomic-color-facet.js +1 -1
  55. package/dist/esm/components/search/atomic-facet/atomic-facet.js +1 -1
  56. package/dist/esm/components/search/atomic-facet-manager/atomic-facet-manager.js +8 -4
  57. package/dist/esm/components/search/atomic-field-condition/atomic-field-condition.js +2 -5
  58. package/dist/esm/components/search/atomic-popover/atomic-popover.js +1 -2
  59. package/dist/esm/components/search/atomic-result-children-template/atomic-result-children-template.js +16 -2
  60. package/dist/esm/components/search/atomic-result-template/atomic-result-template.js +16 -2
  61. package/dist/esm/components/search/atomic-search-box/atomic-search-box.js +1 -1
  62. package/dist/esm/components/search/atomic-search-layout/atomic-search-layout.tw.css.js +1 -1
  63. package/dist/esm/decorators/bind-state.js +38 -8
  64. package/dist/esm/decorators/with-tailwind-styles.js +2 -1
  65. package/dist/esm/global/environment.js +1 -1
  66. package/dist/esm/utils/init-queue.js +6 -4
  67. package/dist/esm/utils/replace-breakpoint-utils.js +9 -4
  68. package/dist/esm/versions.js +1 -1
  69. package/dist/types/components/commerce/atomic-product-template/atomic-product-template.d.ts +12 -0
  70. package/dist/types/components/common/atomic-focus-trap/atomic-focus-trap.d.ts +1 -0
  71. package/dist/types/components/common/atomic-smart-snippet-source/atomic-smart-snippet-source.d.ts +4 -4
  72. package/dist/types/components/common/facets/facet-common.d.ts +2 -0
  73. package/dist/types/components/common/facets/facet-search/facet-search-aria-live.d.ts +7 -1
  74. package/dist/types/components/common/query-error/icon.d.ts +6 -0
  75. package/dist/types/components/common/query-error/icons.d.ts +5 -0
  76. package/dist/types/components/common/template-controller/template-utils.d.ts +7 -0
  77. package/dist/types/components/insight/atomic-insight-result-children-template/atomic-insight-result-children-template.d.ts +4 -4
  78. package/dist/types/components/insight/atomic-insight-result-template/atomic-insight-result-template.d.ts +12 -0
  79. package/dist/types/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.d.ts +12 -0
  80. package/dist/types/components/search/atomic-facet-manager/atomic-facet-manager.d.ts +6 -1
  81. package/dist/types/components/search/atomic-result-children-template/atomic-result-children-template.d.ts +12 -0
  82. package/dist/types/components/search/atomic-result-template/atomic-result-template.d.ts +12 -0
  83. package/dist/types/utils/init-queue.d.ts +3 -2
  84. package/docs/adr/0001-group-shared-modules-in-one-cdn-chunk.md +147 -0
  85. package/package.json +17 -14
@@ -12179,6 +12179,24 @@
12179
12179
  "default": "[]",
12180
12180
  "description": "A function that must return true on products for the product template to apply.\nSet programmatically before initialization, not via attribute.\n\nFor example, the following targets a template and sets a condition to make it apply only to products whose `ec_name` contains `singapore`:\n`document.querySelector('#target-template').conditions = [(product) => /singapore/i.test(product.ec_name)];`"
12181
12181
  },
12182
+ {
12183
+ "kind": "field",
12184
+ "name": "ifDefined",
12185
+ "type": {
12186
+ "text": "string"
12187
+ },
12188
+ "description": "The comma-separated list of fields that must all be defined on a product for the template to apply.\nFor example, a template with the following attribute only applies to products whose `ec_brand` and `ec_rating` fields are both defined:\n`if-defined=\"ec_brand,ec_rating\"`",
12189
+ "attribute": "if-defined"
12190
+ },
12191
+ {
12192
+ "kind": "field",
12193
+ "name": "ifNotDefined",
12194
+ "type": {
12195
+ "text": "string"
12196
+ },
12197
+ "description": "The comma-separated list of fields that must all be undefined on a product for the template to apply.\nFor example, a template with the following attribute only applies to products that have neither an `ec_brand` nor an `ec_rating` field:\n`if-not-defined=\"ec_brand,ec_rating\"`",
12198
+ "attribute": "if-not-defined"
12199
+ },
12182
12200
  {
12183
12201
  "kind": "field",
12184
12202
  "name": "mustMatch",
@@ -12210,6 +12228,22 @@
12210
12228
  }
12211
12229
  ],
12212
12230
  "attributes": [
12231
+ {
12232
+ "name": "if-defined",
12233
+ "type": {
12234
+ "text": "string"
12235
+ },
12236
+ "description": "The comma-separated list of fields that must all be defined on a product for the template to apply.\nFor example, a template with the following attribute only applies to products whose `ec_brand` and `ec_rating` fields are both defined:\n`if-defined=\"ec_brand,ec_rating\"`",
12237
+ "fieldName": "ifDefined"
12238
+ },
12239
+ {
12240
+ "name": "if-not-defined",
12241
+ "type": {
12242
+ "text": "string"
12243
+ },
12244
+ "description": "The comma-separated list of fields that must all be undefined on a product for the template to apply.\nFor example, a template with the following attribute only applies to products that have neither an `ec_brand` nor an `ec_rating` field:\n`if-not-defined=\"ec_brand,ec_rating\"`",
12245
+ "fieldName": "ifNotDefined"
12246
+ },
12213
12247
  {
12214
12248
  "name": "must-match",
12215
12249
  "fieldName": "mustMatch"
@@ -12949,6 +12983,16 @@
12949
12983
  "readonly": true,
12950
12984
  "default": "[]"
12951
12985
  },
12986
+ {
12987
+ "kind": "field",
12988
+ "name": "inertElements",
12989
+ "type": {
12990
+ "text": "Element[]"
12991
+ },
12992
+ "privacy": "private",
12993
+ "readonly": true,
12994
+ "default": "[]"
12995
+ },
12952
12996
  {
12953
12997
  "kind": "method",
12954
12998
  "name": "hide",
@@ -14931,6 +14975,12 @@
14931
14975
  "declarations": [],
14932
14976
  "exports": []
14933
14977
  },
14978
+ {
14979
+ "kind": "javascript-module",
14980
+ "path": "src/components/common/query-error/icons.ts",
14981
+ "declarations": [],
14982
+ "exports": []
14983
+ },
14934
14984
  {
14935
14985
  "kind": "javascript-module",
14936
14986
  "path": "src/components/common/query-error/known-error-types.ts",
@@ -20603,7 +20653,7 @@
20603
20653
  "type": {
20604
20654
  "text": "string"
20605
20655
  },
20606
- "description": "The field that, when defined on a child result, allows this template to be applied.\n\nFor example, a template with the following attribute only applies to child results whose `filetype` and `sourcetype` fields are defined:\n`if-defined=\"filetype,sourcetype\"`",
20656
+ "description": "The comma-separated list of fields that must all be defined on a child result for the template to apply.\n\nFor example, a template with the following attribute only applies to child results whose `filetype` and `sourcetype` fields are both defined:\n`if-defined=\"filetype,sourcetype\"`",
20607
20657
  "attribute": "if-defined"
20608
20658
  },
20609
20659
  {
@@ -20612,7 +20662,7 @@
20612
20662
  "type": {
20613
20663
  "text": "string"
20614
20664
  },
20615
- "description": "The field that, when defined on a child result, prevents this template from being applied.\n\nFor example, a template with the following attribute only applies to child results whose `filetype` and `sourcetype` fields are NOT defined:\n`if-not-defined=\"filetype,sourcetype\"`",
20665
+ "description": "The comma-separated list of fields that must all be undefined on a child result for the template to apply.\n\nFor example, a template with the following attribute only applies to child results that have neither a `filetype` nor a `sourcetype` field:\n`if-not-defined=\"filetype,sourcetype\"`",
20616
20666
  "attribute": "if-not-defined"
20617
20667
  },
20618
20668
  {
@@ -20660,7 +20710,7 @@
20660
20710
  "type": {
20661
20711
  "text": "string"
20662
20712
  },
20663
- "description": "The field that, when defined on a child result, allows this template to be applied.\n\nFor example, a template with the following attribute only applies to child results whose `filetype` and `sourcetype` fields are defined:\n`if-defined=\"filetype,sourcetype\"`",
20713
+ "description": "The comma-separated list of fields that must all be defined on a child result for the template to apply.\n\nFor example, a template with the following attribute only applies to child results whose `filetype` and `sourcetype` fields are both defined:\n`if-defined=\"filetype,sourcetype\"`",
20664
20714
  "fieldName": "ifDefined"
20665
20715
  },
20666
20716
  {
@@ -20668,7 +20718,7 @@
20668
20718
  "type": {
20669
20719
  "text": "string"
20670
20720
  },
20671
- "description": "The field that, when defined on a child result, prevents this template from being applied.\n\nFor example, a template with the following attribute only applies to child results whose `filetype` and `sourcetype` fields are NOT defined:\n`if-not-defined=\"filetype,sourcetype\"`",
20721
+ "description": "The comma-separated list of fields that must all be undefined on a child result for the template to apply.\n\nFor example, a template with the following attribute only applies to child results that have neither a `filetype` nor a `sourcetype` field:\n`if-not-defined=\"filetype,sourcetype\"`",
20672
20722
  "fieldName": "ifNotDefined"
20673
20723
  },
20674
20724
  {
@@ -21346,6 +21396,24 @@
21346
21396
  "default": "[]",
21347
21397
  "description": "A function that must return true on results for the result template to apply.\nSet programmatically before initialization, not via attribute.\n\nFor example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n`document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`"
21348
21398
  },
21399
+ {
21400
+ "kind": "field",
21401
+ "name": "ifDefined",
21402
+ "type": {
21403
+ "text": "string"
21404
+ },
21405
+ "description": "The comma-separated list of fields that must all be defined on a result for the template to apply.\n\nFor example, a template with the following attribute only applies to results whose `author` and `date` fields are both defined: `if-defined=\"author,date\"`",
21406
+ "attribute": "if-defined"
21407
+ },
21408
+ {
21409
+ "kind": "field",
21410
+ "name": "ifNotDefined",
21411
+ "type": {
21412
+ "text": "string"
21413
+ },
21414
+ "description": "The comma-separated list of fields that must all be undefined on a result for the template to apply.\n\nFor example, a template with the following attribute only applies to results that have neither an `author` nor a `date` field: `if-not-defined=\"author,date\"`",
21415
+ "attribute": "if-not-defined"
21416
+ },
21349
21417
  {
21350
21418
  "kind": "field",
21351
21419
  "name": "mustMatch",
@@ -21377,6 +21445,22 @@
21377
21445
  }
21378
21446
  ],
21379
21447
  "attributes": [
21448
+ {
21449
+ "name": "if-defined",
21450
+ "type": {
21451
+ "text": "string"
21452
+ },
21453
+ "description": "The comma-separated list of fields that must all be defined on a result for the template to apply.\n\nFor example, a template with the following attribute only applies to results whose `author` and `date` fields are both defined: `if-defined=\"author,date\"`",
21454
+ "fieldName": "ifDefined"
21455
+ },
21456
+ {
21457
+ "name": "if-not-defined",
21458
+ "type": {
21459
+ "text": "string"
21460
+ },
21461
+ "description": "The comma-separated list of fields that must all be undefined on a result for the template to apply.\n\nFor example, a template with the following attribute only applies to results that have neither an `author` nor a `date` field: `if-not-defined=\"author,date\"`",
21462
+ "fieldName": "ifNotDefined"
21463
+ },
21380
21464
  {
21381
21465
  "name": "must-match",
21382
21466
  "fieldName": "mustMatch"
@@ -27206,6 +27290,24 @@
27206
27290
  "default": "[]",
27207
27291
  "description": "A function that must return true on results for the result template to apply.\nSet programmatically before initialization, not via attribute.\n\nFor example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n`document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`"
27208
27292
  },
27293
+ {
27294
+ "kind": "field",
27295
+ "name": "ifDefined",
27296
+ "type": {
27297
+ "text": "string"
27298
+ },
27299
+ "description": "The comma-separated list of fields that must all be defined on a result for the template to apply.\nFor example, a template with the following attribute only applies to results whose `author` and `date` fields are both defined:\n`if-defined=\"author,date\"`",
27300
+ "attribute": "if-defined"
27301
+ },
27302
+ {
27303
+ "kind": "field",
27304
+ "name": "ifNotDefined",
27305
+ "type": {
27306
+ "text": "string"
27307
+ },
27308
+ "description": "The comma-separated list of fields that must all be undefined on a result for the template to apply.\nFor example, a template with the following attribute only applies to results that have neither an `author` nor a `date` field:\n`if-not-defined=\"author,date\"`",
27309
+ "attribute": "if-not-defined"
27310
+ },
27209
27311
  {
27210
27312
  "kind": "field",
27211
27313
  "name": "mustMatch",
@@ -27237,6 +27339,22 @@
27237
27339
  }
27238
27340
  ],
27239
27341
  "attributes": [
27342
+ {
27343
+ "name": "if-defined",
27344
+ "type": {
27345
+ "text": "string"
27346
+ },
27347
+ "description": "The comma-separated list of fields that must all be defined on a result for the template to apply.\nFor example, a template with the following attribute only applies to results whose `author` and `date` fields are both defined:\n`if-defined=\"author,date\"`",
27348
+ "fieldName": "ifDefined"
27349
+ },
27350
+ {
27351
+ "name": "if-not-defined",
27352
+ "type": {
27353
+ "text": "string"
27354
+ },
27355
+ "description": "The comma-separated list of fields that must all be undefined on a result for the template to apply.\nFor example, a template with the following attribute only applies to results that have neither an `author` nor a `date` field:\n`if-not-defined=\"author,date\"`",
27356
+ "fieldName": "ifNotDefined"
27357
+ },
27240
27358
  {
27241
27359
  "name": "must-match",
27242
27360
  "fieldName": "mustMatch"
@@ -30861,11 +30979,11 @@
30861
30979
  "declarations": [
30862
30980
  {
30863
30981
  "kind": "class",
30864
- "description": "The `atomic-facet-manager` is a component that manages facets by performing three key functions:\n\n1. **Sorting facets** - Reorders facets based on the search response to show the most relevant facets first.\n2. **Managing visibility** - Controls which facets should be visible or hidden based on available values and dependencies.\n3. **Managing collapse state** - Automatically expands or collapses facets based on the `collapse-facets-after` property.",
30982
+ "description": "The `atomic-facet-manager` is a component that manages facets by performing three key functions:\n\n1. **Sorting facets** - Reorders facets based on the search response to show the most relevant facets first.\n2. **Managing visibility** - Controls which facets should be visible or hidden based on available values and dependencies.\n3. **Managing collapse state** - Automatically expands or collapses facets based on the `collapse-facets-after` property.\n\nA facet wrapped in an `atomic-popover` is managed like any other facet, and its popover moves along with it.\nBecause a popover always displays its facet expanded, such a facet is never collapsed and does not count towards `collapse-facets-after`.",
30865
30983
  "name": "AtomicFacetManager",
30866
30984
  "slots": [
30867
30985
  {
30868
- "description": "Facet components are slotted within to leverage this functionality.",
30986
+ "description": "Facet components, or `atomic-popover` components wrapping a facet, are slotted within to leverage this functionality.",
30869
30987
  "name": "default"
30870
30988
  }
30871
30989
  ],
@@ -30918,7 +31036,7 @@
30918
31036
  },
30919
31037
  "privacy": "public",
30920
31038
  "default": "4",
30921
- "description": "The number of expanded facets inside the manager.\nRemaining facets are automatically collapsed.\n\nUsing the value `0` collapses all facets.\nUsing the value `-1` disables the feature and keeps all facets expanded. Useful when you want to set the collapse state for each facet individually.",
31039
+ "description": "The number of expanded facets inside the manager.\nRemaining facets are automatically collapsed.\n\nUsing the value `0` collapses all facets.\nUsing the value `-1` disables the feature and keeps all facets expanded. Useful when you want to set the collapse state for each facet individually.\n\nFacets wrapped in an `atomic-popover` are always expanded and are not counted.",
30922
31040
  "attribute": "collapse-facets-after",
30923
31041
  "reflects": true
30924
31042
  },
@@ -31018,7 +31136,7 @@
31018
31136
  "text": "number"
31019
31137
  },
31020
31138
  "default": "4",
31021
- "description": "The number of expanded facets inside the manager.\nRemaining facets are automatically collapsed.\n\nUsing the value `0` collapses all facets.\nUsing the value `-1` disables the feature and keeps all facets expanded. Useful when you want to set the collapse state for each facet individually.",
31139
+ "description": "The number of expanded facets inside the manager.\nRemaining facets are automatically collapsed.\n\nUsing the value `0` collapses all facets.\nUsing the value `-1` disables the feature and keeps all facets expanded. Useful when you want to set the collapse state for each facet individually.\n\nFacets wrapped in an `atomic-popover` are always expanded and are not counted.",
31022
31140
  "fieldName": "collapseFacetsAfter"
31023
31141
  }
31024
31142
  ],
@@ -38324,6 +38442,24 @@
38324
38442
  "default": "[]",
38325
38443
  "description": "A function that must return true on results for the result template to apply.\nSet programmatically before initialization, not via attribute.\n\nFor example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n`document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`"
38326
38444
  },
38445
+ {
38446
+ "kind": "field",
38447
+ "name": "ifDefined",
38448
+ "type": {
38449
+ "text": "string"
38450
+ },
38451
+ "description": "The comma-separated list of fields that must all be defined on a child result for the template to apply.\nFor example, a template with the following attribute only applies to child results whose `author` and `date` fields are both defined:\n`if-defined=\"author,date\"`",
38452
+ "attribute": "if-defined"
38453
+ },
38454
+ {
38455
+ "kind": "field",
38456
+ "name": "ifNotDefined",
38457
+ "type": {
38458
+ "text": "string"
38459
+ },
38460
+ "description": "The comma-separated list of fields that must all be undefined on a child result for the template to apply.\nFor example, a template with the following attribute only applies to child results that have neither an `author` nor a `date` field:\n`if-not-defined=\"author,date\"`",
38461
+ "attribute": "if-not-defined"
38462
+ },
38327
38463
  {
38328
38464
  "kind": "field",
38329
38465
  "name": "mustMatch",
@@ -38355,6 +38491,22 @@
38355
38491
  }
38356
38492
  ],
38357
38493
  "attributes": [
38494
+ {
38495
+ "name": "if-defined",
38496
+ "type": {
38497
+ "text": "string"
38498
+ },
38499
+ "description": "The comma-separated list of fields that must all be defined on a child result for the template to apply.\nFor example, a template with the following attribute only applies to child results whose `author` and `date` fields are both defined:\n`if-defined=\"author,date\"`",
38500
+ "fieldName": "ifDefined"
38501
+ },
38502
+ {
38503
+ "name": "if-not-defined",
38504
+ "type": {
38505
+ "text": "string"
38506
+ },
38507
+ "description": "The comma-separated list of fields that must all be undefined on a child result for the template to apply.\nFor example, a template with the following attribute only applies to child results that have neither an `author` nor a `date` field:\n`if-not-defined=\"author,date\"`",
38508
+ "fieldName": "ifNotDefined"
38509
+ },
38358
38510
  {
38359
38511
  "name": "must-match",
38360
38512
  "fieldName": "mustMatch"
@@ -42366,6 +42518,24 @@
42366
42518
  "default": "[]",
42367
42519
  "description": "A function that must return true on results for the result template to apply.\nSet programmatically before initialization, not via attribute.\n\nFor example, the following targets a template and sets a condition to make it apply only to results whose `title` contains `singapore`:\n`document.querySelector('#target-template').conditions = [(result) => /singapore/i.test(result.title)];`"
42368
42520
  },
42521
+ {
42522
+ "kind": "field",
42523
+ "name": "ifDefined",
42524
+ "type": {
42525
+ "text": "string"
42526
+ },
42527
+ "description": "The comma-separated list of fields that must all be defined on a result for the template to apply.\nFor example, a template with the following attribute only applies to results whose `author` and `date` fields are both defined:\n`if-defined=\"author,date\"`",
42528
+ "attribute": "if-defined"
42529
+ },
42530
+ {
42531
+ "kind": "field",
42532
+ "name": "ifNotDefined",
42533
+ "type": {
42534
+ "text": "string"
42535
+ },
42536
+ "description": "The comma-separated list of fields that must all be undefined on a result for the template to apply.\nFor example, a template with the following attribute only applies to results that have neither an `author` nor a `date` field:\n`if-not-defined=\"author,date\"`",
42537
+ "attribute": "if-not-defined"
42538
+ },
42369
42539
  {
42370
42540
  "kind": "field",
42371
42541
  "name": "mustMatch",
@@ -42397,6 +42567,22 @@
42397
42567
  }
42398
42568
  ],
42399
42569
  "attributes": [
42570
+ {
42571
+ "name": "if-defined",
42572
+ "type": {
42573
+ "text": "string"
42574
+ },
42575
+ "description": "The comma-separated list of fields that must all be defined on a result for the template to apply.\nFor example, a template with the following attribute only applies to results whose `author` and `date` fields are both defined:\n`if-defined=\"author,date\"`",
42576
+ "fieldName": "ifDefined"
42577
+ },
42578
+ {
42579
+ "name": "if-not-defined",
42580
+ "type": {
42581
+ "text": "string"
42582
+ },
42583
+ "description": "The comma-separated list of fields that must all be undefined on a result for the template to apply.\nFor example, a template with the following attribute only applies to results that have neither an `author` nor a `date` field:\n`if-not-defined=\"author,date\"`",
42584
+ "fieldName": "ifNotDefined"
42585
+ },
42400
42586
  {
42401
42587
  "name": "must-match",
42402
42588
  "fieldName": "mustMatch"
@@ -79,6 +79,7 @@ class AtomicCommerceBreadbox extends external_lit_namespaceObject.LitElement {
79
79
  this.adaptBreadcrumbs();
80
80
  }
81
81
  disconnectedCallback() {
82
+ super.disconnectedCallback();
82
83
  this.resizeObserver?.disconnect();
83
84
  }
84
85
  get breadcrumbs() {
@@ -85,7 +85,7 @@ function _ts_metadata(metadataKey, metadataValue) {
85
85
  class AtomicCommerceCategoryFacet extends external_lit_namespaceObject.LitElement {
86
86
  initialize() {
87
87
  this.validateFacet();
88
- this.facet && (0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this.facet, this.displayName, (msg)=>{
88
+ this.facet && (0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this, this.facet, this.displayName, (msg)=>{
89
89
  this.facetSearchAriaMessage.message = msg;
90
90
  }, this.bindings.i18n);
91
91
  }
@@ -242,7 +242,7 @@ class AtomicCommerceFacet extends external_lit_namespaceObject.LitElement {
242
242
  if (!this.headerFocus) this.headerFocus = new accessibility_utils_cjs_namespaceObject.FocusTargetController(this, this.bindings);
243
243
  }
244
244
  initAriaLive() {
245
- (0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this.facet, this.displayName, (msg)=>{
245
+ (0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this, this.facet, this.displayName, (msg)=>{
246
246
  this.ariaLiveRegion.message = msg;
247
247
  }, this.bindings.i18n);
248
248
  }
@@ -51,10 +51,7 @@ function _ts_metadata(metadataKey, metadataValue) {
51
51
  class AtomicProductFieldCondition extends (0, light_dom_cjs_namespaceObject.LightDomMixin)(external_lit_namespaceObject.LitElement) {
52
52
  initialize() {}
53
53
  get conditions() {
54
- return [
55
- ...(0, template_utils_cjs_namespaceObject.makeDefinedConditions)(this.ifDefined, this.ifNotDefined, commerce_namespaceObject.ProductTemplatesHelpers),
56
- ...(0, template_utils_cjs_namespaceObject.makeMatchConditions)(this.mustMatch, this.mustNotMatch, commerce_namespaceObject.ProductTemplatesHelpers)
57
- ];
54
+ return (0, template_utils_cjs_namespaceObject.makeFieldConditions)(this, commerce_namespaceObject.ProductTemplatesHelpers);
58
55
  }
59
56
  render() {
60
57
  const product = this.productController.item;
@@ -51,7 +51,7 @@ function _ts_metadata(metadataKey, metadataValue) {
51
51
  class AtomicProductTemplate extends external_lit_namespaceObject.LitElement {
52
52
  connectedCallback() {
53
53
  super.connectedCallback();
54
- this.productTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.makeMatchConditions)(this.mustMatch, this.mustNotMatch, commerce_namespaceObject.ProductTemplatesHelpers);
54
+ this.productTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.makeFieldConditions)(this, commerce_namespaceObject.ProductTemplatesHelpers);
55
55
  }
56
56
  async getTemplate() {
57
57
  return this.productTemplateController.getTemplate(this.conditions);
@@ -82,6 +82,20 @@ _ts_decorate([
82
82
  }),
83
83
  _ts_metadata("design:type", Array)
84
84
  ], AtomicProductTemplate.prototype, "conditions", void 0);
85
+ _ts_decorate([
86
+ (0, decorators_js_namespaceObject.property)({
87
+ type: String,
88
+ attribute: 'if-defined'
89
+ }),
90
+ _ts_metadata("design:type", String)
91
+ ], AtomicProductTemplate.prototype, "ifDefined", void 0);
92
+ _ts_decorate([
93
+ (0, decorators_js_namespaceObject.property)({
94
+ type: String,
95
+ attribute: 'if-not-defined'
96
+ }),
97
+ _ts_metadata("design:type", String)
98
+ ], AtomicProductTemplate.prototype, "ifNotDefined", void 0);
85
99
  _ts_decorate([
86
100
  (0, props_utils_cjs_namespaceObject.mapProperty)({
87
101
  splitValues: true,
@@ -60,6 +60,10 @@ class AtomicFocusTrap extends (0, light_dom_cjs_namespaceObject.LightDomMixin)(e
60
60
  if (element.hasAttribute('aria-hidden') || element.hasAttribute('aria-live') || 'atomic-aria-live' === element.tagName.toLowerCase()) return;
61
61
  element.setAttribute('aria-hidden', 'true');
62
62
  this.hiddenElements.push(element);
63
+ if (!element.hasAttribute('inert')) {
64
+ element.setAttribute('inert', '');
65
+ this.inertElements.push(element);
66
+ }
63
67
  }
64
68
  showAll() {
65
69
  let el = this.hiddenElements.pop();
@@ -67,6 +71,11 @@ class AtomicFocusTrap extends (0, light_dom_cjs_namespaceObject.LightDomMixin)(e
67
71
  el.removeAttribute('aria-hidden');
68
72
  el = this.hiddenElements.pop();
69
73
  }
74
+ let inertElement = this.inertElements.pop();
75
+ while(inertElement){
76
+ inertElement.removeAttribute('inert');
77
+ inertElement = this.inertElements.pop();
78
+ }
70
79
  }
71
80
  hideSiblingsRecursively(element) {
72
81
  const parent = (0, utils_cjs_namespaceObject.getParent)(element);
@@ -100,6 +109,7 @@ class AtomicFocusTrap extends (0, light_dom_cjs_namespaceObject.LightDomMixin)(e
100
109
  this.showSelf();
101
110
  if (!isInitialLoad) {
102
111
  await (0, utils_cjs_namespaceObject.defer)();
112
+ if (!this.active) return;
103
113
  (0, accessibility_utils_cjs_namespaceObject.getFirstFocusableDescendant)(this)?.focus();
104
114
  }
105
115
  this.hideSiblingsRecursively(this);
@@ -113,7 +123,7 @@ class AtomicFocusTrap extends (0, light_dom_cjs_namespaceObject.LightDomMixin)(e
113
123
  return this.container ?? this;
114
124
  }
115
125
  constructor(...args){
116
- super(...args), this.active = false, this.shouldHideSelf = true, this.scope = document.body, this.hiddenElements = [], this.onFocusChanged = (e)=>{
126
+ super(...args), this.active = false, this.shouldHideSelf = true, this.scope = document.body, this.hiddenElements = [], this.inertElements = [], this.onFocusChanged = (e)=>{
117
127
  if (!e.target || !this.active) return;
118
128
  const focusedElement = (0, utils_cjs_namespaceObject.getFocusedElement)();
119
129
  if (focusedElement && (0, utils_cjs_namespaceObject.isAncestorOf)(this, focusedElement)) return;
@@ -96,11 +96,15 @@ function buildCommonLayout(element, mobileBreakpoint, layoutWebComponentTagName,
96
96
  }
97
97
  }`;
98
98
  };
99
- const horizontalFacets = ()=>`${mediaQuerySelector} {
100
- ${layoutSelector} ${(0, external_atomic_layout_section_utils_cjs_namespaceObject.sectionSelector)('horizontal-facets')} > atomic-popover:not(.atomic-hidden) {
99
+ const horizontalFacets = ()=>{
100
+ const horizontalFacetsSelector = `${layoutSelector} ${(0, external_atomic_layout_section_utils_cjs_namespaceObject.sectionSelector)('horizontal-facets')}`;
101
+ return `${mediaQuerySelector} {
102
+ ${horizontalFacetsSelector} > atomic-popover:not(.atomic-hidden),
103
+ ${horizontalFacetsSelector} > atomic-facet-manager > atomic-popover:not(.atomic-hidden) {
101
104
  display: block;
102
105
  }
103
106
  }`;
107
+ };
104
108
  return [
105
109
  display,
106
110
  search,
@@ -63,9 +63,22 @@ function isAutomaticFacetGenerator(element) {
63
63
  function isPseudoFacet(el) {
64
64
  return 'facetId' in el;
65
65
  }
66
+ function isPopover(element) {
67
+ return 'ATOMIC-POPOVER' === element.tagName;
68
+ }
69
+ function isFacetNestedInPopover(facet) {
70
+ return !!facet.parentElement && isPopover(facet.parentElement);
71
+ }
72
+ function getFacetElementToReorder(facet) {
73
+ return isFacetNestedInPopover(facet) ? facet.parentElement : facet;
74
+ }
66
75
  function getFacetsInChildren(parent) {
67
- const facets = Array.from(parent.children).filter((child)=>isPseudoFacet(child));
68
- return facets;
76
+ return Array.from(parent.children).flatMap((child)=>{
77
+ if (isPseudoFacet(child)) return [
78
+ child
79
+ ];
80
+ return isPopover(child) ? Array.from(child.children).filter(isPseudoFacet) : [];
81
+ });
69
82
  }
70
83
  function getAutomaticFacetGenerator(parent) {
71
84
  return Array.from(parent.children).find(isAutomaticFacetGenerator);
@@ -90,27 +103,33 @@ function triageFacetsByParents(facets, ...parents) {
90
103
  __webpack_require__.d(__webpack_exports__, {
91
104
  collapseFacetsAfter: ()=>collapseFacetsAfter,
92
105
  getAutomaticFacetGenerator: ()=>getAutomaticFacetGenerator,
106
+ getFacetElementToReorder: ()=>getFacetElementToReorder,
93
107
  getFacetsInChildren: ()=>getFacetsInChildren,
94
108
  getFirstNewFacetValueIndex: ()=>getFirstNewFacetValueIndex,
95
109
  isAutomaticFacetGenerator: ()=>isAutomaticFacetGenerator,
110
+ isFacetNestedInPopover: ()=>isFacetNestedInPopover,
96
111
  shouldDisplayInputForFacetRange: ()=>shouldDisplayInputForFacetRange,
97
112
  sortFacetVisibility: ()=>sortFacetVisibility,
98
113
  triageFacetsByParents: ()=>triageFacetsByParents
99
114
  });
100
115
  exports.collapseFacetsAfter = __webpack_exports__.collapseFacetsAfter;
101
116
  exports.getAutomaticFacetGenerator = __webpack_exports__.getAutomaticFacetGenerator;
117
+ exports.getFacetElementToReorder = __webpack_exports__.getFacetElementToReorder;
102
118
  exports.getFacetsInChildren = __webpack_exports__.getFacetsInChildren;
103
119
  exports.getFirstNewFacetValueIndex = __webpack_exports__.getFirstNewFacetValueIndex;
104
120
  exports.isAutomaticFacetGenerator = __webpack_exports__.isAutomaticFacetGenerator;
121
+ exports.isFacetNestedInPopover = __webpack_exports__.isFacetNestedInPopover;
105
122
  exports.shouldDisplayInputForFacetRange = __webpack_exports__.shouldDisplayInputForFacetRange;
106
123
  exports.sortFacetVisibility = __webpack_exports__.sortFacetVisibility;
107
124
  exports.triageFacetsByParents = __webpack_exports__.triageFacetsByParents;
108
125
  for(var __rspack_i in __webpack_exports__)if (-1 === [
109
126
  "collapseFacetsAfter",
110
127
  "getAutomaticFacetGenerator",
128
+ "getFacetElementToReorder",
111
129
  "getFacetsInChildren",
112
130
  "getFirstNewFacetValueIndex",
113
131
  "isAutomaticFacetGenerator",
132
+ "isFacetNestedInPopover",
114
133
  "shouldDisplayInputForFacetRange",
115
134
  "sortFacetVisibility",
116
135
  "triageFacetsByParents"
@@ -31,15 +31,28 @@ __webpack_require__.d(__webpack_exports__, {
31
31
  announceFacetSearchResultsWithAriaLive: ()=>announceFacetSearchResultsWithAriaLive
32
32
  });
33
33
  const external_facet_search_utils_cjs_namespaceObject = require("./facet-search-utils.cjs");
34
- function announceFacetSearchResultsWithAriaLive(facet, label, setAriaLive, i18n) {
34
+ function announceFacetSearchResultsWithAriaLive(host, facet, label, setAriaLive, i18n) {
35
35
  let prevState = facet.state.facetSearch;
36
- facet.subscribe(()=>{
37
- const nextState = facet.state.facetSearch;
38
- if ((0, external_facet_search_utils_cjs_namespaceObject.shouldUpdateFacetSearchComponent)(nextState, prevState) && nextState.query) setAriaLive(i18n.t('facet-search-results-count', {
39
- count: nextState.values.length,
40
- label
41
- }));
42
- prevState = nextState;
36
+ let unsubscribe;
37
+ host.addController({
38
+ hostConnected () {
39
+ if (unsubscribe) return;
40
+ let subscribing = true;
41
+ unsubscribe = facet.subscribe(()=>{
42
+ const nextState = facet.state.facetSearch;
43
+ if (!subscribing && (0, external_facet_search_utils_cjs_namespaceObject.shouldUpdateFacetSearchComponent)(nextState, prevState) && nextState.query) setAriaLive(i18n.t('facet-search-results-count', {
44
+ count: nextState.values.length,
45
+ label
46
+ }));
47
+ prevState = nextState;
48
+ });
49
+ subscribing = false;
50
+ },
51
+ hostDisconnected () {
52
+ if (host.isConnected) return;
53
+ unsubscribe?.();
54
+ unsubscribe = void 0;
55
+ }
43
56
  });
44
57
  }
45
58
  exports.announceFacetSearchResultsWithAriaLive = __webpack_exports__.announceFacetSearchResultsWithAriaLive;
@@ -37,43 +37,24 @@ var __webpack_require__ = {};
37
37
  var __webpack_exports__ = {};
38
38
  __webpack_require__.r(__webpack_exports__);
39
39
  __webpack_require__.d(__webpack_exports__, {
40
+ loadQueryErrorIcon: ()=>loadQueryErrorIcon,
40
41
  renderQueryErrorIcon: ()=>renderQueryErrorIcon
41
42
  });
42
43
  const external_lit_namespaceObject = require("lit");
43
- const cannot_access_cjs_namespaceObject = require("../../../images/cannot-access.cjs");
44
- var cannot_access_cjs_default = /*#__PURE__*/ __webpack_require__.n(cannot_access_cjs_namespaceObject);
45
- const indexing_cjs_namespaceObject = require("../../../images/indexing.cjs");
46
- var indexing_cjs_default = /*#__PURE__*/ __webpack_require__.n(indexing_cjs_namespaceObject);
44
+ const until_js_namespaceObject = require("lit/directives/until.js");
47
45
  const no_connection_cjs_namespaceObject = require("../../../images/no-connection.cjs");
48
46
  var no_connection_cjs_default = /*#__PURE__*/ __webpack_require__.n(no_connection_cjs_namespaceObject);
49
- const search_inactive_cjs_namespaceObject = require("../../../images/search-inactive.cjs");
50
- var search_inactive_cjs_default = /*#__PURE__*/ __webpack_require__.n(search_inactive_cjs_namespaceObject);
51
- const something_wrong_cjs_namespaceObject = require("../../../images/something-wrong.cjs");
52
- var something_wrong_cjs_default = /*#__PURE__*/ __webpack_require__.n(something_wrong_cjs_namespaceObject);
53
47
  require("../atomic-icon/atomic-icon.cjs");
54
- const renderQueryErrorIcon = ({ props })=>{
55
- const getIconFromErrorType = ()=>{
56
- switch(props.errorType){
57
- case 'Disconnected':
58
- return no_connection_cjs_default();
59
- case 'NoEndpointsException':
60
- return indexing_cjs_default();
61
- case 'InvalidTokenException':
62
- return cannot_access_cjs_default();
63
- case 'OrganizationIsPausedException':
64
- return search_inactive_cjs_default();
65
- default:
66
- return something_wrong_cjs_default();
67
- }
68
- };
69
- return (0, external_lit_namespaceObject.html)`<atomic-icon
48
+ const loadQueryErrorIcon = (errorType, loadIcons = ()=>import("./icons.cjs"))=>'Disconnected' === errorType ? no_connection_cjs_default() : loadIcons().then(({ getQueryErrorIcon })=>getQueryErrorIcon(errorType)).catch(()=>'');
49
+ const renderQueryErrorIcon = ({ props })=>(0, external_lit_namespaceObject.html)`<atomic-icon
70
50
  part="icon"
71
- icon=${getIconFromErrorType()}
51
+ icon=${(0, until_js_namespaceObject.until)(loadQueryErrorIcon(props.errorType), '')}
72
52
  class="w-1/2 max-w-lg"
73
53
  ></atomic-icon>`;
74
- };
54
+ exports.loadQueryErrorIcon = __webpack_exports__.loadQueryErrorIcon;
75
55
  exports.renderQueryErrorIcon = __webpack_exports__.renderQueryErrorIcon;
76
56
  for(var __rspack_i in __webpack_exports__)if (-1 === [
57
+ "loadQueryErrorIcon",
77
58
  "renderQueryErrorIcon"
78
59
  ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
79
60
  Object.defineProperty(exports, '__esModule', {