@tet/tet-components 1.3.75-staging → 1.3.76-staging

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 (51) hide show
  1. package/dist/cjs/{compare-cards-tab-products-filters-6a634be2.js → compare-cards-tab-products-filters-9b78d2b3.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/tet-address-offers-filters-products_4.cjs.entry.js +3 -3
  4. package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +13 -5
  5. package/dist/cjs/tet-compare-cards_2.cjs.entry.js +2 -2
  6. package/dist/cjs/tet-components.cjs.js +1 -1
  7. package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
  8. package/dist/collection/components/advanced/address/tet-address-offers-filters-products/address-offers-products-filters.js +1 -1
  9. package/dist/collection/components/advanced/cards/tet-compare-card/tet-compare-card.css +12 -1
  10. package/dist/collection/components/advanced/cards/tet-compare-cards/tet-compare-cards.css +5 -0
  11. package/dist/collection/components/advanced/cards/tet-compare-cards/tet-compare-cards.js +2 -2
  12. package/dist/collection/components/advanced/cards/tet-compare-cards-tab/compare-cards-tab-products-filters.js +1 -1
  13. package/dist/collection/components/advanced/cards/tet-compare-cards-tab/tet-compare-cards-tab.css +3 -1
  14. package/dist/collection/components/advanced/cards/tet-compare-cards-tab/tet-compare-cards-tab.js +30 -4
  15. package/dist/collection/components/simple/lists/tet-text-list/tet-text-list.css +7 -1
  16. package/dist/components/p-6efa94b9.js +137 -0
  17. package/dist/components/p-71da61a9.js +728 -0
  18. package/dist/components/{p-b671e7bb.js → p-7c48fe10.js} +2 -2
  19. package/dist/components/{p-385ea6b0.js → p-b311379e.js} +3 -3
  20. package/dist/components/{p-880ed3a0.js → p-dc237745.js} +2 -2
  21. package/dist/components/tet-address-offers-filters-products.js +1 -1
  22. package/dist/components/tet-address-offers-view.js +3 -3
  23. package/dist/components/tet-address-offers.js +1 -1
  24. package/dist/components/tet-business-compare-card.js +1 -1
  25. package/dist/components/tet-compare-card.js +1 -1
  26. package/dist/components/tet-compare-cards-tab.js +16 -7
  27. package/dist/components/tet-compare-cards.js +1 -1
  28. package/dist/components/tet-text-list.js +1 -1
  29. package/dist/esm/{compare-cards-tab-products-filters-094fdd08.js → compare-cards-tab-products-filters-0b1460f5.js} +1 -1
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/esm/tet-address-offers-filters-products_4.entry.js +3 -3
  32. package/dist/esm/tet-compare-cards-tab.entry.js +13 -5
  33. package/dist/esm/tet-compare-cards_2.entry.js +2 -2
  34. package/dist/esm/tet-components.js +1 -1
  35. package/dist/esm/tet-text-list.entry.js +1 -1
  36. package/dist/tet-components/{p-8b7eec6b.entry.js → p-17327ec0.entry.js} +1 -1
  37. package/dist/tet-components/p-9da23fa1.entry.js +1 -0
  38. package/dist/tet-components/p-cd13a9e5.entry.js +1 -0
  39. package/dist/tet-components/{p-c0be9da7.js → p-f4c8ab09.js} +1 -1
  40. package/dist/tet-components/p-f7db74d1.entry.js +1 -0
  41. package/dist/tet-components/tet-components.css +1 -1
  42. package/dist/tet-components/tet-components.esm.js +1 -1
  43. package/dist/types/components/advanced/cards/tet-compare-cards/tet-compare-cards.d.ts +1 -1
  44. package/dist/types/components/advanced/cards/tet-compare-cards-tab/tet-compare-cards-tab.d.ts +9 -1
  45. package/dist/types/components.d.ts +8 -0
  46. package/package.json +1 -1
  47. package/dist/components/p-54410ecb.js +0 -137
  48. package/dist/components/p-edbe64bb.js +0 -728
  49. package/dist/tet-components/p-0e59aa9d.entry.js +0 -1
  50. package/dist/tet-components/p-5509506e.entry.js +0 -1
  51. package/dist/tet-components/p-b95d33a4.entry.js +0 -1
@@ -55,7 +55,7 @@ class AddressOffersProductsFilters {
55
55
  if (intersection) {
56
56
  simulatedIntersection = simulatedIntersection.filter(code => filter.products.includes(code));
57
57
  }
58
- filter.disabled = simulatedIntersection.length <= 1;
58
+ filter.disabled = simulatedIntersection.length <= 0;
59
59
  filter.showIcon = false;
60
60
  }
61
61
  }
@@ -1822,6 +1822,9 @@
1822
1822
  .tet-grid__cell--xl-show {
1823
1823
  display: block;
1824
1824
  }
1825
+ .tet-grid--gg {
1826
+ max-width: unset;
1827
+ }
1825
1828
  }
1826
1829
  @media all and (min-width: 90rem) {
1827
1830
  .tet-grid__cell--mg-span-1 {
@@ -1878,10 +1881,13 @@
1878
1881
  .tet-grid__cell--mg-show {
1879
1882
  display: block;
1880
1883
  }
1884
+ .tet-grid--gg {
1885
+ padding: 0 4.875rem;
1886
+ }
1881
1887
  }
1882
1888
  @media all and (min-width: 120rem) {
1883
1889
  .tet-grid--gg {
1884
- max-width: calc(120rem + 5rem);
1890
+ max-width: 120rem;
1885
1891
  }
1886
1892
  .tet-grid__cell--gg-span-1 {
1887
1893
  display: block;
@@ -7838,6 +7844,10 @@
7838
7844
  border: 0.125rem solid rgb(35, 40, 46);
7839
7845
  outline: unset;
7840
7846
  }
7847
+ .card.light .best-choice-title.floating {
7848
+ background: var(--tc-yellow-40);
7849
+ color: var(--tc-foundation-black);
7850
+ }
7841
7851
  .card.light.with-border {
7842
7852
  outline: 0.0625rem solid rgb(35, 40, 46);
7843
7853
  border: 0.125rem solid transparent;
@@ -8038,6 +8048,7 @@
8038
8048
  top: -1.125rem;
8039
8049
  border-radius: 1rem;
8040
8050
  padding: 0.375rem 1.25rem;
8051
+ background-color: var(--tc-yellow-40);
8041
8052
  }
8042
8053
 
8043
8054
  .image-wrapper {
@@ -539,6 +539,11 @@
539
539
  .force-column .cards.column-two {
540
540
  grid-template-columns: minmax(1rem, 32rem);
541
541
  }
542
+ .cards.column-four {
543
+ display: grid;
544
+ grid-template-columns: repeat(4, minmax(19rem, 21rem));
545
+ gap: 1rem;
546
+ }
542
547
 
543
548
  .force-column .cards {
544
549
  --compare-cards-wrap: wrap;
@@ -105,7 +105,7 @@ export class TetCompareCards {
105
105
  });
106
106
  }
107
107
  render() {
108
- return (h(Host, { key: 'd585201b1bfb8a7334ed8737a1e3018d1f93d0f1', class: {
108
+ return (h(Host, { key: 'e7c6f33748bc103ba2d31d9ea10f71a4b0b9b749', class: {
109
109
  'must-initialize': true,
110
110
  'initialized': this.initializedState
111
111
  } }, this.showLoader ? (this.renderLoader()) : (h("div", { class: {
@@ -220,7 +220,7 @@ export class TetCompareCards {
220
220
  "mutable": false,
221
221
  "complexType": {
222
222
  "original": "CompareCardsLayout",
223
- "resolved": "\"column-two\" | \"default\"",
223
+ "resolved": "\"column-four\" | \"column-two\" | \"default\"",
224
224
  "references": {
225
225
  "CompareCardsLayout": {
226
226
  "location": "local",
@@ -66,7 +66,7 @@ class CompareCardsTabProductsFilters {
66
66
  if (intersection) {
67
67
  simulatedIntersection = simulatedIntersection.filter(code => filter.products.includes(code));
68
68
  }
69
- filter.disabled = simulatedIntersection.length <= 1;
69
+ filter.disabled = simulatedIntersection.length <= 0;
70
70
  filter.showIcon = false;
71
71
  }
72
72
  }
@@ -56,7 +56,9 @@
56
56
  padding-bottom: 0.75rem;
57
57
  }
58
58
  .tet-compare-cards-tab__filters {
59
- align-self: center;
59
+ display: flex;
60
+ justify-content: center;
61
+ align-items: center;
60
62
  margin-bottom: 1rem;
61
63
  }
62
64
  .tet-compare-cards-tab__header--image {
@@ -18,6 +18,13 @@ export class TetTabCompareCards {
18
18
  'tet-compare-cards-tab__placeholder': true,
19
19
  'visible': this.showLoader
20
20
  } }, [...Array(3)].map(() => h("tet-placeholder", { class: "tet-placeholder", height: "27rem", width: "21.5rem" }))));
21
+ /**
22
+ * Renders product filters component.
23
+ * @returns Renders product filters component
24
+ */
25
+ this.renderProductFilters = () => {
26
+ return (h("tet-address-offers-filters-products", { productCodes: this.productSACData, class: "center tet-compare-cards-tab__filters", clearFilterButton: true, onFilteredProductsChanged: this.handleFilteredProductsChanged, theme: this.darkMode ? 'dark' : 'light' }));
27
+ };
21
28
  this.data = undefined;
22
29
  this.forceColumn = false;
23
30
  this.layout = 'default';
@@ -26,6 +33,7 @@ export class TetTabCompareCards {
26
33
  this.darkMode = false;
27
34
  this.isNetflixCard = false;
28
35
  this.darkHeader = false;
36
+ this.withProductFilters = false;
29
37
  this.productDataLoaded = false;
30
38
  this.showLoader = true;
31
39
  this.productSACData = undefined;
@@ -133,7 +141,7 @@ export class TetTabCompareCards {
133
141
  tab.disabled = true;
134
142
  }
135
143
  });
136
- return (h("div", { class: "tet-compare-cards-tab__header-container" }, tabList.withProductFilters && (h("tet-address-offers-filters-products", { productCodes: this.productSACData, class: "center tet-compare-cards-tab__filters", clearFilterButton: true, onFilteredProductsChanged: this.handleFilteredProductsChanged, theme: this.darkMode ? 'dark' : 'light' })), h("tet-tab-header", { darkMode: this.darkHeader ? true : this.darkMode, position: tabList.tabHeader.position, "default-tab": `tab-${level}-${tabList.tabHeader.defaultTabIndex}`, segmented: tabList.tabHeader.segmented, sizing: tabList.tabHeader.sizing, "data-name": tabList.tabHeader.dataName, class: "tet-compare-cards-tab__header" }, tabList.tabs.map((element, index) => (h("button", { "data-name": `tab-${level}-${index}`, class: { disabled: element.disabled || this.showLoader, 'button': true } }, element.image && !element.imagePositionRight ?
144
+ return (h("div", { class: "tet-compare-cards-tab__header-container" }, h("tet-tab-header", { darkMode: this.darkHeader ? true : this.darkMode, position: tabList.tabHeader.position, "default-tab": `tab-${level}-${tabList.tabHeader.defaultTabIndex}`, segmented: tabList.tabHeader.segmented, sizing: tabList.tabHeader.sizing, "data-name": tabList.tabHeader.dataName, class: "tet-compare-cards-tab__header" }, tabList.tabs.map((element, index) => (h("button", { "data-name": `tab-${level}-${index}`, class: { disabled: element.disabled || this.showLoader, 'button': true } }, element.image && !element.imagePositionRight ?
137
145
  h("img", { class: "tet-compare-cards-tab__header--image", src: element.image, alt: element.altText }) : '', element.title, element.image && element.imagePositionRight ?
138
146
  h("img", { class: { 'tet-compare-cards-tab__header--image': true, 'right': true }, src: element.image, alt: element.altText }) : ''))))));
139
147
  }
@@ -160,7 +168,7 @@ export class TetTabCompareCards {
160
168
  renderCompareCards(cards, vatText = '', cardScript = '') {
161
169
  let filteredCards = cards;
162
170
  if (this.filteredProductCodes && this.filteredProductCodes.length > 0) {
163
- filteredCards = cards.filter(card => this.filteredProductCodes.includes(card.productCode));
171
+ filteredCards = cards.filter(card => !card.productCode || this.filteredProductCodes.includes(card.productCode));
164
172
  }
165
173
  let cardsWithAddedSACData = [];
166
174
  filteredCards.forEach((element) => {
@@ -181,7 +189,7 @@ export class TetTabCompareCards {
181
189
  return (h("div", { class: "tet-compare-cards-tab__content" }, h("tet-compare-cards", { theme: this.theme, "dark-mode": this.darkMode, "is-netflix-card": this.isNetflixCard, layout: this.layout, "force-column": this.forceColumn, "vat-text": vatText !== null && vatText !== void 0 ? vatText : false, "card-script": cardScript !== null && cardScript !== void 0 ? cardScript : false, data: cardsWithAddedSACData, newUrlGeneratorStructure: this.newUrlGeneratorStructure })));
182
190
  }
183
191
  render() {
184
- return (h(Host, { key: '54a44d3d6d76143678f77c9fefe66902a1f1654a' }, h("div", { key: 'b52b3b1d124835ad6eeb4bfc4f14d386477b3ba1', class: "tet-compare-cards-tab-wrapper" }, this.renderTabHeader(this.data, 1), this.renderLoader(), h("div", { key: '70ed32288ced853110f3675f535537519a4545da', class: {
192
+ return (h(Host, { key: '6440f18b850154ce52417307a14d7b961f9f1e25' }, h("div", { key: 'c268744e5ec91a57d0e9092105dacb18cfbf2cab', class: "tet-compare-cards-tab-wrapper" }, this.withProductFilters ? this.renderProductFilters() : '', this.renderTabHeader(this.data, 1), this.renderLoader(), h("div", { key: '9b3a2f7fc6e48d4585f2cc2ea08edaf3702255eb', class: {
185
193
  'tet-compare-cards-tab__cards': true,
186
194
  'hidden': this.showLoader
187
195
  } }, this.productDataLoaded ? this.renderContent(this.data, 1) : ''))));
@@ -244,7 +252,7 @@ export class TetTabCompareCards {
244
252
  "mutable": false,
245
253
  "complexType": {
246
254
  "original": "CompareCardsLayout",
247
- "resolved": "\"column-two\" | \"default\"",
255
+ "resolved": "\"column-four\" | \"column-two\" | \"default\"",
248
256
  "references": {
249
257
  "CompareCardsLayout": {
250
258
  "location": "import",
@@ -358,6 +366,24 @@ export class TetTabCompareCards {
358
366
  "attribute": "dark-header",
359
367
  "reflect": false,
360
368
  "defaultValue": "false"
369
+ },
370
+ "withProductFilters": {
371
+ "type": "boolean",
372
+ "mutable": false,
373
+ "complexType": {
374
+ "original": "boolean",
375
+ "resolved": "boolean",
376
+ "references": {}
377
+ },
378
+ "required": false,
379
+ "optional": false,
380
+ "docs": {
381
+ "tags": [],
382
+ "text": "Enables product filters above the compare cards."
383
+ },
384
+ "attribute": "with-product-filters",
385
+ "reflect": false,
386
+ "defaultValue": "false"
361
387
  }
362
388
  };
363
389
  }
@@ -1823,6 +1823,9 @@
1823
1823
  .tet-grid__cell--xl-show {
1824
1824
  display: block;
1825
1825
  }
1826
+ .tet-grid--gg {
1827
+ max-width: unset;
1828
+ }
1826
1829
  }
1827
1830
  @media all and (min-width: 90rem) {
1828
1831
  .tet-grid__cell--mg-span-1 {
@@ -1879,10 +1882,13 @@
1879
1882
  .tet-grid__cell--mg-show {
1880
1883
  display: block;
1881
1884
  }
1885
+ .tet-grid--gg {
1886
+ padding: 0 4.875rem;
1887
+ }
1882
1888
  }
1883
1889
  @media all and (min-width: 120rem) {
1884
1890
  .tet-grid--gg {
1885
- max-width: calc(120rem + 5rem);
1891
+ max-width: 120rem;
1886
1892
  }
1887
1893
  .tet-grid__cell--gg-span-1 {
1888
1894
  display: block;