@pixelated-tech/components 3.13.0 → 3.13.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.
- package/dist/components/admin/site-health/site-health-dependency-vulnerabilities.js +3 -1
- package/dist/components/general/buzzwordbingo.css +8 -8
- package/dist/components/general/buzzwordbingo.js +3 -3
- package/dist/components/general/countup.css +19 -0
- package/dist/components/general/countup.js +62 -0
- package/dist/components/general/global-error.css +1 -1
- package/dist/components/general/global-error.js +1 -1
- package/dist/components/general/menu-accordion.css +24 -24
- package/dist/components/general/menu-accordion.js +13 -13
- package/dist/components/general/menu-expando.css +4 -4
- package/dist/components/general/menu-expando.js +7 -7
- package/dist/components/general/microinteractions.css +1 -1
- package/dist/components/general/nerdjoke.css +5 -5
- package/dist/components/general/nerdjoke.js +2 -2
- package/dist/components/general/recipe.css +1 -1
- package/dist/components/general/recipe.js +1 -1
- package/dist/components/general/semantic.js +1 -1
- package/dist/components/general/sidepanel.css +3 -3
- package/dist/components/general/skeleton.css +4 -4
- package/dist/components/general/skeleton.js +3 -3
- package/dist/components/general/styleguide.js +2 -2
- package/dist/components/general/table.css +6 -6
- package/dist/components/general/table.js +5 -5
- package/dist/components/general/tiles.js +3 -2
- package/dist/components/integrations/socialcard.css +6 -6
- package/dist/components/integrations/socialcard.js +2 -2
- package/dist/components/integrations/wordpress.components.js +1 -1
- package/dist/components/integrations/wordpress.css +2 -2
- package/dist/components/shoppingcart/ebay.components.js +11 -11
- package/dist/components/shoppingcart/ebay.css +20 -20
- package/dist/components/shoppingcart/shoppingcart.components.js +11 -11
- package/dist/components/shoppingcart/shoppingcart.css +19 -19
- package/dist/components/sitebuilder/form/form.css +4 -4
- package/dist/components/sitebuilder/form/formcomponents.js +3 -3
- package/dist/components/sitebuilder/page/components/PageBuilderUI.js +2 -2
- package/dist/config/pixelated.config.json.enc +1 -1
- package/dist/css/pixelated.grid.scss +1 -1
- package/dist/index.js +1 -0
- package/dist/scripts/pixelated-eslint-plugin.js +103 -3
- package/dist/types/components/admin/site-health/site-health-dependency-vulnerabilities.d.ts.map +1 -1
- package/dist/types/components/general/countup.d.ts +17 -0
- package/dist/types/components/general/countup.d.ts.map +1 -0
- package/dist/types/components/general/tiles.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/scripts/pixelated-eslint-plugin.d.ts +24 -0
- package/dist/types/stories/general/countup.stories.d.ts +47 -0
- package/dist/types/stories/general/countup.stories.d.ts.map +1 -0
- package/package.json +24 -13
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
.sidepanel-tab-label { display: none; }
|
|
111
111
|
|
|
112
112
|
/* Integration overrides for MenuAccordion inside SidePanel */
|
|
113
|
-
.sidepanel-content .
|
|
113
|
+
.sidepanel-content .accordion-menu-wrapper {
|
|
114
114
|
position: relative !important;
|
|
115
115
|
top: auto !important;
|
|
116
116
|
left: auto !important;
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/* Ensure the inner list takes full width */
|
|
126
|
-
.sidepanel-content .
|
|
127
|
-
.sidepanel-content .
|
|
126
|
+
.sidepanel-content .accordion-menu,
|
|
127
|
+
.sidepanel-content .accordion-menu ul {
|
|
128
128
|
width: 100% !important;
|
|
129
129
|
}
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
min-height: 0;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.skeleton
|
|
11
|
+
.skeleton-animated {
|
|
12
12
|
animation: pulse 1.5s ease-in-out infinite;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.skeleton
|
|
15
|
+
.skeleton-avatar {
|
|
16
16
|
width: 3rem;
|
|
17
17
|
height: 3rem;
|
|
18
18
|
border-radius: 9999px;
|
|
19
19
|
display: inline-block;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.skeleton
|
|
22
|
+
.skeleton-rect {
|
|
23
23
|
display: block;
|
|
24
24
|
width: 100%;
|
|
25
25
|
height: 160px;
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@media (prefers-reduced-motion: reduce) {
|
|
47
|
-
.skeleton
|
|
47
|
+
.skeleton-animated { animation: none }
|
|
48
48
|
}
|
|
@@ -24,13 +24,13 @@ Skeleton.propTypes = {
|
|
|
24
24
|
animated: PropTypes.bool,
|
|
25
25
|
};
|
|
26
26
|
export function Skeleton({ variant = 'text', lines = 1, width, height, animated = true, }) {
|
|
27
|
-
const base = `skeleton ${animated ? 'skeleton
|
|
27
|
+
const base = `skeleton ${animated ? 'skeleton-animated' : ''}`;
|
|
28
28
|
if (variant === 'avatar') {
|
|
29
29
|
const avatarStyle = width != null || height != null ? { ...(width != null ? { width } : {}), ...(height != null ? { height } : {}) } : undefined;
|
|
30
|
-
return _jsx("div", { "aria-hidden": "true", className: `${base} skeleton
|
|
30
|
+
return _jsx("div", { "aria-hidden": "true", className: `${base} skeleton-avatar`, style: avatarStyle });
|
|
31
31
|
}
|
|
32
32
|
if (variant === 'rect') {
|
|
33
|
-
return (_jsx("div", { "aria-hidden": "true", className: `${base} skeleton
|
|
33
|
+
return (_jsx("div", { "aria-hidden": "true", className: `${base} skeleton-rect`, style: { width: width ?? '100%', height: height ?? 160 } }));
|
|
34
34
|
}
|
|
35
35
|
return (_jsx("div", { "aria-hidden": "true", className: "skeleton-text", children: Array.from({ length: Math.max(1, Number(lines || 1)) }).map((_, i) => (_jsx("div", { className: base + ' skeleton-line', style: { width: typeof width === 'number' ? `${width}%` : (width ?? (i === (lines || 1) - 1 ? '60%' : '100%')) } }, i))) }));
|
|
36
36
|
}
|
|
@@ -24,8 +24,8 @@ export function StyleGuideUI(props) {
|
|
|
24
24
|
const bodyFonts = getComputedStyle(document.documentElement).getPropertyValue("--body-font").trim();
|
|
25
25
|
primaryBodyFont = bodyFonts.split(',')[0].replaceAll('"', '').replaceAll("'", '');
|
|
26
26
|
}
|
|
27
|
-
return (_jsxs(_Fragment, { children: [_jsx(PageTitleHeader, { title: "Style Guide" }), _jsxs(PageSection, { columns: 1, maxWidth: "1024px", padding: "20px", id: "colors-section", children: [_jsx("h2", { children: "Color Palette" }), _jsxs("div", { style: { display: 'flex', gap: '10px', flexWrap: 'wrap' }, children: [_jsx("div", { style: { backgroundColor: 'var(--primary-color)', color: '#fff' }, className: "
|
|
28
|
-
.
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_jsx(PageTitleHeader, { title: "Style Guide" }), _jsxs(PageSection, { columns: 1, maxWidth: "1024px", padding: "20px", id: "colors-section", children: [_jsx("h2", { children: "Color Palette" }), _jsxs("div", { style: { display: 'flex', gap: '10px', flexWrap: 'wrap' }, children: [_jsx("div", { style: { backgroundColor: 'var(--primary-color)', color: '#fff' }, className: "color-swatch", children: "Primary Color" }), _jsx("div", { style: { backgroundColor: 'var(--secondary-color)' }, className: "color-swatch", children: "Secondary Color" }), _jsx("div", { style: { backgroundColor: 'var(--accent1-color)' }, className: "color-swatch", children: "Accent 1 Color" }), _jsx("div", { style: { backgroundColor: 'var(--accent2-color)' }, className: "color-swatch", children: "Accent 2 Color" }), _jsx("div", { style: { backgroundColor: 'var(--bg-color)' }, className: "color-swatch", children: "Background Color" }), _jsx("div", { style: { backgroundColor: 'var(--text-color)' }, className: "color-swatch", children: "Text Color" })] })] }), _jsx("style", { children: `
|
|
28
|
+
.color-swatch {
|
|
29
29
|
color: #000;
|
|
30
30
|
border: 1px solid #ccc;
|
|
31
31
|
padding: 10px;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
table.
|
|
1
|
+
table.pix-table, .pix-table th, .pix-table tr, .pix-table td {
|
|
2
2
|
border : 1px solid #ccc ;
|
|
3
3
|
text-align: left;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
table.
|
|
6
|
+
table.pix-table {
|
|
7
7
|
width: 100%
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
table.
|
|
10
|
+
table.pix-table {
|
|
11
11
|
th {
|
|
12
12
|
text-transform: uppercase;
|
|
13
13
|
font-size: 1.2em;
|
|
@@ -60,14 +60,14 @@ dialog {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
.
|
|
63
|
+
.sort-arrow {
|
|
64
64
|
display: inline-block;
|
|
65
65
|
margin-left: 5px;
|
|
66
66
|
font-size: 0.8em;
|
|
67
67
|
}
|
|
68
|
-
.
|
|
68
|
+
.sort-arrow.asc::before {
|
|
69
69
|
content: '▲'; /* Up arrow for ascending */
|
|
70
70
|
}
|
|
71
|
-
.
|
|
71
|
+
.sort-arrow.desc::before {
|
|
72
72
|
content: '▼'; /* Down arrow for descending */
|
|
73
73
|
}
|
|
@@ -38,7 +38,7 @@ export function Table(props) {
|
|
|
38
38
|
function getHeadings(data) {
|
|
39
39
|
const headings = Object.keys(data[0]).map((key, i) => {
|
|
40
40
|
return (props.sortable && props.sortable == true)
|
|
41
|
-
? _jsxs("th", { onClick: () => { sortTable(key); }, children: [_jsx("span", { children: key }), " ", _jsx("span", { className: "
|
|
41
|
+
? _jsxs("th", { onClick: () => { sortTable(key); }, children: [_jsx("span", { children: key }), " ", _jsx("span", { className: "sort-arrow" })] }, i)
|
|
42
42
|
: _jsx("th", { children: _jsx("span", { children: key }) }, i);
|
|
43
43
|
});
|
|
44
44
|
return _jsx("tr", { children: headings });
|
|
@@ -96,7 +96,7 @@ export function Table(props) {
|
|
|
96
96
|
return (myHeader);
|
|
97
97
|
}
|
|
98
98
|
function getDirection(header) {
|
|
99
|
-
const arrow = header.querySelector('.
|
|
99
|
+
const arrow = header.querySelector('.sort-arrow');
|
|
100
100
|
let oldDirection = '';
|
|
101
101
|
if (arrow) {
|
|
102
102
|
const oldClassList = arrow.classList;
|
|
@@ -113,7 +113,7 @@ export function Table(props) {
|
|
|
113
113
|
const table = document.getElementById(props.id);
|
|
114
114
|
const headers = table.querySelectorAll('th');
|
|
115
115
|
headers.forEach(header => {
|
|
116
|
-
const arrow = header.querySelector('.
|
|
116
|
+
const arrow = header.querySelector('.sort-arrow');
|
|
117
117
|
if (arrow) {
|
|
118
118
|
arrow.classList.remove('asc', 'desc');
|
|
119
119
|
}
|
|
@@ -121,7 +121,7 @@ export function Table(props) {
|
|
|
121
121
|
}
|
|
122
122
|
function updateArrow(column, oldDirection) {
|
|
123
123
|
const header = getHeader(column);
|
|
124
|
-
const arrow = header.querySelector('.
|
|
124
|
+
const arrow = header.querySelector('.sort-arrow');
|
|
125
125
|
if (arrow) {
|
|
126
126
|
if (oldDirection == 'asc') {
|
|
127
127
|
arrow.classList.add('desc');
|
|
@@ -146,6 +146,6 @@ export function Table(props) {
|
|
|
146
146
|
updateArrow(column, oldDirection);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
return (_jsx("div", { children: _jsxs("table", { id: props.id ?? undefined, className: "
|
|
149
|
+
return (_jsx("div", { children: _jsxs("table", { id: props.id ?? undefined, className: "pix-table", children: [_jsx("thead", { children: getHeadings(tableData) }), _jsx("tbody", { children: getRows(tableData) })] }) }));
|
|
150
150
|
}
|
|
151
151
|
;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable pixelated/class-name-kebab-case */
|
|
1
2
|
"use client";
|
|
2
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
4
|
import PropTypes from "prop-types";
|
|
@@ -32,7 +33,7 @@ Tiles.propTypes = {
|
|
|
32
33
|
export function Tiles(props) {
|
|
33
34
|
const rowCount = props.rowCount ?? 2;
|
|
34
35
|
if (props.cards && props.cards.length > 0) {
|
|
35
|
-
return (_jsx("div", { className: "tiles-container", children: _jsx("div", { className: `tile-container row-${rowCount}col`, children: props.cards.map((card, i) => (_jsx("div", { className: "
|
|
36
|
+
return (_jsx("div", { className: "tiles-container", children: _jsx("div", { className: `tile-container row-${rowCount}col`, children: props.cards.map((card, i) => (_jsx("div", { className: "grid-item", children: _jsx(Tile, { index: i, cardLength: props.cards.length, link: card.link, image: card.image, imageAlt: card.imageAlt, bodyText: card.bodyText, imgClick: props.imgClick, variant: (props.variant ?? "overlay") }) }, i))) }) }));
|
|
36
37
|
}
|
|
37
38
|
else {
|
|
38
39
|
return (_jsx(Loading, {}));
|
|
@@ -76,7 +77,7 @@ function Tile(props) {
|
|
|
76
77
|
const tileBody = _jsxs("div", { className: "tile-image" + (imgClick ? " clickable" : ""), children: [_jsx(SmartImage, { src: props.image, title: props?.imageAlt ?? undefined, alt: props?.imageAlt ?? "", onClick: imgClick ? (event) => imgClick(event, props.image) : undefined, cloudinaryEnv: config?.cloudinary?.product_env ?? undefined }), _jsx("div", { className: "tile-image-overlay", children: _jsxs("div", { className: "tile-image-overlay-text", children: [_jsx("div", { className: "tile-image-overlay-title", children: props.imageAlt }), _jsx("div", { className: "tile-image-overlay-body", children: props.bodyText })] }) })] });
|
|
77
78
|
const rootClass = `tile${(props.variant) ? ' ' + props.variant : ''}`;
|
|
78
79
|
return (_jsx("div", { className: rootClass, id: 'tile-' + props.index, children: props.link ?
|
|
79
|
-
_jsx("a", { href: props.link, className: "
|
|
80
|
+
_jsx("a", { href: props.link, className: "tile-link", children: tileBody })
|
|
80
81
|
:
|
|
81
82
|
tileBody }));
|
|
82
83
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.masonry-item { /* Masonry bricks or child elements */
|
|
43
43
|
display: inline-block;
|
|
44
44
|
padding: 5px;
|
|
45
45
|
width: 100%;
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
white-space: normal;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
.
|
|
79
|
+
.card-title {
|
|
80
80
|
background-color: #EEE;
|
|
81
81
|
/* background-image: url(/images/pix/pix-bg-sm-bw.gif); */
|
|
82
82
|
border-bottom: 1px solid #999;
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
/* .cardTitle a {
|
|
89
89
|
} */
|
|
90
90
|
|
|
91
|
-
.
|
|
91
|
+
.card-icon {
|
|
92
92
|
background: #FFF;
|
|
93
93
|
border: 0;
|
|
94
94
|
height: 20px;
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
margin: 0px 5px 0px 0px;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.
|
|
100
|
+
.card-date {
|
|
101
101
|
background-color: #DDD;
|
|
102
102
|
border-top: 1px solid #999;
|
|
103
103
|
font-size: 0.8em;
|
|
@@ -105,14 +105,14 @@
|
|
|
105
105
|
text-align: right;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.
|
|
108
|
+
.card-body {
|
|
109
109
|
background-color: #fff;
|
|
110
110
|
display: inline-block;
|
|
111
111
|
padding: 5px;
|
|
112
112
|
width: 100%;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
.
|
|
115
|
+
.cards-loading {
|
|
116
116
|
column-span: all;
|
|
117
117
|
text-align: center;
|
|
118
118
|
}
|
|
@@ -312,7 +312,7 @@ SocialCard.propTypes = {
|
|
|
312
312
|
};
|
|
313
313
|
export function SocialCard(props) {
|
|
314
314
|
const config = usePixelatedConfig();
|
|
315
|
-
return (_jsx("div", { className: "
|
|
315
|
+
return (_jsx("div", { className: "masonry-item", children: _jsxs("div", { className: "card", children: [_jsx("div", { className: "card-title", children: _jsxs("a", { href: props.card.link, target: "_blank", rel: "noopener noreferrer", children: [_jsx(SmartImage, { className: "card-icon", src: props.iconSrc, title: props.iconSrcAlt, alt: props.iconSrcAlt, cloudinaryEnv: config?.cloudinary?.product_env, cloudinaryDomain: config?.cloudinary?.baseUrl, cloudinaryTransforms: config?.cloudinary?.transforms }), props.card.title] }) }), _jsx("div", { className: "card-body", dangerouslySetInnerHTML: { __html: removeDeadHrefs(props.card.description) } }), _jsx("div", { className: "card-date", children: props.card.pubDate })] }) }, props.card.guid));
|
|
316
316
|
}
|
|
317
317
|
/* ========== SPINNER ========== */
|
|
318
318
|
/** SocialCardsLoading.propTypes — No props (simple loading indicator).
|
|
@@ -320,5 +320,5 @@ export function SocialCard(props) {
|
|
|
320
320
|
*/
|
|
321
321
|
SocialCardsLoading.propTypes = { /** no props */};
|
|
322
322
|
export function SocialCardsLoading() {
|
|
323
|
-
return (_jsx("div", { className: "
|
|
323
|
+
return (_jsx("div", { className: "cards-loading", children: _jsx("div", { children: "Loading..." }) }));
|
|
324
324
|
}
|
|
@@ -123,5 +123,5 @@ export function BlogPostCategories(props) {
|
|
|
123
123
|
? category.trim().toLowerCase().replace(/[ /]+/g, '-')
|
|
124
124
|
: undefined).filter(Boolean).sort();
|
|
125
125
|
const config = usePixelatedConfig();
|
|
126
|
-
return (_jsxs("div", { className: "
|
|
126
|
+
return (_jsxs("div", { className: "blog-post-categories", children: [_jsx("div", { children: "Categories: " }), myCategoryImages.map((categoryImg, index) => categoryImg ? (_jsx("span", { className: "p-category", children: _jsx(SmartImage, { className: "u-photo", src: `/images/icons/${categoryImg}.png`, title: String(categoryImg), alt: String(categoryImg), cloudinaryEnv: config?.cloudinary?.product_env ?? undefined, cloudinaryDomain: config?.cloudinary?.baseUrl ?? undefined, cloudinaryTransforms: config?.cloudinary?.transforms ?? undefined }) }, categoryImg + "-" + index)) : null)] }));
|
|
127
127
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
border-radius: 25px;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.
|
|
12
|
+
.blog-post-categories {
|
|
13
13
|
/* border: 1px solid #ccc; */
|
|
14
14
|
margin: 10px;
|
|
15
15
|
padding: 20px;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.blog-post-summary .p-category img,
|
|
57
|
-
.
|
|
57
|
+
.blog-post-categories .p-category img {
|
|
58
58
|
width: 30px;
|
|
59
59
|
height: 30px;
|
|
60
60
|
margin: 0 5px;
|
|
@@ -98,10 +98,10 @@ export function EbayItems(props) {
|
|
|
98
98
|
ToggleLoading(false);
|
|
99
99
|
}, []);
|
|
100
100
|
if (items && items.length > 0) {
|
|
101
|
-
return (_jsxs(_Fragment, { children: [_jsx(Loading, {}), _jsx("div", { className: "
|
|
101
|
+
return (_jsxs(_Fragment, { children: [_jsx(Loading, {}), _jsx("div", { className: "ebay-items-header", children: _jsx(EbayItemHeader, { title: `${items.length} Store Items` }) }), _jsx("div", { className: "ebay-items-header", children: _jsx(EbayListFilter, { aspects: aspects, callback: fetchItems }) }), _jsx("div", { id: "ebay-items", className: "ebay-items", children: paintItems({ items: items, cloudinaryProductEnv: props.cloudinaryProductEnv }) })] }));
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
|
-
return (_jsx("div", { className: "section-container", children: _jsx("div", { id: "
|
|
104
|
+
return (_jsx("div", { className: "section-container", children: _jsx("div", { id: "ebay-items", className: "ebay-items", children: _jsx(Loading, {}) }) }));
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
@@ -154,7 +154,7 @@ export function EbayListFilter(props) {
|
|
|
154
154
|
props.callback({ aspectName: aspectName.value, aspectValue: aspectValue.value });
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
return (_jsxs("form", { name: "
|
|
157
|
+
return (_jsxs("form", { name: "ebay-items-filter", id: "ebay-items-filter", children: [_jsxs("span", { className: "filter-input", children: [_jsx("label", { htmlFor: "aspectName", children: "Aspect:" }), _jsxs("select", { id: "aspectName", onChange: onAspectNameChange, children: [_jsx("option", { value: "" }), aspectNames.map((aspectName, index) => _jsx("option", { value: aspectName, children: aspectName }, index))] })] }), _jsxs("span", { className: "filter-input", children: [_jsx("label", { htmlFor: "aspectValue", onChange: onAspectValueChange, children: "Value:" }), _jsx("select", { id: "aspectValue", children: _jsx("option", { value: "" }) })] }), _jsx("span", { className: "filter-input", children: _jsx("button", { type: "button", onClick: handleAspectFilter, children: "Filter" }) })] }));
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
160
160
|
* EbayListItem — Render a single eBay item with thumbnail, metadata and add-to-cart actions.
|
|
@@ -185,13 +185,13 @@ export function EbayListItem(props) {
|
|
|
185
185
|
shoppingCartItem.itemURL = itemURL;
|
|
186
186
|
const config = usePixelatedConfig();
|
|
187
187
|
const itemImageComponent = _jsx(SmartImage, { src: itemImage, title: thisItem.title, alt: thisItem.title, cloudinaryEnv: props.cloudinaryProductEnv ?? undefined, cloudinaryDomain: config?.cloudinary?.baseUrl ?? undefined, cloudinaryTransforms: config?.cloudinary?.transforms ?? undefined });
|
|
188
|
-
return (_jsxs("div", { className: "
|
|
188
|
+
return (_jsxs("div", { className: "ebay-item row-12col", children: [_jsx("div", { className: "ebay-item-photo grid-s1-e5", children: itemURL
|
|
189
189
|
? _jsx("a", { href: itemURL, target: itemURLTarget, rel: "noopener noreferrer", children: itemImageComponent })
|
|
190
|
-
: (itemImageComponent) }), _jsxs("div", { className: "
|
|
190
|
+
: (itemImageComponent) }), _jsxs("div", { className: "ebay-item-body grid-s5-e13", children: [_jsx("div", { className: "ebay-item-header", children: itemURL
|
|
191
191
|
? _jsx(EbayItemHeader, { url: itemURL, target: itemURLTarget, title: thisItem.title })
|
|
192
|
-
: _jsx(EbayItemHeader, { title: thisItem.title }) }), _jsxs("div", { className: "
|
|
192
|
+
: _jsx(EbayItemHeader, { title: thisItem.title }) }), _jsxs("div", { className: "ebay-item-details grid12", children: [_jsxs("div", { children: [_jsx("b", { children: "Item ID: " }), thisItem.legacyItemId] }), _jsxs("div", { children: [_jsx("b", { children: "Quantity: " }), thisItem.categories[0].categoryId == apiProps.itemCategory ? 1 : 10] }), _jsxs("div", { children: [_jsx("b", { children: "Condition: " }), thisItem.condition] }), _jsxs("div", { children: [_jsx("b", { children: "Seller: " }), thisItem.seller.username, " (", thisItem.seller.feedbackScore, ")", _jsx("br", {}), thisItem.seller.feedbackPercentage, "% positive"] }), _jsxs("div", { children: [_jsx("b", { children: "Buying Options: " }), thisItem.buyingOptions[0]] }), _jsxs("div", { children: [_jsx("b", { children: "Location: " }), thisItem.itemLocation.postalCode + ", " + thisItem.itemLocation.country] }), _jsxs("div", { children: [_jsx("b", { children: "Listing Date: " }), thisItem.itemCreationDate] })] }), _jsx("div", { className: "ebay-item-price", children: itemURL
|
|
193
193
|
? _jsxs("a", { href: itemURL, target: itemURLTarget, rel: "noreferrer", children: ["$", thisItem.price.value + " " + thisItem.price.currency] })
|
|
194
|
-
: "$" + thisItem.price.value + " " + thisItem.price.currency }), _jsx("br", {}), _jsxs("div", { className: "
|
|
194
|
+
: "$" + thisItem.price.value + " " + thisItem.price.currency }), _jsx("br", {}), _jsxs("div", { className: "ebay-item-add-to-cart", children: [_jsx(ViewItemDetails, { href: "/store", itemID: thisItem.legacyItemId }), _jsx(AddToCartButton, { handler: addToShoppingCart, item: shoppingCartItem, itemID: thisItem.legacyItemId })] })] })] }));
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
197
|
* EbayItemHeader — Render a heading for an eBay item; optionally wrap in a link when a `url` is provided.
|
|
@@ -260,14 +260,14 @@ export function EbayItemDetail(props) {
|
|
|
260
260
|
const itemURLTarget = "_self"; /* "_blank" */
|
|
261
261
|
const shoppingCartItem = getShoppingCartItem({ thisItem: thisItem, cloudinaryProductEnv: props.cloudinaryProductEnv, apiProps: apiProps });
|
|
262
262
|
shoppingCartItem.itemURL = itemURL;
|
|
263
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { className: "
|
|
263
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: "ebay-item row-12col", children: [_jsx("div", { className: "ebay-item-header grid-s1-e13", children: itemURL
|
|
264
264
|
? _jsx(EbayItemHeader, { url: itemURL, title: thisItem.title })
|
|
265
|
-
: _jsx(EbayItemHeader, { title: thisItem.title }) }), _jsx("br", {}), _jsx("div", { className: "
|
|
265
|
+
: _jsx(EbayItemHeader, { title: thisItem.title }) }), _jsx("br", {}), _jsx("div", { className: "ebay-item-photo-carousel grid-s1-e7", children: _jsx(Carousel, { cards: images, draggable: true, imgFit: "contain" }) }), _jsxs("div", { className: "grid-s7-e13", children: [_jsx("div", { className: "ebay-item-details grid12", children: _jsx("div", { dangerouslySetInnerHTML: { __html: thisItem.description.replace(/(<br\s*\/?>\s*){2,}/gi, '') } }) }), _jsx("br", {}), _jsxs("div", { className: "ebay-item-details grid12", children: [_jsxs("div", { children: [_jsx("b", { children: "Item ID: " }), thisItem.legacyItemId] }), _jsxs("div", { children: [_jsx("b", { children: "Quantity: " }), thisItem.categoryId == apiProps.itemCategory ? 1 : 10] }), _jsxs("div", { children: [_jsx("b", { children: "Category: " }), thisItem.categoryPath] }), _jsxs("div", { children: [_jsx("b", { children: "Condition: " }), thisItem.condition] }), _jsxs("div", { children: [_jsx("b", { children: "Seller: " }), thisItem.seller.username, " (", thisItem.seller.feedbackScore, ")", _jsx("br", {}), thisItem.seller.feedbackPercentage, "% positive"] }), _jsxs("div", { children: [_jsx("b", { children: "Buying Options: " }), thisItem.buyingOptions[0]] }), _jsxs("div", { children: [_jsx("b", { children: "Location: " }), thisItem.itemLocation.city + ", " + thisItem.itemLocation.stateOrProvince] }), _jsxs("div", { children: [_jsx("b", { children: "Listing Date: " }), thisItem.itemCreationDate] }), _jsx("br", {})] }), _jsx("div", { className: "ebay-item-price", children: itemURL
|
|
266
266
|
? _jsxs("a", { href: itemURL, target: itemURLTarget, rel: "noreferrer", children: ["$", thisItem.price.value + " " + thisItem.price.currency] })
|
|
267
|
-
: "$" + thisItem.price.value + " " + thisItem.price.currency }), _jsx("br", {}), _jsx("div", { className: "
|
|
267
|
+
: "$" + thisItem.price.value + " " + thisItem.price.currency }), _jsx("br", {}), _jsx("div", { className: "ebay-item-add-to-cart", children: _jsx(AddToCartButton, { handler: addToShoppingCart, item: shoppingCartItem, itemID: thisItem.legacyItemId }) })] })] }) }));
|
|
268
268
|
}
|
|
269
269
|
else {
|
|
270
|
-
return (_jsx(_Fragment, { children: _jsx("div", { id: "
|
|
270
|
+
return (_jsx(_Fragment, { children: _jsx("div", { id: "ebay-items", className: "ebay-items", children: _jsx("div", { className: "centered", children: "Loading..." }) }) }));
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
/* ========== EBAY RATE LIMITS VISUALIZER ========== */
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
=============== EBAY ===============
|
|
3
3
|
======================================== */
|
|
4
4
|
|
|
5
|
-
.
|
|
5
|
+
.ebay-items {
|
|
6
6
|
text-align: center;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
@media screen and (max-width: 480px) {
|
|
10
|
-
.
|
|
10
|
+
.ebay-items {
|
|
11
11
|
padding: 20px;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.ebay-items-header {
|
|
16
16
|
font-size: 1.25em;
|
|
17
17
|
font-weight: bold;
|
|
18
18
|
text-align: center;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
#
|
|
21
|
+
#ebay-items-filter {
|
|
22
22
|
font-size: 0.8em;
|
|
23
23
|
margin: 20px auto;
|
|
24
24
|
}
|
|
@@ -27,44 +27,44 @@
|
|
|
27
27
|
#ebayItemsFilter {
|
|
28
28
|
text-align: left;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.filter-input {
|
|
31
31
|
display: block;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.
|
|
35
|
+
.ebay-item {
|
|
36
36
|
border: 1px solid #DDD;
|
|
37
37
|
text-align: left;
|
|
38
38
|
padding: 20px 5px !important;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
@media screen and (max-width: 480px) {
|
|
42
|
-
.
|
|
42
|
+
.ebay-item {
|
|
43
43
|
text-align: center;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
.
|
|
47
|
+
.ebay-item-body {
|
|
48
48
|
grid-auto-rows: min-content;
|
|
49
49
|
margin: 10px 0;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.
|
|
52
|
+
.ebay-item-header {
|
|
53
53
|
margin: 0 auto;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.
|
|
56
|
+
.ebay-item-header h2 {
|
|
57
57
|
font-size: 1.25em;
|
|
58
58
|
font-weight: bold;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/* ===== PHOTO CAROUSEL ON EBAY ITEM DETAIL PAGE ===== */
|
|
62
|
-
.
|
|
62
|
+
.ebay-item-photo-carousel {
|
|
63
63
|
width: 100%;
|
|
64
64
|
height: 400px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.
|
|
67
|
+
.ebay-item-photo-carousel {
|
|
68
68
|
|
|
69
69
|
.carousel-container {
|
|
70
70
|
background: none;
|
|
@@ -84,38 +84,38 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
@media screen and (max-width: 480px) {
|
|
87
|
-
.
|
|
87
|
+
.ebay-item-photo-carousel {
|
|
88
88
|
height: 350px;
|
|
89
89
|
}
|
|
90
|
-
.
|
|
90
|
+
.ebay-item-photo-carousel .carousel-container {
|
|
91
91
|
height: 300px;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.
|
|
95
|
+
.ebay-item-photo {
|
|
96
96
|
overflow: hidden;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.
|
|
99
|
+
.ebay-item-photo img {
|
|
100
100
|
padding: 10px 0;
|
|
101
101
|
width: 100%;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.
|
|
104
|
+
.ebay-items .ebay-item-details {
|
|
105
105
|
display: none;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.
|
|
108
|
+
.ebay-item-details {
|
|
109
109
|
padding-bottom: 10px;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
@media screen and (max-width: 480px) {
|
|
113
|
-
.
|
|
113
|
+
.ebay-item-details {
|
|
114
114
|
text-align: left;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.
|
|
118
|
+
.ebay-item-price{
|
|
119
119
|
font-size: 1.5em;
|
|
120
120
|
font-weight: bold;
|
|
121
121
|
/* background-image: url(/images/pix/pix-bg-sm-bw.gif); */
|
|
@@ -157,20 +157,20 @@ export function ShoppingCart(props) {
|
|
|
157
157
|
console.log("SendMail Response:", sendMailResponse);
|
|
158
158
|
// ========== THANK YOU ==========
|
|
159
159
|
const pmt = orderData.purchase_units[0].payments.captures[0];
|
|
160
|
-
return (_jsxs("div", { className: "
|
|
160
|
+
return (_jsxs("div", { className: "pix-cart", children: [_jsx(CalloutHeader, { title: "Shopping Cart : " }), _jsx("br", {}), _jsx("div", { id: "paypal-button-container", className: "paypal-button-container" }), _jsxs("div", { children: [_jsx("h3", { children: "Thank you for your payment!" }), "Payment ID : ", pmt.id, " ", _jsx("br", {}), "Status : ", pmt.status, " ", _jsx("br", {}), "Amount : $", pmt.amount.value + " " + pmt.amount.currency_code, " ", _jsx("br", {}), "Created : ", pmt.create_time, " ", _jsx("br", {})] })] }));
|
|
161
161
|
}
|
|
162
162
|
else if (progressStep === "Checkout") {
|
|
163
163
|
// ========== CHECKOUT ==========
|
|
164
|
-
return (_jsxs("div", { className: "
|
|
164
|
+
return (_jsxs("div", { className: "pix-cart", children: [_jsx(CalloutHeader, { title: "Checkout Summary : " }), checkoutData && _jsx(CheckoutItems, { ...checkoutData }), _jsx("br", {}), _jsx(FormButton, { className: "pix-cart-button", type: "button", id: "backToCart", text: "<= Back To Cart", onClick: () => SetProgressStep("ShippingInfo") }), _jsx("br", {}), payPalClientID && (_jsx(PayPal, { payPalClientID: payPalClientID, checkoutData: getCheckoutData(), onApprove: handleOnApprove }))] }));
|
|
165
165
|
}
|
|
166
166
|
else if (progressStep === "ShippingInfo") {
|
|
167
167
|
// ========== SHOPPING CART ==========
|
|
168
168
|
// ========== SHIPPING INFO ==========
|
|
169
|
-
return (_jsxs("div", { className: "
|
|
169
|
+
return (_jsxs("div", { className: "pix-cart", children: [_jsx(CalloutHeader, { title: "Shopping Cart : " }), paintCartItems(shoppingCart ?? []), _jsx("br", {}), _jsx("div", { children: _jsx(FormButton, { className: "pix-cart-button", type: "button", id: "backToCart", text: "Clear Cart", onClick: () => clearShoppingCart() }) }), _jsx("br", {}), _jsx("br", {}), _jsx("hr", {}), _jsx("br", {}), _jsx("br", {}), _jsxs("div", { children: [_jsx(CalloutHeader, { title: "Shipping To : " }), _jsx(FormEngine, { name: "address_to", id: "address_to", formData: shippingToData, onSubmitHandler: onShippingSubmit })] })] }));
|
|
170
170
|
}
|
|
171
171
|
else {
|
|
172
172
|
// ========== EMPTY SHOPPING CART ==========
|
|
173
|
-
return (_jsxs("div", { className: "
|
|
173
|
+
return (_jsxs("div", { className: "pix-cart", children: [_jsx(CalloutHeader, { title: "Shopping Cart : " }), _jsx("br", {}), _jsx("div", { className: "centered", children: "No items in your shopping cart" }), _jsx("div", { id: "paypal-button-container", className: "paypal-button-container" })] }));
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
/**
|
|
@@ -205,13 +205,13 @@ export function ShoppingCartItem(props) {
|
|
|
205
205
|
const thisItem = props.item;
|
|
206
206
|
const thisItemTarget = "_self"; // "_blank"
|
|
207
207
|
const config = usePixelatedConfig();
|
|
208
|
-
return (_jsxs("div", { className: "
|
|
208
|
+
return (_jsxs("div", { className: "pix-cart-item row-12col", children: [_jsx("div", { className: "pix-cart-item-photo grid-s1-e4", children: thisItem.itemURL && thisItem.itemImageURL
|
|
209
209
|
? _jsx("a", { href: thisItem.itemURL, target: thisItemTarget, rel: "noopener noreferrer", children: _jsx(SmartImage, { src: thisItem.itemImageURL, alt: thisItem.itemTitle, cloudinaryEnv: config?.cloudinary?.product_env, cloudinaryDomain: config?.cloudinary?.baseUrl, cloudinaryTransforms: config?.cloudinary?.transforms }) })
|
|
210
210
|
: thisItem.itemImageURL
|
|
211
211
|
? (_jsx(SmartImage, { src: thisItem.itemImageURL, title: thisItem.itemTitle, alt: thisItem.itemTitle, cloudinaryEnv: config?.cloudinary?.product_env, cloudinaryDomain: config?.cloudinary?.baseUrl, cloudinaryTransforms: config?.cloudinary?.transforms }))
|
|
212
|
-
: _jsx(_Fragment, {}) }), _jsxs("div", { className: "grid-s4-e11", children: [_jsx("div", { className: "
|
|
212
|
+
: _jsx(_Fragment, {}) }), _jsxs("div", { className: "grid-s4-e11", children: [_jsx("div", { className: "pix-cart-item-header", children: _jsx("span", { children: thisItem.itemURL
|
|
213
213
|
? _jsx("a", { href: thisItem.itemURL, target: thisItemTarget, rel: "noopener noreferrer", children: _jsx("h2", { className: "", children: thisItem.itemTitle }) })
|
|
214
|
-
: _jsx("h2", { className: "", children: thisItem.itemTitle }) }) }), _jsxs("div", { className: "
|
|
214
|
+
: _jsx("h2", { className: "", children: thisItem.itemTitle }) }) }), _jsxs("div", { className: "pix-cart-item-details grid12", children: [_jsx("br", {}), _jsxs("div", { children: [_jsx("b", { children: "Item ID: " }), thisItem.itemID] }), _jsxs("div", { children: [_jsx("b", { children: "Quantity: " }), thisItem.itemQuantity] }), _jsx("br", {}), _jsx("div", { children: _jsx(FormButton, { className: "pix-cart-button", type: "button", id: `btn-rm-${thisItem.itemID}`, text: "Remove Item From Cart", onClick: () => removeFromShoppingCart(thisItem) }) })] })] }), _jsx("div", { className: "grid-s11-e13", children: _jsx("div", { className: "pix-cart-item-price", children: formatAsUSD(thisItem.itemCost) }) })] }));
|
|
215
215
|
}
|
|
216
216
|
/**
|
|
217
217
|
* CheckoutItems — Display a checkout summary with itemized lines and shipping information.
|
|
@@ -338,7 +338,7 @@ export function CartButton(props) {
|
|
|
338
338
|
MicroInteractions({ cartpulse: false });
|
|
339
339
|
}
|
|
340
340
|
}, [cartCount]);
|
|
341
|
-
return (_jsx("div", { className: "
|
|
341
|
+
return (_jsx("div", { className: "pix-cart", children: _jsxs("button", { className: "pix-cart-button", type: "button", id: "pix-cart-button", onClick: () => window.location.href = props.href, children: [_jsx(SmartImage, { src: "/images/icons/cart-icon.png", title: "View Shopping Cart", alt: "View Shopping Cart", cloudinaryEnv: config?.cloudinary?.product_env, cloudinaryDomain: config?.cloudinary?.baseUrl, cloudinaryTransforms: config?.cloudinary?.transforms }), _jsxs("span", { children: ["\u00A0", `(${cartCount})`] })] }) }));
|
|
342
342
|
}
|
|
343
343
|
/**
|
|
344
344
|
* ViewItemDetails — Button to navigate to an item detail page for a given item ID.
|
|
@@ -353,7 +353,7 @@ ViewItemDetails.propTypes = {
|
|
|
353
353
|
itemID: PropTypes.string.isRequired,
|
|
354
354
|
};
|
|
355
355
|
export function ViewItemDetails(props) {
|
|
356
|
-
return (_jsx("div", { children: _jsx(FormButton, { className: "
|
|
356
|
+
return (_jsx("div", { children: _jsx(FormButton, { className: "pix-cart-button", type: "button", id: `btn-item-${props.itemID}`, text: "View Item Details", onClick: () => window.location.href = `${props.href}/${props.itemID}` }) }));
|
|
357
357
|
}
|
|
358
358
|
/**
|
|
359
359
|
* AddToCartButton — Button that adds an item to the shopping cart and displays a confirmation modal.
|
|
@@ -380,7 +380,7 @@ export function AddToCartButton(props) {
|
|
|
380
380
|
props.handler(props.item);
|
|
381
381
|
handleModalOpen(e.nativeEvent, "-" + props.itemID);
|
|
382
382
|
}
|
|
383
|
-
return (_jsxs("div", { children: [_jsx(FormButton, { className: "
|
|
383
|
+
return (_jsxs("div", { children: [_jsx(FormButton, { className: "pix-cart-button", type: "button", id: `btn-add-${props.itemID}`, text: "Add to Shopping Cart", onClick: (e) => handleClick(e) }), modalContent && _jsx(Modal, { modalContent: modalContent, modalID: "-" + props.itemID })] }));
|
|
384
384
|
}
|
|
385
385
|
/**
|
|
386
386
|
* GoToCartButton — Button that navigates the user to the shopping cart page.
|
|
@@ -395,5 +395,5 @@ GoToCartButton.propTypes = {
|
|
|
395
395
|
itemID: PropTypes.string.isRequired,
|
|
396
396
|
};
|
|
397
397
|
export function GoToCartButton(props) {
|
|
398
|
-
return (_jsx("div", { children: _jsx(FormButton, { className: "
|
|
398
|
+
return (_jsx("div", { children: _jsx(FormButton, { className: "pix-cart-button", type: "button", id: `btn-cart-${props.itemID}`, text: "Go to Shopping Cart", onClick: () => window.location.href = props.href }) }));
|
|
399
399
|
}
|