@blaze-cms/react-page-builder 0.146.0-node18-core-styles.1 → 0.146.0-node18-core-styles.2

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 (90) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/lib/application/query/index.js +18 -15
  3. package/lib/application/query/index.js.map +1 -1
  4. package/lib/components/Card/Card.js +3 -1
  5. package/lib/components/Card/Card.js.map +1 -1
  6. package/lib/components/ContentGroup/ContentGroupTabs.js +0 -1
  7. package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
  8. package/lib/components/ItemList/ItemListButton/ItemListButton.js +9 -7
  9. package/lib/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
  10. package/lib/components/ItemList/ItemListCounter/ItemListCounter.js +2 -2
  11. package/lib/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
  12. package/lib/components/ItemList/icons/AddedBookmark.js +41 -0
  13. package/lib/components/ItemList/icons/AddedBookmark.js.map +1 -0
  14. package/lib/components/ItemList/icons/BaseBookmark.js +45 -0
  15. package/lib/components/ItemList/icons/BaseBookmark.js.map +1 -0
  16. package/lib/components/ItemList/icons/HoverBookmark.js +43 -0
  17. package/lib/components/ItemList/icons/HoverBookmark.js.map +1 -0
  18. package/lib/components/ItemList/icons/RemoveBookmark.js +41 -0
  19. package/lib/components/ItemList/icons/RemoveBookmark.js.map +1 -0
  20. package/lib/components/ItemList/icons/index.js +36 -0
  21. package/lib/components/ItemList/icons/index.js.map +1 -0
  22. package/lib/components/List/ListFactory.js +11 -5
  23. package/lib/components/List/ListFactory.js.map +1 -1
  24. package/lib/components/List/components/Full/FullRenderItem.js +32 -29
  25. package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
  26. package/lib/helpers/build-props-query.js +4 -2
  27. package/lib/helpers/build-props-query.js.map +1 -1
  28. package/lib/index.js +6 -0
  29. package/lib/index.js.map +1 -1
  30. package/lib/variants/LiveBlogList/LiveBlogList.js +116 -0
  31. package/lib/variants/LiveBlogList/LiveBlogList.js.map +1 -0
  32. package/lib/variants/LiveBlogList/index.js +43 -0
  33. package/lib/variants/LiveBlogList/index.js.map +1 -0
  34. package/lib/variants/index.js +3 -1
  35. package/lib/variants/index.js.map +1 -1
  36. package/lib-es/application/query/index.js +9 -1
  37. package/lib-es/application/query/index.js.map +1 -1
  38. package/lib-es/components/Card/Card.js +3 -1
  39. package/lib-es/components/Card/Card.js.map +1 -1
  40. package/lib-es/components/ContentGroup/ContentGroupTabs.js +0 -1
  41. package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -1
  42. package/lib-es/components/ItemList/ItemListButton/ItemListButton.js +9 -7
  43. package/lib-es/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
  44. package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js +2 -2
  45. package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
  46. package/lib-es/components/ItemList/icons/AddedBookmark.js +33 -0
  47. package/lib-es/components/ItemList/icons/AddedBookmark.js.map +1 -0
  48. package/lib-es/components/ItemList/icons/BaseBookmark.js +37 -0
  49. package/lib-es/components/ItemList/icons/BaseBookmark.js.map +1 -0
  50. package/lib-es/components/ItemList/icons/HoverBookmark.js +35 -0
  51. package/lib-es/components/ItemList/icons/HoverBookmark.js.map +1 -0
  52. package/lib-es/components/ItemList/icons/RemoveBookmark.js +33 -0
  53. package/lib-es/components/ItemList/icons/RemoveBookmark.js.map +1 -0
  54. package/lib-es/components/ItemList/icons/index.js +5 -0
  55. package/lib-es/components/ItemList/icons/index.js.map +1 -0
  56. package/lib-es/components/List/ListFactory.js +10 -4
  57. package/lib-es/components/List/ListFactory.js.map +1 -1
  58. package/lib-es/components/List/components/Full/FullRenderItem.js +34 -30
  59. package/lib-es/components/List/components/Full/FullRenderItem.js.map +1 -1
  60. package/lib-es/helpers/build-props-query.js +4 -2
  61. package/lib-es/helpers/build-props-query.js.map +1 -1
  62. package/lib-es/index.js +1 -1
  63. package/lib-es/index.js.map +1 -1
  64. package/lib-es/variants/LiveBlogList/LiveBlogList.js +90 -0
  65. package/lib-es/variants/LiveBlogList/LiveBlogList.js.map +1 -0
  66. package/lib-es/variants/LiveBlogList/index.js +12 -0
  67. package/lib-es/variants/LiveBlogList/index.js.map +1 -0
  68. package/lib-es/variants/index.js +3 -1
  69. package/lib-es/variants/index.js.map +1 -1
  70. package/package.json +6 -6
  71. package/src/application/query/index.js +11 -1
  72. package/src/components/Card/Card.js +2 -1
  73. package/src/components/ContentGroup/ContentGroupTabs.js +0 -1
  74. package/src/components/ItemList/ItemListButton/ItemListButton.js +11 -13
  75. package/src/components/ItemList/ItemListCounter/ItemListCounter.js +2 -2
  76. package/src/components/ItemList/icons/AddedBookmark.js +33 -0
  77. package/src/components/ItemList/icons/BaseBookmark.js +33 -0
  78. package/src/components/ItemList/icons/HoverBookmark.js +33 -0
  79. package/src/components/ItemList/icons/RemoveBookmark.js +33 -0
  80. package/src/components/ItemList/icons/index.js +4 -0
  81. package/src/components/List/ListFactory.js +13 -4
  82. package/src/components/List/components/Full/FullRenderItem.js +45 -28
  83. package/src/helpers/build-props-query.js +3 -2
  84. package/src/index.js +2 -1
  85. package/src/variants/LiveBlogList/LiveBlogList.js +109 -0
  86. package/src/variants/LiveBlogList/index.js +13 -0
  87. package/src/variants/index.js +3 -1
  88. package/tests/unit/src/components/ItemList/__snapshots__/ItemListButton.test.js.snap +143 -35
  89. package/tests/unit/src/components/ItemList/__snapshots__/ItemListCounter.test.js.snap +37 -7
  90. package/tests/unit/src/helpers/build-props-query.test.js +13 -11
@@ -0,0 +1,109 @@
1
+ import React, { useRef, useState, useEffect } from 'react';
2
+ import dayjs from 'dayjs';
3
+ import relativeTime from 'dayjs/plugin/relativeTime';
4
+ import Button from '@blaze-react/button';
5
+ import { FaPlus, FaMinus } from 'react-icons/fa';
6
+ import { BsPinAngleFill } from 'react-icons/bs';
7
+
8
+ dayjs.extend(relativeTime);
9
+
10
+ const LiveBlogList = props => {
11
+ const { children, date, published, featured } = props;
12
+ const [isExpanded, setIsExpanded] = useState(false);
13
+ const [shouldShowButton, setShouldShowButton] = useState(false);
14
+ const [{ displayedDate, displayedTime }, setDisplayedDate] = useState({
15
+ displayedDate: ' ',
16
+ displayTime: ''
17
+ });
18
+ const usedDate = date || published;
19
+
20
+ const contentRef = useRef(null);
21
+
22
+ useEffect(
23
+ () => {
24
+ const timeout = setTimeout(() => {
25
+ if (contentRef.current) {
26
+ const contentHeight = contentRef.current.scrollHeight;
27
+ if (contentHeight > 380) {
28
+ setShouldShowButton(true);
29
+ }
30
+ }
31
+ }, 500); // delay to wait for content load
32
+ // todo: change to use mutation observer
33
+
34
+ return () => {
35
+ clearTimeout(timeout);
36
+ };
37
+ },
38
+ [children]
39
+ );
40
+
41
+ useEffect(
42
+ () => {
43
+ // delay setting time so no SSR issues based on timezone
44
+ let newDate = '';
45
+ if (usedDate) {
46
+ const diffInDays = dayjs().diff(dayjs(usedDate), 'day');
47
+ if (diffInDays < 1) {
48
+ newDate = dayjs(usedDate).fromNow();
49
+ } else if (diffInDays < 365) {
50
+ newDate = dayjs(usedDate).format('DD MMM');
51
+ } else {
52
+ newDate = dayjs(usedDate).format('DD MMM YYYY');
53
+ }
54
+ setDisplayedDate({
55
+ displayedDate: newDate,
56
+ displayedTime: dayjs(usedDate).format('HH:mm')
57
+ });
58
+ }
59
+ },
60
+ [date, published, usedDate]
61
+ );
62
+
63
+ const toggleExpanded = () => {
64
+ setIsExpanded(!isExpanded);
65
+ };
66
+
67
+ const isCollapsed = !isExpanded;
68
+ const baseClass = 'live-blog-container';
69
+ const modifier = featured ? ` ${baseClass}--featured` : '';
70
+ const className = `${baseClass}${modifier}`;
71
+
72
+ return (
73
+ <div className={className}>
74
+ {usedDate && (
75
+ <div className="live-blog-date">
76
+ {featured && <BsPinAngleFill />}
77
+ <span className="live-blog-date--date">{displayedDate}</span>
78
+ <span className="live-blog-date--time">{displayedTime}</span>
79
+ </div>
80
+ )}
81
+
82
+ <div
83
+ ref={contentRef}
84
+ className={`live-blog-content ${
85
+ isCollapsed ? 'live-blog-content--collapsed' : 'live-blog-content--opened'
86
+ }`}>
87
+ {children}
88
+ </div>
89
+
90
+ {shouldShowButton && (
91
+ <div className="live-blog-button-wrapper">
92
+ <Button className="live-blog-toggle" onClick={toggleExpanded} type="button">
93
+ {isExpanded ? (
94
+ <>
95
+ <FaMinus className="toggle-icon" /> Show Less
96
+ </>
97
+ ) : (
98
+ <>
99
+ <FaPlus className="toggle-icon" /> Show More
100
+ </>
101
+ )}
102
+ </Button>
103
+ </div>
104
+ )}
105
+ </div>
106
+ );
107
+ };
108
+
109
+ export default LiveBlogList;
@@ -0,0 +1,13 @@
1
+ import dynamic from 'next/dynamic';
2
+
3
+ const liveBlogList = {
4
+ VariantComponent: dynamic(() =>
5
+ import(/* webpackChunkName: "blazePbliveBlogList" */ './LiveBlogList')
6
+ ),
7
+ getSettings: componentSettings => ({
8
+ ...componentSettings,
9
+ modifier: 'liveBlogList'
10
+ })
11
+ };
12
+
13
+ export default liveBlogList;
@@ -6,6 +6,7 @@ import parallaxImageTextRight from './ParallaxImageTextRight';
6
6
  import thumbnailCarousel from './ThumbnailCarousel';
7
7
  import slideSummary from './SlideSummary';
8
8
  import floatingSideButton from './FloatingSideButton';
9
+ import liveBlogList from './LiveBlogList';
9
10
 
10
11
  export default {
11
12
  heroImage,
@@ -15,5 +16,6 @@ export default {
15
16
  parallaxImageTextRight,
16
17
  thumbnailCarousel,
17
18
  slideSummary,
18
- floatingSideButton
19
+ floatingSideButton,
20
+ liveBlogList
19
21
  };
@@ -3,24 +3,50 @@
3
3
  exports[`ItemListButton component should add and remove item to the list on click 1`] = `
4
4
  <DocumentFragment>
5
5
  <div
6
- aria-label="Add to list_name"
7
6
  class="item-list-button item-list-button--selected modifier"
8
7
  role="button"
8
+ tabindex="0"
9
9
  >
10
10
  <i>
11
11
  <svg
12
- fill="currentColor"
13
12
  height="1em"
14
- stroke="currentColor"
15
- stroke-width="0"
16
- viewBox="0 0 16 16"
13
+ version="1.1"
14
+ viewBox="0 0 24 29"
17
15
  width="1em"
18
16
  xmlns="http://www.w3.org/2000/svg"
19
17
  >
20
- <path
21
- d="M2 15.5V2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.74.439L8 13.069l-5.26 2.87A.5.5 0 0 1 2 15.5zm8.854-9.646a.5.5 0 0 0-.708-.708L7.5 7.793 6.354 6.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0l3-3z"
18
+ <title>
19
+ wishlist-button/added
20
+ </title>
21
+ <g
22
+ fill="none"
22
23
  fill-rule="evenodd"
23
- />
24
+ id="Wishlist"
25
+ stroke="none"
26
+ stroke-width="1"
27
+ >
28
+ <g
29
+ id="components"
30
+ transform="translate(-417, -433)"
31
+ >
32
+ <g
33
+ id="wishlist-button/added"
34
+ transform="translate(417, 433.0588)"
35
+ >
36
+ <path
37
+ d="M1.33333333,5.68434189e-14 L22.6666667,5.68434189e-14 C23.4030667,5.68434189e-14 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,5.68434189e-14 1.33333333,5.68434189e-14 Z"
38
+ fill="currentColor"
39
+ fill-rule="nonzero"
40
+ id="Shape"
41
+ />
42
+ <path
43
+ d="M18.6268424,8.17492183 C19.1243859,7.67737836 19.1243859,6.87070105 18.6268424,6.3731576 C18.129299,5.87561415 17.3226216,5.87561413 16.8250782,6.37315756 L10.0913659,13.1094147 L7.1749509,10.1904547 C6.85309671,9.86860055 6.38398401,9.74290217 5.94432301,9.86070898 C5.50466201,9.97851579 5.16124768,10.3219301 5.04344087,10.7615911 C4.92563406,11.2012521 5.05133243,11.6703648 5.37318663,11.992219 L9.19048381,15.8095162 C9.42920298,16.0488396 9.75333852,16.183341 10.0913659,16.183341 C10.4293934,16.183341 10.7535289,16.0488396 10.9922481,15.8095162 L18.6268424,8.17492183 Z"
44
+ fill="#FFFFFF"
45
+ id="Path"
46
+ />
47
+ </g>
48
+ </g>
49
+ </g>
24
50
  </svg>
25
51
  </i>
26
52
  </div>
@@ -30,24 +56,50 @@ exports[`ItemListButton component should add and remove item to the list on clic
30
56
  exports[`ItemListButton component should add and remove item to the list on click 2`] = `
31
57
  <DocumentFragment>
32
58
  <div
33
- aria-label="Add to list_name"
34
59
  class="item-list-button item-list-button--selected modifier"
35
60
  role="button"
61
+ tabindex="0"
36
62
  >
37
63
  <i>
38
64
  <svg
39
- fill="currentColor"
40
65
  height="1em"
41
- stroke="currentColor"
42
- stroke-width="0"
43
- viewBox="0 0 16 16"
66
+ version="1.1"
67
+ viewBox="0 0 24 29"
44
68
  width="1em"
45
69
  xmlns="http://www.w3.org/2000/svg"
46
70
  >
47
- <path
48
- d="M2 15.5V2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.74.439L8 13.069l-5.26 2.87A.5.5 0 0 1 2 15.5zm8.854-9.646a.5.5 0 0 0-.708-.708L7.5 7.793 6.354 6.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0l3-3z"
71
+ <title>
72
+ wishlist-button/added
73
+ </title>
74
+ <g
75
+ fill="none"
49
76
  fill-rule="evenodd"
50
- />
77
+ id="Wishlist"
78
+ stroke="none"
79
+ stroke-width="1"
80
+ >
81
+ <g
82
+ id="components"
83
+ transform="translate(-417, -433)"
84
+ >
85
+ <g
86
+ id="wishlist-button/added"
87
+ transform="translate(417, 433.0588)"
88
+ >
89
+ <path
90
+ d="M1.33333333,5.68434189e-14 L22.6666667,5.68434189e-14 C23.4030667,5.68434189e-14 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,5.68434189e-14 1.33333333,5.68434189e-14 Z"
91
+ fill="currentColor"
92
+ fill-rule="nonzero"
93
+ id="Shape"
94
+ />
95
+ <path
96
+ d="M18.6268424,8.17492183 C19.1243859,7.67737836 19.1243859,6.87070105 18.6268424,6.3731576 C18.129299,5.87561415 17.3226216,5.87561413 16.8250782,6.37315756 L10.0913659,13.1094147 L7.1749509,10.1904547 C6.85309671,9.86860055 6.38398401,9.74290217 5.94432301,9.86070898 C5.50466201,9.97851579 5.16124768,10.3219301 5.04344087,10.7615911 C4.92563406,11.2012521 5.05133243,11.6703648 5.37318663,11.992219 L9.19048381,15.8095162 C9.42920298,16.0488396 9.75333852,16.183341 10.0913659,16.183341 C10.4293934,16.183341 10.7535289,16.0488396 10.9922481,15.8095162 L18.6268424,8.17492183 Z"
97
+ fill="#FFFFFF"
98
+ id="Path"
99
+ />
100
+ </g>
101
+ </g>
102
+ </g>
51
103
  </svg>
52
104
  </i>
53
105
  </div>
@@ -57,24 +109,50 @@ exports[`ItemListButton component should add and remove item to the list on clic
57
109
  exports[`ItemListButton component should render button marked selected when current parent is in the list 1`] = `
58
110
  <DocumentFragment>
59
111
  <div
60
- aria-label="Add to list_name"
61
112
  class="item-list-button item-list-button--selected modifier"
62
113
  role="button"
114
+ tabindex="0"
63
115
  >
64
116
  <i>
65
117
  <svg
66
- fill="currentColor"
67
118
  height="1em"
68
- stroke="currentColor"
69
- stroke-width="0"
70
- viewBox="0 0 16 16"
119
+ version="1.1"
120
+ viewBox="0 0 24 29"
71
121
  width="1em"
72
122
  xmlns="http://www.w3.org/2000/svg"
73
123
  >
74
- <path
75
- d="M2 15.5V2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.74.439L8 13.069l-5.26 2.87A.5.5 0 0 1 2 15.5zm8.854-9.646a.5.5 0 0 0-.708-.708L7.5 7.793 6.354 6.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0l3-3z"
124
+ <title>
125
+ wishlist-button/added
126
+ </title>
127
+ <g
128
+ fill="none"
76
129
  fill-rule="evenodd"
77
- />
130
+ id="Wishlist"
131
+ stroke="none"
132
+ stroke-width="1"
133
+ >
134
+ <g
135
+ id="components"
136
+ transform="translate(-417, -433)"
137
+ >
138
+ <g
139
+ id="wishlist-button/added"
140
+ transform="translate(417, 433.0588)"
141
+ >
142
+ <path
143
+ d="M1.33333333,5.68434189e-14 L22.6666667,5.68434189e-14 C23.4030667,5.68434189e-14 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,5.68434189e-14 1.33333333,5.68434189e-14 Z"
144
+ fill="currentColor"
145
+ fill-rule="nonzero"
146
+ id="Shape"
147
+ />
148
+ <path
149
+ d="M18.6268424,8.17492183 C19.1243859,7.67737836 19.1243859,6.87070105 18.6268424,6.3731576 C18.129299,5.87561415 17.3226216,5.87561413 16.8250782,6.37315756 L10.0913659,13.1094147 L7.1749509,10.1904547 C6.85309671,9.86860055 6.38398401,9.74290217 5.94432301,9.86070898 C5.50466201,9.97851579 5.16124768,10.3219301 5.04344087,10.7615911 C4.92563406,11.2012521 5.05133243,11.6703648 5.37318663,11.992219 L9.19048381,15.8095162 C9.42920298,16.0488396 9.75333852,16.183341 10.0913659,16.183341 C10.4293934,16.183341 10.7535289,16.0488396 10.9922481,15.8095162 L18.6268424,8.17492183 Z"
150
+ fill="#FFFFFF"
151
+ id="Path"
152
+ />
153
+ </g>
154
+ </g>
155
+ </g>
78
156
  </svg>
79
157
  </i>
80
158
  </div>
@@ -84,26 +162,56 @@ exports[`ItemListButton component should render button marked selected when curr
84
162
  exports[`ItemListButton component should render button not marked selected when current parent is not in the list 1`] = `
85
163
  <DocumentFragment>
86
164
  <div
87
- aria-label="Add to list_name"
88
165
  class="item-list-button modifier"
89
166
  role="button"
167
+ tabindex="0"
90
168
  >
91
169
  <i>
92
170
  <svg
93
- fill="currentColor"
94
171
  height="1em"
95
- stroke="currentColor"
96
- stroke-width="0"
97
- viewBox="0 0 16 16"
172
+ version="1.1"
173
+ viewBox="0 0 26 30"
98
174
  width="1em"
99
175
  xmlns="http://www.w3.org/2000/svg"
100
176
  >
101
- <path
102
- d="M7.84 4.1a.178.178 0 0 1 .32 0l.634 1.285a.178.178 0 0 0 .134.098l1.42.206c.145.021.204.2.098.303L9.42 6.993a.178.178 0 0 0-.051.158l.242 1.414a.178.178 0 0 1-.258.187l-1.27-.668a.178.178 0 0 0-.165 0l-1.27.668a.178.178 0 0 1-.257-.187l.242-1.414a.178.178 0 0 0-.05-.158l-1.03-1.001a.178.178 0 0 1 .098-.303l1.42-.206a.178.178 0 0 0 .134-.098L7.84 4.1z"
103
- />
104
- <path
105
- d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.777.416L8 13.101l-5.223 2.815A.5.5 0 0 1 2 15.5V2zm2-1a1 1 0 0 0-1 1v12.566l4.723-2.482a.5.5 0 0 1 .554 0L13 14.566V2a1 1 0 0 0-1-1H4z"
106
- />
177
+ <title>
178
+ wishlist-button/base
179
+ </title>
180
+ <g
181
+ fill="none"
182
+ fill-rule="evenodd"
183
+ id="Wishlist"
184
+ stroke="none"
185
+ stroke-width="1"
186
+ >
187
+ <g
188
+ fill-rule="nonzero"
189
+ id="components"
190
+ transform="translate(-416, -236)"
191
+ >
192
+ <g
193
+ id="wishlist-button/base"
194
+ transform="translate(417, 237)"
195
+ >
196
+ <g
197
+ fill="#FFFFFF"
198
+ id="Group"
199
+ stroke="currentColor"
200
+ stroke-width="2"
201
+ >
202
+ <path
203
+ d="M1.33333333,0 L22.6666667,0 C23.4030667,0 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,0 1.33333333,0 Z"
204
+ id="Shape"
205
+ />
206
+ </g>
207
+ <path
208
+ d="M18.5475051,9.70770608 L14.3505774,9.09775478 L12.4744399,5.29423737 C12.4231974,5.19009934 12.3388952,5.10579713 12.2347571,5.05455461 C11.9735856,4.92562182 11.6562126,5.03306581 11.5256268,5.29423737 L9.64948934,9.09775478 L5.4525616,9.70770608 C5.33685268,9.72423592 5.23106167,9.77878441 5.15006543,9.86143364 C4.94616811,10.0710041 4.95060698,10.406139 5.15998334,10.6102356 L8.19651593,13.5707309 L7.47912064,17.7511288 C7.44480011,17.9495157 7.52626118,18.150158 7.68916287,18.2684724 C7.85206456,18.3867868 8.06806465,18.4021884 8.24610546,18.3081846 L12.0000333,16.3345211 L15.7539612,18.3081846 C15.8564463,18.3627331 15.9754612,18.3809159 16.0895171,18.3610801 C16.3771364,18.3114906 16.5705356,18.0387481 16.5209461,17.7511288 L15.8035508,13.5707309 L18.8400834,10.6102356 C18.9227326,10.5292394 18.9772811,10.4234484 18.9938109,10.3077395 C19.0384415,10.0184672 18.8367774,9.75068367 18.5475051,9.70770608 Z"
209
+ fill="currentColor"
210
+ id="Path"
211
+ />
212
+ </g>
213
+ </g>
214
+ </g>
107
215
  </svg>
108
216
  </i>
109
217
  </div>
@@ -9,18 +9,48 @@ exports[`ItemListCounter component should display listItem count and route to ur
9
9
  type="button"
10
10
  >
11
11
  <svg
12
- fill="currentColor"
13
12
  height="1em"
14
- stroke="currentColor"
15
- stroke-width="0"
16
- viewBox="0 0 16 16"
13
+ version="1.1"
14
+ viewBox="0 0 24 29"
17
15
  width="1em"
18
16
  xmlns="http://www.w3.org/2000/svg"
19
17
  >
20
- <path
21
- d="M2 15.5V2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.74.439L8 13.069l-5.26 2.87A.5.5 0 0 1 2 15.5zM8.16 4.1a.178.178 0 0 0-.32 0l-.634 1.285a.178.178 0 0 1-.134.098l-1.42.206a.178.178 0 0 0-.098.303L6.58 6.993c.042.041.061.1.051.158L6.39 8.565a.178.178 0 0 0 .258.187l1.27-.668a.178.178 0 0 1 .165 0l1.27.668a.178.178 0 0 0 .257-.187L9.368 7.15a.178.178 0 0 1 .05-.158l1.028-1.001a.178.178 0 0 0-.098-.303l-1.42-.206a.178.178 0 0 1-.134-.098L8.16 4.1z"
18
+ <title>
19
+ wishlist-button/hover
20
+ </title>
21
+ <g
22
+ fill="none"
22
23
  fill-rule="evenodd"
23
- />
24
+ id="Wishlist"
25
+ stroke="none"
26
+ stroke-width="1"
27
+ >
28
+ <g
29
+ fill-rule="nonzero"
30
+ id="components"
31
+ transform="translate(-566, -237)"
32
+ >
33
+ <g
34
+ id="wishlist-button/hover"
35
+ transform="translate(566, 237.3529)"
36
+ >
37
+ <g
38
+ fill="currentColor"
39
+ id="Group"
40
+ >
41
+ <path
42
+ d="M1.33333333,0 L22.6666667,0 C23.4030667,0 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,0 1.33333333,0 Z"
43
+ id="Shape"
44
+ />
45
+ </g>
46
+ <path
47
+ d="M18.5475051,9.70770608 L14.3505774,9.09775478 L12.4744399,5.29423737 C12.4231974,5.19009934 12.3388952,5.10579713 12.2347571,5.05455461 C11.9735856,4.92562182 11.6562126,5.03306581 11.5256268,5.29423737 L9.64948934,9.09775478 L5.4525616,9.70770608 C5.33685268,9.72423592 5.23106167,9.77878441 5.15006543,9.86143364 C4.94616811,10.0710041 4.95060698,10.406139 5.15998334,10.6102356 L8.19651593,13.5707309 L7.47912064,17.7511288 C7.44480011,17.9495157 7.52626118,18.150158 7.68916287,18.2684724 C7.85206456,18.3867868 8.06806465,18.4021884 8.24610546,18.3081846 L12.0000333,16.3345211 L15.7539612,18.3081846 C15.8564463,18.3627331 15.9754612,18.3809159 16.0895171,18.3610801 C16.3771364,18.3114906 16.5705356,18.0387481 16.5209461,17.7511288 L15.8035508,13.5707309 L18.8400834,10.6102356 C18.9227326,10.5292394 18.9772811,10.4234484 18.9938109,10.3077395 C19.0384415,10.0184672 18.8367774,9.75068367 18.5475051,9.70770608 Z"
48
+ fill="#FFFFFF"
49
+ id="Path"
50
+ />
51
+ </g>
52
+ </g>
53
+ </g>
24
54
  </svg>
25
55
  <span
26
56
  class="item-list-counter__badge"
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import buildPropsQuery from '../../../../src/helpers/build-props-query';
5
5
 
6
- const CONTENT_INTERFACE = 'content/content';
6
+ const CONTENT_INTERFACE = 'content/content-base';
7
7
 
8
8
  describe('get card render props', () => {
9
9
  const relations = [
@@ -60,7 +60,7 @@ describe('get card render props', () => {
60
60
  };
61
61
  const query = buildPropsQuery(_data, [], cardProps);
62
62
  expect(query).toEqual(
63
- 'id,name,url,sponsored,featured,category{name,listingPageId,listingPageEntity, id publishedListingPage{id, url}},image{id,url,data}'
63
+ 'id,name,url,sponsored,featured,live,category{name,listingPageId,listingPageEntity, id publishedListingPage{id, url}},image{id,url,data}'
64
64
  );
65
65
  });
66
66
 
@@ -70,7 +70,7 @@ describe('get card render props', () => {
70
70
  displayThumbnail: false
71
71
  });
72
72
  expect(query).toEqual(
73
- 'id,name,alternativePreHeader{name},alternativeHeadline,url,sponsored,featured'
73
+ 'id,name,alternativePreHeader{name},alternativeHeadline,url,sponsored,featured,live'
74
74
  );
75
75
  });
76
76
 
@@ -92,18 +92,20 @@ describe('get card render props', () => {
92
92
  displayThumbnail: false
93
93
  });
94
94
  expect(query).toEqual(
95
- 'id,name,alternativePreHeader{name},alternativeHeadline,url,sponsored,featured,category{name,listingPageId,listingPageEntity, id publishedListingPage{id, url}}'
95
+ 'id,name,alternativePreHeader{name},alternativeHeadline,url,sponsored,featured,live,category{name,listingPageId,listingPageEntity, id publishedListingPage{id, url}}'
96
96
  );
97
97
  });
98
98
 
99
99
  it('should not include category if the schema does not have a category', () => {
100
100
  const query = buildPropsQuery(data, [], cardProps);
101
- expect(query).toEqual('id,name,url,sponsored,featured,image{id,url,data}');
101
+ expect(query).toEqual('id,name,url,sponsored,featured,live,image{id,url,data}');
102
102
  });
103
103
 
104
104
  it('should return complex props when base includes published', () => {
105
105
  const query = buildPropsQuery(data, ['published.date'], cardProps);
106
- expect(query).toEqual('id,name,url,sponsored,featured,image{id,url,data},published{date,url}');
106
+ expect(query).toEqual(
107
+ 'id,name,url,sponsored,featured,live,image{id,url,data},published{date,url}'
108
+ );
107
109
  });
108
110
 
109
111
  it('should return result as if isCard was false when isCard is not passed', () => {
@@ -113,7 +115,7 @@ describe('get card render props', () => {
113
115
 
114
116
  it('should return result as if isCard was false when extraProps were not passed', () => {
115
117
  const query = buildPropsQuery(data, undefined, cardProps);
116
- expect(query).toEqual('id,name,url,sponsored,featured,image{id,url,data}');
118
+ expect(query).toEqual('id,name,url,sponsored,featured,live,image{id,url,data}');
117
119
  });
118
120
 
119
121
  it('should return a string with respective props query when isCard is passed as true', () => {
@@ -136,7 +138,7 @@ describe('get card render props', () => {
136
138
 
137
139
  it('should not include category and image props if card options says not to', () => {
138
140
  const query = buildPropsQuery(data, [], { displayCategory: false, displayThumbnail: false });
139
- expect(query).toEqual('id,name,url,sponsored,featured');
141
+ expect(query).toEqual('id,name,url,sponsored,featured,live');
140
142
  });
141
143
 
142
144
  it('should not fetch image if the schema does not have imageId property', () => {
@@ -153,7 +155,7 @@ describe('get card render props', () => {
153
155
  };
154
156
  const query = buildPropsQuery(_data, [], cardProps);
155
157
  expect(query).toEqual(
156
- 'id,name,url,sponsored,featured,category{name,listingPageId,listingPageEntity, id publishedListingPage{id, url}}'
158
+ 'id,name,url,sponsored,featured,live,category{name,listingPageId,listingPageEntity, id publishedListingPage{id, url}}'
157
159
  );
158
160
  });
159
161
 
@@ -179,7 +181,7 @@ describe('get card render props', () => {
179
181
  };
180
182
  const query = buildPropsQuery(_data, ['address.country'], cardProps);
181
183
  expect(query).toEqual(
182
- 'id,name,url,sponsored,featured,category{name,listingPageId,listingPageEntity, id publishedListingPage{id, url}},address{country,id}'
184
+ 'id,name,url,sponsored,featured,live,category{name,listingPageId,listingPageEntity, id publishedListingPage{id, url}},address{country,id}'
183
185
  );
184
186
  });
185
187
 
@@ -204,7 +206,7 @@ describe('get card render props', () => {
204
206
  const linkProps = ['nestedProperty.title', 'nestedDynamicProperty.title', 'address.title'];
205
207
  const query = buildPropsQuery(_data, linkProps, {}, linkProps);
206
208
  expect(query).toEqual(
207
- 'id,name,url,sponsored,featured,nestedProperty{title,url},nestedDynamicProperty{title,url},address{title,id,url}'
209
+ 'id,name,url,sponsored,featured,live,nestedProperty{title,url},nestedDynamicProperty{title,url},address{title,id,url}'
208
210
  );
209
211
  });
210
212
  });