@coveo/atomic 3.61.5 → 3.63.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 (92) hide show
  1. package/custom-elements.json +189 -20
  2. package/dist/cjs/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.cjs +19 -7
  3. package/dist/cjs/components/commerce/atomic-commerce-interface/atomic-commerce-interface.cjs +25 -4
  4. package/dist/cjs/components/commerce/atomic-commerce-pager/atomic-commerce-pager.cjs +3 -2
  5. package/dist/cjs/components/commerce/atomic-commerce-products-per-page/atomic-commerce-products-per-page.cjs +1 -1
  6. package/dist/cjs/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.cjs +25 -4
  7. package/dist/cjs/components/common/facets/category-facet/active-value.cjs +69 -0
  8. package/dist/cjs/components/common/facets/category-facet/selected-value.cjs +78 -0
  9. package/dist/cjs/components/common/facets/category-facet/value-link.cjs +5 -6
  10. package/dist/cjs/components/common/interface/i18n.cjs +6 -2
  11. package/dist/cjs/components/common/interface/interface-controller.cjs +8 -4
  12. package/dist/cjs/components/common/pager/pager-fit-controller.cjs +72 -0
  13. package/dist/cjs/components/insight/atomic-insight-pager/atomic-insight-pager.cjs +3 -2
  14. package/dist/cjs/components/search/atomic-category-facet/atomic-category-facet.cjs +19 -8
  15. package/dist/cjs/components/search/atomic-pager/atomic-pager.cjs +3 -2
  16. package/dist/cjs/components/search/atomic-result-date/atomic-result-date.cjs +11 -16
  17. package/dist/cjs/components/search/atomic-results-per-page/atomic-results-per-page.cjs +1 -1
  18. package/dist/cjs/generated/dayjs-locales-data.cjs +43 -43
  19. package/dist/cjs/global/environment.cjs +1 -1
  20. package/dist/cjs/utils/dayjs-locales.cjs +23 -9
  21. package/dist/cjs/utils/field-utils.cjs +5 -1
  22. package/dist/cjs/{components/common/facets/category-facet/parent-value-link.cjs → utils/locale-utils.cjs} +14 -11
  23. package/dist/cjs/versions.cjs +1 -1
  24. package/dist/esm/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.js +19 -7
  25. package/dist/esm/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +25 -4
  26. package/dist/esm/components/commerce/atomic-commerce-pager/atomic-commerce-pager.js +3 -2
  27. package/dist/esm/components/commerce/atomic-commerce-products-per-page/atomic-commerce-products-per-page.js +1 -1
  28. package/dist/esm/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +25 -4
  29. package/dist/esm/components/common/facets/category-facet/active-value.js +31 -0
  30. package/dist/esm/components/common/facets/category-facet/selected-value.js +30 -0
  31. package/dist/esm/components/common/facets/category-facet/value-link.js +5 -6
  32. package/dist/esm/components/common/interface/i18n.js +6 -2
  33. package/dist/esm/components/common/interface/interface-controller.js +8 -4
  34. package/dist/esm/components/common/pager/pager-fit-controller.js +34 -0
  35. package/dist/esm/components/insight/atomic-insight-pager/atomic-insight-pager.js +3 -2
  36. package/dist/esm/components/search/atomic-category-facet/atomic-category-facet.js +19 -8
  37. package/dist/esm/components/search/atomic-pager/atomic-pager.js +3 -2
  38. package/dist/esm/components/search/atomic-result-date/atomic-result-date.js +10 -15
  39. package/dist/esm/components/search/atomic-results-per-page/atomic-results-per-page.js +1 -1
  40. package/dist/esm/generated/dayjs-locales-data.js +43 -43
  41. package/dist/esm/global/environment.js +1 -1
  42. package/dist/esm/utils/dayjs-locales.js +23 -9
  43. package/dist/esm/utils/field-utils.js +5 -1
  44. package/dist/esm/utils/locale-utils.js +12 -0
  45. package/dist/esm/versions.js +1 -1
  46. package/dist/lang/cs.json +1 -1
  47. package/dist/lang/da.json +1 -1
  48. package/dist/lang/de.json +1 -1
  49. package/dist/lang/el.json +1 -1
  50. package/dist/lang/es.json +1 -1
  51. package/dist/lang/fi.json +1 -1
  52. package/dist/lang/hu.json +1 -1
  53. package/dist/lang/id.json +1 -1
  54. package/dist/lang/it.json +1 -1
  55. package/dist/lang/ja.json +1 -1
  56. package/dist/lang/ko.json +1 -1
  57. package/dist/lang/nl.json +1 -1
  58. package/dist/lang/no.json +1 -1
  59. package/dist/lang/pl.json +1 -1
  60. package/dist/lang/pt-BR.json +1 -1
  61. package/dist/lang/pt.json +1 -1
  62. package/dist/lang/ru.json +1 -1
  63. package/dist/lang/sv.json +1 -1
  64. package/dist/lang/th.json +1 -1
  65. package/dist/lang/tr.json +1 -1
  66. package/dist/lang/zh-CN.json +1 -1
  67. package/dist/lang/zh-TW.json +1 -1
  68. package/dist/lang/zh.json +1 -1
  69. package/dist/types/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.d.ts +7 -1
  70. package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +17 -0
  71. package/dist/types/components/commerce/atomic-commerce-pager/atomic-commerce-pager.d.ts +1 -0
  72. package/dist/types/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.d.ts +13 -0
  73. package/dist/types/components/common/facets/category-facet/active-value.d.ts +19 -0
  74. package/dist/types/components/common/facets/category-facet/selected-value.d.ts +22 -0
  75. package/dist/types/components/common/facets/category-facet/value-link.d.ts +0 -1
  76. package/dist/types/components/common/interface/i18n.d.ts +9 -5
  77. package/dist/types/components/common/pager/pager-fit-controller.d.ts +21 -0
  78. package/dist/types/components/common/suggestions/suggestion-manager.d.ts +1 -1
  79. package/dist/types/components/common/suggestions/suggestions-types.d.ts +1 -1
  80. package/dist/types/components/insight/atomic-insight-interface/atomic-insight-interface.d.ts +4 -0
  81. package/dist/types/components/insight/atomic-insight-pager/atomic-insight-pager.d.ts +1 -0
  82. package/dist/types/components/recommendations/atomic-recs-interface/atomic-recs-interface.d.ts +4 -0
  83. package/dist/types/components/search/atomic-category-facet/atomic-category-facet.d.ts +8 -2
  84. package/dist/types/components/search/atomic-pager/atomic-pager.d.ts +1 -0
  85. package/dist/types/components/search/atomic-result-date/atomic-result-date.d.ts +3 -0
  86. package/dist/types/components/search/atomic-search-interface/atomic-search-interface.d.ts +4 -0
  87. package/dist/types/utils/dayjs-locales.d.ts +1 -1
  88. package/dist/types/utils/field-utils.d.ts +1 -1
  89. package/dist/types/utils/locale-utils.d.ts +7 -0
  90. package/package.json +4 -4
  91. package/dist/esm/components/common/facets/category-facet/parent-value-link.js +0 -9
  92. package/dist/types/components/common/facets/category-facet/parent-value-link.d.ts +0 -6
@@ -500,25 +500,25 @@
500
500
  },
501
501
  {
502
502
  "kind": "javascript-module",
503
- "path": "src/generated/dayjs-locales-data.ts",
503
+ "path": "src/directives/hierarchical-path.ts",
504
504
  "declarations": [],
505
505
  "exports": []
506
506
  },
507
507
  {
508
508
  "kind": "javascript-module",
509
- "path": "src/directives/hierarchical-path.ts",
509
+ "path": "src/directives/localized-string.ts",
510
510
  "declarations": [],
511
511
  "exports": []
512
512
  },
513
513
  {
514
514
  "kind": "javascript-module",
515
- "path": "src/directives/localized-string.ts",
515
+ "path": "src/directives/multi-class-map.ts",
516
516
  "declarations": [],
517
517
  "exports": []
518
518
  },
519
519
  {
520
520
  "kind": "javascript-module",
521
- "path": "src/directives/multi-class-map.ts",
521
+ "path": "src/generated/dayjs-locales-data.ts",
522
522
  "declarations": [],
523
523
  "exports": []
524
524
  },
@@ -998,6 +998,12 @@
998
998
  "declarations": [],
999
999
  "exports": []
1000
1000
  },
1001
+ {
1002
+ "kind": "javascript-module",
1003
+ "path": "src/utils/locale-utils.ts",
1004
+ "declarations": [],
1005
+ "exports": []
1006
+ },
1001
1007
  {
1002
1008
  "kind": "javascript-module",
1003
1009
  "path": "src/utils/memoize.ts",
@@ -1712,6 +1718,22 @@
1712
1718
  "description": "The highlighted query inside the facet values.",
1713
1719
  "name": "search-highlight"
1714
1720
  },
1721
+ {
1722
+ "description": "The row displaying the currently selected value and the button that clears the facet.",
1723
+ "name": "selected-value"
1724
+ },
1725
+ {
1726
+ "description": "The pill displaying the currently selected value.",
1727
+ "name": "selected-value-pill"
1728
+ },
1729
+ {
1730
+ "description": "The button that clears the facet, displayed next to the selected value.",
1731
+ "name": "selected-value-clear-button"
1732
+ },
1733
+ {
1734
+ "description": "The icon of the button that clears the facet.",
1735
+ "name": "selected-value-clear-button-icon"
1736
+ },
1715
1737
  {
1716
1738
  "description": "The container surrounding the whole hierarchy of values.",
1717
1739
  "name": "parents"
@@ -1733,7 +1755,7 @@
1733
1755
  "name": "parent-button"
1734
1756
  },
1735
1757
  {
1736
- "description": "The clickable active parent displayed first within the last sub-parents.",
1758
+ "description": "The currently selected value, displayed last within the parents. Not interactive.",
1737
1759
  "name": "active-parent"
1738
1760
  },
1739
1761
  {
@@ -1923,6 +1945,11 @@
1923
1945
  "name": "renderHeader",
1924
1946
  "privacy": "private"
1925
1947
  },
1948
+ {
1949
+ "kind": "method",
1950
+ "name": "renderSelectedValue",
1951
+ "privacy": "private"
1952
+ },
1926
1953
  {
1927
1954
  "kind": "method",
1928
1955
  "name": "renderValuesTree",
@@ -2973,6 +3000,18 @@
2973
3000
  "attribute": "language",
2974
3001
  "reflects": true
2975
3002
  },
3003
+ {
3004
+ "kind": "field",
3005
+ "name": "localizeWithCountry",
3006
+ "type": {
3007
+ "text": "boolean"
3008
+ },
3009
+ "privacy": "public",
3010
+ "default": "false",
3011
+ "description": "Whether to localize the interface with the country of the commerce context as well as its\nlanguage, for example `fr-CA` rather than `fr`.\n\nNumber, currency, and date formatting then follow the country: with the `en` language and the\n`CA` country, a CAD price renders as `$1,000.10` rather than `CA$1,000.10`.\n\nWhen Atomic has translations for the regional locale (for example `pt-BR` or `zh-TW`), the\ninterface uses them instead of those of the language. To customize strings for such an\ninterface, register them under the regional locale.",
3012
+ "attribute": "localize-with-country",
3013
+ "reflects": true
3014
+ },
2976
3015
  {
2977
3016
  "kind": "field",
2978
3017
  "name": "engine",
@@ -3110,7 +3149,7 @@
3110
3149
  "description": "(Optional) The ISO-4217 currency code (for example, `USD`)."
3111
3150
  }
3112
3151
  ],
3113
- "description": "Updates the locale settings for the commerce interface and headless commerce\nengine. Only the provided parameters will be updated.\n\nCalling this method affects the localization of the interface as well as\nthe catalog configuration being used by the Commerce API. If the resulting\nlanguage-country-currency combination matches no existing catalog\nconfiguration in your Coveo organization, requests made through the\ncommerce engine will start failing."
3152
+ "description": "Updates the locale settings for the commerce interface and headless commerce\nengine. Only the provided parameters will be updated.\n\nCalling this method affects the localization of the interface as well as\nthe catalog configuration being used by the Commerce API. If the resulting\nlanguage-country-currency combination matches no existing catalog\nconfiguration in your Coveo organization, requests made through the\ncommerce engine will start failing.\n\nWith `localize-with-country`, the country also drives the number, currency, and\ndate formatting of the interface."
3114
3153
  },
3115
3154
  {
3116
3155
  "kind": "method",
@@ -3122,6 +3161,11 @@
3122
3161
  "name": "updateLanguage",
3123
3162
  "privacy": "public"
3124
3163
  },
3164
+ {
3165
+ "kind": "method",
3166
+ "name": "toggleLocalizeWithCountry",
3167
+ "privacy": "public"
3168
+ },
3125
3169
  {
3126
3170
  "kind": "method",
3127
3171
  "name": "updateIconAssetsPath",
@@ -3176,6 +3220,26 @@
3176
3220
  "name": "initLanguage",
3177
3221
  "privacy": "private"
3178
3222
  },
3223
+ {
3224
+ "kind": "method",
3225
+ "name": "getLocale",
3226
+ "privacy": "private",
3227
+ "parameters": [
3228
+ {
3229
+ "name": "language",
3230
+ "type": {
3231
+ "text": "string"
3232
+ }
3233
+ },
3234
+ {
3235
+ "name": "country",
3236
+ "optional": true,
3237
+ "type": {
3238
+ "text": "string"
3239
+ }
3240
+ }
3241
+ ]
3242
+ },
3179
3243
  {
3180
3244
  "kind": "method",
3181
3245
  "name": "initRequestStatus",
@@ -3297,6 +3361,15 @@
3297
3361
  "deprecated": "- This property will be removed in the next major version of\nAtomic (v4). Rather than using this property, set the initial language\nthrough the engine configuration when calling `initializeWithEngine`, and\nupdate the language as needed using the `updateLocale` method.",
3298
3362
  "fieldName": "language"
3299
3363
  },
3364
+ {
3365
+ "name": "localize-with-country",
3366
+ "type": {
3367
+ "text": "boolean"
3368
+ },
3369
+ "default": "false",
3370
+ "description": "Whether to localize the interface with the country of the commerce context as well as its\nlanguage, for example `fr-CA` rather than `fr`.\n\nNumber, currency, and date formatting then follow the country: with the `en` language and the\n`CA` country, a CAD price renders as `$1,000.10` rather than `CA$1,000.10`.\n\nWhen Atomic has translations for the regional locale (for example `pt-BR` or `zh-TW`), the\ninterface uses them instead of those of the language. To customize strings for such an\ninterface, register them under the regional locale.",
3371
+ "fieldName": "localizeWithCountry"
3372
+ },
3300
3373
  {
3301
3374
  "name": "reflect-state-in-url",
3302
3375
  "type": {
@@ -4279,6 +4352,12 @@
4279
4352
  "privacy": "protected",
4280
4353
  "default": "new AriaLiveRegionController(this, 'atomic-pager')"
4281
4354
  },
4355
+ {
4356
+ "kind": "field",
4357
+ "name": "pagerFit",
4358
+ "privacy": "private",
4359
+ "default": "new PagerFitController(this)"
4360
+ },
4282
4361
  {
4283
4362
  "kind": "field",
4284
4363
  "name": "previousButton",
@@ -5348,6 +5427,17 @@
5348
5427
  "attribute": "language",
5349
5428
  "reflects": true
5350
5429
  },
5430
+ {
5431
+ "kind": "field",
5432
+ "name": "localizeWithCountry",
5433
+ "type": {
5434
+ "text": "boolean"
5435
+ },
5436
+ "default": "false",
5437
+ "description": "Whether to localize the interface with the country of the commerce context as well as its\nlanguage, for example `fr-CA` rather than `fr`.\n\nNumber, currency, and date formatting then follow the country: with the `en` language and the\n`CA` country, a CAD price renders as `$1,000.10` rather than `CA$1,000.10`.",
5438
+ "attribute": "localize-with-country",
5439
+ "reflects": true
5440
+ },
5351
5441
  {
5352
5442
  "kind": "field",
5353
5443
  "name": "analytics",
@@ -5417,7 +5507,7 @@
5417
5507
  "description": "(Optional) The ISO-4217 currency code (for example, `USD`)."
5418
5508
  }
5419
5509
  ],
5420
- "description": "Updates the locale settings for the commerce recommendation interface and\nheadless commerce engine. Only the provided parameters will be updated.\n\nCalling this method affects the localization of the interface as well as\nthe catalog configuration being used by the Commerce API. If the resulting\nlanguage-country-currency combination matches no existing catalog\nconfiguration in your Coveo organization, requests made through the\ncommerce engine will start failing."
5510
+ "description": "Updates the locale settings for the commerce recommendation interface and\nheadless commerce engine. Only the provided parameters will be updated.\n\nCalling this method affects the localization of the interface as well as\nthe catalog configuration being used by the Commerce API. If the resulting\nlanguage-country-currency combination matches no existing catalog\nconfiguration in your Coveo organization, requests made through the\ncommerce engine will start failing.\n\nWith `localize-with-country`, the country also drives the number, currency, and\ndate formatting of the interface."
5421
5511
  },
5422
5512
  {
5423
5513
  "kind": "method",
@@ -5429,6 +5519,11 @@
5429
5519
  "name": "updateIconAssetsPath",
5430
5520
  "privacy": "public"
5431
5521
  },
5522
+ {
5523
+ "kind": "method",
5524
+ "name": "toggleLocalizeWithCountry",
5525
+ "privacy": "public"
5526
+ },
5432
5527
  {
5433
5528
  "kind": "method",
5434
5529
  "name": "updateLanguage",
@@ -5477,6 +5572,26 @@
5477
5572
  "name": "initLanguage",
5478
5573
  "privacy": "private"
5479
5574
  },
5575
+ {
5576
+ "kind": "method",
5577
+ "name": "getLocale",
5578
+ "privacy": "private",
5579
+ "parameters": [
5580
+ {
5581
+ "name": "language",
5582
+ "type": {
5583
+ "text": "string"
5584
+ }
5585
+ },
5586
+ {
5587
+ "name": "country",
5588
+ "optional": true,
5589
+ "type": {
5590
+ "text": "string"
5591
+ }
5592
+ }
5593
+ ]
5594
+ },
5480
5595
  {
5481
5596
  "kind": "method",
5482
5597
  "name": "isNewLocale",
@@ -5556,6 +5671,15 @@
5556
5671
  "deprecated": "- This property will be removed in the next major version of\nAtomic (v4). Rather than using this property, set the initial language\nthrough the engine configuration when calling `initializeWithEngine`, and\nupdate the language as needed using the `updateLocale` method.",
5557
5672
  "fieldName": "language"
5558
5673
  },
5674
+ {
5675
+ "name": "localize-with-country",
5676
+ "type": {
5677
+ "text": "boolean"
5678
+ },
5679
+ "default": "false",
5680
+ "description": "Whether to localize the interface with the country of the commerce context as well as its\nlanguage, for example `fr-CA` rather than `fr`.\n\nNumber, currency, and date formatting then follow the country: with the `en` language and the\n`CA` country, a CAD price renders as `$1,000.10` rather than `CA$1,000.10`.",
5681
+ "fieldName": "localizeWithCountry"
5682
+ },
5559
5683
  {
5560
5684
  "name": "analytics",
5561
5685
  "type": {
@@ -14741,6 +14865,12 @@
14741
14865
  "declarations": [],
14742
14866
  "exports": []
14743
14867
  },
14868
+ {
14869
+ "kind": "javascript-module",
14870
+ "path": "src/components/common/pager/pager-fit-controller.ts",
14871
+ "declarations": [],
14872
+ "exports": []
14873
+ },
14744
14874
  {
14745
14875
  "kind": "javascript-module",
14746
14876
  "path": "src/components/common/pager/pager-navigation.ts",
@@ -17074,7 +17204,7 @@
17074
17204
  },
17075
17205
  "privacy": "public",
17076
17206
  "default": "'en'",
17077
- "description": "The service insight interface language.",
17207
+ "description": "The service insight interface language.\n\nAccepts a language (`en`) or a [BCP 47](https://www.rfc-editor.org/info/bcp47) locale\n(`en-CA`). The region drives number, currency, and localized date formats, while\ntranslations use the closest available language.",
17078
17208
  "attribute": "language",
17079
17209
  "reflects": true
17080
17210
  },
@@ -17293,7 +17423,7 @@
17293
17423
  "text": "string"
17294
17424
  },
17295
17425
  "default": "'en'",
17296
- "description": "The service insight interface language.",
17426
+ "description": "The service insight interface language.\n\nAccepts a language (`en`) or a [BCP 47](https://www.rfc-editor.org/info/bcp47) locale\n(`en-CA`). The region drives number, currency, and localized date formats, while\ntranslations use the closest available language.",
17297
17427
  "fieldName": "language"
17298
17428
  },
17299
17429
  {
@@ -18496,6 +18626,12 @@
18496
18626
  "privacy": "protected",
18497
18627
  "default": "new AriaLiveRegionController(this, 'atomic-insight-pager')"
18498
18628
  },
18629
+ {
18630
+ "kind": "field",
18631
+ "name": "pagerFit",
18632
+ "privacy": "private",
18633
+ "default": "new PagerFitController(this)"
18634
+ },
18499
18635
  {
18500
18636
  "kind": "field",
18501
18637
  "name": "previousButton",
@@ -25852,7 +25988,7 @@
25852
25988
  },
25853
25989
  "privacy": "public",
25854
25990
  "default": "'en'",
25855
- "description": "The recommendation interface language.",
25991
+ "description": "The recommendation interface language.\n\nAccepts a language (`en`) or a [BCP 47](https://www.rfc-editor.org/info/bcp47) locale\n(`en-CA`). The region drives number, currency, and localized date formats, while\ntranslations use the closest available language.",
25856
25992
  "attribute": "language",
25857
25993
  "reflects": true
25858
25994
  },
@@ -26070,7 +26206,7 @@
26070
26206
  "text": "string"
26071
26207
  },
26072
26208
  "default": "'en'",
26073
- "description": "The recommendation interface language.",
26209
+ "description": "The recommendation interface language.\n\nAccepts a language (`en`) or a [BCP 47](https://www.rfc-editor.org/info/bcp47) locale\n(`en-CA`). The region drives number, currency, and localized date formats, while\ntranslations use the closest available language.",
26074
26210
  "fieldName": "language"
26075
26211
  },
26076
26212
  {
@@ -28106,6 +28242,22 @@
28106
28242
  "description": "The highlighted query inside the facet values.",
28107
28243
  "name": "search-highlight"
28108
28244
  },
28245
+ {
28246
+ "description": "The row displaying the currently selected value and the button that clears the facet.",
28247
+ "name": "selected-value"
28248
+ },
28249
+ {
28250
+ "description": "The pill displaying the currently selected value.",
28251
+ "name": "selected-value-pill"
28252
+ },
28253
+ {
28254
+ "description": "The button that clears the facet, displayed next to the selected value.",
28255
+ "name": "selected-value-clear-button"
28256
+ },
28257
+ {
28258
+ "description": "The icon of the button that clears the facet.",
28259
+ "name": "selected-value-clear-button-icon"
28260
+ },
28109
28261
  {
28110
28262
  "description": "The container surrounding the whole hierarchy of values.",
28111
28263
  "name": "parents"
@@ -28119,7 +28271,7 @@
28119
28271
  "name": "values"
28120
28272
  },
28121
28273
  {
28122
- "description": "The \"View all\" button displayed first within the parents.",
28274
+ "description": "The \"All Categories\" button displayed first within the parents.",
28123
28275
  "name": "all-categories-button"
28124
28276
  },
28125
28277
  {
@@ -28127,7 +28279,7 @@
28127
28279
  "name": "parent-button"
28128
28280
  },
28129
28281
  {
28130
- "description": "The clickable active parent displayed first within the last sub-parents.",
28282
+ "description": "The currently selected value, displayed last within the parents. Not interactive.",
28131
28283
  "name": "active-parent"
28132
28284
  },
28133
28285
  {
@@ -28529,6 +28681,11 @@
28529
28681
  "name": "renderSearchInput",
28530
28682
  "privacy": "private"
28531
28683
  },
28684
+ {
28685
+ "kind": "method",
28686
+ "name": "renderSelectedValue",
28687
+ "privacy": "private"
28688
+ },
28532
28689
  {
28533
28690
  "kind": "method",
28534
28691
  "name": "renderValuesTree",
@@ -34342,6 +34499,12 @@
34342
34499
  "privacy": "protected",
34343
34500
  "default": "new AriaLiveRegionController(this, 'atomic-pager')"
34344
34501
  },
34502
+ {
34503
+ "kind": "field",
34504
+ "name": "pagerFit",
34505
+ "privacy": "private",
34506
+ "default": "new PagerFitController(this)"
34507
+ },
34345
34508
  {
34346
34509
  "kind": "field",
34347
34510
  "name": "previousButton",
@@ -38266,7 +38429,7 @@
38266
38429
  },
38267
38430
  "privacy": "public",
38268
38431
  "default": "'D/M/YYYY'",
38269
- "description": "The format of the date.\nAvailable formats: https://day.js.org/docs/en/display/format",
38432
+ "description": "The format of the date.\nAvailable formats: https://day.js.org/docs/en/display/format\n\n[Localized formats](https://day.js.org/docs/en/display/format#localized-formats) such as `L`, `LL`, or `LLL`\nfollow the interface `language`: with `format=\"L\"`, `en-US` renders `09/30/2026` and `en-CA` renders `2026-09-30`.",
38270
38433
  "attribute": "format",
38271
38434
  "reflects": true
38272
38435
  },
@@ -38389,7 +38552,7 @@
38389
38552
  "text": "string"
38390
38553
  },
38391
38554
  "default": "'D/M/YYYY'",
38392
- "description": "The format of the date.\nAvailable formats: https://day.js.org/docs/en/display/format",
38555
+ "description": "The format of the date.\nAvailable formats: https://day.js.org/docs/en/display/format\n\n[Localized formats](https://day.js.org/docs/en/display/format#localized-formats) such as `L`, `LL`, or `LLL`\nfollow the interface `language`: with `format=\"L\"`, `en-US` renders `09/30/2026` and `en-CA` renders `2026-09-30`.",
38393
38556
  "fieldName": "format"
38394
38557
  },
38395
38558
  {
@@ -44455,7 +44618,7 @@
44455
44618
  },
44456
44619
  "privacy": "public",
44457
44620
  "default": "'en'",
44458
- "description": "The search interface language.",
44621
+ "description": "The search interface language.\n\nAccepts a language (`en`) or a [BCP 47](https://www.rfc-editor.org/info/bcp47) locale\n(`en-CA`). The region drives number, currency, and localized date formats, while\ntranslations use the closest available language.",
44459
44622
  "attribute": "language",
44460
44623
  "reflects": true
44461
44624
  },
@@ -44812,7 +44975,7 @@
44812
44975
  "text": "string"
44813
44976
  },
44814
44977
  "default": "'en'",
44815
- "description": "The search interface language.",
44978
+ "description": "The search interface language.\n\nAccepts a language (`en`) or a [BCP 47](https://www.rfc-editor.org/info/bcp47) locale\n(`en-CA`). The region drives number, currency, and localized date formats, while\ntranslations use the closest available language.",
44816
44979
  "fieldName": "language"
44817
44980
  },
44818
44981
  {
@@ -48874,6 +49037,12 @@
48874
49037
  "declarations": [],
48875
49038
  "exports": []
48876
49039
  },
49040
+ {
49041
+ "kind": "javascript-module",
49042
+ "path": "src/components/common/facets/category-facet/active-value.ts",
49043
+ "declarations": [],
49044
+ "exports": []
49045
+ },
48877
49046
  {
48878
49047
  "kind": "javascript-module",
48879
49048
  "path": "src/components/common/facets/category-facet/all-categories-button.ts",
@@ -48906,19 +49075,19 @@
48906
49075
  },
48907
49076
  {
48908
49077
  "kind": "javascript-module",
48909
- "path": "src/components/common/facets/category-facet/parent-value-link.ts",
49078
+ "path": "src/components/common/facets/category-facet/search-results-container.ts",
48910
49079
  "declarations": [],
48911
49080
  "exports": []
48912
49081
  },
48913
49082
  {
48914
49083
  "kind": "javascript-module",
48915
- "path": "src/components/common/facets/category-facet/search-results-container.ts",
49084
+ "path": "src/components/common/facets/category-facet/search-value.ts",
48916
49085
  "declarations": [],
48917
49086
  "exports": []
48918
49087
  },
48919
49088
  {
48920
49089
  "kind": "javascript-module",
48921
- "path": "src/components/common/facets/category-facet/search-value.ts",
49090
+ "path": "src/components/common/facets/category-facet/selected-value.ts",
48922
49091
  "declarations": [],
48923
49092
  "exports": []
48924
49093
  },
@@ -59,13 +59,14 @@ const error_guard_cjs_namespaceObject = require("../../../decorators/error-guard
59
59
  const with_tailwind_styles_cjs_namespaceObject = require("../../../decorators/with-tailwind-styles.cjs");
60
60
  const accessibility_utils_cjs_namespaceObject = require("../../../utils/accessibility-utils.cjs");
61
61
  const field_utils_cjs_namespaceObject = require("../../../utils/field-utils.cjs");
62
+ const active_value_cjs_namespaceObject = require("../../common/facets/category-facet/active-value.cjs");
62
63
  const all_categories_button_cjs_namespaceObject = require("../../common/facets/category-facet/all-categories-button.cjs");
63
64
  const children_as_tree_container_cjs_namespaceObject = require("../../common/facets/category-facet/children-as-tree-container.cjs");
64
65
  const parent_as_tree_container_cjs_namespaceObject = require("../../common/facets/category-facet/parent-as-tree-container.cjs");
65
66
  const parent_button_cjs_namespaceObject = require("../../common/facets/category-facet/parent-button.cjs");
66
- const parent_value_link_cjs_namespaceObject = require("../../common/facets/category-facet/parent-value-link.cjs");
67
67
  const search_results_container_cjs_namespaceObject = require("../../common/facets/category-facet/search-results-container.cjs");
68
68
  const search_value_cjs_namespaceObject = require("../../common/facets/category-facet/search-value.cjs");
69
+ const selected_value_cjs_namespaceObject = require("../../common/facets/category-facet/selected-value.cjs");
69
70
  const value_as_tree_container_cjs_namespaceObject = require("../../common/facets/category-facet/value-as-tree-container.cjs");
70
71
  const value_link_cjs_namespaceObject = require("../../common/facets/category-facet/value-link.cjs");
71
72
  const facet_common_tw_css_cjs_namespaceObject = require("../../common/facets/facet-common.tw.css.cjs");
@@ -136,6 +137,21 @@ class AtomicCommerceCategoryFacet extends external_lit_namespaceObject.LitElemen
136
137
  }
137
138
  });
138
139
  }
140
+ renderSelectedValue() {
141
+ const activeValue = this.facetState.selectedValueAncestry?.at(-1);
142
+ if (!activeValue) return external_lit_namespaceObject.nothing;
143
+ return (0, selected_value_cjs_namespaceObject.renderCategoryFacetSelectedValue)({
144
+ props: {
145
+ displayValue: (0, field_utils_cjs_namespaceObject.getFieldValueCaption)(this.facetState.field, activeValue.value, this.bindings.i18n),
146
+ label: this.displayName,
147
+ i18n: this.bindings.i18n,
148
+ onClearFilters: ()=>{
149
+ this.focusTargets.activeValueFocus.focusAfterSearch();
150
+ this.facet.deselectAll();
151
+ }
152
+ }
153
+ });
154
+ }
139
155
  renderValuesTree(parents, isRoot) {
140
156
  if (!this.hasParents) return this.renderChildren();
141
157
  if (isRoot) return (0, value_as_tree_container_cjs_namespaceObject.renderCategoryFacetTreeValueContainer)()((0, external_lit_namespaceObject.html)`
@@ -180,16 +196,12 @@ class AtomicCommerceCategoryFacet extends external_lit_namespaceObject.LitElemen
180
196
  const activeParent = parents[0];
181
197
  const activeParentDisplayValue = (0, field_utils_cjs_namespaceObject.getFieldValueCaption)(this.facetState?.field, activeParent.value, this.bindings.i18n);
182
198
  return (0, external_lit_namespaceObject.html)`
183
- ${(0, parent_value_link_cjs_namespaceObject.renderCategoryFacetParentValueLink)({
199
+ ${(0, active_value_cjs_namespaceObject.renderCategoryFacetActiveValue)({
184
200
  props: {
185
201
  displayValue: activeParentDisplayValue,
186
202
  numberOfResults: activeParent.numberOfResults,
187
203
  i18n: this.bindings.i18n,
188
204
  isLeafValue: activeParent.isLeafValue,
189
- onClick: ()=>{
190
- this.focusTargets.activeValueFocus.focusAfterSearch();
191
- this.facet.deselectAll();
192
- },
193
205
  searchQuery: this.facetState.facetSearch.query,
194
206
  setRef: (el)=>{
195
207
  this.focusTargets.activeValueFocus.setTarget(el);
@@ -214,7 +226,6 @@ class AtomicCommerceCategoryFacet extends external_lit_namespaceObject.LitElemen
214
226
  this.focusTargets.activeValueFocus.focusAfterSearch();
215
227
  this.facet.toggleSelect(facetValue);
216
228
  },
217
- isParent: false,
218
229
  isSelected,
219
230
  searchQuery: this.facetState.facetSearch.query,
220
231
  isLeafValue: facetValue.isLeafValue,
@@ -289,6 +300,7 @@ class AtomicCommerceCategoryFacet extends external_lit_namespaceObject.LitElemen
289
300
  onClear: ()=>this.facet.facetSearch.clear()
290
301
  }
291
302
  })}
303
+ ${this.renderSelectedValue()}
292
304
  ${(0, when_js_namespaceObject.when)((0, facet_search_utils_cjs_namespaceObject.shouldDisplaySearchResults)(facetSearch), ()=>(0, external_lit_namespaceObject.html)`
293
305
  ${(0, when_js_namespaceObject.when)(facetSearch.values.length > 0, ()=>(0, facet_values_group_cjs_namespaceObject.renderFacetValuesGroup)({
294
306
  props: {
@@ -58,6 +58,7 @@ const children_update_complete_mixin_cjs_namespaceObject = require("../../../mix
58
58
  const init_queue_cjs_namespaceObject = require("../../../utils/init-queue.cjs");
59
59
  const initialization_common_utils_cjs_namespaceObject = require("../../../utils/initialization-common-utils.cjs");
60
60
  const local_storage_utils_cjs_namespaceObject = require("../../../utils/local-storage-utils.cjs");
61
+ const locale_utils_cjs_namespaceObject = require("../../../utils/locale-utils.cjs");
61
62
  const external_analytics_config_cjs_namespaceObject = require("./analytics-config.cjs");
62
63
  const external_store_cjs_namespaceObject = require("./store.cjs");
63
64
  function _ts_decorate(decorators, target, key, desc) {
@@ -114,7 +115,7 @@ class AtomicCommerceInterface extends (0, children_update_complete_mixin_cjs_nam
114
115
  }
115
116
  updateLocale(language, country, currency) {
116
117
  if (!this.interfaceController.engineIsCreated(this.engine) || !this.context) return;
117
- language && this.interfaceController.onLanguageChange(language);
118
+ if (language || country && this.localizeWithCountry) this.interfaceController.onLanguageChange(this.getLocale(language || this.context.state.language, country || this.context.state.country));
118
119
  if (this.isNewLocale(language, country, currency)) {
119
120
  const { setContext } = (0, commerce_namespaceObject.loadContextActions)(this.engine);
120
121
  this.engine.dispatch(setContext({
@@ -139,7 +140,11 @@ class AtomicCommerceInterface extends (0, children_update_complete_mixin_cjs_nam
139
140
  if (!this.interfaceController.engineIsCreated(this.engine) || !this.language || !this.context) return;
140
141
  this.engine.logger.warn('The `language` property will be removed in the next major version of Atomic (v4). Rather than using this property, set the initial language through the engine configuration when calling `initialize` or `initializeWithEngine`, and update the language as needed using the `updateLocale` method.');
141
142
  this.context.setLanguage(this.language);
142
- return this.interfaceController.onLanguageChange();
143
+ return this.interfaceController.onLanguageChange(this.getLocale(this.language, this.context.state.country));
144
+ }
145
+ toggleLocalizeWithCountry() {
146
+ if (!this.context) return;
147
+ this.interfaceController.onLanguageChange(this.getLocale(this.context.state.language, this.context.state.country));
143
148
  }
144
149
  updateIconAssetsPath() {
145
150
  this.store.state.iconAssetsPath = this.iconAssetsPath;
@@ -180,7 +185,10 @@ class AtomicCommerceInterface extends (0, children_update_complete_mixin_cjs_nam
180
185
  }
181
186
  initLanguage() {
182
187
  if (!this.context || this.language) return;
183
- this.interfaceController.onLanguageChange(this.context.state.language);
188
+ this.interfaceController.onLanguageChange(this.getLocale(this.context.state.language, this.context.state.country));
189
+ }
190
+ getLocale(language, country) {
191
+ return this.localizeWithCountry ? (0, locale_utils_cjs_namespaceObject.withCountry)(language, country) : language;
184
192
  }
185
193
  initRequestStatus() {
186
194
  this.searchOrListing = 'product-listing' === this.type ? (0, commerce_namespaceObject.buildProductListing)(this.engine) : (0, commerce_namespaceObject.buildSearch)(this.engine);
@@ -244,7 +252,7 @@ class AtomicCommerceInterface extends (0, children_update_complete_mixin_cjs_nam
244
252
  this.bindings.engine.logger.info(`History pushState #${newFragment}`);
245
253
  }
246
254
  constructor(){
247
- super(), this.bindings = {}, this.unsubscribeUrlManager = ()=>{}, this.unsubscribeSummary = ()=>{}, this.initialized = false, this.interfaceController = new interface_controller_cjs_namespaceObject.InterfaceController(this, 'CoveoAtomic', commerce_namespaceObject.VERSION), this.type = 'search', this.analytics = true, this.reflectStateInUrl = true, this.disableStateReflectionInUrl = false, this.scrollContainer = 'atomic-commerce-interface', this.languageAssetsPath = './lang', this.iconAssetsPath = './assets', this.handleInitialization = (event)=>{
255
+ super(), this.bindings = {}, this.unsubscribeUrlManager = ()=>{}, this.unsubscribeSummary = ()=>{}, this.initialized = false, this.interfaceController = new interface_controller_cjs_namespaceObject.InterfaceController(this, 'CoveoAtomic', commerce_namespaceObject.VERSION), this.type = 'search', this.analytics = true, this.localizeWithCountry = false, this.reflectStateInUrl = true, this.disableStateReflectionInUrl = false, this.scrollContainer = 'atomic-commerce-interface', this.languageAssetsPath = './lang', this.iconAssetsPath = './assets', this.handleInitialization = (event)=>{
248
256
  this.interfaceController.onComponentInitializing(event);
249
257
  }, this.onHashChange = ()=>{
250
258
  this.urlManager.synchronize(this.fragment);
@@ -314,6 +322,13 @@ _ts_decorate([
314
322
  }),
315
323
  _ts_metadata("design:type", String)
316
324
  ], AtomicCommerceInterface.prototype, "language", void 0);
325
+ _ts_decorate([
326
+ (0, decorators_js_namespaceObject.property)({
327
+ type: Boolean,
328
+ attribute: 'localize-with-country',
329
+ reflect: true
330
+ })
331
+ ], AtomicCommerceInterface.prototype, "localizeWithCountry", void 0);
317
332
  _ts_decorate([
318
333
  (0, decorators_js_namespaceObject.property)({
319
334
  type: Object,
@@ -369,6 +384,12 @@ _ts_decorate([
369
384
  _ts_metadata("design:paramtypes", []),
370
385
  _ts_metadata("design:returntype", void 0)
371
386
  ], AtomicCommerceInterface.prototype, "updateLanguage", null);
387
+ _ts_decorate([
388
+ (0, watch_cjs_namespaceObject.watch)('localizeWithCountry'),
389
+ _ts_metadata("design:type", Function),
390
+ _ts_metadata("design:paramtypes", []),
391
+ _ts_metadata("design:returntype", void 0)
392
+ ], AtomicCommerceInterface.prototype, "toggleLocalizeWithCountry", null);
372
393
  _ts_decorate([
373
394
  (0, watch_cjs_namespaceObject.watch)('iconAssetsPath'),
374
395
  _ts_metadata("design:type", Function),
@@ -48,6 +48,7 @@ const when_js_namespaceObject = require("lit/directives/when.js");
48
48
  const store_cjs_namespaceObject = require("../../common/interface/store.cjs");
49
49
  const pager_buttons_cjs_namespaceObject = require("../../common/pager/pager-buttons.cjs");
50
50
  const pager_navigation_cjs_namespaceObject = require("../../common/pager/pager-navigation.cjs");
51
+ const pager_fit_controller_cjs_namespaceObject = require("../../common/pager/pager-fit-controller.cjs");
51
52
  const pager_utils_cjs_namespaceObject = require("../../common/pager/pager-utils.cjs");
52
53
  const validate_props_controller_cjs_namespaceObject = require("../../common/validate-props-controller/validate-props-controller.cjs");
53
54
  const bind_state_cjs_namespaceObject = require("../../../decorators/bind-state.cjs");
@@ -81,7 +82,7 @@ class AtomicCommercePager extends external_lit_namespaceObject.LitElement {
81
82
  });
82
83
  }
83
84
  render() {
84
- const pagesRange = (0, pager_utils_cjs_namespaceObject.getCurrentPagesRange)(this.pagerState.page, this.numberOfPages, this.pagerState.totalPages - 1);
85
+ const pagesRange = (0, pager_utils_cjs_namespaceObject.getCurrentPagesRange)(this.pagerState.page, this.pagerFit.getNumberOfPagesToDisplay(this.numberOfPages), this.pagerState.totalPages - 1);
85
86
  return (0, external_lit_namespaceObject.html)`
86
87
  ${(0, when_js_namespaceObject.when)(this.pagerState.totalPages > 1 && this.isAppLoaded, ()=>(0, external_lit_namespaceObject.html)`
87
88
  ${(0, pager_navigation_cjs_namespaceObject.renderPagerNavigation)({
@@ -152,7 +153,7 @@ class AtomicCommercePager extends external_lit_namespaceObject.LitElement {
152
153
  });
153
154
  }
154
155
  constructor(){
155
- super(), this.isAppLoaded = false, this.numberOfPages = 5, this.previousButtonIcon = arrow_left_rounded_cjs_default(), this.nextButtonIcon = arrow_right_rounded_cjs_default(), this.ariaMessage = new accessibility_utils_cjs_namespaceObject.AriaLiveRegionController(this, 'atomic-pager');
156
+ super(), this.isAppLoaded = false, this.numberOfPages = 5, this.previousButtonIcon = arrow_left_rounded_cjs_default(), this.nextButtonIcon = arrow_right_rounded_cjs_default(), this.ariaMessage = new accessibility_utils_cjs_namespaceObject.AriaLiveRegionController(this, 'atomic-pager'), this.pagerFit = new pager_fit_controller_cjs_namespaceObject.PagerFitController(this);
156
157
  new validate_props_controller_cjs_namespaceObject.ValidatePropsController(this, ()=>({
157
158
  numberOfPages: this.numberOfPages
158
159
  }), AtomicCommercePager.propsSchema);
@@ -80,7 +80,7 @@ class AtomicCommerceProductsPerPage extends external_lit_namespaceObject.LitElem
80
80
  render() {
81
81
  return (0, external_lit_namespaceObject.html)`
82
82
  ${(0, when_js_namespaceObject.when)(!this.summaryState.hasError && this.summaryState.hasProducts && this.isAppLoaded, ()=>(0, external_lit_namespaceObject.html)`
83
- <div class="flex items-center">
83
+ <div class="flex flex-wrap items-center">
84
84
  ${(0, label_cjs_namespaceObject.renderLabel)()((0, external_lit_namespaceObject.html)`${this.label}`)}
85
85
  ${(0, fieldset_group_cjs_namespaceObject.renderFieldsetGroup)({
86
86
  props: {